1 | {"version":3,"file":"osDetector.js","sourceRoot":"../src/","sources":["osDetector.ts"],"names":[],"mappings":";;AAAA,6CAA4C;AAE5C,IAAI,WAAgC,CAAC;AAErC;;;GAGG;AACH,SAAgB,KAAK,CAAC,KAAe;IACnC,IAAI,OAAO,WAAW,KAAK,WAAW,IAAI,KAAK,EAAE;QAC/C,IAAM,GAAG,GAAG,qBAAS,EAAE,CAAC;QACxB,IAAM,SAAS,GAAG,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC;QAEjD,WAAW,GAAG,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;KACpE;IACD,OAAO,CAAC,CAAC,WAAW,CAAC;AACvB,CAAC;AARD,sBAQC","sourcesContent":["import { getWindow } from './dom/getWindow';\n\nlet isMacResult: boolean | undefined;\n\n/**\n * Returns true if the user is on a Mac. Caches the result value.\n * @param reset - Reset the cached result value (mainly for testing).\n */\nexport function isMac(reset?: boolean): boolean {\n if (typeof isMacResult === 'undefined' || reset) {\n const win = getWindow();\n const userAgent = win && win.navigator.userAgent;\n\n isMacResult = !!userAgent && userAgent.indexOf('Macintosh') !== -1;\n }\n return !!isMacResult;\n}\n"]} |