UNPKG

algopay-js

Version:

AlgoPay JavaScript Widget

59 lines (56 loc) 1.17 MB
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"D9Nj":[function(require,module,exports) { },{}],"Im3n":[function(require,module,exports) { module.exports={WINDOW_NOT_LOADED:"Window not loaded",WINDOW_IS_OPENED:"Windows is opened",WINDOW_NOT_OPENED:"Can not open popup window",INVALID_WINDOW:"Invalid window"}; },{}],"Mibp":[function(require,module,exports) { const{WINDOW_NOT_OPENED:t}=require("../utils/errors"),e={width:400,height:600};function o(o,n=e){let{name:r="",width:i,height:w,top:d=0,left:h=0}=n;i&&(window.outerWidth?h=Math.round((window.outerWidth-i)/2)+window.screenX:window.screen.width&&(h=Math.round((window.screen.width-i)/2))),w&&(window.outerHeight?d=Math.round((window.outerHeight-w)/2)+window.screenY:window.screen.height&&(d=Math.round((window.screen.height-w)/2))),i&&w&&(n={top:d,left:h,width:i,height:w,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1});const s=Object.keys(n).map(t=>{const e=n[t];if(null!=e&&"function"==typeof e.toString)return`${t}=${e.toString()}`}).filter(Boolean).join(",");let u;try{u=window.open(o,r,s)}catch(c){throw new Error(`${t} - ${c.stack||c.message}`)}if(!u||window.closed)throw new Error(`${t} - blocked`);return u}module.exports={openPopup:o}; },{"../utils/errors":"Im3n"}],"FRly":[function(require,module,exports) { "use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;function h(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){var n,o,a=h(r),u=a[0],i=a[1],f=new e(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o<d;o+=4)n=t[r.charCodeAt(o)]<<18|t[r.charCodeAt(o+1)]<<12|t[r.charCodeAt(o+2)]<<6|t[r.charCodeAt(o+3)],f[A++]=n>>16&255,f[A++]=n>>8&255,f[A++]=255&n;return 2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));return o.join("")}function d(t){for(var e,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63; },{}],"Quj6":[function(require,module,exports) { exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}; },{}],"aqZJ":[function(require,module,exports) { var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}; },{}],"aMB2":[function(require,module,exports) { var global = arguments[3]; var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(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 a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(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 e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;o<f;o++)if(h(t,o)===h(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===s)return a*u}else-1!==a&&(o-=o-a),a=-1}else for(e+s>f&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;l<s;l++)if(h(t,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return Q($(r,t.length-e),t,e,n)}function P(t,r,e,n){return Q(G(r),t,e,n)}function T(t,r,e,n){return P(t,r,e,n)}function B(t,r,e,n){return Q(K(r),t,e,n)}function U(t,r,e,n){return Q(H(r,t.length-e),t,e,n)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Y(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,f,s,h=t[i],a=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},f.isEncoding=function(t){switch(String(t).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}},f.concat=function(t,r){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var i=f.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!f.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},f.byteLength=v,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)b(this,r,r+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)b(this,r,r+3),b(this,r+1,r+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)b(this,r,r+7),b(this,r+1,r+6),b(this,r+2,r+5),b(this,r+3,r+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Y(this,0,t):E.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;c<s;++c)if(h[c]!==a[c]){o=h[c],u=a[c];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},f.prototype.indexOf=function(t,r,e){return R(this,t,r,e,!0)},f.prototype.lastIndexOf=function(t,r,e){return R(this,t,r,e,!1)},f.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=I));return e}function L(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=Z(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=f.prototype;else{var i=r-t;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},f.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},f.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===f&&0!==this[r+o-1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=f.isBuffer(t)?t:$(new f(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function X(t){if((t=J(t).replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function J(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Z(t){return t<16?"0"+t.toString(16):t.toString(16)}function $(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t} },{"base64-js":"FRly","ieee754":"Quj6","isarray":"aqZJ","buffer":"aMB2"}],"Es0F":[function(require,module,exports) { var Buffer = require("buffer").Buffer; var r=require("buffer").Buffer;function a(r=200){return new Promise(a=>setTimeout(a,r))}function t(a){if(a.constructor===Uint8Array)return r.from(a).toString("base64");if("string"==typeof a)return a;const t=Object.assign({},a);if(t.note&&t.note.constructor===Uint8Array&&(t.note=r.from(t.note).toString("base64")),t.assetMetadataHash&&t.assetMetadataHash.constructor===Uint8Array&&(t.assetMetadataHash=r.from(t.assetMetadataHash).toString("base64")),t.group&&t.group.constructor===Uint8Array&&(t.group=r.from(t.group).toString("base64")),"appl"===t.type&&t.appApprovalProgram&&t.appApprovalProgram.constructor===Uint8Array&&(t.appApprovalProgram=r.from(t.appApprovalProgram).toString("base64")),"appl"===t.type&&t.appClearProgram&&t.appClearProgram.constructor===Uint8Array&&(t.appClearProgram=r.from(t.appClearProgram).toString("base64")),"appl"===t.type&&t.appArgs&&t.appArgs.length>0)for(let o=0;o<t.appArgs.length;o++)t.appArgs[o].constructor===Uint8Array&&(t.appArgs[o]=r.from(t.appArgs[o]).toString("base64"));return t}module.exports={sleep:a,prepareTxn:t}; },{"buffer":"aMB2"}],"wWr0":[function(require,module,exports) { class e{constructor(e,t){this.channelName=e,this.onMessage=t,this._installListener(),this._requests=new Map,this._nextId=0,this._defaultTimeout=4e3}_installListener(){const e=this;this._listener=function(t){if(!t.data||"string"!=typeof t.data)return;let s;try{if(!(s=JSON.parse(t.data)).channel||s.channel!==e.channelName)return;if("object"!=typeof s.message)return}catch(n){return}if(void 0!==s.replyId){if("number"!=typeof s.replyId||s.replyId%1!=0)return;const t=e._requests.get(s.replyId);t&&(clearTimeout(t.timeout),e._requests.delete(s.replyId),t.resolve(s.message))}else{if("number"!=typeof s.id||s.id%1!=0||!e.onMessage)return;const n=e.channelName,i=s.id,r=t.origin,o=function(e){const s={channel:n,replyId:i,message:e};t.source.postMessage(JSON.stringify(s),r)};e.onMessage(s.message,t.origin,t.source,o,e)}},window.addEventListener("message",this._listener)}sendMessage(e,t,s,n){const i={channel:this.channelName,id:this.getNextId(),message:t};if(n&&n.waitForReply){const t=this;return new Promise(function(r,o){const a=setTimeout(function(){t._requests.get(i.id)&&(t._requests.delete(i.id),o(new Error("Timeout expired for the message response")))},n&&n.timeout?n.timeout:t._defaultTimeout);t._requests.set(i.id,{timeout:a,resolve:r}),e.postMessage(JSON.stringify(i),s)})}e.postMessage(JSON.stringify(i),s)}close(){window.removeEventListener("message",this._listener),this._listener=null,delete this._requests}getNextId(){return this._nextId+=1,this._nextId}}module.exports=e; },{}],"yOYY":[function(require,module,exports) { module.exports=require("./lib/messenger"); },{"./lib/messenger":"wWr0"}],"gIWE":[function(require,module,exports) { const e=require("@randlabs/communication-bridge"),s="wallet-bridge-communication-channel";class t{constructor(t){const i=this;this.options={waitForReply:!0,timeout:250},this.listenerCallback=t,this.bridge=new e(s,function(e,s,t,n){i.listenerCallback&&i.listenerCallback(e,t)})}sendMessage(e,s,t,i){return this.bridge.sendMessage(e,s,t,i||this.options)}setNewListener(e){this.listenerCallback=e}close(){this.bridge.close()}}module.exports=t; },{"@randlabs/communication-bridge":"yOYY"}],"xFUu":[function(require,module,exports) { var Buffer = require("buffer").Buffer; var t=require("buffer").Buffer;const{openPopup:i}=require("./popup/popup"),{sleep:r,prepareTxn:o}=require("./utils/utils"),n=require("./utils/errors"),s=require("./messaging/Messaging"),e=new s;class u{constructor(t){this.bridge=e,this.timeout=t&&t.timeout?t.timeout:16e5,this.url=t&&t.bridgeUrl?t.bridgeUrl:"https://wallet.myalgo.com/bridge",this.url.endsWith("/")&&(this.url=this.url.slice(0,-1)),this.currentConnectPopup=null,this.currentSigntxPopup=null,this.currentSignLogicSigPopup=null,this.options={waitForReply:!0,timeout:this.timeout},this.disableLedgerNano=!(!t||!t.disableLedgerNano)&&t.disableLedgerNano}async connect(t={shouldSelectOneAccount:!1,openManager:!1}){this.currentConnectPopup&&(this.currentConnectPopup.closed?this.currentConnectPopup=null:this.focusWindow(this.currentConnectPopup));try{this.currentConnectPopup=i(this.url+"/connect.html"),await this.waitForWindowToLoad(this.currentConnectPopup);const o=await this.bridge.sendMessage(this.currentConnectPopup,{method:"unlock",params:Object.assign(t,{disableLedgerNano:this.disableLedgerNano})},this.url,this.options);if(this.closeWindow(this.currentConnectPopup),this.currentConnectPopup=null,"error"===o.status)throw new Error(o.message);return o.data.accounts}catch(r){throw this.closeWindow(this.currentConnectPopup),this.currentConnectPopup=null,r}}async signTransaction(r){let n;this.currentSigntxPopup&&(this.currentSigntxPopup.closed?this.currentSigntxPopup=null:this.focusWindow(this.currentSigntxPopup)),n=Array.isArray(r)?Array.from(r).map(t=>o(t)):o(r);try{this.currentSigntxPopup=i(this.url+"/signtx.html"),await this.waitForWindowToLoad(this.currentSigntxPopup);const r=await this.bridge.sendMessage(this.currentSigntxPopup,{method:"transaction",params:{txn:n,settings:{disableLedgerNano:this.disableLedgerNano}}},this.url,this.options);if(this.closeWindow(this.currentSigntxPopup),this.currentSigntxPopup=null,"error"===r.status)throw new Error(r.message);if(Array.isArray(r.data)){const i=[];for(const o of r.data)o.blob=new Uint8Array(t.from(o.blob,"hex")),i.push(o);return i}return r.data.blob=new Uint8Array(t.from(r.data.blob,"hex")),r.data}catch(s){throw this.closeWindow(this.currentSigntxPopup),this.currentSigntxPopup=null,s}}async signLogicSig(r,o){this.currentSignLogicSigPopup&&(this.currentSignLogicSigPopup.closed?this.currentSignLogicSigPopup=null:this.focusWindow(this.currentSignLogicSigPopup));try{this.currentSignLogicSigPopup=i(this.url+"/logicsigtx.html"),await this.waitForWindowToLoad(this.currentSignLogicSigPopup);let s=r;r.constructor===Uint8Array&&(s=t.from(r).toString("base64"));const e=await this.bridge.sendMessage(this.currentSignLogicSigPopup,{method:"logicsig",params:{logic:s,address:o}},this.url,this.options);if(this.closeWindow(this.currentSignLogicSigPopup),this.currentSignLogicSigPopup=null,"error"===e.status)throw new Error(e.message);return new Uint8Array(t.from(e.data.signedTeal,"base64"))}catch(n){throw this.closeWindow(this.currentSignLogicSigPopup),this.currentSignLogicSigPopup=null,n}}async waitForWindowToLoad(t,i=30){for(let n=0;n<i&&(await r(300),t);n++)try{if("success"==(await e.sendMessage(t,{method:"status"},this.url)).status)return}catch(o){}throw new Error(n.WINDOW_NOT_LOADED)}closeWindow(t){t&&!t.closed&&t.close&&t.close()}focusWindow(t){throw t&&t.focus?(t.focus(),new Error(n.WINDOW_IS_OPENED)):new Error(n.INVALID_WINDOW)}}module.exports=u; },{"./popup/popup":"Mibp","./utils/utils":"Es0F","./utils/errors":"Im3n","./messaging/Messaging":"gIWE","buffer":"aMB2"}],"f7WR":[function(require,module,exports) { module.exports=require("./lib/main"); },{"./lib/main":"xFUu"}],"t5Xa":[function(require,module,exports) { "use strict";function o(o){let t=void 0;return"undefined"!=typeof window&&void 0!==window[o]&&(t=window[o]),t}function t(t){const r=o(t);if(!r)throw new Error(`${t} is not defined in Window`);return r}function r(){return t("document")}function e(){return o("document")}function n(){return t("navigator")}function i(){return o("navigator")}function g(){return t("location")}function c(){return o("location")}function u(){return t("crypto")}function p(){return o("crypto")}function a(){return t("localStorage")}function s(){return o("localStorage")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getLocalStorage=exports.getLocalStorageOrThrow=exports.getCrypto=exports.getCryptoOrThrow=exports.getLocation=exports.getLocationOrThrow=exports.getNavigator=exports.getNavigatorOrThrow=exports.getDocument=exports.getDocumentOrThrow=exports.getFromWindowOrThrow=exports.getFromWindow=void 0,exports.getFromWindow=o,exports.getFromWindowOrThrow=t,exports.getDocumentOrThrow=r,exports.getDocument=e,exports.getNavigatorOrThrow=n,exports.getNavigator=i,exports.getLocationOrThrow=g,exports.getLocation=c,exports.getCryptoOrThrow=u,exports.getCrypto=p,exports.getLocalStorageOrThrow=a,exports.getLocalStorage=s; },{}],"aOuB":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getWindowMetadata=void 0;const t=require("@walletconnect/window-getters");function e(){let e,n;try{e=t.getDocumentOrThrow(),n=t.getLocationOrThrow()}catch(r){return null}function o(...t){const n=e.getElementsByTagName("meta");for(let e=0;e<n.length;e++){const o=n[e],i=["itemprop","property","name"].map(t=>o.getAttribute(t)).filter(e=>!!e&&t.includes(e));if(i.length&&i){const t=o.getAttribute("content");if(t)return t}}return""}const i=function(){let t=o("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:o("description","og:description","twitter:description","keywords"),url:n.origin,icons:function(){const t=e.getElementsByTagName("link"),o=[];for(let e=0;e<t.length;e++){const i=t[e],r=i.getAttribute("rel");if(r&&r.toLowerCase().indexOf("icon")>-1){const t=i.getAttribute("href");if(t)if(-1===t.toLowerCase().indexOf("https:")&&-1===t.toLowerCase().indexOf("http:")&&0!==t.indexOf("//")){let e=n.protocol+"//"+n.host;if(0===t.indexOf("/"))e+=t;else{const o=n.pathname.split("/");o.pop(),e+=o.join("/")+"/"+t}o.push(e)}else if(0===t.indexOf("//")){const e=n.protocol+t;o.push(e)}else o.push(t)}}return o}(),name:i}}exports.getWindowMetadata=e; },{"@walletconnect/window-getters":"t5Xa"}],"g5IB":[function(require,module,exports) { var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a<e;)c&&c[a].run();a=-1,e=s.length}c=null,l=!1,u(t)}}function m(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new m(t,e)),1!==s.length||l||i(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}; },{}],"MXTL":[function(require,module,exports) { var process = require("process"); var e=require("process");Object.defineProperty(exports,"__esModule",{value:!0}),exports.SearchBotDeviceInfo=exports.ReactNativeInfo=exports.NodeInfo=exports.BrowserInfo=exports.BotInfo=void 0,exports.browserName=v,exports.detect=w,exports.detectOS=l,exports.getNodeVersion=S,exports.parseUserAgent=p;var o=function(){for(var e=0,o=0,n=arguments.length;o<n;o++)e+=arguments[o].length;var r=Array(e),i=0;for(o=0;o<n;o++)for(var t=arguments[o],s=0,a=t.length;s<a;s++,i++)r[i]=t[s];return r},n=function(){return function(e,o,n){this.name=e,this.version=o,this.os=n,this.type="browser"}}();exports.BrowserInfo=n;var r=function(){return function(o){this.version=o,this.type="node",this.name="node",this.os=e.platform}}();exports.NodeInfo=r;var i=function(){return function(e,o,n,r){this.name=e,this.version=o,this.os=n,this.bot=r,this.type="bot-device"}}();exports.SearchBotDeviceInfo=i;var t=function(){return function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}}();exports.BotInfo=t;var s=function(){return function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}}();exports.ReactNativeInfo=s;var a=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,d=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,u=3,c=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",a]],f=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function w(e){return e?p(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new s:"undefined"!=typeof navigator?p(navigator.userAgent):S()}function h(e){return""!==e&&c.reduce(function(o,n){var r=n[0],i=n[1];if(o)return o;var t=i.exec(e);return!!t&&[r,t]},!1)}function v(e){var o=h(e);return o?o[0]:null}function p(e){var r=h(e);if(!r)return null;var s=r[0],a=r[1];if("searchbot"===s)return new t;var c=a[1]&&a[1].split(/[._]/).slice(0,3);c?c.length<u&&(c=o(c,b(u-c.length))):c=[];var f=c.join("."),w=l(e),v=d.exec(e);return v&&v[1]?new i(s,f,w,v[1]):new n(s,f,w)}function l(e){for(var o=0,n=f.length;o<n;o++){var r=f[o],i=r[0];if(r[1].exec(e))return i}return null}function S(){return void 0!==e&&e.version?new r(e.version.slice(1)):null}function b(e){for(var o=[],n=0;n<e;n++)o.push("0");return o} },{"process":"g5IB"}],"HG3G":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.detectEnv=s,exports.detectOS=c,exports.getClientMeta=C,exports.getNavigatorOrThrow=exports.getNavigator=exports.getLocationOrThrow=exports.getLocation=exports.getLocalStorageOrThrow=exports.getLocalStorage=exports.getFromWindowOrThrow=exports.getFromWindow=exports.getDocumentOrThrow=exports.getDocument=exports.getCryptoOrThrow=exports.getCrypto=void 0,exports.isAndroid=a,exports.isBrowser=u,exports.isIOS=i,exports.isMobile=g,exports.isNode=p;var t=n(require("@walletconnect/window-metadata")),e=n(require("@walletconnect/window-getters")),o=require("detect-browser");function r(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,o=new WeakMap;return(r=function(t){return t?o:e})(t)}function n(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var o=r(e);if(o&&o.has(t))return o.get(t);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in t)if("default"!==c&&Object.prototype.hasOwnProperty.call(t,c)){var a=s?Object.getOwnPropertyDescriptor(t,c):null;a&&(a.get||a.set)?Object.defineProperty(n,c,a):n[c]=t[c]}return n.default=t,o&&o.set(t,n),n}function s(t){return(0,o.detect)(t)}function c(){const t=s();return t&&t.os?t.os:void 0}function a(){const t=c();return!!t&&t.toLowerCase().includes("android")}function i(){const t=c();return!!t&&(t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function g(){return!!c()&&(a()||i())}function p(){const t=s();return!(!t||!t.name)&&"node"===t.name.toLowerCase()}function u(){return!p()&&!!f()}const w=e.getFromWindow;exports.getFromWindow=w;const d=e.getFromWindowOrThrow;exports.getFromWindowOrThrow=d;const x=e.getDocumentOrThrow;exports.getDocumentOrThrow=x;const l=e.getDocument;exports.getDocument=l;const O=e.getNavigatorOrThrow;exports.getNavigatorOrThrow=O;const f=e.getNavigator;exports.getNavigator=f;const h=e.getLocationOrThrow;exports.getLocationOrThrow=h;const T=e.getLocation;exports.getLocation=T;const m=e.getCryptoOrThrow;exports.getCryptoOrThrow=m;const v=e.getCrypto;exports.getCrypto=v;const y=e.getLocalStorageOrThrow;exports.getLocalStorageOrThrow=y;const L=e.getLocalStorage;function C(){return t.getWindowMetadata()}exports.getLocalStorage=L; },{"@walletconnect/window-metadata":"aOuB","@walletconnect/window-getters":"t5Xa","detect-browser":"MXTL"}],"cWFs":[function(require,module,exports) { "use strict";function e(e){if("string"!=typeof e)throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch(r){return e}}function r(e){return"string"==typeof e?e:JSON.stringify(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.safeJsonParse=e,exports.safeJsonStringify=r; },{}],"mqNB":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.safeJsonStringify=exports.safeJsonParse=void 0;var e=r(require("@walletconnect/safe-json"));function t(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,n=new WeakMap;return(t=function(e){return e?n:r})(e)}function r(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=t(r);if(n&&n.has(e))return n.get(e);var o={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var f=s?Object.getOwnPropertyDescriptor(e,a):null;f&&(f.get||f.set)?Object.defineProperty(o,a,f):o[a]=e[a]}return o.default=e,n&&n.set(e,o),o}const n=e.safeJsonParse;exports.safeJsonParse=n;const o=e.safeJsonStringify;exports.safeJsonStringify=o; },{"@walletconnect/safe-json":"cWFs"}],"GD7b":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getLocal=r,exports.removeLocal=s,exports.setLocal=o;var e=require("./json"),t=require("./browser");function o(o,r){const s=(0,e.safeJsonStringify)(r),n=(0,t.getLocalStorage)();n&&n.setItem(o,s)}function r(o){let r=null,s=null;const n=(0,t.getLocalStorage)();return n&&(s=n.getItem(o)),r=s?(0,e.safeJsonParse)(s):s}function s(e){const o=(0,t.getLocalStorage)();o&&o.removeItem(e)} },{"./json":"mqNB","./browser":"HG3G"}],"GSCV":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatIOSMobile=o,exports.getMobileLinkRegistry=r,exports.getMobileRegistryEntry=n,exports.mobileLinkChoiceKey=void 0,exports.saveMobileLinkInfo=t;var e=require("./local");const i="WALLETCONNECT_DEEPLINK_CHOICE";function o(e,i){const o=encodeURIComponent(e);return i.universalLink?`${i.universalLink}/wc?uri=${o}`:i.deepLink?`${i.deepLink}${i.deepLink.endsWith(":")?"//":"/"}wc?uri=${o}`:""}function t(o){const t=o.href.split("?")[0];(0,e.setLocal)(i,Object.assign(Object.assign({},o),{href:t}))}function n(e,i){return e.filter(e=>e.name.toLowerCase().includes(i.toLowerCase()))[0]}function r(e,i){let o=e;return i&&(o=i.map(i=>n(e,i)).filter(Boolean)),o}exports.mobileLinkChoiceKey=i; },{"./local":"GD7b"}],"DVar":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatMobileRegistry=a,exports.formatMobileRegistryEntry=n,exports.getAppLogoUrl=o,exports.getDappRegistryUrl=r,exports.getWalletRegistryUrl=t;const e="https://registry.walletconnect.org";function t(){return e+"/data/wallets.json"}function r(){return e+"/data/dapps.json"}function o(t){return e+"/logo/sm/"+t+".jpeg"}function n(e,t="mobile"){return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:e.id?o(e.id):"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function a(e,t="mobile"){return Object.values(e).filter(e=>!!e[t].universal||!!e[t].native).map(e=>n(e,t))} },{}],"v8mk":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./browser");Object.keys(e).forEach(function(r){"default"!==r&&"__esModule"!==r&&(r in exports&&exports[r]===e[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return e[r]}}))});var r=require("./json");Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in exports&&exports[e]===r[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return r[e]}}))});var t=require("./local");Object.keys(t).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in exports&&exports[e]===t[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}}))});var o=require("./mobile");Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in exports&&exports[e]===o[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return o[e]}}))});var n=require("./registry");Object.keys(n).forEach(function(e){"default"!==e&&"__esModule"!==e&&(e in exports&&exports[e]===n[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}}))}); },{"./browser":"HG3G","./json":"mqNB","./local":"GD7b","./mobile":"GSCV","./registry":"DVar"}],"aicx":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stateMethods=exports.signingMethods=exports.reservedEvents=exports.infuraNetworks=void 0;const e=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"];exports.reservedEvents=e;const t=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];exports.signingMethods=t;const s=["eth_accounts","eth_chainId","net_version"];exports.stateMethods=s;const n={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"};exports.infuraNetworks=n; },{}],"o7RX":[function(require,module,exports) { var Buffer = require("buffer").Buffer; var t=require("buffer").Buffer;!function(t,i){"use strict";function r(t,i){if(!t)throw new Error(i||"Assertion failed")}function h(t,i){t.super_=i;var r=function(){};r.prototype=i.prototype,t.prototype=new r,t.prototype.constructor=t}function n(t,i,r){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==i&&"be"!==i||(r=i,i=10),this._init(t||0,i||10,r||"be"))}var e;"object"==typeof t?t.exports=n:i.BN=n,n.BN=n,n.wordSize=26;try{e=require("buffer").Buffer}catch(k){}function o(t,i,r){for(var h=0,n=Math.min(t.length,r),e=i;e<n;e++){var o=t.charCodeAt(e)-48;h<<=4,h|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return h}function s(t,i,r,h){for(var n=0,e=Math.min(t.length,r),o=i;o<e;o++){var s=t.charCodeAt(o)-48;n*=h,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,i){return t.cmp(i)>0?t:i},n.min=function(t,i){return t.cmp(i)<0?t:i},n.prototype._init=function(t,i,h){if("number"==typeof t)return this._initNumber(t,i,h);if("object"==typeof t)return this._initArray(t,i,h);"hex"===i&&(i=16),r(i===(0|i)&&i>=2&&i<=36);var n=0;"-"===(t=t.toString().replace(