const quickHash = (a) => { var b = 0, c = 0, e; if (0 === a.length) return "00000000"; var f = 0; for (e = a.length; f < e; f++) { var q = a.charCodeAt(f); 0 === f % 2 ? ((b = (b << 5) - b + q), (b |= 0)) : ((c = (c << 5) - c + q), (c |= 0)); } 0 > b && (b = 4294967295 + b + 1); 0 > c && (c = 4294967295 + c + 1); return b.toString(16) + c.toString(16); }; const collectScreenDimensions = () => { const width = window.innerWidth ? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body && document.body.clientWidth ? document.body.clientWidth : null; const height = window.innerWidth ? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body && document.body.clientHeight ? document.body.clientHeight : null; return ( width + ":" + height + ":" + window.outerWidth + ":" + window.outerHeight + ":" + screen.availWidth + ":" + screen.availHeight ); }; const collectPlugins = () => { var a = [], b = /([0-9]+)\.[0-9|.]+/g; if (window.ActiveXObject) { if (document.plugins && 0 < document.plugins.length) for (var c = 0; c < document.plugins.length; c++) a.push(document.plugins[c].src.replace(b, "$1")); } else try { if (navigator.plugins && 0 < navigator.plugins.length) for (c = 0; c < navigator.plugins.length; c++) a.push(navigator.plugins[c].name.replace(b, "$1")); } catch (e) { a.push("denied"); } 0 < a.length && a.sort(); b = "p"; for (c = 0; c < a.length; c++) b += "," + a[c]; return b; }; const collectScreenFingerprint = () => { var a = ""; window.screen && ((a += [window.screen.width, window.screen.height].sort().join("x")), (a += " " + window.screen.colorDepth)); return a; }; const collectTimezone = () => { var a = new Date(2014, 0, 2).getTimezoneOffset(), b = new Date(2014, 5, 2).getTimezoneOffset(); return Math.max(a, b); }; // Who has flash installed? const isFlashInstalled = () => { return "false"; }; const getHTML5SupportedVideo = () => { var a = "fv"; try { var b = document.createElement("video"), c = ["ogg", "mp4", "webm"]; if ("undefined" !== typeof b) for (var e in c) c.hasOwnProperty(e) && "" != b.canPlayType("video/" + c[e]) && (a += "," + c[e]); } catch (f) {} return a; }; const getHTML5SupportedAudio = () => { var a = "fa"; try { var b = document.createElement("audio"), c = ["mpeg", "ogg", "wav"]; if ("undefined" !== typeof b) for (var e in c) c.hasOwnProperty(e) && "" != b.canPlayType("audio/" + c[e]) && (a += "," + c[e]); } catch (f) {} return a; }; const collectPlatform = () => { var a = "NA"; try { a = navigator.platform; } catch (b) {} return a; }; const getHTML5CanvasSignature = () => { var a = "NA"; try { var b = document.createElement("canvas"); b.width = 200; b.height = 40; b.style.display = "inline"; var c = b.getContext("2d"); c.fillText("aBc#$efG~ \ude73\ud63d", 4, 10); c.fillStyle = "rgba(67, 92, 0, 0.5)"; c.font = "18pt Arial"; c.fillText("aBc#$~efG \ude73\ud63d", 8, 12); a = b.toDataURL(); } catch (e) {} return a; }; const getDeviceTouchSettings = function () { var a = { mtp: "NA", }; "undefined" !== typeof navigator.maxTouchPoints ? (a.mtp = navigator.maxTouchPoints) : "undefined" !== typeof navigator.msMaxTouchPoints && (a.mtp = navigator.msMaxTouchPoints); a.ts = !1; "ontouchstart" in window && (a.ts = !0); a.te = !1; try { document.createEvent("TouchEvent"), (a.te = !0); } catch (b) {} return a; }; const getCookiesEnabled = (a) => { var b = !0, c = "undefined" !== typeof navigator.cookieEnabled && navigator.cookieEnabled ? !0 : !1; if (1 == a) try { (document.cookie = "ncookietest\x3d1; SameSite\x3dNone; Secure"), (b = -1 != document.cookie.indexOf("ncookietest\x3d")), (document.cookie = "ncookietest\x3d1; expires\x3dThu, 01-Jan-1970 00:00:01 GMT; SameSite\x3dNone; Secure"); } catch (e) {} return { tc: b, nc: c, }; }; const getHTML5LocalStorage = () => { var a = !1; try { var b = window.localStorage; b.setItem("ndls", "ndls"); b.removeItem("ndls"); a = !0; } catch (c) {} return a; }; const getWebGLInfo = () => { for ( var a = {}, b = document.createElement("canvas"), c = ["webgl", "experimental-webgl", "moz-webgl", "webkit-3d"], e, f = 0; f < c.length; f++ ) try { if ((e = b.getContext(c[f]))) { a.ContextName = c[f]; break; } } catch (q) {} if (!(e && "getParameter" in e)) return null; b = "VENDOR VERSION RENDERER SHADING_LANGUAGE_VERSION DEPTH_BITS MAX_VERTEX_ATTRIBS MAX_VERTEX_TEXTURE_IMAGE_UNITS MAX_VARYING_VECTORS MAX_VERTEX_UNIFORM_VECTORS MAX_COMBINED_TEXTURE_IMAGE_UNITS MAX_TEXTURE_SIZE MAX_CUBE_MAP_TEXTURE_SIZE NUM_COMPRESSED_TEXTURE_FORMATS MAX_RENDERBUFFER_SIZE MAX_VIEWPORT_DIMS ALIASED_LINE_WIDTH_RANGE ALIASED_POINT_SIZE_RANGE".split( " " ); for (c = 0; c < b.length; c++) (f = b[c]), f in e && (a[f] = e.getParameter(e[f])); return a; }; const getFontMetrics = function () { var a = []; const fontMetricsFontList = "monospace;sans-serif;serif;Andale Mono;Arial;Arial Black;Arial Hebrew;Arial MT;Arial Narrow;Arial Rounded MT Bold;Arial Unicode MS;Bitstream Vera Sans Mono;Book Antiqua;Bookman Old Style;Calibri;Cambria;Cambria Math;Century;Century Gothic;Century Schoolbook;Comic Sans;Comic Sans MS;Consolas;Courier;Courier New;Garamond;Geneva;Georgia;Helvetica;Helvetica Neue;Impact;Lucida Bright;Lucida Calligraphy;Lucida Console;Lucida Fax;LUCIDA GRANDE;Lucida Handwriting;Lucida Sans;Lucida Sans Typewriter;Lucida Sans Unicode;Microsoft Sans Serif;Monaco;Monotype Corsiva;MS Gothic;MS Outlook;MS PGothic;MS Reference Sans Serif;MS Sans Serif;MS Serif;MYRIAD;MYRIAD PRO;Palatino;Palatino Linotype;Segoe Print;Segoe Script;Segoe UI;Segoe UI Light;Segoe UI Semibold;Segoe UI Symbol;Tahoma;Times;Times New Roman;Times New Roman PS;Trebuchet MS;Verdana;Wingdings;Wingdings 2;Wingdings 3".split( ";" ); try { for ( var b = document.createElement("canvas").getContext("2d"), c = fontMetricsFontList, e = 0; e < c.length; e += 1 ) { b.font = '72px "' + c[e] + '"'; var f = b.measureText("mmmmmmmmmmlli").width; a.push(f); } } catch (q) {} return a; }; const config = { ac: true, }; const version = "2.5.3"; const key = "nudata"; const hasCollectedBefore = localStorage.getItem(key) === version; if (!hasCollectedBefore) { fetch("https://automation.seat.tools/nudata", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ bd: collectScreenDimensions(), bp: quickHash(collectPlugins()), sr: collectScreenFingerprint(), didtz: collectTimezone().toString(), fv: getHTML5SupportedVideo(), fa: getHTML5SupportedAudio(), hf: quickHash(getHTML5CanvasSignature()), pl: collectPlatform(), ft: JSON.stringify(getDeviceTouchSettings()), fc: JSON.stringify(getCookiesEnabled(config.ac)), fs: getHTML5LocalStorage().toString(), wg: quickHash(JSON.stringify(getWebGLInfo())), fm: quickHash(getFontMetrics().join(",")), }), }).then(() => { localStorage.setItem(key, version); }); }