text: /*
  Copyright (c) 2015 NAVER Corp.
  name: @egjs/agent
  license: MIT
  author: NAVER Corp.
  repository: git+https://github.com/naver/agent.git
  version: 2.3.0
  */
  !function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):((e="undefined"!=typeof globalThis?globalThis:e||self).eg=e.eg||{},e.eg.agent=i())}(this,function(){"use strict";function w(e,i){for(var r=e.length,n=0;n<r;++n)if(i(e[n],n))return!0;return!1}function f(e,i){for(var r=e.length,n=0;n<r;++n)if(i(e[n],n))return e[n];return null}function t(e,i){try{return new RegExp(e,"g").exec(i)}catch(e){return null}}function i(){if("undefined"==typeof navigator||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,i=e.brands||e.uaList;return!(!i||!i.length)}function c(e){return e.replace(/_/g,".")}function b(e,r){var n=null,o="-1";return w(e,function(e){var i=t("("+e.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",r);return!(!i||e.brand)&&(n=e,o=i[3]||"-1",e.versionAlias?o=e.versionAlias:e.versionTest&&(o=function(e,i){var r=t("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",i);return r?r[3]:""}(e.versionTest.toLowerCase(),r)||o),o=c(o),!0)}),{preset:n,version:o}}function p(e,r){var n={brand:"",version:"-1"};return w(e,function(e){var i=l(r,e);return!!i&&(n.brand=e.id,n.version=e.versionAlias||i.version,"-1"!==n.version)}),n}function l(e,r){return f(e,function(e){var i=e.brand;return t(""+r.test,i.toLowerCase())})}var g=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],h=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],V=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],k=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],x=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"mac os x",id:"mac"},{test:"android",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function n(e){var i=navigator.userAgentData,r=(i.uaList||i.brands).slice(),n=i.mobile||!1,o=r[0],t={name:o.brand,version:o.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!p(k,r).brand},s={name:"unknown",version:"-1",majorVersion:-1};t.webkit=!t.chromium&&w(V,function(e){return l(r,e)});var a=p(h,r);if(t.chromium=!!a.brand,t.chromiumVersion=a.version,!t.chromium){var u=p(V,r);t.webkit=!!u.brand,t.webkitVersion=u.version}if(e){var d=e.platform.toLowerCase(),v=f(x,function(e){return new RegExp(""+e.test,"g").exec(d)});s.name=v?v.id:d,s.version=e.platformVersion}var m=p(g,r);return m.brand&&(t.name=m.brand,t.version=e?e.uaFullVersion:m.version),"Linux armv8l"===navigator.platform?s.name="android":t.webkit&&(s.name=n?"ios":"mac"),"ios"===s.name&&t.webview&&(t.version="-1"),s.version=c(s.version),t.version=c(t.version),s.majorVersion=parseInt(s.version,10),t.majorVersion=parseInt(t.version,10),{browser:t,os:s,isMobile:n,isHints:!0}}function r(e){var i=function(e){var i=e;if(void 0===i){if("undefined"==typeof navigator||!navigator)return"";i=navigator.userAgent||""}return i.toLowerCase()}(e),r=!!/mobi/g.exec(i),n={name:"unknown",version:"-1",majorVersion:-1,webview:!!b(k,i).preset,chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},o={name:"unknown",version:"-1",majorVersion:-1},t=b(g,i),s=t.preset,a=t.version,u=b(x,i),d=u.preset,v=u.version,m=b(h,i);if(n.chromium=!!m.preset,n.chromiumVersion=m.version,!n.chromium){var w=b(V,i);n.webkit=!!w.preset,n.webkitVersion=w.version}return d&&(o.name=d.id,o.version=v,o.majorVersion=parseInt(v,10)),s&&(n.name=s.id,n.version=a,n.webview&&"ios"===o.name&&"safari"!==n.name&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:o,isMobile:r,isHints:!1}}function e(e){return void 0===e&&i()?n():r(e)}var o={__proto__:null,getAccurateAgent:function(r){return i()?navigator.userAgentData.getHighEntropyValues(["architecture","model","platform","platformVersion","uaFullVersion"]).then(function(e){var i=n(e);return r&&r(i),i}):(r&&r(e()),"undefined"!=typeof Promise&&Promise?Promise.resolve(e()):null)},default:e};for(var s in o)e[s]=o[s];return e});
  //# sourceMappingURL=agent.min.js.map
  