1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
|
(function(){'use strict';function a(a){return a+="",a.charAt(0).toUpperCase()+a.slice(1)}function b(a,b,c){var e={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return b&&c&&/^Win/i.test(a)&&!/^Windows Phone /i.test(a)&&(e=e[/[\d.]+$/.exec(a)])&&(a="Windows "+e),a+="",b&&c&&(a=a.replace(RegExp(b,"i"),c)),a=d(a.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),a}function c(a,b){var c=-1,d=a?a.length:0;if("number"==typeof d&&-1<d&&d<=9007199254740991)for(;++c<d;)b(a[c],c,a);else e(a,b)}function d(b){return b=j(b),/^(?:webOS|i(?:OS|P))/.test(b)?b:a(b)}function e(a,b){for(var c in a)v.call(a,c)&&b(a[c],c,a)}function f(b){return null==b?a(b):w.call(b).slice(8,-1)}function g(a,b){var c=null==a?"number":typeof a[b];return!/^(?:boolean|number|string|undefined)$/.test(c)&&("object"!=c||!!a[b])}function h(a){return(a+"").replace(/([ -])(?!$)/g,"$1?")}function i(a,b){var d=null;return c(a,function(c,e){d=b(d,c,e,a)}),d}function j(a){return(a+"").replace(/^ +| +$/g,"")}function k(a){function c(b){return i(b,function(b,c){var e=c.pattern||h(c);return!b&&(b=RegExp("\\b"+e+" *\\d+[.\\w_]*","i").exec(a)||RegExp("\\b"+e+" *\\w+-[\\w]*","i").exec(a)||RegExp("\\b"+e+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(a))&&((b=((c.label&&!RegExp(e,"i").test(c.label)?c.label:b)+"").split("/"))[1]&&!/[\d.]+/.test(b[0])&&(b[0]+=" "+b[1]),c=c.label||c,b=d(b[0].replace(RegExp(e,"i"),c).replace(RegExp("; *(?:"+c+"[_-])?","i")," ").replace(RegExp("("+c+")[-_.]?(\\w)","i"),"$1 $2"))),b})}function l(b){return i(b,function(b,c){return b||(RegExp(c+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(a)||0)[1]||null})}var n=m,o=a&&"object"==typeof a&&"String"!=f(a);o&&(n=a,a=null);var p=n.navigator||{},q=p.userAgent||"";a||(a=q);var r,t,u=o?!!p.likeChrome:/\bChrome\b/.test(a)&&!/internal|\n/i.test(w.toString()),v="Object",x=o?v:"ScriptBridgingProxyObject",y=o?v:"Environment",z=o&&n.java?"JavaPackage":f(n.java),A=o?v:"RuntimeObject",B=/\bJava/.test(z)&&n.java,C=B&&f(n.environment)==y,D=B?"a":"\u03B1",E=B?"b":"\u03B2",F=n.document||{},G=n.operamini||n.opera,H=s.test(H=o&&G?G["[[Class]]"]:f(G))?H:G=null,I=a,J=[],K=null,L=a==q,M=L&&G&&"function"==typeof G.version&&G.version(),N=function(b){return i(b,function(b,c){return b||RegExp("\\b"+(c.pattern||h(c))+"\\b","i").exec(a)&&(c.label||c)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),O=function(b){return i(b,function(b,c){return b||RegExp("\\b"+(c.pattern||h(c))+"\\b","i").exec(a)&&(c.label||c)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),P=c([{label:"BlackBerry",
|