"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=canIUse;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_version=_interopRequireDefault(require("./version")),_compareVersion=_interopRequireDefault(require("./utils/compareVersion")),_index=_interopRequireDefault(require("./index")),u=navigator&&navigator.userAgent||"",isAndroid=function(){return u.indexOf("Android")>-1||u.indexOf("Adr")>-1},isiOS=function(){return!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)},isWindows=function(){return/(windows)/i.test(navigator.userAgent)};function canIUse(e){return _canIUse.apply(this,arguments)}function _canIUse(){return(_canIUse=(0,_asyncToGenerator2.default)(_regenerator.default.mark((function e(r){var n,t,i,u;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_index.default[r]){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,(0,_version.default)();case 4:return n=e.sent,t=n.version,i=_index.default[r].version,u=isAndroid()?"android":isiOS()?"ios":isWindows()?"pc":"unknown",e.abrupt("return",!(!i||!i[u])&&(0,_compareVersion.default)(t,i[u])>0);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}module.exports=exports.default,module.exports.default=exports.default;