@oddjs/odd
Version:
ODD SDK
1 lines • 699 kB
JavaScript
var f5=Object.create;var Am=Object.defineProperty;var l5=Object.getOwnPropertyDescriptor;var h5=Object.getOwnPropertyNames;var p5=Object.getPrototypeOf,d5=Object.prototype.hasOwnProperty;var m5=(r,e,t)=>e in r?Am(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Vu=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var sb=(r,e)=>()=>(r&&(e=r(r=0)),e);var ce=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Et=(r,e)=>{for(var t in e)Am(r,t,{get:e[t],enumerable:!0})},y5=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of h5(e))!d5.call(r,i)&&i!==t&&Am(r,i,{get:()=>e[i],enumerable:!(n=l5(e,i))||n.enumerable});return r};var Ze=(r,e,t)=>(t=r!=null?f5(p5(r)):{},y5(e||!r||!r.__esModule?Am(t,"default",{value:r,enumerable:!0}):t,r));var ab=(r,e,t)=>(m5(r,typeof e!="symbol"?e+"":e,t),t),QS=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var Xi=(r,e,t)=>(QS(r,e,"read from private field"),t?t.call(r):e.get(r)),Cm=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)},Im=(r,e,t,n)=>(QS(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t);function eD(){throw new Error("setTimeout has not been defined")}function tD(){throw new Error("clearTimeout has not been defined")}function rD(r){if(Na===setTimeout)return setTimeout(r,0);if((Na===eD||!Na)&&setTimeout)return Na=setTimeout,setTimeout(r,0);try{return Na(r,0)}catch{try{return Na.call(null,r,0)}catch{return Na.call(this,r,0)}}}function g5(r){if(Ua===clearTimeout)return clearTimeout(r);if((Ua===tD||!Ua)&&clearTimeout)return Ua=clearTimeout,clearTimeout(r);try{return Ua(r)}catch{try{return Ua.call(null,r)}catch{return Ua.call(this,r)}}}function w5(){!If||!Hu||(If=!1,Hu.length?zs=Hu.concat(zs):Tm=-1,zs.length&&nD())}function nD(){if(!If){var r=rD(w5);If=!0;for(var e=zs.length;e;){for(Hu=zs,zs=[];++Tm<e;)Hu&&Hu[Tm].run();Tm=-1,e=zs.length}Hu=null,If=!1,g5(r)}}function b5(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];zs.push(new iD(r,e)),zs.length===1&&!If&&rD(nD)}function iD(r,e){this.fun=r,this.array=e}function Gu(){}function L5(r){throw new Error("process.binding is not supported")}function N5(){return"/"}function U5(r){throw new Error("process.chdir is not supported")}function M5(){return 0}function j5(r){var e=K5.call(Cf)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}function z5(){var r=new Date,e=r-$5;return e/1e3}var Na,Ua,zs,If,Hu,Tm,v5,_5,x5,E5,P5,S5,D5,A5,C5,I5,T5,k5,F5,R5,B5,O5,Cf,K5,$5,process,ZS,h=sb(()=>{Na=eD,Ua=tD;typeof globalThis.setTimeout=="function"&&(Na=setTimeout);typeof globalThis.clearTimeout=="function"&&(Ua=clearTimeout);zs=[],If=!1,Tm=-1;iD.prototype.run=function(){this.fun.apply(null,this.array)};v5="browser",_5="browser",x5=!0,E5={},P5=[],S5="",D5={},A5={},C5={};I5=Gu,T5=Gu,k5=Gu,F5=Gu,R5=Gu,B5=Gu,O5=Gu;Cf=globalThis.performance||{},K5=Cf.now||Cf.mozNow||Cf.msNow||Cf.oNow||Cf.webkitNow||function(){return new Date().getTime()};$5=new Date;process={nextTick:b5,title:v5,browser:x5,env:E5,argv:P5,version:S5,versions:D5,on:I5,addListener:T5,once:k5,off:F5,removeListener:R5,removeAllListeners:B5,emit:O5,binding:L5,cwd:N5,chdir:U5,umask:M5,hrtime:j5,platform:_5,release:A5,config:C5,uptime:z5},ZS={};Object.keys(ZS).forEach(r=>{let e=r.split("."),t=process;for(let n=0;n<e.length;n++){let i=e[n];n===e.length-1?t[i]=ZS[r]:t=t[i]||(t[i]={})}})});function uD(){cb=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)ss[e]=r[e],Qi[r.charCodeAt(e)]=e;Qi["-".charCodeAt(0)]=62,Qi["_".charCodeAt(0)]=63}function W5(r){cb||uD();var e,t,n,i,o,a,c=r.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[c-2]==="="?2:r[c-1]==="="?1:0,a=new q5(c*3/4-o),n=o>0?c-4:c;var f=0;for(e=0,t=0;e<n;e+=4,t+=3)i=Qi[r.charCodeAt(e)]<<18|Qi[r.charCodeAt(e+1)]<<12|Qi[r.charCodeAt(e+2)]<<6|Qi[r.charCodeAt(e+3)],a[f++]=i>>16&255,a[f++]=i>>8&255,a[f++]=i&255;return o===2?(i=Qi[r.charCodeAt(e)]<<2|Qi[r.charCodeAt(e+1)]>>4,a[f++]=i&255):o===1&&(i=Qi[r.charCodeAt(e)]<<10|Qi[r.charCodeAt(e+1)]<<4|Qi[r.charCodeAt(e+2)]>>2,a[f++]=i>>8&255,a[f++]=i&255),a}function V5(r){return ss[r>>18&63]+ss[r>>12&63]+ss[r>>6&63]+ss[r&63]}function H5(r,e,t){for(var n,i=[],o=e;o<t;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(V5(n));return i.join("")}function oD(r){cb||uD();for(var e,t=r.length,n=t%3,i="",o=[],a=16383,c=0,f=t-n;c<f;c+=a)o.push(H5(r,c,c+a>f?f:c+a));return n===1?(e=r[t-1],i+=ss[e>>2],i+=ss[e<<4&63],i+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],i+=ss[e>>10],i+=ss[e>>4&63],i+=ss[e<<2&63],i+="="),o.push(i),o.join("")}function km(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function qs(r,e){if(km()<e)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=Buffer.prototype):(r===null&&(r=new Buffer(e)),r.length=e),r}function Buffer(r,e,t){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer))return new Buffer(r,e,t);if(typeof r=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return fb(this,r)}return cD(this,r,e,t)}function cD(r,e,t,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?J5(r,e,t,n):typeof e=="string"?Y5(r,e,t):X5(r,e)}function fD(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function G5(r,e,t,n){return fD(e),e<=0?qs(r,e):t!==void 0?typeof n=="string"?qs(r,e).fill(t,n):qs(r,e).fill(t):qs(r,e)}function fb(r,e){if(fD(e),r=qs(r,e<0?0:lb(e)|0),!Buffer.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}function Y5(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=lD(e,t)|0;r=qs(r,n);var i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function ub(r,e){var t=e.length<0?0:lb(e.length)|0;r=qs(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function J5(r,e,t,n){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");return t===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,t):e=new Uint8Array(e,t,n),Buffer.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=Buffer.prototype):r=ub(r,e),r}function X5(r,e){if(as(e)){var t=lb(e.length)|0;return r=qs(r,t),r.length===0||e.copy(r,0,0,t),r}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||y7(e.length)?qs(r,0):ub(r,e);if(e.type==="Buffer"&&Array.isArray(e.data))return ub(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function lb(r){if(r>=km())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+km().toString(16)+" bytes");return r|0}function as(r){return!!(r!=null&&r._isBuffer)}function lD(r,e){if(as(r))return r.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var t=r.length;if(t===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return Fm(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return wD(r).length;default:if(n)return Fm(r).length;e=(""+e).toLowerCase(),n=!0}}function Q5(r,e,t){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return u7(this,e,t);case"utf8":case"utf-8":return dD(this,e,t);case"ascii":return s7(this,e,t);case"latin1":case"binary":return a7(this,e,t);case"base64":return i7(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c7(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function Yu(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function hD(r,e,t,n,i){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=Buffer.from(e,n)),as(e))return e.length===0?-1:sD(r,e,t,n,i);if(typeof e=="number")return e=e&255,Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):sD(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function sD(r,e,t,n,i){var o=1,a=r.length,c=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;o=2,a/=2,c/=2,t/=2}function f(T,F){return o===1?T[F]:T.readUInt16BE(F*o)}var d;if(i){var m=-1;for(d=t;d<a;d++)if(f(r,d)===f(e,m===-1?0:d-m)){if(m===-1&&(m=d),d-m+1===c)return m*o}else m!==-1&&(d-=d-m),m=-1}else for(t+c>a&&(t=a-c),d=t;d>=0;d--){for(var w=!0,x=0;x<c;x++)if(f(r,d+x)!==f(e,x)){w=!1;break}if(w)return d}return-1}function Z5(r,e,t,n){t=Number(t)||0;var i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var c=parseInt(e.substr(a*2,2),16);if(isNaN(c))return a;r[t+a]=c}return a}function e7(r,e,t,n){return Om(Fm(e,r.length-t),r,t,n)}function pD(r,e,t,n){return Om(d7(e),r,t,n)}function t7(r,e,t,n){return pD(r,e,t,n)}function r7(r,e,t,n){return Om(wD(e),r,t,n)}function n7(r,e,t,n){return Om(m7(e,r.length-t),r,t,n)}function i7(r,e,t){return e===0&&t===r.length?oD(r):oD(r.slice(e,t))}function dD(r,e,t){t=Math.min(r.length,t);for(var n=[],i=e;i<t;){var o=r[i],a=null,c=o>239?4:o>223?3:o>191?2:1;if(i+c<=t){var f,d,m,w;switch(c){case 1:o<128&&(a=o);break;case 2:f=r[i+1],(f&192)===128&&(w=(o&31)<<6|f&63,w>127&&(a=w));break;case 3:f=r[i+1],d=r[i+2],(f&192)===128&&(d&192)===128&&(w=(o&15)<<12|(f&63)<<6|d&63,w>2047&&(w<55296||w>57343)&&(a=w));break;case 4:f=r[i+1],d=r[i+2],m=r[i+3],(f&192)===128&&(d&192)===128&&(m&192)===128&&(w=(o&15)<<18|(f&63)<<12|(d&63)<<6|m&63,w>65535&&w<1114112&&(a=w))}}a===null?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=c}return o7(n)}function o7(r){var e=r.length;if(e<=aD)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=aD));return t}function s7(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function a7(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function u7(r,e,t){var n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var i="",o=e;o<t;++o)i+=p7(r[o]);return i}function c7(r,e,t){for(var n=r.slice(e,t),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function tn(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}function Yn(r,e,t,n,i,o){if(!as(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}function Rm(r,e,t,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(r.length-t,2);i<o;++i)r[t+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function Bm(r,e,t,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(r.length-t,4);i<o;++i)r[t+i]=e>>>(n?i:3-i)*8&255}function mD(r,e,t,n,i,o){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function yD(r,e,t,n,i){return i||mD(r,e,t,4,34028234663852886e22,-34028234663852886e22),vD(r,e,t,n,23,4),t+4}function gD(r,e,t,n,i){return i||mD(r,e,t,8,17976931348623157e292,-17976931348623157e292),vD(r,e,t,n,52,8),t+8}function l7(r){if(r=h7(r).replace(f7,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function h7(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function p7(r){return r<16?"0"+r.toString(16):r.toString(16)}function Fm(r,e){e=e||1/0;for(var t,n=r.length,i=null,o=[],a=0;a<n;++a){if(t=r.charCodeAt(a),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&o.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;o.push(t)}else if(t<2048){if((e-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function d7(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function m7(r,e){for(var t,n,i,o=[],a=0;a<r.length&&!((e-=2)<0);++a)t=r.charCodeAt(a),n=t>>8,i=t%256,o.push(i),o.push(n);return o}function wD(r){return W5(l7(r))}function Om(r,e,t,n){for(var i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function y7(r){return r!==r}function g7(r){return r!=null&&(!!r._isBuffer||bD(r)||w7(r))}function bD(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function w7(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&bD(r.slice(0,0))}function Lm(r,e,t,n,i){var o,a,c=i*8-n-1,f=(1<<c)-1,d=f>>1,m=-7,w=t?i-1:0,x=t?-1:1,T=r[e+w];for(w+=x,o=T&(1<<-m)-1,T>>=-m,m+=c;m>0;o=o*256+r[e+w],w+=x,m-=8);for(a=o&(1<<-m)-1,o>>=-m,m+=n;m>0;a=a*256+r[e+w],w+=x,m-=8);if(o===0)o=1-d;else{if(o===f)return a?NaN:(T?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-d}return(T?-1:1)*a*Math.pow(2,o-n)}function vD(r,e,t,n,i,o){var a,c,f,d=o*8-i-1,m=(1<<d)-1,w=m>>1,x=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:o-1,F=n?1:-1,N=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=m):(a=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+w>=1?e+=x/f:e+=x*Math.pow(2,1-w),e*f>=2&&(a++,f/=2),a+w>=m?(c=0,a=m):a+w>=1?(c=(e*f-1)*Math.pow(2,i),a=a+w):(c=e*Math.pow(2,w-1)*Math.pow(2,i),a=0));i>=8;r[t+T]=c&255,T+=F,c/=256,i-=8);for(a=a<<i|c,d+=i;d>0;r[t+T]=a&255,T+=F,a/=256,d-=8);r[t+T-F]|=N*128}var ss,Qi,q5,cb,aD,f7,_D=sb(()=>{h();p();ss=[],Qi=[],q5=typeof Uint8Array<"u"?Uint8Array:Array,cb=!1;Buffer.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;Buffer.poolSize=8192;Buffer._augment=function(r){return r.__proto__=Buffer.prototype,r};Buffer.from=function(r,e,t){return cD(null,r,e,t)};Buffer.kMaxLength=km();Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&Buffer[Symbol.species]);Buffer.alloc=function(r,e,t){return G5(null,r,e,t)};Buffer.allocUnsafe=function(r){return fb(null,r)};Buffer.allocUnsafeSlow=function(r){return fb(null,r)};Buffer.isBuffer=g7;Buffer.compare=function(e,t){if(!as(e)||!as(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==t[o]){n=e[o],i=t[o];break}return n<i?-1:i<n?1:0};Buffer.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};Buffer.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return Buffer.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=Buffer.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!as(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i};Buffer.byteLength=lD;Buffer.prototype._isBuffer=!0;Buffer.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Yu(this,t,t+1);return this};Buffer.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Yu(this,t,t+3),Yu(this,t+1,t+2);return this};Buffer.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Yu(this,t,t+7),Yu(this,t+1,t+6),Yu(this,t+2,t+5),Yu(this,t+3,t+4);return this};Buffer.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?dD(this,0,e):Q5.apply(this,arguments)};Buffer.prototype.equals=function(e){if(!as(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:Buffer.compare(this,e)===0};Buffer.prototype.compare=function(e,t,n,i,o){if(!as(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var a=o-i,c=n-t,f=Math.min(a,c),d=this.slice(i,o),m=e.slice(t,n),w=0;w<f;++w)if(d[w]!==m[w]){a=d[w],c=m[w];break}return a<c?-1:c<a?1:0};Buffer.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};Buffer.prototype.indexOf=function(e,t,n){return hD(this,e,t,n,!0)};Buffer.prototype.lastIndexOf=function(e,t,n){return hD(this,e,t,n,!1)};Buffer.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-t;if((n===void 0||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return Z5(this,e,t,n);case"utf8":case"utf-8":return e7(this,e,t,n);case"ascii":return pD(this,e,t,n);case"latin1":case"binary":return t7(this,e,t,n);case"base64":return r7(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n7(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}};Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};aD=4096;Buffer.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var i;if(Buffer.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=Buffer.prototype;else{var o=t-e;i=new Buffer(o,void 0);for(var a=0;a<o;++a)i[a]=this[a+e]}return i};Buffer.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||tn(e,t,this.length);for(var i=this[e],o=1,a=0;++a<t&&(o*=256);)i+=this[e+a]*o;return i};Buffer.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||tn(e,t,this.length);for(var i=this[e+--t],o=1;t>0&&(o*=256);)i+=this[e+--t]*o;return i};Buffer.prototype.readUInt8=function(e,t){return t||tn(e,1,this.length),this[e]};Buffer.prototype.readUInt16LE=function(e,t){return t||tn(e,2,this.length),this[e]|this[e+1]<<8};Buffer.prototype.readUInt16BE=function(e,t){return t||tn(e,2,this.length),this[e]<<8|this[e+1]};Buffer.prototype.readUInt32LE=function(e,t){return t||tn(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};Buffer.prototype.readUInt32BE=function(e,t){return t||tn(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};Buffer.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||tn(e,t,this.length);for(var i=this[e],o=1,a=0;++a<t&&(o*=256);)i+=this[e+a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};Buffer.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||tn(e,t,this.length);for(var i=t,o=1,a=this[e+--i];i>0&&(o*=256);)a+=this[e+--i]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*t)),a};Buffer.prototype.readInt8=function(e,t){return t||tn(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};Buffer.prototype.readInt16LE=function(e,t){t||tn(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};Buffer.prototype.readInt16BE=function(e,t){t||tn(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};Buffer.prototype.readInt32LE=function(e,t){return t||tn(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};Buffer.prototype.readInt32BE=function(e,t){return t||tn(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};Buffer.prototype.readFloatLE=function(e,t){return t||tn(e,4,this.length),Lm(this,e,!0,23,4)};Buffer.prototype.readFloatBE=function(e,t){return t||tn(e,4,this.length),Lm(this,e,!1,23,4)};Buffer.prototype.readDoubleLE=function(e,t){return t||tn(e,8,this.length),Lm(this,e,!0,52,8)};Buffer.prototype.readDoubleBE=function(e,t){return t||tn(e,8,this.length),Lm(this,e,!1,52,8)};Buffer.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;Yn(this,e,t,n,o,0)}var a=1,c=0;for(this[t]=e&255;++c<n&&(a*=256);)this[t+c]=e/a&255;return t+n};Buffer.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;Yn(this,e,t,n,o,0)}var a=n-1,c=1;for(this[t+a]=e&255;--a>=0&&(c*=256);)this[t+a]=e/c&255;return t+n};Buffer.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||Yn(this,e,t,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};Buffer.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||Yn(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Rm(this,e,t,!0),t+2};Buffer.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||Yn(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Rm(this,e,t,!1),t+2};Buffer.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||Yn(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):Bm(this,e,t,!0),t+4};Buffer.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||Yn(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Bm(this,e,t,!1),t+4};Buffer.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t|0,!i){var o=Math.pow(2,8*n-1);Yn(this,e,t,n,o-1,-o)}var a=0,c=1,f=0;for(this[t]=e&255;++a<n&&(c*=256);)e<0&&f===0&&this[t+a-1]!==0&&(f=1),this[t+a]=(e/c>>0)-f&255;return t+n};Buffer.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t|0,!i){var o=Math.pow(2,8*n-1);Yn(this,e,t,n,o-1,-o)}var a=n-1,c=1,f=0;for(this[t+a]=e&255;--a>=0&&(c*=256);)e<0&&f===0&&this[t+a+1]!==0&&(f=1),this[t+a]=(e/c>>0)-f&255;return t+n};Buffer.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||Yn(this,e,t,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1};Buffer.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||Yn(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Rm(this,e,t,!0),t+2};Buffer.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||Yn(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Rm(this,e,t,!1),t+2};Buffer.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||Yn(this,e,t,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Bm(this,e,t,!0),t+4};Buffer.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||Yn(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Bm(this,e,t,!1),t+4};Buffer.prototype.writeFloatLE=function(e,t,n){return yD(this,e,t,!0,n)};Buffer.prototype.writeFloatBE=function(e,t,n){return yD(this,e,t,!1,n)};Buffer.prototype.writeDoubleLE=function(e,t,n){return gD(this,e,t,!0,n)};Buffer.prototype.writeDoubleBE=function(e,t,n){return gD(this,e,t,!1,n)};Buffer.prototype.copy=function(e,t,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var o=i-n,a;if(this===e&&n<t&&t<i)for(a=o-1;a>=0;--a)e[a+t]=this[a+n];else if(o<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(a=0;a<o;++a)e[a+t]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o};Buffer.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),e.length===1){var o=e.charCodeAt(0);o<256&&(e=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!Buffer.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var a;if(typeof e=="number")for(a=t;a<n;++a)this[a]=e;else{var c=as(e)?e:Fm(new Buffer(e,i).toString()),f=c.length;for(a=0;a<n-t;++a)this[a+t]=c[a%f]}return this};f7=/[^+\/0-9A-Za-z-_]/g});var p=sb(()=>{_D()});var jm=ce(($D,Rb)=>{h();p();(function(r){if(typeof $D=="object"&&typeof Rb<"u")Rb.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var e;typeof window<"u"?e=window:typeof globalThis<"u"?e=globalThis:typeof self<"u"?e=self:e=this,e.localforage=r()}})(function(){var r,e,t;return function n(i,o,a){function c(m,w){if(!o[m]){if(!i[m]){var x=typeof Vu=="function"&&Vu;if(!w&&x)return x(m,!0);if(f)return f(m,!0);var T=new Error("Cannot find module '"+m+"'");throw T.code="MODULE_NOT_FOUND",T}var F=o[m]={exports:{}};i[m][0].call(F.exports,function(N){var ue=i[m][1][N];return c(ue||N)},F,F.exports,n,i,o,a)}return o[m].exports}for(var f=typeof Vu=="function"&&Vu,d=0;d<a.length;d++)c(a[d]);return c}({1:[function(n,i,o){(function(a){"use strict";var c=a.MutationObserver||a.WebKitMutationObserver,f;if(c){var d=0,m=new c(N),w=a.document.createTextNode("");m.observe(w,{characterData:!0}),f=function(){w.data=d=++d%2}}else if(!a.setImmediate&&typeof a.MessageChannel<"u"){var x=new a.MessageChannel;x.port1.onmessage=N,f=function(){x.port2.postMessage(0)}}else"document"in a&&"onreadystatechange"in a.document.createElement("script")?f=function(){var pe=a.document.createElement("script");pe.onreadystatechange=function(){N(),pe.onreadystatechange=null,pe.parentNode.removeChild(pe),pe=null},a.document.documentElement.appendChild(pe)}:f=function(){setTimeout(N,0)};var T,F=[];function N(){T=!0;for(var pe,De,re=F.length;re;){for(De=F,F=[],pe=-1;++pe<re;)De[pe]();re=F.length}T=!1}i.exports=ue;function ue(pe){F.push(pe)===1&&!T&&f()}}).call(this,typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(n,i,o){"use strict";var a=n(1);function c(){}var f={},d=["REJECTED"],m=["FULFILLED"],w=["PENDING"];i.exports=x;function x(Y){if(typeof Y!="function")throw new TypeError("resolver must be a function");this.state=w,this.queue=[],this.outcome=void 0,Y!==c&&ue(this,Y)}x.prototype.catch=function(Y){return this.then(null,Y)},x.prototype.then=function(Y,ge){if(typeof Y!="function"&&this.state===m||typeof ge!="function"&&this.state===d)return this;var _e=new this.constructor(c);if(this.state!==w){var Me=this.state===m?Y:ge;F(_e,Me,this.outcome)}else this.queue.push(new T(_e,Y,ge));return _e};function T(Y,ge,_e){this.promise=Y,typeof ge=="function"&&(this.onFulfilled=ge,this.callFulfilled=this.otherCallFulfilled),typeof _e=="function"&&(this.onRejected=_e,this.callRejected=this.otherCallRejected)}T.prototype.callFulfilled=function(Y){f.resolve(this.promise,Y)},T.prototype.otherCallFulfilled=function(Y){F(this.promise,this.onFulfilled,Y)},T.prototype.callRejected=function(Y){f.reject(this.promise,Y)},T.prototype.otherCallRejected=function(Y){F(this.promise,this.onRejected,Y)};function F(Y,ge,_e){a(function(){var Me;try{Me=ge(_e)}catch(vt){return f.reject(Y,vt)}Me===Y?f.reject(Y,new TypeError("Cannot resolve promise with itself")):f.resolve(Y,Me)})}f.resolve=function(Y,ge){var _e=pe(N,ge);if(_e.status==="error")return f.reject(Y,_e.value);var Me=_e.value;if(Me)ue(Y,Me);else{Y.state=m,Y.outcome=ge;for(var vt=-1,Nt=Y.queue.length;++vt<Nt;)Y.queue[vt].callFulfilled(ge)}return Y},f.reject=function(Y,ge){Y.state=d,Y.outcome=ge;for(var _e=-1,Me=Y.queue.length;++_e<Me;)Y.queue[_e].callRejected(ge);return Y};function N(Y){var ge=Y&&Y.then;if(Y&&(typeof Y=="object"||typeof Y=="function")&&typeof ge=="function")return function(){ge.apply(Y,arguments)}}function ue(Y,ge){var _e=!1;function Me(qt){_e||(_e=!0,f.reject(Y,qt))}function vt(qt){_e||(_e=!0,f.resolve(Y,qt))}function Nt(){ge(vt,Me)}var Bt=pe(Nt);Bt.status==="error"&&Me(Bt.value)}function pe(Y,ge){var _e={};try{_e.value=Y(ge),_e.status="success"}catch(Me){_e.status="error",_e.value=Me}return _e}x.resolve=De;function De(Y){return Y instanceof this?Y:f.resolve(new this(c),Y)}x.reject=re;function re(Y){var ge=new this(c);return f.reject(ge,Y)}x.all=be;function be(Y){var ge=this;if(Object.prototype.toString.call(Y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _e=Y.length,Me=!1;if(!_e)return this.resolve([]);for(var vt=new Array(_e),Nt=0,Bt=-1,qt=new this(c);++Bt<_e;)hr(Y[Bt],Bt);return qt;function hr(Mt,jr){ge.resolve(Mt).then(Cn,function(Rr){Me||(Me=!0,f.reject(qt,Rr))});function Cn(Rr){vt[jr]=Rr,++Nt===_e&&!Me&&(Me=!0,f.resolve(qt,vt))}}}x.race=Pe;function Pe(Y){var ge=this;if(Object.prototype.toString.call(Y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _e=Y.length,Me=!1;if(!_e)return this.resolve([]);for(var vt=-1,Nt=new this(c);++vt<_e;)Bt(Y[vt]);return Nt;function Bt(qt){ge.resolve(qt).then(function(hr){Me||(Me=!0,f.resolve(Nt,hr))},function(hr){Me||(Me=!0,f.reject(Nt,hr))})}}},{1:1}],3:[function(n,i,o){(function(a){"use strict";typeof a.Promise!="function"&&(a.Promise=n(2))}).call(this,typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(n,i,o){"use strict";var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _};function c(_,k){if(!(_ instanceof k))throw new TypeError("Cannot call a class as a function")}function f(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=f();function m(){try{if(!d||!d.open)return!1;var _=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),k=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!_||k)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function w(_,k){_=_||[],k=k||{};try{return new Blob(_,k)}catch(v){if(v.name!=="TypeError")throw v;for(var A=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,B=new A,O=0;O<_.length;O+=1)B.append(_[O]);return B.getBlob(k.type)}}typeof Promise>"u"&&n(3);var x=Promise;function T(_,k){k&&_.then(function(A){k(null,A)},function(A){k(A)})}function F(_,k,A){typeof k=="function"&&_.then(k),typeof A=="function"&&_.catch(A)}function N(_){return typeof _!="string"&&(console.warn(_+" used as a key, but it is not a string."),_=String(_)),_}function ue(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var pe="local-forage-detect-blob-support",De=void 0,re={},be=Object.prototype.toString,Pe="readonly",Y="readwrite";function ge(_){for(var k=_.length,A=new ArrayBuffer(k),B=new Uint8Array(A),O=0;O<k;O++)B[O]=_.charCodeAt(O);return A}function _e(_){return new x(function(k){var A=_.transaction(pe,Y),B=w([""]);A.objectStore(pe).put(B,"key"),A.onabort=function(O){O.preventDefault(),O.stopPropagation(),k(!1)},A.oncomplete=function(){var O=navigator.userAgent.match(/Chrome\/(\d+)/),v=navigator.userAgent.match(/Edge\//);k(v||!O||parseInt(O[1],10)>=43)}}).catch(function(){return!1})}function Me(_){return typeof De=="boolean"?x.resolve(De):_e(_).then(function(k){return De=k,De})}function vt(_){var k=re[_.name],A={};A.promise=new x(function(B,O){A.resolve=B,A.reject=O}),k.deferredOperations.push(A),k.dbReady?k.dbReady=k.dbReady.then(function(){return A.promise}):k.dbReady=A.promise}function Nt(_){var k=re[_.name],A=k.deferredOperations.pop();if(A)return A.resolve(),A.promise}function Bt(_,k){var A=re[_.name],B=A.deferredOperations.pop();if(B)return B.reject(k),B.promise}function qt(_,k){return new x(function(A,B){if(re[_.name]=re[_.name]||wr(),_.db)if(k)vt(_),_.db.close();else return A(_.db);var O=[_.name];k&&O.push(_.version);var v=d.open.apply(d,O);k&&(v.onupgradeneeded=function(z){var H=v.result;try{H.createObjectStore(_.storeName),z.oldVersion<=1&&H.createObjectStore(pe)}catch(X){if(X.name==="ConstraintError")console.warn('The database "'+_.name+'" has been upgraded from version '+z.oldVersion+" to version "+z.newVersion+', but the storage "'+_.storeName+'" already exists.');else throw X}}),v.onerror=function(z){z.preventDefault(),B(v.error)},v.onsuccess=function(){var z=v.result;z.onversionchange=function(H){H.target.close()},A(z),Nt(_)}})}function hr(_){return qt(_,!1)}function Mt(_){return qt(_,!0)}function jr(_,k){if(!_.db)return!0;var A=!_.db.objectStoreNames.contains(_.storeName),B=_.version<_.db.version,O=_.version>_.db.version;if(B&&(_.version!==k&&console.warn('The database "'+_.name+`" can't be downgraded from version `+_.db.version+" to version "+_.version+"."),_.version=_.db.version),O||A){if(A){var v=_.db.version+1;v>_.version&&(_.version=v)}return!0}return!1}function Cn(_){return new x(function(k,A){var B=new FileReader;B.onerror=A,B.onloadend=function(O){var v=btoa(O.target.result||"");k({__local_forage_encoded_blob:!0,data:v,type:_.type})},B.readAsBinaryString(_)})}function Rr(_){var k=ge(atob(_.data));return w([k],{type:_.type})}function Wr(_){return _&&_.__local_forage_encoded_blob}function ks(_){var k=this,A=k._initReady().then(function(){var B=re[k._dbInfo.name];if(B&&B.dbReady)return B.dbReady});return F(A,_,_),A}function nr(_){vt(_);for(var k=re[_.name],A=k.forages,B=0;B<A.length;B++){var O=A[B];O._dbInfo.db&&(O._dbInfo.db.close(),O._dbInfo.db=null)}return _.db=null,hr(_).then(function(v){return _.db=v,jr(_)?Mt(_):v}).then(function(v){_.db=k.db=v;for(var z=0;z<A.length;z++)A[z]._dbInfo.db=v}).catch(function(v){throw Bt(_,v),v})}function Wt(_,k,A,B){B===void 0&&(B=1);try{var O=_.db.transaction(_.storeName,k);A(null,O)}catch(v){if(B>0&&(!_.db||v.name==="InvalidStateError"||v.name==="NotFoundError"))return x.resolve().then(function(){if(!_.db||v.name==="NotFoundError"&&!_.db.objectStoreNames.contains(_.storeName)&&_.version<=_.db.version)return _.db&&(_.version=_.db.version+1),Mt(_)}).then(function(){return nr(_).then(function(){Wt(_,k,A,B-1)})}).catch(A);A(v)}}function wr(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Ve(_){var k=this,A={db:null};if(_)for(var B in _)A[B]=_[B];var O=re[A.name];O||(O=wr(),re[A.name]=O),O.forages.push(k),k._initReady||(k._initReady=k.ready,k.ready=ks);var v=[];function z(){return x.resolve()}for(var H=0;H<O.forages.length;H++){var X=O.forages[H];X!==k&&v.push(X._initReady().catch(z))}var G=O.forages.slice(0);return x.all(v).then(function(){return A.db=O.db,hr(A)}).then(function(te){return A.db=te,jr(A,k._defaultConfig.version)?Mt(A):te}).then(function(te){A.db=O.db=te,k._dbInfo=A;for(var me=0;me<G.length;me++){var $e=G[me];$e!==k&&($e._dbInfo.db=A.db,$e._dbInfo.version=A.version)}})}function Xr(_,k){var A=this;_=N(_);var B=new x(function(O,v){A.ready().then(function(){Wt(A._dbInfo,Pe,function(z,H){if(z)return v(z);try{var X=H.objectStore(A._dbInfo.storeName),G=X.get(_);G.onsuccess=function(){var te=G.result;te===void 0&&(te=null),Wr(te)&&(te=Rr(te)),O(te)},G.onerror=function(){v(G.error)}}catch(te){v(te)}})}).catch(v)});return T(B,k),B}function Ui(_,k){var A=this,B=new x(function(O,v){A.ready().then(function(){Wt(A._dbInfo,Pe,function(z,H){if(z)return v(z);try{var X=H.objectStore(A._dbInfo.storeName),G=X.openCursor(),te=1;G.onsuccess=function(){var me=G.result;if(me){var $e=me.value;Wr($e)&&($e=Rr($e));var Le=_($e,me.key,te++);Le!==void 0?O(Le):me.continue()}else O()},G.onerror=function(){v(G.error)}}catch(me){v(me)}})}).catch(v)});return T(B,k),B}function Mi(_,k,A){var B=this;_=N(_);var O=new x(function(v,z){var H;B.ready().then(function(){return H=B._dbInfo,be.call(k)==="[object Blob]"?Me(H.db).then(function(X){return X?k:Cn(k)}):k}).then(function(X){Wt(B._dbInfo,Y,function(G,te){if(G)return z(G);try{var me=te.objectStore(B._dbInfo.storeName);X===null&&(X=void 0);var $e=me.put(X,_);te.oncomplete=function(){X===void 0&&(X=null),v(X)},te.onabort=te.onerror=function(){var Le=$e.error?$e.error:$e.transaction.error;z(Le)}}catch(Le){z(Le)}})}).catch(z)});return T(O,A),O}function rs(_,k){var A=this;_=N(_);var B=new x(function(O,v){A.ready().then(function(){Wt(A._dbInfo,Y,function(z,H){if(z)return v(z);try{var X=H.objectStore(A._dbInfo.storeName),G=X.delete(_);H.oncomplete=function(){O()},H.onerror=function(){v(G.error)},H.onabort=function(){var te=G.error?G.error:G.transaction.error;v(te)}}catch(te){v(te)}})}).catch(v)});return T(B,k),B}function Br(_){var k=this,A=new x(function(B,O){k.ready().then(function(){Wt(k._dbInfo,Y,function(v,z){if(v)return O(v);try{var H=z.objectStore(k._dbInfo.storeName),X=H.clear();z.oncomplete=function(){B()},z.onabort=z.onerror=function(){var G=X.error?X.error:X.transaction.error;O(G)}}catch(G){O(G)}})}).catch(O)});return T(A,_),A}function Ki(_){var k=this,A=new x(function(B,O){k.ready().then(function(){Wt(k._dbInfo,Pe,function(v,z){if(v)return O(v);try{var H=z.objectStore(k._dbInfo.storeName),X=H.count();X.onsuccess=function(){B(X.result)},X.onerror=function(){O(X.error)}}catch(G){O(G)}})}).catch(O)});return T(A,_),A}function bn(_,k){var A=this,B=new x(function(O,v){if(_<0){O(null);return}A.ready().then(function(){Wt(A._dbInfo,Pe,function(z,H){if(z)return v(z);try{var X=H.objectStore(A._dbInfo.storeName),G=!1,te=X.openKeyCursor();te.onsuccess=function(){var me=te.result;if(!me){O(null);return}_===0||G?O(me.key):(G=!0,me.advance(_))},te.onerror=function(){v(te.error)}}catch(me){v(me)}})}).catch(v)});return T(B,k),B}function Vr(_){var k=this,A=new x(function(B,O){k.ready().then(function(){Wt(k._dbInfo,Pe,function(v,z){if(v)return O(v);try{var H=z.objectStore(k._dbInfo.storeName),X=H.openKeyCursor(),G=[];X.onsuccess=function(){var te=X.result;if(!te){B(G);return}G.push(te.key),te.continue()},X.onerror=function(){O(X.error)}}catch(te){O(te)}})}).catch(O)});return T(A,_),A}function go(_,k){k=ue.apply(this,arguments);var A=this.config();_=typeof _!="function"&&_||{},_.name||(_.name=_.name||A.name,_.storeName=_.storeName||A.storeName);var B=this,O;if(!_.name)O=x.reject("Invalid arguments");else{var v=_.name===A.name&&B._dbInfo.db,z=v?x.resolve(B._dbInfo.db):hr(_).then(function(H){var X=re[_.name],G=X.forages;X.db=H;for(var te=0;te<G.length;te++)G[te]._dbInfo.db=H;return H});_.storeName?O=z.then(function(H){if(!!H.objectStoreNames.contains(_.storeName)){var X=H.version+1;vt(_);var G=re[_.name],te=G.forages;H.close();for(var me=0;me<te.length;me++){var $e=te[me];$e._dbInfo.db=null,$e._dbInfo.version=X}var Le=new x(function(Qe,dt){var mt=d.open(_.name,X);mt.onerror=function(Ot){var cr=mt.result;cr.close(),dt(Ot)},mt.onupgradeneeded=function(){var Ot=mt.result;Ot.deleteObjectStore(_.storeName)},mt.onsuccess=function(){var Ot=mt.result;Ot.close(),Qe(Ot)}});return Le.then(function(Qe){G.db=Qe;for(var dt=0;dt<te.length;dt++){var mt=te[dt];mt._dbInfo.db=Qe,Nt(mt._dbInfo)}}).catch(function(Qe){throw(Bt(_,Qe)||x.resolve()).catch(function(){}),Qe})}}):O=z.then(function(H){vt(_);var X=re[_.name],G=X.forages;H.close();for(var te=0;te<G.length;te++){var me=G[te];me._dbInfo.db=null}var $e=new x(function(Le,Qe){var dt=d.deleteDatabase(_.name);dt.onerror=function(){var mt=dt.result;mt&&mt.close(),Qe(dt.error)},dt.onblocked=function(){console.warn('dropInstance blocked for database "'+_.name+'" until all open connections are closed')},dt.onsuccess=function(){var mt=dt.result;mt&&mt.close(),Le(mt)}});return $e.then(function(Le){X.db=Le;for(var Qe=0;Qe<G.length;Qe++){var dt=G[Qe];Nt(dt._dbInfo)}}).catch(function(Le){throw(Bt(_,Le)||x.resolve()).catch(function(){}),Le})})}return T(O,k),O}var Pa={_driver:"asyncStorage",_initStorage:Ve,_support:m(),iterate:Ui,getItem:Xr,setItem:Mi,removeItem:rs,clear:Br,length:Ki,key:bn,keys:Vr,dropInstance:go};function In(){return typeof openDatabase=="function"}var vn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Sa="~~local_forage_type~",Qr=/^~~local_forage_type~([^~]+)~/,ur="__lfsc__:",zn=ur.length,qn="arbf",wo="blob",cn="si08",$="ui08",J="uic8",he="si16",ve="si32",je="ur16",or="ui32",tt="fl32",ut="fl64",qe=zn+qn.length,yt=Object.prototype.toString;function pt(_){var k=_.length*.75,A=_.length,B,O=0,v,z,H,X;_[_.length-1]==="="&&(k--,_[_.length-2]==="="&&k--);var G=new ArrayBuffer(k),te=new Uint8Array(G);for(B=0;B<A;B+=4)v=vn.indexOf(_[B]),z=vn.indexOf(_[B+1]),H=vn.indexOf(_[B+2]),X=vn.indexOf(_[B+3]),te[O++]=v<<2|z>>4,te[O++]=(z&15)<<4|H>>2,te[O++]=(H&3)<<6|X&63;return G}function Pr(_){var k=new Uint8Array(_),A="",B;for(B=0;B<k.length;B+=3)A+=vn[k[B]>>2],A+=vn[(k[B]&3)<<4|k[B+1]>>4],A+=vn[(k[B+1]&15)<<2|k[B+2]>>6],A+=vn[k[B+2]&63];return k.length%3===2?A=A.substring(0,A.length-1)+"=":k.length%3===1&&(A=A.substring(0,A.length-2)+"=="),A}function bo(_,k){var A="";if(_&&(A=yt.call(_)),_&&(A==="[object ArrayBuffer]"||_.buffer&&yt.call(_.buffer)==="[object ArrayBuffer]")){var B,O=ur;_ instanceof ArrayBuffer?(B=_,O+=qn):(B=_.buffer,A==="[object Int8Array]"?O+=cn:A==="[object Uint8Array]"?O+=$:A==="[object Uint8ClampedArray]"?O+=J:A==="[object Int16Array]"?O+=he:A==="[object Uint16Array]"?O+=je:A==="[object Int32Array]"?O+=ve:A==="[object Uint32Array]"?O+=or:A==="[object Float32Array]"?O+=tt:A==="[object Float64Array]"?O+=ut:k(new Error("Failed to get type for BinaryArray"))),k(O+Pr(B))}else if(A==="[object Blob]"){var v=new FileReader;v.onload=function(){var z=Sa+_.type+"~"+Pr(this.result);k(ur+wo+z)},v.readAsArrayBuffer(_)}else try{k(JSON.stringify(_))}catch(z){console.error("Couldn't convert value into a JSON string: ",_),k(null,z)}}function Fs(_){if(_.substring(0,zn)!==ur)return JSON.parse(_);var k=_.substring(qe),A=_.substring(zn,qe),B;if(A===wo&&Qr.test(k)){var O=k.match(Qr);B=O[1],k=k.substring(O[0].length)}var v=pt(k);switch(A){case qn:return v;case wo:return w([v],{type:B});case cn:return new Int8Array(v);case $:return new Uint8Array(v);case J:return new Uint8ClampedArray(v);case he:return new Int16Array(v);case je:return new Uint16Array(v);case ve:return new Int32Array(v);case or:return new Uint32Array(v);case tt:return new Float32Array(v);case ut:return new Float64Array(v);default:throw new Error("Unkown type: "+A)}}var vo={serialize:bo,deserialize:Fs,stringToBuffer:pt,bufferToString:Pr};function Rs(_,k,A,B){_.executeSql("CREATE TABLE IF NOT EXISTS "+k.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],A,B)}function Ru(_){var k=this,A={db:null};if(_)for(var B in _)A[B]=typeof _[B]!="string"?_[B].toString():_[B];var O=new x(function(v,z){try{A.db=openDatabase(A.name,String(A.version),A.description,A.size)}catch(H){return z(H)}A.db.transaction(function(H){Rs(H,A,function(){k._dbInfo=A,v()},function(X,G){z(G)})},z)});return A.serializer=vo,O}function ji(_,k,A,B,O,v){_.executeSql(A,B,O,function(z,H){H.code===H.SYNTAX_ERR?z.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[k.storeName],function(X,G){G.rows.length?v(X,H):Rs(X,k,function(){X.executeSql(A,B,O,v)},v)},v):v(z,H)},v)}function yh(_,k){var A=this;_=N(_);var B=new x(function(O,v){A.ready().then(function(){var z=A._dbInfo;z.db.transaction(function(H){ji(H,z,"SELECT * FROM "+z.storeName+" WHERE key = ? LIMIT 1",[_],function(X,G){var te=G.rows.length?G.rows.item(0).value:null;te&&(te=z.serializer.deserialize(te)),O(te)},function(X,G){v(G)})})}).catch(v)});return T(B,k),B}function si(_,k){var A=this,B=new x(function(O,v){A.ready().then(function(){var z=A._dbInfo;z.db.transaction(function(H){ji(H,z,"SELECT * FROM "+z.storeName,[],function(X,G){for(var te=G.rows,me=te.length,$e=0;$e<me;$e++){var Le=te.item($e),Qe=Le.value;if(Qe&&(Qe=z.serializer.deserialize(Qe)),Qe=_(Qe,Le.key,$e+1),Qe!==void 0){O(Qe);return}}O()},function(X,G){v(G)})})}).catch(v)});return T(B,k),B}function $i(_,k,A,B){var O=this;_=N(_);var v=new x(function(z,H){O.ready().then(function(){k===void 0&&(k=null);var X=k,G=O._dbInfo;G.serializer.serialize(k,function(te,me){me?H(me):G.db.transaction(function($e){ji($e,G,"INSERT OR REPLACE INTO "+G.storeName+" (key, value) VALUES (?, ?)",[_,te],function(){z(X)},function(Le,Qe){H(Qe)})},function($e){if($e.code===$e.QUOTA_ERR){if(B>0){z($i.apply(O,[_,X,A,B-1]));return}H($e)}})})}).catch(H)});return T(v,A),v}function _o(_,k,A){return $i.apply(this,[_,k,A,1])}function Bu(_,k){var A=this;_=N(_);var B=new x(function(O,v){A.ready().then(function(){var z=A._dbInfo;z.db.transaction(function(H){ji(H,z,"DELETE FROM "+z.storeName+" WHERE key = ?",[_],function(){O()},function(X,G){v(G)})})}).catch(v)});return T(B,k),B}function Ou(_){var k=this,A=new x(function(B,O){k.ready().then(function(){var v=k._dbInfo;v.db.transaction(function(z){ji(z,v,"DELETE FROM "+v.storeName,[],function(){B()},function(H,X){O(X)})})}).catch(O)});return T(A,_),A}function mf(_){var k=this,A=new x(function(B,O){k.ready().then(function(){var v=k._dbInfo;v.db.transaction(function(z){ji(z,v,"SELECT COUNT(key) as c FROM "+v.storeName,[],function(H,X){var G=X.rows.item(0).c;B(G)},function(H,X){O(X)})})}).catch(O)});return T(A,_),A}function Lu(_,k){var A=this,B=new x(function(O,v){A.ready().then(function(){var z=A._dbInfo;z.db.transaction(function(H){ji(H,z,"SELECT key FROM "+z.storeName+" WHERE id = ? LIMIT 1",[_+1],function(X,G){var te=G.rows.length?G.rows.item(0).key:null;O(te)},function(X,G){v(G)})})}).catch(v)});return T(B,k),B}function fn(_){var k=this,A=new x(function(B,O){k.ready().then(function(){var v=k._dbInfo;v.db.transaction(function(z){ji(z,v,"SELECT key FROM "+v.storeName,[],function(H,X){for(var G=[],te=0;te<X.rows.length;te++)G.push(X.rows.item(te).key);B(G)},function(H,X){O(X)})})}).catch(O)});return T(A,_),A}function Da(_){return new x(function(k,A){_.transaction(function(B){B.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(O,v){for(var z=[],H=0;H<v.rows.length;H++)z.push(v.rows.item(H).name);k({db:_,storeNames:z})},function(O,v){A(v)})},function(B){A(B)})})}function b(_,k){k=ue.apply(this,arguments);var A=this.config();_=typeof _!="function"&&_||{},_.name||(_.name=_.name||A.name,_.storeName=_.storeName||A.storeName);var B=this,O;return _.name?O=new x(function(v){var z;_.name===A.name?z=B._dbInfo.db:z=openDatabase(_.name,"","",0),_.storeName?v({db:z,storeNames:[_.storeName]}):v(Da(z))}).then(function(v){return new x(function(z,H){v.db.transaction(function(X){function G(Le){return new x(function(Qe,dt){X.executeSql("DROP TABLE IF EXISTS "+Le,[],function(){Qe()},function(mt,Ot){dt(Ot)})})}for(var te=[],me=0,$e=v.storeNames.length;me<$e;me++)te.push(G(v.storeNames[me]));x.all(te).then(function(){z()}).catch(function(Le){H(Le)})},function(X){H(X)})})}):O=x.reject("Invalid arguments"),T(O,k),O}var S={_driver:"webSQLStorage",_initStorage:Ru,_support:In(),iterate:si,getItem:yh,setItem:_o,removeItem:Bu,clear:Ou,length:mf,key:Lu,keys:fn,dropInstance:b};function P(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function y(_,k){var A=_.name+"/";return _.storeName!==k.storeName&&(A+=_.storeName+"/"),A}function I(){var _="_localforage_support_test";try{return localStorage.setItem(_,!0),localStorage.removeItem(_),!1}catch{return!0}}function M(){return!I()||localStorage.length>0}function j(_){var k=this,A={};if(_)for(var B in _)A[B]=_[B];return A.keyPrefix=y(_,k._defaultConfig),M()?(k._dbInfo=A,A.serializer=vo,x.resolve()):x.reject()}function oe(_){var k=this,A=k.ready().then(function(){for(var B=k._dbInfo.keyPrefix,O=localStorage.length-1;O>=0;O--){var v=localStorage.key(O);v.indexOf(B)===0&&localStorage.removeItem(v)}});return T(A,_),A}function ye(_,k){var A=this;_=N(_);var B=A.ready().then(function(){var O=A._dbInfo,v=localStorage.getItem(O.keyPrefix+_);return v&&(v=O.serializer.deserialize(v)),v});return T(B,k),B}function Ke(_,k){var A=this,B=A.ready().then(function(){for(var O=A._dbInfo,v=O.keyPrefix,z=v.length,H=localStorage.length,X=1,G=0;G<H;G++){var te=localStorage.key(G);if(te.indexOf(v)===0){var me=localStorage.getItem(te);if(me&&(me=O.serializer.deserialize(me)),me=_(me,te.substring(z),X++),me!==void 0)return me}}});return T(B,k),B}function Ae(_,k){var A=this,B=A.rea