"use strict";

Liferay.Loader.define("@frontend-taglib-clay$clayui/shared@3.89.0/lib/platform", ['module', 'exports', 'require'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.isAppleDevice = isAppleDevice;
    exports.isIOS = isIOS;
    exports.isIPad = isIPad;
    exports.isIPhone = isIPhone;
    exports.isMac = isMac;

    /**
     * SPDX-FileCopyrightText: © 2022 Liferay, Inc. <https://liferay.com>
     * SPDX-License-Identifier: BSD-3-Clause
     */
    function testPlatform(re) {
      var _window$navigator$use;

      return typeof window !== 'undefined' && window.navigator != null ? re.test( // @ts-ignore
      ((_window$navigator$use = window.navigator['userAgentData']) === null || _window$navigator$use === void 0 ? void 0 : _window$navigator$use.platform) || window.navigator.platform) : false;
    }

    function isMac() {
      return testPlatform(/^Mac/i);
    }

    function isIPhone() {
      return testPlatform(/^iPhone/i);
    }

    function isIPad() {
      return testPlatform(/^iPad/i) || isMac() && navigator.maxTouchPoints > 1;
    }

    function isIOS() {
      return isIPhone() || isIPad();
    }

    function isAppleDevice() {
      return isMac() || isIOS();
    }
  }
});
//# sourceMappingURL=platform.js.map