var m = !1, i, d, c, o, t, w, u, f, s, l, b, p, _, F, A;
function r() {
  if (!m) {
    m = !0;
    var n = navigator.userAgent, e = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(n), a = /(Mac OS X)|(Windows)|(Linux)/.exec(n);
    if (p = /\b(iPhone|iP[ao]d)/.exec(n), _ = /\b(iP[ao]d)/.exec(n), l = /Android/i.exec(n), F = /FBAN\/\w+;/i.exec(n), A = /Mobile/i.exec(n), b = !!/Win64/.exec(n), e) {
      i = e[1] ? parseFloat(e[1]) : e[5] ? parseFloat(e[5]) : NaN, i && document && document.documentMode && (i = document.documentMode);
      var v = /(?:Trident\/(\d+.\d+))/.exec(n);
      w = v ? parseFloat(v[1]) + 4 : i, d = e[2] ? parseFloat(e[2]) : NaN, c = e[3] ? parseFloat(e[3]) : NaN, o = e[4] ? parseFloat(e[4]) : NaN, o ? (e = /(?:Chrome\/(\d+\.\d+))/.exec(n), t = e && e[1] ? parseFloat(e[1]) : NaN) : t = NaN;
    } else
      i = d = c = t = o = NaN;
    if (a) {
      if (a[1]) {
        var N = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(n);
        u = N ? parseFloat(N[1].replace("_", ".")) : !0;
      } else
        u = !1;
      f = !!a[2], s = !!a[3];
    } else
      u = f = s = !1;
  }
}
var x = {
  /**
   *  Check if the UA is Internet Explorer.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  ie: function() {
    return r() || i;
  },
  /**
   * Check if we're in Internet Explorer compatibility mode.
   *
   * @return bool true if in compatibility mode, false if
   * not compatibility mode or not ie
   */
  ieCompatibilityMode: function() {
    return r() || w > i;
  },
  /**
   * Whether the browser is 64-bit IE.  Really, this is kind of weak sauce;  we
   * only need this because Skype can't handle 64-bit IE yet.  We need to remove
   * this when we don't need it -- tracked by #601957.
   */
  ie64: function() {
    return x.ie() && b;
  },
  /**
   *  Check if the UA is Firefox.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  firefox: function() {
    return r() || d;
  },
  /**
   *  Check if the UA is Opera.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  opera: function() {
    return r() || c;
  },
  /**
   *  Check if the UA is WebKit.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  webkit: function() {
    return r() || o;
  },
  /**
   *  For Push
   *  WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
   */
  safari: function() {
    return x.webkit();
  },
  /**
   *  Check if the UA is a Chrome browser.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  chrome: function() {
    return r() || t;
  },
  /**
   *  Check if the user is running Windows.
   *
   *  @return bool `true' if the user's OS is Windows.
   */
  windows: function() {
    return r() || f;
  },
  /**
   *  Check if the user is running Mac OS X.
   *
   *  @return float|bool   Returns a float if a version number is detected,
   *                       otherwise true/false.
   */
  osx: function() {
    return r() || u;
  },
  /**
   * Check if the user is running Linux.
   *
   * @return bool `true' if the user's OS is some flavor of Linux.
   */
  linux: function() {
    return r() || s;
  },
  /**
   * Check if the user is running on an iPhone or iPod platform.
   *
   * @return bool `true' if the user is running some flavor of the
   *    iPhone OS.
   */
  iphone: function() {
    return r() || p;
  },
  mobile: function() {
    return r() || p || _ || l || A;
  },
  nativeApp: function() {
    return r() || F;
  },
  android: function() {
    return r() || l;
  },
  ipad: function() {
    return r() || _;
  }
}, E = x;
export {
  E as U
};
