{"version":3,"file":"js/chunk-vendors-76e5bd13.a5419588.js","mappings":";;;;;;;;;;;;;;AAaA;;;;;;ACLA","sources":["webpack://sogica-vault/./node_modules/device-uuid/index.js","webpack://sogica-vault/./node_modules/device-uuid/lib/device-uuid.js"],"sourcesContent":["/**\n *\n * @revision $Id: index.js 2012-03-24 16:21:10 Aleksey $\n * @created 2016-09-24 16:21:10\n * @category Express Helpers\n * @package device-uuid\n * @version 1.0.2\n * @copyright Copyright (c) 2016-2017 - All rights reserved.\n * @license MIT License\n * @author Alexey Gordeyev IK \n * @link http://www.gordejev.lv\n *\n */\nmodule.exports = require('./lib/device-uuid');","/*!\n * device-uuid.js v1.0.4 (https://github.com/biggora/device-uuid/)\n * Copyright 2016-2017 Alexey Gordeyev\n * Licensed under MIT (https://github.com/biggora/device-uuid/blob/master/LICENSE)\n */\n/*global\n screen, window, navigator\n */\n(function (exports) {\n 'use strict';\n\n var BOTS = [\n '\\\\+https:\\\\/\\\\/developers.google.com\\\\/\\\\+\\\\/web\\\\/snippet\\\\/',\n 'googlebot',\n 'baiduspider',\n 'gurujibot',\n 'yandexbot',\n 'slurp',\n 'msnbot',\n 'bingbot',\n 'facebookexternalhit',\n 'linkedinbot',\n 'twitterbot',\n 'slackbot',\n 'telegrambot',\n 'applebot',\n 'pingdom',\n 'tumblr ',\n 'Embedly',\n 'spbot'\n ];\n var IS_BOT_REGEXP = new RegExp('^.*(' + BOTS.join('|') + ').*$');\n\n var DeviceUUID = function (options) {\n options = options ? options : {};\n var defOptions = {\n version: false,\n language: false,\n platform: true,\n os: true,\n pixelDepth: true,\n colorDepth: true,\n resolution: false,\n isAuthoritative: true,\n silkAccelerated: true,\n isKindleFire: true,\n isDesktop: true,\n isMobile: true,\n isTablet: true,\n isWindows: true,\n isLinux: true,\n isLinux64: true,\n isChromeOS: true,\n isMac: true,\n isiPad: true,\n isiPhone: true,\n isiPod: true,\n isAndroid: true,\n isSamsung: true,\n isSmartTV: true,\n isRaspberry: true,\n isBlackberry: true,\n isTouchScreen: true,\n isOpera: false,\n isIE: false,\n isEdge: false,\n isIECompatibilityMode: false,\n isSafari: false,\n isFirefox: false,\n isWebkit: false,\n isChrome: false,\n isKonqueror: false,\n isOmniWeb: false,\n isSeaMonkey: false,\n isFlock: false,\n isAmaya: false,\n isPhantomJS: false,\n isEpiphany: false,\n source: false,\n cpuCores: false\n };\n for (var key in options) {\n if (options.hasOwnProperty(key) && typeof defOptions[key] !== 'undefined') {\n defOptions[key] = options[key];\n }\n }\n this.options = defOptions;\n this.version = '1.0.0';\n this._Versions = {\n Edge: /Edge\\/([\\d\\w\\.\\-]+)/i,\n Firefox: /firefox\\/([\\d\\w\\.\\-]+)/i,\n IE: /msie\\s([\\d\\.]+[\\d])|trident\\/\\d+\\.\\d+;.*[rv:]+(\\d+\\.\\d)/i,\n Chrome: /chrome\\/([\\d\\w\\.\\-]+)/i,\n Chromium: /(?:chromium|crios)\\/([\\d\\w\\.\\-]+)/i,\n Safari: /version\\/([\\d\\w\\.\\-]+)/i,\n Opera: /version\\/([\\d\\w\\.\\-]+)|OPR\\/([\\d\\w\\.\\-]+)/i,\n Ps3: /([\\d\\w\\.\\-]+)\\)\\s*$/i,\n Psp: /([\\d\\w\\.\\-]+)\\)?\\s*$/i,\n Amaya: /amaya\\/([\\d\\w\\.\\-]+)/i,\n SeaMonkey: /seamonkey\\/([\\d\\w\\.\\-]+)/i,\n OmniWeb: /omniweb\\/v([\\d\\w\\.\\-]+)/i,\n Flock: /flock\\/([\\d\\w\\.\\-]+)/i,\n Epiphany: /epiphany\\/([\\d\\w\\.\\-]+)/i,\n WinJs: /msapphost\\/([\\d\\w\\.\\-]+)/i,\n PhantomJS: /phantomjs\\/([\\d\\w\\.\\-]+)/i,\n UC: /UCBrowser\\/([\\d\\w\\.]+)/i\n };\n this._Browsers = {\n Edge: /edge/i,\n Amaya: /amaya/i,\n Konqueror: /konqueror/i,\n Epiphany: /epiphany/i,\n SeaMonkey: /seamonkey/i,\n Flock: /flock/i,\n OmniWeb: /omniweb/i,\n Chromium: /chromium|crios/i,\n Chrome: /chrome/i,\n Safari: /safari/i,\n IE: /msie|trident/i,\n Opera: /opera|OPR/i,\n PS3: /playstation 3/i,\n PSP: /playstation portable/i,\n Firefox: /firefox/i,\n WinJs: /msapphost/i,\n PhantomJS: /phantomjs/i,\n UC: /UCBrowser/i\n };\n this._OS = {\n Windows10: /windows nt 10\\.0/i,\n Windows81: /windows nt 6\\.3/i,\n Windows8: /windows nt 6\\.2/i,\n Windows7: /windows nt 6\\.1/i,\n UnknownWindows: /windows nt 6\\.\\d+/i,\n WindowsVista: /windows nt 6\\.0/i,\n Windows2003: /windows nt 5\\.2/i,\n WindowsXP: /windows nt 5\\.1/i,\n Windows2000: /windows nt 5\\.0/i,\n WindowsPhone8: /windows phone 8\\./,\n OSXCheetah: /os x 10[._]0/i,\n OSXPuma: /os x 10[._]1(\\D|$)/i,\n OSXJaguar: /os x 10[._]2/i,\n OSXPanther: /os x 10[._]3/i,\n OSXTiger: /os x 10[._]4/i,\n OSXLeopard: /os x 10[._]5/i,\n OSXSnowLeopard: /os x 10[._]6/i,\n OSXLion: /os x 10[._]7/i,\n OSXMountainLion: /os x 10[._]8/i,\n OSXMavericks: /os x 10[._]9/i,\n OSXYosemite: /os x 10[._]10/i,\n OSXElCapitan: /os x 10[._]11/i,\n OSXSierra: /os x 10[._]12/i,\n Mac: /os x/i,\n Linux: /linux/i,\n Linux64: /linux x86_64/i,\n ChromeOS: /cros/i,\n Wii: /wii/i,\n PS3: /playstation 3/i,\n PSP: /playstation portable/i,\n iPad: /\\(iPad.*os (\\d+)[._](\\d+)/i,\n iPhone: /\\(iPhone.*os (\\d+)[._](\\d+)/i,\n Bada: /Bada\\/(\\d+)\\.(\\d+)/i,\n Curl: /curl\\/(\\d+)\\.(\\d+)\\.(\\d+)/i\n };\n this._Platform = {\n Windows: /windows nt/i,\n WindowsPhone: /windows phone/i,\n Mac: /macintosh/i,\n Linux: /linux/i,\n Wii: /wii/i,\n Playstation: /playstation/i,\n iPad: /ipad/i,\n iPod: /ipod/i,\n iPhone: /iphone/i,\n Android: /android/i,\n Blackberry: /blackberry/i,\n Samsung: /samsung/i,\n Curl: /curl/i\n };\n\n this.DefaultAgent = {\n isAuthoritative: true,\n isMobile: false,\n isTablet: false,\n isiPad: false,\n isiPod: false,\n isiPhone: false,\n isAndroid: false,\n isBlackberry: false,\n isOpera: false,\n isIE: false,\n isEdge: false,\n isIECompatibilityMode: false,\n isSafari: false,\n isFirefox: false,\n isWebkit: false,\n isChrome: false,\n isKonqueror: false,\n isOmniWeb: false,\n isSeaMonkey: false,\n isFlock: false,\n isAmaya: false,\n isPhantomJS: false,\n isEpiphany: false,\n isDesktop: false,\n isWindows: false,\n isLinux: false,\n isLinux64: false,\n isMac: false,\n isChromeOS: false,\n isBada: false,\n isSamsung: false,\n isRaspberry: false,\n isBot: false,\n isCurl: false,\n isAndroidTablet: false,\n isWinJs: false,\n isKindleFire: false,\n isSilk: false,\n isCaptive: false,\n isSmartTV: false,\n isUC: false,\n isTouchScreen: false,\n silkAccelerated: false,\n colorDepth: -1,\n pixelDepth: -1,\n resolution: [],\n cpuCores: -1,\n language: 'unknown',\n browser: 'unknown',\n version: 'unknown',\n os: 'unknown',\n platform: 'unknown',\n geoIp: {},\n source: '',\n hashInt: function (string) {\n var hash = 0, i, chr, len;\n if (string.length === 0) { return hash; }\n for (i = 0, len = string.length; i < len; i++) {\n chr = string.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0;\n }\n return hash;\n },\n hashMD5: function (string) {\n function rotateLeft(lValue, iShiftBits) {\n return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));\n }\n\n function addUnsigned(lX, lY) {\n var lX4, lY4, lX8, lY8, lResult;\n lX8 = (lX & 0x80000000);\n lY8 = (lY & 0x80000000);\n lX4 = (lX & 0x40000000);\n lY4 = (lY & 0x40000000);\n lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);\n\n if (lX4 & lY4) {\n return (lResult ^ 0x80000000 ^ lX8 ^ lY8);\n }\n if (lX4 | lY4) {\n if (lResult & 0x40000000) {\n return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);\n } else {\n return (lResult ^ 0x40000000 ^ lX8 ^ lY8);\n }\n } else {\n return (lResult ^ lX8 ^ lY8);\n }\n }\n\n function gF(x, y, z) {\n return (x & y) | ((~x) & z);\n }\n\n function gG(x, y, z) {\n return (x & z) | (y & (~z));\n }\n\n function gH(x, y, z) {\n return (x ^ y ^ z);\n }\n\n function gI(x, y, z) {\n return (y ^ (x | (~z)));\n }\n\n function gFF(a, b, c, d, x, s, ac) {\n a = addUnsigned(a, addUnsigned(addUnsigned(gF(b, c, d), x), ac));\n return addUnsigned(rotateLeft(a, s), b);\n }\n\n function gGG(a, b, c, d, x, s, ac) {\n a = addUnsigned(a, addUnsigned(addUnsigned(gG(b, c, d), x), ac));\n return addUnsigned(rotateLeft(a, s), b);\n }\n\n function gHH(a, b, c, d, x, s, ac) {\n a = addUnsigned(a, addUnsigned(addUnsigned(gH(b, c, d), x), ac));\n return addUnsigned(rotateLeft(a, s), b);\n }\n\n function gII(a, b, c, d, x, s, ac) {\n a = addUnsigned(a, addUnsigned(addUnsigned(gI(b, c, d), x), ac));\n return addUnsigned(rotateLeft(a, s), b);\n }\n\n function convertToWordArray(string) {\n var lWordCount;\n var lMessageLength = string.length;\n var lNumberOfWordsTemp1 = lMessageLength + 8;\n var lNumberOfWordsTemp2 = (lNumberOfWordsTemp1 - (lNumberOfWordsTemp1 % 64)) / 64;\n var lNumberOfWords = (lNumberOfWordsTemp2 + 1) * 16;\n var lWordArray = new Array(lNumberOfWords - 1);\n var lBytePosition = 0;\n var lByteCount = 0;\n\n while (lByteCount < lMessageLength) {\n lWordCount = (lByteCount - (lByteCount % 4)) / 4;\n lBytePosition = (lByteCount % 4) * 8;\n lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));\n lByteCount++;\n }\n\n lWordCount = (lByteCount - (lByteCount % 4)) / 4;\n lBytePosition = (lByteCount % 4) * 8;\n lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);\n lWordArray[lNumberOfWords - 2] = lMessageLength << 3;\n lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;\n return lWordArray;\n }\n\n function wordToHex(lValue) {\n var wordToHexValue = '', wordToHexValueTemp = '', lByte, lCount;\n for (lCount = 0; lCount <= 3; lCount++) {\n lByte = (lValue >>> (lCount * 8)) & 255;\n wordToHexValueTemp = '0' + lByte.toString(16);\n wordToHexValue = wordToHexValue + wordToHexValueTemp.substr(wordToHexValueTemp.length - 2, 2);\n }\n return wordToHexValue;\n }\n\n function utf8Encode(string) {\n string = string.replace(/\\r\\n/g, '\\n');\n var utftext = '';\n\n for (var n = 0; n < string.length; n++) {\n var c = string.charCodeAt(n);\n if (c < 128) {\n utftext += String.fromCharCode(c);\n } else if ((c > 127) && (c < 2048)) {\n utftext += String.fromCharCode((c >> 6) | 192);\n utftext += String.fromCharCode((c & 63) | 128);\n } else {\n utftext += String.fromCharCode((c >> 12) | 224);\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n }\n return utftext;\n }\n\n var x = [];\n var k, AA, BB, CC, DD, a, b, c, d;\n var S11 = 7, S12 = 12, S13 = 17, S14 = 22;\n var S21 = 5, S22 = 9, S23 = 14, S24 = 20;\n var S31 = 4, S32 = 11, S33 = 16, S34 = 23;\n var S41 = 6, S42 = 10, S43 = 15, S44 = 21;\n string = utf8Encode(string);\n x = convertToWordArray(string);\n a = 0x67452301;\n b = 0xEFCDAB89;\n c = 0x98BADCFE;\n d = 0x10325476;\n\n for (k = 0; k < x.length; k += 16) {\n AA = a;\n BB = b;\n CC = c;\n DD = d;\n a = gFF(a, b, c, d, x[k + 0], S11, 0xD76AA478);\n d = gFF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);\n c = gFF(c, d, a, b, x[k + 2], S13, 0x242070DB);\n b = gFF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);\n a = gFF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);\n d = gFF(d, a, b, c, x[k + 5], S12, 0x4787C62A);\n c = gFF(c, d, a, b, x[k + 6], S13, 0xA8304613);\n b = gFF(b, c, d, a, x[k + 7], S14, 0xFD469501);\n a = gFF(a, b, c, d, x[k + 8], S11, 0x698098D8);\n d = gFF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);\n c = gFF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);\n b = gFF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);\n a = gFF(a, b, c, d, x[k + 12], S11, 0x6B901122);\n d = gFF(d, a, b, c, x[k + 13], S12, 0xFD987193);\n c = gFF(c, d, a, b, x[k + 14], S13, 0xA679438E);\n b = gFF(b, c, d, a, x[k + 15], S14, 0x49B40821);\n a = gGG(a, b, c, d, x[k + 1], S21, 0xF61E2562);\n d = gGG(d, a, b, c, x[k + 6], S22, 0xC040B340);\n c = gGG(c, d, a, b, x[k + 11], S23, 0x265E5A51);\n b = gGG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);\n a = gGG(a, b, c, d, x[k + 5], S21, 0xD62F105D);\n d = gGG(d, a, b, c, x[k + 10], S22, 0x2441453);\n c = gGG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);\n b = gGG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);\n a = gGG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);\n d = gGG(d, a, b, c, x[k + 14], S22, 0xC33707D6);\n c = gGG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);\n b = gGG(b, c, d, a, x[k + 8], S24, 0x455A14ED);\n a = gGG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);\n d = gGG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);\n c = gGG(c, d, a, b, x[k + 7], S23, 0x676F02D9);\n b = gGG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);\n a = gHH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);\n d = gHH(d, a, b, c, x[k + 8], S32, 0x8771F681);\n c = gHH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);\n b = gHH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);\n a = gHH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);\n d = gHH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);\n c = gHH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);\n b = gHH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);\n a = gHH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);\n d = gHH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);\n c = gHH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);\n b = gHH(b, c, d, a, x[k + 6], S34, 0x4881D05);\n a = gHH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);\n d = gHH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);\n c = gHH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);\n b = gHH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);\n a = gII(a, b, c, d, x[k + 0], S41, 0xF4292244);\n d = gII(d, a, b, c, x[k + 7], S42, 0x432AFF97);\n c = gII(c, d, a, b, x[k + 14], S43, 0xAB9423A7);\n b = gII(b, c, d, a, x[k + 5], S44, 0xFC93A039);\n a = gII(a, b, c, d, x[k + 12], S41, 0x655B59C3);\n d = gII(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);\n c = gII(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);\n b = gII(b, c, d, a, x[k + 1], S44, 0x85845DD1);\n a = gII(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);\n d = gII(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);\n c = gII(c, d, a, b, x[k + 6], S43, 0xA3014314);\n b = gII(b, c, d, a, x[k + 13], S44, 0x4E0811A1);\n a = gII(a, b, c, d, x[k + 4], S41, 0xF7537E82);\n d = gII(d, a, b, c, x[k + 11], S42, 0xBD3AF235);\n c = gII(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);\n b = gII(b, c, d, a, x[k + 9], S44, 0xEB86D391);\n a = addUnsigned(a, AA);\n b = addUnsigned(b, BB);\n c = addUnsigned(c, CC);\n d = addUnsigned(d, DD);\n }\n var temp = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);\n return temp.toLowerCase();\n }\n };\n\n this.Agent = {};\n\n this.getBrowser = function (string) {\n switch (true) {\n case this._Browsers.Edge.test(string):\n this.Agent.isEdge = true;\n return 'Edge';\n case this._Browsers.PhantomJS.test(string):\n this.Agent.isPhantomJS = true;\n return 'PhantomJS';\n case this._Browsers.Konqueror.test(string):\n this.Agent.isKonqueror = true;\n return 'Konqueror';\n case this._Browsers.Amaya.test(string):\n this.Agent.isAmaya = true;\n return 'Amaya';\n case this._Browsers.Epiphany.test(string):\n this.Agent.isEpiphany = true;\n return 'Epiphany';\n case this._Browsers.SeaMonkey.test(string):\n this.Agent.isSeaMonkey = true;\n return 'SeaMonkey';\n case this._Browsers.Flock.test(string):\n this.Agent.isFlock = true;\n return 'Flock';\n case this._Browsers.OmniWeb.test(string):\n this.Agent.isOmniWeb = true;\n return 'OmniWeb';\n case this._Browsers.Opera.test(string):\n this.Agent.isOpera = true;\n return 'Opera';\n case this._Browsers.Chromium.test(string):\n this.Agent.isChrome = true;\n return 'Chromium';\n case this._Browsers.Chrome.test(string):\n this.Agent.isChrome = true;\n return 'Chrome';\n case this._Browsers.Safari.test(string):\n this.Agent.isSafari = true;\n return 'Safari';\n case this._Browsers.WinJs.test(string):\n this.Agent.isWinJs = true;\n return 'WinJs';\n case this._Browsers.IE.test(string):\n this.Agent.isIE = true;\n return 'IE';\n case this._Browsers.PS3.test(string):\n return 'ps3';\n case this._Browsers.PSP.test(string):\n return 'psp';\n case this._Browsers.Firefox.test(string):\n this.Agent.isFirefox = true;\n return 'Firefox';\n case this._Browsers.UC.test(string):\n this.Agent.isUC = true;\n return 'UCBrowser';\n default:\n // If the UA does not start with Mozilla guess the user agent.\n if (string.indexOf('Mozilla') !== 0 && /^([\\d\\w\\-\\.]+)\\/[\\d\\w\\.\\-]+/i.test(string)) {\n this.Agent.isAuthoritative = false;\n return RegExp.$1;\n }\n return 'unknown';\n }\n };\n\n this.getBrowserVersion = function (string) {\n var regex;\n switch (this.Agent.browser) {\n case 'Edge':\n if (this._Versions.Edge.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'PhantomJS':\n if (this._Versions.PhantomJS.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'Chrome':\n if (this._Versions.Chrome.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'Chromium':\n if (this._Versions.Chromium.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'Safari':\n if (this._Versions.Safari.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'Opera':\n if (this._Versions.Opera.test(string)) {\n return RegExp.$1 ? RegExp.$1 : RegExp.$2;\n }\n break;\n case 'Firefox':\n if (this._Versions.Firefox.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'WinJs':\n if (this._Versions.WinJs.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'IE':\n if (this._Versions.IE.test(string)) {\n return RegExp.$2 ? RegExp.$2 : RegExp.$1;\n }\n break;\n case 'ps3':\n if (this._Versions.Ps3.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'psp':\n if (this._Versions.Psp.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'Amaya':\n if (this._Versions.Amaya.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'Epiphany':\n if (this._Versions.Epiphany.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'SeaMonkey':\n if (this._Versions.SeaMonkey.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'Flock':\n if (this._Versions.Flock.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'OmniWeb':\n if (this._Versions.OmniWeb.test(string)) {\n return RegExp.$1;\n }\n break;\n case 'UCBrowser':\n if (this._Versions.UC.test(string)) {\n return RegExp.$1;\n }\n break;\n default:\n if (this.Agent.browser !== 'unknown') {\n regex = new RegExp(this.Agent.browser + '[\\\\/ ]([\\\\d\\\\w\\\\.\\\\-]+)', 'i');\n if (regex.test(string)) {\n return RegExp.$1;\n }\n }\n }\n };\n\n this.getOS = function (string) {\n switch (true) {\n case this._OS.WindowsVista.test(string):\n this.Agent.isWindows = true;\n return 'Windows Vista';\n case this._OS.Windows7.test(string):\n this.Agent.isWindows = true;\n return 'Windows 7';\n case this._OS.Windows8.test(string):\n this.Agent.isWindows = true;\n return 'Windows 8';\n case this._OS.Windows81.test(string):\n this.Agent.isWindows = true;\n return 'Windows 8.1';\n case this._OS.Windows10.test(string):\n this.Agent.isWindows = true;\n return 'Windows 10.0';\n case this._OS.Windows2003.test(string):\n this.Agent.isWindows = true;\n return 'Windows 2003';\n case this._OS.WindowsXP.test(string):\n this.Agent.isWindows = true;\n return 'Windows XP';\n case this._OS.Windows2000.test(string):\n this.Agent.isWindows = true;\n return 'Windows 2000';\n case this._OS.WindowsPhone8.test(string):\n return 'Windows Phone 8';\n case this._OS.Linux64.test(string):\n this.Agent.isLinux = true;\n this.Agent.isLinux64 = true;\n return 'Linux 64';\n case this._OS.Linux.test(string):\n this.Agent.isLinux = true;\n return 'Linux';\n case this._OS.ChromeOS.test(string):\n this.Agent.isChromeOS = true;\n return 'Chrome OS';\n case this._OS.Wii.test(string):\n return 'Wii';\n case this._OS.PS3.test(string):\n return 'Playstation';\n case this._OS.PSP.test(string):\n return 'Playstation';\n case this._OS.OSXCheetah.test(string):\n this.Agent.isMac = true;\n return 'OS X Cheetah';\n case this._OS.OSXPuma.test(string):\n this.Agent.isMac = true;\n return 'OS X Puma';\n case this._OS.OSXJaguar.test(string):\n this.Agent.isMac = true;\n return 'OS X Jaguar';\n case this._OS.OSXPanther.test(string):\n this.Agent.isMac = true;\n return 'OS X Panther';\n case this._OS.OSXTiger.test(string):\n this.Agent.isMac = true;\n return 'OS X Tiger';\n case this._OS.OSXLeopard.test(string):\n this.Agent.isMac = true;\n return 'OS X Leopard';\n case this._OS.OSXSnowLeopard.test(string):\n this.Agent.isMac = true;\n return 'OS X Snow Leopard';\n case this._OS.OSXLion.test(string):\n this.Agent.isMac = true;\n return 'OS X Lion';\n case this._OS.OSXMountainLion.test(string):\n this.Agent.isMac = true;\n return 'OS X Mountain Lion';\n case this._OS.OSXMavericks.test(string):\n this.Agent.isMac = true;\n return 'OS X Mavericks';\n case this._OS.OSXYosemite.test(string):\n this.Agent.isMac = true;\n return 'OS X Yosemite';\n case this._OS.OSXElCapitan.test(string):\n this.Agent.isMac = true;\n return 'OS X El Capitan';\n case this._OS.OSXSierra.test(string):\n this.Agent.isMac = true;\n return 'macOS Sierra';\n case this._OS.Mac.test(string):\n this.Agent.isMac = true;\n return 'OS X';\n case this._OS.iPad.test(string):\n this.Agent.isiPad = true;\n return string.match(this._OS.iPad)[0].replace('_', '.');\n case this._OS.iPhone.test(string):\n this.Agent.isiPhone = true;\n return string.match(this._OS.iPhone)[0].replace('_', '.');\n case this._OS.Bada.test(string):\n this.Agent.isBada = true;\n return 'Bada';\n case this._OS.Curl.test(string):\n this.Agent.isCurl = true;\n return 'Curl';\n default:\n return 'unknown';\n }\n };\n\n this.getPlatform = function (string) {\n switch (true) {\n case this._Platform.Windows.test(string):\n return 'Microsoft Windows';\n case this._Platform.WindowsPhone.test(string):\n this.Agent.isWindowsPhone = true;\n return 'Microsoft Windows Phone';\n case this._Platform.Mac.test(string):\n return 'Apple Mac';\n case this._Platform.Curl.test(string):\n return 'Curl';\n case this._Platform.Android.test(string):\n this.Agent.isAndroid = true;\n return 'Android';\n case this._Platform.Blackberry.test(string):\n this.Agent.isBlackberry = true;\n return 'Blackberry';\n case this._Platform.Linux.test(string):\n return 'Linux';\n case this._Platform.Wii.test(string):\n return 'Wii';\n case this._Platform.Playstation.test(string):\n return 'Playstation';\n case this._Platform.iPad.test(string):\n this.Agent.isiPad = true;\n return 'iPad';\n case this._Platform.iPod.test(string):\n this.Agent.isiPod = true;\n return 'iPod';\n case this._Platform.iPhone.test(string):\n this.Agent.isiPhone = true;\n return 'iPhone';\n case this._Platform.Samsung.test(string):\n this.Agent.isiSamsung = true;\n return 'Samsung';\n default:\n return 'unknown';\n }\n };\n\n this.testCompatibilityMode = function () {\n var ua = this;\n if (this.Agent.isIE) {\n if (/Trident\\/(\\d)\\.0/i.test(ua.Agent.source)) {\n var tridentVersion = parseInt(RegExp.$1, 10);\n var version = parseInt(ua.Agent.version, 10);\n if (version === 7 && tridentVersion === 7) {\n ua.Agent.isIECompatibilityMode = true;\n ua.Agent.version = 11.0;\n }\n\n if (version === 7 && tridentVersion === 6) {\n ua.Agent.isIECompatibilityMode = true;\n ua.Agent.version = 10.0;\n }\n\n if (version === 7 && tridentVersion === 5) {\n ua.Agent.isIECompatibilityMode = true;\n ua.Agent.version = 9.0;\n }\n\n if (version === 7 && tridentVersion === 4) {\n ua.Agent.isIECompatibilityMode = true;\n ua.Agent.version = 8.0;\n }\n }\n }\n };\n\n this.testSilk = function () {\n var ua = this;\n switch (true) {\n case new RegExp('silk', 'gi').test(ua.Agent.source):\n this.Agent.isSilk = true;\n break;\n default:\n }\n\n if (/Silk-Accelerated=true/gi.test(ua.Agent.source)) {\n this.Agent.SilkAccelerated = true;\n }\n return this.Agent.isSilk ? 'Silk' : false;\n };\n\n this.testKindleFire = function () {\n var ua = this;\n switch (true) {\n case /KFOT/gi.test(ua.Agent.source):\n this.Agent.isKindleFire = true;\n return 'Kindle Fire';\n case /KFTT/gi.test(ua.Agent.source):\n this.Agent.isKindleFire = true;\n return 'Kindle Fire HD';\n case /KFJWI/gi.test(ua.Agent.source):\n this.Agent.isKindleFire = true;\n return 'Kindle Fire HD 8.9';\n case /KFJWA/gi.test(ua.Agent.source):\n this.Agent.isKindleFire = true;\n return 'Kindle Fire HD 8.9 4G';\n case /KFSOWI/gi.test(ua.Agent.source):\n this.Agent.isKindleFire = true;\n return 'Kindle Fire HD 7';\n case /KFTHWI/gi.test(ua.Agent.source):\n this.Agent.isKindleFire = true;\n return 'Kindle Fire HDX 7';\n case /KFTHWA/gi.test(ua.Agent.source):\n this.Agent.isKindleFire = true;\n return 'Kindle Fire HDX 7 4G';\n case /KFAPWI/gi.test(ua.Agent.source):\n this.Agent.isKindleFire = true;\n return 'Kindle Fire HDX 8.9';\n case /KFAPWA/gi.test(ua.Agent.source):\n this.Agent.isKindleFire = true;\n return 'Kindle Fire HDX 8.9 4G';\n default:\n return false;\n }\n };\n\n this.testCaptiveNetwork = function () {\n var ua = this;\n switch (true) {\n case /CaptiveNetwork/gi.test(ua.Agent.source):\n ua.Agent.isCaptive = true;\n ua.Agent.isMac = true;\n ua.Agent.platform = 'Apple Mac';\n return 'CaptiveNetwork';\n default:\n return false;\n }\n };\n\n this.testMobile = function testMobile() {\n var ua = this;\n switch (true) {\n case ua.Agent.isWindows:\n case ua.Agent.isLinux:\n case ua.Agent.isMac:\n case ua.Agent.isChromeOS:\n ua.Agent.isDesktop = true;\n break;\n case ua.Agent.isAndroid:\n case ua.Agent.isSamsung:\n ua.Agent.isMobile = true;\n ua.Agent.isDesktop = false;\n break;\n default:\n }\n switch (true) {\n case ua.Agent.isiPad:\n case ua.Agent.isiPod:\n case ua.Agent.isiPhone:\n case ua.Agent.isBada:\n case ua.Agent.isBlackberry:\n case ua.Agent.isAndroid:\n case ua.Agent.isWindowsPhone:\n ua.Agent.isMobile = true;\n ua.Agent.isDesktop = false;\n break;\n default:\n }\n if (/mobile/i.test(ua.Agent.source)) {\n ua.Agent.isMobile = true;\n ua.Agent.isDesktop = false;\n }\n };\n\n this.testTablet = function testTablet() {\n var ua = this;\n switch (true) {\n case ua.Agent.isiPad:\n case ua.Agent.isAndroidTablet:\n case ua.Agent.isKindleFire:\n ua.Agent.isTablet = true;\n break;\n }\n if (/tablet/i.test(ua.Agent.source)) {\n ua.Agent.isTablet = true;\n }\n };\n\n this.testNginxGeoIP = function testNginxGeoIP(headers) {\n var ua = this;\n Object.keys(headers).forEach(function (key) {\n if (/^GEOIP/i.test(key)) {\n ua.Agent.geoIp[key] = headers[key];\n }\n });\n };\n\n this.testBot = function testBot() {\n var ua = this;\n var isBot = IS_BOT_REGEXP.exec(ua.Agent.source.toLowerCase());\n if (isBot) {\n ua.Agent.isBot = isBot[1];\n } else if (!ua.Agent.isAuthoritative) {\n // Test unauthoritative parse for `bot` in UA to flag for bot\n ua.Agent.isBot = /bot/i.test(ua.Agent.source);\n }\n };\n\n this.testSmartTV = function testBot() {\n var ua = this;\n var isSmartTV = new RegExp('smart-tv|smarttv|googletv|appletv|hbbtv|pov_tv|netcast.tv', 'gi').exec(ua.Agent.source.toLowerCase());\n if (isSmartTV) {\n ua.Agent.isSmartTV = isSmartTV[1];\n }\n };\n\n this.testAndroidTablet = function testAndroidTablet() {\n var ua = this;\n if (ua.Agent.isAndroid && !/mobile/i.test(ua.Agent.source)) {\n ua.Agent.isAndroidTablet = true;\n }\n };\n\n this.testTouchSupport = function () {\n var ua = this;\n ua.Agent.isTouchScreen = (('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0));\n };\n\n this.getLaguage = function () {\n var ua = this;\n ua.Agent.language = (navigator.language || navigator.userLanguage || navigator.browserLanguage || navigator.systemLanguage || '').toLowerCase();\n };\n\n this.getColorDepth = function () {\n var ua = this;\n ua.Agent.colorDepth = screen.colorDepth || -1;\n };\n\n this.getScreenResolution = function () {\n var ua = this;\n ua.Agent.resolution = [screen.availWidth, screen.availHeight];\n };\n\n this.getPixelDepth = function () {\n var ua = this;\n ua.Agent.pixelDepth = screen.pixelDepth || -1;\n };\n\n this.getCPU = function () {\n var ua = this;\n ua.Agent.cpuCores = navigator.hardwareConcurrency || -1;\n };\n\n this.reset = function reset() {\n var ua = this;\n for (var key in ua.DefaultAgent) {\n if (ua.DefaultAgent.hasOwnProperty(key)) {\n ua.Agent[key] = ua.DefaultAgent[key];\n }\n }\n return ua;\n };\n\n this.parse = function get(source) {\n source = source || navigator.userAgent;\n var ua = new DeviceUUID();\n ua.Agent.source = source.replace(/^\\s*/, '').replace(/\\s*$/, '');\n ua.Agent.os = ua.getOS(ua.Agent.source);\n ua.Agent.platform = ua.getPlatform(ua.Agent.source);\n ua.Agent.browser = ua.getBrowser(ua.Agent.source);\n ua.Agent.version = ua.getBrowserVersion(ua.Agent.source);\n ua.testBot();\n ua.testSmartTV();\n ua.testMobile();\n ua.testAndroidTablet();\n ua.testTablet();\n ua.testCompatibilityMode();\n ua.testSilk();\n ua.testKindleFire();\n ua.testCaptiveNetwork();\n ua.testTouchSupport();\n ua.getLaguage();\n ua.getColorDepth();\n ua.getPixelDepth();\n ua.getScreenResolution();\n ua.getCPU();\n return ua.Agent;\n };\n\n this.get = function (customData) {\n var pref = 'a', du = this.parse();\n var dua = [];\n for (var key in this.options) {\n if (this.options.hasOwnProperty(key) && this.options[key] === true) {\n dua.push(du[key]);\n }\n }\n if (customData) {\n dua.push(customData);\n }\n if (!this.options.resolution && du.isMobile) {\n dua.push(du.resolution);\n }\n // 8, 9, a, b\n pref = 'b';\n var tmpUuid = du.hashMD5(dua.join(':'));\n var uuid = [\n tmpUuid.slice(0,8),\n tmpUuid.slice(8,12),\n '4' + tmpUuid.slice(12,15),\n pref + tmpUuid.slice(15,18),\n tmpUuid.slice(20)\n ];\n return uuid.join('-');\n };\n\n this.Agent = this.DefaultAgent;\n return this;\n };\n\n exports.DeviceUUID = DeviceUUID;\n return new DeviceUUID(navigator.userAgent);\n\n})(this);\n"],"names":[],"sourceRoot":""}