/*! JSON v3.3.2 | http://bestiejs.github.io/json3 | Copyright 2012-2014, Kit Cambridge | http://kit.mit-license.org */
(function(){function N(p,r){function q(a){if(q[a]!==w)return q[a];var c;if("bug-string-char-index"==a)c="a"!="a"[0];else if("json"==a)c=q("json-stringify")&&q("json-parse");else{var e;if("json-stringify"==a){c=r.stringify;var b="function"==typeof c&&s;if(b){(e=function(){return 1}).toJSON=e;try{b="0"===c(0)&&"0"===c(new t)&&'""'==c(new A)&&c(u)===w&&c(w)===w&&c()===w&&"1"===c(e)&&"[1]"==c([e])&&"[null]"==c([w])&&"null"==c(null)&&"[null,null,null]"==c([w,u,null])&&'{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}'==
c({a:[e,!0,!1,null,"\x00\b\n\f\r\t"]})&&"1"===c(null,e)&&"[\n 1,\n 2\n]"==c([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==c(new C(-864E13))&&'"+275760-09-13T00:00:00.000Z"'==c(new C(864E13))&&'"-000001-01-01T00:00:00.000Z"'==c(new C(-621987552E5))&&'"1969-12-31T23:59:59.999Z"'==c(new C(-1))}catch(f){b=!1}}c=b}if("json-parse"==a){c=r.parse;if("function"==typeof c)try{if(0===c("0")&&!c(!1)){e=c('{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}');var n=5==e.a.length&&1===e.a[0];if(n){try{n=!c('"\t"')}catch(d){}if(n)try{n=
1!==c("01")}catch(g){}if(n)try{n=1!==c("1.")}catch(m){}}}}catch(X){n=!1}c=n}}return q[a]=!!c}p||(p=k.Object());r||(r=k.Object());var t=p.Number||k.Number,A=p.String||k.String,H=p.Object||k.Object,C=p.Date||k.Date,G=p.SyntaxError||k.SyntaxError,K=p.TypeError||k.TypeError,L=p.Math||k.Math,I=p.JSON||k.JSON;"object"==typeof I&&I&&(r.stringify=I.stringify,r.parse=I.parse);var H=H.prototype,u=H.toString,v,B,w,s=new C(-0xc782b5b800cec);try{s=-109252==s.getUTCFullYear()&&0===s.getUTCMonth()&&1===s.getUTCDate()&&
10==s.getUTCHours()&&37==s.getUTCMinutes()&&6==s.getUTCSeconds()&&708==s.getUTCMilliseconds()}catch(Q){}if(!q("json")){var D=q("bug-string-char-index");if(!s)var x=L.floor,M=[0,31,59,90,120,151,181,212,243,273,304,334],E=function(a,c){return M[c]+365*(a-1970)+x((a-1969+(c=+(1<c)))/4)-x((a-1901+c)/100)+x((a-1601+c)/400)};(v=H.hasOwnProperty)||(v=function(a){var c={},e;(c.__proto__=null,c.__proto__={toString:1},c).toString!=u?v=function(a){var c=this.__proto__;a=a in(this.__proto__=null,this);this.__proto__=
c;return a}:(e=c.constructor,v=function(a){var c=(this.constructor||e).prototype;return a in this&&!(a in c&&this[a]===c[a])});c=null;return v.call(this,a)});B=function(a,c){var e=0,b,f,n;(b=function(){this.valueOf=0}).prototype.valueOf=0;f=new b;for(n in f)v.call(f,n)&&e++;b=f=null;e?B=2==e?function(a,c){var e={},b="[object Function]"==u.call(a),f;for(f in a)b&&"prototype"==f||v.call(e,f)||!(e[f]=1)||!v.call(a,f)||c(f)}:function(a,c){var e="[object Function]"==u.call(a),b,f;for(b in a)e&&"prototype"==
b||!v.call(a,b)||(f="constructor"===b)||c(b);(f||v.call(a,b="constructor"))&&c(b)}:(f="valueOf toString toLocaleString propertyIsEnumerable isPrototypeOf hasOwnProperty constructor".split(" "),B=function(a,c){var e="[object Function]"==u.call(a),b,h=!e&&"function"!=typeof a.constructor&&F[typeof a.hasOwnProperty]&&a.hasOwnProperty||v;for(b in a)e&&"prototype"==b||!h.call(a,b)||c(b);for(e=f.length;b=f[--e];h.call(a,b)&&c(b));});return B(a,c)};if(!q("json-stringify")){var U={92:"\\\\",34:'\\"',8:"\\b",
12:"\\f",10:"\\n",13:"\\r",9:"\\t"},y=function(a,c){return("000000"+(c||0)).slice(-a)},R=function(a){for(var c='"',b=0,h=a.length,f=!D||10<h,n=f&&(D?a.split(""):a);b<h;b++){var d=a.charCodeAt(b);switch(d){case 8:case 9:case 10:case 12:case 13:case 34:case 92:c+=U[d];break;default:if(32>d){c+="\\u00"+y(2,d.toString(16));break}c+=f?n[b]:a.charAt(b)}}return c+'"'},O=function(a,c,b,h,f,n,d){var g,m,k,l,p,r,s,t,q;try{g=c[a]}catch(z){}if("object"==typeof g&&g)if(m=u.call(g),"[object Date]"!=m||v.call(g,
"toJSON"))"function"==typeof g.toJSON&&("[object Number]"!=m&&"[object String]"!=m&&"[object Array]"!=m||v.call(g,"toJSON"))&&(g=g.toJSON(a));else if(g>-1/0&&g<1/0){if(E){l=x(g/864E5);for(m=x(l/365.2425)+1970-1;E(m+1,0)<=l;m++);for(k=x((l-E(m,0))/30.42);E(m,k+1)<=l;k++);l=1+l-E(m,k);p=(g%864E5+864E5)%864E5;r=x(p/36E5)%24;s=x(p/6E4)%60;t=x(p/1E3)%60;p%=1E3}else m=g.getUTCFullYear(),k=g.getUTCMonth(),l=g.getUTCDate(),r=g.getUTCHours(),s=g.getUTCMinutes(),t=g.getUTCSeconds(),p=g.getUTCMilliseconds();
g=(0>=m||1E4<=m?(0>m?"-":"+")+y(6,0>m?-m:m):y(4,m))+"-"+y(2,k+1)+"-"+y(2,l)+"T"+y(2,r)+":"+y(2,s)+":"+y(2,t)+"."+y(3,p)+"Z"}else g=null;b&&(g=b.call(c,a,g));if(null===g)return"null";m=u.call(g);if("[object Boolean]"==m)return""+g;if("[object Number]"==m)return g>-1/0&&g<1/0?""+g:"null";if("[object String]"==m)return R(""+g);if("object"==typeof g){for(a=d.length;a--;)if(d[a]===g)throw K();d.push(g);q=[];c=n;n+=f;if("[object Array]"==m){k=0;for(a=g.length;k<a;k++)m=O(k,g,b,h,f,n,d),q.push(m===w?"null":
m);a=q.length?f?"[\n"+n+q.join(",\n"+n)+"\n"+c+"]":"["+q.join(",")+"]":"[]"}else B(h||g,function(a){var c=O(a,g,b,h,f,n,d);c!==w&&q.push(R(a)+":"+(f?" ":"")+c)}),a=q.length?f?"{\n"+n+q.join(",\n"+n)+"\n"+c+"}":"{"+q.join(",")+"}":"{}";d.pop();return a}};r.stringify=function(a,c,b){var h,f,n,d;if(F[typeof c]&&c)if("[object Function]"==(d=u.call(c)))f=c;else if("[object Array]"==d){n={};for(var g=0,k=c.length,l;g<k;l=c[g++],(d=u.call(l),"[object String]"==d||"[object Number]"==d)&&(n[l]=1));}if(b)if("[object Number]"==
(d=u.call(b))){if(0<(b-=b%1))for(h="",10<b&&(b=10);h.length<b;h+=" ");}else"[object String]"==d&&(h=10>=b.length?b:b.slice(0,10));return O("",(l={},l[""]=a,l),f,n,h,"",[])}}if(!q("json-parse")){var V=A.fromCharCode,W={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},b,J,l=function(){b=J=null;throw G();},z=function(){for(var a=J,c=a.length,e,h,f,k,d;b<c;)switch(d=a.charCodeAt(b),d){case 9:case 10:case 13:case 32:b++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=
D?a.charAt(b):a[b],b++,e;case 34:e="@";for(b++;b<c;)if(d=a.charCodeAt(b),32>d)l();else if(92==d)switch(d=a.charCodeAt(++b),d){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=W[d];b++;break;case 117:h=++b;for(f=b+4;b<f;b++)d=a.charCodeAt(b),48<=d&&57>=d||97<=d&&102>=d||65<=d&&70>=d||l();e+=V("0x"+a.slice(h,b));break;default:l()}else{if(34==d)break;d=a.charCodeAt(b);for(h=b;32<=d&&92!=d&&34!=d;)d=a.charCodeAt(++b);e+=a.slice(h,b)}if(34==a.charCodeAt(b))return b++,e;l();default:h=
b;45==d&&(k=!0,d=a.charCodeAt(++b));if(48<=d&&57>=d){for(48==d&&(d=a.charCodeAt(b+1),48<=d&&57>=d)&&l();b<c&&(d=a.charCodeAt(b),48<=d&&57>=d);b++);if(46==a.charCodeAt(b)){for(f=++b;f<c&&(d=a.charCodeAt(f),48<=d&&57>=d);f++);f==b&&l();b=f}d=a.charCodeAt(b);if(101==d||69==d){d=a.charCodeAt(++b);43!=d&&45!=d||b++;for(f=b;f<c&&(d=a.charCodeAt(f),48<=d&&57>=d);f++);f==b&&l();b=f}return+a.slice(h,b)}k&&l();if("true"==a.slice(b,b+4))return b+=4,!0;if("false"==a.slice(b,b+5))return b+=5,!1;if("null"==a.slice(b,
b+4))return b+=4,null;l()}return"$"},P=function(a){var c,b;"$"==a&&l();if("string"==typeof a){if("@"==(D?a.charAt(0):a[0]))return a.slice(1);if("["==a){for(c=[];;b||(b=!0)){a=z();if("]"==a)break;b&&(","==a?(a=z(),"]"==a&&l()):l());","==a&&l();c.push(P(a))}return c}if("{"==a){for(c={};;b||(b=!0)){a=z();if("}"==a)break;b&&(","==a?(a=z(),"}"==a&&l()):l());","!=a&&"string"==typeof a&&"@"==(D?a.charAt(0):a[0])&&":"==z()||l();c[a.slice(1)]=P(z())}return c}l()}return a},T=function(a,b,e){e=S(a,b,e);e===
w?delete a[b]:a[b]=e},S=function(a,b,e){var h=a[b],f;if("object"==typeof h&&h)if("[object Array]"==u.call(h))for(f=h.length;f--;)T(h,f,e);else B(h,function(a){T(h,a,e)});return e.call(a,b,h)};r.parse=function(a,c){var e,h;b=0;J=""+a;e=P(z());"$"!=z()&&l();b=J=null;return c&&"[object Function]"==u.call(c)?S((h={},h[""]=e,h),"",c):e}}}r.runInContext=N;return r}var K=typeof define==="function"&&define.amd,F={"function":!0,object:!0},G=F[typeof exports]&&exports&&!exports.nodeType&&exports,k=F[typeof window]&&
window||this,t=G&&F[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;!t||t.global!==t&&t.window!==t&&t.self!==t||(k=t);if(G&&!K)N(k,G);else{var L=k.JSON,Q=k.JSON3,M=!1,A=N(k,k.JSON3={noConflict:function(){M||(M=!0,k.JSON=L,k.JSON3=Q,L=Q=null);return A}});k.JSON={parse:A.parse,stringify:A.stringify}}K&&define(function(){return A})}).call(this);

/*!
 * Platform.js <https://mths.be/platform>
 * Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
 * Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
 * Available under MIT license <https://mths.be/mit>
 */
(function(){"use strict";function capitalize(string){return string=String(string),string.charAt(0).toUpperCase()+string.slice(1)}function cleanupOS(os,pattern,label){var data={"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 pattern&&label&&/^Win/i.test(os)&&!/^Windows Phone /i.test(os)&&(data=data[/[\d.]+$/.exec(os)])&&(os="Windows "+data),os=String(os),pattern&&label&&(os=os.replace(RegExp(pattern,"i"),label)),os=format(os.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])}function each(object,callback){var index=-1,length=object?object.length:0;if("number"==typeof length&&length>-1&&maxSafeInteger>=length)for(;++index<length;)callback(object[index],index,object);else forOwn(object,callback)}function format(string){return string=trim(string),/^(?:webOS|i(?:OS|P))/.test(string)?string:capitalize(string)}function forOwn(object,callback){for(var key in object)hasOwnProperty.call(object,key)&&callback(object[key],key,object)}function getClassOf(value){return null==value?capitalize(value):toString.call(value).slice(8,-1)}function isHostType(object,property){var type=null!=object?typeof object[property]:"number";return!/^(?:boolean|number|string|undefined)$/.test(type)&&("object"==type?!!object[property]:!0)}function qualify(string){return String(string).replace(/([ -])(?!$)/g,"$1?")}function reduce(array,callback){var accumulator=null;return each(array,function(value,index){accumulator=callback(accumulator,value,index,array)}),accumulator}function trim(string){return String(string).replace(/^ +| +$/g,"")}function parse(ua){function getLayout(guesses){return reduce(guesses,function(result,guess){return result||RegExp("\\b"+(guess.pattern||qualify(guess))+"\\b","i").exec(ua)&&(guess.label||guess)})}function getManufacturer(guesses){return reduce(guesses,function(result,value,key){return result||(value[product]||value[/^[a-z]+(?: +[a-z]+\b)*/i.exec(product)]||RegExp("\\b"+qualify(key)+"(?:\\b|\\w*\\d)","i").exec(ua))&&key})}function getName(guesses){return reduce(guesses,function(result,guess){return result||RegExp("\\b"+(guess.pattern||qualify(guess))+"\\b","i").exec(ua)&&(guess.label||guess)})}function getOS(guesses){return reduce(guesses,function(result,guess){var pattern=guess.pattern||qualify(guess);return!result&&(result=RegExp("\\b"+pattern+"(?:/[\\d.]+|[ \\w.]*)","i").exec(ua))&&(result=cleanupOS(result,pattern,guess.label||guess)),result})}function getProduct(guesses){return reduce(guesses,function(result,guess){var pattern=guess.pattern||qualify(guess);return!result&&(result=RegExp("\\b"+pattern+" *\\d+[.\\w_]*","i").exec(ua)||RegExp("\\b"+pattern+" *\\w+-[\\w]*","i").exec(ua)||RegExp("\\b"+pattern+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(ua))&&((result=String(guess.label&&!RegExp(pattern,"i").test(guess.label)?guess.label:result).split("/"))[1]&&!/[\d.]+/.test(result[0])&&(result[0]+=" "+result[1]),guess=guess.label||guess,result=format(result[0].replace(RegExp(pattern,"i"),guess).replace(RegExp("; *(?:"+guess+"[_-])?","i")," ").replace(RegExp("("+guess+")[-_.]?(\\w)","i"),"$1 $2"))),result})}function getVersion(patterns){return reduce(patterns,function(result,pattern){return result||(RegExp(pattern+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(ua)||0)[1]||null})}function toStringPlatform(){return this.description||""}var context=root,isCustomContext=ua&&"object"==typeof ua&&"String"!=getClassOf(ua);isCustomContext&&(context=ua,ua=null);var nav=context.navigator||{},userAgent=nav.userAgent||"";ua||(ua=userAgent);var data,isSpecialCasedOS,likeChrome=isCustomContext?!!nav.likeChrome:/\bChrome\b/.test(ua)&&!/internal|\n/i.test(toString.toString()),objectClass="Object",airRuntimeClass=isCustomContext?objectClass:"ScriptBridgingProxyObject",enviroClass=isCustomContext?objectClass:"Environment",javaClass=isCustomContext&&context.java?"JavaPackage":getClassOf(context.java),phantomClass=isCustomContext?objectClass:"RuntimeObject",java=/\bJava/.test(javaClass)&&context.java,rhino=java&&getClassOf(context.environment)==enviroClass,alpha=java?"a":"α",beta=java?"b":"β",doc=context.document||{},opera=context.operamini||context.opera,operaClass=reOpera.test(operaClass=isCustomContext&&opera?opera["[[Class]]"]:getClassOf(opera))?operaClass:opera=null,arch=ua,description=[],prerelease=null,useFeatures=ua==userAgent,version=useFeatures&&opera&&"function"==typeof opera.version&&opera.version(),layout=getLayout([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),name=getName(["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"},"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","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{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"]),product=getProduct([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),manufacturer=getManufacturer({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),os=getOS(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(layout&&(layout=[layout]),manufacturer&&!product&&(product=getProduct([manufacturer])),(data=/\bGoogle TV\b/.exec(product))&&(product=data[0]),/\bSimulator\b/i.test(ua)&&(product=(product?product+" ":"")+"Simulator"),"Opera Mini"==name&&/\bOPiOS\b/.test(ua)&&description.push("running in Turbo/Uncompressed mode"),"IE"==name&&/\blike iPhone OS\b/.test(ua)?(data=parse(ua.replace(/like iPhone OS/,"")),manufacturer=data.manufacturer,product=data.product):/^iP/.test(product)?(name||(name="Safari"),os="iOS"+((data=/ OS ([\d_]+)/i.exec(ua))?" "+data[1].replace(/_/g,"."):"")):"Konqueror"!=name||/buntu/i.test(os)?manufacturer&&"Google"!=manufacturer&&(/Chrome/.test(name)&&!/\bMobile Safari\b/i.test(ua)||/\bVita\b/.test(product))||/\bAndroid\b/.test(os)&&/^Chrome/.test(name)&&/\bVersion\//i.test(ua)?(name="Android Browser",os=/\bAndroid\b/.test(os)?os:"Android"):"Silk"==name?(/\bMobi/i.test(ua)||(os="Android",description.unshift("desktop mode")),/Accelerated *= *true/i.test(ua)&&description.unshift("accelerated")):"PaleMoon"==name&&(data=/\bFirefox\/([\d.]+)\b/.exec(ua))?description.push("identifying as Firefox "+data[1]):"Firefox"==name&&(data=/\b(Mobile|Tablet|TV)\b/i.exec(ua))?(os||(os="Firefox OS"),product||(product=data[1])):!name||(data=!/\bMinefield\b/i.test(ua)&&/\b(?:Firefox|Safari)\b/.exec(name))?(name&&!product&&/[\/,]|^[^(]+?\)/.test(ua.slice(ua.indexOf(data+"/")+8))&&(name=null),(data=product||manufacturer||os)&&(product||manufacturer||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(os))&&(name=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(os)?os:data)+" Browser")):"Electron"==name&&(data=(/\bChrome\/([\d.]+)\b/.exec(ua)||0)[1])&&description.push("Chromium "+data):os="Kubuntu",version||(version=getVersion(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",qualify(name),"(?:Firefox|Minefield|NetFront)"])),(data="iCab"==layout&&parseFloat(version)>3&&"WebKit"||/\bOpera\b/.test(name)&&(/\bOPR\b/.test(ua)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(ua)&&!/^(?:Trident|EdgeHTML)$/.test(layout)&&"WebKit"||!layout&&/\bMSIE\b/i.test(ua)&&("Mac OS"==os?"Tasman":"Trident")||"WebKit"==layout&&/\bPlayStation\b(?! Vita\b)/i.test(name)&&"NetFront")&&(layout=[data]),"IE"==name&&(data=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ua)||0)[1])?(name+=" Mobile",os="Windows Phone "+(/\+$/.test(data)?data:data+".x"),description.unshift("desktop mode")):/\bWPDesktop\b/i.test(ua)?(name="IE Mobile",os="Windows Phone 8.x",description.unshift("desktop mode"),version||(version=(/\brv:([\d.]+)/.exec(ua)||0)[1])):"IE"!=name&&"Trident"==layout&&(data=/\brv:([\d.]+)/.exec(ua))&&(name&&description.push("identifying as "+name+(version?" "+version:"")),name="IE",version=data[1]),useFeatures){if(isHostType(context,"global"))if(java&&(data=java.lang.System,arch=data.getProperty("os.arch"),os=os||data.getProperty("os.name")+" "+data.getProperty("os.version")),rhino){try{version=context.require("ringo/engine").version.join("."),name="RingoJS"}catch(e){(data=context.system)&&data.global.system==context.system&&(name="Narwhal",os||(os=data[0].os||null))}name||(name="Rhino")}else"object"==typeof context.process&&!context.process.browser&&(data=context.process)&&("object"==typeof data.versions&&("string"==typeof data.versions.electron?(description.push("Node "+data.versions.node),name="Electron",version=data.versions.electron):"string"==typeof data.versions.nw&&(description.push("Chromium "+version,"Node "+data.versions.node),name="NW.js",version=data.versions.nw)),name||(name="Node.js",arch=data.arch,os=data.platform,version=/[\d.]+/.exec(data.version),version=version?version[0]:null));else getClassOf(data=context.runtime)==airRuntimeClass?(name="Adobe AIR",os=data.flash.system.Capabilities.os):getClassOf(data=context.phantom)==phantomClass?(name="PhantomJS",version=(data=data.version||null)&&data.major+"."+data.minor+"."+data.patch):"number"==typeof doc.documentMode&&(data=/\bTrident\/(\d+)/i.exec(ua))?(version=[version,doc.documentMode],(data=+data[1]+4)!=version[1]&&(description.push("IE "+version[1]+" mode"),layout&&(layout[1]=""),version[1]=data),version="IE"==name?String(version[1].toFixed(1)):version[0]):"number"==typeof doc.documentMode&&/^(?:Chrome|Firefox)\b/.test(name)&&(description.push("masking as "+name+" "+version),name="IE",version="11.0",layout=["Trident"],os="Windows");os=os&&format(os)}if(version&&(data=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(version)||/(?:alpha|beta)(?: ?\d)?/i.exec(ua+";"+(useFeatures&&nav.appMinorVersion))||/\bMinefield\b/i.test(ua)&&"a")&&(prerelease=/b/i.test(data)?"beta":"alpha",version=version.replace(RegExp(data+"\\+?$"),"")+("beta"==prerelease?beta:alpha)+(/\d+\+?/.exec(data)||"")),"Fennec"==name||"Firefox"==name&&/\b(?:Android|Firefox OS)\b/.test(os))name="Firefox Mobile";else if("Maxthon"==name&&version)version=version.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(product))"Xbox 360"==product&&(os=null),"Xbox 360"==product&&/\bIEMobile\b/.test(ua)&&description.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(name)&&(!name||product||/Browser|Mobi/.test(name))||"Windows CE"!=os&&!/Mobi/i.test(ua))if("IE"==name&&useFeatures)try{null===context.external&&description.unshift("platform preview")}catch(e){description.unshift("embedded")}else(/\bBlackBerry\b/.test(product)||/\bBB10\b/.test(ua))&&(data=(RegExp(product.replace(/ +/g," *")+"/([.\\d]+)","i").exec(ua)||0)[1]||version)?(data=[data,/BB10/.test(ua)],os=(data[1]?(product=null,manufacturer="BlackBerry"):"Device Software")+" "+data[0],version=null):this!=forOwn&&"Wii"!=product&&(useFeatures&&opera||/Opera/.test(name)&&/\b(?:MSIE|Firefox)\b/i.test(ua)||"Firefox"==name&&/\bOS X (?:\d+\.){2,}/.test(os)||"IE"==name&&(os&&!/^Win/.test(os)&&version>5.5||/\bWindows XP\b/.test(os)&&version>8||8==version&&!/\bTrident\b/.test(ua)))&&!reOpera.test(data=parse.call(forOwn,ua.replace(reOpera,"")+";"))&&data.name&&(data="ing as "+data.name+((data=data.version)?" "+data:""),reOpera.test(name)?(/\bIE\b/.test(data)&&"Mac OS"==os&&(os=null),data="identify"+data):(data="mask"+data,name=operaClass?format(operaClass.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(data)&&(os=null),useFeatures||(version=null)),layout=["Presto"],description.push(data));else name+=" Mobile";(data=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(ua)||0)[1])&&(data=[parseFloat(data.replace(/\.(\d)$/,".0$1")),data],"Safari"==name&&"+"==data[1].slice(-1)?(name="WebKit Nightly",prerelease="alpha",version=data[1].slice(0,-1)):(version==data[1]||version==(data[2]=(/\bSafari\/([\d.]+\+?)/i.exec(ua)||0)[1]))&&(version=null),data[1]=(/\bChrome\/([\d.]+)/i.exec(ua)||0)[1],537.36==data[0]&&537.36==data[2]&&parseFloat(data[1])>=28&&"WebKit"==layout&&(layout=["Blink"]),useFeatures&&(likeChrome||data[1])?(layout&&(layout[1]="like Chrome"),data=data[1]||(data=data[0],530>data?1:532>data?2:532.05>data?3:533>data?4:534.03>data?5:534.07>data?6:534.1>data?7:534.13>data?8:534.16>data?9:534.24>data?10:534.3>data?11:535.01>data?12:535.02>data?"13+":535.07>data?15:535.11>data?16:535.19>data?17:536.05>data?18:536.1>data?19:537.01>data?20:537.11>data?"21+":537.13>data?23:537.18>data?24:537.24>data?25:537.36>data?26:"Blink"!=layout?"27":"28")):(layout&&(layout[1]="like Safari"),data=data[0],data=400>data?1:500>data?2:526>data?3:533>data?4:534>data?"4+":535>data?5:537>data?6:538>data?7:601>data?8:"8"),layout&&(layout[1]+=" "+(data+="number"==typeof data?".x":/[.+]/.test(data)?"":"+")),"Safari"==name&&(!version||parseInt(version)>45)&&(version=data)),"Opera"==name&&(data=/\bzbov|zvav$/.exec(os))?(name+=" ",description.unshift("desktop mode"),"zvav"==data?(name+="Mini",version=null):name+="Mobile",os=os.replace(RegExp(" *"+data+"$"),"")):"Safari"==name&&/\bChrome\b/.exec(layout&&layout[1])&&(description.unshift("desktop mode"),name="Chrome Mobile",version=null,/\bOS X\b/.test(os)?(manufacturer="Apple",os="iOS 4.3+"):os=null),version&&0==version.indexOf(data=/[\d.]+$/.exec(os))&&ua.indexOf("/"+data+"-")>-1&&(os=trim(os.replace(data,""))),layout&&!/\b(?:Avant|Nook)\b/.test(name)&&(/Browser|Lunascape|Maxthon/.test(name)||"Safari"!=name&&/^iOS/.test(os)&&/\bSafari\b/.test(layout[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(name)&&layout[1])&&(data=layout[layout.length-1])&&description.push(data),description.length&&(description=["("+description.join("; ")+")"]),manufacturer&&product&&product.indexOf(manufacturer)<0&&description.push("on "+manufacturer),product&&description.push((/^on /.test(description[description.length-1])?"":"on ")+product),os&&(data=/ ([\d.+]+)$/.exec(os),isSpecialCasedOS=data&&"/"==os.charAt(os.length-data[0].length-1),os={architecture:32,family:data&&!isSpecialCasedOS?os.replace(data[0],""):os,version:data?data[1]:null,toString:function(){var version=this.version;return this.family+(version&&!isSpecialCasedOS?" "+version:"")+(64==this.architecture?" 64-bit":"")}}),(data=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(arch))&&!/\bi686\b/i.test(arch)?(os&&(os.architecture=64,os.family=os.family.replace(RegExp(" *"+data),"")),name&&(/\bWOW64\b/i.test(ua)||useFeatures&&/\w(?:86|32)$/.test(nav.cpuClass||nav.platform)&&!/\bWin64; x64\b/i.test(ua))&&description.unshift("32-bit")):os&&/^OS X/.test(os.family)&&"Chrome"==name&&parseFloat(version)>=39&&(os.architecture=64),ua||(ua=null);var platform={};return platform.description=ua,platform.layout=layout&&layout[0],platform.manufacturer=manufacturer,platform.name=name,platform.prerelease=prerelease,platform.product=product,platform.ua=ua,platform.version=name&&version,platform.os=os||{architecture:null,family:null,version:null,toString:function(){return"null"}},platform.parse=parse,platform.toString=toStringPlatform,platform.version&&description.unshift(version),platform.name&&description.unshift(name),os&&name&&(os!=String(os).split(" ")[0]||os!=name.split(" ")[0]&&!product)&&description.push(product?"("+os+")":"on "+os),description.length&&(platform.description=description.join(" ")),platform}var objectTypes={"function":!0,object:!0},root=objectTypes[typeof window]&&window||this,freeExports=objectTypes[typeof exports]&&exports,freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module,freeGlobal=freeExports&&freeModule&&"object"==typeof global&&global;!freeGlobal||freeGlobal.global!==freeGlobal&&freeGlobal.window!==freeGlobal&&freeGlobal.self!==freeGlobal||(root=freeGlobal);var maxSafeInteger=Math.pow(2,53)-1,reOpera=/\bOpera/,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,toString=objectProto.toString,platform=parse();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(root.platform=platform,define(function(){return platform})):freeExports&&freeModule?forOwn(platform,function(value,key){freeExports[key]=value}):root.platform=platform}).call(this);
