/** * Fingerprint BotD v1.6.6 - Copyright (c) FingerprintJS, Inc, 2023 (https://fingerprint.com) * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. */ var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},e(n,t)};function n(e,n,t,r){return new(t||(t=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(n){o(n)}}function u(e){try{s(r.throw(e))}catch(n){o(n)}}function s(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,u)}s((r=r.apply(e,n||[])).next())}))}function t(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(u){return function(s){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(t=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]=5?"chromium":l(["ApplePayError"in t,"CSSPrimitiveValue"in t,"Counter"in t,0===r.vendor.indexOf("Apple"),"getStorageUpdates"in r,"WebKitMediaKeys"in t])>=4?"webkit":l(["buildID"in navigator,"MozAppearance"in(null!==(n=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==n?n:{}),"onmozfullscreenchange"in t,"mozInnerScreenX"in t,"CSSMozDocumentRule"in t,"CanvasCaptureMediaStream"in t])>=4?"gecko":"unknown"}function v(){var e,n=null===(e=navigator.userAgent)||void 0===e?void 0:e.toLowerCase();return u(n,"wechat")?"wechat":u(n,"firefox")?"firefox":u(n,"opera")||u(n,"opr")?"opera":u(n,"chrome")?"chrome":u(n,"safari")?"safari":u(n,"trident")||u(n,"msie")?"internet_explorer":"unknown"}var w={detectAppVersion:function(e){var n=e.appVersion;return 0===n.state&&(/headless/i.test(n.value)?i.HeadlessChrome:/electron/i.test(n.value)?i.Electron:/slimerjs/i.test(n.value)?i.SlimerJS:void 0)},detectDocumentAttributes:function(e){var n=e.documentElementKeys;return 0===n.state&&(d(n.value,"selenium","webdriver","driver")?i.Selenium:void 0)},detectErrorTrace:function(e){var n=e.errorTrace;return 0===n.state&&(/PhantomJS/i.test(n.value)?i.PhantomJS:void 0)},detectEvalLengthInconsistency:function(e){var n=e.evalLength;if(0===n.state){var t=n.value,r=v(),i=f();return"unknown"!=i&&(37===t&&!a(["webkit","gecko"],i)||39===t&&!a(["internet_explorer"],r)||33===t&&!a(["chromium"],i))}},detectFunctionBind:function(e){if(-2===e.functionBind.state)return i.PhantomJS},detectLanguagesLengthInconsistency:function(e){var n=e.languages;if(0===n.state&&0===n.value.length)return i.HeadlessChrome},detectNotificationPermissions:function(e){var n=e.notificationPermissions;return"chrome"===v()&&(0===n.state&&n.value?i.HeadlessChrome:void 0)},detectPluginsArray:function(e){var n=e.pluginsArray;if(0===n.state&&!n.value)return i.HeadlessChrome},detectPluginsLengthInconsistency:function(e){var n=e.pluginsLength;if(0===n.state){var t=v(),r=f();if("chrome"===t&&!function(){var e=f(),n="chromium"===e,t="gecko"===e;if(!n&&!t)return!1;var r=window;return l(["onorientationchange"in r,"orientation"in r,n&&!("SharedWorker"in r),t&&/android/i.test(navigator.appVersion)])>=2}()&&"chromium"===r)return 0===n.value?i.HeadlessChrome:void 0}},detectProcess:function(e){var n,t=e.process;return 0===t.state&&("renderer"===t.value.type||null!=(null===(n=t.value.versions)||void 0===n?void 0:n.electron)?i.Electron:void 0)},detectUserAgent:function(e){var n=e.userAgent;return 0===n.state&&(/PhantomJS/i.test(n.value)?i.PhantomJS:/Headless/i.test(n.value)?i.HeadlessChrome:/Electron/i.test(n.value)?i.Electron:/slimerjs/i.test(n.value)?i.SlimerJS:void 0)},detectWebDriver:function(e){var n=e.webDriver;if(0===n.state&&n.value)return i.HeadlessChrome},detectWebGL:function(e){var n=e.webGL;if(0===n.state){var t=n.value,r=t.vendor,o=t.renderer;if("Brian Paul"==r&&"Mesa OffScreen"==o)return i.HeadlessChrome}},detectWindowExternal:function(e){var n=e.windowExternal;return 0===n.state&&(/Sequentum/i.test(n.value)?i.Sequentum:void 0)},detectWindowSize:function(e){var n=e.windowSize;if(0!==n.state)return!1;var t=n.value,r=t.outerWidth,o=t.outerHeight;return void 0!==document.hasFocus&&document.hasFocus()&&0===r&&0===o?i.HeadlessChrome:void 0},detectMimeTypesConsistent:function(e){var n=e.mimeTypesConsistent;if(0===n.state&&!n.value)return i.Unknown},detectProductSub:function(e){var n=e.productSub;if(0!==n.state)return!1;var t=v();return"chrome"!==t&&"safari"!==t&&"opera"!==t&&"wechat"!==t||"20030107"===n.value?void 0:i.Unknown},detectDistinctiveProperties:function(e){var n=e.distinctiveProps;if(0!==n.state)return!1;var t,r=n.value;for(t in r)if(r[t])return t}};var p={userAgent:function(){return navigator.userAgent},appVersion:function(){var e=navigator.appVersion;if(null==e)throw new o(-1,"navigator.appVersion is undefined");return e},rtt:function(){if(void 0===navigator.connection)throw new o(-1,"navigator.connection is undefined");if(void 0===navigator.connection.rtt)throw new o(-1,"navigator.connection.rtt is undefined");return navigator.connection.rtt},windowSize:function(){return{outerWidth:window.outerWidth,outerHeight:window.outerHeight,innerWidth:window.innerWidth,innerHeight:window.innerHeight}},pluginsLength:function(){if(void 0===navigator.plugins)throw new o(-1,"navigator.plugins is undefined");if(void 0===navigator.plugins.length)throw new o(-3,"navigator.plugins.length is undefined");return navigator.plugins.length},pluginsArray:function(){if(void 0===navigator.plugins)throw new o(-1,"navigator.plugins is undefined");if(void 0===window.PluginArray)throw new o(-1,"window.PluginArray is undefined");return navigator.plugins instanceof PluginArray},errorTrace:function(){try{null[0]()}catch(e){if(e instanceof Error&&null!=e.stack)return e.stack.toString()}throw new o(-3,"errorTrace signal unexpected behaviour")},productSub:function(){var e=navigator.productSub;if(void 0===e)throw new o(-1,"navigator.productSub is undefined");return e},windowExternal:function(){if(void 0===window.external)throw new o(-1,"window.external is undefined");var e=window.external;if("function"!=typeof e.toString)throw new o(-2,"window.external.toString is not a function");return e.toString()},mimeTypesConsistent:function(){if(void 0===navigator.mimeTypes)throw new o(-1,"navigator.mimeTypes is undefined");for(var e=navigator.mimeTypes,n=Object.getPrototypeOf(e)===MimeTypeArray.prototype,t=0;t=3||t.push(n.languages);else if("string"==typeof n.languages){var i=n.languages;i&&t.push(i.split(","))}return t},notificationPermissions:function(){return n(this,void 0,void 0,(function(){var e,n;return t(this,(function(t){switch(t.label){case 0:if(void 0===window.Notification)throw new o(-1,"window.Notification is undefined");if(void 0===navigator.permissions)throw new o(-1,"navigator.permissions is undefined");if("function"!=typeof(e=navigator.permissions).query)throw new o(-2,"navigator.permissions.query is not a function");t.label=1;case 1:return t.trys.push([1,3,,4]),[4,e.query({name:"notifications"})];case 2:return n=t.sent(),[2,"denied"===window.Notification.permission&&"prompt"===n.state];case 3:throw t.sent(),new o(-3,"notificationPermissions signal unexpected behaviour");case 4:return[2]}}))}))},documentElementKeys:function(){if(void 0===document.documentElement)throw new o(-1,"document.documentElement is undefined");var e=document.documentElement;if("function"!=typeof e.getAttributeNames)throw new o(-2,"document.documentElement.getAttributeNames is not a function");return e.getAttributeNames()},functionBind:function(){if(void 0===Function.prototype.bind)throw new o(-2,"Function.prototype.bind is undefined");return Function.prototype.bind.toString()},process:function(){if(void 0===window.process)throw new o(-1,"window.process is undefined");return window.process},distinctiveProps:function(){var e,n,t=((e={})[i.Awesomium]={window:["awesomium"]},e[i.Cef]={window:["RunPerfTest"]},e[i.CefSharp]={window:["CefSharp"]},e[i.CoachJS]={window:["emit"]},e[i.FMiner]={window:["fmget_targets"]},e[i.Geb]={window:["geb"]},e[i.NightmareJS]={window:["__nightmare","nightmare"]},e[i.Phantomas]={window:["__phantomas"]},e[i.PhantomJS]={window:["callPhantom","_phantom"]},e[i.Rhino]={window:["spawn"]},e[i.Selenium]={window:["_Selenium_IDE_Recorder","_selenium","calledSelenium",/^([a-z]){3}_.*_(Array|Promise|Symbol)$/],document:["__selenium_evaluate","selenium-evaluate","__selenium_unwrapped"]},e[i.WebDriverIO]={window:["wdioElectron"]},e[i.WebDriver]={window:["webdriver","__webdriverFunc","__lastWatirAlert","__lastWatirConfirm","__lastWatirPrompt","_WEBDRIVER_ELEM_CACHE","ChromeDriverw"],document:["__webdriver_script_fn","__driver_evaluate","__webdriver_evaluate","__fxdriver_evaluate","__driver_unwrapped","__webdriver_unwrapped","__fxdriver_unwrapped","__webdriver_script_fn","__webdriver_script_func","__webdriver_script_function","$cdc_asdjflasutopfhvcZLmcf","$cdc_asdjflasutopfhvcZLmcfl_","$chrome_asyncScriptInfo","__$webdriverAsyncExecutor"]},e[i.HeadlessChrome]={window:["domAutomation","domAutomationController"]},e),o={},a=c(window),u=[];for(n in void 0!==window.document&&(u=c(window.document)),t){var s=t[n];if(void 0!==s){var l=void 0!==s.window&&d.apply(void 0,r([a],s.window,!1)),f=!(void 0===s.document||!u.length)&&d.apply(void 0,r([u],s.document,!1));o[n]=l||f}}return o}},m=function(){function e(){this.components=void 0,this.detections=void 0}return e.prototype.getComponents=function(){return this.components},e.prototype.getDetections=function(){return this.detections},e.prototype.getSources=function(){return p},e.prototype.getDetectors=function(){return w},e.prototype.detect=function(){if(void 0===this.components)throw new Error("BotDetector.detect can't be called before BotDetector.collect");var e=this.components,n=this.getDetectors(),t={},r={bot:!1};for(var o in n){var a=(0,n[o])(e),u={bot:!1};"string"==typeof a?u={bot:!0,botKind:a}:a&&(u={bot:!0,botKind:i.Unknown}),t[o]=u,u.bot&&(r=u)}return this.detections=t,r},e.prototype.collect=function(){return n(this,void 0,void 0,(function(){var e,r,i,a=this;return t(this,(function(u){switch(u.label){case 0:return e=this.getSources(),r={},i=Object.keys(e),[4,Promise.all(i.map((function(i){return n(a,void 0,void 0,(function(){var n,a,u,s,c;return t(this,(function(t){switch(t.label){case 0:n=e[i],t.label=1;case 1:return t.trys.push([1,3,,4]),a=r,u=i,c={},[4,n()];case 2:return a[u]=(c.value=t.sent(),c.state=0,c),[3,4];case 3:return s=t.sent(),r[i]=s instanceof o?{state:s.state,error:"".concat(s.name,": ").concat(s.message)}:{state:-3,error:s instanceof Error?"".concat(s.name,": ").concat(s.message):String(s)},[3,4];case 4:return[2]}}))}))})))];case 1:return u.sent(),this.components=r,[2,this.components]}}))}))},e}();function h(e){return(void 0===e?{}:e).monitoring,n(this,void 0,void 0,(function(){var e;return t(this,(function(n){switch(n.label){case 0:return[4,(e=new m).collect()];case 1:return n.sent(),[2,e]}}))}))}var g={load:h};export{i as BotKind,o as BotdError,g as default,h as load,p as sources};