@fingerprintjs/fingerprintjs
Advanced tools
Comparing version 3.1.0-dev.1 to 3.1.0-dev.2
/** | ||
* FingerprintJS v3.1.0-dev.1 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* FingerprintJS v3.1.0-dev.2 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -247,10 +247,10 @@ * | ||
var version = "3.1.0-dev.1"; | ||
var version = "3.1.0-dev.2"; | ||
var w = window; | ||
function requestIdleCallbackIfAvailable(fallbackTimeout, deadlineTimeout) { | ||
if (deadlineTimeout === void 0) { deadlineTimeout = Infinity; } | ||
return new Promise(function (resolve) { | ||
if (w.requestIdleCallback) { | ||
w.requestIdleCallback(function () { return resolve(); }, { timeout: deadlineTimeout }); | ||
var requestIdleCallback = window.requestIdleCallback; | ||
if (requestIdleCallback) { | ||
requestIdleCallback(function () { return resolve(); }, { timeout: deadlineTimeout }); | ||
} | ||
@@ -326,5 +326,2 @@ else { | ||
*/ | ||
var w$1 = window; | ||
var n = navigator; | ||
var d = document; | ||
/** | ||
@@ -337,7 +334,9 @@ * Checks whether the browser is based on Trident (the Internet Explorer engine) without using user-agent. | ||
function isTrident() { | ||
var w = window; | ||
var n = navigator; | ||
// The properties are checked to be in IE 10, IE 11 and not to be in other browsers in October 2020 | ||
return (countTruthy([ | ||
'MSCSSMatrix' in w$1, | ||
'msSetImmediate' in w$1, | ||
'msIndexedDB' in w$1, | ||
'MSCSSMatrix' in w, | ||
'msSetImmediate' in w, | ||
'msIndexedDB' in w, | ||
'msMaxTouchPoints' in n, | ||
@@ -355,3 +354,5 @@ 'msPointerEnabled' in n, | ||
// Based on research in October 2020 | ||
return (countTruthy(['msWriteProfilerMark' in w$1, 'MSStream' in w$1, 'msLaunchUri' in n, 'msSaveBlob' in n]) >= 3 && | ||
var w = window; | ||
var n = navigator; | ||
return (countTruthy(['msWriteProfilerMark' in w, 'MSStream' in w, 'msLaunchUri' in n, 'msSaveBlob' in n]) >= 3 && | ||
!isTrident()); | ||
@@ -367,2 +368,4 @@ } | ||
// Based on research in October 2020. Tested to detect Chromium 42-86. | ||
var w = window; | ||
var n = navigator; | ||
return (countTruthy([ | ||
@@ -372,6 +375,6 @@ 'webkitPersistentStorage' in n, | ||
n.vendor.indexOf('Google') === 0, | ||
'webkitResolveLocalFileSystemURL' in w$1, | ||
'BatteryManager' in w$1, | ||
'webkitMediaStream' in w$1, | ||
'webkitSpeechGrammar' in w$1, | ||
'webkitResolveLocalFileSystemURL' in w, | ||
'BatteryManager' in w, | ||
'webkitMediaStream' in w, | ||
'webkitSpeechGrammar' in w, | ||
]) >= 5); | ||
@@ -388,9 +391,11 @@ } | ||
// Based on research in September 2020 | ||
var w = window; | ||
var n = navigator; | ||
return (countTruthy([ | ||
'ApplePayError' in w$1, | ||
'CSSPrimitiveValue' in w$1, | ||
'Counter' in w$1, | ||
'ApplePayError' in w, | ||
'CSSPrimitiveValue' in w, | ||
'Counter' in w, | ||
n.vendor.indexOf('Apple') === 0, | ||
'getStorageUpdates' in n, | ||
'WebKitMediaKeys' in w$1, | ||
'WebKitMediaKeys' in w, | ||
]) >= 4); | ||
@@ -405,7 +410,8 @@ } | ||
function isDesktopSafari() { | ||
var w = window; | ||
return (countTruthy([ | ||
'safari' in w$1, | ||
!('DeviceMotionEvent' in w$1), | ||
!('ongestureend' in w$1), | ||
!('standalone' in n), | ||
'safari' in w, | ||
!('DeviceMotionEvent' in w), | ||
!('ongestureend' in w), | ||
!('standalone' in navigator), | ||
]) >= 3); | ||
@@ -420,11 +426,12 @@ } | ||
function isGecko() { | ||
var _a; | ||
var _a, _b; | ||
var w = window; | ||
// Based on research in September 2020 | ||
return (countTruthy([ | ||
'buildID' in n, | ||
((_a = d.documentElement) === null || _a === void 0 ? void 0 : _a.style) && 'MozAppearance' in d.documentElement.style, | ||
'MediaRecorderErrorEvent' in w$1, | ||
'mozInnerScreenX' in w$1, | ||
'CSSMozDocumentRule' in w$1, | ||
'CanvasCaptureMediaStream' in w$1, | ||
'buildID' in navigator, | ||
'MozAppearance' in ((_b = (_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {}), | ||
'MediaRecorderErrorEvent' in w, | ||
'mozInnerScreenX' in w, | ||
'CSSMozDocumentRule' in w, | ||
'CanvasCaptureMediaStream' in w, | ||
]) >= 4); | ||
@@ -438,7 +445,8 @@ } | ||
// Checked in Chrome 85 vs Chrome 86 both on desktop and Android | ||
var w = window; | ||
return (countTruthy([ | ||
!('MediaSettingsRange' in w$1), | ||
'RTCEncodedAudioFrame' in w$1, | ||
'' + w$1.Intl === '[object Intl]', | ||
'' + w$1.Reflect === '[object Reflect]', | ||
!('MediaSettingsRange' in w), | ||
'RTCEncodedAudioFrame' in w, | ||
'' + w.Intl === '[object Intl]', | ||
'' + w.Reflect === '[object Reflect]', | ||
]) >= 3); | ||
@@ -454,10 +462,33 @@ } | ||
// Checked in Safari 9ā14 | ||
var w = window; | ||
return (countTruthy([ | ||
'DOMRectList' in w$1, | ||
'RTCPeerConnectionIceEvent' in w$1, | ||
'SVGGeometryElement' in w$1, | ||
'ontransitioncancel' in w$1, | ||
'DOMRectList' in w, | ||
'RTCPeerConnectionIceEvent' in w, | ||
'SVGGeometryElement' in w, | ||
'ontransitioncancel' in w, | ||
]) >= 3); | ||
} | ||
/** | ||
* Checks whether the device is an iPad. | ||
* It doesn't check that the engine is WebKit and that the WebKit isn't desktop. | ||
*/ | ||
function isIPad() { | ||
// Checked on: | ||
// Safari on iPadOS (both mobile and desktop modes): 8, 11, 12, 13, 14 | ||
// Chrome on iPadOS (both mobile and desktop modes): 11, 12, 13, 14 | ||
// Safari on iOS (both mobile and desktop modes): 9, 10, 11, 12, 13, 14 | ||
// Chrome on iOS (both mobile and desktop modes): 9, 10, 11, 12, 13, 14 | ||
// Before iOS 13. Safari tampers the value in "request desktop site" mode since iOS 13. | ||
if (navigator.platform === 'iPad') { | ||
return true; | ||
} | ||
var s = screen; | ||
var screenRatio = s.width / s.height; | ||
return (countTruthy([ | ||
'MediaSource' in window, | ||
!!Element.prototype.webkitRequestFullscreen, | ||
screenRatio > 2 / 3 && screenRatio < 3 / 2, | ||
]) >= 2); | ||
} | ||
/** | ||
* Warning for package users: | ||
@@ -467,5 +498,7 @@ * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk. | ||
function getFullscreenElement() { | ||
var d = document; | ||
return d.fullscreenElement || d.msFullscreenElement || d.mozFullScreenElement || d.webkitFullscreenElement || null; | ||
} | ||
function exitFullscreen() { | ||
var d = document; | ||
// `call` is required because the function throws an error without a proper "this" context | ||
@@ -475,12 +508,11 @@ return (d.exitFullscreen || d.msExitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen).call(d); | ||
var w$2 = window; | ||
var d$1 = document; | ||
// Inspired by and based on https://github.com/cozylife/audio-fingerprint | ||
function getAudioFingerprint() { | ||
return tslib.__awaiter(this, void 0, void 0, function () { | ||
var AudioContext, context, oscillator, compressor, buffer, error_1; | ||
var w, AudioContext, context, oscillator, compressor, buffer, error_1; | ||
return tslib.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
AudioContext = w$2.OfflineAudioContext || w$2.webkitOfflineAudioContext; | ||
w = window; | ||
AudioContext = w.OfflineAudioContext || w.webkitOfflineAudioContext; | ||
if (!AudioContext) { | ||
@@ -567,3 +599,3 @@ return [2 /*return*/, -2 /* NotSupported */]; | ||
// can be suspended when `document.hidden === false` and start running after a retry. | ||
if (!d$1.hidden) { | ||
if (!document.hidden) { | ||
resumeTriesLeft--; | ||
@@ -596,3 +628,2 @@ } | ||
var d$2 = document; | ||
// We use m or w because these two characters take up the maximum width. | ||
@@ -683,7 +714,8 @@ // And we use a LLi so that the same matching fonts can get separated. | ||
function getFonts() { | ||
var h = d$2.body; | ||
var d = document; | ||
var holder = d.body; | ||
// div to load spans for the base fonts | ||
var baseFontsDiv = d$2.createElement('div'); | ||
var baseFontsDiv = d.createElement('div'); | ||
// div to load spans for the fonts to detect | ||
var fontsDiv = d$2.createElement('div'); | ||
var fontsDiv = d.createElement('div'); | ||
var defaultWidth = {}; | ||
@@ -693,3 +725,3 @@ var defaultHeight = {}; | ||
var createSpan = function () { | ||
var span = d$2.createElement('span'); | ||
var span = d.createElement('span'); | ||
span.textContent = testString; | ||
@@ -744,3 +776,3 @@ for (var _i = 0, _a = Object.keys(fontSpanStyle); _i < _a.length; _i++) { | ||
// add the spans to the DOM | ||
h.appendChild(baseFontsDiv); | ||
holder.appendChild(baseFontsDiv); | ||
// get the default width for the three base fonts | ||
@@ -754,3 +786,3 @@ for (var index = 0, length_1 = baseFonts.length; index < length_1; index++) { | ||
// add all the spans to the DOM | ||
h.appendChild(fontsDiv); | ||
holder.appendChild(fontsDiv); | ||
// check available fonts | ||
@@ -764,4 +796,4 @@ var available = []; | ||
// remove spans from DOM | ||
h.removeChild(fontsDiv); | ||
h.removeChild(baseFontsDiv); | ||
holder.removeChild(fontsDiv); | ||
holder.removeChild(baseFontsDiv); | ||
return available; | ||
@@ -873,4 +905,2 @@ } | ||
var n$1 = navigator; | ||
var w$3 = window; | ||
/** | ||
@@ -884,9 +914,10 @@ * This is a crude and primitive touch screen detection. It's not possible to currently reliably detect the availability | ||
function getTouchSupport() { | ||
var n = navigator; | ||
var maxTouchPoints = 0; | ||
var touchEvent; | ||
if (n$1.maxTouchPoints !== undefined) { | ||
maxTouchPoints = toInt(n$1.maxTouchPoints); | ||
if (n.maxTouchPoints !== undefined) { | ||
maxTouchPoints = toInt(n.maxTouchPoints); | ||
} | ||
else if (n$1.msMaxTouchPoints !== undefined) { | ||
maxTouchPoints = n$1.msMaxTouchPoints; | ||
else if (n.msMaxTouchPoints !== undefined) { | ||
maxTouchPoints = n.msMaxTouchPoints; | ||
} | ||
@@ -900,3 +931,3 @@ try { | ||
} | ||
var touchStart = 'ontouchstart' in w$3; | ||
var touchStart = 'ontouchstart' in window; | ||
return { | ||
@@ -913,18 +944,18 @@ maxTouchPoints: maxTouchPoints, | ||
var n$2 = navigator; | ||
function getLanguages() { | ||
var n = navigator; | ||
var result = []; | ||
var language = n$2.language || n$2.userLanguage || n$2.browserLanguage || n$2.systemLanguage; | ||
var language = n.language || n.userLanguage || n.browserLanguage || n.systemLanguage; | ||
if (language !== undefined) { | ||
result.push([language]); | ||
} | ||
if (Array.isArray(n$2.languages)) { | ||
if (Array.isArray(n.languages)) { | ||
// Starting from Chromium 86, there is only a single value in `navigator.language` in Incognito mode: | ||
// the value of `navigator.language`. Therefore the value is ignored in this browser. | ||
if (!(isChromium() && isChromium86OrNewer())) { | ||
result.push(n$2.languages); | ||
result.push(n.languages); | ||
} | ||
} | ||
else if (typeof n$2.languages === 'string') { | ||
var languages = n$2.languages; | ||
else if (typeof n.languages === 'string') { | ||
var languages = n.languages; | ||
if (languages) { | ||
@@ -946,7 +977,7 @@ result.push(languages.split(',')); | ||
var w$4 = window; | ||
function getScreenResolution() { | ||
var s = screen; | ||
// Some browsers return screen resolution as strings, e.g. "1200", instead of a number, e.g. 1200. | ||
// I suspect it's done by certain plugins that randomize browser properties to prevent fingerprinting. | ||
var dimensions = [toInt(w$4.screen.width), toInt(w$4.screen.height)]; | ||
var dimensions = [toInt(s.width), toInt(s.height)]; | ||
dimensions.sort().reverse(); | ||
@@ -1068,7 +1099,7 @@ return dimensions; | ||
var w$5 = window; | ||
function getTimezone() { | ||
var _a; | ||
if ((_a = w$5.Intl) === null || _a === void 0 ? void 0 : _a.DateTimeFormat) { | ||
var timezone = new w$5.Intl.DateTimeFormat().resolvedOptions().timeZone; | ||
var DateTimeFormat = (_a = window.Intl) === null || _a === void 0 ? void 0 : _a.DateTimeFormat; | ||
if (DateTimeFormat) { | ||
var timezone = new DateTimeFormat().resolvedOptions().timeZone; | ||
if (timezone) { | ||
@@ -1138,8 +1169,15 @@ return timezone; | ||
/** | ||
* It should be improved to handle mock value on iOS: | ||
* https://github.com/fingerprintjs/fingerprintjs/issues/514#issuecomment-727782842 | ||
*/ | ||
function getPlatform() { | ||
return navigator.platform; | ||
// Android Chrome 86 and 87 and Android Firefox 80 and 84 don't mock the platform value when desktop mode is requested | ||
var platform = navigator.platform; | ||
// iOS mocks the platform value when desktop version is requested: https://github.com/fingerprintjs/fingerprintjs/issues/514 | ||
// iPad uses desktop mode by default since iOS 13 | ||
// The value is 'MacIntel' on M1 Macs | ||
// The value is 'iPhone' on iPod Touch | ||
if (platform === 'MacIntel') { | ||
if (isWebKit() && !isDesktopSafari()) { | ||
return isIPad() ? 'iPad' : 'iPhone'; | ||
} | ||
} | ||
return platform; | ||
} | ||
@@ -1178,3 +1216,2 @@ | ||
var d$3 = document; | ||
/** | ||
@@ -1188,2 +1225,3 @@ * navigator.cookieEnabled cannot detect custom or nuanced cookie blocking configurations. For example, when blocking | ||
function areCookiesEnabled() { | ||
var d = document; | ||
// Taken from here: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cookies.js | ||
@@ -1198,6 +1236,6 @@ // navigator.cookieEnabled cannot detect custom or nuanced cookie blocking configurations. For example, when blocking | ||
// Create cookie | ||
d$3.cookie = 'cookietest=1; SameSite=Strict;'; | ||
var result = d$3.cookie.indexOf('cookietest=') !== -1; | ||
d.cookie = 'cookietest=1; SameSite=Strict;'; | ||
var result = d.cookie.indexOf('cookietest=') !== -1; | ||
// Delete cookie | ||
d$3.cookie = 'cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT'; | ||
d.cookie = 'cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT'; | ||
return result; | ||
@@ -1204,0 +1242,0 @@ } |
/** | ||
* FingerprintJS v3.1.0-dev.1 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* FingerprintJS v3.1.0-dev.2 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -83,6 +83,2 @@ * | ||
/** | ||
* It should be improved to handle mock value on iOS: | ||
* https://github.com/fingerprintjs/fingerprintjs/issues/514#issuecomment-727782842 | ||
*/ | ||
declare function getPlatform(): string; | ||
@@ -89,0 +85,0 @@ |
/** | ||
* FingerprintJS v3.1.0-dev.1 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* FingerprintJS v3.1.0-dev.2 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -243,10 +243,10 @@ * | ||
var version = "3.1.0-dev.1"; | ||
var version = "3.1.0-dev.2"; | ||
var w = window; | ||
function requestIdleCallbackIfAvailable(fallbackTimeout, deadlineTimeout) { | ||
if (deadlineTimeout === void 0) { deadlineTimeout = Infinity; } | ||
return new Promise(function (resolve) { | ||
if (w.requestIdleCallback) { | ||
w.requestIdleCallback(function () { return resolve(); }, { timeout: deadlineTimeout }); | ||
var requestIdleCallback = window.requestIdleCallback; | ||
if (requestIdleCallback) { | ||
requestIdleCallback(function () { return resolve(); }, { timeout: deadlineTimeout }); | ||
} | ||
@@ -322,5 +322,2 @@ else { | ||
*/ | ||
var w$1 = window; | ||
var n = navigator; | ||
var d = document; | ||
/** | ||
@@ -333,7 +330,9 @@ * Checks whether the browser is based on Trident (the Internet Explorer engine) without using user-agent. | ||
function isTrident() { | ||
var w = window; | ||
var n = navigator; | ||
// The properties are checked to be in IE 10, IE 11 and not to be in other browsers in October 2020 | ||
return (countTruthy([ | ||
'MSCSSMatrix' in w$1, | ||
'msSetImmediate' in w$1, | ||
'msIndexedDB' in w$1, | ||
'MSCSSMatrix' in w, | ||
'msSetImmediate' in w, | ||
'msIndexedDB' in w, | ||
'msMaxTouchPoints' in n, | ||
@@ -351,3 +350,5 @@ 'msPointerEnabled' in n, | ||
// Based on research in October 2020 | ||
return (countTruthy(['msWriteProfilerMark' in w$1, 'MSStream' in w$1, 'msLaunchUri' in n, 'msSaveBlob' in n]) >= 3 && | ||
var w = window; | ||
var n = navigator; | ||
return (countTruthy(['msWriteProfilerMark' in w, 'MSStream' in w, 'msLaunchUri' in n, 'msSaveBlob' in n]) >= 3 && | ||
!isTrident()); | ||
@@ -363,2 +364,4 @@ } | ||
// Based on research in October 2020. Tested to detect Chromium 42-86. | ||
var w = window; | ||
var n = navigator; | ||
return (countTruthy([ | ||
@@ -368,6 +371,6 @@ 'webkitPersistentStorage' in n, | ||
n.vendor.indexOf('Google') === 0, | ||
'webkitResolveLocalFileSystemURL' in w$1, | ||
'BatteryManager' in w$1, | ||
'webkitMediaStream' in w$1, | ||
'webkitSpeechGrammar' in w$1, | ||
'webkitResolveLocalFileSystemURL' in w, | ||
'BatteryManager' in w, | ||
'webkitMediaStream' in w, | ||
'webkitSpeechGrammar' in w, | ||
]) >= 5); | ||
@@ -384,9 +387,11 @@ } | ||
// Based on research in September 2020 | ||
var w = window; | ||
var n = navigator; | ||
return (countTruthy([ | ||
'ApplePayError' in w$1, | ||
'CSSPrimitiveValue' in w$1, | ||
'Counter' in w$1, | ||
'ApplePayError' in w, | ||
'CSSPrimitiveValue' in w, | ||
'Counter' in w, | ||
n.vendor.indexOf('Apple') === 0, | ||
'getStorageUpdates' in n, | ||
'WebKitMediaKeys' in w$1, | ||
'WebKitMediaKeys' in w, | ||
]) >= 4); | ||
@@ -401,7 +406,8 @@ } | ||
function isDesktopSafari() { | ||
var w = window; | ||
return (countTruthy([ | ||
'safari' in w$1, | ||
!('DeviceMotionEvent' in w$1), | ||
!('ongestureend' in w$1), | ||
!('standalone' in n), | ||
'safari' in w, | ||
!('DeviceMotionEvent' in w), | ||
!('ongestureend' in w), | ||
!('standalone' in navigator), | ||
]) >= 3); | ||
@@ -416,11 +422,12 @@ } | ||
function isGecko() { | ||
var _a; | ||
var _a, _b; | ||
var w = window; | ||
// Based on research in September 2020 | ||
return (countTruthy([ | ||
'buildID' in n, | ||
((_a = d.documentElement) === null || _a === void 0 ? void 0 : _a.style) && 'MozAppearance' in d.documentElement.style, | ||
'MediaRecorderErrorEvent' in w$1, | ||
'mozInnerScreenX' in w$1, | ||
'CSSMozDocumentRule' in w$1, | ||
'CanvasCaptureMediaStream' in w$1, | ||
'buildID' in navigator, | ||
'MozAppearance' in ((_b = (_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {}), | ||
'MediaRecorderErrorEvent' in w, | ||
'mozInnerScreenX' in w, | ||
'CSSMozDocumentRule' in w, | ||
'CanvasCaptureMediaStream' in w, | ||
]) >= 4); | ||
@@ -434,7 +441,8 @@ } | ||
// Checked in Chrome 85 vs Chrome 86 both on desktop and Android | ||
var w = window; | ||
return (countTruthy([ | ||
!('MediaSettingsRange' in w$1), | ||
'RTCEncodedAudioFrame' in w$1, | ||
'' + w$1.Intl === '[object Intl]', | ||
'' + w$1.Reflect === '[object Reflect]', | ||
!('MediaSettingsRange' in w), | ||
'RTCEncodedAudioFrame' in w, | ||
'' + w.Intl === '[object Intl]', | ||
'' + w.Reflect === '[object Reflect]', | ||
]) >= 3); | ||
@@ -450,10 +458,33 @@ } | ||
// Checked in Safari 9ā14 | ||
var w = window; | ||
return (countTruthy([ | ||
'DOMRectList' in w$1, | ||
'RTCPeerConnectionIceEvent' in w$1, | ||
'SVGGeometryElement' in w$1, | ||
'ontransitioncancel' in w$1, | ||
'DOMRectList' in w, | ||
'RTCPeerConnectionIceEvent' in w, | ||
'SVGGeometryElement' in w, | ||
'ontransitioncancel' in w, | ||
]) >= 3); | ||
} | ||
/** | ||
* Checks whether the device is an iPad. | ||
* It doesn't check that the engine is WebKit and that the WebKit isn't desktop. | ||
*/ | ||
function isIPad() { | ||
// Checked on: | ||
// Safari on iPadOS (both mobile and desktop modes): 8, 11, 12, 13, 14 | ||
// Chrome on iPadOS (both mobile and desktop modes): 11, 12, 13, 14 | ||
// Safari on iOS (both mobile and desktop modes): 9, 10, 11, 12, 13, 14 | ||
// Chrome on iOS (both mobile and desktop modes): 9, 10, 11, 12, 13, 14 | ||
// Before iOS 13. Safari tampers the value in "request desktop site" mode since iOS 13. | ||
if (navigator.platform === 'iPad') { | ||
return true; | ||
} | ||
var s = screen; | ||
var screenRatio = s.width / s.height; | ||
return (countTruthy([ | ||
'MediaSource' in window, | ||
!!Element.prototype.webkitRequestFullscreen, | ||
screenRatio > 2 / 3 && screenRatio < 3 / 2, | ||
]) >= 2); | ||
} | ||
/** | ||
* Warning for package users: | ||
@@ -463,5 +494,7 @@ * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk. | ||
function getFullscreenElement() { | ||
var d = document; | ||
return d.fullscreenElement || d.msFullscreenElement || d.mozFullScreenElement || d.webkitFullscreenElement || null; | ||
} | ||
function exitFullscreen() { | ||
var d = document; | ||
// `call` is required because the function throws an error without a proper "this" context | ||
@@ -471,12 +504,11 @@ return (d.exitFullscreen || d.msExitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen).call(d); | ||
var w$2 = window; | ||
var d$1 = document; | ||
// Inspired by and based on https://github.com/cozylife/audio-fingerprint | ||
function getAudioFingerprint() { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var AudioContext, context, oscillator, compressor, buffer, error_1; | ||
var w, AudioContext, context, oscillator, compressor, buffer, error_1; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
AudioContext = w$2.OfflineAudioContext || w$2.webkitOfflineAudioContext; | ||
w = window; | ||
AudioContext = w.OfflineAudioContext || w.webkitOfflineAudioContext; | ||
if (!AudioContext) { | ||
@@ -563,3 +595,3 @@ return [2 /*return*/, -2 /* NotSupported */]; | ||
// can be suspended when `document.hidden === false` and start running after a retry. | ||
if (!d$1.hidden) { | ||
if (!document.hidden) { | ||
resumeTriesLeft--; | ||
@@ -592,3 +624,2 @@ } | ||
var d$2 = document; | ||
// We use m or w because these two characters take up the maximum width. | ||
@@ -679,7 +710,8 @@ // And we use a LLi so that the same matching fonts can get separated. | ||
function getFonts() { | ||
var h = d$2.body; | ||
var d = document; | ||
var holder = d.body; | ||
// div to load spans for the base fonts | ||
var baseFontsDiv = d$2.createElement('div'); | ||
var baseFontsDiv = d.createElement('div'); | ||
// div to load spans for the fonts to detect | ||
var fontsDiv = d$2.createElement('div'); | ||
var fontsDiv = d.createElement('div'); | ||
var defaultWidth = {}; | ||
@@ -689,3 +721,3 @@ var defaultHeight = {}; | ||
var createSpan = function () { | ||
var span = d$2.createElement('span'); | ||
var span = d.createElement('span'); | ||
span.textContent = testString; | ||
@@ -740,3 +772,3 @@ for (var _i = 0, _a = Object.keys(fontSpanStyle); _i < _a.length; _i++) { | ||
// add the spans to the DOM | ||
h.appendChild(baseFontsDiv); | ||
holder.appendChild(baseFontsDiv); | ||
// get the default width for the three base fonts | ||
@@ -750,3 +782,3 @@ for (var index = 0, length_1 = baseFonts.length; index < length_1; index++) { | ||
// add all the spans to the DOM | ||
h.appendChild(fontsDiv); | ||
holder.appendChild(fontsDiv); | ||
// check available fonts | ||
@@ -760,4 +792,4 @@ var available = []; | ||
// remove spans from DOM | ||
h.removeChild(fontsDiv); | ||
h.removeChild(baseFontsDiv); | ||
holder.removeChild(fontsDiv); | ||
holder.removeChild(baseFontsDiv); | ||
return available; | ||
@@ -869,4 +901,2 @@ } | ||
var n$1 = navigator; | ||
var w$3 = window; | ||
/** | ||
@@ -880,9 +910,10 @@ * This is a crude and primitive touch screen detection. It's not possible to currently reliably detect the availability | ||
function getTouchSupport() { | ||
var n = navigator; | ||
var maxTouchPoints = 0; | ||
var touchEvent; | ||
if (n$1.maxTouchPoints !== undefined) { | ||
maxTouchPoints = toInt(n$1.maxTouchPoints); | ||
if (n.maxTouchPoints !== undefined) { | ||
maxTouchPoints = toInt(n.maxTouchPoints); | ||
} | ||
else if (n$1.msMaxTouchPoints !== undefined) { | ||
maxTouchPoints = n$1.msMaxTouchPoints; | ||
else if (n.msMaxTouchPoints !== undefined) { | ||
maxTouchPoints = n.msMaxTouchPoints; | ||
} | ||
@@ -896,3 +927,3 @@ try { | ||
} | ||
var touchStart = 'ontouchstart' in w$3; | ||
var touchStart = 'ontouchstart' in window; | ||
return { | ||
@@ -909,18 +940,18 @@ maxTouchPoints: maxTouchPoints, | ||
var n$2 = navigator; | ||
function getLanguages() { | ||
var n = navigator; | ||
var result = []; | ||
var language = n$2.language || n$2.userLanguage || n$2.browserLanguage || n$2.systemLanguage; | ||
var language = n.language || n.userLanguage || n.browserLanguage || n.systemLanguage; | ||
if (language !== undefined) { | ||
result.push([language]); | ||
} | ||
if (Array.isArray(n$2.languages)) { | ||
if (Array.isArray(n.languages)) { | ||
// Starting from Chromium 86, there is only a single value in `navigator.language` in Incognito mode: | ||
// the value of `navigator.language`. Therefore the value is ignored in this browser. | ||
if (!(isChromium() && isChromium86OrNewer())) { | ||
result.push(n$2.languages); | ||
result.push(n.languages); | ||
} | ||
} | ||
else if (typeof n$2.languages === 'string') { | ||
var languages = n$2.languages; | ||
else if (typeof n.languages === 'string') { | ||
var languages = n.languages; | ||
if (languages) { | ||
@@ -942,7 +973,7 @@ result.push(languages.split(',')); | ||
var w$4 = window; | ||
function getScreenResolution() { | ||
var s = screen; | ||
// Some browsers return screen resolution as strings, e.g. "1200", instead of a number, e.g. 1200. | ||
// I suspect it's done by certain plugins that randomize browser properties to prevent fingerprinting. | ||
var dimensions = [toInt(w$4.screen.width), toInt(w$4.screen.height)]; | ||
var dimensions = [toInt(s.width), toInt(s.height)]; | ||
dimensions.sort().reverse(); | ||
@@ -1064,7 +1095,7 @@ return dimensions; | ||
var w$5 = window; | ||
function getTimezone() { | ||
var _a; | ||
if ((_a = w$5.Intl) === null || _a === void 0 ? void 0 : _a.DateTimeFormat) { | ||
var timezone = new w$5.Intl.DateTimeFormat().resolvedOptions().timeZone; | ||
var DateTimeFormat = (_a = window.Intl) === null || _a === void 0 ? void 0 : _a.DateTimeFormat; | ||
if (DateTimeFormat) { | ||
var timezone = new DateTimeFormat().resolvedOptions().timeZone; | ||
if (timezone) { | ||
@@ -1134,8 +1165,15 @@ return timezone; | ||
/** | ||
* It should be improved to handle mock value on iOS: | ||
* https://github.com/fingerprintjs/fingerprintjs/issues/514#issuecomment-727782842 | ||
*/ | ||
function getPlatform() { | ||
return navigator.platform; | ||
// Android Chrome 86 and 87 and Android Firefox 80 and 84 don't mock the platform value when desktop mode is requested | ||
var platform = navigator.platform; | ||
// iOS mocks the platform value when desktop version is requested: https://github.com/fingerprintjs/fingerprintjs/issues/514 | ||
// iPad uses desktop mode by default since iOS 13 | ||
// The value is 'MacIntel' on M1 Macs | ||
// The value is 'iPhone' on iPod Touch | ||
if (platform === 'MacIntel') { | ||
if (isWebKit() && !isDesktopSafari()) { | ||
return isIPad() ? 'iPad' : 'iPhone'; | ||
} | ||
} | ||
return platform; | ||
} | ||
@@ -1174,3 +1212,2 @@ | ||
var d$3 = document; | ||
/** | ||
@@ -1184,2 +1221,3 @@ * navigator.cookieEnabled cannot detect custom or nuanced cookie blocking configurations. For example, when blocking | ||
function areCookiesEnabled() { | ||
var d = document; | ||
// Taken from here: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cookies.js | ||
@@ -1194,6 +1232,6 @@ // navigator.cookieEnabled cannot detect custom or nuanced cookie blocking configurations. For example, when blocking | ||
// Create cookie | ||
d$3.cookie = 'cookietest=1; SameSite=Strict;'; | ||
var result = d$3.cookie.indexOf('cookietest=') !== -1; | ||
d.cookie = 'cookietest=1; SameSite=Strict;'; | ||
var result = d.cookie.indexOf('cookietest=') !== -1; | ||
// Delete cookie | ||
d$3.cookie = 'cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT'; | ||
d.cookie = 'cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT'; | ||
return result; | ||
@@ -1200,0 +1238,0 @@ } |
198
dist/fp.js
/** | ||
* FingerprintJS v3.1.0-dev.1 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* FingerprintJS v3.1.0-dev.2 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -316,10 +316,10 @@ * | ||
var version = "3.1.0-dev.1"; | ||
var version = "3.1.0-dev.2"; | ||
var w = window; | ||
function requestIdleCallbackIfAvailable(fallbackTimeout, deadlineTimeout) { | ||
if (deadlineTimeout === void 0) { deadlineTimeout = Infinity; } | ||
return new Promise(function (resolve) { | ||
if (w.requestIdleCallback) { | ||
w.requestIdleCallback(function () { return resolve(); }, { timeout: deadlineTimeout }); | ||
var requestIdleCallback = window.requestIdleCallback; | ||
if (requestIdleCallback) { | ||
requestIdleCallback(function () { return resolve(); }, { timeout: deadlineTimeout }); | ||
} | ||
@@ -395,5 +395,2 @@ else { | ||
*/ | ||
var w$1 = window; | ||
var n = navigator; | ||
var d = document; | ||
/** | ||
@@ -406,7 +403,9 @@ * Checks whether the browser is based on Trident (the Internet Explorer engine) without using user-agent. | ||
function isTrident() { | ||
var w = window; | ||
var n = navigator; | ||
// The properties are checked to be in IE 10, IE 11 and not to be in other browsers in October 2020 | ||
return (countTruthy([ | ||
'MSCSSMatrix' in w$1, | ||
'msSetImmediate' in w$1, | ||
'msIndexedDB' in w$1, | ||
'MSCSSMatrix' in w, | ||
'msSetImmediate' in w, | ||
'msIndexedDB' in w, | ||
'msMaxTouchPoints' in n, | ||
@@ -424,3 +423,5 @@ 'msPointerEnabled' in n, | ||
// Based on research in October 2020 | ||
return (countTruthy(['msWriteProfilerMark' in w$1, 'MSStream' in w$1, 'msLaunchUri' in n, 'msSaveBlob' in n]) >= 3 && | ||
var w = window; | ||
var n = navigator; | ||
return (countTruthy(['msWriteProfilerMark' in w, 'MSStream' in w, 'msLaunchUri' in n, 'msSaveBlob' in n]) >= 3 && | ||
!isTrident()); | ||
@@ -436,2 +437,4 @@ } | ||
// Based on research in October 2020. Tested to detect Chromium 42-86. | ||
var w = window; | ||
var n = navigator; | ||
return (countTruthy([ | ||
@@ -441,6 +444,6 @@ 'webkitPersistentStorage' in n, | ||
n.vendor.indexOf('Google') === 0, | ||
'webkitResolveLocalFileSystemURL' in w$1, | ||
'BatteryManager' in w$1, | ||
'webkitMediaStream' in w$1, | ||
'webkitSpeechGrammar' in w$1, | ||
'webkitResolveLocalFileSystemURL' in w, | ||
'BatteryManager' in w, | ||
'webkitMediaStream' in w, | ||
'webkitSpeechGrammar' in w, | ||
]) >= 5); | ||
@@ -457,9 +460,11 @@ } | ||
// Based on research in September 2020 | ||
var w = window; | ||
var n = navigator; | ||
return (countTruthy([ | ||
'ApplePayError' in w$1, | ||
'CSSPrimitiveValue' in w$1, | ||
'Counter' in w$1, | ||
'ApplePayError' in w, | ||
'CSSPrimitiveValue' in w, | ||
'Counter' in w, | ||
n.vendor.indexOf('Apple') === 0, | ||
'getStorageUpdates' in n, | ||
'WebKitMediaKeys' in w$1, | ||
'WebKitMediaKeys' in w, | ||
]) >= 4); | ||
@@ -474,7 +479,8 @@ } | ||
function isDesktopSafari() { | ||
var w = window; | ||
return (countTruthy([ | ||
'safari' in w$1, | ||
!('DeviceMotionEvent' in w$1), | ||
!('ongestureend' in w$1), | ||
!('standalone' in n), | ||
'safari' in w, | ||
!('DeviceMotionEvent' in w), | ||
!('ongestureend' in w), | ||
!('standalone' in navigator), | ||
]) >= 3); | ||
@@ -489,11 +495,12 @@ } | ||
function isGecko() { | ||
var _a; | ||
var _a, _b; | ||
var w = window; | ||
// Based on research in September 2020 | ||
return (countTruthy([ | ||
'buildID' in n, | ||
((_a = d.documentElement) === null || _a === void 0 ? void 0 : _a.style) && 'MozAppearance' in d.documentElement.style, | ||
'MediaRecorderErrorEvent' in w$1, | ||
'mozInnerScreenX' in w$1, | ||
'CSSMozDocumentRule' in w$1, | ||
'CanvasCaptureMediaStream' in w$1, | ||
'buildID' in navigator, | ||
'MozAppearance' in ((_b = (_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {}), | ||
'MediaRecorderErrorEvent' in w, | ||
'mozInnerScreenX' in w, | ||
'CSSMozDocumentRule' in w, | ||
'CanvasCaptureMediaStream' in w, | ||
]) >= 4); | ||
@@ -507,7 +514,8 @@ } | ||
// Checked in Chrome 85 vs Chrome 86 both on desktop and Android | ||
var w = window; | ||
return (countTruthy([ | ||
!('MediaSettingsRange' in w$1), | ||
'RTCEncodedAudioFrame' in w$1, | ||
'' + w$1.Intl === '[object Intl]', | ||
'' + w$1.Reflect === '[object Reflect]', | ||
!('MediaSettingsRange' in w), | ||
'RTCEncodedAudioFrame' in w, | ||
'' + w.Intl === '[object Intl]', | ||
'' + w.Reflect === '[object Reflect]', | ||
]) >= 3); | ||
@@ -523,10 +531,33 @@ } | ||
// Checked in Safari 9ā14 | ||
var w = window; | ||
return (countTruthy([ | ||
'DOMRectList' in w$1, | ||
'RTCPeerConnectionIceEvent' in w$1, | ||
'SVGGeometryElement' in w$1, | ||
'ontransitioncancel' in w$1, | ||
'DOMRectList' in w, | ||
'RTCPeerConnectionIceEvent' in w, | ||
'SVGGeometryElement' in w, | ||
'ontransitioncancel' in w, | ||
]) >= 3); | ||
} | ||
/** | ||
* Checks whether the device is an iPad. | ||
* It doesn't check that the engine is WebKit and that the WebKit isn't desktop. | ||
*/ | ||
function isIPad() { | ||
// Checked on: | ||
// Safari on iPadOS (both mobile and desktop modes): 8, 11, 12, 13, 14 | ||
// Chrome on iPadOS (both mobile and desktop modes): 11, 12, 13, 14 | ||
// Safari on iOS (both mobile and desktop modes): 9, 10, 11, 12, 13, 14 | ||
// Chrome on iOS (both mobile and desktop modes): 9, 10, 11, 12, 13, 14 | ||
// Before iOS 13. Safari tampers the value in "request desktop site" mode since iOS 13. | ||
if (navigator.platform === 'iPad') { | ||
return true; | ||
} | ||
var s = screen; | ||
var screenRatio = s.width / s.height; | ||
return (countTruthy([ | ||
'MediaSource' in window, | ||
!!Element.prototype.webkitRequestFullscreen, | ||
screenRatio > 2 / 3 && screenRatio < 3 / 2, | ||
]) >= 2); | ||
} | ||
/** | ||
* Warning for package users: | ||
@@ -536,5 +567,7 @@ * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk. | ||
function getFullscreenElement() { | ||
var d = document; | ||
return d.fullscreenElement || d.msFullscreenElement || d.mozFullScreenElement || d.webkitFullscreenElement || null; | ||
} | ||
function exitFullscreen() { | ||
var d = document; | ||
// `call` is required because the function throws an error without a proper "this" context | ||
@@ -544,12 +577,11 @@ return (d.exitFullscreen || d.msExitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen).call(d); | ||
var w$2 = window; | ||
var d$1 = document; | ||
// Inspired by and based on https://github.com/cozylife/audio-fingerprint | ||
function getAudioFingerprint() { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var AudioContext, context, oscillator, compressor, buffer, error_1; | ||
var w, AudioContext, context, oscillator, compressor, buffer, error_1; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
AudioContext = w$2.OfflineAudioContext || w$2.webkitOfflineAudioContext; | ||
w = window; | ||
AudioContext = w.OfflineAudioContext || w.webkitOfflineAudioContext; | ||
if (!AudioContext) { | ||
@@ -636,3 +668,3 @@ return [2 /*return*/, -2 /* NotSupported */]; | ||
// can be suspended when `document.hidden === false` and start running after a retry. | ||
if (!d$1.hidden) { | ||
if (!document.hidden) { | ||
resumeTriesLeft--; | ||
@@ -665,3 +697,2 @@ } | ||
var d$2 = document; | ||
// We use m or w because these two characters take up the maximum width. | ||
@@ -752,7 +783,8 @@ // And we use a LLi so that the same matching fonts can get separated. | ||
function getFonts() { | ||
var h = d$2.body; | ||
var d = document; | ||
var holder = d.body; | ||
// div to load spans for the base fonts | ||
var baseFontsDiv = d$2.createElement('div'); | ||
var baseFontsDiv = d.createElement('div'); | ||
// div to load spans for the fonts to detect | ||
var fontsDiv = d$2.createElement('div'); | ||
var fontsDiv = d.createElement('div'); | ||
var defaultWidth = {}; | ||
@@ -762,3 +794,3 @@ var defaultHeight = {}; | ||
var createSpan = function () { | ||
var span = d$2.createElement('span'); | ||
var span = d.createElement('span'); | ||
span.textContent = testString; | ||
@@ -813,3 +845,3 @@ for (var _i = 0, _a = Object.keys(fontSpanStyle); _i < _a.length; _i++) { | ||
// add the spans to the DOM | ||
h.appendChild(baseFontsDiv); | ||
holder.appendChild(baseFontsDiv); | ||
// get the default width for the three base fonts | ||
@@ -823,3 +855,3 @@ for (var index = 0, length_1 = baseFonts.length; index < length_1; index++) { | ||
// add all the spans to the DOM | ||
h.appendChild(fontsDiv); | ||
holder.appendChild(fontsDiv); | ||
// check available fonts | ||
@@ -833,4 +865,4 @@ var available = []; | ||
// remove spans from DOM | ||
h.removeChild(fontsDiv); | ||
h.removeChild(baseFontsDiv); | ||
holder.removeChild(fontsDiv); | ||
holder.removeChild(baseFontsDiv); | ||
return available; | ||
@@ -942,4 +974,2 @@ } | ||
var n$1 = navigator; | ||
var w$3 = window; | ||
/** | ||
@@ -953,9 +983,10 @@ * This is a crude and primitive touch screen detection. It's not possible to currently reliably detect the availability | ||
function getTouchSupport() { | ||
var n = navigator; | ||
var maxTouchPoints = 0; | ||
var touchEvent; | ||
if (n$1.maxTouchPoints !== undefined) { | ||
maxTouchPoints = toInt(n$1.maxTouchPoints); | ||
if (n.maxTouchPoints !== undefined) { | ||
maxTouchPoints = toInt(n.maxTouchPoints); | ||
} | ||
else if (n$1.msMaxTouchPoints !== undefined) { | ||
maxTouchPoints = n$1.msMaxTouchPoints; | ||
else if (n.msMaxTouchPoints !== undefined) { | ||
maxTouchPoints = n.msMaxTouchPoints; | ||
} | ||
@@ -969,3 +1000,3 @@ try { | ||
} | ||
var touchStart = 'ontouchstart' in w$3; | ||
var touchStart = 'ontouchstart' in window; | ||
return { | ||
@@ -982,18 +1013,18 @@ maxTouchPoints: maxTouchPoints, | ||
var n$2 = navigator; | ||
function getLanguages() { | ||
var n = navigator; | ||
var result = []; | ||
var language = n$2.language || n$2.userLanguage || n$2.browserLanguage || n$2.systemLanguage; | ||
var language = n.language || n.userLanguage || n.browserLanguage || n.systemLanguage; | ||
if (language !== undefined) { | ||
result.push([language]); | ||
} | ||
if (Array.isArray(n$2.languages)) { | ||
if (Array.isArray(n.languages)) { | ||
// Starting from Chromium 86, there is only a single value in `navigator.language` in Incognito mode: | ||
// the value of `navigator.language`. Therefore the value is ignored in this browser. | ||
if (!(isChromium() && isChromium86OrNewer())) { | ||
result.push(n$2.languages); | ||
result.push(n.languages); | ||
} | ||
} | ||
else if (typeof n$2.languages === 'string') { | ||
var languages = n$2.languages; | ||
else if (typeof n.languages === 'string') { | ||
var languages = n.languages; | ||
if (languages) { | ||
@@ -1015,7 +1046,7 @@ result.push(languages.split(',')); | ||
var w$4 = window; | ||
function getScreenResolution() { | ||
var s = screen; | ||
// Some browsers return screen resolution as strings, e.g. "1200", instead of a number, e.g. 1200. | ||
// I suspect it's done by certain plugins that randomize browser properties to prevent fingerprinting. | ||
var dimensions = [toInt(w$4.screen.width), toInt(w$4.screen.height)]; | ||
var dimensions = [toInt(s.width), toInt(s.height)]; | ||
dimensions.sort().reverse(); | ||
@@ -1137,7 +1168,7 @@ return dimensions; | ||
var w$5 = window; | ||
function getTimezone() { | ||
var _a; | ||
if ((_a = w$5.Intl) === null || _a === void 0 ? void 0 : _a.DateTimeFormat) { | ||
var timezone = new w$5.Intl.DateTimeFormat().resolvedOptions().timeZone; | ||
var DateTimeFormat = (_a = window.Intl) === null || _a === void 0 ? void 0 : _a.DateTimeFormat; | ||
if (DateTimeFormat) { | ||
var timezone = new DateTimeFormat().resolvedOptions().timeZone; | ||
if (timezone) { | ||
@@ -1207,8 +1238,15 @@ return timezone; | ||
/** | ||
* It should be improved to handle mock value on iOS: | ||
* https://github.com/fingerprintjs/fingerprintjs/issues/514#issuecomment-727782842 | ||
*/ | ||
function getPlatform() { | ||
return navigator.platform; | ||
// Android Chrome 86 and 87 and Android Firefox 80 and 84 don't mock the platform value when desktop mode is requested | ||
var platform = navigator.platform; | ||
// iOS mocks the platform value when desktop version is requested: https://github.com/fingerprintjs/fingerprintjs/issues/514 | ||
// iPad uses desktop mode by default since iOS 13 | ||
// The value is 'MacIntel' on M1 Macs | ||
// The value is 'iPhone' on iPod Touch | ||
if (platform === 'MacIntel') { | ||
if (isWebKit() && !isDesktopSafari()) { | ||
return isIPad() ? 'iPad' : 'iPhone'; | ||
} | ||
} | ||
return platform; | ||
} | ||
@@ -1247,3 +1285,2 @@ | ||
var d$3 = document; | ||
/** | ||
@@ -1257,2 +1294,3 @@ * navigator.cookieEnabled cannot detect custom or nuanced cookie blocking configurations. For example, when blocking | ||
function areCookiesEnabled() { | ||
var d = document; | ||
// Taken from here: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cookies.js | ||
@@ -1267,6 +1305,6 @@ // navigator.cookieEnabled cannot detect custom or nuanced cookie blocking configurations. For example, when blocking | ||
// Create cookie | ||
d$3.cookie = 'cookietest=1; SameSite=Strict;'; | ||
var result = d$3.cookie.indexOf('cookietest=') !== -1; | ||
d.cookie = 'cookietest=1; SameSite=Strict;'; | ||
var result = d.cookie.indexOf('cookietest=') !== -1; | ||
// Delete cookie | ||
d$3.cookie = 'cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT'; | ||
d.cookie = 'cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT'; | ||
return result; | ||
@@ -1273,0 +1311,0 @@ } |
/** | ||
* FingerprintJS v3.1.0-dev.1 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* FingerprintJS v3.1.0-dev.2 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -9,2 +9,2 @@ * | ||
var FingerprintJS=function(e){"use strict";function t(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function n(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function r(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])}function i(e,t){return 0===(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function o(e,t){return[e[0]^t[0],e[1]^t[1]]}function a(e){return e=o(e,[0,e[0]>>>1]),e=o(e=n(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=o(e=n(e,[3301882366,444984403]),[0,e[0]>>>1])}function c(e,c){c=c||0;var u,s=(e=e||"").length%16,l=e.length-s,f=[0,c],d=[0,c],h=[0,0],v=[0,0],m=[2277735313,289559509],g=[1291169091,658871167];for(u=0;u<l;u+=16)h=[255&e.charCodeAt(u+4)|(255&e.charCodeAt(u+5))<<8|(255&e.charCodeAt(u+6))<<16|(255&e.charCodeAt(u+7))<<24,255&e.charCodeAt(u)|(255&e.charCodeAt(u+1))<<8|(255&e.charCodeAt(u+2))<<16|(255&e.charCodeAt(u+3))<<24],v=[255&e.charCodeAt(u+12)|(255&e.charCodeAt(u+13))<<8|(255&e.charCodeAt(u+14))<<16|(255&e.charCodeAt(u+15))<<24,255&e.charCodeAt(u+8)|(255&e.charCodeAt(u+9))<<8|(255&e.charCodeAt(u+10))<<16|(255&e.charCodeAt(u+11))<<24],h=r(h=n(h,m),31),f=t(f=r(f=o(f,h=n(h,g)),27),d),f=t(n(f,[0,5]),[0,1390208809]),v=r(v=n(v,g),33),d=t(d=r(d=o(d,v=n(v,m)),31),f),d=t(n(d,[0,5]),[0,944331445]);switch(h=[0,0],v=[0,0],s){case 15:v=o(v,i([0,e.charCodeAt(u+14)],48));case 14:v=o(v,i([0,e.charCodeAt(u+13)],40));case 13:v=o(v,i([0,e.charCodeAt(u+12)],32));case 12:v=o(v,i([0,e.charCodeAt(u+11)],24));case 11:v=o(v,i([0,e.charCodeAt(u+10)],16));case 10:v=o(v,i([0,e.charCodeAt(u+9)],8));case 9:v=n(v=o(v,[0,e.charCodeAt(u+8)]),g),d=o(d,v=n(v=r(v,33),m));case 8:h=o(h,i([0,e.charCodeAt(u+7)],56));case 7:h=o(h,i([0,e.charCodeAt(u+6)],48));case 6:h=o(h,i([0,e.charCodeAt(u+5)],40));case 5:h=o(h,i([0,e.charCodeAt(u+4)],32));case 4:h=o(h,i([0,e.charCodeAt(u+3)],24));case 3:h=o(h,i([0,e.charCodeAt(u+2)],16));case 2:h=o(h,i([0,e.charCodeAt(u+1)],8));case 1:h=n(h=o(h,[0,e.charCodeAt(u)]),m),f=o(f,h=n(h=r(h,31),g))}return f=t(f=o(f,[0,e.length]),d=o(d,[0,e.length])),d=t(d,f),f=t(f=a(f),d=a(d)),d=t(d,f),("00000000"+(f[0]>>>0).toString(16)).slice(-8)+("00000000"+(f[1]>>>0).toString(16)).slice(-8)+("00000000"+(d[0]>>>0).toString(16)).slice(-8)+("00000000"+(d[1]>>>0).toString(16)).slice(-8)}var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function c(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(c){o=[6,c],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}function f(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,c=o.length;a<c;a++,i++)r[i]=o[a];return r}var d=window;function h(e){return parseInt(e)}function v(e){return parseFloat(e)}function m(e,t){return"number"==typeof e&&isNaN(e)?t:e}function g(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}var p=window,y=navigator,w=document;function S(){return g(["MSCSSMatrix"in p,"msSetImmediate"in p,"msIndexedDB"in p,"msMaxTouchPoints"in y,"msPointerEnabled"in y])>=4}function b(){return g(["msWriteProfilerMark"in p,"MSStream"in p,"msLaunchUri"in y,"msSaveBlob"in y])>=3&&!S()}function C(){return g(["webkitPersistentStorage"in y,"webkitTemporaryStorage"in y,0===y.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in p,"BatteryManager"in p,"webkitMediaStream"in p,"webkitSpeechGrammar"in p])>=5}function A(){return g(["ApplePayError"in p,"CSSPrimitiveValue"in p,"Counter"in p,0===y.vendor.indexOf("Apple"),"getStorageUpdates"in y,"WebKitMediaKeys"in p])>=4}function M(){return g(["safari"in p,!("DeviceMotionEvent"in p),!("ongestureend"in p),!("standalone"in y)])>=3}function T(){return w.fullscreenElement||w.msFullscreenElement||w.mozFullScreenElement||w.webkitFullscreenElement||null}var k=window,x=document;function P(e,t,n){(function(e){return e&&"function"==typeof e.setValueAtTime})(t)&&t.setValueAtTime(n,e.currentTime)}function E(e){return new Promise((function(t,n){e.oncomplete=function(e){return t(e.renderedBuffer)};var r=3,i=function(){switch(e.startRendering(),e.state){case"running":setTimeout((function(){return n(O("timeout"))}),1e3);break;case"suspended":x.hidden||r--,r>0?setTimeout(i,500):n(O("suspended"))}};i()}))}function I(e){for(var t=0,n=4500;n<5e3;++n)t+=Math.abs(e[n]);return t}function O(e){var t=new Error(e);return t.name=e,t}var F=document,D=["monospace","sans-serif","serif"],R=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"],L={fontStyle:"normal",fontWeight:"normal",letterSpacing:"normal",lineBreak:"auto",lineHeight:"normal",textTransform:"none",textAlign:"left",textDecoration:"none",textShadow:"none",whiteSpace:"normal",wordBreak:"normal",wordSpacing:"normal",position:"absolute",left:"-9999px",fontSize:"48px"};function B(e){return e.toDataURL()}var G=navigator,U=window;var H=navigator;var N=window;var j,z;function W(){return s(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return J(e=V())?j?[2,f(j)]:T()?[4,(w.exitFullscreen||w.msExitFullscreen||w.mozCancelFullScreen||w.webkitExitFullscreen).call(w)]:[3,2]:[3,2];case 1:t.sent(),e=V(),t.label=2;case 2:return J(e)||(j=e),[2,e]}}))}))}function V(){var e=screen;return[m(v(e.availTop),null),m(v(e.width)-v(e.availWidth)-m(v(e.availLeft),0),null),m(v(e.height)-v(e.availHeight)-m(v(e.availTop),0),null),m(v(e.availLeft),null)]}function J(e){for(var t=0;t<4;++t)if(e[t])return!1;return!0}var q=window;var K=document;var X={osCpu:function(){return navigator.oscpu},languages:function(){var e=[],t=H.language||H.userLanguage||H.browserLanguage||H.systemLanguage;if(void 0!==t&&e.push([t]),Array.isArray(H.languages))C()&&g([!("MediaSettingsRange"in p),"RTCEncodedAudioFrame"in p,""+p.Intl=="[object Intl]",""+p.Reflect=="[object Reflect]"])>=3||e.push(H.languages);else if("string"==typeof H.languages){var n=H.languages;n&&e.push(n.split(","))}return e},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return m(v(navigator.deviceMemory),void 0)},screenResolution:function(){var e=[h(N.screen.width),h(N.screen.height)];return e.sort().reverse(),e},screenFrame:function(){return s(this,void 0,void 0,(function(){var e,t;return l(this,(function(n){switch(n.label){case 0:return e=function(e){return null===e?null:function(e,t){if(void 0===t&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;var n=1/t;return Math.round(e*n)/n}(e,10)},[4,W()];case 1:return t=n.sent(),[2,[e(t[0]),e(t[1]),e(t[2]),e(t[3])]]}}))}))},hardwareConcurrency:function(){return m(h(navigator.hardwareConcurrency),void 0)},timezone:function(){var e;if(null===(e=q.Intl)||void 0===e?void 0:e.DateTimeFormat){var t=(new q.Intl.DateTimeFormat).resolvedOptions().timeZone;if(t)return t}var n,r=(n=(new Date).getFullYear(),-Math.max(v(new Date(n,0,1).getTimezoneOffset()),v(new Date(n,6,1).getTimezoneOffset())));return"UTC"+(r>=0?"+":"")+Math.abs(r)},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!S()&&!b())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){return navigator.platform},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],n=0;n<e.length;++n){var r=e[n];if(r){for(var i=[],o=0;o<r.length;++o){var a=r[o];i.push({type:a.type,suffixes:a.suffixes})}t.push({name:r.name,description:r.description,mimeTypes:i})}}return t}},canvas:function(){var e=function(){var e=document.createElement("canvas");return e.width=240,e.height=140,e.style.display="inline",[e,e.getContext("2d")]}(),t=e[0],n=e[1];if(!function(e,t){return!(!t||!e.toDataURL)}(t,n))return{winding:!1,data:""};n.rect(0,0,10,10),n.rect(2,2,6,6);var r=!n.isPointInPath(5,5,"evenodd");n.textBaseline="alphabetic",n.fillStyle="#f60",n.fillRect(125,1,62,20),n.fillStyle="#069",n.font='11pt "Times New Roman"';var i="Cwm fjordbank gly š";return n.fillText(i,2,15),n.fillStyle="rgba(102, 204, 0, 0.2)",n.font="18pt Arial",n.fillText(i,4,45),n.globalCompositeOperation="multiply",n.fillStyle="rgb(255,0,255)",n.beginPath(),n.arc(50,50,50,0,2*Math.PI,!0),n.closePath(),n.fill(),n.fillStyle="rgb(0,255,255)",n.beginPath(),n.arc(100,50,50,0,2*Math.PI,!0),n.closePath(),n.fill(),n.fillStyle="rgb(255,255,0)",n.beginPath(),n.arc(75,100,50,0,2*Math.PI,!0),n.closePath(),n.fill(),n.fillStyle="rgb(255,0,255)",n.arc(75,75,75,0,2*Math.PI,!0),n.arc(75,75,25,0,2*Math.PI,!0),n.fill("evenodd"),{winding:r,data:B(t)}},touchSupport:function(){var e,t=0;void 0!==G.maxTouchPoints?t=h(G.maxTouchPoints):void 0!==G.msMaxTouchPoints&&(t=G.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(n){e=!1}return{maxTouchPoints:t,touchEvent:e,touchStart:"ontouchstart"in U}},fonts:function(){var e=F.body,t=F.createElement("div"),n=F.createElement("div"),r={},i={},o=function(){var e=F.createElement("span");e.textContent="mmMwWLliI0O&1";for(var t=0,n=Object.keys(L);t<n.length;t++){var r=n[t];e.style[r]=L[r]}return e},a=function(e){return D.some((function(t,n){return e[n].offsetWidth!==r[t]||e[n].offsetHeight!==i[t]}))},c=D.map((function(e){var n=o();return n.style.fontFamily=e,t.appendChild(n),n}));e.appendChild(t);for(var u=0,s=D.length;u<s;u++)r[D[u]]=c[u].offsetWidth,i[D[u]]=c[u].offsetHeight;var l=function(){for(var e={},t=function(t){e[t]=D.map((function(e){var r=function(e,t){var n=o();return n.style.fontFamily="'"+e+"',"+t,n}(t,e);return n.appendChild(r),r}))},r=0,i=R;r<i.length;r++){t(i[r])}return e}();e.appendChild(n);for(var f=[],d=0,h=R.length;d<h;d++)a(l[R[d]])&&f.push(R[d]);return e.removeChild(n),e.removeChild(t),f},audio:function(){return s(this,void 0,void 0,(function(){var e,t,n,r,i,o;return l(this,(function(a){switch(a.label){case 0:if(!(e=k.OfflineAudioContext||k.webkitOfflineAudioContext))return[2,-2];if(A()&&!M()&&!(g(["DOMRectList"in p,"RTCPeerConnectionIceEvent"in p,"SVGGeometryElement"in p,"ontransitioncancel"in p])>=3))return[2,-1];t=new e(1,44100,44100),(n=t.createOscillator()).type="triangle",P(t,n.frequency,1e4),r=t.createDynamicsCompressor(),P(t,r.threshold,-50),P(t,r.knee,40),P(t,r.ratio,12),P(t,r.reduction,-20),P(t,r.attack,0),P(t,r.release,.25),n.connect(r),r.connect(t.destination),n.start(0),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,E(t)];case 2:return i=a.sent(),[3,5];case 3:if("timeout"===(o=a.sent()).name||"suspended"===o.name)return[2,-3];throw o;case 4:return n.disconnect(),r.disconnect(),[7];case 5:return[2,I(i.getChannelData(0))]}}))}))},productSub:function(){return navigator.productSub},emptyEvalLength:function(){return eval.toString().length},errorFF:function(){try{throw"a"}catch(e){try{return e.toSource(),!0}catch(t){return!1}}},vendor:function(){return navigator.vendor||""},chrome:function(){return void 0!==window.chrome},cookiesEnabled:function(){try{K.cookie="cookietest=1; SameSite=Strict;";var e=-1!==K.cookie.indexOf("cookietest=");return K.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(t){return!1}}};function Y(e,t,n){return s(this,void 0,void 0,(function(){var r,i,o,a,c,s,f,d,h;return l(this,(function(l){switch(l.label){case 0:r=Date.now(),i={},o=0,a=Object.keys(e),l.label=1;case 1:if(!(o<a.length))return[3,7];if(c=a[o],function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return!0;return!1}(n,c))return[3,6];s=void 0,l.label=2;case 2:return l.trys.push([2,4,,5]),h={},[4,e[c](t)];case 3:return h.value=l.sent(),s=h,[3,5];case 4:return f=l.sent(),s=f&&"object"==typeof f&&"message"in f?{error:f}:{error:{message:f}},[3,5];case 5:d=Date.now(),i[c]=u(u({},s),{duration:d-r}),r=d,l.label=6;case 6:return o++,[3,1];case 7:return[2,i]}}))}))}function Z(e){return JSON.stringify(e,(function(e,t){return t instanceof Error?u({name:(n=t).name,message:n.message,stack:null===(r=n.stack)||void 0===r?void 0:r.split("\n")},n):t;var n,r}),2)}function $(e){return c(function(e){for(var t="",n=0,r=Object.keys(e).sort();n<r.length;n++){var i=r[n],o=e[i],a=o.error?"error":JSON.stringify(o.value);t+=(t?"|":"")+i.replace(/([:|\\])/g,"\\$1")+":"+a}return t}(e))}var Q=function(){function e(){!function(){if(void 0===z){var e=function(){var t=V();J(t)?z=setTimeout(e,2500):(j=t,z=void 0)};e()}}()}return e.prototype.get=function(e){return void 0===e&&(e={}),s(this,void 0,void 0,(function(){var t,n;return l(this,(function(r){switch(r.label){case 0:return[4,Y(X,void 0,[])];case 1:return t=r.sent(),n=function(e){var t;return{components:e,get visitorId(){return void 0===t&&(t=$(this.components)),t},set visitorId(e){t=e}}}(t),e.debug&&console.log("Copy the text below to get the debug data:\n\n```\nversion: 3.1.0-dev.1\nuserAgent: "+navigator.userAgent+"\ngetOptions: "+JSON.stringify(e,void 0,2)+"\nvisitorId: "+n.visitorId+"\ncomponents: "+Z(t)+"\n```"),[2,n]}}))}))},e}();function _(e){var t=(void 0===e?{}:e).delayFallback,n=void 0===t?50:t;return s(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,(t=n,r=2*n,void 0===r&&(r=1/0),new Promise((function(e){d.requestIdleCallback?d.requestIdleCallback((function(){return e()}),{timeout:r}):setTimeout(e,Math.min(t,r))})))];case 1:return e.sent(),[2,new Q]}var t,r}))}))}var ee={load:_,hashComponents:$,componentsToDebugString:Z},te=c;return e.componentsToDebugString=Z,e.default=ee,e.getComponents=Y,e.getFullscreenElement=T,e.getScreenFrame=W,e.hashComponents=$,e.isChromium=C,e.isDesktopSafari=M,e.isEdgeHTML=b,e.isGecko=function(){var e;return g(["buildID"in y,(null===(e=w.documentElement)||void 0===e?void 0:e.style)&&"MozAppearance"in w.documentElement.style,"MediaRecorderErrorEvent"in p,"mozInnerScreenX"in p,"CSSMozDocumentRule"in p,"CanvasCaptureMediaStream"in p])>=4},e.isTrident=S,e.isWebKit=A,e.load=_,e.murmurX64Hash128=te,e}({}); | ||
var FingerprintJS=function(e){"use strict";function n(e,n){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],n=[n[0]>>>16,65535&n[0],n[1]>>>16,65535&n[1]];var t=[0,0,0,0];return t[3]+=e[3]+n[3],t[2]+=t[3]>>>16,t[3]&=65535,t[2]+=e[2]+n[2],t[1]+=t[2]>>>16,t[2]&=65535,t[1]+=e[1]+n[1],t[0]+=t[1]>>>16,t[1]&=65535,t[0]+=e[0]+n[0],t[0]&=65535,[t[0]<<16|t[1],t[2]<<16|t[3]]}function t(e,n){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],n=[n[0]>>>16,65535&n[0],n[1]>>>16,65535&n[1]];var t=[0,0,0,0];return t[3]+=e[3]*n[3],t[2]+=t[3]>>>16,t[3]&=65535,t[2]+=e[2]*n[3],t[1]+=t[2]>>>16,t[2]&=65535,t[2]+=e[3]*n[2],t[1]+=t[2]>>>16,t[2]&=65535,t[1]+=e[1]*n[3],t[0]+=t[1]>>>16,t[1]&=65535,t[1]+=e[2]*n[2],t[0]+=t[1]>>>16,t[1]&=65535,t[1]+=e[3]*n[1],t[0]+=t[1]>>>16,t[1]&=65535,t[0]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0],t[0]&=65535,[t[0]<<16|t[1],t[2]<<16|t[3]]}function r(e,n){return 32===(n%=64)?[e[1],e[0]]:n<32?[e[0]<<n|e[1]>>>32-n,e[1]<<n|e[0]>>>32-n]:(n-=32,[e[1]<<n|e[0]>>>32-n,e[0]<<n|e[1]>>>32-n])}function i(e,n){return 0===(n%=64)?e:n<32?[e[0]<<n|e[1]>>>32-n,e[1]<<n]:[e[1]<<n-32,0]}function o(e,n){return[e[0]^n[0],e[1]^n[1]]}function a(e){return e=o(e,[0,e[0]>>>1]),e=o(e=t(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=o(e=t(e,[3301882366,444984403]),[0,e[0]>>>1])}function u(e,u){u=u||0;var c,s=(e=e||"").length%16,l=e.length-s,f=[0,u],d=[0,u],h=[0,0],v=[0,0],g=[2277735313,289559509],m=[1291169091,658871167];for(c=0;c<l;c+=16)h=[255&e.charCodeAt(c+4)|(255&e.charCodeAt(c+5))<<8|(255&e.charCodeAt(c+6))<<16|(255&e.charCodeAt(c+7))<<24,255&e.charCodeAt(c)|(255&e.charCodeAt(c+1))<<8|(255&e.charCodeAt(c+2))<<16|(255&e.charCodeAt(c+3))<<24],v=[255&e.charCodeAt(c+12)|(255&e.charCodeAt(c+13))<<8|(255&e.charCodeAt(c+14))<<16|(255&e.charCodeAt(c+15))<<24,255&e.charCodeAt(c+8)|(255&e.charCodeAt(c+9))<<8|(255&e.charCodeAt(c+10))<<16|(255&e.charCodeAt(c+11))<<24],h=r(h=t(h,g),31),f=n(f=r(f=o(f,h=t(h,m)),27),d),f=n(t(f,[0,5]),[0,1390208809]),v=r(v=t(v,m),33),d=n(d=r(d=o(d,v=t(v,g)),31),f),d=n(t(d,[0,5]),[0,944331445]);switch(h=[0,0],v=[0,0],s){case 15:v=o(v,i([0,e.charCodeAt(c+14)],48));case 14:v=o(v,i([0,e.charCodeAt(c+13)],40));case 13:v=o(v,i([0,e.charCodeAt(c+12)],32));case 12:v=o(v,i([0,e.charCodeAt(c+11)],24));case 11:v=o(v,i([0,e.charCodeAt(c+10)],16));case 10:v=o(v,i([0,e.charCodeAt(c+9)],8));case 9:v=t(v=o(v,[0,e.charCodeAt(c+8)]),m),d=o(d,v=t(v=r(v,33),g));case 8:h=o(h,i([0,e.charCodeAt(c+7)],56));case 7:h=o(h,i([0,e.charCodeAt(c+6)],48));case 6:h=o(h,i([0,e.charCodeAt(c+5)],40));case 5:h=o(h,i([0,e.charCodeAt(c+4)],32));case 4:h=o(h,i([0,e.charCodeAt(c+3)],24));case 3:h=o(h,i([0,e.charCodeAt(c+2)],16));case 2:h=o(h,i([0,e.charCodeAt(c+1)],8));case 1:h=t(h=o(h,[0,e.charCodeAt(c)]),g),f=o(f,h=t(h=r(h,31),m))}return f=n(f=o(f,[0,e.length]),d=o(d,[0,e.length])),d=n(d,f),f=n(f=a(f),d=a(d)),d=n(d,f),("00000000"+(f[0]>>>0).toString(16)).slice(-8)+("00000000"+(f[1]>>>0).toString(16)).slice(-8)+("00000000"+(d[0]>>>0).toString(16)).slice(-8)+("00000000"+(d[1]>>>0).toString(16)).slice(-8)}var c=function(){return(c=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)};function s(e,n,t,r){return new(t||(t=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(n){o(n)}}function u(e){try{c(r.throw(e))}catch(n){o(n)}}function c(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,u)}c((r=r.apply(e,n||[])).next())}))}function l(e,n){var t,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(e,a)}catch(u){o=[6,u],r=0}finally{t=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function f(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var r=Array(e),i=0;for(n=0;n<t;n++)for(var o=arguments[n],a=0,u=o.length;a<u;a++,i++)r[i]=o[a];return r}function d(e){return parseInt(e)}function h(e){return parseFloat(e)}function v(e,n){return"number"==typeof e&&isNaN(e)?n:e}function g(e){return e.reduce((function(e,n){return e+(n?1:0)}),0)}function m(){var e=window,n=navigator;return g(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in n,"msPointerEnabled"in n])>=4}function p(){var e=window,n=navigator;return g(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in n,"msSaveBlob"in n])>=3&&!m()}function w(){var e=window,n=navigator;return g(["webkitPersistentStorage"in n,"webkitTemporaryStorage"in n,0===n.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function y(){var e=window,n=navigator;return g(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===n.vendor.indexOf("Apple"),"getStorageUpdates"in n,"WebKitMediaKeys"in e])>=4}function S(){var e=window;return g(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function b(){var e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function C(e,n,t){(function(e){return e&&"function"==typeof e.setValueAtTime})(n)&&n.setValueAtTime(t,e.currentTime)}function A(e){return new Promise((function(n,t){e.oncomplete=function(e){return n(e.renderedBuffer)};var r=3,i=function(){switch(e.startRendering(),e.state){case"running":setTimeout((function(){return t(T("timeout"))}),1e3);break;case"suspended":document.hidden||r--,r>0?setTimeout(i,500):t(T("suspended"))}};i()}))}function M(e){for(var n=0,t=4500;t<5e3;++t)n+=Math.abs(e[t]);return n}function T(e){var n=new Error(e);return n.name=e,n}var k=["monospace","sans-serif","serif"],x=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"],P={fontStyle:"normal",fontWeight:"normal",letterSpacing:"normal",lineBreak:"auto",lineHeight:"normal",textTransform:"none",textAlign:"left",textDecoration:"none",textShadow:"none",whiteSpace:"normal",wordBreak:"normal",wordSpacing:"normal",position:"absolute",left:"-9999px",fontSize:"48px"};function E(e){return e.toDataURL()}var I,O;function F(){return s(this,void 0,void 0,(function(){var e;return l(this,(function(n){switch(n.label){case 0:return R(e=D())?I?[2,f(I)]:b()?[4,(t=document,(t.exitFullscreen||t.msExitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen).call(t))]:[3,2]:[3,2];case 1:n.sent(),e=D(),n.label=2;case 2:return R(e)||(I=e),[2,e]}var t}))}))}function D(){var e=screen;return[v(h(e.availTop),null),v(h(e.width)-h(e.availWidth)-v(h(e.availLeft),0),null),v(h(e.height)-h(e.availHeight)-v(h(e.availTop),0),null),v(h(e.availLeft),null)]}function R(e){for(var n=0;n<4;++n)if(e[n])return!1;return!0}var L={osCpu:function(){return navigator.oscpu},languages:function(){var e,n=navigator,t=[],r=n.language||n.userLanguage||n.browserLanguage||n.systemLanguage;if(void 0!==r&&t.push([r]),Array.isArray(n.languages))w()&&g([!("MediaSettingsRange"in(e=window)),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3||t.push(n.languages);else if("string"==typeof n.languages){var i=n.languages;i&&t.push(i.split(","))}return t},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return v(h(navigator.deviceMemory),void 0)},screenResolution:function(){var e=screen,n=[d(e.width),d(e.height)];return n.sort().reverse(),n},screenFrame:function(){return s(this,void 0,void 0,(function(){var e,n;return l(this,(function(t){switch(t.label){case 0:return e=function(e){return null===e?null:function(e,n){if(void 0===n&&(n=1),Math.abs(n)>=1)return Math.round(e/n)*n;var t=1/n;return Math.round(e*t)/t}(e,10)},[4,F()];case 1:return n=t.sent(),[2,[e(n[0]),e(n[1]),e(n[2]),e(n[3])]]}}))}))},hardwareConcurrency:function(){return v(d(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,n=null===(e=window.Intl)||void 0===e?void 0:e.DateTimeFormat;if(n){var t=(new n).resolvedOptions().timeZone;if(t)return t}var r,i=(r=(new Date).getFullYear(),-Math.max(h(new Date(r,0,1).getTimezoneOffset()),h(new Date(r,6,1).getTimezoneOffset())));return"UTC"+(i>=0?"+":"")+Math.abs(i)},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!m()&&!p())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return"MacIntel"===e&&y()&&!S()?function(){if("iPad"===navigator.platform)return!0;var e=screen,n=e.width/e.height;return g(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,n>2/3&&n<1.5])>=2}()?"iPad":"iPhone":e},plugins:function(){var e=navigator.plugins;if(e){for(var n=[],t=0;t<e.length;++t){var r=e[t];if(r){for(var i=[],o=0;o<r.length;++o){var a=r[o];i.push({type:a.type,suffixes:a.suffixes})}n.push({name:r.name,description:r.description,mimeTypes:i})}}return n}},canvas:function(){var e=function(){var e=document.createElement("canvas");return e.width=240,e.height=140,e.style.display="inline",[e,e.getContext("2d")]}(),n=e[0],t=e[1];if(!function(e,n){return!(!n||!e.toDataURL)}(n,t))return{winding:!1,data:""};t.rect(0,0,10,10),t.rect(2,2,6,6);var r=!t.isPointInPath(5,5,"evenodd");t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.font='11pt "Times New Roman"';var i="Cwm fjordbank gly š";return t.fillText(i,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t.font="18pt Arial",t.fillText(i,4,45),t.globalCompositeOperation="multiply",t.fillStyle="rgb(255,0,255)",t.beginPath(),t.arc(50,50,50,0,2*Math.PI,!0),t.closePath(),t.fill(),t.fillStyle="rgb(0,255,255)",t.beginPath(),t.arc(100,50,50,0,2*Math.PI,!0),t.closePath(),t.fill(),t.fillStyle="rgb(255,255,0)",t.beginPath(),t.arc(75,100,50,0,2*Math.PI,!0),t.closePath(),t.fill(),t.fillStyle="rgb(255,0,255)",t.arc(75,75,75,0,2*Math.PI,!0),t.arc(75,75,25,0,2*Math.PI,!0),t.fill("evenodd"),{winding:r,data:E(n)}},touchSupport:function(){var e,n=navigator,t=0;void 0!==n.maxTouchPoints?t=d(n.maxTouchPoints):void 0!==n.msMaxTouchPoints&&(t=n.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(r){e=!1}return{maxTouchPoints:t,touchEvent:e,touchStart:"ontouchstart"in window}},fonts:function(){var e=document,n=e.body,t=e.createElement("div"),r=e.createElement("div"),i={},o={},a=function(){var n=e.createElement("span");n.textContent="mmMwWLliI0O&1";for(var t=0,r=Object.keys(P);t<r.length;t++){var i=r[t];n.style[i]=P[i]}return n},u=function(e){return k.some((function(n,t){return e[t].offsetWidth!==i[n]||e[t].offsetHeight!==o[n]}))},c=k.map((function(e){var n=a();return n.style.fontFamily=e,t.appendChild(n),n}));n.appendChild(t);for(var s=0,l=k.length;s<l;s++)i[k[s]]=c[s].offsetWidth,o[k[s]]=c[s].offsetHeight;var f=function(){for(var e={},n=function(n){e[n]=k.map((function(e){var t=function(e,n){var t=a();return t.style.fontFamily="'"+e+"',"+n,t}(n,e);return r.appendChild(t),t}))},t=0,i=x;t<i.length;t++){n(i[t])}return e}();n.appendChild(r);for(var d=[],h=0,v=x.length;h<v;h++)u(f[x[h]])&&d.push(x[h]);return n.removeChild(r),n.removeChild(t),d},audio:function(){return s(this,void 0,void 0,(function(){var e,n,t,r,i,o,a;return l(this,(function(u){switch(u.label){case 0:if(e=window,!(n=e.OfflineAudioContext||e.webkitOfflineAudioContext))return[2,-2];if(y()&&!S()&&!function(){var e=window;return g(["DOMRectList"in e,"RTCPeerConnectionIceEvent"in e,"SVGGeometryElement"in e,"ontransitioncancel"in e])>=3}())return[2,-1];t=new n(1,44100,44100),(r=t.createOscillator()).type="triangle",C(t,r.frequency,1e4),i=t.createDynamicsCompressor(),C(t,i.threshold,-50),C(t,i.knee,40),C(t,i.ratio,12),C(t,i.reduction,-20),C(t,i.attack,0),C(t,i.release,.25),r.connect(i),i.connect(t.destination),r.start(0),u.label=1;case 1:return u.trys.push([1,3,4,5]),[4,A(t)];case 2:return o=u.sent(),[3,5];case 3:if("timeout"===(a=u.sent()).name||"suspended"===a.name)return[2,-3];throw a;case 4:return r.disconnect(),i.disconnect(),[7];case 5:return[2,M(o.getChannelData(0))]}}))}))},productSub:function(){return navigator.productSub},emptyEvalLength:function(){return eval.toString().length},errorFF:function(){try{throw"a"}catch(e){try{return e.toSource(),!0}catch(n){return!1}}},vendor:function(){return navigator.vendor||""},chrome:function(){return void 0!==window.chrome},cookiesEnabled:function(){var e=document;try{e.cookie="cookietest=1; SameSite=Strict;";var n=-1!==e.cookie.indexOf("cookietest=");return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",n}catch(t){return!1}}};function B(e,n,t){return s(this,void 0,void 0,(function(){var r,i,o,a,u,s,f,d,h;return l(this,(function(l){switch(l.label){case 0:r=Date.now(),i={},o=0,a=Object.keys(e),l.label=1;case 1:if(!(o<a.length))return[3,7];if(u=a[o],function(e,n){for(var t=0,r=e.length;t<r;++t)if(e[t]===n)return!0;return!1}(t,u))return[3,6];s=void 0,l.label=2;case 2:return l.trys.push([2,4,,5]),h={},[4,e[u](n)];case 3:return h.value=l.sent(),s=h,[3,5];case 4:return f=l.sent(),s=f&&"object"==typeof f&&"message"in f?{error:f}:{error:{message:f}},[3,5];case 5:d=Date.now(),i[u]=c(c({},s),{duration:d-r}),r=d,l.label=6;case 6:return o++,[3,1];case 7:return[2,i]}}))}))}function G(e){return JSON.stringify(e,(function(e,n){return n instanceof Error?c({name:(t=n).name,message:t.message,stack:null===(r=t.stack)||void 0===r?void 0:r.split("\n")},t):n;var t,r}),2)}function U(e){return u(function(e){for(var n="",t=0,r=Object.keys(e).sort();t<r.length;t++){var i=r[t],o=e[i],a=o.error?"error":JSON.stringify(o.value);n+=(n?"|":"")+i.replace(/([:|\\])/g,"\\$1")+":"+a}return n}(e))}var H=function(){function e(){!function(){if(void 0===O){var e=function(){var n=D();R(n)?O=setTimeout(e,2500):(I=n,O=void 0)};e()}}()}return e.prototype.get=function(e){return void 0===e&&(e={}),s(this,void 0,void 0,(function(){var n,t;return l(this,(function(r){switch(r.label){case 0:return[4,B(L,void 0,[])];case 1:return n=r.sent(),t=function(e){var n;return{components:e,get visitorId(){return void 0===n&&(n=U(this.components)),n},set visitorId(e){n=e}}}(n),e.debug&&console.log("Copy the text below to get the debug data:\n\n```\nversion: 3.1.0-dev.2\nuserAgent: "+navigator.userAgent+"\ngetOptions: "+JSON.stringify(e,void 0,2)+"\nvisitorId: "+t.visitorId+"\ncomponents: "+G(n)+"\n```"),[2,t]}}))}))},e}();function N(e){var n=(void 0===e?{}:e).delayFallback,t=void 0===n?50:n;return s(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,(n=t,r=2*t,void 0===r&&(r=1/0),new Promise((function(e){var t=window.requestIdleCallback;t?t((function(){return e()}),{timeout:r}):setTimeout(e,Math.min(n,r))})))];case 1:return e.sent(),[2,new H]}var n,r}))}))}var j={load:N,hashComponents:U,componentsToDebugString:G},z=u;return e.componentsToDebugString=G,e.default=j,e.getComponents=B,e.getFullscreenElement=b,e.getScreenFrame=F,e.hashComponents=U,e.isChromium=w,e.isDesktopSafari=S,e.isEdgeHTML=p,e.isGecko=function(){var e,n,t=window;return g(["buildID"in navigator,"MozAppearance"in(null!==(n=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==n?n:{}),"MediaRecorderErrorEvent"in t,"mozInnerScreenX"in t,"CSSMozDocumentRule"in t,"CanvasCaptureMediaStream"in t])>=4},e.isTrident=m,e.isWebKit=y,e.load=N,e.murmurX64Hash128=z,e}({}); |
/** | ||
* FingerprintJS v3.1.0-dev.1 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* FingerprintJS v3.1.0-dev.2 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -319,10 +319,10 @@ * | ||
var version = "3.1.0-dev.1"; | ||
var version = "3.1.0-dev.2"; | ||
var w = window; | ||
function requestIdleCallbackIfAvailable(fallbackTimeout, deadlineTimeout) { | ||
if (deadlineTimeout === void 0) { deadlineTimeout = Infinity; } | ||
return new Promise(function (resolve) { | ||
if (w.requestIdleCallback) { | ||
w.requestIdleCallback(function () { return resolve(); }, { timeout: deadlineTimeout }); | ||
var requestIdleCallback = window.requestIdleCallback; | ||
if (requestIdleCallback) { | ||
requestIdleCallback(function () { return resolve(); }, { timeout: deadlineTimeout }); | ||
} | ||
@@ -398,5 +398,2 @@ else { | ||
*/ | ||
var w$1 = window; | ||
var n = navigator; | ||
var d = document; | ||
/** | ||
@@ -409,7 +406,9 @@ * Checks whether the browser is based on Trident (the Internet Explorer engine) without using user-agent. | ||
function isTrident() { | ||
var w = window; | ||
var n = navigator; | ||
// The properties are checked to be in IE 10, IE 11 and not to be in other browsers in October 2020 | ||
return (countTruthy([ | ||
'MSCSSMatrix' in w$1, | ||
'msSetImmediate' in w$1, | ||
'msIndexedDB' in w$1, | ||
'MSCSSMatrix' in w, | ||
'msSetImmediate' in w, | ||
'msIndexedDB' in w, | ||
'msMaxTouchPoints' in n, | ||
@@ -427,3 +426,5 @@ 'msPointerEnabled' in n, | ||
// Based on research in October 2020 | ||
return (countTruthy(['msWriteProfilerMark' in w$1, 'MSStream' in w$1, 'msLaunchUri' in n, 'msSaveBlob' in n]) >= 3 && | ||
var w = window; | ||
var n = navigator; | ||
return (countTruthy(['msWriteProfilerMark' in w, 'MSStream' in w, 'msLaunchUri' in n, 'msSaveBlob' in n]) >= 3 && | ||
!isTrident()); | ||
@@ -439,2 +440,4 @@ } | ||
// Based on research in October 2020. Tested to detect Chromium 42-86. | ||
var w = window; | ||
var n = navigator; | ||
return (countTruthy([ | ||
@@ -444,6 +447,6 @@ 'webkitPersistentStorage' in n, | ||
n.vendor.indexOf('Google') === 0, | ||
'webkitResolveLocalFileSystemURL' in w$1, | ||
'BatteryManager' in w$1, | ||
'webkitMediaStream' in w$1, | ||
'webkitSpeechGrammar' in w$1, | ||
'webkitResolveLocalFileSystemURL' in w, | ||
'BatteryManager' in w, | ||
'webkitMediaStream' in w, | ||
'webkitSpeechGrammar' in w, | ||
]) >= 5); | ||
@@ -460,9 +463,11 @@ } | ||
// Based on research in September 2020 | ||
var w = window; | ||
var n = navigator; | ||
return (countTruthy([ | ||
'ApplePayError' in w$1, | ||
'CSSPrimitiveValue' in w$1, | ||
'Counter' in w$1, | ||
'ApplePayError' in w, | ||
'CSSPrimitiveValue' in w, | ||
'Counter' in w, | ||
n.vendor.indexOf('Apple') === 0, | ||
'getStorageUpdates' in n, | ||
'WebKitMediaKeys' in w$1, | ||
'WebKitMediaKeys' in w, | ||
]) >= 4); | ||
@@ -477,7 +482,8 @@ } | ||
function isDesktopSafari() { | ||
var w = window; | ||
return (countTruthy([ | ||
'safari' in w$1, | ||
!('DeviceMotionEvent' in w$1), | ||
!('ongestureend' in w$1), | ||
!('standalone' in n), | ||
'safari' in w, | ||
!('DeviceMotionEvent' in w), | ||
!('ongestureend' in w), | ||
!('standalone' in navigator), | ||
]) >= 3); | ||
@@ -492,11 +498,12 @@ } | ||
function isGecko() { | ||
var _a; | ||
var _a, _b; | ||
var w = window; | ||
// Based on research in September 2020 | ||
return (countTruthy([ | ||
'buildID' in n, | ||
((_a = d.documentElement) === null || _a === void 0 ? void 0 : _a.style) && 'MozAppearance' in d.documentElement.style, | ||
'MediaRecorderErrorEvent' in w$1, | ||
'mozInnerScreenX' in w$1, | ||
'CSSMozDocumentRule' in w$1, | ||
'CanvasCaptureMediaStream' in w$1, | ||
'buildID' in navigator, | ||
'MozAppearance' in ((_b = (_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {}), | ||
'MediaRecorderErrorEvent' in w, | ||
'mozInnerScreenX' in w, | ||
'CSSMozDocumentRule' in w, | ||
'CanvasCaptureMediaStream' in w, | ||
]) >= 4); | ||
@@ -510,7 +517,8 @@ } | ||
// Checked in Chrome 85 vs Chrome 86 both on desktop and Android | ||
var w = window; | ||
return (countTruthy([ | ||
!('MediaSettingsRange' in w$1), | ||
'RTCEncodedAudioFrame' in w$1, | ||
'' + w$1.Intl === '[object Intl]', | ||
'' + w$1.Reflect === '[object Reflect]', | ||
!('MediaSettingsRange' in w), | ||
'RTCEncodedAudioFrame' in w, | ||
'' + w.Intl === '[object Intl]', | ||
'' + w.Reflect === '[object Reflect]', | ||
]) >= 3); | ||
@@ -526,10 +534,33 @@ } | ||
// Checked in Safari 9ā14 | ||
var w = window; | ||
return (countTruthy([ | ||
'DOMRectList' in w$1, | ||
'RTCPeerConnectionIceEvent' in w$1, | ||
'SVGGeometryElement' in w$1, | ||
'ontransitioncancel' in w$1, | ||
'DOMRectList' in w, | ||
'RTCPeerConnectionIceEvent' in w, | ||
'SVGGeometryElement' in w, | ||
'ontransitioncancel' in w, | ||
]) >= 3); | ||
} | ||
/** | ||
* Checks whether the device is an iPad. | ||
* It doesn't check that the engine is WebKit and that the WebKit isn't desktop. | ||
*/ | ||
function isIPad() { | ||
// Checked on: | ||
// Safari on iPadOS (both mobile and desktop modes): 8, 11, 12, 13, 14 | ||
// Chrome on iPadOS (both mobile and desktop modes): 11, 12, 13, 14 | ||
// Safari on iOS (both mobile and desktop modes): 9, 10, 11, 12, 13, 14 | ||
// Chrome on iOS (both mobile and desktop modes): 9, 10, 11, 12, 13, 14 | ||
// Before iOS 13. Safari tampers the value in "request desktop site" mode since iOS 13. | ||
if (navigator.platform === 'iPad') { | ||
return true; | ||
} | ||
var s = screen; | ||
var screenRatio = s.width / s.height; | ||
return (countTruthy([ | ||
'MediaSource' in window, | ||
!!Element.prototype.webkitRequestFullscreen, | ||
screenRatio > 2 / 3 && screenRatio < 3 / 2, | ||
]) >= 2); | ||
} | ||
/** | ||
* Warning for package users: | ||
@@ -539,5 +570,7 @@ * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk. | ||
function getFullscreenElement() { | ||
var d = document; | ||
return d.fullscreenElement || d.msFullscreenElement || d.mozFullScreenElement || d.webkitFullscreenElement || null; | ||
} | ||
function exitFullscreen() { | ||
var d = document; | ||
// `call` is required because the function throws an error without a proper "this" context | ||
@@ -547,12 +580,11 @@ return (d.exitFullscreen || d.msExitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen).call(d); | ||
var w$2 = window; | ||
var d$1 = document; | ||
// Inspired by and based on https://github.com/cozylife/audio-fingerprint | ||
function getAudioFingerprint() { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var AudioContext, context, oscillator, compressor, buffer, error_1; | ||
var w, AudioContext, context, oscillator, compressor, buffer, error_1; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
AudioContext = w$2.OfflineAudioContext || w$2.webkitOfflineAudioContext; | ||
w = window; | ||
AudioContext = w.OfflineAudioContext || w.webkitOfflineAudioContext; | ||
if (!AudioContext) { | ||
@@ -639,3 +671,3 @@ return [2 /*return*/, -2 /* NotSupported */]; | ||
// can be suspended when `document.hidden === false` and start running after a retry. | ||
if (!d$1.hidden) { | ||
if (!document.hidden) { | ||
resumeTriesLeft--; | ||
@@ -668,3 +700,2 @@ } | ||
var d$2 = document; | ||
// We use m or w because these two characters take up the maximum width. | ||
@@ -755,7 +786,8 @@ // And we use a LLi so that the same matching fonts can get separated. | ||
function getFonts() { | ||
var h = d$2.body; | ||
var d = document; | ||
var holder = d.body; | ||
// div to load spans for the base fonts | ||
var baseFontsDiv = d$2.createElement('div'); | ||
var baseFontsDiv = d.createElement('div'); | ||
// div to load spans for the fonts to detect | ||
var fontsDiv = d$2.createElement('div'); | ||
var fontsDiv = d.createElement('div'); | ||
var defaultWidth = {}; | ||
@@ -765,3 +797,3 @@ var defaultHeight = {}; | ||
var createSpan = function () { | ||
var span = d$2.createElement('span'); | ||
var span = d.createElement('span'); | ||
span.textContent = testString; | ||
@@ -816,3 +848,3 @@ for (var _i = 0, _a = Object.keys(fontSpanStyle); _i < _a.length; _i++) { | ||
// add the spans to the DOM | ||
h.appendChild(baseFontsDiv); | ||
holder.appendChild(baseFontsDiv); | ||
// get the default width for the three base fonts | ||
@@ -826,3 +858,3 @@ for (var index = 0, length_1 = baseFonts.length; index < length_1; index++) { | ||
// add all the spans to the DOM | ||
h.appendChild(fontsDiv); | ||
holder.appendChild(fontsDiv); | ||
// check available fonts | ||
@@ -836,4 +868,4 @@ var available = []; | ||
// remove spans from DOM | ||
h.removeChild(fontsDiv); | ||
h.removeChild(baseFontsDiv); | ||
holder.removeChild(fontsDiv); | ||
holder.removeChild(baseFontsDiv); | ||
return available; | ||
@@ -945,4 +977,2 @@ } | ||
var n$1 = navigator; | ||
var w$3 = window; | ||
/** | ||
@@ -956,9 +986,10 @@ * This is a crude and primitive touch screen detection. It's not possible to currently reliably detect the availability | ||
function getTouchSupport() { | ||
var n = navigator; | ||
var maxTouchPoints = 0; | ||
var touchEvent; | ||
if (n$1.maxTouchPoints !== undefined) { | ||
maxTouchPoints = toInt(n$1.maxTouchPoints); | ||
if (n.maxTouchPoints !== undefined) { | ||
maxTouchPoints = toInt(n.maxTouchPoints); | ||
} | ||
else if (n$1.msMaxTouchPoints !== undefined) { | ||
maxTouchPoints = n$1.msMaxTouchPoints; | ||
else if (n.msMaxTouchPoints !== undefined) { | ||
maxTouchPoints = n.msMaxTouchPoints; | ||
} | ||
@@ -972,3 +1003,3 @@ try { | ||
} | ||
var touchStart = 'ontouchstart' in w$3; | ||
var touchStart = 'ontouchstart' in window; | ||
return { | ||
@@ -985,18 +1016,18 @@ maxTouchPoints: maxTouchPoints, | ||
var n$2 = navigator; | ||
function getLanguages() { | ||
var n = navigator; | ||
var result = []; | ||
var language = n$2.language || n$2.userLanguage || n$2.browserLanguage || n$2.systemLanguage; | ||
var language = n.language || n.userLanguage || n.browserLanguage || n.systemLanguage; | ||
if (language !== undefined) { | ||
result.push([language]); | ||
} | ||
if (Array.isArray(n$2.languages)) { | ||
if (Array.isArray(n.languages)) { | ||
// Starting from Chromium 86, there is only a single value in `navigator.language` in Incognito mode: | ||
// the value of `navigator.language`. Therefore the value is ignored in this browser. | ||
if (!(isChromium() && isChromium86OrNewer())) { | ||
result.push(n$2.languages); | ||
result.push(n.languages); | ||
} | ||
} | ||
else if (typeof n$2.languages === 'string') { | ||
var languages = n$2.languages; | ||
else if (typeof n.languages === 'string') { | ||
var languages = n.languages; | ||
if (languages) { | ||
@@ -1018,7 +1049,7 @@ result.push(languages.split(',')); | ||
var w$4 = window; | ||
function getScreenResolution() { | ||
var s = screen; | ||
// Some browsers return screen resolution as strings, e.g. "1200", instead of a number, e.g. 1200. | ||
// I suspect it's done by certain plugins that randomize browser properties to prevent fingerprinting. | ||
var dimensions = [toInt(w$4.screen.width), toInt(w$4.screen.height)]; | ||
var dimensions = [toInt(s.width), toInt(s.height)]; | ||
dimensions.sort().reverse(); | ||
@@ -1140,7 +1171,7 @@ return dimensions; | ||
var w$5 = window; | ||
function getTimezone() { | ||
var _a; | ||
if ((_a = w$5.Intl) === null || _a === void 0 ? void 0 : _a.DateTimeFormat) { | ||
var timezone = new w$5.Intl.DateTimeFormat().resolvedOptions().timeZone; | ||
var DateTimeFormat = (_a = window.Intl) === null || _a === void 0 ? void 0 : _a.DateTimeFormat; | ||
if (DateTimeFormat) { | ||
var timezone = new DateTimeFormat().resolvedOptions().timeZone; | ||
if (timezone) { | ||
@@ -1210,8 +1241,15 @@ return timezone; | ||
/** | ||
* It should be improved to handle mock value on iOS: | ||
* https://github.com/fingerprintjs/fingerprintjs/issues/514#issuecomment-727782842 | ||
*/ | ||
function getPlatform() { | ||
return navigator.platform; | ||
// Android Chrome 86 and 87 and Android Firefox 80 and 84 don't mock the platform value when desktop mode is requested | ||
var platform = navigator.platform; | ||
// iOS mocks the platform value when desktop version is requested: https://github.com/fingerprintjs/fingerprintjs/issues/514 | ||
// iPad uses desktop mode by default since iOS 13 | ||
// The value is 'MacIntel' on M1 Macs | ||
// The value is 'iPhone' on iPod Touch | ||
if (platform === 'MacIntel') { | ||
if (isWebKit() && !isDesktopSafari()) { | ||
return isIPad() ? 'iPad' : 'iPhone'; | ||
} | ||
} | ||
return platform; | ||
} | ||
@@ -1250,3 +1288,2 @@ | ||
var d$3 = document; | ||
/** | ||
@@ -1260,2 +1297,3 @@ * navigator.cookieEnabled cannot detect custom or nuanced cookie blocking configurations. For example, when blocking | ||
function areCookiesEnabled() { | ||
var d = document; | ||
// Taken from here: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cookies.js | ||
@@ -1270,6 +1308,6 @@ // navigator.cookieEnabled cannot detect custom or nuanced cookie blocking configurations. For example, when blocking | ||
// Create cookie | ||
d$3.cookie = 'cookietest=1; SameSite=Strict;'; | ||
var result = d$3.cookie.indexOf('cookietest=') !== -1; | ||
d.cookie = 'cookietest=1; SameSite=Strict;'; | ||
var result = d.cookie.indexOf('cookietest=') !== -1; | ||
// Delete cookie | ||
d$3.cookie = 'cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT'; | ||
d.cookie = 'cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT'; | ||
return result; | ||
@@ -1276,0 +1314,0 @@ } |
/** | ||
* FingerprintJS v3.1.0-dev.1 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* FingerprintJS v3.1.0-dev.2 - Copyright (c) FingerprintJS, Inc, 2021 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -9,2 +9,2 @@ * | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).FingerprintJS={})}(this,(function(e){"use strict";function t(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function n(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function r(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])}function o(e,t){return 0===(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function i(e,t){return[e[0]^t[0],e[1]^t[1]]}function a(e){return e=i(e,[0,e[0]>>>1]),e=i(e=n(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=i(e=n(e,[3301882366,444984403]),[0,e[0]>>>1])}function u(e,u){u=u||0;var c,s=(e=e||"").length%16,l=e.length-s,f=[0,u],d=[0,u],h=[0,0],v=[0,0],m=[2277735313,289559509],g=[1291169091,658871167];for(c=0;c<l;c+=16)h=[255&e.charCodeAt(c+4)|(255&e.charCodeAt(c+5))<<8|(255&e.charCodeAt(c+6))<<16|(255&e.charCodeAt(c+7))<<24,255&e.charCodeAt(c)|(255&e.charCodeAt(c+1))<<8|(255&e.charCodeAt(c+2))<<16|(255&e.charCodeAt(c+3))<<24],v=[255&e.charCodeAt(c+12)|(255&e.charCodeAt(c+13))<<8|(255&e.charCodeAt(c+14))<<16|(255&e.charCodeAt(c+15))<<24,255&e.charCodeAt(c+8)|(255&e.charCodeAt(c+9))<<8|(255&e.charCodeAt(c+10))<<16|(255&e.charCodeAt(c+11))<<24],h=r(h=n(h,m),31),f=t(f=r(f=i(f,h=n(h,g)),27),d),f=t(n(f,[0,5]),[0,1390208809]),v=r(v=n(v,g),33),d=t(d=r(d=i(d,v=n(v,m)),31),f),d=t(n(d,[0,5]),[0,944331445]);switch(h=[0,0],v=[0,0],s){case 15:v=i(v,o([0,e.charCodeAt(c+14)],48));case 14:v=i(v,o([0,e.charCodeAt(c+13)],40));case 13:v=i(v,o([0,e.charCodeAt(c+12)],32));case 12:v=i(v,o([0,e.charCodeAt(c+11)],24));case 11:v=i(v,o([0,e.charCodeAt(c+10)],16));case 10:v=i(v,o([0,e.charCodeAt(c+9)],8));case 9:v=n(v=i(v,[0,e.charCodeAt(c+8)]),g),d=i(d,v=n(v=r(v,33),m));case 8:h=i(h,o([0,e.charCodeAt(c+7)],56));case 7:h=i(h,o([0,e.charCodeAt(c+6)],48));case 6:h=i(h,o([0,e.charCodeAt(c+5)],40));case 5:h=i(h,o([0,e.charCodeAt(c+4)],32));case 4:h=i(h,o([0,e.charCodeAt(c+3)],24));case 3:h=i(h,o([0,e.charCodeAt(c+2)],16));case 2:h=i(h,o([0,e.charCodeAt(c+1)],8));case 1:h=n(h=i(h,[0,e.charCodeAt(c)]),m),f=i(f,h=n(h=r(h,31),g))}return f=t(f=i(f,[0,e.length]),d=i(d,[0,e.length])),d=t(d,f),f=t(f=a(f),d=a(d)),d=t(d,f),("00000000"+(f[0]>>>0).toString(16)).slice(-8)+("00000000"+(f[1]>>>0).toString(16)).slice(-8)+("00000000"+(d[0]>>>0).toString(16)).slice(-8)+("00000000"+(d[1]>>>0).toString(16)).slice(-8)}var c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function u(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function f(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}var d=window;function h(e){return parseInt(e)}function v(e){return parseFloat(e)}function m(e,t){return"number"==typeof e&&isNaN(e)?t:e}function g(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}var p=window,y=navigator,b=document;function w(){return g(["MSCSSMatrix"in p,"msSetImmediate"in p,"msIndexedDB"in p,"msMaxTouchPoints"in y,"msPointerEnabled"in y])>=4}function S(){return g(["msWriteProfilerMark"in p,"MSStream"in p,"msLaunchUri"in y,"msSaveBlob"in y])>=3&&!w()}function C(){return g(["webkitPersistentStorage"in y,"webkitTemporaryStorage"in y,0===y.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in p,"BatteryManager"in p,"webkitMediaStream"in p,"webkitSpeechGrammar"in p])>=5}function A(){return g(["ApplePayError"in p,"CSSPrimitiveValue"in p,"Counter"in p,0===y.vendor.indexOf("Apple"),"getStorageUpdates"in y,"WebKitMediaKeys"in p])>=4}function M(){return g(["safari"in p,!("DeviceMotionEvent"in p),!("ongestureend"in p),!("standalone"in y)])>=3}function T(){return b.fullscreenElement||b.msFullscreenElement||b.mozFullScreenElement||b.webkitFullscreenElement||null}var x=window,k=document;function P(e,t,n){(function(e){return e&&"function"==typeof e.setValueAtTime})(t)&&t.setValueAtTime(n,e.currentTime)}function E(e){return new Promise((function(t,n){e.oncomplete=function(e){return t(e.renderedBuffer)};var r=3,o=function(){switch(e.startRendering(),e.state){case"running":setTimeout((function(){return n(O("timeout"))}),1e3);break;case"suspended":k.hidden||r--,r>0?setTimeout(o,500):n(O("suspended"))}};o()}))}function I(e){for(var t=0,n=4500;n<5e3;++n)t+=Math.abs(e[n]);return t}function O(e){var t=new Error(e);return t.name=e,t}var F=document,D=["monospace","sans-serif","serif"],R=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"],L={fontStyle:"normal",fontWeight:"normal",letterSpacing:"normal",lineBreak:"auto",lineHeight:"normal",textTransform:"none",textAlign:"left",textDecoration:"none",textShadow:"none",whiteSpace:"normal",wordBreak:"normal",wordSpacing:"normal",position:"absolute",left:"-9999px",fontSize:"48px"};function B(e){return e.toDataURL()}var G=navigator,U=window;var H=navigator;var j=window;var N,z;function W(){return s(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return J(e=V())?N?[2,f(N)]:T()?[4,(b.exitFullscreen||b.msExitFullscreen||b.mozCancelFullScreen||b.webkitExitFullscreen).call(b)]:[3,2]:[3,2];case 1:t.sent(),e=V(),t.label=2;case 2:return J(e)||(N=e),[2,e]}}))}))}function V(){var e=screen;return[m(v(e.availTop),null),m(v(e.width)-v(e.availWidth)-m(v(e.availLeft),0),null),m(v(e.height)-v(e.availHeight)-m(v(e.availTop),0),null),m(v(e.availLeft),null)]}function J(e){for(var t=0;t<4;++t)if(e[t])return!1;return!0}var q=window;var K=document;var X={osCpu:function(){return navigator.oscpu},languages:function(){var e=[],t=H.language||H.userLanguage||H.browserLanguage||H.systemLanguage;if(void 0!==t&&e.push([t]),Array.isArray(H.languages))C()&&g([!("MediaSettingsRange"in p),"RTCEncodedAudioFrame"in p,""+p.Intl=="[object Intl]",""+p.Reflect=="[object Reflect]"])>=3||e.push(H.languages);else if("string"==typeof H.languages){var n=H.languages;n&&e.push(n.split(","))}return e},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return m(v(navigator.deviceMemory),void 0)},screenResolution:function(){var e=[h(j.screen.width),h(j.screen.height)];return e.sort().reverse(),e},screenFrame:function(){return s(this,void 0,void 0,(function(){var e,t;return l(this,(function(n){switch(n.label){case 0:return e=function(e){return null===e?null:function(e,t){if(void 0===t&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;var n=1/t;return Math.round(e*n)/n}(e,10)},[4,W()];case 1:return t=n.sent(),[2,[e(t[0]),e(t[1]),e(t[2]),e(t[3])]]}}))}))},hardwareConcurrency:function(){return m(h(navigator.hardwareConcurrency),void 0)},timezone:function(){var e;if(null===(e=q.Intl)||void 0===e?void 0:e.DateTimeFormat){var t=(new q.Intl.DateTimeFormat).resolvedOptions().timeZone;if(t)return t}var n,r=(n=(new Date).getFullYear(),-Math.max(v(new Date(n,0,1).getTimezoneOffset()),v(new Date(n,6,1).getTimezoneOffset())));return"UTC"+(r>=0?"+":"")+Math.abs(r)},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!w()&&!S())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){return navigator.platform},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],n=0;n<e.length;++n){var r=e[n];if(r){for(var o=[],i=0;i<r.length;++i){var a=r[i];o.push({type:a.type,suffixes:a.suffixes})}t.push({name:r.name,description:r.description,mimeTypes:o})}}return t}},canvas:function(){var e=function(){var e=document.createElement("canvas");return e.width=240,e.height=140,e.style.display="inline",[e,e.getContext("2d")]}(),t=e[0],n=e[1];if(!function(e,t){return!(!t||!e.toDataURL)}(t,n))return{winding:!1,data:""};n.rect(0,0,10,10),n.rect(2,2,6,6);var r=!n.isPointInPath(5,5,"evenodd");n.textBaseline="alphabetic",n.fillStyle="#f60",n.fillRect(125,1,62,20),n.fillStyle="#069",n.font='11pt "Times New Roman"';var o="Cwm fjordbank gly š";return n.fillText(o,2,15),n.fillStyle="rgba(102, 204, 0, 0.2)",n.font="18pt Arial",n.fillText(o,4,45),n.globalCompositeOperation="multiply",n.fillStyle="rgb(255,0,255)",n.beginPath(),n.arc(50,50,50,0,2*Math.PI,!0),n.closePath(),n.fill(),n.fillStyle="rgb(0,255,255)",n.beginPath(),n.arc(100,50,50,0,2*Math.PI,!0),n.closePath(),n.fill(),n.fillStyle="rgb(255,255,0)",n.beginPath(),n.arc(75,100,50,0,2*Math.PI,!0),n.closePath(),n.fill(),n.fillStyle="rgb(255,0,255)",n.arc(75,75,75,0,2*Math.PI,!0),n.arc(75,75,25,0,2*Math.PI,!0),n.fill("evenodd"),{winding:r,data:B(t)}},touchSupport:function(){var e,t=0;void 0!==G.maxTouchPoints?t=h(G.maxTouchPoints):void 0!==G.msMaxTouchPoints&&(t=G.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(n){e=!1}return{maxTouchPoints:t,touchEvent:e,touchStart:"ontouchstart"in U}},fonts:function(){var e=F.body,t=F.createElement("div"),n=F.createElement("div"),r={},o={},i=function(){var e=F.createElement("span");e.textContent="mmMwWLliI0O&1";for(var t=0,n=Object.keys(L);t<n.length;t++){var r=n[t];e.style[r]=L[r]}return e},a=function(e){return D.some((function(t,n){return e[n].offsetWidth!==r[t]||e[n].offsetHeight!==o[t]}))},u=D.map((function(e){var n=i();return n.style.fontFamily=e,t.appendChild(n),n}));e.appendChild(t);for(var c=0,s=D.length;c<s;c++)r[D[c]]=u[c].offsetWidth,o[D[c]]=u[c].offsetHeight;var l=function(){for(var e={},t=function(t){e[t]=D.map((function(e){var r=function(e,t){var n=i();return n.style.fontFamily="'"+e+"',"+t,n}(t,e);return n.appendChild(r),r}))},r=0,o=R;r<o.length;r++){t(o[r])}return e}();e.appendChild(n);for(var f=[],d=0,h=R.length;d<h;d++)a(l[R[d]])&&f.push(R[d]);return e.removeChild(n),e.removeChild(t),f},audio:function(){return s(this,void 0,void 0,(function(){var e,t,n,r,o,i;return l(this,(function(a){switch(a.label){case 0:if(!(e=x.OfflineAudioContext||x.webkitOfflineAudioContext))return[2,-2];if(A()&&!M()&&!(g(["DOMRectList"in p,"RTCPeerConnectionIceEvent"in p,"SVGGeometryElement"in p,"ontransitioncancel"in p])>=3))return[2,-1];t=new e(1,44100,44100),(n=t.createOscillator()).type="triangle",P(t,n.frequency,1e4),r=t.createDynamicsCompressor(),P(t,r.threshold,-50),P(t,r.knee,40),P(t,r.ratio,12),P(t,r.reduction,-20),P(t,r.attack,0),P(t,r.release,.25),n.connect(r),r.connect(t.destination),n.start(0),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,E(t)];case 2:return o=a.sent(),[3,5];case 3:if("timeout"===(i=a.sent()).name||"suspended"===i.name)return[2,-3];throw i;case 4:return n.disconnect(),r.disconnect(),[7];case 5:return[2,I(o.getChannelData(0))]}}))}))},productSub:function(){return navigator.productSub},emptyEvalLength:function(){return eval.toString().length},errorFF:function(){try{throw"a"}catch(e){try{return e.toSource(),!0}catch(t){return!1}}},vendor:function(){return navigator.vendor||""},chrome:function(){return void 0!==window.chrome},cookiesEnabled:function(){try{K.cookie="cookietest=1; SameSite=Strict;";var e=-1!==K.cookie.indexOf("cookietest=");return K.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(t){return!1}}};function Y(e,t,n){return s(this,void 0,void 0,(function(){var r,o,i,a,u,s,f,d,h;return l(this,(function(l){switch(l.label){case 0:r=Date.now(),o={},i=0,a=Object.keys(e),l.label=1;case 1:if(!(i<a.length))return[3,7];if(u=a[i],function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return!0;return!1}(n,u))return[3,6];s=void 0,l.label=2;case 2:return l.trys.push([2,4,,5]),h={},[4,e[u](t)];case 3:return h.value=l.sent(),s=h,[3,5];case 4:return f=l.sent(),s=f&&"object"==typeof f&&"message"in f?{error:f}:{error:{message:f}},[3,5];case 5:d=Date.now(),o[u]=c(c({},s),{duration:d-r}),r=d,l.label=6;case 6:return i++,[3,1];case 7:return[2,o]}}))}))}function Z(e){return JSON.stringify(e,(function(e,t){return t instanceof Error?c({name:(n=t).name,message:n.message,stack:null===(r=n.stack)||void 0===r?void 0:r.split("\n")},n):t;var n,r}),2)}function _(e){return u(function(e){for(var t="",n=0,r=Object.keys(e).sort();n<r.length;n++){var o=r[n],i=e[o],a=i.error?"error":JSON.stringify(i.value);t+=(t?"|":"")+o.replace(/([:|\\])/g,"\\$1")+":"+a}return t}(e))}var $=function(){function e(){!function(){if(void 0===z){var e=function(){var t=V();J(t)?z=setTimeout(e,2500):(N=t,z=void 0)};e()}}()}return e.prototype.get=function(e){return void 0===e&&(e={}),s(this,void 0,void 0,(function(){var t,n;return l(this,(function(r){switch(r.label){case 0:return[4,Y(X,void 0,[])];case 1:return t=r.sent(),n=function(e){var t;return{components:e,get visitorId(){return void 0===t&&(t=_(this.components)),t},set visitorId(e){t=e}}}(t),e.debug&&console.log("Copy the text below to get the debug data:\n\n```\nversion: 3.1.0-dev.1\nuserAgent: "+navigator.userAgent+"\ngetOptions: "+JSON.stringify(e,void 0,2)+"\nvisitorId: "+n.visitorId+"\ncomponents: "+Z(t)+"\n```"),[2,n]}}))}))},e}();function Q(e){var t=(void 0===e?{}:e).delayFallback,n=void 0===t?50:t;return s(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,(t=n,r=2*n,void 0===r&&(r=1/0),new Promise((function(e){d.requestIdleCallback?d.requestIdleCallback((function(){return e()}),{timeout:r}):setTimeout(e,Math.min(t,r))})))];case 1:return e.sent(),[2,new $]}var t,r}))}))}var ee={load:Q,hashComponents:_,componentsToDebugString:Z},te=u;e.componentsToDebugString=Z,e.default=ee,e.getComponents=Y,e.getFullscreenElement=T,e.getScreenFrame=W,e.hashComponents=_,e.isChromium=C,e.isDesktopSafari=M,e.isEdgeHTML=S,e.isGecko=function(){var e;return g(["buildID"in y,(null===(e=b.documentElement)||void 0===e?void 0:e.style)&&"MozAppearance"in b.documentElement.style,"MediaRecorderErrorEvent"in p,"mozInnerScreenX"in p,"CSSMozDocumentRule"in p,"CanvasCaptureMediaStream"in p])>=4},e.isTrident=w,e.isWebKit=A,e.load=Q,e.murmurX64Hash128=te,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).FingerprintJS={})}(this,(function(e){"use strict";function n(e,n){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],n=[n[0]>>>16,65535&n[0],n[1]>>>16,65535&n[1]];var t=[0,0,0,0];return t[3]+=e[3]+n[3],t[2]+=t[3]>>>16,t[3]&=65535,t[2]+=e[2]+n[2],t[1]+=t[2]>>>16,t[2]&=65535,t[1]+=e[1]+n[1],t[0]+=t[1]>>>16,t[1]&=65535,t[0]+=e[0]+n[0],t[0]&=65535,[t[0]<<16|t[1],t[2]<<16|t[3]]}function t(e,n){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],n=[n[0]>>>16,65535&n[0],n[1]>>>16,65535&n[1]];var t=[0,0,0,0];return t[3]+=e[3]*n[3],t[2]+=t[3]>>>16,t[3]&=65535,t[2]+=e[2]*n[3],t[1]+=t[2]>>>16,t[2]&=65535,t[2]+=e[3]*n[2],t[1]+=t[2]>>>16,t[2]&=65535,t[1]+=e[1]*n[3],t[0]+=t[1]>>>16,t[1]&=65535,t[1]+=e[2]*n[2],t[0]+=t[1]>>>16,t[1]&=65535,t[1]+=e[3]*n[1],t[0]+=t[1]>>>16,t[1]&=65535,t[0]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0],t[0]&=65535,[t[0]<<16|t[1],t[2]<<16|t[3]]}function r(e,n){return 32===(n%=64)?[e[1],e[0]]:n<32?[e[0]<<n|e[1]>>>32-n,e[1]<<n|e[0]>>>32-n]:(n-=32,[e[1]<<n|e[0]>>>32-n,e[0]<<n|e[1]>>>32-n])}function i(e,n){return 0===(n%=64)?e:n<32?[e[0]<<n|e[1]>>>32-n,e[1]<<n]:[e[1]<<n-32,0]}function o(e,n){return[e[0]^n[0],e[1]^n[1]]}function a(e){return e=o(e,[0,e[0]>>>1]),e=o(e=t(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=o(e=t(e,[3301882366,444984403]),[0,e[0]>>>1])}function u(e,u){u=u||0;var c,s=(e=e||"").length%16,l=e.length-s,f=[0,u],d=[0,u],h=[0,0],v=[0,0],g=[2277735313,289559509],m=[1291169091,658871167];for(c=0;c<l;c+=16)h=[255&e.charCodeAt(c+4)|(255&e.charCodeAt(c+5))<<8|(255&e.charCodeAt(c+6))<<16|(255&e.charCodeAt(c+7))<<24,255&e.charCodeAt(c)|(255&e.charCodeAt(c+1))<<8|(255&e.charCodeAt(c+2))<<16|(255&e.charCodeAt(c+3))<<24],v=[255&e.charCodeAt(c+12)|(255&e.charCodeAt(c+13))<<8|(255&e.charCodeAt(c+14))<<16|(255&e.charCodeAt(c+15))<<24,255&e.charCodeAt(c+8)|(255&e.charCodeAt(c+9))<<8|(255&e.charCodeAt(c+10))<<16|(255&e.charCodeAt(c+11))<<24],h=r(h=t(h,g),31),f=n(f=r(f=o(f,h=t(h,m)),27),d),f=n(t(f,[0,5]),[0,1390208809]),v=r(v=t(v,m),33),d=n(d=r(d=o(d,v=t(v,g)),31),f),d=n(t(d,[0,5]),[0,944331445]);switch(h=[0,0],v=[0,0],s){case 15:v=o(v,i([0,e.charCodeAt(c+14)],48));case 14:v=o(v,i([0,e.charCodeAt(c+13)],40));case 13:v=o(v,i([0,e.charCodeAt(c+12)],32));case 12:v=o(v,i([0,e.charCodeAt(c+11)],24));case 11:v=o(v,i([0,e.charCodeAt(c+10)],16));case 10:v=o(v,i([0,e.charCodeAt(c+9)],8));case 9:v=t(v=o(v,[0,e.charCodeAt(c+8)]),m),d=o(d,v=t(v=r(v,33),g));case 8:h=o(h,i([0,e.charCodeAt(c+7)],56));case 7:h=o(h,i([0,e.charCodeAt(c+6)],48));case 6:h=o(h,i([0,e.charCodeAt(c+5)],40));case 5:h=o(h,i([0,e.charCodeAt(c+4)],32));case 4:h=o(h,i([0,e.charCodeAt(c+3)],24));case 3:h=o(h,i([0,e.charCodeAt(c+2)],16));case 2:h=o(h,i([0,e.charCodeAt(c+1)],8));case 1:h=t(h=o(h,[0,e.charCodeAt(c)]),g),f=o(f,h=t(h=r(h,31),m))}return f=n(f=o(f,[0,e.length]),d=o(d,[0,e.length])),d=n(d,f),f=n(f=a(f),d=a(d)),d=n(d,f),("00000000"+(f[0]>>>0).toString(16)).slice(-8)+("00000000"+(f[1]>>>0).toString(16)).slice(-8)+("00000000"+(d[0]>>>0).toString(16)).slice(-8)+("00000000"+(d[1]>>>0).toString(16)).slice(-8)}var c=function(){return(c=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)};function s(e,n,t,r){return new(t||(t=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(n){o(n)}}function u(e){try{c(r.throw(e))}catch(n){o(n)}}function c(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,u)}c((r=r.apply(e,n||[])).next())}))}function l(e,n){var t,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(e,a)}catch(u){o=[6,u],r=0}finally{t=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function f(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var r=Array(e),i=0;for(n=0;n<t;n++)for(var o=arguments[n],a=0,u=o.length;a<u;a++,i++)r[i]=o[a];return r}function d(e){return parseInt(e)}function h(e){return parseFloat(e)}function v(e,n){return"number"==typeof e&&isNaN(e)?n:e}function g(e){return e.reduce((function(e,n){return e+(n?1:0)}),0)}function m(){var e=window,n=navigator;return g(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in n,"msPointerEnabled"in n])>=4}function p(){var e=window,n=navigator;return g(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in n,"msSaveBlob"in n])>=3&&!m()}function w(){var e=window,n=navigator;return g(["webkitPersistentStorage"in n,"webkitTemporaryStorage"in n,0===n.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function y(){var e=window,n=navigator;return g(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===n.vendor.indexOf("Apple"),"getStorageUpdates"in n,"WebKitMediaKeys"in e])>=4}function b(){var e=window;return g(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function S(){var e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function C(e,n,t){(function(e){return e&&"function"==typeof e.setValueAtTime})(n)&&n.setValueAtTime(t,e.currentTime)}function M(e){return new Promise((function(n,t){e.oncomplete=function(e){return n(e.renderedBuffer)};var r=3,i=function(){switch(e.startRendering(),e.state){case"running":setTimeout((function(){return t(T("timeout"))}),1e3);break;case"suspended":document.hidden||r--,r>0?setTimeout(i,500):t(T("suspended"))}};i()}))}function A(e){for(var n=0,t=4500;t<5e3;++t)n+=Math.abs(e[t]);return n}function T(e){var n=new Error(e);return n.name=e,n}var x=["monospace","sans-serif","serif"],k=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"],P={fontStyle:"normal",fontWeight:"normal",letterSpacing:"normal",lineBreak:"auto",lineHeight:"normal",textTransform:"none",textAlign:"left",textDecoration:"none",textShadow:"none",whiteSpace:"normal",wordBreak:"normal",wordSpacing:"normal",position:"absolute",left:"-9999px",fontSize:"48px"};function E(e){return e.toDataURL()}var O,I;function F(){return s(this,void 0,void 0,(function(){var e;return l(this,(function(n){switch(n.label){case 0:return R(e=D())?O?[2,f(O)]:S()?[4,(t=document,(t.exitFullscreen||t.msExitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen).call(t))]:[3,2]:[3,2];case 1:n.sent(),e=D(),n.label=2;case 2:return R(e)||(O=e),[2,e]}var t}))}))}function D(){var e=screen;return[v(h(e.availTop),null),v(h(e.width)-h(e.availWidth)-v(h(e.availLeft),0),null),v(h(e.height)-h(e.availHeight)-v(h(e.availTop),0),null),v(h(e.availLeft),null)]}function R(e){for(var n=0;n<4;++n)if(e[n])return!1;return!0}var L={osCpu:function(){return navigator.oscpu},languages:function(){var e,n=navigator,t=[],r=n.language||n.userLanguage||n.browserLanguage||n.systemLanguage;if(void 0!==r&&t.push([r]),Array.isArray(n.languages))w()&&g([!("MediaSettingsRange"in(e=window)),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3||t.push(n.languages);else if("string"==typeof n.languages){var i=n.languages;i&&t.push(i.split(","))}return t},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return v(h(navigator.deviceMemory),void 0)},screenResolution:function(){var e=screen,n=[d(e.width),d(e.height)];return n.sort().reverse(),n},screenFrame:function(){return s(this,void 0,void 0,(function(){var e,n;return l(this,(function(t){switch(t.label){case 0:return e=function(e){return null===e?null:function(e,n){if(void 0===n&&(n=1),Math.abs(n)>=1)return Math.round(e/n)*n;var t=1/n;return Math.round(e*t)/t}(e,10)},[4,F()];case 1:return n=t.sent(),[2,[e(n[0]),e(n[1]),e(n[2]),e(n[3])]]}}))}))},hardwareConcurrency:function(){return v(d(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,n=null===(e=window.Intl)||void 0===e?void 0:e.DateTimeFormat;if(n){var t=(new n).resolvedOptions().timeZone;if(t)return t}var r,i=(r=(new Date).getFullYear(),-Math.max(h(new Date(r,0,1).getTimezoneOffset()),h(new Date(r,6,1).getTimezoneOffset())));return"UTC"+(i>=0?"+":"")+Math.abs(i)},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!m()&&!p())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return"MacIntel"===e&&y()&&!b()?function(){if("iPad"===navigator.platform)return!0;var e=screen,n=e.width/e.height;return g(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,n>2/3&&n<1.5])>=2}()?"iPad":"iPhone":e},plugins:function(){var e=navigator.plugins;if(e){for(var n=[],t=0;t<e.length;++t){var r=e[t];if(r){for(var i=[],o=0;o<r.length;++o){var a=r[o];i.push({type:a.type,suffixes:a.suffixes})}n.push({name:r.name,description:r.description,mimeTypes:i})}}return n}},canvas:function(){var e=function(){var e=document.createElement("canvas");return e.width=240,e.height=140,e.style.display="inline",[e,e.getContext("2d")]}(),n=e[0],t=e[1];if(!function(e,n){return!(!n||!e.toDataURL)}(n,t))return{winding:!1,data:""};t.rect(0,0,10,10),t.rect(2,2,6,6);var r=!t.isPointInPath(5,5,"evenodd");t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.font='11pt "Times New Roman"';var i="Cwm fjordbank gly š";return t.fillText(i,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t.font="18pt Arial",t.fillText(i,4,45),t.globalCompositeOperation="multiply",t.fillStyle="rgb(255,0,255)",t.beginPath(),t.arc(50,50,50,0,2*Math.PI,!0),t.closePath(),t.fill(),t.fillStyle="rgb(0,255,255)",t.beginPath(),t.arc(100,50,50,0,2*Math.PI,!0),t.closePath(),t.fill(),t.fillStyle="rgb(255,255,0)",t.beginPath(),t.arc(75,100,50,0,2*Math.PI,!0),t.closePath(),t.fill(),t.fillStyle="rgb(255,0,255)",t.arc(75,75,75,0,2*Math.PI,!0),t.arc(75,75,25,0,2*Math.PI,!0),t.fill("evenodd"),{winding:r,data:E(n)}},touchSupport:function(){var e,n=navigator,t=0;void 0!==n.maxTouchPoints?t=d(n.maxTouchPoints):void 0!==n.msMaxTouchPoints&&(t=n.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(r){e=!1}return{maxTouchPoints:t,touchEvent:e,touchStart:"ontouchstart"in window}},fonts:function(){var e=document,n=e.body,t=e.createElement("div"),r=e.createElement("div"),i={},o={},a=function(){var n=e.createElement("span");n.textContent="mmMwWLliI0O&1";for(var t=0,r=Object.keys(P);t<r.length;t++){var i=r[t];n.style[i]=P[i]}return n},u=function(e){return x.some((function(n,t){return e[t].offsetWidth!==i[n]||e[t].offsetHeight!==o[n]}))},c=x.map((function(e){var n=a();return n.style.fontFamily=e,t.appendChild(n),n}));n.appendChild(t);for(var s=0,l=x.length;s<l;s++)i[x[s]]=c[s].offsetWidth,o[x[s]]=c[s].offsetHeight;var f=function(){for(var e={},n=function(n){e[n]=x.map((function(e){var t=function(e,n){var t=a();return t.style.fontFamily="'"+e+"',"+n,t}(n,e);return r.appendChild(t),t}))},t=0,i=k;t<i.length;t++){n(i[t])}return e}();n.appendChild(r);for(var d=[],h=0,v=k.length;h<v;h++)u(f[k[h]])&&d.push(k[h]);return n.removeChild(r),n.removeChild(t),d},audio:function(){return s(this,void 0,void 0,(function(){var e,n,t,r,i,o,a;return l(this,(function(u){switch(u.label){case 0:if(e=window,!(n=e.OfflineAudioContext||e.webkitOfflineAudioContext))return[2,-2];if(y()&&!b()&&!function(){var e=window;return g(["DOMRectList"in e,"RTCPeerConnectionIceEvent"in e,"SVGGeometryElement"in e,"ontransitioncancel"in e])>=3}())return[2,-1];t=new n(1,44100,44100),(r=t.createOscillator()).type="triangle",C(t,r.frequency,1e4),i=t.createDynamicsCompressor(),C(t,i.threshold,-50),C(t,i.knee,40),C(t,i.ratio,12),C(t,i.reduction,-20),C(t,i.attack,0),C(t,i.release,.25),r.connect(i),i.connect(t.destination),r.start(0),u.label=1;case 1:return u.trys.push([1,3,4,5]),[4,M(t)];case 2:return o=u.sent(),[3,5];case 3:if("timeout"===(a=u.sent()).name||"suspended"===a.name)return[2,-3];throw a;case 4:return r.disconnect(),i.disconnect(),[7];case 5:return[2,A(o.getChannelData(0))]}}))}))},productSub:function(){return navigator.productSub},emptyEvalLength:function(){return eval.toString().length},errorFF:function(){try{throw"a"}catch(e){try{return e.toSource(),!0}catch(n){return!1}}},vendor:function(){return navigator.vendor||""},chrome:function(){return void 0!==window.chrome},cookiesEnabled:function(){var e=document;try{e.cookie="cookietest=1; SameSite=Strict;";var n=-1!==e.cookie.indexOf("cookietest=");return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",n}catch(t){return!1}}};function B(e,n,t){return s(this,void 0,void 0,(function(){var r,i,o,a,u,s,f,d,h;return l(this,(function(l){switch(l.label){case 0:r=Date.now(),i={},o=0,a=Object.keys(e),l.label=1;case 1:if(!(o<a.length))return[3,7];if(u=a[o],function(e,n){for(var t=0,r=e.length;t<r;++t)if(e[t]===n)return!0;return!1}(t,u))return[3,6];s=void 0,l.label=2;case 2:return l.trys.push([2,4,,5]),h={},[4,e[u](n)];case 3:return h.value=l.sent(),s=h,[3,5];case 4:return f=l.sent(),s=f&&"object"==typeof f&&"message"in f?{error:f}:{error:{message:f}},[3,5];case 5:d=Date.now(),i[u]=c(c({},s),{duration:d-r}),r=d,l.label=6;case 6:return o++,[3,1];case 7:return[2,i]}}))}))}function G(e){return JSON.stringify(e,(function(e,n){return n instanceof Error?c({name:(t=n).name,message:t.message,stack:null===(r=t.stack)||void 0===r?void 0:r.split("\n")},t):n;var t,r}),2)}function U(e){return u(function(e){for(var n="",t=0,r=Object.keys(e).sort();t<r.length;t++){var i=r[t],o=e[i],a=o.error?"error":JSON.stringify(o.value);n+=(n?"|":"")+i.replace(/([:|\\])/g,"\\$1")+":"+a}return n}(e))}var H=function(){function e(){!function(){if(void 0===I){var e=function(){var n=D();R(n)?I=setTimeout(e,2500):(O=n,I=void 0)};e()}}()}return e.prototype.get=function(e){return void 0===e&&(e={}),s(this,void 0,void 0,(function(){var n,t;return l(this,(function(r){switch(r.label){case 0:return[4,B(L,void 0,[])];case 1:return n=r.sent(),t=function(e){var n;return{components:e,get visitorId(){return void 0===n&&(n=U(this.components)),n},set visitorId(e){n=e}}}(n),e.debug&&console.log("Copy the text below to get the debug data:\n\n```\nversion: 3.1.0-dev.2\nuserAgent: "+navigator.userAgent+"\ngetOptions: "+JSON.stringify(e,void 0,2)+"\nvisitorId: "+t.visitorId+"\ncomponents: "+G(n)+"\n```"),[2,t]}}))}))},e}();function j(e){var n=(void 0===e?{}:e).delayFallback,t=void 0===n?50:n;return s(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,(n=t,r=2*t,void 0===r&&(r=1/0),new Promise((function(e){var t=window.requestIdleCallback;t?t((function(){return e()}),{timeout:r}):setTimeout(e,Math.min(n,r))})))];case 1:return e.sent(),[2,new H]}var n,r}))}))}var N={load:j,hashComponents:U,componentsToDebugString:G},z=u;e.componentsToDebugString=G,e.default=N,e.getComponents=B,e.getFullscreenElement=S,e.getScreenFrame=F,e.hashComponents=U,e.isChromium=w,e.isDesktopSafari=b,e.isEdgeHTML=p,e.isGecko=function(){var e,n,t=window;return g(["buildID"in navigator,"MozAppearance"in(null!==(n=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==n?n:{}),"MediaRecorderErrorEvent"in t,"mozInnerScreenX"in t,"CSSMozDocumentRule"in t,"CanvasCaptureMediaStream"in t])>=4},e.isTrident=m,e.isWebKit=y,e.load=j,e.murmurX64Hash128=z,Object.defineProperty(e,"__esModule",{value:!0})})); |
{ | ||
"name": "@fingerprintjs/fingerprintjs", | ||
"description": "Browser fingerprinting library with the highest accuracy and stability", | ||
"version": "3.1.0-dev.1", | ||
"version": "3.1.0-dev.2", | ||
"keywords": [ | ||
@@ -43,3 +43,4 @@ "fraud", | ||
"test:browserstack": "karma start tests/karma.browserstack.config.js --single-run", | ||
"test:dts": "tsc --noEmit dist/fp.d.ts" | ||
"test:dts": "tsc --noEmit dist/fp.d.ts", | ||
"test:ssr": "node --require './dist/fp.cjs.js' --eval '' || (echo \"The distributive files can't be used with server side rendering. Make sure the code doesn't use browser API until an exported function is called.\" && exit 1)" | ||
}, | ||
@@ -46,0 +47,0 @@ "dependencies": { |
@@ -133,2 +133,4 @@ <p align="center"> | ||
ā¶ļø [Video: use FingerprintJS Pro to prevent multiple signups](https://www.youtube.com/watch?v=jWX9P5_jZn8) | ||
## Open-source version reference | ||
@@ -135,0 +137,0 @@ |
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
288660
6111
243