"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isWindows = exports.isIPhoneX = exports.isMobile = void 0;
/*
 * 判断是否是移动端。
 * 兼容场景：pc端但是使用mobile配置。
 */
const common_1 = require("../common");
function isMobile(device) {
    if (device === common_1.DeviceType.MOBILE) {
        return true;
    }
    return /(?:iPhone|iPad|SymbianOS|Windows Phone|iPod|iOS|Android|Mobile|Phone|Tablet)/i.test(navigator.userAgent);
}
exports.isMobile = isMobile;
function isIPhoneX() {
    // eslint-disable-next-line no-restricted-globals
    return (/iPhone/gi.test(navigator.userAgent) &&
        window.screen.height === 812 &&
        window.screen.width === 375);
}
exports.isIPhoneX = isIPhoneX;
function isWindows() {
    return /windows/i.test(navigator.userAgent);
}
exports.isWindows = isWindows;
//# sourceMappingURL=is-mobile.js.map