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 73.7 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).TrustPath={})}(this,(function(t){"use strict";function e(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function r(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[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,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function n(t,e,r,n){return new(r||(r=Promise))((function(e,i){function o(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(t){t(n)}))).then(o,a)}s((n=n.apply(t,[])).next())}))}function i(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[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,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=i=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(t,e){"undefined"!=typeof window&&(a[t]=e)},h=function(){return Object.fromEntries(Object.entries(a).filter((function(t){var e,r=t[0];return!(null===(e=null==o?void 0:o.exclude)||void 0===e?void 0:e.includes(r))})).filter((function(t){var e,r,n,i,a=t[0];return(null===(e=null==o?void 0:o.include)||void 0===e?void 0:e.some((function(t){return t.includes(".")})))?null===(r=null==o?void 0:o.include)||void 0===r?void 0:r.some((function(t){return t.startsWith(a)})):0===(null===(n=null==o?void 0:o.include)||void 0===n?void 0:n.length)||(null===(i=null==o?void 0:o.include)||void 0===i?void 0:i.includes(a))})).map((function(t){return[t[0],(0,t[1])()]})))};function f(t){return t^=t>>>16,t=Math.imul(t,2246822507),t^=t>>>13,t=Math.imul(t,3266489909),(t^=t>>>16)>>>0}var c=new Uint32Array([597399067,2869860233,951274213,2716044179]);function l(t,e){return t<<e|t>>>32-e}function d(t,e){var r;if(void 0===e&&(e=0),e=e?0|e:0,"string"==typeof t&&(r=t,t=(new TextEncoder).encode(r).buffer),!(t instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var n=new Uint32Array([e,e,e,e]);!function(t,e){for(var r=t.byteLength/16|0,n=new Uint32Array(t,0,4*r),i=0;i<r;i++){var o=n.subarray(4*i,4*(i+1));o[0]=Math.imul(o[0],c[0]),o[0]=l(o[0],15),o[0]=Math.imul(o[0],c[1]),e[0]=e[0]^o[0],e[0]=l(e[0],19),e[0]=e[0]+e[1],e[0]=Math.imul(e[0],5)+1444728091,o[1]=Math.imul(o[1],c[1]),o[1]=l(o[1],16),o[1]=Math.imul(o[1],c[2]),e[1]=e[1]^o[1],e[1]=l(e[1],17),e[1]=e[1]+e[2],e[1]=Math.imul(e[1],5)+197830471,o[2]=Math.imul(o[2],c[2]),o[2]=l(o[2],17),o[2]=Math.imul(o[2],c[3]),e[2]=e[2]^o[2],e[2]=l(e[2],15),e[2]=e[2]+e[3],e[2]=Math.imul(e[2],5)+2530024501,o[3]=Math.imul(o[3],c[3]),o[3]=l(o[3],18),o[3]=Math.imul(o[3],c[0]),e[3]=e[3]^o[3],e[3]=l(e[3],13),e[3]=e[3]+e[0],e[3]=Math.imul(e[3],5)+850148119}}(t,n),function(t,e){var r=t.byteLength/16|0,n=t.byteLength%16,i=new Uint32Array(4),o=new Uint8Array(t,16*r,n);switch(n){case 15:i[3]=i[3]^o[14]<<16;case 14:i[3]=i[3]^o[13]<<8;case 13:i[3]=i[3]^o[12],i[3]=Math.imul(i[3],c[3]),i[3]=l(i[3],18),i[3]=Math.imul(i[3],c[0]),e[3]=e[3]^i[3];case 12:i[2]=i[2]^o[11]<<24;case 11:i[2]=i[2]^o[10]<<16;case 10:i[2]=i[2]^o[9]<<8;case 9:i[2]=i[2]^o[8],i[2]=Math.imul(i[2],c[2]),i[2]=l(i[2],17),i[2]=Math.imul(i[2],c[3]),e[2]=e[2]^i[2];case 8:i[1]=i[1]^o[7]<<24;case 7:i[1]=i[1]^o[6]<<16;case 6:i[1]=i[1]^o[5]<<8;case 5:i[1]=i[1]^o[4],i[1]=Math.imul(i[1],c[1]),i[1]=l(i[1],16),i[1]=Math.imul(i[1],c[2]),e[1]=e[1]^i[1];case 4:i[0]=i[0]^o[3]<<24;case 3:i[0]=i[0]^o[2]<<16;case 2:i[0]=i[0]^o[1]<<8;case 1:i[0]=i[0]^o[0],i[0]=Math.imul(i[0],c[0]),i[0]=l(i[0],15),i[0]=Math.imul(i[0],c[1]),e[0]=e[0]^i[0]}}(t,n),function(t,e){e[0]=e[0]^t.byteLength,e[1]=e[1]^t.byteLength,e[2]=e[2]^t.byteLength,e[3]=e[3]^t.byteLength,e[0]=e[0]+e[1]|0,e[0]=e[0]+e[2]|0,e[0]=e[0]+e[3]|0,e[1]=e[1]+e[0]|0,e[2]=e[2]+e[0]|0,e[3]=e[3]+e[0]|0,e[0]=f(e[0]),e[1]=f(e[1]),e[2]=f(e[2]),e[3]=f(e[3]),e[0]=e[0]+e[1]|0,e[0]=e[0]+e[2]|0,e[0]=e[0]+e[3]|0,e[1]=e[1]+e[0]|0,e[2]=e[2]+e[0]|0,e[3]=e[3]+e[0]|0}(t,n);var i=new Uint8Array(n.buffer);return Array.from(i).map((function(t){return t.toString(16).padStart(2,"0")})).join("")}function p(t,e){return new Promise((function(r){setTimeout((function(){return r(e)}),t)}))}function w(t,e,r){return Promise.all(t.map((function(t){return Promise.race([t,p(e,r)])})))}function g(){return n(this,0,void 0,(function(){var t,e,r,n,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),t=h(),e=Object.keys(t),[4,w(Object.values(t),(null==o?void 0:o.timeout)||1e3,s)];case 1:return r=i.sent(),n=r.filter((function(t){return void 0!==t})),a={},n.forEach((function(t,r){a[e[r]]=t})),[2,b(a,o.exclude||[],o.include||[],"")];case 2:throw i.sent();case 3:return[2]}}))}))}function b(t,e,r,n){void 0===n&&(n="");for(var i={},o=function(t,o){var a=n+t+".";if("object"!=typeof o||Array.isArray(o)){var s=e.some((function(t){return a.startsWith(t)})),u=r.some((function(t){return a.startsWith(t)}));s&&!u||(i[t]=o)}else{var h=b(o,e,r,a);Object.keys(h).length>0&&(i[t]=h)}},a=0,s=Object.entries(t);a<s.length;a++){var u=s[a];o(u[0],u[1])}return i}function m(t){for(var e=0,r=0;r<t.length;++r)e+=Math.abs(t[r]);return e}function v(t,e,r){for(var n=[],i=0;i<t[0].data.length;i++){for(var o=[],a=0;a<t.length;a++)o.push(t[a].data[i]);n.push(y(o))}var s=new Uint8ClampedArray(n);return new ImageData(s,e,r)}function y(t){if(0===t.length)return 0;for(var e={},r=0,n=t;r<n.length;r++)e[o=n[r]]=(e[o]||0)+1;var i=t[0];for(var o in e)e[o]>e[i]&&(i=parseInt(o,10));return i}function E(){if("undefined"==typeof navigator)return{name:"unknown",version:"unknown"};for(var t=navigator.userAgent,e={Edg:"Edge",OPR:"Opera"},r=0,n=[/(?<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<n.length;r++){var i=n[r],o=t.match(i);if(o&&o.groups)return{name:e[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}u("audio",(function(){return n(this,0,void 0,(function(){return i(this,(function(t){return[2,new Promise((function(t,e){try{var r=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),n=r.createBufferSource(),i=r.createOscillator();i.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,i.connect(a),a.connect(r.destination),i.start(),r.oncomplete=function(e){o=e.renderedBuffer.getChannelData(0),t({sampleHash:m(o),oscillator:i.type,maxChannels:r.destination.maxChannelCount,channelCountMode:n.channelCountMode})},r.startRendering()}catch(t){console.error("Error creating audio fingerprint:",t),e(t)}}))]}))}))}));var A="SamsungBrowser"!==E().name?1:3;"Firefox"!=E().name&&u("canvas",(function(){return document.createElement("canvas").getContext("2d"),new Promise((function(t){var e=Array.from({length:A},(function(){return function(){var t=document.createElement("canvas"),e=t.getContext("2d");if(!e)return new ImageData(1,1);t.width=280,t.height=20;var r=e.createLinearGradient(0,0,t.width,t.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"),e.fillStyle=r,e.fillRect(0,0,t.width,t.height);var n="Random Text WMwmil10Oo";return e.font="23.123px Arial",e.fillStyle="black",e.fillText(n,-5,15),e.fillStyle="rgba(0, 0, 255, 0.5)",e.fillText(n,-3.3,17.7),e.beginPath(),e.moveTo(0,0),e.lineTo(2*t.width/7,t.height),e.strokeStyle="white",e.lineWidth=2,e.stroke(),e.getImageData(0,0,t.width,t.height)}()}));t({commonImageDataHash:d(v(e,280,20).data.toString()).toString()})}))}));var S,x=["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"],k=["monospace","sans-serif","serif"];function _(t,e){if(!t)throw new Error("Canvas context not supported");return t.font,t.font="72px ".concat(e),t.measureText("WwMmLli0Oo").width}function P(){var t,e=document.createElement("canvas"),r=null!==(t=e.getContext("webgl"))&&void 0!==t?t:e.getContext("experimental-webgl");if(r&&"getParameter"in r)try{var n=(r.getParameter(r.VENDOR)||"").toString(),i=(r.getParameter(r.RENDERER)||"").toString(),o={vendor:n,renderer:i,version:(r.getParameter(r.VERSION)||"").toString(),shadingLanguageVersion:(r.getParameter(r.SHADING_LANGUAGE_VERSION)||"").toString()};if(!i.length||!n.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(t){}return"undefined"}function T(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=1/0,t[0]=t[0]-t[0],e[3]}function R(){var t=[],e={"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(e).forEach((function(r){e[r].forEach((function(e){matchMedia("(".concat(r,": ").concat(e,")")).matches&&t.push("".concat(r,": ").concat(e))}))})),t}function M(){if("https:"===window.location.protocol&&"function"==typeof window.ApplePaySession)try{for(var t=window.ApplePaySession.supportsVersion,e=15;e>0;e--)if(t(e))return e}catch(t){return 0}return 0}"Firefox"!=E().name&&u("fonts",(function(){var t=this;return new Promise((function(e,r){try{!function(t){var e;n(this,0,void 0,(function(){var r,n,o;return i(this,(function(i){switch(i.label){case 0:return document.body?[3,2]:[4,new Promise((function(t){return setTimeout(t,50,undefined)}))];case 1:return i.sent(),[3,0];case 2:if((r=document.createElement("iframe")).setAttribute("frameBorder","0"),(n=r.style).setProperty("position","fixed"),n.setProperty("display","block","important"),n.setProperty("visibility","visible"),n.setProperty("border","0"),n.setProperty("opacity","0"),r.src="about:blank",document.body.appendChild(r),!(o=r.contentDocument||(null===(e=r.contentWindow)||void 0===e?void 0:e.document)))throw new Error("Iframe document is not accessible");return t({iframe:o}),setTimeout((function(){document.body.removeChild(r)}),0),[2]}}))}))}((function(r){var o=r.iframe;return n(t,0,void 0,(function(){var t,r,n,a;return i(this,(function(i){return t=o.createElement("canvas"),r=t.getContext("2d"),n=k.map((function(t){return _(r,t)})),a={},x.forEach((function(t){var e=_(r,t);n.includes(e)||(a[t]=e)})),e(a),[2]}))}))}))}catch(t){r({error:"unsupported"})}}))})),u("hardware",(function(){return new Promise((function(t,e){var r=void 0!==navigator.deviceMemory?navigator.deviceMemory:0,n=window.performance&&window.performance.memory?window.performance.memory:0;t({videocard:P(),architecture:T(),deviceMemory:r.toString()||"undefined",jsHeapSizeLimit:n.jsHeapSizeLimit||0})}))})),u("locales",(function(){return new Promise((function(t){t({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}))})),u("permissions",(function(){return n(this,0,void 0,(function(){var t;return i(this,(function(e){return S=(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"],t=Array.from({length:(null==o?void 0:o.retries)||3},(function(){return function(){return n(this,0,void 0,(function(){var t,e,r,n,o;return i(this,(function(i){switch(i.label){case 0:t={},e=0,r=S,i.label=1;case 1:if(!(e<r.length))return[3,6];n=r[e],i.label=2;case 2:return i.trys.push([2,4,,5]),[4,navigator.permissions.query({name:n})];case 3:return o=i.sent(),t[n]=o.state.toString(),[3,5];case 4:return i.sent(),[3,5];case 5:return e++,[3,1];case 6:return[2,t]}}))}))}()})),[2,Promise.all(t).then((function(t){return function(t,e){var r={};return e.forEach((function(e){var n=function(t){if(0===t.length)return null;var e={};t.forEach((function(t){var r=String(t);e[r]=(e[r]||0)+1}));var r=t[0],n=1;return Object.keys(e).forEach((function(t){e[t]>n&&(r=t,n=e[t])})),r}(t.map((function(t){return e in t?t[e]:void 0})).filter((function(t){return void 0!==t})));n&&(r[e]=n)})),r}(t,S)}))]}))}))})),u("plugins",(function(){var t=[];if(navigator.plugins)for(var e=0;e<navigator.plugins.length;e++){var r=navigator.plugins[e];t.push([r.name,r.filename,r.description].join("|"))}return new Promise((function(e){e({plugins:t})}))})),u("screen",(function(){return new Promise((function(t){t({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:R()})}))})),u("system",(function(){return new Promise((function(t){var e=E();t({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:e.name,version:e.version},applePayVersion:M()})}))}));var C,U="SamsungBrowser"!==E().name?1:3,I=null;u("webgl",(function(){return n(this,0,void 0,(function(){var t;return i(this,(function(e){"undefined"!=typeof document&&((C=document.createElement("canvas")).width=200,C.height=100,I=C.getContext("webgl"));try{if(!I)throw new Error("WebGL not supported");return t=Array.from({length:U},(function(){return function(){try{if(!I)throw new Error("WebGL not supported");var t=I.createShader(I.VERTEX_SHADER),e=I.createShader(I.FRAGMENT_SHADER);if(!t||!e)throw new Error("Failed to create shaders");if(I.shaderSource(t,"\n attribute vec2 position;\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n }\n "),I.shaderSource(e,"\n precision mediump float;\n void main() {\n gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color\n }\n "),I.compileShader(t),!I.getShaderParameter(t,I.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+I.getShaderInfoLog(t));if(I.compileShader(e),!I.getShaderParameter(e,I.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+I.getShaderInfoLog(e));var r=I.createProgram();if(!r)throw new Error("Failed to create shader program");if(I.attachShader(r,t),I.attachShader(r,e),I.linkProgram(r),!I.getProgramParameter(r,I.LINK_STATUS))throw new Error("Shader program linking failed: "+I.getProgramInfoLog(r));I.useProgram(r);for(var n=137,i=new Float32Array(548),o=2*Math.PI/n,a=0;a<n;a++){var s=a*o;i[4*a]=0,i[4*a+1]=0,i[4*a+2]=Math.cos(s)*(C.width/2),i[4*a+3]=Math.sin(s)*(C.height/2)}var u=I.createBuffer();I.bindBuffer(I.ARRAY_BUFFER,u),I.bufferData(I.ARRAY_BUFFER,i,I.STATIC_DRAW);var h=I.getAttribLocation(r,"position");I.enableVertexAttribArray(h),I.vertexAttribPointer(h,2,I.FLOAT,!1,0,0),I.viewport(0,0,C.width,C.height),I.clearColor(0,0,0,1),I.clear(I.COLOR_BUFFER_BIT),I.drawArrays(I.LINES,0,274);var f=new Uint8ClampedArray(C.width*C.height*4);return I.readPixels(0,0,C.width,C.height,I.RGBA,I.UNSIGNED_BYTE,f),new ImageData(f,C.width,C.height)}catch(t){return new ImageData(1,1)}finally{I&&(I.bindBuffer(I.ARRAY_BUFFER,null),I.useProgram(null),I.viewport(0,0,I.drawingBufferWidth,I.drawingBufferHeight),I.clearColor(0,0,0,0))}}()})),[2,{commonImageHash:d(v(t,C.width,C.height).data.toString()).toString()}]}catch(t){return[2,{webgl:"unsupported"}]}return[2]}))}))}));var B=function(t,e,r,n){for(var i=(r-e)/n,o=0,a=0;a<n;a++)o+=t(e+(a+.5)*i);return o*i};u("math",(function(){return n(void 0,0,void 0,(function(){return i(this,(function(t){return[2,{acos:Math.acos(.5),asin:B(Math.asin,-1,1,97),atan:B(Math.atan,-1,1,97),cos:B(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:B(Math.sin,-Math.PI,Math.PI,97),sinh:B(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:B(Math.tan,0,2*Math.PI,97),tanh:B(Math.tanh,-9/7,7/9,97)}]}))}))}));var O,L="user-agent",D="",N="function",Y="undefined",F="object",H="string",j="browser",z="cpu",q="device",V="engine",G="os",W="result",$="name",K="type",X="vendor",J="version",Z="architecture",Q="major",tt="model",et="console",rt="mobile",nt="tablet",it="smarttv",ot="wearable",at="xr",st="embedded",ut="inapp",ht="brands",ft="formFactors",ct="fullVersionList",lt="platform",dt="platformVersion",pt="bitness",wt="sec-ch-ua",gt=wt+"-full-version-list",bt=wt+"-arch",mt=wt+"-"+pt,vt=wt+"-form-factors",yt=wt+"-"+rt,Et=wt+"-"+tt,At=wt+"-"+lt,St=At+"-version",xt=[ht,ct,rt,tt,lt,dt,Z,ft,pt],kt="Amazon",_t="Apple",Pt="ASUS",Tt="BlackBerry",Rt="Google",Mt="Huawei",Ct="Lenovo",Ut="Honor",It="LG",Bt="Microsoft",Ot="Motorola",Lt="Nvidia",Dt="OnePlus",Nt="OPPO",Yt="Samsung",Ft="Sharp",Ht="Sony",jt="Xiaomi",zt="Zebra",qt="Chrome",Vt="Chromium",Gt="Chromecast",Wt="Firefox",$t="Opera",Kt="Facebook",Xt="Sogou",Jt="Mobile ",Zt=" Browser",Qt="Windows",te=typeof window!==Y&&window.navigator?window.navigator:void 0,ee=te&&te.userAgentData?te.userAgentData:void 0,re=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},ne=function(t,e){if(typeof t===F&&t.length>0){for(var r in t)if(se(t[r])==se(e))return!0;return!1}return!!oe(t)&&-1!==se(e).indexOf(se(t))},ie=function(t,e){for(var r in t)return/^(browser|cpu|device|engine|os)$/.test(r)||!!e&&ie(t[r])},oe=function(t){return typeof t===H},ae=function(t){if(t){for(var e=[],r=fe(/\\?\"/g,t).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var i=le(r[n]).split(";v=");e[n]={brand:i[0],version:i[1]}}else e[n]=le(r[n]);return e}},se=function(t){return oe(t)?t.toLowerCase():t},ue=function(t){return oe(t)?fe(/[^\d\.]/g,t).split(".")[0]:void 0},he=function(t){for(var e in t){var r=t[e];typeof r==F&&2==r.length?this[r[0]]=r[1]:this[r]=void 0}return this},fe=function(t,e){return oe(e)?e.replace(t,D):e},ce=function(t){return fe(/\\?\"/g,t)},le=function(t,e){if(oe(t))return t=fe(/^\s\s*/,t),typeof e===Y?t:t.substring(0,500)},de=function(t,e){if(t&&e)for(var r,n,i,o,a,s,u=0;u<e.length&&!a;){var h=e[u],f=e[u+1];for(r=n=0;r<h.length&&!a&&h[r];)if(a=h[r++].exec(t))for(i=0;i<f.length;i++)s=a[++n],typeof(o=f[i])===F&&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}},pe=function(t,e){for(var r in e)if(typeof e[r]===F&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(ne(e[r][n],t))return"?"===r?void 0:r}else if(ne(e[r],t))return"?"===r?void 0:r;return e.hasOwnProperty("*")?e["*"]:t},we={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"},ge={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},be={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[J,[$,Jt+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[J,[$,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[$,J],[/opios[\/ ]+([\w\.]+)/i],[J,[$,$t+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[J,[$,$t+" GX"]],[/\bopr\/([\w\.]+)/i],[J,[$,$t]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[J,[$,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[J,[$,"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)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[$,J],[/quark(?:pc)?\/([-\w\.]+)/i],[J,[$,"Quark"]],[/\bddg\/([\w\.]+)/i],[J,[$,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[J,[$,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[J,[$,"WeChat"]],[/konqueror\/([\w\.]+)/i],[J,[$,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[J,[$,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[J,[$,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[J,[$,"Smart "+Ct+Zt]],[/(avast|avg)\/([\w\.]+)/i],[[$,/(.+)/,"$1 Secure"+Zt],J],[/\bfocus\/([\w\.]+)/i],[J,[$,Wt+" Focus"]],[/\bopt\/([\w\.]+)/i],[J,[$,$t+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[J,[$,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[J,[$,"Dolphin"]],[/coast\/([\w\.]+)/i],[J,[$,$t+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[J,[$,"MIUI"+Zt]],[/fxios\/([\w\.-]+)/i],[J,[$,Jt+Wt]],[/\bqihoobrowser\/?([\w\.]*)/i],[J,[$,"360"]],[/\b(qq)\/([\w\.]+)/i],[[$,/(.+)/,"$1Browser"],J],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[$,/(.+)/,"$1"+Zt],J],[/samsungbrowser\/([\w\.]+)/i],[J,[$,Yt+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[J,[$,Xt+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[$,Xt+" Mobile"],J],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[$,J],[/(lbbrowser|rekonq)/i],[$],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[J,$],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[$,Kt],J,[K,ut]],[/(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],[$,J,[K,ut]],[/\bgsa\/([\w\.]+) .*safari\//i],[J,[$,"GSA"],[K,ut]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[J,[$,"TikTok"],[K,ut]],[/\[(linkedin)app\]/i],[$,[K,ut]],[/(chromium)[\/ ]([-\w\.]+)/i],[$,J],[/headlesschrome(?:\/([\w\.]+)| )/i],[J,[$,qt+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[$,qt+" WebView"],J],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[J,[$,"Android"+Zt]],[/chrome\/([\w\.]+) mobile/i],[J,[$,Jt+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[$,J],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[J,[$,Jt+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[$,Jt+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[J,$],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[$,[J,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[$,J],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[$,Jt+Wt],J],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[$,"Netscape"],J],[/(wolvic|librewolf)\/([\w\.]+)/i],[$,J],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[J,[$,Wt+" 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],[$,[J,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[$,[J,/[^\d\.]+./,D]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Z,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Z,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Z,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Z,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Z,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Z,/ower/,D,se]],[/ sun4\w[;\)]/i],[[Z,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Z,se]]],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],[tt,[X,Yt],[K,nt]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[tt,[X,Yt],[K,rt]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[tt,[X,_t],[K,rt]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[tt,[X,_t],[K,nt]],[/(macintosh);/i],[tt,[X,_t]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[tt,[X,Ft],[K,rt]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[tt,[X,Ut],[K,nt]],[/honor([-\w ]+)[;\)]/i],[tt,[X,Ut],[K,rt]],[/\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],[tt,[X,Mt],[K,nt]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[tt,[X,Mt],[K,rt]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[tt,/_/g," "],[X,jt],[K,nt]],[/\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],[[tt,/_/g," "],[X,jt],[K,rt]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[tt,[X,Nt],[K,rt]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[tt,[X,pe,{OnePlus:["304","403","203"],"*":Nt}],[K,nt]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[tt,[X,"Vivo"],[K,rt]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[tt,[X,"Realme"],[K,rt]],[/\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],[tt,[X,Ot],[K,rt]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[tt,[X,Ot],[K,nt]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[tt,[X,It],[K,nt]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[tt,[X,It],[K,rt]],[/(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],[tt,[X,Ct],[K,nt]],[/(nokia) (t[12][01])/i],[X,tt,[K,nt]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[tt,/_/g," "],[K,rt],[X,"Nokia"]],[/(pixel (c|tablet))\b/i],[tt,[X,Rt],[K,nt]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[tt,[X,Rt],[K,rt]],[/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],[tt,[X,Ht],[K,rt]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[tt,"Xperia Tablet"],[X,Ht],[K,nt]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[tt,[X,Dt],[K,rt]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[tt,[X,kt],[K,nt]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[tt,/(.+)/g,"Fire Phone $1"],[X,kt],[K,rt]],[/(playbook);[-\w\),; ]+(rim)/i],[tt,X,[K,nt]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[tt,[X,Tt],[K,rt]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[tt,[X,Pt],[K,nt]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[tt,[X,Pt],[K,rt]],[/(nexus 9)/i],[tt,[X,"HTC"],[K,nt]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[X,[tt,/_/g," "],[K,rt]],[/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],[tt,[X,"TCL"],[K,nt]],[/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],[tt,[X,"TCL"],[K,rt]],[/(itel) ((\w+))/i],[[X,se],tt,[K,pe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[tt,[X,"Acer"],[K,nt]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[tt,[X,"Meizu"],[K,rt]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[tt,[X,"Ulefone"],[K,rt]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[tt,[X,"Energizer"],[K,rt]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[tt,[X,"Cat"],[K,rt]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[tt,[X,"Smartfren"],[K,rt]],[/droid.+; (a(?:015|06[35]|142p?))/i],[tt,[X,"Nothing"],[K,rt]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[X,tt,[K,nt]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[X,tt,[K,rt]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[X,tt,[K,nt]],[/(surface duo)/i],[tt,[X,Bt],[K,nt]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[tt,[X,"Fairphone"],[K,rt]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[tt,[X,Lt],[K,nt]],[/(sprint) (\w+)/i],[X,tt,[K,rt]],[/(kin\.[onetw]{3})/i],[[tt,/\./g," "],[X,Bt],[K,rt]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[tt,[X,zt],[K,nt]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[tt,[X,zt],[K,rt]],[/smart-tv.+(samsung)/i],[X,[K,it]],[/hbbtv.+maple;(\d+)/i],[[tt,/^/,"SmartTV"],[X,Yt],[K,it]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[X,It],[K,it]],[/(apple) ?tv/i],[X,[tt,_t+" TV"],[K,it]],[/crkey.*devicetype\/chromecast/i],[[tt,Gt+" Third Generation"],[X,Rt],[K,it]],[/crkey.*devicetype\/([^/]*)/i],[[tt,/^/,"Chromecast "],[X,Rt],[K,it]],[/fuchsia.*crkey/i],[[tt,Gt+" Nest Hub"],[X,Rt],[K,it]],[/crkey/i],[[tt,Gt],[X,Rt],[K,it]],[/droid.+aft(\w+)( bui|\))/i],[tt,[X,kt],[K,it]],[/(shield \w+ tv)/i],[tt,[X,Lt],[K,it]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[tt,[X,Ft],[K,it]],[/(bravia[\w ]+)( bui|\))/i],[tt,[X,Ht],[K,it]],[/(mi(tv|box)-?\w+) bui/i],[tt,[X,jt],[K,it]],[/Hbbtv.*(technisat) (.*);/i],[X,tt,[K,it]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[X,le],[tt,le],[K,it]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[tt,[K,it]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[K,it]],[/(ouya)/i,/(nintendo) (\w+)/i],[X,tt,[K,et]],[/droid.+; (shield)( bui|\))/i],[tt,[X,Lt],[K,et]],[/(playstation \w+)/i],[tt,[X,Ht],[K,et]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[tt,[X,Bt],[K,et]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[tt,[X,Yt],[K,ot]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[X,tt,[K,ot]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[tt,[X,Nt],[K,ot]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[tt,[X,_t],[K,ot]],[/(opwwe\d{3})/i],[tt,[X,Dt],[K,ot]],[/(moto 360)/i],[tt,[X,Ot],[K,ot]],[/(smartwatch 3)/i],[tt,[X,Ht],[K,ot]],[/(g watch r)/i],[tt,[X,It],[K,ot]],[/droid.+; (wt63?0{2,3})\)/i],[tt,[X,zt],[K,ot]],[/droid.+; (glass) \d/i],[tt,[X,Rt],[K,at]],[/(pico) (4|neo3(?: link|pro)?)/i],[X,tt,[K,at]],[/; (quest( \d| pro)?)/i],[tt,[X,Kt],[K,at]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[X,[K,st]],[/(aeobc)\b/i],[tt,[X,kt],[K,st]],[/(homepod).+mac os/i],[tt,[X,_t],[K,st]],[/windows iot/i],[[K,st]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[tt,[K,pe,{mobile:"Mobile",xr:"VR","*":nt}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[K,nt]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[K,rt]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[tt,[X,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[J,[$,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[$,J],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[J,[$,"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],[$,J],[/ladybird\//i],[[$,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[J,$]],os:[[/microsoft (windows) (vista|xp)/i],[$,J],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[$,[J,pe,we]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[J,pe,we],[$,Qt]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[J,/_/g,"."],[$,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[$,"macOS"],[J,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[J,[$,Gt+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[J,[$,Gt+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[J,[$,Gt+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[J,[$,Gt+" Linux"]],[/crkey\/([\d\.]+)/i],[J,[$,Gt]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[J,$],[/(ubuntu) ([\w\.]+) like android/i],[[$,/(.+)/,"$1 Touch"],J],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[$,J],[/\(bb(10);/i],[J,[$,Tt]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[J,[$,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[J,[$,Wt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[J,[$,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[J,[$,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[$,"Chrome OS"],J],[/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],[$,J],[/(sunos) ?([\w\.\d]*)/i],[[$,"Solaris"],J],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[$,J]]},me=(he.call((O={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[j,[$,J,Q,K]],[z,[Z]],[q,[K,tt,X]],[V,[$,J]],[G,[$,J]]]),he.call(O.isIgnore,[[j,[J,Q]],[V,[J]],[G,[J]]]),he.call(O.isIgnoreRgx,[[j,/ ?browser$/i],[G,/ ?os$/i]]),he.call(O.toString,[[j,[$,J]],[z,[Z]],[q,[X,tt]],[V,[$,J]],[G,[$,J]]]),O),ve=function(t,e){var r=me.init[e],n=me.isIgnore[e]||0,i=me.isIgnoreRgx[e]||0,o=me.toString[e]||0;function a(){he.call(this,r)}return a.prototype.getItem=function(){return t},a.prototype.withClientHints=function(){return ee?ee.getHighEntropyValues(xt).then((function(e){return t.setCH(new ye(e,!1)).parseCH().get()})):t.parseCH().get()},a.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=W&&(a.prototype.is=function(t){var e=!1;for(var r in this)if(this.hasOwnProperty(r)&&!ne(n,r)&&se(i?fe(i,this[r]):this[r])==se(i?fe(i,t):t)){if(e=!0,t!=Y)break}else if(t==Y&&e){e=!e;break}return e},a.prototype.toString=function(){var t=D;for(var e in o)typeof this[o[e]]!==Y&&(t+=(t?" ":D)+this[o[e]]);return t||Y}),ee||(a.prototype.then=function(t){var e=this,r=function(){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])};r.prototype={is:a.prototype.is,toString:a.prototype.toString};var n=new r;return t(n),n}),new a};function ye(t,e){if(t=t||{},he.call(this,xt),e)he.call(this,[[ht,ae(t[wt])],[ct,ae(t[gt])],[rt,/\?1/.test(t[yt])],[tt,ce(t[Et])],[lt,ce(t[At])],[dt,ce(t[St])],[Z,ce(t[bt])],[ft,ae(t[vt])],[pt,ce(t[mt])]]);else for(var r in t)this.hasOwnProperty(r)&&typeof t[r]!==Y&&(this[r]=t[r])}function Ee(t,e,r,n){return this.get=function(t){return t?this.data.hasOwnProperty(t)?this.data[t]:void 0:this.data},this.set=function(t,e){return this.data[t]=e,this},this.setCH=function(t){return this.uaCH=t,this},this.detectFeature=function(){if(te&&te.userAgent==this.ua)switch(this.itemType){case j:te.brave&&typeof te.brave.isBrave==N&&this.set($,"Brave");break;case q:!this.get(K)&&ee&&ee[rt]&&this.set(K,rt),"Macintosh"==this.get(tt)&&te&&typeof te.standalone!==Y&&te.maxTouchPoints&&te.maxTouchPoints>2&&this.set(tt,"iPad").set(K,nt);break;case G:!this.get($)&&ee&&ee[lt]&&this.set($,ee[lt]);break;case W:var t=this.data,e=function(e){return t[e].getItem().detectFeature().get()};this.set(j,e(j)).set(z,e(z)).set(q,e(q)).set(V,e(V)).set(G,e(G))}return this},this.parseUA=function(){return this.itemType!=W&&de.call(this.data,this.ua,this.rgxMap),this.itemType==j&&this.set(Q,ue(this.get(J))),this},this.parseCH=function(){var t=this.uaCH,e=this.rgxMap;switch(this.itemType){case j:case V:var r,n=t[ct]||t[ht];if(n)for(var i in n){var o=n[i].brand||n[i],a=n[i].version;this.itemType!=j||/not.a.brand/i.test(o)||r&&(!/chrom/i.test(r)||o==Vt)||(o=pe(o,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome"}),this.set($,o).set(J,a).set(Q,ue(a)),r=o),this.itemType==V&&o==Vt&&this.set(J,a)}break;case z:var s=t[Z];s&&(s&&"64"==t[pt]&&(s+="64"),de.call(this.data,s+";",e));break;case q:if(t[rt]&&this.set(K,rt),t[tt]&&(this.set(tt,t[tt]),!this.get(K)||!this.get(X))){var u={};de.call(u,"droid 9; "+t[tt]+")",e),!this.get(K)&&u.type&&this.set(K,u.type),!this.get(X)&&u.vendor&&this.set(X,u.vendor)}if(t[ft]){var h;if("string"!=typeof t[ft])for(var f=0;!h&&f<t[ft].length;)h=pe(t[ft][f++],ge);else h=pe(t[ft],ge);this.set(K,h)}break;case G:var c=t[lt];if(c){var l=t[dt];c==Qt&&(l=parseInt(ue(l),10)>=13?"11":"10"),this.set($,c).set(J,l)}this.get($)==Qt&&"Xbox"==t[tt]&&this.set($,"Xbox").set(J,void 0);break;case W:var d=this.data,p=function(e){return d[e].getItem().setCH(t).parseCH().get()};this.set(j,p(j)).set(z,p(z)).set(q,p(q)).set(V,p(V)).set(G,p(G))}return this},he.call(this,[["itemType",t],["ua",e],["uaCH",n],["rgxMap",r],["data",ve(this,t)]]),this}function Ae(t,e,r){if(typeof t===F?(ie(t,!0)?(typeof e===F&&(r=e),e=t):(r=t,e=void 0),t=void 0):typeof t!==H||ie(e,!0)||(r=e,e=void 0),r&&typeof r.append===N){var n={};r.forEach((function(t,e){n[e]=t})),r=n}if(!(this instanceof Ae))return new Ae(t,e,r).getResult();var i=typeof t===H?t:r&&r[L]?r[L]:te&&te.userAgent?te.userAgent:D,o=new ye(r,!0),a=e?function(t,e){var r={},n=e;if(!ie(e))for(var i in n={},e)for(var o in e[i])n[o]=e[i][o].concat(n[o]?n[o]:[]);for(var a in t)r[a]=n[a]&&n[a].length%2==0?n[a].concat(t[a]):t[a];return r}(be,e):be,s=function(t){return t==W?function(){return new Ee(t,i,a,o).set("ua",i).set(j,this.getBrowser()).set(z,this.getCPU()).set(q,this.getDevice()).set(V,this.getEngine()).set(G,this.getOS()).get()}:function(){return new Ee(t,i,a[t],o).parseUA().get()}};return he.call(this,[["getBrowser",s(j)],["getCPU",s(z)],["getDevice",s(q)],["getEngine",s(V)],["getOS",s(G)],["getResult",s(W)],["getUA",function(){return i}],["setUA",function(t){return oe(t)&&(i=t.length>500?le(t,500):t),this}]]).setUA(i),this}Ae.VERSION="2.0.2",Ae.BROWSER=re([$,J,Q,K]),Ae.CPU=re([Z]),Ae.DEVICE=re([tt,X,K,et,rt,it,nt,ot,st]),Ae.ENGINE=Ae.OS=re([$,J]);var Se="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},xe=[],ke=[],_e="undefined"!=typeof Uint8Array?Uint8Array:Array,Pe=!1;function Te(){Pe=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)xe[e]=t[e],ke[t.charCodeAt(e)]=e;ke["-".charCodeAt(0)]=62,ke["_".charCodeAt(0)]=63}function Re(t,e,r){for(var n,i,o=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],o.push(xe[(i=n)>>18&63]+xe[i>>12&63]+xe[i>>6&63]+xe[63&i]);return o.join("")}function Me(t){var e;Pe||Te();for(var r=t.length,n=r%3,i="",o=[],a=16383,s=0,u=r-n;s<u;s+=a)o.push(Re(t,s,s+a>u?u:s+a));return 1===n?(e=t[r-1],i+=xe[e>>2],i+=xe[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=xe[e>>10],i+=xe[e>>4&63],i+=xe[e<<2&63],i+="="),o.push(i),o.join("")}function Ce(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,h=u>>1,f=-7,c=r?i-1:0,l=r?-1:1,d=t[e+c];for(c+=l,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+t[e+c],c+=l,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+t[e+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=h}return(d?-1:1)*a*Math.pow(2,o-n)}function Ue(t,e,r,n,i,o){var a,s,u,h=8*o-i-1,f=(1<<h)-1,c=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,w=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=f?(s=0,a=f):a+c>=1?(s=(e*u-1)*Math.pow(2,i),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,h+=i;h>0;t[r+d]=255&a,d+=p,a/=256,h-=8);t[r+d-p]|=128*w}var Ie={}.toString,Be=Array.isArray||function(t){return"[object Array]"==Ie.call(t)};function Oe(){return De.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Le(t,e){if(Oe()<e)throw new RangeError("Invalid typed array length");return De.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=De.prototype:(null===t&&(t=new De(e)),t.length=e),t}function De(t,e,r){if(!(De.TYPED_ARRAY_SUPPORT||this instanceof De))return new De(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return Fe(this,t)}return Ne(this,t,e,r)}function Ne(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);De.TYPED_ARRAY_SUPPORT?(t=e).__proto__=De.prototype:t=He(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!De.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|qe(e,r);t=Le(t,n);var i=t.write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(ze(e)){var r=0|je(e.length);return 0===(t=Le(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?Le(t,0):He(t,e);if("Buffer"===e.type&&Be(e.data))return He(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Ye(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Fe(t,e){if(Ye(e),t=Le(t,e<0?0:0|je(e)),!De.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function He(t,e){var r=e.length<0?0:0|je(e.length);t=Le(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function je(t){if(t>=Oe())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Oe().toString(16)+" bytes");return 0|t}function ze(t){return!(null==t||!t._isBuffer)}function qe(t,e){if(ze(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return br(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return mr(t).length;default:if(n)return br(t).length;e=(""+e).toLowerCase(),n=!0}}function Ve(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return ar(this,e,r);case"utf8":case"utf-8":return rr(this,e,r);case"ascii":return ir(this,e,r);case"latin1":case"binary":return or(this,e,r);case"base64":return er(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return sr(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function Ge(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function We(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=De.from(e,n)),ze(e))return 0===e.length?-1:$e(t,e,r,n,i);if("number"==typeof e)return e&=255,De.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):$e(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function $e(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function h(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=r;o<s;o++)if(h(t,o)===h(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var c=!0,l=0;l<u;l+