UNPKG

@trustpath/device-intelligence-js-sdk

Version:

A JavaScript SDK for collecting and analyzing device/browser data, enabling enhanced analytics and insights for web applications.

1 lines 77.8 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TrustPath={})}(this,(function(e){"use strict";function t(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))}function r(e,t){var r,i,n,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,i&&(n=2&s[0]?i.return:s[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;switch(i=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(n=o.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(6===s[0]&&o.label<n[1]){o.label=n[1],n=s;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(s);break}n[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],i=0}finally{r=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function i(e,t,r,i){return new(r||(r=Promise))((function(t,n){function o(e){try{s(i.next(e))}catch(e){n(e)}}function a(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){var i;e.done?t(e.value):(i=e.value,i instanceof r?i:new r((function(e){e(i)}))).then(o,a)}s((i=i.apply(e,[])).next())}))}function n(e,t){var r,i,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,i&&(n=2&s[0]?i.return:s[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;switch(i=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){a.label=s[1];break}if(6===s[0]&&a.label<n[1]){a.label=n[1],n=s;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(s);break}n[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],i=0}finally{r=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}"function"==typeof SuppressedError&&SuppressedError,"function"==typeof SuppressedError&&SuppressedError;var o={exclude:[],include:[],logging:!0},a={},s={timeout:"true"},u=function(e,t){"undefined"!=typeof window&&(a[e]=t)},c=function(){return Object.fromEntries(Object.entries(a).filter((function(e){var t,r=e[0];return!(null===(t=null==o?void 0:o.exclude)||void 0===t?void 0:t.includes(r))})).filter((function(e){var t,r,i,n,a=e[0];return(null===(t=null==o?void 0:o.include)||void 0===t?void 0:t.some((function(e){return e.includes(".")})))?null===(r=null==o?void 0:o.include)||void 0===r?void 0:r.some((function(e){return e.startsWith(a)})):0===(null===(i=null==o?void 0:o.include)||void 0===i?void 0:i.length)||(null===(n=null==o?void 0:o.include)||void 0===n?void 0:n.includes(a))})).map((function(e){return[e[0],(0,e[1])()]})))};function h(e){return e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),(e^=e>>>16)>>>0}var f=new Uint32Array([597399067,2869860233,951274213,2716044179]);function l(e,t){return e<<t|e>>>32-t}function d(e,t){var r;if(void 0===t&&(t=0),t=t?0|t:0,"string"==typeof e&&(r=e,e=(new TextEncoder).encode(r).buffer),!(e instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var i=new Uint32Array([t,t,t,t]);!function(e,t){for(var r=e.byteLength/16|0,i=new Uint32Array(e,0,4*r),n=0;n<r;n++){var o=i.subarray(4*n,4*(n+1));o[0]=Math.imul(o[0],f[0]),o[0]=l(o[0],15),o[0]=Math.imul(o[0],f[1]),t[0]=t[0]^o[0],t[0]=l(t[0],19),t[0]=t[0]+t[1],t[0]=Math.imul(t[0],5)+1444728091,o[1]=Math.imul(o[1],f[1]),o[1]=l(o[1],16),o[1]=Math.imul(o[1],f[2]),t[1]=t[1]^o[1],t[1]=l(t[1],17),t[1]=t[1]+t[2],t[1]=Math.imul(t[1],5)+197830471,o[2]=Math.imul(o[2],f[2]),o[2]=l(o[2],17),o[2]=Math.imul(o[2],f[3]),t[2]=t[2]^o[2],t[2]=l(t[2],15),t[2]=t[2]+t[3],t[2]=Math.imul(t[2],5)+2530024501,o[3]=Math.imul(o[3],f[3]),o[3]=l(o[3],18),o[3]=Math.imul(o[3],f[0]),t[3]=t[3]^o[3],t[3]=l(t[3],13),t[3]=t[3]+t[0],t[3]=Math.imul(t[3],5)+850148119}}(e,i),function(e,t){var r=e.byteLength/16|0,i=e.byteLength%16,n=new Uint32Array(4),o=new Uint8Array(e,16*r,i);switch(i){case 15:n[3]=n[3]^o[14]<<16;case 14:n[3]=n[3]^o[13]<<8;case 13:n[3]=n[3]^o[12],n[3]=Math.imul(n[3],f[3]),n[3]=l(n[3],18),n[3]=Math.imul(n[3],f[0]),t[3]=t[3]^n[3];case 12:n[2]=n[2]^o[11]<<24;case 11:n[2]=n[2]^o[10]<<16;case 10:n[2]=n[2]^o[9]<<8;case 9:n[2]=n[2]^o[8],n[2]=Math.imul(n[2],f[2]),n[2]=l(n[2],17),n[2]=Math.imul(n[2],f[3]),t[2]=t[2]^n[2];case 8:n[1]=n[1]^o[7]<<24;case 7:n[1]=n[1]^o[6]<<16;case 6:n[1]=n[1]^o[5]<<8;case 5:n[1]=n[1]^o[4],n[1]=Math.imul(n[1],f[1]),n[1]=l(n[1],16),n[1]=Math.imul(n[1],f[2]),t[1]=t[1]^n[1];case 4:n[0]=n[0]^o[3]<<24;case 3:n[0]=n[0]^o[2]<<16;case 2:n[0]=n[0]^o[1]<<8;case 1:n[0]=n[0]^o[0],n[0]=Math.imul(n[0],f[0]),n[0]=l(n[0],15),n[0]=Math.imul(n[0],f[1]),t[0]=t[0]^n[0]}}(e,i),function(e,t){t[0]=t[0]^e.byteLength,t[1]=t[1]^e.byteLength,t[2]=t[2]^e.byteLength,t[3]=t[3]^e.byteLength,t[0]=t[0]+t[1]|0,t[0]=t[0]+t[2]|0,t[0]=t[0]+t[3]|0,t[1]=t[1]+t[0]|0,t[2]=t[2]+t[0]|0,t[3]=t[3]+t[0]|0,t[0]=h(t[0]),t[1]=h(t[1]),t[2]=h(t[2]),t[3]=h(t[3]),t[0]=t[0]+t[1]|0,t[0]=t[0]+t[2]|0,t[0]=t[0]+t[3]|0,t[1]=t[1]+t[0]|0,t[2]=t[2]+t[0]|0,t[3]=t[3]+t[0]|0}(e,i);var n=new Uint8Array(i.buffer);return Array.from(n).map((function(e){return e.toString(16).padStart(2,"0")})).join("")}function p(e,t){return new Promise((function(r){setTimeout((function(){return r(t)}),e)}))}function w(e,t,r){return Promise.all(e.map((function(e){return Promise.race([e,p(t,r)])})))}function g(){return i(this,0,void 0,(function(){var e,t,r,i,a;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=c(),t=Object.keys(e),[4,w(Object.values(e),(null==o?void 0:o.timeout)||1e3,s)];case 1:return r=n.sent(),i=r.filter((function(e){return void 0!==e})),a={},i.forEach((function(e,r){a[t[r]]=e})),[2,b(a,o.exclude||[],o.include||[],"")];case 2:throw n.sent();case 3:return[2]}}))}))}function b(e,t,r,i){void 0===i&&(i="");for(var n={},o=function(e,o){var a=i+e+".";if("object"!=typeof o||Array.isArray(o)){var s=t.some((function(e){return a.startsWith(e)})),u=r.some((function(e){return a.startsWith(e)}));s&&!u||(n[e]=o)}else{var c=b(o,t,r,a);Object.keys(c).length>0&&(n[e]=c)}},a=0,s=Object.entries(e);a<s.length;a++){var u=s[a];o(u[0],u[1])}return n}function m(e){return i(this,0,void 0,(function(){var e,t;return n(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,g()];case 1:return e=r.sent(),t=d(JSON.stringify(e)),Math.random()<.001&&o.logging&&function(e,t){i(this,0,void 0,(function(){var r,i;return n(this,(function(n){switch(n.label){case 0:if(r="https://logging.thumbmarkjs.com/v1/log",i={thumbmark:e,components:t,version:"0.19.1"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})];case 2:case 3:return n.sent(),[3,4];case 4:return[2]}}))}))}(t,e),[2,t.toString()];case 2:throw r.sent();case 3:return[2]}}))}))}function v(e){for(var t=0,r=0;r<e.length;++r)t+=Math.abs(e[r]);return t}function y(e,t,r){for(var i=[],n=0;n<e[0].data.length;n++){for(var o=[],a=0;a<e.length;a++)o.push(e[a].data[n]);i.push(x(o))}var s=new Uint8ClampedArray(i);return new ImageData(s,t,r)}function x(e){if(0===e.length)return 0;for(var t={},r=0,i=e;r<i.length;r++)t[o=i[r]]=(t[o]||0)+1;var n=e[0];for(var o in t)t[o]>t[n]&&(n=parseInt(o,10));return n}function E(){if("undefined"==typeof navigator)return{name:"unknown",version:"unknown"};for(var e=navigator.userAgent,t={Edg:"Edge",OPR:"Opera"},r=0,i=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];r<i.length;r++){var n=i[r],o=e.match(n);if(o&&o.groups)return{name:t[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}u("audio",(function(){return i(this,0,void 0,(function(){return n(this,(function(e){return[2,new Promise((function(e,t){try{var r=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),i=r.createBufferSource(),n=r.createOscillator();n.frequency.value=1e3;var o,a=r.createDynamicsCompressor();a.threshold.value=-50,a.knee.value=40,a.ratio.value=12,a.attack.value=0,a.release.value=.2,n.connect(a),a.connect(r.destination),n.start(),r.oncomplete=function(t){o=t.renderedBuffer.getChannelData(0),e({sampleHash:v(o),oscillator:n.type,maxChannels:r.destination.maxChannelCount,channelCountMode:i.channelCountMode})},r.startRendering()}catch(e){console.error("Error creating audio fingerprint:",e),t(e)}}))]}))}))}));var A="SamsungBrowser"!==E().name?1:3;"Firefox"!=E().name&&u("canvas",(function(){return document.createElement("canvas").getContext("2d"),new Promise((function(e){var t=Array.from({length:A},(function(){return function(){var e=document.createElement("canvas"),t=e.getContext("2d");if(!t)return new ImageData(1,1);e.width=280,e.height=20;var r=t.createLinearGradient(0,0,e.width,e.height);r.addColorStop(0,"red"),r.addColorStop(1/6,"orange"),r.addColorStop(2/6,"yellow"),r.addColorStop(.5,"green"),r.addColorStop(4/6,"blue"),r.addColorStop(5/6,"indigo"),r.addColorStop(1,"violet"),t.fillStyle=r,t.fillRect(0,0,e.width,e.height);var i="Random Text WMwmil10Oo";return t.font="23.123px Arial",t.fillStyle="black",t.fillText(i,-5,15),t.fillStyle="rgba(0, 0, 255, 0.5)",t.fillText(i,-3.3,17.7),t.beginPath(),t.moveTo(0,0),t.lineTo(2*e.width/7,e.height),t.strokeStyle="white",t.lineWidth=2,t.stroke(),t.getImageData(0,0,e.width,e.height)}()}));e({commonImageDataHash:d(y(t,280,20).data.toString()).toString()})}))}));var k,S=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],_=["monospace","sans-serif","serif"];function P(e,t){if(!e)throw new Error("Canvas context not supported");return e.font,e.font="72px ".concat(t),e.measureText("WwMmLli0Oo").width}function T(){var e,t=document.createElement("canvas"),r=null!==(e=t.getContext("webgl"))&&void 0!==e?e:t.getContext("experimental-webgl");if(r&&"getParameter"in r)try{var i=(r.getParameter(r.VENDOR)||"").toString(),n=(r.getParameter(r.RENDERER)||"").toString(),o={vendor:i,renderer:n,version:(r.getParameter(r.VERSION)||"").toString(),shadingLanguageVersion:(r.getParameter(r.SHADING_LANGUAGE_VERSION)||"").toString()};if(!n.length||!i.length){var a=r.getExtension("WEBGL_debug_renderer_info");if(a){var s=(r.getParameter(a.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(r.getParameter(a.UNMASKED_RENDERER_WEBGL)||"").toString();s&&(o.vendorUnmasked=s),u&&(o.rendererUnmasked=u)}}return o}catch(e){}return"undefined"}function R(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}function M(){var e=[],t={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(t).forEach((function(r){t[r].forEach((function(t){matchMedia("(".concat(r,": ").concat(t,")")).matches&&e.push("".concat(r,": ").concat(t))}))})),e}function C(){if("https:"===window.location.protocol&&"function"==typeof window.ApplePaySession)try{for(var e=window.ApplePaySession.supportsVersion,t=15;t>0;t--)if(e(t))return t}catch(e){return 0}return 0}"Firefox"!=E().name&&u("fonts",(function(){var e=this;return new Promise((function(t,r){try{!function(e){var t;i(this,0,void 0,(function(){var r,i,o;return n(this,(function(n){switch(n.label){case 0:return document.body?[3,2]:[4,new Promise((function(e){return setTimeout(e,50,undefined)}))];case 1:return n.sent(),[3,0];case 2:if((r=document.createElement("iframe")).setAttribute("frameBorder","0"),(i=r.style).setProperty("position","fixed"),i.setProperty("display","block","important"),i.setProperty("visibility","visible"),i.setProperty("border","0"),i.setProperty("opacity","0"),r.src="about:blank",document.body.appendChild(r),!(o=r.contentDocument||(null===(t=r.contentWindow)||void 0===t?void 0:t.document)))throw new Error("Iframe document is not accessible");return e({iframe:o}),setTimeout((function(){document.body.removeChild(r)}),0),[2]}}))}))}((function(r){var o=r.iframe;return i(e,0,void 0,(function(){var e,r,i,a;return n(this,(function(n){return e=o.createElement("canvas"),r=e.getContext("2d"),i=_.map((function(e){return P(r,e)})),a={},S.forEach((function(e){var t=P(r,e);i.includes(t)||(a[e]=t)})),t(a),[2]}))}))}))}catch(e){r({error:"unsupported"})}}))})),u("hardware",(function(){return new Promise((function(e,t){var r=void 0!==navigator.deviceMemory?navigator.deviceMemory:0,i=window.performance&&window.performance.memory?window.performance.memory:0;e({videocard:T(),architecture:R(),deviceMemory:r.toString()||"undefined",jsHeapSizeLimit:i.jsHeapSizeLimit||0})}))})),u("locales",(function(){return new Promise((function(e){e({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}))})),u("permissions",(function(){return i(this,0,void 0,(function(){var e;return n(this,(function(t){return k=(null==o?void 0:o.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],e=Array.from({length:(null==o?void 0:o.retries)||3},(function(){return function(){return i(this,0,void 0,(function(){var e,t,r,i,o;return n(this,(function(n){switch(n.label){case 0:e={},t=0,r=k,n.label=1;case 1:if(!(t<r.length))return[3,6];i=r[t],n.label=2;case 2:return n.trys.push([2,4,,5]),[4,navigator.permissions.query({name:i})];case 3:return o=n.sent(),e[i]=o.state.toString(),[3,5];case 4:return n.sent(),[3,5];case 5:return t++,[3,1];case 6:return[2,e]}}))}))}()})),[2,Promise.all(e).then((function(e){return function(e,t){var r={};return t.forEach((function(t){var i=function(e){if(0===e.length)return null;var t={};e.forEach((function(e){var r=String(e);t[r]=(t[r]||0)+1}));var r=e[0],i=1;return Object.keys(t).forEach((function(e){t[e]>i&&(r=e,i=t[e])})),r}(e.map((function(e){return t in e?e[t]:void 0})).filter((function(e){return void 0!==e})));i&&(r[t]=i)})),r}(e,k)}))]}))}))})),u("plugins",(function(){var e=[];if(navigator.plugins)for(var t=0;t<navigator.plugins.length;t++){var r=navigator.plugins[t];e.push([r.name,r.filename,r.description].join("|"))}return new Promise((function(t){t({plugins:e})}))})),u("screen",(function(){return new Promise((function(e){e({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:M()})}))})),u("system",(function(){return new Promise((function(e){var t=E();e({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:t.name,version:t.version},applePayVersion:C()})}))}));var U,I="SamsungBrowser"!==E().name?1:3,B=null;u("webgl",(function(){return i(this,0,void 0,(function(){var e;return n(this,(function(t){"undefined"!=typeof document&&((U=document.createElement("canvas")).width=200,U.height=100,B=U.getContext("webgl"));try{if(!B)throw new Error("WebGL not supported");return e=Array.from({length:I},(function(){return function(){try{if(!B)throw new Error("WebGL not supported");var e=B.createShader(B.VERTEX_SHADER),t=B.createShader(B.FRAGMENT_SHADER);if(!e||!t)throw new Error("Failed to create shaders");if(B.shaderSource(e,"\n attribute vec2 position;\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n }\n "),B.shaderSource(t,"\n precision mediump float;\n void main() {\n gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color\n }\n "),B.compileShader(e),!B.getShaderParameter(e,B.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+B.getShaderInfoLog(e));if(B.compileShader(t),!B.getShaderParameter(t,B.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+B.getShaderInfoLog(t));var r=B.createProgram();if(!r)throw new Error("Failed to create shader program");if(B.attachShader(r,e),B.attachShader(r,t),B.linkProgram(r),!B.getProgramParameter(r,B.LINK_STATUS))throw new Error("Shader program linking failed: "+B.getProgramInfoLog(r));B.useProgram(r);for(var i=137,n=new Float32Array(548),o=2*Math.PI/i,a=0;a<i;a++){var s=a*o;n[4*a]=0,n[4*a+1]=0,n[4*a+2]=Math.cos(s)*(U.width/2),n[4*a+3]=Math.sin(s)*(U.height/2)}var u=B.createBuffer();B.bindBuffer(B.ARRAY_BUFFER,u),B.bufferData(B.ARRAY_BUFFER,n,B.STATIC_DRAW);var c=B.getAttribLocation(r,"position");B.enableVertexAttribArray(c),B.vertexAttribPointer(c,2,B.FLOAT,!1,0,0),B.viewport(0,0,U.width,U.height),B.clearColor(0,0,0,1),B.clear(B.COLOR_BUFFER_BIT),B.drawArrays(B.LINES,0,274);var h=new Uint8ClampedArray(U.width*U.height*4);return B.readPixels(0,0,U.width,U.height,B.RGBA,B.UNSIGNED_BYTE,h),new ImageData(h,U.width,U.height)}catch(e){return new ImageData(1,1)}finally{B&&(B.bindBuffer(B.ARRAY_BUFFER,null),B.useProgram(null),B.viewport(0,0,B.drawingBufferWidth,B.drawingBufferHeight),B.clearColor(0,0,0,0))}}()})),[2,{commonImageHash:d(y(e,U.width,U.height).data.toString()).toString()}]}catch(e){return[2,{webgl:"unsupported"}]}return[2]}))}))}));var O=function(e,t,r,i){for(var n=(r-t)/i,o=0,a=0;a<i;a++)o+=e(t+(a+.5)*n);return o*n};u("math",(function(){return i(void 0,0,void 0,(function(){return n(this,(function(e){return[2,{acos:Math.acos(.5),asin:O(Math.asin,-1,1,97),atan:O(Math.atan,-1,1,97),cos:O(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:O(Math.sin,-Math.PI,Math.PI,97),sinh:O(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:O(Math.tan,0,2*Math.PI,97),tanh:O(Math.tanh,-9/7,7/9,97)}]}))}))}));var L,D="user-agent",j="",N="function",Y="undefined",z="object",H="string",F="browser",q="cpu",V="device",G="engine",W="os",$="result",K="name",X="type",J="vendor",Z="version",Q="architecture",ee="major",te="model",re="console",ie="mobile",ne="tablet",oe="smarttv",ae="wearable",se="xr",ue="embedded",ce="inapp",he="brands",fe="formFactors",le="fullVersionList",de="platform",pe="platformVersion",we="bitness",ge="sec-ch-ua",be=ge+"-full-version-list",me=ge+"-arch",ve=ge+"-"+we,ye=ge+"-form-factors",xe=ge+"-"+ie,Ee=ge+"-"+te,Ae=ge+"-"+de,ke=Ae+"-version",Se=[he,le,ie,te,de,pe,Q,fe,we],_e="Amazon",Pe="Apple",Te="ASUS",Re="BlackBerry",Me="Google",Ce="Huawei",Ue="Lenovo",Ie="Honor",Be="LG",Oe="Microsoft",Le="Motorola",De="Nvidia",je="OnePlus",Ne="OPPO",Ye="Samsung",ze="Sharp",He="Sony",Fe="Xiaomi",qe="Zebra",Ve="Chrome",Ge="Chromium",We="Chromecast",$e="Firefox",Ke="Opera",Xe="Facebook",Je="Sogou",Ze="Mobile ",Qe=" Browser",et="Windows",tt=typeof window!==Y&&window.navigator?window.navigator:void 0,rt=tt&&tt.userAgentData?tt.userAgentData:void 0,it=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},nt=function(e,t){if(typeof e===z&&e.length>0){for(var r in e)if(ut(e[r])==ut(t))return!0;return!1}return!!at(e)&&-1!==ut(t).indexOf(ut(e))},ot=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||!!t&&ot(e[r])},at=function(e){return typeof e===H},st=function(e){if(e){for(var t=[],r=ft(/\\?\"/g,e).split(","),i=0;i<r.length;i++)if(r[i].indexOf(";")>-1){var n=dt(r[i]).split(";v=");t[i]={brand:n[0],version:n[1]}}else t[i]=dt(r[i]);return t}},ut=function(e){return at(e)?e.toLowerCase():e},ct=function(e){return at(e)?ft(/[^\d\.]/g,e).split(".")[0]:void 0},ht=function(e){for(var t in e){var r=e[t];typeof r==z&&2==r.length?this[r[0]]=r[1]:this[r]=void 0}return this},ft=function(e,t){return at(t)?t.replace(e,j):t},lt=function(e){return ft(/\\?\"/g,e)},dt=function(e,t){if(at(e))return e=ft(/^\s\s*/,e),typeof t===Y?e:e.substring(0,500)},pt=function(e,t){if(e&&t)for(var r,i,n,o,a,s,u=0;u<t.length&&!a;){var c=t[u],h=t[u+1];for(r=i=0;r<c.length&&!a&&c[r];)if(a=c[r++].exec(e))for(n=0;n<h.length;n++)s=a[++i],typeof(o=h[n])===z&&o.length>0?2===o.length?typeof o[1]==N?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3===o.length?typeof o[1]!==N||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4===o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;u+=2}},wt=function(e,t){for(var r in t)if(typeof t[r]===z&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(nt(t[r][i],e))return"?"===r?void 0:r}else if(nt(t[r],e))return"?"===r?void 0:r;return t.hasOwnProperty("*")?t["*"]:e},gt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},bt={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},mt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[Z,[K,Ze+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[Z,[K,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[K,Z],[/opios[\/ ]+([\w\.]+)/i],[Z,[K,Ke+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[Z,[K,Ke+" GX"]],[/\bopr\/([\w\.]+)/i],[Z,[K,Ke]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[Z,[K,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[Z,[K,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[K,Z],[/quark(?:pc)?\/([-\w\.]+)/i],[Z,[K,"Quark"]],[/\bddg\/([\w\.]+)/i],[Z,[K,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[Z,[K,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[Z,[K,"WeChat"]],[/konqueror\/([\w\.]+)/i],[Z,[K,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[Z,[K,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[Z,[K,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[Z,[K,"Smart "+Ue+Qe]],[/(avast|avg)\/([\w\.]+)/i],[[K,/(.+)/,"$1 Secure"+Qe],Z],[/\bfocus\/([\w\.]+)/i],[Z,[K,$e+" Focus"]],[/\bopt\/([\w\.]+)/i],[Z,[K,Ke+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[Z,[K,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[Z,[K,"Dolphin"]],[/coast\/([\w\.]+)/i],[Z,[K,Ke+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[Z,[K,"MIUI"+Qe]],[/fxios\/([\w\.-]+)/i],[Z,[K,Ze+$e]],[/\bqihoobrowser\/?([\w\.]*)/i],[Z,[K,"360"]],[/\b(qq)\/([\w\.]+)/i],[[K,/(.+)/,"$1Browser"],Z],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[K,/(.+)/,"$1"+Qe],Z],[/samsungbrowser\/([\w\.]+)/i],[Z,[K,Ye+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[Z,[K,Je+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[K,Je+" Mobile"],Z],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[K,Z],[/(lbbrowser|rekonq)/i],[K],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[Z,K],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[K,Xe],Z,[X,ce]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[K,Z,[X,ce]],[/\bgsa\/([\w\.]+) .*safari\//i],[Z,[K,"GSA"],[X,ce]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[Z,[K,"TikTok"],[X,ce]],[/\[(linkedin)app\]/i],[K,[X,ce]],[/(chromium)[\/ ]([-\w\.]+)/i],[K,Z],[/headlesschrome(?:\/([\w\.]+)| )/i],[Z,[K,Ve+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[K,Ve+" WebView"],Z],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[Z,[K,"Android"+Qe]],[/chrome\/([\w\.]+) mobile/i],[Z,[K,Ze+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[K,Z],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[Z,[K,Ze+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[K,Ze+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[Z,K],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[K,[Z,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[K,Z],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[K,Ze+$e],Z],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[K,"Netscape"],Z],[/(wolvic|librewolf)\/([\w\.]+)/i],[K,Z],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[Z,[K,$e+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[K,[Z,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[K,[Z,/[^\d\.]+./,j]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Q,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Q,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Q,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Q,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Q,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Q,/ower/,j,ut]],[/ sun4\w[;\)]/i],[[Q,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Q,ut]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[te,[J,Ye],[X,ne]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[te,[J,Ye],[X,ie]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[te,[J,Pe],[X,ie]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[te,[J,Pe],[X,ne]],[/(macintosh);/i],[te,[J,Pe]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[te,[J,ze],[X,ie]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[te,[J,Ie],[X,ne]],[/honor([-\w ]+)[;\)]/i],[te,[J,Ie],[X,ie]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[te,[J,Ce],[X,ne]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[te,[J,Ce],[X,ie]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[te,/_/g," "],[J,Fe],[X,ne]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[te,/_/g," "],[J,Fe],[X,ie]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[te,[J,Ne],[X,ie]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[te,[J,wt,{OnePlus:["304","403","203"],"*":Ne}],[X,ne]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[te,[J,"BLU"],[X,ie]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[te,[J,"Vivo"],[X,ie]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[te,[J,"Realme"],[X,ie]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[te,[J,Le],[X,ie]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[te,[J,Le],[X,ne]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[te,[J,Be],[X,ne]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[te,[J,Be],[X,ie]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[te,[J,Ue],[X,ne]],[/(nokia) (t[12][01])/i],[J,te,[X,ne]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[te,/_/g," "],[X,ie],[J,"Nokia"]],[/(pixel (c|tablet))\b/i],[te,[J,Me],[X,ne]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[te,[J,Me],[X,ie]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[te,[J,He],[X,ie]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[te,"Xperia Tablet"],[J,He],[X,ne]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[te,[J,je],[X,ie]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[te,[J,_e],[X,ne]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[te,/(.+)/g,"Fire Phone $1"],[J,_e],[X,ie]],[/(playbook);[-\w\),; ]+(rim)/i],[te,J,[X,ne]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[te,[J,Re],[X,ie]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[te,[J,Te],[X,ne]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[te,[J,Te],[X,ie]],[/(nexus 9)/i],[te,[J,"HTC"],[X,ne]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[J,[te,/_/g," "],[X,ie]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[te,[J,"TCL"],[X,ne]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[te,[J,"TCL"],[X,ie]],[/(itel) ((\w+))/i],[[J,ut],te,[X,wt,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[te,[J,"Acer"],[X,ne]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[te,[J,"Meizu"],[X,ie]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[te,[J,"Ulefone"],[X,ie]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[te,[J,"Energizer"],[X,ie]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[te,[J,"Cat"],[X,ie]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[te,[J,"Smartfren"],[X,ie]],[/droid.+; (a(?:015|06[35]|142p?))/i],[te,[J,"Nothing"],[X,ie]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[te,[J,"Archos"],[X,ne]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[te,[J,"Archos"],[X,ie]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[J,te,[X,ne]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[J,te,[X,ie]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[J,te,[X,ne]],[/(surface duo)/i],[te,[J,Oe],[X,ne]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[te,[J,"Fairphone"],[X,ie]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[te,[J,De],[X,ne]],[/(sprint) (\w+)/i],[J,te,[X,ie]],[/(kin\.[onetw]{3})/i],[[te,/\./g," "],[J,Oe],[X,ie]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[te,[J,qe],[X,ne]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[te,[J,qe],[X,ie]],[/smart-tv.+(samsung)/i],[J,[X,oe]],[/hbbtv.+maple;(\d+)/i],[[te,/^/,"SmartTV"],[J,Ye],[X,oe]],[/tcast.+(lg)e?. ([-\w]+)/i],[J,te,[X,oe]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[J,Be],[X,oe]],[/(apple) ?tv/i],[J,[te,Pe+" TV"],[X,oe]],[/crkey.*devicetype\/chromecast/i],[[te,We+" Third Generation"],[J,Me],[X,oe]],[/crkey.*devicetype\/([^/]*)/i],[[te,/^/,"Chromecast "],[J,Me],[X,oe]],[/fuchsia.*crkey/i],[[te,We+" Nest Hub"],[J,Me],[X,oe]],[/crkey/i],[[te,We],[J,Me],[X,oe]],[/(portaltv)/i],[te,[J,Xe],[X,oe]],[/droid.+aft(\w+)( bui|\))/i],[te,[J,_e],[X,oe]],[/(shield \w+ tv)/i],[te,[J,De],[X,oe]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[te,[J,ze],[X,oe]],[/(bravia[\w ]+)( bui|\))/i],[te,[J,He],[X,oe]],[/(mi(tv|box)-?\w+) bui/i],[te,[J,Fe],[X,oe]],[/Hbbtv.*(technisat) (.*);/i],[J,te,[X,oe]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[J,dt],[te,dt],[X,oe]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[te,[X,oe]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[X,oe]],[/(ouya)/i,/(nintendo) (\w+)/i],[J,te,[X,re]],[/droid.+; (shield)( bui|\))/i],[te,[J,De],[X,re]],[/(playstation \w+)/i],[te,[J,He],[X,re]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[te,[J,Oe],[X,re]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[te,[J,Ye],[X,ae]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[J,te,[X,ae]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[te,[J,Ne],[X,ae]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[te,[J,Pe],[X,ae]],[/(opwwe\d{3})/i],[te,[J,je],[X,ae]],[/(moto 360)/i],[te,[J,Le],[X,ae]],[/(smartwatch 3)/i],[te,[J,He],[X,ae]],[/(g watch r)/i],[te,[J,Be],[X,ae]],[/droid.+; (wt63?0{2,3})\)/i],[te,[J,qe],[X,ae]],[/droid.+; (glass) \d/i],[te,[J,Me],[X,se]],[/(pico) (4|neo3(?: link|pro)?)/i],[J,te,[X,se]],[/(quest( \d| pro)?s?).+vr/i],[te,[J,Xe],[X,se]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[J,[X,ue]],[/(aeobc)\b/i],[te,[J,_e],[X,ue]],[/(homepod).+mac os/i],[te,[J,Pe],[X,ue]],[/windows iot/i],[[X,ue]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[te,[X,wt,{mobile:"Mobile",xr:"VR","*":ne}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[X,ne]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[X,ie]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[te,[J,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[Z,[K,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[K,Z],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[Z,[K,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[K,Z],[/ladybird\//i],[[K,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[Z,K]],os:[[/microsoft (windows) (vista|xp)/i],[K,Z],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[K,[Z,wt,gt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[Z,wt,gt],[K,et]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[Z,/_/g,"."],[K,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[K,"macOS"],[Z,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[Z,[K,We+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[Z,[K,We+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[Z,[K,We+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[Z,[K,We+" Linux"]],[/crkey\/([\d\.]+)/i],[Z,[K,We]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[Z,K],[/(ubuntu) ([\w\.]+) like android/i],[[K,/(.+)/,"$1 Touch"],Z],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[K,Z],[/\(bb(10);/i],[Z,[K,Re]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[Z,[K,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[Z,[K,$e+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[Z,[K,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[Z,[K,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[K,"Chrome OS"],Z],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[K,Z],[/(sunos) ?([\w\.\d]*)/i],[[K,"Solaris"],Z],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[K,Z]]},vt=(ht.call((L={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[F,[K,Z,ee,X]],[q,[Q]],[V,[X,te,J]],[G,[K,Z]],[W,[K,Z]]]),ht.call(L.isIgnore,[[F,[Z,ee]],[G,[Z]],[W,[Z]]]),ht.call(L.isIgnoreRgx,[[F,/ ?browser$/i],[W,/ ?os$/i]]),ht.call(L.toString,[[F,[K,Z]],[q,[Q]],[V,[J,te]],[G,[K,Z]],[W,[K,Z]]]),L),yt=function(e,t){var r=vt.init[t],i=vt.isIgnore[t]||0,n=vt.isIgnoreRgx[t]||0,o=vt.toString[t]||0;function a(){ht.call(this,r)}return a.prototype.getItem=function(){return e},a.prototype.withClientHints=function(){return rt?rt.getHighEntropyValues(Se).then((function(t){return e.setCH(new xt(t,!1)).parseCH().get()})):e.parseCH().get()},a.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=$&&(a.prototype.is=function(e){var t=!1;for(var r in this)if(this.hasOwnProperty(r)&&!nt(i,r)&&ut(n?ft(n,this[r]):this[r])==ut(n?ft(n,e):e)){if(t=!0,e!=Y)break}else if(e==Y&&t){t=!t;break}return t},a.prototype.toString=function(){var e=j;for(var t in o)typeof this[o[t]]!==Y&&(e+=(e?" ":j)+this[o[t]]);return e||Y}),rt||(a.prototype.then=function(e){var t=this,r=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};r.prototype={is:a.prototype.is,toString:a.prototype.toString};var i=new r;return e(i),i}),new a};function xt(e,t){if(e=e||{},ht.call(this,Se),t)ht.call(this,[[he,st(e[ge])],[le,st(e[be])],[ie,/\?1/.test(e[xe])],[te,lt(e[Ee])],[de,lt(e[Ae])],[pe,lt(e[ke])],[Q,lt(e[me])],[fe,st(e[ye])],[we,lt(e[ve])]]);else for(var r in e)this.hasOwnProperty(r)&&typeof e[r]!==Y&&(this[r]=e[r])}function Et(e,t,r,i){return this.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},this.set=function(e,t){return this.data[e]=t,this},this.setCH=function(e){return this.uaCH=e,this},this.detectFeature=function(){if(tt&&tt.userAgent==this.ua)switch(this.itemType){case F:tt.brave&&typeof tt.brave.isBrave==N&&this.set(K,"Brave");break;case V:!this.get(X)&&rt&&rt[ie]&&this.set(X,ie),"Macintosh"==this.get(te)&&tt&&typeof tt.standalone!==Y&&tt.maxTouchPoints&&tt.maxTouchPoints>2&&this.set(te,"iPad").set(X,ne);break;case W:!this.get(K)&&rt&&rt[de]&&this.set(K,rt[de]);break;case $:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(F,t(F)).set(q,t(q)).set(V,t(V)).set(G,t(G)).set(W,t(W))}return this},this.parseUA=function(){return this.itemType!=$&&pt.call(this.data,this.ua,this.rgxMap),this.itemType==F&&this.set(ee,ct(this.get(Z))),this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case F:case G:var r,i=e[le]||e[he];if(i)for(var n in i){var o=i[n].brand||i[n],a=i[n].version;this.itemType!=F||/not.a.brand/i.test(o)||r&&(!/chrom/i.test(r)||o==Ge)||(o=wt(o,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(K,o).set(Z,a).set(ee,ct(a)),r=o),this.itemType==G&&o==Ge&&this.set(Z,a)}break;case q:var s=e[Q];s&&(s&&"64"==e[we]&&(s+="64"),pt.call(this.data,s+";",t));break;case V:if(e[ie]&&this.set(X,ie),e[te]&&(this.set(te,e[te]),!this.get(X)||!this.get(J))){var u={};pt.call(u,"droid 9; "+e[te]+")",t),!this.get(X)&&u.type&&this.set(X,u.type),!this.get(J)&&u.vendor&&this.set(J,u.vendor)}if(e[fe]){var c;if("string"!=typeof e[fe])for(var h=0;!c&&h<e[fe].length;)c=wt(e[fe][h++],bt);else c=wt(e[fe],bt);this.set(X,c)}break;case W:var f=e[de];if(f){var l=e[pe];f==et&&(l=parseInt(ct(l),10)>=13?"11":"10"),this.set(K,f).set(Z,l)}this.get(K)==et&&"Xbox"==e[te]&&this.set(K,"Xbox").set(Z,void 0);break;case $:var d=this.data,p=function(t){return d[t].getItem().setCH(e).parseCH().get()};this.set(F,p(F)).set(q,p(q)).set(V,p(V)).set(G,p(G)).set(W,p(W))}return this},ht.call(this,[["itemType",e],["ua",t],["uaCH",i],["rgxMap",r],["data",yt(this,e)]]),this}function At(e,t,r){if(typeof e===z?(ot(e,!0)?(typeof t===z&&(r=t),t=e):(r=e,t=void 0),e=void 0):typeof e!==H||ot(t,!0)||(r=t,t=void 0),r&&typeof r.append===N){var i={};r.forEach((function(e,t){i[t]=e})),r=i}if(!(this instanceof At))return new At(e,t,r).getResult();var n=typeof e===H?e:r&&r[D]?r[D]:tt&&tt.userAgent?tt.userAgent:j,o=new xt(r,!0),a=t?function(e,t){var r={},i=t;if(!ot(t))for(var n in i={},t)for(var o in t[n])i[o]=t[n][o].concat(i[o]?i[o]:[]);for(var a in e)r[a]=i[a]&&i[a].length%2==0?i[a].concat(e[a]):e[a];return r}(mt,t):mt,s=function(e){return e==$?function(){return new Et(e,n,a,o).set("ua",n).set(F,this.getBrowser()).set(q,this.getCPU()).set(V,this.getDevice()).set(G,this.getEngine()).set(W,this.getOS()).get()}:function(){return new Et(e,n,a[e],o).parseUA().get()}};return ht.call(this,[["getBrowser",s(F)],["getCPU",s(q)],["getDevice",s(V)],["getEngine",s(G)],["getOS",s(W)],["getResult",s($)],["getUA",function(){return n}],["setUA",function(e){return at(e)&&(n=e.length>500?dt(e,500):e),this}]]).setUA(n),this}At.VERSION="2.0.3",At.BROWSER=it([K,Z,ee,X]),At.CPU=it([Q]),At.DEVICE=it([te,J,X,re,ie,oe,ne,ae,ue]),At.ENGINE=At.OS=it([K,Z]);var kt="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},St=[],_t=[],Pt="undefined"!=typeof Uint8Array?Uint8Array:Array,Tt=!1;function Rt(){Tt=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)St[t]=e[t],_t[e.charCodeAt(t)]=t;_t["-".charCodeAt(0)]=62,_t["_".charCodeAt(0)]=63}function Mt(e,t,r){for(var i,n,o=[],a=t;a<r;a+=3)i=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(St[(n=i)>>18&63]+St[n>>12&63]+St[n>>6&63]+St[63&n]);return o.join("")}function Ct(e){var t;Tt||Rt();for(var r=e.length,i=r%3,n="",o=[],a=16383,s=0,u=r-i;s<u;s+=a)o.push(Mt(e,s,s+a>u?u:s+a));return 1===i?(t=e[r-1],n+=St[t>>2],n+=St[t<<4&63],n+="=="):2===i&&(t=(e[r-2]<<8)+e[r-1],n+=St[t>>10],n+=St[t>>4&63],n+=St[t<<2&63],n+="="),o.push(n),o.join("")}function Ut(e,t,r,i,n){var o,a,s=8*n-i-1,u=(1<<s)-1,c=u>>1,h=-7,f=r?n-1:0,l=r?-1:1,d=e[t+f];for(f+=l,o=d&(1<<-h)-1,d>>=-h,h+=s;h>0;o=256*o+e[t+f],f+=l,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=i;h>0;a=256*a+e[t+f],f+=l,h-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,i),o-=c}return(d?-1:1)*a*Math.pow(2,o-i)}function It(e,t,r,i,n,o){var a,s,u,c=8*o-n-1,h=(1<<c)-1,f=h>>1,l=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,p=i?1:-1,w=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?l/u:l*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=h?(s=0,a=h):a+f>=1?(s=(t*u-1)*Math.pow(2,n),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,n),a=0));n>=8;e[r+d]=255&s,d+=p,s/=256,n-=8);for(a=a<<n|s,c+=n;c>0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*w}var Bt={}.toString,Ot=Array.isArray||function(e){return"[object Array]"==Bt.call(e)};function Lt(){return jt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Dt(e,t){if(Lt()<t)throw new RangeError("Invalid typed array length");return jt.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=jt.prototype:(null===e&&(e=new jt(t)),e.length=t),e}function jt(e,t,r){if(!(jt.TYPED_ARRAY_SUPPORT||this instanceof jt))return new jt(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return zt(this,e)}return Nt(this,e,t,r)}function Nt(e,t,r,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,i){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,r):new Uint8Array(t,r,i);jt.TYPED_ARRAY_SUPPORT?(e=t).__proto__=jt.prototype:e=Ht(e,t);return e}(e,t,r,i):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!jt.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|Vt(t,r);e=Dt(e,i);var n=e.write(t,r);n!==i&&(e=e.slice(0,n));return e}(e,t,r):function(e,t){if(qt(t)){var r=0|Ft(t.length);return 0===(e=Dt(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?Dt(e,0):Ht(e,t);if("Buffer"===t.type&&Ot(t.data))return Ht(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Yt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function zt(e,t){if(Yt(t),e=Dt(e,t<0?0:0|Ft(t)),!jt.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function Ht(e,t){var r=t.length<0?0:0|Ft(t.length);e=Dt(e,r);for(var i=0;i<r;i+=1)e[i]=255&t[i];return e}function Ft(e){if(e>=Lt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Lt().toString(16)+" bytes");return 0|e}function qt(e){return!(null==e||!e._isBuffer)}function Vt(e,t){if(qt(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return mr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return vr(e).length;default:if(i)return mr(e).length;t=(""+t).toLowerCase(),i=!0}}function Gt(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return sr(this,t,r);case"utf8":case"utf-8":return ir(this,t,r);case"ascii":return or(this,t,r);case"latin1":cas