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ASC,KAAKD,EAHgB,EAIzCS,QAAS,SAACT,GAAgC,YAAhC,IAAAA,IAAAA,EAAQd,UAAUM,WAAc,YAAYS,KAAKD,EAAjB,EAE1CU,IAAK,WAAM,OAAAC,OAAOC,WAAW,sBAAsBC,OAAxC,EACXC,eAAgB,WAAM,OAAAH,OAAOC,WAAW,8BAA8BC,OAAhD,GAUvB,S","sources":["webpack://forca/./Static/react/utils/isMobile.ts"],"sourcesContent":["/*\r\n * Project: forca\r\n * File Created: Wednesday, 15th December 2021 2:45:38 pm\r\n * Author: Teodor Moquist (teodor@moquist.dk)\r\n */\r\n\r\nexport const isUsingClientHints = 'userAgentData' in navigator;\r\n\r\nexport const getIOSVersion = (majorOnly = false) => {\r\n\tif (isMobile.iOS()) {\r\n\t\tconst extract = navigator.userAgent.match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\r\n\r\n\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n\t\t// @ts-ignore\r\n\t\tconst major = parseInt(extract[1] || 0, 10);\r\n\r\n\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n\t\t// @ts-ignore\r\n\t\tconst minner = parseInt(extract[2] || 0, 10);\r\n\r\n\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n\t\t// @ts-ignore\r\n\t\tconst patch = parseInt(extract[3] || 0, 10);\r\n\r\n\t\tif (majorOnly) {\r\n\t\t\treturn Number(`${major}`);\r\n\t\t}\r\n\r\n\t\treturn Number(`${major}${minner}${patch}`);\r\n\t}\r\n\r\n\tif (majorOnly) {\r\n\t\treturn Number('0');\r\n\t}\r\n\r\n\treturn Number('000');\r\n};\r\n\r\nexport const isMobile = {\r\n\tandroid: (agent = navigator.userAgent) => /android/i.test(agent),\r\n\tblackBerry: (agent = navigator.userAgent) => /blackberry/i.test(agent),\r\n\tiOS: (agent = navigator.userAgent) => /iphone|ipod|ipad/i.test(agent),\r\n\tiOSVersionOrHigher: (version: number, majorOnly = false) => getIOSVersion(majorOnly) >= version,\r\n\tiOSVersionOrLower: (version: number, majorOnly = false) => getIOSVersion(majorOnly) <= version && getIOSVersion(majorOnly) > 0,\r\n\tiOSVersion: (version: number, majorOnly = false) => getIOSVersion(majorOnly) === version,\r\n\topera: (agent = navigator.userAgent) => /opera mini/i.test(agent),\r\n\t// see https://developer.chrome.com/docs/multidevice/user-agent/ for details\r\n\tsafari: (agent = navigator.userAgent) => /safari/i.test(agent)\r\n && !/chrome/i.test(agent)\r\n && !/CriOS/i.test(agent)\r\n && !/FxiOS/i.test(agent),\r\n\twindows: (agent = navigator.userAgent) => /iemobile/i.test(agent),\r\n\t// iPad uses 810 so we need to handle that.\r\n\tany: () => window.matchMedia('(max-width: 810px)').matches,\r\n\tstandaloneMode: () => window.matchMedia('(display-mode: standalone)').matches\r\n};\r\n\r\n// https://medium.com/@galmeiri/get-ready-for-chrome-user-agent-string-phase-out-c6840da1c31e\r\nexport const isMobileClientHints = {\r\n\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n\t// @ts-ignore\r\n\tgetDeviceData: () => navigator.userAgentData.getHighEntropyValues(['platform', 'model'])\r\n};\r\n\r\nexport default isMobile;"],"names":["navigator","getIOSVersion","majorOnly","isMobile","iOS","extract","userAgent","match","major","parseInt","minner","patch","Number","android","agent","test","blackBerry","iOSVersionOrHigher","version","iOSVersionOrLower","iOSVersion","opera","safari","windows","any","window","matchMedia","matches","standaloneMode"],"sourceRoot":""}