@depay/widgets 6.2.0 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.bundle.js +20 -20
- package/dist/umd/index.bundle.js +20 -20
- package/package.json +2 -2
package/dist/umd/index.bundle.js
CHANGED
|
@@ -7066,25 +7066,6 @@
|
|
|
7066
7066
|
debuglog: debuglog
|
|
7067
7067
|
};
|
|
7068
7068
|
|
|
7069
|
-
var WalletConnect=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r});},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0});},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=88)}([function(t,e,n){(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.removeHexLeadingZeros=e.sanitizeHex=e.addHexPrefix=e.removeHexPrefix=e.padRight=e.padLeft=e.sanitizeBytes=e.swapHex=e.swapBytes=e.splitBytes=e.calcByteLength=e.trimRight=e.trimLeft=e.concatArrays=e.concatBuffers=e.getEncoding=e.getType=e.isArrayBuffer=e.isTypedArray=e.isBuffer=e.isHexString=e.isBinaryString=e.binaryToNumber=e.binaryToUtf8=e.binaryToHex=e.binaryToArray=e.binaryToBuffer=e.numberToBinary=e.numberToUtf8=e.numberToHex=e.numberToArray=e.numberToBuffer=e.utf8ToBinary=e.utf8ToNumber=e.utf8ToHex=e.utf8ToArray=e.utf8ToBuffer=e.hexToBinary=e.hexToNumber=e.hexToUtf8=e.hexToArray=e.hexToBuffer=e.arrayToBinary=e.arrayToNumber=e.arrayToUtf8=e.arrayToHex=e.arrayToBuffer=e.bufferToBinary=e.bufferToNumber=e.bufferToUtf8=e.bufferToHex=e.bufferToArray=void 0;const o=r(n(22)),i=r(n(57));function s(t){return new Uint8Array(t)}function a(t,e=!1){const n=t.toString("hex");return e?N(n):n}function u(t){return t.toString("utf8")}function c(t){return t.readUIntBE(0,t.length)}function l(t){return i.default(t)}function h(t,e=!1){return a(l(t),e)}function f(t){return u(l(t))}function d(t){return c(l(t))}function p(t){return Array.from(t).map(w).join("")}function g(e){return t.from(P(e),"hex")}function m(t){return s(g(t))}function _(t){return p(m(t))}function v(e){return t.from(e,"utf8")}function y(t){return s(v(t))}function w(t){return O((t>>>0).toString(2))}function b(t){return l(M(t))}function M(t){return new Uint8Array(R(t).map(t=>parseInt(t,2)))}function x(t,e){return h(M(t),e)}function E(t){return !("string"!=typeof t||!new RegExp(/^[01]+$/).test(t))&&t.length%8==0}function k(t,e){return !("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}function S(e){return t.isBuffer(e)}function C(t){return o.default.strict(t)&&!S(t)}function A(t){return !C(t)&&!S(t)&&void 0!==t.byteLength}function T(t,e=8){const n=t%e;return n?(t-n)/e*e+e:t}function R(t,e=8){const n=O(t).match(new RegExp(`.{${e}}`,"gi"));return Array.from(n||[])}function I(t){return R(t).map(L).join("")}function O(t,e=8,n="0"){return B(t,T(t.length,e),n)}function B(t,e,n="0"){return U(t,e,!0,n)}function P(t){return t.replace(/^0x/,"")}function N(t){return t.startsWith("0x")?t:"0x"+t}function L(t){return t.split("").reverse().join("")}function U(t,e,n,r="0"){const o=e-t.length;let i=t;if(o>0){const e=r.repeat(o);i=n?e+t:t+e;}return i}e.bufferToArray=s,e.bufferToHex=a,e.bufferToUtf8=u,e.bufferToNumber=c,e.bufferToBinary=function(t){return p(s(t))},e.arrayToBuffer=l,e.arrayToHex=h,e.arrayToUtf8=f,e.arrayToNumber=d,e.arrayToBinary=p,e.hexToBuffer=g,e.hexToArray=m,e.hexToUtf8=function(t){return u(g(t))},e.hexToNumber=function(t){return d(m(t))},e.hexToBinary=_,e.utf8ToBuffer=v,e.utf8ToArray=y,e.utf8ToHex=function(t,e=!1){return a(v(t),e)},e.utf8ToNumber=function(t){const e=parseInt(t,10);return function(t,e){if(!t)throw new Error(e)}(!function(t){return void 0===t}(e),"Number can only safely store up to 53 bits"),e},e.utf8ToBinary=function(t){return p(y(t))},e.numberToBuffer=function(t){return b(w(t))},e.numberToArray=function(t){return M(w(t))},e.numberToHex=function(t,e){return x(w(t),e)},e.numberToUtf8=function(t){return ""+t},e.numberToBinary=w,e.binaryToBuffer=b,e.binaryToArray=M,e.binaryToHex=x,e.binaryToUtf8=function(t){return f(M(t))},e.binaryToNumber=function(t){return d(M(t))},e.isBinaryString=E,e.isHexString=k,e.isBuffer=S,e.isTypedArray=C,e.isArrayBuffer=A,e.getType=function(t){return S(t)?"buffer":C(t)?"typed-array":A(t)?"array-buffer":Array.isArray(t)?"array":typeof t},e.getEncoding=function(t){return E(t)?"binary":k(t)?"hex":"utf8"},e.concatBuffers=function(...e){return t.concat(e)},e.concatArrays=function(...t){let e=[];return t.forEach(t=>e=e.concat(Array.from(t))),new Uint8Array([...e])},e.trimLeft=function(t,e){const n=t.length-e;return n>0&&(t=t.slice(n)),t},e.trimRight=function(t,e){return t.slice(0,e)},e.calcByteLength=T,e.splitBytes=R,e.swapBytes=I,e.swapHex=function(t){return x(I(_(t)))},e.sanitizeBytes=O,e.padLeft=B,e.padRight=function(t,e,n="0"){return U(t,e,!1,n)},e.removeHexPrefix=P,e.addHexPrefix=N,e.sanitizeHex=function(t){return (t=O(t=P(t),2))&&(t=N(t)),t},e.removeHexLeadingZeros=function(t){const e=t.startsWith("0x");return t=(t=P(t)).startsWith("0")?t.substring(1):t,e?N(t):t};}).call(this,n(17).Buffer);},function(t,e,n){n.d(e,"g",(function(){return r.detectEnv})),n.d(e,"r",(function(){return r.isMobile})),n.d(e,"m",(function(){return r.isBrowser})),n.d(e,"k",(function(){return r.getLocation})),n.d(e,"i",(function(){return r.getClientMeta})),n.d(e,"B",(function(){return r.setLocal})),n.d(e,"j",(function(){return r.getLocal})),n.d(e,"A",(function(){return r.removeLocal})),n.d(e,"v",(function(){return r.mobileLinkChoiceKey})),n.d(e,"C",(function(){return i})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return h})),n.d(e,"e",(function(){return f})),n.d(e,"f",(function(){return d})),n.d(e,"w",(function(){return S})),n.d(e,"x",(function(){return C})),n.d(e,"z",(function(){return m})),n.d(e,"D",(function(){return _})),n.d(e,"h",(function(){return A})),n.d(e,"u",(function(){return B})),n.d(e,"y",(function(){return P})),n.d(e,"l",(function(){return R})),n.d(e,"a",(function(){return I})),n.d(e,"o",(function(){return y})),n.d(e,"q",(function(){return w})),n.d(e,"p",(function(){return b})),n.d(e,"n",(function(){return M})),n.d(e,"s",(function(){return x})),n.d(e,"t",(function(){return E}));var r=n(20);const o=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],i=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign"];var s=n(14),a=n.n(s),u=n(0);function c(t){return u.arrayToBuffer(new Uint8Array(t))}function l(t,e){return u.arrayToHex(new Uint8Array(t),!e)}function h(t){return u.bufferToArray(t).buffer}function f(t){return u.hexToArray(t).buffer}function d(t,e){const n=u.removeHexPrefix(u.sanitizeHex(new a.a(t).toString(16)));return e?n:u.addHexPrefix(n)}var p=n(48);function g(t){return u.sanitizeHex(t)}const m=n(49).payloadId;function _(){return ((t,e)=>{for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e})()}function v(t,e){return u.isHexString(t,e)}function y(t){return void 0!==t.method}function w(t){return void 0!==t.result}function b(t){return void 0!==t.error}function M(t){return void 0!==t.event}function x(t){return o.includes(t)||t.startsWith("wc_")}function E(t){return !!t.method.startsWith("wc_")||!i.includes(t.method)}function k(t){t=Object(u.removeHexPrefix)(t.toLowerCase());const e=Object(u.removeHexPrefix)(Object(p.keccak_256)((n=t,u.utf8ToBuffer(n))));var n;let r="";for(let n=0;n<t.length;n++)parseInt(e[n],16)>7?r+=t[n].toUpperCase():r+=t[n];return Object(u.addHexPrefix)(r)}function S(t){var e,n,r;return (r=t)&&r.length&&!v(t[0])&&(t[0]=(e=t[0],u.utf8ToHex(e,!n))),t}function C(t){if(void 0!==t.type&&"0"!==t.type)return t;if(void 0===t.from||(!(e=t.from)||"0x"!==e.toLowerCase().substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(e)||!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e)&&e!==k(e)))throw new Error("Transaction object must include a valid 'from' value.");var e;function n(t){let e=t;var n;return ("number"==typeof t||"string"==typeof t&&!function(t){return ""===t||"string"==typeof t&&""===t.trim()}(t))&&(v(t)?"string"==typeof t&&(e=g(t)):e=d(t)),"string"==typeof e&&(n=e,e=u.removeHexLeadingZeros(u.addHexPrefix(n))),e}const r={from:g(t.from),to:void 0===t.to?"":g(t.to),gasPrice:void 0===t.gasPrice?"":n(t.gasPrice),gas:void 0===t.gas?void 0===t.gasLimit?"":n(t.gasLimit):n(t.gas),value:void 0===t.value?"":n(t.value),nonce:void 0===t.nonce?"":n(t.nonce),data:void 0===t.data?"":g(t.data)||"0x"},o=["gasPrice","gas","value","nonce"];return Object.keys(r).forEach(t=>{!r[t].trim().length&&o.includes(t)&&delete r[t];}),r}function A(t){const e=t.message||"Failed or Rejected Request";let n=-32e3;if(t&&!t.code)switch(e){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3;}return {code:n,message:e}}var T=n(21);function R(t){const e=-1!==t.indexOf("?")?t.indexOf("?"):void 0;return void 0!==e?t.substr(e):""}function I(t,e){let n=O(t);return n=Object.assign(Object.assign({},n),e),t=function(t){return T.stringify(t)}(n)}function O(t){return T.parse(t)}function B(t){return void 0!==t.bridge}function P(t){const e=t.indexOf(":"),n=-1!==t.indexOf("?")?t.indexOf("?"):void 0,r=t.substring(0,e);const o=function(t){const e=t.split("@");return {handshakeTopic:e[0],version:parseInt(e[1],10)}}(t.substring(e+1,n));const i=function(t){const e=O(t);return {key:e.key||"",bridge:e.bridge||""}}(void 0!==n?t.substr(n):"");return Object.assign(Object.assign({protocol:r},o),i)}},function(t,e,n){n.d(e,"b",(function(){return o})),n.d(e,"g",(function(){return i})),n.d(e,"a",(function(){return s})),n.d(e,"f",(function(){return a})),n.d(e,"e",(function(){return u})),n.d(e,"i",(function(){return c})),n.d(e,"j",(function(){return l})),n.d(e,"h",(function(){return r})),n.d(e,"d",(function(){return h})),n.d(e,"c",(function(){return f})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return p}));const r=512,o=256,i=256,s="AES-CBC",a="SHA-"+o,u="HMAC",c="SHA-256",l="SHA-512",h="encrypt",f="decrypt",d="sign",p="verify";},function(t,e,n){n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return i})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return a}));const r="INTERNAL_ERROR",o="SERVER_ERROR",i=[-32700,-32600,-32601,-32602,-32603],s=[-32e3,-32099],a={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[r]:{code:-32603,message:"Internal error"},[o]:{code:-32e3,message:"Server error"}};},function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}});}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n];}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n);};Object.defineProperty(e,"__esModule",{value:!0}),o(n(59),e),o(n(60),e);},function(t,e,n){function r(t){let e=void 0;return "undefined"!=typeof window&&void 0!==window[t]&&(e=window[t]),e}function o(t){const e=r(t);if(!e)throw new Error(t+" is not defined in Window");return e}Object.defineProperty(e,"__esModule",{value:!0}),e.getLocalStorage=e.getLocalStorageOrThrow=e.getCrypto=e.getCryptoOrThrow=e.getLocation=e.getLocationOrThrow=e.getNavigator=e.getNavigatorOrThrow=e.getDocument=e.getDocumentOrThrow=e.getFromWindowOrThrow=e.getFromWindow=void 0,e.getFromWindow=r,e.getFromWindowOrThrow=o,e.getDocumentOrThrow=function(){return o("document")},e.getDocument=function(){return r("document")},e.getNavigatorOrThrow=function(){return o("navigator")},e.getNavigator=function(){return r("navigator")},e.getLocationOrThrow=function(){return o("location")},e.getLocation=function(){return r("location")},e.getCryptoOrThrow=function(){return o("crypto")},e.getCrypto=function(){return r("crypto")},e.getLocalStorageOrThrow=function(){return o("localStorage")},e.getLocalStorage=function(){return r("localStorage")};},function(t,e,n){n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return l})),n.d(e,"f",(function(){return h}));var r=n(4),o=n(2);async function i(t,e=o.a){return r.getSubtleCrypto().importKey("raw",t,function(t){return t===o.a?{length:o.b,name:o.a}:{hash:{name:o.f},name:o.e}}(e),!0,function(t){return t===o.a?[o.d,o.c]:[o.k,o.l]}(e))}async function s(t,e,n){const s=r.getSubtleCrypto(),a=await i(e,o.a),u=await s.encrypt({iv:t,name:o.a},a,n);return new Uint8Array(u)}async function a(t,e,n){const s=r.getSubtleCrypto(),a=await i(e,o.a),u=await s.decrypt({iv:t,name:o.a},a,n);return new Uint8Array(u)}async function u(t,e){const n=r.getSubtleCrypto(),s=await i(t,o.e),a=await n.sign({length:o.g,name:o.e},s,e);return new Uint8Array(a)}async function c(t,e){const n=r.getSubtleCrypto(),s=await i(t,o.e),a=await n.sign({length:o.h,name:o.e},s,e);return new Uint8Array(a)}async function l(t){const e=r.getSubtleCrypto(),n=await e.digest({name:o.i},t);return new Uint8Array(n)}async function h(t){const e=r.getSubtleCrypto(),n=await e.digest({name:o.j},t);return new Uint8Array(n)}},function(t,e){var n,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t;},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)};},function(t,e,n){var r=n(43),o=n(44);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}};},function(t,e,n){n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return s}));var r=n(3);function o(t){return r.b.includes(t)}function i(t){return Object.keys(r.e).includes(t)?r.e[t]:r.e[r.a]}function s(t){const e=Object.values(r.e).find(e=>e.code===t);return e||r.e[r.a]}},function(t,e,n){var r=n(18);i.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return !1}}();var o=i.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function i(t,e,n){return i.TYPED_ARRAY_SUPPORT||this instanceof i?"number"==typeof t?u(this,t):function(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer)return function(t,e,n,r){if(n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");var o;o=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);i.TYPED_ARRAY_SUPPORT?o.__proto__=i.prototype:o=c(t,o);return o}(t,e,n,r);if("string"==typeof e)return function(t,e){var n=0|h(e),r=a(t,n),o=r.write(e);o!==n&&(r=r.slice(0,o));return r}(t,e);return function(t,e){if(i.isBuffer(e)){var n=0|s(e.length),r=a(t,n);return 0===r.length||e.copy(r,0,0,n),r}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return "number"!=typeof e.length||(o=e.length)!=o?a(t,0):c(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return c(t,e.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}(this,t,e,n):new i(t,e,n)}function s(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function a(t,e){var n;return i.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(e)).__proto__=i.prototype:(null===(n=t)&&(n=new i(e)),n.length=e),n}function u(t,e){var n=a(t,e<0?0:0|s(e));if(!i.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)n[r]=0;return n}function c(t,e){for(var n=e.length<0?0:0|s(e.length),r=a(t,n),o=0;o<n;o+=1)r[o]=255&e[o];return r}function l(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320);}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n);}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128);}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128);}else {if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128);}}return i}function h(t){return i.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:l(t).length)}i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),i.prototype.write=function(t,e,n){void 0===e||void 0===n&&"string"==typeof e?(n=this.length,e=0):isFinite(e)&&(e|=0,isFinite(n)?n|=0:n=void 0);var r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,n,r){return function(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}(l(e,t.length-n),t,n,r)}(this,t,e,n)},i.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),i.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=i.prototype;else {var o=e-t;n=new i(o,void 0);for(var s=0;s<o;++s)n[s]=this[s+t];}return n},i.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,s=r-n;if(this===t&&n<e&&e<r)for(o=s-1;o>=0;--o)t[o+e]=this[o+n];else if(s<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+s),e);return s},i.prototype.fill=function(t,e,n){if("string"==typeof t){if("string"==typeof e?(e=0,n=this.length):"string"==typeof n&&(n=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r);}}else "number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else {var s=i.isBuffer(t)?t:new i(t),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a];}return this},i.concat=function(t,e){if(!r(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a(null,0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var o=u(null,e),s=0;for(n=0;n<t.length;++n){var c=t[n];if(!i.isBuffer(c))throw new TypeError('"list" argument must be an Array of Buffers');c.copy(o,s),s+=c.length;}return o},i.byteLength=h,i.prototype._isBuffer=!0,i.isBuffer=function(t){return !(null==t||!t._isBuffer)},t.exports.alloc=function(t){var e=new i(t);return e.fill(0),e},t.exports.from=function(t){return new i(t)};},function(t,e,n){var r=n(33);n.d(e,"randomBytes",(function(){return r.a}));var o=n(34);n.d(e,"aesCbcDecrypt",(function(){return o.a})),n.d(e,"aesCbcEncrypt",(function(){return o.b}));var i=n(35);n.d(e,"hmacSha256Sign",(function(){return i.a}));n(40),n(13),n(2);},function(t,e,n){n.d(e,"a",(function(){return r}));class r{}},function(t,e,n){var r=n(36);n.o(r,"isConstantTime")&&n.d(e,"isConstantTime",(function(){return r.isConstantTime}));n(37);var o=n(38);n.o(o,"isConstantTime")&&n.d(e,"isConstantTime",(function(){return o.isConstantTime}));var i=n(39);n.d(e,"isConstantTime",(function(){return i.a}));},function(t,e,n){(function(t){!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function o(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t;}function i(t,e,n){if(i.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"));}var s;"object"==typeof t?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;try{s=n(53).Buffer;}catch(t){}function a(t,e,n){for(var r=0,o=Math.min(t.length,n),i=e;i<o;i++){var s=t.charCodeAt(i)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s;}return r}function u(t,e,n,r){for(var o=0,i=Math.min(t.length,n),s=e;s<i;s++){var a=t.charCodeAt(s)-48;o*=r,o+=a>=49?a-49+10:a>=17?a-17+10:a;}return o}i.isBN=function(t){return t instanceof i||null!==t&&"object"==typeof t&&t.constructor.wordSize===i.wordSize&&Array.isArray(t.words)},i.max=function(t,e){return t.cmp(e)>0?t:e},i.min=function(t,e){return t.cmp(e)<0?t:e},i.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var o=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&o++,16===e?this._parseHex(t,o):this._parseBase(t,e,o),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n);},i.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n);},i.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var i,s,a=0;if("be"===n)for(o=t.length-1,i=0;o>=0;o-=3)s=t[o]|t[o-1]<<8|t[o-2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===n)for(o=0,i=0;o<t.length;o+=3)s=t[o]|t[o+1]<<8|t[o+2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,o,i=0;for(n=t.length-6,r=0;n>=e;n-=6)o=a(t,n,n+6),this.words[r]|=o<<i&67108863,this.words[r+1]|=o>>>26-i&4194303,(i+=24)>=26&&(i-=26,r++);n+6!==e&&(o=a(t,e,n+6),this.words[r]|=o<<i&67108863,this.words[r+1]|=o>>>26-i&4194303),this.strip();},i.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,o=1;o<=67108863;o*=e)r++;r--,o=o/e|0;for(var i=t.length-n,s=i%r,a=Math.min(i,i-s)+n,c=0,l=n;l<a;l+=r)c=u(t,l,l+r,e),this.imuln(o),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var h=1;for(c=u(t,l,t.length,e),l=0;l<s;l++)h*=e;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);}},i.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red;},i.prototype.clone=function(){var t=new i(null);return this.copy(t),t},i.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var o=0|t.words[0],i=0|e.words[0],s=o*i,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var c=1;c<r;c++){for(var l=u>>>26,h=67108863&u,f=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=f;d++){var p=c-d|0;l+=(s=(o=0|t.words[p])*(i=0|e.words[d])+h)/67108864|0,h=67108863&s;}n.words[c]=0|h,u=0|l;}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}i.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var o=0,i=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<o|i)).toString(16);n=0!==(i=a>>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--);}for(0!==i&&(n=i.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var f=l[t],d=h[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?g+n:c[f-g.length]+g+n;}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36");},i.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(t,e){return r(void 0!==s),this.toArrayLike(s,t,e)},i.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},i.prototype.toArrayLike=function(t,e,n){var o=this.byteLength(),i=n||Math.max(1,o);r(o<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,c=new t(i),l=this.clone();if(u){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[a]=s;for(;a<i;a++)c[a]=0;}else {for(a=0;a<i-o;a++)c[a]=0;for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[i-a-1]=s;}return c},Math.clz32?i.prototype._countBits=function(t){return 32-Math.clz32(t)}:i.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},i.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},i.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},i.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},i.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},i.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},i.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},i.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},i.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},i.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},i.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},i.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},i.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},i.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},i.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},i.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var o=0;o<e;o++)this.words[o]=67108863&~this.words[o];return n>0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},i.prototype.notn=function(t){return this.clone().inotn(t)},i.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,o=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<o:this.words[n]&~(1<<o),this.strip()},i.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var o=0,i=0;i<r.length;i++)e=(0|n.words[i])+(0|r.words[i])+o,this.words[i]=67108863&e,o=e>>>26;for(;0!==o&&i<n.length;i++)e=(0|n.words[i])+o,this.words[i]=67108863&e,o=e>>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;i<n.length;i++)this.words[i]=n.words[i];return this},i.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},i.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,o=this.cmp(t);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,r=t):(n=t,r=this);for(var i=0,s=0;s<r.length;s++)i=(e=(0|n.words[s])-(0|r.words[s])+i)>>26,this.words[s]=67108863&e;for(;0!==i&&s<n.length;s++)i=(e=(0|n.words[s])+i)>>26,this.words[s]=67108863&e;if(0===i&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,n){var r,o,i,s=t.words,a=e.words,u=n.words,c=0,l=0|s[0],h=8191&l,f=l>>>13,d=0|s[1],p=8191&d,g=d>>>13,m=0|s[2],_=8191&m,v=m>>>13,y=0|s[3],w=8191&y,b=y>>>13,M=0|s[4],x=8191&M,E=M>>>13,k=0|s[5],S=8191&k,C=k>>>13,A=0|s[6],T=8191&A,R=A>>>13,I=0|s[7],O=8191&I,B=I>>>13,P=0|s[8],N=8191&P,L=P>>>13,U=0|s[9],j=8191&U,q=U>>>13,D=0|a[0],z=8191&D,W=D>>>13,F=0|a[1],H=8191&F,Y=F>>>13,J=0|a[2],$=8191&J,V=J>>>13,K=0|a[3],Q=8191&K,Z=K>>>13,X=0|a[4],G=8191&X,tt=X>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,ot=0|a[6],it=8191&ot,st=ot>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ht=8191<,ft=lt>>>13,dt=0|a[9],pt=8191&dt,gt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var mt=(c+(r=Math.imul(h,z))|0)+((8191&(o=(o=Math.imul(h,W))+Math.imul(f,z)|0))<<13)|0;c=((i=Math.imul(f,W))+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(p,z),o=(o=Math.imul(p,W))+Math.imul(g,z)|0,i=Math.imul(g,W);var _t=(c+(r=r+Math.imul(h,H)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(f,H)|0))<<13)|0;c=((i=i+Math.imul(f,Y)|0)+(o>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(_,z),o=(o=Math.imul(_,W))+Math.imul(v,z)|0,i=Math.imul(v,W),r=r+Math.imul(p,H)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,H)|0,i=i+Math.imul(g,Y)|0;var vt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,V)|0)+Math.imul(f,$)|0))<<13)|0;c=((i=i+Math.imul(f,V)|0)+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(w,z),o=(o=Math.imul(w,W))+Math.imul(b,z)|0,i=Math.imul(b,W),r=r+Math.imul(_,H)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(v,H)|0,i=i+Math.imul(v,Y)|0,r=r+Math.imul(p,$)|0,o=(o=o+Math.imul(p,V)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,V)|0;var yt=(c+(r=r+Math.imul(h,Q)|0)|0)+((8191&(o=(o=o+Math.imul(h,Z)|0)+Math.imul(f,Q)|0))<<13)|0;c=((i=i+Math.imul(f,Z)|0)+(o>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(x,z),o=(o=Math.imul(x,W))+Math.imul(E,z)|0,i=Math.imul(E,W),r=r+Math.imul(w,H)|0,o=(o=o+Math.imul(w,Y)|0)+Math.imul(b,H)|0,i=i+Math.imul(b,Y)|0,r=r+Math.imul(_,$)|0,o=(o=o+Math.imul(_,V)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,V)|0,r=r+Math.imul(p,Q)|0,o=(o=o+Math.imul(p,Z)|0)+Math.imul(g,Q)|0,i=i+Math.imul(g,Z)|0;var wt=(c+(r=r+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,tt)|0)+Math.imul(f,G)|0))<<13)|0;c=((i=i+Math.imul(f,tt)|0)+(o>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(S,z),o=(o=Math.imul(S,W))+Math.imul(C,z)|0,i=Math.imul(C,W),r=r+Math.imul(x,H)|0,o=(o=o+Math.imul(x,Y)|0)+Math.imul(E,H)|0,i=i+Math.imul(E,Y)|0,r=r+Math.imul(w,$)|0,o=(o=o+Math.imul(w,V)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,V)|0,r=r+Math.imul(_,Q)|0,o=(o=o+Math.imul(_,Z)|0)+Math.imul(v,Q)|0,i=i+Math.imul(v,Z)|0,r=r+Math.imul(p,G)|0,o=(o=o+Math.imul(p,tt)|0)+Math.imul(g,G)|0,i=i+Math.imul(g,tt)|0;var bt=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(o=(o=o+Math.imul(h,rt)|0)+Math.imul(f,nt)|0))<<13)|0;c=((i=i+Math.imul(f,rt)|0)+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(T,z),o=(o=Math.imul(T,W))+Math.imul(R,z)|0,i=Math.imul(R,W),r=r+Math.imul(S,H)|0,o=(o=o+Math.imul(S,Y)|0)+Math.imul(C,H)|0,i=i+Math.imul(C,Y)|0,r=r+Math.imul(x,$)|0,o=(o=o+Math.imul(x,V)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,V)|0,r=r+Math.imul(w,Q)|0,o=(o=o+Math.imul(w,Z)|0)+Math.imul(b,Q)|0,i=i+Math.imul(b,Z)|0,r=r+Math.imul(_,G)|0,o=(o=o+Math.imul(_,tt)|0)+Math.imul(v,G)|0,i=i+Math.imul(v,tt)|0,r=r+Math.imul(p,nt)|0,o=(o=o+Math.imul(p,rt)|0)+Math.imul(g,nt)|0,i=i+Math.imul(g,rt)|0;var Mt=(c+(r=r+Math.imul(h,it)|0)|0)+((8191&(o=(o=o+Math.imul(h,st)|0)+Math.imul(f,it)|0))<<13)|0;c=((i=i+Math.imul(f,st)|0)+(o>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),o=(o=Math.imul(O,W))+Math.imul(B,z)|0,i=Math.imul(B,W),r=r+Math.imul(T,H)|0,o=(o=o+Math.imul(T,Y)|0)+Math.imul(R,H)|0,i=i+Math.imul(R,Y)|0,r=r+Math.imul(S,$)|0,o=(o=o+Math.imul(S,V)|0)+Math.imul(C,$)|0,i=i+Math.imul(C,V)|0,r=r+Math.imul(x,Q)|0,o=(o=o+Math.imul(x,Z)|0)+Math.imul(E,Q)|0,i=i+Math.imul(E,Z)|0,r=r+Math.imul(w,G)|0,o=(o=o+Math.imul(w,tt)|0)+Math.imul(b,G)|0,i=i+Math.imul(b,tt)|0,r=r+Math.imul(_,nt)|0,o=(o=o+Math.imul(_,rt)|0)+Math.imul(v,nt)|0,i=i+Math.imul(v,rt)|0,r=r+Math.imul(p,it)|0,o=(o=o+Math.imul(p,st)|0)+Math.imul(g,it)|0,i=i+Math.imul(g,st)|0;var xt=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(o=(o=o+Math.imul(h,ct)|0)+Math.imul(f,ut)|0))<<13)|0;c=((i=i+Math.imul(f,ct)|0)+(o>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(N,z),o=(o=Math.imul(N,W))+Math.imul(L,z)|0,i=Math.imul(L,W),r=r+Math.imul(O,H)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(B,H)|0,i=i+Math.imul(B,Y)|0,r=r+Math.imul(T,$)|0,o=(o=o+Math.imul(T,V)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,V)|0,r=r+Math.imul(S,Q)|0,o=(o=o+Math.imul(S,Z)|0)+Math.imul(C,Q)|0,i=i+Math.imul(C,Z)|0,r=r+Math.imul(x,G)|0,o=(o=o+Math.imul(x,tt)|0)+Math.imul(E,G)|0,i=i+Math.imul(E,tt)|0,r=r+Math.imul(w,nt)|0,o=(o=o+Math.imul(w,rt)|0)+Math.imul(b,nt)|0,i=i+Math.imul(b,rt)|0,r=r+Math.imul(_,it)|0,o=(o=o+Math.imul(_,st)|0)+Math.imul(v,it)|0,i=i+Math.imul(v,st)|0,r=r+Math.imul(p,ut)|0,o=(o=o+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,i=i+Math.imul(g,ct)|0;var Et=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(o=(o=o+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((i=i+Math.imul(f,ft)|0)+(o>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(j,z),o=(o=Math.imul(j,W))+Math.imul(q,z)|0,i=Math.imul(q,W),r=r+Math.imul(N,H)|0,o=(o=o+Math.imul(N,Y)|0)+Math.imul(L,H)|0,i=i+Math.imul(L,Y)|0,r=r+Math.imul(O,$)|0,o=(o=o+Math.imul(O,V)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,V)|0,r=r+Math.imul(T,Q)|0,o=(o=o+Math.imul(T,Z)|0)+Math.imul(R,Q)|0,i=i+Math.imul(R,Z)|0,r=r+Math.imul(S,G)|0,o=(o=o+Math.imul(S,tt)|0)+Math.imul(C,G)|0,i=i+Math.imul(C,tt)|0,r=r+Math.imul(x,nt)|0,o=(o=o+Math.imul(x,rt)|0)+Math.imul(E,nt)|0,i=i+Math.imul(E,rt)|0,r=r+Math.imul(w,it)|0,o=(o=o+Math.imul(w,st)|0)+Math.imul(b,it)|0,i=i+Math.imul(b,st)|0,r=r+Math.imul(_,ut)|0,o=(o=o+Math.imul(_,ct)|0)+Math.imul(v,ut)|0,i=i+Math.imul(v,ct)|0,r=r+Math.imul(p,ht)|0,o=(o=o+Math.imul(p,ft)|0)+Math.imul(g,ht)|0,i=i+Math.imul(g,ft)|0;var kt=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(o=(o=o+Math.imul(h,gt)|0)+Math.imul(f,pt)|0))<<13)|0;c=((i=i+Math.imul(f,gt)|0)+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(j,H),o=(o=Math.imul(j,Y))+Math.imul(q,H)|0,i=Math.imul(q,Y),r=r+Math.imul(N,$)|0,o=(o=o+Math.imul(N,V)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,V)|0,r=r+Math.imul(O,Q)|0,o=(o=o+Math.imul(O,Z)|0)+Math.imul(B,Q)|0,i=i+Math.imul(B,Z)|0,r=r+Math.imul(T,G)|0,o=(o=o+Math.imul(T,tt)|0)+Math.imul(R,G)|0,i=i+Math.imul(R,tt)|0,r=r+Math.imul(S,nt)|0,o=(o=o+Math.imul(S,rt)|0)+Math.imul(C,nt)|0,i=i+Math.imul(C,rt)|0,r=r+Math.imul(x,it)|0,o=(o=o+Math.imul(x,st)|0)+Math.imul(E,it)|0,i=i+Math.imul(E,st)|0,r=r+Math.imul(w,ut)|0,o=(o=o+Math.imul(w,ct)|0)+Math.imul(b,ut)|0,i=i+Math.imul(b,ct)|0,r=r+Math.imul(_,ht)|0,o=(o=o+Math.imul(_,ft)|0)+Math.imul(v,ht)|0,i=i+Math.imul(v,ft)|0;var St=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(o=(o=o+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((i=i+Math.imul(g,gt)|0)+(o>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(j,$),o=(o=Math.imul(j,V))+Math.imul(q,$)|0,i=Math.imul(q,V),r=r+Math.imul(N,Q)|0,o=(o=o+Math.imul(N,Z)|0)+Math.imul(L,Q)|0,i=i+Math.imul(L,Z)|0,r=r+Math.imul(O,G)|0,o=(o=o+Math.imul(O,tt)|0)+Math.imul(B,G)|0,i=i+Math.imul(B,tt)|0,r=r+Math.imul(T,nt)|0,o=(o=o+Math.imul(T,rt)|0)+Math.imul(R,nt)|0,i=i+Math.imul(R,rt)|0,r=r+Math.imul(S,it)|0,o=(o=o+Math.imul(S,st)|0)+Math.imul(C,it)|0,i=i+Math.imul(C,st)|0,r=r+Math.imul(x,ut)|0,o=(o=o+Math.imul(x,ct)|0)+Math.imul(E,ut)|0,i=i+Math.imul(E,ct)|0,r=r+Math.imul(w,ht)|0,o=(o=o+Math.imul(w,ft)|0)+Math.imul(b,ht)|0,i=i+Math.imul(b,ft)|0;var Ct=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(o=(o=o+Math.imul(_,gt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((i=i+Math.imul(v,gt)|0)+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(j,Q),o=(o=Math.imul(j,Z))+Math.imul(q,Q)|0,i=Math.imul(q,Z),r=r+Math.imul(N,G)|0,o=(o=o+Math.imul(N,tt)|0)+Math.imul(L,G)|0,i=i+Math.imul(L,tt)|0,r=r+Math.imul(O,nt)|0,o=(o=o+Math.imul(O,rt)|0)+Math.imul(B,nt)|0,i=i+Math.imul(B,rt)|0,r=r+Math.imul(T,it)|0,o=(o=o+Math.imul(T,st)|0)+Math.imul(R,it)|0,i=i+Math.imul(R,st)|0,r=r+Math.imul(S,ut)|0,o=(o=o+Math.imul(S,ct)|0)+Math.imul(C,ut)|0,i=i+Math.imul(C,ct)|0,r=r+Math.imul(x,ht)|0,o=(o=o+Math.imul(x,ft)|0)+Math.imul(E,ht)|0,i=i+Math.imul(E,ft)|0;var At=(c+(r=r+Math.imul(w,pt)|0)|0)+((8191&(o=(o=o+Math.imul(w,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((i=i+Math.imul(b,gt)|0)+(o>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(j,G),o=(o=Math.imul(j,tt))+Math.imul(q,G)|0,i=Math.imul(q,tt),r=r+Math.imul(N,nt)|0,o=(o=o+Math.imul(N,rt)|0)+Math.imul(L,nt)|0,i=i+Math.imul(L,rt)|0,r=r+Math.imul(O,it)|0,o=(o=o+Math.imul(O,st)|0)+Math.imul(B,it)|0,i=i+Math.imul(B,st)|0,r=r+Math.imul(T,ut)|0,o=(o=o+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,i=i+Math.imul(R,ct)|0,r=r+Math.imul(S,ht)|0,o=(o=o+Math.imul(S,ft)|0)+Math.imul(C,ht)|0,i=i+Math.imul(C,ft)|0;var Tt=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(o=(o=o+Math.imul(x,gt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((i=i+Math.imul(E,gt)|0)+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(j,nt),o=(o=Math.imul(j,rt))+Math.imul(q,nt)|0,i=Math.imul(q,rt),r=r+Math.imul(N,it)|0,o=(o=o+Math.imul(N,st)|0)+Math.imul(L,it)|0,i=i+Math.imul(L,st)|0,r=r+Math.imul(O,ut)|0,o=(o=o+Math.imul(O,ct)|0)+Math.imul(B,ut)|0,i=i+Math.imul(B,ct)|0,r=r+Math.imul(T,ht)|0,o=(o=o+Math.imul(T,ft)|0)+Math.imul(R,ht)|0,i=i+Math.imul(R,ft)|0;var Rt=(c+(r=r+Math.imul(S,pt)|0)|0)+((8191&(o=(o=o+Math.imul(S,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((i=i+Math.imul(C,gt)|0)+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(j,it),o=(o=Math.imul(j,st))+Math.imul(q,it)|0,i=Math.imul(q,st),r=r+Math.imul(N,ut)|0,o=(o=o+Math.imul(N,ct)|0)+Math.imul(L,ut)|0,i=i+Math.imul(L,ct)|0,r=r+Math.imul(O,ht)|0,o=(o=o+Math.imul(O,ft)|0)+Math.imul(B,ht)|0,i=i+Math.imul(B,ft)|0;var It=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(o=(o=o+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((i=i+Math.imul(R,gt)|0)+(o>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(j,ut),o=(o=Math.imul(j,ct))+Math.imul(q,ut)|0,i=Math.imul(q,ct),r=r+Math.imul(N,ht)|0,o=(o=o+Math.imul(N,ft)|0)+Math.imul(L,ht)|0,i=i+Math.imul(L,ft)|0;var Ot=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(o=(o=o+Math.imul(O,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((i=i+Math.imul(B,gt)|0)+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(j,ht),o=(o=Math.imul(j,ft))+Math.imul(q,ht)|0,i=Math.imul(q,ft);var Bt=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(o=(o=o+Math.imul(N,gt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((i=i+Math.imul(L,gt)|0)+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863;var Pt=(c+(r=Math.imul(j,pt))|0)+((8191&(o=(o=Math.imul(j,gt))+Math.imul(q,pt)|0))<<13)|0;return c=((i=Math.imul(q,gt))+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=_t,u[2]=vt,u[3]=yt,u[4]=wt,u[5]=bt,u[6]=Mt,u[7]=xt,u[8]=Et,u[9]=kt,u[10]=St,u[11]=Ct,u[12]=At,u[13]=Tt,u[14]=Rt,u[15]=It,u[16]=Ot,u[17]=Bt,u[18]=Pt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return (new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e;}Math.imul||(d=f),i.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,o=0,i=0;i<n.length-1;i++){var s=o;o=0;for(var a=67108863&r,u=Math.min(i,e.length-1),c=Math.max(0,i-t.length+1);c<=u;c++){var l=i-c,h=(0|t.words[l])*(0|e.words[c]),f=67108863&h;a=67108863&(f=f+a|0),o+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863;}n.words[i]=a,r=s,s=o;}return 0!==r?n.words[i]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=i.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},g.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,o=0;o<e;o++)r|=(1&t)<<e-o-1,t>>=1;return r},g.prototype.permute=function(t,e,n,r,o,i){for(var s=0;s<i;s++)r[s]=e[t[s]],o[s]=n[t[s]];},g.prototype.transform=function(t,e,n,r,o,i){this.permute(i,t,e,n,r,o);for(var s=1;s<o;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<o;l+=a)for(var h=u,f=c,d=0;d<s;d++){var p=n[l+d],g=r[l+d],m=n[l+d+s],_=r[l+d+s],v=h*m-f*_;_=h*_+f*m,m=v,n[l+d]=p+m,r[l+d]=g+_,n[l+d+s]=p-m,r[l+d+s]=g-_,d!==a&&(v=u*h-c*f,f=u*f+c*h,h=v);}},g.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,o=0;for(n=n/2|0;n;n>>>=1)o++;return 1<<o+1+r},g.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var o=t[r];t[r]=t[n-r-1],t[n-r-1]=o,o=e[r],e[r]=-e[n-r-1],e[n-r-1]=-o;}},g.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var o=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&o,n=o<67108864?0:o/67108864|0;}return t},g.prototype.convert13b=function(t,e,n,o){for(var i=0,s=0;s<e;s++)i+=0|t[s],n[2*s]=8191&i,i>>>=13,n[2*s+1]=8191&i,i>>>=13;for(s=2*e;s<o;++s)n[s]=0;r(0===i),r(0==(-8192&i));},g.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},g.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),o=this.makeRBT(r),i=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),c=new Array(r),l=new Array(r),h=new Array(r),f=n.words;f.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,c,r),this.transform(s,i,a,u,r,o),this.transform(c,i,l,h,r,o);for(var d=0;d<r;d++){var p=a[d]*l[d]-u[d]*h[d];u[d]=a[d]*h[d]+u[d]*l[d],a[d]=p;}return this.conjugate(a,u,r),this.transform(a,u,f,i,r,o),this.conjugate(f,i,r),this.normalize13b(f,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.strip()},i.prototype.mul=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},i.prototype.mulf=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),p(this,t,e)},i.prototype.imul=function(t){return this.clone().mulTo(t,this)},i.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var o=(0|this.words[n])*t,i=(67108863&o)+(67108863&e);e>>=26,e+=o/67108864|0,e+=i>>>26,this.words[n]=67108863&i;}return 0!==e&&(this.words[n]=e,this.length++),this},i.prototype.muln=function(t){return this.clone().imuln(t)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,o=n%26;e[n]=(t.words[r]&1<<o)>>>o;}return e}(t);if(0===e.length)return new i(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var o=n.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,o=(t-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&i,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n;}s&&(this.words[e]=s,this.length++);}if(0!==o){for(e=this.length-1;e>=0;e--)this.words[e+o]=this.words[e];for(e=0;e<o;e++)this.words[e]=0;this.length+=o;}return this.strip()},i.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},i.prototype.iushrn=function(t,e,n){var o;r("number"==typeof t&&t>=0),o=e?(e-e%26)/26:0;var i=t%26,s=Math.min((t-i)/26,this.length),a=67108863^67108863>>>i<<i,u=n;if(o-=s,o=Math.max(0,o),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s;}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=o);c--){var h=0|this.words[c];this.words[c]=l<<26-i|h>>>i,l=h&a;}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},i.prototype.shln=function(t){return this.clone().ishln(t)},i.prototype.ushln=function(t){return this.clone().iushln(t)},i.prototype.shrn=function(t){return this.clone().ishrn(t)},i.prototype.ushrn=function(t){return this.clone().iushrn(t)},i.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,o=1<<e;return !(this.length<=n)&&!!(this.words[n]&o)},i.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var o=67108863^67108863>>>e<<e;this.words[this.length-1]&=o;}return this.strip()},i.prototype.maskn=function(t){return this.clone().imaskn(t)},i.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},i.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},i.prototype.addn=function(t){return this.clone().iaddn(t)},i.prototype.subn=function(t){return this.clone().isubn(t)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(t,e,n){var o,i,s=t.length+n;this._expand(s);var a=0;for(o=0;o<t.length;o++){i=(0|this.words[o+n])+a;var u=(0|t.words[o])*e;a=((i-=67108863&u)>>26)-(u/67108864|0),this.words[o+n]=67108863&i;}for(;o<this.length-n;o++)a=(i=(0|this.words[o+n])+a)>>26,this.words[o+n]=67108863&i;if(0===a)return this.strip();for(r(-1===a),a=0,o=0;o<this.length;o++)a=(i=-(0|this.words[o])+a)>>26,this.words[o]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!==(n=26-this._countBits(s))&&(o=o.ushln(n),r.iushln(n),s=0|o.words[o.length-1]);var a,u=r.length-o.length;if("mod"!==e){(a=new i(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0;}var l=r.clone()._ishlnsubmul(o,1,u);0===l.negative&&(r=l,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|r.words[o.length+h])+(0|r.words[o.length+h-1]);for(f=Math.min(f/s|0,67108863),r._ishlnsubmul(o,f,h);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(o,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=f);}return a&&a.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},i.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new i(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new i(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a;},i.prototype.div=function(t){return this.divmod(t,"div",!1).div},i.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},i.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},i.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),o=t.andln(1),i=n.cmp(r);return i<0||1===o&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(e*n+(0|this.words[o]))%t;return n},i.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*e;this.words[n]=o/t|0,e=o%t;}return this.strip()},i.prototype.divn=function(t){return this.clone().idivn(t)},i.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new i(1),s=new i(0),a=new i(0),u=new i(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0==(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(l),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;0==(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(a),s.isub(u)):(n.isub(e),a.isub(o),u.isub(s));}return {a:a,b:u,gcd:n.iushln(c)}},i.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new i(1),a=new i(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0==(n.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.isub(e),a.isub(s));}return (o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},i.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=e.cmp(n);if(o<0){var i=e;e=n,n=i;}else if(0===o||0===n.cmpn(1))break;e.isub(n);}return n.iushln(r)},i.prototype.invm=function(t){return this.egcd(t).a.umod(t)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(t){return this.words[0]&t},i.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,o=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=o,this;for(var i=o,s=n;0!==i&&s<this.length;s++){var a=0|this.words[s];i=(a+=i)>>>26,a&=67108863,this.words[s]=a;}return 0!==i&&(this.words[s]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return -1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else {n&&(t=-t),r(t<=67108863,"Number is too big");var o=0|this.words[0];e=o===t?0:o<t?-1:1;}return 0!==this.negative?0|-e:e},i.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return -1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},i.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return -1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],o=0|t.words[n];if(r!==o){r<o?e=-1:r>o&&(e=1);break}}return e},i.prototype.gtn=function(t){return 1===this.cmpn(t)},i.prototype.gt=function(t){return 1===this.cmp(t)},i.prototype.gten=function(t){return this.cmpn(t)>=0},i.prototype.gte=function(t){return this.cmp(t)>=0},i.prototype.ltn=function(t){return -1===this.cmpn(t)},i.prototype.lt=function(t){return -1===this.cmp(t)},i.prototype.lten=function(t){return this.cmpn(t)<=0},i.prototype.lte=function(t){return this.cmp(t)<=0},i.prototype.eqn=function(t){return 0===this.cmpn(t)},i.prototype.eq=function(t){return 0===this.cmp(t)},i.red=function(t){return new M(t)},i.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(t){return this.red=t,this},i.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},i.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},i.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},i.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},i.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},i.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},i.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},i.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}function v(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function y(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function w(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function b(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function M(t){if("string"==typeof t){var e=i._prime(t);this.m=e.p,this.prime=e;}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null;}function x(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}_.prototype._tmp=function(){var t=new i(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength();}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},_.prototype.split=function(t,e){t.iushrn(this.n,0,e);},_.prototype.imulK=function(t){return t.imul(this.k)},o(v,_),v.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=4194303&o,r=10;r<t.length;r++){var i=0|t.words[r];t.words[r-10]=(4194303&i)<<4|o>>>22,o=i;}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9;},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0);}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},o(y,_),o(w,_),o(b,_),b.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,o=67108863&r;r>>>=26,t.words[n]=o,e=r;}return 0!==e&&(t.words[t.length++]=e),t},i._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else {if("p25519"!==t)throw new Error("Unknown prime "+t);e=new b;}return m[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers");},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers");},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new i(1)).iushrn(2);return this.pow(t,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new i(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,o),f=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var g=d,m=0;0!==g.cmp(a);m++)g=g.redSqr();r(m<p);var _=this.pow(h,new i(1).iushln(p-m-1));f=f.redMul(_),h=_.redSqr(),d=d.redMul(h),p=m;}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new i(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var o=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var c=e.words[r],l=u-1;l>=0;l--){var h=c>>l&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===r&&0===l)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0;}u=26;}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},i.mont=function(t){return new x(t)},o(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new i(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)};}(t,this);}).call(this,n(52)(t));},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i;}catch(t){n=i;}try{r="function"==typeof clearTimeout?clearTimeout:s;}catch(t){r=s;}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d());}function d(){if(!l){var t=a(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length;}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t);}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t);}}function p(t,e){this.fun=t,this.array=e;}function g(){}o.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];c.push(new p(t,e)),1!==c.length||l||a(d);},p.prototype.run=function(){this.fun.apply(null,this.array);},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return []},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return "/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0};},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")();}catch(t){"object"==typeof window&&(n=window);}t.exports=n;},function(t,e,n){(function(t){
|
|
7070
|
-
/*!
|
|
7071
|
-
* The buffer module from node.js, for the browser.
|
|
7072
|
-
*
|
|
7073
|
-
* @author Feross Aboukhadijeh <http://feross.org>
|
|
7074
|
-
* @license MIT
|
|
7075
|
-
*/
|
|
7076
|
-
var r=n(54),o=n(55),i=n(56);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return "undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=f(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),o=(t=a(t,r)).write(e,n);o!==r&&(t=t.slice(0,o));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|d(e.length);return 0===(t=a(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return "number"!=typeof e.length||(r=e.length)!=r?a(t,0):f(t,e);if("Buffer"===e.type&&i(e.data))return f(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(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 h(t,e){if(l(e),t=a(t,e<0?0:0|d(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|d(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function d(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(u.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 n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(t).length;default:if(r)return D(t).length;e=(""+e).toLowerCase(),r=!0;}}function g(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return "";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return "";if((n>>>=0)<=(e>>>=0))return "";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0;}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r;}function _(t,e,n,r,o){if(0===t.length)return -1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return -1;n=t.length-1;}else if(n<0){if(!o)return -1;n=0;}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,o){var i,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return -1;s=2,a/=2,u/=2,n/=2;}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var l=-1;for(i=n;i<a;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else -1!==l&&(i-=i-l),l=-1;}else for(n+u>a&&(n=a-u),i=n;i>=0;i--){for(var h=!0,f=0;f<u;f++)if(c(t,i+f)!==c(e,f)){h=!1;break}if(h)return i}return -1}function y(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a;}return s}function w(t,e,n,r){return W(D(e,t.length-n),t,n,r)}function b(t,e,n,r){return W(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function M(t,e,n,r){return b(t,e,n,r)}function x(t,e,n,r){return W(z(e),t,n,r)}function E(t,e,n,r){return W(function(t,e){for(var n,r,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function k(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,s,a,u,c=t[o],l=null,h=c>239?4:c>223?3:c>191?2:1;if(o+h<=n)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u);}null===l?(l=65533,h=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=h;}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){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(t){return !1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?a(t,e):void 0!==n?"string"==typeof r?a(t,e).fill(n,r):a(t,e).fill(n):a(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return !(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},u.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}},u.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length;}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.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 e=0;e<t;e+=2)m(this,e,e+1);return this},u.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 e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},u.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 e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):g.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,o){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return -1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(i,s),c=this.slice(r,o),l=t.slice(e,n),h=0;h<a;++h)if(c[h]!==l[h]){i=c[h],s=l[h];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(t,e,n){return -1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return _(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return _(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else {if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0);}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return b(this,t,e,n);case"latin1":case"binary":return M(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0;}},u.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function A(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function T(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=q(t[i]);return o}function R(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function I(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,n,r,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function B(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o);}function P(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255;}function N(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,r,i){return i||N(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function U(t,e,n,r,i){return i||N(t,0,n,8),o.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else {var o=e-t;n=new u(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t];}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},u.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||O(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||O(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);O(this,t,e,n,o-1,-o);}var i=0,s=1,a=0;for(this[e]=255&t;++i<n&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);O(this,t,e,n,o-1,-o);}var i=n-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o);}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else "number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else {var s=u.isBuffer(t)?t:D(new u(t,r).toString()),a=s.length;for(i=0;i<n-e;++i)this[i+e]=s[i%a];}return this};var j=/[^+\/0-9A-Za-z-_]/g;function q(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320);}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n);}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128);}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128);}else {if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128);}}return i}function z(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return "";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n(16));},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return "[object Array]"==n.call(t)};},function(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}};},function(t,e,n){n.r(e),n.d(e,"detectEnv",(function(){return s})),n.d(e,"detectOS",(function(){return a})),n.d(e,"isAndroid",(function(){return u})),n.d(e,"isIOS",(function(){return c})),n.d(e,"isMobile",(function(){return l})),n.d(e,"isNode",(function(){return h})),n.d(e,"isBrowser",(function(){return f})),n.d(e,"getFromWindow",(function(){return d})),n.d(e,"getFromWindowOrThrow",(function(){return p})),n.d(e,"getDocumentOrThrow",(function(){return g})),n.d(e,"getDocument",(function(){return m})),n.d(e,"getNavigatorOrThrow",(function(){return _})),n.d(e,"getNavigator",(function(){return v})),n.d(e,"getLocationOrThrow",(function(){return y})),n.d(e,"getLocation",(function(){return w})),n.d(e,"getCryptoOrThrow",(function(){return b})),n.d(e,"getCrypto",(function(){return M})),n.d(e,"getLocalStorageOrThrow",(function(){return x})),n.d(e,"getLocalStorage",(function(){return E})),n.d(e,"getClientMeta",(function(){return k})),n.d(e,"safeJsonParse",(function(){return S})),n.d(e,"safeJsonStringify",(function(){return C})),n.d(e,"setLocal",(function(){return A})),n.d(e,"getLocal",(function(){return T})),n.d(e,"removeLocal",(function(){return R})),n.d(e,"mobileLinkChoiceKey",(function(){return I})),n.d(e,"formatIOSMobile",(function(){return O})),n.d(e,"saveMobileLinkInfo",(function(){return B})),n.d(e,"getMobileRegistryEntry",(function(){return P})),n.d(e,"getMobileLinkRegistry",(function(){return N})),n.d(e,"getWalletRegistryUrl",(function(){return U})),n.d(e,"getDappRegistryUrl",(function(){return j})),n.d(e,"getAppLogoUrl",(function(){return q})),n.d(e,"formatMobileRegistryEntry",(function(){return D})),n.d(e,"formatMobileRegistry",(function(){return z}));var r=n(46),o=n(5),i=n(47);function s(t){return Object(i.a)(t)}function a(){const t=s();return t&&t.os?t.os:void 0}function u(){const t=a();return !!t&&t.toLowerCase().includes("android")}function c(){const t=a();return !!t&&(t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function l(){return !!a()&&(u()||c())}function h(){const t=s();return !(!t||!t.name)&&"node"===t.name.toLowerCase()}function f(){return !h()&&!!v()}const d=o.getFromWindow,p=o.getFromWindowOrThrow,g=o.getDocumentOrThrow,m=o.getDocument,_=o.getNavigatorOrThrow,v=o.getNavigator,y=o.getLocationOrThrow,w=o.getLocation,b=o.getCryptoOrThrow,M=o.getCrypto,x=o.getLocalStorageOrThrow,E=o.getLocalStorage;function k(){return r.getWindowMetadata()}const S=function(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return JSON.parse(t)}catch(e){return t}},C=function(t){return "string"==typeof t?t:JSON.stringify(t)};function A(t,e){const n=C(e),r=E();r&&r.setItem(t,n);}function T(t){let e=null,n=null;const r=E();return r&&(n=r.getItem(t)),e=n?S(n):n,e}function R(t){const e=E();e&&e.removeItem(t);}const I="WALLETCONNECT_DEEPLINK_CHOICE";function O(t,e){const n=encodeURIComponent(t);return e.universalLink?`${e.universalLink}/wc?uri=${n}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function B(t){const e=t.href.split("?")[0];A(I,Object.assign(Object.assign({},t),{href:e}));}function P(t,e){return t.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))[0]}function N(t,e){let n=t;return e&&(n=e.map(e=>P(t,e)).filter(Boolean)),n}const L="https://registry.walletconnect.org";function U(){return L+"/data/wallets.json"}function j(){return L+"/data/dapps.json"}function q(t){return L+"/logo/sm/"+t+".jpeg"}function D(t,e="mobile"){return {name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:t.id?q(t.id):"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function z(t,e="mobile"){return Object.values(t).filter(t=>!!t[e].universal||!!t[e].native).map(t=>D(t,e))}},function(t,e,n){const r=n(61),o=n(62),i=n(63);function s(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function a(t,e){return e.encode?e.strict?r(t):encodeURIComponent(t):t}function u(t,e){return e.decode?o(t):t}function c(t){const e=t.indexOf("#");return -1!==e&&(t=t.slice(0,e)),t}function l(t){const e=(t=c(t)).indexOf("?");return -1===e?"":t.slice(e+1)}function h(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function f(t,e){s((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const n=function(t){let e;switch(t.arrayFormat){case"index":return (t,n,r)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n;};case"bracket":return (t,n,r)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=[n]:r[t]=n;};case"comma":case"separator":return (e,n,r)=>{const o="string"==typeof n&&n.split("").indexOf(t.arrayFormatSeparator)>-1?n.split(t.arrayFormatSeparator).map(e=>u(e,t)):null===n?n:u(n,t);r[e]=o;};default:return (t,e,n)=>{void 0!==n[t]?n[t]=[].concat(n[t],e):n[t]=e;}}}(e),r=Object.create(null);if("string"!=typeof t)return r;if(!(t=t.trim().replace(/^[?#&]/,"")))return r;for(const o of t.split("&")){let[t,s]=i(e.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator"].includes(e.arrayFormat)?s:u(s,e),n(u(t,e),s,r);}for(const t of Object.keys(r)){const n=r[t];if("object"==typeof n&&null!==n)for(const t of Object.keys(n))n[t]=h(n[t],e);else r[t]=h(n,e);}return !1===e.sort?r:(!0===e.sort?Object.keys(r).sort():Object.keys(r).sort(e.sort)).reduce((t,e)=>{const n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort((t,e)=>Number(t)-Number(e)).map(t=>e[t]):e}(n):t[e]=n,t},Object.create(null))}e.extract=l,e.parse=f,e.stringify=(t,e)=>{if(!t)return "";s((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const n=n=>e.skipNull&&null==t[n]||e.skipEmptyString&&""===t[n],r=function(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{const o=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[a(e,t),"[",o,"]"].join("")]:[...n,[a(e,t),"[",a(o,t),"]=",a(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[a(e,t),"[]"].join("")]:[...n,[a(e,t),"[]=",a(r,t)].join("")];case"comma":case"separator":return e=>(n,r)=>null==r||0===r.length?n:0===n.length?[[a(e,t),"=",a(r,t)].join("")]:[[n,a(r,t)].join(t.arrayFormatSeparator)];default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,a(e,t)]:[...n,[a(e,t),"=",a(r,t)].join("")]}}(e),o={};for(const e of Object.keys(t))n(e)||(o[e]=t[e]);const i=Object.keys(o);return !1!==e.sort&&i.sort(e.sort),i.map(n=>{const o=t[n];return void 0===o?"":null===o?a(n,e):Array.isArray(o)?o.reduce(r(n),[]).join("&"):a(n,e)+"="+a(o,e)}).filter(t=>t.length>0).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[n,r]=i(t,"#");return Object.assign({url:n.split("?")[0]||"",query:f(l(t),e)},e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:u(r,e)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=c(t.url).split("?")[0]||"",o=e.extract(t.url),i=e.parse(o,{sort:!1}),s=Object.assign(i,t.query);let u=e.stringify(s,n);u&&(u="?"+u);let l=function(t){let e="";const n=t.indexOf("#");return -1!==n&&(e=t.slice(n)),e}(t.url);return t.fragmentIdentifier&&(l="#"+a(t.fragmentIdentifier,n)),`${r}${u}${l}`};},function(t,e){t.exports=o,o.strict=i,o.loose=s;var n=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function o(t){return i(t)||s(t)}function i(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function s(t){return r[n.call(t)]}},function(t,e,n){var r=n(4);n.o(r,"payloadId")&&n.d(e,"payloadId",(function(){return r.payloadId}));r.isNode;},function(t,e,n){n.d(e,"a",(function(){return r}));n(9),n(3);function r(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}},function(t,e,n){},function(t,e,n){n(27);},function(t,e,n){n(28),n(12),n(29),n(30);},function(t,e){},function(t,e,n){var r=n(12);r.a;r.a;},function(t,e){},function(t,e,n){},function(t,e,n){},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(4);function o(t){return r.getBrowerCrypto().getRandomValues(new Uint8Array(t))}},function(t,e,n){n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i}));var r=n(6);function o(t,e,n){return Object(r.b)(t,e,n)}function i(t,e,n){return Object(r.a)(t,e,n)}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(6);n(13);async function o(t,e){return await Object(r.c)(t,e)}},function(t,e,n){var r=n(4);n.o(r,"isConstantTime")&&n.d(e,"isConstantTime",(function(){return r.isConstantTime}));},function(t,e,n){},function(t,e){},function(t,e,n){function r(t,e){if(t.length!==e.length)return !1;let n=0;for(let r=0;r<t.length;r++)n|=t[r]^e[r];return 0===n}n.d(e,"a",(function(){return r}));},function(t,e,n){n(6);},function(t,e,n){(function(e){function r(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var o=n(20),i=r(n(65)),s=r(n(86)),a=n(89);"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function u(t){return a.createElement("div",{className:"walletconnect-modal__header"},a.createElement("img",{src:"data:image/svg+xml,%3C?xml version='1.0' encoding='UTF-8'?%3E %3Csvg width='300px' height='185px' viewBox='0 0 300 185' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 49.3 (51167) - http://www.bohemiancoding.com/sketch --%3E %3Ctitle%3EWalletConnect%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cdefs%3E%3C/defs%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='walletconnect-logo-alt' fill='%233B99FC' fill-rule='nonzero'%3E %3Cpath d='M61.4385429,36.2562612 C110.349767,-11.6319051 189.65053,-11.6319051 238.561752,36.2562612 L244.448297,42.0196786 C246.893858,44.4140867 246.893858,48.2961898 244.448297,50.690599 L224.311602,70.406102 C223.088821,71.6033071 221.106302,71.6033071 219.883521,70.406102 L211.782937,62.4749541 C177.661245,29.0669724 122.339051,29.0669724 88.2173582,62.4749541 L79.542302,70.9685592 C78.3195204,72.1657633 76.337001,72.1657633 75.1142214,70.9685592 L54.9775265,51.2530561 C52.5319653,48.8586469 52.5319653,44.9765439 54.9775265,42.5821357 L61.4385429,36.2562612 Z M280.206339,77.0300061 L298.128036,94.5769031 C300.573585,96.9713 300.573599,100.85338 298.128067,103.247793 L217.317896,182.368927 C214.872352,184.763353 210.907314,184.76338 208.461736,182.368989 C208.461726,182.368979 208.461714,182.368967 208.461704,182.368957 L151.107561,126.214385 C150.496171,125.615783 149.504911,125.615783 148.893521,126.214385 C148.893517,126.214389 148.893514,126.214393 148.89351,126.214396 L91.5405888,182.368927 C89.095052,184.763359 85.1300133,184.763399 82.6844276,182.369014 C82.6844133,182.369 82.684398,182.368986 82.6843827,182.36897 L1.87196327,103.246785 C-0.573596939,100.852377 -0.573596939,96.9702735 1.87196327,94.5758653 L19.7936929,77.028998 C22.2392531,74.6345898 26.2042918,74.6345898 28.6498531,77.028998 L86.0048306,133.184355 C86.6162214,133.782957 87.6074796,133.782957 88.2188704,133.184355 C88.2188796,133.184346 88.2188878,133.184338 88.2188969,133.184331 L145.571,77.028998 C148.016505,74.6345347 151.981544,74.6344449 154.427161,77.028798 C154.427195,77.0288316 154.427229,77.0288653 154.427262,77.028899 L211.782164,133.184331 C212.393554,133.782932 213.384814,133.782932 213.996204,133.184331 L271.350179,77.0300061 C273.79574,74.6355969 277.760778,74.6355969 280.206339,77.0300061 Z' id='WalletConnect'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E",className:"walletconnect-modal__headerLogo"}),a.createElement("p",null,"WalletConnect"),a.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:t.onClose},a.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},a.createElement("div",{className:"walletconnect-modal__close__line1"}),a.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function c(t){return a.createElement("a",{className:"walletconnect-connect__button",href:t.href,id:"walletconnect-connect-button-"+t.name,onClick:t.onClick,rel:"noopener noreferrer",style:{backgroundColor:t.color},target:"_blank"},t.name)}function l(t){var e=t.color,n=t.href,r=t.name,o=t.logo,i=t.onClick;return a.createElement("a",{className:"walletconnect-modal__base__row",href:n,onClick:i,rel:"noopener noreferrer",target:"_blank"},a.createElement("h3",{className:"walletconnect-modal__base__row__h3"},r),a.createElement("div",{className:"walletconnect-modal__base__row__right"},a.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+o+"') "+e,backgroundSize:"100%"}}),a.createElement("img",{src:"data:image/svg+xml,%3Csvg width='8' height='18' viewBox='0 0 8 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.586301 0.213898C0.150354 0.552968 0.0718197 1.18124 0.41089 1.61719L5.2892 7.88931C5.57007 8.25042 5.57007 8.75608 5.2892 9.11719L0.410889 15.3893C0.071819 15.8253 0.150353 16.4535 0.586301 16.7926C1.02225 17.1317 1.65052 17.0531 1.98959 16.6172L6.86791 10.3451C7.7105 9.26174 7.7105 7.74476 6.86791 6.66143L1.98959 0.38931C1.65052 -0.0466374 1.02225 -0.125172 0.586301 0.213898Z' fill='%233C4252'/%3E %3C/svg%3E",className:"walletconnect-modal__base__row__right__caret"})))}function h(t){var e=t.color,n=t.href,r=t.name,o=t.logo,i=t.onClick,s=window.innerWidth<768?(r.length>8?2.5:2.7)+"vw":"inherit";return a.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:n,onClick:i,rel:"noopener noreferrer",target:"_blank"},a.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+o+"') "+e,backgroundSize:"100%"}}),a.createElement("div",{style:{fontSize:s},className:"walletconnect-connect__button__text"},r))}function f(t){var e=o.isAndroid(),n=a.useState(""),r=n[0],i=n[1],s=a.useState(""),u=s[0],f=s[1],d=a.useState(1),p=d[0],g=d[1],m=u?t.links.filter((function(t){return t.name.toLowerCase().includes(u.toLowerCase())})):t.links,_=t.errorMessage,v=u||m.length>5,y=Math.ceil(m.length/12),w=[12*(p-1)+1,12*p],b=m.length?m.filter((function(t,e){return e+1>=w[0]&&e+1<=w[1]})):[],M=!(e||!(y>1)),x=void 0;return a.createElement("div",null,a.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},e?t.text.connect_mobile_wallet:t.text.choose_preferred_wallet),!e&&a.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:r,onChange:function(t){i(t.target.value),clearTimeout(x),t.target.value?x=setTimeout((function(){f(t.target.value),g(1);}),1e3):(i(""),f(""),g(1));}}),a.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(e?"__android":v&&m.length?"__wrap":"")},e?a.createElement(c,{name:t.text.connect,color:"rgb(64, 153, 255)",href:t.uri,onClick:a.useCallback((function(){o.saveMobileLinkInfo({name:"Unknown",href:t.uri});}),[])}):b.length?b.map((function(e){var n=e.color,r=e.name,i=e.shortName,s=e.logo,u=o.formatIOSMobile(t.uri,e),c=a.useCallback((function(){o.saveMobileLinkInfo({name:r,href:u});}),[b]);return v?a.createElement(h,{color:n,href:u,name:i,logo:s,onClick:c}):a.createElement(l,{color:n,href:u,name:r,logo:s,onClick:c})})):a.createElement(a.Fragment,null,a.createElement("p",null,_.length?t.errorMessage:t.links.length&&!m.length?t.text.no_wallets_found:t.text.loading))),M&&a.createElement("div",{className:"walletconnect-modal__footer"},Array(y).fill(0).map((function(t,e){var n=e+1,r=p===n;return a.createElement("a",{style:{margin:"auto 10px",fontWeight:r?"bold":"normal"},onClick:function(){return g(n)}},n)}))))}function d(t){var e=!!t.message.trim();return a.createElement("div",{className:"walletconnect-qrcode__notification"+(e?" notification__show":"")},t.message)}function p(t){var e=a.useState(""),n=e[0],r=e[1],o=a.useState(""),u=o[0],c=o[1];a.useEffect((function(){try{return Promise.resolve(function(t){try{var e="";return Promise.resolve(i.toString(t,{margin:0,type:"svg"})).then((function(t){return "string"==typeof t&&(e=t.replace("<svg",'<svg class="walletconnect-qrcode__image"')),e}))}catch(t){return Promise.reject(t)}}(t.uri)).then((function(t){c(t);}))}catch(t){Promise.reject(t);}}),[]);return a.createElement("div",null,a.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},t.text.scan_qrcode_with_wallet),a.createElement("div",{dangerouslySetInnerHTML:{__html:u}}),a.createElement("div",{className:"walletconnect-modal__footer"},a.createElement("a",{onClick:function(){s(t.uri)?(r(t.text.copied_to_clipboard),setInterval((function(){return r("")}),1200)):(r("Error"),setInterval((function(){return r("")}),1200));}},t.text.copy_to_clipboard)),a.createElement(d,{message:n}))}function g(t){var e=o.isAndroid(),n=o.isMobile(),r=n?t.qrcodeModalOptions&&t.qrcodeModalOptions.mobileLinks?t.qrcodeModalOptions.mobileLinks:void 0:t.qrcodeModalOptions&&t.qrcodeModalOptions.desktopLinks?t.qrcodeModalOptions.desktopLinks:void 0,i=a.useState(!1),s=i[0],c=i[1],l=a.useState(!1),h=l[0],d=l[1],g=a.useState(!n),m=g[0],_=g[1],v={mobile:n,text:t.text,uri:t.uri,qrcodeModalOptions:t.qrcodeModalOptions},y=a.useState(""),w=y[0],b=y[1],M=a.useState(!1),x=M[0],E=M[1],k=a.useState([]),S=k[0],C=k[1],A=a.useState(""),T=A[0],R=A[1],I=function(){h||s||r&&!r.length||S.length>0||a.useEffect((function(){!function(){try{if(e)return Promise.resolve();c(!0);var i=function(t,e){try{var n=t();}catch(t){return e(t)}return n&&n.then?n.then(void 0,e):n}((function(){var e=t.qrcodeModalOptions&&t.qrcodeModalOptions.registryUrl?t.qrcodeModalOptions.registryUrl:o.getWalletRegistryUrl();return Promise.resolve(fetch(e).then((function(t){return t.json()}))).then((function(e){var i=n?"mobile":"desktop",s=o.getMobileLinkRegistry(o.formatMobileRegistry(e,i),r);c(!1),d(!0),R(s.length?"":t.text.no_supported_wallets),C(s);var a=1===s.length;a&&(b(o.formatIOSMobile(t.uri,s[0])),_(!0)),E(a);}))}),(function(e){c(!1),d(!0),R(t.text.something_went_wrong),console.error(e);}));Promise.resolve(i&&i.then?i.then((function(){})):void 0);}catch(t){return Promise.reject(t)}}();}));};I();var O=n?m:!m;return a.createElement("div",{id:"walletconnect-qrcode-modal",className:"walletconnect-qrcode__base animated fadeIn"},a.createElement("div",{className:"walletconnect-modal__base"},a.createElement(u,{onClose:t.onClose}),x&&m?a.createElement("div",{className:"walletconnect-modal__single_wallet"},a.createElement("a",{onClick:function(){return o.saveMobileLinkInfo({name:S[0].name,href:w})},href:w,rel:"noopener noreferrer",target:"_blank"},t.text.connect_with+" "+(x?S[0].name:"")+" ›")):e||s||!s&&S.length?a.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(O?" right__selected":"")},a.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),n?a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return _(!1),I()}},t.text.mobile),a.createElement("a",{onClick:function(){return _(!0)}},t.text.qrcode)):a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return _(!0)}},t.text.qrcode),a.createElement("a",{onClick:function(){return _(!1),I()}},t.text.desktop))):null,a.createElement("div",null,m||!e&&!s&&!S.length?a.createElement(p,Object.assign({},v)):a.createElement(f,Object.assign({},v,{links:S,errorMessage:T})))))}var m={de:{choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},ko:{choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},fa:{choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"}};function _(){var t=o.getDocumentOrThrow(),e=t.getElementById("walletconnect-qrcode-modal");e&&(e.className=e.className.replace("fadeIn","fadeOut"),setTimeout((function(){var e=t.getElementById("walletconnect-wrapper");e&&t.body.removeChild(e);}),300));}function v(t){return function(){_(),t&&t();}}function y(t,e,n){!function(){var t=o.getDocumentOrThrow(),e=t.getElementById("walletconnect-style-sheet");e&&t.head.removeChild(e);var n=t.createElement("style");n.setAttribute("id","walletconnect-style-sheet"),n.innerText=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n',t.head.appendChild(n);}();var r,i=function(){var t=o.getDocumentOrThrow(),e=t.createElement("div");return e.setAttribute("id","walletconnect-wrapper"),t.body.appendChild(e),e}();a.render(a.createElement(g,{text:(r=o.getNavigatorOrThrow().language.split("-")[0]||"en",m[r]||m.en),uri:t,onClose:v(e),qrcodeModalOptions:n}),i);}var w=function(){return void 0!==e&&void 0!==e.versions&&void 0!==e.versions.node};var b={open:function(t,e,n){console.log(t),w()?function(t){i.toString(t,{type:"terminal"}).then(console.log);}(t):y(t,e,n);},close:function(){w()||_();}};t.exports=b;}).call(this,n(15));},function(t,e,n){var r=n(19),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}};},function(t,e){e.isValid=function(t){return !isNaN(t)&&t>=1&&t<=40};},function(t,e){var n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",r="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";e.KANJI=new RegExp(n,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(r,"g"),e.NUMERIC=new RegExp("[0-9]+","g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var o=new RegExp("^"+n+"$"),i=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return o.test(t)},e.testNumeric=function(t){return i.test(t)},e.testAlphanumeric=function(t){return s.test(t)};},function(t,e){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return [t,t]})))),6===e.length&&e.push("F","F");var n=parseInt(e.join(""),16);return {r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return {width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){var r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){for(var o=n.modules.size,i=n.modules.data,s=e.getScale(o,r),a=Math.floor((o+2*r.margin)*s),u=r.margin*s,c=[r.color.light,r.color.dark],l=0;l<a;l++)for(var h=0;h<a;h++){var f=4*(l*a+h),d=r.color.light;if(l>=u&&h>=u&&l<a-u&&h<a-u)d=c[i[Math.floor((l-u)/s)*o+Math.floor((h-u)/s)]?1:0];t[f++]=d.r,t[f++]=d.g,t[f++]=d.b,t[f]=d.a;}};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getWindowMetadata=void 0;const r=n(5);e.getWindowMetadata=function(){let t,e;try{t=r.getDocumentOrThrow(),e=r.getLocationOrThrow();}catch(t){return null}function n(...e){const n=t.getElementsByTagName("meta");for(let t=0;t<n.length;t++){const r=n[t],o=["itemprop","property","name"].map(t=>r.getAttribute(t)).filter(t=>!!t&&e.includes(t));if(o.length&&o){const t=r.getAttribute("content");if(t)return t}}return ""}const o=function(){let e=n("name","og:site_name","og:title","twitter:title");return e||(e=t.title),e}();return {description:n("description","og:description","twitter:description","keywords"),url:e.origin,icons:function(){const n=t.getElementsByTagName("link"),r=[];for(let t=0;t<n.length;t++){const o=n[t],i=o.getAttribute("rel");if(i&&i.toLowerCase().indexOf("icon")>-1){const t=o.getAttribute("href");if(t)if(-1===t.toLowerCase().indexOf("https:")&&-1===t.toLowerCase().indexOf("http:")&&0!==t.indexOf("//")){let n=e.protocol+"//"+e.host;if(0===t.indexOf("/"))n+=t;else {const r=e.pathname.split("/");r.pop();n+=r.join("/")+"/"+t;}r.push(n);}else if(0===t.indexOf("//")){const n=e.protocol+t;r.push(n);}else r.push(t);}}return r}(),name:o}};},function(t,e,n){(function(t){n.d(e,"a",(function(){return f}));var r=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r},o=function(t,e,n){this.name=t,this.version=e,this.os=n,this.type="browser";},i=function(e){this.version=e,this.type="node",this.name="node",this.os=t.platform;},s=function(t,e,n,r){this.name=t,this.version=e,this.os=n,this.bot=r,this.type="bot-device";},a=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null;},u=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null;},c=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,l=[["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",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],h=[["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 f(e){return e?p(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new u:"undefined"!=typeof navigator?p(navigator.userAgent):void 0!==t&&t.version?new i(t.version.slice(1)):null}function d(t){return ""!==t&&l.reduce((function(e,n){var r=n[0],o=n[1];if(e)return e;var i=o.exec(t);return !!i&&[r,i]}),!1)}function p(t){var e=d(t);if(!e)return null;var n=e[0],i=e[1];if("searchbot"===n)return new a;var u=i[1]&&i[1].split(/[._]/).slice(0,3);u?u.length<3&&(u=r(u,function(t){for(var e=[],n=0;n<t;n++)e.push("0");return e}(3-u.length))):u=[];var l=u.join("."),f=function(t){for(var e=0,n=h.length;e<n;e++){var r=h[e],o=r[0];if(r[1].exec(t))return o}return null}(t),p=c.exec(t);return p&&p[1]?new s(n,l,f,p[1]):new o(n,l,f)}}).call(this,n(15));},function(t,e,n){(function(r,o){var i;
|
|
7077
|
-
/**
|
|
7078
|
-
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|
7079
|
-
*
|
|
7080
|
-
* @version 0.8.0
|
|
7081
|
-
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
7082
|
-
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
7083
|
-
* @license MIT
|
|
7084
|
-
*/!function(){var s="input is invalid type",a="object"==typeof window,u=a?window:{};u.JS_SHA3_NO_WINDOW&&(a=!1);var c=!a&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof r&&r.versions&&r.versions.node?u=o:c&&(u=self);var l=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeof t&&t.exports,h=n(58),f=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),p=[4,1024,262144,67108864],g=[0,8,16,24],m=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],_=[224,256,384,512],v=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return "[object Array]"===Object.prototype.toString.call(t)}),!f||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return "object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var b=function(t,e,n){return function(r){return new L(t,e,t).update(r)[n]()}},M=function(t,e,n){return function(r,o){return new L(t,e,o).update(r)[n]()}},x=function(t,e,n){return function(e,r,o,i){return A["cshake"+t].update(e,r,o,i)[n]()}},E=function(t,e,n){return function(e,r,o,i){return A["kmac"+t].update(e,r,o,i)[n]()}},k=function(t,e,n,r){for(var o=0;o<y.length;++o){var i=y[o];t[i]=e(n,r,i);}return t},S=function(t,e){var n=b(t,e,"hex");return n.create=function(){return new L(t,e,t)},n.update=function(t){return n.create().update(t)},k(n,b,t,e)},C=[{name:"keccak",padding:[1,256,65536,16777216],bits:_,createMethod:S},{name:"sha3",padding:[6,1536,393216,100663296],bits:_,createMethod:S},{name:"shake",padding:[31,7936,2031616,520093696],bits:v,createMethod:function(t,e){var n=M(t,e,"hex");return n.create=function(n){return new L(t,e,n)},n.update=function(t,e){return n.create(e).update(t)},k(n,M,t,e)}},{name:"cshake",padding:p,bits:v,createMethod:function(t,e){var n=w[t],r=x(t,0,"hex");return r.create=function(r,o,i){return o||i?new L(t,e,r).bytepad([o,i],n):A["shake"+t].create(r)},r.update=function(t,e,n,o){return r.create(e,n,o).update(t)},k(r,x,t,e)}},{name:"kmac",padding:p,bits:v,createMethod:function(t,e){var n=w[t],r=E(t,0,"hex");return r.create=function(r,o,i){return new U(t,e,o).bytepad(["KMAC",i],n).bytepad([r],n)},r.update=function(t,e,n,o){return r.create(t,n,o).update(e)},k(r,E,t,e)}}],A={},T=[],R=0;R<C.length;++R)for(var I=C[R],O=I.bits,B=0;B<O.length;++B){var P=I.name+"_"+O[B];if(T.push(P),A[P]=I.createMethod(O[B],I.padding),"sha3"!==I.name){var N=I.name+O[B];T.push(N),A[N]=A[P];}}function L(t,e,n){this.blocks=[],this.s=[],this.padding=e,this.outputBits=n,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0;}function U(t,e,n){L.call(this,t,e,n);}L.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(s);if(null===t)throw new Error(s);if(f&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||f&&ArrayBuffer.isView(t)))throw new Error(s);e=!0;}for(var r,o,i=this.blocks,a=this.byteCount,u=t.length,c=this.blockCount,l=0,h=this.s;l<u;){if(this.reset)for(this.reset=!1,i[0]=this.block,r=1;r<c+1;++r)i[r]=0;if(e)for(r=this.start;l<u&&r<a;++l)i[r>>2]|=t[l]<<g[3&r++];else for(r=this.start;l<u&&r<a;++l)(o=t.charCodeAt(l))<128?i[r>>2]|=o<<g[3&r++]:o<2048?(i[r>>2]|=(192|o>>6)<<g[3&r++],i[r>>2]|=(128|63&o)<<g[3&r++]):o<55296||o>=57344?(i[r>>2]|=(224|o>>12)<<g[3&r++],i[r>>2]|=(128|o>>6&63)<<g[3&r++],i[r>>2]|=(128|63&o)<<g[3&r++]):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++l)),i[r>>2]|=(240|o>>18)<<g[3&r++],i[r>>2]|=(128|o>>12&63)<<g[3&r++],i[r>>2]|=(128|o>>6&63)<<g[3&r++],i[r>>2]|=(128|63&o)<<g[3&r++]);if(this.lastByteIndex=r,r>=a){for(this.start=r-a,this.block=i[c],r=0;r<c;++r)h[r]^=i[r];j(h),this.reset=!0;}else this.start=r;}return this},L.prototype.encode=function(t,e){var n=255&t,r=1,o=[n];for(n=255&(t>>=8);n>0;)o.unshift(n),n=255&(t>>=8),++r;return e?o.push(r):o.unshift(r),this.update(o),o.length},L.prototype.encodeString=function(t){var e,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(s);if(null===t)throw new Error(s);if(f&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||f&&ArrayBuffer.isView(t)))throw new Error(s);e=!0;}var r=0,o=t.length;if(e)r=o;else for(var i=0;i<t.length;++i){var a=t.charCodeAt(i);a<128?r+=1:a<2048?r+=2:a<55296||a>=57344?r+=3:(a=65536+((1023&a)<<10|1023&t.charCodeAt(++i)),r+=4);}return r+=this.encode(8*r),this.update(t),r},L.prototype.bytepad=function(t,e){for(var n=this.encode(e),r=0;r<t.length;++r)n+=this.encodeString(t[r]);var o=e-n%e,i=[];return i.length=o,this.update(i),this},L.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex,n=this.blockCount,r=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[n],e=1;e<n+1;++e)t[e]=0;for(t[n-1]|=2147483648,e=0;e<n;++e)r[e]^=t[e];j(r);}},L.prototype.toString=L.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,n=this.s,r=this.outputBlocks,o=this.extraBytes,i=0,s=0,a="";s<r;){for(i=0;i<e&&s<r;++i,++s)t=n[i],a+=d[t>>4&15]+d[15&t]+d[t>>12&15]+d[t>>8&15]+d[t>>20&15]+d[t>>16&15]+d[t>>28&15]+d[t>>24&15];s%e==0&&(j(n),i=0);}return o&&(t=n[i],a+=d[t>>4&15]+d[15&t],o>1&&(a+=d[t>>12&15]+d[t>>8&15]),o>2&&(a+=d[t>>20&15]+d[t>>16&15])),a},L.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,n=this.s,r=this.outputBlocks,o=this.extraBytes,i=0,s=0,a=this.outputBits>>3;t=o?new ArrayBuffer(r+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(t);s<r;){for(i=0;i<e&&s<r;++i,++s)u[s]=n[i];s%e==0&&j(n);}return o&&(u[i]=n[i],t=t.slice(0,a)),t},L.prototype.buffer=L.prototype.arrayBuffer,L.prototype.digest=L.prototype.array=function(){this.finalize();for(var t,e,n=this.blockCount,r=this.s,o=this.outputBlocks,i=this.extraBytes,s=0,a=0,u=[];a<o;){for(s=0;s<n&&a<o;++s,++a)t=a<<2,e=r[s],u[t]=255&e,u[t+1]=e>>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;a%n==0&&j(r);}return i&&(t=a<<2,e=r[s],u[t]=255&e,i>1&&(u[t+1]=e>>8&255),i>2&&(u[t+2]=e>>16&255)),u},U.prototype=new L,U.prototype.finalize=function(){return this.encode(this.outputBits,!0),L.prototype.finalize.call(this)};var j=function(t){var e,n,r,o,i,s,a,u,c,l,h,f,d,p,g,_,v,y,w,b,M,x,E,k,S,C,A,T,R,I,O,B,P,N,L,U,j,q,D,z,W,F,H,Y,J,$,V,K,Q,Z,X,G,tt,et,nt,rt,ot,it,st,at,ut,ct,lt;for(r=0;r<48;r+=2)o=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],l=t[6]^t[16]^t[26]^t[36]^t[46],h=t[7]^t[17]^t[27]^t[37]^t[47],e=(f=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|a>>>31),n=(d=t[9]^t[19]^t[29]^t[39]^t[49])^(a<<1|s>>>31),t[0]^=e,t[1]^=n,t[10]^=e,t[11]^=n,t[20]^=e,t[21]^=n,t[30]^=e,t[31]^=n,t[40]^=e,t[41]^=n,e=o^(u<<1|c>>>31),n=i^(c<<1|u>>>31),t[2]^=e,t[3]^=n,t[12]^=e,t[13]^=n,t[22]^=e,t[23]^=n,t[32]^=e,t[33]^=n,t[42]^=e,t[43]^=n,e=s^(l<<1|h>>>31),n=a^(h<<1|l>>>31),t[4]^=e,t[5]^=n,t[14]^=e,t[15]^=n,t[24]^=e,t[25]^=n,t[34]^=e,t[35]^=n,t[44]^=e,t[45]^=n,e=u^(f<<1|d>>>31),n=c^(d<<1|f>>>31),t[6]^=e,t[7]^=n,t[16]^=e,t[17]^=n,t[26]^=e,t[27]^=n,t[36]^=e,t[37]^=n,t[46]^=e,t[47]^=n,e=l^(o<<1|i>>>31),n=h^(i<<1|o>>>31),t[8]^=e,t[9]^=n,t[18]^=e,t[19]^=n,t[28]^=e,t[29]^=n,t[38]^=e,t[39]^=n,t[48]^=e,t[49]^=n,p=t[0],g=t[1],$=t[11]<<4|t[10]>>>28,V=t[10]<<4|t[11]>>>28,T=t[20]<<3|t[21]>>>29,R=t[21]<<3|t[20]>>>29,at=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,F=t[40]<<18|t[41]>>>14,H=t[41]<<18|t[40]>>>14,N=t[2]<<1|t[3]>>>31,L=t[3]<<1|t[2]>>>31,_=t[13]<<12|t[12]>>>20,v=t[12]<<12|t[13]>>>20,K=t[22]<<10|t[23]>>>22,Q=t[23]<<10|t[22]>>>22,I=t[33]<<13|t[32]>>>19,O=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,lt=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,nt=t[4]<<30|t[5]>>>2,U=t[14]<<6|t[15]>>>26,j=t[15]<<6|t[14]>>>26,y=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,Z=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,B=t[45]<<29|t[44]>>>3,P=t[44]<<29|t[45]>>>3,k=t[6]<<28|t[7]>>>4,S=t[7]<<28|t[6]>>>4,rt=t[17]<<23|t[16]>>>9,ot=t[16]<<23|t[17]>>>9,q=t[26]<<25|t[27]>>>7,D=t[27]<<25|t[26]>>>7,b=t[36]<<21|t[37]>>>11,M=t[37]<<21|t[36]>>>11,G=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,Y=t[8]<<27|t[9]>>>5,J=t[9]<<27|t[8]>>>5,C=t[18]<<20|t[19]>>>12,A=t[19]<<20|t[18]>>>12,it=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,z=t[38]<<8|t[39]>>>24,W=t[39]<<8|t[38]>>>24,x=t[48]<<14|t[49]>>>18,E=t[49]<<14|t[48]>>>18,t[0]=p^~_&y,t[1]=g^~v&w,t[10]=k^~C&T,t[11]=S^~A&R,t[20]=N^~U&q,t[21]=L^~j&D,t[30]=Y^~$&K,t[31]=J^~V&Q,t[40]=et^~rt&it,t[41]=nt^~ot&st,t[2]=_^~y&b,t[3]=v^~w&M,t[12]=C^~T&I,t[13]=A^~R&O,t[22]=U^~q&z,t[23]=j^~D&W,t[32]=$^~K&Z,t[33]=V^~Q&X,t[42]=rt^~it&at,t[43]=ot^~st&ut,t[4]=y^~b&x,t[5]=w^~M&E,t[14]=T^~I&B,t[15]=R^~O&P,t[24]=q^~z&F,t[25]=D^~W&H,t[34]=K^~Z&G,t[35]=Q^~X&tt,t[44]=it^~at&ct,t[45]=st^~ut<,t[6]=b^~x&p,t[7]=M^~E&g,t[16]=I^~B&k,t[17]=O^~P&S,t[26]=z^~F&N,t[27]=W^~H&L,t[36]=Z^~G&Y,t[37]=X^~tt&J,t[46]=at^~ct&et,t[47]=ut^~lt&nt,t[8]=x^~p&_,t[9]=E^~g&v,t[18]=B^~k&C,t[19]=P^~S&A,t[28]=F^~N&U,t[29]=H^~L&j,t[38]=G^~Y&$,t[39]=tt^~J&V,t[48]=ct^~et&rt,t[49]=lt^~nt&ot,t[0]^=m[r],t[1]^=m[r+1];};if(l)t.exports=A;else {for(R=0;R<T.length;++R)u[T[R]]=A[T[R]];h&&(void 0===(i=function(){return A}.call(e,n,e,t))||(t.exports=i));}}();}).call(this,n(15),n(16));},function(t,e,n){n(3),n(9);var r=n(23);n.o(r,"payloadId")&&n.d(e,"payloadId",(function(){return r.payloadId}));var o=n(24);n.d(e,"payloadId",(function(){return o.a}));n(25),n(26),n(31),n(32);},function(t,e,n){(function(t){var r=n(1),o=n(51);const i=void 0!==t.WebSocket?t.WebSocket:n(64);e.a=class{constructor(t){if(this.opts=t,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=t.protocol,this._version=t.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=t.subscriptions||[],this._netMonitor=t.netMonitor||new o.a,!t.url||"string"!=typeof t.url)throw new Error("Missing or invalid WebSocket url");this._url=t.url,this._netMonitor.on("online",()=>this._socketCreate());}set readyState(t){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(t){}get connecting(){return 0===this.readyState}set connected(t){}get connected(){return 1===this.readyState}set closing(t){}get closing(){return 2===this.readyState}set closed(t){}get closed(){return 3===this.readyState}open(){this._socketCreate();}close(){this._socketClose();}send(t,e,n){if(!e||"string"!=typeof e)throw new Error("Missing or invalid topic field");this._socketSend({topic:e,type:"pub",payload:t,silent:!!n});}subscribe(t){this._socketSend({topic:t,type:"sub",payload:"",silent:!0});}on(t,e){this._events.push({event:t,callback:e});}_socketCreate(){if(this._nextSocket)return;const t=function(t,e,n){var o,i;const s=(t.startsWith("https")?t.replace("https","wss"):t.startsWith("http")?t.replace("http","ws"):t).split("?"),a=Object(r.m)()?{protocol:e,version:n,env:"browser",host:(null===(o=Object(r.k)())||void 0===o?void 0:o.host)||""}:{protocol:e,version:n,env:(null===(i=Object(r.g)())||void 0===i?void 0:i.name)||""},u=Object(r.a)(Object(r.l)(s[1]||""),a);return s[0]+"?"+u}(this._url,this._protocol,this._version);if(this._nextSocket=new i(t),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=t=>this._socketReceive(t),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=t=>this._socketError(t),this._nextSocket.onclose=()=>{setTimeout(()=>{this._nextSocket=null,this._socketCreate();},1e3);};}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue();}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close());}_socketSend(t){const e=JSON.stringify(t);this._socket&&1===this._socket.readyState?this._socket.send(e):(this._setToQueue(t),this._socketCreate());}async _socketReceive(t){let e;try{e=JSON.parse(t.data);}catch(t){return}if(this._socketSend({topic:e.topic,type:"ack",payload:"",silent:!0}),this._socket&&1===this._socket.readyState){const t=this._events.filter(t=>"message"===t.event);t&&t.length&&t.forEach(t=>t.callback(e));}}_socketError(t){const e=this._events.filter(t=>"error"===t.event);e&&e.length&&e.forEach(e=>e.callback(t));}_queueSubscriptions(){this._subscriptions.forEach(t=>this._queue.push({topic:t,type:"sub",payload:"",silent:!0})),this._subscriptions=this.opts.subscriptions||[];}_setToQueue(t){this._queue.push(t);}_pushQueue(){this._queue.forEach(t=>this._socketSend(t)),this._queue=[];}};}).call(this,n(16));},function(t,e,n){e.a=class{constructor(){this._eventEmitters=[],"undefined"!=typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")));}on(t,e){this._eventEmitters.push({event:t,callback:e});}trigger(t){let e=[];t&&(e=this._eventEmitters.filter(e=>e.event===t)),e.forEach(t=>{t.callback();});}};},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t};},function(t,e){},function(t,e,n){e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),s=r[0],a=r[1],u=new i(function(t,e,n){return 3*(e+n)/4-n}(0,s,a)),l=0,h=a>0?s-4:s;for(n=0;n<h;n+=4)e=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===a&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,u[l++]=255&e);1===a&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=0,a=n-o;s<a;s+=16383)i.push(l(t,s,s+16383>a?a:s+16383));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],o[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return -1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var o,i,s=[],a=e;a<n;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;},function(t,e){
|
|
7085
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
7086
|
-
e.read=function(t,e,n,r,o){var i,s,a=8*o-r-1,u=(1<<a)-1,c=u>>1,l=-7,h=n?o-1:0,f=n?-1:1,d=t[e+h];for(h+=f,i=d&(1<<-l)-1,d>>=-l,l+=a;l>0;i=256*i+t[e+h],h+=f,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===i)i=1-c;else {if(i===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),i-=c;}return (d?-1:1)*s*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var s,a,u,c=8*i-o-1,l=(1<<c)-1,h=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,o),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;t[n+d]=255&a,d+=p,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;t[n+d]=255&s,d+=p,s/=256,c-=8);t[n+d-p]|=128*g;};},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return "[object Array]"==n.call(t)};},function(t,e,n){(function(e){var r=n(22).strict;t.exports=function(t){if(r(t)){var n=e.from(t.buffer);return t.byteLength!==t.buffer.byteLength&&(n=n.slice(t.byteOffset,t.byteOffset+t.byteLength)),n}return e.from(t)};}).call(this,n(17).Buffer);},function(t,e){(function(e){t.exports=e;}).call(this,{});},function(t,e,n){(function(t){function n(){return (null==t?void 0:t.crypto)||(null==t?void 0:t.msCrypto)||{}}function r(){const t=n();return t.subtle||t.webkitSubtle}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowserCryptoAvailable=e.getSubtleCrypto=e.getBrowerCrypto=void 0,e.getBrowerCrypto=n,e.getSubtleCrypto=r,e.isBrowserCryptoAvailable=function(){return !!n()&&!!r()};}).call(this,n(16));},function(t,e,n){(function(t){function n(){return "undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function r(){return void 0!==t&&void 0!==t.versions&&void 0!==t.versions.node}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=e.isNode=e.isReactNative=void 0,e.isReactNative=n,e.isNode=r,e.isBrowser=function(){return !n()&&!r()};}).call(this,n(15));},function(t,e,n){t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase());},function(t,e,n){var r=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function i(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],i(n),i(r))}function s(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(r),n=1;n<e.length;n++)e=(t=i(e,n).join("")).match(r);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=o.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0]);}catch(t){var r=s(n[0]);r!==n[0]&&(e[n[0]]=r);}n=o.exec(t);}e["%C2"]="�";for(var i=Object.keys(e),a=0;a<i.length;a++){var u=i[a];t=t.replace(new RegExp(u,"g"),e[u]);}return t}(t)}};},function(t,e,n){t.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return [t];const n=t.indexOf(e);return -1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]};},function(t,e,n){t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};},function(t,e,n){var r=n(66),o=n(67),i=n(84),s=n(85);function a(t,e,n,i,s){var a=[].slice.call(arguments,1),u=a.length,c="function"==typeof a[u-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(u<1)throw new Error("Too few arguments provided");return 1===u?(n=e,e=i=void 0):2!==u||e.getContext||(i=n,n=e,e=void 0),new Promise((function(r,s){try{var a=o.create(n,i);r(t(a,e,i));}catch(t){s(t);}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(s=n,n=e,e=i=void 0):3===u&&(e.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=n,n=e,e=void 0));try{var l=o.create(n,i);s(null,t(l,e,i));}catch(t){s(t);}}e.create=o.create,e.toCanvas=a.bind(null,i.render),e.toDataURL=a.bind(null,i.renderToDataURL),e.toString=a.bind(null,(function(t,e,n){return s.render(t,n)}));},function(t,e){t.exports=function(){return "function"==typeof Promise&&Promise.prototype&&Promise.prototype.then};},function(t,e,n){var r=n(10),o=n(7),i=n(19),s=n(68),a=n(69),u=n(70),c=n(71),l=n(72),h=n(42),f=n(73),d=n(76),p=n(77),g=n(8),m=n(78),_=n(18);function v(t,e,n){var r,o,i=t.size,s=p.getEncodedBits(e,n);for(r=0;r<15;r++)o=1==(s>>r&1),r<6?t.set(r,8,o,!0):r<8?t.set(r+1,8,o,!0):t.set(i-15+r,8,o,!0),r<8?t.set(8,i-r-1,o,!0):r<9?t.set(8,15-r-1+1,o,!0):t.set(8,15-r-1,o,!0);t.set(i-8,8,1,!0);}function y(t,e,n){var i=new s;n.forEach((function(e){i.put(e.mode.bit,4),i.put(e.getLength(),g.getCharCountIndicator(e.mode,t)),e.write(i);}));var a=8*(o.getSymbolTotalCodewords(t)-h.getTotalCodewordsCount(t,e));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);for(var u=(a-i.getLengthInBits())/8,c=0;c<u;c++)i.put(c%2?17:236,8);return function(t,e,n){for(var i=o.getSymbolTotalCodewords(e),s=h.getTotalCodewordsCount(e,n),a=i-s,u=h.getBlocksCount(e,n),c=u-i%u,l=Math.floor(i/u),d=Math.floor(a/u),p=d+1,g=l-d,m=new f(g),_=0,v=new Array(u),y=new Array(u),w=0,b=r.from(t.buffer),M=0;M<u;M++){var x=M<c?d:p;v[M]=b.slice(_,_+x),y[M]=m.encode(v[M]),_+=x,w=Math.max(w,x);}var E,k,S=r.alloc(i),C=0;for(E=0;E<w;E++)for(k=0;k<u;k++)E<v[k].length&&(S[C++]=v[k][E]);for(E=0;E<g;E++)for(k=0;k<u;k++)S[C++]=y[k][E];return S}(i,t,e)}function w(t,e,n,r){var i;if(_(t))i=m.fromArray(t);else {if("string"!=typeof t)throw new Error("Invalid data");var s=e;if(!s){var h=m.rawSplit(t);s=d.getBestVersionForData(h,n);}i=m.fromString(t,s||40);}var f=d.getBestVersionForData(i,n);if(!f)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<f)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+f+".\n")}else e=f;var p=y(e,n,i),g=o.getSymbolSize(e),w=new a(g);return function(t,e){for(var n=t.size,r=c.getPositions(e),o=0;o<r.length;o++)for(var i=r[o][0],s=r[o][1],a=-1;a<=7;a++)if(!(i+a<=-1||n<=i+a))for(var u=-1;u<=7;u++)s+u<=-1||n<=s+u||(a>=0&&a<=6&&(0===u||6===u)||u>=0&&u<=6&&(0===a||6===a)||a>=2&&a<=4&&u>=2&&u<=4?t.set(i+a,s+u,!0,!0):t.set(i+a,s+u,!1,!0));}(w,e),function(t){for(var e=t.size,n=8;n<e-8;n++){var r=n%2==0;t.set(n,6,r,!0),t.set(6,n,r,!0);}}(w),function(t,e){for(var n=u.getPositions(e),r=0;r<n.length;r++)for(var o=n[r][0],i=n[r][1],s=-2;s<=2;s++)for(var a=-2;a<=2;a++)-2===s||2===s||-2===a||2===a||0===s&&0===a?t.set(o+s,i+a,!0,!0):t.set(o+s,i+a,!1,!0);}(w,e),v(w,n,0),e>=7&&function(t,e){for(var n,r,o,i=t.size,s=d.getEncodedBits(e),a=0;a<18;a++)n=Math.floor(a/3),r=a%3+i-8-3,o=1==(s>>a&1),t.set(n,r,o,!0),t.set(r,n,o,!0);}(w,e),function(t,e){for(var n=t.size,r=-1,o=n-1,i=7,s=0,a=n-1;a>0;a-=2)for(6===a&&a--;;){for(var u=0;u<2;u++)if(!t.isReserved(o,a-u)){var c=!1;s<e.length&&(c=1==(e[s]>>>i&1)),t.set(o,a-u,c),-1===--i&&(s++,i=7);}if((o+=r)<0||n<=o){o-=r,r=-r;break}}}(w,p),isNaN(r)&&(r=l.getBestMask(w,v.bind(null,w,n))),l.applyMask(r,w),v(w,n,r),{modules:w,version:e,errorCorrectionLevel:n,maskPattern:r,segments:i}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var n,r,s=i.M;return void 0!==e&&(s=i.from(e.errorCorrectionLevel,i.M),n=d.from(e.version),r=l.from(e.maskPattern),e.toSJISFunc&&o.setToSJISFunction(e.toSJISFunc)),w(t,n,s,r)};},function(t,e){function n(){this.buffer=[],this.length=0;}n.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1));},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++;}},t.exports=n;},function(t,e,n){var r=n(10);function o(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=r.alloc(t*t),this.reservedBit=r.alloc(t*t);}o.prototype.set=function(t,e,n,r){var o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0);},o.prototype.get=function(t,e){return this.data[t*this.size+e]},o.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n;},o.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=o;},function(t,e,n){var r=n(7).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return [];for(var e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7],s=1;s<e-1;s++)i[s]=i[s-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){for(var n=[],r=e.getRowColCoords(t),o=r.length,i=0;i<o;i++)for(var s=0;s<o;s++)0===i&&0===s||0===i&&s===o-1||i===o-1&&0===s||n.push([r[i],r[s]]);return n};},function(t,e,n){var r=n(7).getSymbolSize;e.getPositions=function(t){var e=r(t);return [[0,0],[e-7,0],[0,e-7]]};},function(t,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var n=3,r=3,o=40,i=10;function s(t,n,r){switch(t){case e.Patterns.PATTERN000:return (n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return (n+r)%3==0;case e.Patterns.PATTERN100:return (Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return (n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return (n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){for(var e=t.size,r=0,o=0,i=0,s=null,a=null,u=0;u<e;u++){o=i=0,s=a=null;for(var c=0;c<e;c++){var l=t.get(u,c);l===s?o++:(o>=5&&(r+=n+(o-5)),s=l,o=1),(l=t.get(c,u))===a?i++:(i>=5&&(r+=n+(i-5)),a=l,i=1);}o>=5&&(r+=n+(o-5)),i>=5&&(r+=n+(i-5));}return r},e.getPenaltyN2=function(t){for(var e=t.size,n=0,o=0;o<e-1;o++)for(var i=0;i<e-1;i++){var s=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);4!==s&&0!==s||n++;}return n*r},e.getPenaltyN3=function(t){for(var e=t.size,n=0,r=0,i=0,s=0;s<e;s++){r=i=0;for(var a=0;a<e;a++)r=r<<1&2047|t.get(s,a),a>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|t.get(a,s),a>=10&&(1488===i||93===i)&&n++;}return n*o},e.getPenaltyN4=function(t){for(var e=0,n=t.data.length,r=0;r<n;r++)e+=t.data[r];return Math.abs(Math.ceil(100*e/n/5)-10)*i},e.applyMask=function(t,e){for(var n=e.size,r=0;r<n;r++)for(var o=0;o<n;o++)e.isReserved(o,r)||e.xor(o,r,s(t,o,r));},e.getBestMask=function(t,n){for(var r=Object.keys(e.Patterns).length,o=0,i=1/0,s=0;s<r;s++){n(s),e.applyMask(s,t);var a=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(s,t),a<i&&(i=a,o=s);}return o};},function(t,e,n){var r=n(10),o=n(74),i=n(17).Buffer;function s(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree);}s.prototype.initialize=function(t){this.degree=t,this.genPoly=o.generateECPolynomial(this.degree);},s.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=r.alloc(this.degree),n=i.concat([t,e],t.length+this.degree),s=o.mod(n,this.genPoly),a=this.degree-s.length;if(a>0){var u=r.alloc(this.degree);return s.copy(u,a),u}return s},t.exports=s;},function(t,e,n){var r=n(10),o=n(75);e.mul=function(t,e){for(var n=r.alloc(t.length+e.length-1),i=0;i<t.length;i++)for(var s=0;s<e.length;s++)n[i+s]^=o.mul(t[i],e[s]);return n},e.mod=function(t,e){for(var n=r.from(t);n.length-e.length>=0;){for(var i=n[0],s=0;s<e.length;s++)n[s]^=o.mul(e[s],i);for(var a=0;a<n.length&&0===n[a];)a++;n=n.slice(a);}return n},e.generateECPolynomial=function(t){for(var n=r.from([1]),i=0;i<t;i++)n=e.mul(n,[1,o.exp(i)]);return n};},function(t,e,n){var r=n(10),o=r.alloc(512),i=r.alloc(256);!function(){for(var t=1,e=0;e<255;e++)o[e]=t,i[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)o[e]=o[e-255];}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return i[t]},e.exp=function(t){return o[t]},e.mul=function(t,e){return 0===t||0===e?0:o[i[t]+i[e]]};},function(t,e,n){var r=n(7),o=n(42),i=n(19),s=n(8),a=n(43),u=n(18),c=r.getBCHDigit(7973);function l(t,e){return s.getCharCountIndicator(t,e)+4}function h(t,e){var n=0;return t.forEach((function(t){var r=l(t.mode,e);n+=r+t.getBitsLength();})),n}e.from=function(t,e){return a.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!a.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=s.BYTE);var i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===s.MIXED)return i;var u=i-l(n,t);switch(n){case s.NUMERIC:return Math.floor(u/10*3);case s.ALPHANUMERIC:return Math.floor(u/11*2);case s.KANJI:return Math.floor(u/13);case s.BYTE:default:return Math.floor(u/8)}},e.getBestVersionForData=function(t,n){var r,o=i.from(n,i.M);if(u(t)){if(t.length>1)return function(t,n){for(var r=1;r<=40;r++){if(h(t,r)<=e.getCapacity(r,n,s.MIXED))return r}}(t,o);if(0===t.length)return 1;r=t[0];}else r=t;return function(t,n,r){for(var o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!a.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;r.getBCHDigit(e)-c>=0;)e^=7973<<r.getBCHDigit(e)-c;return t<<12|e};},function(t,e,n){var r=n(7),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){for(var n=t.bit<<3|e,i=n<<10;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)};},function(t,e,n){var r=n(8),o=n(79),i=n(80),s=n(81),a=n(82),u=n(44),c=n(7),l=n(83);function h(t){return unescape(encodeURIComponent(t)).length}function f(t,e,n){for(var r,o=[];null!==(r=t.exec(n));)o.push({data:r[0],index:r.index,mode:e,length:r[0].length});return o}function d(t){var e,n,o=f(u.NUMERIC,r.NUMERIC,t),i=f(u.ALPHANUMERIC,r.ALPHANUMERIC,t);return c.isKanjiModeEnabled()?(e=f(u.BYTE,r.BYTE,t),n=f(u.KANJI,r.KANJI,t)):(e=f(u.BYTE_KANJI,r.BYTE,t),n=[]),o.concat(i,e,n).sort((function(t,e){return t.index-e.index})).map((function(t){return {data:t.data,mode:t.mode,length:t.length}}))}function p(t,e){switch(e){case r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return a.getBitsLength(t);case r.BYTE:return s.getBitsLength(t)}}function g(t,e){var n,u=r.getBestModeForData(t);if((n=r.from(e,u))!==r.BYTE&&n.bit<u.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(u));switch(n!==r.KANJI||c.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(t);case r.ALPHANUMERIC:return new i(t);case r.KANJI:return new a(t);case r.BYTE:return new s(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return "string"==typeof e?t.push(g(e,null)):e.data&&t.push(g(e.data,e.mode)),t}),[])},e.fromString=function(t,n){for(var o=function(t,e){for(var n={},o={start:{}},i=["start"],s=0;s<t.length;s++){for(var a=t[s],u=[],c=0;c<a.length;c++){var l=a[c],h=""+s+c;u.push(h),n[h]={node:l,lastCount:0},o[h]={};for(var f=0;f<i.length;f++){var d=i[f];n[d]&&n[d].node.mode===l.mode?(o[d][h]=p(n[d].lastCount+l.length,l.mode)-p(n[d].lastCount,l.mode),n[d].lastCount+=l.length):(n[d]&&(n[d].lastCount=l.length),o[d][h]=p(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,e));}}i=u;}for(f=0;f<i.length;f++)o[i[f]].end=0;return {map:o,table:n}}(function(t){for(var e=[],n=0;n<t.length;n++){var o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:h(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:h(o.data)}]);}}return e}(d(t,c.isKanjiModeEnabled())),n),i=l.find_path(o.map,"start","end"),s=[],a=1;a<i.length-1;a++)s.push(o.table[i[a]].node);return e.fromArray(function(t){return t.reduce((function(t,e){var n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(s))},e.rawSplit=function(t){return e.fromArray(d(t,c.isKanjiModeEnabled()))};},function(t,e,n){var r=n(8);function o(t){this.mode=r.NUMERIC,this.data=t.toString();}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);var o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1));},t.exports=o;},function(t,e,n){var r=n(8),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=r.ALPHANUMERIC,this.data=t;}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11);}this.data.length%2&&t.put(o.indexOf(this.data[e]),6);},t.exports=i;},function(t,e,n){var r=n(10),o=n(8);function i(t){this.mode=o.BYTE,this.data=r.from(t);}i.getBitsLength=function(t){return 8*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){for(var e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8);},t.exports=i;},function(t,e,n){var r=n(8),o=n(7);function i(t){this.mode=r.KANJI,this.data=t;}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else {if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472;}n=192*(n>>>8&255)+(255&n),t.put(n,13);}},t.exports=i;},function(t,e,n){var r={single_source_shortest_paths:function(t,e,n){var o={},i={};i[e]=0;var s,a,u,c,l,h,f,d=r.PriorityQueue.make();for(d.push(e,0);!d.empty();)for(u in a=(s=d.pop()).value,c=s.cost,l=t[a]||{})l.hasOwnProperty(u)&&(h=c+l[u],f=i[u],(void 0===i[u]||f>h)&&(i[u]=h,d.push(u,h),o[u]=a));if(void 0!==n&&void 0===i[n]){var p=["Could not find a path from ",e," to ",n,"."].join("");throw new Error(p)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,e,n){var o=r.single_source_shortest_paths(t,e,n);return r.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(t){var e,n=r.PriorityQueue,o={};for(e in t=t||{},n)n.hasOwnProperty(e)&&(o[e]=n[e]);return o.queue=[],o.sorter=t.sorter||n.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter);},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=r;},function(t,e,n){var r=n(45);e.render=function(t,e,n){var o=n,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);var s=r.getImageWidth(t.modules.size,o),a=i.getContext("2d"),u=a.createImageData(s,s);return r.qrToImageData(u.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px";}(a,i,s),a.putImageData(u,0,0),i},e.renderToDataURL=function(t,n,r){var o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});var i=e.render(t,n,o),s=o.type||"image/png",a=o.rendererOpts||{};return i.toDataURL(s,a.quality)};},function(t,e,n){var r=n(45);function o(t,e){var n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){var r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){var s=r.getOptions(e),a=t.modules.size,u=t.modules.data,c=a+2*s.margin,l=s.color.light.a?"<path "+o(s.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",h="<path "+o(s.color.dark,"stroke")+' d="'+function(t,e,n){for(var r="",o=0,s=!1,a=0,u=0;u<t.length;u++){var c=Math.floor(u%e),l=Math.floor(u/e);c||s||(s=!0),t[u]?(a++,u>0&&c>0&&t[u-1]||(r+=s?i("M",c+n,.5+l+n):i("m",o,0),o=0,s=!1),c+1<e&&t[u+1]||(r+=i("h",a),a=0)):o++;}return r}(u,a,s.margin)+'"/>',f='viewBox="0 0 '+c+" "+c+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+f+' shape-rendering="crispEdges">'+l+h+"</svg>\n";return "function"==typeof n&&n(null,d),d};},function(t,e,n){var r=n(87),o={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(t,e){var n,i,s,a,u,c,l=!1;e||(e={}),n=e.debug||!1;try{if(s=r(),a=document.createRange(),u=document.getSelection(),(c=document.createElement("span")).textContent=t,c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),e.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[e.format]||o.default;window.clipboardData.setData(i,t);}else r.clipboardData.clearData(),r.clipboardData.setData(e.format,t);e.onCopy&&(r.preventDefault(),e.onCopy(r.clipboardData));})),document.body.appendChild(c),a.selectNodeContents(c),u.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0;}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0;}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),i=function(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}("message"in e?e.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,t);}}finally{u&&("function"==typeof u.removeRange?u.removeRange(a):u.removeAllRanges()),c&&document.body.removeChild(c),s();}return l};},function(t,e){t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r<t.rangeCount;r++)n.push(t.getRangeAt(r));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||n.forEach((function(e){t.addRange(e);})),e&&e.focus();}};},function(t,e,n){n.r(e),n.d(e,"WalletConnectClient",(function(){return _})),n.d(e,"QRCodeModal",(function(){return y.a}));var r={};n.r(r),n.d(r,"generateKey",(function(){return d})),n.d(r,"verifyHmac",(function(){return p})),n.d(r,"encrypt",(function(){return g})),n.d(r,"decrypt",(function(){return m}));var o=n(1),i=n(50);var s=class{constructor(){this._eventEmitters=[];}subscribe(t){this._eventEmitters.push(t);}unsubscribe(t){this._eventEmitters=this._eventEmitters.filter(e=>e.event!==t);}trigger(t){let e,n=[];e=Object(o.o)(t)?t.method:Object(o.q)(t)||Object(o.p)(t)?"response:"+t.id:Object(o.n)(t)?t.event:"",e&&(n=this._eventEmitters.filter(t=>t.event===e)),n&&n.length||Object(o.s)(e)||Object(o.n)(e)||(n=this._eventEmitters.filter(t=>"call_request"===t.event)),n.forEach(e=>{if(Object(o.p)(t)){const n=new Error(t.error.message);e.callback(n,null);}else e.callback(null,t);});}};var a=class{constructor(t="walletconnect"){this.storageId=t;}getSession(){let t=null;const e=Object(o.j)(this.storageId);return e&&Object(o.u)(e)&&(t=e),t}setSession(t){return Object(o.B)(this.storageId,t),t}removeSession(){Object(o.A)(this.storageId);}};const u="abcdefghijklmnopqrstuvwxyz0123456789".split("").map(t=>`https://${t}.bridge.walletconnect.org`);function c(){return u[Math.floor(Math.random()*u.length)]}var l=class{constructor(t){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new s,this._clientMeta=Object(o.i)()||t.connectorOpts.clientMeta||null,this._cryptoLib=t.cryptoLib,this._sessionStorage=t.sessionStorage||new a(t.connectorOpts.storageId),this._qrcodeModal=t.connectorOpts.qrcodeModal,this._qrcodeModalOptions=t.connectorOpts.qrcodeModalOptions,this._signingMethods=[...o.C,...t.connectorOpts.signingMethods||[]],!t.connectorOpts.bridge&&!t.connectorOpts.uri&&!t.connectorOpts.session)throw new Error("Missing one of the required parameters: bridge / uri / session");var e;t.connectorOpts.bridge&&(this.bridge=function(t){return "walletconnect.org"===function(t){return function(t){let e=t.indexOf("//")>-1?t.split("/")[2]:t.split("/")[0];return e=e.split(":")[0],e=e.split("?")[0],e}(t).split(".").slice(-2).join(".")}(t)}(e=t.connectorOpts.bridge)?c():e),t.connectorOpts.uri&&(this.uri=t.connectorOpts.uri);const n=t.connectorOpts.session||this._getStorageSession();n&&(this.session=n),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=t.transport||new i.a({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),t.connectorOpts.uri&&this._subscribeToSessionRequest(),t.pushServerOpts&&this._registerPushServer(t.pushServerOpts);}set bridge(t){t&&(this._bridge=t);}get bridge(){return this._bridge}set key(t){if(!t)return;const e=Object(o.e)(t);this._key=e;}get key(){if(this._key){return Object(o.c)(this._key,!0)}return ""}set clientId(t){t&&(this._clientId=t);}get clientId(){let t=this._clientId;return t||(t=this._clientId=Object(o.D)()),this._clientId}set peerId(t){t&&(this._peerId=t);}get peerId(){return this._peerId}set clientMeta(t){}get clientMeta(){let t=this._clientMeta;return t||(t=this._clientMeta=Object(o.i)()),t}set peerMeta(t){this._peerMeta=t;}get peerMeta(){return this._peerMeta}set handshakeTopic(t){t&&(this._handshakeTopic=t);}get handshakeTopic(){return this._handshakeTopic}set handshakeId(t){t&&(this._handshakeId=t);}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(t){if(!t)return;const{handshakeTopic:e,bridge:n,key:r}=this._parseUri(t);this.handshakeTopic=e,this.bridge=n,this.key=r;}set chainId(t){this._chainId=t;}get chainId(){return this._chainId}set networkId(t){this._networkId=t;}get networkId(){return this._networkId}set accounts(t){this._accounts=t;}get accounts(){return this._accounts}set rpcUrl(t){this._rpcUrl=t;}get rpcUrl(){return this._rpcUrl}set connected(t){}get connected(){return this._connected}set pending(t){}get pending(){return !!this._handshakeTopic}get session(){return {connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(t){t&&(this._connected=t.connected,this.accounts=t.accounts,this.chainId=t.chainId,this.bridge=t.bridge,this.key=t.key,this.clientId=t.clientId,this.clientMeta=t.clientMeta,this.peerId=t.peerId,this.peerMeta=t.peerMeta,this.handshakeId=t.handshakeId,this.handshakeTopic=t.handshakeTopic);}on(t,e){const n={event:t,callback:e};this._eventManager.subscribe(n);}off(t){this._eventManager.unsubscribe(t);}async createInstantRequest(t){this._key=await this._generateKey();const e=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(t)}]});this.handshakeId=e.id,this.handshakeTopic=Object(o.D)(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",()=>{throw new Error("User close QRCode Modal")});const n=()=>{this.killSession();};try{const t=await this._sendCallRequest(e);return t&&n(),t}catch(t){throw n(),t}}async connect(t){if(!this._qrcodeModal)throw new Error("QRCode Modal not provided");return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(t),new Promise(async(t,e)=>{this.on("modal_closed",()=>e(new Error("User close QRCode Modal"))),this.on("connect",(n,r)=>{if(n)return e(n);t(r.params[0]);});}))}async createSession(t){if(this._connected)throw new Error("Session currently connected");if(this.pending)return;this._key=await this._generateKey();const e=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:t&&t.chainId?t.chainId:null}]});this.handshakeId=e.id,this.handshakeTopic=Object(o.D)(),this._sendSessionRequest(e,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]});}approveSession(t){if(this._connected)throw new Error("Session currently connected");this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";const e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},n={id:this.handshakeId,jsonrpc:"2.0",result:e};this._sendResponse(n),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]});}rejectSession(t){if(this._connected)throw new Error("Session currently connected");const e=t&&t.message?t.message:"Session Rejected",n=this._formatResponse({id:this.handshakeId,error:{message:e}});this._sendResponse(n),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession();}updateSession(t){if(!this._connected)throw new Error("Session currently disconnected");this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";const e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},n=this._formatRequest({method:"wc_sessionUpdate",params:[e]});this._sendSessionRequest(n,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession();}async killSession(t){const e=t?t.message:"Session Disconnected",n=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]});await this._sendRequest(n),this._handleSessionDisconnect(e);}async sendTransaction(t){if(!this._connected)throw new Error("Session currently disconnected");const e=Object(o.x)(t),n=this._formatRequest({method:"eth_sendTransaction",params:[e]});return await this._sendCallRequest(n)}async signTransaction(t){if(!this._connected)throw new Error("Session currently disconnected");const e=Object(o.x)(t),n=this._formatRequest({method:"eth_signTransaction",params:[e]});return await this._sendCallRequest(n)}async signMessage(t){if(!this._connected)throw new Error("Session currently disconnected");const e=this._formatRequest({method:"eth_sign",params:t});return await this._sendCallRequest(e)}async signPersonalMessage(t){if(!this._connected)throw new Error("Session currently disconnected");t=Object(o.w)(t);const e=this._formatRequest({method:"personal_sign",params:t});return await this._sendCallRequest(e)}async signTypedData(t){if(!this._connected)throw new Error("Session currently disconnected");const e=this._formatRequest({method:"eth_signTypedData",params:t});return await this._sendCallRequest(e)}async updateChain(t){if(!this._connected)throw new Error("Session currently disconnected");const e=this._formatRequest({method:"wallet_updateChain",params:[t]});return await this._sendCallRequest(e)}unsafeSend(t,e){return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),new Promise((e,n)=>{this._subscribeToResponse(t.id,(t,r)=>{if(t)n(t);else {if(!r)throw new Error("Missing JSON RPC response");e(r);}});})}async sendCustomRequest(t,e){if(!this._connected)throw new Error("Session currently disconnected");switch(t.method){case"eth_accounts":return this.accounts;case"eth_chainId":return Object(o.f)(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":t.params&&(t.params[0]=Object(o.x)(t.params[0]));break;case"personal_sign":t.params&&(t.params=Object(o.w)(t.params));}const n=this._formatRequest(t);return await this._sendCallRequest(n,e)}approveRequest(t){if(!Object(o.q)(t))throw new Error('JSON-RPC success response must include "result" field');{const e=this._formatResponse(t);this._sendResponse(e);}}rejectRequest(t){if(!Object(o.p)(t))throw new Error('JSON-RPC error response must include "error" field');{const e=this._formatResponse(t);this._sendResponse(e);}}transportClose(){this._transport.close();}async _sendRequest(t,e){const n=this._formatRequest(t),r=await this._encrypt(n),i=void 0!==(null==e?void 0:e.topic)?e.topic:this.peerId,s=JSON.stringify(r),a=void 0!==(null==e?void 0:e.forcePushNotification)?!e.forcePushNotification:Object(o.t)(n);this._transport.send(s,i,a);}async _sendResponse(t){const e=await this._encrypt(t),n=this.peerId,r=JSON.stringify(e);this._transport.send(r,n,!0);}async _sendSessionRequest(t,e,n){this._sendRequest(t,n),this._subscribeToSessionResponse(t.id,e);}_sendCallRequest(t,e){return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),this._subscribeToCallResponse(t.id)}_formatRequest(t){if(void 0===t.method)throw new Error('JSON RPC request must have valid "method" value');return {id:void 0===t.id?Object(o.z)():t.id,jsonrpc:"2.0",method:t.method,params:void 0===t.params?[]:t.params}}_formatResponse(t){if(void 0===t.id)throw new Error('JSON RPC request must have valid "id" value');const e={id:t.id,jsonrpc:"2.0"};if(Object(o.p)(t)){const n=Object(o.h)(t.error);return Object.assign(Object.assign(Object.assign({},e),t),{error:n})}if(Object(o.q)(t)){return Object.assign(Object.assign({},e),t)}throw new Error("JSON RPC response format is invalid")}_handleSessionDisconnect(t){const e=t||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Object(o.A)(o.v)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession(),this.transportClose();}_handleSessionResponse(t,e){e&&e.approved?(this._connected?(e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),e.peerId&&!this.peerId&&(this.peerId=e.peerId),e.peerMeta&&!this.peerMeta&&(this.peerMeta=e.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(t);}async _handleIncomingMessages(t){if(![this.clientId,this.handshakeTopic].includes(t.topic))return;let e;try{e=JSON.parse(t.payload);}catch(t){return}const n=await this._decrypt(e);n&&this._eventManager.trigger(n);}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic);}_subscribeToResponse(t,e){this.on("response:"+t,e);}_subscribeToSessionResponse(t,e){this._subscribeToResponse(t,(t,n)=>{t?this._handleSessionResponse(t.message):n.result?this._handleSessionResponse(e,n.result):n.error&&n.error.message?this._handleSessionResponse(n.error.message):this._handleSessionResponse(e);});}_subscribeToCallResponse(t){return new Promise((e,n)=>{this._subscribeToResponse(t,(t,r)=>{t?n(t):r.result?e(r.result):r.error&&r.error.message?n(new Error(r.error.message)):n(new Error("JSON RPC response format is invalid"));});})}_subscribeToInternalEvents(){this.on("display_uri",()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,()=>{this._eventManager.trigger({event:"modal_closed",params:[]});},this._qrcodeModalOptions);}),this.on("connect",()=>{this._qrcodeModal&&this._qrcodeModal.close();}),this.on("call_request_sent",(t,e)=>{const{request:n}=e.params[0];if(Object(o.r)()&&this._signingMethods.includes(n.method)){const t=Object(o.j)(o.v);t&&(window.location.href=t.href);}}),this.on("wc_sessionRequest",(t,e)=>{t&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:t.toString()}]}),this.handshakeId=e.id,this.peerId=e.params[0].peerId,this.peerMeta=e.params[0].peerMeta;const n=Object.assign(Object.assign({},e),{method:"session_request"});this._eventManager.trigger(n);}),this.on("wc_sessionUpdate",(t,e)=>{t&&this._handleSessionResponse(t.message),this._handleSessionResponse("Session disconnected",e.params[0]);});}_initTransport(){this._transport.on("message",t=>this._handleIncomingMessages(t)),this._transport.on("open",()=>this._eventManager.trigger({event:"transport_open",params:[]})),this._transport.on("close",()=>this._eventManager.trigger({event:"transport_close",params:[]})),this._transport.on("error",()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})),this._transport.open();}_formatUri(){return `${this.protocol}:${this.handshakeTopic}@${this.version}?bridge=${encodeURIComponent(this.bridge)}&key=${this.key}`}_parseUri(t){const e=Object(o.y)(t);if(e.protocol===this.protocol){if(!e.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const t=e.handshakeTopic;if(!e.bridge)throw Error("Invalid or missing bridge url parameter value");const n=decodeURIComponent(e.bridge);if(!e.key)throw Error("Invalid or missing key parameter value");return {handshakeTopic:t,bridge:n,key:e.key}}throw new Error("URI format is invalid")}async _generateKey(){if(this._cryptoLib){return await this._cryptoLib.generateKey()}return null}async _encrypt(t){const e=this._key;if(this._cryptoLib&&e){return await this._cryptoLib.encrypt(t,e)}return null}async _decrypt(t){const e=this._key;if(this._cryptoLib&&e){return await this._cryptoLib.decrypt(t,e)}return null}_getStorageSession(){let t=null;return this._sessionStorage&&(t=this._sessionStorage.getSession()),t}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session);}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession();}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession();}_registerPushServer(t){if(!t.url||"string"!=typeof t.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!t.type||"string"!=typeof t.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!t.token||"string"!=typeof t.token)throw Error("Invalid or missing pushServerOpts.token parameter value");const e={bridge:this.bridge,topic:this.clientId,type:t.type,token:t.token,peerName:"",language:t.language||""};this.on("connect",async(n,r)=>{if(n)throw n;if(t.peerMeta){const t=r.params[0].peerMeta.name;e.peerName=t;}try{const n=await fetch(t.url+"/new",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)});if(!(await n.json()).success)throw Error("Failed to register in Push Server")}catch(n){throw Error("Failed to register in Push Server")}});}},h=n(11),f=n(0);async function d(t){const e=(t||256)/8,n=h.randomBytes(e);return Object(o.d)(f.arrayToBuffer(n))}async function p(t,e){const n=f.hexToArray(t.data),r=f.hexToArray(t.iv),o=f.hexToArray(t.hmac),i=f.arrayToHex(o,!1),s=f.concatArrays(n,r),a=await h.hmacSha256Sign(e,s),u=f.arrayToHex(a,!1);return f.removeHexPrefix(i)===f.removeHexPrefix(u)}async function g(t,e,n){const r=f.bufferToArray(Object(o.b)(e)),i=n||await d(128),s=f.bufferToArray(Object(o.b)(i)),a=f.arrayToHex(s,!1),u=JSON.stringify(t),c=f.utf8ToArray(u),l=await h.aesCbcEncrypt(s,r,c),p=f.arrayToHex(l,!1),g=f.concatArrays(l,s),m=await h.hmacSha256Sign(r,g);return {data:p,hmac:f.arrayToHex(m,!1),iv:a}}async function m(t,e){const n=f.bufferToArray(Object(o.b)(e));if(!n)throw new Error("Missing key: required for decryption");if(!await p(t,n))return null;const r=f.hexToArray(t.data),i=f.hexToArray(t.iv),s=await h.aesCbcDecrypt(i,n,r),a=f.arrayToUtf8(s);let u;try{u=JSON.parse(a);}catch(t){return null}return u}var _=class extends l{constructor(t,e){super({cryptoLib:r,connectorOpts:t,pushServerOpts:e});}},v=n(41),y=n.n(v);},function(t,e,n){n.r(e),n.d(e,"useState",(function(){return K})),n.d(e,"useReducer",(function(){return Q})),n.d(e,"useEffect",(function(){return Z})),n.d(e,"useLayoutEffect",(function(){return X})),n.d(e,"useRef",(function(){return G})),n.d(e,"useImperativeHandle",(function(){return tt})),n.d(e,"useMemo",(function(){return et})),n.d(e,"useCallback",(function(){return nt})),n.d(e,"useContext",(function(){return rt})),n.d(e,"useDebugValue",(function(){return ot})),n.d(e,"useErrorBoundary",(function(){return it})),n.d(e,"createElement",(function(){return g})),n.d(e,"createContext",(function(){return j})),n.d(e,"createRef",(function(){return _})),n.d(e,"Fragment",(function(){return v})),n.d(e,"Component",(function(){return y})),n.d(e,"version",(function(){return Ut})),n.d(e,"Children",(function(){return vt})),n.d(e,"render",(function(){return It})),n.d(e,"hydrate",(function(){return Ot})),n.d(e,"unmountComponentAtNode",(function(){return zt})),n.d(e,"createPortal",(function(){return At})),n.d(e,"createFactory",(function(){return jt})),n.d(e,"cloneElement",(function(){return Dt})),n.d(e,"isValidElement",(function(){return qt})),n.d(e,"findDOMNode",(function(){return Wt})),n.d(e,"PureComponent",(function(){return dt})),n.d(e,"memo",(function(){return pt})),n.d(e,"forwardRef",(function(){return mt})),n.d(e,"unstable_batchedUpdates",(function(){return Ft})),n.d(e,"Suspense",(function(){return bt})),n.d(e,"SuspenseList",(function(){return Et})),n.d(e,"lazy",(function(){return xt}));var r,o,i,s,a,u,c,l={},h=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function d(t,e){for(var n in e)t[n]=e[n];return t}function p(t){var e=t.parentNode;e&&e.removeChild(t);}function g(t,e,n){var r,o=arguments,i={};for(r in e)"key"!==r&&"ref"!==r&&(i[r]=e[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(o[r]);if(null!=n&&(i.children=n),"function"==typeof t&&null!=t.defaultProps)for(r in t.defaultProps)void 0===i[r]&&(i[r]=t.defaultProps[r]);return m(t,i,e&&e.key,e&&e.ref,null)}function m(t,e,n,o,i){var s={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(s.__v=s),r.vnode&&r.vnode(s),s}function _(){return {}}function v(t){return t.children}function y(t,e){this.props=t,this.context=e;}function w(t,e){if(null==e)return t.__?w(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return "function"==typeof t.type?w(t):null}function b(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return b(t)}}function M(t){(!t.__d&&(t.__d=!0)&&o.push(t)&&!i++||a!==r.debounceRendering)&&((a=r.debounceRendering)||s)(x);}function x(){for(var t;i=o.length;)t=o.sort((function(t,e){return t.__v.__b-e.__v.__b})),o=[],t.some((function(t){var e,n,r,o,i,s,a;t.__d&&(s=(i=(e=t).__v).__e,(a=e.__P)&&(n=[],(r=d({},i)).__v=r,o=T(a,i,r,e.__n,void 0!==a.ownerSVGElement,null,n,null==s?w(i):s),R(n,i),o!=s&&b(i)));}));}function E(t,e,n,r,o,i,s,a,u){var c,f,d,g,m,_,v,y=n&&n.__k||h,b=y.length;if(a==l&&(a=null!=i?i[0]:b?w(n,0):null),c=0,e.__k=k(e.__k,(function(n){if(null!=n){if(n.__=e,n.__b=e.__b+1,null===(d=y[c])||d&&n.key==d.key&&n.type===d.type)y[c]=void 0;else for(f=0;f<b;f++){if((d=y[f])&&n.key==d.key&&n.type===d.type){y[f]=void 0;break}d=null;}if(g=T(t,n,d=d||l,r,o,i,s,a,u),(f=n.ref)&&d.ref!=f&&(v||(v=[]),d.ref&&v.push(d.ref,null,n),v.push(f,n.__c||g,n)),null!=g){var h;if(null==_&&(_=g),void 0!==n.__d)h=n.__d,n.__d=void 0;else if(i==d||g!=a||null==g.parentNode){t:if(null==a||a.parentNode!==t)t.appendChild(g),h=null;else {for(m=a,f=0;(m=m.nextSibling)&&f<b;f+=2)if(m==g)break t;t.insertBefore(g,a),h=a;}"option"==e.type&&(t.value="");}a=void 0!==h?h:g.nextSibling,"function"==typeof e.type&&(e.__d=a);}else a&&d.__e==a&&a.parentNode!=t&&(a=w(d));}return c++,n})),e.__e=_,null!=i&&"function"!=typeof e.type)for(c=i.length;c--;)null!=i[c]&&p(i[c]);for(c=b;c--;)null!=y[c]&&B(y[c],y[c]);if(v)for(c=0;c<v.length;c++)O(v[c],v[++c],v[++c]);}function k(t,e,n){if(null==n&&(n=[]),null==t||"boolean"==typeof t)e&&n.push(e(null));else if(Array.isArray(t))for(var r=0;r<t.length;r++)k(t[r],e,n);else n.push(e?e("string"==typeof t||"number"==typeof t?m(null,t,null,null,t):null!=t.__e||null!=t.__c?m(t.type,t.props,t.key,null,t.__v):t):t);return n}function S(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]="number"==typeof n&&!1===f.test(e)?n+"px":null==n?"":n;}function C(t,e,n,r,o){var i,s,a,u,c;if(o?"className"===e&&(e="class"):"class"===e&&(e="className"),"style"===e)if(i=t.style,"string"==typeof n)i.cssText=n;else {if("string"==typeof r&&(i.cssText="",r=null),r)for(u in r)n&&u in n||S(i,u,"");if(n)for(c in n)r&&n[c]===r[c]||S(i,c,n[c]);}else "o"===e[0]&&"n"===e[1]?(s=e!==(e=e.replace(/Capture$/,"")),a=e.toLowerCase(),e=(a in t?a:e).slice(2),n?(r||t.addEventListener(e,A,s),(t.l||(t.l={}))[e]=n):t.removeEventListener(e,A,s)):"list"!==e&&"tagName"!==e&&"form"!==e&&"type"!==e&&"size"!==e&&!o&&e in t?t[e]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==e&&(e!==(e=e.replace(/^xlink:?/,""))?null==n||!1===n?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(e)?t.removeAttribute(e):t.setAttribute(e,n));}function A(t){this.l[t.type](r.event?r.event(t):t);}function T(t,e,n,o,i,s,a,u,c){var l,h,f,p,g,m,_,w,b,M,x=e.type;if(void 0!==e.constructor)return null;(l=r.__b)&&l(e);try{t:if("function"==typeof x){if(w=e.props,b=(l=x.contextType)&&o[l.__c],M=l?b?b.props.value:l.__:o,n.__c?_=(h=e.__c=n.__c).__=h.__E:("prototype"in x&&x.prototype.render?e.__c=h=new x(w,M):(e.__c=h=new y(w,M),h.constructor=x,h.render=P),b&&b.sub(h),h.props=w,h.state||(h.state={}),h.context=M,h.__n=o,f=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=x.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,x.getDerivedStateFromProps(w,h.__s))),p=h.props,g=h.state,f)null==x.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==x.getDerivedStateFromProps&&w!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(w,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(w,h.__s,M)||e.__v===n.__v&&!h.__){for(h.props=w,h.state=h.__s,e.__v!==n.__v&&(h.__d=!1),h.__v=e,e.__e=n.__e,e.__k=n.__k,h.__h.length&&a.push(h),l=0;l<e.__k.length;l++)e.__k[l]&&(e.__k[l].__=e);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(w,h.__s,M),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(p,g,m);}));}h.context=M,h.props=w,h.state=h.__s,(l=r.__r)&&l(e),h.__d=!1,h.__v=e,h.__P=t,l=h.render(h.props,h.state,h.context),e.__k=null!=l&&l.type==v&&null==l.key?l.props.children:Array.isArray(l)?l:[l],null!=h.getChildContext&&(o=d(d({},o),h.getChildContext())),f||null==h.getSnapshotBeforeUpdate||(m=h.getSnapshotBeforeUpdate(p,g)),E(t,e,n,o,i,s,a,u,c),h.base=e.__e,h.__h.length&&a.push(h),_&&(h.__E=h.__=null),h.__e=!1;}else null==s&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=I(n.__e,e,n,o,i,s,a,c);(l=r.diffed)&&l(e);}catch(t){e.__v=null,r.__e(t,e,n);}return e.__e}function R(t,e){r.__c&&r.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e);}));}catch(t){r.__e(t,e.__v);}}));}function I(t,e,n,r,o,i,s,a){var u,c,f,d,p,g=n.props,m=e.props;if(o="svg"===e.type||o,null!=i)for(u=0;u<i.length;u++)if(null!=(c=i[u])&&((null===e.type?3===c.nodeType:c.localName===e.type)||t==c)){t=c,i[u]=null;break}if(null==t){if(null===e.type)return document.createTextNode(m);t=o?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type,m.is&&{is:m.is}),i=null,a=!1;}if(null===e.type)g!==m&&t.data!=m&&(t.data=m);else {if(null!=i&&(i=h.slice.call(t.childNodes)),f=(g=n.props||l).dangerouslySetInnerHTML,d=m.dangerouslySetInnerHTML,!a){if(g===l)for(g={},p=0;p<t.attributes.length;p++)g[t.attributes[p].name]=t.attributes[p].value;(d||f)&&(d&&f&&d.__html==f.__html||(t.innerHTML=d&&d.__html||""));}((function(t,e,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in e||C(t,i,null,n[i],r);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===e[i]||C(t,i,e[i],n[i],r);}))(t,m,g,o,a),d?e.__k=[]:(e.__k=e.props.children,E(t,e,n,r,"foreignObject"!==e.type&&o,i,s,l,a)),a||("value"in m&&void 0!==(u=m.value)&&u!==t.value&&C(t,"value",u,g.value,!1),"checked"in m&&void 0!==(u=m.checked)&&u!==t.checked&&C(t,"checked",u,g.checked,!1));}return t}function O(t,e,n){try{"function"==typeof t?t(e):t.current=e;}catch(t){r.__e(t,n);}}function B(t,e,n){var o,i,s;if(r.unmount&&r.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||O(o,null,e)),n||"function"==typeof t.type||(n=null!=(i=t.__e)),t.__e=t.__d=void 0,null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount();}catch(t){r.__e(t,e);}o.base=o.__P=null;}if(o=t.__k)for(s=0;s<o.length;s++)o[s]&&B(o[s],e,n);null!=i&&p(i);}function P(t,e,n){return this.constructor(t,n)}function N(t,e,n){var o,i,s;r.__&&r.__(t,e),i=(o=n===u)?null:n&&n.__k||e.__k,t=g(v,null,[t]),s=[],T(e,(o?e:n||e).__k=t,i||l,l,void 0!==e.ownerSVGElement,n&&!o?[n]:i?null:h.slice.call(e.childNodes),s,n||l,o),R(s,t);}function L(t,e){N(t,e,u);}function U(t,e){var n,r;for(r in e=d(d({},t.props),e),arguments.length>2&&(e.children=h.slice.call(arguments,2)),n={},e)"key"!==r&&"ref"!==r&&(n[r]=e[r]);return m(t.type,n,e.key||t.key,e.ref||t.ref,null)}function j(t){var e={},n={__c:"__cC"+c++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var r,o=this;return this.getChildContext||(r=[],this.getChildContext=function(){return e[n.__c]=o,e},this.shouldComponentUpdate=function(t){o.props.value!==t.value&&r.some((function(e){e.context=t.value,M(e);}));},this.sub=function(t){r.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){r.splice(r.indexOf(t),1),e&&e.call(t);};}),t.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}r={__e:function(t,e){for(var n,r;e=e.__;)if((n=e.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(t))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(t)),r)return M(n.__E=n)}catch(e){t=e;}throw t}},y.prototype.setState=function(t,e){var n;n=this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof t&&(t=t(n,this.props)),t&&d(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),M(this));},y.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),M(this));},y.prototype.render=v,o=[],i=0,s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=l,c=0;var q,D,z,W=0,F=[],H=r.__r,Y=r.diffed,J=r.__c,$=r.unmount;function V(t,e){r.__h&&r.__h(D,t,W||e),W=0;var n=D.__H||(D.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function K(t){return W=1,Q(lt,t)}function Q(t,e,n){var r=V(q++,2);return r.__c||(r.__c=D,r.__=[n?n(e):lt(void 0,e),function(e){var n=t(r.__[0],e);r.__[0]!==n&&(r.__[0]=n,r.__c.setState({}));}]),r.__}function Z(t,e){var n=V(q++,3);!r.__s&&ct(n.__H,e)&&(n.__=t,n.__H=e,D.__H.__h.push(n));}function X(t,e){var n=V(q++,4);!r.__s&&ct(n.__H,e)&&(n.__=t,n.__H=e,D.__h.push(n));}function G(t){return W=5,et((function(){return {current:t}}),[])}function tt(t,e,n){W=6,X((function(){"function"==typeof t?t(e()):t&&(t.current=e());}),null==n?n:n.concat(t));}function et(t,e){var n=V(q++,7);return ct(n.__H,e)?(n.__H=e,n.__h=t,n.__=t()):n.__}function nt(t,e){return W=8,et((function(){return t}),e)}function rt(t){var e=D.context[t.__c],n=V(q++,9);return n.__c=t,e?(null==n.__&&(n.__=!0,e.sub(D)),e.props.value):t.__}function ot(t,e){r.useDebugValue&&r.useDebugValue(e?e(t):t);}function it(t){var e=V(q++,10),n=K();return e.__=t,D.componentDidCatch||(D.componentDidCatch=function(t){e.__&&e.__(t),n[1](t);}),[n[0],function(){n[1](void 0);}]}function st(){F.some((function(t){if(t.__P)try{t.__H.__h.forEach(at),t.__H.__h.forEach(ut),t.__H.__h=[];}catch(e){return t.__H.__h=[],r.__e(e,t.__v),!0}})),F=[];}function at(t){t.t&&t.t();}function ut(t){var e=t.__();"function"==typeof e&&(t.t=e);}function ct(t,e){return !t||e.some((function(e,n){return e!==t[n]}))}function lt(t,e){return "function"==typeof e?e(t):e}function ht(t,e){for(var n in e)t[n]=e[n];return t}function ft(t,e){for(var n in t)if("__source"!==n&&!(n in e))return !0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return !0;return !1}r.__r=function(t){H&&H(t),q=0,(D=t.__c).__H&&(D.__H.__h.forEach(at),D.__H.__h.forEach(ut),D.__H.__h=[]);},r.diffed=function(t){Y&&Y(t);var e=t.__c;if(e){var n=e.__H;n&&n.__h.length&&(1!==F.push(e)&&z===r.requestAnimationFrame||((z=r.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(r),cancelAnimationFrame(e),setTimeout(t);},r=setTimeout(n,100);"undefined"!=typeof window&&(e=requestAnimationFrame(n));})(st));}},r.__c=function(t,e){e.some((function(t){try{t.__h.forEach(at),t.__h=t.__h.filter((function(t){return !t.__||ut(t)}));}catch(n){e.some((function(t){t.__h&&(t.__h=[]);})),e=[],r.__e(n,t.__v);}})),J&&J(t,e);},r.unmount=function(t){$&&$(t);var e=t.__c;if(e){var n=e.__H;if(n)try{n.__.forEach((function(t){return t.t&&t.t()}));}catch(t){r.__e(t,e.__v);}}};var dt=function(t){var e,n;function r(e){var n;return (n=t.call(this,e)||this).isPureReactComponent=!0,n}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.shouldComponentUpdate=function(t,e){return ft(this.props,t)||ft(this.state,e)},r}(y);function pt(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return !r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:ft(this.props,t)}function r(e){return this.shouldComponentUpdate=n,g(t,ht({},e))}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(t.displayName||t.name)+")",r.t=!0,r}var gt=r.__b;function mt(t){function e(e){var n=ht({},e);return delete n.ref,t(n,e.ref)}return e.prototype.isReactComponent=e.t=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}r.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),gt&>(t);};var _t=function(t,e){return t?k(t).reduce((function(t,n,r){return t.concat(e(n,r))}),[]):null},vt={map:_t,forEach:_t,count:function(t){return t?k(t).length:0},only:function(t){if(1!==(t=k(t)).length)throw new Error("Children.only() expects only one child.");return t[0]},toArray:k},yt=r.__e;function wt(t){return t&&((t=ht({},t)).__c=null,t.__k=t.__k&&t.__k.map(wt)),t}function bt(){this.__u=0,this.o=null,this.__b=null;}function Mt(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function xt(t){var e,n,r;function o(o){if(e||(e=t()).then((function(t){n=t.default||t;}),(function(t){r=t;})),r)throw r;if(!n)throw e;return g(n,o)}return o.displayName="Lazy",o.t=!0,o}function Et(){this.i=null,this.l=null;}r.__e=function(t,e,n){if(t.then)for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return r.__c(t,e.__c);yt(t,e,n);},(bt.prototype=new y).__c=function(t,e){var n=this;null==n.o&&(n.o=[]),n.o.push(e);var r=Mt(n.__v),o=!1,i=function(){o||(o=!0,r?r(s):s());};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){i(),e.__c&&e.__c();};var s=function(){var t;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});t=n.o.pop();)t.forceUpdate();};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),t.then(i,i);},bt.prototype.render=function(t,e){return this.__b&&(this.__v.__k[0]=wt(this.__b),this.__b=null),[g(y,null,e.u?null:t.children),e.u&&t.fallback]};var kt=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2];}};(Et.prototype=new y).u=function(t){var e=this,n=Mt(e.__v),r=e.l.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),kt(e,t,r)):o();};n?n(i):i();}},Et.prototype.render=function(t){this.i=null,this.l=new Map;var e=k(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Et.prototype.componentDidUpdate=Et.prototype.componentDidMount=function(){var t=this;t.l.forEach((function(e,n){kt(t,n,e);}));};var St=function(){function t(){}var e=t.prototype;return e.getChildContext=function(){return this.props.context},e.render=function(t){return t.children},t}();function Ct(t){var e=this,n=t.container,r=g(St,{context:e.context},t.vnode);return e.s&&e.s!==n&&(e.v.parentNode&&e.s.removeChild(e.v),B(e.h),e.p=!1),t.vnode?e.p?(n.__k=e.__k,N(r,n),e.__k=n.__k):(e.v=document.createTextNode(""),L("",n),n.appendChild(e.v),e.p=!0,e.s=n,N(r,n,e.v),e.__k=e.v.__k):e.p&&(e.v.parentNode&&e.s.removeChild(e.v),B(e.h)),e.h=r,e.componentWillUnmount=function(){e.v.parentNode&&e.s.removeChild(e.v),B(e.h);},null}function At(t,e){return g(Ct,{vnode:t,container:e})}var Tt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;y.prototype.isReactComponent={};var Rt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function It(t,e,n){if(null==e.__k)for(;e.firstChild;)e.removeChild(e.firstChild);return N(t,e),"function"==typeof n&&n(),t?t.__c:null}function Ot(t,e,n){return L(t,e),"function"==typeof n&&n(),t?t.__c:null}var Bt=r.event;function Pt(t,e){t["UNSAFE_"+e]&&!t[e]&&Object.defineProperty(t,e,{configurable:!1,get:function(){return this["UNSAFE_"+e]},set:function(t){this["UNSAFE_"+e]=t;}});}r.event=function(t){Bt&&(t=Bt(t)),t.persist=function(){};var e=!1,n=!1,r=t.stopPropagation;t.stopPropagation=function(){r.call(t),e=!0;};var o=t.preventDefault;return t.preventDefault=function(){o.call(t),n=!0;},t.isPropagationStopped=function(){return e},t.isDefaultPrevented=function(){return n},t.nativeEvent=t};var Nt={configurable:!0,get:function(){return this.class}},Lt=r.vnode;r.vnode=function(t){t.$$typeof=Rt;var e=t.type,n=t.props;if(e){if(n.class!=n.className&&(Nt.enumerable="className"in n,null!=n.className&&(n.class=n.className),Object.defineProperty(n,"className",Nt)),"function"!=typeof e){var r,o,i;for(i in n.defaultValue&&void 0!==n.value&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),Array.isArray(n.value)&&n.multiple&&"select"===e&&(k(n.children).forEach((function(t){-1!=n.value.indexOf(t.props.value)&&(t.props.selected=!0);})),delete n.value),n)if(r=Tt.test(i))break;if(r)for(i in o=t.props={},n)o[Tt.test(i)?i.replace(/[A-Z0-9]/,"-$&").toLowerCase():i]=n[i];}!function(e){var n=t.type,r=t.props;if(r&&"string"==typeof n){var o={};for(var i in r)/^on(Ani|Tra|Tou)/.test(i)&&(r[i.toLowerCase()]=r[i],delete r[i]),o[i.toLowerCase()]=i;if(o.ondoubleclick&&(r.ondblclick=r[o.ondoubleclick],delete r[o.ondoubleclick]),o.onbeforeinput&&(r.onbeforeinput=r[o.onbeforeinput],delete r[o.onbeforeinput]),o.onchange&&("textarea"===n||"input"===n.toLowerCase()&&!/^fil|che|ra/i.test(r.type))){var s=o.oninput||"oninput";r[s]||(r[s]=r[o.onchange],delete r[o.onchange]);}}}(),"function"==typeof e&&!e.m&&e.prototype&&(Pt(e.prototype,"componentWillMount"),Pt(e.prototype,"componentWillReceiveProps"),Pt(e.prototype,"componentWillUpdate"),e.m=!0);}Lt&&Lt(t);};var Ut="16.8.0";function jt(t){return g.bind(null,t)}function qt(t){return !!t&&t.$$typeof===Rt}function Dt(t){return qt(t)?U.apply(null,arguments):t}function zt(t){return !!t.__k&&(N(null,t),!0)}function Wt(t){return t&&(t.base||1===t.nodeType&&t)||null}var Ft=function(t,e){return t(e)};e.default={useState:K,useReducer:Q,useEffect:Z,useLayoutEffect:X,useRef:G,useImperativeHandle:tt,useMemo:et,useCallback:nt,useContext:rt,useDebugValue:ot,version:"16.8.0",Children:vt,render:It,hydrate:It,unmountComponentAtNode:zt,createPortal:At,createElement:g,createContext:j,createFactory:jt,cloneElement:Dt,createRef:_,Fragment:v,isValidElement:qt,findDOMNode:Wt,Component:y,PureComponent:dt,memo:pt,forwardRef:mt,unstable_batchedUpdates:Ft,Suspense:bt,SuspenseList:Et,lazy:xt};}]);void 0===WalletConnect&&console.error("esm-webpack-plugin: nothing exported!");const _WalletConnect$WalletConnectClient=WalletConnect.WalletConnectClient,_WalletConnect$QRCodeModal=WalletConnect.QRCodeModal;
|
|
7087
|
-
|
|
7088
7069
|
var bn$4 = createCommonjsModule$4(function (module) {
|
|
7089
7070
|
(function (module, exports) {
|
|
7090
7071
|
|
|
@@ -30662,6 +30643,25 @@
|
|
|
30662
30643
|
}
|
|
30663
30644
|
};
|
|
30664
30645
|
|
|
30646
|
+
var WalletConnect=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r});},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0});},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=88)}([function(t,e,n){(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.removeHexLeadingZeros=e.sanitizeHex=e.addHexPrefix=e.removeHexPrefix=e.padRight=e.padLeft=e.sanitizeBytes=e.swapHex=e.swapBytes=e.splitBytes=e.calcByteLength=e.trimRight=e.trimLeft=e.concatArrays=e.concatBuffers=e.getEncoding=e.getType=e.isArrayBuffer=e.isTypedArray=e.isBuffer=e.isHexString=e.isBinaryString=e.binaryToNumber=e.binaryToUtf8=e.binaryToHex=e.binaryToArray=e.binaryToBuffer=e.numberToBinary=e.numberToUtf8=e.numberToHex=e.numberToArray=e.numberToBuffer=e.utf8ToBinary=e.utf8ToNumber=e.utf8ToHex=e.utf8ToArray=e.utf8ToBuffer=e.hexToBinary=e.hexToNumber=e.hexToUtf8=e.hexToArray=e.hexToBuffer=e.arrayToBinary=e.arrayToNumber=e.arrayToUtf8=e.arrayToHex=e.arrayToBuffer=e.bufferToBinary=e.bufferToNumber=e.bufferToUtf8=e.bufferToHex=e.bufferToArray=void 0;const o=r(n(22)),i=r(n(57));function s(t){return new Uint8Array(t)}function a(t,e=!1){const n=t.toString("hex");return e?N(n):n}function u(t){return t.toString("utf8")}function c(t){return t.readUIntBE(0,t.length)}function l(t){return i.default(t)}function h(t,e=!1){return a(l(t),e)}function f(t){return u(l(t))}function d(t){return c(l(t))}function p(t){return Array.from(t).map(w).join("")}function g(e){return t.from(P(e),"hex")}function m(t){return s(g(t))}function _(t){return p(m(t))}function v(e){return t.from(e,"utf8")}function y(t){return s(v(t))}function w(t){return O((t>>>0).toString(2))}function b(t){return l(M(t))}function M(t){return new Uint8Array(R(t).map(t=>parseInt(t,2)))}function x(t,e){return h(M(t),e)}function E(t){return !("string"!=typeof t||!new RegExp(/^[01]+$/).test(t))&&t.length%8==0}function k(t,e){return !("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}function S(e){return t.isBuffer(e)}function C(t){return o.default.strict(t)&&!S(t)}function A(t){return !C(t)&&!S(t)&&void 0!==t.byteLength}function T(t,e=8){const n=t%e;return n?(t-n)/e*e+e:t}function R(t,e=8){const n=O(t).match(new RegExp(`.{${e}}`,"gi"));return Array.from(n||[])}function I(t){return R(t).map(L).join("")}function O(t,e=8,n="0"){return B(t,T(t.length,e),n)}function B(t,e,n="0"){return U(t,e,!0,n)}function P(t){return t.replace(/^0x/,"")}function N(t){return t.startsWith("0x")?t:"0x"+t}function L(t){return t.split("").reverse().join("")}function U(t,e,n,r="0"){const o=e-t.length;let i=t;if(o>0){const e=r.repeat(o);i=n?e+t:t+e;}return i}e.bufferToArray=s,e.bufferToHex=a,e.bufferToUtf8=u,e.bufferToNumber=c,e.bufferToBinary=function(t){return p(s(t))},e.arrayToBuffer=l,e.arrayToHex=h,e.arrayToUtf8=f,e.arrayToNumber=d,e.arrayToBinary=p,e.hexToBuffer=g,e.hexToArray=m,e.hexToUtf8=function(t){return u(g(t))},e.hexToNumber=function(t){return d(m(t))},e.hexToBinary=_,e.utf8ToBuffer=v,e.utf8ToArray=y,e.utf8ToHex=function(t,e=!1){return a(v(t),e)},e.utf8ToNumber=function(t){const e=parseInt(t,10);return function(t,e){if(!t)throw new Error(e)}(!function(t){return void 0===t}(e),"Number can only safely store up to 53 bits"),e},e.utf8ToBinary=function(t){return p(y(t))},e.numberToBuffer=function(t){return b(w(t))},e.numberToArray=function(t){return M(w(t))},e.numberToHex=function(t,e){return x(w(t),e)},e.numberToUtf8=function(t){return ""+t},e.numberToBinary=w,e.binaryToBuffer=b,e.binaryToArray=M,e.binaryToHex=x,e.binaryToUtf8=function(t){return f(M(t))},e.binaryToNumber=function(t){return d(M(t))},e.isBinaryString=E,e.isHexString=k,e.isBuffer=S,e.isTypedArray=C,e.isArrayBuffer=A,e.getType=function(t){return S(t)?"buffer":C(t)?"typed-array":A(t)?"array-buffer":Array.isArray(t)?"array":typeof t},e.getEncoding=function(t){return E(t)?"binary":k(t)?"hex":"utf8"},e.concatBuffers=function(...e){return t.concat(e)},e.concatArrays=function(...t){let e=[];return t.forEach(t=>e=e.concat(Array.from(t))),new Uint8Array([...e])},e.trimLeft=function(t,e){const n=t.length-e;return n>0&&(t=t.slice(n)),t},e.trimRight=function(t,e){return t.slice(0,e)},e.calcByteLength=T,e.splitBytes=R,e.swapBytes=I,e.swapHex=function(t){return x(I(_(t)))},e.sanitizeBytes=O,e.padLeft=B,e.padRight=function(t,e,n="0"){return U(t,e,!1,n)},e.removeHexPrefix=P,e.addHexPrefix=N,e.sanitizeHex=function(t){return (t=O(t=P(t),2))&&(t=N(t)),t},e.removeHexLeadingZeros=function(t){const e=t.startsWith("0x");return t=(t=P(t)).startsWith("0")?t.substring(1):t,e?N(t):t};}).call(this,n(17).Buffer);},function(t,e,n){n.d(e,"g",(function(){return r.detectEnv})),n.d(e,"r",(function(){return r.isMobile})),n.d(e,"m",(function(){return r.isBrowser})),n.d(e,"k",(function(){return r.getLocation})),n.d(e,"i",(function(){return r.getClientMeta})),n.d(e,"B",(function(){return r.setLocal})),n.d(e,"j",(function(){return r.getLocal})),n.d(e,"A",(function(){return r.removeLocal})),n.d(e,"v",(function(){return r.mobileLinkChoiceKey})),n.d(e,"C",(function(){return i})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return h})),n.d(e,"e",(function(){return f})),n.d(e,"f",(function(){return d})),n.d(e,"w",(function(){return S})),n.d(e,"x",(function(){return C})),n.d(e,"z",(function(){return m})),n.d(e,"D",(function(){return _})),n.d(e,"h",(function(){return A})),n.d(e,"u",(function(){return B})),n.d(e,"y",(function(){return P})),n.d(e,"l",(function(){return R})),n.d(e,"a",(function(){return I})),n.d(e,"o",(function(){return y})),n.d(e,"q",(function(){return w})),n.d(e,"p",(function(){return b})),n.d(e,"n",(function(){return M})),n.d(e,"s",(function(){return x})),n.d(e,"t",(function(){return E}));var r=n(20);const o=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],i=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign"];var s=n(14),a=n.n(s),u=n(0);function c(t){return u.arrayToBuffer(new Uint8Array(t))}function l(t,e){return u.arrayToHex(new Uint8Array(t),!e)}function h(t){return u.bufferToArray(t).buffer}function f(t){return u.hexToArray(t).buffer}function d(t,e){const n=u.removeHexPrefix(u.sanitizeHex(new a.a(t).toString(16)));return e?n:u.addHexPrefix(n)}var p=n(48);function g(t){return u.sanitizeHex(t)}const m=n(49).payloadId;function _(){return ((t,e)=>{for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e})()}function v(t,e){return u.isHexString(t,e)}function y(t){return void 0!==t.method}function w(t){return void 0!==t.result}function b(t){return void 0!==t.error}function M(t){return void 0!==t.event}function x(t){return o.includes(t)||t.startsWith("wc_")}function E(t){return !!t.method.startsWith("wc_")||!i.includes(t.method)}function k(t){t=Object(u.removeHexPrefix)(t.toLowerCase());const e=Object(u.removeHexPrefix)(Object(p.keccak_256)((n=t,u.utf8ToBuffer(n))));var n;let r="";for(let n=0;n<t.length;n++)parseInt(e[n],16)>7?r+=t[n].toUpperCase():r+=t[n];return Object(u.addHexPrefix)(r)}function S(t){var e,n,r;return (r=t)&&r.length&&!v(t[0])&&(t[0]=(e=t[0],u.utf8ToHex(e,!n))),t}function C(t){if(void 0!==t.type&&"0"!==t.type)return t;if(void 0===t.from||(!(e=t.from)||"0x"!==e.toLowerCase().substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(e)||!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e)&&e!==k(e)))throw new Error("Transaction object must include a valid 'from' value.");var e;function n(t){let e=t;var n;return ("number"==typeof t||"string"==typeof t&&!function(t){return ""===t||"string"==typeof t&&""===t.trim()}(t))&&(v(t)?"string"==typeof t&&(e=g(t)):e=d(t)),"string"==typeof e&&(n=e,e=u.removeHexLeadingZeros(u.addHexPrefix(n))),e}const r={from:g(t.from),to:void 0===t.to?"":g(t.to),gasPrice:void 0===t.gasPrice?"":n(t.gasPrice),gas:void 0===t.gas?void 0===t.gasLimit?"":n(t.gasLimit):n(t.gas),value:void 0===t.value?"":n(t.value),nonce:void 0===t.nonce?"":n(t.nonce),data:void 0===t.data?"":g(t.data)||"0x"},o=["gasPrice","gas","value","nonce"];return Object.keys(r).forEach(t=>{!r[t].trim().length&&o.includes(t)&&delete r[t];}),r}function A(t){const e=t.message||"Failed or Rejected Request";let n=-32e3;if(t&&!t.code)switch(e){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3;}return {code:n,message:e}}var T=n(21);function R(t){const e=-1!==t.indexOf("?")?t.indexOf("?"):void 0;return void 0!==e?t.substr(e):""}function I(t,e){let n=O(t);return n=Object.assign(Object.assign({},n),e),t=function(t){return T.stringify(t)}(n)}function O(t){return T.parse(t)}function B(t){return void 0!==t.bridge}function P(t){const e=t.indexOf(":"),n=-1!==t.indexOf("?")?t.indexOf("?"):void 0,r=t.substring(0,e);const o=function(t){const e=t.split("@");return {handshakeTopic:e[0],version:parseInt(e[1],10)}}(t.substring(e+1,n));const i=function(t){const e=O(t);return {key:e.key||"",bridge:e.bridge||""}}(void 0!==n?t.substr(n):"");return Object.assign(Object.assign({protocol:r},o),i)}},function(t,e,n){n.d(e,"b",(function(){return o})),n.d(e,"g",(function(){return i})),n.d(e,"a",(function(){return s})),n.d(e,"f",(function(){return a})),n.d(e,"e",(function(){return u})),n.d(e,"i",(function(){return c})),n.d(e,"j",(function(){return l})),n.d(e,"h",(function(){return r})),n.d(e,"d",(function(){return h})),n.d(e,"c",(function(){return f})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return p}));const r=512,o=256,i=256,s="AES-CBC",a="SHA-"+o,u="HMAC",c="SHA-256",l="SHA-512",h="encrypt",f="decrypt",d="sign",p="verify";},function(t,e,n){n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return i})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return a}));const r="INTERNAL_ERROR",o="SERVER_ERROR",i=[-32700,-32600,-32601,-32602,-32603],s=[-32e3,-32099],a={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[r]:{code:-32603,message:"Internal error"},[o]:{code:-32e3,message:"Server error"}};},function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}});}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n];}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n);};Object.defineProperty(e,"__esModule",{value:!0}),o(n(59),e),o(n(60),e);},function(t,e,n){function r(t){let e=void 0;return "undefined"!=typeof window&&void 0!==window[t]&&(e=window[t]),e}function o(t){const e=r(t);if(!e)throw new Error(t+" is not defined in Window");return e}Object.defineProperty(e,"__esModule",{value:!0}),e.getLocalStorage=e.getLocalStorageOrThrow=e.getCrypto=e.getCryptoOrThrow=e.getLocation=e.getLocationOrThrow=e.getNavigator=e.getNavigatorOrThrow=e.getDocument=e.getDocumentOrThrow=e.getFromWindowOrThrow=e.getFromWindow=void 0,e.getFromWindow=r,e.getFromWindowOrThrow=o,e.getDocumentOrThrow=function(){return o("document")},e.getDocument=function(){return r("document")},e.getNavigatorOrThrow=function(){return o("navigator")},e.getNavigator=function(){return r("navigator")},e.getLocationOrThrow=function(){return o("location")},e.getLocation=function(){return r("location")},e.getCryptoOrThrow=function(){return o("crypto")},e.getCrypto=function(){return r("crypto")},e.getLocalStorageOrThrow=function(){return o("localStorage")},e.getLocalStorage=function(){return r("localStorage")};},function(t,e,n){n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return l})),n.d(e,"f",(function(){return h}));var r=n(4),o=n(2);async function i(t,e=o.a){return r.getSubtleCrypto().importKey("raw",t,function(t){return t===o.a?{length:o.b,name:o.a}:{hash:{name:o.f},name:o.e}}(e),!0,function(t){return t===o.a?[o.d,o.c]:[o.k,o.l]}(e))}async function s(t,e,n){const s=r.getSubtleCrypto(),a=await i(e,o.a),u=await s.encrypt({iv:t,name:o.a},a,n);return new Uint8Array(u)}async function a(t,e,n){const s=r.getSubtleCrypto(),a=await i(e,o.a),u=await s.decrypt({iv:t,name:o.a},a,n);return new Uint8Array(u)}async function u(t,e){const n=r.getSubtleCrypto(),s=await i(t,o.e),a=await n.sign({length:o.g,name:o.e},s,e);return new Uint8Array(a)}async function c(t,e){const n=r.getSubtleCrypto(),s=await i(t,o.e),a=await n.sign({length:o.h,name:o.e},s,e);return new Uint8Array(a)}async function l(t){const e=r.getSubtleCrypto(),n=await e.digest({name:o.i},t);return new Uint8Array(n)}async function h(t){const e=r.getSubtleCrypto(),n=await e.digest({name:o.j},t);return new Uint8Array(n)}},function(t,e){var n,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t;},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)};},function(t,e,n){var r=n(43),o=n(44);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}};},function(t,e,n){n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return s}));var r=n(3);function o(t){return r.b.includes(t)}function i(t){return Object.keys(r.e).includes(t)?r.e[t]:r.e[r.a]}function s(t){const e=Object.values(r.e).find(e=>e.code===t);return e||r.e[r.a]}},function(t,e,n){var r=n(18);i.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return !1}}();var o=i.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function i(t,e,n){return i.TYPED_ARRAY_SUPPORT||this instanceof i?"number"==typeof t?u(this,t):function(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer)return function(t,e,n,r){if(n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");var o;o=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);i.TYPED_ARRAY_SUPPORT?o.__proto__=i.prototype:o=c(t,o);return o}(t,e,n,r);if("string"==typeof e)return function(t,e){var n=0|h(e),r=a(t,n),o=r.write(e);o!==n&&(r=r.slice(0,o));return r}(t,e);return function(t,e){if(i.isBuffer(e)){var n=0|s(e.length),r=a(t,n);return 0===r.length||e.copy(r,0,0,n),r}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return "number"!=typeof e.length||(o=e.length)!=o?a(t,0):c(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return c(t,e.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}(this,t,e,n):new i(t,e,n)}function s(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function a(t,e){var n;return i.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(e)).__proto__=i.prototype:(null===(n=t)&&(n=new i(e)),n.length=e),n}function u(t,e){var n=a(t,e<0?0:0|s(e));if(!i.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)n[r]=0;return n}function c(t,e){for(var n=e.length<0?0:0|s(e.length),r=a(t,n),o=0;o<n;o+=1)r[o]=255&e[o];return r}function l(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320);}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n);}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128);}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128);}else {if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128);}}return i}function h(t){return i.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:l(t).length)}i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),i.prototype.write=function(t,e,n){void 0===e||void 0===n&&"string"==typeof e?(n=this.length,e=0):isFinite(e)&&(e|=0,isFinite(n)?n|=0:n=void 0);var r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,n,r){return function(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}(l(e,t.length-n),t,n,r)}(this,t,e,n)},i.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),i.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=i.prototype;else {var o=e-t;n=new i(o,void 0);for(var s=0;s<o;++s)n[s]=this[s+t];}return n},i.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,s=r-n;if(this===t&&n<e&&e<r)for(o=s-1;o>=0;--o)t[o+e]=this[o+n];else if(s<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+s),e);return s},i.prototype.fill=function(t,e,n){if("string"==typeof t){if("string"==typeof e?(e=0,n=this.length):"string"==typeof n&&(n=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r);}}else "number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else {var s=i.isBuffer(t)?t:new i(t),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a];}return this},i.concat=function(t,e){if(!r(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a(null,0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var o=u(null,e),s=0;for(n=0;n<t.length;++n){var c=t[n];if(!i.isBuffer(c))throw new TypeError('"list" argument must be an Array of Buffers');c.copy(o,s),s+=c.length;}return o},i.byteLength=h,i.prototype._isBuffer=!0,i.isBuffer=function(t){return !(null==t||!t._isBuffer)},t.exports.alloc=function(t){var e=new i(t);return e.fill(0),e},t.exports.from=function(t){return new i(t)};},function(t,e,n){var r=n(33);n.d(e,"randomBytes",(function(){return r.a}));var o=n(34);n.d(e,"aesCbcDecrypt",(function(){return o.a})),n.d(e,"aesCbcEncrypt",(function(){return o.b}));var i=n(35);n.d(e,"hmacSha256Sign",(function(){return i.a}));n(40),n(13),n(2);},function(t,e,n){n.d(e,"a",(function(){return r}));class r{}},function(t,e,n){var r=n(36);n.o(r,"isConstantTime")&&n.d(e,"isConstantTime",(function(){return r.isConstantTime}));n(37);var o=n(38);n.o(o,"isConstantTime")&&n.d(e,"isConstantTime",(function(){return o.isConstantTime}));var i=n(39);n.d(e,"isConstantTime",(function(){return i.a}));},function(t,e,n){(function(t){!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function o(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t;}function i(t,e,n){if(i.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"));}var s;"object"==typeof t?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;try{s=n(53).Buffer;}catch(t){}function a(t,e,n){for(var r=0,o=Math.min(t.length,n),i=e;i<o;i++){var s=t.charCodeAt(i)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s;}return r}function u(t,e,n,r){for(var o=0,i=Math.min(t.length,n),s=e;s<i;s++){var a=t.charCodeAt(s)-48;o*=r,o+=a>=49?a-49+10:a>=17?a-17+10:a;}return o}i.isBN=function(t){return t instanceof i||null!==t&&"object"==typeof t&&t.constructor.wordSize===i.wordSize&&Array.isArray(t.words)},i.max=function(t,e){return t.cmp(e)>0?t:e},i.min=function(t,e){return t.cmp(e)<0?t:e},i.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var o=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&o++,16===e?this._parseHex(t,o):this._parseBase(t,e,o),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n);},i.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n);},i.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var i,s,a=0;if("be"===n)for(o=t.length-1,i=0;o>=0;o-=3)s=t[o]|t[o-1]<<8|t[o-2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===n)for(o=0,i=0;o<t.length;o+=3)s=t[o]|t[o+1]<<8|t[o+2]<<16,this.words[i]|=s<<a&67108863,this.words[i+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,o,i=0;for(n=t.length-6,r=0;n>=e;n-=6)o=a(t,n,n+6),this.words[r]|=o<<i&67108863,this.words[r+1]|=o>>>26-i&4194303,(i+=24)>=26&&(i-=26,r++);n+6!==e&&(o=a(t,e,n+6),this.words[r]|=o<<i&67108863,this.words[r+1]|=o>>>26-i&4194303),this.strip();},i.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,o=1;o<=67108863;o*=e)r++;r--,o=o/e|0;for(var i=t.length-n,s=i%r,a=Math.min(i,i-s)+n,c=0,l=n;l<a;l+=r)c=u(t,l,l+r,e),this.imuln(o),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var h=1;for(c=u(t,l,t.length,e),l=0;l<s;l++)h*=e;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);}},i.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red;},i.prototype.clone=function(){var t=new i(null);return this.copy(t),t},i.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var o=0|t.words[0],i=0|e.words[0],s=o*i,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var c=1;c<r;c++){for(var l=u>>>26,h=67108863&u,f=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=f;d++){var p=c-d|0;l+=(s=(o=0|t.words[p])*(i=0|e.words[d])+h)/67108864|0,h=67108863&s;}n.words[c]=0|h,u=0|l;}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}i.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var o=0,i=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<o|i)).toString(16);n=0!==(i=a>>>24-o&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(o+=2)>=26&&(o-=26,s--);}for(0!==i&&(n=i.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var f=l[t],d=h[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?g+n:c[f-g.length]+g+n;}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36");},i.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(t,e){return r(void 0!==s),this.toArrayLike(s,t,e)},i.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},i.prototype.toArrayLike=function(t,e,n){var o=this.byteLength(),i=n||Math.max(1,o);r(o<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,c=new t(i),l=this.clone();if(u){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[a]=s;for(;a<i;a++)c[a]=0;}else {for(a=0;a<i-o;a++)c[a]=0;for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[i-a-1]=s;}return c},Math.clz32?i.prototype._countBits=function(t){return 32-Math.clz32(t)}:i.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},i.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},i.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},i.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},i.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},i.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},i.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},i.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},i.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},i.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},i.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},i.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},i.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},i.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},i.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},i.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var o=0;o<e;o++)this.words[o]=67108863&~this.words[o];return n>0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},i.prototype.notn=function(t){return this.clone().inotn(t)},i.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,o=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<o:this.words[n]&~(1<<o),this.strip()},i.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var o=0,i=0;i<r.length;i++)e=(0|n.words[i])+(0|r.words[i])+o,this.words[i]=67108863&e,o=e>>>26;for(;0!==o&&i<n.length;i++)e=(0|n.words[i])+o,this.words[i]=67108863&e,o=e>>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;i<n.length;i++)this.words[i]=n.words[i];return this},i.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},i.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,o=this.cmp(t);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,r=t):(n=t,r=this);for(var i=0,s=0;s<r.length;s++)i=(e=(0|n.words[s])-(0|r.words[s])+i)>>26,this.words[s]=67108863&e;for(;0!==i&&s<n.length;s++)i=(e=(0|n.words[s])+i)>>26,this.words[s]=67108863&e;if(0===i&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,n){var r,o,i,s=t.words,a=e.words,u=n.words,c=0,l=0|s[0],h=8191&l,f=l>>>13,d=0|s[1],p=8191&d,g=d>>>13,m=0|s[2],_=8191&m,v=m>>>13,y=0|s[3],w=8191&y,b=y>>>13,M=0|s[4],x=8191&M,E=M>>>13,k=0|s[5],S=8191&k,C=k>>>13,A=0|s[6],T=8191&A,R=A>>>13,I=0|s[7],O=8191&I,B=I>>>13,P=0|s[8],N=8191&P,L=P>>>13,U=0|s[9],j=8191&U,q=U>>>13,D=0|a[0],z=8191&D,W=D>>>13,F=0|a[1],H=8191&F,Y=F>>>13,J=0|a[2],$=8191&J,V=J>>>13,K=0|a[3],Q=8191&K,Z=K>>>13,X=0|a[4],G=8191&X,tt=X>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,ot=0|a[6],it=8191&ot,st=ot>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ht=8191<,ft=lt>>>13,dt=0|a[9],pt=8191&dt,gt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var mt=(c+(r=Math.imul(h,z))|0)+((8191&(o=(o=Math.imul(h,W))+Math.imul(f,z)|0))<<13)|0;c=((i=Math.imul(f,W))+(o>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(p,z),o=(o=Math.imul(p,W))+Math.imul(g,z)|0,i=Math.imul(g,W);var _t=(c+(r=r+Math.imul(h,H)|0)|0)+((8191&(o=(o=o+Math.imul(h,Y)|0)+Math.imul(f,H)|0))<<13)|0;c=((i=i+Math.imul(f,Y)|0)+(o>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(_,z),o=(o=Math.imul(_,W))+Math.imul(v,z)|0,i=Math.imul(v,W),r=r+Math.imul(p,H)|0,o=(o=o+Math.imul(p,Y)|0)+Math.imul(g,H)|0,i=i+Math.imul(g,Y)|0;var vt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,V)|0)+Math.imul(f,$)|0))<<13)|0;c=((i=i+Math.imul(f,V)|0)+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(w,z),o=(o=Math.imul(w,W))+Math.imul(b,z)|0,i=Math.imul(b,W),r=r+Math.imul(_,H)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(v,H)|0,i=i+Math.imul(v,Y)|0,r=r+Math.imul(p,$)|0,o=(o=o+Math.imul(p,V)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,V)|0;var yt=(c+(r=r+Math.imul(h,Q)|0)|0)+((8191&(o=(o=o+Math.imul(h,Z)|0)+Math.imul(f,Q)|0))<<13)|0;c=((i=i+Math.imul(f,Z)|0)+(o>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(x,z),o=(o=Math.imul(x,W))+Math.imul(E,z)|0,i=Math.imul(E,W),r=r+Math.imul(w,H)|0,o=(o=o+Math.imul(w,Y)|0)+Math.imul(b,H)|0,i=i+Math.imul(b,Y)|0,r=r+Math.imul(_,$)|0,o=(o=o+Math.imul(_,V)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,V)|0,r=r+Math.imul(p,Q)|0,o=(o=o+Math.imul(p,Z)|0)+Math.imul(g,Q)|0,i=i+Math.imul(g,Z)|0;var wt=(c+(r=r+Math.imul(h,G)|0)|0)+((8191&(o=(o=o+Math.imul(h,tt)|0)+Math.imul(f,G)|0))<<13)|0;c=((i=i+Math.imul(f,tt)|0)+(o>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(S,z),o=(o=Math.imul(S,W))+Math.imul(C,z)|0,i=Math.imul(C,W),r=r+Math.imul(x,H)|0,o=(o=o+Math.imul(x,Y)|0)+Math.imul(E,H)|0,i=i+Math.imul(E,Y)|0,r=r+Math.imul(w,$)|0,o=(o=o+Math.imul(w,V)|0)+Math.imul(b,$)|0,i=i+Math.imul(b,V)|0,r=r+Math.imul(_,Q)|0,o=(o=o+Math.imul(_,Z)|0)+Math.imul(v,Q)|0,i=i+Math.imul(v,Z)|0,r=r+Math.imul(p,G)|0,o=(o=o+Math.imul(p,tt)|0)+Math.imul(g,G)|0,i=i+Math.imul(g,tt)|0;var bt=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(o=(o=o+Math.imul(h,rt)|0)+Math.imul(f,nt)|0))<<13)|0;c=((i=i+Math.imul(f,rt)|0)+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(T,z),o=(o=Math.imul(T,W))+Math.imul(R,z)|0,i=Math.imul(R,W),r=r+Math.imul(S,H)|0,o=(o=o+Math.imul(S,Y)|0)+Math.imul(C,H)|0,i=i+Math.imul(C,Y)|0,r=r+Math.imul(x,$)|0,o=(o=o+Math.imul(x,V)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,V)|0,r=r+Math.imul(w,Q)|0,o=(o=o+Math.imul(w,Z)|0)+Math.imul(b,Q)|0,i=i+Math.imul(b,Z)|0,r=r+Math.imul(_,G)|0,o=(o=o+Math.imul(_,tt)|0)+Math.imul(v,G)|0,i=i+Math.imul(v,tt)|0,r=r+Math.imul(p,nt)|0,o=(o=o+Math.imul(p,rt)|0)+Math.imul(g,nt)|0,i=i+Math.imul(g,rt)|0;var Mt=(c+(r=r+Math.imul(h,it)|0)|0)+((8191&(o=(o=o+Math.imul(h,st)|0)+Math.imul(f,it)|0))<<13)|0;c=((i=i+Math.imul(f,st)|0)+(o>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),o=(o=Math.imul(O,W))+Math.imul(B,z)|0,i=Math.imul(B,W),r=r+Math.imul(T,H)|0,o=(o=o+Math.imul(T,Y)|0)+Math.imul(R,H)|0,i=i+Math.imul(R,Y)|0,r=r+Math.imul(S,$)|0,o=(o=o+Math.imul(S,V)|0)+Math.imul(C,$)|0,i=i+Math.imul(C,V)|0,r=r+Math.imul(x,Q)|0,o=(o=o+Math.imul(x,Z)|0)+Math.imul(E,Q)|0,i=i+Math.imul(E,Z)|0,r=r+Math.imul(w,G)|0,o=(o=o+Math.imul(w,tt)|0)+Math.imul(b,G)|0,i=i+Math.imul(b,tt)|0,r=r+Math.imul(_,nt)|0,o=(o=o+Math.imul(_,rt)|0)+Math.imul(v,nt)|0,i=i+Math.imul(v,rt)|0,r=r+Math.imul(p,it)|0,o=(o=o+Math.imul(p,st)|0)+Math.imul(g,it)|0,i=i+Math.imul(g,st)|0;var xt=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(o=(o=o+Math.imul(h,ct)|0)+Math.imul(f,ut)|0))<<13)|0;c=((i=i+Math.imul(f,ct)|0)+(o>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(N,z),o=(o=Math.imul(N,W))+Math.imul(L,z)|0,i=Math.imul(L,W),r=r+Math.imul(O,H)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(B,H)|0,i=i+Math.imul(B,Y)|0,r=r+Math.imul(T,$)|0,o=(o=o+Math.imul(T,V)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,V)|0,r=r+Math.imul(S,Q)|0,o=(o=o+Math.imul(S,Z)|0)+Math.imul(C,Q)|0,i=i+Math.imul(C,Z)|0,r=r+Math.imul(x,G)|0,o=(o=o+Math.imul(x,tt)|0)+Math.imul(E,G)|0,i=i+Math.imul(E,tt)|0,r=r+Math.imul(w,nt)|0,o=(o=o+Math.imul(w,rt)|0)+Math.imul(b,nt)|0,i=i+Math.imul(b,rt)|0,r=r+Math.imul(_,it)|0,o=(o=o+Math.imul(_,st)|0)+Math.imul(v,it)|0,i=i+Math.imul(v,st)|0,r=r+Math.imul(p,ut)|0,o=(o=o+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,i=i+Math.imul(g,ct)|0;var Et=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(o=(o=o+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((i=i+Math.imul(f,ft)|0)+(o>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(j,z),o=(o=Math.imul(j,W))+Math.imul(q,z)|0,i=Math.imul(q,W),r=r+Math.imul(N,H)|0,o=(o=o+Math.imul(N,Y)|0)+Math.imul(L,H)|0,i=i+Math.imul(L,Y)|0,r=r+Math.imul(O,$)|0,o=(o=o+Math.imul(O,V)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,V)|0,r=r+Math.imul(T,Q)|0,o=(o=o+Math.imul(T,Z)|0)+Math.imul(R,Q)|0,i=i+Math.imul(R,Z)|0,r=r+Math.imul(S,G)|0,o=(o=o+Math.imul(S,tt)|0)+Math.imul(C,G)|0,i=i+Math.imul(C,tt)|0,r=r+Math.imul(x,nt)|0,o=(o=o+Math.imul(x,rt)|0)+Math.imul(E,nt)|0,i=i+Math.imul(E,rt)|0,r=r+Math.imul(w,it)|0,o=(o=o+Math.imul(w,st)|0)+Math.imul(b,it)|0,i=i+Math.imul(b,st)|0,r=r+Math.imul(_,ut)|0,o=(o=o+Math.imul(_,ct)|0)+Math.imul(v,ut)|0,i=i+Math.imul(v,ct)|0,r=r+Math.imul(p,ht)|0,o=(o=o+Math.imul(p,ft)|0)+Math.imul(g,ht)|0,i=i+Math.imul(g,ft)|0;var kt=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(o=(o=o+Math.imul(h,gt)|0)+Math.imul(f,pt)|0))<<13)|0;c=((i=i+Math.imul(f,gt)|0)+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(j,H),o=(o=Math.imul(j,Y))+Math.imul(q,H)|0,i=Math.imul(q,Y),r=r+Math.imul(N,$)|0,o=(o=o+Math.imul(N,V)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,V)|0,r=r+Math.imul(O,Q)|0,o=(o=o+Math.imul(O,Z)|0)+Math.imul(B,Q)|0,i=i+Math.imul(B,Z)|0,r=r+Math.imul(T,G)|0,o=(o=o+Math.imul(T,tt)|0)+Math.imul(R,G)|0,i=i+Math.imul(R,tt)|0,r=r+Math.imul(S,nt)|0,o=(o=o+Math.imul(S,rt)|0)+Math.imul(C,nt)|0,i=i+Math.imul(C,rt)|0,r=r+Math.imul(x,it)|0,o=(o=o+Math.imul(x,st)|0)+Math.imul(E,it)|0,i=i+Math.imul(E,st)|0,r=r+Math.imul(w,ut)|0,o=(o=o+Math.imul(w,ct)|0)+Math.imul(b,ut)|0,i=i+Math.imul(b,ct)|0,r=r+Math.imul(_,ht)|0,o=(o=o+Math.imul(_,ft)|0)+Math.imul(v,ht)|0,i=i+Math.imul(v,ft)|0;var St=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(o=(o=o+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((i=i+Math.imul(g,gt)|0)+(o>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(j,$),o=(o=Math.imul(j,V))+Math.imul(q,$)|0,i=Math.imul(q,V),r=r+Math.imul(N,Q)|0,o=(o=o+Math.imul(N,Z)|0)+Math.imul(L,Q)|0,i=i+Math.imul(L,Z)|0,r=r+Math.imul(O,G)|0,o=(o=o+Math.imul(O,tt)|0)+Math.imul(B,G)|0,i=i+Math.imul(B,tt)|0,r=r+Math.imul(T,nt)|0,o=(o=o+Math.imul(T,rt)|0)+Math.imul(R,nt)|0,i=i+Math.imul(R,rt)|0,r=r+Math.imul(S,it)|0,o=(o=o+Math.imul(S,st)|0)+Math.imul(C,it)|0,i=i+Math.imul(C,st)|0,r=r+Math.imul(x,ut)|0,o=(o=o+Math.imul(x,ct)|0)+Math.imul(E,ut)|0,i=i+Math.imul(E,ct)|0,r=r+Math.imul(w,ht)|0,o=(o=o+Math.imul(w,ft)|0)+Math.imul(b,ht)|0,i=i+Math.imul(b,ft)|0;var Ct=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(o=(o=o+Math.imul(_,gt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((i=i+Math.imul(v,gt)|0)+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(j,Q),o=(o=Math.imul(j,Z))+Math.imul(q,Q)|0,i=Math.imul(q,Z),r=r+Math.imul(N,G)|0,o=(o=o+Math.imul(N,tt)|0)+Math.imul(L,G)|0,i=i+Math.imul(L,tt)|0,r=r+Math.imul(O,nt)|0,o=(o=o+Math.imul(O,rt)|0)+Math.imul(B,nt)|0,i=i+Math.imul(B,rt)|0,r=r+Math.imul(T,it)|0,o=(o=o+Math.imul(T,st)|0)+Math.imul(R,it)|0,i=i+Math.imul(R,st)|0,r=r+Math.imul(S,ut)|0,o=(o=o+Math.imul(S,ct)|0)+Math.imul(C,ut)|0,i=i+Math.imul(C,ct)|0,r=r+Math.imul(x,ht)|0,o=(o=o+Math.imul(x,ft)|0)+Math.imul(E,ht)|0,i=i+Math.imul(E,ft)|0;var At=(c+(r=r+Math.imul(w,pt)|0)|0)+((8191&(o=(o=o+Math.imul(w,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((i=i+Math.imul(b,gt)|0)+(o>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(j,G),o=(o=Math.imul(j,tt))+Math.imul(q,G)|0,i=Math.imul(q,tt),r=r+Math.imul(N,nt)|0,o=(o=o+Math.imul(N,rt)|0)+Math.imul(L,nt)|0,i=i+Math.imul(L,rt)|0,r=r+Math.imul(O,it)|0,o=(o=o+Math.imul(O,st)|0)+Math.imul(B,it)|0,i=i+Math.imul(B,st)|0,r=r+Math.imul(T,ut)|0,o=(o=o+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,i=i+Math.imul(R,ct)|0,r=r+Math.imul(S,ht)|0,o=(o=o+Math.imul(S,ft)|0)+Math.imul(C,ht)|0,i=i+Math.imul(C,ft)|0;var Tt=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(o=(o=o+Math.imul(x,gt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((i=i+Math.imul(E,gt)|0)+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(j,nt),o=(o=Math.imul(j,rt))+Math.imul(q,nt)|0,i=Math.imul(q,rt),r=r+Math.imul(N,it)|0,o=(o=o+Math.imul(N,st)|0)+Math.imul(L,it)|0,i=i+Math.imul(L,st)|0,r=r+Math.imul(O,ut)|0,o=(o=o+Math.imul(O,ct)|0)+Math.imul(B,ut)|0,i=i+Math.imul(B,ct)|0,r=r+Math.imul(T,ht)|0,o=(o=o+Math.imul(T,ft)|0)+Math.imul(R,ht)|0,i=i+Math.imul(R,ft)|0;var Rt=(c+(r=r+Math.imul(S,pt)|0)|0)+((8191&(o=(o=o+Math.imul(S,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((i=i+Math.imul(C,gt)|0)+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(j,it),o=(o=Math.imul(j,st))+Math.imul(q,it)|0,i=Math.imul(q,st),r=r+Math.imul(N,ut)|0,o=(o=o+Math.imul(N,ct)|0)+Math.imul(L,ut)|0,i=i+Math.imul(L,ct)|0,r=r+Math.imul(O,ht)|0,o=(o=o+Math.imul(O,ft)|0)+Math.imul(B,ht)|0,i=i+Math.imul(B,ft)|0;var It=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(o=(o=o+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((i=i+Math.imul(R,gt)|0)+(o>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(j,ut),o=(o=Math.imul(j,ct))+Math.imul(q,ut)|0,i=Math.imul(q,ct),r=r+Math.imul(N,ht)|0,o=(o=o+Math.imul(N,ft)|0)+Math.imul(L,ht)|0,i=i+Math.imul(L,ft)|0;var Ot=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(o=(o=o+Math.imul(O,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((i=i+Math.imul(B,gt)|0)+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(j,ht),o=(o=Math.imul(j,ft))+Math.imul(q,ht)|0,i=Math.imul(q,ft);var Bt=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(o=(o=o+Math.imul(N,gt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((i=i+Math.imul(L,gt)|0)+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863;var Pt=(c+(r=Math.imul(j,pt))|0)+((8191&(o=(o=Math.imul(j,gt))+Math.imul(q,pt)|0))<<13)|0;return c=((i=Math.imul(q,gt))+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=_t,u[2]=vt,u[3]=yt,u[4]=wt,u[5]=bt,u[6]=Mt,u[7]=xt,u[8]=Et,u[9]=kt,u[10]=St,u[11]=Ct,u[12]=At,u[13]=Tt,u[14]=Rt,u[15]=It,u[16]=Ot,u[17]=Bt,u[18]=Pt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return (new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e;}Math.imul||(d=f),i.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,o=0,i=0;i<n.length-1;i++){var s=o;o=0;for(var a=67108863&r,u=Math.min(i,e.length-1),c=Math.max(0,i-t.length+1);c<=u;c++){var l=i-c,h=(0|t.words[l])*(0|e.words[c]),f=67108863&h;a=67108863&(f=f+a|0),o+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863;}n.words[i]=a,r=s,s=o;}return 0!==r?n.words[i]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=i.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},g.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,o=0;o<e;o++)r|=(1&t)<<e-o-1,t>>=1;return r},g.prototype.permute=function(t,e,n,r,o,i){for(var s=0;s<i;s++)r[s]=e[t[s]],o[s]=n[t[s]];},g.prototype.transform=function(t,e,n,r,o,i){this.permute(i,t,e,n,r,o);for(var s=1;s<o;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<o;l+=a)for(var h=u,f=c,d=0;d<s;d++){var p=n[l+d],g=r[l+d],m=n[l+d+s],_=r[l+d+s],v=h*m-f*_;_=h*_+f*m,m=v,n[l+d]=p+m,r[l+d]=g+_,n[l+d+s]=p-m,r[l+d+s]=g-_,d!==a&&(v=u*h-c*f,f=u*f+c*h,h=v);}},g.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,o=0;for(n=n/2|0;n;n>>>=1)o++;return 1<<o+1+r},g.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var o=t[r];t[r]=t[n-r-1],t[n-r-1]=o,o=e[r],e[r]=-e[n-r-1],e[n-r-1]=-o;}},g.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var o=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&o,n=o<67108864?0:o/67108864|0;}return t},g.prototype.convert13b=function(t,e,n,o){for(var i=0,s=0;s<e;s++)i+=0|t[s],n[2*s]=8191&i,i>>>=13,n[2*s+1]=8191&i,i>>>=13;for(s=2*e;s<o;++s)n[s]=0;r(0===i),r(0==(-8192&i));},g.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},g.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),o=this.makeRBT(r),i=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),c=new Array(r),l=new Array(r),h=new Array(r),f=n.words;f.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,c,r),this.transform(s,i,a,u,r,o),this.transform(c,i,l,h,r,o);for(var d=0;d<r;d++){var p=a[d]*l[d]-u[d]*h[d];u[d]=a[d]*h[d]+u[d]*l[d],a[d]=p;}return this.conjugate(a,u,r),this.transform(a,u,f,i,r,o),this.conjugate(f,i,r),this.normalize13b(f,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.strip()},i.prototype.mul=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},i.prototype.mulf=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),p(this,t,e)},i.prototype.imul=function(t){return this.clone().mulTo(t,this)},i.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var o=(0|this.words[n])*t,i=(67108863&o)+(67108863&e);e>>=26,e+=o/67108864|0,e+=i>>>26,this.words[n]=67108863&i;}return 0!==e&&(this.words[n]=e,this.length++),this},i.prototype.muln=function(t){return this.clone().imuln(t)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,o=n%26;e[n]=(t.words[r]&1<<o)>>>o;}return e}(t);if(0===e.length)return new i(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var o=n.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,o=(t-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&i,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n;}s&&(this.words[e]=s,this.length++);}if(0!==o){for(e=this.length-1;e>=0;e--)this.words[e+o]=this.words[e];for(e=0;e<o;e++)this.words[e]=0;this.length+=o;}return this.strip()},i.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},i.prototype.iushrn=function(t,e,n){var o;r("number"==typeof t&&t>=0),o=e?(e-e%26)/26:0;var i=t%26,s=Math.min((t-i)/26,this.length),a=67108863^67108863>>>i<<i,u=n;if(o-=s,o=Math.max(0,o),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s;}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=o);c--){var h=0|this.words[c];this.words[c]=l<<26-i|h>>>i,l=h&a;}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},i.prototype.shln=function(t){return this.clone().ishln(t)},i.prototype.ushln=function(t){return this.clone().iushln(t)},i.prototype.shrn=function(t){return this.clone().ishrn(t)},i.prototype.ushrn=function(t){return this.clone().iushrn(t)},i.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,o=1<<e;return !(this.length<=n)&&!!(this.words[n]&o)},i.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var o=67108863^67108863>>>e<<e;this.words[this.length-1]&=o;}return this.strip()},i.prototype.maskn=function(t){return this.clone().imaskn(t)},i.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},i.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},i.prototype.addn=function(t){return this.clone().iaddn(t)},i.prototype.subn=function(t){return this.clone().isubn(t)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(t,e,n){var o,i,s=t.length+n;this._expand(s);var a=0;for(o=0;o<t.length;o++){i=(0|this.words[o+n])+a;var u=(0|t.words[o])*e;a=((i-=67108863&u)>>26)-(u/67108864|0),this.words[o+n]=67108863&i;}for(;o<this.length-n;o++)a=(i=(0|this.words[o+n])+a)>>26,this.words[o+n]=67108863&i;if(0===a)return this.strip();for(r(-1===a),a=0,o=0;o<this.length;o++)a=(i=-(0|this.words[o])+a)>>26,this.words[o]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!==(n=26-this._countBits(s))&&(o=o.ushln(n),r.iushln(n),s=0|o.words[o.length-1]);var a,u=r.length-o.length;if("mod"!==e){(a=new i(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0;}var l=r.clone()._ishlnsubmul(o,1,u);0===l.negative&&(r=l,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|r.words[o.length+h])+(0|r.words[o.length+h-1]);for(f=Math.min(f/s|0,67108863),r._ishlnsubmul(o,f,h);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(o,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=f);}return a&&a.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},i.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new i(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new i(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a;},i.prototype.div=function(t){return this.divmod(t,"div",!1).div},i.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},i.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},i.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),o=t.andln(1),i=n.cmp(r);return i<0||1===o&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(e*n+(0|this.words[o]))%t;return n},i.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*e;this.words[n]=o/t|0,e=o%t;}return this.strip()},i.prototype.divn=function(t){return this.clone().idivn(t)},i.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new i(1),s=new i(0),a=new i(0),u=new i(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0==(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(l),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,g=1;0==(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(a),s.isub(u)):(n.isub(e),a.isub(o),u.isub(s));}return {a:a,b:u,gcd:n.iushln(c)}},i.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new i(1),a=new i(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0==(n.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.isub(e),a.isub(s));}return (o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},i.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=e.cmp(n);if(o<0){var i=e;e=n,n=i;}else if(0===o||0===n.cmpn(1))break;e.isub(n);}return n.iushln(r)},i.prototype.invm=function(t){return this.egcd(t).a.umod(t)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(t){return this.words[0]&t},i.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,o=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=o,this;for(var i=o,s=n;0!==i&&s<this.length;s++){var a=0|this.words[s];i=(a+=i)>>>26,a&=67108863,this.words[s]=a;}return 0!==i&&(this.words[s]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return -1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else {n&&(t=-t),r(t<=67108863,"Number is too big");var o=0|this.words[0];e=o===t?0:o<t?-1:1;}return 0!==this.negative?0|-e:e},i.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return -1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},i.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return -1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],o=0|t.words[n];if(r!==o){r<o?e=-1:r>o&&(e=1);break}}return e},i.prototype.gtn=function(t){return 1===this.cmpn(t)},i.prototype.gt=function(t){return 1===this.cmp(t)},i.prototype.gten=function(t){return this.cmpn(t)>=0},i.prototype.gte=function(t){return this.cmp(t)>=0},i.prototype.ltn=function(t){return -1===this.cmpn(t)},i.prototype.lt=function(t){return -1===this.cmp(t)},i.prototype.lten=function(t){return this.cmpn(t)<=0},i.prototype.lte=function(t){return this.cmp(t)<=0},i.prototype.eqn=function(t){return 0===this.cmpn(t)},i.prototype.eq=function(t){return 0===this.cmp(t)},i.red=function(t){return new M(t)},i.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(t){return this.red=t,this},i.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},i.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},i.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},i.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},i.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},i.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},i.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},i.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}function v(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function y(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function w(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function b(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function M(t){if("string"==typeof t){var e=i._prime(t);this.m=e.p,this.prime=e;}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null;}function x(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}_.prototype._tmp=function(){var t=new i(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength();}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},_.prototype.split=function(t,e){t.iushrn(this.n,0,e);},_.prototype.imulK=function(t){return t.imul(this.k)},o(v,_),v.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=4194303&o,r=10;r<t.length;r++){var i=0|t.words[r];t.words[r-10]=(4194303&i)<<4|o>>>22,o=i;}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9;},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0);}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},o(y,_),o(w,_),o(b,_),b.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,o=67108863&r;r>>>=26,t.words[n]=o,e=r;}return 0!==e&&(t.words[t.length++]=e),t},i._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else {if("p25519"!==t)throw new Error("Unknown prime "+t);e=new b;}return m[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers");},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers");},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new i(1)).iushrn(2);return this.pow(t,n)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new i(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,o),f=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var g=d,m=0;0!==g.cmp(a);m++)g=g.redSqr();r(m<p);var _=this.pow(h,new i(1).iushln(p-m-1));f=f.redMul(_),h=_.redSqr(),d=d.redMul(h),p=m;}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new i(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var o=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var c=e.words[r],l=u-1;l>=0;l--){var h=c>>l&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===r&&0===l)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0;}u=26;}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},i.mont=function(t){return new x(t)},o(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new i(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)};}(t,this);}).call(this,n(52)(t));},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i;}catch(t){n=i;}try{r="function"==typeof clearTimeout?clearTimeout:s;}catch(t){r=s;}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d());}function d(){if(!l){var t=a(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length;}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t);}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t);}}function p(t,e){this.fun=t,this.array=e;}function g(){}o.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];c.push(new p(t,e)),1!==c.length||l||a(d);},p.prototype.run=function(){this.fun.apply(null,this.array);},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return []},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return "/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0};},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")();}catch(t){"object"==typeof window&&(n=window);}t.exports=n;},function(t,e,n){(function(t){
|
|
30647
|
+
/*!
|
|
30648
|
+
* The buffer module from node.js, for the browser.
|
|
30649
|
+
*
|
|
30650
|
+
* @author Feross Aboukhadijeh <http://feross.org>
|
|
30651
|
+
* @license MIT
|
|
30652
|
+
*/
|
|
30653
|
+
var r=n(54),o=n(55),i=n(56);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return "undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=f(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),o=(t=a(t,r)).write(e,n);o!==r&&(t=t.slice(0,o));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|d(e.length);return 0===(t=a(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return "number"!=typeof e.length||(r=e.length)!=r?a(t,0):f(t,e);if("Buffer"===e.type&&i(e.data))return f(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(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 h(t,e){if(l(e),t=a(t,e<0?0:0|d(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|d(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function d(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(u.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 n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(t).length;default:if(r)return D(t).length;e=(""+e).toLowerCase(),r=!0;}}function g(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return "";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return "";if((n>>>=0)<=(e>>>=0))return "";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0;}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r;}function _(t,e,n,r,o){if(0===t.length)return -1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return -1;n=t.length-1;}else if(n<0){if(!o)return -1;n=0;}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,o){var i,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return -1;s=2,a/=2,u/=2,n/=2;}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var l=-1;for(i=n;i<a;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else -1!==l&&(i-=i-l),l=-1;}else for(n+u>a&&(n=a-u),i=n;i>=0;i--){for(var h=!0,f=0;f<u;f++)if(c(t,i+f)!==c(e,f)){h=!1;break}if(h)return i}return -1}function y(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a;}return s}function w(t,e,n,r){return W(D(e,t.length-n),t,n,r)}function b(t,e,n,r){return W(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function M(t,e,n,r){return b(t,e,n,r)}function x(t,e,n,r){return W(z(e),t,n,r)}function E(t,e,n,r){return W(function(t,e){for(var n,r,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function k(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,s,a,u,c=t[o],l=null,h=c>239?4:c>223?3:c>191?2:1;if(o+h<=n)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u);}null===l?(l=65533,h=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=h;}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){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(t){return !1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?a(t,e):void 0!==n?"string"==typeof r?a(t,e).fill(n,r):a(t,e).fill(n):a(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return !(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},u.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}},u.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length;}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.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 e=0;e<t;e+=2)m(this,e,e+1);return this},u.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 e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},u.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 e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):g.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,o){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return -1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(i,s),c=this.slice(r,o),l=t.slice(e,n),h=0;h<a;++h)if(c[h]!==l[h]){i=c[h],s=l[h];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(t,e,n){return -1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return _(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return _(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else {if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0);}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return b(this,t,e,n);case"latin1":case"binary":return M(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0;}},u.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function A(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function T(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=q(t[i]);return o}function R(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function I(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,n,r,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function B(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o);}function P(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255;}function N(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,r,i){return i||N(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function U(t,e,n,r,i){return i||N(t,0,n,8),o.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else {var o=e-t;n=new u(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t];}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},u.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||O(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||O(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);O(this,t,e,n,o-1,-o);}var i=0,s=1,a=0;for(this[e]=255&t;++i<n&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);O(this,t,e,n,o-1,-o);}var i=n-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o);}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else "number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else {var s=u.isBuffer(t)?t:D(new u(t,r).toString()),a=s.length;for(i=0;i<n-e;++i)this[i+e]=s[i%a];}return this};var j=/[^+\/0-9A-Za-z-_]/g;function q(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320);}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n);}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128);}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128);}else {if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128);}}return i}function z(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return "";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n(16));},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return "[object Array]"==n.call(t)};},function(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}};},function(t,e,n){n.r(e),n.d(e,"detectEnv",(function(){return s})),n.d(e,"detectOS",(function(){return a})),n.d(e,"isAndroid",(function(){return u})),n.d(e,"isIOS",(function(){return c})),n.d(e,"isMobile",(function(){return l})),n.d(e,"isNode",(function(){return h})),n.d(e,"isBrowser",(function(){return f})),n.d(e,"getFromWindow",(function(){return d})),n.d(e,"getFromWindowOrThrow",(function(){return p})),n.d(e,"getDocumentOrThrow",(function(){return g})),n.d(e,"getDocument",(function(){return m})),n.d(e,"getNavigatorOrThrow",(function(){return _})),n.d(e,"getNavigator",(function(){return v})),n.d(e,"getLocationOrThrow",(function(){return y})),n.d(e,"getLocation",(function(){return w})),n.d(e,"getCryptoOrThrow",(function(){return b})),n.d(e,"getCrypto",(function(){return M})),n.d(e,"getLocalStorageOrThrow",(function(){return x})),n.d(e,"getLocalStorage",(function(){return E})),n.d(e,"getClientMeta",(function(){return k})),n.d(e,"safeJsonParse",(function(){return S})),n.d(e,"safeJsonStringify",(function(){return C})),n.d(e,"setLocal",(function(){return A})),n.d(e,"getLocal",(function(){return T})),n.d(e,"removeLocal",(function(){return R})),n.d(e,"mobileLinkChoiceKey",(function(){return I})),n.d(e,"formatIOSMobile",(function(){return O})),n.d(e,"saveMobileLinkInfo",(function(){return B})),n.d(e,"getMobileRegistryEntry",(function(){return P})),n.d(e,"getMobileLinkRegistry",(function(){return N})),n.d(e,"getWalletRegistryUrl",(function(){return U})),n.d(e,"getDappRegistryUrl",(function(){return j})),n.d(e,"getAppLogoUrl",(function(){return q})),n.d(e,"formatMobileRegistryEntry",(function(){return D})),n.d(e,"formatMobileRegistry",(function(){return z}));var r=n(46),o=n(5),i=n(47);function s(t){return Object(i.a)(t)}function a(){const t=s();return t&&t.os?t.os:void 0}function u(){const t=a();return !!t&&t.toLowerCase().includes("android")}function c(){const t=a();return !!t&&(t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function l(){return !!a()&&(u()||c())}function h(){const t=s();return !(!t||!t.name)&&"node"===t.name.toLowerCase()}function f(){return !h()&&!!v()}const d=o.getFromWindow,p=o.getFromWindowOrThrow,g=o.getDocumentOrThrow,m=o.getDocument,_=o.getNavigatorOrThrow,v=o.getNavigator,y=o.getLocationOrThrow,w=o.getLocation,b=o.getCryptoOrThrow,M=o.getCrypto,x=o.getLocalStorageOrThrow,E=o.getLocalStorage;function k(){return r.getWindowMetadata()}const S=function(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return JSON.parse(t)}catch(e){return t}},C=function(t){return "string"==typeof t?t:JSON.stringify(t)};function A(t,e){const n=C(e),r=E();r&&r.setItem(t,n);}function T(t){let e=null,n=null;const r=E();return r&&(n=r.getItem(t)),e=n?S(n):n,e}function R(t){const e=E();e&&e.removeItem(t);}const I="WALLETCONNECT_DEEPLINK_CHOICE";function O(t,e){const n=encodeURIComponent(t);return e.universalLink?`${e.universalLink}/wc?uri=${n}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function B(t){const e=t.href.split("?")[0];A(I,Object.assign(Object.assign({},t),{href:e}));}function P(t,e){return t.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))[0]}function N(t,e){let n=t;return e&&(n=e.map(e=>P(t,e)).filter(Boolean)),n}const L="https://registry.walletconnect.org";function U(){return L+"/data/wallets.json"}function j(){return L+"/data/dapps.json"}function q(t){return L+"/logo/sm/"+t+".jpeg"}function D(t,e="mobile"){return {name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:t.id?q(t.id):"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function z(t,e="mobile"){return Object.values(t).filter(t=>!!t[e].universal||!!t[e].native).map(t=>D(t,e))}},function(t,e,n){const r=n(61),o=n(62),i=n(63);function s(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function a(t,e){return e.encode?e.strict?r(t):encodeURIComponent(t):t}function u(t,e){return e.decode?o(t):t}function c(t){const e=t.indexOf("#");return -1!==e&&(t=t.slice(0,e)),t}function l(t){const e=(t=c(t)).indexOf("?");return -1===e?"":t.slice(e+1)}function h(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function f(t,e){s((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const n=function(t){let e;switch(t.arrayFormat){case"index":return (t,n,r)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n;};case"bracket":return (t,n,r)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=[n]:r[t]=n;};case"comma":case"separator":return (e,n,r)=>{const o="string"==typeof n&&n.split("").indexOf(t.arrayFormatSeparator)>-1?n.split(t.arrayFormatSeparator).map(e=>u(e,t)):null===n?n:u(n,t);r[e]=o;};default:return (t,e,n)=>{void 0!==n[t]?n[t]=[].concat(n[t],e):n[t]=e;}}}(e),r=Object.create(null);if("string"!=typeof t)return r;if(!(t=t.trim().replace(/^[?#&]/,"")))return r;for(const o of t.split("&")){let[t,s]=i(e.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator"].includes(e.arrayFormat)?s:u(s,e),n(u(t,e),s,r);}for(const t of Object.keys(r)){const n=r[t];if("object"==typeof n&&null!==n)for(const t of Object.keys(n))n[t]=h(n[t],e);else r[t]=h(n,e);}return !1===e.sort?r:(!0===e.sort?Object.keys(r).sort():Object.keys(r).sort(e.sort)).reduce((t,e)=>{const n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort((t,e)=>Number(t)-Number(e)).map(t=>e[t]):e}(n):t[e]=n,t},Object.create(null))}e.extract=l,e.parse=f,e.stringify=(t,e)=>{if(!t)return "";s((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const n=n=>e.skipNull&&null==t[n]||e.skipEmptyString&&""===t[n],r=function(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{const o=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[a(e,t),"[",o,"]"].join("")]:[...n,[a(e,t),"[",a(o,t),"]=",a(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[a(e,t),"[]"].join("")]:[...n,[a(e,t),"[]=",a(r,t)].join("")];case"comma":case"separator":return e=>(n,r)=>null==r||0===r.length?n:0===n.length?[[a(e,t),"=",a(r,t)].join("")]:[[n,a(r,t)].join(t.arrayFormatSeparator)];default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,a(e,t)]:[...n,[a(e,t),"=",a(r,t)].join("")]}}(e),o={};for(const e of Object.keys(t))n(e)||(o[e]=t[e]);const i=Object.keys(o);return !1!==e.sort&&i.sort(e.sort),i.map(n=>{const o=t[n];return void 0===o?"":null===o?a(n,e):Array.isArray(o)?o.reduce(r(n),[]).join("&"):a(n,e)+"="+a(o,e)}).filter(t=>t.length>0).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[n,r]=i(t,"#");return Object.assign({url:n.split("?")[0]||"",query:f(l(t),e)},e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:u(r,e)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=c(t.url).split("?")[0]||"",o=e.extract(t.url),i=e.parse(o,{sort:!1}),s=Object.assign(i,t.query);let u=e.stringify(s,n);u&&(u="?"+u);let l=function(t){let e="";const n=t.indexOf("#");return -1!==n&&(e=t.slice(n)),e}(t.url);return t.fragmentIdentifier&&(l="#"+a(t.fragmentIdentifier,n)),`${r}${u}${l}`};},function(t,e){t.exports=o,o.strict=i,o.loose=s;var n=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function o(t){return i(t)||s(t)}function i(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function s(t){return r[n.call(t)]}},function(t,e,n){var r=n(4);n.o(r,"payloadId")&&n.d(e,"payloadId",(function(){return r.payloadId}));r.isNode;},function(t,e,n){n.d(e,"a",(function(){return r}));n(9),n(3);function r(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}},function(t,e,n){},function(t,e,n){n(27);},function(t,e,n){n(28),n(12),n(29),n(30);},function(t,e){},function(t,e,n){var r=n(12);r.a;r.a;},function(t,e){},function(t,e,n){},function(t,e,n){},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(4);function o(t){return r.getBrowerCrypto().getRandomValues(new Uint8Array(t))}},function(t,e,n){n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i}));var r=n(6);function o(t,e,n){return Object(r.b)(t,e,n)}function i(t,e,n){return Object(r.a)(t,e,n)}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(6);n(13);async function o(t,e){return await Object(r.c)(t,e)}},function(t,e,n){var r=n(4);n.o(r,"isConstantTime")&&n.d(e,"isConstantTime",(function(){return r.isConstantTime}));},function(t,e,n){},function(t,e){},function(t,e,n){function r(t,e){if(t.length!==e.length)return !1;let n=0;for(let r=0;r<t.length;r++)n|=t[r]^e[r];return 0===n}n.d(e,"a",(function(){return r}));},function(t,e,n){n(6);},function(t,e,n){(function(e){function r(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var o=n(20),i=r(n(65)),s=r(n(86)),a=n(89);"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function u(t){return a.createElement("div",{className:"walletconnect-modal__header"},a.createElement("img",{src:"data:image/svg+xml,%3C?xml version='1.0' encoding='UTF-8'?%3E %3Csvg width='300px' height='185px' viewBox='0 0 300 185' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 49.3 (51167) - http://www.bohemiancoding.com/sketch --%3E %3Ctitle%3EWalletConnect%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cdefs%3E%3C/defs%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='walletconnect-logo-alt' fill='%233B99FC' fill-rule='nonzero'%3E %3Cpath d='M61.4385429,36.2562612 C110.349767,-11.6319051 189.65053,-11.6319051 238.561752,36.2562612 L244.448297,42.0196786 C246.893858,44.4140867 246.893858,48.2961898 244.448297,50.690599 L224.311602,70.406102 C223.088821,71.6033071 221.106302,71.6033071 219.883521,70.406102 L211.782937,62.4749541 C177.661245,29.0669724 122.339051,29.0669724 88.2173582,62.4749541 L79.542302,70.9685592 C78.3195204,72.1657633 76.337001,72.1657633 75.1142214,70.9685592 L54.9775265,51.2530561 C52.5319653,48.8586469 52.5319653,44.9765439 54.9775265,42.5821357 L61.4385429,36.2562612 Z M280.206339,77.0300061 L298.128036,94.5769031 C300.573585,96.9713 300.573599,100.85338 298.128067,103.247793 L217.317896,182.368927 C214.872352,184.763353 210.907314,184.76338 208.461736,182.368989 C208.461726,182.368979 208.461714,182.368967 208.461704,182.368957 L151.107561,126.214385 C150.496171,125.615783 149.504911,125.615783 148.893521,126.214385 C148.893517,126.214389 148.893514,126.214393 148.89351,126.214396 L91.5405888,182.368927 C89.095052,184.763359 85.1300133,184.763399 82.6844276,182.369014 C82.6844133,182.369 82.684398,182.368986 82.6843827,182.36897 L1.87196327,103.246785 C-0.573596939,100.852377 -0.573596939,96.9702735 1.87196327,94.5758653 L19.7936929,77.028998 C22.2392531,74.6345898 26.2042918,74.6345898 28.6498531,77.028998 L86.0048306,133.184355 C86.6162214,133.782957 87.6074796,133.782957 88.2188704,133.184355 C88.2188796,133.184346 88.2188878,133.184338 88.2188969,133.184331 L145.571,77.028998 C148.016505,74.6345347 151.981544,74.6344449 154.427161,77.028798 C154.427195,77.0288316 154.427229,77.0288653 154.427262,77.028899 L211.782164,133.184331 C212.393554,133.782932 213.384814,133.782932 213.996204,133.184331 L271.350179,77.0300061 C273.79574,74.6355969 277.760778,74.6355969 280.206339,77.0300061 Z' id='WalletConnect'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E",className:"walletconnect-modal__headerLogo"}),a.createElement("p",null,"WalletConnect"),a.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:t.onClose},a.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},a.createElement("div",{className:"walletconnect-modal__close__line1"}),a.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function c(t){return a.createElement("a",{className:"walletconnect-connect__button",href:t.href,id:"walletconnect-connect-button-"+t.name,onClick:t.onClick,rel:"noopener noreferrer",style:{backgroundColor:t.color},target:"_blank"},t.name)}function l(t){var e=t.color,n=t.href,r=t.name,o=t.logo,i=t.onClick;return a.createElement("a",{className:"walletconnect-modal__base__row",href:n,onClick:i,rel:"noopener noreferrer",target:"_blank"},a.createElement("h3",{className:"walletconnect-modal__base__row__h3"},r),a.createElement("div",{className:"walletconnect-modal__base__row__right"},a.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+o+"') "+e,backgroundSize:"100%"}}),a.createElement("img",{src:"data:image/svg+xml,%3Csvg width='8' height='18' viewBox='0 0 8 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.586301 0.213898C0.150354 0.552968 0.0718197 1.18124 0.41089 1.61719L5.2892 7.88931C5.57007 8.25042 5.57007 8.75608 5.2892 9.11719L0.410889 15.3893C0.071819 15.8253 0.150353 16.4535 0.586301 16.7926C1.02225 17.1317 1.65052 17.0531 1.98959 16.6172L6.86791 10.3451C7.7105 9.26174 7.7105 7.74476 6.86791 6.66143L1.98959 0.38931C1.65052 -0.0466374 1.02225 -0.125172 0.586301 0.213898Z' fill='%233C4252'/%3E %3C/svg%3E",className:"walletconnect-modal__base__row__right__caret"})))}function h(t){var e=t.color,n=t.href,r=t.name,o=t.logo,i=t.onClick,s=window.innerWidth<768?(r.length>8?2.5:2.7)+"vw":"inherit";return a.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:n,onClick:i,rel:"noopener noreferrer",target:"_blank"},a.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+o+"') "+e,backgroundSize:"100%"}}),a.createElement("div",{style:{fontSize:s},className:"walletconnect-connect__button__text"},r))}function f(t){var e=o.isAndroid(),n=a.useState(""),r=n[0],i=n[1],s=a.useState(""),u=s[0],f=s[1],d=a.useState(1),p=d[0],g=d[1],m=u?t.links.filter((function(t){return t.name.toLowerCase().includes(u.toLowerCase())})):t.links,_=t.errorMessage,v=u||m.length>5,y=Math.ceil(m.length/12),w=[12*(p-1)+1,12*p],b=m.length?m.filter((function(t,e){return e+1>=w[0]&&e+1<=w[1]})):[],M=!(e||!(y>1)),x=void 0;return a.createElement("div",null,a.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},e?t.text.connect_mobile_wallet:t.text.choose_preferred_wallet),!e&&a.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:r,onChange:function(t){i(t.target.value),clearTimeout(x),t.target.value?x=setTimeout((function(){f(t.target.value),g(1);}),1e3):(i(""),f(""),g(1));}}),a.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(e?"__android":v&&m.length?"__wrap":"")},e?a.createElement(c,{name:t.text.connect,color:"rgb(64, 153, 255)",href:t.uri,onClick:a.useCallback((function(){o.saveMobileLinkInfo({name:"Unknown",href:t.uri});}),[])}):b.length?b.map((function(e){var n=e.color,r=e.name,i=e.shortName,s=e.logo,u=o.formatIOSMobile(t.uri,e),c=a.useCallback((function(){o.saveMobileLinkInfo({name:r,href:u});}),[b]);return v?a.createElement(h,{color:n,href:u,name:i,logo:s,onClick:c}):a.createElement(l,{color:n,href:u,name:r,logo:s,onClick:c})})):a.createElement(a.Fragment,null,a.createElement("p",null,_.length?t.errorMessage:t.links.length&&!m.length?t.text.no_wallets_found:t.text.loading))),M&&a.createElement("div",{className:"walletconnect-modal__footer"},Array(y).fill(0).map((function(t,e){var n=e+1,r=p===n;return a.createElement("a",{style:{margin:"auto 10px",fontWeight:r?"bold":"normal"},onClick:function(){return g(n)}},n)}))))}function d(t){var e=!!t.message.trim();return a.createElement("div",{className:"walletconnect-qrcode__notification"+(e?" notification__show":"")},t.message)}function p(t){var e=a.useState(""),n=e[0],r=e[1],o=a.useState(""),u=o[0],c=o[1];a.useEffect((function(){try{return Promise.resolve(function(t){try{var e="";return Promise.resolve(i.toString(t,{margin:0,type:"svg"})).then((function(t){return "string"==typeof t&&(e=t.replace("<svg",'<svg class="walletconnect-qrcode__image"')),e}))}catch(t){return Promise.reject(t)}}(t.uri)).then((function(t){c(t);}))}catch(t){Promise.reject(t);}}),[]);return a.createElement("div",null,a.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},t.text.scan_qrcode_with_wallet),a.createElement("div",{dangerouslySetInnerHTML:{__html:u}}),a.createElement("div",{className:"walletconnect-modal__footer"},a.createElement("a",{onClick:function(){s(t.uri)?(r(t.text.copied_to_clipboard),setInterval((function(){return r("")}),1200)):(r("Error"),setInterval((function(){return r("")}),1200));}},t.text.copy_to_clipboard)),a.createElement(d,{message:n}))}function g(t){var e=o.isAndroid(),n=o.isMobile(),r=n?t.qrcodeModalOptions&&t.qrcodeModalOptions.mobileLinks?t.qrcodeModalOptions.mobileLinks:void 0:t.qrcodeModalOptions&&t.qrcodeModalOptions.desktopLinks?t.qrcodeModalOptions.desktopLinks:void 0,i=a.useState(!1),s=i[0],c=i[1],l=a.useState(!1),h=l[0],d=l[1],g=a.useState(!n),m=g[0],_=g[1],v={mobile:n,text:t.text,uri:t.uri,qrcodeModalOptions:t.qrcodeModalOptions},y=a.useState(""),w=y[0],b=y[1],M=a.useState(!1),x=M[0],E=M[1],k=a.useState([]),S=k[0],C=k[1],A=a.useState(""),T=A[0],R=A[1],I=function(){h||s||r&&!r.length||S.length>0||a.useEffect((function(){!function(){try{if(e)return Promise.resolve();c(!0);var i=function(t,e){try{var n=t();}catch(t){return e(t)}return n&&n.then?n.then(void 0,e):n}((function(){var e=t.qrcodeModalOptions&&t.qrcodeModalOptions.registryUrl?t.qrcodeModalOptions.registryUrl:o.getWalletRegistryUrl();return Promise.resolve(fetch(e).then((function(t){return t.json()}))).then((function(e){var i=n?"mobile":"desktop",s=o.getMobileLinkRegistry(o.formatMobileRegistry(e,i),r);c(!1),d(!0),R(s.length?"":t.text.no_supported_wallets),C(s);var a=1===s.length;a&&(b(o.formatIOSMobile(t.uri,s[0])),_(!0)),E(a);}))}),(function(e){c(!1),d(!0),R(t.text.something_went_wrong),console.error(e);}));Promise.resolve(i&&i.then?i.then((function(){})):void 0);}catch(t){return Promise.reject(t)}}();}));};I();var O=n?m:!m;return a.createElement("div",{id:"walletconnect-qrcode-modal",className:"walletconnect-qrcode__base animated fadeIn"},a.createElement("div",{className:"walletconnect-modal__base"},a.createElement(u,{onClose:t.onClose}),x&&m?a.createElement("div",{className:"walletconnect-modal__single_wallet"},a.createElement("a",{onClick:function(){return o.saveMobileLinkInfo({name:S[0].name,href:w})},href:w,rel:"noopener noreferrer",target:"_blank"},t.text.connect_with+" "+(x?S[0].name:"")+" ›")):e||s||!s&&S.length?a.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(O?" right__selected":"")},a.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),n?a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return _(!1),I()}},t.text.mobile),a.createElement("a",{onClick:function(){return _(!0)}},t.text.qrcode)):a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return _(!0)}},t.text.qrcode),a.createElement("a",{onClick:function(){return _(!1),I()}},t.text.desktop))):null,a.createElement("div",null,m||!e&&!s&&!S.length?a.createElement(p,Object.assign({},v)):a.createElement(f,Object.assign({},v,{links:S,errorMessage:T})))))}var m={de:{choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},ko:{choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},fa:{choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"}};function _(){var t=o.getDocumentOrThrow(),e=t.getElementById("walletconnect-qrcode-modal");e&&(e.className=e.className.replace("fadeIn","fadeOut"),setTimeout((function(){var e=t.getElementById("walletconnect-wrapper");e&&t.body.removeChild(e);}),300));}function v(t){return function(){_(),t&&t();}}function y(t,e,n){!function(){var t=o.getDocumentOrThrow(),e=t.getElementById("walletconnect-style-sheet");e&&t.head.removeChild(e);var n=t.createElement("style");n.setAttribute("id","walletconnect-style-sheet"),n.innerText=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n',t.head.appendChild(n);}();var r,i=function(){var t=o.getDocumentOrThrow(),e=t.createElement("div");return e.setAttribute("id","walletconnect-wrapper"),t.body.appendChild(e),e}();a.render(a.createElement(g,{text:(r=o.getNavigatorOrThrow().language.split("-")[0]||"en",m[r]||m.en),uri:t,onClose:v(e),qrcodeModalOptions:n}),i);}var w=function(){return void 0!==e&&void 0!==e.versions&&void 0!==e.versions.node};var b={open:function(t,e,n){console.log(t),w()?function(t){i.toString(t,{type:"terminal"}).then(console.log);}(t):y(t,e,n);},close:function(){w()||_();}};t.exports=b;}).call(this,n(15));},function(t,e,n){var r=n(19),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}};},function(t,e){e.isValid=function(t){return !isNaN(t)&&t>=1&&t<=40};},function(t,e){var n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",r="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";e.KANJI=new RegExp(n,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(r,"g"),e.NUMERIC=new RegExp("[0-9]+","g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var o=new RegExp("^"+n+"$"),i=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return o.test(t)},e.testNumeric=function(t){return i.test(t)},e.testAlphanumeric=function(t){return s.test(t)};},function(t,e){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return [t,t]})))),6===e.length&&e.push("F","F");var n=parseInt(e.join(""),16);return {r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return {width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){var r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){for(var o=n.modules.size,i=n.modules.data,s=e.getScale(o,r),a=Math.floor((o+2*r.margin)*s),u=r.margin*s,c=[r.color.light,r.color.dark],l=0;l<a;l++)for(var h=0;h<a;h++){var f=4*(l*a+h),d=r.color.light;if(l>=u&&h>=u&&l<a-u&&h<a-u)d=c[i[Math.floor((l-u)/s)*o+Math.floor((h-u)/s)]?1:0];t[f++]=d.r,t[f++]=d.g,t[f++]=d.b,t[f]=d.a;}};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getWindowMetadata=void 0;const r=n(5);e.getWindowMetadata=function(){let t,e;try{t=r.getDocumentOrThrow(),e=r.getLocationOrThrow();}catch(t){return null}function n(...e){const n=t.getElementsByTagName("meta");for(let t=0;t<n.length;t++){const r=n[t],o=["itemprop","property","name"].map(t=>r.getAttribute(t)).filter(t=>!!t&&e.includes(t));if(o.length&&o){const t=r.getAttribute("content");if(t)return t}}return ""}const o=function(){let e=n("name","og:site_name","og:title","twitter:title");return e||(e=t.title),e}();return {description:n("description","og:description","twitter:description","keywords"),url:e.origin,icons:function(){const n=t.getElementsByTagName("link"),r=[];for(let t=0;t<n.length;t++){const o=n[t],i=o.getAttribute("rel");if(i&&i.toLowerCase().indexOf("icon")>-1){const t=o.getAttribute("href");if(t)if(-1===t.toLowerCase().indexOf("https:")&&-1===t.toLowerCase().indexOf("http:")&&0!==t.indexOf("//")){let n=e.protocol+"//"+e.host;if(0===t.indexOf("/"))n+=t;else {const r=e.pathname.split("/");r.pop();n+=r.join("/")+"/"+t;}r.push(n);}else if(0===t.indexOf("//")){const n=e.protocol+t;r.push(n);}else r.push(t);}}return r}(),name:o}};},function(t,e,n){(function(t){n.d(e,"a",(function(){return f}));var r=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r},o=function(t,e,n){this.name=t,this.version=e,this.os=n,this.type="browser";},i=function(e){this.version=e,this.type="node",this.name="node",this.os=t.platform;},s=function(t,e,n,r){this.name=t,this.version=e,this.os=n,this.bot=r,this.type="bot-device";},a=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null;},u=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null;},c=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,l=[["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",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],h=[["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 f(e){return e?p(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new u:"undefined"!=typeof navigator?p(navigator.userAgent):void 0!==t&&t.version?new i(t.version.slice(1)):null}function d(t){return ""!==t&&l.reduce((function(e,n){var r=n[0],o=n[1];if(e)return e;var i=o.exec(t);return !!i&&[r,i]}),!1)}function p(t){var e=d(t);if(!e)return null;var n=e[0],i=e[1];if("searchbot"===n)return new a;var u=i[1]&&i[1].split(/[._]/).slice(0,3);u?u.length<3&&(u=r(u,function(t){for(var e=[],n=0;n<t;n++)e.push("0");return e}(3-u.length))):u=[];var l=u.join("."),f=function(t){for(var e=0,n=h.length;e<n;e++){var r=h[e],o=r[0];if(r[1].exec(t))return o}return null}(t),p=c.exec(t);return p&&p[1]?new s(n,l,f,p[1]):new o(n,l,f)}}).call(this,n(15));},function(t,e,n){(function(r,o){var i;
|
|
30654
|
+
/**
|
|
30655
|
+
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|
30656
|
+
*
|
|
30657
|
+
* @version 0.8.0
|
|
30658
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
30659
|
+
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
30660
|
+
* @license MIT
|
|
30661
|
+
*/!function(){var s="input is invalid type",a="object"==typeof window,u=a?window:{};u.JS_SHA3_NO_WINDOW&&(a=!1);var c=!a&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof r&&r.versions&&r.versions.node?u=o:c&&(u=self);var l=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeof t&&t.exports,h=n(58),f=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),p=[4,1024,262144,67108864],g=[0,8,16,24],m=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],_=[224,256,384,512],v=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return "[object Array]"===Object.prototype.toString.call(t)}),!f||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return "object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var b=function(t,e,n){return function(r){return new L(t,e,t).update(r)[n]()}},M=function(t,e,n){return function(r,o){return new L(t,e,o).update(r)[n]()}},x=function(t,e,n){return function(e,r,o,i){return A["cshake"+t].update(e,r,o,i)[n]()}},E=function(t,e,n){return function(e,r,o,i){return A["kmac"+t].update(e,r,o,i)[n]()}},k=function(t,e,n,r){for(var o=0;o<y.length;++o){var i=y[o];t[i]=e(n,r,i);}return t},S=function(t,e){var n=b(t,e,"hex");return n.create=function(){return new L(t,e,t)},n.update=function(t){return n.create().update(t)},k(n,b,t,e)},C=[{name:"keccak",padding:[1,256,65536,16777216],bits:_,createMethod:S},{name:"sha3",padding:[6,1536,393216,100663296],bits:_,createMethod:S},{name:"shake",padding:[31,7936,2031616,520093696],bits:v,createMethod:function(t,e){var n=M(t,e,"hex");return n.create=function(n){return new L(t,e,n)},n.update=function(t,e){return n.create(e).update(t)},k(n,M,t,e)}},{name:"cshake",padding:p,bits:v,createMethod:function(t,e){var n=w[t],r=x(t,0,"hex");return r.create=function(r,o,i){return o||i?new L(t,e,r).bytepad([o,i],n):A["shake"+t].create(r)},r.update=function(t,e,n,o){return r.create(e,n,o).update(t)},k(r,x,t,e)}},{name:"kmac",padding:p,bits:v,createMethod:function(t,e){var n=w[t],r=E(t,0,"hex");return r.create=function(r,o,i){return new U(t,e,o).bytepad(["KMAC",i],n).bytepad([r],n)},r.update=function(t,e,n,o){return r.create(t,n,o).update(e)},k(r,E,t,e)}}],A={},T=[],R=0;R<C.length;++R)for(var I=C[R],O=I.bits,B=0;B<O.length;++B){var P=I.name+"_"+O[B];if(T.push(P),A[P]=I.createMethod(O[B],I.padding),"sha3"!==I.name){var N=I.name+O[B];T.push(N),A[N]=A[P];}}function L(t,e,n){this.blocks=[],this.s=[],this.padding=e,this.outputBits=n,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0;}function U(t,e,n){L.call(this,t,e,n);}L.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(s);if(null===t)throw new Error(s);if(f&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||f&&ArrayBuffer.isView(t)))throw new Error(s);e=!0;}for(var r,o,i=this.blocks,a=this.byteCount,u=t.length,c=this.blockCount,l=0,h=this.s;l<u;){if(this.reset)for(this.reset=!1,i[0]=this.block,r=1;r<c+1;++r)i[r]=0;if(e)for(r=this.start;l<u&&r<a;++l)i[r>>2]|=t[l]<<g[3&r++];else for(r=this.start;l<u&&r<a;++l)(o=t.charCodeAt(l))<128?i[r>>2]|=o<<g[3&r++]:o<2048?(i[r>>2]|=(192|o>>6)<<g[3&r++],i[r>>2]|=(128|63&o)<<g[3&r++]):o<55296||o>=57344?(i[r>>2]|=(224|o>>12)<<g[3&r++],i[r>>2]|=(128|o>>6&63)<<g[3&r++],i[r>>2]|=(128|63&o)<<g[3&r++]):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++l)),i[r>>2]|=(240|o>>18)<<g[3&r++],i[r>>2]|=(128|o>>12&63)<<g[3&r++],i[r>>2]|=(128|o>>6&63)<<g[3&r++],i[r>>2]|=(128|63&o)<<g[3&r++]);if(this.lastByteIndex=r,r>=a){for(this.start=r-a,this.block=i[c],r=0;r<c;++r)h[r]^=i[r];j(h),this.reset=!0;}else this.start=r;}return this},L.prototype.encode=function(t,e){var n=255&t,r=1,o=[n];for(n=255&(t>>=8);n>0;)o.unshift(n),n=255&(t>>=8),++r;return e?o.push(r):o.unshift(r),this.update(o),o.length},L.prototype.encodeString=function(t){var e,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(s);if(null===t)throw new Error(s);if(f&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||f&&ArrayBuffer.isView(t)))throw new Error(s);e=!0;}var r=0,o=t.length;if(e)r=o;else for(var i=0;i<t.length;++i){var a=t.charCodeAt(i);a<128?r+=1:a<2048?r+=2:a<55296||a>=57344?r+=3:(a=65536+((1023&a)<<10|1023&t.charCodeAt(++i)),r+=4);}return r+=this.encode(8*r),this.update(t),r},L.prototype.bytepad=function(t,e){for(var n=this.encode(e),r=0;r<t.length;++r)n+=this.encodeString(t[r]);var o=e-n%e,i=[];return i.length=o,this.update(i),this},L.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex,n=this.blockCount,r=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[n],e=1;e<n+1;++e)t[e]=0;for(t[n-1]|=2147483648,e=0;e<n;++e)r[e]^=t[e];j(r);}},L.prototype.toString=L.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,n=this.s,r=this.outputBlocks,o=this.extraBytes,i=0,s=0,a="";s<r;){for(i=0;i<e&&s<r;++i,++s)t=n[i],a+=d[t>>4&15]+d[15&t]+d[t>>12&15]+d[t>>8&15]+d[t>>20&15]+d[t>>16&15]+d[t>>28&15]+d[t>>24&15];s%e==0&&(j(n),i=0);}return o&&(t=n[i],a+=d[t>>4&15]+d[15&t],o>1&&(a+=d[t>>12&15]+d[t>>8&15]),o>2&&(a+=d[t>>20&15]+d[t>>16&15])),a},L.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,n=this.s,r=this.outputBlocks,o=this.extraBytes,i=0,s=0,a=this.outputBits>>3;t=o?new ArrayBuffer(r+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(t);s<r;){for(i=0;i<e&&s<r;++i,++s)u[s]=n[i];s%e==0&&j(n);}return o&&(u[i]=n[i],t=t.slice(0,a)),t},L.prototype.buffer=L.prototype.arrayBuffer,L.prototype.digest=L.prototype.array=function(){this.finalize();for(var t,e,n=this.blockCount,r=this.s,o=this.outputBlocks,i=this.extraBytes,s=0,a=0,u=[];a<o;){for(s=0;s<n&&a<o;++s,++a)t=a<<2,e=r[s],u[t]=255&e,u[t+1]=e>>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;a%n==0&&j(r);}return i&&(t=a<<2,e=r[s],u[t]=255&e,i>1&&(u[t+1]=e>>8&255),i>2&&(u[t+2]=e>>16&255)),u},U.prototype=new L,U.prototype.finalize=function(){return this.encode(this.outputBits,!0),L.prototype.finalize.call(this)};var j=function(t){var e,n,r,o,i,s,a,u,c,l,h,f,d,p,g,_,v,y,w,b,M,x,E,k,S,C,A,T,R,I,O,B,P,N,L,U,j,q,D,z,W,F,H,Y,J,$,V,K,Q,Z,X,G,tt,et,nt,rt,ot,it,st,at,ut,ct,lt;for(r=0;r<48;r+=2)o=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],l=t[6]^t[16]^t[26]^t[36]^t[46],h=t[7]^t[17]^t[27]^t[37]^t[47],e=(f=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|a>>>31),n=(d=t[9]^t[19]^t[29]^t[39]^t[49])^(a<<1|s>>>31),t[0]^=e,t[1]^=n,t[10]^=e,t[11]^=n,t[20]^=e,t[21]^=n,t[30]^=e,t[31]^=n,t[40]^=e,t[41]^=n,e=o^(u<<1|c>>>31),n=i^(c<<1|u>>>31),t[2]^=e,t[3]^=n,t[12]^=e,t[13]^=n,t[22]^=e,t[23]^=n,t[32]^=e,t[33]^=n,t[42]^=e,t[43]^=n,e=s^(l<<1|h>>>31),n=a^(h<<1|l>>>31),t[4]^=e,t[5]^=n,t[14]^=e,t[15]^=n,t[24]^=e,t[25]^=n,t[34]^=e,t[35]^=n,t[44]^=e,t[45]^=n,e=u^(f<<1|d>>>31),n=c^(d<<1|f>>>31),t[6]^=e,t[7]^=n,t[16]^=e,t[17]^=n,t[26]^=e,t[27]^=n,t[36]^=e,t[37]^=n,t[46]^=e,t[47]^=n,e=l^(o<<1|i>>>31),n=h^(i<<1|o>>>31),t[8]^=e,t[9]^=n,t[18]^=e,t[19]^=n,t[28]^=e,t[29]^=n,t[38]^=e,t[39]^=n,t[48]^=e,t[49]^=n,p=t[0],g=t[1],$=t[11]<<4|t[10]>>>28,V=t[10]<<4|t[11]>>>28,T=t[20]<<3|t[21]>>>29,R=t[21]<<3|t[20]>>>29,at=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,F=t[40]<<18|t[41]>>>14,H=t[41]<<18|t[40]>>>14,N=t[2]<<1|t[3]>>>31,L=t[3]<<1|t[2]>>>31,_=t[13]<<12|t[12]>>>20,v=t[12]<<12|t[13]>>>20,K=t[22]<<10|t[23]>>>22,Q=t[23]<<10|t[22]>>>22,I=t[33]<<13|t[32]>>>19,O=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,lt=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,nt=t[4]<<30|t[5]>>>2,U=t[14]<<6|t[15]>>>26,j=t[15]<<6|t[14]>>>26,y=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,Z=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,B=t[45]<<29|t[44]>>>3,P=t[44]<<29|t[45]>>>3,k=t[6]<<28|t[7]>>>4,S=t[7]<<28|t[6]>>>4,rt=t[17]<<23|t[16]>>>9,ot=t[16]<<23|t[17]>>>9,q=t[26]<<25|t[27]>>>7,D=t[27]<<25|t[26]>>>7,b=t[36]<<21|t[37]>>>11,M=t[37]<<21|t[36]>>>11,G=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,Y=t[8]<<27|t[9]>>>5,J=t[9]<<27|t[8]>>>5,C=t[18]<<20|t[19]>>>12,A=t[19]<<20|t[18]>>>12,it=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,z=t[38]<<8|t[39]>>>24,W=t[39]<<8|t[38]>>>24,x=t[48]<<14|t[49]>>>18,E=t[49]<<14|t[48]>>>18,t[0]=p^~_&y,t[1]=g^~v&w,t[10]=k^~C&T,t[11]=S^~A&R,t[20]=N^~U&q,t[21]=L^~j&D,t[30]=Y^~$&K,t[31]=J^~V&Q,t[40]=et^~rt&it,t[41]=nt^~ot&st,t[2]=_^~y&b,t[3]=v^~w&M,t[12]=C^~T&I,t[13]=A^~R&O,t[22]=U^~q&z,t[23]=j^~D&W,t[32]=$^~K&Z,t[33]=V^~Q&X,t[42]=rt^~it&at,t[43]=ot^~st&ut,t[4]=y^~b&x,t[5]=w^~M&E,t[14]=T^~I&B,t[15]=R^~O&P,t[24]=q^~z&F,t[25]=D^~W&H,t[34]=K^~Z&G,t[35]=Q^~X&tt,t[44]=it^~at&ct,t[45]=st^~ut<,t[6]=b^~x&p,t[7]=M^~E&g,t[16]=I^~B&k,t[17]=O^~P&S,t[26]=z^~F&N,t[27]=W^~H&L,t[36]=Z^~G&Y,t[37]=X^~tt&J,t[46]=at^~ct&et,t[47]=ut^~lt&nt,t[8]=x^~p&_,t[9]=E^~g&v,t[18]=B^~k&C,t[19]=P^~S&A,t[28]=F^~N&U,t[29]=H^~L&j,t[38]=G^~Y&$,t[39]=tt^~J&V,t[48]=ct^~et&rt,t[49]=lt^~nt&ot,t[0]^=m[r],t[1]^=m[r+1];};if(l)t.exports=A;else {for(R=0;R<T.length;++R)u[T[R]]=A[T[R]];h&&(void 0===(i=function(){return A}.call(e,n,e,t))||(t.exports=i));}}();}).call(this,n(15),n(16));},function(t,e,n){n(3),n(9);var r=n(23);n.o(r,"payloadId")&&n.d(e,"payloadId",(function(){return r.payloadId}));var o=n(24);n.d(e,"payloadId",(function(){return o.a}));n(25),n(26),n(31),n(32);},function(t,e,n){(function(t){var r=n(1),o=n(51);const i=void 0!==t.WebSocket?t.WebSocket:n(64);e.a=class{constructor(t){if(this.opts=t,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=t.protocol,this._version=t.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=t.subscriptions||[],this._netMonitor=t.netMonitor||new o.a,!t.url||"string"!=typeof t.url)throw new Error("Missing or invalid WebSocket url");this._url=t.url,this._netMonitor.on("online",()=>this._socketCreate());}set readyState(t){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(t){}get connecting(){return 0===this.readyState}set connected(t){}get connected(){return 1===this.readyState}set closing(t){}get closing(){return 2===this.readyState}set closed(t){}get closed(){return 3===this.readyState}open(){this._socketCreate();}close(){this._socketClose();}send(t,e,n){if(!e||"string"!=typeof e)throw new Error("Missing or invalid topic field");this._socketSend({topic:e,type:"pub",payload:t,silent:!!n});}subscribe(t){this._socketSend({topic:t,type:"sub",payload:"",silent:!0});}on(t,e){this._events.push({event:t,callback:e});}_socketCreate(){if(this._nextSocket)return;const t=function(t,e,n){var o,i;const s=(t.startsWith("https")?t.replace("https","wss"):t.startsWith("http")?t.replace("http","ws"):t).split("?"),a=Object(r.m)()?{protocol:e,version:n,env:"browser",host:(null===(o=Object(r.k)())||void 0===o?void 0:o.host)||""}:{protocol:e,version:n,env:(null===(i=Object(r.g)())||void 0===i?void 0:i.name)||""},u=Object(r.a)(Object(r.l)(s[1]||""),a);return s[0]+"?"+u}(this._url,this._protocol,this._version);if(this._nextSocket=new i(t),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=t=>this._socketReceive(t),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=t=>this._socketError(t),this._nextSocket.onclose=()=>{setTimeout(()=>{this._nextSocket=null,this._socketCreate();},1e3);};}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue();}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close());}_socketSend(t){const e=JSON.stringify(t);this._socket&&1===this._socket.readyState?this._socket.send(e):(this._setToQueue(t),this._socketCreate());}async _socketReceive(t){let e;try{e=JSON.parse(t.data);}catch(t){return}if(this._socketSend({topic:e.topic,type:"ack",payload:"",silent:!0}),this._socket&&1===this._socket.readyState){const t=this._events.filter(t=>"message"===t.event);t&&t.length&&t.forEach(t=>t.callback(e));}}_socketError(t){const e=this._events.filter(t=>"error"===t.event);e&&e.length&&e.forEach(e=>e.callback(t));}_queueSubscriptions(){this._subscriptions.forEach(t=>this._queue.push({topic:t,type:"sub",payload:"",silent:!0})),this._subscriptions=this.opts.subscriptions||[];}_setToQueue(t){this._queue.push(t);}_pushQueue(){this._queue.forEach(t=>this._socketSend(t)),this._queue=[];}};}).call(this,n(16));},function(t,e,n){e.a=class{constructor(){this._eventEmitters=[],"undefined"!=typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")));}on(t,e){this._eventEmitters.push({event:t,callback:e});}trigger(t){let e=[];t&&(e=this._eventEmitters.filter(e=>e.event===t)),e.forEach(t=>{t.callback();});}};},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t};},function(t,e){},function(t,e,n){e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),s=r[0],a=r[1],u=new i(function(t,e,n){return 3*(e+n)/4-n}(0,s,a)),l=0,h=a>0?s-4:s;for(n=0;n<h;n+=4)e=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===a&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,u[l++]=255&e);1===a&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=0,a=n-o;s<a;s+=16383)i.push(l(t,s,s+16383>a?a:s+16383));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],o[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return -1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var o,i,s=[],a=e;a<n;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;},function(t,e){
|
|
30662
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
30663
|
+
e.read=function(t,e,n,r,o){var i,s,a=8*o-r-1,u=(1<<a)-1,c=u>>1,l=-7,h=n?o-1:0,f=n?-1:1,d=t[e+h];for(h+=f,i=d&(1<<-l)-1,d>>=-l,l+=a;l>0;i=256*i+t[e+h],h+=f,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===i)i=1-c;else {if(i===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),i-=c;}return (d?-1:1)*s*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var s,a,u,c=8*i-o-1,l=(1<<c)-1,h=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,o),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;t[n+d]=255&a,d+=p,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;t[n+d]=255&s,d+=p,s/=256,c-=8);t[n+d-p]|=128*g;};},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return "[object Array]"==n.call(t)};},function(t,e,n){(function(e){var r=n(22).strict;t.exports=function(t){if(r(t)){var n=e.from(t.buffer);return t.byteLength!==t.buffer.byteLength&&(n=n.slice(t.byteOffset,t.byteOffset+t.byteLength)),n}return e.from(t)};}).call(this,n(17).Buffer);},function(t,e){(function(e){t.exports=e;}).call(this,{});},function(t,e,n){(function(t){function n(){return (null==t?void 0:t.crypto)||(null==t?void 0:t.msCrypto)||{}}function r(){const t=n();return t.subtle||t.webkitSubtle}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowserCryptoAvailable=e.getSubtleCrypto=e.getBrowerCrypto=void 0,e.getBrowerCrypto=n,e.getSubtleCrypto=r,e.isBrowserCryptoAvailable=function(){return !!n()&&!!r()};}).call(this,n(16));},function(t,e,n){(function(t){function n(){return "undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function r(){return void 0!==t&&void 0!==t.versions&&void 0!==t.versions.node}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=e.isNode=e.isReactNative=void 0,e.isReactNative=n,e.isNode=r,e.isBrowser=function(){return !n()&&!r()};}).call(this,n(15));},function(t,e,n){t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase());},function(t,e,n){var r=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function i(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],i(n),i(r))}function s(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(r),n=1;n<e.length;n++)e=(t=i(e,n).join("")).match(r);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=o.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0]);}catch(t){var r=s(n[0]);r!==n[0]&&(e[n[0]]=r);}n=o.exec(t);}e["%C2"]="�";for(var i=Object.keys(e),a=0;a<i.length;a++){var u=i[a];t=t.replace(new RegExp(u,"g"),e[u]);}return t}(t)}};},function(t,e,n){t.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return [t];const n=t.indexOf(e);return -1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]};},function(t,e,n){t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};},function(t,e,n){var r=n(66),o=n(67),i=n(84),s=n(85);function a(t,e,n,i,s){var a=[].slice.call(arguments,1),u=a.length,c="function"==typeof a[u-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(u<1)throw new Error("Too few arguments provided");return 1===u?(n=e,e=i=void 0):2!==u||e.getContext||(i=n,n=e,e=void 0),new Promise((function(r,s){try{var a=o.create(n,i);r(t(a,e,i));}catch(t){s(t);}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(s=n,n=e,e=i=void 0):3===u&&(e.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=n,n=e,e=void 0));try{var l=o.create(n,i);s(null,t(l,e,i));}catch(t){s(t);}}e.create=o.create,e.toCanvas=a.bind(null,i.render),e.toDataURL=a.bind(null,i.renderToDataURL),e.toString=a.bind(null,(function(t,e,n){return s.render(t,n)}));},function(t,e){t.exports=function(){return "function"==typeof Promise&&Promise.prototype&&Promise.prototype.then};},function(t,e,n){var r=n(10),o=n(7),i=n(19),s=n(68),a=n(69),u=n(70),c=n(71),l=n(72),h=n(42),f=n(73),d=n(76),p=n(77),g=n(8),m=n(78),_=n(18);function v(t,e,n){var r,o,i=t.size,s=p.getEncodedBits(e,n);for(r=0;r<15;r++)o=1==(s>>r&1),r<6?t.set(r,8,o,!0):r<8?t.set(r+1,8,o,!0):t.set(i-15+r,8,o,!0),r<8?t.set(8,i-r-1,o,!0):r<9?t.set(8,15-r-1+1,o,!0):t.set(8,15-r-1,o,!0);t.set(i-8,8,1,!0);}function y(t,e,n){var i=new s;n.forEach((function(e){i.put(e.mode.bit,4),i.put(e.getLength(),g.getCharCountIndicator(e.mode,t)),e.write(i);}));var a=8*(o.getSymbolTotalCodewords(t)-h.getTotalCodewordsCount(t,e));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);for(var u=(a-i.getLengthInBits())/8,c=0;c<u;c++)i.put(c%2?17:236,8);return function(t,e,n){for(var i=o.getSymbolTotalCodewords(e),s=h.getTotalCodewordsCount(e,n),a=i-s,u=h.getBlocksCount(e,n),c=u-i%u,l=Math.floor(i/u),d=Math.floor(a/u),p=d+1,g=l-d,m=new f(g),_=0,v=new Array(u),y=new Array(u),w=0,b=r.from(t.buffer),M=0;M<u;M++){var x=M<c?d:p;v[M]=b.slice(_,_+x),y[M]=m.encode(v[M]),_+=x,w=Math.max(w,x);}var E,k,S=r.alloc(i),C=0;for(E=0;E<w;E++)for(k=0;k<u;k++)E<v[k].length&&(S[C++]=v[k][E]);for(E=0;E<g;E++)for(k=0;k<u;k++)S[C++]=y[k][E];return S}(i,t,e)}function w(t,e,n,r){var i;if(_(t))i=m.fromArray(t);else {if("string"!=typeof t)throw new Error("Invalid data");var s=e;if(!s){var h=m.rawSplit(t);s=d.getBestVersionForData(h,n);}i=m.fromString(t,s||40);}var f=d.getBestVersionForData(i,n);if(!f)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<f)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+f+".\n")}else e=f;var p=y(e,n,i),g=o.getSymbolSize(e),w=new a(g);return function(t,e){for(var n=t.size,r=c.getPositions(e),o=0;o<r.length;o++)for(var i=r[o][0],s=r[o][1],a=-1;a<=7;a++)if(!(i+a<=-1||n<=i+a))for(var u=-1;u<=7;u++)s+u<=-1||n<=s+u||(a>=0&&a<=6&&(0===u||6===u)||u>=0&&u<=6&&(0===a||6===a)||a>=2&&a<=4&&u>=2&&u<=4?t.set(i+a,s+u,!0,!0):t.set(i+a,s+u,!1,!0));}(w,e),function(t){for(var e=t.size,n=8;n<e-8;n++){var r=n%2==0;t.set(n,6,r,!0),t.set(6,n,r,!0);}}(w),function(t,e){for(var n=u.getPositions(e),r=0;r<n.length;r++)for(var o=n[r][0],i=n[r][1],s=-2;s<=2;s++)for(var a=-2;a<=2;a++)-2===s||2===s||-2===a||2===a||0===s&&0===a?t.set(o+s,i+a,!0,!0):t.set(o+s,i+a,!1,!0);}(w,e),v(w,n,0),e>=7&&function(t,e){for(var n,r,o,i=t.size,s=d.getEncodedBits(e),a=0;a<18;a++)n=Math.floor(a/3),r=a%3+i-8-3,o=1==(s>>a&1),t.set(n,r,o,!0),t.set(r,n,o,!0);}(w,e),function(t,e){for(var n=t.size,r=-1,o=n-1,i=7,s=0,a=n-1;a>0;a-=2)for(6===a&&a--;;){for(var u=0;u<2;u++)if(!t.isReserved(o,a-u)){var c=!1;s<e.length&&(c=1==(e[s]>>>i&1)),t.set(o,a-u,c),-1===--i&&(s++,i=7);}if((o+=r)<0||n<=o){o-=r,r=-r;break}}}(w,p),isNaN(r)&&(r=l.getBestMask(w,v.bind(null,w,n))),l.applyMask(r,w),v(w,n,r),{modules:w,version:e,errorCorrectionLevel:n,maskPattern:r,segments:i}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var n,r,s=i.M;return void 0!==e&&(s=i.from(e.errorCorrectionLevel,i.M),n=d.from(e.version),r=l.from(e.maskPattern),e.toSJISFunc&&o.setToSJISFunction(e.toSJISFunc)),w(t,n,s,r)};},function(t,e){function n(){this.buffer=[],this.length=0;}n.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1));},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++;}},t.exports=n;},function(t,e,n){var r=n(10);function o(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=r.alloc(t*t),this.reservedBit=r.alloc(t*t);}o.prototype.set=function(t,e,n,r){var o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0);},o.prototype.get=function(t,e){return this.data[t*this.size+e]},o.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n;},o.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=o;},function(t,e,n){var r=n(7).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return [];for(var e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7],s=1;s<e-1;s++)i[s]=i[s-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){for(var n=[],r=e.getRowColCoords(t),o=r.length,i=0;i<o;i++)for(var s=0;s<o;s++)0===i&&0===s||0===i&&s===o-1||i===o-1&&0===s||n.push([r[i],r[s]]);return n};},function(t,e,n){var r=n(7).getSymbolSize;e.getPositions=function(t){var e=r(t);return [[0,0],[e-7,0],[0,e-7]]};},function(t,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var n=3,r=3,o=40,i=10;function s(t,n,r){switch(t){case e.Patterns.PATTERN000:return (n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return (n+r)%3==0;case e.Patterns.PATTERN100:return (Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return (n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return (n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){for(var e=t.size,r=0,o=0,i=0,s=null,a=null,u=0;u<e;u++){o=i=0,s=a=null;for(var c=0;c<e;c++){var l=t.get(u,c);l===s?o++:(o>=5&&(r+=n+(o-5)),s=l,o=1),(l=t.get(c,u))===a?i++:(i>=5&&(r+=n+(i-5)),a=l,i=1);}o>=5&&(r+=n+(o-5)),i>=5&&(r+=n+(i-5));}return r},e.getPenaltyN2=function(t){for(var e=t.size,n=0,o=0;o<e-1;o++)for(var i=0;i<e-1;i++){var s=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);4!==s&&0!==s||n++;}return n*r},e.getPenaltyN3=function(t){for(var e=t.size,n=0,r=0,i=0,s=0;s<e;s++){r=i=0;for(var a=0;a<e;a++)r=r<<1&2047|t.get(s,a),a>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|t.get(a,s),a>=10&&(1488===i||93===i)&&n++;}return n*o},e.getPenaltyN4=function(t){for(var e=0,n=t.data.length,r=0;r<n;r++)e+=t.data[r];return Math.abs(Math.ceil(100*e/n/5)-10)*i},e.applyMask=function(t,e){for(var n=e.size,r=0;r<n;r++)for(var o=0;o<n;o++)e.isReserved(o,r)||e.xor(o,r,s(t,o,r));},e.getBestMask=function(t,n){for(var r=Object.keys(e.Patterns).length,o=0,i=1/0,s=0;s<r;s++){n(s),e.applyMask(s,t);var a=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(s,t),a<i&&(i=a,o=s);}return o};},function(t,e,n){var r=n(10),o=n(74),i=n(17).Buffer;function s(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree);}s.prototype.initialize=function(t){this.degree=t,this.genPoly=o.generateECPolynomial(this.degree);},s.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=r.alloc(this.degree),n=i.concat([t,e],t.length+this.degree),s=o.mod(n,this.genPoly),a=this.degree-s.length;if(a>0){var u=r.alloc(this.degree);return s.copy(u,a),u}return s},t.exports=s;},function(t,e,n){var r=n(10),o=n(75);e.mul=function(t,e){for(var n=r.alloc(t.length+e.length-1),i=0;i<t.length;i++)for(var s=0;s<e.length;s++)n[i+s]^=o.mul(t[i],e[s]);return n},e.mod=function(t,e){for(var n=r.from(t);n.length-e.length>=0;){for(var i=n[0],s=0;s<e.length;s++)n[s]^=o.mul(e[s],i);for(var a=0;a<n.length&&0===n[a];)a++;n=n.slice(a);}return n},e.generateECPolynomial=function(t){for(var n=r.from([1]),i=0;i<t;i++)n=e.mul(n,[1,o.exp(i)]);return n};},function(t,e,n){var r=n(10),o=r.alloc(512),i=r.alloc(256);!function(){for(var t=1,e=0;e<255;e++)o[e]=t,i[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)o[e]=o[e-255];}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return i[t]},e.exp=function(t){return o[t]},e.mul=function(t,e){return 0===t||0===e?0:o[i[t]+i[e]]};},function(t,e,n){var r=n(7),o=n(42),i=n(19),s=n(8),a=n(43),u=n(18),c=r.getBCHDigit(7973);function l(t,e){return s.getCharCountIndicator(t,e)+4}function h(t,e){var n=0;return t.forEach((function(t){var r=l(t.mode,e);n+=r+t.getBitsLength();})),n}e.from=function(t,e){return a.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!a.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=s.BYTE);var i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===s.MIXED)return i;var u=i-l(n,t);switch(n){case s.NUMERIC:return Math.floor(u/10*3);case s.ALPHANUMERIC:return Math.floor(u/11*2);case s.KANJI:return Math.floor(u/13);case s.BYTE:default:return Math.floor(u/8)}},e.getBestVersionForData=function(t,n){var r,o=i.from(n,i.M);if(u(t)){if(t.length>1)return function(t,n){for(var r=1;r<=40;r++){if(h(t,r)<=e.getCapacity(r,n,s.MIXED))return r}}(t,o);if(0===t.length)return 1;r=t[0];}else r=t;return function(t,n,r){for(var o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!a.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;r.getBCHDigit(e)-c>=0;)e^=7973<<r.getBCHDigit(e)-c;return t<<12|e};},function(t,e,n){var r=n(7),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){for(var n=t.bit<<3|e,i=n<<10;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)};},function(t,e,n){var r=n(8),o=n(79),i=n(80),s=n(81),a=n(82),u=n(44),c=n(7),l=n(83);function h(t){return unescape(encodeURIComponent(t)).length}function f(t,e,n){for(var r,o=[];null!==(r=t.exec(n));)o.push({data:r[0],index:r.index,mode:e,length:r[0].length});return o}function d(t){var e,n,o=f(u.NUMERIC,r.NUMERIC,t),i=f(u.ALPHANUMERIC,r.ALPHANUMERIC,t);return c.isKanjiModeEnabled()?(e=f(u.BYTE,r.BYTE,t),n=f(u.KANJI,r.KANJI,t)):(e=f(u.BYTE_KANJI,r.BYTE,t),n=[]),o.concat(i,e,n).sort((function(t,e){return t.index-e.index})).map((function(t){return {data:t.data,mode:t.mode,length:t.length}}))}function p(t,e){switch(e){case r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return a.getBitsLength(t);case r.BYTE:return s.getBitsLength(t)}}function g(t,e){var n,u=r.getBestModeForData(t);if((n=r.from(e,u))!==r.BYTE&&n.bit<u.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(u));switch(n!==r.KANJI||c.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(t);case r.ALPHANUMERIC:return new i(t);case r.KANJI:return new a(t);case r.BYTE:return new s(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return "string"==typeof e?t.push(g(e,null)):e.data&&t.push(g(e.data,e.mode)),t}),[])},e.fromString=function(t,n){for(var o=function(t,e){for(var n={},o={start:{}},i=["start"],s=0;s<t.length;s++){for(var a=t[s],u=[],c=0;c<a.length;c++){var l=a[c],h=""+s+c;u.push(h),n[h]={node:l,lastCount:0},o[h]={};for(var f=0;f<i.length;f++){var d=i[f];n[d]&&n[d].node.mode===l.mode?(o[d][h]=p(n[d].lastCount+l.length,l.mode)-p(n[d].lastCount,l.mode),n[d].lastCount+=l.length):(n[d]&&(n[d].lastCount=l.length),o[d][h]=p(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,e));}}i=u;}for(f=0;f<i.length;f++)o[i[f]].end=0;return {map:o,table:n}}(function(t){for(var e=[],n=0;n<t.length;n++){var o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:h(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:h(o.data)}]);}}return e}(d(t,c.isKanjiModeEnabled())),n),i=l.find_path(o.map,"start","end"),s=[],a=1;a<i.length-1;a++)s.push(o.table[i[a]].node);return e.fromArray(function(t){return t.reduce((function(t,e){var n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(s))},e.rawSplit=function(t){return e.fromArray(d(t,c.isKanjiModeEnabled()))};},function(t,e,n){var r=n(8);function o(t){this.mode=r.NUMERIC,this.data=t.toString();}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);var o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1));},t.exports=o;},function(t,e,n){var r=n(8),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=r.ALPHANUMERIC,this.data=t;}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11);}this.data.length%2&&t.put(o.indexOf(this.data[e]),6);},t.exports=i;},function(t,e,n){var r=n(10),o=n(8);function i(t){this.mode=o.BYTE,this.data=r.from(t);}i.getBitsLength=function(t){return 8*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){for(var e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8);},t.exports=i;},function(t,e,n){var r=n(8),o=n(7);function i(t){this.mode=r.KANJI,this.data=t;}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else {if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472;}n=192*(n>>>8&255)+(255&n),t.put(n,13);}},t.exports=i;},function(t,e,n){var r={single_source_shortest_paths:function(t,e,n){var o={},i={};i[e]=0;var s,a,u,c,l,h,f,d=r.PriorityQueue.make();for(d.push(e,0);!d.empty();)for(u in a=(s=d.pop()).value,c=s.cost,l=t[a]||{})l.hasOwnProperty(u)&&(h=c+l[u],f=i[u],(void 0===i[u]||f>h)&&(i[u]=h,d.push(u,h),o[u]=a));if(void 0!==n&&void 0===i[n]){var p=["Could not find a path from ",e," to ",n,"."].join("");throw new Error(p)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,e,n){var o=r.single_source_shortest_paths(t,e,n);return r.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(t){var e,n=r.PriorityQueue,o={};for(e in t=t||{},n)n.hasOwnProperty(e)&&(o[e]=n[e]);return o.queue=[],o.sorter=t.sorter||n.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter);},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=r;},function(t,e,n){var r=n(45);e.render=function(t,e,n){var o=n,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);var s=r.getImageWidth(t.modules.size,o),a=i.getContext("2d"),u=a.createImageData(s,s);return r.qrToImageData(u.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px";}(a,i,s),a.putImageData(u,0,0),i},e.renderToDataURL=function(t,n,r){var o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});var i=e.render(t,n,o),s=o.type||"image/png",a=o.rendererOpts||{};return i.toDataURL(s,a.quality)};},function(t,e,n){var r=n(45);function o(t,e){var n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){var r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){var s=r.getOptions(e),a=t.modules.size,u=t.modules.data,c=a+2*s.margin,l=s.color.light.a?"<path "+o(s.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",h="<path "+o(s.color.dark,"stroke")+' d="'+function(t,e,n){for(var r="",o=0,s=!1,a=0,u=0;u<t.length;u++){var c=Math.floor(u%e),l=Math.floor(u/e);c||s||(s=!0),t[u]?(a++,u>0&&c>0&&t[u-1]||(r+=s?i("M",c+n,.5+l+n):i("m",o,0),o=0,s=!1),c+1<e&&t[u+1]||(r+=i("h",a),a=0)):o++;}return r}(u,a,s.margin)+'"/>',f='viewBox="0 0 '+c+" "+c+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+f+' shape-rendering="crispEdges">'+l+h+"</svg>\n";return "function"==typeof n&&n(null,d),d};},function(t,e,n){var r=n(87),o={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(t,e){var n,i,s,a,u,c,l=!1;e||(e={}),n=e.debug||!1;try{if(s=r(),a=document.createRange(),u=document.getSelection(),(c=document.createElement("span")).textContent=t,c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),e.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[e.format]||o.default;window.clipboardData.setData(i,t);}else r.clipboardData.clearData(),r.clipboardData.setData(e.format,t);e.onCopy&&(r.preventDefault(),e.onCopy(r.clipboardData));})),document.body.appendChild(c),a.selectNodeContents(c),u.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0;}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0;}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),i=function(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}("message"in e?e.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,t);}}finally{u&&("function"==typeof u.removeRange?u.removeRange(a):u.removeAllRanges()),c&&document.body.removeChild(c),s();}return l};},function(t,e){t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r<t.rangeCount;r++)n.push(t.getRangeAt(r));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||n.forEach((function(e){t.addRange(e);})),e&&e.focus();}};},function(t,e,n){n.r(e),n.d(e,"WalletConnectClient",(function(){return _})),n.d(e,"QRCodeModal",(function(){return y.a}));var r={};n.r(r),n.d(r,"generateKey",(function(){return d})),n.d(r,"verifyHmac",(function(){return p})),n.d(r,"encrypt",(function(){return g})),n.d(r,"decrypt",(function(){return m}));var o=n(1),i=n(50);var s=class{constructor(){this._eventEmitters=[];}subscribe(t){this._eventEmitters.push(t);}unsubscribe(t){this._eventEmitters=this._eventEmitters.filter(e=>e.event!==t);}trigger(t){let e,n=[];e=Object(o.o)(t)?t.method:Object(o.q)(t)||Object(o.p)(t)?"response:"+t.id:Object(o.n)(t)?t.event:"",e&&(n=this._eventEmitters.filter(t=>t.event===e)),n&&n.length||Object(o.s)(e)||Object(o.n)(e)||(n=this._eventEmitters.filter(t=>"call_request"===t.event)),n.forEach(e=>{if(Object(o.p)(t)){const n=new Error(t.error.message);e.callback(n,null);}else e.callback(null,t);});}};var a=class{constructor(t="walletconnect"){this.storageId=t;}getSession(){let t=null;const e=Object(o.j)(this.storageId);return e&&Object(o.u)(e)&&(t=e),t}setSession(t){return Object(o.B)(this.storageId,t),t}removeSession(){Object(o.A)(this.storageId);}};const u="abcdefghijklmnopqrstuvwxyz0123456789".split("").map(t=>`https://${t}.bridge.walletconnect.org`);function c(){return u[Math.floor(Math.random()*u.length)]}var l=class{constructor(t){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new s,this._clientMeta=Object(o.i)()||t.connectorOpts.clientMeta||null,this._cryptoLib=t.cryptoLib,this._sessionStorage=t.sessionStorage||new a(t.connectorOpts.storageId),this._qrcodeModal=t.connectorOpts.qrcodeModal,this._qrcodeModalOptions=t.connectorOpts.qrcodeModalOptions,this._signingMethods=[...o.C,...t.connectorOpts.signingMethods||[]],!t.connectorOpts.bridge&&!t.connectorOpts.uri&&!t.connectorOpts.session)throw new Error("Missing one of the required parameters: bridge / uri / session");var e;t.connectorOpts.bridge&&(this.bridge=function(t){return "walletconnect.org"===function(t){return function(t){let e=t.indexOf("//")>-1?t.split("/")[2]:t.split("/")[0];return e=e.split(":")[0],e=e.split("?")[0],e}(t).split(".").slice(-2).join(".")}(t)}(e=t.connectorOpts.bridge)?c():e),t.connectorOpts.uri&&(this.uri=t.connectorOpts.uri);const n=t.connectorOpts.session||this._getStorageSession();n&&(this.session=n),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=t.transport||new i.a({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),t.connectorOpts.uri&&this._subscribeToSessionRequest(),t.pushServerOpts&&this._registerPushServer(t.pushServerOpts);}set bridge(t){t&&(this._bridge=t);}get bridge(){return this._bridge}set key(t){if(!t)return;const e=Object(o.e)(t);this._key=e;}get key(){if(this._key){return Object(o.c)(this._key,!0)}return ""}set clientId(t){t&&(this._clientId=t);}get clientId(){let t=this._clientId;return t||(t=this._clientId=Object(o.D)()),this._clientId}set peerId(t){t&&(this._peerId=t);}get peerId(){return this._peerId}set clientMeta(t){}get clientMeta(){let t=this._clientMeta;return t||(t=this._clientMeta=Object(o.i)()),t}set peerMeta(t){this._peerMeta=t;}get peerMeta(){return this._peerMeta}set handshakeTopic(t){t&&(this._handshakeTopic=t);}get handshakeTopic(){return this._handshakeTopic}set handshakeId(t){t&&(this._handshakeId=t);}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(t){if(!t)return;const{handshakeTopic:e,bridge:n,key:r}=this._parseUri(t);this.handshakeTopic=e,this.bridge=n,this.key=r;}set chainId(t){this._chainId=t;}get chainId(){return this._chainId}set networkId(t){this._networkId=t;}get networkId(){return this._networkId}set accounts(t){this._accounts=t;}get accounts(){return this._accounts}set rpcUrl(t){this._rpcUrl=t;}get rpcUrl(){return this._rpcUrl}set connected(t){}get connected(){return this._connected}set pending(t){}get pending(){return !!this._handshakeTopic}get session(){return {connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(t){t&&(this._connected=t.connected,this.accounts=t.accounts,this.chainId=t.chainId,this.bridge=t.bridge,this.key=t.key,this.clientId=t.clientId,this.clientMeta=t.clientMeta,this.peerId=t.peerId,this.peerMeta=t.peerMeta,this.handshakeId=t.handshakeId,this.handshakeTopic=t.handshakeTopic);}on(t,e){const n={event:t,callback:e};this._eventManager.subscribe(n);}off(t){this._eventManager.unsubscribe(t);}async createInstantRequest(t){this._key=await this._generateKey();const e=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(t)}]});this.handshakeId=e.id,this.handshakeTopic=Object(o.D)(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",()=>{throw new Error("User close QRCode Modal")});const n=()=>{this.killSession();};try{const t=await this._sendCallRequest(e);return t&&n(),t}catch(t){throw n(),t}}async connect(t){if(!this._qrcodeModal)throw new Error("QRCode Modal not provided");return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(t),new Promise(async(t,e)=>{this.on("modal_closed",()=>e(new Error("User close QRCode Modal"))),this.on("connect",(n,r)=>{if(n)return e(n);t(r.params[0]);});}))}async createSession(t){if(this._connected)throw new Error("Session currently connected");if(this.pending)return;this._key=await this._generateKey();const e=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:t&&t.chainId?t.chainId:null}]});this.handshakeId=e.id,this.handshakeTopic=Object(o.D)(),this._sendSessionRequest(e,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]});}approveSession(t){if(this._connected)throw new Error("Session currently connected");this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";const e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},n={id:this.handshakeId,jsonrpc:"2.0",result:e};this._sendResponse(n),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]});}rejectSession(t){if(this._connected)throw new Error("Session currently connected");const e=t&&t.message?t.message:"Session Rejected",n=this._formatResponse({id:this.handshakeId,error:{message:e}});this._sendResponse(n),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession();}updateSession(t){if(!this._connected)throw new Error("Session currently disconnected");this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";const e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},n=this._formatRequest({method:"wc_sessionUpdate",params:[e]});this._sendSessionRequest(n,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession();}async killSession(t){const e=t?t.message:"Session Disconnected",n=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]});await this._sendRequest(n),this._handleSessionDisconnect(e);}async sendTransaction(t){if(!this._connected)throw new Error("Session currently disconnected");const e=Object(o.x)(t),n=this._formatRequest({method:"eth_sendTransaction",params:[e]});return await this._sendCallRequest(n)}async signTransaction(t){if(!this._connected)throw new Error("Session currently disconnected");const e=Object(o.x)(t),n=this._formatRequest({method:"eth_signTransaction",params:[e]});return await this._sendCallRequest(n)}async signMessage(t){if(!this._connected)throw new Error("Session currently disconnected");const e=this._formatRequest({method:"eth_sign",params:t});return await this._sendCallRequest(e)}async signPersonalMessage(t){if(!this._connected)throw new Error("Session currently disconnected");t=Object(o.w)(t);const e=this._formatRequest({method:"personal_sign",params:t});return await this._sendCallRequest(e)}async signTypedData(t){if(!this._connected)throw new Error("Session currently disconnected");const e=this._formatRequest({method:"eth_signTypedData",params:t});return await this._sendCallRequest(e)}async updateChain(t){if(!this._connected)throw new Error("Session currently disconnected");const e=this._formatRequest({method:"wallet_updateChain",params:[t]});return await this._sendCallRequest(e)}unsafeSend(t,e){return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),new Promise((e,n)=>{this._subscribeToResponse(t.id,(t,r)=>{if(t)n(t);else {if(!r)throw new Error("Missing JSON RPC response");e(r);}});})}async sendCustomRequest(t,e){if(!this._connected)throw new Error("Session currently disconnected");switch(t.method){case"eth_accounts":return this.accounts;case"eth_chainId":return Object(o.f)(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":t.params&&(t.params[0]=Object(o.x)(t.params[0]));break;case"personal_sign":t.params&&(t.params=Object(o.w)(t.params));}const n=this._formatRequest(t);return await this._sendCallRequest(n,e)}approveRequest(t){if(!Object(o.q)(t))throw new Error('JSON-RPC success response must include "result" field');{const e=this._formatResponse(t);this._sendResponse(e);}}rejectRequest(t){if(!Object(o.p)(t))throw new Error('JSON-RPC error response must include "error" field');{const e=this._formatResponse(t);this._sendResponse(e);}}transportClose(){this._transport.close();}async _sendRequest(t,e){const n=this._formatRequest(t),r=await this._encrypt(n),i=void 0!==(null==e?void 0:e.topic)?e.topic:this.peerId,s=JSON.stringify(r),a=void 0!==(null==e?void 0:e.forcePushNotification)?!e.forcePushNotification:Object(o.t)(n);this._transport.send(s,i,a);}async _sendResponse(t){const e=await this._encrypt(t),n=this.peerId,r=JSON.stringify(e);this._transport.send(r,n,!0);}async _sendSessionRequest(t,e,n){this._sendRequest(t,n),this._subscribeToSessionResponse(t.id,e);}_sendCallRequest(t,e){return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),this._subscribeToCallResponse(t.id)}_formatRequest(t){if(void 0===t.method)throw new Error('JSON RPC request must have valid "method" value');return {id:void 0===t.id?Object(o.z)():t.id,jsonrpc:"2.0",method:t.method,params:void 0===t.params?[]:t.params}}_formatResponse(t){if(void 0===t.id)throw new Error('JSON RPC request must have valid "id" value');const e={id:t.id,jsonrpc:"2.0"};if(Object(o.p)(t)){const n=Object(o.h)(t.error);return Object.assign(Object.assign(Object.assign({},e),t),{error:n})}if(Object(o.q)(t)){return Object.assign(Object.assign({},e),t)}throw new Error("JSON RPC response format is invalid")}_handleSessionDisconnect(t){const e=t||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Object(o.A)(o.v)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession(),this.transportClose();}_handleSessionResponse(t,e){e&&e.approved?(this._connected?(e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),e.peerId&&!this.peerId&&(this.peerId=e.peerId),e.peerMeta&&!this.peerMeta&&(this.peerMeta=e.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(t);}async _handleIncomingMessages(t){if(![this.clientId,this.handshakeTopic].includes(t.topic))return;let e;try{e=JSON.parse(t.payload);}catch(t){return}const n=await this._decrypt(e);n&&this._eventManager.trigger(n);}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic);}_subscribeToResponse(t,e){this.on("response:"+t,e);}_subscribeToSessionResponse(t,e){this._subscribeToResponse(t,(t,n)=>{t?this._handleSessionResponse(t.message):n.result?this._handleSessionResponse(e,n.result):n.error&&n.error.message?this._handleSessionResponse(n.error.message):this._handleSessionResponse(e);});}_subscribeToCallResponse(t){return new Promise((e,n)=>{this._subscribeToResponse(t,(t,r)=>{t?n(t):r.result?e(r.result):r.error&&r.error.message?n(new Error(r.error.message)):n(new Error("JSON RPC response format is invalid"));});})}_subscribeToInternalEvents(){this.on("display_uri",()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,()=>{this._eventManager.trigger({event:"modal_closed",params:[]});},this._qrcodeModalOptions);}),this.on("connect",()=>{this._qrcodeModal&&this._qrcodeModal.close();}),this.on("call_request_sent",(t,e)=>{const{request:n}=e.params[0];if(Object(o.r)()&&this._signingMethods.includes(n.method)){const t=Object(o.j)(o.v);t&&(window.location.href=t.href);}}),this.on("wc_sessionRequest",(t,e)=>{t&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:t.toString()}]}),this.handshakeId=e.id,this.peerId=e.params[0].peerId,this.peerMeta=e.params[0].peerMeta;const n=Object.assign(Object.assign({},e),{method:"session_request"});this._eventManager.trigger(n);}),this.on("wc_sessionUpdate",(t,e)=>{t&&this._handleSessionResponse(t.message),this._handleSessionResponse("Session disconnected",e.params[0]);});}_initTransport(){this._transport.on("message",t=>this._handleIncomingMessages(t)),this._transport.on("open",()=>this._eventManager.trigger({event:"transport_open",params:[]})),this._transport.on("close",()=>this._eventManager.trigger({event:"transport_close",params:[]})),this._transport.on("error",()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})),this._transport.open();}_formatUri(){return `${this.protocol}:${this.handshakeTopic}@${this.version}?bridge=${encodeURIComponent(this.bridge)}&key=${this.key}`}_parseUri(t){const e=Object(o.y)(t);if(e.protocol===this.protocol){if(!e.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const t=e.handshakeTopic;if(!e.bridge)throw Error("Invalid or missing bridge url parameter value");const n=decodeURIComponent(e.bridge);if(!e.key)throw Error("Invalid or missing key parameter value");return {handshakeTopic:t,bridge:n,key:e.key}}throw new Error("URI format is invalid")}async _generateKey(){if(this._cryptoLib){return await this._cryptoLib.generateKey()}return null}async _encrypt(t){const e=this._key;if(this._cryptoLib&&e){return await this._cryptoLib.encrypt(t,e)}return null}async _decrypt(t){const e=this._key;if(this._cryptoLib&&e){return await this._cryptoLib.decrypt(t,e)}return null}_getStorageSession(){let t=null;return this._sessionStorage&&(t=this._sessionStorage.getSession()),t}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session);}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession();}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession();}_registerPushServer(t){if(!t.url||"string"!=typeof t.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!t.type||"string"!=typeof t.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!t.token||"string"!=typeof t.token)throw Error("Invalid or missing pushServerOpts.token parameter value");const e={bridge:this.bridge,topic:this.clientId,type:t.type,token:t.token,peerName:"",language:t.language||""};this.on("connect",async(n,r)=>{if(n)throw n;if(t.peerMeta){const t=r.params[0].peerMeta.name;e.peerName=t;}try{const n=await fetch(t.url+"/new",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)});if(!(await n.json()).success)throw Error("Failed to register in Push Server")}catch(n){throw Error("Failed to register in Push Server")}});}},h=n(11),f=n(0);async function d(t){const e=(t||256)/8,n=h.randomBytes(e);return Object(o.d)(f.arrayToBuffer(n))}async function p(t,e){const n=f.hexToArray(t.data),r=f.hexToArray(t.iv),o=f.hexToArray(t.hmac),i=f.arrayToHex(o,!1),s=f.concatArrays(n,r),a=await h.hmacSha256Sign(e,s),u=f.arrayToHex(a,!1);return f.removeHexPrefix(i)===f.removeHexPrefix(u)}async function g(t,e,n){const r=f.bufferToArray(Object(o.b)(e)),i=n||await d(128),s=f.bufferToArray(Object(o.b)(i)),a=f.arrayToHex(s,!1),u=JSON.stringify(t),c=f.utf8ToArray(u),l=await h.aesCbcEncrypt(s,r,c),p=f.arrayToHex(l,!1),g=f.concatArrays(l,s),m=await h.hmacSha256Sign(r,g);return {data:p,hmac:f.arrayToHex(m,!1),iv:a}}async function m(t,e){const n=f.bufferToArray(Object(o.b)(e));if(!n)throw new Error("Missing key: required for decryption");if(!await p(t,n))return null;const r=f.hexToArray(t.data),i=f.hexToArray(t.iv),s=await h.aesCbcDecrypt(i,n,r),a=f.arrayToUtf8(s);let u;try{u=JSON.parse(a);}catch(t){return null}return u}var _=class extends l{constructor(t,e){super({cryptoLib:r,connectorOpts:t,pushServerOpts:e});}},v=n(41),y=n.n(v);},function(t,e,n){n.r(e),n.d(e,"useState",(function(){return K})),n.d(e,"useReducer",(function(){return Q})),n.d(e,"useEffect",(function(){return Z})),n.d(e,"useLayoutEffect",(function(){return X})),n.d(e,"useRef",(function(){return G})),n.d(e,"useImperativeHandle",(function(){return tt})),n.d(e,"useMemo",(function(){return et})),n.d(e,"useCallback",(function(){return nt})),n.d(e,"useContext",(function(){return rt})),n.d(e,"useDebugValue",(function(){return ot})),n.d(e,"useErrorBoundary",(function(){return it})),n.d(e,"createElement",(function(){return g})),n.d(e,"createContext",(function(){return j})),n.d(e,"createRef",(function(){return _})),n.d(e,"Fragment",(function(){return v})),n.d(e,"Component",(function(){return y})),n.d(e,"version",(function(){return Ut})),n.d(e,"Children",(function(){return vt})),n.d(e,"render",(function(){return It})),n.d(e,"hydrate",(function(){return Ot})),n.d(e,"unmountComponentAtNode",(function(){return zt})),n.d(e,"createPortal",(function(){return At})),n.d(e,"createFactory",(function(){return jt})),n.d(e,"cloneElement",(function(){return Dt})),n.d(e,"isValidElement",(function(){return qt})),n.d(e,"findDOMNode",(function(){return Wt})),n.d(e,"PureComponent",(function(){return dt})),n.d(e,"memo",(function(){return pt})),n.d(e,"forwardRef",(function(){return mt})),n.d(e,"unstable_batchedUpdates",(function(){return Ft})),n.d(e,"Suspense",(function(){return bt})),n.d(e,"SuspenseList",(function(){return Et})),n.d(e,"lazy",(function(){return xt}));var r,o,i,s,a,u,c,l={},h=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function d(t,e){for(var n in e)t[n]=e[n];return t}function p(t){var e=t.parentNode;e&&e.removeChild(t);}function g(t,e,n){var r,o=arguments,i={};for(r in e)"key"!==r&&"ref"!==r&&(i[r]=e[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(o[r]);if(null!=n&&(i.children=n),"function"==typeof t&&null!=t.defaultProps)for(r in t.defaultProps)void 0===i[r]&&(i[r]=t.defaultProps[r]);return m(t,i,e&&e.key,e&&e.ref,null)}function m(t,e,n,o,i){var s={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(s.__v=s),r.vnode&&r.vnode(s),s}function _(){return {}}function v(t){return t.children}function y(t,e){this.props=t,this.context=e;}function w(t,e){if(null==e)return t.__?w(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return "function"==typeof t.type?w(t):null}function b(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return b(t)}}function M(t){(!t.__d&&(t.__d=!0)&&o.push(t)&&!i++||a!==r.debounceRendering)&&((a=r.debounceRendering)||s)(x);}function x(){for(var t;i=o.length;)t=o.sort((function(t,e){return t.__v.__b-e.__v.__b})),o=[],t.some((function(t){var e,n,r,o,i,s,a;t.__d&&(s=(i=(e=t).__v).__e,(a=e.__P)&&(n=[],(r=d({},i)).__v=r,o=T(a,i,r,e.__n,void 0!==a.ownerSVGElement,null,n,null==s?w(i):s),R(n,i),o!=s&&b(i)));}));}function E(t,e,n,r,o,i,s,a,u){var c,f,d,g,m,_,v,y=n&&n.__k||h,b=y.length;if(a==l&&(a=null!=i?i[0]:b?w(n,0):null),c=0,e.__k=k(e.__k,(function(n){if(null!=n){if(n.__=e,n.__b=e.__b+1,null===(d=y[c])||d&&n.key==d.key&&n.type===d.type)y[c]=void 0;else for(f=0;f<b;f++){if((d=y[f])&&n.key==d.key&&n.type===d.type){y[f]=void 0;break}d=null;}if(g=T(t,n,d=d||l,r,o,i,s,a,u),(f=n.ref)&&d.ref!=f&&(v||(v=[]),d.ref&&v.push(d.ref,null,n),v.push(f,n.__c||g,n)),null!=g){var h;if(null==_&&(_=g),void 0!==n.__d)h=n.__d,n.__d=void 0;else if(i==d||g!=a||null==g.parentNode){t:if(null==a||a.parentNode!==t)t.appendChild(g),h=null;else {for(m=a,f=0;(m=m.nextSibling)&&f<b;f+=2)if(m==g)break t;t.insertBefore(g,a),h=a;}"option"==e.type&&(t.value="");}a=void 0!==h?h:g.nextSibling,"function"==typeof e.type&&(e.__d=a);}else a&&d.__e==a&&a.parentNode!=t&&(a=w(d));}return c++,n})),e.__e=_,null!=i&&"function"!=typeof e.type)for(c=i.length;c--;)null!=i[c]&&p(i[c]);for(c=b;c--;)null!=y[c]&&B(y[c],y[c]);if(v)for(c=0;c<v.length;c++)O(v[c],v[++c],v[++c]);}function k(t,e,n){if(null==n&&(n=[]),null==t||"boolean"==typeof t)e&&n.push(e(null));else if(Array.isArray(t))for(var r=0;r<t.length;r++)k(t[r],e,n);else n.push(e?e("string"==typeof t||"number"==typeof t?m(null,t,null,null,t):null!=t.__e||null!=t.__c?m(t.type,t.props,t.key,null,t.__v):t):t);return n}function S(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]="number"==typeof n&&!1===f.test(e)?n+"px":null==n?"":n;}function C(t,e,n,r,o){var i,s,a,u,c;if(o?"className"===e&&(e="class"):"class"===e&&(e="className"),"style"===e)if(i=t.style,"string"==typeof n)i.cssText=n;else {if("string"==typeof r&&(i.cssText="",r=null),r)for(u in r)n&&u in n||S(i,u,"");if(n)for(c in n)r&&n[c]===r[c]||S(i,c,n[c]);}else "o"===e[0]&&"n"===e[1]?(s=e!==(e=e.replace(/Capture$/,"")),a=e.toLowerCase(),e=(a in t?a:e).slice(2),n?(r||t.addEventListener(e,A,s),(t.l||(t.l={}))[e]=n):t.removeEventListener(e,A,s)):"list"!==e&&"tagName"!==e&&"form"!==e&&"type"!==e&&"size"!==e&&!o&&e in t?t[e]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==e&&(e!==(e=e.replace(/^xlink:?/,""))?null==n||!1===n?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(e)?t.removeAttribute(e):t.setAttribute(e,n));}function A(t){this.l[t.type](r.event?r.event(t):t);}function T(t,e,n,o,i,s,a,u,c){var l,h,f,p,g,m,_,w,b,M,x=e.type;if(void 0!==e.constructor)return null;(l=r.__b)&&l(e);try{t:if("function"==typeof x){if(w=e.props,b=(l=x.contextType)&&o[l.__c],M=l?b?b.props.value:l.__:o,n.__c?_=(h=e.__c=n.__c).__=h.__E:("prototype"in x&&x.prototype.render?e.__c=h=new x(w,M):(e.__c=h=new y(w,M),h.constructor=x,h.render=P),b&&b.sub(h),h.props=w,h.state||(h.state={}),h.context=M,h.__n=o,f=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=x.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,x.getDerivedStateFromProps(w,h.__s))),p=h.props,g=h.state,f)null==x.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==x.getDerivedStateFromProps&&w!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(w,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(w,h.__s,M)||e.__v===n.__v&&!h.__){for(h.props=w,h.state=h.__s,e.__v!==n.__v&&(h.__d=!1),h.__v=e,e.__e=n.__e,e.__k=n.__k,h.__h.length&&a.push(h),l=0;l<e.__k.length;l++)e.__k[l]&&(e.__k[l].__=e);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(w,h.__s,M),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(p,g,m);}));}h.context=M,h.props=w,h.state=h.__s,(l=r.__r)&&l(e),h.__d=!1,h.__v=e,h.__P=t,l=h.render(h.props,h.state,h.context),e.__k=null!=l&&l.type==v&&null==l.key?l.props.children:Array.isArray(l)?l:[l],null!=h.getChildContext&&(o=d(d({},o),h.getChildContext())),f||null==h.getSnapshotBeforeUpdate||(m=h.getSnapshotBeforeUpdate(p,g)),E(t,e,n,o,i,s,a,u,c),h.base=e.__e,h.__h.length&&a.push(h),_&&(h.__E=h.__=null),h.__e=!1;}else null==s&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=I(n.__e,e,n,o,i,s,a,c);(l=r.diffed)&&l(e);}catch(t){e.__v=null,r.__e(t,e,n);}return e.__e}function R(t,e){r.__c&&r.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e);}));}catch(t){r.__e(t,e.__v);}}));}function I(t,e,n,r,o,i,s,a){var u,c,f,d,p,g=n.props,m=e.props;if(o="svg"===e.type||o,null!=i)for(u=0;u<i.length;u++)if(null!=(c=i[u])&&((null===e.type?3===c.nodeType:c.localName===e.type)||t==c)){t=c,i[u]=null;break}if(null==t){if(null===e.type)return document.createTextNode(m);t=o?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type,m.is&&{is:m.is}),i=null,a=!1;}if(null===e.type)g!==m&&t.data!=m&&(t.data=m);else {if(null!=i&&(i=h.slice.call(t.childNodes)),f=(g=n.props||l).dangerouslySetInnerHTML,d=m.dangerouslySetInnerHTML,!a){if(g===l)for(g={},p=0;p<t.attributes.length;p++)g[t.attributes[p].name]=t.attributes[p].value;(d||f)&&(d&&f&&d.__html==f.__html||(t.innerHTML=d&&d.__html||""));}((function(t,e,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in e||C(t,i,null,n[i],r);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===e[i]||C(t,i,e[i],n[i],r);}))(t,m,g,o,a),d?e.__k=[]:(e.__k=e.props.children,E(t,e,n,r,"foreignObject"!==e.type&&o,i,s,l,a)),a||("value"in m&&void 0!==(u=m.value)&&u!==t.value&&C(t,"value",u,g.value,!1),"checked"in m&&void 0!==(u=m.checked)&&u!==t.checked&&C(t,"checked",u,g.checked,!1));}return t}function O(t,e,n){try{"function"==typeof t?t(e):t.current=e;}catch(t){r.__e(t,n);}}function B(t,e,n){var o,i,s;if(r.unmount&&r.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||O(o,null,e)),n||"function"==typeof t.type||(n=null!=(i=t.__e)),t.__e=t.__d=void 0,null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount();}catch(t){r.__e(t,e);}o.base=o.__P=null;}if(o=t.__k)for(s=0;s<o.length;s++)o[s]&&B(o[s],e,n);null!=i&&p(i);}function P(t,e,n){return this.constructor(t,n)}function N(t,e,n){var o,i,s;r.__&&r.__(t,e),i=(o=n===u)?null:n&&n.__k||e.__k,t=g(v,null,[t]),s=[],T(e,(o?e:n||e).__k=t,i||l,l,void 0!==e.ownerSVGElement,n&&!o?[n]:i?null:h.slice.call(e.childNodes),s,n||l,o),R(s,t);}function L(t,e){N(t,e,u);}function U(t,e){var n,r;for(r in e=d(d({},t.props),e),arguments.length>2&&(e.children=h.slice.call(arguments,2)),n={},e)"key"!==r&&"ref"!==r&&(n[r]=e[r]);return m(t.type,n,e.key||t.key,e.ref||t.ref,null)}function j(t){var e={},n={__c:"__cC"+c++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var r,o=this;return this.getChildContext||(r=[],this.getChildContext=function(){return e[n.__c]=o,e},this.shouldComponentUpdate=function(t){o.props.value!==t.value&&r.some((function(e){e.context=t.value,M(e);}));},this.sub=function(t){r.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){r.splice(r.indexOf(t),1),e&&e.call(t);};}),t.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}r={__e:function(t,e){for(var n,r;e=e.__;)if((n=e.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(t))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(t)),r)return M(n.__E=n)}catch(e){t=e;}throw t}},y.prototype.setState=function(t,e){var n;n=this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof t&&(t=t(n,this.props)),t&&d(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),M(this));},y.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),M(this));},y.prototype.render=v,o=[],i=0,s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=l,c=0;var q,D,z,W=0,F=[],H=r.__r,Y=r.diffed,J=r.__c,$=r.unmount;function V(t,e){r.__h&&r.__h(D,t,W||e),W=0;var n=D.__H||(D.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function K(t){return W=1,Q(lt,t)}function Q(t,e,n){var r=V(q++,2);return r.__c||(r.__c=D,r.__=[n?n(e):lt(void 0,e),function(e){var n=t(r.__[0],e);r.__[0]!==n&&(r.__[0]=n,r.__c.setState({}));}]),r.__}function Z(t,e){var n=V(q++,3);!r.__s&&ct(n.__H,e)&&(n.__=t,n.__H=e,D.__H.__h.push(n));}function X(t,e){var n=V(q++,4);!r.__s&&ct(n.__H,e)&&(n.__=t,n.__H=e,D.__h.push(n));}function G(t){return W=5,et((function(){return {current:t}}),[])}function tt(t,e,n){W=6,X((function(){"function"==typeof t?t(e()):t&&(t.current=e());}),null==n?n:n.concat(t));}function et(t,e){var n=V(q++,7);return ct(n.__H,e)?(n.__H=e,n.__h=t,n.__=t()):n.__}function nt(t,e){return W=8,et((function(){return t}),e)}function rt(t){var e=D.context[t.__c],n=V(q++,9);return n.__c=t,e?(null==n.__&&(n.__=!0,e.sub(D)),e.props.value):t.__}function ot(t,e){r.useDebugValue&&r.useDebugValue(e?e(t):t);}function it(t){var e=V(q++,10),n=K();return e.__=t,D.componentDidCatch||(D.componentDidCatch=function(t){e.__&&e.__(t),n[1](t);}),[n[0],function(){n[1](void 0);}]}function st(){F.some((function(t){if(t.__P)try{t.__H.__h.forEach(at),t.__H.__h.forEach(ut),t.__H.__h=[];}catch(e){return t.__H.__h=[],r.__e(e,t.__v),!0}})),F=[];}function at(t){t.t&&t.t();}function ut(t){var e=t.__();"function"==typeof e&&(t.t=e);}function ct(t,e){return !t||e.some((function(e,n){return e!==t[n]}))}function lt(t,e){return "function"==typeof e?e(t):e}function ht(t,e){for(var n in e)t[n]=e[n];return t}function ft(t,e){for(var n in t)if("__source"!==n&&!(n in e))return !0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return !0;return !1}r.__r=function(t){H&&H(t),q=0,(D=t.__c).__H&&(D.__H.__h.forEach(at),D.__H.__h.forEach(ut),D.__H.__h=[]);},r.diffed=function(t){Y&&Y(t);var e=t.__c;if(e){var n=e.__H;n&&n.__h.length&&(1!==F.push(e)&&z===r.requestAnimationFrame||((z=r.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(r),cancelAnimationFrame(e),setTimeout(t);},r=setTimeout(n,100);"undefined"!=typeof window&&(e=requestAnimationFrame(n));})(st));}},r.__c=function(t,e){e.some((function(t){try{t.__h.forEach(at),t.__h=t.__h.filter((function(t){return !t.__||ut(t)}));}catch(n){e.some((function(t){t.__h&&(t.__h=[]);})),e=[],r.__e(n,t.__v);}})),J&&J(t,e);},r.unmount=function(t){$&&$(t);var e=t.__c;if(e){var n=e.__H;if(n)try{n.__.forEach((function(t){return t.t&&t.t()}));}catch(t){r.__e(t,e.__v);}}};var dt=function(t){var e,n;function r(e){var n;return (n=t.call(this,e)||this).isPureReactComponent=!0,n}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.shouldComponentUpdate=function(t,e){return ft(this.props,t)||ft(this.state,e)},r}(y);function pt(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return !r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:ft(this.props,t)}function r(e){return this.shouldComponentUpdate=n,g(t,ht({},e))}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(t.displayName||t.name)+")",r.t=!0,r}var gt=r.__b;function mt(t){function e(e){var n=ht({},e);return delete n.ref,t(n,e.ref)}return e.prototype.isReactComponent=e.t=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}r.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),gt&>(t);};var _t=function(t,e){return t?k(t).reduce((function(t,n,r){return t.concat(e(n,r))}),[]):null},vt={map:_t,forEach:_t,count:function(t){return t?k(t).length:0},only:function(t){if(1!==(t=k(t)).length)throw new Error("Children.only() expects only one child.");return t[0]},toArray:k},yt=r.__e;function wt(t){return t&&((t=ht({},t)).__c=null,t.__k=t.__k&&t.__k.map(wt)),t}function bt(){this.__u=0,this.o=null,this.__b=null;}function Mt(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function xt(t){var e,n,r;function o(o){if(e||(e=t()).then((function(t){n=t.default||t;}),(function(t){r=t;})),r)throw r;if(!n)throw e;return g(n,o)}return o.displayName="Lazy",o.t=!0,o}function Et(){this.i=null,this.l=null;}r.__e=function(t,e,n){if(t.then)for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return r.__c(t,e.__c);yt(t,e,n);},(bt.prototype=new y).__c=function(t,e){var n=this;null==n.o&&(n.o=[]),n.o.push(e);var r=Mt(n.__v),o=!1,i=function(){o||(o=!0,r?r(s):s());};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){i(),e.__c&&e.__c();};var s=function(){var t;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});t=n.o.pop();)t.forceUpdate();};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),t.then(i,i);},bt.prototype.render=function(t,e){return this.__b&&(this.__v.__k[0]=wt(this.__b),this.__b=null),[g(y,null,e.u?null:t.children),e.u&&t.fallback]};var kt=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2];}};(Et.prototype=new y).u=function(t){var e=this,n=Mt(e.__v),r=e.l.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),kt(e,t,r)):o();};n?n(i):i();}},Et.prototype.render=function(t){this.i=null,this.l=new Map;var e=k(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Et.prototype.componentDidUpdate=Et.prototype.componentDidMount=function(){var t=this;t.l.forEach((function(e,n){kt(t,n,e);}));};var St=function(){function t(){}var e=t.prototype;return e.getChildContext=function(){return this.props.context},e.render=function(t){return t.children},t}();function Ct(t){var e=this,n=t.container,r=g(St,{context:e.context},t.vnode);return e.s&&e.s!==n&&(e.v.parentNode&&e.s.removeChild(e.v),B(e.h),e.p=!1),t.vnode?e.p?(n.__k=e.__k,N(r,n),e.__k=n.__k):(e.v=document.createTextNode(""),L("",n),n.appendChild(e.v),e.p=!0,e.s=n,N(r,n,e.v),e.__k=e.v.__k):e.p&&(e.v.parentNode&&e.s.removeChild(e.v),B(e.h)),e.h=r,e.componentWillUnmount=function(){e.v.parentNode&&e.s.removeChild(e.v),B(e.h);},null}function At(t,e){return g(Ct,{vnode:t,container:e})}var Tt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;y.prototype.isReactComponent={};var Rt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function It(t,e,n){if(null==e.__k)for(;e.firstChild;)e.removeChild(e.firstChild);return N(t,e),"function"==typeof n&&n(),t?t.__c:null}function Ot(t,e,n){return L(t,e),"function"==typeof n&&n(),t?t.__c:null}var Bt=r.event;function Pt(t,e){t["UNSAFE_"+e]&&!t[e]&&Object.defineProperty(t,e,{configurable:!1,get:function(){return this["UNSAFE_"+e]},set:function(t){this["UNSAFE_"+e]=t;}});}r.event=function(t){Bt&&(t=Bt(t)),t.persist=function(){};var e=!1,n=!1,r=t.stopPropagation;t.stopPropagation=function(){r.call(t),e=!0;};var o=t.preventDefault;return t.preventDefault=function(){o.call(t),n=!0;},t.isPropagationStopped=function(){return e},t.isDefaultPrevented=function(){return n},t.nativeEvent=t};var Nt={configurable:!0,get:function(){return this.class}},Lt=r.vnode;r.vnode=function(t){t.$$typeof=Rt;var e=t.type,n=t.props;if(e){if(n.class!=n.className&&(Nt.enumerable="className"in n,null!=n.className&&(n.class=n.className),Object.defineProperty(n,"className",Nt)),"function"!=typeof e){var r,o,i;for(i in n.defaultValue&&void 0!==n.value&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),Array.isArray(n.value)&&n.multiple&&"select"===e&&(k(n.children).forEach((function(t){-1!=n.value.indexOf(t.props.value)&&(t.props.selected=!0);})),delete n.value),n)if(r=Tt.test(i))break;if(r)for(i in o=t.props={},n)o[Tt.test(i)?i.replace(/[A-Z0-9]/,"-$&").toLowerCase():i]=n[i];}!function(e){var n=t.type,r=t.props;if(r&&"string"==typeof n){var o={};for(var i in r)/^on(Ani|Tra|Tou)/.test(i)&&(r[i.toLowerCase()]=r[i],delete r[i]),o[i.toLowerCase()]=i;if(o.ondoubleclick&&(r.ondblclick=r[o.ondoubleclick],delete r[o.ondoubleclick]),o.onbeforeinput&&(r.onbeforeinput=r[o.onbeforeinput],delete r[o.onbeforeinput]),o.onchange&&("textarea"===n||"input"===n.toLowerCase()&&!/^fil|che|ra/i.test(r.type))){var s=o.oninput||"oninput";r[s]||(r[s]=r[o.onchange],delete r[o.onchange]);}}}(),"function"==typeof e&&!e.m&&e.prototype&&(Pt(e.prototype,"componentWillMount"),Pt(e.prototype,"componentWillReceiveProps"),Pt(e.prototype,"componentWillUpdate"),e.m=!0);}Lt&&Lt(t);};var Ut="16.8.0";function jt(t){return g.bind(null,t)}function qt(t){return !!t&&t.$$typeof===Rt}function Dt(t){return qt(t)?U.apply(null,arguments):t}function zt(t){return !!t.__k&&(N(null,t),!0)}function Wt(t){return t&&(t.base||1===t.nodeType&&t)||null}var Ft=function(t,e){return t(e)};e.default={useState:K,useReducer:Q,useEffect:Z,useLayoutEffect:X,useRef:G,useImperativeHandle:tt,useMemo:et,useCallback:nt,useContext:rt,useDebugValue:ot,version:"16.8.0",Children:vt,render:It,hydrate:It,unmountComponentAtNode:zt,createPortal:At,createElement:g,createContext:j,createFactory:jt,cloneElement:Dt,createRef:_,Fragment:v,isValidElement:qt,findDOMNode:Wt,Component:y,PureComponent:dt,memo:pt,forwardRef:mt,unstable_batchedUpdates:Ft,Suspense:bt,SuspenseList:Et,lazy:xt};}]);void 0===WalletConnect&&console.error("esm-webpack-plugin: nothing exported!");const _WalletConnect$WalletConnectClient=WalletConnect.WalletConnectClient,_WalletConnect$QRCodeModal=WalletConnect.QRCodeModal;
|
|
30664
|
+
|
|
30665
30665
|
var commonjsGlobal$2 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global$2 !== 'undefined' ? global$2 : typeof self !== 'undefined' ? self : {};
|
|
30666
30666
|
|
|
30667
30667
|
function createCommonjsModule$1$1(fn) {
|
|
@@ -49001,7 +49001,7 @@
|
|
|
49001
49001
|
|
|
49002
49002
|
async sign(message) {
|
|
49003
49003
|
let address = await this.account();
|
|
49004
|
-
var params = [
|
|
49004
|
+
var params = [toUtf8Bytes(message), address];
|
|
49005
49005
|
let signature = await this.connector.signPersonalMessage(params);
|
|
49006
49006
|
return signature
|
|
49007
49007
|
}
|