1/*! For license information please see main.82cb37b9.js.LICENSE.txt */ 2(()=>{var e={19:(e,t,n)=>{"use strict";n.d(t,{dI:()=>s.d,sH:()=>i.s,xW:()=>r.x});var r=n(9055),i=n(9477),s=n(4262)},79:e=>{"use strict";function t(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}e.exports=function(e,n,r){var i=r&&r.stringify||t;if("object"===typeof e&&null!==e){var s=n.length+1;if(1===s)return e;var o=new Array(s);o[0]=i(e);for(var a=1;a<s;a++)o[a]=i(n[a]);return o.join(" ")}if("string"!==typeof e)return e;var c=n.length;if(0===c)return e;for(var l="",u=0,d=-1,h=e&&e.length||0,p=0;p<h;){if(37===e.charCodeAt(p)&&p+1<h){switch(d=d>-1?d:0,e.charCodeAt(p+1)){case 100:case 102:if(u>=c)break;if(null==n[u])break;d<p&&(l+=e.slice(d,p)),l+=Number(n[u]),d=p+2,p++;break;case 105:if(u>=c)break;if(null==n[u])break;d<p&&(l+=e.slice(d,p)),l+=Math.floor(Number(n[u])),d=p+2,p++;break;case 79:case 111:case 106:if(u>=c)break;if(void 0===n[u])break;d<p&&(l+=e.slice(d,p));var f=typeof n[u];if("string"===f){l+="'"+n[u]+"'",d=p+2,p++;break}if("function"===f){l+=n[u].name||"<anonymous>",d=p+2,p++;break}l+=i(n[u]),d=p+2,p++;break;case 115:if(u>=c)break;d<p&&(l+=e.slice(d,p)),l+=String(n[u]),d=p+2,p++;break;case 37:d<p&&(l+=e.slice(d,p)),l+="%",d=p+2,p++,u--}++u}++p}if(-1===d)return e;d<h&&(l+=e.slice(d));return l}},111:function(e){e.exports=function(){"use strict";return function(e,t,n){n.updateLocale=function(e,t){var r=n.Ls[e];if(r)return(t?Object.keys(t):[]).forEach((function(e){r[e]=t[e]})),r}}}()},168:(e,t)=>{"use strict";function n(){return e=>e}Object.defineProperty(t,"__esModule",{value:!0}),t.RegExpString=t.IntNumber=t.BigIntString=t.AddressString=t.HexString=t.OpaqueType=void 0,t.OpaqueType=n,t.HexString=e=>e,t.AddressString=e=>e,t.BigIntString=e=>e,t.IntNumber=function(e){return Math.floor(e)},t.RegExpString=e=>e},173:(e,t,n)=>{"use strict";n.d(t,{w:()=>i});var r=n(4115);function i(e){return(0,r.M)({...e,state:!0,attribute:!1})}},184:(e,t,n)=>{var r=n(2022),i=n(9248);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},330:(e,t,n)=>{var r=n(6047).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"===typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,s=e.length,o=this._len,a=0;a<s;){for(var c=o%i,l=Math.min(s-a,i-c),u=0;u<l;u++)n[c+u]=e[a+u];a+=l,(o+=l)%i===0&&this._update(n)}return this._len+=s,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var s=this._hash();return e?s.toString(e):s},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},345:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2932);function i(){return r.chains}function s(e){const t=r.chains.find((t=>t.chainId===e));if("undefined"===typeof t)throw new Error(`No chain found matching chainId: ${e}`);return t}function o(e,t){let n;const r=i().filter((n=>n[e]===t));if(r&&r.length&&(n=r[0]),"undefined"===typeof n)throw new Error(`No chain found matching ${e}: ${t}`);return n}function a(e){return o("networkId",e)}t.getAllChains=i,t.getChain=s,t.getChainByChainId=function(e){return s(e)},t.getChainByKeyValue=o,t.getChainByNetworkId=a,t.convertNetworkIdToChainId=function(e){return a(e).chainId},t.convertChainIdToNetworkId=function(e){return s(e).networkId}},378:(e,t,n)=>{const r=n(1579);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),i=this.degree-n.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(n,i),e}return n},e.exports=i}
2,462:(e,t,n)=>{"use strict";var r=n(1208),i=n(6042),s=n(5070),o=n(3310),a=n(6566);t.J4=32,t.PX=12,t.iW=16;var c=new Uint8Array(16),l=function(){function e(e){if(this.nonceLength=t.PX,this.tagLength=t.iW,e.length!==t.J4)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,n,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var o=new Uint8Array(16);o.set(e,o.length-e.length);var a=new Uint8Array(32);r.stream(this._key,o,a,4);var c,l=t.length+this.tagLength;if(i){if(i.length!==l)throw new Error("ChaCha20Poly1305: incorrect destination length");c=i}else c=new Uint8Array(l);return r.streamXOR(this._key,o,t,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),a,c.subarray(0,c.length-this.tagLength),n),s.wipe(o),c},e.prototype.open=function(e,t,n,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length<this.tagLength)return null;var o=new Uint8Array(16);o.set(e,o.length-e.length);var c=new Uint8Array(32);r.stream(this._key,o,c,4);var l=new Uint8Array(this.tagLength);if(this._authenticate(l,c,t.subarray(0,t.length-this.tagLength),n),!a.equal(l,t.subarray(t.length-this.tagLength,t.length)))return null;var u,d=t.length-this.tagLength;if(i){if(i.length!==d)throw new Error("ChaCha20Poly1305: incorrect destination length");u=i}else u=new Uint8Array(d);return r.streamXOR(this._key,o,t.subarray(0,t.length-this.tagLength),u,4),s.wipe(o),u},e.prototype.clean=function(){return s.wipe(this._key),this},e.prototype._authenticate=function(e,t,n,r){var a=new i.Poly1305(t);r&&(a.update(r),r.length%16>0&&a.update(c.subarray(r.length%16))),a.update(n),n.length%16>0&&a.update(c.subarray(n.length%16));var l=new Uint8Array(8);r&&o.writeUint64LE(r.length,l),a.update(l),o.writeUint64LE(n.length,l),a.update(l);for(var u=a.digest(),d=0;d<u.length;d++)e[d]=u[d];a.clean(),s.wipe(u),s.wipe(l)},e}();t.g6=l},487:(e,t,n)=>{const r=n(6580),i=n(8415),s=n(4549),o=n(2890),a=n(1043),c=n(1726),l=n(6106),u=n(5956),d=n(378),h=n(4553),p=n(6695),f=n(794),m=n(1351);function g(e,t,n){const r=e.size,i=p.getEncodedBits(t,n);let s,o;for(s=0;s<15;s++)o=1===(i>>s&1),s<6?e.set(s,8,o,!0):s<8?e.set(s+1,8,o,!0):e.set(r-15+s,8,o,!0),s<8?e.set(8,r-s-1,o,!0):s<9?e.set(8,15-s-1+1,o,!0):e.set(8,15-s-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t,n){const i=new s;n.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(i)}));const o=8*(r.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const a=(o-i.getLengthInBits())/8;for(let r=0;r<a;r++)i.put(r%2?17:236,8);return function(e,t,n){const i=r.getSymbolTotalCodewords(t),s=u.getTotalCodewordsCount(t,n),o=i-s,a=u.getBlocksCount(t,n),c=i%a,l=a-c,h=Math.floor(i/a),p=Math.floor(o/a),f=p+1,m=h-p,g=new d(m);let y=0;const v=new Array(a),w=new Array(a);let b=0;const x=new Uint8Array(e.buffer);for(let r=0;r<a;r++){const e=r<l?p:f;v[r]=x.slice(y,y+e),w[r]=g.encode(v[r]),y+=e,b=Math.max(b,e)}const E=new Uint8Array(i);let _,k,C=0;for(_=0;_<b;_++)for(k=0;k<a;k++)_<v[k].length&&(E[C++]=v[k][_]);for(_=0;_<m;_++)for(k=0;k<a;k++)E[C++]=w[k][_];return E}(i,e,t)}function v(e,t,n,i){let s;if(Array.isArray(e))s=m.fromArray(e);else{if("string"!==typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=m.rawSplit(e);r=h.getBestVersionForData(t,n)}s=m.fromString(e,r||40)}}const u=h.getBestVersionForData(s,n);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else t=u;const d=y(t,n,s),p=r.getSymbolSize(t),f=new o(p);return function(e,t){const n=e.size,r=c.getPositions(t);for(let i=0;i<r.length;i++){const t=r[i][0],s=r[i][1];for(let r=-1;r<=7;r++)if(!(t+r<=-1||n<=t+r))for(let i=-1;i<=7;i++)s+i<=-1||n<=s+i||(r>=0&&r<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===r||6===r)||r>=2&&r<=4&&i>
2=2&&i<=4?e.set(t+r,s+i,!0,!0):e.set(t+r,s+i,!1,!0))}}(f,t),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2===0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(f),function(e,t){const n=a.getPositions(t);for(let r=0;r<n.length;r++){const t=n[r][0],i=n[r][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)-2===n||2===n||-2===r||2===r||0===n&&0===r?e.set(t+n,i+r,!0,!0):e.set(t+n,i+r,!1,!0)}}(f,t),g(f,n,0),t>=7&&function(e,t){const n=e.size,r=h.getEncodedBits(t);let i,s,o;for(let a=0;a<18;a++)i=Math.floor(a/3),s=a%3+n-8-3,o=1===(r>>a&1),e.set(i,s,o,!0),e.set(s,i,o,!0)}(f,t),function(e,t){const n=e.size;let r=-1,i=n-1,s=7,o=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,a-n)){let r=!1;o<t.length&&(r=1===(t[o]>>>s&1)),e.set(i,a-n,r),s--,-1===s&&(o++,s=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(f,d),isNaN(i)&&(i=l.getBestMask(f,g.bind(null,f,n))),l.applyMask(i,f),g(f,n,i),{modules:f,version:t,errorCorrectionLevel:n,maskPattern:i,segments:s}}t.create=function(e,t){if("undefined"===typeof e||""===e)throw new Error("No input text");let n,s,o=i.M;return"undefined"!==typeof t&&(o=i.from(t.errorCorrectionLevel,i.M),n=h.from(t.version),s=l.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),v(e,n,o,s)}},494:(e,t,n)=>{const r=n(7198);function i(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}function s(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function o(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function a(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function c(e){var t=typeof e;if("string"===t||"number"===t)return BigInt(e);if("bigint"===t)return e;throw new Error("Argument is not a number")}function l(e,t){var n,i,u,d;if("address"===e)return l("uint160",c(t));if("bool"===e)return l("uint8",t?1:0);if("string"===e)return l("bytes",new Buffer(t,"utf8"));if(function(e){return e.lastIndexOf("]")===e.length-1}(e)){if("undefined"===typeof t.length)throw new Error("Not an array?");if("dynamic"!==(n=a(e))&&0!==n&&t.length>n)throw new Error("Elements exceed array size: "+n);for(d in u=[],e=e.slice(0,e.lastIndexOf("[")),"string"===typeof t&&(t=JSON.parse(t)),t)u.push(l(e,t[d]));if("dynamic"===n){var h=l("uint256",t.length);u.unshift(h)}return Buffer.concat(u)}if("bytes"===e)return t=new Buffer(t),u=Buffer.concat([l("uint256",t.length),t]),t.length%32!==0&&(u=Buffer.concat([u,r.zeros(32-t.length%32)])),u;if(e.startsWith("bytes")){if((n=s(e))<1||n>32)throw new Error("Invalid bytes<N> width: "+n);return r.setLengthRight(t,32)}if(e.startsWith("uint")){if((n=s(e))%8||n<8||n>256)throw new Error("Invalid uint<N> width: "+n);i=c(t);const o=r.bitLengthFromBigInt(i);if(o>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+o);if(i<0)throw new Error("Supplied uint is negative");return r.bufferBEFromBigInt(i,32)}if(e.startsWith("int")){if((n=s(e))%8||n<8||n>256)throw new Error("Invalid int<N> width: "+n);i=c(t);const o=r.bitLengthFromBigInt(i);if(o>n)throw new Error("Supplied int exceeds width: "+n+" vs "+o);const a=r.twosFromBigInt(i,256);return r.bufferBEFromBigInt(a,32)}if(e.startsWith("ufixed")){if(n=o(e),(i=c(t))<0)throw new Error("Supplied ufixed is negative");return l("uint256",i*BigInt(2)**BigInt(n[1]))}if(e.startsWith("fixed"))return n=o(e),l("int256",c(t)*BigInt(2)**BigInt(n[1]));throw new Error("Unsupported or invalid type: "+e)}function u(e){return"string"===e||"bytes"===e||"dynamic"===a(e)}function d(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var n,o,a=[],l=0;l<e.length;l++){var u=i(e[l]),d=t[l];if("bytes"===u)a.push(d);else if("string"===u)a.push(new Buffer(d,"utf8"));else if("bool"===u)a.push(new Buffer(d?"01":"00","hex"));else if("address"===u)a.push(r.setLength(d,20));else if(u.startsWith("bytes")){if((n=s(u))<1||n>32)throw new Error("Invalid bytes<N> width: "+n);a.push(r.setLengthRight(d,n))}else if(u.startsWith("uint")){if((n=s(u))%8||n<8||n>256)throw new Error("Invalid uint<N> width: "+n);o=c(d);const e=r.bitLengthFromBigInt(o);if(e>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+e);a.push(r.bufferBEFromBigInt(o,n/8))}else{if(!u.startsWith("int"))throw new Error("Unsupported or invalid type: "+u);{if((n=s(u))%8||n<8||n>256)throw new Error("Invalid int<N> width: "+n);o=c(d);const e=r.bitLengthFromBigInt(o);if(e>n)throw new Error("Supplied int exceeds width: "+n+" vs "+e);const t=r.twosFromBigInt(o,n);a.push(r.bufferBEFromBigInt(t,n/8))}}}return Buffer.concat(a)}
vendor: 4,875 bytes, line 2
2e.exports={rawEncode:function(e,t){var n=[],r=[],s=32*e.length;for(var o in e){var a=i(e[o]),c=l(a,t[o]);u(a)?(n.push(l("uint256",s)),r.push(c),s+=c.length):n.push(c)}return Buffer.concat(n.concat(r))},solidityPack:d,soliditySHA3:function(e,t){return r.keccak(d(e,t))}}},554:(e,t,n)=>{"use strict";n.d(t,{A:()=>E,g:()=>x});var r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,s=Math.floor,o="[BigNumber Error] ",a=o+"Number primitive has more than 15 significant digits: ",c=1e14,l=14,u=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,p=1e9;function f(e){var t=0|e;return e>0||e===t?t:t-1}function m(e){for(var t,n,r=1,i=e.length,s=e[0]+"";r<i;){for(t=e[r++]+"",n=l-t.length;n--;t="0"+t);s+=t}for(i=s.length;48===s.charCodeAt(--i););return s.slice(0,i+1||1)}function g(e,t){var n,r,i=e.c,s=t.c,o=e.s,a=t.s,c=e.e,l=t.e;if(!o||!a)return null;if(n=i&&!i[0],r=s&&!s[0],n||r)return n?r?0:-a:o;if(o!=a)return o;if(n=o<0,r=c==l,!i||!s)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(a=(c=i.length)<(l=s.length)?c:l,o=0;o<a;o++)if(i[o]!=s[o])return i[o]>s[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function y(e,t,n,r){if(e<t||e>n||e!==s(e))throw Error(o+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return f(e.e/l)==t&&e.c[t]%2!=0}function w(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function b(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var x=function e(t){var n,x,E,_=D.prototype={constructor:D,toString:null,valueOf:null},k=new D(1),C=20,A=4,S=-7,I=21,T=-1e7,P=1e7,N=!1,R=1,O=0,M={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function D(e,t){var n,i,o,c,d,h,p,f,m=this;if(!(m instanceof D))return new D(e,t);if(null==t){if(e&&!0===e._isBigNumber)return m.s=e.s,void(!e.c||e.e>P?m.c=m.e=null:e.e<T?m.c=[m.e=0]:(m.e=e.e,m.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(m.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,d=e;d>=10;d/=10,c++);return void(c>P?m.c=m.e=null:(m.e=c,m.c=[e]))}f=String(e)}else{if(!r.test(f=String(e)))return E(m,f,h);m.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(c=f.indexOf("."))>-1&&(f=f.replace(".","")),(d=f.search(/e/i))>0?(c<0&&(c=d),c+=+f.slice(d+1),f=f.substring(0,d)):c<0&&(c=f.length)}else{if(y(t,2,j.length,"Base"),10==t&&L)return $(m=new D(e),C+m.e+1,A);if(f=String(e),h="number"==typeof e){if(0*e!=0)return E(m,f,h,t);if(m.s=1/e<0?(f=f.slice(1),-1):1,D.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else m.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(n=j.slice(0,t),c=d=0,p=f.length;d<p;d++)if(n.indexOf(i=f.charAt(d))<0){if("."==i){if(d>c){c=p;continue}}else if(!o&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){o=!0,d=-1,c=0;continue}return E(m,String(e),h,t)}h=!1,(c=(f=x(f,t,10,m.s)).indexOf("."))>-1?f=f.replace(".",""):c=f.length}for(d=0;48===f.charCodeAt(d);d++);for(p=f.length;48===f.charCodeAt(--p););if(f=f.slice(d,++p)){if(p-=d,h&&D.DEBUG&&p>15&&(e>u||e!==s(e)))throw Error(a+m.s*e);if((c=c-d-1)>P)m.c=m.e=null;else if(c<T)m.c=[m.e=0];else{if(m.e=c,m.c=[],d=(c+1)%l,c<0&&(d+=l),d<p){for(d&&m.c.push(+f.slice(0,d)),p-=l;d<p;)m.c.push(+f.slice(d,d+=l));d=l-(f=f.slice(d)).length}else d-=p;for(;d--;f+="0");m.c.push(+f)}}else m.c=[m.e=0]}function B(e,t,n,r){var i,s,o,a,c;if(null==n?n=A:y(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)c=m(e.c),c=1==r||2==r&&(o<=S||o>=I)?w(c,o):b(c,o,"0");else if(s=(e=$(new D(e),t,n)).e,a=(c=m(e.c)).length,1==r||2==r&&(t<=s||s<=S)){for(;a<t;c+="0",a++);c=w(c,s)}else if(t-=o,c=b(c,s,"0"),s+1>a){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=s-a)>0)for(s+1==a&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function U(e,t){for(var n,r,i=1,s=new D(e[0]);i<e.length;i++)(!(r=new D(e[i])).s||(n=g(s,r))===t||0===n&&s.s===t)&&(s=r);return s}function F(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*l-1)>P?e.c=e.e=null:n<T?e.c=[e.e=0]:(e.e=n,e.c=t),e}function $(e,t,n,r){var o,a,u,h,p,f,m,g=e.c,y=d;if(g){e:{for(o=1,h=g[0];h>=10;h/=10,o++);if((a=t-o)<0)a+=l,u=t,p=g[f=0],m=s(p/y[o-u-1]%10);else if((f=i((a+1)/l))>=g.length){if(!r)break e;for(;g.length<=f;g.push(0));p=m=0,o=1,u=(a%=l)-l+1}else{for(p=h=g[f],o=1;h>=10;h/=10,o++);m=(u=(a%=l)-l+o)<0?0:s(p/y[o-u-1]%10)}if(r=r||t<0||null!=g[f+1]||(u<0?p:p%y[o-u-1]),r=n<4?(m||r)&&(0==n||n==(e.s<0?3:2)):m>5||5==m&&(4==n||r||6==n&&(a>0?u>0?p/y[o-u]:0:g[f-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,r?(t-=e.e+1,g[0]=y[(l-t%l)%l],e.e=-t||0):g[0]=e.e=0,e;if(0==a?(g.length=f,h=1,f--):(g.length=f+1,h=y[l-a],g[f]=u>
vendor: 4,313 bytes, line 2
20?s(p/y[o-u]%y[u])*h:0),r)for(;;){if(0==f){for(a=1,u=g[0];u>=10;u/=10,a++);for(u=g[0]+=h,h=1;u>=10;u/=10,h++);a!=h&&(e.e++,g[0]==c&&(g[0]=1));break}if(g[f]+=h,g[f]!=c)break;g[f--]=0,h=1}for(a=g.length;0===g[--a];g.pop());}e.e>P?e.c=e.e=null:e.e<T&&(e.c=[e.e=0])}return e}function z(e){var t,n=e.e;return null===n?e.toString():(t=m(e.c),t=n<=S||n>=I?w(t,n):b(t,n,"0"),e.s<0?"-"+t:t)}return D.clone=e,D.ROUND_UP=0,D.ROUND_DOWN=1,D.ROUND_CEIL=2,D.ROUND_FLOOR=3,D.ROUND_HALF_UP=4,D.ROUND_HALF_DOWN=5,D.ROUND_HALF_EVEN=6,D.ROUND_HALF_CEIL=7,D.ROUND_HALF_FLOOR=8,D.EUCLID=9,D.config=D.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(o+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(n=e[t],0,p,t),C=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(n=e[t],0,8,t),A=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(y(n[0],-p,0,t),y(n[1],0,p,t),S=n[0],I=n[1]):(y(n,-p,p,t),S=-(I=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)y(n[0],-p,-1,t),y(n[1],1,p,t),T=n[0],P=n[1];else{if(y(n,-p,p,t),!n)throw Error(o+t+" cannot be zero: "+n);T=-(P=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(o+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw N=!n,Error(o+"crypto unavailable");N=n}else N=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(n=e[t],0,9,t),R=n),e.hasOwnProperty(t="POW_PRECISION")&&(y(n=e[t],0,p,t),O=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(o+t+" not an object: "+n);M=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);L="0123456789"==n.slice(0,10),j=n}}return{DECIMAL_PLACES:C,ROUNDING_MODE:A,EXPONENTIAL_AT:[S,I],RANGE:[T,P],CRYPTO:N,MODULO_MODE:R,POW_PRECISION:O,FORMAT:M,ALPHABET:j}},D.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!D.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===a||-1===a)&&i>=-p&&i<=p&&i===s(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%l)<1&&(t+=l),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=c||n!==s(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(o+"Invalid BigNumber: "+e)},D.maximum=D.max=function(){return U(arguments,-1)},D.minimum=D.min=function(){return U(arguments,1)},D.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return s(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var n,r,a,c,u,h=0,f=[],m=new D(k);if(null==e?e=C:y(e,0,p),c=i(e/l),N)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(c*=2));h<c;)(u=131072*n[h]+(n[h+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[h]=r[0],n[h+1]=r[1]):(f.push(u%1e14),h+=2);h=c/2}else{if(!crypto.randomBytes)throw N=!1,Error(o+"crypto unavailable");for(n=crypto.randomBytes(c*=7);h<c;)(u=281474976710656*(31&n[h])+1099511627776*n[h+1]+4294967296*n[h+2]+16777216*n[h+3]+(n[h+4]<<16)+(n[h+5]<<8)+n[h+6])>=9e15?crypto.randomBytes(7).copy(n,h):(f.push(u%1e14),h+=7);h=c/7}if(!N)for(;h<c;)(u=t())<9e15&&(f[h++]=u%1e14);for(c=f[--h],e%=l,c&&e&&(u=d[l-e],f[h]=s(c/u)*u);0===f[h];f.pop(),h--);if(h<0)f=[a=0];else{for(a=-1;0===f[0];f.splice(0,1),a-=l);for(h=1,u=f[0];u>=10;u/=10,h++);h<l&&(a-=l-h)}return m.e=a,m.c=f,m}}(),D.sum=function(){for(var e=1,t=arguments,n=new D(t[0]);e<t.length;)n=n.plus(t[e++]);return n},x=function(){var e="0123456789";function t(e,t,n,r){for(var i,s,o=[0],a=0,c=e.length;a<c;){for(s=o.length;s--;o[s]*=t);for(o[0]+=r.indexOf(e.charAt(a++)),i=0;i<o.length;i++)o[i]>n-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}return function(r,i,s,o,a){var c,l,u,d,h,p,f,g,y=r.indexOf("."),v=C,w=A;for(y>=0&&(d=O,O=0,r=r.replace(".",""),p=(g=new D(i)).pow(r.length-y),O=d,g.c=t(b(m(p.c),p.e,"0"),10,s,e),g.e=g.c.length),u=d=(f=t(r,i,s,a?(c=j,e):(c=e,j))).length;0==f[--d];f.pop());if(!f[0])return c.charAt(0);if(y<0?--u:(p.c=f,p.e=u,p.s=o,f=(p=n(p,g,v,w,s)).c,h=p.r,u=p.e),y=f[l=u+v+1],d=s/2,h=h||l<0||null!=f[l+1],h=w<4?(null!=y||h)&&(0==w||w==(p.s<0?3:2)):y>d||y==d&&(4==w||h||6==w&&1&f[l-1]||w==(p.s<0?8:7)),l<1||!f[0])r=h?b(c.
vendor: 4,802 bytes, line 2
2charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(f.length=l,h)for(--s;++f[--l]>s;)f[l]=0,l||(++u,f=[1].concat(f));for(d=f.length;!f[--d];);for(y=0,r="";y<=d;r+=c.charAt(f[y++]));r=b(r,u,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,s,o,a=0,c=e.length,l=t%h,u=t/h|0;for(e=e.slice();c--;)a=((i=l*(s=e[c]%h)+(r=u*s+(o=e[c]/h|0)*l)%h*h+a)/n|0)+(r/h|0)+u*o,e[c]=i%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,r){var i,s;if(n!=r)s=n>r?1:-1;else for(i=s=0;i<n;i++)if(e[i]!=t[i]){s=e[i]>t[i]?1:-1;break}return s}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,o,a,u){var d,h,p,m,g,y,v,w,b,x,E,_,k,C,A,S,I,T=r.s==i.s?1:-1,P=r.c,N=i.c;if(!P||!P[0]||!N||!N[0])return new D(r.s&&i.s&&(P?!N||P[0]!=N[0]:N)?P&&0==P[0]||!N?0*T:T/0:NaN);for(b=(w=new D(T)).c=[],T=o+(h=r.e-i.e)+1,u||(u=c,h=f(r.e/l)-f(i.e/l),T=T/l|0),p=0;N[p]==(P[p]||0);p++);if(N[p]>(P[p]||0)&&h--,T<0)b.push(1),m=!0;else{for(C=P.length,S=N.length,p=0,T+=2,(g=s(u/(N[0]+1)))>1&&(N=e(N,g,u),P=e(P,g,u),S=N.length,C=P.length),k=S,E=(x=P.slice(0,S)).length;E<S;x[E++]=0);I=N.slice(),I=[0].concat(I),A=N[0],N[1]>=u/2&&A++;do{if(g=0,(d=t(N,x,S,E))<0){if(_=x[0],S!=E&&(_=_*u+(x[1]||0)),(g=s(_/A))>1)for(g>=u&&(g=u-1),v=(y=e(N,g,u)).length,E=x.length;1==t(y,x,v,E);)g--,n(y,S<v?I:N,v,u),v=y.length,d=1;else 0==g&&(d=g=1),v=(y=N.slice()).length;if(v<E&&(y=[0].concat(y)),n(x,y,E,u),E=x.length,-1==d)for(;t(N,x,S,E)<1;)g++,n(x,S<E?I:N,E,u),E=x.length}else 0===d&&(g++,x=[0]);b[p++]=g,x[0]?x[E++]=P[k]||0:(x=[P[k]],E=1)}while((k++<C||null!=x[0])&&T--);m=null!=x[0],b[0]||b.splice(0,1)}if(u==c){for(p=1,T=b[0];T>=10;T/=10,p++);$(w,o+(w.e=p+h*l-1)+1,a,m)}else w.e=h,w.r=+m;return w}}(),E=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(s,a,c,l){var u,d=c?a:a.replace(i,"");if(r.test(d))s.s=isNaN(d)?null:d<0?-1:1;else{if(!c&&(d=d.replace(e,(function(e,t,n){return u="x"==(n=n.toLowerCase())?16:"b"==n?2:8,l&&l!=u?e:t})),l&&(u=l,d=d.replace(t,"$1").replace(n,"0.$1")),a!=d))return new D(d,u);if(D.DEBUG)throw Error(o+"Not a"+(l?" base "+l:"")+" number: "+a);s.s=null}s.c=s.e=null}}(),_.absoluteValue=_.abs=function(){var e=new D(this);return e.s<0&&(e.s=1),e},_.comparedTo=function(e,t){return g(this,new D(e,t))},_.decimalPlaces=_.dp=function(e,t){var n,r,i,s=this;if(null!=e)return y(e,0,p),null==t?t=A:y(t,0,8),$(new D(s),e+s.e+1,t);if(!(n=s.c))return null;if(r=((i=n.length-1)-f(this.e/l))*l,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},_.dividedBy=_.div=function(e,t){return n(this,new D(e,t),C,A)},_.dividedToIntegerBy=_.idiv=function(e,t){return n(this,new D(e,t),0,1)},_.exponentiatedBy=_.pow=function(e,t){var n,r,a,c,u,d,h,p,f=this;if((e=new D(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+z(e));if(null!=t&&(t=new D(t)),u=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return p=new D(Math.pow(+z(f),u?e.s*(2-v(e)):+z(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new D(NaN);(r=!d&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||u&&f.c[1]>=24e7:f.c[0]<8e13||u&&f.c[0]<=9999975e7)))return c=f.s<0&&v(e)?-0:0,f.e>-1&&(c=1/c),new D(d?1/c:c);O&&(c=i(O/l+2))}for(u?(n=new D(.5),d&&(e.s=1),h=v(e)):h=(a=Math.abs(+z(e)))%2,p=new D(k);;){if(h){if(!(p=p.times(f)).c)break;c?p.c.length>c&&(p.c.length=c):r&&(p=p.mod(t))}if(a){if(0===(a=s(a/2)))break;h=a%2}else if($(e=e.times(n),e.e+1,1),e.e>14)h=v(e);else{if(0===(a=+z(e)))break;h=a%2}f=f.times(f),c?f.c&&f.c.length>c&&(f.c.length=c):r&&(f=f.mod(t))}return r?p:(d&&(p=k.div(p)),t?p.mod(t):c?$(p,O,A,undefined):p)},_.integerValue=function(e){var t=new D(this);return null==e?e=A:y(e,0,8),$(t,t.e+1,e)},_.isEqualTo=_.eq=function(e,t){return 0===g(this,new D(e,t))},_.isFinite=function(){return!!this.c},_.isGreaterThan=_.gt=function(e,t){return g(this,new D(e,t))>0},_.isGreaterThanOrEqualTo=_.gte=function(e,t){return 1===(t=g(this,new D(e,t)))||0===t},_.isInteger=function(){return!!this.c&&f(this.e/l)>this.c.length-2},_.isLessThan=_.lt=function(e,t){return g(this,new D(e,t))<0},_.isLessThanOrEqualTo=_.lte=function(e,t){return-1===(t=g(this,new D(e,t)))||0===t},_.isNaN=function(){return!this.s},_.isNegative=function(){return this.s<0},_.isPositive=function(){return this.s>0},_.isZero=function(){return!!this.c&&0==this.c[0]},_.minus=function(e,t){var n,r,i,s,o=this,a=o.s;if(t=(e=new D(e,t)).s,!a||!t)return new D(NaN);if(a!=t)return e.s=-t,o.plus(e);var u=o.e/l,d=e.e/l,h=o.c,p=e.c;if(!u||!d){if(!h||!p)return h?(e.s=-t,e):new D(p?o:NaN);if(!h[0]||!p[0])return p[0]?(e.s=-t,e):new D(h[0]?o:3==A?-0:0)}if(u=f(u),d=f(d),h=h.slice(),a=u-d){for((s=a<0)?(a=-a,i=h):(d=u,i=p),i.reverse(),t=a;t--;
vendor: 5,683 bytes, line 2
2i.push(0));i.reverse()}else for(r=(s=(a=h.length)<(t=p.length))?a:t,a=t=0;t<r;t++)if(h[t]!=p[t]){s=h[t]<p[t];break}if(s&&(i=h,h=p,p=i,e.s=-e.s),(t=(r=p.length)-(n=h.length))>0)for(;t--;h[n++]=0);for(t=c-1;r>a;){if(h[--r]<p[r]){for(n=r;n&&!h[--n];h[n]=t);--h[n],h[r]+=c}h[r]-=p[r]}for(;0==h[0];h.splice(0,1),--d);return h[0]?F(e,h,d):(e.s=3==A?-1:1,e.c=[e.e=0],e)},_.modulo=_.mod=function(e,t){var r,i,s=this;return e=new D(e,t),!s.c||!e.s||e.c&&!e.c[0]?new D(NaN):!e.c||s.c&&!s.c[0]?new D(s):(9==R?(i=e.s,e.s=1,r=n(s,e,0,3),e.s=i,r.s*=i):r=n(s,e,0,R),(e=s.minus(r.times(e))).c[0]||1!=R||(e.s=s.s),e)},_.multipliedBy=_.times=function(e,t){var n,r,i,s,o,a,u,d,p,m,g,y,v,w,b,x=this,E=x.c,_=(e=new D(e,t)).c;if(!E||!_||!E[0]||!_[0])return!x.s||!e.s||E&&!E[0]&&!_||_&&!_[0]&&!E?e.c=e.e=e.s=null:(e.s*=x.s,E&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=f(x.e/l)+f(e.e/l),e.s*=x.s,(u=E.length)<(m=_.length)&&(v=E,E=_,_=v,i=u,u=m,m=i),i=u+m,v=[];i--;v.push(0));for(w=c,b=h,i=m;--i>=0;){for(n=0,g=_[i]%b,y=_[i]/b|0,s=i+(o=u);s>i;)n=((d=g*(d=E[--o]%b)+(a=y*d+(p=E[o]/b|0)*g)%b*b+v[s]+n)/w|0)+(a/b|0)+y*p,v[s--]=d%w;v[s]=n}return n?++r:v.splice(0,1),F(e,v,r)},_.negated=function(){var e=new D(this);return e.s=-e.s||null,e},_.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new D(e,t)).s,!i||!t)return new D(NaN);if(i!=t)return e.s=-t,r.minus(e);var s=r.e/l,o=e.e/l,a=r.c,u=e.c;if(!s||!o){if(!a||!u)return new D(i/0);if(!a[0]||!u[0])return u[0]?e:new D(a[0]?r:0*i)}if(s=f(s),o=f(o),a=a.slice(),i=s-o){for(i>0?(o=s,n=u):(i=-i,n=a),n.reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(t=u.length)<0&&(n=u,u=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/c|0,a[t]=c===a[t]?0:a[t]%c;return i&&(a=[i].concat(a),++o),F(e,a,o)},_.precision=_.sd=function(e,t){var n,r,i,s=this;if(null!=e&&e!==!!e)return y(e,1,p),null==t?t=A:y(t,0,8),$(new D(s),e,t);if(!(n=s.c))return null;if(r=(i=n.length-1)*l+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&s.e+1>r&&(r=s.e+1),r},_.shiftedBy=function(e){return y(e,-9007199254740991,u),this.times("1e"+e)},_.squareRoot=_.sqrt=function(){var e,t,r,i,s,o=this,a=o.c,c=o.s,l=o.e,u=C+4,d=new D("0.5");if(1!==c||!a||!a[0])return new D(!c||c<0&&(!a||a[0])?NaN:a?o:1/0);if(0==(c=Math.sqrt(+z(o)))||c==1/0?(((t=m(a)).length+l)%2==0&&(t+="0"),c=Math.sqrt(+t),l=f((l+1)/2)-(l<0||l%2),r=new D(t=c==1/0?"5e"+l:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new D(c+""),r.c[0])for((c=(l=r.e)+u)<3&&(c=0);;)if(s=r,r=d.times(s.plus(n(o,s,u,1))),m(s.c).slice(0,c)===(t=m(r.c)).slice(0,c)){if(r.e<l&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||($(r,r.e+C+2,1),e=!r.times(r).eq(o));break}if(!i&&($(s,s.e+C+2,0),s.times(s).eq(o))){r=s;break}u+=4,c+=4,i=1}return $(r,r.e+C+1,A,e)},_.toExponential=function(e,t){return null!=e&&(y(e,0,p),e++),B(this,e,t,1)},_.toFixed=function(e,t){return null!=e&&(y(e,0,p),e=e+this.e+1),B(this,e,t)},_.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=M;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var s,a=r.split("."),c=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",d=a[0],h=a[1],p=i.s<0,f=p?d.slice(1):d,m=f.length;if(l&&(s=c,c=l,l=s,m-=s),c>0&&m>0){for(s=m%c||c,d=f.substr(0,s);s<m;s+=c)d+=u+f.substr(s,c);l>0&&(d+=u+f.slice(s)),p&&(d="-"+d)}r=h?d+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?h.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):d}return(n.prefix||"")+r+(n.suffix||"")},_.toFraction=function(e){var t,r,i,s,a,c,u,h,p,f,g,y,v=this,w=v.c;if(null!=e&&(!(u=new D(e)).isInteger()&&(u.c||1!==u.s)||u.lt(k)))throw Error(o+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+z(u));if(!w)return new D(v);for(t=new D(k),p=r=new D(k),i=h=new D(k),y=m(w),a=t.e=y.length-v.e-1,t.c[0]=d[(c=a%l)<0?l+c:c],e=!e||u.comparedTo(t)>0?a>0?t:p:u,c=P,P=1/0,u=new D(y),h.c[0]=0;f=n(u,t,0,1),1!=(s=r.plus(f.times(i))).comparedTo(e);)r=i,i=s,p=h.plus(f.times(s=p)),h=s,t=u.minus(f.times(s=t)),u=s;return s=n(e.minus(r),i,0,1),h=h.plus(s.times(p)),r=r.plus(s.times(i)),h.s=p.s=v.s,g=n(p,i,a*=2,A).minus(v).abs().comparedTo(n(h,r,a,A).minus(v).abs())<1?[p,i]:[h,r],P=c,g},_.toNumber=function(){return+z(this)},_.toPrecision=function(e,t){return null!=e&&y(e,1,p),B(this,e,t,2)},_.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=i<=S||i>=I?w(m(n.c),i):b(m(n.c),i,"0"):10===e&&L?t=b(m((n=$(new D(n),C+i+1,A)).c),n.e,"0"):(y(e,2,j.length,"Base"),t=x(b(m(n.c),i,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},_.valueOf=_.toJSON=function(){return z(this)},_._isBigNumber=!0,_[Symbol.toStringTag]="BigNumber",_[Symbol.for("nodejs.util.inspect.custom")]=_.valueOf,null!=t&&D.set(t),D}();const E=x},722:(e,t,n)=>{const r=n(2438),i=n(4796);e.exports=function(e){const t=r(e),n=i(e);return function(e,r){switch("string"===typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,r);case"keccak256":return new t(1088,512,null,256,r);case"keccak384":return new t(832,768,null,384,r);case"keccak512":return new t(576,1024,null,512,r);case"sha3-224":return new t(1152,448,6,224,r);case"sha3-256":return new t(1088,512,6,256,r);case"sha3-384":return new t(832,768,6,384,r);case"sha3-512":return new t(576,1024,6,512,r);case"shake128":return new n(1344,256,31,r);case"shake256":return new n(1088,512,31,r);default:throw new Error("Invald algorithm: "+e)}}}},726:e=>{"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},732:(e,t,n)=>{"use strict";
2Object.defineProperty(t,"__esModule",{value:!0});n(8686).__exportStar(n(6643),t)},737:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class n{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if("undefined"!==typeof t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){const t=this.timestamps.get(e);if("undefined"===typeof t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=n,t.default=n},794:(e,t,n)=>{const r=n(6432),i=n(9526);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(r){return n}}},878:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8686);r.__exportStar(n(1560),t),r.__exportStar(n(737),t),r.__exportStar(n(732),t),r.__exportStar(n(9064),t)},911:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelayEventManager=void 0;const r=n(8114);t.RelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=(0,r.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}},920:(e,t,n)=>{var r=n(1596),i=n(330),s=n(6047).Buffer,o=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,
21126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function c(){this.init(),this._w=a,i.call(this,128,112)}function l(e,t,n){return n^e&(t^n)}function u(e,t,n){return e&t|n&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0<t>>>0?1:0}r(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,s=0|this._dh,a=0|this._eh,c=0|this._fh,v=0|this._gh,w=0|this._hh,b=0|this._al,x=0|this._bl,E=0|this._cl,_=0|this._dl,k=0|this._el,C=0|this._fl,A=0|this._gl,S=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var T=t[I-30],P=t[I-30+1],N=p(T,P),R=f(P,T),O=m(T=t[I-4],P=t[I-4+1]),M=g(P,T),j=t[I-14],L=t[I-14+1],D=t[I-32],B=t[I-32+1],U=R+L|0,F=N+j+y(U,R)|0;F=(F=F+O+y(U=U+M|0,M)|0)+D+y(U=U+B|0,B)|0,t[I]=F,t[I+1]=U}for(var $=0;$<160;$+=2){F=t[$],U=t[$+1];var z=u(n,r,i),H=u(b,x,E),W=d(n,b),q=d(b,n),V=h(a,k),G=h(k,a),K=o[$],Z=o[$+1],Y=l(a,c,v),Q=l(k,C,A),J=S+G|0,X=w+V+y(J,S)|0;X=(X=(X=X+Y+y(J=J+Q|0,Q)|0)+K+y(J=J+Z|0,Z)|0)+F+y(J=J+U|0,U)|0;var ee=q+H|0,te=W+z+y(ee,q)|0;w=v,S=A,v=c,A=C,c=a,C=k,a=s+X+y(k=_+J|0,_)|0,s=i,_=E,i=r,E=x,r=n,x=b,n=X+te+y(b=J+ee|0,J)|0}this._al=this._al+b|0,this._bl=this._bl+x|0,this._cl=this._cl+E|0,this._dl=this._dl+_|0,this._el=this._el+k|0,this._fl=this._fl+C|0,this._gl=this._gl+A|0,this._hl=this._hl+S|0,this._ah=this._ah+n+y(this._al,b)|0,this._bh=this._bh+r+y(this._bl,x)|0,this._ch=this._ch+i+y(this._cl,E)|0,this._dh=this._dh+s+y(this._dl,_)|0,this._eh=this._eh+a+y(this._el,k)|0,this._fh=this._fh+c+y(this._fl,C)|0,this._gh=this._gh+v+y(this._gl,A)|0,this._hh=this._hh+w+y(this._hl,S)|0},c.prototype._hash=function(){var e=s.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},923:(e,t,n)=>{"use strict";var r=n(6047).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=d,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.I=s,s.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\ufffd":t},s.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(i=o(t[r]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(i=o(t[r]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},961:(e,t,n)=>{"use strict";var r=n(9950);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=null,o=0;function a(e,t){if(0!==t.length)if(512<t.length)0<o&&(e.enqueue(new Uint8Array(s.buffer,0,o)),s=new Uint8Array(512),o=0),e.enqueue(t);else{var n=s.length-o;n<t.length&&(0===n?e.enqueue(s):(s.set(t.subarray(0,n),o),e.enqueue(s),t=t.subarray(n)),s=new Uint8Array(512),o=0),s.set(t,o),o+=t.length}}function c(e,t){return a(e,t),!0}function l(e){s&&0<o&&(e.enqueue(new Uint8Array(s.buffer,0,o)),s=null,o=0)}var u=new TextEncoder;function d(e){return u.encode(e)}function h(e){return u.encode(e)}function p(e,t){"function"===typeof e.error?e.error(t):e.close()}var f=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},y={};function v(e){return!!f.call(y,e)||!f.call(g,e)&&(m.test(e)?y[e]=!0:(g[e]=!0,!1))}function w(e,t,n,r,i,s,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){b[e]=new w(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEac
vendor: 3,519 bytes, line 2
2h((function(e){var t=e[0];b[t]=new w(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){b[e]=new w(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){b[e]=new w(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){b[e]=new w(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){b[e]=new w(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){b[e]=new w(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){b[e]=new w(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){b[e]=new w(e,5,!1,e.toLowerCase(),null,!1,!1)}));var x=/[\-:]([a-z])/g;function E(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(x,E);b[t]=new w(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(x,E);b[t]=new w(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(x,E);b[t]=new w(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){b[e]=new w(e,1,!1,e.toLowerCase(),null,!1,!1)})),b.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){b[e]=new w(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},k=["Webkit","ms","Moz","O"];
vendor: 7,384 bytes, line 2
2Object.keys(_).forEach((function(e){k.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_[t]=_[e]}))}));var C=/["'&<>]/;function A(e){if("boolean"===typeof e||"number"===typeof e)return""+e;e=""+e;var t=C.exec(e);if(t){var n,r="",i=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}i!==n&&(r+=e.substring(i,n)),i=n+1,r+=t}e=i!==n?r+e.substring(i,n):r}return e}var S=/([A-Z])/g,I=/^ms-/,T=Array.isArray,P=h("<script>"),N=h("<\/script>"),R=h('<script src="'),O=h('<script type="module" src="'),M=h('" async=""><\/script>'),j=/(<\/|<)(s)(cript)/gi;function L(e,t,n,r){return t+("s"===n?"\\u0073":"\\u0053")+r}function D(e,t){return{insertionMode:e,selectedValue:t}}var B=h("\x3c!-- --\x3e");function U(e,t,n,r){return""===t?r:(r&&e.push(B),e.push(d(A(t))),!0)}var F=new Map,$=h(' style="'),z=h(":"),H=h(";");function W(e,t,n){if("object"!==typeof n)throw Error(i(62));for(var r in t=!0,n)if(f.call(n,r)){var s=n[r];if(null!=s&&"boolean"!==typeof s&&""!==s){if(0===r.indexOf("--")){var o=d(A(r));s=d(A((""+s).trim()))}else{o=r;var a=F.get(o);void 0!==a||(a=h(A(o.replace(S,"-$1").toLowerCase().replace(I,"-ms-"))),F.set(o,a)),o=a,s="number"===typeof s?0===s||f.call(_,r)?d(""+s):d(s+"px"):d(A((""+s).trim()))}t?(t=!1,e.push($,o,z,s)):e.push(H,o,z,s)}}t||e.push(G)}var q=h(" "),V=h('="'),G=h('"'),K=h('=""');function Z(e,t,n,r){switch(n){case"style":return void W(e,t,r);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])if(null!==(t=b.hasOwnProperty(n)?b[n]:null)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=d(t.attributeName),t.type){case 3:r&&e.push(q,n,K);break;case 4:!0===r?e.push(q,n,K):!1!==r&&e.push(q,n,V,d(A(r)),G);break;case 5:isNaN(r)||e.push(q,n,V,d(A(r)),G);break;case 6:!isNaN(r)&&1<=r&&e.push(q,n,V,d(A(r)),G);break;default:t.sanitizeURL&&(r=""+r),e.push(q,n,V,d(A(r)),G)}}else if(v(n)){switch(typeof r){case"function":case"symbol":return;case"boolean":if("data-"!==(t=n.toLowerCase().slice(0,5))&&"aria-"!==t)return}e.push(q,d(n),V,d(A(r)),G)}}var Y=h(">"),Q=h("/>");function J(e,t,n){if(null!=t){if(null!=n)throw Error(i(60));if("object"!==typeof t||!("__html"in t))throw Error(i(61));null!==(t=t.__html)&&void 0!==t&&e.push(d(""+t))}}var X=h(' selected=""');function ee(e,t,n,r){e.push(ie(n));var i,s=n=null;for(i in t)if(f.call(t,i)){var o=t[i];if(null!=o)switch(i){case"children":n=o;break;case"dangerouslySetInnerHTML":s=o;break;default:Z(e,r,i,o)}}return e.push(Y),J(e,s,n),"string"===typeof n?(e.push(d(A(n))),null):n}var te=h("\n"),ne=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,re=new Map;function ie(e){var t=re.get(e);if(void 0===t){if(!ne.test(e))throw Error(i(65,e));t=h("<"+e),re.set(e,t)}return t}var se=h("<!DOCTYPE html>");function oe(e,t,n,s,o){switch(t){case"select":e.push(ie("select"));var a=null,c=null;for(p in n)if(f.call(n,p)){var l=n[p];if(null!=l)switch(p){case"children":a=l;break;case"dangerouslySetInnerHTML":c=l;break;case"defaultValue":case"value":break;default:Z(e,s,p,l)}}return e.push(Y),J(e,c,a),a;case"option":c=o.selectedValue,e.push(ie("option"));var u=l=null,h=null,p=null;for(a in n)if(f.call(n,a)){var m=n[a];if(null!=m)switch(a){case"children":l=m;break;case"selected":h=m;break;case"dangerouslySetInnerHTML":p=m;break;case"value":u=m;default:Z(e,s,a,m)}}if(null!=c)if(n=null!==u?""+u:function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(l),T(c)){for(s=0;s<c.length;s++)if(""+c[s]===n){e.push(X);break}}else""+c===n&&e.push(X);else h&&e.push(X);return e.push(Y),J(e,p,l),l;case"textarea":for(l in e.push(ie("textarea")),p=c=a=null,n)if(f.call(n,l)&&null!=(u=n[l]))switch(l){case"children":p=u;break;case"value":a=u;break;case"defaultValue":c=u;break;case"dangerouslySetInnerHTML":throw Error(i(91));default:Z(e,s,l,u)}if(null===a&&null!==c&&(a=c),e.push(Y),null!=p){if(null!=a)throw Error(i(92));if(T(p)&&1<p.length)throw Error(i(93));a=""+p}return"string"===typeof a&&"\n"===a[0]&&e.push(te),null!==a&&e.push(d(A(""+a))),null;case"input":for(c in e.push(ie("input")),u=p=l=a=null,n)if(f.call(n,c)&&null!=(h=n[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(i(399,"input"));case"defaultChecked":u=h;break;case"defaultValue":l=h;break;case"checked":p=h;break;case"value":a=h;break;default:Z(e,s,c,h)}return null!==p?Z(e,s,"checked",p):null!==u&&Z(e,s,"checked",u),null!==a?Z(e,s,"value",a):null!==l&&Z(e,s,"value",l),e.push(Q),null;case"menuitem":for(var g in e.push(ie("menuitem")),n)if(f.call(n,g)&&null!=(a=n[g]))switch(g){case"children":case"dangerouslySetInnerHTML":throw Error(i(400));default:Z(e,s,g,a)}return e.push(Y),null;case"title":for(m in e.push(ie("title")),a=null,n)if(f.call(n,m)&&null!=(c=n[m]))switch(m){case"children":a=c;break;case"dangerouslySetInnerHTML":throw Error(i(434));default:Z(e,s,m,c)}return e.push(Y),a;case"listing":case"pre":for(u in e.push(ie(t)),c=a=null,n)if(f.call(n,u)&&null!=(l=n[u]))switch(u){case"children":a=l;break;case"dangerouslySetInnerHTML":c=l;break;default:Z(e,s,u,l)}if(e.push(Y),null!=c){if(null!=a)throw Error(i(60));if("object"!==typeof c||!("__html"in c))throw Error(i(61));null!==(n=c.__html)&&void 0!==n&&("string"===typeof n&&0<n.length&&"\n"===n[0]?e.push(te,d(n)):e.push(d(""+n)))}return"string"===typeof a&&"\n"===a[0]&&e.push(te),a;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var y in e.push(ie(t)),n)if(f.call(n,y)&&null!=(a=n[y]))switch(y){case"children":case"dangerouslySetInnerHTML":throw Error(i(399,t));default:Z(e,s,y,a)}return e.push(Q),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return ee(e,n,t,s);case"html":return 0===o.insertionMode&&e.push(se),ee(e,n,t,s);default:if(-1===t.indexOf("-")&&"string"!==typeof n.is)return ee(e,n,t,s);for(h in e.push(ie(t)),c=a=null,n)if(f.call(n,h)&&null!=(l=n[h]))switch(h){case"children":a=l;break;case"dangerouslySetInnerHTML":c=l;break;case"style":W(e,s,l);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:v(h)&&"function"!==typeof l&&"symbol"!==typeof l&&e.push(q,d(h),V,d(A(l)),G)}return e.push(Y),J(e,c,a),a}}var ae=h("</"),ce=h(">"),le=h('<template id="'),ue=h('"></template>'),de=h("\x3c!--$--\x3e"),he=h('\x3c!--$?--\x3e<template id="'),pe=h('"></template>'),fe=h("\x3c!--$!--\x3e"),me=h("\x3c!--/$--\x3e"),ge=h("<template"),ye=h('"'),ve=h(' data-dgst="');h(' data-msg="'),h(' data-stck="');var we=h("></template>");function be(e,t,n){if(a(e,he),null===n)throw Error(i(395));return a(e,n),c(e,pe)}var xe=h('<div hidden id="'),Ee=h('">'),_e=h("</div>"),ke=h('<svg aria-hidden="true" style="display:none" id="'),Ce=h('">'),Ae=h("</svg>"),Se=h('<math aria-hidden="true" style="display:none" id="'),Ie=h('">'),Te=h("</math>"),Pe=h('<table hidden id="'),Ne=h('">'),Re=h("</table>"),Oe=h('<table hidden><tbody id="'),Me=h('">'),je=h("</tbody></table>"),Le=h('<table hidden><tr id="'),De=h('">'),Be=h("</tr></table>"),Ue=h('<table hidden>
2<colgroup id="'),Fe=h('">'),$e=h("</colgroup></table>");var ze=h('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),He=h('$RS("'),We=h('","'),qe=h('")<\/script>'),Ve=h('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),Ge=h('$RC("'),Ke=h('","'),Ze=h('")<\/script>'),Ye=h('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),Qe=h('$RX("'),Je=h('"'),Xe=h(")<\/script>"),et=h(","),tt=/[<\u2028\u2029]/g;function nt(e){return JSON.stringify(e).replace(tt,(function(e){switch(e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}))}var rt=Object.assign,it=Symbol.for("react.element"),st=Symbol.for("react.portal"),ot=Symbol.for("react.fragment"),at=Symbol.for("react.strict_mode"),ct=Symbol.for("react.profiler"),lt=Symbol.for("react.provider"),ut=Symbol.for("react.context"),dt=Symbol.for("react.forward_ref"),ht=Symbol.for("react.suspense"),pt=Symbol.for("react.suspense_list"),ft=Symbol.for("react.memo"),mt=Symbol.for("react.lazy"),gt=Symbol.for("react.scope"),yt=Symbol.for("react.debug_trace_mode"),vt=Symbol.for("react.legacy_hidden"),wt=Symbol.for("react.default_value"),bt=Symbol.iterator;function xt(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case ot:return"Fragment";case st:return"Portal";case ct:return"Profiler";case at:return"StrictMode";case ht:return"Suspense";case pt:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case ut:return(e.displayName||"Context")+".Consumer";case lt:return(e._context.displayName||"Context")+".Provider";case dt:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case ft:return null!==(t=e.displayName||null)?t:xt(e.type)||"Memo";case mt:t=e._payload,e=e._init;try{return xt(e(t))}catch(n){}}return null}var Et={};function _t(e,t){if(!(e=e.contextTypes))return Et;var n,r={};for(n in e)r[n]=t[n];return r}var kt=null;function Ct(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var n=t.parent;if(null===e){if(null!==n)throw Error(i(401))}else{if(null===n)throw Error(i(401));Ct(e,n)}t.context._currentValue=t.value}}function At(e){e.context._currentValue=e.parentValue,null!==(e=e.parent)&&At(e)}function St(e){var t=e.parent;null!==t&&St(t),e.context._currentValue=e.value}function It(e,t){if(e.context._currentValue=e.parentValue,null===(e=e.parent))throw Error(i(402));e.depth===t.depth?Ct(e,t):It(e,t)}function Tt(e,t){var n=t.parent;if(null===n)throw Error(i(402));e.depth===n.depth?Ct(e,n):Tt(e,n),t.context._currentValue=t.value}function Pt(e){var t=kt;t!==e&&(null===t?St(e):null===e?At(t):t.depth===e.depth?Ct(t,e):t.depth>e.depth?It(t,e):Tt(t,e),kt=e)}var Nt={isMounted:function(){return!1},enqueueSetState:function(e,t){null!==(e=e._reactInternals).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e._reactInternals).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function Rt(e,t,n,r){var i=void 0!==e.state?e.state:null;e.updater=Nt,e.props=n,e.state=i;var s={queue:[],replace:!1};e._reactInternals=s;var o=t.contextType;if(e.context="object"===typeof o&&null!==o?o._currentValue:r,"function"===typeof(o=t.getDerivedStateFromProps)&&(i=null===(o=o(n,i))||void 0===o?i:rt({},i,o),e.state=i),"function"!==typeof t.getDerivedStateFromProps&&"function"!==typeof e.getSnapshotBeforeUpdate&&("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount))if(t=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),t!==e.state&&Nt.enqueueReplaceState(e,e.state,null),null!==s.queue&&0<s.queue.length)if(t=s.queue,o=s.replace,s.queue=null,s.replace=!1,o&&1===t.length)e.state=t[0];else{for(s=o?t[0]:e.state,i=!0,o=o?1:0;o<t.length;o++){var a=t[o];null!=(a="function"===typeof a?a.call(e,s,n,r):a)&&(i?(i=!1,s=rt({},s,a)):rt(s,a))}e.state=s}else s.queue=null}var Ot={id:1,overflow:""};function Mt(e,t,n){var r=e.id;e=e.overflow;var i=32-jt(r)-1;r&=~(1<<i),n+=1;var s=32-jt(t)+i;if(30<s){var o=i-i%5;return s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,{id:1<<32-jt(t)+i|n<<i|r,overflow:s+e}}return{id:1<<s|n<<i|r,overflow:e}}var jt=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(Lt(e)/Dt|0)|0},Lt=Math.log,Dt=Math.LN2;var Bt="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},Ut=null,Ft=null,$t=null,zt=null,Ht=!1,Wt=!1,qt=0,Vt=null,Gt=0;function Kt(){if(null===Ut)throw Error(i(321));return Ut}function Zt(){if(0<Gt)throw Error(i(312));return{memoizedState:null,queue:null,next:null}}function Yt(){return null===zt?null===$t?(Ht=!1,$t=zt=Zt()):(Ht=!0,zt=$t):null===zt.next?(Ht=!1,zt=zt.next=Zt()):(Ht=!0,zt=zt.next),zt}function Qt(){Ft=Ut=null,Wt=!1,$t=null,Gt=0,zt=Vt=null}function Jt(e,t){return"function"===typeof t?t(e):t}function Xt(e,t,n){if(Ut=Kt(),zt=Yt(),Ht){var r=zt.queue;if(t=r.dispatch,null!==Vt&&void 0!==(n=Vt.get(r))){Vt.delete(r),r=zt.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return zt.memoizedState=r,[r,t]}return[zt.memoizedState,t]}return e=e===Jt?"function"===typeof t?t():t:void 0!==n?n(t):t,zt.memoizedState=e,e=(e=zt.queue={last:null,dispatch:null}).dispatch=tn.bind(null,Ut,e),[zt.memoizedState,e]}function en(e,t){if(Ut=Kt(),t=void 0===t?null:t,null!==(zt=Yt())){var n=zt.memoizedState;if(null!==n&&null!==t){var r=n[1];e:if(null===r)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!Bt(t[i],r[i])){r=!1;break e}r=!0}if(r)return n[0]}}return e=e(),zt.memoizedState=[e,t],e}function tn(e,t,n){if(25<=Gt)throw Error(i(301));if(e===Ut)if(Wt=!0,e={action:n,next:null},null===Vt&&(Vt=new Map),void 0===(n=Vt.get(t)))Vt.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function nn(){throw Error(i(394))}function rn(){}var sn={readContext:function(e){return e._currentValue},useContext:function(e){return Kt(),e._currentValue},useMemo:en,useReducer:Xt,useRef:function(e){Ut=Kt();var t=(zt=Yt()).memoizedState;return null===t?(e={current:e},zt.memoizedState=e):t},useState:function(e){return Xt(Jt,e)},useInsertionEffect:rn,useLayoutEffect:function(){},useCallback:function(e,t){return en((function(){return e}),t)},useImperativeHandle:rn,useEffect:rn,useDebugValue:rn,useDeferredValue:function(e){return Kt(),e},useTransition:function(){return Kt(),[!1,nn]},useId:function(){var e=Ft.treeContext,t=e.overflow;e=((e=e.id)&~(1<<32-jt(e)-1)).toString(32)+t;var n=on;
vendor: 4,720 bytes, line 2
2if(null===n)throw Error(i(404));return t=qt++,e=":"+n.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return Kt(),t(e._source)},useSyncExternalStore:function(e,t,n){if(void 0===n)throw Error(i(407));return n()}},on=null,an=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function cn(e){return console.error(e),null}function ln(){}function un(e,t,n,r,i,s,o,a){e.allPendingTasks++,null===n?e.pendingRootTasks++:n.pendingTasks++;var c={node:t,ping:function(){var t=e.pingedTasks;t.push(c),1===t.length&&Cn(e)},blockedBoundary:n,blockedSegment:r,abortSet:i,legacyContext:s,context:o,treeContext:a};return i.add(c),c}function dn(e,t,n,r,i,s){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n,lastPushedText:i,textEmbedded:s}}function hn(e,t){if(null!=(e=e.onError(t))&&"string"!==typeof e)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function pn(e,t){var n=e.onShellError;n(t),(n=e.onFatalError)(t),null!==e.destination?(e.status=2,p(e.destination,t)):(e.status=1,e.fatalError=t)}function fn(e,t,n,r,i){for(Ut={},Ft=t,qt=0,e=n(r,i);Wt;)Wt=!1,qt=0,Gt+=1,zt=null,e=n(r,i);return Qt(),e}function mn(e,t,n,r){var s=n.render(),o=r.childContextTypes;if(null!==o&&void 0!==o){var a=t.legacyContext;if("function"!==typeof n.getChildContext)r=a;else{for(var c in n=n.getChildContext())if(!(c in o))throw Error(i(108,xt(r)||"Unknown",c));r=rt({},a,n)}t.legacyContext=r,vn(e,t,s),t.legacyContext=a}else vn(e,t,s)}function gn(e,t){if(e&&e.defaultProps){for(var n in t=rt({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function yn(e,t,n,r,s){if("function"===typeof n)if(n.prototype&&n.prototype.isReactComponent){s=_t(n,t.legacyContext);var o=n.contextType;Rt(o=new n(r,"object"===typeof o&&null!==o?o._currentValue:s),n,r,s),mn(e,t,o,n)}else{s=fn(e,t,n,r,o=_t(n,t.legacyContext));var a=0!==qt;if("object"===typeof s&&null!==s&&"function"===typeof s.render&&void 0===s.$$typeof)Rt(s,n,r,o),mn(e,t,s,n);else if(a){r=t.treeContext,t.treeContext=Mt(r,1,0);try{vn(e,t,s)}finally{t.treeContext=r}}else vn(e,t,s)}else{if("string"!==typeof n){switch(n){case vt:case yt:case at:case ct:case ot:case pt:return void vn(e,t,r.children);case gt:throw Error(i(343));case ht:e:{n=t.blockedBoundary,s=t.blockedSegment,o=r.fallback,r=r.children;var c={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:a=new Set,errorDigest:null},l=dn(0,s.chunks.length,c,s.formatContext,!1,!1);s.children.push(l),s.lastPushedText=!1;var u=dn(0,0,null,s.formatContext,!1,!1);u.parentFlushed=!0,t.blockedBoundary=c,t.blockedSegment=u;try{if(bn(e,t,r),u.lastPushedText&&u.textEmbedded&&u.chunks.push(B),u.status=1,_n(c,u),0===c.pendingTasks)break e}catch(h){u.status=4,c.forceClientRender=!0,c.errorDigest=hn(e,h)}finally{t.blockedBoundary=n,t.blockedSegment=s}t=un(e,o,n,l,a,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if("object"===typeof n&&null!==n)switch(n.$$typeof){case dt:if(r=fn(e,t,n.render,r,s),0!==qt){n=t.treeContext,t.treeContext=Mt(n,1,0);try{vn(e,t,r)}finally{t.treeContext=n}}else vn(e,t,r);return;case ft:return void yn(e,t,n=n.type,r=gn(n,r),s);case lt:if(s=r.children,n=n._context,r=r.value,o=n._currentValue,n._currentValue=r,kt=r={parent:a=kt,depth:null===a?0:a.depth+1,context:n,parentValue:o,value:r},t.context=r,vn(e,t,s),null===(e=kt))throw Error(i(403));return r=e.parentValue,e.context._currentValue=r===wt?e.context._defaultValue:r,e=kt=e.parent,void(t.context=e);case ut:return void vn(e,t,r=(r=r.children)(n._currentValue));case mt:return void yn(e,t,n=(s=n._init)(n._payload),r=gn(n,r),void 0)}throw Error(i(130,null==n?n:typeof n,""))}switch(o=oe((s=t.blockedSegment).chunks,n,r,e.responseState,s.formatContext),s.lastPushedText=!1,a=s.formatContext,s.formatContext=function(e,t,n){switch(t){case"select":return D(1,null!=n.value?n.value:n.defaultValue);case"svg":return D(2,null);case"math":return D(3,null);case"foreignObject":return D(1,null);case"table":return D(4,null);case"thead":case"tbody":case"tfoot":return D(5,null);case"colgroup":return D(7,null);case"tr":return D(6,null)}return 4<=e.insertionMode||0===e.insertionMode?D(1,null):e}(a,n,r),bn(e,t,o),s.formatContext=a,n){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:s.chunks.push(ae,d(n),ce)}s.lastPushedText=!1}}
vendor: 10,142 bytes, line 2
2function vn(e,t,n){if(t.node=n,"object"===typeof n&&null!==n){switch(n.$$typeof){case it:return void yn(e,t,n.type,n.props,n.ref);case st:throw Error(i(257));case mt:var r=n._init;return void vn(e,t,n=r(n._payload))}if(T(n))return void wn(e,t,n);if(null===n||"object"!==typeof n?r=null:r="function"===typeof(r=bt&&n[bt]||n["@@iterator"])?r:null,r&&(r=r.call(n))){if(!(n=r.next()).done){var s=[];do{s.push(n.value),n=r.next()}while(!n.done);wn(e,t,s)}return}throw e=Object.prototype.toString.call(n),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(n).join(", ")+"}":e))}"string"===typeof n?(r=t.blockedSegment).lastPushedText=U(t.blockedSegment.chunks,n,e.responseState,r.lastPushedText):"number"===typeof n&&((r=t.blockedSegment).lastPushedText=U(t.blockedSegment.chunks,""+n,e.responseState,r.lastPushedText))}function wn(e,t,n){for(var r=n.length,i=0;i<r;i++){var s=t.treeContext;t.treeContext=Mt(s,r,i);try{bn(e,t,n[i])}finally{t.treeContext=s}}}function bn(e,t,n){var r=t.blockedSegment.formatContext,i=t.legacyContext,s=t.context;try{return vn(e,t,n)}catch(c){if(Qt(),"object"!==typeof c||null===c||"function"!==typeof c.then)throw t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=s,Pt(s),c;n=c;var o=t.blockedSegment,a=dn(0,o.chunks.length,null,o.formatContext,o.lastPushedText,!0);o.children.push(a),o.lastPushedText=!1,e=un(e,t.node,t.blockedBoundary,a,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=s,Pt(s)}}function xn(e){var t=e.blockedBoundary;(e=e.blockedSegment).status=3,kn(this,t,e)}function En(e,t,n){var r=e.blockedBoundary;e.blockedSegment.status=3,null===r?(t.allPendingTasks--,2!==t.status&&(t.status=2,null!==t.destination&&t.destination.close())):(r.pendingTasks--,r.forceClientRender||(r.forceClientRender=!0,e=void 0===n?Error(i(432)):n,r.errorDigest=t.onError(e),r.parentFlushed&&t.clientRenderedBoundaries.push(r)),r.fallbackAbortableTasks.forEach((function(e){return En(e,t,n)})),r.fallbackAbortableTasks.clear(),t.allPendingTasks--,0===t.allPendingTasks&&(r=t.onAllReady)())}function _n(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1===n.status&&_n(e,n)}else e.completedSegments.push(t)}function kn(e,t,n){if(null===t){if(n.parentFlushed){if(null!==e.completedRootSegment)throw Error(i(389));e.completedRootSegment=n}e.pendingRootTasks--,0===e.pendingRootTasks&&(e.onShellError=ln,(t=e.onShellReady)())}else t.pendingTasks--,t.forceClientRender||(0===t.pendingTasks?(n.parentFlushed&&1===n.status&&_n(t,n),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(xn,e),t.fallbackAbortableTasks.clear()):n.parentFlushed&&1===n.status&&(_n(t,n),1===t.completedSegments.length&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,0===e.allPendingTasks&&(e=e.onAllReady)()}function Cn(e){if(2!==e.status){var t=kt,n=an.current;an.current=sn;var r=on;on=e.responseState;try{var i,s=e.pingedTasks;for(i=0;i<s.length;i++){var o=s[i],a=e,c=o.blockedSegment;if(0===c.status){Pt(o.context);try{vn(a,o,o.node),c.lastPushedText&&c.textEmbedded&&c.chunks.push(B),o.abortSet.delete(o),c.status=1,kn(a,o.blockedBoundary,c)}catch(p){if(Qt(),"object"===typeof p&&null!==p&&"function"===typeof p.then){var l=o.ping;p.then(l,l)}else{o.abortSet.delete(o),c.status=4;var u=o.blockedBoundary,d=p,h=hn(a,d);if(null===u?pn(a,d):(u.pendingTasks--,u.forceClientRender||(u.forceClientRender=!0,u.errorDigest=h,u.parentFlushed&&a.clientRenderedBoundaries.push(u))),a.allPendingTasks--,0===a.allPendingTasks)(0,a.onAllReady)()}}}}s.splice(0,i),null!==e.destination&&Nn(e,e.destination)}catch(p){hn(e,p),pn(e,p)}finally{on=r,an.current=n,n===sn&&Pt(t)}}}function An(e,t,n){switch(n.parentFlushed=!0,n.status){case 0:var r=n.id=e.nextSegmentId++;return n.lastPushedText=!1,n.textEmbedded=!1,e=e.responseState,a(t,le),a(t,e.placeholderPrefix),a(t,e=d(r.toString(16))),c(t,ue);case 1:n.status=2;var s=!0;r=n.chunks;var o=0;n=n.children;for(var l=0;l<n.length;l++){for(s=n[l];o<s.index;o++)a(t,r[o]);s=Sn(e,t,s)}for(;o<r.length-1;o++)a(t,r[o]);return o<r.length&&(s=c(t,r[o])),s;default:throw Error(i(390))}}function Sn(e,t,n){var r=n.boundary;if(null===r)return An(e,t,n);if(r.parentFlushed=!0,r.forceClientRender)r=r.errorDigest,c(t,fe),a(t,ge),r&&(a(t,ve),a(t,d(A(r))),a(t,ye)),c(t,we),An(e,t,n);else if(0<r.pendingTasks){r.rootSegmentID=e.nextSegmentId++,0<r.completedSegments.length&&e.partialBoundaries.push(r);var s=e.responseState,o=s.nextSuspenseID++;s=h(s.boundaryPrefix+o.toString(16)),r=r.id=s,be(t,e.responseState,r),An(e,t,n)}else if(r.byteSize>e.progressiveChunkSize)r.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(r),be(t,e.responseState,r.id),An(e,t,n);else{if(c(t,de),1!==(n=r.completedSegments).length)throw Error(i(391));Sn(e,t,n[0])}return c(t,me)}function In(e,t,n){return function(e,t,n,r){switch(n.insertionMode){case 0:case 1:return a(e,xe),a(e,t.segmentPrefix),a(e,d(r.toString(16))),c(e,Ee);case 2:return a(e,ke),a(e,t.segmentPrefix),a(e,d(r.toString(16))),c(e,Ce);case 3:return a(e,Se),a(e,t.segmentPrefix),a(e,d(r.toString(16))),c(e,Ie);case 4:return a(e,Pe),a(e,t.segmentPrefix),a(e,d(r.toString(16))),c(e,Ne);case 5:return a(e,Oe),a(e,t.segmentPrefix),a(e,d(r.toString(16))),c(e,Me);case 6:return a(e,Le),a(e,t.segmentPrefix),a(e,d(r.toString(16))),c(e,De);case 7:return a(e,Ue),a(e,t.segmentPrefix),a(e,d(r.toString(16))),c(e,Fe);default:throw Error(i(397))}}(t,e.responseState,n.formatContext,n.id),Sn(e,t,n),function(e,t){switch(t.insertionMode){case 0:case 1:return c(e,_e);case 2:return c(e,Ae);case 3:return c(e,Te);case 4:return c(e,Re);case 5:return c(e,je);case 6:return c(e,Be);case 7:return c(e,$e);default:throw Error(i(397))}}(t,n.formatContext)}function Tn(e,t,n){for(var r=n.completedSegments,s=0;s<r.length;s++)Pn(e,t,n,r[s]);if(r.length=0,e=e.responseState,r=n.id,n=n.rootSegmentID,a(t,e.startInlineScript),e.sentCompleteBoundaryFunction?a(t,Ge):(e.sentCompleteBoundaryFunction=!0,a(t,Ve)),null===r)throw Error(i(395));return n=d(n.toString(16)),a(t,r),a(t,Ke),a(t,e.segmentPrefix),a(t,n),c(t,Ze)}function Pn(e,t,n,r){if(2===r.status)return!0;var s=r.id;if(-1===s){if(-1===(r.id=n.rootSegmentID))throw Error(i(392));return In(e,t,r)}return In(e,t,r),a(t,(e=e.responseState).startInlineScript),e.sentCompleteSegmentFunction?a(t,He):(e.sentCompleteSegmentFunction=!0,a(t,ze)),a(t,e.segmentPrefix),a(t,s=d(s.toString(16))),a(t,We),a(t,e.placeholderPrefix),a(t,s),c(t,qe)}function Nn(e,t){s=new Uint8Array(512),o=0;try{var n=e.completedRootSegment;if(null!==n&&0===e.pendingRootTasks){Sn(e,t,n),e.completedRootSegment=null;var r=e.responseState.bootstrapChunks;for(n=0;n<r.length-1;n++)a(t,r[n]);n<r.length&&c(t,r[n])}var u,h=e.clientRenderedBoundaries;for(u=0;u<h.length;u++){var p=h[u];r=t;var f=e.responseState,m=p.id,g=p.errorDigest,y=p.errorMessage,v=p.errorComponentStack;if(a(r,f.startInlineScript),f.sentClientRenderFunction?a(r,Qe):(f.sentClientRenderFunction=!0,a(r,Ye)),null===m)throw Error(i(395));if(a(r,m),a(r,Je),(g||y||v)&&(a(r,et),a(r,d(nt(g||"")))),(y||v)&&(a(r,et),a(r,d(nt(y||"")))),v&&(a(r,et),a(r,d(nt(v)))),!c(r,Xe))return e.destination=null,u++,void h.splice(0,u)}h.splice(0,u);var w=e.completedBoundaries;for(u=0;u<w.length;u++)if(!Tn(e,t,w[u]))return e.destination=null,u++,void w.splice(0,u);w.splice(0,u),l(t),s=new Uint8Array(512),o=0;var b=e.partialBoundaries;for(u=0;u<b.length;u++){var x=b[u];e:{h=e,p=t;var E=x.completedSegments;for(f=0;f<E.length;f++)if(!Pn(h,p,x,E[f])){f++,E.splice(0,f);var _=!1;break e}E.splice(0,f),_=!0}if(!_)return e.destination=null,u++,void b.splice(0,u)}b.splice(0,u);var k=e.completedBoundaries;for(u=0;u<k.length;u++)if(!Tn(e,t,k[u]))return e.destination=null,u++,void k.splice(0,u);k.splice(0,u)}finally{l(t),0===e.allPendingTasks&&0===e.pingedTasks.length&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&t.close()}}function Rn(e,t){try{var n=e.abortableTasks;n.forEach((function(n){return En(n,e,t)})),n.clear(),null!==e.destination&&Nn(e,e.destination)}catch(r){hn(e,r),pn(e,r)}}t.renderToReadableStream=function(e,t){return new Promise((function(n,r){var i,s,o=new Promise((function(e,t){s=e,i=t})),a=function(e,t,n,r,i,s,o,a,c){var l=[],u=new Set;return(n=dn(t={destination:null,responseState:t,progressiveChunkSize:void 0===r?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:u,pingedTasks:l,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===i?cn:i,onAllReady:void 0===s?ln:s,onShellReady:void 0===o?ln:o,onShellError:void 0===a?ln:a,onFatalError:void 0===c?ln:c},0,null,n,!1,!1)).parentFlushed=!0,e=un(t,e,null,n,u,Et,null,Ot),l.push(e),t}(e,function(e,t,n,r,i){e=void 0===e?"":e,t=void 0===t?P:h('<script nonce="'+A(t)+'">');var s=[];if(void 0!==n&&s.push(t,d((""+n).replace(j,L)),N),void 0!==r)for(n=0;n<r.length;n++)s.push(R,d(A(r[n])),M);if(void 0!==i)for(r=0;r<i.length;r++)s.push(O,d(A(i[r])),M);return{bootstrapChunks:s,startInlineScript:t,placeholderPrefix:h(e+"P:"),segmentPrefix:h(e+"S:"),boundaryPrefix:e+"B:",idPrefix:e,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}(t?t.identifierPrefix:void 0,t?t.nonce:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),function(e){return D("http://www.w3.org/2000/svg"===e?2:"http://www.w3.org/1998/Math/MathML"===e?3:0,null)}(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,s,(function(){var e=new ReadableStream({type:"bytes",pull:function(e){if(1===a.status)a.status=2,p(e,a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=e;try{Nn(a,e)}catch(t){hn(a,t),pn(a,t)}}},cancel:function(){Rn(a)}},{highWaterMark:0});e.allReady=o,n(e)}),(function(e){o.catch((function(){})),r(e)}),i);if(t&&t.signal){var c=t.signal,l=function(){Rn(a,c.reason),c.removeEventListener("abort",l)};c.addEventListener("abort",l)}Cn(a)}))},t.version="18.2.0"}
2,1043:(e,t,n)=>{const r=n(6580).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,n=r(e),i=145===n?26:2*Math.ceil((n-13)/(2*t-2)),s=[n-7];for(let r=1;r<t-1;r++)s[r]=s[r-1]-i;return s.push(6),s.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),i=r.length;for(let t=0;t<i;t++)for(let e=0;e<i;e++)0===t&&0===e||0===t&&e===i-1||t===i-1&&0===e||n.push([r[t],r[e]]);return n}},1101:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDarkMode=t.isMobileWeb=t.getLocation=t.createQrUrl=void 0,t.createQrUrl=function(e,t,n,r,i,s){const o=r?"parent-id":"id";return`${n}/#/link?${new URLSearchParams({[o]:e,secret:t,server:n,v:i,chainId:s.toString()}).toString()}`},t.getLocation=function(){try{return function(){try{return null!==window.frameElement}catch(e){return!1}}()&&window.top?window.top.location:window.location}catch(e){return window.location}},t.isMobileWeb=function(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.userAgent)},t.isDarkMode=function(){var e,t;return null!==(t=null===(e=null===window||void 0===window?void 0:window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-color-scheme: dark)").matches)&&void 0!==t&&t}},1115:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.getErrorCode=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(1195),i="Unspecified error message.";function s(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(e&&Number.isInteger(e)){const n=e.toString();if(l(r.errorValues,n))return r.errorValues[n].message;if(a(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function o(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!r.errorValues[t]||!!a(e)}function a(e){return e>=-32099&&e<=-32e3}function c(e){return e&&"object"===typeof e&&!Array.isArray(e)?Object.assign({},e):e}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){return"object"===typeof e&&null!==e&&t in e&&"string"===typeof e[t]}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=s,t.isValidCode=o,t.getErrorCode=function(e){var t;return"number"===typeof e?e:function(e){return"object"===typeof e&&null!==e&&("number"===typeof e.code||"number"===typeof e.errorCode)}(e)?null!==(t=e.code)&&void 0!==t?t:e.errorCode:void 0},t.serialize=function(e){let{shouldIncludeStack:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};if(e&&"object"===typeof e&&!Array.isArray(e)&&l(e,"code")&&o(e.code)){const t=e;n.code=t.code,t.message&&"string"===typeof t.message?(n.message=t.message,l(t,"data")&&(n.data=t.data)):(n.message=s(n.code),n.data={originalError:c(e)})}else n.code=r.standardErrorCodes.rpc.internal,n.message=u(e,"message")?e.message:i,n.data={originalError:c(e)};return t&&(n.stack=u(e,"stack")?e.stack:void 0),n}},1195:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.standardErrorCodes=void 0,t.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}},1208:(e,t,n)=>{"use strict";
2Object.defineProperty(t,"__esModule",{value:!0});var r=n(3310),i=n(5070);function s(e,t,n){for(var i=1634760805,s=857760878,o=2036477234,a=1797285236,c=n[3]<<24|n[2]<<16|n[1]<<8|n[0],l=n[7]<<24|n[6]<<16|n[5]<<8|n[4],u=n[11]<<24|n[10]<<16|n[9]<<8|n[8],d=n[15]<<24|n[14]<<16|n[13]<<8|n[12],h=n[19]<<24|n[18]<<16|n[17]<<8|n[16],p=n[23]<<24|n[22]<<16|n[21]<<8|n[20],f=n[27]<<24|n[26]<<16|n[25]<<8|n[24],m=n[31]<<24|n[30]<<16|n[29]<<8|n[28],g=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],v=t[11]<<24|t[10]<<16|t[9]<<8|t[8],w=t[15]<<24|t[14]<<16|t[13]<<8|t[12],b=i,x=s,E=o,_=a,k=c,C=l,A=u,S=d,I=h,T=p,P=f,N=m,R=g,O=y,M=v,j=w,L=0;L<20;L+=2)k=(k^=I=I+(R=(R^=b=b+k|0)>>>16|R<<16)|0)>>>20|k<<12,C=(C^=T=T+(O=(O^=x=x+C|0)>>>16|O<<16)|0)>>>20|C<<12,A=(A^=P=P+(M=(M^=E=E+A|0)>>>16|M<<16)|0)>>>20|A<<12,S=(S^=N=N+(j=(j^=_=_+S|0)>>>16|j<<16)|0)>>>20|S<<12,A=(A^=P=P+(M=(M^=E=E+A|0)>>>24|M<<8)|0)>>>25|A<<7,S=(S^=N=N+(j=(j^=_=_+S|0)>>>24|j<<8)|0)>>>25|S<<7,C=(C^=T=T+(O=(O^=x=x+C|0)>>>24|O<<8)|0)>>>25|C<<7,k=(k^=I=I+(R=(R^=b=b+k|0)>>>24|R<<8)|0)>>>25|k<<7,C=(C^=P=P+(j=(j^=b=b+C|0)>>>16|j<<16)|0)>>>20|C<<12,A=(A^=N=N+(R=(R^=x=x+A|0)>>>16|R<<16)|0)>>>20|A<<12,S=(S^=I=I+(O=(O^=E=E+S|0)>>>16|O<<16)|0)>>>20|S<<12,k=(k^=T=T+(M=(M^=_=_+k|0)>>>16|M<<16)|0)>>>20|k<<12,S=(S^=I=I+(O=(O^=E=E+S|0)>>>24|O<<8)|0)>>>25|S<<7,k=(k^=T=T+(M=(M^=_=_+k|0)>>>24|M<<8)|0)>>>25|k<<7,A=(A^=N=N+(R=(R^=x=x+A|0)>>>24|R<<8)|0)>>>25|A<<7,C=(C^=P=P+(j=(j^=b=b+C|0)>>>24|j<<8)|0)>>>25|C<<7;r.writeUint32LE(b+i|0,e,0),r.writeUint32LE(x+s|0,e,4),r.writeUint32LE(E+o|0,e,8),r.writeUint32LE(_+a|0,e,12),r.writeUint32LE(k+c|0,e,16),r.writeUint32LE(C+l|0,e,20),r.writeUint32LE(A+u|0,e,24),r.writeUint32LE(S+d|0,e,28),r.writeUint32LE(I+h|0,e,32),r.writeUint32LE(T+p|0,e,36),r.writeUint32LE(P+f|0,e,40),r.writeUint32LE(N+m|0,e,44),r.writeUint32LE(R+g|0,e,48),r.writeUint32LE(O+y|0,e,52),r.writeUint32LE(M+v|0,e,56),r.writeUint32LE(j+w|0,e,60)}function o(e,t,n,r,o){if(void 0===o&&(o=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var c,l;if(0===o){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");l=(c=new Uint8Array(16)).length-t.length,c.set(t,l)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");c=t,l=o}for(var u=new Uint8Array(64),d=0;d<n.length;d+=64){s(u,c,e);for(var h=d;h<d+64&&h<n.length;h++)r[h]=n[h]^u[h-d];a(c,0,l)}return i.wipe(u),0===o&&i.wipe(c),r}function a(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=o,t.stream=function(e,t,n,r){return void 0===r&&(r=0),i.wipe(n),o(e,t,n,n,r)}},1236:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelayUI=void 0;const r=n(4388),i=n(2622);t.WalletLinkRelayUI=class{constructor(){this.attached=!1,this.snackbar=new i.Snackbar}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.snackbar.attach(t),this.attached=!0,(0,r.injectCssReset)()}showConnecting(e){let t;return t=e.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:{message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.9687
25C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}}},1351:(e,t,n)=>{const r=n(794),i=n(3527),s=n(4927),o=n(7404),a=n(8647),c=n(9526),l=n(6580),u=n(2238);function d(e){return unescape(encodeURIComponent(e)).length}function h(e,t,n){const r=[];let i;for(;null!==(i=e.exec(n));)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function p(e){const t=h(c.NUMERIC,r.NUMERIC,e),n=h(c.ALPHANUMERIC,r.ALPHANUMERIC,e);let i,s;l.isKanjiModeEnabled()?(i=h(c.BYTE,r.BYTE,e),s=h(c.KANJI,r.KANJI,e)):(i=h(c.BYTE_KANJI,r.BYTE,e),s=[]);return t.concat(n,i,s).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function f(e,t){switch(t){case r.NUMERIC:return i.getBitsLength(e);case r.ALPHANUMERIC:return s.getBitsLength(e);case r.KANJI:return a.getBitsLength(e);case r.BYTE:return o.getBitsLength(e)}}function m(e,t){let n;const c=r.getBestModeForData(e);if(n=r.from(t,c),n!==r.BYTE&&n.bit<c.bit)throw new Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(c));switch(n!==r.KANJI||l.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new i(e);case r.ALPHANUMERIC:return new s(e);case r.KANJI:return new a(e);case r.BYTE:return new o(e)}}t.fromArray=function(e){return e.reduce((function(e,t){return"string"===typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e}),[])},t.fromString=function(e,n){const i=function(e){const t=[];for(let n=0;n<e.length;n++){const i=e[n];switch(i.mode){case r.NUMERIC:t.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:t.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:t.push([i,{data:i.data,mode:r.BYTE,length:d(i.data)}]);break;case r.BYTE:t.push([{data:i.data,mode:r.BYTE,length:d(i.data)}])}}return t}(p(e,l.isKanjiModeEnabled())),s=function(e,t){const n={},i={start:{}};let s=["start"];for(let o=0;o<e.length;o++){const a=e[o],c=[];for(let e=0;e<a.length;e++){const l=a[e],u=""+o+e;c.push(u),n[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<s.length;e++){const o=s[e];n[o]&&n[o].node.mode===l.mode?(i[o][u]=f(n[o].lastCount+l.length,l.mode)-f(n[o].lastCount,l.mode),n[o].lastCount+=l.length):(n[o]&&(n[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,t))}}s=c}for(let r=0;r<s.length;r++)i[s[r]].end=0;return{map:i,table:n}}(i,n),o=u.find_path(s.map,"start","end"),a=[];for(let t=1;t<o.length-1;t++)a.push(s.table[o[t]].node);return t.fromArray(function(e){return e.reduce((function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(a))},t.rawSplit=function(e){return t.fromArray(p(e,l.isKanjiModeEnabled()))}},1352:(e,t,n)=>{"use strict";var r=n(7119);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},1359:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}},1384:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.APP_VERSION_KEY=t.LOCAL_STORAGE_ADDRESSES_KEY=t.WALLET_USER_NAME_KEY=void 0,t.WALLET_USER_NAME_KEY="walletUsername",t.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",t.APP_VERSION_KEY="AppVersion"},1392:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useCallback:()=>C,useContext:()=>A,useDebugValue:()=>S,useEffect:()=>b,useErrorBoundary:()=>I,useId:()=>T,useImperativeHandle:()=>_,useLayoutEffect:()=>x,useMemo:()=>k,useReducer:()=>w,useRef:()=>E,useState:()=>v});var r,i,s,o,a=n(4746),c=0,l=[],u=a.options,d=u.__b,h=u.__r,p=u.diffed,f=u.__c,m=u.unmount,g=u.__;function y(e,t){u.__h&&u.__h(i,e,c||t),c=0;var n=i.__H||(i.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function v(e){return c=1,w(L,e)}function w(e,t,n){var s=y(r++,2);if(s.t=e,!s.__c&&(s.__=[n?n(t):L(void 0,t),function(e){var t=s.__N?s.__N[0]:s.__[0],n=s.t(t,e);t!==n&&(s.__N=[n,s.__[1]],s.__c.setState({}))}],s.__c=i,!i.u)){var o=function(e,t,n){if(!s.__c.__H)return!0;var r=s.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!a||a.call(this,e,t,n);var i=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&s.__c.props===e)&&(!a||a.call(this,e,t,n))};i.u=!0;var a=i.shouldComponentUpdate,c=i.componentWillUpdate;i.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,o(e,t,n),a=r}c&&c.call(this,e,t,n)},i.shouldComponentUpdate=o}return s.__N||s.__}function b(e,t){var n=y(r++,3);!u.__s&&j(n.__H,t)&&(n.__=e,n.i=t,i.__H.__h.push(n))}function x(e,t){var n=y(r++,4);!u.__s&&j(n.__H,t)&&(n.__=e,n.i=t,i.__h.push(n))}function E(e){return c=5,k((function(){return{current:e}}),[])}function _(e,t,n){c=6,x((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function k(e,t){var n=y(r++,7);return j(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C(e,t){return c=8,k((function(){return e}),t)}function A(e){var t=i.context[e.__c],n=y(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(i)),t.props.value):e.__}function S(e,t){u.useDebugValue&&u.useDebugValue(t?t(e):e)}function I(e){var t=y(r++,10),n=v();return t.__=e,i.componentDidCatch||(i.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function T(){var e=y(r++,11);if(!e.__){for(var t=i.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function P(){for(var e;e=l.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(O),e.__H.__h.forEach(M),e.__H.__h=[]}catch(r){e.__H.__h=[],u.__e(r,e.__v)}}u.__b=function(e){i=null,d&&d(e)},u.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),g&&g(e,t)},u.__r=function(e){h&&h(e),r=0;var t=(i=e.__c).__H;t&&(s===i?(t.__h=[],i.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(O),t.__h.forEach(M),t.__h=[],r=0)),s=i},u.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==l.push(t)&&o===u.requestAnimationFrame||((o=u.requestAnimationFrame)||R)(P)),t.__H.__.forEach((function(e){e.i&&
2(e.__H=e.i),e.i=void 0}))),s=i=null},u.__c=function(e,t){t.some((function(e){try{e.__h.forEach(O),e.__h=e.__h.filter((function(e){return!e.__||M(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.__e(i,e.__v)}})),f&&f(e,t)},u.unmount=function(e){m&&m(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{O(e)}catch(e){t=e}})),n.__H=void 0,t&&u.__e(t,n.__v))};var N="function"==typeof requestAnimationFrame;function R(e){var t,n=function(){clearTimeout(r),N&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);N&&(t=requestAnimationFrame(n))}function O(e){var t=i,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),i=t}function M(e){var t=i;e.__c=e.__(),i=t}function j(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function L(e,t){return"function"==typeof t?t(e):t}},1421:(e,t,n)=>{function r(e){try{if(!n.g.localStorage)return!1}catch(r){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},1470:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6104),i=n(6566),s=n(5070),o=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var i=0;i<n.length;i++)n[i]^=54;this._inner.update(n);for(i=0;i<n.length;i++)n[i]^=106;this._outer.update(n),r.isSerializableHash(this._inner)&&r.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),s.wipe(n)}return e.prototype.reset=function(){if(!r.isSerializableHash(this._inner)||!r.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){r.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),r.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!r.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!r.isSerializableHash(this._inner)||!r.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!r.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();t.HMAC=o,t.hmac=function(e,t,n){var r=new o(e,t);r.update(n);var i=r.digest();return r.clean(),i},t.equal=i.equal},1560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8686);r.__exportStar(n(1359),t),r.__exportStar(n(6367),t)}
2,1579:(e,t,n)=>{const r=n(8361);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let s=0;s<t.length;s++)n[i+s]^=r.mul(e[i],t[s]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const e=n[0];for(let s=0;s<t.length;s++)n[s]^=r.mul(t[s],e);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let i=0;i<e;i++)n=t.mul(n,new Uint8Array([1,r.exp(i)]));return n}},1581:(e,t,n)=>{var r=n(4635),i=Object.prototype,s=i.hasOwnProperty,o=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=s.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(c){}var i=o.call(e);return r&&(t?e[a]=n:delete e[a]),i}},1596:e=>{"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},1726:(e,t,n)=>{const r=n(6580).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},1761:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<s(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var a=2*(r+1)-1,c=e[a],l=a+1,u=e[l];if(0>s(c,n))l<i&&0>s(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[a]=n,r=a);else{if(!(l<i&&0>s(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}function s(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,c=a.now();t.unstable_now=function(){return a.now()-c}}var l=[],u=[],d=1,h=null,p=3,f=!1,m=!1,g=!1,y="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,w="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(l,t)}t=r(u)}}function x(e){if(g=!1,b(e),!m)if(null!==r(l))m=!0,O(E);else{var t=r(u);null!==t&&M(x,t.startTime-e)}}function E(e,n){m=!1,g&&(g=!1,v(A),A=-1),f=!0;var s=p;try{for(b(n),h=r(l);null!==h&&(!(h.expirationTime>n)||e&&!T());){var o=h.callback;if("function"===typeof o){h.callback=null,p=h.priorityLevel;var a=o(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof a?h.callback=a:h===r(l)&&i(l),b(n)}else i(l);h=r(l)}if(null!==h)var c=!0;else{var d=r(u);null!==d&&M(x,d.startTime-n),c=!1}return c}finally{h=null,p=s,f=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);
vendor: 5,265 bytes, line 2
2var _,k=!1,C=null,A=-1,S=5,I=-1;function T(){return!(t.unstable_now()-I<S)}function P(){if(null!==C){var e=t.unstable_now();I=e;var n=!0;try{n=C(!0,e)}finally{n?_():(k=!1,C=null)}}else k=!1}if("function"===typeof w)_=function(){w(P)};else if("undefined"!==typeof MessageChannel){var N=new MessageChannel,R=N.port2;N.port1.onmessage=P,_=function(){R.postMessage(null)}}else _=function(){y(P,0)};function O(e){C=e,k||(k=!0,_())}function M(e,n){A=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,O(E))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,s){var o=t.unstable_now();switch("object"===typeof s&&null!==s?s="number"===typeof(s=s.delay)&&0<s?o+s:o:s=o,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:s,expirationTime:a=s+a,sortIndex:-1},s>o?(e.sortIndex=s,n(u,e),null===r(l)&&e===r(u)&&(g?(v(A),A=-1):g=!0,M(x,s-o))):(e.sortIndex=a,n(l,e),m||f||(m=!0,O(E))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},1776:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1900);r.__exportStar(n(2623),t),r.__exportStar(n(5227),t)},1812:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",o="[object Array]",a="[object Boolean]",c="[object Date]",l="[object Error]",u="[object Function]",d="[object Map]",h="[object Number]",p="[object Object]",f="[object Promise]",m="[object RegExp]",g="[object Set]",y="[object String]",v="[object Symbol]",w="[object WeakMap]",b="[object ArrayBuffer]",x="[object DataView]",E=/^\[object .+?Constructor\]$/,_=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[s]=k[o]=k[b]=k[a]=k[x]=k[c]=k[l]=k[u]=k[d]=k[h]=k[p]=k[m]=k[g]=k[y]=k[w]=!1;var C="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,A="object"==typeof self&&self&&self.Object===Object&&self,S=C||A||Function("return this")(),I=t&&!t.nodeType&&t,T=I&&e&&!e.nodeType&&e,P=T&&T.exports===I,N=P&&C.process,R=function(){try{return N&&N.binding&&N.binding("util")}catch(e){}}(),O=R&&R.isTypedArray;function M(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function j(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function L(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var D,B,U=Array.prototype,F=Function.prototype,$=Object.prototype,z=S["__core-js_shared__"],H=F.toString,W=$.hasOwnProperty,q=function(){var e=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),V=$.toString,G=RegExp("^"+H.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),K=P?S.Buffer:void 0,Z=S.Symbol,Y=S.Uint8Array,Q=$.propertyIsEnumerable,J=U.splice,X=Z?Z.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=K?K.isBuffer:void 0,ne=(D=Object.keys,B=Object,function(e){return D(B(e))}),re=Ne(S,"DataView"),ie=Ne(S,"Map"),se=Ne(S,"Promise"),oe=Ne(S,"Set"),ae=Ne(S,"WeakMap"),ce=Ne(Object,"create"),le=je(re),ue=je(ie),de=je(se),he=je(oe),pe=je(ae),fe=Z?Z.prototype:void 0,me=fe?fe.valueOf:void 0;function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function we(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ve;++t<n;)this.add(e[t])}function be(e){var t=this.__data__=new ye(e);this.size=t.size}function xe(e,t){var n=Be(e),r=!n&&De(e),i=!n&&!r&&Ue(e),s=!n&&!r&&!i&&We(e),o=n||r||i||s,a=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=a.length;for(var l in e)!t&&!W.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Me(l,c))||a.push(l);return a}function Ee(e,t){for(var n=e.length;n--;)if(Le(e[n][0],t))return n;return-1}
vendor: 1,208 bytes, line 2
2function _e(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":X&&X in Object(e)?function(e){var t=W.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch(s){}var i=V.call(e);r&&(t?e[X]=n:delete e[X]);return i}(e):function(e){return V.call(e)}(e)}function ke(e){return He(e)&&_e(e)==s}function Ce(e,t,n,r,i){return e===t||(null==e||null==t||!He(e)&&!He(t)?e!==e&&t!==t:function(e,t,n,r,i,u){var f=Be(e),w=Be(t),E=f?o:Oe(e),_=w?o:Oe(t),k=(E=E==s?p:E)==p,C=(_=_==s?p:_)==p,A=E==_;if(A&&Ue(e)){if(!Ue(t))return!1;f=!0,k=!1}if(A&&!k)return u||(u=new be),f||We(e)?Ie(e,t,n,r,i,u):function(e,t,n,r,i,s,o){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!s(new Y(e),new Y(t)));case a:case c:case h:return Le(+e,+t);case l:return e.name==t.name&&e.message==t.message;case m:case y:return e==t+"";case d:var u=j;case g:var p=1&r;if(u||(u=L),e.size!=t.size&&!p)return!1;var f=o.get(e);if(f)return f==t;r|=2,o.set(e,t);var w=Ie(u(e),u(t),r,i,s,o);return o.delete(e),w;case v:if(me)return me.call(e)==me.call(t)}return!1}(e,t,E,n,r,i,u);if(!(1&n)){var S=k&&W.call(e,"__wrapped__"),I=C&&W.call(t,"__wrapped__");
vendor: 5,465 bytes, line 2
2if(S||I){var T=S?e.value():e,P=I?t.value():t;return u||(u=new be),i(T,P,n,r,u)}}if(!A)return!1;return u||(u=new be),function(e,t,n,r,i,s){var o=1&n,a=Te(e),c=a.length,l=Te(t),u=l.length;if(c!=u&&!o)return!1;var d=c;for(;d--;){var h=a[d];if(!(o?h in t:W.call(t,h)))return!1}var p=s.get(e);if(p&&s.get(t))return p==t;var f=!0;s.set(e,t),s.set(t,e);var m=o;for(;++d<c;){var g=e[h=a[d]],y=t[h];if(r)var v=o?r(y,g,h,t,e,s):r(g,y,h,e,t,s);if(!(void 0===v?g===y||i(g,y,n,r,s):v)){f=!1;break}m||(m="constructor"==h)}if(f&&!m){var w=e.constructor,b=t.constructor;w==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(f=!1)}return s.delete(e),s.delete(t),f}(e,t,n,r,i,u)}(e,t,n,r,Ce,i))}function Ae(e){return!(!ze(e)||function(e){return!!q&&q in e}(e))&&(Fe(e)?G:E).test(je(e))}function Se(e){if(!function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||$;return e===n}(e))return ne(e);var t=[];for(var n in Object(e))W.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ie(e,t,n,r,i,s){var o=1&n,a=e.length,c=t.length;if(a!=c&&!(o&&c>a))return!1;var l=s.get(e);if(l&&s.get(t))return l==t;var u=-1,d=!0,h=2&n?new we:void 0;for(s.set(e,t),s.set(t,e);++u<a;){var p=e[u],f=t[u];if(r)var m=o?r(f,p,u,t,e,s):r(p,f,u,e,t,s);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!M(t,(function(e,t){if(o=t,!h.has(o)&&(p===e||i(p,e,n,r,s)))return h.push(t);var o}))){d=!1;break}}else if(p!==f&&!i(p,f,n,r,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function Te(e){return function(e,t,n){var r=t(e);return Be(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,qe,Re)}function Pe(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ne(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ae(n)?n:void 0}ge.prototype.clear=function(){this.__data__=ce?ce(null):{},this.size=0},ge.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ge.prototype.get=function(e){var t=this.__data__;if(ce){var n=t[e];return n===r?void 0:n}return W.call(t,e)?t[e]:void 0},ge.prototype.has=function(e){var t=this.__data__;return ce?void 0!==t[e]:W.call(t,e)},ge.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ce&&void 0===t?r:t,this},ye.prototype.clear=function(){this.__data__=[],this.size=0},ye.prototype.delete=function(e){var t=this.__data__,n=Ee(t,e);return!(n<0)&&(n==t.length-1?t.pop():J.call(t,n,1),--this.size,!0)},ye.prototype.get=function(e){var t=this.__data__,n=Ee(t,e);return n<0?void 0:t[n][1]},ye.prototype.has=function(e){return Ee(this.__data__,e)>-1},ye.prototype.set=function(e,t){var n=this.__data__,r=Ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ve.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(ie||ye),string:new ge}},ve.prototype.delete=function(e){var t=Pe(this,e).delete(e);return this.size-=t?1:0,t},ve.prototype.get=function(e){return Pe(this,e).get(e)},ve.prototype.has=function(e){return Pe(this,e).has(e)},ve.prototype.set=function(e,t){var n=Pe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},we.prototype.add=we.prototype.push=function(e){return this.__data__.set(e,r),this},we.prototype.has=function(e){return this.__data__.has(e)},be.prototype.clear=function(){this.__data__=new ye,this.size=0},be.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},be.prototype.get=function(e){return this.__data__.get(e)},be.prototype.has=function(e){return this.__data__.has(e)},be.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ye){var r=n.__data__;if(!ie||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ve(r)}return n.set(e,t),this.size=n.size,this};var Re=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}(ee(e),(function(t){return Q.call(e,t)})))}:function(){return[]},Oe=_e;function Me(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||_.test(e))&&e>-1&&e%1==0&&e<t}function je(e){if(null!=e){try{return H.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Le(e,t){return e===t||e!==e&&t!==t}(re&&Oe(new re(new ArrayBuffer(1)))!=x||ie&&Oe(new ie)!=d||se&&Oe(se.resolve())!=f||oe&&Oe(new oe)!=g||ae&&Oe(new ae)!=w)&&(Oe=function(e){var t=_e(e),n=t==p?e.constructor:void 0,r=n?je(n):"";if(r)switch(r){case le:return x;case ue:return d;case de:return f;case he:return g;case pe:return w}return t});var De=ke(function(){return arguments}())?ke:function(e){return He(e)&&W.call(e,"callee")&&!Q.call(e,"callee")},Be=Array.isArray;var Ue=te||function(){return!1};function Fe(e){if(!ze(e))return!1;var t=_e(e);return t==u||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function $e(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function ze(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function He(e){return null!=e&&"object"==typeof e}var We=O?function(e){return function(t){return e(t)}}(O):function(e){return He(e)&&$e(e.length)&&!!k[_e(e)]};function qe(e){return null!=(t=e)&&$e(t.length)&&!Fe(t)?xe(e):Se(e);var t}e.exports=function(e,t){return Ce(e,t)}},1870:(e,t,n)=>{"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkSession=void 0;const r=n(8e3),i=n(8114),s="session:id",o="session:secret",a="session:linked";class c{constructor(e,t,n,s){this._storage=e,this._id=t||(0,i.randomBytesHex)(16),this._secret=n||(0,i.randomBytesHex)(32),this._key=(new r.sha256).update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!s}static load(e){const t=e.getItem(s),n=e.getItem(a),r=e.getItem(o);return t&&r?new c(e,t,r,"1"===n):null}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(s,this._id),this._storage.setItem(o,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(a,this._linked?"1":"0")}}t.WalletLinkSession=c},1900:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__assign:()=>s,__asyncDelegator:()=>b,__asyncGenerator:()=>w,__asyncValues:()=>x,__await:()=>v,__awaiter:()=>u,__classPrivateFieldGet:()=>C,__classPrivateFieldSet:()=>A,__createBinding:()=>h,__decorate:()=>a,__exportStar:()=>p,__extends:()=>i,__generator:()=>d,__importDefault:()=>k,__importStar:()=>
2_,__makeTemplateObject:()=>E,__metadata:()=>l,__param:()=>c,__read:()=>m,__rest:()=>o,__spread:()=>g,__spreadArrays:()=>y,__values:()=>f});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}function c(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(a){s=[6,a],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function h(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function f(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return o}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var s=arguments[t],o=0,a=s.length;o<a;o++,i++)r[i]=s[o];return r}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){s.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,l):u(s[0][2],n)}catch(r){u(s[0][3],r)}var n}function c(e){a("next",e)}function l(e){a("throw",e)}function u(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=f(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
2function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function k(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},1939:(e,t,n)=>{"use strict";n.d(t,{WF:()=>s,AH:()=>r.AH,qy:()=>i.qy});var r=n(3103),i=n(9489);class s extends r.mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=(0,i.XX)(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i.c0}}s._$litElement$=!0,s.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const o=globalThis.litElementPolyfillSupport;o?.({LitElement:s});(globalThis.litElementVersions??=[]).push("4.0.6")},2022:(e,t,n)=>{var r=n(4635),i=n(1581),s=n(5336),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):s(e)}},2049:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}function v(){}function w(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var b=w.prototype=new v;b.constructor=w,m(b,y.prototype),b.isPureReactComponent=!0;var x=Array.isArray,E=Object.prototype.hasOwnProperty,_={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,r){var i,s={},o=null,a=null;if(null!=t)for(i in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)E.call(t,i)&&!k.hasOwnProperty(i)&&(s[i]=t[i]);var c=arguments.length-2;if(1===c)s.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps)void 0===s[i]&&(s[i]=c[i]);return{$$typeof:n,type:e,key:o,ref:a,props:s,_owner:_.current}}function A(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var S=/\/+/g;function I(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,i,s,o){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var c=!1;if(null===e)c=!0;else switch(a){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case n:case r:c=!0}}if(c)return o=o(c=e),e=""===s?"."+I(c,0):s,x(o)?(i="",null!=e&&(i=e.replace(S,"$&/")+"/"),T(o,t,i,"",(function(e){return e}))):null!=o&&(A(o)&&(o=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,i+(!o.key||c&&c.key===o.key?"":(""+o.key).replace(S,"$&/")+"/")+e)),t.push(o)),1;if(c=0,s=""===s?".":s+":",x(e))for(var l=0;l<e.length;l++){var u=s+I(a=e[l],l);c+=T(a,t,i,u,o)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),l=0;!(a=e.next()).done;)c+=T(a=a.value,t,i,u=s+I(a,l++),o);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function P(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function N(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R={current:null},O={transition:null},M={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:O,ReactCurrentOwner:_};t.Children={map:P,forEach:function(e,t,n){P(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!A(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=i,t.Profiler=o,t.PureComponent=w,t.StrictMode=s,t.Suspense=u,t.__SECRET_INT
vendor: 4,075 bytes, line 2
2ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=m({},e.props),s=e.key,o=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,a=_.current),void 0!==t.key&&(s=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)E.call(t,l)&&!k.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:n,type:e.type,key:s,ref:o,props:i,_owner:a}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=A,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:N}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=O.transition;O.transition={};try{e()}finally{O.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return R.current.useCallback(e,t)},t.useContext=function(e){return R.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return R.current.useDeferredValue(e)},t.useEffect=function(e,t){return R.current.useEffect(e,t)},t.useId=function(){return R.current.useId()},t.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return R.current.useMemo(e,t)},t.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},t.useRef=function(e){return R.current.useRef(e)},t.useState=function(e){return R.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return R.current.useTransition()},t.version="18.2.0"},2108:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}
2.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},2146:(e,t)=>{"use strict";function n(e){let t;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(t=window[e]),t}function r(e){const t=n(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=n,t.getFromWindowOrThrow=r,t.getDocumentOrThrow=function(){return r("document")},t.getDocument=function(){return n("document")},t.getNavigatorOrThrow=function(){return r("navigator")},t.getNavigator=function(){return n("navigator")},t.getLocationOrThrow=function(){return r("location")},t.getLocation=function(){return n("location")},t.getCryptoOrThrow=function(){return r("crypto")},t.getCrypto=function(){return n("crypto")},t.getLocalStorageOrThrow=function(){return r("localStorage")},t.getLocalStorage=function(){return n("localStorage")}},2168:(e,t)=>{function n(e){if("number"===typeof e&&(e=e.toString()),"string"!==typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t="undefined"===typeof e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const i=n.modules.size,s=n.modules.data,o=t.getScale(i,r),a=Math.floor((i+2*r.margin)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let t=0;t<a;t++)for(let n=0;n<a;n++){let u=4*(t*a+n),d=r.color.light;if(t>=c&&n>=c&&t<a-c&&n<a-c){d=l[s[Math.floor((t-c)/o)*i+Math.floor((n-c)/o)]?1:0]}e[u++]=d.r,e[u++]=d.g,e[u++]=d.b,e[u]=d.a}}},2208:(e,t,n)=>{"use strict";n.d(t,{s1:()=>i,QH:()=>_e,YW:()=>Ce,Vl:()=>s});n(3436);const r={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.NEXT_PUBLIC_SECURE_SITE_SDK_URL||"https://secure.walletconnect.com/sdk",i={APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@w3m-storage/",SESSION_TOKEN_KEY:"SESSION_TOKEN_KEY",EMAIL_LOGIN_USED_KEY:"EMAIL_LOGIN_USED_KEY",LAST_USED_CHAIN_KEY:"LAST_USED_CHAIN_KEY",LAST_EMAIL_LOGIN_TIME:"LAST_EMAIL_LOGIN_TIME",EMAIL:"EMAIL",PREFERRED_ACCOUNT_TYPE:"PREFERRED_ACCOUNT_TYPE",SMART_ACCOUNT_ENABLED:"SMART_ACCOUNT_ENABLED",SMART_ACCOUNT_ENABLED_NETWORKS:"SMART_ACCOUNT_ENABLED_NETWORKS",SO
2CIAL_USERNAME:"SOCIAL_USERNAME",SOCIAL:"@w3m/connected_social",APP_SWITCH_NETWORK:"@w3m-app/SWITCH_NETWORK",APP_CONNECT_EMAIL:"@w3m-app/CONNECT_EMAIL",APP_CONNECT_DEVICE:"@w3m-app/CONNECT_DEVICE",APP_CONNECT_OTP:"@w3m-app/CONNECT_OTP",APP_CONNECT_SOCIAL:"@w3m-app/CONNECT_SOCIAL",APP_GET_SOCIAL_REDIRECT_URI:"@w3m-app/GET_SOCIAL_REDIRECT_URI",APP_GET_USER:"@w3m-app/GET_USER",APP_SIGN_OUT:"@w3m-app/SIGN_OUT",APP_IS_CONNECTED:"@w3m-app/IS_CONNECTED",APP_GET_CHAIN_ID:"@w3m-app/GET_CHAIN_ID",APP_RPC_REQUEST:"@w3m-app/RPC_REQUEST",APP_UPDATE_EMAIL:"@w3m-app/UPDATE_EMAIL",APP_UPDATE_EMAIL_PRIMARY_OTP:"@w3m-app/UPDATE_EMAIL_PRIMARY_OTP",APP_UPDATE_EMAIL_SECONDARY_OTP:"@w3m-app/UPDATE_EMAIL_SECONDARY_OTP",APP_AWAIT_UPDATE_EMAIL:"@w3m-app/AWAIT_UPDATE_EMAIL",APP_SYNC_THEME:"@w3m-app/SYNC_THEME",APP_SYNC_DAPP_DATA:"@w3m-app/SYNC_DAPP_DATA",APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS:"@w3m-app/GET_SMART_ACCOUNT_ENABLED_NETWORKS",APP_INIT_SMART_ACCOUNT:"@w3m-app/INIT_SMART_ACCOUNT",APP_SET_PREFERRED_ACCOUNT:"@w3m-app/SET_PREFERRED_ACCOUNT",FRAME_SWITCH_NETWORK_ERROR:"@w3m-frame/SWITCH_NETWORK_ERROR",FRAME_SWITCH_NETWORK_SUCCESS:"@w3m-frame/SWITCH_NETWORK_SUCCESS",FRAME_CONNECT_EMAIL_ERROR:"@w3m-frame/CONNECT_EMAIL_ERROR",FRAME_CONNECT_EMAIL_SUCCESS:"@w3m-frame/CONNECT_EMAIL_SUCCESS",FRAME_CONNECT_DEVICE_ERROR:"@w3m-frame/CONNECT_DEVICE_ERROR",FRAME_CONNECT_DEVICE_SUCCESS:"@w3m-frame/CONNECT_DEVICE_SUCCESS",FRAME_CONNECT_OTP_SUCCESS:"@w3m-frame/CONNECT_OTP_SUCCESS",FRAME_CONNECT_OTP_ERROR:"@w3m-frame/CONNECT_OTP_ERROR",FRAME_CONNECT_SOCIAL_SUCCESS:"@w3m-frame/CONNECT_SOCIAL_SUCCESS",FRAME_CONNECT_SOCIAL_ERROR:"@w3m-frame/CONNECT_SOCIAL_ERROR",FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_SUCCESS",FRAME_GET_SOCIAL_REDIRECT_URI_ERROR:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_ERROR",FRAME_GET_USER_SUCCESS:"@w3m-frame/GET_USER_SUCCESS",FRAME_GET_USER_ERROR:"@w3m-frame/GET_USER_ERROR",FRAME_SIGN_OUT_SUCCESS:"@w3m-frame/SIGN_OUT_SUCCESS",FRAME_SIGN_OUT_ERROR:"@w3m-frame/SIGN_OUT_ERROR",FRAME_IS_CONNECTED_SUCCESS:"@w3m-frame/IS_CONNECTED_SUCCESS",FRAME_IS_CONNECTED_ERROR:"@w3m-frame/IS_CONNECTED_ERROR",FRAME_GET_CHAIN_ID_SUCCESS:"@w3m-frame/GET_CHAIN_ID_SUCCESS",FRAME_GET_CHAIN_ID_ERROR:"@w3m-frame/GET_CHAIN_ID_ERROR",FRAME_RPC_REQUEST_SUCCESS:"@w3m-frame/RPC_REQUEST_SUCCESS",FRAME_RPC_REQUEST_ERROR:"@w3m-frame/RPC_REQUEST_ERROR",FRAME_SESSION_UPDATE:"@w3m-frame/SESSION_UPDATE",FRAME_UPDATE_EMAIL_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SUCCESS",FRAME_UPDATE_EMAIL_ERROR:"@w3m-frame/UPDATE_EMAIL_ERROR",FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_ERROR",FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_ERROR",FRAME_SYNC_THEME_SUCCESS:"@w3m-frame/SYNC_THEME_SUCCESS",FRAME_SYNC_THEME_ERROR:"@w3m-frame/SYNC_THEME_ERROR",FRAME_SYNC_DAPP_DATA_SUCCESS:"@w3m-frame/SYNC_DAPP_DATA_SUCCESS",FRAME_SYNC_DAPP_DATA_ERROR:"@w3m-frame/SYNC_DAPP_DATA_ERROR",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR",FRAME_INIT_SMART_ACCOUNT_SUCCESS:"@w3m-frame/INIT_SMART_ACCOUNT_SUCCESS",FRAME_INIT_SMART_ACCOUNT_ERROR:"@w3m-frame/INIT_SMART_ACCOUNT_ERROR",FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:"@w3m-frame/SET_PREFERRED_ACCOUNT_SUCCESS",FRAME_SET_PREFERRED_ACCOUNT_ERROR:"@w3m-frame/SET_PREFERRED_ACCOUNT_ERROR",RPC_RESPONSE_TYPE_ERROR:"RPC_RESPONSE_ERROR",RPC_RESPONSE_TYPE_TX:"RPC_RESPONSE_TRANSACTION_HASH",RPC_RESPONSE_TYPE_OBJECT:"RPC_RESPONSE_OBJECT"},s={SAFE_RPC_METHODS:["eth_accounts","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getAccount","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockReceipts","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_maxPriorityFeePerGas","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],NOT_SAFE_RPC_METHODS:["personal_sign","eth_signTypedData_v4","eth_sendTransaction"],GET_CHAIN_ID:"eth_chainId",RPC_METHOD_NOT_ALLOWED_MESSAGE:"Requested RPC call is not allowed",RP
2C_METHOD_NOT_ALLOWED_UI_MESSAGE:"Action not allowed",ACCOUNT_TYPES:{EOA:"eoa",SMART_ACCOUNT:"smartAccount"}};var o=n(7116);const a=o.z.object({message:o.z.string()});function c(e){return o.z.literal(i[e])}o.z.object({accessList:o.z.array(o.z.string()),blockHash:o.z.string().nullable(),blockNumber:o.z.string().nullable(),chainId:o.z.string(),from:o.z.string(),gas:o.z.string(),hash:o.z.string(),input:o.z.string().nullable(),maxFeePerGas:o.z.string(),maxPriorityFeePerGas:o.z.string(),nonce:o.z.string(),r:o.z.string(),s:o.z.string(),to:o.z.string(),transactionIndex:o.z.string().nullable(),type:o.z.string(),v:o.z.string(),value:o.z.string()});const l=o.z.object({chainId:o.z.number()}),u=o.z.object({email:o.z.string().email()}),d=o.z.object({otp:o.z.string()}),h=o.z.object({uri:o.z.string()}),p=o.z.object({chainId:o.z.optional(o.z.number()),preferredAccountType:o.z.optional(o.z.string())}),f=o.z.object({provider:o.z.enum(["google","github","apple","facebook","x","discord"])}),m=o.z.object({email:o.z.string().email()}),g=o.z.object({otp:o.z.string()}),y=o.z.object({otp:o.z.string()}),v=o.z.object({themeMode:o.z.optional(o.z.enum(["light","dark"])),themeVariables:o.z.optional(o.z.record(o.z.string(),o.z.string().or(o.z.number()))),w3mThemeVariables:o.z.optional(o.z.record(o.z.string(),o.z.string()))}),w=o.z.object({metadata:o.z.object({name:o.z.string(),description:o.z.string(),url:o.z.string(),icons:o.z.array(o.z.string())}).optional(),sdkVersion:o.z.string(),projectId:o.z.string()}),b=o.z.object({type:o.z.string()}),x=o.z.object({action:o.z.enum(["VERIFY_DEVICE","VERIFY_OTP"])}),E=o.z.object({email:o.z.string(),address:o.z.string(),chainId:o.z.number(),userName:o.z.string().optional()}),_=o.z.object({action:o.z.enum(["VERIFY_PRIMARY_OTP","VERIFY_SECONDARY_OTP"])}),k=o.z.object({email:o.z.string().email(),address:o.z.string(),chainId:o.z.number(),smartAccountDeployed:o.z.optional(o.z.boolean()),preferredAccountType:o.z.optional(o.z.string())}),C=o.z.object({uri:o.z.string()}),A=o.z.object({isConnected:o.z.boolean()}),S=o.z.object({chainId:o.z.number()}),I=o.z.object({chainId:o.z.number()}),T=o.z.object({newEmail:o.z.string().email()}),P=o.z.object({smartAccountEnabledNetworks:o.z.array(o.z.number())}),N=(o.z.object({address:o.z.string(),isDeployed:o.z.boolean()}),o.z.object({type:o.z.string(),address:o.z.string()})),R=o.z.any(),O=o.z.object({method:o.z.literal("eth_accounts")}),M=o.z.object({method:o.z.literal("eth_blockNumber")}),j=o.z.object({method:o.z.literal("eth_call"),params:o.z.array(o.z.any())}),L=o.z.object({method:o.z.literal("eth_chainId")}),D=o.z.object({method:o.z.literal("eth_estimateGas"),params:o.z.array(o.z.any())}),B=o.z.object({method:o.z.literal("eth_feeHistory"),params:o.z.array(o.z.any())}),U=o.z.object({method:o.z.literal("eth_gasPrice")}),F=o.z.object({method:o.z.literal("eth_getAccount"),params:o.z.array(o.z.any())}),$=o.z.object({method:o.z.literal("eth_getBalance"),params:o.z.array(o.z.any())}),z=o.z.object({method:o.z.literal("eth_getBlockByHash"),params:o.z.array(o.z.any())}),H=o.z.object({method:o.z.literal("eth_getBlockByNumber"),params:o.z.array(o.z.any())}),W=o.z.object({method:o.z.literal("eth_getBlockReceipts"),params:o.z.array(o.z.any())}),q=o.z.object({method:o.z.literal("eth_getBlockTransactionCountByHash"),params:o.z.array(o.z.any())}),V=o.z.object({method:o.z.literal("eth_getBlockTransactionCountByNumber"),params:o.z.array(o.z.any())}),G=o.z.object({method:o.z.literal("eth_getCode"),params:o.z.array(o.z.any())}),K=o.z.object({method:o.z.literal("eth_getFilterChanges"),params:o.z.array(o.z.any())}),Z=o.z.object({method:o.z.literal("eth_getFilterLogs"),params:o.z.array(o.z.any())}),Y=o.z.object({method:o.z.literal("eth_getLogs"),params:o.z.array(o.z.any())}),Q=o.z.object({method:o.z.literal("eth_getProof"),params:o.z.array(o.z.any())}),J=o.z.object({method:o.z.literal("eth_getStorageAt"),params:o.z.array(o.z.any())}),X=o.z.object({method:o.z.literal("eth_getTransactionByBlockHashAndIndex"),params:o.z.array(o.z.any())}),ee=o.z.object({method:o.z.literal("eth_getTransactionByBlockNumberAndIndex"),params:o.z.array(o.z.any())}),te=o.z.object({method:o.z.literal("eth_getTransactionByHash"),params:o.z.array(o.z.any())}
2),ne=o.z.object({method:o.z.literal("eth_getTransactionCount"),params:o.z.array(o.z.any())}),re=o.z.object({method:o.z.literal("eth_getTransactionReceipt"),params:o.z.array(o.z.any())}),ie=o.z.object({method:o.z.literal("eth_getUncleCountByBlockHash"),params:o.z.array(o.z.any())}),se=o.z.object({method:o.z.literal("eth_getUncleCountByBlockNumber"),params:o.z.array(o.z.any())}),oe=o.z.object({method:o.z.literal("eth_maxPriorityFeePerGas")}),ae=o.z.object({method:o.z.literal("eth_newBlockFilter")}),ce=o.z.object({method:o.z.literal("eth_newFilter"),params:o.z.array(o.z.any())}),le=o.z.object({method:o.z.literal("eth_newPendingTransactionFilter")}),ue=o.z.object({method:o.z.literal("eth_sendRawTransaction"),params:o.z.array(o.z.any())}),de=o.z.object({method:o.z.literal("eth_syncing"),params:o.z.array(o.z.any())}),he=o.z.object({method:o.z.literal("eth_uninstallFilter"),params:o.z.array(o.z.any())}),pe=o.z.object({method:o.z.literal("personal_sign"),params:o.z.array(o.z.any())}),fe=o.z.object({method:o.z.literal("eth_signTypedData_v4"),params:o.z.array(o.z.any())}),me=o.z.object({method:o.z.literal("eth_sendTransaction"),params:o.z.array(o.z.any())}),ge=o.z.object({token:o.z.string()}),ye={appEvent:o.z.object({type:c("APP_SWITCH_NETWORK"),payload:l}).or(o.z.object({type:c("APP_CONNECT_EMAIL"),payload:u})).or(o.z.object({type:c("APP_CONNECT_DEVICE")})).or(o.z.object({type:c("APP_CONNECT_OTP"),payload:d})).or(o.z.object({type:c("APP_CONNECT_SOCIAL"),payload:h})).or(o.z.object({type:c("APP_GET_USER"),payload:o.z.optional(p)})).or(o.z.object({type:c("APP_GET_SOCIAL_REDIRECT_URI"),payload:f})).or(o.z.object({type:c("APP_SIGN_OUT")})).or(o.z.object({type:c("APP_IS_CONNECTED"),payload:o.z.optional(ge)})).or(o.z.object({type:c("APP_GET_CHAIN_ID")})).or(o.z.object({type:c("APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS")})).or(o.z.object({type:c("APP_INIT_SMART_ACCOUNT")})).or(o.z.object({type:c("APP_SET_PREFERRED_ACCOUNT"),payload:b})).or(o.z.object({type:c("APP_RPC_REQUEST"),payload:pe.or(me).or(O).or(M).or(j).or(L).or(D).or(B).or(U).or(F).or($).or(z).or(H).or(W).or(q).or(V).or(G).or(K).or(Z).or(Y).or(Q).or(J).or(X).or(ee).or(te).or(ne).or(re).or(ie).or(se).or(oe).or(ae).or(ce).or(le).or(ue).or(de).or(he).or(pe).or(fe).or(me)})).or(o.z.object({type:c("APP_UPDATE_EMAIL"),payload:m})).or(o.z.object({type:c("APP_UPDATE_EMAIL_PRIMARY_OTP"),payload:g})).or(o.z.object({type:c("APP_UPDATE_EMAIL_SECONDARY_OTP"),payload:y})).or(o.z.object({type:c("APP_SYNC_THEME"),payload:v})).or(o.z.object({type:c("APP_SYNC_DAPP_DATA"),payload:w})),frameEvent:o.z.object({type:c("FRAME_SWITCH_NETWORK_ERROR"),payload:a}).or(o.z.object({type:c("FRAME_SWITCH_NETWORK_SUCCESS"),payload:I})).or(o.z.object({type:c("FRAME_CONNECT_EMAIL_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_CONNECT_EMAIL_SUCCESS"),payload:x})).or(o.z.object({type:c("FRAME_CONNECT_OTP_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_CONNECT_OTP_SUCCESS")})).or(o.z.object({type:c("FRAME_CONNECT_DEVICE_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_CONNECT_DEVICE_SUCCESS")})).or(o.z.object({type:c("FRAME_CONNECT_SOCIAL_SUCCESS"),payload:E})).or(o.z.object({type:c("FRAME_CONNECT_SOCIAL_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_GET_USER_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_GET_USER_SUCCESS"),payload:k})).or(o.z.object({type:c("FRAME_GET_SOCIAL_REDIRECT_URI_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS"),payload:C})).or(o.z.object({type:c("FRAME_SIGN_OUT_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_SIGN_OUT_SUCCESS")})).or(o.z.object({type:c("FRAME_IS_CONNECTED_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_IS_CONNECTED_SUCCESS"),payload:A})).or(o.z.object({type:c("FRAME_GET_CHAIN_ID_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_GET_CHAIN_ID_SUCCESS"),payload:S})).or(o.z.object({type:c("FRAME_RPC_REQUEST_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_RPC_REQUEST_SUCCESS"),payload:R})).or(o.z.object({type:c("FRAME_SESSION_UPDATE"),payload:ge})).or(o.z.object({type:c("FRAME_UPDATE_EMAIL_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_UPDATE_EMAIL_SUCCESS"),payload:_})).or(o.z.object({type:c("FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS")})).or(o.z.object({type:c("FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS"),payload:T})).or(o.z.object({type:c("FRAME_SYNC_THEME_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_SYNC_THEME_SUCCESS")})).or(o.z.object({type:c("FRAME_SYNC_DAPP_DATA_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_SYNC_DAPP_DATA_SUCCESS")})).or(o.z.object({type:c("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS"),payload:P})).or(o.z.object({type:c("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_INIT_SMART_ACCOUNT_ERROR"),payload:a})).or(o.z.object({type:c("FRAME_SET_PREFERRED_ACCOUNT_SUCCESS"),payload:N})).or(o.z.object({type:c("FRAME_SET_PREFERRED_ACCOUNT_ERROR"),payload:a}))},ve={set(e,t){_e.isClient&&localStorage.setItem(`${i.STORAGE_KEY}${e}`,t)},get:e=>_e.isClient?localStorage.getItem(`${i.STORAGE_KEY}${e}`):null,delete(e,t){_e.isClient&&(t?localStorage.removeItem(e):localStorage.removeItem(`${i.STORAGE_KEY}${e}`))}},we=/^0x(?:[A-Fa-f0-9]{64})$/u,be=/^0x(?:[a-fA-F0-9]{62,})$/u,xe=["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],Ee=3e4,_e={getBlockchainApiUrl(){try{const{timeZone:e}=(new Intl.DateTimeFormat).resolvedOptions(),t=e.toUpperCase();return xe.includes(t)?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com"}catch{return!1}},checkIfAllowedToTriggerEmail(){const e=ve.get(i.LAST_EMAIL_LOGIN_TIME);if(e){const t=Date.now()-Number(e);if(t<Ee){const e=Math.ceil((Ee-t)/1e3);throw new Error(`Please try again after ${e} seconds`)}}},getTimeToNextEmailLogin(){const e=ve.get(i.LAST_EMAIL_LOGIN_TIME);if(e){const t=Date.now()-Number(e);if(t<Ee)return Math.ceil((Ee-t)/1e3)}return 0},checkIfRequestExists(e){const t=this.getRequestMethod(e);return s.NOT_SAFE_RPC_METHODS.includes(t)||s.SAFE_RPC_METHODS.includes(t)},getRequestMethod:e=>e?.payload?.method,getResponseType(e){const{type:t,payload:n}=e;
2if(t===i.FRAME_RPC_REQUEST_ERROR)return i.RPC_RESPONSE_TYPE_ERROR;return"string"===typeof n&&(n.match(we)||n.match(be))?i.RPC_RESPONSE_TYPE_TX:i.RPC_RESPONSE_TYPE_OBJECT},checkIfRequestIsAllowed(e){const t=this.getRequestMethod(e);return s.SAFE_RPC_METHODS.includes(t)},isClient:"undefined"!==typeof window};class ke{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.iframe=null,this.rpcUrl=_e.getBlockchainApiUrl(),this.events={onFrameEvent:e=>{_e.isClient&&window.addEventListener("message",(t=>{let{data:n}=t;if(!n.type?.includes(i.FRAME_EVENT_KEY))return;const r=ye.frameEvent.parse(n);e(r)}))},onAppEvent:e=>{_e.isClient&&window.addEventListener("message",(t=>{let{data:n}=t;if(!n.type?.includes(i.APP_EVENT_KEY))return;const r=ye.appEvent.parse(n);e(r)}))},postAppEvent:e=>{if(_e.isClient){if(!this.iframe?.contentWindow)throw new Error("W3mFrame: iframe is not set");ye.appEvent.parse(e),window.postMessage(e),this.iframe.contentWindow.postMessage(e,"*")}},postFrameEvent:e=>{if(_e.isClient){if(!parent)throw new Error("W3mFrame: parent is not set");ye.frameEvent.parse(e),parent.postMessage(e,"*")}}},this.projectId=e,this.frameLoadPromise=new Promise(((e,t)=>{this.frameLoadPromiseResolver={resolve:e,reject:t}})),t&&(this.frameLoadPromise=new Promise(((e,t)=>{this.frameLoadPromiseResolver={resolve:e,reject:t}})),_e.isClient)){const t=document.createElement("iframe");t.id="w3m-iframe",t.src=`${r}?projectId=${e}`,t.style.position="fixed",t.style.zIndex="999999",t.style.display="none",t.style.opacity="0",t.style.borderBottomLeftRadius="clamp(0px, var(--wui-border-radius-l), 44px)",t.style.borderBottomRightRadius="clamp(0px, var(--wui-border-radius-l), 44px)",document.body.appendChild(t),this.iframe=t,this.iframe.onload=()=>{this.frameLoadPromiseResolver?.resolve(void 0)},this.iframe.onerror=()=>{this.frameLoadPromiseResolver?.reject("Unable to load email login dependency")}}}get networks(){const e=[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,324,280,100,8453,84531,7777777,999].map((e=>({[e]:{rpcUrl:`${this.rpcUrl}/v1/?chainId=eip155:${e}&projectId=${this.projectId}`,chainId:e}})));return Object.assign({},...e)}}class Ce{constructor(e){this.connectEmailResolver=void 0,this.connectDeviceResolver=void 0,this.connectOtpResolver=void 0,this.connectResolver=void 0,this.connectSocialResolver=void 0,this.disconnectResolver=void 0,this.isConnectedResolver=void 0,this.getChainIdResolver=void 0,this.get
2SocialRedirectUriResolver=void 0,this.switchChainResolver=void 0,this.rpcRequestResolver=void 0,this.updateEmailResolver=void 0,this.updateEmailPrimaryOtpResolver=void 0,this.updateEmailSecondaryOtpResolver=void 0,this.syncThemeResolver=void 0,this.syncDappDataResolver=void 0,this.smartAccountEnabledNetworksResolver=void 0,this.setPreferredAccountResolver=void 0,this.w3mFrame=new ke(e,!0),this.w3mFrame.events.onFrameEvent((e=>{switch(console.log("\ud83d\udcbb received",e),e.type){case i.FRAME_CONNECT_EMAIL_SUCCESS:return this.onConnectEmailSuccess(e);case i.FRAME_CONNECT_EMAIL_ERROR:return this.onConnectEmailError(e);case i.FRAME_CONNECT_DEVICE_SUCCESS:return this.onConnectDeviceSuccess();case i.FRAME_CONNECT_DEVICE_ERROR:return this.onConnectDeviceError(e);case i.FRAME_CONNECT_OTP_SUCCESS:return this.onConnectOtpSuccess();case i.FRAME_CONNECT_OTP_ERROR:return this.onConnectOtpError(e);case i.FRAME_CONNECT_SOCIAL_SUCCESS:return this.onConnectSocialSuccess(e);case i.FRAME_CONNECT_SOCIAL_ERROR:return this.onConnectSocialError(e);case i.FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS:return this.onGetSocialRedirectUriSuccess(e);case i.FRAME_GET_SOCIAL_REDIRECT_URI_ERROR:return this.onGetSocialRedirectUriError(e);case i.FRAME_GET_USER_SUCCESS:return this.onConnectSuccess(e);case i.FRAME_GET_USER_ERROR:return this.onConnectError(e);case i.FRAME_IS_CONNECTED_SUCCESS:return this.onIsConnectedSuccess(e);case i.FRAME_IS_CONNECTED_ERROR:return this.onIsConnectedError(e);case i.FRAME_GET_CHAIN_ID_SUCCESS:return this.onGetChainIdSuccess(e);case i.FRAME_GET_CHAIN_ID_ERROR:return this.onGetChainIdError(e);case i.FRAME_SIGN_OUT_SUCCESS:return this.onSignOutSuccess();case i.FRAME_SIGN_OUT_ERROR:return this.onSignOutError(e);case i.FRAME_SWITCH_NETWORK_SUCCESS:return this.onSwitchChainSuccess(e);case i.FRAME_SWITCH_NETWORK_ERROR:return this.onSwitchChainError(e);case i.FRAME_RPC_REQUEST_SUCCESS:return this.onRpcRequestSuccess(e);case i.FRAME_RPC_REQUEST_ERROR:return this.onRpcRequestError(e);case i.FRAME_SESSION_UPDATE:return this.onSessionUpdate(e);case i.FRAME_UPDATE_EMAIL_SUCCESS:return this.onUpdateEmailSuccess(e);case i.FRAME_UPDATE_EMAIL_ERROR:return this.onUpdateEmailError(e);case i.FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:return this.onUpdateEmailPrimaryOtpSuccess();case i.FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:return this.onUpdateEmailPrimaryOtpError(e);case i.FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:return this.onUpdateEmailSecondaryOtpSuccess(e);case i.FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:return this.onUpdateEmailSecondaryOtpError(e);case i.FRAME_SYNC_THEME_SUCCESS:return this.onSyncThemeSuccess();case i.FRAME_SYNC_THEME_ERROR:return this.onSyncThemeError(e);case i.FRAME_SYNC_DAPP_DATA_SUCCESS:return this.onSyncDappDataSuccess();case i.FRAME_SYNC_DAPP_DATA_ERROR:return this.onSyncDappDataError(e);case i.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:return this.onSmartAccountEnabledNetworksSuccess(e);case i.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:return this.onSmartAccountEnabledNetworksError(e);case i.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:return this.onSetPreferredAccountSuccess();case i.FRAME_SET_PREFERRED_ACCOUNT_ERROR:return this.onSetPreferredAccountError();default:return null}}))}getLoginEmailUsed(){return Boolean(ve.get(i.EMAIL_LOGIN_USED_KEY))}getEmail(){return ve.get(i.EMAIL)}rejectRpcRequest(){this.rpcRequestResolver?.reject()}async connectEmail(e){return await this.w3mFrame.frameLoadPromise,_e.checkIfAllowedToTriggerEmail(),this.w3mFrame.events.postAppEvent({type:i.APP_CONNECT_EMAIL,payload:e}),new Promise(((e,t)=>{this.connectEmailResolver={resolve:e,reject:t}}))}async connectDevice(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_CONNECT_DEVICE}),new Promise(((e,t)=>{this.connectDeviceResolver={resolve:e,reject:t}}))}async connectOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_CONNECT_OTP,payload:e}),new Promise(((e,t)=>{this.connectOtpResolver={resolve:e,reject:t}}))}async isConnected(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_IS_CONNECTED,payload:void 0}),new Promise(((e,t)=>{this.isConnectedResolver={resolve:e,reject:t}}))}async getChainId(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_GET_CHAIN_ID}),new Promise(((e,t)=>{this.getChainIdResolver={resolve:e,reject:t}}))}async getSocialRedirectUri(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_GET_SOCIAL_REDIRECT_URI,payload:e}),new Promise(((e,t)=>
2{this.getSocialRedirectUriResolver={resolve:e,reject:t}}))}async updateEmail(e){return await this.w3mFrame.frameLoadPromise,_e.checkIfAllowedToTriggerEmail(),this.w3mFrame.events.postAppEvent({type:i.APP_UPDATE_EMAIL,payload:e}),new Promise(((e,t)=>{this.updateEmailResolver={resolve:e,reject:t}}))}async updateEmailPrimaryOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_UPDATE_EMAIL_PRIMARY_OTP,payload:e}),new Promise(((e,t)=>{this.updateEmailPrimaryOtpResolver={resolve:e,reject:t}}))}async updateEmailSecondaryOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_UPDATE_EMAIL_SECONDARY_OTP,payload:e}),new Promise(((e,t)=>{this.updateEmailSecondaryOtpResolver={resolve:e,reject:t}}))}async syncTheme(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_SYNC_THEME,payload:e}),new Promise(((e,t)=>{this.syncThemeResolver={resolve:e,reject:t}}))}async syncDappData(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_SYNC_DAPP_DATA,payload:e}),new Promise(((e,t)=>{this.syncDappDataResolver={resolve:e,reject:t}}))}async getSmartAccountEnabledNetworks(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS}),new Promise(((e,t)=>{this.smartAccountEnabledNetworksResolver={resolve:e,reject:t}}))}async setPreferredAccount(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_SET_PREFERRED_ACCOUNT,payload:{type:e}}),new Promise(((e,t)=>{this.setPreferredAccountResolver={resolve:e,reject:t}}))}async connect(e){const t=e?.chainId??this.getLastUsedChainId()??1;return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_GET_USER,payload:{chainId:t}}),new Promise(((e,t)=>{this.connectResolver={resolve:e,reject:t}}))}async connectSocial(e){return this.w3mFrame.events.postAppEvent({type:i.APP_CONNECT_SOCIAL,payload:{uri:e}}),new Promise(((e,t)=>{this.connectSocialResolver={resolve:e,reject:t}}))}async switchNetwork(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_SWITCH_NETWORK,payload:{chainId:e}}),new Promise(((e,t)=>{this.switchChainResolver={resolve:e,reject:t}}))}async disconnect(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:i.APP_SIGN_OUT}),new Promise(((e,t)=>{this.disconnectResolver={resolve:e,reject:t}}))}async request(e){return await this.w3mFrame.frameLoadPromise,s.GET_CHAIN_ID===e.method?this.getLastUsedChainId():(this.w3mFrame.events.postAppEvent({type:i.APP_RPC_REQUEST,payload:e}),new Promise(((e,t)=>{this.rpcRequestResolver={resolve:e,reject:t}})))}onRpcRequest(e){this.w3mFrame.events.onAppEvent((t=>{t.type.includes(i.RPC_METHOD_KEY)&&e(t)}))}onRpcResponse(e){this.w3mFrame.events.onFrameEvent((t=>{t.type.includes(i.RPC_METHOD_KEY)&&e(t)}))}onIsConnected(e){this.w3mFrame.events.onFrameEvent((t=>{t.type===i.FRAME_GET_USER_SUCCESS&&e(t.payload)}))}onNotConnected(e){this.w3mFrame.events.onFrameEvent((t=>{t.type===i.FRAME_IS_CONNECTED_ERROR&&e(),t.type!==i.FRAME_IS_CONNECTED_SUCCESS||t.payload.isConnected||e()}))}onSetPreferredAccount(e){this.w3mFrame.events.onFrameEvent((t=>{t.type===i.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS?e(t.payload):t.type===i.FRAME_SET_PREFERRED_ACCOUNT_ERROR&&e({type:s.ACCOUNT_TYPES.EOA})}))}onGetSmartAccountEnabledNetworks(e){this.w3mFrame.events.onFrameEvent((t=>{t.type===i.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS?e(t.payload.smartAccountEnabledNetworks):t.type===i.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR&&e([])}))}onConnectEmailSuccess(e){this.connectEmailResolver?.resolve(e.payload),this.setNewLastEmailLoginTime()}onConnectEmailError(e){this.connectEmailResolver?.reject(e.payload.message)}onConnectDeviceSuccess(){this.connectDeviceResolver?.resolve(void 0)}onConnectDeviceError(e){this.connectDeviceResolver?.reject(e.payload.message)}onConnectOtpSuccess(){this.connectOtpResolver?.resolve(void 0)}onConnectOtpError(e){this.connectOtpResolver?.reject(e.payload.message)}onConnectSuccess(e){this.setEmailLoginSuccess(e.payload.email),this.setLastUsedCh
2ainId(e.payload.chainId),this.connectResolver?.resolve(e.payload)}onConnectError(e){this.connectResolver?.reject(e.payload.message)}onConnectSocialSuccess(e){e.payload.userName&&this.setSocialLoginSuccess(e.payload.userName),this.connectSocialResolver?.resolve(e.payload)}onConnectSocialError(e){this.connectSocialResolver?.reject(e.payload.message)}onIsConnectedSuccess(e){e.payload.isConnected||this.deleteAuthLoginCache(),this.isConnectedResolver?.resolve(e.payload)}onIsConnectedError(e){this.isConnectedResolver?.reject(e.payload.message)}onGetChainIdSuccess(e){this.setLastUsedChainId(e.payload.chainId),this.getChainIdResolver?.resolve(e.payload)}onGetChainIdError(e){this.getChainIdResolver?.reject(e.payload.message)}onGetSocialRedirectUriSuccess(e){this.getSocialRedirectUriResolver?.resolve(e.payload)}onGetSocialRedirectUriError(e){this.getSocialRedirectUriResolver?.reject(e.payload.message)}onSignOutSuccess(){this.disconnectResolver?.resolve(void 0),this.deleteAuthLoginCache()}onSignOutError(e){this.disconnectResolver?.reject(e.payload.message)}onSwitchChainSuccess(e){this.setLastUsedChainId(e.payload.chainId),this.switchChainResolver?.resolve(e.payload)}onSwitchChainError(e){this.switchChainResolver?.reject(e.payload.message)}onRpcRequestSuccess(e){this.rpcRequestResolver?.resolve(e.payload)}onRpcRequestError(e){this.rpcRequestResolver?.reject(e.payload.message)}onSessionUpdate(e){const{payload:t}=e}onUpdateEmailSuccess(e){this.updateEmailResolver?.resolve(e.payload),this.setNewLastEmailLoginTime()}onUpdateEmailError(e){this.updateEmailResolver?.reject(e.payload.message)}onUpdateEmailPrimaryOtpSuccess(){this.updateEmailPrimaryOtpResolver?.resolve(void 0)}onUpdateEmailPrimaryOtpError(e){this.updateEmailPrimaryOtpResolver?.reject(e.payload.message)}onUpdateEmailSecondaryOtpSuccess(e){const{newEmail:t}=e.payload;this.setEmailLoginSuccess(t),this.updateEmailSecondaryOtpResolver?.resolve({newEmail:t})}onUpdateEmailSecondaryOtpError(e){this.updateEmailSecondaryOtpResolver?.reject(e.payload.message)}onSyncThemeSuccess(){this.syncThemeResolver?.resolve(void 0)}onSyncThemeError(e){this.syncThemeResolver?.reject(e.payload.message)}onSyncDappDataSuccess(){this.syncDappDataResolver?.resolve(void 0)}onSyncDappDataError(e){this.syncDappDataResolver?.reject(e.payload.message)}onSmartAccountEnabledNetworksSuccess(e){this.persistSmartAccountEnabledNetworks(e.payload.smartAccountEnabledNetworks),this.smartAccountEnabledNetworksResolver?.resolve(e.payload)}onSmartAccountEnabledNetworksError(e){this.persistSmartAccountEnabledNetworks([]),this.smartAccountEnabledNetworksResolver?.reject(e.payload.message)}onSetPreferredAccountSuccess(){this.setPreferredAccountResolver?.resolve(void 0)}onSetPreferredAccountError(){this.setPreferredAccountResolver?.reject()}setNewLastEmailLoginTime(){ve.set(i.LAST_EMAIL_LOGIN_TIME,Date.now().toString())}setSocialLoginSuccess(e){ve.set(i.SOCIAL_USERNAME,e)}setEmailLoginSuccess(e){ve.set(i.EMAIL,e),ve.set(i.EMAIL_LOGIN_USED_KEY,"true"),ve.delete(i.LAST_EMAIL_LOGIN_TIME)}deleteAuthLoginCache(){ve.delete(i.EMAIL_LOGIN_USED_KEY),ve.delete(i.EMAIL),ve.delete(i.LAST_USED_CHAIN_KEY),ve.delete(i.SOCIAL_USERNAME),ve.delete(i.SOCIAL,!0)}setLastUsedChainId(e){ve.set(i.LAST_USED_CHAIN_KEY,String(e))}getLastUsedChainId(){return Number(ve.get(i.LAST_USED_CHAIN_KEY))}persistSmartAccountEnabledNetworks(e){ve.set(i.SMART_ACCOUNT_ENABLED_NETWORKS,e.join(","))}}},2237:(e,t,n)=>{const r=n(2168);t.render=function(e,t,n){let i=n,s=t;"undefined"!==typeof i||t&&t.getContext||(i=t,t=void 0),t||(s=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);const o=r.getImageWidth(e.modules.size,i),a=s.getContext("2d"),c=a.createImageData(o,o);return r.qrToImageData(c.data,e,i),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(a,s,o),a.putImageData(c,0,0),s},t.renderToDataURL=function(e,n,r){let i=r;"undefined"!==typeof i||n&&n.getContext||(i=n,n=void 0),i||(i={});
2const s=t.render(e,n,i),o=i.type||"image/png",a=i.rendererOpts||{};return s.toDataURL(o,a.quality)}},2238:e=>{"use strict";var t={single_source_shortest_paths:function(e,n,r){var i={},s={};s[n]=0;var o,a,c,l,u,d,h,p=t.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(c in a=(o=p.pop()).value,l=o.cost,u=e[a]||{})u.hasOwnProperty(c)&&(d=l+u[c],h=s[c],("undefined"===typeof s[c]||h>d)&&(s[c]=d,p.push(c,d),i[c]=a));if("undefined"!==typeof r&&"undefined"===typeof s[r]){var f=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(f)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var i=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,i={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(i[n]=r[n]);return i.queue=[],i.sorter=e.sorter||r.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},2267:(e,t,n)=>{"use strict";t.Il=void 0;n(7832).CoinbaseWalletSDK;var r=n(7832);Object.defineProperty(t,"Il",{enumerable:!0,get:function(){return r.CoinbaseWalletSDK}})},2390:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walletLogo=void 0;t.walletLogo=(e,t)=>
vendor: 9,478 bytes, line 2
2{let n;switch(e){case"standard":default:return n=t,`data:image/svg+xml,%3Csvg width='${t}' height='${n}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return n=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${n}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return n=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return n=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return n=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return n=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`}}
2},2436:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Communicator=void 0;const r=n(8035),i=n(6379),s=n(4046),o=n(5722);t.Communicator=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.CB_KEYS_URL;this.popup=null,this.listeners=new Map,this.postMessage=async e=>{(await this.waitForPopupLoaded()).postMessage(e,this.url.origin)},this.postRequestAndWaitForResponse=async e=>{const t=this.onMessage((t=>{let{requestId:n}=t;return n===e.id}));return this.postMessage(e),await t},this.onMessage=async e=>new Promise(((t,n)=>{const r=n=>{if(n.origin!==this.url.origin)return;const i=n.data;e(i)&&(t(i),window.removeEventListener("message",r),this.listeners.delete(r))};window.addEventListener("message",r),this.listeners.set(r,{reject:n})})),this.disconnect=()=>{(0,i.closePopup)(this.popup),this.popup=null,this.listeners.forEach(((e,t)=>{let{reject:n}=e;n(o.standardErrors.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",t)})),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup?this.popup:(this.popup=(0,i.openPopup)(this.url),this.onMessage((e=>{let{event:t}=e;return"PopupUnload"===t})).then(this.disconnect).catch((()=>{})),this.onMessage((e=>{let{event:t}=e;return"PopupLoaded"===t})).then((e=>{this.postMessage({requestId:e.id,data:{version:r.LIB_VERSION}})})).then((()=>
2{if(!this.popup)throw o.standardErrors.rpc.internal();return this.popup}))),this.url=new URL(e)}}},2438:(e,t,n)=>{const{Transform:r}=n(4833);e.exports=e=>class t extends r{constructor(t,n,r,i,s){super(s),this._rate=t,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=s,this._state=new e,this._state.initialize(t,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(i){r=i}n(r)}_flush(e){let t=null;try{this.push(this.digest())}catch(n){t=n}e(t)}update(e,t){if(!Buffer.isBuffer(e)&&"string"!==typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},2468:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkSigner=void 0;const i=r(n(8316)),s=n(1384),o=n(911),a=n(4464),c=n(7267),l=n(4046),u=n(5722),d=n(8114),h=n(8582),p="DefaultChainId",f="DefaultJsonRpcUrl";t.WalletLinkSigner=class{constructor(e){var t,n;this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1;const{appName:r,appLogoUrl:i}=e.metadata;this._appName=r,this._appLogoUrl=i,this._storage=new h.ScopedLocalStorage("walletlink",l.WALLETLINK_URL),this.updateListener=e.updateListener,this._relayEventManager=new o.RelayEventManager,this._jsonRpcUrlFromOpts="";const a=this._storage.getItem(s.LOCAL_STORAGE_ADDRESSES_KEY);if(a){const e=a.split(" ");""!==e[0]&&(this._addresses=e.map((e=>(0,d.ensureAddressString)(e))),null===(t=this.updateListener)||void 0===t||t.onAccountsUpdate({accounts:this._addresses,source:"storage"}))}this._storage.getItem(p)&&(null===(n=this.updateListener)||void 0===n||n.onChainUpdate({chain:{id:this.getChainId(),rpcUrl:this.jsonRpcUrl},source:"storage"}),this.hasMadeFirstChainChangedEmission=!0),this.initializeRelay()}getSession(){const e=this.initializeRelay(),{id:t,secret:n}=e.getWalletLinkSession();return{id:t,secret:n}}async handshake(){return await this.request({method:"eth_requestAccounts"})}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return null!==(e=this._storage.getItem(f))&&void 0!==e?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(f,e)}updateProviderInfo(e,t){var n;this.jsonRpcUrl=e;const r=this.getChainId();this._storage.setItem(p,t.toString(10));!((0,d.ensureIntNumber)(t)!==r)&&this.hasMadeFirstChainChangedEmission||(null===(n=this.updateListener)||void 0===n||n.onChainUpdate({chain:{id:t,rpcUrl:e},source:"wallet"}),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,t,n,r,i,s){const o=this.initializeRelay(),c=await o.watchAsset(e,t,n,r,i,null===s||void 0===s?void 0:s.toString());return!(0,a.isErrorResponse)(c)&&!!c.result}async addEthereumChain(e,t,n,r,i,s){var o,c;if((0,d.ensureIntNumber)(e)===this.getChainId())return!1;const l=this.initializeRelay();this._isAuthorized()||await l.requestEthereumAccounts();const u=await l.addEthereumChain(e.toString(),t,i,n,r,s);return!(0,a.isErrorResponse)(u)&&(!0===(null===(o=u.result)||void 0===o?void 0:o.isApproved)&&this.updateProviderInfo(t[0],e),!0===(null===(c=u.result)||void 0===c?void 0:c.isApproved))}async switchEthereumChain(e){const t=this.initializeRelay(),n=await t.switchEthereumChain(e.toString(10),this.selectedAddress||void 0);if((0,a.isErrorResponse)(n)){if(!n.errorCode)return;throw n.errorCode===u.standardErrorCodes.provider.unsupportedChain?u.standardErrors.provider.unsupportedChain():u.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode})}const r=n.result;r.isApproved&&r.rpcUrl.length>0&&this.updateProviderInfo(r.rpcUrl,e)}async disconnect(){this._relay&&this._relay.resetAndReload(),this._storage.clear()}async request(e){try{return this._request(e).catch((e=>{throw e}))}catch(t){return Promise.reject(t)}}async _request(e){if(!e||"object"!==typeof e||Array.isArray(e))throw u.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:n}=e;if("string"!==typeof t||0===t.length)throw u.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==n&&!Array.isArray(n)&&("object"!==typeof n||null===n))throw u.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const r=void 0===n?[]:n,i=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:r,jsonrpc:"2.0",id:i})).result}_setAddresses(e,t){var n;if(!Array.isArray(e))throw new Error("addresses is not an array");const r=e.map((e=>(0,d.ensureAddressString)(e)));JSON.stringify(r)!==JSON.stringify(this._addresses)&&(this._addresses=r,null===(n=this.updateListener)||void 0===n||n.onAccountsUpdate({accounts:r,source:"wallet"}),this._storage.setItem(s.LOCAL_STORAGE_ADDRESSES_KEY,r.join(" ")))}_sendRequestAsync(e){return new Promise(((t,n)=>{try{const n=this._handleSynchronousMethods(e);if(void 0!==n)return t({jsonrpc:"2.0",id:e.id,result:n})}catch(r){return n(r)}this._handleAsynchronousMethods(e).then((n=>n&&t(Object.assign(Object.assign({},n),{id:e.id}
2)))).catch((e=>n(e)))}))}_handleSynchronousMethods(e){const{method:t}=e;switch(t){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(n);case"eth_ecRecover":return this._eth_ecRecover(n);case"personal_sign":return this._personal_sign(n);case"personal_ecRecover":return this._personal_ecRecover(n);case"eth_signTransaction":return this._eth_signTransaction(n);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(n);case"eth_sendTransaction":return this._eth_sendTransaction(n);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(n);case"eth_signTypedData_v2":default:return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(n);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(n);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(n);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(n);case"wallet_watchAsset":return this._wallet_watchAsset(n)}}_isKnownAddress(e){try{const t=(0,d.ensureAddressString)(e);return this._addresses.map((e=>(0,d.ensureAddressString)(e))).includes(t)}catch(t){}return!1}_ensureKnownAddress(e){if(!this._isKnownAddress(e))throw new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const t=e.from?(0,d.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(t);return{fromAddress:t,toAddress:e.to?(0,d.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0,d.ensureBigInt)(e.value):BigInt(0),data:e.data?(0,d.ensureBuffer)(e.data):Buffer.alloc(0),nonce:null!=e.nonce?(0,d.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0,d.ensureBigInt)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0,d.ensureBigInt)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0,d.ensureBigInt)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0,d.ensureBigInt)(e.gas):null,chainId:e.chainId?(0,d.ensureIntNumber)(e.chainId):this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw u.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw u.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,n,r){this._ensureKnownAddress(t);try{const i=this.initializeRelay(),s=await i.signEthereumMessage(e,t,n,r);if((0,a.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}catch(i){if("string"===typeof i.message&&i.message.match(/(denied|rejected)/i))throw u.standardErrors.provider.userRejectedRequest("User denied message signature");throw i}}async _ethereumAddressFromSignedMessage(e,t,n){const r=this.initializeRelay(),i=await r.ethereumAddressFromSignedMessage(e,t,n);if((0,a.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,d.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(p);if(!e)return(0,d.ensureIntNumber)(1);const t=parseInt(e,10);return(0,d.ensureIntNumber)(t)}async _eth_requestAccounts(){if(this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{const t=this.initializeRelay();if(e=await t.requestEthereumAccounts(),(0,a.isErrorResponse)(e))throw new Error(e.errorMessage)}catch(t){if("string"===typeof t.message&&t.message.match(/(denied|rejected)/i))throw u.standardErrors.provider.userRejectedRequest("User denied account authorization");throw t}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const t=(0,d.ensureAddressString)(e[0]),n=(0,d.ensureBuffer)(e[1]);return this._signEthereumMessage(n,t,!1)}_eth_ecRecover(e){const t=(0,d.ensureBuffer)(e[0]),n=(0,d.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!1)}_personal_sign(e){this._requireAuthorization();const t=(0,d.ensureBuffer)(e[0]),n=(0,d.ensureAddressString)(e[1]);return this._signEthereumMessage(t,n,!0)}_personal_ecRecover(e){const t=(0,d.ensureBuffer)(e[0]),n=(0,d.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const e=this.initializeRelay(),n=await e.signEthereumTransaction(t);
2if((0,a.isErrorResponse)(n))throw new Error(n.errorMessage);return{jsonrpc:"2.0",id:0,result:n.result}}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw u.standardErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_sendRawTransaction(e){const t=(0,d.ensureBuffer)(e[0]),n=this.initializeRelay(),r=await n.submitEthereumTransaction(t,this.getChainId());if((0,a.isErrorResponse)(r))throw new Error(r.errorMessage);return{jsonrpc:"2.0",id:0,result:r.result}}async _eth_sendTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const e=this.initializeRelay(),n=await e.signAndSubmitEthereumTransaction(t);if((0,a.isErrorResponse)(n))throw new Error(n.errorMessage);return{jsonrpc:"2.0",id:0,result:n.result}}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw u.standardErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const t=(0,d.ensureParsedJSONObject)(e[0]),n=(0,d.ensureAddressString)(e[1]);this._ensureKnownAddress(n);const r=i.default.hashForSignTypedDataLegacy({data:t}),s=JSON.stringify(t,null,2);return this._signEthereumMessage(r,n,!1,s)}async _eth_signTypedData_v3(e){this._requireAuthorization();const t=(0,d.ensureAddressString)(e[0]),n=(0,d.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const r=i.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(r,t,!1,s)}async _eth_signTypedData_v4(e){this._requireAuthorization();const t=(0,d.ensureAddressString)(e[0]),n=(0,d.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const r=i.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(r,t,!1,s)}async _wallet_addEthereumChain(e){var t,n,r,i;const s=e[0];if(0===(null===(t=s.rpcUrls)||void 0===t?void 0:t.length))return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!s.chainName||""===s.chainName.trim())throw u.standardErrors.rpc.invalidParams("chainName is a required field");if(!s.nativeCurrency)throw u.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const o=parseInt(s.chainId,16);return await this.addEthereumChain(o,null!==(n=s.rpcUrls)&&void 0!==n?n:[],null!==(r=s.blockExplorerUrls)&&void 0!==r?r:[],s.chainName,null!==(i=s.iconUrls)&&void 0!==i?i:[],s.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){const t=Array.isArray(e)?e[0]:e;if(!t.type)throw u.standardErrors.rpc.invalidParams("Type is required");if("ERC20"!==(null===t||void 0===t?void 0:t.type))throw u.standardErrors.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!(null===t||void 0===t?void 0:t.options))throw u.standardErrors.rpc.invalidParams("Options are required");if(!(null===t||void 0===t?void 0:t.options.address))throw u.standardErrors.rpc.invalidParams("Address is required");const n=this.getChainId(),{address:r,symbol:i,image:s,decimals:o}=t.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(t.type,r,i,o,s,n)}}initializeRelay(){if(!this._relay){const e=new c.WalletLinkRelay({linkAPIUrl:l.WALLETLINK_URL,storage:this._storage});e.setAppInfo(this._appName,this._appLogoUrl),e.attachUI(),e.setAccountsCallback(((e,t)=>this._setAddresses(e,t))),e.setChainCallback(((e,t)=>{this.updateProviderInfo(t,parseInt(e,10))})),this._relay=e}return this._relay}}},2541:(e,t,n)=>{var r=n(1596),i=n(330),s=n(6047).Buffer,o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
2734187,3204031479,3329325298],a=new Array(64);function c(){this.init(),this._w=a,i.call(this,64,56)}function l(e,t,n){return n^e&(t^n)}function u(e,t,n){return e&t|n&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,c=0|this._e,f=0|this._f,m=0|this._g,g=0|this._h,y=0;y<16;++y)n[y]=e.readInt32BE(4*y);for(;y<64;++y)n[y]=0|(((t=n[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[y-7]+p(n[y-15])+n[y-16];for(var v=0;v<64;++v){var w=g+h(c)+l(c,f,m)+o[v]+n[v]|0,b=d(r)+u(r,i,s)|0;g=m,m=f,f=c,c=a+w|0,a=s,s=i,i=r,r=w+b|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0,this._f=f+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},c.prototype._hash=function(){var e=s.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},2588:(e,t,n)=>{var r=n(6914),i=n(4567),s=n(184),o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}},2622:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SnackbarInstance=t.SnackbarContainer=t.Snackbar=void 0;const i=r(n(2803)),s=n(4746),o=n(1392),a=n(1101),c=r(n(2108));t.Snackbar=class{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=(0,a.isDarkMode)()}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){const t=this.nextItemKey++;return this.items.set(t,e),this.render(),()=>{this.items.delete(t),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,s.render)((0,s.h)("div",null,(0,s.h)(t.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((e=>{let[n,r]=e;return(0,s.h)(t.SnackbarInstance,Object.assign({},r,{key:n}))})))),this.root)}};t.SnackbarContainer=e=>(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,s.h)("style",null,c.default),(0,s.h)("div",{class:"-cbwsdk-snackbar"},e.children));t.SnackbarInstance=e=>{let{autoExpand:t,message:n,menuItems:r}=e;const[a,c]=(0,o.useState)(!0),[l,u]=(0,o.useState)(null!==t&&void 0!==t&&t);(0,o.useEffect)((()=>{const e=[window.setTimeout((()=>{c(!1)}),1),window.setTimeout((()=>{u(!0)}),1e4)];return()=>{e.forEach(window.clearTimeout)}}));return(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",a&&"-cbwsdk-snackbar-instance-hidden",l&&"-cbwsdk-snackbar-instance-expanded")},(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{u(!l)}},(0,s.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiA
2wIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},n),(0,s.h)("div",{class:"-gear-container"},!l&&(0,s.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,s.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),r&&r.length>0&&(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},r.map(((e,t)=>(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},(0,s.h)("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),(0,s.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},e.info))))))}},2623:(e,t,n)=>{"use strict";function r(){return(null===n.g||void 0===n.g?void 0:n.g.crypto)||(null===n.g||void 0===n.g?void 0:n.g.msCrypto)||{}}function i(){const e=r();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=r,t.getSubtleCrypto=i,t.isBrowserCryptoAvailable=function(){return!!r()&&!!i()}},2654:(e,t,n)=>{"use strict";var r=n(9950),i=Symbol.for("react.element"),s=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,s={},l=null,u=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,r)&&!c.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:i,type:e,key:l,ref:u,props:s,_owner:a.current}}t.Fragment=s,t.jsx=l,t.jsxs=l},2666:(e,t,n)=>{"use strict";e.exports=i;var r=n(5624);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(1596)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},2770:(e,t,n)=>{"use strict";var r,i;r=n(3767),i=n(961),t.version=r.version,t.renderToString=r.renderToString,t.renderToStaticMarkup=r.renderToStaticMarkup,t.renderToNodeStream=r.renderToNodeStream,t.renderToStaticNodeStream=r.renderToStaticNodeStream,t.renderToReadableStream=i.renderToReadableStream},2803:(e,t,n)=>{"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function i(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}n.r(t),n.d(t,{clsx:()=>i,default:()=>s});const s=i},2809:(e,t,n)=>{"use strict";var r=n(7614).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var s=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new r(i?n:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},2824:(e,t,n)=>{var r=n(1596),i=n(2541),s=n(330),o=n(6047).Buffer,a=new Array(64);function c(){this.init(),this._w=a,s.call(this,64,56)}r(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c}
2,2838:(e,t,n)=>{e.exports=self.fetch||(self.fetch=n(4244).default||n(4244))},2890:e=>{function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,r){const i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},2906:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"},2908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCWKeyManager=void 0;const r=n(4105),i=n(8582),s={storageKey:"ownPrivateKey",keyType:"private"},o={storageKey:"ownPublicKey",keyType:"public"},a={storageKey:"peerPublicKey",keyType:"public"};t.SCWKeyManager=class{constructor(){this.storage=new i.ScopedLocalStorage("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(a,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(o.storageKey),this.storage.removeItem(s.storageKey),this.storage.removeItem(a.storageKey)}async generateKeyPair(){const e=await(0,r.generateKeyPair)();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(s,e.privateKey),await this.storeKey(o,e.publicKey)}async loadKeysIfNeeded(){if(null===this.ownPrivateKey&&(this.ownPrivateKey=await this.loadKey(s)),null===this.ownPublicKey&&(this.ownPublicKey=await this.loadKey(o)),null!==this.ownPrivateKey&&null!==this.ownPublicKey||await this.generateKeyPair(),null===this.peerPublicKey&&(this.peerPublicKey=await this.loadKey(a)),null===this.sharedSecret){if(null===this.ownPrivateKey||null===this.peerPublicKey)return;this.sharedSecret=await(0,r.deriveSharedSecret)(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(e){const t=this.storage.getItem(e.storageKey);return t?(0,r.importKeyFromHexString)(e.keyType,t):null}async storeKey(e,t){const n=await(0,r.exportKeyToHexString)(e.keyType,t);this.storage.setItem(e.storageKey,n)}}},2932:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.chains=[{name:"Ethereum Mainnet",chainId:1,shortName:"eth",chain:"ETH",network:"mainnet",networkId:1,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpc:["https://mainnet.infura.io/v3/${INFURA_API_KEY}","wss://mainnet.infura.io/ws/v3/${INFURA_API_KEY}","https://api.mycryptoapi.com/eth","https://cloudflare-eth.com"],faucets:[],infoURL:"https://ethereum.org"},{name:"xDAI Chain",chainId:100,shortName:"xdai",chain:"XDAI",network:"mainnet",networkId:100,nativeCurrency:{name:"xDAI",symbol:"xDAI",decimals:18},rpc:["https://rpc.xdaichain.com","https://xdai.poanetwork.dev","wss://rpc.xdaichain.com/wss","wss://xdai.poanetwork.dev/wss","http://xdai.poanetwork.dev","https://dai.poa.network","ws://xdai.poanetwork.dev:8546"],faucets:[],infoURL:"https://forum.poa.network/c/xdai-chain"},{name:"EtherInc",chainId:101,shortName:"eti",chain:"ETI",network:"mainnet",networkId:1,nativeCurrency:{name:"EtherInc Ether",symbol
2:"ETI",decimals:18},rpc:["https://api.einc.io/jsonrpc/mainnet"],faucets:[],infoURL:"https://einc.io"},{name:"ThunderCore Mainnet",chainId:108,shortName:"TT",chain:"TT",network:"mainnet",networkId:108,nativeCurrency:{name:"ThunderCore Mainnet Ether",symbol:"TT",decimals:18},rpc:["https://mainnet-rpc.thundercore.com"],faucets:["https://faucet.thundercore.com"],infoURL:"https://thundercore.com"},{name:"Metadium Mainnet",chainId:11,shortName:"meta",chain:"META",network:"mainnet",networkId:11,nativeCurrency:{name:"Metadium Mainnet Ether",symbol:"META",decimals:18},rpc:["https://api.metadium.com/prod"],faucets:[],infoURL:"https://metadium.com"},{name:"IPOS Network",chainId:1122334455,shortName:"ipos",chain:"IPOS",network:"mainnet",networkId:1122334455,nativeCurrency:{name:"IPOS Network Ether",symbol:"IPOS",decimals:18},rpc:["https://rpc.iposlab.com","https://rpc2.iposlab.com"],faucets:[],infoURL:"https://iposlab.com"},{name:"Metadium Testnet",chainId:12,shortName:"kal",chain:"META",network:"testnet",networkId:12,nativeCurrency:{name:"Metadium Testnet Ether",symbol:"KAL",decimals:18},rpc:["https://api.metadium.com/dev"],faucets:[],infoURL:"https://metadium.com"},{name:"Fuse Mainnet",chainId:122,shortName:"fuse",chain:"FUSE",network:"mainnet",networkId:122,nativeCurrency:{name:"Fuse",symbol:"FUSE",decimals:18},rpc:["https://rpc.fuse.io"],faucets:[],infoURL:"https://fuse.io/"},{name:"Diode Staging",chainId:13,shortName:"dstg",chain:"DIO",network:"testnet",networkId:13,nativeCurrency:{name:"Staging Diodes",symbol:"DIO",decimals:18},rpc:["https://staging.diode.io:8443/","wss://staging.diode.io:8443/ws"],faucets:[],infoURL:"https://diode.io/staging"},{name:"Ether-1",chainId:1313114,shortName:"etho",chain:"ETHO",network:"mainnet",networkId:1313114,nativeCurrency:{name:"Ether-1 Ether",symbol:"ETHO",decimals:18},rpc:["https://rpc.ether1.org"],faucets:[],infoURL:"https://ether1.org"},{name:"NEAR MainNet",chainId:1313161554,shortName:"near",chain:"NEAR",network:"mainnet",networkId:1313161554,nativeCurrency:{name:"NEAR",symbol:"NEAR",decimals:24},rpc:["https://rpc.mainnet.near.org"],faucets:[],infoURL:"https://near.org/"},{name:"NEAR TestNet",chainId:1313161555,shortName:"near",chain:"NEAR",network:"testnet",networkId:1313161555,nativeCurrency:{name:"NEAR",symbol:"NEAR",decimals:24},rpc:["https://rpc.testnet.near.org"],faucets:["https://wallet.testnet.near.org"],infoURL:"https://near.org/"},{name:"Xerom",chainId:1313500,shortName:"xero",chain:"XERO",network:"mainnet",networkId:1313500,nativeCurrency:{name:"Xerom Ether",symbol:"XERO",decimals:18},rpc:["https://rpc.xerom.org"],faucets:[],infoURL:"https://xerom.org"},{name:"PepChain Churchill",chainId:13371337,shortName:"tpep",chain:"PEP",network:"testnet",networkId:13371337,nativeCurrency:{name:"PepChain Churchill Ether",symbol:"TPEP",decimals:18},rpc:["https://churchill-rpc.pepchain.io"],faucets:[],infoURL:"https://pepchain.io"},{name:"Matic Mainnet",chainId:137,shortName:"matic",chain:"Matic",network:"mainnet",networkId:137,nativeCurrency:{name:"Matic",symbol:"MATIC",decimals:18},rpc:["https://rpc-mainnet.matic.network","wss://ws-mainnet.matic.network"],faucets:[],infoURL:"https://matic.network/"},{name:"Diode Prenet",chainId:15,shortName:"dio",chain:"DIO",network:"mainnet",networkId:15,nativeCurrency:{name:"Diodes",symbol:"DIO",decimals:18},rpc:["https://prenet.diode.io:8443/","wss://prenet.diode.io:8443/ws"],faucets:[],infoURL:"https://diode.io/prenet"},{name:"Lightstreams Testnet",chainId:162,shortName:"tpht",chain:"PHT",network:"sirius",networkId:162,nativeCurrency:{name:"Lightstreams PHT",symbol:"PHT",decimals:18},rpc:["https://node.sirius.lightstreams.io"],faucets:["https://discuss.lightstreams.network/t/request-test-tokens"],infoURL:"https://explorer.sirius.lightstreams.io"},{name:"Atheios",chainId:1620,shortName:"ath",chain:"ATH",network:"mainnet",networkId:11235813,nativeCurrency:{name:"Atheios Ether",symbol:"ATH",decimals:18},rpc:["https://wallet.atheios.com:8797"],faucets:[],infoURL:"https://atheios.com"},{name:"Lightstreams Mainnet",chainId:163,shortName:"pht",chain:"PHT",network:"mainnet",networkId:163,nativeCurrency:{name:"Lightstreams PHT",symbol
2:"PHT",decimals:18},rpc:["https://node.mainnet.lightstreams.io"],faucets:[],infoURL:"https://explorer.lightstreams.io"},{name:"ThunderCore Testnet",chainId:18,shortName:"TST",chain:"TST",network:"testnet",networkId:18,nativeCurrency:{name:"ThunderCore Testnet Ether",symbol:"TST",decimals:18},rpc:["https://testnet-rpc.thundercore.com"],faucets:["https://faucet-testnet.thundercore.com"],infoURL:"https://thundercore.com"},{name:"IOLite",chainId:18289463,shortName:"ilt",chain:"ILT",network:"mainnet",networkId:18289463,nativeCurrency:{name:"IOLite Ether",symbol:"ILT",decimals:18},rpc:["https://net.iolite.io"],faucets:[],infoURL:"https://iolite.io"},{name:"Teslafunds",chainId:1856,shortName:"tsf",chain:"TSF",network:"mainnet",networkId:1,nativeCurrency:{name:"Teslafunds Ether",symbol:"TSF",decimals:18},rpc:["https://tsfapi.europool.me"],faucets:[],infoURL:"https://teslafunds.io"},{name:"EtherGem",chainId:1987,shortName:"egem",chain:"EGEM",network:"mainnet",networkId:1987,nativeCurrency:{name:"EtherGem Ether",symbol:"EGEM",decimals:18},rpc:["https://jsonrpc.egem.io/custom"],faucets:[],infoURL:"https://egem.io"},{name:"Expanse Network",chainId:2,shortName:"exp",chain:"EXP",network:"mainnet",networkId:1,nativeCurrency:{name:"Expanse Network Ether",symbol:"EXP",decimals:18},rpc:["https://node.expanse.tech"],faucets:[],infoURL:"https://expanse.tech"},{name:"ELA-ETH-Sidechain Mainnet",chainId:20,shortName:"ELAETHSC",chain:"ETH",network:"mainnet",networkId:20,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpc:["https://mainrpc.elaeth.io"],faucets:[],infoURL:"https://www.elastos.org/"},{name:"Akaroma",chainId:200625,shortName:"aka",chain:"AKA",network:"mainnet",networkId:200625,nativeCurrency:{name:"Akaroma Ether",symbol:"AKA",decimals:18},rpc:["https://remote.akroma.io"],faucets:[],infoURL:"https://akroma.io"},{name:"ELA-ETH-Sidechain Testnet",chainId:21,shortName:"ELAETHSC",chain:"ETH",network:"testnet",networkId:21,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpc:["https://rpc.elaeth.io"],faucets:["https://faucet.elaeth.io/"],infoURL:"https://elaeth.io/"},{name:"Freight Trust Network",chainId:211,shortName:"EDI",chain:"EDI",network:"freight & trade network",networkId:0,nativeCurrency:{name:"Freight Trust Native",symbol:"0xF",decimals:18},rpc:["http://13.57.207.168:3435","https://app.freighttrust.net/ftn/${API_KEY}"],faucets:["http://faucet.freight.sh"],infoURL:"https://freighttrust.com"},{name:"Webchain",chainId:24484,shortName:"web",chain:"WEB",network:"mainnet",networkId:37129,nativeCurrency:{name:"Webchain Ether",symbol:"WEB",decimals:18},rpc:["https://node1.webchain.network"],faucets:[],infoURL:"https://webchain.network"},{name:"Energy Web Chain",chainId:246,shortName:"ewt",chain:"Energy Web Chain",network:"mainnet",networkId:246,nativeCurrency:{name:"Energy Web Token",symbol:"EWT",decimals:18},rpc:["https://rpc.energyweb.org","wss://rpc.energyweb.org/ws"],faucets:[],infoURL:"https://energyweb.org"},{name:"ARTIS sigma1",chainId:246529,shortName:"ats",chain:"ARTIS",network:"sigma1",networkId:246529,nativeCurrency:{name:"ARTIS sigma1 Ether",symbol:"ATS",decimals:18},rpc:["https://rpc.sigma1.artis.network"],faucets:[],infoURL:"https://artis.eco"},{name:"ARTIS tau1",chainId:246785,shortName:"ats",chain:"ARTIS",network:"tau1",networkId:246785,nativeCurrency:{name:"ARTIS tau1 Ether",symbol:"ATS",decimals:18},rpc:["https://rpc.tau1.artis.network"],faucets:[],infoURL:"https://artis.network"},{name:"Fantom Opera",chainId:250,shortName:"ftm",chain:"FTM",network:"mainnet",networkId:250,nativeCurrency:{name:"Fantom",symbol:"FTM",decimals:18},rpc:["https://rpc.fantom.network","https://fantomscan.io/rpc"],faucets:[],infoURL:"https://fantom.foundation"},{name:"High Performance Blockchain",chainId:269,shortName:"hpb",chain:"HPB",network:"mainnet",networkId:100,nativeCurrency:{name:"High Performance Blockchain Ether",symbol:"HPB",decimals:18},rpc:["https://node.hpb.blue"],faucets:[],infoURL:"https://hpb.io"},{name:"Auxilium Network Mainnet",chainId:28945486,shortName:"aux",chain:"AUX",network:"mainnet",networkId:28945486,nativeCurrency:{name:"Auxilium coin",symbol:"AUX",decimals:18},rpc:["https://rpc.auxilium.global"],faucets:[],infoURL:"https://auxilium.global"},{name:"Ethereum Testnet Ropsten",chainId:3,shortName:"rop",chain:"ETH",network:"ropsten",networkId:3,nativeCurrency:{name:"Ropsten Ether",symbol
2:"ROP",decimals:18},rpc:["https://ropsten.infura.io/v3/${INFURA_API_KEY}","wss://ropsten.infura.io/ws/v3/${INFURA_API_KEY}"],faucets:["https://faucet.ropsten.be?${ADDRESS}"],infoURL:"https://github.com/ethereum/ropsten"},{name:"RSK Mainnet",chainId:30,shortName:"rsk",chain:"RSK",network:"mainnet",networkId:30,nativeCurrency:{name:"RSK Mainnet Ether",symbol:"RSK",decimals:18},rpc:["https://public-node.rsk.co","https://mycrypto.rsk.co"],faucets:[],infoURL:"https://rsk.co"},{name:"RSK Testnet",chainId:31,shortName:"trsk",chain:"RSK",network:"testnet",networkId:31,nativeCurrency:{name:"RSK Testnet Ether",symbol:"TRSK",decimals:18},rpc:["https://public-node.testnet.rsk.co","https://mycrypto.testnet.rsk.co"],faucets:["https://faucet.testnet.rsk.co"],infoURL:"https://rsk.co"},{name:"Ethersocial Network",chainId:31102,shortName:"esn",chain:"ESN",network:"mainnet",networkId:1,nativeCurrency:{name:"Ethersocial Network Ether",symbol:"ESN",decimals:18},rpc:["https://api.esn.gonspool.com"],faucets:[],infoURL:"https://ethersocial.org"},{name:"Pirl",chainId:3125659152,shortName:"pirl",chain:"PIRL",network:"mainnet",networkId:3125659152,nativeCurrency:{name:"Pirl Ether",symbol:"PIRL",decimals:18},rpc:["https://wallrpc.pirl.io"],faucets:[],infoURL:"https://pirl.io"},{name:"Valorbit",chainId:38,shortName:"val",chain:"VAL",network:"mainnet",networkId:38,nativeCurrency:{name:"Valorbit",symbol:"VAL",decimals:18},rpc:["https://rpc.valorbit.com/v2"],faucets:[],infoURL:"https://valorbit.com"}
2,{name:"Lisinski",chainId:385,shortName:"lisinski",chain:"CRO",network:"mainnet",networkId:385,nativeCurrency:{name:"Lisinski Ether",symbol:"LISINSKI",decimals:18},rpc:["https://rpc-bitfalls1.lisinski.online"],faucets:["https://pipa.lisinski.online"],infoURL:"https://lisinski.online"},{name:"Energi Mainnet",chainId:39797,shortName:"nrg",chain:"NRG",network:"mainnet",networkId:39797,nativeCurrency:{name:"Energi",symbol:"NRG",decimals:18},rpc:["https://nodeapi.gen3.energi.network"],faucets:[],infoURL:"https://www.energi.world/"},{name:"Ethereum Testnet Rinkeby",chainId:4,shortName:"rin",chain:"ETH",network:"rinkeby",networkId:4,nativeCurrency:{name:"Rinkeby Ether",symbol:"RIN",decimals:18},rpc:["https://rinkeby.infura.io/v3/${INFURA_API_KEY}","wss://rinkeby.infura.io/ws/v3/${INFURA_API_KEY}"],faucets:["https://faucet.rinkeby.io"],infoURL:"https://www.rinkeby.io"},{name:"Ethereum Testnet Kovan",chainId:42,shortName:"kov",chain:"ETH",network:"kovan",networkId:42,nativeCurrency:{name:"Kovan Ether",symbol:"KOV",decimals:18},rpc:["https://kovan.poa.network","http://kovan.poa.network:8545","https://kovan.infura.io/v3/${INFURA_API_KEY}","wss://kovan.infura.io/ws/v3/${INFURA_API_KEY}","ws://kovan.poa.network:8546"],faucets:["https://faucet.kovan.network","https://gitter.im/kovan-testnet/faucet"],infoURL:"https://kovan-testnet.github.io/website"},{name:"Optimistic Ethereum",chainId:420,shortName:"oeth",chain:"ETH",network:"mainnet",networkId:420,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpc:[],faucets:[],infoURL:"https://optimism.io"},{name:"Athereum",chainId:43110,shortName:"ath",chain:"ATH",network:"athereum",networkId:43110,nativeCurrency:{name:"Athereum Ether",symbol:"ATH",decimals:18},rpc:["https://ava.network:21015/ext/evm/rpc"],faucets:["http://athfaucet.ava.network//?address=${ADDRESS}"],infoURL:"https://athereum.ava.network"},{name:"Energi Testnet",chainId:49797,shortName:"tnrg",chain:"NRG",network:"testnet",networkId:49797,nativeCurrency:{name:"Energi",symbol:"tNRG",decimals:18},rpc:["https://nodeapi.test3.energi.network"],faucets:[],infoURL:"https://www.energi.world/"},{name:"Ethereum Testnet G\xf6rli",chainId:5,shortName:"gor",chain:"ETH",network:"goerli",networkId:5,nativeCurrency:{name:"G\xf6rli Ether",symbol:"GOR",decimals:18},rpc:["https://rpc.goerli.mudit.blog/","https://rpc.slock.it/goerli ","https://goerli.prylabs.net/"],faucets:["https://goerli-faucet.slock.it/?address=${ADDRESS}","https://faucet.goerli.mudit.blog"],infoURL:"https://goerli.net/#about"},{name:"Binance Smart Chain Mainnet",chainId:56,shortName:"bnb",chain:"BSC",network:"mainnet",networkId:56,nativeCurrency:{name:"Binance Chain Native Token",symbol:"BNB",decimals:18},rpc:["https://bsc-dataseed1.binance.org","https://bsc-dataseed2.binance.org","https://bsc-dataseed3.binance.org","https://bsc-dataseed4.binance.org","https://bsc-dataseed1.defibit.io","https://bsc-dataseed2.defibit.io","https://bsc-dataseed3.defibit.io","https://bsc-dataseed4.defibit.io","https://bsc-dataseed1.ninicoin.io","https://bsc-dataseed2.ninicoin.io","https://bsc-dataseed3.ninicoin.io","https://bsc-dataseed4.ninicoin.io","wss://bsc-ws-node.nariox.org"],faucets:[],infoURL:"https://www.binance.org"},{name:"Ethereum Classic Testnet Kotti",chainId:6,shortName:"kot",chain:"ETC",network:"kotti",networkId:6,nativeCurrency:{name:"Kotti Ether",symbol:"KOT",decimals:18},rpc:[],faucets:[],infoURL:"https://explorer.jade.builders/?network=kotti"},{name:"GoChain",chainId:60,shortName:"go",chain:"GO",network:"mainnet",networkId:60,nativeCurrency:{name:"GoChain Ether",symbol:"GO",decimals:18},rpc:["https://rpc.gochain.io"],faucets:[],infoURL:"https://gochain.io"},{name:"Ethereum Classic Mainnet",chainId:61,shortName:"etc",chain:"ETC",network:"mainnet",networkId:1,nativeCurrency:{name:"Ethereum Classic Ether",symbol:"ETC",decimals:18},rpc:["https://ethereumclassic.network"],faucets:[],infoURL:"https://ethereumclassic.org"},{name:"Aquachain",chainId:61717561,shortName:"aqua",chain:"AQUA",network:"mainnet",networkId:61717561,nativeCurrency:{name:"Aquachain Ether",symbol:"AQUA",decimals:18},rpc:["https://c.onical.org","https://tx.aquacha.in/api"],faucets:["https://aquacha.in/faucet"],infoURL:"https://aquachain.github.io"},{name:"Ethereum Classic Testnet Morden",chainId:62,shortName:"tetc",chain:"ETC",network:"testnet",networkId:2,nativeCurrency:{name:"Ethereum Classic Testnet Ether",symbol
2:"TETC",decimals:18},rpc:[],faucets:[],infoURL:"https://ethereumclassic.org"},{name:"Ethereum Classic Testnet Mordor",chainId:63,shortName:"metc",chain:"ETC",network:"testnet",networkId:7,nativeCurrency:{name:"Mordor Classic Testnet Ether",symbol:"METC",decimals:18},rpc:[],faucets:[],infoURL:"https://github.com/eth-classic/mordor/"},{name:"Ellaism",chainId:64,shortName:"ella",chain:"ELLA",network:"mainnet",networkId:64,nativeCurrency:{name:"Ellaism Ether",symbol:"ELLA",decimals:18},rpc:["https://jsonrpc.ellaism.org"],faucets:[],infoURL:"https://ellaism.org"},{name:"ThaiChain",chainId:7,shortName:"tch",chain:"TCH",network:"mainnet",networkId:7,nativeCurrency:{name:"ThaiChain Ether",symbol:"TCH",decimals:18},rpc:["https://rpc.dome.cloud"],faucets:[],infoURL:"https://thaichain.io"},{name:"Energy Web Volta Testnet",chainId:73799,shortName:"vt",chain:"Volta",network:"testnet",networkId:73799,nativeCurrency:{name:"Volta Token",symbol:"VT",decimals:18},rpc:["https://volta-rpc.energyweb.org","wss://volta-rpc.energyweb.org/ws"],faucets:["https://voltafaucet.energyweb.org"],infoURL:"https://energyweb.org"},{name:"Mix",chainId:76,shortName:"mix",chain:"MIX",network:"mainnet",networkId:76,nativeCurrency:{name:"Mix Ether",symbol:"MIX",decimals:18},rpc:["https://rpc2.mix-blockchain.org:8647"],faucets:[],infoURL:"https://mix-blockchain.org"},{name:"POA Network Sokol",chainId:77,shortName:"poa",chain:"POA",network:"sokol",networkId:77,nativeCurrency:{name:"POA Sokol Ether",symbol:"POA",decimals:18},rpc:["https://sokol.poa.network","wss://sokol.poa.network/wss","ws://sokol.poa.network:8546"],faucets:["https://faucet-sokol.herokuapp.com"],infoURL:"https://poa.network"},{name:"Musicoin",chainId:7762959,shortName:"music",chain:"MUSIC",network:"mainnet",networkId:7762959,nativeCurrency:{name:"Musicoin",symbol:"MUSIC",decimals:18},rpc:["https://mewapi.musicoin.tw"],faucets:[],infoURL:"https://musicoin.tw"},{name:"Firenze test network",chainId:78110,shortName:"firenze",chain:"ETH",network:"testnet",networkId:78110,nativeCurrency:{name:"Firenze Ether",symbol:"FIN",decimals:18},rpc:["https://ethnode.primusmoney.com/firenze"],faucets:[],infoURL:"https://primusmoney.com"},{name:"Ubiq Network Mainnet",chainId:8,shortName:"ubq",chain:"UBQ",network:"mainnet",networkId:88,nativeCurrency:{name:"Ubiq Ether",symbol:"UBQ",decimals:18},rpc:["https://rpc.octano.dev","https://pyrus2.ubiqscan.io"],faucets:[],infoURL:"https://ubiqsmart.com"},{name:"Matic Mumbai",chainId:80001,shortName:"matic",chain:"Matic",network:"testnet",networkId:80001,nativeCurrency:{name:"Matic",symbol:"MATIC",decimals:18},rpc:["https://rpc-mumbai.matic.today","wss://ws-mumbai.matic.today"],faucets:["https://faucet.matic.network/"],infoURL:"https://matic.network/"},{name:"Callisto Mainnet",chainId:820,shortName:"clo",chain:"CLO",network:"mainnet",networkId:1,nativeCurrency:{name:"Callisto Mainnet Ether",symbol:"CLO",decimals:18},rpc:["https://clo-geth.0xinfra.com"],faucets:[],infoURL:"https://callisto.network"},{name:"Callisto Testnet",chainId:821,shortName:"tclo",chain:"CLO",network:"testnet",networkId:2,nativeCurrency:{name:"Callisto Testnet Ether",symbol:"TCLO",decimals:18},rpc:[],faucets:[],infoURL:"https://callisto.network"},{name:"TomoChain",chainId:88,shortName:"tomo",chain:"TOMO",network:"mainnet",networkId:88,nativeCurrency:{name:"TomoChain Ether",symbol:"TOMO",decimals:18},rpc:["https://core.tomocoin.io"],faucets:[],infoURL:"https://tomocoin.io"},{name:"bloxberg",chainId:8995,shortName:"berg",chain:"bloxberg",network:"mainnet",networkId:8995,nativeCurrency:{name:"BERG",symbol:"U+25B3",decimals:18},rpc:["https://core.bloxberg.org"],faucets:["https://faucet.bloxberg.org/"],infoURL:"https://bloxberg.org"},{name:"Ubiq Network Testnet",chainId:9,shortName:"tubq",chain:"UBQ",network:"mainnet",networkId:2,nativeCurrency:{name:"Ubiq Testnet Ether",symbol:"TUBQ",decimals:18},rpc:[],faucets:[],infoURL:"https://ethersocial.org"},{name:"Binance Smart Chain Testnet",chainId:97,shortName:"bnb",chain:"BSC",network:"Chapel",networkId:97,nativeCurrency:{name:"Binance Chain Native Token",symbol:"BNB",decimals:18},rpc:["https://data-seed-prebsc-1-s1.binance.org:8545","https://data-seed-prebsc-2-s1.binance.org:8545","https://data-seed-prebsc-1-s2.binance.org:8545","https://data-seed-prebsc-2-s2.binance.org:8545","https://data-seed-prebsc-1-s3.binance.org:8545","https://data-seed-prebsc-2-s3.b
2inance.org:8545"],faucets:["https://testnet.binance.org/faucet-smart"],infoURL:"https://testnet.binance.org/"},{name:"Nepal Blockchain Network",chainId:977,shortName:"yeti",chain:"YETI",network:"mainnet",networkId:977,nativeCurrency:{name:"Nepal Blockchain Network Ether",symbol:"YETI",decimals:18},rpc:["https://api.nepalblockchain.dev","https://api.nepalblockchain.network"],faucets:["https://faucet.nepalblockchain.network"],infoURL:"https://nepalblockchain.network"},{name:"POA Network Core",chainId:99,shortName:"skl",chain:"POA",network:"core",networkId:99,nativeCurrency:{name:"POA Network Core Ether",symbol:"SKL",decimals:18},rpc:["https://core.poanetwork.dev","http://core.poanetwork.dev:8545","https://core.poa.network","ws://core.poanetwork.dev:8546"],faucets:[],infoURL:"https://poa.network"}]},2959:()=>{},3074:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;const r=n(5815),i=n(6851);t.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new r.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new i.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}},3103:(e,t,n)=>{"use strict";n.d(t,{mN:()=>C,AH:()=>c,W3:()=>E,Ec:()=>_});const r=globalThis,i=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class a{constructor(e,t,n){if(this._$cssResult$=!0,n!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=o.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&o.set(t,e))}return e}toString(){return this.cssText}}const c=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=1===e.length?e[0]:n.reduce(((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[r+1]),e[0]);return new a(i,e,s)},l=(e,t)=>{if(i)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),i=r.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}},u=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new a("string"==typeof e?e:e+"",void 0,s))(t)})(e):e,{is:d,defineProperty:h,getOwnPropertyDescriptor:p,getOwnPropertyNames:f,getOwnPropertySymbols:m,getPrototypeOf:g}=Object,y=globalThis,v=y.trustedTypes,w=v?v.emptyScript:"",b=y.reactiveElementPolyfillSupport,x=(e,t)=>e,E={toAttribute(e,t){switch(t){case Boolean:e=e?w:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},_=(e,t)=>!d(e,t),k={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),y.litPropertyMetadata??=new WeakMap;class C extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k;if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(e,n,t);void 0!==r&&h(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){const{get:r,set:i}=p(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return r?.call(this)},set(t){const s=r?.call(this);i.call(this,t),this.requestUpdate(e,s,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??k}static _$Ei(){if(this.hasOwnProperty(x("elementProperties")))return;const e=g(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x("properties"))){const e=this.properties,t=[...f(e),...m
2(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const e=this._$Eu(t,n);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(u(e))}else void 0!==e&&t.push(u(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return l(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EC(e,t){const n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(void 0!==r&&!0===n.reflect){const i=(void 0!==n.converter?.toAttribute?n.converter:E).toAttribute(t,n.type);this._$Em=e,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){const n=this.constructor,r=n._$Eh.get(e);if(void 0!==r&&this._$Em!==r){const e=n.getPropertyOptions(r),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:E;this._$Em=r,this[r]=i.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){if(n??=this.constructor.getPropertyOptions(e),!(n.hasChanged??_)(this[e],t))return;this.P(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,n){this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e)!0!==n.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],n)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[x("elementProperties")]=new Map,C[x("finalized")]=new Map,b?.({ReactiveElement:C}),(y.reactiveElementVersions??=[]).push("2.0.4")},3230:(e,t,n)=>{"use strict";var r;e.exports=k,k.ReadableState=_;n(8981).EventEmitter;var i=function(e,t){return e.listeners(t).length},s=n(4687),o=n(3325).Buffer,a=("undefined"!==typeof n.g?n.g:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var c,l=n(9838);c=l&&l.debuglog?l.debuglog("stream"):function(){};var u,d,h,p=n(4147),f=n(4822),m=n(2809).getHighWaterMark,g=n(7614).F,y=g.ERR_INVALID_ARG_TYPE,v=g.E
vendor: 5,923 bytes, line 2
2RR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,b=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(1596)(k,s);var x=f.errorOrDestroy,E=["error","close","destroy","pause","resume"];function _(e,t,i){r=r||n(7544),e=e||{},"boolean"!==typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=n(923).I),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function k(e){if(r=r||n(7544),!(this instanceof k))return new k(e);var t=this instanceof r;this._readableState=new _(e,this,t),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function C(e,t,n,r,i){c("readableAddChunk",t);var s,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}(e,l);else if(i||(s=function(e,t){var n;r=t,o.isBuffer(r)||r instanceof a||"string"===typeof t||void 0===t||e.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(l,t)),s)x(e,s);else if(l.objectMode||t&&t.length>0)if("string"===typeof t||l.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),r)l.endEmitted?x(e,new b):A(e,l,t,!0);else if(l.ended)x(e,new v);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?A(e,l,t,!1):N(e,l)):A(e,l,t,!1)}else r||(l.reading=!1,N(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function A(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&T(e)),N(e,t)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"===typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=o.from(e,t),t=""),n=!0),C(this,e,t,!1,n)},k.prototype.unshift=function(e){return C(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(e){u||(u=n(923).I);var t=new u(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var S=1073741824;function I(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(P,e))}function P(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function N(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(c("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function O(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){c("readable nexttick read 0"),e.read(0)}function j(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function B(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(U,t,e))}function U(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function F(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}k.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):T(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&B(this),null;var r,i=t.needReadable;
vendor: 2,057 bytes, line 2
2return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(n,t))),null===(r=e>0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&B(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(e){x(this,new w("_read()"))},k.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,c("pipe count=%d opts=%j",r.pipesCount,t);var s=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?a:m;function o(t,i){c("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",f),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",m),n.removeListener("data",d),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function a(){c("onend"),e.end()}r.endEmitted?process.nextTick(s):n.once("end",s),e.on("unpipe",o);var l=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,L(e))}}(n);e.on("drain",l);var u=!1;function d(t){c("ondata");var i=e.write(t);c("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==F(r.pipes,e))&&!u&&(c("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function h(t){c("onerror",t),m(),e.removeListener("error",h),0===i(e,"error")&&x(e,t)}function p(){e.removeListener("finish",f),m()}function f(){c("onfinish"),e.removeListener("close",p),m()}function m(){c("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,n){if("function"===typeof e.prependListener)return e.prepe
2ndListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",f),e.emit("pipe",n),r.flowing||(c("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)r[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=F(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},k.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,c("on readable",r.length,r.reading),r.length?T(this):r.reading||process.nextTick(M,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(O,this),n},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(O,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(j,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<E.length;s++)e.on(E[s],this.emit.bind(this,E[s]));return this._read=function(t){c("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"===typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n(9733)),d(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=D,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(k.from=function(e,t){return void 0===h&&(h=n(9951)),h(k,e,t)})},3232:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(2932)),r(n(345))},3310:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7594);function i(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function s(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function o(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function a(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function c(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function l(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function u(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function d(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function h(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),u(e/4294967296>>>0,t,n),u(e>>>0,t,n+4),t}function p(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),d(e>>>0,t,n),d(e/4294967296>>>0,t,n+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=i,t.writeInt16BE=i,t.writeUint16LE=s,t.writeInt16LE=s,t.readInt32BE=o,t.readUint32BE=a,t.readInt32LE=c,t.readUint32LE=l,t.writeUint32BE=u,t.writeInt32BE=u,t.writeUint32LE=d,t.writeInt32LE=d,t.readInt64BE=function(e,t){void 0===t&&(t=0);var n=o(e,t),r=o(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*a(e,t)+a(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var n=c(e,t);return 4294967296*c(e,t+4)+n-4294967296*(n>
2>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var n=l(e,t);return 4294967296*l(e,t+4)+n},t.writeUint64BE=h,t.writeInt64BE=h,t.writeUint64LE=p,t.writeInt64LE=p,t.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,s=e/8+n-1;s>=n;s--)r+=t[s]*i,i*=256;return r},t.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,s=n;s<n+e/8;s++)r+=t[s]*i,i*=256;return r},t.writeUintBE=function(e,t,n,i){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!r.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var s=1,o=e/8+i-1;o>=i;o--)n[o]=t/s&255,s*=256;return n},t.writeUintLE=function(e,t,n,i){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!r.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var s=1,o=i;o<i+e/8;o++)n[o]=t/s&255,s*=256;return n},t.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},t.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},t.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},t.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},t.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},t.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},t.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},t.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t}},3322:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCWStateManager=void 0;const r=n(8582),i="accounts",s="activeChain",o="availableChains",a="walletCapabilities";t.SCWStateManager=class{get accounts(){return this._accounts}get activeChain(){return this._activeChain}get walletCapabilities(){return this._walletCapabilities}constructor(e){var t,n;this.storage=new r.ScopedLocalStorage("CBWSDK","SCWStateManager"),this.updateListener=e.updateListener,this.availableChains=this.loadItemFromStorage(o),this._walletCapabilities=this.loadItemFromStorage(a);const c=this.loadItemFromStorage(i),l=this.loadItemFromStorage(s);c&&this.updateListener.onAccountsUpdate({accounts:c,source:"storage"}),l&&this.updateListener.onChainUpdate({chain:l,source:"storage"}),this._accounts=c||[],this._activeChain=l||{id:null!==(n=null===(t=e.appChainIds)||void 0===t?void 0:t[0])&&void 0!==n?n:1}}updateAccounts(e){this._accounts=e,this.storeItemToStorage(i,e),this.updateListener.onAccountsUpdate({accounts:e,source:"wallet"})}switchChain(e){var t;const n=null===(t=this.availableChains)||void 0===t?void 0:t.find((t=>t.id===e));return!!n&&(n===this._activeChain||(this._activeChain=n,this.storeItemToStorage(s,n),this.updateListener.onChainUpdate({chain:n,source:"wallet"})),!0)}updateAvailableChains(e){if(!e||0===Object.keys(e).length)return;const t=Object.entries(e).map((e=>{let[t,n]=e;return{id:Number(t),rpcUrl:n}}));this.availableChains=t,this.storeItemToStorage(o,t),this.switchChain(this._activeChain.id)}updateWalletCapabilities(e){this._walletCapabilities=e,this.storeItemToStorage(a,e)}storeItemToStorage(e,t){this.storage.setItem(e,JSON.stringify(t))}loadItemFromStorage(e){const t=this.storage.getItem(e);return t?JSON.parse(t):void 0}clear(){this.storage.clear()}}},3325:(e,t,n)=>{"use strict";const r=n(6676),i=n(6897),s="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function a(e){if(e>
vendor: 5,548 bytes, line 2
2o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return l(e,t,n)}function l(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let r=a(n);const i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const i=function(e){if(c.isBuffer(e)){const t=0|f(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||Y(e.length)?a(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return u(e),a(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),n=a(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function p(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function f(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(i)return r?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){let s,o=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,c/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let r=-1;for(s=n;s<a;s++)if(l(e,s)===l(t,-1===r?0:s-r)){if(-1===r&&(r=s),s-r+1===c)return r*o}else-1!==r&&(s-=s-r),r=-1}else for(n+c>a&&(n=a-c),s=n;s>=0;s--){let n=!0;for(let r=0;r<c;r++)if(l(e,s+r)!==l(t,r)){n=!1;break}if(n)return s}return-1}function b(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const s=t.length;let o;for(r>s/2&&(r=s/2),o=0;o<r;++o){const r=parseInt(t.substr(2*o,2),16);if(Y(r))return o;e[n+o]=r}return o}function x(e,t,n,r){return K(V(t,e.length-n),e,n,r)}function E(e,t,n,r){return K(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return K(G(t),e,n,r)}function k(e,t,n,r){return K(function(e,t){let n,r,i;const s=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}
vendor: 7,600 bytes, line 2
2function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let s=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,a,c;switch(o){case 1:t<128&&(s=t);break;case 2:n=e[i+1],128===(192&n)&&(c=(31&t)<<6|63&n,c>127&&(s=c));break;case 3:n=e[i+1],r=e[i+2],128===(192&n)&&128===(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(s=c));break;case 4:n=e[i+1],r=e[i+2],a=e[i+3],128===(192&n)&&128===(192&r)&&128===(192&a)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&a,c>65535&&c<1114112&&(s=c))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=o}return function(e){const t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=S));return n}(r)}t.kMaxLength=o,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"===typeof console||"function"!==typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return u(e),e<=0?a(e):void 0!==t?"string"===typeof n?a(e).fill(t,n):a(e).fill(t):a(e)}(e,t,n)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(Z(t,Uint8Array))i+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,i){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let s=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0);const a=Math.min(s,o),l=this.slice(r,i),u=e.slice(t,n);for(let c=0;c<a;++c)if(l[c]!==u[c]){s=l[c],o=u[c];break}return s<o?-1:o<s?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let s=!1;for(;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function I(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let s=t;s<n;++s)i+=Q[e[s]];return i}function N(e,t,n){const r=e.slice(t,n);let i="";for(let s=0;s<r.length-1;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function R(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,i,s){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function M(e,t,n,r,i){z(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function j(e,t,n,r,i){z(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n+7]=s,s>>=8,e[n+6]=s,s>>=8,e[n+5]=s,s>>=8,e[n+4]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function L(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}
vendor: 8,573 bytes, line 2
2function D(e,t,n,r,s){return t=+t,n>>>=0,s||L(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,s){return t=+t,n>>>=0,s||L(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],i=1,s=0;for(;++s<t&&(i*=256);)r+=this[e+s]*i;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=J((function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=J((function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],i=1,s=0;for(;++s<t&&(i*=256);)r+=this[e+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=t,i=1,s=this[e+--r];for(;r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=J((function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=J((function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){O(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){O(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=J((function(e){return M(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=J((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);O(this,e,t,n,r-1,-r)}let i=0,s=1,o=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/s|0)-o&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);O(this,e,t,n,r-1,-r)}let i=n-1,s=1,o=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s|0)-o&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=J((function(e){return M(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=J((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"===typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},c.prototype.fill=function(e,t,n,r){if("string"===typeof e){if("string"===typeof t?(r=t,t=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"===typeof e?e&=255:"boolean"===typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i<n;++i)this[i]=e;else{const s=c.isBuffer(e)?e:c.from(e,r),o=s.length;
2if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=s[i%o]}return this};const U={};function F(e,t,n){U[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function $(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function z(e,t,n,r,i,s){if(e>n||e<t){const r="bigint"===typeof t?"n":"";let i;throw i=s>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(s+1)}${r}`:`>= -(2${r} ** ${8*(s+1)-1}${r}) and < 2 ** ${8*(s+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new U.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||W(t,e.length-(n+1))}(r,i,s)}function H(e,t){if("number"!==typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,n){if(Math.floor(e)!==e)throw H(e,n),new U.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=$(String(n)):"bigint"===typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=$(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const q=/[^+/0-9A-Za-z-_]/g;function V(e,t){let n;t=t||1/0;const r=e.length;let i=null;const s=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function G(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function K(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!==e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function J(e){return"undefined"===typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},3329:(e,t,n)=>{"use strict";e.exports=n(7997)},3379:(e,t,n)=>{"use strict";n.d(t,{Ai:()=>g,Hq:()=>m,JR:()=>v,OC:()=>y,tz:()=>f});const r=Symbol(),i=Symbol(),s="a",o="w";let a=(e,t)=>new Proxy(e,t);const c=Object.getPrototypeOf,l=new WeakMap,u=e=>e&&(l.has(e)?l.get(e):c(e)===Object.prototype||c(e)===Array.prototype),d=e=>"object"==typeof e&&null!==e,h=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach((e=>{e.configurable=!0})),Object.create(c(e),t)},p=e=>e[i]||e,f=(e,t,n,c)=>{if(!u(e))return e;let l=c&&c.get(e);if(!l){const t=p(e);l=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some((e=>!e.configurable&&!e.writable)))(t)?[t,h(t)]:[t],null==c||c.set(e,l)}const[d,m]=l;let g=n&&n.get(d);return g&&g[1].f===!!m||(g=((e,t)=>{const n={f:t};let a=!1;const c=(t,r)=>{if(!a){let i=n[s].get(e);if(i||(i={},n[s].set(e,i)),t===o)i[o]=!0;else{let e=i[t];e||(e=new Set,i[t]=e),e.add(r)}}},l={get:(t,r)=>r===i?e:(c("k",r),f(Reflect.get(t,r),n[s],n.c,n.t)),has:(t,i)=>i===r?(a=!0,n[s].delete(e),!0):(c("h",i),Reflect.has(t,i)),getOwnPropertyDescriptor:(e,t)=>
2(c("o",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(c(o),Reflect.ownKeys(e))};return t&&(l.set=l.deleteProperty=()=>!1),[l,n]})(d,!!m),g[1].p=a(m||d,g[0]),n&&n.set(d,g)),g[1][s]=t,g[1].c=n,g[1].t=c,g[1].p},m=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!d(e)||!d(t))return!0;const i=n.get(p(e));if(!i)return!0;if(r){const n=r.get(e);if(n&&n.n===t)return n.g;r.set(e,{n:t,g:!1})}let s=null;try{for(const n of i.h||[])if(s=Reflect.has(e,n)!==Reflect.has(t,n),s)return s;if(!0===i[o]){if(s=((e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some(((e,t)=>e!==r[t]))})(e,t),s)return s}else for(const n of i.o||[])if(s=!!Reflect.getOwnPropertyDescriptor(e,n)!=!!Reflect.getOwnPropertyDescriptor(t,n),s)return s;for(const o of i.k||[])if(s=m(e[o],t[o],n,r),s)return s;return null===s&&(s=!0),s}finally{r&&r.set(e,{n:t,g:s})}},g=e=>u(e)&&e[i]||null,y=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];l.set(e,t)},v=(e,t,n)=>{const r=[],i=new WeakSet,s=(e,a)=>{if(i.has(e))return;d(e)&&i.add(e);const c=d(e)&&t.get(p(e));if(c){var l,u;if(null==(l=c.h)||l.forEach((e=>{const t=`:has(${String(e)})`;r.push(a?[...a,t]:[t])})),!0===c[o]){const e=":ownKeys";r.push(a?[...a,e]:[e])}else{var h;null==(h=c.o)||h.forEach((e=>{const t=`:hasOwn(${String(e)})`;r.push(a?[...a,t]:[t])}))}null==(u=c.k)||u.forEach((t=>{n&&!("value"in(Object.getOwnPropertyDescriptor(e,t)||{}))||s(e[t],a?[...a,t]:[t])}))}else a&&r.push(a)};return s(e),r}},3436:(e,t,n)=>{"use strict";var r=n(3325);"undefined"!==typeof window&&(window.Buffer||(window.Buffer=r.Buffer),window.global||(window.global=window),window.process||(window.process={}),window.process?.env||(window.process={env:{}}))},3451:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=void 0;const s=i(n(3773)),o=n(5722),a=n(7316),c=n(168),l=n(8114),u=n(8812),d=n(7817),h=n(2468),p=n(9631),f=n(2436),m=n(5360),g=n(8582);class y extends s.default{constructor(e){var t,n,{metadata:i}=e,s=e.preference,{keysUrl:a}=s,u=r(s,["keysUrl"]);super(),this.accounts=[],this.handlers={handshake:async e=>{try{if(this.connected)return this.emit("connect",{chainId:(0,l.hexStringFromIntNumber)((0,c.IntNumber)(this.chain.id))}),this.accounts;const e=await this.requestSignerSelection(),t=this.initSigner(e),n=await t.handshake();return this.signer=t,(0,d.storeSignerType)(e),this.emit("connect",{chainId:(0,l.hexStringFromIntNumber)((0,c.IntNumber)(this.chain.id))}),n}catch(t){throw this.handleUnauthorizedError(t),t}},sign:async e=>{if(!this.connected||!this.signer)throw o.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods");try{return await this.signer.request(e)}catch(t){throw this.handleUnauthorizedError(t),t}},fetch:e=>(0,p.fetchRPCRequest)(e,this.chain),state:e=>{const t=()=>{if(this.connected)return this.accounts;throw o.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")};switch(e.method){case"eth_chainId":case"net_version":return this.chain.id;case"eth_accounts":return t();case"eth_coinbase":return t()[0];default:return this.handlers.unsupported(e)}},deprecated:e=>{let{method:t}=e;throw o.standardErrors.rpc.methodNotSupported(`Method ${t} is deprecated.`)},unsupported:e=>{let{method:t}=e;throw o.standardErrors.rpc.methodNotSupported(`Method ${t} is not supported.`)}},this.isCoinbaseWallet=!0,this.updateListener={onAccountsUpdate:e=>{let{accounts:t,source:n}=e;(0,l.areAddressArraysEqual)(this.accounts,t)||(this.accounts=t,"storage"!==n&&this.emit("accountsChanged",this.accounts))},onChainUpdate:e=>{let{chain:t,source:n}=e;t.id===this.chain.id&&t.rpcUrl===this.chain.rpcUrl||(this.chain=t,"storage"!==n&&this.emit
2("chainChanged",(0,l.hexStringFromIntNumber)((0,c.IntNumber)(t.id))))}},this.metadata=i,this.preference=u,this.communicator=new f.Communicator(a),this.chain={id:null!==(n=null===(t=i.appChainIds)||void 0===t?void 0:t[0])&&void 0!==n?n:1};const h=(0,d.loadSignerType)();this.signer=h?this.initSigner(h):null}get connected(){return this.accounts.length>0}async request(e){var t;try{const n=(0,p.checkErrorForInvalidRequestArgs)(e);if(n)throw n;const r=null!==(t=(0,m.determineMethodCategory)(e.method))&&void 0!==t?t:"fetch";return this.handlers[r](e)}catch(n){return Promise.reject((0,a.serializeError)(n,e.method))}}handleUnauthorizedError(e){e.code===o.standardErrorCodes.provider.unauthorized&&this.disconnect()}async enable(){return console.warn('.enable() has been deprecated. Please use .request({ method: "eth_requestAccounts" }) instead.'),await this.request({method:"eth_requestAccounts"})}async disconnect(){this.accounts=[],this.chain={id:1},g.ScopedLocalStorage.clearAll(),this.emit("disconnect",o.standardErrors.provider.disconnected("User initiated disconnection"))}requestSignerSelection(){return(0,d.fetchSignerType)({communicator:this.communicator,preference:this.preference,metadata:this.metadata})}initSigner(e){switch(e){case"scw":return new u.SCWSigner({metadata:this.metadata,updateListener:this.updateListener,postMessageToPopup:this.communicator.postRequestAndWaitForResponse});case"walletlink":return new h.WalletLinkSigner({metadata:this.metadata,updateListener:this.updateListener});case"extension":{const e=(0,p.getCoinbaseInjectedSigner)();if(!e)throw o.standardErrors.rpc.internal("injected signer not found");return e}}}}t.CoinbaseWalletProvider=y},3527:(e,t,n)=>{const r=n(794);function i(e){this.mode=r.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*i+1))},e.exports=i},3586:(e,t,n)=>{"use strict";n.d(t,{CG:()=>r});const r={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}}},3648:(e,t,n)=>{"use strict";var r;var i=n(7614).F,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e){e()}function l(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var u,d=function(e){return e.length?"function"!==typeof e[e.length-1]?a:e.pop():a}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var h=t.map((function(e,i){var s=i<t.length-1;return function(e,t,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;e.on("close",(function(){a=!0})),void 0===r&&(r=n(8172)),r(e,{readable:t,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var c=!1;return function(t){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"===typeof e.abort}(e)?e.abort():"function"===typeof e.destroy?e.destroy():void s(t||new o("pipe"))}}(e,s,i>0,(function(e){u||(u=e),e&&h.forEach(c),s||(h.forEach(c),d(u))}))}));return t.reduce(l)}},3656:(e,t)=>{var n;n=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=new Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return"undefined"!==typeof Int32Array?new Int32Array(t):t}(),n=function(e){var t=0,n=0,r=0,i="undefined"!==typeof Int32Array?new Int32Array(4096):new Array(4096);for(r=0;256!=r;++r)i[r]=e[r];for(r=0;256!=r;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[255&n];var s=[];for(r=1;16!=r;++r)s[r-1]="undefined"!==typeof Int32Array?i.subarray(256*r,256*r+256):i.slice(256*r,256*r+256);return s}(t),r=n[0],i=n[1],s=n[2],o=n[3],a=n[4],c=n[5],l=n[6],u=n[7],d=n[8],h=n[9],p=n[10],f=n[11],m=n[12],g=n[13],y=n[14];e.table=t,e.bstr=function(e,n){for(var r=~n,i=0,s=e.length;i<s;)r=r>>>8^t[255&(r^e.charCodeAt(i++))];return~r},e.buf=function(e,n){for(var v=~n,w=e.length-15,b=0;b<w;)v=y[e[b++]^255&v]^g[e[b++]^v>>8&255]^m[e[b++]^v>>16&255]^f[e[b++]^v>>>24]^p[e[b++]]^h[e[b++]]^d[e[b++]]^u[e[b++]]^l[e[b++]]^c[e[b++]]^a[e[b++]]^o[e[b++]]^s[e[b++]]^i[e[b++]]^r[e[b++]]^t[e[b++]];for(w+=15;b<w;)v=v>>>8^t[255&(v^e[b++])];return~v},e.str=function(e,n){for(var r=~n,i=0,s=e.length,o=0,a=0;i<s;)(o=e.charCodeAt(i++))<128?r=r>>>8^t[255&(r^o)]:o<2048?r=(r=r>>>8^t[255&(r^(192|o>>6&31))])>>>8^t[255&(r^(128|63&o))]:o>=55296&&o<57344?(o=64+(1023&o),a=1023&e.charCodeAt(i++),r=(r=(r=(r=r>>>8^t[255&(r^(240|o>>8&7))])>>>8^t[255&(r^(128|o>>2&63))])>>>8^t[255&(r^(128|a>>6&15|(3&o)<<4))])>>>8^t[255&(r^(128|63&a))]):r=(r=(r=r>>>8^t[255&(r^(224|o>>12&15))])>>>8^t[255&(r^(128|o>>6&63))])>>>8^t[255&(r^(128|63&o))];return~r}},"undefined"===typeof DO_NOT_EXPORT_CRC?n(t):n({})},3767:(e,t,n)=>{"use strict";var r=n(9950);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=Object.prototype.hasOwnProperty,o=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,a={},c={};function l(e){return!!s.call(c,e)||!s.call(a,e)&&(o.test(e)?c[e]=!0:(a[e]=!0,!1))}function u(e,t,n,r,i,s,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var d={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){d[e]=new u(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEac
vendor: 5,491 bytes, line 2
2h((function(e){var t=e[0];d[t]=new u(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){d[e]=new u(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){d[e]=new u(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){d[e]=new u(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){d[e]=new u(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){d[e]=new u(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){d[e]=new u(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){d[e]=new u(e,5,!1,e.toLowerCase(),null,!1,!1)}));var h=/[\-:]([a-z])/g;function p(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(h,p);d[t]=new u(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(h,p);d[t]=new u(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(h,p);d[t]=new u(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){d[e]=new u(e,1,!1,e.toLowerCase(),null,!1,!1)})),d.xlinkHref=new u("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){d[e]=new u(e,1,!1,e.toLowerCase(),null,!0,!0)}));var f={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},m=["Webkit","ms","Moz","O"];Object.keys(f).forEach((function(e){m.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),f[t]=f[e]}))}));var g=/["'&<>]/;function y(e){if("boolean"===typeof e||"number"===typeof e)return""+e;e=""+e;var t=g.exec(e);if(t){var n,r="",i=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}i!==n&&(r+=e.substring(i,n)),i=n+1,r+=t}e=i!==n?r+e.substring(i,n):r}return e}var v=/([A-Z])/g,w=/^ms-/,b=Array.isArray;function x(e,t){return{insertionMode:e,selectedValue:t}}var E=new Map;function _(e,t,n){if("object"!==typeof n)throw Error(i(62));for(var r in t=!0,n)if(s.call(n,r)){var o=n[r];if(null!=o&&"boolean"!==typeof o&&""!==o){if(0===r.indexOf("--")){var a=y(r);o=y((""+o).trim())}else{a=r;var c=E.get(a);void 0!==c||(c=y(a.replace(v,"-$1").toLowerCase().replace(w,"-ms-")),E.set(a,c)),a=c,o="number"===typeof o?0===o||s.call(f,r)?""+o:o+"px":y((""+o).trim())}t?(t=!1,e.push(' style="',a,":",o)):e.push(";",a,":",o)}}t||e.push('"')}function k(e,t,n,r){switch(n){case"style":return void _(e,t,r);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])if(null!==(t=d.hasOwnProperty(n)?d[n]:null)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=t.attributeName,t.type){case 3:r&&e.push(" ",n,'=""');break;case 4:!0===r?e.push(" ",n,'=""'):!1!==r&&e.push(" ",n,'="',y(r),'"');break;case 5:isNaN(r)||e.push(" ",n,'="',y(r),'"');break;case 6:!isNaN(r)&&1<=r&&e.push(" ",n,'="',y(r),'"');break;default:t.sanitizeURL&&(r=""+r),e.push(" ",n,'="',y(r),'"')}}else if(l(n)){switch(typeof r){case"function":case"symbol":return;case"boolean":if("data-"!==(t=n.toLowerCase().slice(0,5))&&"aria-"!==t)return}e.push(" ",n,'="',y(r),'"')}}
vendor: 8,913 bytes, line 2
2function C(e,t,n){if(null!=t){if(null!=n)throw Error(i(60));if("object"!==typeof t||!("__html"in t))throw Error(i(61));null!==(t=t.__html)&&void 0!==t&&e.push(""+t)}}function A(e,t,n,r){e.push(T(n));var i,o=n=null;for(i in t)if(s.call(t,i)){var a=t[i];if(null!=a)switch(i){case"children":n=a;break;case"dangerouslySetInnerHTML":o=a;break;default:k(e,r,i,a)}}return e.push(">"),C(e,o,n),"string"===typeof n?(e.push(y(n)),null):n}var S=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,I=new Map;function T(e){var t=I.get(e);if(void 0===t){if(!S.test(e))throw Error(i(65,e));t="<"+e,I.set(e,t)}return t}function P(e,t,n,o,a){switch(t){case"select":e.push(T("select"));var c=null,u=null;for(f in n)if(s.call(n,f)){var d=n[f];if(null!=d)switch(f){case"children":c=d;break;case"dangerouslySetInnerHTML":u=d;break;case"defaultValue":case"value":break;default:k(e,o,f,d)}}return e.push(">"),C(e,u,c),c;case"option":u=a.selectedValue,e.push(T("option"));var h=d=null,p=null,f=null;for(c in n)if(s.call(n,c)){var m=n[c];if(null!=m)switch(c){case"children":d=m;break;case"selected":p=m;break;case"dangerouslySetInnerHTML":f=m;break;case"value":h=m;default:k(e,o,c,m)}}if(null!=u)if(n=null!==h?""+h:function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(d),b(u)){for(o=0;o<u.length;o++)if(""+u[o]===n){e.push(' selected=""');break}}else""+u===n&&e.push(' selected=""');else p&&e.push(' selected=""');return e.push(">"),C(e,f,d),d;case"textarea":for(d in e.push(T("textarea")),f=u=c=null,n)if(s.call(n,d)&&null!=(h=n[d]))switch(d){case"children":f=h;break;case"value":c=h;break;case"defaultValue":u=h;break;case"dangerouslySetInnerHTML":throw Error(i(91));default:k(e,o,d,h)}if(null===c&&null!==u&&(c=u),e.push(">"),null!=f){if(null!=c)throw Error(i(92));if(b(f)&&1<f.length)throw Error(i(93));c=""+f}return"string"===typeof c&&"\n"===c[0]&&e.push("\n"),null!==c&&e.push(y(""+c)),null;case"input":for(u in e.push(T("input")),h=f=d=c=null,n)if(s.call(n,u)&&null!=(p=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(i(399,"input"));case"defaultChecked":h=p;break;case"defaultValue":d=p;break;case"checked":f=p;break;case"value":c=p;break;default:k(e,o,u,p)}return null!==f?k(e,o,"checked",f):null!==h&&k(e,o,"checked",h),null!==c?k(e,o,"value",c):null!==d&&k(e,o,"value",d),e.push("/>"),null;case"menuitem":for(var g in e.push(T("menuitem")),n)if(s.call(n,g)&&null!=(c=n[g]))switch(g){case"children":case"dangerouslySetInnerHTML":throw Error(i(400));default:k(e,o,g,c)}return e.push(">"),null;case"title":for(m in e.push(T("title")),c=null,n)if(s.call(n,m)&&null!=(u=n[m]))switch(m){case"children":c=u;break;case"dangerouslySetInnerHTML":throw Error(i(434));default:k(e,o,m,u)}return e.push(">"),c;case"listing":case"pre":for(h in e.push(T(t)),u=c=null,n)if(s.call(n,h)&&null!=(d=n[h]))switch(h){case"children":c=d;break;case"dangerouslySetInnerHTML":u=d;break;default:k(e,o,h,d)}if(e.push(">"),null!=u){if(null!=c)throw Error(i(60));if("object"!==typeof u||!("__html"in u))throw Error(i(61));null!==(n=u.__html)&&void 0!==n&&("string"===typeof n&&0<n.length&&"\n"===n[0]?e.push("\n",n):e.push(""+n))}return"string"===typeof c&&"\n"===c[0]&&e.push("\n"),c;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var v in e.push(T(t)),n)if(s.call(n,v)&&null!=(c=n[v]))switch(v){case"children":case"dangerouslySetInnerHTML":throw Error(i(399,t));default:k(e,o,v,c)}return e.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return A(e,n,t,o);case"html":return 0===a.insertionMode&&e.push("<!DOCTYPE html>"),A(e,n,t,o);default:if(-1===t.indexOf("-")&&"string"!==typeof n.is)return A(e,n,t,o);for(p in e.push(T(t)),u=c=null,n)if(s.call(n,p)&&null!=(d=n[p]))switch(p){case"children":c=d;break;case"dangerouslySetInnerHTML":u=d;break;case"style":_(e,o,d);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:l(p)&&"function"!==typeof d&&"symbol"!==typeof d&&e.push(" ",p,'="',y(d),'"')}return e.push(">"),C(e,u,c),c}}function N(e,t,n){if(e.push('\x3c!--$?--\x3e<template id="'),null===n)throw Error(i(395));return e.push(n),e.push('"></template>')}var R=/[<\u2028\u2029]/g;function O(e){return JSON.stringify(e).replace(R,(function(e){switch(e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}))}function M(e,t,n,r){return n.generateStaticMarkup?(e.push(y(t)),!1):(""===t?e=r:(r&&e.push("\x3c!-- --\x3e"),e.push(y(t)),e=!0),e)}var j=Object.assign,L=Symbol.for("react.element"),D=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),z=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),K=Symbol.for("react.scope"),Z=Symbol.for("react.debug_trace_mode"),Y=Symbol.for("react.legacy_hidden"),Q=Symbol.for("react.default_value"),J=Symbol.iterator;function X(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case B:return"Fragment";case D:return"Portal";case F:return"Profiler";case U:return"StrictMode";case W:return"Suspense";case q:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case z:return(e.displayName||"Context")+".Consumer";case $:return(e._context.displayName||"Context")+".Provider";case H:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case V:return null!==(t=e.displayName||null)?t:X(e.type)||"Memo";case G:t=e._payload,e=e._init;try{return X(e(t))}catch(n){}}return null}var ee={};function te(e,t){if(!(e=e.contextTypes))return ee;var n,r={};for(n in e)r[n]=t[n];return r}var ne=null;function re(e,t){if(e!==t){e.context._currentValue2=e.parentValue,e=e.parent;var n=t.parent;if(null===e){if(null!==n)throw Error(i(401))}else{if(null===n)throw Error(i(401));re(e,n)}t.context._currentValue2=t.value}}function ie(e){e.context._currentValue2=e.parentValue,null!==(e=e.parent)&&ie(e)}function se(e){var t=e.parent;null!==t&&se(t),e.context._currentValue2=e.value}function oe(e,t){if(e.context._currentValue2=e.parentValue,null===(e=e.parent))throw Error(i(402));e.depth===t.depth?re(e,t):oe(e,t)}function ae(e,t){var n=t.parent;if(null===n)throw Error(i(402));e.depth===n.depth?re(e,n):ae(e,n),t.context._currentValue2=t.value}function ce(e){var t=ne;t!==e&&(null===t?se(e):null===e?ie(t):t.depth===e.depth?re(t,e):t.depth>e.depth?oe(t,e):ae(t,e),ne=e)}var le={isMounted:function(){return!1},enqueueSetState:function(e,t){null!==(e=e._reactInternals).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e._reactInternals).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function ue(e,t,n,r){var i=void 0!==e.state?e.state:null;e.updater=le,e.props=n,e.state=i;var s={queue:[],replace:!1};e._reactInternals=s;var o=t.contextType;if(e.context="object"===typeof o&&null!==o?o._currentValue2:r,"function"===typeof(o=t.getDerivedStateFromProps)&&(i=null===(o=o(n,i))||void 0===o?i:j({},i,o),e.state=i),"function"!==typeof t.getDerivedStateFromProps&&"function"!==typeof e.getSnapshotBeforeUpdate&&("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount))if(t=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),t!==e.state&&le.enqueueReplaceState(e,e.state,null),null!==s.queue&&0<s.queue.length)if(t=s.queue,o=s.replace,s.queue=null,s.replace=!1,o&&1===t.length)e.state=t[0];else{for(s=o?t[0]:e.state,i=!0,o=o?1:0;o<t.length;o++){var a=t[o];null!=(a="function"===typeof a?a.call(e,s,n,r):a)&&(i?(i=!1,s=j({},s,a)):j(s,a))}e.state=s}else s.queue=null}var de={id:1,overflow:""};function he(e,t,n){var r=e.id;e=e.overflow;var i=32-pe(r)-1;r&=~(1<<i),n+=1;var s=32-pe(t)+i;if(30<s){var o=i-i%5;return s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,{id:1<<32-pe(t)+i|n<<i|r,overflow:s+e}}return{id:1<<s|n<<i|r,overflow:e}}var pe=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(fe(e)/me|0)|0},fe=Math.log,me=Math.LN2;var ge="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},ye=null,ve=null,we=null,be=null,xe=!1,Ee=!1,_e=0,ke=null,Ce=0;function Ae(){if(null===ye)throw Error(i(321));return ye}function Se(){if(0<Ce)throw Error(i(312));return{memoizedState:null,queue:null,next:null}}
vendor: 10,739 bytes, line 2
2function Ie(){return null===be?null===we?(xe=!1,we=be=Se()):(xe=!0,be=we):null===be.next?(xe=!1,be=be.next=Se()):(xe=!0,be=be.next),be}function Te(){ve=ye=null,Ee=!1,we=null,Ce=0,be=ke=null}function Pe(e,t){return"function"===typeof t?t(e):t}function Ne(e,t,n){if(ye=Ae(),be=Ie(),xe){var r=be.queue;if(t=r.dispatch,null!==ke&&void 0!==(n=ke.get(r))){ke.delete(r),r=be.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return be.memoizedState=r,[r,t]}return[be.memoizedState,t]}return e=e===Pe?"function"===typeof t?t():t:void 0!==n?n(t):t,be.memoizedState=e,e=(e=be.queue={last:null,dispatch:null}).dispatch=Oe.bind(null,ye,e),[be.memoizedState,e]}function Re(e,t){if(ye=Ae(),t=void 0===t?null:t,null!==(be=Ie())){var n=be.memoizedState;if(null!==n&&null!==t){var r=n[1];e:if(null===r)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!ge(t[i],r[i])){r=!1;break e}r=!0}if(r)return n[0]}}return e=e(),be.memoizedState=[e,t],e}function Oe(e,t,n){if(25<=Ce)throw Error(i(301));if(e===ye)if(Ee=!0,e={action:n,next:null},null===ke&&(ke=new Map),void 0===(n=ke.get(t)))ke.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function Me(){throw Error(i(394))}function je(){}var Le={readContext:function(e){return e._currentValue2},useContext:function(e){return Ae(),e._currentValue2},useMemo:Re,useReducer:Ne,useRef:function(e){ye=Ae();var t=(be=Ie()).memoizedState;return null===t?(e={current:e},be.memoizedState=e):t},useState:function(e){return Ne(Pe,e)},useInsertionEffect:je,useLayoutEffect:function(){},useCallback:function(e,t){return Re((function(){return e}),t)},useImperativeHandle:je,useEffect:je,useDebugValue:je,useDeferredValue:function(e){return Ae(),e},useTransition:function(){return Ae(),[!1,Me]},useId:function(){var e=ve.treeContext,t=e.overflow;e=((e=e.id)&~(1<<32-pe(e)-1)).toString(32)+t;var n=De;if(null===n)throw Error(i(404));return t=_e++,e=":"+n.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return Ae(),t(e._source)},useSyncExternalStore:function(e,t,n){if(void 0===n)throw Error(i(407));return n()}},De=null,Be=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Ue(e){return console.error(e),null}function Fe(){}function $e(e,t,n,r,i,s,o,a){e.allPendingTasks++,null===n?e.pendingRootTasks++:n.pendingTasks++;var c={node:t,ping:function(){var t=e.pingedTasks;t.push(c),1===t.length&&nt(e)},blockedBoundary:n,blockedSegment:r,abortSet:i,legacyContext:s,context:o,treeContext:a};return i.add(c),c}function ze(e,t,n,r,i,s){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n,lastPushedText:i,textEmbedded:s}}function He(e,t){if(null!=(e=e.onError(t))&&"string"!==typeof e)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function We(e,t){var n=e.onShellError;n(t),(n=e.onFatalError)(t),null!==e.destination?(e.status=2,e.destination.destroy(t)):(e.status=1,e.fatalError=t)}function qe(e,t,n,r,i){for(ye={},ve=t,_e=0,e=n(r,i);Ee;)Ee=!1,_e=0,Ce+=1,be=null,e=n(r,i);return Te(),e}function Ve(e,t,n,r){var s=n.render(),o=r.childContextTypes;if(null!==o&&void 0!==o){var a=t.legacyContext;if("function"!==typeof n.getChildContext)r=a;else{for(var c in n=n.getChildContext())if(!(c in o))throw Error(i(108,X(r)||"Unknown",c));r=j({},a,n)}t.legacyContext=r,Ze(e,t,s),t.legacyContext=a}else Ze(e,t,s)}function Ge(e,t){if(e&&e.defaultProps){for(var n in t=j({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function Ke(e,t,n,r,s){if("function"===typeof n)if(n.prototype&&n.prototype.isReactComponent){s=te(n,t.legacyContext);var o=n.contextType;ue(o=new n(r,"object"===typeof o&&null!==o?o._currentValue2:s),n,r,s),Ve(e,t,o,n)}else{s=qe(e,t,n,r,o=te(n,t.legacyContext));var a=0!==_e;if("object"===typeof s&&null!==s&&"function"===typeof s.render&&void 0===s.$$typeof)ue(s,n,r,o),Ve(e,t,s,n);else if(a){r=t.treeContext,t.treeContext=he(r,1,0);try{Ze(e,t,s)}finally{t.treeContext=r}}else Ze(e,t,s)}else{if("string"!==typeof n){switch(n){case Y:case Z:case U:case F:case B:case q:return void Ze(e,t,r.children);case K:throw Error(i(343));case W:e:{n=t.blockedBoundary,s=t.blockedSegment,o=r.fallback,r=r.children;var c={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:a=new Set,errorDigest:null},l=ze(0,s.chunks.length,c,s.formatContext,!1,!1);s.children.push(l),s.lastPushedText=!1;var u=ze(0,0,null,s.formatContext,!1,!1);u.parentFlushed=!0,t.blockedBoundary=c,t.blockedSegment=u;try{if(Qe(e,t,r),e.responseState.generateStaticMarkup||u.lastPushedText&&u.textEmbedded&&u.chunks.push("\x3c!-- --\x3e"),u.status=1,et(c,u),0===c.pendingTasks)break e}catch(d){u.status=4,c.forceClientRender=!0,c.errorDigest=He(e,d)}finally{t.blockedBoundary=n,t.blockedSegment=s}t=$e(e,o,n,l,a,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if("object"===typeof n&&null!==n)switch(n.$$typeof){case H:if(r=qe(e,t,n.render,r,s),0!==_e){n=t.treeContext,t.treeContext=he(n,1,0);try{Ze(e,t,r)}finally{t.treeContext=n}}else Ze(e,t,r);return;case V:return void Ke(e,t,n=n.type,r=Ge(n,r),s);case $:if(s=r.children,n=n._context,r=r.value,o=n._currentValue2,n._currentValue2=r,ne=r={parent:a=ne,depth:null===a?0:a.depth+1,context:n,parentValue:o,value:r},t.context=r,Ze(e,t,s),null===(e=ne))throw Error(i(403));return r=e.parentValue,e.context._currentValue2=r===Q?e.context._defaultValue:r,e=ne=e.parent,void(t.context=e);case z:return void Ze(e,t,r=(r=r.children)(n._currentValue2));case G:return void Ke(e,t,n=(s=n._init)(n._payload),r=Ge(n,r),void 0)}throw Error(i(130,null==n?n:typeof n,""))}switch(o=P((s=t.blockedSegment).chunks,n,r,e.responseState,s.formatContext),s.lastPushedText=!1,a=s.formatContext,s.formatContext=function(e,t,n){switch(t){case"select":return x(1,null!=n.value?n.value:n.defaultValue);case"svg":return x(2,null);case"math":return x(3,null);case"foreignObject":return x(1,null);case"table":return x(4,null);case"thead":case"tbody":case"tfoot":return x(5,null);case"colgroup":return x(7,null);case"tr":return x(6,null)}return 4<=e.insertionMode||0===e.insertionMode?x(1,null):e}(a,n,r),Qe(e,t,o),s.formatContext=a,n){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:s.chunks.push("</",n,">")}s.lastPushedText=!1}}function Ze(e,t,n){if(t.node=n,"object"===typeof n&&null!==n){switch(n.$$typeof){case L:return void Ke(e,t,n.type,n.props,n.ref);case D:throw Error(i(257));case G:var r=n._init;return void Ze(e,t,n=r(n._payload))}if(b(n))return void Ye(e,t,n);if(null===n||"object"!==typeof n?r=null:r="function"===typeof(r=J&&n[J]||n["@@iterator"])?r:null,r&&(r=r.call(n))){if(!(n=r.next()).done){var s=[];do{s.push(n.value),n=r.next()}while(!n.done);Ye(e,t,s)}return}throw e=Object.prototype.toString.call(n),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(n).join(", ")+"}":e))}"string"===typeof n?(r=t.blockedSegment).lastPushedText=M(t.blockedSegment.chunks,n,e.responseState,r.lastPushedText):"number"===typeof n&&((r=t.blockedSegment).lastPushedText=M(t.blockedSegment.chunks,""+n,e.responseState,r.lastPushedText))}function Ye(e,t,n){for(var r=n.length,i=0;i<r;i++){var s=t.treeContext;t.treeContext=he(s,r,i);try{Qe(e,t,n[i])}finally{t.treeContext=s}}}function Qe(e,t,n){var r=t.blockedSegment.formatContext,i=t.legacyContext,s=t.context;try{return Ze(e,t,n)}catch(c){if(Te(),"object"!==typeof c||null===c||"function"!==typeof c.then)throw t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=s,ce(s),c;n=c;var o=t.blockedSegment,a=ze(0,o.chunks.length,null,o.formatContext,o.lastPushedText,!0);o.children.push(a),o.lastPushedText=!1,e=$e(e,t.node,t.blockedBoundary,a,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=s,ce(s)}}function Je(e){var t=e.blockedBoundary;(e=e.blockedSegment).status=3,tt(this,t,e)}function Xe(e,t,n){var r=e.blockedBoundary;e.blockedSegment.status=3,null===r?(t.allPendingTasks--,2!==t.status&&(t.status=2,null!==t.destination&&t.destination.push(null))):(r.pendingTasks--,r.forceClientRender||(r.forceClientRender=!0,e=void 0===n?Error(i(432)):n,r.errorDigest=t.onError(e),r.parentFlushed&&t.clientRenderedBoundaries.push(r)),r.fallbackAbortableTasks.forEach((function(e){return Xe(e,t,n)})),r.fallbackAbortableTasks.clear(),t.allPendingTasks--,0===t.allPendingTasks&&(r=t.onAllReady)())}function et(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1===n.status&&et(e,n)}else e.completedSegments.push(t)}function tt(e,t,n){if(null===t){if(n.parentFlushed){if(null!==e.completedRootSegment)throw Error(i(389));e.completedRootSegment=n}e.pendingRootTasks--,0===e.pendingRootTasks&&(e.onShellError=Fe,(t=e.onShellReady)())}else t.pendingTasks--,t.forceClientRender||(0===t.pendingTasks?(n.parentFlushed&&1===n.status&&et(t,n),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(Je,e),t.fallbackAbortableTasks.clear()):n.parentFlushed&&1===n.status&&(et(t,n),1===t.completedSegments.length&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,0===e.allPendingTasks&&(e=e.onAllReady)()}function nt(e){if(2!==e.status){var t=ne,n=Be.current;Be.current=Le;var r=De;De=e.responseState;try{var i,s=e.pingedTasks;for(i=0;i<s.length;i++){var o=s[i],a=e,c=o.blockedSegment;if(0===c.status){ce(o.context);try{Ze(a,o,o.node),a.responseState.generateStaticMarkup||c.lastPushedText&&c.textEmbedded&&c.chunks.push("\x3c!-- --\x3e"),o.abortSet.delete(o),c.status=1,tt(a,o.blockedBoundary,c)}catch(p){if(Te(),"object"===typeof p&&null!==p&&"function"===typeof p.then){var l=o.ping;p.then(l,l)}else{o.abortSet.delete(o),c.status=4;var u=o.blockedBoundary,d=p,h=He(a,d);if(null===u?We(a,d):(u.pendingTasks--,u.forceClientRender||(u.forceClientRender=!0,u.errorDigest=h,u.parentFlushed&&a.clientRenderedBoundaries.push(u))),a.allPendingTasks--,0===a.allPendingTasks)(0,a.onAllReady)()}}}}s.splice(0,i),null!==e.destination&&ct(e,e.destination)}catch(p){He(e,p),We(e,p)}finally{De=r,Be.current=n,n===Le&&ce(t)}}}function rt(e,t,n){switch(n.parentFlushed=!0,n.status){case 0:var r=n.id=e.nextSegmentId++;return n.lastPushedText=!1,n.textEmbedded=!1,e=e.responseState,t.push('<template id="'),t.push(e.placeholderPrefix),e=r.toString(16),t.push(e),t.push('"></template>');case 1:n.status=2;var s=!0;r=n.chunks;var o=0;
vendor: 5,650 bytes, line 2
2n=n.children;for(var a=0;a<n.length;a++){for(s=n[a];o<s.index;o++)t.push(r[o]);s=it(e,t,s)}for(;o<r.length-1;o++)t.push(r[o]);return o<r.length&&(s=t.push(r[o])),s;default:throw Error(i(390))}}function it(e,t,n){var r=n.boundary;if(null===r)return rt(e,t,n);if(r.parentFlushed=!0,r.forceClientRender)return e.responseState.generateStaticMarkup||(r=r.errorDigest,t.push("\x3c!--$!--\x3e"),t.push("<template"),r&&(t.push(' data-dgst="'),r=y(r),t.push(r),t.push('"')),t.push("></template>")),rt(e,t,n),e=!!e.responseState.generateStaticMarkup||t.push("\x3c!--/$--\x3e");if(0<r.pendingTasks){r.rootSegmentID=e.nextSegmentId++,0<r.completedSegments.length&&e.partialBoundaries.push(r);var s=e.responseState,o=s.nextSuspenseID++;return s=s.boundaryPrefix+o.toString(16),r=r.id=s,N(t,e.responseState,r),rt(e,t,n),t.push("\x3c!--/$--\x3e")}if(r.byteSize>e.progressiveChunkSize)return r.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(r),N(t,e.responseState,r.id),rt(e,t,n),t.push("\x3c!--/$--\x3e");if(e.responseState.generateStaticMarkup||t.push("\x3c!--$--\x3e"),1!==(n=r.completedSegments).length)throw Error(i(391));return it(e,t,n[0]),e=!!e.responseState.generateStaticMarkup||t.push("\x3c!--/$--\x3e")}function st(e,t,n){return function(e,t,n,r){switch(n.insertionMode){case 0:case 1:return e.push('<div hidden id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 2:return e.push('<svg aria-hidden="true" style="display:none" id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 3:return e.push('<math aria-hidden="true" style="display:none" id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 4:return e.push('<table hidden id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 5:return e.push('<table hidden><tbody id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 6:return e.push('<table hidden><tr id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 7:return e.push('<table hidden><colgroup id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');default:throw Error(i(397))}}(t,e.responseState,n.formatContext,n.id),it(e,t,n),function(e,t){switch(t.insertionMode){case 0:case 1:return e.push("</div>");case 2:return e.push("</svg>");case 3:return e.push("</math>");case 4:return e.push("</table>");case 5:return e.push("</tbody></table>");case 6:return e.push("</tr></table>");case 7:return e.push("</colgroup></table>");default:throw Error(i(397))}}(t,n.formatContext)}function ot(e,t,n){for(var r=n.completedSegments,s=0;s<r.length;s++)at(e,t,n,r[s]);if(r.length=0,e=e.responseState,r=n.id,n=n.rootSegmentID,t.push(e.startInlineScript),e.sentCompleteBoundaryFunction?t.push('$RC("'):(e.sentCompleteBoundaryFunction=!0,t.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),null===r)throw Error(i(395));return n=n.toString(16),t.push(r),t.push('","'),t.push(e.segmentPrefix),t.push(n),t.push('")<\/script>')}function at(e,t,n,r){if(2===r.status)return!0;var s=r.id;if(-1===s){if(-1===(r.id=n.rootSegmentID))throw Error(i(392));return st(e,t,r)}return st(e,t,r),e=e.responseState,t.push(e.startInlineScript),e.sentCompleteSegmentFunction?t.push('$RS("'):(e.sentCompleteSegmentFunction=!0,t.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),t.push(e.segmentPrefix),s=s.toString(16),t.push(s),t.push('","'),t.push(e.placeholderPrefix),t.push(s),t.push('")<\/script>')}function ct(e,t){try{var n=e.completedRootSegment;if(null!==n&&0===e.pendingRootTasks){it(e,t,n),e.completedRootSegment=null;var r=e.responseState.bootstrapChunks;for(n=0;n<r.length-1;n++)t.push(r[n]);n<r.length&&t.push(r[n])}var s,o=e.clientRenderedBoundaries;for(s=0;s<o.length;s++){var a=o[s];r=t;var c=e.responseState,l=a.id,u=a.errorDigest,d=a.errorMessage,h=a.errorComponentStack;if(r.push(c.startInlineScript),c.sentClientRenderFunction?r.push('$RX("'):(c.sentClientRenderFunction=!0,r.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),null===l)throw Error(i(395));if(r.push(l),r.push('"'),u||d||h){r.push(",");var p=O(u||"");r.push(p)}if(d||h){r.push(",");var f=O(d||"");r.push(f)}if(h){r.push(",");var m=O(h);r.push(m)}if(!r.push(")<\/script>"))return e.destination=null,s++,void o.splice(0,s)}o.splice(0,s);var g=e.completedBoundaries;for(s=0;s<g.length;s++)if(!ot(e,t,g[s]))return e.destination=null,s++,void g.splice(0,s);g.splice(0,s);var y=e.partialBoundaries;for(s=0;s<y.length;s++){var v=y[s];e:{o=e,a=t;var w=v.completedSegments;for(c=0;c<w.length;c++)if(!at(o,a,v,w[c])){c++,w.splice(0,c);var b=!1;break e}w.splice(0,c),b=!0}if(!b)return e.destination=null,s++,void y.splice(0,s)}y.splice(0,s);var x=e.completedBoundaries;for(s=0;s<x.length;s++)if(!ot(e,t,x[s]))return e.destination=null,s++,void x.splice(0,s);x.splice(0,s)}finally{0===e.allPendingTasks&&0===e.pingedTasks.length&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&t.push(null)}}function lt(e,t){try{var n=e.abortableTasks;
vendor: 5,316 bytes, line 2
2n.forEach((function(n){return Xe(n,e,t)})),n.clear(),null!==e.destination&&ct(e,e.destination)}catch(r){He(e,r),We(e,r)}}function ut(){}function dt(e,t,n,r){var s=!1,o=null,a="",c={push:function(e){return null!==e&&(a+=e),!0},destroy:function(e){s=!0,o=e}},l=!1;if(e=function(e,t,n,r,i,s,o,a,c){var l=[],u=new Set;return(n=ze(t={destination:null,responseState:t,progressiveChunkSize:void 0===r?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:u,pingedTasks:l,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===i?Ue:i,onAllReady:void 0===s?Fe:s,onShellReady:void 0===o?Fe:o,onShellError:void 0===a?Fe:a,onFatalError:void 0===c?Fe:c},0,null,n,!1,!1)).parentFlushed=!0,e=$e(t,e,null,n,u,ee,null,de),l.push(e),t}(e,function(e,t){return{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:(t=void 0===t?"":t)+"P:",segmentPrefix:t+"S:",boundaryPrefix:t+"B:",idPrefix:t,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:e}}(n,t?t.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,ut,void 0,(function(){l=!0}),void 0,void 0),nt(e),lt(e,r),1===e.status)e.status=2,c.destroy(e.fatalError);else if(2!==e.status&&null===e.destination){e.destination=c;try{ct(e,c)}catch(u){He(e,u),We(e,u)}}if(s)throw o;if(!l)throw Error(i(426));return a}t.renderToNodeStream=function(){throw Error(i(207))},t.renderToStaticMarkup=function(e,t){return dt(e,t,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},t.renderToStaticNodeStream=function(){throw Error(i(208))},t.renderToString=function(e,t){return dt(e,t,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},t.version="18.2.0"},3773:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,o){if("function"!==typeof r)throw new TypeError("The listener must be a function");var a=new i(r,s||e,o),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function o(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i<s;i++)o[i]=r[i].fn;return o},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,s,o){var a=n?n+e:e;if(!this._events[a])return!1;var c,l,u=this._events[a],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,s),!0;case 6:return u.fn.call(u.context,t,r,i,s,o),!0}for(l=1,c=new Array(d-1);l<d;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var h,p=u.length;for(l=0;l<p;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),d){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,r);break;case 4:u[l].fn.call(u[l].context,t,r,i);break;default:if(!c)for(h=1,c=new Array(d-1);h<d;h++)c[h-1]=arguments[h];u[l].fn.apply(u[l].context,c)}}return!0},a.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return o(this,s),this;var a=this._events[s];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||o(this,s);else{for(var c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==t||i&&!a[c].once||r&&a[c].context!==r)&&l.push(a[c]);l.length?this._events[s]=1===l.length?l[0]:l:o(this,s)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},3856:function(e){e.exports=function(){"use strict";return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","
2st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}}}()},3858:(e,t,n)=>{e.exports=n(722)(n(4599))},3942:e=>{"use strict";e.exports=(e,t)=>{if("string"!==typeof e||"string"!==typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},3979:e=>{"use strict";e.exports=function(e){for(var t=[],n=e.length,r=0;r<n;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319&&n>r+1){var s=e.charCodeAt(r+1);s>=56320&&s<=57343&&(i=1024*(i-55296)+s-56320+65536,r+=1)}i<128?t.push(i):i<2048?(t.push(i>>6|192),t.push(63&i|128)):i<55296||i>=57344&&i<65536?(t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)):i>=65536&&i<=1114111?(t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},4046:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CBW_MOBILE_DEEPLINK_URL=t.WALLETLINK_URL=t.CB_KEYS_URL=void 0,t.CB_KEYS_URL="https://keys.coinbase.com/connect",t.WALLETLINK_URL="https://www.walletlink.org",t.CBW_MOBILE_DEEPLINK_URL="https://go.cb-w.com/walletlink"},4059:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},4105:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decryptContent=t.encryptContent=t.importKeyFromHexString=t.exportKeyToHexString=t.decrypt=t.encrypt=t.deriveSharedSecret=t.generateKeyPair=void 0;const r=n(8114);async function i(e,t){const n=crypto.getRandomValues(new Uint8Array(12));return{iv:n,cipherText:await crypto.subtle.encrypt({name:"AES-GCM",iv:n},e,(new TextEncoder).encode(t))}}async function s(e,t){let{iv:n,cipherText:r}=t;const i=await crypto.subtle.decrypt({name:"AES-GCM",iv:n},e,r);return(new TextDecoder).decode(i)}function o(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}t.generateKeyPair=async function(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])},t.deriveSharedSecret=async function(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])},t.encrypt=i,t.decrypt=s,t.exportKeyToHexString=async function(e,t){const n=o(e),i=await crypto.subtle.exportKey(n,t);return(0,r.uint8ArrayToHex)(new Uint8Array(i))},t.importKeyFromHexString=async function(e,t){const n=o(e),i=(0,r.hexStringToUint8Array)(t).buffer;return await crypto.subtle.importKey(n,i,{name:"ECDH",namedCurve:"P-256"},!0,"private"===e?["deriveKey"]:[])},t.encryptContent=async function(e,t){return i(t,JSON.stringify(e,((e,t)=>{if(!(t instanceof Error))return t;const n=t;return Object.assign(Object.assign({},n.code?{code:n.code}:{}),{message:n.message})})))},t.decryptContent=async function(e,t){return JSON.parse(await s(t,e))}},4115:(e,t,n)=>{"use strict";n.d(t,{M:()=>o});var r=n(3103);const i={attribute:!0,type:String,converter:r.W3,reflect:!1,hasChanged:r.Ec},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const{kind:r,metadata:s}=n;let o=globalThis.litPropertyMetadata.get(s);if(void 0===o&&globalThis.litPropertyMetadata.set(s,o=new Map),o.set(n.name,e),"accessor"===r){const{name:r}=n;return{set(n){const i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e)},init(t){return void 0!==t&&this.P(r,void 0,e),t}}}if("setter"===r){const{name:r}=n;return function(n){const i=this[r];t.call(this,n),this.requestUpdate(r,i,e)}}throw Error("Unsupported decorator location: "+r)};function o(e){return(t,n)=>"object"==typeof n?s(e,t,n):((e,t,n)=>{const r=t.hasOwnProperty(n);return t.constructor.createProperty(n,r?{...e,wrapped:!0}:e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}},4147:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
vendor: 7,071 bytes, line 2
2t%2?r(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function a(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}var c=n(3325).Buffer,l=n(2959).inspect,u=l&&l.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n,r;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t,n,r,i=c.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,n=i,r=o,c.prototype.copy.call(t,n,r),o+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?r+=i:r+=i.slice(0,e),0===(e-=s)){s===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0===(e-=s)){s===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(s));break}++r}return this.length-=r,t}},{key:u,value:function(e,t){return l(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,n),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},4159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",i="second",s="minute",o="hour",a="day",c="week",l="month",u="quarter",d="year",h="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},y=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},v={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),s=n-i<0,o=t.clone().add(r+(s?-1:1),l);return+(-(r+(n-i)/(s?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:a,D:h,h:o,m:s,s:i,ms:r,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",b={};b[w]=g;var x="$isDayjsObject",E=function(e){return e instanceof A||!(!e||!e[x])},_=function e(t,n,r){var i;if(!t)return w;if("string"==typeof t){var s=t.toLowerCase();b[s]&&(i=s),n&&(b[s]=n,i=s);var o=t.split("-");if(!i&&o.length>1)return e(o[0])}else{var a=t.name;b[a]=t,i=a}return!r&&i&&(w=i),i||!r&&w},k=function(e,t){if(E(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new A(n)},C=v;C.l=_,C.i=E,C.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var A=function(){function g(e){this.$L=_(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var y=g.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(f);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(t)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return C},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return k(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<k(e)},y.$g=function(e,t,n){return C.u(e)?this[t]:this.set(n,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var n=this,r=!!C.u(t)||t,u=C.p(e),p=function(e,t){var i=C.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(a)},f=function(e,t){return C.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,g=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var w=this.$locale().weekStart||0,b=(m<w?m+7:m)-w;return p(r?y-b:y+(6-b),g);case a:case h:return f(v+"Hours",0);case o:return f(v+"Minutes",1);case s:return f(v+"Seconds",2);case i:return f(v+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var n,c=C.p(e),u="set"+(this.$u?"UTC":""),p=(n={},n[a]=u+"Date",n[h]=u+"Date",n[l]=u+"Month",n[d]=u+"FullYear",n[o]=u+"Hours",n[s]=u+"Minutes",n[i]=u+"Seconds",n[r]=u+"Milliseconds",n)[c],f=c===a?this.$D+(t-this.$W):t;if(c===l||c===d){var m=this.clone().set(h,1);
2m.$d[p](f),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[C.p(e)]()},y.add=function(r,u){var h,p=this;r=Number(r);var f=C.p(u),m=function(e){var t=k(p);return C.w(t.date(t.date()+Math.round(e*r)),p)};if(f===l)return this.set(l,this.$M+r);if(f===d)return this.set(d,this.$y+r);if(f===a)return m(1);if(f===c)return m(7);var g=(h={},h[s]=t,h[o]=n,h[i]=e,h)[f]||1,y=this.$d.getTime()+r*g;return C.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=C.z(this),s=this.$H,o=this.$m,a=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,s){return e&&(e[n]||e(t,r))||i[n].slice(0,s)},h=function(e){return C.s(s%12||12,e,"0")},f=u||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return C.s(t.$y,4,"0");case"M":return a+1;case"MM":return C.s(a+1,2,"0");case"MMM":return d(n.monthsShort,a,l,3);case"MMMM":return d(l,a);case"D":return t.$D;case"DD":return C.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,c,2);case"ddd":return d(n.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(s);case"HH":return C.s(s,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return f(s,o,!0);case"A":return f(s,o,!1);case"m":return String(o);case"mm":return C.s(o,2,"0");case"s":return String(t.$s);case"ss":return C.s(t.$s,2,"0");case"SSS":return C.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,h,p){var f,m=this,g=C.p(h),y=k(r),v=(y.utcOffset()-this.utcOffset())*t,w=this-y,b=function(){return C.m(m,y)};switch(g){case d:f=b()/12;break;case l:f=b();break;case u:f=b()/3;break;case c:f=(w-v)/6048e5;break;case a:f=(w-v)/864e5;break;case o:f=w/n;break;case s:f=w/t;break;case i:f=w/e;break;default:f=w}return p?f:C.a(f)},y.daysInMonth=function(){return this.endOf(l).$D},y.$locale=function(){return b[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=_(e,t,!0);return r&&(n.$L=r),n},y.clone=function(){return C.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},g}(),S=A.prototype;return k.prototype=S,[["$ms",r],["$s",i],["$m",s],["$H",o],["$W",a],["$M",l],["$y",d],["$D",h]].forEach((function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),k.extend=function(e,t){return e.$i||(e(t,A,k),e.$i=!0),k},k.locale=_,k.isDayjs=E,k.unix=function(e){return k(1e3*e)},k.en=b[w],k.Ls=b,k.p={},k}()},4244:(e,t,n)=>{"use strict";function r(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,s=[],o=[],a={},c=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:c,headers:{keys:function(){return s},entries:function(){return o},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var l in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){s.push(t=t.toLowerCase()),o.push([t,n]),a[t]=a[t]?a[t]+","+n:n})),n(c())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(l,t.headers[l]);i.send(t.body||null)}))}n.r(t),n.d(t,{default:()=>r})},4262:(e,t,n)=>{"use strict";n.d(t,{d:()=>i});var r=n(8598);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const n=r.A[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}},4263:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MathUtil:()=>qo,TransactionUtil:()=>Ko,UiHelperUtil:()=>Kn,WuiAccountButton:()=>or,WuiAllWalletsImage:()=>hr,WuiAvatar:()=>er,WuiBalance:()=>no,WuiBanner:()=>mo,WuiButton:()=>vr,WuiCard:()=>Ne,WuiCardSelect:()=>Pr,WuiCardSelectLoader:()=>Er,WuiChip:()=>Or,WuiChipButton:()=>co,WuiCompatibleNetwork:()=>ho,WuiConnectButton:()=>Lr,WuiCtaButton:()=>Ur,WuiDetailsGroup:()=>zr,WuiDetailsGroupItem:()=>qr,WuiEmailInput:()=>li,WuiEnsInput:()=>hi,WuiFlex:()=>Qn,WuiGrid:()=>$o,WuiIcon:()=>Qt,WuiIconBox:()=>rr,WuiIconButton:()=>Ro,WuiIconLink:()=>mi,WuiImage:()=>en,WuiInputAmount:()=>Ao,WuiInputElement:()=>vi,WuiInputNumeric:()=>xi,WuiInputText:()=>oi,WuiLink:()=>ki,WuiListAccordion:()=>Ms,WuiListButton:()=>jo,WuiListContent:()=>Ds,WuiListDescription:()=>xo,WuiListItem:()=>Si,WuiListNetwork:()=>Fs,WuiListSocial:()=>Bo,WuiListToken:()=>vo,WuiListWallet:()=>Hi,WuiListWalletTransaction:()=>Hs,WuiLoadingHexagon:()=>rn,WuiLoadingSpinner:()=>an,WuiLoadingThumbnail:()=>un,WuiLogo:()=>Vi,WuiLogoSelect:()=>Zi,WuiNetworkButton:()=>
vendor: 4,928 bytes, line 2
2Ji,WuiNetworkImage:()=>Sr,WuiNoticeCard:()=>Ns,WuiOnRampActivityItem:()=>Gs,WuiOnRampProviderItem:()=>Ys,WuiOtp:()=>ts,WuiPreviewItem:()=>To,WuiProfileButton:()=>so,WuiPromo:()=>Xs,WuiQrCode:()=>as,WuiSearchBar:()=>us,WuiSeparator:()=>Wo,WuiShimmer:()=>pn,WuiSnackbar:()=>ps,WuiTabs:()=>gs,WuiTag:()=>Fi,WuiText:()=>xn,WuiTokenButton:()=>ws,WuiTokenListItem:()=>Cs,WuiTooltip:()=>Es,WuiTransactionListItem:()=>Mi,WuiTransactionListItemLoader:()=>Di,WuiTransactionVisual:()=>Ni,WuiVisual:()=>Vn,WuiVisualThumbnail:()=>Is,WuiWalletImage:()=>lr,customElement:()=>Ie,initializeTheming:()=>xe,setColorTheme:()=>Ee,setThemeVariables:()=>_e,swapInputMaskBottomSvg:()=>me,swapInputMaskTopSvg:()=>ge});const r=globalThis,i=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class a{constructor(e,t,n){if(this._$cssResult$=!0,n!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=o.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&o.set(t,e))}return e}toString(){return this.cssText}}const c=e=>new a("string"==typeof e?e:e+"",void 0,s),l=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=1===e.length?e[0]:n.reduce(((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[r+1]),e[0]);return new a(i,e,s)},u=(e,t)=>{if(i)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),i=r.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}},d=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return c(t)})(e):e,{is:h,defineProperty:p,getOwnPropertyDescriptor:f,getOwnPropertyNames:m,getOwnPropertySymbols:g,getPrototypeOf:y}=Object,v=globalThis,w=v.trustedTypes,b=w?w.emptyScript:"",x=v.reactiveElementPolyfillSupport,E=(e,t)=>e,_={toAttribute(e,t){switch(t){case Boolean:e=e?b:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},k=(e,t)=>!h(e,t),C={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:k};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;class A extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C;if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(e,n,t);void 0!==r&&p(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){const{get:r,set:i}=f(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return r?.call(this)},set(t){const s=r?.call(this);i.call(this,t),this.requestUpdate(e,s,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??C}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const e=y(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const e=this.properties,t=[...m(e),...g(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const e=this._$Eu(t,n);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(d(e))}else void 0!==e&&t.push(d(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}
vendor: 4,410 bytes, line 2
2removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return u(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EC(e,t){const n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(void 0!==r&&!0===n.reflect){const i=(void 0!==n.converter?.toAttribute?n.converter:_).toAttribute(t,n.type);this._$Em=e,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){const n=this.constructor,r=n._$Eh.get(e);if(void 0!==r&&this._$Em!==r){const e=n.getPropertyOptions(r),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:_;this._$Em=r,this[r]=i.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){if(n??=this.constructor.getPropertyOptions(e),!(n.hasChanged??k)(this[e],t))return;this.P(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,n){this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e)!0!==n.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],n)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[E("elementProperties")]=new Map,A[E("finalized")]=new Map,x?.({ReactiveElement:A}),(v.reactiveElementVersions??=[]).push("2.0.4");const S=globalThis,I=S.trustedTypes,T=I?I.createPolicy("lit-html",{createHTML:e=>e}):void 0,P="$lit$",N=`lit$${Math.random().toFixed(9).slice(2)}$`,R="?"+N,O=`<${R}>`,M=document,j=()=>M.createComment(""),L=e=>null===e||"object"!=typeof e&&"function"!=typeof e,D=Array.isArray,B=e=>D(e)||"function"==typeof e?.[Symbol.iterator],U="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,z=/>/g,H=RegExp(`>|${U}(?:([^\\s"'>=/]+)(${U}*=${U}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),W=/'/g,q=/"/g,V=/^(?:script|style|textarea|title)$/i,G=e=>function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return{_$litType$:e,strings:t,values:r}},K=G(1),Z=G(2),Y=Symbol.for("lit-noChange"),Q=Symbol.for("lit-nothing"),J=new WeakMap,X=M.createTreeWalker(M,129);function ee(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==T?T.createHTML(t):t}const te=(e,t)=>{const n=e.length-1,r=[];let i,s=2===t?"<svg>":"",o=F;for(let a=0;a<n;a++){const t=e[a];let n,c,l=-1,u=0;for(;u<t.length&&(o.lastIndex=u,c=o.exec(t),null!==c);)u=o.lastIndex,o===F?"!--"===c[1]?o=$:void 0!==c[1]?o=z:void 0!==c[2]?(V.test(c[2])&&(i=RegExp("</"+c[2],"g")),o=H):void 0!==c[3]&&(o=H):o===H?">"===c[0]?(o=i??F,l=-1):void 0===c[1]?l=-2:(l=o.lastIndex-c[2].length,n=c[1],o=void 0===c[3]?H:'"'===c[3]?q:W):o===q||o===W?o=H:o===$||o===z?o=F:(o=H,i=void 0);const d=o===H&&e[a+1].startsWith("/>")?" ":"";s+=o===F?t+O:l>=0?(r.push(n),t.slice(0,l)+P+t.slice(l)+N+d):t+N+(-2===l?a:d)}return[ee(e,s+(e[n]||"<?>")+(2===t?"</svg>":"")),r]};
vendor: 6,838 bytes, line 2
2class ne{constructor(e,t){let n,{strings:r,_$litType$:i}=e;this.parts=[];let s=0,o=0;const a=r.length-1,c=this.parts,[l,u]=te(r,i);if(this.el=ne.createElement(l,t),X.currentNode=this.el.content,2===i){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=X.nextNode())&&c.length<a;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(P)){const t=u[o++],r=n.getAttribute(e).split(N),i=/([.?@])?(.*)/.exec(t);c.push({type:1,index:s,name:i[2],strings:r,ctor:"."===i[1]?ae:"?"===i[1]?ce:"@"===i[1]?le:oe}),n.removeAttribute(e)}else e.startsWith(N)&&(c.push({type:6,index:s}),n.removeAttribute(e));if(V.test(n.tagName)){const e=n.textContent.split(N),t=e.length-1;if(t>0){n.textContent=I?I.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],j()),X.nextNode(),c.push({type:2,index:++s});n.append(e[t],j())}}}else if(8===n.nodeType)if(n.data===R)c.push({type:2,index:s});else{let e=-1;for(;-1!==(e=n.data.indexOf(N,e+1));)c.push({type:7,index:s}),e+=N.length-1}s++}}static createElement(e,t){const n=M.createElement("template");return n.innerHTML=e,n}}function re(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3?arguments[3]:void 0;if(t===Y)return t;let i=void 0!==r?n._$Co?.[r]:n._$Cl;const s=L(t)?void 0:t._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),void 0===s?i=void 0:(i=new s(e),i._$AT(e,n,r)),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(t=re(e,i._$AS(e,t.values),i,r)),t}class ie{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??M).importNode(t,!0);X.currentNode=r;let i=X.nextNode(),s=0,o=0,a=n[0];for(;void 0!==a;){if(s===a.index){let t;2===a.type?t=new se(i,i.nextSibling,this,e):1===a.type?t=new a.ctor(i,a.name,a.strings,this,e):6===a.type&&(t=new ue(i,this,e)),this._$AV.push(t),a=n[++o]}s!==a?.index&&(i=X.nextNode(),s++)}return X.currentNode=M,r}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class se{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=Q,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e){e=re(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),L(e)?e===Q||null==e||""===e?(this._$AH!==Q&&this._$AR(),this._$AH=Q):e!==this._$AH&&e!==Y&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):B(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==Q&&L(this._$AH)?this._$AA.nextSibling.data=e:this.T(M.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,r="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=ne.createElement(ee(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{const e=new ie(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=J.get(e.strings);return void 0===t&&J.set(e.strings,t=new ne(e)),t}k(e){D(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,r=0;for(const i of e)r===t.length?t.push(n=new se(this.S(j()),this.S(j()),this,this.options)):n=t[r],n._$AI(i),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,t=arguments.length>1?arguments[1]:void 0;for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class oe{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=Q,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Q}_$AI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=this.strings;let s=!1;if(void 0===i)e=re(this,e,t,0),s=!L(e)||e!==this._$AH&&e!==Y,s&&(this._$AH=e);else{const r=e;let o,a;for(e=i[0],o=0;o<i.length-1;o++)a=re(this,r[n+o],t,o),a===Y&&(a=this._$AH[o]),s||=!L(a)||a!==this._$AH[o],a===Q?e=Q:e!==Q&&(e+=(a??"")+i[o+1]),this._$AH[o]=a}s&&!r&&this.j(e)}j(e){e===Q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ae extends oe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Q?void 0:e}}class ce extends oe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Q)}}class le extends oe{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e){if((e=re(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0)??Q)===Y)return;const t=this._$AH,n=e===Q&&t!==Q||e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive,r=e!==Q&&(t===Q||n);n&&this.element.removeEventListener(this.name,this,t),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class ue{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){re(this,e)}}const de={P:P,A:N,C:R,M:1,L:te,R:ie,D:B,V:re,I:se,H:oe,N:ce,U:le,B:ae,F:ue},he=S.litHtmlPolyfillSupport;he?.(ne,se),(S.litHtmlVersions??=[]).push("3.1.4");class pe extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{const r=n?.renderBefore??t;let i=r._$litPart$;if(void 0===i){const e=n?.renderBefore??null;r._$litPart$=i=new se(t.insertBefore(j(),e),e,void 0,n??{})}return i._$AI(e),i})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Y}}pe._$litElement$=!0,pe.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:pe});const fe=globalThis.litElementPolyfillSupport;fe?.({LitElement:pe});(globalThis.litElementVersions??=[]).push("4.0.6");const me=Z`<svg class="input_mask" width="328" height="100" viewB
2ox="0 0 328 100" fill="none"> 3 <mask id="path-1-inside-1_18299_4189"> 4 <path 5 class="input_mask__border" 6 fill-rule="evenodd" 7 clip-rule="evenodd" 8 d="M138.008 0H40C21.1438 0 11.7157 0 5.85786 5.85786C0 11.7157 0 21.1438 0 40V60C0 78.8562 0 88.2843 5.85786 94.1421C11.7157 100 21.1438 100 40 100H288C306.856 100 316.284 100 322.142 94.1421C328 88.2843 328 78.8562 328 60V40C328 21.1438 328 11.7157 322.142 5.85786C316.284 0 306.856 0 288 0H189.992C189.958 4.89122 189.786 7.76279 188.914 10.1564C187.095 15.1562 183.156 19.0947 178.156 20.9145C175.174 22 171.449 22 164 22C156.551 22 152.826 22 149.844 20.9145C144.844 19.0947 140.905 15.1562 139.086 10.1564C138.214 7.76279 138.042 4.89122 138.008 0Z" 9 /> 10 </mask> 11 <path 12 class="input_mask__background" 13 fill-rule="evenodd" 14 clip-rule="evenodd" 15 d="M138.008 0H40C21.1438 0 11.7157 0 5.85786 5.85786C0 11.7157 0 21.1438 0 40V60C0 78.8562 0 88.2843 5.85786 94.1421C11.7157 100 21.1438 100 40 100H288C306.856 100 316.284 100 322.142 94.1421C328 88.2843 328 78.8562 328 60V40C328 21.1438 328 11.7157 322.142 5.85786C316.284 0 306.856 0 288 0H189.992C189.958 4.89122 189.786 7.76279 188.914 10.1564C187.095 15.1562 183.156 19.0947 178.156 20.9145C175.174 22 171.449 22 164 22C156.551 22 152.826 22 149.844 20.9145C144.844 19.0947 140.905 15.1562 139.086 10.1564C138.214 7.76279 138.042 4.89122 138.008 0Z" 16 /> 17 <path 18 class="input_mask__border" 19 d="M138.008 0L139.008 -0.00694413L139.001 -1H138.008V0ZM322.142 94.1421L322.849 94.8492H322.849L322.142 94.1421ZM322.142 5.85786L322.849 5.15076L322.849 5.15076L322.142 5.85786ZM189.992 0V-1H188.999L188.992 -0.00694413L189.992 0ZM188.914 10.1564L189.854 10.4984V10.4984L188.914 10.1564ZM178.156 20.9145L177.814 19.9748V19.9748L178.156 20.9145ZM149.844 20.9145L150.186 19.9748V19.9748L149.844 20.9145ZM139.086 10.1564L138.146 10.4984V10.4984L139.086 10.1564ZM40 1H138.008V-1H40V1ZM6.56497 6.56497C9.27713 3.85281 12.8524 2.44064 18.1878 1.72332C23.552 1.00212 30.5436 1 40 1V-1C30.6002 -1 23.4497 -1.00212 17.9213 -0.25885C12.3641 0.488292 8.29646 2.00506 5.15076 5.15076L6.56497 6.56497ZM1 40C1 30.5436 1.00212 23.552 1.72332 18.1878C2.44064 12.8524 3.85281 9.27713 6.56497 6.56497L5.15076 5.15076C2.00506 8.29646 0.488292 12.3641 -0.25885 17.9213C-1.00212 23.4497 -1 30.6002 -1 40H1ZM1 60V40H-1V60H1ZM6.56497 93.435C3.85281 90.7229 2.44064 87.1476 1.72332 81.8122C1.00212 76.448 1 69.4564 1 60H-1C-1 69.3998 -1.00212 76.5503 -0.25885 82.0787C0.488292 87.6358 2.00506 91.7035 5.15076 94.8492L6.56497 93.435ZM40 99C30.5436 99 23.552 98.9979 18.1878 98.2767C12.8524 97.5594 9.27713 96.1472 6.56497 93.435L5.15076 94.8492C8.29646 97.9949 12.3641 99.5117 17.9213 100.259C23.4497 101.002 30.6002 101 40 101V99ZM288 99H40V101H288V99ZM321.435 93.435C318.723 96.1472 315.148 97.5594 309.812 98.2767C304.448 98.9979 297.456 99 288 99V101C297.4 101 304.55 101.002 310.079 100.259C315.636 99.5117 319.704 97.9949 322.849 94.8492L321.435 93.435ZM327 60C327 69.4564 326.998 76.448 326.277 81.8122C325.559 87.1476 324.147 90.7229 321.435 93.435L322.849 94.8492C325.995 91.7035 327.512 87.6358 328.259 82.0787C329.002 76.5503 329 69.3998 329 60H327ZM327 40V60H329V40H327ZM321.435 6.56497C324.147 9.27713 325.559 12.8524 326.277 18.1878C326.998 23.552 327 30.5436 327 40H329C329 30.6002 329.002 23.4497 328.259 17.9213C327.512 12.3642 325.995 8.29646 322.849 5.15076L321.435 6.56497ZM288 1C297.456 1 304.448 1.00212 309.812 1.72332C315.148 2.44064 318.723 3.85281 321.435 6.56497L322.849 5.15076C319.704 2.00506 315.636 0.488292 310.079 -0.25885C304.55 -1.00212 297.4 -1 288 -1V1ZM189.992 1H288V-1H189.992V1ZM188.992 -0.00694413C188.958 4.90792 188.778 7.60788 187.975 9.81434L189.854 10.4984C190.793 7.9177 190.958 4.87452 190.992 0.00694413L188.992 -0.00694413ZM187.975 9.81434C186.256 14.5364 182.536 18.2561 177.814 19.9748L178.498 21.8542C183.776 19.9333 187.933 15.7759 189.854 10.4984L187.975 9.81434ZM177.814 19.9748C175.039 20.9848 171.536 21 164 21V23C171.362 23 175.308 23.0152 178.498 21.8542L177.814 19.9748ZM164 21C156.464 21 152.961 20.9848 150.186 19.9748L149.502 21.8542C152.692 23.0152 156.638 23 164 23V21ZM150.186 19.9748C145.464 18.2561 141.744 14.5364 140.025 9.81434L138.146 10.4984C140.067 15.7759 144.224 19.9333 149.502 21.8542L150.186 19.9748ZM140.025 9.81434C139.222 7.60788 139.042 4.90792 139.008 -0.00694413L137.008 0.00694413C137.042 4.87452 137.207 7.9177 138.146 10.4984L140.025 9.81434Z" 20 mask="url(#path-1-inside-1_18299_4189)" 21 /> 22</svg>
22`,ge=Z`<svg class="input_mask" width="328" height="100" viewBox="0 0 328 100" fill="none"> 23 <mask id="path-1-inside-1_18299_4168"> 24 <path 25 class="input_mask__border" 26 fill-rule="evenodd" 27 clip-rule="evenodd" 28 d="M5.85786 5.85786C0 11.7157 0 21.1438 0 40V60C0 78.8562 0 88.2843 5.85786 94.1421C11.7157 100 21.1438 100 40 100H138.008C138.042 95.1088 138.214 92.2372 139.086 89.8436C140.905 84.8438 144.844 80.9053 149.844 79.0855C152.826 78 156.551 78 164 78C171.449 78 175.174 78 178.156 79.0855C183.156 80.9053 187.095 84.8438 188.914 89.8436C189.786 92.2372 189.958 95.1088 189.992 100H288C306.856 100 316.284 100 322.142 94.1421C328 88.2843 328 78.8562 328 60V40C328 21.1438 328 11.7157 322.142 5.85786C316.284 0 306.856 0 288 0H40C21.1438 0 11.7157 0 5.85786 5.85786Z" 29 /> 30 </mask> 31 <path 32 class="input_mask__background" 33 fill-rule="evenodd" 34 clip-rule="evenodd" 35 d="M5.85786 5.85786C0 11.7157 0 21.1438 0 40V60C0 78.8562 0 88.2843 5.85786 94.1421C11.7157 100 21.1438 100 40 100H138.008C138.042 95.1088 138.214 92.2372 139.086 89.8436C140.905 84.8438 144.844 80.9053 149.844 79.0855C152.826 78 156.551 78 164 78C171.449 78 175.174 78 178.156 79.0855C183.156 80.9053 187.095 84.8438 188.914 89.8436C189.786 92.2372 189.958 95.1088 189.992 100H288C306.856 100 316.284 100 322.142 94.1421C328 88.2843 328 78.8562 328 60V40C328 21.1438 328 11.7157 322.142 5.85786C316.284 0 306.856 0 288 0H40C21.1438 0 11.7157 0 5.85786 5.85786Z" 36 /> 37 <path 38 class="input_mask__border" 39 d="M138.008 100V101H139.001L139.008 100.007L138.008 100ZM139.086 89.8436L138.146 89.5016L139.086 89.8436ZM149.844 79.0855L150.186 80.0252L149.844 79.0855ZM178.156 79.0855L177.814 80.0252L178.156 79.0855ZM188.914 89.8436L189.854 89.5016L188.914 89.8436ZM189.992 100L188.992 100.007L188.999 101H189.992V100ZM322.142 94.1421L322.849 94.8492H322.849L322.142 94.1421ZM322.142 5.85786L322.849 5.15076L322.849 5.15076L322.142 5.85786ZM1 40C1 30.5436 1.00212 23.552 1.72332 18.1878C2.44064 12.8524 3.85281 9.27713 6.56497 6.56497L5.15076 5.15076C2.00506 8.29646 0.488292 12.3641 -0.25885 17.9213C-1.00212 23.4497 -1 30.6002 -1 40H1ZM1 60V40H-1V60H1ZM6.56497 93.435C3.85281 90.7229 2.44064 87.1476 1.72332 81.8122C1.00212 76.448 1 69.4564 1 60H-1C-1 69.3998 -1.00212 76.5503 -0.25885 82.0787C0.488292 87.6358 2.00506 91.7035 5.15076 94.8492L6.56497 93.435ZM40 99C30.5436 99 23.552 98.9979 18.1878 98.2767C12.8524 97.5594 9.27713 96.1472 6.56497 93.435L5.15076 94.8492C8.29646 97.9949 12.3641 99.5117 17.9213 100.259C23.4497 101.002 30.6002 101 40 101V99ZM138.008 99H40V101H138.008V99ZM139.008 100.007C139.042 95.0921 139.222 92.3921 140.025 90.1857L138.146 89.5016C137.207 92.0823 137.042 95.1255 137.008 99.9931L139.008 100.007ZM140.025 90.1857C141.744 85.4636 145.464 81.7439 150.186 80.0252L149.502 78.1458C144.224 80.0667 140.067 84.2241 138.146 89.5016L140.025 90.1857ZM150.186 80.0252C152.961 79.0152 156.464 79 164 79V77C156.638 77 152.692 76.9848 149.502 78.1458L150.186 80.0252ZM164 79C171.536 79 175.039 79.0152 177.814 80.0252L178.498 78.1458C175.308 76.9848 171.362 77 164 77V79ZM177.814 80.0252C182.536 81.7439 186.256 85.4636 187.975 90.1857L189.854 89.5016C187.933 84.2241 183.776 80.0667 178.498 78.1458L177.814 80.0252ZM187.975 90.1857C188.778 92.3921 188.958 95.0921 188.992 100.007L190.992 99.9931C190.958 95.1255 190.793 92.0823 189.854 89.5016L187.975 90.1857ZM288 99H189.992V101H288V99ZM321.435 93.435C318.723 96.1472 315.148 97.5594 309.812 98.2767C304.448 98.9979 297.456 99 288 99V101C297.4 101 304.55 101.002 310.079 100.259C315.636 99.5117 319.704 97.9949 322.849 94.8492L321.435 93.435ZM327 60C327 69.4564 326.998 76.448 326.277 81.8122C325.559 87.1476 324.147 90.7229 321.435 93.435L322.849 94.8492C325.995 91.7035 327.512 87.6358 328.259 82.0787C329.002 76.5503 329 69.3998 329 60H327ZM327 40V60H329V40H327ZM321.435 6.56497C324.147 9.27713 325.559 12.8524 326.277 18.1878C326.998 23.552 327 30.5436 327 40H329C329 30.6002 329.002 23.4497 328.259 17.9213C327.512 12.3642 325.995 8.29646 322.849 5.15076L321.435 6.56497ZM288 1C297.456 1 304.448 1.00212 309.812 1.72332C315.148 2.44064 318.723 3.85281 321.435 6.56497L322.849 5.15076C319.704 2.00506 315.636 0.488292 310.079 -0.25885C304.55 -1.00212 297.4 -1 288 -1V1ZM40 1H288V-1H40V1ZM6.56497 6.56497C9.27713 3.85281 12.8524 2.44064 18.1878 1.72332C23.552 1.00212 30.5436 1 40 1V-1C30.6002 -1 23.4497 -1.
3900212 17.9213 -0.25885C12.3641 0.488292 8.29646 2.00506 5.15076 5.15076L6.56497 6.56497Z" 40 mask="url(#path-1-inside-1_18299_4168)" 41 /> 42</svg>`;var ye=n(7386);let ve,we,be;function xe(e,t){ve=document.createElement("style"),we=document.createElement("style"),be=document.createElement("style"),ve.textContent=ke(e).core.cssText,we.textContent=ke(e).dark.cssText,be.textContent=ke(e).light.cssText,document.head.appendChild(ve),document.head.appendChild(we),document.head.appendChild(be),Ee(t)}function Ee(e){we&&be&&("light"===e?(we.removeAttribute("media"),be.media="enabled"):(be.removeAttribute("media"),we.media="enabled"))}function _e(e){ve&&we&&be&&(ve.textContent=ke(e).core.cssText,we.textContent=ke(e).dark.cssText,be.textContent=ke(e).light.cssText)}function ke(e){return{core:l` 43 @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); 44 :root { 45 --w3m-modal-width: 360px; 46 --w3m-color-mix-strength: ${c(e?.["--w3m-color-mix-strength"]?`${e["--w3m-color-mix-strength"]}%`:"0%")}; 47 --w3m-font-family: ${c(e?.["--w3m-font-family"]||"Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;")}; 48 --w3m-font-size-master: ${c(e?.["--w3m-font-size-master"]||"10px")}; 49 --w3m-border-radius-master: ${c(e?.["--w3m-border-radius-master"]||"4px")}; 50 --w3m-z-index: ${c(e?.["--w3m-z-index"]||999)}; 51 52 --wui-font-family: var(--w3m-font-family); 53 54 --wui-font-size-mini: calc(var(--w3m-font-size-master) * 0.8); 55 --wui-font-size-micro: var(--w3m-font-size-master); 56 --wui-font-size-tiny: calc(var(--w3m-font-size-master) * 1.2); 57 --wui-font-size-small: calc(var(--w3m-font-size-master) * 1.4); 58 --wui-font-size-paragraph: calc(var(--w3m-font-size-master) * 1.6); 59 --wui-font-size-medium: calc(var(--w3m-font-size-master) * 1.8); 60 --wui-font-size-large: calc(var(--w3m-font-size-master) * 2); 61 --wui-font-size-medium-title: calc(var(--w3m-font-size-master) * 2.4); 62 --wui-font-size-2xl: calc(var(--w3m-font-size-master) * 4); 63 64 --wui-border-radius-5xs: var(--w3m-border-radius-master); 65 --wui-border-radius-4xs: calc(var(--w3m-border-radius-master) * 1.5); 66 --wui-border-radius-3xs: calc(var(--w3m-border-radius-master) * 2); 67 --wui-border-radius-xxs: calc(var(--w3m-border-radius-master) * 3); 68 --wui-border-radius-xs: calc(var(--w3m-border-radius-master) * 4); 69 --wui-border-radius-s: calc(var(--w3m-border-radius-master) * 5); 70 --wui-border-radius-m: calc(var(--w3m-border-radius-master) * 7); 71 --wui-border-radius-l: calc(var(--w3m-border-radius-master) * 9); 72 --wui-border-radius-3xl: calc(var(--w3m-border-radius-master) * 20); 73 74 --wui-font-weight-light: 400; 75 --wui-font-weight-regular: 500; 76 --wui-font-weight-medium: 600; 77 --wui-font-weight-bold: 700; 78 79 --wui-letter-spacing-2xl: -1.6px; 80 --wui-letter-spacing-medium-title: -0.96px; 81 --wui-letter-spacing-large: -0.8px; 82 --wui-letter-spacing-medium: -0.72px; 83 --wui-letter-spacing-paragraph: -0.64px; 84 --wui-letter-spacing-small: -0.56px; 85 --wui-letter-spacing-tiny: -0.48px; 86 --wui-letter-spacing-micro: -0.2px; 87 --wui-letter-spacing-mini: -0.16px; 88 89 --wui-spacing-0: 0px; 90 --wui-spacing-4xs: 2px; 91 --wui-spacing-3xs: 4px; 92 --wui-spacing-xxs: 6px; 93 --wui-spacing-2xs: 7px; 94 --wui-spacing-xs: 8px; 95 --wui-spacing-1xs: 10px; 96 --wui-spacing-s: 12px; 97 --wui-spacing-m: 14px; 98 --wui-spacing-l: 16px; 99 --wui-spacing-2l: 18px; 100 --wui-spacing-xl: 20px; 101 --wui-spacing-xxl: 24px; 102 --wui-spacing-2xl: 32px; 103 --wui-spacing-3xl: 40px; 104 --wui-spacing-4xl: 90px; 105 --wui-spacing-5xl: 95px; 106 107 --wui-icon-box-size-xxs: 14px; 108 --wui-icon-box-size-xs: 20px; 109 --wui-icon-box-size-sm: 24px; 110 --wui-icon-box-size-md: 32px; 111 --wui-icon-box-size-lg: 40px; 112 --wui-icon-box-size-xl: 64px; 113 114 --wui-icon-size-inherit: inherit; 115 --wui-icon-size-xxs: 10px; 116 --wui-icon-size-xs: 12px; 117 --wui-icon-size-sm: 14px; 118 --wui-icon-size-md: 16px; 119 --wui-icon-size-mdl: 18px; 120 --wui-icon-size-lg: 20px; 121 --wui-icon-size-xl: 24px; 122 --wui-icon-size-xxl: 28px; 123 124 --wui-wallet-image-size-inherit: inherit; 125 --wui-wallet-image-size-sm: 40px; 126 --wui-wallet-image-size-md: 56px; 127 --wui-wallet-image-size-lg: 80px; 128 129 --wui-visual-size-size-inherit: inherit; 130 --wui-visual-size-sm: 40px; 131 --wui-visual-size-md: 55px; 132 --wui-visual-size-lg: 80px; 133 134 --wui-box-size-md: 100px; 135 --wui-box-size-lg: 120px; 136 137 --wui-ease-out-power-2: cubic-bezier(0, 0, 0.22, 1); 138 --wui-ease-out-power-1: cubic-bezier(0, 0, 0.55, 1); 139 140 --wui-ease-in-power-3: cubic-bezier(0.66, 0, 1, 1); 141 --wui-ease-in-power-2: cubic-bezier(0.45, 0, 1, 1); 142 --wui-ease-in-power-1: cubic-bezier(0.3, 0, 1, 1); 143 144 --wui-ease-inout-power-1: cubic-bezier(0.45, 0, 0.55, 1); 145 146 --wui-duration-lg: 200ms; 147 --wui-duration-md: 125ms; 148 --wui-duration-sm: 75ms; 149 150 --wui-path-network-sm: path( 151 'M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.
15161 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z' 152 ); 153 154 --wui-path-network-md: path( 155 'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z' 156 ); 157 158 --wui-path-network-lg: path( 159 'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z' 160 ); 161 162 --wui-width-network-sm: 36px; 163 --wui-width-network-md: 48px; 164 --wui-width-network-lg: 86px; 165 166 --wui-height-network-sm: 40px; 167 --wui-height-network-md: 54px; 168 --wui-height-network-lg: 96px; 169 170 --wui-icon-size-network-xs: 12px; 171 --wui-icon-size-network-sm: 16px; 172 --wui-icon-size-network-md: 24px; 173 --wui-icon-size-network-lg: 42px; 174 175 --wui-color-inherit: inherit; 176 177 --wui-color-inverse-100: #fff; 178 --wui-color-inverse-000: #000; 179 180 --wui-cover: rgba(20, 20, 20, 0.8); 181 182 --wui-color-modal-bg: var(--wui-color-modal-bg-base); 183 184 --wui-color-accent-100: var(--wui-color-accent-base-100); 185 --wui-color-accent-090: var(--wui-color-accent-base-090); 186 --wui-color-accent-080: var(--wui-color-accent-base-080); 187 188 --wui-color-success-100: var(--wui-color-success-base-100); 189 190 --wui-color-error-100: var(--wui-color-error-base-100); 191 192 --wui-icon-box-bg-error-100: var(--wui-icon-box-bg-error-base-100); 193 --wui-icon-box-bg-blue-100: var(--wui-icon-box-bg-blue-base-100); 194 --wui-icon-box-bg-success-100: var(--wui-icon-box-bg-success-base-100); 195 --wui-icon-box-bg-inverse-100: var(--wui-icon-box-bg-inverse-base-100); 196 197 --wui-all-wallets-bg-100: var(--wui-all-wallets-bg-100); 198 199 --wui-avatar-border: var(--wui-avatar-border-base); 200 201 --wui-thumbnail-border: var(--wui-thumbnail-border-base); 202 203 --wui-box-shadow-blue: var(--wui-color-accent-glass-020); 204 } 205 206 @supports (background: color-mix(in srgb, white 50%, black)) { 207 :root { 208 --wui-color-modal-bg: color-mix( 209 in srgb, 210 var(--w3m-color-mix) var(--w3m-color-mix-strength), 211 var(--wui-color-modal-bg-base) 212 ); 213 214 --wui-box-shadow-blue: color-mix(in srgb, var(--wui-color-accent-100) 20%, transparent); 215 216 --wui-color-accent-100: color-mix( 217 in srgb, 218 var(--wui-color-accent-base-100) 100%, 219 transparent 220 ); 221 --wui-color-accent-090: color-mix( 222 in srgb, 223 var(--wui-color-accent-base-100) 90%, 224 transparent 225 ); 226 --wui-color-accent-080: color-mix( 227 in srgb, 228 var(--wui-color-accent-base-100) 80%, 229 transparent 230 ); 231 --wui-color-accent-glass-090: color-mix( 232 in srgb, 233 var(--wui-color-accent-base-100) 90%, 234 transparent 235 ); 236 --wui-color-accent-glass-080: color-mix( 237 in srgb, 238 var(--wui-color-accent-base-100) 80%, 239 transparent 240 ); 241 --wui-color-accent-glass-020: color-mix( 242 in srgb, 243 var(--wui-color-accent-base-100) 20%, 244 transparent 245 ); 246 --wui-color-accent-glass-015: color-mix( 247 in srgb, 248 var(--wui-color-accent-base-100) 15%, 249 transparent 250 ); 251 --wui-color-accent-glass-010: color-mix( 252 in srgb, 253 var(--wui-color-accent-base-100) 10%, 254 transparent 255 ); 256 --wui-color-accent-glass-005: color-mix( 257 in srgb, 258 var(--wui-color-accent-base-100) 5%, 259 transparent 260 ); 261 --wui-color-accent-002: color-mix( 262 in srgb, 263 var(--wui-color-accent-base-100) 2%, 264 transparent 265 ); 266 267 --wui-color-fg-100: color-mix( 268 in srgb, 269 var(--w3m-color-mix) var(--w3m-color-mix-strength), 270 var(--wui-color-fg-100) 271 ); 272 --wui-color-fg-125: color-mix( 273 in srgb, 274 var(--w3m-color-mix) var(--w3m-color-mix-strength), 275 var(--wui-color-fg-125) 276 ); 277 --wui-color-fg-150: color-mix( 278 in srgb, 279 var(--w3m-color-mix) var(--w3m-color-mix-strength), 280 var(--wui-color-fg-150) 281 ); 282 --wui-color-fg-175: color-mix( 283 in srgb, 284 var(--w3m-color-mix) var(--w3m-color-mix-strength), 285 var(--wui-color-fg-175) 286 ); 287 --wui-color-fg-200: color-mix( 288 in srgb, 289 var(--w3m-color-mix) var(--w3m-color-mix-strength), 290 var(--wui-color-fg-200) 291 ); 292 --wui-color-fg-225: color-mix( 293 in srgb, 294 var(--w3m-color-mix) var(--w3m-color-mix-strength), 295 var(--wui-color-fg-225) 296 ); 297 --wui-color-fg-250: color-mix( 298 in srgb, 299 var(--w3m-color-mix) var(--w3m-color-mix-strength), 300 var(--wui-color-fg-250) 301 ); 302 --wui-color-fg-275: color-mix( 303 in srgb, 304 var(--w3m-color-mix) var(--w3m-color-mix-strength), 305 var(--wui-color-fg-275) 306 ); 307 --wui-color-fg-300: color-mix( 308 in srgb, 309 var(--w3m-color-mix) var(--w3m-color-mix-strength), 310 var(--wui-color-fg-300) 311 ); 312 313 --wui-color-bg-100: color-mix( 314 in srgb, 315 var(--w3m-color-mix) var(--w3m-color-mix-strength), 316 var(--wui-color-bg-100) 317 ); 318 --wui-color-bg-125: color-mix( 319 in srgb, 320 var(--w3m-color-mix) var(--w3m-color-mix-strength), 321 var(--wui-color-bg-125) 322 ); 323 --wui-color-bg-150: color-mix( 324 in srgb, 325 var(--w3m-color-mix) var(--w3m-color-mix-strength), 326 var(--wui-color-bg-150) 327 ); 328 --wui-color-bg-175: color-mix( 329 in srgb, 330 var(--w3m-color-mix) var(--w3m-color-mix-strength), 331 var(--wui-color-bg-175) 332 ); 333 --wui-color-bg-200: color-mix( 334 in srgb, 335 var(--w3m-color-mix) var(--w3m-color-mix-strength), 336 var(--wui-color-bg-200) 337 ); 338 --wui-color-bg-225: color-mix( 339 in srgb, 340 var(--w3m-color-mix) var(--w3m-color-mix-strength), 341 var(--wui-color-bg-225) 342 ); 343 --wui-color-bg-250: color-mix( 344 in srgb, 345 var(--w3m-color-mix) var(--w3m-color-mix-strength), 346 var(--wui-color-bg-250) 347 ); 348 --wui-color-bg-275: color-mix( 349 in srgb, 350 var(--w3m-color-mix) var(--w3m-color-mix-strength), 351 var(--wui-color-bg-275) 352 ); 353 --wui-color-bg-300: color-mix( 354 in srgb, 355 var(--w3m-color-mix) var(--w3m-color-mix-strength), 356 var(--wui-color-bg-300) 357 ); 358 359 --wui-color-success-100: color-mix( 360 in srgb, 361 var(--w3m-color-mix) var(--w3m-color-mix-strength), 362 var(--wui-color-success-base-100) 363 ); 364 --wui-color-error-100: color-mix( 365 in srgb, 366 var(--w3m-color-mix) var(--w3m-color-mix-strength), 367 var(--wui-color-error-base-100) 368 ); 369 370 --wui-icon-box-bg-error-100: color-mix( 371 in srgb, 372 var(--w3m-color-mix) var(--w3m-color-mix-strength), 373 var(--wui-icon-box-bg-error-base-100) 374 ); 375 --wui-icon-box-bg-accent-100: color-mix( 376 in srgb, 377 var(--w3m-color-mix) var(--w3m-color-mix-strength), 378 var(--wui-icon-box-bg-blue-base-100) 379 ); 380 --wui-icon-box-bg-success-100: color-mix( 381 in srgb, 382 var(--w3m-color-mix) var(--w3m-color-mix-strength), 383 var(--wui-icon-box-bg-success-base-100) 384 ); 385 --wui-icon-box-bg-inverse-100: color-mix( 386 in srgb, 387 var(--w3m-color-mix) var(--w3m-color-mix-strength), 388 var(--wui-icon-box-bg-inverse-base-100) 389 ); 390 391 --wui-all-wallets-bg-100: color-mix( 392 in srgb, 393 var(--w3m-color-mix) var(--w3m-color-mix-strength), 394 var(--wui-all-wallets-bg-100) 395 ); 396 397 --wui-avatar-border: color-mix( 398 in srgb, 399 var(--w3m-color-mix) var(--w3m-color-mix-strength), 400 var(--wui-avatar-border-base) 401 ); 402
403 --wui-thumbnail-border: color-mix( 404 in srgb, 405 var(--w3m-color-mix) var(--w3m-color-mix-strength), 406 var(--wui-thumbnail-border-base) 407 ); 408 } 409 } 410 `,light:l` 411 :root { 412 --w3m-color-mix: ${c(e?.["--w3m-color-mix"]||"#fff")}; 413 --w3m-accent: ${c((0,ye.o_)(e,"dark")["--w3m-accent"])}; 414 --w3m-default: #fff; 415 416 --wui-color-modal-bg-base: ${c((0,ye.o_)(e,"dark")["--w3m-background"])}; 417 --wui-color-accent-base-100: var(--w3m-accent); 418 419 --wui-color-blueberry-100: hsla(230, 100%, 67%, 1); 420 --wui-color-blueberry-090: hsla(231, 76%, 61%, 1); 421 --wui-color-blueberry-080: hsla(230, 59%, 55%, 1); 422 423 --wui-color-fg-100: #e4e7e7; 424 --wui-color-fg-125: #d0d5d5; 425 --wui-color-fg-150: #a8b1b1; 426 --wui-color-fg-175: #a8b0b0; 427 --wui-color-fg-200: #949e9e; 428 --wui-color-fg-225: #868f8f; 429 --wui-color-fg-250: #788080; 430 --wui-color-fg-275: #788181; 431 --wui-color-fg-300: #6e7777; 432 433 --wui-color-bg-100: #141414; 434 --wui-color-bg-125: #191a1a; 435 --wui-color-bg-150: #1e1f1f; 436 --wui-color-bg-175: #222525; 437 --wui-color-bg-200: #272a2a; 438 --wui-color-bg-225: #2c3030; 439 --wui-color-bg-250: #313535; 440 --wui-color-bg-275: #363b3b; 441 --wui-color-bg-300: #3b4040; 442 443 --wui-color-success-base-100: #26d962; 444 --wui-color-error-base-100: #f25a67; 445 446 --wui-color-success-glass-001: rgba(38, 217, 98, 0.01); 447 --wui-color-success-glass-002: rgba(38, 217, 98, 0.02); 448 --wui-color-success-glass-005: rgba(38, 217, 98, 0.05); 449 --wui-color-success-glass-010: rgba(38, 217, 98, 0.1); 450 --wui-color-success-glass-015: rgba(38, 217, 98, 0.15); 451 --wui-color-success-glass-020: rgba(38, 217, 98, 0.2); 452 --wui-color-success-glass-025: rgba(38, 217, 98, 0.25); 453 --wui-color-success-glass-030: rgba(38, 217, 98, 0.3); 454 --wui-color-success-glass-060: rgba(38, 217, 98, 0.6); 455 --wui-color-success-glass-080: rgba(38, 217, 98, 0.8); 456 457 --wui-color-error-glass-001: rgba(242, 90, 103, 0.01); 458 --wui-color-error-glass-002: rgba(242, 90, 103, 0.02); 459 --wui-color-error-glass-005: rgba(242, 90, 103, 0.05); 460 --wui-color-error-glass-010: rgba(242, 90, 103, 0.1); 461 --wui-color-error-glass-015: rgba(242, 90, 103, 0.15); 462 --wui-color-error-glass-020: rgba(242, 90, 103, 0.2); 463 --wui-color-error-glass-025: rgba(242, 90, 103, 0.25); 464 --wui-color-error-glass-030: rgba(242, 90, 103, 0.3); 465 --wui-color-error-glass-060: rgba(242, 90, 103, 0.6); 466 --wui-color-error-glass-080: rgba(242, 90, 103, 0.8); 467 468 --wui-color-gray-glass-001: rgba(255, 255, 255, 0.01); 469 --wui-color-gray-glass-002: rgba(255, 255, 255, 0.02); 470 --wui-color-gray-glass-005: rgba(255, 255, 255, 0.05); 471 --wui-color-gray-glass-010: rgba(255, 255, 255, 0.1); 472 --wui-color-gray-glass-015: rgba(255, 255, 255, 0.15); 473 --wui-color-gray-glass-020: rgba(255, 255, 255, 0.2); 474 --wui-color-gray-glass-025: rgba(255, 255, 255, 0.25); 475 --wui-color-gray-glass-030: rgba(255, 255, 255, 0.3); 476 --wui-color-gray-glass-060: rgba(255, 255, 255, 0.6); 477 --wui-color-gray-glass-080: rgba(255, 255, 255, 0.8); 478 --wui-color-gray-glass-090: rgba(255, 255, 255, 0.9); 479 480 --wui-icon-box-bg-error-base-100: #3c2426; 481 --wui-icon-box-bg-blue-base-100: #20303f; 482 --wui-icon-box-bg-success-base-100: #1f3a28; 483 --wui-icon-box-bg-inverse-base-100: #243240; 484 485 --wui-all-wallets-bg-100: #222b35; 486 487 --wui-avatar-border-base: #252525; 488 489 --wui-thumbnail-border-base: #252525; 490 } 491 `,dark:l` 492 :root { 493 --w3m-color-mix: ${c(e?.["--w3m-color-mix"]||"#000")}; 494 --w3m-accent: ${c((0,ye.o_)(e,"light")["--w3m-accent"])}; 495 --w3m-default: #000; 496 497 --wui-color-modal-bg-base: ${c((0,ye.o_)(e,"light")["--w3m-background"])}; 498 --wui-color-accent-base-100: var(--w3m-accent); 499 500 --wui-color-blueberry-100: hsla(231, 100%, 70%, 1); 501 --wui-color-blueberry-090: hsla(231, 97%, 72%, 1); 502 --wui-color-blueberry-080: hsla(231, 92%, 74%, 1); 503 504 --wui-color-fg-100: #141414; 505 --wui-color-fg-125: #2d3131; 506 --wui-color-fg-150: #474d4d; 507 --wui-color-fg-175: #636d6d; 508 --wui-color-fg-200: #798686; 509 --wui-color-fg-225: #828f8f; 510 --wui-color-fg-250: #8b9797; 511 --wui-color-fg-275: #95a0a0; 512 --wui-color-fg-300: #9ea9a9; 513 514 --wui-color-bg-100: #ffffff; 515 --wui-color-bg-125: #f5fafa; 516 --wui-color-bg-150: #f3f8f8; 517 --wui-color-bg-175: #eef4f4; 518 --wui-color-bg-200: #eaf1f1; 519 --wui-color-bg-225: #e5eded; 520 --wui-color-bg-250: #e1e9e9; 521 --wui-color-bg-275: #dce7e7; 522 --wui-color-bg-300: #d8e3e3; 523 524 --wui-color-success-base-100: #26b562; 525 --wui-color-error-base-100: #f05142; 526 527 --wui-color-success-glass-001: rgba(38, 181, 98, 0.01); 528 --wui-color-success-glass-002: rgba(38, 181, 98, 0.02); 529 --wui-color-success-glass-005: rgba(38, 181, 98, 0.05); 530 --wui-color-success-glass-010: rgba(38, 181, 98, 0.1); 531 --wui-color-success-glass-015: rgba(38, 181, 98, 0.15); 532 --wui-color-success-glass-020: rgba(38, 181, 98, 0.2); 533 --wui-color-success-glass-025: rgba(38, 181, 98, 0.25); 534 --wui-color-success-glass-030: rgba(38, 181, 98, 0.3); 535 --wui-color-success-glass-060: rgba(38, 181, 98, 0.6); 536 --wui-color-success-glass-080: rgba(38, 181, 98, 0.8); 537 538 --wui-color-error-glass-001: rgba(240, 81, 66, 0.01); 539 --wui-color-error-glass-002: rgba(240, 81, 66, 0.02); 540 --wui-color-error-glass-005: rgba(240, 81, 66, 0.05); 541 --wui-color-error-glass-010: rgba(240, 81, 66, 0.1); 542 --wui-color-error-glass-015: rgba(240, 81, 66, 0.15); 543 --wui-color-error-glass-020: rgba(240, 81, 66, 0.2); 544 --wui-color-error-glass-025: rgba(240, 81, 66, 0.25); 545 --wui-color-error-glass-030: rgba(240, 81, 66, 0.3); 546 --wui-color-error-glass-060: rgba(240, 81, 66, 0.6); 547 --wui-color-error-glass-080: rgba(240, 81, 66, 0.8); 548 549 --wui-icon-box-bg-error-base-100: #f4dfdd; 550 --wui-icon-box-bg-blue-base-100: #d9ecfb; 551 --wui-icon-box-bg-success-base-100: #daf0e4; 552 --wui-icon-box-bg-inverse-base-100: #dcecfc; 553 554 --wui-all-wallets-bg-100: #e8f1fa; 555 556 --wui-avatar-border-base: #f3f4f4; 557
558 --wui-thumbnail-border-base: #eaefef; 559 560 --wui-color-gray-glass-001: rgba(0, 0, 0, 0.01); 561 --wui-color-gray-glass-002: rgba(0, 0, 0, 0.02); 562 --wui-color-gray-glass-005: rgba(0, 0, 0, 0.05); 563 --wui-color-gray-glass-010: rgba(0, 0, 0, 0.1); 564 --wui-color-gray-glass-015: rgba(0, 0, 0, 0.15); 565 --wui-color-gray-glass-020: rgba(0, 0, 0, 0.2); 566 --wui-color-gray-glass-025: rgba(0, 0, 0, 0.25); 567 --wui-color-gray-glass-030: rgba(0, 0, 0, 0.3); 568 --wui-color-gray-glass-060: rgba(0, 0, 0, 0.6); 569 --wui-color-gray-glass-080: rgba(0, 0, 0, 0.8); 570 --wui-color-gray-glass-090: rgba(0, 0, 0, 0.9); 571 } 572 `}}const Ce=l` 573 *, 574 *::after, 575 *::before, 576 :host { 577 margin: 0; 578 padding: 0; 579 box-sizing: border-box; 580 font-style: normal; 581 text-rendering: optimizeSpeed; 582 -webkit-font-smoothing: antialiased; 583 -moz-osx-font-smoothing: grayscale; 584 -webkit-tap-highlight-color: transparent; 585 font-family: var(--wui-font-family); 586 backface-visibility: hidden; 587 } 588`,Ae=l` 589 button, 590 a { 591 cursor: pointer; 592 display: flex; 593 justify-content: center; 594 align-items: center; 595 position: relative; 596 transition: 597 background-color var(--wui-ease-inout-power-1) var(--wui-duration-md), 598 color var(--wui-ease-inout-power-1) var(--wui-duration-md), 599 box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md); 600 will-change: background-color, color; 601 outline: none; 602 border: none; 603 column-gap: var(--wui-spacing-3xs); 604 background-color: transparent; 605 text-decoration: none; 606 } 607 608 button:disabled > wui-wallet-image, 609 button:disabled > wui-all-wallets-image, 610 button:disabled > wui-network-image, 611 button:disabled > wui-image, 612 button:disabled > wui-icon-box, 613 button:disabled > wui-transaction-visual, 614 button:disabled > wui-logo { 615 filter: grayscale(1); 616 } 617 618 input { 619 border: none; 620 outline: none; 621 appearance: none; 622 } 623`,Se=l` 624 .wui-color-inherit { 625 color: var(--wui-color-inherit); 626 } 627 628 .wui-color-accent-100 { 629 color: var(--wui-color-accent-100); 630 } 631 632 .wui-color-error-100 { 633 color: var(--wui-color-error-100); 634 } 635 636 .wui-color-success-100 { 637 color: var(--wui-color-success-100); 638 } 639 640 .wui-color-inverse-100 { 641 color: var(--wui-color-inverse-100); 642 } 643 644 .wui-color-inverse-000 { 645 color: var(--wui-color-inverse-000); 646 } 647 648 .wui-color-fg-100 { 649 color: var(--wui-color-fg-100); 650 } 651 652 .wui-color-fg-200 { 653 color: var(--wui-color-fg-200); 654 } 655 656 .wui-color-fg-300 { 657 color: var(--wui-color-fg-300); 658 } 659 660 .wui-bg-color-inherit { 661 background-color: var(--wui-color-inherit); 662 } 663 664 .wui-bg-color-blue-100 { 665 background-color: var(--wui-color-accent-100); 666 } 667 668 .wui-bg-color-error-100 { 669 background-color: var(--wui-color-error-100); 670 } 671 672 .wui-bg-color-success-100 { 673 background-color: var(--wui-color-success-100); 674 } 675 676 .wui-bg-color-inverse-100 { 677 background-color: var(--wui-color-inverse-100); 678 } 679 680 .wui-bg-color-inverse-000 { 681 background-color: var(--wui-color-inverse-000); 682 } 683 684 .wui-bg-color-fg-100 { 685 background-color: var(--wui-color-fg-100); 686 } 687 688 .wui-bg-color-fg-200 { 689 background-color: var(--wui-color-fg-200); 690 } 691 692 .wui-bg-color-fg-300 { 693 background-color: var(--wui-color-fg-300); 694 } 695`;function Ie(e){return function(t){return"function"===typeof t?function(e,t){return customElements.get(e)||customElements.define(e,t),t}(e,t):function(e,t){const{kind:n,elements:r}=t;return{kind:n,elements:r,finisher(t){customElements.get(e)||customElements.define(e,t)}}}(e,t)}}const Te=l` 696 :host { 697 display: block; 698 border-radius: clamp(0px, var(--wui-border-radius-l), 44px); 699 box-shadow: 0 0 0 1px var(--wui-color-gray-glass-005); 700 background-color: var(--wui-color-modal-bg); 701 overflow: hidden; 702 } 703`;var Pe=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ne=class extends pe{render(){return K`<slot></slot>`}};Ne.styles=[Ce,Te],Ne=Pe([Ie("wui-card")],Ne);const Re={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:k};function Oe(e){return(t,n)=>"object"==typeof n?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Re,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const{kind:r,metadata:i}=n;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(n.name,e),"accessor"===r){const{name:r}=n;return{set(n){const i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e)},init(t){return void 0!==t&&this.P(r,void 0,e),t}}}if("setter"===r){const{name:r}=n;return function(n){const i=this[r];t.call(this,n),this.requestUpdate(r,i,e)}}throw Error("Unsupported decorator location: "+r)}(e,t,n):((e,t,n)=>{const r=t.hasOwnProperty(n);return t.constructor.createProperty(n,r?{...e,wrapped:!0}:e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function Me(e){return Oe({...e,state:!0,attribute:!1})}const je=l` 704 :host { 705 display: flex; 706 aspect-ratio: 1 / 1; 707 color: var(--local-color); 708 width: var(--local-width); 709 } 710 711 svg { 712 width: inherit; 713 height: inherit; 714 object-fit: contain; 715 object-position: center; 716 } 717`,Le=Z`<svg 718 width="14" 719 height="14" 720 viewBox="0 0 14 14" 721 fill="none" 722 xmlns="http://www.w3.org/2000/svg" 723> 724 <path 725 fill="currentColor" 726 fill-rule="evenodd" 727 clip-rule="evenodd" 728 d="M7.0023 0.875C7.48571 0.875 7.8776 1.26675 7.8776 1.75V6.125H12.2541C12.7375 6.125 13.1294 6.51675 13.1294 7C13.1294 7.48325 12.7375 7.875 12.2541 7.875H7.8776V12.25C7.8776 12.7332 7.48571 13.125 7.0023 13.125C6.51889 13.125 6.12701 12.7332 6.12701 12.25V7.875H1.75054C1.26713 7.875 0.875244 7.48325 0.875244 7C0.875244 6.51675 1.26713 6.125 1.75054 6.125H6.12701V1.75C6.12701 1.26675 6.51889 0.875 7.0023 0.875Z" 729 fill="#667dff" 730 /></svg 731>`,De=Z`<svg fill="none" viewBox="0 0 24 24"> 732 <path 733 style="fill: var(--wui-color-accent-100);" 734 d="M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6
734a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z" 735 /> 736</svg>`,Be=Z`<svg 737 fill="none" 738 viewBox="0 0 21 20" 739> 740 <path 741 fill="currentColor" 742 fill-rule="evenodd" 743 d="M10.5 2.42908C6.31875 2.42908 2.92859 5.81989 2.92859 10.0034C2.92859 14.1869 6.31875 17.5777 10.5 17.5777C14.6813 17.5777 18.0714 14.1869 18.0714 10.0034C18.0714 5.81989 14.6813 2.42908 10.5 2.42908ZM0.928589 10.0034C0.928589 4.71596 5.21355 0.429077 10.5 0.429077C15.7865 0.429077 20.0714 4.71596 20.0714 10.0034C20.0714 15.2908 15.7865 19.5777 10.5 19.5777C5.21355 19.5777 0.928589 15.2908 0.928589 10.0034ZM10.5 5.75003C11.0523 5.75003 11.5 6.19774 11.5 6.75003L11.5 10.8343L12.7929 9.54137C13.1834 9.15085 13.8166 9.15085 14.2071 9.54137C14.5976 9.9319 14.5976 10.5651 14.2071 10.9556L11.2071 13.9556C10.8166 14.3461 10.1834 14.3461 9.79291 13.9556L6.79291 10.9556C6.40239 10.5651 6.40239 9.9319 6.79291 9.54137C7.18343 9.15085 7.8166 9.15085 8.20712 9.54137L9.50002 10.8343L9.50002 6.75003C9.50002 6.19774 9.94773 5.75003 10.5 5.75003Z" 744 clip-rule="evenodd" 745 /></svg 746>`,Ue=Z` 747<svg width="36" height="36"> 748 <path 749 d="M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z" 750 fill="url(#a)" 751 /> 752 <path 753 d="m17.845 8.271.729-1.26a1.64 1.64 0 1 1 2.843 1.638l-7.023 12.159h5.08c1.646 0 2.569 1.935 1.853 3.276H6.434a1.632 1.632 0 0 1-1.638-1.638c0-.909.73-1.638 1.638-1.638h4.176l5.345-9.265-1.67-2.898a1.642 1.642 0 0 1 2.844-1.638l.716 1.264Zm-6.317 17.5-1.575 2.732a1.64 1.64 0 1 1-2.844-1.638l1.17-2.025c1.323-.41 2.398-.095 3.249.931Zm13.56-4.954h4.262c.909 0 1.638.729 1.638 1.638 0 .909-.73 1.638-1.638 1.638h-2.367l1.597 2.772c.45.788.185 1.782-.602 2.241a1.642 1.642 0 0 1-2.241-.603c-2.69-4.666-4.711-8.159-6.052-10.485-1.372-2.367-.391-4.743.576-5.549 1.075 1.846 2.682 4.631 4.828 8.348Z" 754 fill="#fff" 755 /> 756 <defs> 757 <linearGradient id="a" x1="18" y1="0" x2="18" y2="36" gradientUnits="userSpaceOnUse"> 758 <stop stop-color="#18BFFB" /> 759 <stop offset="1" stop-color="#2072F3" /> 760 </linearGradient> 761 </defs> 762</svg>`,Fe=Z`<svg fill="none" viewBox="0 0 40 40"> 763 <g clip-path="url(#a)"> 764 <g clip-path="url(#b)"> 765 <circle cx="20" cy="19.89" r="20" fill="#000" /> 766 <g clip-path="url(#c)"> 767 <path 768 fill="#fff" 769 d="M28.77 23.3c-.69 1.99-2.75 5.52-4.87 5.56-1.4.03-1.86-.84-3.46-.84-1.61 0-2.12.81-3.45.86-2.25.1-5.72-5.1-5.72-9.62 0-4.15 2.9-6.2 5.42-6.25 1.36-.02 2.64.92 3.47.92.83 0 2.38-1.13 4.02-.97.68.03 2.6.28 3.84 2.08-3.27 2.14-2.76 6.61.75 8.25ZM24.2 7.88c-2.47.1-4.49 2.69-4.2 4.84 2.28.17 4.47-2.39 4.2-4.84Z" 770 /> 771 </g> 772 </g> 773 </g> 774 <defs> 775 <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath> 776 <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 777 <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath> 778 </defs> 779</svg>`,$e=Z`<svg fill="none" viewBox="0 0 14 15"> 780 <path 781 fill="currentColor" 782 fill-rule="evenodd" 783 d="M7 1.99a1 1 0 0 1 1 1v7.58l2.46-2.46a1 1 0 0 1 1.41 1.42L7.7 13.69a1 1 0 0 1-1.41 0L2.12 9.53A1 1 0 0 1 3.54 8.1L6 10.57V3a1 1 0 0 1 1-1Z" 784 clip-rule="evenodd" 785 /> 786</svg>`,ze=Z`<svg fill="none" viewBox="0 0 14 15"> 787 <path 788 fill="currentColor" 789 fill-rule="evenodd" 790 d="M13 7.99a1 1 0 0 1-1 1H4.4l2.46 2.46a1 1 0 1 1-1.41 1.41L1.29 8.7a1 1 0 0 1 0-1.41L5.46 3.1a1 1 0 0 1 1.41 1.42L4.41 6.99H12a1 1 0 0 1 1 1Z" 791 clip-rule="evenodd" 792 /> 793</svg>`,He=Z`<svg fill="none" viewBox="0 0 14 15"> 794 <path 795 fill="currentColor" 796 fill-rule="evenodd" 797 d="M1 7.99a1 1 0 0 1 1-1h7.58L7.12 4.53A1 1 0 1 1 8.54 3.1l4.16 4.17a1 1 0 0 1 0 1.41l-4.16 4.17a1 1 0 1 1-1.42-1.41l2.46-2.46H2a1 1 0 0 1-1-1Z" 798 clip-rule="evenodd" 799 /> 800</svg>`,We=Z`<svg fill="none" viewBox="0 0 14 15"> 801 <path 802 fill="currentColor" 803 fill-rule="evenodd" 804 d="M7 13.99a1 1 0 0 1-1-1V5.4L3.54 7.86a1 1 0 0 1-1.42-1.41L6.3 2.28a1 1 0 0 1 1.41 0l4.17 4.17a1 1 0 1 1-1.41 1.41L8 5.4v7.59a1 1 0 0 1-1 1Z" 805 clip-rule="evenodd" 806 /> 807</svg>`,qe=Z`<svg 808 xmlns="http://www.w3.org/2000/svg" 809 width="12" 810 height="13" 811 viewBox="0 0 12 13" 812 fill="none" 813> 814 <path 815 fill-rule="evenodd" 816 clip-rule="evenodd" 817 d="M5.61391 1.57124C5.85142 1.42873 6.14813 1.42873 6.38564 1.57124L11.0793 4.38749C11.9179 4.89067 11.5612 6.17864 10.5832 6.17864H9.96398V10.0358H10.2854C10.6996 10.0358 11.0354 10.3716 11.0354 10.7858C11.0354 11.2 10.6996 11.5358 10.2854 11.5358H1.71416C1.29995 11.5358 0.964172 11.2 0.964172 10.7858C0.964172 10.3716 1.29995 10.0358 1.71416 10.0358H2.03558L2.03558 6.17864H1.41637C0.438389 6.17864 0.0816547 4.89066 0.920263 4.38749L5.61391 1.57124ZM3.53554 6.17864V10.0358H5.24979V6.17864H3.53554ZM6.74976 6.17864V10.0358H8.46401V6.17864H6.74976ZM8.64913 4.67864H3.35043L5.99978 3.089L8.64913 4.67864Z" 818 fill="currentColor" 819 /></svg 820>`,Ve=Z`<svg fill="none" viewBox="0 0 20 20"> 821 <path 822 fill="currentColor" 823 fill-rule="evenodd" 824 d="M4 6.4a1 1 0 0 1-.46.89 6.98 6.98 0 0 0 .38 6.18A7 7 0 0 0 16.46 7.3a1 1 0 0 1-.47-.92 7 7 0 0 0-12 .03Zm-2.02-.5a9 9 0 1 1 16.03 8.2A9 9 0 0 1 1.98 5.9Z" 825 clip-rule="evenodd" 826 /> 827 <path 828 fill="currentColor" 829 fill-rule="evenodd" 830 d="M6.03 8.63c-1.46-.3-2.72-.75-3.6-1.35l-.02-.01-.14-.11a1 1 0 0 1 1.2-1.6l.1.08c.6.4 1.52.74 2.69 1 .16-.99.39-1.88.67-2.65.3-.79.68-1.5 1.15-2.02A2.58 2.58 0 0 1 9.99 1c.8 0 1.45.44 1.92.97.47.52.84 1.23 1.14 2.02.29.77.52 1.66.68 2.64a8 8 0 0 0 2.7-1l.26-.18h.48a1 1 0 0 1 .12 2c-.86.51-2.01.91-3.34 1.18a22.24 22.24 0 0 1-.03 3.19c1.45.29 2.7.73 3.58 1.31a1 1 0 0 1-1.1 1.68c-.6-.4-1.56-.76-2.75-1-.15.8-.36 1.55-.6 2.2-.3.79-.67 1.5-1.14 2.02-.47.53-1.12.97-1.92.97-.8 0-1.45-.44-1.91-.97a6.51 6.51 0 0 1-1.15-2.02c-.24-.65-.44-1.4-.6-2.2-1.18.24-2.13.6-2.73.99a1 1 0 1 1-1.1-1.67c.88-.58 2.12-1.03 3.57-1.31a22.03 22.03 0 0 1-.04-3.2Zm2.2-1.7c.15-.86.34-1.61.58-2.24.24-.65.51-1.12.76-1.4.25-.28.4-.29.42-.29.03 0 .17.01.42.3.25.27.52.74.77 1.4.23.62.43 1.37.57 2.22a19.96 19.96 0 0 1-3.52 0Zm-.18 4.6a20.1 20.1 0 0 1-.03-2.62 21.95 21.95 0 0 0 3.94 0 20.4 20.4 0 0 1-.03 2.63 21.97 21.97 0 0 0-3.88 0Zm.27 2c.13.66.3 1.26.49 1.78.24.65.51 1.12.76 1.4.25.28.4.29.42.29.03 0 .17-.01.42-.3.25-.27.52-.74.77-1.4.19-.5.36-1.1.49-1.78a20.03 20.03 0 0 0-3.35 0Z" 831 clip-rule="evenodd" 832 /> 833</svg>`,Ge=Z`<svg 834 xmlns="http://www.w3.org/2000/svg" 835 width="12" 836 height="13" 837 viewBox="0 0 12 13" 838 fill="none" 839> 840 <path 841 fill-rule="evenodd" 842 clip-rule="evenodd" 843 d="M4.16072 2C4.17367 2 4.18665 2 4.19968 2L7.83857 2C8.36772 1.99998 8.82398 1.99996 9.19518 2.04018C9.5895 2.0829 9.97577 2.17811 10.3221 2.42971C10.5131 2.56849 10.6811 2.73647 10.8198 2.92749C11.0714 3.27379 11.1666 3.66007 11.2094 4.0544C11.2496 4.42561 11.2496 4.88188 11.2495 5.41105V7.58896C11.2496 8.11812 11.2496 8.57439 11.2094 8.94561C11.1666 9.33994 11.0714 9.72621 10.8198 10.0725C10.6811 10.2635 10.5131 10.4315 10.3221 10.5703C9.97577 10.8219 9.5895 10.9171 9.19518 10.9598C8.82398 11 8.36772 11 7.83856 11H4.16073C3.63157 11 3.17531 11 2.80411 10.9598C2.40979 10.9171 2.02352 10.8219 1.67722 10.5703C1.48621 10.4315 1.31824 10.2635 1.17946 10.0725C0.927858 9.72621 0.832652 9.33994 0.78993 8.94561C0.749713 8.5744 0.749733 8.11813 0.749757 7.58896L0.749758 5.45C0.749758 5.43697 0.749758 5.42399 0.749757 5.41104C0.749733 4.88188 0.749713 4.42561 0.78993 4.0544C0.832652 3.66007 0.927858 3.27379 1.17946 2.92749C1.31824 2.73647 1.48621 2.56849 1.67722 2.42971C2.02352 2.17811 2.40979 2.0829 2.80411 2.04018C3.17531 1.99996 3.63157 1.99998 4.16072 2ZM2.96567 3.53145C2.69897 3.56034 2.60687 3.60837 2.55888 3.64324C2.49521 3.6895 2.43922 3.74549 2.39296 3.8
8430916C2.35809 3.85715 2.31007 3.94926 2.28117 4.21597C2.26629 4.35335 2.25844 4.51311 2.25431 4.70832H9.74498C9.74085 4.51311 9.733 4.35335 9.71812 4.21597C9.68922 3.94926 9.6412 3.85715 9.60633 3.80916C9.56007 3.74549 9.50408 3.6895 9.44041 3.64324C9.39242 3.60837 9.30031 3.56034 9.03362 3.53145C8.75288 3.50103 8.37876 3.5 7.79961 3.5H4.19968C3.62053 3.5 3.24641 3.50103 2.96567 3.53145ZM9.74956 6.20832H2.24973V7.55C2.24973 8.12917 2.25076 8.5033 2.28117 8.78404C2.31007 9.05074 2.35809 9.14285 2.39296 9.19084C2.43922 9.25451 2.49521 9.31051 2.55888 9.35677C2.60687 9.39163 2.69897 9.43966 2.96567 9.46856C3.24641 9.49897 3.62053 9.5 4.19968 9.5H7.79961C8.37876 9.5 8.75288 9.49897 9.03362 9.46856C9.30032 9.43966 9.39242 9.39163 9.44041 9.35677C9.50408 9.31051 9.56007 9.25451 9.60633 9.19084C9.6412 9.14285 9.68922 9.05075 9.71812 8.78404C9.74854 8.5033 9.74956 8.12917 9.74956 7.55V6.20832ZM6.74963 8C6.74963 7.58579 7.08541 7.25 7.49961 7.25H8.2496C8.6638 7.25 8.99958 7.58579 8.99958 8C8.99958 8.41422 8.6638 8.75 8.2496 8.75H7.49961C7.08541 8.75 6.74963 8.41422 6.74963 8Z" 844 fill="currentColor" 845 /></svg 846>`,Ke=Z`<svg fill="none" viewBox="0 0 14 14"> 847 <path 848 fill="currentColor" 849 fill-rule="evenodd" 850 d="M12.9576 2.23383C13.3807 2.58873 13.4361 3.21947 13.0812 3.64263L6.37159 11.6426C6.19161 11.8572 5.92989 11.9865 5.65009 11.999C5.3703 12.0115 5.09808 11.9062 4.89965 11.7085L0.979321 7.80331C0.588042 7.41354 0.586817 6.78038 0.976585 6.3891C1.36635 5.99782 1.99952 5.99659 2.3908 6.38636L5.53928 9.52268L11.5488 2.35742C11.9037 1.93426 12.5344 1.87893 12.9576 2.23383Z" 851 clip-rule="evenodd" 852 /> 853</svg>`,Ze=Z`<svg 854 width="28" 855 height="28" 856 viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"> 857 <path 858 fill-rule="evenodd" 859 clip-rule="evenodd" 860 d="M25.5297 4.92733C26.1221 5.4242 26.1996 6.30724 25.7027 6.89966L12.2836 22.8997C12.0316 23.2001 11.6652 23.3811 11.2735 23.3986C10.8817 23.4161 10.5006 23.2686 10.2228 22.9919L2.38218 15.1815C1.83439 14.6358 1.83268 13.7494 2.37835 13.2016C2.92403 12.6538 3.81046 12.6521 4.35825 13.1978L11.1183 19.9317L23.5573 5.10036C24.0542 4.50794 24.9372 4.43047 25.5297 4.92733Z" 861 fill="#26D962"/> 862</svg> 863`,Ye=Z`<svg fill="none" viewBox="0 0 16 16"> 864 <path 865 fill="currentColor" 866 fill-rule="evenodd" 867 d="M1.46 4.96a1 1 0 0 1 1.41 0L8 10.09l5.13-5.13a1 1 0 1 1 1.41 1.41l-5.83 5.84a1 1 0 0 1-1.42 0L1.46 6.37a1 1 0 0 1 0-1.41Z" 868 clip-rule="evenodd" 869 /> 870</svg>`,Qe=Z`<svg fill="none" viewBox="0 0 16 16"> 871 <path 872 fill="currentColor" 873 fill-rule="evenodd" 874 d="M11.04 1.46a1 1 0 0 1 0 1.41L5.91 8l5.13 5.13a1 1 0 1 1-1.41 1.41L3.79 8.71a1 1 0 0 1 0-1.42l5.84-5.83a1 1 0 0 1 1.41 0Z" 875 clip-rule="evenodd" 876 /> 877</svg>`,Je=Z`<svg fill="none" viewBox="0 0 16 16"> 878 <path 879 fill="currentColor" 880 fill-rule="evenodd" 881 d="M4.96 14.54a1 1 0 0 1 0-1.41L10.09 8 4.96 2.87a1 1 0 0 1 1.41-1.41l5.84 5.83a1 1 0 0 1 0 1.42l-5.84 5.83a1 1 0 0 1-1.41 0Z" 882 clip-rule="evenodd" 883 /> 884</svg>`,Xe=Z`<svg fill="none" viewBox="0 0 16 16"> 885 <path 886 fill="currentColor" 887 fill-rule="evenodd" 888 d="M14.54 11.04a1 1 0 0 1-1.41 0L8 5.92l-5.13 5.12a1 1 0 1 1-1.41-1.41l5.83-5.84a1 1 0 0 1 1.42 0l5.83 5.84a1 1 0 0 1 0 1.41Z" 889 clip-rule="evenodd" 890 /> 891</svg>`,et=Z`<svg width="36" height="36" fill="none"> 892 <path 893 fill="#fff" 894 fill-opacity=".05" 895 d="M0 14.94c0-5.55 0-8.326 1.182-10.4a9 9 0 0 1 3.359-3.358C6.614 0 9.389 0 14.94 0h6.12c5.55 0 8.326 0 10.4 1.182a9 9 0 0 1 3.358 3.359C36 6.614 36 9.389 36 14.94v6.12c0 5.55 0 8.326-1.182 10.4a9 9 0 0 1-3.359 3.358C29.386 36 26.611 36 21.06 36h-6.12c-5.55 0-8.326 0-10.4-1.182a9 9 0 0 1-3.358-3.359C0 29.386 0 26.611 0 21.06v-6.12Z" 896 /> 897 <path 898 stroke="#fff" 899 stroke-opacity=".05" 900 d="M14.94.5h6.12c2.785 0 4.84 0 6.46.146 1.612.144 2.743.43 3.691.97a8.5 8.5 0 0 1 3.172 3.173c.541.948.826 2.08.971 3.692.145 1.62.146 3.675.146 6.459v6.12c0 2.785 0 4.84-.146 6.46-.145 1.612-.43 2.743-.97 3.691a8.5 8.5 0 0 1-3.173 3.172c-.948.541-2.08.826-3.692.971-1.62.145-3.674.146-6.459.146h-6.12c-2.784 0-4.84 0-6.46-.146-1.612-.145-2.743-.43-3.691-.97a8.5 8.5 0 0 1-3.172-3.173c-.541-.948-.827-2.08-.971-3.692C.5 25.9.5 23.845.5 21.06v-6.12c0-2.784 0-4.84.146-6.46.144-1.612.43-2.743.97-3.691A8.5 8.5 0 0 1 4.79 1.617C5.737 1.076 6.869.79 8.48.646 10.1.5 12.156.5 14.94.5Z" 901 /> 902 <path 903 fill="url(#a)" 904 d="M17.998 10.8h12.469a14.397 14.397 0 0 0-24.938.001l6.234 10.798.006-.001a7.19 7.19 0 0 1 6.23-10.799Z" 905 /> 906 <path 907 fill="url(#b)" 908 d="m24.237 21.598-6.234 10.798A14.397 14.397 0 0 0 30.47 10.798H18.002l-.002.006a7.191 7.191 0 0 1 6.237 10.794Z" 909 /> 910 <path 911 fill="url(#c)" 912 d="M11.765 21.601 5.531 10.803A14.396 14.396 0 0 0 18.001 32.4l6.235-10.798-.004-.004a7.19 7.19 0 0 1-12.466.004Z" 913 /> 914 <path fill="#fff" d="M18 25.2a7.2 7.2 0 1 0 0-14.4 7.2 7.2 0 0 0 0 14.4Z" /> 915 <path fill="#1A73E8" d="M18 23.7a5.7 5.7 0 1 0 0-11.4 5.7 5.7 0 0 0 0 11.4Z" /> 916 <defs> 917 <linearGradient 918 id="a" 919 x1="6.294" 920 x2="41.1" 921 y1="5.995" 922 y2="5.995" 923 gradientUnits="userSpaceOnUse" 924 > 925 <stop stop-color="#D93025" /> 926 <stop offset="1" stop-color="#EA4335" /> 927 </linearGradient> 928 <linearGradient 929 id="b" 930 x1="20.953" 931 x2="37.194" 932 y1="32.143" 933 y2="2.701" 934 gradientUnits="userSpaceOnUse" 935 > 936 <stop stop-color="#FCC934" /> 937 <stop offset="1" stop-color="#FBBC04" /> 938 </linearGradient> 939 <linearGradient 940 id="c" 941 x1="25.873" 942 x2="9.632" 943 y1="31.2"
944 y2="1.759" 945 gradientUnits="userSpaceOnUse" 946 > 947 <stop stop-color="#1E8E3E" /> 948 <stop offset="1" stop-color="#34A853" /> 949 </linearGradient> 950 </defs> 951</svg>`,tt=Z`<svg fill="none" viewBox="0 0 16 16"> 952 <path 953 fill="currentColor" 954 fill-rule="evenodd" 955 d="M7 2.99a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm-7 5a7 7 0 1 1 14 0 7 7 0 0 1-14 0Zm7-4a1 1 0 0 1 1 1v2.58l1.85 1.85a1 1 0 0 1-1.41 1.42L6.29 8.69A1 1 0 0 1 6 8v-3a1 1 0 0 1 1-1Z" 956 clip-rule="evenodd" 957 /> 958</svg>`,nt=Z`<svg fill="none" viewBox="0 0 16 16"> 959 <path 960 fill="currentColor" 961 fill-rule="evenodd" 962 d="M2.54 2.54a1 1 0 0 1 1.42 0L8 6.6l4.04-4.05a1 1 0 1 1 1.42 1.42L9.4 8l4.05 4.04a1 1 0 0 1-1.42 1.42L8 9.4l-4.04 4.05a1 1 0 0 1-1.42-1.42L6.6 8 2.54 3.96a1 1 0 0 1 0-1.42Z" 963 clip-rule="evenodd" 964 /> 965</svg>`,rt=Z`<svg fill="none" viewBox="0 0 20 20"> 966 <path 967 fill="currentColor" 968 fill-rule="evenodd" 969 d="M10 3a7 7 0 0 0-6.85 8.44l8.29-8.3C10.97 3.06 10.49 3 10 3Zm3.49.93-9.56 9.56c.32.55.71 1.06 1.16 1.5L15 5.1a7.03 7.03 0 0 0-1.5-1.16Zm2.7 2.8-9.46 9.46a7 7 0 0 0 9.46-9.46ZM1.99 5.9A9 9 0 1 1 18 14.09 9 9 0 0 1 1.98 5.91Z" 970 clip-rule="evenodd" 971 /> 972</svg>`,it=Z`<svg fill="none" viewBox="0 0 16 16"> 973 <path 974 fill="currentColor" 975 fill-rule="evenodd" 976 d="M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm10.66-2.65a1 1 0 0 1 .23 1.06L9.83 9.24a1 1 0 0 1-.59.58l-2.83 1.06A1 1 0 0 1 5.13 9.6l1.06-2.82a1 1 0 0 1 .58-.59L9.6 5.12a1 1 0 0 1 1.06.23ZM7.9 7.89l-.13.35.35-.13.12-.35-.34.13Z" 977 clip-rule="evenodd" 978 /> 979</svg>`,st=Z`<svg 980 xmlns="http://www.w3.org/2000/svg" 981 width="16" 982 height="16" 983 viewBox="0 0 16 16" 984 fill="none" 985> 986 <path 987 fill="currentColor" 988 fill-rule="evenodd" 989 clip-rule="evenodd" 990 d="M9.21498 1.28565H10.5944C11.1458 1.28562 11.6246 1.2856 12.0182 1.32093C12.4353 1.35836 12.853 1.44155 13.2486 1.66724C13.7005 1.92498 14.0749 2.29935 14.3326 2.75122C14.5583 3.14689 14.6415 3.56456 14.6789 3.9817C14.7143 4.37531 14.7142 4.85403 14.7142 5.40545V6.78489C14.7142 7.33631 14.7143 7.81503 14.6789 8.20865C14.6415 8.62578 14.5583 9.04345 14.3326 9.43912C14.0749 9.89099 13.7005 10.2654 13.2486 10.5231C12.853 10.7488 12.4353 10.832 12.0182 10.8694C11.7003 10.8979 11.3269 10.9034 10.9045 10.9045C10.9034 11.3269 10.8979 11.7003 10.8694 12.0182C10.832 12.4353 10.7488 12.853 10.5231 13.2486C10.2654 13.7005 9.89099 14.0749 9.43912 14.3326C9.04345 14.5583 8.62578 14.6415 8.20865 14.6789C7.81503 14.7143 7.33631 14.7142 6.78489 14.7142H5.40545C4.85403 14.7142 4.37531 14.7143 3.9817 14.6789C3.56456 14.6415 3.14689 14.5583 2.75122 14.3326C2.29935 14.0749 1.92498 13.7005 1.66724 13.2486C1.44155 12.853 1.35836 12.4353 1.32093 12.0182C1.2856 11.6246 1.28562 11.1458 1.28565 10.5944V9.21498C1.28562 8.66356 1.2856 8.18484 1.32093 7.79122C1.35836 7.37409 1.44155 6.95642 1.66724 6.56074C1.92498 6.10887 2.29935 5.73451 2.75122 5.47677C3.14689 5.25108 3.56456 5.16789 3.9817 5.13045C4.2996 5.10192 4.67301 5.09645 5.09541 5.09541C5.09645 4.67302 5.10192 4.2996 5.13045 3.9817C5.16789 3.56456 5.25108 3.14689 5.47676 2.75122C5.73451 2.29935 6.10887 1.92498 6.56074 1.66724C6.95642 1.44155 7.37409 1.35836 7.79122 1.32093C8.18484 1.2856 8.66356 1.28562 9.21498 1.28565ZM5.09541 7.09552C4.68397 7.09667 4.39263 7.10161 4.16046 7.12245C3.88053 7.14757 3.78516 7.18949 3.74214 7.21403C3.60139 7.29431 3.48478 7.41091 3.4045 7.55166C3.37997 7.59468 3.33804 7.69005 3.31292 7.96999C3.28659 8.26345 3.28565 8.65147 3.28565 9.25708V10.5523C3.28565 11.1579 3.28659 11.5459 3.31292 11.8394C3.33804 12.1193 3.37997 12.2147 3.4045 12.2577C3.48478 12.3985 3.60139 12.5151 3.74214 12.5954C3.78516 12.6199 3.88053 12.6618 4.16046 12.6869C4.45393 12.7133 4.84195 12.7142 5.44755 12.7142H6.74279C7.3484 12.7142 7.73641 12.7133 8.02988 12.6869C8.30981 12.6618 8.40518 12.6199 8.44821 12.5954C8.58895 12.5151 8.70556 12.3985 8.78584 12.2577C8.81038 12.2147 8.8523 12.1193 8.87742 11.8394C8.89825 11.6072 8.90319 11.3159 8.90435 10.9045C8.48219 10.9034 8.10898 10.8979 7.79122 10.8694C7.37409 10.832 6.95641 10.7488 6.56074 10.5231C6.10887 10.2654 5.73451 9.89099 5.47676 9.43912C5.25108 9.04345 5.16789 8.62578 5.13045 8.20865C5.10194 7.89089 5.09645 7.51767 5.09541 7.09552ZM7.96999 3.31292C7.69005 3.33804 7.59468 3.37997 7.55166 3.4045C7.41091 3.48478 7.29431 3.60139 7.21403 3.74214C7.18949 3.78516 7.14757 3.88053 7.12245 4.16046C7.09611 4.45393 7.09517 4.84195 7.09517 5.44755V6.74279C7.09517 7.3484 7.09611 7.73641 7.12245 8.02988
990C7.14757 8.30981 7.18949 8.40518 7.21403 8.4482C7.29431 8.58895 7.41091 8.70556 7.55166 8.78584C7.59468 8.81038 7.69005 8.8523 7.96999 8.87742C8.26345 8.90376 8.65147 8.9047 9.25708 8.9047H10.5523C11.1579 8.9047 11.5459 8.90376 11.8394 8.87742C12.1193 8.8523 12.2147 8.81038 12.2577 8.78584C12.3985 8.70556 12.5151 8.58895 12.5954 8.4482C12.6199 8.40518 12.6618 8.30981 12.6869 8.02988C12.7133 7.73641 12.7142 7.3484 12.7142 6.74279V5.44755C12.7142 4.84195 12.7133 4.45393 12.6869 4.16046C12.6618 3.88053 12.6199 3.78516 12.5954 3.74214C12.5151 3.60139 12.3985 3.48478 12.2577 3.4045C12.2147 3.37997 12.1193 3.33804 11.8394 3.31292C11.5459 3.28659 11.1579 3.28565 10.5523 3.28565H9.25708C8.65147 3.28565 8.26345 3.28659 7.96999 3.31292Z" 991 fill="#788181" 992 /></svg 993>`,ot=Z` <svg fill="none" viewBox="0 0 13 4"> 994 <path fill="currentColor" d="M.5 0h12L8.9 3.13a3.76 3.76 0 0 1-4.8 0L.5 0Z" /> 995</svg>`,at=Z`<svg fill="none" viewBox="0 0 14 6"> 996 <path style="fill: var(--wui-color-bg-150);" d="M0 1h14L9.21 5.12a3.31 3.31 0 0 1-4.49 0L0 1Z" /> 997 <path 998 style="stroke: var(--wui-color-inverse-100);" 999 stroke-opacity=".05" 1000 d="M1.33 1.5h11.32L8.88 4.75l-.01.01a2.81 2.81 0 0 1-3.8 0l-.02-.01L1.33 1.5Z" 1001 /> 1002 <path 1003 style="fill: var(--wui-color-bg-150);" 1004 d="M1.25.71h11.5L9.21 3.88a3.31 3.31 0 0 1-4.49 0L1.25.71Z" 1005 /> 1006</svg> `,ct=Z`<svg fill="none" viewBox="0 0 20 20"> 1007 <path 1008 fill="currentColor" 1009 fill-rule="evenodd" 1010 d="M13.66 2H6.34c-1.07 0-1.96 0-2.68.08-.74.08-1.42.25-2.01.68a4 4 0 0 0-.89.89c-.43.6-.6 1.27-.68 2.01C0 6.38 0 7.26 0 8.34v.89c0 1.07 0 1.96.08 2.68.08.74.25 1.42.68 2.01a4 4 0 0 0 .89.89c.6.43 1.27.6 2.01.68a27 27 0 0 0 2.68.08h7.32a27 27 0 0 0 2.68-.08 4.03 4.03 0 0 0 2.01-.68 4 4 0 0 0 .89-.89c.43-.6.6-1.27.68-2.01.08-.72.08-1.6.08-2.68v-.89c0-1.07 0-1.96-.08-2.68a4.04 4.04 0 0 0-.68-2.01 4 4 0 0 0-.89-.89c-.6-.43-1.27-.6-2.01-.68C15.62 2 14.74 2 13.66 2ZM2.82 4.38c.2-.14.48-.25 1.06-.31C4.48 4 5.25 4 6.4 4h7.2c1.15 0 1.93 0 2.52.07.58.06.86.17 1.06.31a2 2 0 0 1 .44.44c.14.2.25.48.31 1.06.07.6.07 1.37.07 2.52v.77c0 1.15 0 1.93-.07 2.52-.06.58-.17.86-.31 1.06a2 2 0 0 1-.44.44c-.2.14-.48.25-1.06.32-.6.06-1.37.06-2.52.06H6.4c-1.15 0-1.93 0-2.52-.06-.58-.07-.86-.18-1.06-.32a2 2 0 0 1-.44-.44c-.14-.2-.25-.48-.31-1.06C2 11.1 2 10.32 2 9.17V8.4c0-1.15 0-1.93.07-2.52.06-.58.17-.86.31-1.06a2 2 0 0 1 .44-.44Z" 1011 clip-rule="evenodd" 1012 /> 1013 <path fill="currentColor" d="M6.14 17.57a1 1 0 1 0 0 2h7.72a1 1 0 1 0 0-2H6.14Z" /> 1014</svg>`,lt=Z`<svg fill="none" viewBox="0 0 16 16"> 1015 <path 1016 fill="currentColor" 1017 fill-rule="evenodd" 1018 d="M6.07 1h.57a1 1 0 0 1 0 2h-.52c-.98 0-1.64 0-2.14.06-.48.05-.7.14-.84.24-.13.1-.25.22-.34.35-.1.14-.2.35-.25.83-.05.5-.05 1.16-.05 2.15v2.74c0 .99 0 1.65.05 2.15.05.48.14.7.25.83.1.14.2.25.34.35.14.1.36.2.84.25.5.05 1.16.05 2.14.05h.52a1 1 0 0 1 0 2h-.57c-.92 0-1.69 0-2.3-.07a3.6 3.6 0 0 1-1.8-.61c-.3-.22-.57-.49-.8-.8a3.6 3.6 0 0 1-.6-1.79C.5 11.11.5 10.35.5 9.43V6.58c0-.92 0-1.7.06-2.31a3.6 3.6 0 0 1 .62-1.8c.22-.3.48-.57.79-.79a3.6 3.6 0 0 1 1.8-.61C4.37 1 5.14 1 6.06 1ZM9.5 3a1 1 0 0 1 1.42 0l4.28 4.3a1 1 0 0 1 0 1.4L10.93 13a1 1 0 0 1-1.42-1.42L12.1 9H6.8a1 1 0 1 1 0-2h5.3L9.51 4.42a1 1 0 0 1 0-1.41Z" 1019 clip-rule="evenodd" 1020 /> 1021</svg>`,ut=Z`<svg fill="none" viewBox="0 0 40 40"> 1022 <g clip-path="url(#a)"> 1023 <g clip-path="url(#b)"> 1024 <circle cx="20" cy="19.89" r="20" fill="#5865F2" /> 1025 <path 1026 fill="#fff" 1027 fill-rule="evenodd" 1028 d="M25.71 28.15C30.25 28 32 25.02 32 25.02c0-6.61-2.96-11.98-2.96-11.98-2.96-2.22-5.77-2.15-5.77-2.15l-.29.32c3.5 1.07 5.12 2.61 5.12 2.61a16.75 16.75 0 0 0-10.34-1.93l-.35.04a15.43 15.43 0 0 0-5.88 1.9s1.71-1.63 5.4-2.7l-.2-.24s-2.81-.07-5.77 2.15c0 0-2.96 5.37-2.96 11.98 0 0 1.73 2.98 6.27 3.13l1.37-1.7c-2.6-.79-3.6-2.43-3.6-2.43l.58.35.09.06.08.04.02.01.08.05a17.25 17.25 0 0 0 4.52 1.58 14.4 14.4 0 0 0 8.3-.86c.72-.27 1.52-.66 2.37-1.21 0 0-1.03 1.68-3.72 2.44.61.78 1.35 1.67 1.35 1.67Zm-9.55-9.6c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28.01-1.25-.93-2.28-2.1-2.28Zm7.5 0c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28 0-1.25-.93-2.28-2.1-2.28Z" 1029 clip-rule="evenodd" 1030 /> 1031 </g> 1032 </g>
1033 <defs> 1034 <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath> 1035 <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 1036 </defs> 1037</svg>`,dt=Z`<svg fill="none" viewBox="0 0 16 16"> 1038 <path 1039 fill="currentColor" 1040 d="M4.25 7a.63.63 0 0 0-.63.63v3.97c0 .28-.2.51-.47.54l-.75.07a.93.93 0 0 1-.9-.47A7.51 7.51 0 0 1 5.54.92a7.5 7.5 0 0 1 9.54 4.62c.12.35.06.72-.16 1-.74.97-1.68 1.78-2.6 2.44V4.44a.64.64 0 0 0-.63-.64h-1.06c-.35 0-.63.3-.63.64v5.5c0 .23-.12.42-.32.5l-.52.23V6.05c0-.36-.3-.64-.64-.64H7.45c-.35 0-.64.3-.64.64v4.97c0 .25-.17.46-.4.52a5.8 5.8 0 0 0-.45.11v-4c0-.36-.3-.65-.64-.65H4.25ZM14.07 12.4A7.49 7.49 0 0 1 3.6 14.08c4.09-.58 9.14-2.5 11.87-6.6v.03a7.56 7.56 0 0 1-1.41 4.91Z" 1041 /> 1042</svg>`,ht=Z`<svg fill="none" viewBox="0 0 14 15"> 1043 <path 1044 fill="currentColor" 1045 fill-rule="evenodd" 1046 d="M6.71 2.99a.57.57 0 0 0-.57.57 1 1 0 0 1-1 1c-.58 0-.96 0-1.24.03-.27.03-.37.07-.42.1a.97.97 0 0 0-.36.35c-.04.08-.09.21-.11.67a2.57 2.57 0 0 1 0 5.13c.02.45.07.6.11.66.09.15.21.28.36.36.07.04.21.1.67.12a2.57 2.57 0 0 1 5.12 0c.46-.03.6-.08.67-.12a.97.97 0 0 0 .36-.36c.03-.04.07-.14.1-.41.02-.29.03-.66.03-1.24a1 1 0 0 1 1-1 .57.57 0 0 0 0-1.15 1 1 0 0 1-1-1c0-.58 0-.95-.03-1.24a1.04 1.04 0 0 0-.1-.42.97.97 0 0 0-.36-.36 1.04 1.04 0 0 0-.42-.1c-.28-.02-.65-.02-1.24-.02a1 1 0 0 1-1-1 .57.57 0 0 0-.57-.57ZM5.15 13.98a1 1 0 0 0 .99-1v-.78a.57.57 0 0 1 1.14 0v.78a1 1 0 0 0 .99 1H8.36a66.26 66.26 0 0 0 .73 0 3.78 3.78 0 0 0 1.84-.38c.46-.26.85-.64 1.1-1.1.23-.4.32-.8.36-1.22.02-.2.03-.4.03-.63a2.57 2.57 0 0 0 0-4.75c0-.23-.01-.44-.03-.63a2.96 2.96 0 0 0-.35-1.22 2.97 2.97 0 0 0-1.1-1.1c-.4-.22-.8-.31-1.22-.35a8.7 8.7 0 0 0-.64-.04 2.57 2.57 0 0 0-4.74 0c-.23 0-.44.02-.63.04-.42.04-.83.13-1.22.35-.46.26-.84.64-1.1 1.1-.33.57-.37 1.2-.39 1.84a21.39 21.39 0 0 0 0 .72v.1a1 1 0 0 0 1 .99h.78a.57.57 0 0 1 0 1.15h-.77a1 1 0 0 0-1 .98v.1a63.87 63.87 0 0 0 0 .73c0 .64.05 1.27.38 1.83.26.47.64.85 1.1 1.11.56.32 1.2.37 1.84.38a20.93 20.93 0 0 0 .72 0h.1Z" 1047 clip-rule="evenodd" 1048 /> 1049</svg>`,pt=Z`<svg fill="none" viewBox="0 0 14 15"> 1050 <path 1051 fill="currentColor" 1052 fill-rule="evenodd" 1053 d="M3.74 3.99a1 1 0 0 1 1-1H11a1 1 0 0 1 1 1v6.26a1 1 0 0 1-2 0V6.4l-6.3 6.3a1 1 0 0 1-1.4-1.42l6.29-6.3H4.74a1 1 0 0 1-1-1Z" 1054 clip-rule="evenodd" 1055 /> 1056</svg>`,ft=Z`<svg fill="none" viewBox="0 0 40 40"> 1057 <g clip-path="url(#a)"> 1058 <g clip-path="url(#b)"> 1059 <circle cx="20" cy="19.89" r="20" fill="#1877F2" /> 1060 <g clip-path="url(#c)"> 1061 <path 1062 fill="#fff" 1063 d="M26 12.38h-2.89c-.92 0-1.61.38-1.61 1.34v1.66H26l-.36 4.5H2
10631.5v12H17v-12h-3v-4.5h3V12.5c0-3.03 1.6-4.62 5.2-4.62H26v4.5Z" 1064 /> 1065 </g> 1066 </g> 1067 <path 1068 fill="#1877F2" 1069 d="M40 20a20 20 0 1 0-23.13 19.76V25.78H11.8V20h5.07v-4.4c0-5.02 3-7.79 7.56-7.79 2.19 0 4.48.4 4.48.4v4.91h-2.53c-2.48 0-3.25 1.55-3.25 3.13V20h5.54l-.88 5.78h-4.66v13.98A20 20 0 0 0 40 20Z" 1070 /> 1071 <path 1072 fill="#fff" 1073 d="m27.79 25.78.88-5.78h-5.55v-3.75c0-1.58.78-3.13 3.26-3.13h2.53V8.2s-2.3-.39-4.48-.39c-4.57 0-7.55 2.77-7.55 7.78V20H11.8v5.78h5.07v13.98a20.15 20.15 0 0 0 6.25 0V25.78h4.67Z" 1074 /> 1075 </g> 1076 <defs> 1077 <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath> 1078 <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 1079 <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath> 1080 </defs> 1081</svg>`,mt=Z`<svg fill="none" viewBox="0 0 16 16"> 1082 <path 1083 fill="currentColor" 1084 fill-rule="evenodd" 1085 d="M0 3a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H1a1 1 0 0 1-1-1Zm2.63 5.25a1 1 0 0 1 1-1h8.75a1 1 0 1 1 0 2H3.63a1 1 0 0 1-1-1Zm2.62 5.25a1 1 0 0 1 1-1h3.5a1 1 0 0 1 0 2h-3.5a1 1 0 0 1-1-1Z" 1086 clip-rule="evenodd" 1087 /> 1088</svg>`,gt=Z`<svg fill="none" viewBox="0 0 40 40"> 1089 <g clip-path="url(#a)"> 1090 <g clip-path="url(#b)"> 1091 <circle cx="20" cy="19.89" r="20" fill="#1B1F23" /> 1092 <g clip-path="url(#c)"> 1093 <path 1094 fill="#fff" 1095 d="M8 19.89a12 12 0 1 1 15.8 11.38c-.6.12-.8-.26-.8-.57v-3.3c0-1.12-.4-1.85-.82-2.22 2.67-.3 5.48-1.31 5.48-5.92 0-1.31-.47-2.38-1.24-3.22.13-.3.54-1.52-.12-3.18 0 0-1-.32-3.3 1.23a11.54 11.54 0 0 0-6 0c-2.3-1.55-3.3-1.23-3.3-1.23a4.32 4.32 0 0 0-.12 3.18 4.64 4.64 0 0 0-1.24 3.22c0 4.6 2.8 5.63 5.47 5.93-.34.3-.65.83-.76 1.6-.69.31-2.42.84-3.5-1 0 0-.63-1.15-1.83-1.23 0 0-1.18-.02-.09.73 0 0 .8.37 1.34 1.76 0 0 .7 2.14 4.03 1.41v2.24c0 .31-.2.68-.8.57A12 12 0 0 1 8 19.9Z" 1096 /> 1097 </g> 1098 </g> 1099 </g> 1100 <defs> 1101 <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath> 1102 <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 1103 <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath> 1104 </defs> 1105</svg>`,yt=Z`<svg fill="none" viewBox="0 0 40 40"> 1106 <path 1107 fill="#4285F4" 1108 d="M32.74 20.3c0-.93-.08-1.81-.24-2.66H20.26v5.03h7a6 6 0 0 1-2.62 3.91v3.28h4.22c2.46-2.27 3.88-5.6 3.88-9.56Z" 1109 /> 1110 <path 1111 fill="#34A853" 1112 d="M20.26 33a12.4 12.4 0 0 0 8.6-3.14l-4.22-3.28a7.74 7.74 0 0 1-4.38 1.26 7.76 7.76 0 0 1-7.28-5.36H8.65v3.36A12.99 12.99 0 0 0 20.26 33Z" 1113 /> 1114 <path 1115 fill="#FBBC05" 1116 d="M12.98 22.47a7.79 7.79 0 0 1 0-4.94v-3.36H8.65a12.84 12.84 0 0 0 0 11.66l3.37-2.63.96-.73Z" 1117 /> 1118 <path 1119 fill="#EA4335" 1120 d="M20.26 12.18a7.1 7.1 0 0 1 4.98 1.93l3.72-3.72A12.47 12.47 0 0 0 20.26 7c-5.08 0-9.47 2.92-11.6 7.17l4.32 3.36a7.76 7.76 0 0 1 7.28-5.35Z" 1121 /> 1122</svg>`,vt=Z`<svg fill="none" viewBox="0 0 16 16"> 1123 <path 1124 fill="currentColor" 1125 d="M8.51 5.66a.83.83 0 0 0-.57-.2.83.83 0 0 0-.52.28.8.8 0 0 0-.25.52 1 1 0 0 1-2 0c0-.75.34-1.43.81-1.91a2.75 2.75 0 0 1 4.78 1.92c0 1.24-.8 1.86-1.25 2.2l-.04.03c-.47.36-.5.43-.5.65a1 1 0 1 1-2 0c0-1.25.8-1.86 1.24-2.2l.04-.04c.47-.36.5-.43.5-.65 0-.3-.1-.49-.24-.6ZM9.12 11.87a1.13 1.13 0 1 1-2.25 0 1.13 1.13 0 0 1 2.25 0Z" 1126 /> 1127 <path 1128 fill="currentColor" 1129 fill-rule="evenodd" 1130 d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6a6 6 0 1 0 0 12A6 6 0 0 0 8 2Z" 1131 clip-rule="evenodd" 1132 /> 1133</svg>`,wt=Z`<svg fill="none" viewBox="0 0 14 15"> 1134 <path 1135 fill="currentColor" 1136 d="M6 10.49a1 1 0 1 0 2 0v-2a1 1 0 0 0-2 0v2ZM7 4.49a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z" 1137 /> 1138 <path 1139 fill="currentColor" 1140 fill-rule="evenodd" 1141 d="M7 14.99a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-7a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z" 1142 clip-rule="evenodd" 1143 /> 1144</svg>`,bt=Z`<svg fill="none" viewBox="0 0 16 16"> 1145 <path 1146 fill="currentColor" 1147 fill-rule="evenodd" 1148 d="M4.83 1.34h6.34c.68 0 1.26 0 1.73.04.5.05.97.15 1.42.4.52.3.95.72 1.24 1.24.26.45.35.92.4 1.42.04.47.04 1.05.04 1.73v3.71c0 .69 0 1.26-.04 1.74-.05.5-.14.97-.4 1.41-.3.52-.72.95-1.24 1.25-.45.25-.92.35-1.42.4-.47.03-1.05.03-1.73.03H4.83c-.68 0-1.26 0-1.73-.04-.5-.04-.97-.14-1.42-.4-.52-.29-.95-.72-1.24-1.24a3.39 3.39 0 0 1-.4-1.41A20.9 20.9 0 0 1 0 9.88v-3.7c0-.7 0-1.27.04-1.74.05-.5.14-.97.4-1.42.3-.52.72-.95 1.24-1.24.45-.25.92-.35 1.42-.4.47-.04 1.05-.04 1.73-.04ZM3.28 3.38c-.36.03-.51.08-.6.14-.21.11-.39.29-.5.5a.8.8 0 0 0-.08.19l5.16 3.44c.45.3 1.03.3 1.48 0L13.9 4.2a.79.79 0 0 0-.08-.2c-.11-.2-.29-.38-.5-.5-.09-.05-.24-.1-.6-.13-.37-.04-.86-.04-1.6-.04H4.88c-.73 0-1.22 0-1.6.04ZM14 6.54 9.85 9.31a3.33 3.33 0 0 1-3.7 0L2 6.54v3.3c0 .74 0 1.22.03 1.6.04.36.1.5.15.6.11.2.29.38.5.5.09.05.24.1.6.14.37.03.86.03 1.6.03h6.25c.73 0 1.22 0 1.6-.03.35-.03.5-.09.6-.14.2-.12.38-.3.5-.5.05-.1.1-.24.14-.6.03-.38.03-.86.03-1.6v-3.3Z" 1149 clip-rule="evenodd" 1150 /> 1151</svg>`,xt=Z`<svg fill="none" viewBox="0 0 20 20">
1152 <path fill="currentColor" d="M10.81 5.81a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" /> 1153 <path 1154 fill="currentColor" 1155 fill-rule="evenodd" 1156 d="M3 4.75A4.75 4.75 0 0 1 7.75 0h4.5A4.75 4.75 0 0 1 17 4.75v10.5A4.75 4.75 0 0 1 12.25 20h-4.5A4.75 4.75 0 0 1 3 15.25V4.75ZM7.75 2A2.75 2.75 0 0 0 5 4.75v10.5A2.75 2.75 0 0 0 7.75 18h4.5A2.75 2.75 0 0 0 15 15.25V4.75A2.75 2.75 0 0 0 12.25 2h-4.5Z" 1157 clip-rule="evenodd" 1158 /> 1159</svg>`,Et=Z`<svg fill="none" viewBox="0 0 41 40"> 1160 <path 1161 style="fill: var(--wui-color-fg-100);" 1162 fill-opacity=".05" 1163 d="M.6 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z" 1164 /> 1165 <path 1166 fill="#949E9E" 1167 d="M15.6 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM23.1 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM28.1 22.81a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" 1168 /> 1169</svg>`,_t=Z`<svg fill="none" viewBox="0 0 22 20"> 1170 <path 1171 fill="currentColor" 1172 fill-rule="evenodd" 1173 d="M16.32 13.62a3.14 3.14 0 1 1-.99 1.72l-1.6-.93a3.83 3.83 0 0 1-3.71 1 3.66 3.66 0 0 1-1.74-1l-1.6.94a3.14 3.14 0 1 1-1-1.73l1.6-.94a3.7 3.7 0 0 1 0-2 3.81 3.81 0 0 1 1.8-2.33c.29-.17.6-.3.92-.38V6.1a3.14 3.14 0 1 1 2 0l-.01.02v1.85H12a3.82 3.82 0 0 1 2.33 1.8 3.7 3.7 0 0 1 .39 2.91l1.6.93ZM2.6 16.54a1.14 1.14 0 0 0 1.98-1.14 1.14 1.14 0 0 0-1.98 1.14ZM11 2.01a1.14 1.14 0 1 0 0 2.28 1.14 1.14 0 0 0 0-2.28Zm1.68 10.45c.08-.19.14-.38.16-.58v-.05l.02-.13v-.13a1.92 1.92 0 0 0-.24-.8l-.11-.15a1.89 1.89 0 0 0-.74-.6 1.86 1.86 0 0 0-.77-.17h-.19a1.97 1.97 0 0 0-.89.34 1.98 1.98 0 0 0-.61.74 1.99 1.99 0 0 0-.16.9v.05a1.87 1.87 0 0 0 .24.74l.1.15c.12.16.26.3.42.42l.16.1.13.07.04.02a1.84 1.84 0 0 0 .76.17h.17a2 2 0 0 0 .91-.35 1.78 1.78 0 0 0 .52-.58l.03-.05a.84.84 0 0 0 .05-.11Zm5.15 4.5a1.14 1.14 0 0 0 1.14-1.97 1.13 1.13 0 0 0-1.55.41c-.32.55-.13 1.25.41 1.56Z" 1174 clip-rule="evenodd" 1175 /> 1176 <path 1177 fill="currentColor" 1178 fill-rule="evenodd" 1179 d="M4.63 9.43a1.5 1.5 0 1 0 1.5-2.6 1.5 1.5 0 0 0-1.5 2.6Zm.32-1.55a.5.5 0 0 1 .68-.19.5.5 0 0 1 .18.68.5.5 0 0 1-.68.19.5.5 0 0 1-.18-.68ZM17.94 8.88a1.5 1.5 0 1 1-2.6-1.5 1.5 1.5 0 1 1 2.6 1.5ZM16.9 7.69a.5.5 0 0 0-.68.19.5.5 0 0 0 .18.68.5.5 0 0 0 .68-.19.5.5 0 0 0-.18-.68ZM9.75 17.75a1.5 1.5 0 1 1 2.6 1.5 1.5 1.5 0 1 1-2.6-1.5Zm1.05 1.18a.5.5 0 0 0 .68-.18.5.5 0 0 0-.18-.68.5.5 0 0 0-.68.18.5.5 0 0 0 .18.68Z" 1180 clip-rule="evenodd" 1181 /> 1182</svg>`,kt=Z`<svg fill="none" viewBox="0 0 20 20"> 1183 <path 1184 fill="currentColor" 1185 fill-rule="evenodd" 1186 d="M9.13 1h1.71c1.46 0 2.63 0 3.56.1.97.1 1.8.33 2.53.85a5 5 0 0 1 1.1 1.11c.53.73.75 1.56.86 2.53.1.93.1 2.1.1 3.55v1.72c0 1.45 0 2.62-.1 3.55-.1.97-.33 1.8-.86 2.53a5 5 0 0 1-1.1 1.1c-.73.53-1.56.75-2.53.86-.93.1-2.1.1-3.55.1H9.13c-1.45 0-2.62 0-3.56-.1-.96-.1-1.8-.33-2.52-.85a5 5 0 0 1-1.1-1.11 5.05 5.05 0 0 1-.86-2.53c-.1-.93-.1-2.1-.1-3.55V9.14c0-1.45 0-2.62.1-3.55.1-.97.33-1.8.85-2.53a5 5 0 0 1 1.1-1.1 5.05 5.05 0 0 1 2.53-.86C6.51 1 7.67 1 9.13 1ZM5.79 3.09a3.1 3.1 0 0 0-1.57.48 3 3 0 0 0-.66.67c-.24.32-.4.77-.48 1.56-.1.82-.1 1.88-.1 3.4v1.6c0 1.15 0 2.04.05 2.76l.41-.42c.5-.5.93-.92 1.32-1.24.41-.33.86-.6 1.43-.7a3 3 0 0 1 .94 0c.35.06.66.2.95.37a17.11 17.11 0 0 0 .8.45c.1-.08.2-.2.41-.4l.04-.03a27 27 0 0 1 1.95-1.84 4.03 4.03 0 0 1 1.91-.94 4 4 0 0 1 1.25 0c.73.11 1.33.46 1.91.94l.64.55V9.2c0-1.52 0-2.58-.1-3.4a3.1 3.1 0 0 0-.48-1.56 3 3 0 0 0-.66-.67 3.1 3.1 0 0 0-1.56-.48C13.37 3 12.3 3 10.79 3h-1.6c-1.52 0-2.59 0-3.4.09Zm11.18 10-.04-.05a26.24 26.24 0 0 0-1.83-1.74c-.45-.36-.73-.48-.97-.52a2 2 0 0 0-.63 0c-.24.04-.51.16-.97.52-.46.38-1.01.93-1.83 1.74l-.02.02c-.17.18-.34.34-.49.47a2.04 2.04 0 0 1-1.08.5 1.97 1.97 0 0 1-1.25-.27l-.79-.46-.02-.02a.65.65 0 0 0-.24-.1 1 1 0 0 0-.31 0c-.08.02-.21.06-.49.28-.3.24-.65.59-1.2 1.14l-.56.56-.65.66a3 3 0 0 0 .62.6c.33.24.77.4 1.57.49.81.09 1.88.09 3.4.09h1.6c1.52 0 2.58 0 3.4-.09a3.1 3.1 0 0 0 1.56-.48 3 3 0 0 0 .66-.67c.24-.32.4-.77.49-1.56l.07-1.12Zm-8.02-1.03ZM4.99 7a2 2 0 1 1 4 0 2 2 0 0 1-4 0Z" 1187 clip-rule="evenodd" 1188 /> 1189</svg>`,Ct=Z`<svg fill="none" viewBox="0 0 16 16"> 1190 <path 1191 fill="currentColor" 1192 fill-rule="evenodd" 1193 d="M8 0a1 1 0 0 1 1 1v5.38a1 1 0 0 1-2 0V1a1 1 0 0 1 1-1ZM5.26 2.6a1 1 0 0 1-.28 1.39 5.46 5.46 0 1 0 6.04 0 1 1 0 1 1 1.1-1.67 7.46 7.46 0 1 1-8.25 0 1 1 0 0 1 1.4.28Z" 1194 clip-rule="evenodd" 1195 /> 1196</svg>`,At=Z` <svg 1197 width="36" 1198 height="36" 1199 fill="none" 1200> 1201 <path 1202 d="M0 8a8 8 0 0 1 8-8h20a8 8 0 0 1 8 8v20a8 8 0 0 1-8 8H8a8 8 0 0 1-8-8V8Z" 1203 fill="#fff" 1204 fill-opacity=".05" 1205 /> 1206 <path 1207 d="m18.262 17.513-8.944 9.49v.01a2.417 2.417 0 0 0 3.56 1.452l.026-.017 10.061-5.803-4.703-5.132Z" 1208 fill="#EA4335" 1209 /> 1210 <path 1211 d="m27.307 15.9-.008-.008-4.342-2.52-4.896 4.36 4.913 4.912 4.325-2.494a2.42 2.42 0 0 0 .008-4.25Z" 1212 fill="#FBBC04" 1213 /> 1214 <path 1215 d="M9.318 8.997c-.05.202-.084.403-.084.622V26.39c0 .218.025.42.084.621l9.246-9.247-9.246-8.768Z" 1216 fill="#4285F4" 1217 /> 1218 <path 1219 d="m18.33 18 4.627-4.628-10.053-5.828a2.427 2.427 0 0 0-3.586 1.444L18.329 18Z" 1220 fill="#34A853" 1221 /> 1222 <path 1223 d="M8 .5h20A7.5 7.5 0 0 1 35.5 8v20a7.5 7.5 0 0 1-7.5 7.5H8A7.5 7.5 0 0 1 .5 28V8A7.5 7.5 0 0 1 8 .5Z" 1224 stroke="#fff" 1225 stroke-opacity=".05" 1226 /> 1227</svg>`,St=Z`<svg 1228 width="13" 1229 height="12" 1230 viewBox="0 0 13 12" 1231 fill="none" 1232> 1233 <path 1234 fill="currentColor" 1235 fill-rule="evenodd" 1236 clip-rule="evenodd" 1237 d="M0.794373 5.99982C0.794373 5.52643 1.17812 5.14268 1.6515 5.14268H5.643V1.15109C5.643 0.677701 6.02675 0.293946 6.50012 0.293945C6.9735 0.293946 7.35725 0.677701 7.35725 1.15109V5.14268H11.3488C11.8221 5.14268 12.2059 5.52643 12.2059 5.99982C12.2059 6.47321 11.8221 6.85696 11.3488 6.85696H7.35725V10.8486C7.35725 11.3219 6.9735 11.7057 6.50012 11.7057C6.02675 11.7057 5.643 11.3219 5.643 10.8486V6.85696H1.6515C1.17812 6.85696 0.794373 6.47321 0.794373 5.99982Z" 1238 /></svg 1239>`,It=Z`<svg fill="none" viewBox="0 0 20 20"> 1240 <path 1241 fill="currentColor" 1242 d="M3 6a3 3 0 0 1 3-3h1a1 1 0 1 0 0-2H6a5 5 0 0 0-5 5v1a1 1 0 0 0 2 0V6ZM13 1a1 1 0 1 0 0 2h1a3 3 0 0 1 3 3v1a1 1 0 1 0 2 0V6a5 5 0 0 0-5-5h-1ZM3 13a1 1 0 1 0-2 0v1a5 5 0 0 0 5 5h1a1 1 0 1 0 0-2H6a3 3 0 0 1-3-3v-1ZM19 13a1 1 0 1 0-2 0v1a3 3 0 0 1-3 3h-1a1 1 0 1 0 0 2h1.01a5 5 0 0 0 5-5v-1ZM5.3 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05A1.5 1.5 0 0 0 9.2 8.14c.06-.2.06-.43.06-.89s0-.7-.06-.89A1.5 1.5 0 0 0 8.14 5.3c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM10.8 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM5.26 12.75c0-.46 0-.7.05-.89a1.5 1.5 0 0 1 1.06-1.06c.19-.05.42-.05.89-.05.46 0 .7 0 .88.05.52.14.93.54 1.06 1.06.06.2.06.43.06.89s0 .7-.06.89a1.5 1.5 0 0 1-1.06 1.06c-.19.05-.42.05-.88.05-.47 0-.7 0-.9-.05a1.5 1.5 0 0 1-1.05-1.06c-.05-.2-.05-.43-.05-.89ZM10.8 11.86c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06Z" 1243 /> 1244</svg>`,Tt=Z`<svg 1245 fill="none" 1246 viewBox="0 0 21 20" 1247> 1248 <path 1249 fill="currentColor"
1250 d="M8.8071 0.292893C9.19763 0.683417 9.19763 1.31658 8.8071 1.70711L6.91421 3.6H11.8404C14.3368 3.6 16.5533 5.1975 17.3427 7.56588L17.4487 7.88377C17.6233 8.40772 17.3402 8.97404 16.8162 9.14868C16.2923 9.32333 15.726 9.04017 15.5513 8.51623L15.4453 8.19834C14.9281 6.64664 13.476 5.6 11.8404 5.6H6.91421L8.8071 7.49289C9.19763 7.88342 9.19763 8.51658 8.8071 8.90711C8.41658 9.29763 7.78341 9.29763 7.39289 8.90711L3.79289 5.30711C3.40236 4.91658 3.40236 4.28342 3.79289 3.89289L7.39289 0.292893C7.78341 -0.0976311 8.41658 -0.0976311 8.8071 0.292893ZM4.18377 10.8513C4.70771 10.6767 5.27403 10.9598 5.44868 11.4838L5.55464 11.8017C6.07188 13.3534 7.52401 14.4 9.15964 14.4L14.0858 14.4L12.1929 12.5071C11.8024 12.1166 11.8024 11.4834 12.1929 11.0929C12.5834 10.7024 13.2166 10.7024 13.6071 11.0929L17.2071 14.6929C17.5976 15.0834 17.5976 15.7166 17.2071 16.1071L13.6071 19.7071C13.2166 20.0976 12.5834 20.0976 12.1929 19.7071C11.8024 19.3166 11.8024 18.6834 12.1929 18.2929L14.0858 16.4L9.15964 16.4C6.66314 16.4 4.44674 14.8025 3.65728 12.4341L3.55131 12.1162C3.37667 11.5923 3.65983 11.026 4.18377 10.8513Z" 1251 /></svg 1252>`,Pt=Z`<svg fill="none" viewBox="0 0 14 16"> 1253 <path 1254 fill="currentColor" 1255 fill-rule="evenodd" 1256 d="M3.94 1.04a1 1 0 0 1 .7 1.23l-.48 1.68a5.85 5.85 0 0 1 8.53 4.32 5.86 5.86 0 0 1-11.4 2.56 1 1 0 0 1 1.9-.57 3.86 3.86 0 1 0 1.83-4.5l1.87.53a1 1 0 0 1-.55 1.92l-4.1-1.15a1 1 0 0 1-.69-1.23l1.16-4.1a1 1 0 0 1 1.23-.7Z" 1257 clip-rule="evenodd" 1258 /> 1259</svg>`,Nt=Z`<svg fill="none" viewBox="0 0 20 20"> 1260 <path 1261 fill="currentColor" 1262 fill-rule="evenodd" 1263 d="M9.36 4.21a5.14 5.14 0 1 0 0 10.29 5.14 5.14 0 0 0 0-10.29ZM1.64 9.36a7.71 7.71 0 1 1 14 4.47l2.52 2.5a1.29 1.29 0 1 1-1.82 1.83l-2.51-2.51A7.71 7.71 0 0 1 1.65 9.36Z" 1264 clip-rule="evenodd" 1265 /> 1266</svg>`,Rt=Z`<svg fill="none" viewBox="0 0 21 20"> 1267 <path 1268 fill="currentColor" 1269 fill-rule="evenodd" 1270 d="M14.3808 4.34812C13.72 4.47798 12.8501 4.7587 11.5748 5.17296L9.00869 6.00646C6.90631 6.68935 5.40679 7.17779 4.38121 7.63178C3.87166 7.85734 3.5351 8.05091 3.32022 8.22035C3.11183 8.38466 3.07011 8.48486 3.05969 8.51817C2.98058 8.77103 2.98009 9.04195 3.05831 9.29509C3.06861 9.32844 3.10998 9.42878 3.31777 9.59384C3.53205 9.76404 3.86792 9.95881 4.37667 10.1862C5.29287 10.5957 6.58844 11.0341 8.35529 11.6164L10.8876 8.59854C11.2426 8.17547 11.8733 8.12028 12.2964 8.47528C12.7195 8.83029 12.7746 9.46104 12.4196 9.88412L9.88738 12.9019C10.7676 14.5408 11.4244 15.7406 11.9867 16.5718C12.299 17.0333 12.5491 17.3303 12.7539 17.5117C12.9526 17.6877 13.0586 17.711 13.0932 17.7154C13.3561 17.7484 13.6228 17.7009 13.8581 17.5791C13.8891 17.563 13.9805 17.5046 14.1061 17.2708C14.2357 17.0298 14.3679 16.6647 14.5015 16.1237C14.7705 15.0349 14.9912 13.4733 15.2986 11.2843L15.6738 8.61249C15.8603 7.28456 15.9857 6.37917 15.9989 5.7059C16.012 5.03702 15.9047 4.8056 15.8145 4.69183C15.7044 4.55297 15.5673 4.43792 15.4114 4.35365C15.2837 4.28459 15.0372 4.2191 14.3808 4.34812ZM7.99373 13.603C6.11919 12.9864 4.6304 12.4902 3.5606 12.0121C2.98683 11.7557 2.4778 11.4808 2.07383 11.1599C1.66337 10.8339 1.31312 10.4217 1.14744 9.88551C0.949667 9.24541 0.950886 8.56035 1.15094 7.92096C1.31852 7.38534 1.67024 6.97442 2.08185 6.64985C2.48697 6.33041 2.99697 6.05734 3.57166 5.80295C4.70309 5.3021 6.30179 4.78283 8.32903 4.12437L11.0196 3.25042C12.2166 2.86159 13.2017 2.54158 13.9951 2.38566C14.8065 2.22618 15.6202 2.19289 16.3627 2.59437C16.7568 2.80747 17.1035 3.09839 17.3818 3.4495C17.9062 4.111 18.0147 4.91815 17.9985 5.74496C17.9827 6.55332 17.8386 7.57903 17.6636 8.82534L17.2701 11.6268C16.9737 13.7376 16.7399 15.4022 16.4432 16.6034C16.2924 17.2135 16.1121 17.7632 15.8678 18.2176C15.6197 18.6794 15.2761 19.0971 14.7777 19.3551C14.1827 19.6632 13.5083 19.7833 12.8436 19.6997C12.2867 19.6297 11.82 19.3563 11.4277 19.0087C11.0415 18.6666 10.6824 18.213 10.3302 17.6925C9.67361 16.722 8.92648 15.342 7.99373 13.603Z" 1271 clip-rule="evenodd" 1272 /> 1273 <svg 1274 xmlns="http://www.w3.org/2000/svg" 1275 width="21" 1276 height="20" 1277 viewBox="0 0 21 20" 1278 fill="none" 1279 ></svg></svg 1280>`,Ot=Z`<svg fill="none" viewBox="0 0 20 20"> 1281 <path 1282 fill="currentColor" 1283 fill-rule="evenodd" 1284 d="M6.76.3a1 1 0 0 1 0 1.4L4.07 4.4h9a1 1 0 1 1 0 2h-9l2.69 2.68a1 1 0 1 1-1.42 1.42L.95 6.09a1 1 0 0 1 0-1.4l4.4-4.4a1 1 0 0 1 1.4 0Zm6.49 9.21a1 1 0 0 1 1.41 0l4.39 4.4a1 1 0 0 1 0 1.4l-4.39 4.4a1 1 0 0 1-1.41-1.42l2.68-2.68h-9a1 1 0 0 1 0-2h9l-2.68-2.68a1 1 0 0 1 0-1.42Z" 1285 clip-rule="evenodd" 1286 /> 1287</svg>
1287`,Mt=Z`<svg width="10" height="10" viewBox="0 0 10 10"> 1288 <path 1289 fill="currentColor" 1290 fill-rule="evenodd" 1291 d="M3.77986 0.566631C4.0589 0.845577 4.0589 1.29784 3.77986 1.57678L3.08261 2.2738H6.34184C6.73647 2.2738 7.05637 2.5936 7.05637 2.98808C7.05637 3.38257 6.73647 3.70237 6.34184 3.70237H3.08261L3.77986 4.39938C4.0589 4.67833 4.0589 5.13059 3.77986 5.40954C3.50082 5.68848 3.04841 5.68848 2.76937 5.40954L0.852346 3.49316C0.573306 3.21421 0.573306 2.76195 0.852346 2.48301L2.76937 0.566631C3.04841 0.287685 3.50082 0.287685 3.77986 0.566631ZM6.22 4.59102C6.49904 4.31208 6.95145 4.31208 7.23049 4.59102L9.14751 6.5074C9.42655 6.78634 9.42655 7.23861 9.14751 7.51755L7.23049 9.43393C6.95145 9.71287 6.49904 9.71287 6.22 9.43393C5.94096 9.15498 5.94096 8.70272 6.22 8.42377L6.91725 7.72676L3.65802 7.72676C3.26339 7.72676 2.94349 7.40696 2.94349 7.01247C2.94349 6.61798 3.26339 6.29819 3.65802 6.29819L6.91725 6.29819L6.22 5.60117C5.94096 5.32223 5.94096 4.86997 6.22 4.59102Z" 1292 clip-rule="evenodd" 1293 /> 1294</svg>`,jt=Z`<svg 1295 width="14" 1296 height="14" 1297 viewBox="0 0 14 14" 1298 fill="none" 1299 xmlns="http://www.w3.org/2000/svg" 1300> 1301 <path 1302 fill-rule="evenodd" 1303 clip-rule="evenodd" 1304 d="M13.7306 3.24213C14.0725 3.58384 14.0725 4.13786 13.7306 4.47957L10.7418 7.46737C10.4 7.80908 9.84581 7.80908 9.50399 7.46737C9.16216 7.12567 9.16216 6.57165 9.50399 6.22994L10.9986 4.73585H5.34082C4.85741 4.73585 4.46553 4.3441 4.46553 3.86085C4.46553 3.3776 4.85741 2.98585 5.34082 2.98585L10.9986 2.98585L9.50399 1.49177C9.16216 1.15006 9.16216 0.596037 9.50399 0.254328C9.84581 -0.0873803 10.4 -0.0873803 10.7418 0.254328L13.7306 3.24213ZM9.52515 10.1352C9.52515 10.6185 9.13327 11.0102 8.64986 11.0102L2.9921 11.0102L4.48669 12.5043C4.82852 12.846 4.82852 13.4001 4.48669 13.7418C4.14487 14.0835 3.59066 14.0835 3.24884 13.7418L0.26003 10.754C0.0958806 10.5899 0.0036621 10.3673 0.00366211 10.1352C0.00366212 9.90318 0.0958806 9.68062 0.26003 9.51652L3.24884 6.52872C3.59066 6.18701 4.14487 6.18701 4.48669 6.52872C4.82851 6.87043 4.82851 7.42445 4.48669 7.76616L2.9921 9.26024L8.64986 9.26024C9.13327 9.26024 9.52515 9.65199 9.52515 10.1352Z" 1305 fill="currentColor" 1306 /> 1307</svg> 1308 1309`,Lt=Z`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"> 1310 <path 1311 fill="currentColor" 1312 fill-rule="evenodd" 1313 clip-rule="evenodd" 1314 d="M8.3071 0.292893C8.69763 0.683417 8.69763 1.31658 8.3071 1.70711L6.41421 3.6H11.3404C13.8368 3.6 16.0533 5.1975 16.8427 7.56588L16.9487 7.88377C17.1233 8.40772 16.8402 8.97404 16.3162 9.14868C15.7923 9.32333 15.226 9.04017 15.0513 8.51623L14.9453 8.19834C14.4281 6.64664 12.976 5.6 11.3404 5.6H6.41421L8.3071 7.49289C8.69763 7.88342 8.69763 8.51658 8.3071 8.90711C7.91658 9.29763 7.28341 9.29763 6.89289 8.90711L3.29289 5.30711C2.90236 4.91658 2.90236 4.28342 3.29289 3.89289L6.89289 0.292893C7.28341 -0.0976311 7.91658 -0.0976311 8.3071 0.292893ZM3.68377 10.8513C4.20771 10.6767 4.77403 10.9598 4.94868 11.4838L5.05464 11.8017C5.57188 13.3534 7.024 14.4 8.65964 14.4L13.5858 14.4L11.6929 12.5071C11.3024 12.1166 11.3024 11.4834 11.6929 11.0929C12.0834 10.7024 12.7166 10.7024 13.1071 11.0929L16.7071 14.6929C17.0976 15.0834 17.0976 15.7166 16.7071 16.1071L13.1071 19.7071C12.7166 20.0976 12.0834 20.0976 11.6929 19.7071C11.3024 19.3166 11.3024 18.6834 11.6929 18.2929L13.5858 16.4L8.65964 16.4C6.16314 16.4 3.94674 14.8025 3.15728 12.4341L3.05131 12.1162C2.87667 11.5923 3.15983 11.026 3.68377 10.8513Z" 1315 /> 1316</svg>`,Dt=Z`<svg fill="none" viewBox="0 0 14 14"> 1317 <path 1318 fill="currentColor" 1319 fill-rule="evenodd" 1320 d="M3.48 2.18a1 1 0 0 1 1.41 0l2.68 2.68a1 1 0 1 1-1.41 1.42l-.98-.98v4.56a1 1 0 0 1-2 0V5.3l-.97.98A1 1 0 0 1 .79 4.86l2.69-2.68Zm6.34 2.93a1 1 0 0 1 1 1v4.56l.97-.98a1 1 0 1 1 1.42 1.42l-2.69 2.68a1 1 0 0 1-1.41 0l-2.68-2.68a1 1 0 0 1 1.41-1.42l.98.98V6.1a1 1 0 0 1 1-1Z" 1321 clip-rule="evenodd" 1322 /> 1323</svg>`,Bt=Z`<svg fill="none" viewBox="0 0 40 40"> 1324 <g clip-path="url(#a)"> 1325 <g clip-path="url(#b)"> 1326 <circle cx="20" cy="19.89" r="20" fill="#5865F2" /> 1327 <path 1328 fill="#fff" 1329 fill-rule="evenodd" 1330 d="M25.71 28.15C30.25 28 32 25.02 32 25.02c0-6.61-2.96-11.98-2.96-11.98-2.96-2.22-5.77-2.15-5.77-2.15l-.29.32c3.5 1.07 5.12 2.61 5.12 2.61a16.75 16.75 0 0 0-10.34-1.93l-.35.04a15.43 15.43 0 0 0-5.88 1.9s1.71-1.63 5.4-2.7l-.2-.24s-2.81-.07-5.77 2.15c0 0-2.96 5.37-2.96 11.98 0 0 1.73 2.98 6.27 3.13l1.37-1.7c-2.6-.79-3.6-2.43-3.6-2.43l.58.35.09.06.08.04.02.01.08.05a17.25 17.25 0 0 0 4.52 1.58 14.4 14.4 0 0 0 8.3-.86c.72-.27 1.52-.66 2.37-1.21 0 0-1.03 1.68-3.72 2.44.61.78 1.35 1.67 1.35 1.67Zm-9.55-9.6c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28.01-1.25-.93-2.28-2.1-2.28Zm7.5 0c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28 0-1.25-.93-2.28-2.1-2.28Z" 1331 clip-rule="evenodd" 1332 /> 1333 </g> 1334 </g>
1335 <defs> 1336 <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath> 1337 <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 1338 </defs> 1339</svg> `,Ut=Z`<svg fill="none" viewBox="0 0 40 40"> 1340 <g clip-path="url(#a)"> 1341 <g clip-path="url(#b)"> 1342 <circle cx="20" cy="19.89" r="20" fill="#5A3E85" /> 1343 <g clip-path="url(#c)"> 1344 <path 1345 fill="#fff" 1346 d="M18.22 25.7 20 23.91h3.34l2.1-2.1v-6.68H15.4v8.78h2.82v1.77Zm3.87-8.16h1.25v3.66H22.1v-3.66Zm-3.34 0H20v3.66h-1.25v-3.66ZM20 7.9a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm6.69 14.56-3.66 3.66h-2.72l-1.77 1.78h-1.88V26.1H13.3v-9.82l.94-2.4H26.7v8.56Z" 1347 /> 1348 </g> 1349 </g> 1350 </g> 1351 <defs> 1352 <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath> 1353 <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 1354 <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath> 1355 </defs> 1356</svg>`,Ft=Z`<svg fill="none" viewBox="0 0 16 16"> 1357 <path 1358 fill="currentColor" 1359 d="m14.36 4.74.01.42c0 4.34-3.3 9.34-9.34 9.34A9.3 9.3 0 0 1 0 13.03a6.6 6.6 0 0 0 4.86-1.36 3.29 3.29 0 0 1-3.07-2.28c.5.1 1 .07 1.48-.06A3.28 3.28 0 0 1 .64 6.11v-.04c.46.26.97.4 1.49.41A3.29 3.29 0 0 1 1.11 2.1a9.32 9.32 0 0 0 6.77 3.43 3.28 3.28 0 0 1 5.6-3 6.59 6.59 0 0 0 2.08-.8 3.3 3.3 0 0 1-1.45 1.82A6.53 6.53 0 0 0 16 3.04c-.44.66-1 1.23-1.64 1.7Z" 1360 /> 1361</svg>`,$t=Z`<svg fill="none" viewBox="0 0 28 28"> 1362 <path 1363 fill="currentColor" 1364 fill-rule="evenodd" 1365 d="M18.1 4.76c-.42-.73-1.33-1.01-2.09-.66l-1.42.66c-.37.18-.8.18-1.18 0l-1.4-.65a1.63 1.63 0 0 0-2.1.66l-.84 1.45c-.2.34-.53.59-.92.67l-1.7.35c-.83.17-1.39.94-1.3 1.78l.19 1.56c.04.39-.08.78-.33 1.07l-1.12 1.3c-.52.6-.52 1.5 0 2.11L5 16.38c.25.3.37.68.33 1.06l-.18 1.57c-.1.83.46 1.6 1.28 1.78l1.7.35c.4.08.73.32.93.66l.84 1.43a1.63 1.63 0 0 0 2.09.66l1.41-.66c.37-.17.8-.17 1.18 0l1.43.67c.76.35 1.66.07 2.08-.65l.86-1.45c.2-.34.54-.58.92-.66l1.68-.35A1.63 1.63 0 0 0 22.84 19l-.18-1.57a1.4 1.4 0 0 1 .33-1.06l1.12-1.32c.52-.6.52-1.5 0-2.11l-1.12-1.3a1.4 1.4 0 0 1-.33-1.07l.18-1.57c.1-.83-.46-1.6-1.28-1.77l-1.68-.35a1.4 1.4 0 0 1-.92-.66l-.86-1.47Zm-3.27-3.2a4.43 4.43 0 0 1 5.69 1.78l.54.93 1.07.22a4.43 4.43 0 0 1 3.5 4.84l-.11.96.7.83a4.43 4.43 0 0 1 .02 5.76l-.72.85.1.96a4.43 4.43 0 0 1-3.5 4.84l-1.06.22-.54.92a4.43 4.43 0 0 1-5.68 1.77l-.84-.4-.82.39a4.43 4.43 0 0 1-5.7-1.79l-.51-.89-1.09-.22a4.43 4.43 0 0 1-3.5-4.84l.1-.96-.72-.85a4.43 4.43 0 0 1 .01-5.76l.71-.83-.1-.95a4.43 4.43 0 0 1 3.5-4.84l1.08-.23.53-.9a4.43 4.43 0 0 1 5.7-1.8l.81.38.83-.39ZM18.2 9.4c.65.42.84 1.28.42 1.93l-4.4 6.87a1.4 1.4 0 0 1-2.26.14L9.5 15.39a1.4 1.4 0 0 1 2.15-1.8l1.23 1.48 3.38-5.26a1.4 1.4 0 0 1 1.93-.42Z" 1366 clip-rule="evenodd" 1367 /> 1368</svg>`,zt=Z`<svg fill="none" viewBox="0 0 14 14"> 1369 <path 1370 fill="currentColor" 1371 fill-rule="evenodd" 1372 d="m4.1 12.43-.45-.78-.93-.2a1.65 1.65 0 0 1-1.31-1.8l.1-.86-.61-.71a1.65 1.65 0 0 1 0-2.16l.6-.7-.09-.85c-.1-.86.47-1.64 1.3-1.81l.94-.2.45-.78A1.65 1.65 0 0 1 6.23.9l.77.36.78-.36c.77-.36 1.69-.07 2.12.66l.47.8.91.2c.84.17 1.4.95 1.31 1.8l-.1.86.6.7c.54.62.54 1.54.01 2.16l-.6.71.09.86c.1.85-.47 1.63-1.3 1.8l-.92.2-.47.79a1.65 1.65 0 0 1-2.12.66L7 12.74l-.77.36c-.78.35-1.7.07-2.13-.67Zm5.74-6.9a1 1 0 1 0-1.68-1.07L6.32 7.3l-.55-.66a1 1 0 0 0-1.54 1.28l1.43 1.71a1 1 0 0 0 1.61-.1l2.57-4Z" 1373 clip-rule="evenodd" 1374 /> 1375</svg>`,Ht=Z` 1376 <svg fill="none" viewBox="0 0 48 44"> 1377 <path 1378 style="fill: var(--wui-color-bg-300);" 1379 d="M4.56 8.64c-1.23 1.68-1.23 4.08-1.23 8.88v8.96c0 4.8 0 7.2 1.23 8.88.39.55.87 1.02 1.41 1.42C7.65 38 10.
137905 38 14.85 38h14.3c4.8 0 7.2 0 8.88-1.22a6.4 6.4 0 0 0 1.41-1.42c.83-1.14 1.1-2.6 1.19-4.92a6.4 6.4 0 0 0 5.16-4.65c.21-.81.21-1.8.21-3.79 0-1.98 0-2.98-.22-3.79a6.4 6.4 0 0 0-5.15-4.65c-.1-2.32-.36-3.78-1.19-4.92a6.4 6.4 0 0 0-1.41-1.42C36.35 6 33.95 6 29.15 6h-14.3c-4.8 0-7.2 0-8.88 1.22a6.4 6.4 0 0 0-1.41 1.42Z" 1380 /> 1381 <path 1382 style="fill: var(--wui-color-fg-200);" 1383 fill-rule="evenodd" 1384 d="M2.27 11.33a6.4 6.4 0 0 1 6.4-6.4h26.66a6.4 6.4 0 0 1 6.4 6.4v1.7a6.4 6.4 0 0 1 5.34 6.3v5.34a6.4 6.4 0 0 1-5.34 6.3v1.7a6.4 6.4 0 0 1-6.4 6.4H8.67a6.4 6.4 0 0 1-6.4-6.4V11.33ZM39.6 31.07h-6.93a9.07 9.07 0 1 1 0-18.14h6.93v-1.6a4.27 4.27 0 0 0-4.27-4.26H8.67a4.27 4.27 0 0 0-4.27 4.26v21.34a4.27 4.27 0 0 0 4.27 4.26h26.66a4.27 4.27 0 0 0 4.27-4.26v-1.6Zm-6.93-16a6.93 6.93 0 0 0 0 13.86h8a4.27 4.27 0 0 0 4.26-4.26v-5.34a4.27 4.27 0 0 0-4.26-4.26h-8Z" 1385 clip-rule="evenodd" 1386 /> 1387 </svg> 1388`,Wt=Z`<svg fill="none" viewBox="0 0 20 20"> 1389 <path 1390 fill="currentColor" 1391 fill-rule="evenodd" 1392 d="M0 5.5c0-1.8 1.46-3.25 3.25-3.25H14.5c1.8 0 3.25 1.46 3.25 3.25v.28A3.25 3.25 0 0 1 20 8.88v2.24c0 1.45-.94 2.68-2.25 3.1v.28c0 1.8-1.46 3.25-3.25 3.25H3.25A3.25 3.25 0 0 1 0 14.5v-9Zm15.75 8.88h-2.38a4.38 4.38 0 0 1 0-8.76h2.38V5.5c0-.69-.56-1.25-1.25-1.25H3.25C2.56 4.25 2 4.81 2 5.5v9c0 .69.56 1.25 1.25 1.25H14.5c.69 0 1.25-.56 1.25-1.25v-.13Zm-2.38-6.76a2.37 2.37 0 1 0 0 4.75h3.38c.69 0 1.25-.55 1.25-1.24V8.87c0-.69-.56-1.24-1.25-1.24h-3.38Z" 1393 clip-rule="evenodd" 1394 /> 1395</svg>`,qt=Z`<svg fill="none" viewBox="0 0 96 67"> 1396 <path 1397 fill="currentColor" 1398 d="M25.32 18.8a32.56 32.56 0 0 1 45.36 0l1.5 1.47c.63.62.63 1.61 0 2.22l-5.15 5.05c-.31.3-.82.3-1.14 0l-2.07-2.03a22.71 22.71 0 0 0-31.64 0l-2.22 2.18c-.31.3-.82.3-1.14 0l-5.15-5.05a1.55 1.55 0 0 1 0-2.22l1.65-1.62Zm56.02 10.44 4.59 4.5c.63.6.63 1.6 0 2.21l-20.7 20.26c-.62.61-1.63.61-2.26 0L48.28 41.83a.4.4 0 0 0-.56 0L33.03 56.21c-.63.61-1.64.61-2.27 0L10.07 35.95a1.55 1.55 0 0 1 0-2.22l4.59-4.5a1.63 1.63 0 0 1 2.27 0L31.6 43.63a.4.4 0 0 0 .57 0l14.69-14.38a1.63 1.63 0 0 1 2.26 0l14.69 14.38a.4.4 0 0 0 .57 0l14.68-14.38a1.63 1.63 0 0 1 2.27 0Z" 1399 /> 1400 <path 1401 stroke="#000" 1402 stroke-opacity=".1" 1403 d="M25.67 19.15a32.06 32.06 0 0 1 44.66 0l1.5 1.48c.43.42.43 1.09 0 1.5l-5.15 5.05a.31.31 0 0 1-.44 0l-2.07-2.03a23.21 23.21 0 0 0-32.34 0l-2.22 2.18a.31.31 0 0 1-.44 0l-5.15-5.05a1.05 1.05 0 0 1 0-1.5l1.65-1.63ZM81 29.6l4.6 4.5c.42.41.42 1.09 0 1.5l-20.7 20.26c-.43.43-1.14.43-1.57 0L48.63 41.47a.9.9 0 0 0-1.26 0L32.68 55.85c-.43.43-1.14.43-1.57 0L10.42 35.6a1.05 1.05 0 0 1 0-1.5l4.59-4.5a1.13 1.13 0 0 1 1.57 0l14.68 14.38a.9.9 0 0 0 1.27 0l-.35-.35.35.35L47.22 29.6a1.13 1.13 0 0 1 1.56 0l14.7 14.38a.9.9 0 0 0 1.26 0L79.42 29.6a1.13 1.13 0 0 1 1.57 0Z" 1404 /> 1405</svg>`,Vt=Z`<svg fill="none" viewBox="0 0 20 20"> 1406 <path 1407 fill="currentColor" 1408 d="M11 6.67a1 1 0 1 0-2 0v2.66a1 1 0 0 0 2 0V6.67ZM10 14.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" 1409 /> 1410 <path 1411 fill="currentColor" 1412 fill-rule="evenodd" 1413 d="M10 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm-7 9a7 7 0 1 1 14 0 7 7 0 0 1-14 0Z" 1414 clip-rule="evenodd" 1415 /> 1416</svg>`,Gt=Z`<svg 1417 xmlns="http://www.w3.org/2000/svg" 1418 width="28" 1419 height="28" 1420 viewBox="0 0 28 28" 1421 fill="none"> 1422 <path 1423 fill="#949E9E" 1424 fill-rule="evenodd" 1425 d="M7.974 2.975h12.052c1.248 0 2.296 0 3.143.092.89.096 1.723.307 2.461.844a4.9 4.9 0 0 1 1.084 1.084c.537.738.748 1.57.844 2.461.092.847.092 1.895.092 3.143v6.802c0 1.248 0 2.296-.092 3.143-.096.89-.307 1.723-.844 2.461a4.9 4.9 0 0 1-1.084 1.084c-.738.537-1.57.748-2.461.844-.847.092-1.895.092-3.143.092H7.974c-1.247 0-2.296 0-3.143-.092-.89-.096-1.723-.307-2.461-.844a4.901 4.901 0 0 1-1.084-1.084c-.537-.738-.748-1.571-.844-2.461C.35 19.697.35 18.649.35 17.4v-6.802c0-1.248 0-2.296.092-3.143.096-.89.307-1.723.844-2.461A4.9 4.9 0 0 1 2.37 3.91c.738-.537 1.571-.748 2.461-.844.847-.092 1.895-.092 3.143-.092ZM5.133 5.85c-.652.071-.936.194-1.117.326a2.1 2.1 0 0 0-.465.465c-.132.181-.255.465-.325 1.117-.074.678-.076 1.573-.076 2.917v6.65c0 1.344.002 2.239.076 2.917.07.652.193.936.325 1.117a2.1 2.1 0 0 0 .465.465c.181.132.465.255 1.117.326.678.073 1.574.075 2.917.075h11.9c1.344 0 2.239-.002 2.917-.075.652-.071.936-.194 1.117-.326.179-.13.335-.286.465-.465.132-.181.255-.465.326-1.117.073-.678.075-1.573.075-2.917v-6.65c0-1.344-.002-2.239-.075-2.917-.071-.652-.194-.936-.326-1.117a2.1 2.1 0 0 0-.465-.465c-.181-.132-.465-.255-1.117-.326-.678-.073-1.573-.075-2.917-.075H8.05c-1.343 0-2.239.002-2.917.075Zm.467 7.275a3.15 3.15 0 1 1 6.3 0 3.15 3.15 0 0 1-6.3 0Zm8.75-1.75a1.4 1.4 0 0 1 1.4-1.4h3.5a1.4 1.4 0 0 1 0 2.8h-3.5a1.4 1.4 0 0 1-1.4-1.4Zm0 5.25a1.4 1.4 0 0 1 1.4-1.4H21a1.4 1.4 0 1 1 0 2.8h-5.25a1.4 1.4 0 0 1-1.4-1.4Z" 1426 clip-rule="evenodd"/> 1427</svg>`,Kt=Z`<svg fill="none" viewBox="0 0 41 40"> 1428 <g clip-path="url(#a)"> 1429 <path fill="#000" d="M.8 0h40v40H.8z" /> 1430 <path 1431 fill="#fff" 1432 d="m22.63 18.46 7.14-8.3h-1.69l-6.2 7.2-4.96-7.2H11.2l7.5 10.9-7.5 8.71h1.7l6.55-7.61 5.23 7.61h5.72l-7.77-11.31Zm-9.13-7.03h2.6l11.98 17.13h-2.6L13.5 11.43Z" 1433 /> 1434 </g>
1435 <defs> 1436 <clipPath id="a"><path fill="#fff" d="M.8 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z" /></clipPath> 1437 </defs> 1438</svg>`;var Zt=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};const Yt={add:Le,allWallets:De,arrowBottomCircle:Be,appStore:Ue,apple:Fe,arrowBottom:$e,arrowLeft:ze,arrowRight:He,arrowTop:We,bank:qe,browser:Ve,card:Ge,checkmark:Ze,checkmarkBold:Ke,chevronBottom:Ye,chevronLeft:Qe,chevronRight:Je,chevronTop:Xe,chromeStore:et,clock:tt,close:nt,compass:it,coinPlaceholder:rt,copy:st,cursor:ot,cursorTransparent:at,desktop:ct,disconnect:lt,discord:ut,etherscan:dt,extension:ht,externalLink:pt,facebook:ft,filters:mt,github:gt,google:yt,helpCircle:vt,id:Gt,infoCircle:wt,mail:bt,mobile:xt,more:Et,networkPlaceholder:_t,nftPlaceholder:kt,off:Ct,playStore:At,plus:St,qrCode:It,recycleHorizontal:Tt,refresh:Pt,search:Nt,send:Rt,swapHorizontal:Ot,swapHorizontalMedium:jt,swapHorizontalBold:Mt,swapHorizontalRoundedBold:Lt,swapVertical:Dt,telegram:Bt,twitch:Ut,twitter:Kt,twitterIcon:Ft,verify:$t,verifyFilled:zt,wallet:Wt,walletConnect:qt,walletPlaceholder:Ht,warningCircle:Vt,x:Kt};let Qt=class extends pe{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300"}render(){return this.style.cssText=`\n --local-color: var(--wui-color-${this.color});\n --local-width: var(--wui-icon-size-${this.size});\n `,K`${Yt[this.name]}`}};Qt.styles=[Ce,Se,je],Zt([Oe()],Qt.prototype,"size",void 0),Zt([Oe()],Qt.prototype,"name",void 0),Zt([Oe()],Qt.prototype,"color",void 0),Qt=Zt([Ie("wui-icon")],Qt);const Jt=l` 1439 :host { 1440 display: block; 1441 width: var(--local-width); 1442 height: var(--local-height); 1443 } 1444 1445 img { 1446 display: block; 1447 width: 100%; 1448 height: 100%; 1449 object-fit: cover; 1450 object-position: center center; 1451 border-radius: inherit; 1452 } 1453`;var Xt=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let en=class extends pe{constructor(){super(...arguments),this.src="./path/to/image.jpg",this.alt="Image",this.size=void 0}render(){return this.style.cssText=`\n --local-width: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"};\n --local-height: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"};\n `,K`<img src=${this.src} alt=${this.alt} />`}};en.styles=[Ce,Se,Jt],Xt([Oe()],en.prototype,"src",void 0),Xt([Oe()],en.prototype,"alt",void 0),Xt([Oe()],en.prototype,"size",void 0),en=Xt([Ie("wui-image")],en);const tn=l` 1454 :host { 1455 display: block; 1456 width: var(--wui-box-size-lg); 1457 height: var(--wui-box-size-lg); 1458 } 1459 1460 svg { 1461 width: var(--wui-box-size-lg); 1462 height: var(--wui-box-size-lg); 1463 fill: none; 1464 stroke: transparent; 1465 stroke-linecap: round; 1466 } 1467 1468 use { 1469 stroke: var(--wui-color-accent-100); 1470 stroke-width: 2px; 1471 stroke-dasharray: 54, 118; 1472 stroke-dashoffset: 172; 1473 animation: dash 1s linear infinite; 1474 } 1475 1476 @keyframes dash { 1477 to { 1478 stroke-dashoffset: 0px; 1479 } 1480 } 1481`;var nn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let rn=class extends pe{render(){return K` 1482 <svg viewBox="0 0 54 59"> 1483 <path 1484 id="wui-loader-path" 1485 d="M17.22 5.295c3.877-2.277 5.737-3.363 7.72-3.726a11.44 11.44 0 0 1 4.12 0c1.983.363 3.844 1.45 7.72 3.726l6.065 3.562c3.876 2.276 5.731 3.372 7.032 4.938a11.896 11.896 0 0 1 2.06 3.63c.683 1.928.688 4.11.688 8.663v7.124c0 4.553-.005 6.735-.688 8.664a11.896 11.896 0 0 1-2.06 3.63c-1.3 1.565-3.156 2.66-7.032 4.937l-6.065 3.563c-3.877 2.276-5.737 3.362-7.72 3.725a11.46 11.46 0 0 1-4.12 0c-1.983-.363-3.844-1.449-7.72-3.726l-6.065-3.562c-3.876-2.276-5.731-3.372-7.032-4.938a11.885 11.885 0 0 1-2.06-3.63c-.682-1.928-.688-4.11-.688-8.663v-7.124c0-4.553.006-6.735.688-8.664a11.885 11.885 0 0 1 2.06-3.63c1.3-1.565 3.156-2.66 7.032-4.937l6.065-3.562Z" 1486 /> 1487 <use xlink:href="#wui-loader-path"></use> 1488 </svg> 1489 `}};rn.styles=[Ce,tn],rn=nn([Ie("wui-loading-hexagon")],rn);const sn=l` 1490 :host { 1491 display: flex; 1492 } 1493 1494 :host([data-size='sm']) > svg { 1495 width: 12px; 1496 height: 12px; 1497 } 1498 1499 :host([data-size='md']) > svg { 1500 width: 16px; 1501 height: 16px; 1502 } 1503 1504 :host([data-size='lg']) > svg { 1505 width: 24px; 1506 height: 24px; 1507 } 1508 1509 :host([data-size='xl']) > svg { 1510 width: 32px; 1511 height: 32px; 1512 } 1513 1514 svg { 1515 animation: rotate 2s linear infinite; 1516 } 1517 1518 circle { 1519 fill: none; 1520 stroke: var(--local-color); 1521 stroke-width: 4px; 1522 stroke-dasharray: 1, 124; 1523 stroke-dashoffset: 0; 1524 stroke-linecap: round; 1525 animation: dash 1.5s ease-in-out infinite; 1526 } 1527 1528 :host([data-size='md']) > svg > circle { 1529 stroke-width: 6px; 1530 } 1531 1532 :host([data-size='sm']) > svg > circle { 1533 stroke-width: 8px; 1534 } 1535 1536 @keyframes rotate { 1537 100% { 1538 transform: rotate(360deg); 1539 } 1540 } 1541 1542 @keyframes dash { 1543 0% { 1544 stroke-dasharray: 1, 124; 1545 stroke-dashoffset: 0; 1546 } 1547 1548 50% { 1549 stroke-dasharray: 90, 124; 1550 stroke-dashoffset: -35; 1551 } 1552 1553 100% { 1554 stroke-dashoffset: -125; 1555 } 1556 } 1557`;var on=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let an=class extends pe{constructor(){super(...arguments),this.color="accent-100",this.size="lg"}render(){return this.style.cssText="--local-color: "+("inherit"===this.color?"inherit":`var(--wui-color-${this.color})`),this.dataset.size=this.size,K`<svg viewBox="25 25 50 50"> 1558 <circle r="20" cy="50" cx="50"></circle> 1559 </svg>`}};an.styles=[Ce,sn],on([Oe()],an.prototype,"color",void 0),on([Oe()],an.prototype,"size",void 0),an=on([Ie("wui-loading-spinner")],an);const cn=l` 1560 :host { 1561 display: block; 1562 width: var(--wui-box-size-md); 1563 height: var(--wui-box-size-md); 1564 } 1565 1566 svg { 1567 width: var(--wui-box-size-md); 1568 height: var(--wui-box-size-md); 1569 } 1570 1571 rect { 1572 fill: none; 1573 stroke: var(--wui-color-accent-100); 1574 stroke-width: 4px; 1575 stroke-linecap: round; 1576 animation: dash 1s linear infinite; 1577 } 1578 1579 @keyframes dash { 1580 to { 1581 stroke-dashoffset: 0px; 1582 } 1583 } 1584`;var ln=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let un=class extends pe{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const e=this.radius>50?50:this.radius,t=36-e;return K` 1585 <svg viewBox="0 0 110 110" width="110" height="110"> 1586 <rect 1587 x="2" 1588 y="2" 1589 width="106" 1590 height="106" 1591 rx=${e} 1592 stroke-dasharray="${116+t} ${245+t}" 1593 stroke-dashoffset=${360+1.75*t} 1594 /> 1595 </svg> 1596 `}};un.styles=[Ce,cn],ln([Oe({type:Number})],un.prototype,"radius",void 0),un=ln([Ie("wui-loading-thumbnail")],un);const dn=l` 1597 :host { 1598 display: block; 1599 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 1600 background: linear-gradient( 1601 120deg, 1602 var(--wui-color-bg-200) 5%, 1603 var(--wui-color-bg-200) 48%, 1604 var(--wui-color-bg-300) 55%, 1605 var(--wui-color-bg-300) 60%, 1606 var(--wui-color-bg-300) calc(60% + 10px), 1607 var(--wui-color-bg-200) calc(60% + 12px), 1608 var(--wui-color-bg-200) 100% 1609 ); 1610 background-size: 250%; 1611 animation: shimmer 3s linear infinite reverse; 1612 } 1613 1614 :host([variant='light']) { 1615 background: linear-gradient( 1616 120deg, 1617 var(--wui-color-bg-150) 5%, 1618 var(--wui-color-bg-150) 48%, 1619 var(--wui-color-bg-200) 55%, 1620 var(--wui-color-bg-200) 60%, 1621 var(--wui-color-bg-200) calc(60% + 10px), 1622 var(--wui-color-bg-150) calc(60% + 12px), 1623 var(--wui-color-bg-150) 100% 1624 ); 1625 background-size: 250%; 1626 } 1627 1628 @keyframes shimmer { 1629 from { 1630 background-position: -250% 0; 1631 } 1632 to { 1633 background-position: 250% 0; 1634 } 1635 } 1636`;var hn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let pn=class extends pe{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m",this.variant="default"}render(){return this.style.cssText=`\n width: ${this.width};\n height: ${this.height};\n border-radius: clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px);\n `,K`<slot></slot>`}};pn.styles=[dn],hn([Oe()],pn.prototype,"width",void 0),hn([Oe()],pn.prototype,"height",void 0),hn([Oe()],pn.prototype,"borderRadius",void 0),hn([Oe()],pn.prototype,"variant",void 0),pn=hn([Ie("wui-shimmer")],pn);
1636const fn=1,mn=2,gn=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return{_$litDirective$:e,values:n}};class yn{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const vn=gn(class extends yn{constructor(e){if(super(e),e.type!==fn||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,t){let[n]=t;if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in n)n[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(n)}const r=e.element.classList;for(const i of this.st)i in n||(r.remove(i),this.st.delete(i));for(const i in n){const e=!!n[i];e===this.st.has(i)||this.nt?.has(i)||(e?(r.add(i),this.st.add(i)):(r.remove(i),this.st.delete(i)))}return Y}}),wn=l` 1637 :host { 1638 display: inline-flex !important; 1639 } 1640 1641 slot { 1642 width: 100%; 1643 display: inline-block; 1644 font-style: normal; 1645 font-family: var(--wui-font-family); 1646 font-feature-settings: 1647 'tnum' on, 1648 'lnum' on, 1649 'case' on; 1650 line-height: 130%; 1651 font-weight: var(--wui-font-weight-regular); 1652 overflow: inherit; 1653 text-overflow: inherit; 1654 text-align: var(--local-align); 1655 color: var(--local-color); 1656 } 1657 1658 .wui-font-medium-400 { 1659 font-size: var(--wui-font-size-medium); 1660 font-weight: var(--wui-font-weight-light); 1661 letter-spacing: var(--wui-letter-spacing-medium); 1662 } 1663 1664 .wui-font-medium-600 { 1665 font-size: var(--wui-font-size-medium); 1666 letter-spacing: var(--wui-letter-spacing-medium); 1667 } 1668 1669 .wui-font-medium-title-600 { 1670 font-size: var(--wui-font-size-medium-title); 1671 letter-spacing: var(--wui-letter-spacing-medium-title); 1672 } 1673 1674 .wui-font-mini-700 { 1675 font-size: var(--wui-font-size-mini); 1676 letter-spacing: var(--wui-letter-spacing-mini); 1677 text-transform: uppercase; 1678 } 1679 1680 .wui-font-large-500, 1681 .wui-font-large-600, 1682 .wui-font-large-700 { 1683 font-size: var(--wui-font-size-large); 1684 letter-spacing: var(--wui-letter-spacing-large); 1685 } 1686 1687 .wui-font-2xl-500, 1688 .wui-font-2xl-600, 1689 .wui-font-2xl-700 { 1690 font-size: var(--wui-font-size-2xl); 1691 letter-spacing: var(--wui-letter-spacing-2xl); 1692 } 1693 1694 .wui-font-paragraph-400, 1695 .wui-font-paragraph-500, 1696 .wui-font-paragraph-600, 1697 .wui-font-paragraph-700 { 1698 font-size: var(--wui-font-size-paragraph); 1699 letter-spacing: var(--wui-letter-spacing-paragraph); 1700 } 1701 1702 .wui-font-small-400, 1703 .wui-font-small-500, 1704 .wui-font-small-600 { 1705 font-size: var(--wui-font-size-small); 1706 letter-spacing: var(--wui-letter-spacing-small); 1707 } 1708 1709 .wui-font-tiny-400, 1710 .wui-font-tiny-500, 1711 .wui-font-tiny-600 { 1712 font-size: var(--wui-font-size-tiny); 1713 letter-spacing: var(--wui-letter-spacing-tiny); 1714 } 1715 1716 .wui-font-micro-700, 1717 .wui-font-micro-600 { 1718 font-size: var(--wui-font-size-micro); 1719 letter-spacing: var(--wui-letter-spacing-micro); 1720 text-transform: uppercase; 1721 } 1722 1723 .wui-font-tiny-400, 1724 .wui-font-small-400, 1725 .wui-font-paragraph-400 { 1726 font-weight: var(--wui-font-weight-light); 1727 } 1728 1729 .wui-font-large-700, 1730 .wui-font-paragraph-700, 1731 .wui-font-micro-700, 1732 .wui-font-mini-700 { 1733 font-weight: var(--wui-font-weight-bold); 1734 } 1735 1736 .wui-font-medium-600, 1737 .wui-font-medium-title-600, 1738 .wui-font-large-600, 1739 .wui-font-paragraph-600, 1740 .wui-font-small-600, 1741 .wui-font-tiny-600, 1742 .wui-font-micro-600 { 1743 font-weight: var(--wui-font-weight-medium); 1744 } 1745`;var bn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let xn=class extends pe{constructor(){super(...arguments),this.variant="paragraph-500",this.color="fg-300",this.align="left"}render(){const e={[`wui-font-${this.variant}`]:!0,[`wui-color-${this.color}`]:!0}
1745;return this.style.cssText=`\n --local-align: ${this.align};\n --local-color: var(--wui-color-${this.color});\n `,K`<slot class=${vn(e)}></slot>`}};xn.styles=[Ce,wn],bn([Oe()],xn.prototype,"variant",void 0),bn([Oe()],xn.prototype,"color",void 0),bn([Oe()],xn.prototype,"align",void 0),xn=bn([Ie("wui-text")],xn);const En=Z`<svg fill="none" viewBox="0 0 60 60"> 1746 <rect width="60" height="60" fill="#1DC956" rx="30" /> 1747 <circle cx="30" cy="30" r="3" fill="#fff" /> 1748 <path 1749 fill="#2BEE6C" 1750 stroke="#fff" 1751 stroke-width="2" 1752 d="m45.32 17.9-.88-.42.88.42.02-.05c.1-.2.21-.44.26-.7l-.82-.15.82.16a2 2 0 0 0-.24-1.4c-.13-.23-.32-.42-.47-.57a8.42 8.42 0 0 1-.04-.04l-.04-.04a2.9 2.9 0 0 0-.56-.47l-.51.86.5-.86a2 2 0 0 0-1.4-.24c-.26.05-.5.16-.69.26l-.05.02-15.05 7.25-.1.05c-1.14.55-1.85.89-2.46 1.37a7 7 0 0 0-1.13 1.14c-.5.6-.83 1.32-1.38 2.45l-.05.11-7.25 15.05-.02.05c-.1.2-.21.43-.26.69a2 2 0 0 0 .24 1.4l.85-.5-.85.5c.13.23.32.42.47.57l.04.04.04.04c.15.15.34.34.56.47a2 2 0 0 0 1.41.24l-.2-.98.2.98c.25-.05.5-.17.69-.26l.05-.02-.42-.87.42.87 15.05-7.25.1-.05c1.14-.55 1.85-.89 2.46-1.38a7 7 0 0 0 1.13-1.13 12.87 12.87 0 0 0 1.43-2.56l7.25-15.05Z" 1753 /> 1754 <path 1755 fill="#1DC956" 1756 d="M33.38 32.72 30.7 29.3 15.86 44.14l.2.2a1 1 0 0 0 1.14.2l15.1-7.27a3 3 0 0 0 1.08-4.55Z" 1757 /> 1758 <path 1759 fill="#86F999" 1760 d="m26.62 27.28 2.67 3.43 14.85-14.85-.2-.2a1 1 0 0 0-1.14-.2l-15.1 7.27a3 3 0 0 0-1.08 4.55Z" 1761 /> 1762 <circle cx="30" cy="30" r="3" fill="#fff" transform="rotate(45 30 30)" /> 1763 <rect width="59" height="59" x=".5" y=".5" stroke="#062B2B" stroke-opacity=".1" rx="29.5" /> 1764</svg> `,_n=Z`<svg viewBox="0 0 60 60" fill="none"> 1765 <g clip-path="url(#clip0_7734_50402)"> 1766 <path 1767 d="M0 24.9C0 15.6485 0 11.0228 1.97053 7.56812C3.3015 5.23468 5.23468 3.3015 7.56812 1.97053C11.0228 0 15.6485 0 24.9 0H35.1C44.3514 0 48.9772 0 52.4319 1.97053C54.7653 3.3015 56.6985 5.23468 58.0295 7.56812C60 11.0228 60 15.6485 60 24.9V35.1C60 44.3514 60 48.9772 58.0295 52.4319C56.6985 54.7653 54.7653 56.6985 52.4319 58.0295C48.9772 60 44.3514 60 35.1 60H24.9C15.6485 60 11.0228 60 7.56812 58.0295C5.23468 56.6985 3.3015 54.7653 1.97053 52.4319C0 48.9772 0 44.3514 0 35.1V24.9Z" 1768 fill="#EB8B47" 1769 /> 1770 <path 1771 d="M0.5 24.9C0.5 20.2652 0.50047 16.8221 0.744315 14.105C0.987552 11.3946 1.46987 9.45504 2.40484 7.81585C3.69145 5.56019 5.56019 3.69145 7.81585 2.40484C9.45504 1.46987 11.3946 0.987552 14.105 0.744315C16.8221 0.50047 20.2652 0.5 24.9 0.5H35.1C39.7348 0.5 43.1779 0.50047 45.895 0.744315C48.6054 0.987552 50.545 1.46987 52.1841 2.40484C54.4398 3.69145 56.3086 5.56019 57.5952 7.81585C58.5301 9.45504 59.0124 11.3946 59.2557 14.105C59.4995 16.8221 59.5 20.2652 59.5 24.9V35.1C59.5 39.7348 59.4995 43.1779 59.2557 45.895C59.0124 48.6054 58.5301 50.545 57.5952 52.1841C56.3086 54.4398 54.4398 56.3086 52.1841 57.5952C50.545 58.5301 48.6054 59.0124 45.895 59.2557C43.1779 59.4995 39.7348 59.5 35.1 59.5H24.9C20.2652 59.5 16.8221 59.4995 14.105 59.2557C11.3946 59.0124 9.45504 58.5301 7.81585 57.5952C5.56019 56.3086 3.69145 54.4398 2.40484 52.1841C1.46987 50.545 0.987552 48.6054 0.744315 45.895C0.50047 43.1779 0.5 39.7348 0.5 35.1V24.9Z" 1772 stroke="#062B2B" 1773 stroke-opacity="0.1" 1774 /> 1775 <path 1776 d="M19 52C24.5228 52 29 47.5228 29 42C29 36.4772 24.5228 32 19 32C13.4772 32 9 36.4772 9 42C9 47.5228 13.4772 52 19 52Z" 1777 fill="#FF974C" 1778 stroke="white" 1779 stroke-width="2" 1780 /> 1781 <path 1782 fill-rule="evenodd" 1783 clip-rule="evenodd" 1784 d="M42.8437 8.3264C42.4507 7.70891 41.5493 7.70891 41.1564 8.32641L28.978 27.4638C28.5544 28.1295 29.0326 29.0007 29.8217 29.0007H54.1783C54.9674 29.0007 55.4456 28.1295 55.022 27.4638L42.8437 8.3264Z" 1785 fill="white" 1786 /> 1787 <path 1788 fill-rule="evenodd" 1789 clip-rule="evenodd" 1790 d="M42.3348 11.6456C42.659 11.7608 42.9061 12.1492 43.4005 12.926L50.7332 24.4488C51.2952 25.332 51.5763 25.7737 51.5254 26.1382C51.4915 26.3808 51.3698 26.6026 51.1833 26.7614C50.9031 27 50.3796 27 49.3327 27H34.6673C33.6204 27 33.0969 27 32.8167 26.7614C32.6302 26.6026 32.5085 26.3808 32.4746 26.1382C32.4237 25.7737 32.7048 25.332 33.2669 24.4488L40.5995 12.926C41.0939 12.1492 41.341 11.7608 41.6652 11.6456C41.8818 11.5687 42.1182 11.5687 42.3348 11.6456ZM35.0001 26.999C38.8661 26.999 42.0001 23.865 42.0001 19.999C42.0001 23.865 45.1341 26.999 49.0001 26.999H35.0001Z" 1791 fill="#FF974C" 1792 /> 1793 <path 1794 d="M10.1061 9.35712C9.9973 9.67775 9.99867 10.0388 9.99978 10.3323C9.99989 10.3611 10 10.3893 10 10.4167V25.5833C10 25.6107 9.99989 25.6389 9.99978 25.6677C9.99867 25.9612 9.9973 26.3222 10.1061 26.6429C10.306 27.2317 10.7683 27.694 11.3571 27.8939C11.6777 28.0027 12.0388 28.0013 12.3323 28.0002C12.3611 28.0001 12.3893 28 12.4167 28H19C24.5228 28 29 23.5228 29 18C29 12.4772 24.5228 8 19 8H12.4167C12.3893 8 12.3611 7.99989 12.3323 7.99978C12.0388 7.99867 11.6778 7.9973 11.3571 8.10614C10.7683 8.306 10.306 8.76834 10.1061 9.35712Z" 1795 fill="#FF974C" 1796 stroke="white" 1797 stroke-width="2" 1798 /> 1799 <circle cx="19" cy="18" r="4" fill="#EB8B47" stroke="white" stroke-width="2" /> 1800 <circle cx="19" cy="42" r="4" fill="#EB8B47" stroke="white" stroke-width="2" /> 1801 </g>
1802 <defs> 1803 <clipPath id="clip0_7734_50402"> 1804 <rect width="60" height="60" fill="white" /> 1805 </clipPath> 1806 </defs> 1807</svg> `,kn=Z`<svg fill="none" viewBox="0 0 60 60"> 1808 <g clip-path="url(#a)"> 1809 <path 1810 fill="#1DC956" 1811 d="M0 25.01c0-9.25 0-13.88 1.97-17.33a15 15 0 0 1 5.6-5.6C11.02.11 15.65.11 24.9.11h10.2c9.25 0 13.88 0 17.33 1.97a15 15 0 0 1 5.6 5.6C60 11.13 60 15.76 60 25v10.2c0 9.25 0 13.88-1.97 17.33a15 15 0 0 1-5.6 5.6c-3.45 1.97-8.08 1.97-17.33 1.97H24.9c-9.25 0-13.88 0-17.33-1.97a15 15 0 0 1-5.6-5.6C0 49.1 0 44.46 0 35.21v-10.2Z" 1812 /> 1813 <path 1814 fill="#2BEE6C" 1815 d="M16.1 60c-3.82-.18-6.4-.64-8.53-1.86a15 15 0 0 1-5.6-5.6C.55 50.06.16 46.97.04 41.98L4.2 40.6a4 4 0 0 0 2.48-2.39l4.65-12.4a2 2 0 0 1 2.5-1.2l2.53.84a2 2 0 0 0 2.43-1l2.96-5.94a2 2 0 0 1 3.7.32l3.78 12.58a2 2 0 0 0 3.03 1.09l3.34-2.23a2 2 0 0 0 .65-.7l5.3-9.72a2 2 0 0 1 1.42-1.01l4.14-.69a2 2 0 0 1 1.6.44l3.9 3.24a2 2 0 0 0 2.7-.12l4.62-4.63c.08 2.2.08 4.8.08 7.93v10.2c0 9.25 0 13.88-1.97 17.33a15 15 0 0 1-5.6 5.6c-2.13 1.22-4.7 1.68-8.54 1.86H16.11Z" 1816 /> 1817 <path 1818 fill="#fff" 1819 d="m.07 43.03-.05-2.1 3.85-1.28a3 3 0 0 0 1.86-1.79l4.66-12.4a3 3 0 0 1 3.75-1.8l2.53.84a1 1 0 0 0 1.21-.5l2.97-5.94a3 3 0 0 1 5.56.48l3.77 12.58a1 1 0 0 0 1.51.55l3.34-2.23a1 1 0 0 0 .33-.35l5.3-9.71a3 3 0 0 1 2.14-1.53l4.13-.69a3 3 0 0 1 2.41.66l3.9 3.24a1 1 0 0 0 1.34-.06l5.28-5.28c.05.85.08 1.75.1 2.73L56 22.41a3 3 0 0 1-4.04.19l-3.9-3.25a1 1 0 0 0-.8-.21l-4.13.69a1 1 0 0 0-.72.5l-5.3 9.72a3 3 0 0 1-.97 1.05l-3.34 2.23a3 3 0 0 1-4.53-1.63l-3.78-12.58a1 1 0 0 0-1.85-.16l-2.97 5.94a3 3 0 0 1-3.63 1.5l-2.53-.84a1 1 0 0 0-1.25.6l-4.65 12.4a5 5 0 0 1-3.1 3L.07 43.02Z" 1820 /> 1821 <path 1822 fill="#fff" 1823 fill-rule="evenodd" 1824 d="M49.5 19a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z" 1825 clip-rule="evenodd" 1826 /> 1827 <path fill="#fff" d="M45 .28v59.66l-2 .1V.19c.7.02 1.37.05 2 .1Z" /> 1828 <path fill="#2BEE6C" d="M47.5 19a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" /> 1829 <path 1830 stroke="#fff" 1831 stroke-opacity=".1" 1832 d="M.5 25.01c0-4.63 0-8.08.24-10.8.25-2.7.73-4.64 1.66-6.28a14.5 14.5 0 0 1 5.42-5.41C9.46 1.58 11.39 1.1 14.1.85A133 133 0 0 1 24.9.61h10.2c4.63 0 8.08 0 10.8.24 2.7.25 4.65.73 6.28 1.67a14.5 14.5 0 0 1 5.42 5.4c.93 1.65 1.41 3.58 1.66 6.3.24 2.71.24 6.16.24 10.79v10.2c0 4.64 0 8.08-.24 10.8-.25 2.7-.73 4.65-1.66 6.28a14.5 14.5 0 0 1-5.42 5.42c-1.63.93-3.57 1.41-6.28 1.66-2.72.24-6.17.24-10.8.24H24.9c-4.63 0-8.08 0-10.8-.24-2.7-.25-4.64-.73-6.28-1.66a14.5 14.5 0 0 1-5.42-5.42C1.47 50.66 1 48.72.74 46.01A133 133 0 0 1 .5 35.2v-10.2Z" 1833 /> 1834 </g> 1835 <defs> 1836 <clipPath id="a"><path fill="#fff" d="M0 0h60v60H0z" /></clipPath> 1837 </defs> 1838</svg>`,Cn=Z`<svg fill="none" viewBox="0 0 60 60"> 1839 <g clip-path="url(#a)"> 1840 <rect width="60" height="60" fill="#C653C6" rx="30" /> 1841 <path 1842 fill="#E87DE8" 1843 d="M57.98.01v19.5a4.09 4.09 0 0 0-2.63 2.29L50.7 34.2a2 2 0 0 1-2.5 1.2l-2.53-.84a2 2 0 0 0-2.42 1l-2.97 5.94a2 2 0 0 1-3.7-.32L32.8 28.6a2 2 0 0 0-3.02-1.09l-3.35 2.23a2 2 0 0 0-.64.7l-5.3 9.72a2 2 0 0 1-1.43 1.01l-4.13.69a2 2 0 0 1-1.61-.44l-3.9-3.24a2 2 0 0 0-2.69.12L2.1 42.93.02 43V.01h57.96Z" 1844 /> 1845 <path 1846 fill="#fff" 1847 d="m61.95 16.94.05 2.1-3.85 1.28a3 3 0 0 0-1.86 1.79l-4.65 12.4a3 3 0 0 1-3.76 1.8l-2.53-.84a1 1 0 0 0-1.2.5l-2.98 5.94a3 3 0 0 1-5.55-.48l-3.78-12.58a1 1 0 0 0-1.5-.55l-3.35 2.23a1 1 0 0 0-.32.35l-5.3 9.72a3 3 0 0 1-2.14 1.52l-4.14.69a3 3 0 0 1-2.41-.66l-3.9-3.24a1 1 0 0 0-1.34.06l-5.28 5.28c-.05-.84-.08-1.75-.1-2.73l3.97-3.96a3 3 0 0 1 4.04-.19l3.89 3.25a1 1 0 0 0 .8.21l4.14-.68a1 1 0 0 0 .71-.51l5.3-9.71a3 3 0 0 1 .97-1.06l3.34-2.23a3 3 0 0 1 4.54 1.63l3.77 12.58a1 1 0 0 0 1.86.16l2.96-5.93a3 3 0 0 1 3.64-1.5l2.52.83a1 1 0 0 0 1.25-.6l4.66-12.4a5 5 0 0 1 3.1-2.99l4.43-1.48Z" 1848 /> 1849 <path 1850 fill="#fff" 1851 fill-rule="evenodd" 1852 d="M35.5 27a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z" 1853 clip-rule="evenodd" 1854 /> 1855 <path fill="#fff" d="M31 0v60h-2V0h2Z" /> 1856 <path fill="#E87DE8" d="M33.5 27a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" /> 1857 </g> 1858 <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="29.5" /> 1859 <defs> 1860 <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath> 1861 </defs> 1862</svg> `,An=Z`<svg fill="none" viewBox="0 0 60 60"> 1863 <g clip-path="url(#a)"> 1864 <rect width="60" height="60" fill="#987DE8" rx="30" /> 1865 <path 1866 fill="#fff" 1867 fill-rule="evenodd" 1868 d="m15.48 28.37 11.97-19.3a3 3 0 0 1 5.1 0l11.97 19.3a6 6 0 0 1 .9 3.14v.03a6 6 0 0 1-1.16 3.56L33.23 50.2a4 4 0 0 1-6.46 0L15.73 35.1a6 6 0 0 1-1.15-3.54v-.03a6 6 0 0 1 .9-3.16Z" 1869 clip-rule="evenodd" 1870 /> 1871 <path 1872 fill="#643CDD" 1873 d="M30.84 10.11a1 1 0 0 0-.84-.46V24.5l12.6 5.53a2 2 0 0 0-.28-1.4L30.84 10.11Z" 1874 /> 1875 <path 1876 fill="#BDADEB" 1877 d="M30 9.65a1 1 0 0 0-.85.46L17.66 28.64a2 2 0 0 0-.26 1.39L30 24.5V9.65Z" 1878 /> 1879 <path 1880 fill="#643CDD" 1881 d="M30 50.54a1 1 0 0 0 .8-.4l11.24-15.38c.3-.44-.2-1-.66-.73l-9.89 5.68a3 3 0 0 1-1.5.4v10.43Z" 1882 /> 1883 <path 1884 fill="#BDADEB" 1885 d="m17.97 34.76 11.22 15.37c.2.28.5.41.8.41V40.11a3 3 0 0 1-1.49-.4l-9.88-5.68c-.47-.27-.97.3-.65.73Z" 1886 /> 1887 <path 1888 fill="#401AB3"
1889 d="M42.6 30.03 30 24.5v13.14a3 3 0 0 0 1.5-.4l10.14-5.83a2 2 0 0 0 .95-1.38Z" 1890 /> 1891 <path 1892 fill="#7C5AE2" 1893 d="M30 37.64V24.46l-12.6 5.57a2 2 0 0 0 .97 1.39l10.13 5.82a3 3 0 0 0 1.5.4Z" 1894 /> 1895 </g> 1896 <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="29.5" /> 1897 <defs> 1898 <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath> 1899 </defs> 1900</svg> `,Sn=Z`<svg fill="none" viewBox="0 0 60 60"> 1901 <rect width="60" height="60" fill="#1DC956" rx="3" /> 1902 <path 1903 fill="#1FAD7E" 1904 stroke="#fff" 1905 stroke-width="2" 1906 d="m30.49 29.13-.49-.27-.49.27-12.77 7.1-.05.02c-.86.48-1.58.88-2.1 1.24-.54.37-1.04.81-1.28 1.45a3 3 0 0 0 0 2.12c.24.63.74 1.08 1.27 1.45.53.36 1.25.76 2.11 1.24l.05.03 6.33 3.51.17.1c2.33 1.3 3.72 2.06 5.22 2.32a9 9 0 0 0 3.08 0c1.5-.26 2.9-1.03 5.22-2.32l.18-.1 6.32-3.51.05-.03a26.9 26.9 0 0 0 2.1-1.24 3.21 3.21 0 0 0 1.28-1.45l-.94-.35.94.35a3 3 0 0 0 0-2.12l-.94.35.94-.35a3.21 3.21 0 0 0-1.27-1.45c-.53-.36-1.25-.76-2.11-1.24l-.05-.03-12.77-7.1Z" 1907 /> 1908 <path 1909 fill="#2BEE6C" 1910 stroke="#fff" 1911 stroke-width="2" 1912 d="m30.49 19.13-.49-.27-.49.27-12.77 7.1-.05.02c-.86.48-1.58.88-2.1 1.24-.54.37-1.04.81-1.28 1.45a3 3 0 0 0 0 2.12c.24.63.74 1.08 1.27 1.45.53.36 1.25.76 2.11 1.24l.05.03 6.33 3.51.17.1c2.33 1.3 3.72 2.06 5.22 2.32a9 9 0 0 0 3.08 0c1.5-.26 2.9-1.03 5.22-2.32l.18-.1 6.32-3.51.05-.03a26.9 26.9 0 0 0 2.1-1.24 3.21 3.21 0 0 0 1.28-1.45l-.94-.35.94.35a3 3 0 0 0 0-2.12l-.94.35.94-.35a3.21 3.21 0 0 0-1.27-1.45c-.53-.36-1.25-.76-2.11-1.24l-.05-.03-12.77-7.1Z" 1913 /> 1914 <path 1915 fill="#86F999" 1916 stroke="#fff" 1917 stroke-width="2" 1918 d="m46.69 21.06-.94-.35.94.35a3 3 0 0 0 0-2.12l-.94.35.94-.35a3.21 3.21 0 0 0-1.27-1.45c-.53-.36-1.25-.76-2.11-1.24l-.05-.03-6.32-3.51-.18-.1c-2.33-1.3-3.72-2.06-5.22-2.33a9 9 0 0 0-3.08 0c-1.5.27-2.9 1.04-5.22 2.33l-.17.1-6.33 3.51-.05.03c-.86.48-1.58.88-2.1 1.24-.54.37-1.04.81-1.28 1.45a3 3 0 0 0 0 2.12c.24.63.74 1.08 1.27 1.45.53.36 1.25.76 2.11 1.24l.05.03 6.33 3.51.17.1c2.33 1.3 3.72 2.06 5.22 2.32a9 9 0 0 0 3.08 0c1.5-.26 2.9-1.03 5.22-2.32l.18-.1 6.32-3.51.05-.03a26.9 26.9 0 0 0 2.1-1.24 3.21 3.21 0 0 0 1.28-1.45Z" 1919 /> 1920 <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" /> 1921</svg>`,In=Z`<svg fill="none" viewBox="0 0 60 60"> 1922 <rect width="60" height="60" fill="#C653C6" rx="3" /> 1923 <path 1924 fill="#fff" 1925 d="M20.03 15.22C20 15.6 20 16.07 20 17v2.8c0 1.14 0 1.7-.2 2.12-.15.31-.3.5-.58.71-.37.28-1.06.42-2.43.7-.59.12-1.11.29-1.6.51a9 9 0 0 0-4.35 4.36C10 30 10 32.34 10 37c0 4.66 0 7 .84 8.8a9 9 0 0 0 4.36 4.36C17 51 19.34 51 24 51h12c4.66 0 7 0 8.8-.84a9 9 0 0 0 4.36-4.36C50 44 50 41.66 50 37c0-4.66 0-7-.84-8.8a9 9 0 0 0-4.36-4.36c-.48-.22-1-.39-1.6-.5-1.36-.29-2.05-.43-2.42-.7-.27-.22-.43-.4-.58-.72-.2-.42-.2-.98-.2-2.11V17c0-.93 0-1.4-.03-1.78a9 9 0 0 0-8.19-8.19C31.4 7 30.93 7 30 7s-1.4 0-1.78.03a9 9 0 0 0-8.19 8.19Z" 1926 /> 1927 <path 1928 fill="#E87DE8" 1929 d="M22 17c0-.93 0-1.4.04-1.78a7 7 0 0 1 6.18-6.18C28.6 9 29.07 9 30 9s1.4 0 1.78.04a7 7 0 0 1 6.18 6.18c.04.39.04.85.04 1.78v4.5a1.5 1.5 0 0 1-3 0V17c0-.93 0-1.4-.08-1.78a4 4 0 0 0-3.14-3.14C31.39 12 30.93 12 30 12s-1.4 0-1.78.08a4 4 0 0 0-3.14 3.14c-.08.39-.08.85-.08 1.78v4.5a1.5 1.5 0 0 1-3 0V17Z" 1930 /> 1931 <path 1932 fill="#E87DE8" 1933 fill-rule="evenodd" 1934 d="M12 36.62c0-4.32 0-6.48.92-8.09a7 7 0 0 1 2.61-2.61C17.14 25 19.3 25 23.62 25h6.86c.46 0 .7 0 .9.02 2.73.22 4.37 2.43 4.62 4.98.27-2.7 2.11-5 5.02-5A6.98 6.98 0 0 1 48 31.98v5.4c0 4.32 0 6.48-.92 8.09a7 7 0 0 1-2.61 2.61c-1.61.92-3.77.92-8.09.92h-5.86c-.46 0-.7 0-.9-.02-2.73-.22-4.37-2.43-4.62-4.98-.26 2.58-1.94 4.82-4.71 4.99l-.7.01c-.55 0-.82 0-1.05-.02a7 7 0 0 1-6.52-6.52c-.02-.23-.02-.5-.02-1.05v-4.79Zm21.24-.27a4 4 0 1 0-6.48 0 31.28 31.28 0 0 1 1.57 2.23c.17.4.17.81.17 1.24V42.5a1.5 1.5 0 0 0 3 0V39.82c0-.43 0-.85.17-1.24.09-.2.58-.87 1.57-2.23Z" 1935 clip-rule="evenodd" 1936 /> 1937 <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" /> 1938</svg>`,Tn=Z`<svg fill="none" viewBox="0 0 60 60"> 1939 <g clip-path="url(#a)"> 1940 <path 1941 fill="#EB8B47" 1942 d="M0 24.9c0-9.25 0-13.88 1.97-17.33a15 15 0 0 1 5.6-5.6C11.02 0 15.65 0 24.9 0h10.2c9.25 0 13.88 0 17.33 1.97a15 15 0 0 1 5.6 5.6C60 11.02 60 15.65 60 24.9v10.2c0 9.25 0 13.88-1.97 17.33a15 15 0 0 1-5.6 5.6C48.98 60 44.35 60 35.1 60H24.9c-9.25 0-13.88 0-17.33-1.97a15 15 0 0 1-5.6-5.6C0 48.98 0 44.35 0 35.1V24.9Z" 1943 /> 1944 <path 1945 stroke="#062B2B" 1946 stroke-opacity=".1" 1947 d="M.5 24.9c0-4.64 0-8.08.24-10.8.25-2.7.73-4.65 1.66-6.28A14.5 14.5 0 0 1 7.82 2.4C9.46 1.47 11.39 1 14.1.74A133 133 0 0 1 24.9.5h10.2c4.63 0 8.08 0 10.8.24 2.7.25 4.65.73 6.28 1.66a14.5 14.5 0 0 1 5.42 5.42c.93 1.63 1.41 3.57 1.66 6.28.24 2.72.24 6.16.24 10.8v10.2c0 4.63 0 8.08
1947-.24 10.8-.25 2.7-.73 4.64-1.66 6.28a14.5 14.5 0 0 1-5.42 5.41c-1.63.94-3.57 1.42-6.28 1.67-2.72.24-6.17.24-10.8.24H24.9c-4.63 0-8.08 0-10.8-.24-2.7-.25-4.64-.73-6.28-1.67a14.5 14.5 0 0 1-5.42-5.4C1.47 50.53 1 48.6.74 45.88A133 133 0 0 1 .5 35.1V24.9Z" 1948 /> 1949 <path 1950 fill="#FF974C" 1951 stroke="#fff" 1952 stroke-width="2" 1953 d="M39.2 29.2a13 13 0 1 0-18.4 0l1.3 1.28a12.82 12.82 0 0 1 2.1 2.39 6 6 0 0 1 .6 1.47c.2.76.2 1.56.2 3.17v11.24c0 1.08 0 1.61.13 2.12a4 4 0 0 0 .41.98c.26.45.64.83 1.4 1.6l.3.29c.65.65.98.98 1.36 1.09.26.07.54.07.8 0 .38-.11.7-.44 1.36-1.1l3.48-3.47c.65-.65.98-.98 1.09-1.36a1.5 1.5 0 0 0 0-.8c-.1-.38-.44-.7-1.1-1.36l-.47-.48c-.65-.65-.98-.98-1.09-1.36a1.5 1.5 0 0 1 0-.8c.1-.38.44-.7 1.1-1.36l.47-.48c.65-.65.98-.98 1.09-1.36a1.5 1.5 0 0 0 0-.8c-.1-.38-.44-.7-1.1-1.36l-.48-.5c-.65-.64-.98-.97-1.08-1.35a1.5 1.5 0 0 1 0-.79c.1-.38.42-.7 1.06-1.36l5.46-5.55Z" 1954 /> 1955 <circle cx="30" cy="17" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2" /> 1956 </g> 1957 <defs> 1958 <clipPath id="a"><path fill="#fff" d="M0 0h60v60H0z" /></clipPath> 1959 </defs> 1960</svg> `,Pn=Z`<svg fill="none" viewBox="0 0 60 60"> 1961 <g clip-path="url(#a)"> 1962 <rect width="60" height="60" fill="#00ACE6" rx="30" /> 1963 <circle cx="64" cy="39" r="50" fill="#1AC6FF" stroke="#fff" stroke-width="2" /> 1964 <circle cx="78" cy="30" r="50" fill="#4DD2FF" stroke="#fff" stroke-width="2" /> 1965 <circle cx="72" cy="15" r="35" fill="#80DFFF" stroke="#fff" stroke-width="2" /> 1966 <circle cx="34" cy="-17" r="45" stroke="#fff" stroke-width="2" /> 1967 <circle cx="34" cy="-5" r="50" stroke="#fff" stroke-width="2" /> 1968 <circle cx="30" cy="45" r="4" fill="#4DD2FF" stroke="#fff" stroke-width="2" /> 1969 <circle cx="39.5" cy="27.5" r="4" fill="#80DFFF" stroke="#fff" stroke-width="2" /> 1970 <circle cx="16" cy="24" r="4" fill="#19C6FF" stroke="#fff" stroke-width="2" /> 1971 </g> 1972 <rect width="59" height="59" x=".5" y=".5" stroke="#062B2B" stroke-opacity=".1" rx="29.5" /> 1973 <defs> 1974 <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath> 1975 </defs> 1976</svg>`,Nn=Z`<svg fill="none" viewBox="0 0 60 60"> 1977 <g clip-path="url(#a)"> 1978 <rect width="60" height="60" fill="#C653C6" rx="3" /> 1979 <path 1980 fill="#E87DE8" 1981 stroke="#fff" 1982 stroke-width="2" 1983 d="M52.1 47.34c0-4.24-1.44-9.55-5.9-12.4a2.86 2.86 0 0 0-1.6-3.89v-.82c0-1.19-.52-2.26-1.35-3a4.74 4.74 0 0 0-2.4-6.26v-5.5a11.31 11.31 0 1 0-22.63 0v2.15a3.34 3.34 0 0 0-1.18 5.05 4.74 4.74 0 0 0-.68 6.44A5.22 5.22 0 0 0 14 35.92c-3.06 4.13-6.1 8.3-6.1 15.64 0 2.67.37 4.86.74 6.39a20.3 20.3 0 0 0 .73 2.39l.02.04v.01l.92-.39-.92.4.26.6h38.26l.3-.49-.87-.51.86.5.02-.01.03-.07a16.32 16.32 0 0 0 .57-1.05c.36-.72.85-1.74 1.33-2.96a25.51 25.51 0 0 0 1.94-9.07Z" 1984 /> 1985 <path 1986 fill="#fff" 1987 fill-rule="evenodd" 1988 d="M26.5 29.5c-3-.5-5.5-3-5.5-7v-7c0-.47 0-.7.03-.9a3 3 0 0 1 2.58-2.57c.2-.03.42-.03.89-.03 2 0 2.5-2.5 2.5-2.5s0 2.5 2.5 2.5c1.4 0 2.1 0 2.65.23a3 3 0 0 1 1.62 1.62c.23.55.23 1.25.23 2.65v6c0 4-3 7-6.5 7 1.35.23 4 0 6.5-2v9.53C34 38.5 31.5 40 28 40s-6-1.5-6-2.97L24 34l2.5 1.5v-6ZM26 47h4.5c2.5 0 3 4 3 5.5h-3l-1-1.5H26v-4Zm-6.25 5.5H24V57h-8c0-1 1-4.5 3.75-4.5Z" 1989 clip-rule="evenodd" 1990 /> 1991 </g> 1992 <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" /> 1993 <defs> 1994 <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="3" /></clipPath> 1995 </defs> 1996</svg> `,Rn=Z`<svg fill="none" viewBox="0 0 60 60"> 1997 <rect width="60" height="60" fill="#794CFF" rx="3" /> 1998 <path 1999 fill="#987DE8" 2000 stroke="#fff" 2001 stroke-width="2" 2002 d="M33 22.5v-1H16v5H8.5V36H13v-5h3v7.5h17V31h1v7.5h17v-17H34v5h-1v-4Z" 2003 /> 2004 <path fill="#fff" d="M37.5 25h10v10h-10z" /> 2005 <path fill="#4019B2" d="M42.5 25h5v10h-5z" /> 2006 <path fill="#fff" d="M19.5 25h10v10h-10z" /> 2007 <path fill="#4019B2" d="M24.5 25h5v10h-5z" /> 2008 <path fill="#fff" d="M12 30.5h4V37h-4v-6.5Z" /> 2009 <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" /> 2010</svg>`,On=Z`<svg 2011 viewBox="0 0 60 60" 2012 fill="none" 2013> 2014 <g clip-path="url(#1)"> 2015 <rect width="60" height="60" rx="30" fill="#00ACE6" /> 2016 <path 2017 d="M59 73C59 89.0163 46.0163 102 30 102C13.9837 102 1 89.0163 1 73C1 56.9837 12 44 30 44C48 44 59 56.9837 59 73Z" 2018 fill="#1AC6FF" 2019 stroke="white" 2020 stroke-width="2" 2021 /> 2022 <path 2023 d="M18.6904 19.9015C19.6264 15.3286 23.3466 11.8445 27.9708 11.2096C29.3231 11.024 30.6751 11.0238 32.0289 11.2096C36.6532 11.8445 40.3733 15.3286 41.3094 19.9015C41.4868 20.7681 41.6309 21.6509 41.7492 22.5271C41.8811 23.5041 41.8811 24.4944 41.7492 25.4715C41.6309 26.3476 41.4868 27.2304 41.3094 28.097C40.3733 32.6699 36.6532 36.154 32.0289 36.7889C30.6772 36.9744 29.3216 36.9743 27.9708 36.7889C23.3466 36.154 19.6264 32.6699 18.6904 28.097C18.513 27.2304 18.3689 26.3476 18.2506 25.4715C18.1186 24.4944 18.1186 23.5041 18.2506 22.5271C18.3689 21.6509 18.513 20.7681 18.6904 19.9015Z" 2024 fill="#1AC6FF" 2025 stroke="white" 2026 stroke-width="2" 2027 /> 2028 <circle cx="24.5" cy="23.5" r="1.5" fill="white" /> 2029 <circle cx="35.5" cy="23.5" r="1.5" fill="white" /> 2030 <path 2031 d="M31 20L28 28H32" 2032 stroke="white" 2033 stroke-width="2" 2034 stroke-linecap="round" 2035 stroke-linejoin="round" 2036 /> 2037 </g> 2038 <rect x="0.5" y="0.5" width="59" height="59" rx="29.5" stroke="white" stroke-opacity="0.1" /> 2039 <defs> 2040 <clipPath id="1"> 2041 <rect width="60" height="60" rx="30" fill="white" /> 2042 </clipPath> 2043 </defs> 2044</svg> `,Mn=Z`<svg viewBox="0 0 60 60" fill="none"> 2045 <g clip-path="url(#1)"> 2046 <path 2047 d="M0 24.9C0 15.6485 0 11.0228 1.97053 7.56812C3.3015 5.23468 5.23468 3.3015 7.56812 1.97053C11.0228 0 15.6485 0 24.9 0H35.1C44.3514 0 48.9772 0 52.4319 1.97053C54.7653 3.3015 56.6985 5.23468 58.0295 7.56812C60 11.0228 60 15.6485 60 24.9V35.1C60 44.3514 60 48.9772 58.0295 52.4319C56.6985 54.7653 54.7653 56.
20476985 52.4319 58.0295C48.9772 60 44.3514 60 35.1 60H24.9C15.6485 60 11.0228 60 7.56812 58.0295C5.23468 56.6985 3.3015 54.7653 1.97053 52.4319C0 48.9772 0 44.3514 0 35.1V24.9Z" 2048 fill="#794CFF" 2049 /> 2050 <path 2051 d="M0.5 24.9C0.5 20.2652 0.50047 16.8221 0.744315 14.105C0.987552 11.3946 1.46987 9.45504 2.40484 7.81585C3.69145 5.56019 5.56019 3.69145 7.81585 2.40484C9.45504 1.46987 11.3946 0.987552 14.105 0.744315C16.8221 0.50047 20.2652 0.5 24.9 0.5H35.1C39.7348 0.5 43.1779 0.50047 45.895 0.744315C48.6054 0.987552 50.545 1.46987 52.1841 2.40484C54.4398 3.69145 56.3086 5.56019 57.5952 7.81585C58.5301 9.45504 59.0124 11.3946 59.2557 14.105C59.4995 16.8221 59.5 20.2652 59.5 24.9V35.1C59.5 39.7348 59.4995 43.1779 59.2557 45.895C59.0124 48.6054 58.5301 50.545 57.5952 52.1841C56.3086 54.4398 54.4398 56.3086 52.1841 57.5952C50.545 58.5301 48.6054 59.0124 45.895 59.2557C43.1779 59.4995 39.7348 59.5 35.1 59.5H24.9C20.2652 59.5 16.8221 59.4995 14.105 59.2557C11.3946 59.0124 9.45504 58.5301 7.81585 57.5952C5.56019 56.3086 3.69145 54.4398 2.40484 52.1841C1.46987 50.545 0.987552 48.6054 0.744315 45.895C0.50047 43.1779 0.5 39.7348 0.5 35.1V24.9Z" 2052 stroke="#062B2B" 2053 stroke-opacity="0.1" 2054 /> 2055 <path 2056 d="M35.1403 31.5016C35.1193 30.9637 35.388 30.4558 35.8446 30.1707C36.1207 29.9982 36.4761 29.8473 36.7921 29.7685C37.3143 29.6382 37.8664 29.7977 38.2386 30.1864C38.8507 30.8257 39.3004 31.6836 39.8033 32.408C40.2796 33.0942 41.4695 33.2512 41.9687 32.5047C42.4839 31.7341 42.9405 30.8229 43.572 30.1399C43.9375 29.7447 44.4866 29.5756 45.0111 29.6967C45.3283 29.7701 45.6863 29.9147 45.9655 30.0823C46.4269 30.3595 46.7045 30.8626 46.6928 31.4008C46.6731 32.3083 46.3764 33.2571 46.2158 34.1473C46.061 35.0048 46.9045 35.8337 47.7592 35.664C48.6464 35.4878 49.5899 35.1747 50.497 35.1391C51.0348 35.1181 51.5427 35.3868 51.8279 35.8433C52.0004 36.1195 52.1513 36.4749 52.2301 36.7908C52.3604 37.3131 52.2009 37.8651 51.8121 38.2374C51.1729 38.8495 50.3151 39.2991 49.5908 39.8019C48.9046 40.2782 48.7473 41.4683 49.4939 41.9675C50.2644 42.4827 51.1757 42.9393 51.8587 43.5708C52.2539 43.9362 52.423 44.4854 52.3018 45.0099C52.2285 45.3271 52.0839 45.6851 51.9162 45.9642C51.6391 46.4257 51.1359 46.7032 50.5978 46.6916C49.6903 46.6719 48.7417 46.3753 47.8516 46.2146C46.9939 46.0598 46.1648 46.9035 46.3346 47.7583C46.5108 48.6454 46.8239 49.5888 46.8594 50.4958C46.8805 51.0336 46.6117 51.5415 46.1552 51.8267C45.879 51.9992 45.5236 52.15 45.2077 52.2289C44.6854 52.3592 44.1334 52.1997 43.7611 51.8109C43.1491 51.1718 42.6996 50.314 42.1968 49.5897C41.7203 48.9034 40.5301 48.7463 40.0309 49.493C39.5157 50.2634 39.0592 51.1746 38.4278 51.8574C38.0623 52.2527 37.5132 52.4218 36.9887 52.3006C36.6715 52.2273 36.3135 52.0826 36.0343 51.915C35.5729 51.6379 35.2953 51.1347 35.307 50.5966C35.3267 49.6891 35.6233 48.7405 35.7839 47.8505C35.9388 46.9928 35.0951 46.1636 34.2402 46.3334C33.3531 46.5096 32.4098 46.8227 31.5028 46.8582C30.9649 46.8793 30.457 46.6105 30.1719 46.154C29.9994 45.8778 29.8485 45.5224 29.7697 45.2065C29.6394 44.6842 29.7989 44.1322 30.1877 43.7599C30.8269 43.1479 31.6847 42.6982 32.4091 42.1954C33.0954 41.7189 33.2522 40.5289 32.5056 40.0297C31.7351 39.5145 30.824 39.058 30.1411 38.4265C29.7459 38.0611 29.5768 37.5119 29.698 36.9875C29.7713 36.6702 29.9159 36.3122 30.0836 36.0331C30.3607 35.5717 30.8638 35.2941 31.402 35.3058C32.3095 35.3255 33.2583 35.6221 34.1485 35.7828C35.006 35.9376 35.8349 35.094 35.6652 34.2393C35.489 33.3521 35.1759 32.4087 35.1403 31.5016Z" 2057 fill="#906EF7" 2058 stroke="white" 2059 stroke-width="2" 2060 /> 2061 <path 2062 d="M20.7706 8.22357C20.9036 7.51411 21.5231 7 22.2449 7H23.7551C24.4769 7 25.0964 7.51411 25.2294 8.22357C25.5051 9.69403 25.4829 11.6321 27.1202 12.2606C27.3092 12.3331 27.4958 12.4105 27.6798 12.4926C29.2818 13.2072 30.6374 11.8199 31.8721 10.9752C32.4678 10.5676 33.2694 10.6421 33.7798 11.1525L34.8477 12.2204C35.3581 12.7308 35.4326 13.5323 35.025 14.128C34.1802 15.3627 32.7931 16.7183 33.5077 18.3202C33.5898 18.5043 33.6672 18.6909 33.7398 18.88C34.3683 20.5171 36.3061 20.4949 37.7764 20.7706C38.4859 20.9036 39 21.5231 39 22.2449V23.7551C39 24.4769 38.4859 25.0964 37.7764 25.2294C36.3061 25.5051 34.3685 25.483 33.7401 27.1201C33.6675 27.3093 33.59 27.4961 33.5079 27.6803C32.7934 29.282 34.1803 30.6374 35.025 31.8719C35.4326 32.4677 35.3581 33.2692 34.8477 33.7796L33.7798 34.8475C33.2694 35.3579 32.4678 35.4324 31.8721 35.0248C30.6376 34.1801 29.2823 32.7934 27.6806 33.508C27.4962 33.5903 27.3093 33.6678 27.12 33.7405C25.483 34.3688 25.5051 36.3062 25.2294 37.7764C25.0964 38.4859 24.4769 39 23.7551 39H22.2449C21.5231 39 20.9036 38.4859 20.7706 37.7764C20.4949 36.3062 20.517 34.3688 18.88 33.7405C18.6908 33.6678 18.5039 33.5903 18.3196 33.5081C16.7179 32.7936 15.3625 34.1804 14.1279 35.0251C13.5322 35.4327 12.7307 35.3582 12.2203 34.8478L11.1524 33.7799C10.642 33.2695 10.5675 32.4679 10.9751 31.8722C11.8198 30.6376 13.2067 29.2822 12.4922 27.6804C12.41 27.4962 12.3325 27.3093 12.2599 27.1201C11.6315 25.483 9.69392 25.5051 8.22357 25.2294C7.51411 25.0964 7 24.4769 7 23.7551V22.2449C7 21.5231 7.51411 20.9036 8.22357 20.7706C9.69394 20.4949 11.6317 20.5171 12.2602 18.88C12.3328 18.6909 12.4103 18.5042 12.4924 18.3201C13.207 16.7181 11.8198 15.3625 10.975 14.1278C10.5674 13.5321 10.6419 12.7305 11.
20621523 12.2201L12.2202 11.1522C12.7306 10.6418 13.5322 10.5673 14.1279 10.9749C15.3626 11.8197 16.7184 13.2071 18.3204 12.4925C18.5044 12.4105 18.6909 12.3331 18.8799 12.2606C20.5171 11.6321 20.4949 9.69403 20.7706 8.22357Z" 2063 fill="#906EF7" 2064 stroke="white" 2065 stroke-width="2" 2066 /> 2067 <circle cx="23" cy="23" r="6" fill="#794CFF" stroke="white" stroke-width="2" /> 2068 <circle cx="41" cy="41" r="4" fill="#794CFF" stroke="white" stroke-width="2" /> 2069 </g> 2070 <defs> 2071 <clipPath id="1"> 2072 <rect width="60" height="60" fill="white" /> 2073 </clipPath> 2074 </defs> 2075</svg> `,jn=Z`<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none"> 2076 <g clip-path="url(#clip0_187_29)"> 2077 <path d="M1.18187e-05 15.8055C1.18187e-05 9.8015 -5.19442e-07 6.91338 1.69991e-08 0C4.5 3.72236e-05 9.62249 0 16.5 0L23.5 4.31399e-05C29.9349 4.31399e-05 35.5 0.000206332 40 3.73468e-05C40 2.77754 40 9.36708 40 15.8055V22.8364C40 29.2647 40 33.7962 40 40C31.5 40 29.8337 40 23.4 40H16.6C10.5092 40 6.50004 40 4.04289e-05 40C3.05176e-05 32.2453 1.18187e-05 29.6382 1.18187e-05 22.8364V15.8055Z" fill="#0052FF"/> 2078 <path d="M20.0236 26.5C16.4342 26.5 13.5236 23.5931 13.5236 20C13.5236 16.4069 16.4342 13.5 20.0236 13.5C23.2411 13.5 25.9134 15.8472 26.4261 18.9167H32.9731C32.4206 12.2433 26.8342 7 20.02 7C12.8411 7 7.02002 12.8211 7.02002 20C7.02002 27.1789 12.8411 33 20.02 33C26.8342 33 32.4206 27.7567 32.9731 21.0833H26.4225C25.9061 24.1528 23.2411 26.5 20.0236 26.5Z" fill="white"/> 2079 </g> 2080 <defs> 2081 <clipPath id="clip0_187_29"> 2082 <rect width="40" height="40" fill="white"/> 2083 </clipPath> 2084 </defs> 2085</svg>`,Ln=Z` 2086 <svg width="40" height="40" fill="none" xmlns="http://www.w3.org/2000/svg"> 2087 <g clip-path="url(#a)"> 2088 <path 2089 d="M0 16.6c0-6.168 0-9.251 1.314-11.555a10 10 0 0 1 3.731-3.731C7.35 0 10.432 0 16.6 0h6.8c6.168 0 9.252 0 11.555 1.314a10 10 0 0 1 3.731 3.731C40 7.35 40 10.432 40 16.6v6.8c0 6.168 0 9.252-1.314 11.555a10 10 0 0 1-3.731 3.731C32.652 40 29.568 40 23.4 40h-6.8c-6.168 0-9.251 0-11.555-1.314a10 10 0 0 1-3.731-3.731C0 32.652 0 29.568 0 23.4v-6.8Z" 2090 fill="#7D00FF" 2091 /> 2092 <path 2093 d="M.5 16.6c0-3.093 0-5.38.162-7.182.161-1.795.48-3.061 1.086-4.125a9.5 9.5 0 0 1 3.545-3.545C6.357 1.141 7.623.823 9.418.662 11.221.5 13.508.5 16.6.5h6.8c3.093 0 5.38 0 7.182.162 1.795.161 3.062.48 4.125 1.086a9.5 9.5 0 0 1 3.545 3.545c.607 1.064.925 2.33 1.086 4.125.161 1.803.162 4.09.162 7.182v6.8c0 3.093 0 5.38-.162 7.182-.161 1.795-.48 3.062-1.086 4.125a9.5 9.5 0 0 1-3.545 3.545c-1.063.607-2.33.925-4.125 1.086-1.803.161-4.09.162-7.182.162h-6.8c-3.093 0-5.38 0-7.182-.162-1.795-.161-3.061-.48-4.125-1.086a9.5 9.5 0 0 1-3.545-3.545c-.607-1.063-.925-2.33-1.086-4.125C.5 28.779.5 26.492.5 23.4v-6.8Z" 2094 stroke="#fff" 2095 stroke-opacity=".05" 2096 /> 2097 <path 2098 d="M28.306 15.381a3.69 3.69 0 1 0 0-7.381 3.69 3.69 0 0 0 0 7.381ZM16.987 32a8.991 8.991 0 1 1 .016-17.983A8.991 8.991 0 0 1 16.988 32Z" 2099 fill="#fff" 2100 /> 2101 </g> 2102 <defs> 2103 <clipPath id="a"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 2104 </defs> 2105 </svg> 2106`,Dn=Z` 2107 <svg width="40" height="40" fill="none" xmlns="http://www.w3.org/2000/svg"> 2108 <g clip-path="url(#a)"> 2109 <path 2110 d="M0 16.6c0-6.168 0-9.251 1.314-11.555a10 10 0 0 1 3.731-3.731C7.35 0 10.432 0 16.6 0h6.8c6.168 0 9.252 0 11.555 1.314a10 10 0 0 1 3.731 3.731C40 7.35 40 10.432 40 16.6v6.8c0 6.168 0 9.252-1.314 11.555a10 10 0 0 1-3.731 3.731C32.652 40 29.568 40 23.4 40h-6.8c-6.168 0-9.251 0-11.555-1.314a10 10 0 0 1-3.731-3.731C0 32.652 0 29.568 0 23.4v-6.8Z" 2111 fill="#635BFF" 2112 /> 2113 <path 2114 d="M.5 16.6c0-3.093 0-5.38.162-7.182.161-1.795.48-3.061 1.086-4.125a9.5 9.5 0 0 1 3.545-3.545C6.357 1.141 7.623.823 9.418.662 11.221.5 13.508.5 16.6.5h6.8c3.093 0 5.38 0 7.182.162 1.795.161 3.062.48 4.125 1.086a9.5 9.5 0 0 1 3.545 3.545c.607 1.064.925 2.33 1.086 4.125.161 1.803.162 4.09.162 7.182v6.8c0 3.093 0 5.38-.162 7.182-.161 1.795-.48 3.062-1.086 4.125a9.5 9.5 0 0 1-3.545 3.545c-1.063.607-2.33.925-4.125 1.086-1.803.161-4.09.162-7.182.162h-6.8c-3.093 0-5.38 0-7.182-.162-1.795-.161-3.061-.48-4.125-1.086a9.5 9.5 0 0 1-3.545-3.545c-.607-1.063-.925-2.33-1.086-4.125C.5 28.779.5 26.492.5 23.4v-6.8Z" 2115 stroke="#fff" 2116 stroke-opacity=".05" 2117 /> 2118 <path 2119 fill-rule="evenodd" 2120 clip-rule="evenodd" 2121 d="M18.299 15.147c0-1.028.844-1.424 2.242-1.424 2.004 0 4.536.607 6.54 1.688V9.213C24.892 8.343 22.73 8 20.541 8c-5.354 0-8.915 2.796-8.915 7.464 0 7.279 10.022 6.118 10.022 9.257 0 1.213-1.055 1.609-2.531 1.609-2.19 0-4.985-.897-7.2-2.11v6.277a18.283 18.283 0 0 0 7.2 1.503c5.485 0 9.257-2.716 9.257-7.437-.027-7.86-10.075-6.462-10.075-9.416Z" 2122 fill="#fff" 2123 /> 2124 </g> 2125 <defs> 2126 <clipPath id="a"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 2127 </defs> 2128 </svg> 2129`,Bn=Z` 2130 <svg width="40" height="40" fill="none" xmlns="http://www.w3.org/2000/svg"> 2131 <g clip-path="url(#a)"> 2132 <path 2133 d="M0 16.6c0-6.168 0-9.251 1.314-11.555a10 10 0 0 1 3.731-3.731C7.35 0 10.432 0 16.6 0h6.8c6.168 0 9.252 0 11.555 1.314a10 10 0 0 1 3.731 3.731C40 7.35 40 10.432 40 16.6v6.8c0 6.168 0 9.252-1.314 11.555a10 10 0 0 1-3.731 3.731C32.652 40 29.568 40 23.4 40h-6.8c-6.168 0-9.251 0-11.555-1.314a10 10 0 0 1-3.731-3.731C0 32.652 0 29.568 0 23.4v-6.8Z" 2134 fill="#fff" 2135 /> 2136 <path 2137 d="M.5 16.6c0-3.093 0-5.38.162-7.182.161-1.795.48-3.061 1.086-4.125a9.5 9.5 0 0 1 3.545-3.545C6.357 1.141 7.623.823 9.418.662 11.221.5 13.508.5 16.6.5h6.8c3.093 0 5.38 0 7.182.162 1.795.161 3.062.48 4.125 1.086a9.5 9.5 0 0 1 3.545 3.545c.607 1.064.925 2.33 1.086 4.125.161 1.803.162 4.09.162 7.182v6.8c0 3.093 0 5.38-.162 7.182-.161 1.795-.48 3.062-1.086 4.125a9.5 9.5 0 0 1-3.545 3.545c-1.063.607-2.33.925-4.125 1.086-1.803.161-4.09.162-7.182.162h-6.8c-3.093 0-5.38 0-7.182-.162-1.795-.161-3.061-.48-4.125-1.086a9.5 9.5 0 0 1-3.545-3.545c-.607-1.063-.925-2.33-1.086-4.125C.5 28.779.5 26.492.5 23.4v-6.8Z" 2138 stroke="#fff" 2139 stroke-opacity=".05" 2140 /> 2141 <path 2142 d="M18.606 12.642a.781.781 0 0 0-.771.66l-1.281 8.125a.78.78 0 0 1 .77-.66
2142h3.755a7.668 7.668 0 0 0 7.57-6.49 6.26 6.26 0 0 0 .075-.843c-.96-.504-2.089-.792-3.325-.792h-6.793Z" 2143 fill="#001C64" 2144 /> 2145 <path 2146 d="M28.724 13.434c-.006.282-.03.564-.075.843a7.668 7.668 0 0 1-7.57 6.491h-3.754a.78.78 0 0 0-.771.66l-1.916 12.15a.634.634 0 0 0 .626.734h4.075a.781.781 0 0 0 .77-.66l1.074-6.807a.781.781 0 0 1 .772-.66h2.4a7.668 7.668 0 0 0 7.57-6.491c.415-2.651-.92-5.064-3.201-6.26Z" 2147 fill="#0070E0" 2148 /> 2149 <path 2150 d="M13.977 7.226a.78.78 0 0 0-.771.658l-3.198 20.277a.634.634 0 0 0 .626.733h4.742l1.178-7.467 1.281-8.125a.782.782 0 0 1 .771-.66H25.4c1.237 0 2.364.289 3.325.792.065-3.4-2.74-6.208-6.599-6.208h-8.148Z" 2151 fill="#003087" 2152 /> 2153 </g> 2154 <defs> 2155 <clipPath id="a"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 2156 </defs> 2157 </svg> 2158`,Un=Z`<svg width="60" height="60" viewBox="0 0 60 60" fill="none"> 2159<g clip-path="url(#clip0_13859_31161)"> 2160 <path d="M0 24.8995C0 15.6481 0 11.0223 1.97053 7.56763C3.3015 5.2342 5.23468 3.30101 7.56812 1.97004C11.0228 -0.000488281 15.6485 -0.000488281 24.9 -0.000488281H35.1C44.3514 -0.000488281 48.9772 -0.000488281 52.4319 1.97004C54.7653 3.30101 56.6985 5.2342 58.0295 7.56763C60 11.0223 60 15.6481 60 24.8995V35.0995C60 44.351 60 48.9767 58.0295 52.4314C56.6985 54.7648 54.7653 56.698 52.4319 58.029C48.9772 59.9995 44.3514 59.9995 35.1 59.9995H24.9C15.6485 59.9995 11.0228 59.9995 7.56812 58.029C5.23468 56.698 3.3015 54.7648 1.97053 52.4314C0 48.9767 0 44.351 0 35.0995V24.8995Z" fill="#EB8B47"/> 2161 <path d="M0.5 24.8995C0.5 20.2647 0.50047 16.8216 0.744315 14.1045C0.987552 11.3941 1.46987 9.45455 2.40484 7.81536C3.69145 5.55971 5.56019 3.69096 7.81585 2.40435C9.45504 1.46938 11.3946 0.987064 14.105 0.743826C16.8221 0.499981 20.2652 0.499512 24.9 0.499512H35.1C39.7348 0.499512 43.1779 0.499981 45.895 0.743826C48.6054 0.987064 50.545 1.46938 52.1841 2.40435C54.4398 3.69096 56.3086 5.55971 57.5952 7.81536C58.5301 9.45455 59.0124 11.3941 59.2557 14.1045C59.4995 16.8216 59.5 20.2647 59.5 24.8995V35.0995C59.5 39.7343 59.4995 43.1774 59.2557 45.8945C59.0124 48.6049 58.5301 50.5445 57.5952 52.1837C56.3086 54.4393 54.4398 56.3081 52.1841 57.5947C50.545 58.5296 48.6054 59.012 45.895 59.2552C43.1779 59.499 39.7348 59.4995 35.1 59.4995H24.9C20.2652 59.4995 16.8221 59.499 14.105 59.2552C11.3946 59.012 9.45504 58.5296 7.81585 57.5947C5.56019 56.3081 3.69145 54.4393 2.40484 52.1837C1.46987 50.5445 0.987552 48.6049 0.744315 45.8945C0.50047 43.1774 0.5 39.7343 0.5 35.0995V24.8995Z" stroke="#141414" stroke-opacity="0.1"/> 2162 <path d="M13 26.0335C13 21.7838 13 19.659 14.0822 18.1694C14.4318 17.6883 14.8548 17.2653 15.3359 16.9157C16.8255 15.8335 18.9503 15.8335 23.2 15.8335H36.8C41.0497 15.8335 43.1745 15.8335 44.6641 16.9157C45.1452 17.2653 45.5682 17.6883 45.9178 18.1694C47 19.659 47 21.7838 47 26.0335V33.9668C47 38.2165 47 40.3414 45.9178 41.831C45.5682 42.312 45.1452 42.7351 44.6641 43.0846C43.1745 44.1668 41.0497 44.1668 36.8 44.1668H23.2C18.9503 44.1668 16.8255 44.1668 15.3359 43.0846C14.8548 42.7351 14.4318 42.312 14.0822 41.831C13 40.3414 13 38.2165 13 33.9668V26.0335Z" fill="#FF974C" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> 2163 <path d="M39.5 36.667H36.6666" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/> 2164 <path d="M45.2 23.0645H14.8C14.0501 23.0645 13.6751 23.0645 13.4122 23.2554C13.3273 23.3171 13.2527 23.3918 13.191 23.4767C13 23.7395 13 24.1145 13 24.8645V27.2645C13 28.0144 13 28.3894 13.191 28.6522C13.2527 28.7371 13.3273 28.8118 13.4122 28.8735C13.6751 29.0645 14.0501 29.0645 14.8 29.0645H45.2C45.9499 29.0645 46.3249 29.0645 46.5878 28.8735C46.6727 28.8118 46.7473 28.7371 46.809 28.6522C47 28.3894 47 28.0144 47 27.2645V24.8645C47 24.1145 47 23.7395 46.809 23.4767C46.7473 23.3918 46.6727 23.3171 46.5878 23.2554C46.3249 23.0645 45.9499 23.0645 45.2 23.0645Z" fill="white" fill-opacity="0.4" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> 2165</g> 2166<defs> 2167 <clipPath id="clip0_13859_31161"> 2168 <rect width="60" height="60" fill="white"/> 2169 </clipPath> 2170</defs> 2171</svg>`,Fn=Z`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"> 2172 <rect width="64" height="64" rx="30" fill="#1DC956"/> 2173 <rect x="0.5" y="0.5" width="63" height="63" rx="29.5" stroke="#141414" stroke-opacity="0.1"/> 2174 <path d="M32.4053 19.8031C35.3901 19.8031 38.0431 20.8349 40.1619 22.8247L45.9656 17.0211C42.4465 13.7416 37.8773 11.7333 32.4053 11.7333C24.4829 11.7333 17.6475 16.2841 14.3127 22.9168L21.056 28.1493C22.6589 23.359 27.136 19.8031 32.4053 19.8031Z" fill="#1DC956" stroke="white" stroke-width="2" stroke-linejoin="round"/> 2175 <path d="M32.4053 52.2667C37.8773 52.2667 42.465 50.4611 45.8182 47.3658L39.2407 42.2623C37.4351 43.4783 35.1321 44.2153 32.4053 44.2153C27.136 44.2153 22.6589 40.6594 21.056 35.8691L14.3127 41.1016C17.6475 47.7159 24.4829 52.2667 32.4053 52.2667Z" fill="#2BEE6C"/> 2176 <path d="M21.056 35.8507L19.5636 36.993L14.3127 41.0832M39.2407 42.2623L45.8182 47.3658C42.465 50.4611 37.8773 52.2667 32.4053 52.2667C24.4829 52.2667 17.6475 47.7159 14.3127 41.1016L21.056 35.8691C22.6589 40.6594 27.136 44.2153 32.4053 44.2153C35.1321 44.2153 37.4351 43.4783 39.2407 42.2623Z" stroke="white" stroke-width="2" stroke-linejoin="round"/> 2177 <path d="M51.8613 32.4606C51.8613 31.0235 51.7323 29.6417 51.4928 28.3151H32.4053V36.1638H43.3124C42.8334 38.688 41.3963 40.8252 39.2407 42.2623L45.8181 47.3658C49.6503 43.8283 51.8613 38.6327 51.8613 32.4606Z" fill="#1FAD7E" stroke="white" stroke-width="2" stroke-linejoin="round"/> 2178 <path d="M21.056 35.8507C20.6507 34.6347 20.4111 33.345 20.4111 32C20.4111 30.655 20.6507 29.3
2178653 21.056 28.1493L14.3127 22.9169C12.9309 25.6437 12.1387 28.7205 12.1387 32C12.1387 35.2795 12.9309 38.3564 14.3127 41.0831L19.5636 36.993L21.056 35.8507Z" fill="#86F999"/> 2179 <path d="M21.056 35.8691L14.3127 41.1016M21.056 35.8507C20.6507 34.6347 20.4111 33.345 20.4111 32C20.4111 30.655 20.6507 29.3653 21.056 28.1493L14.3127 22.9169C12.9309 25.6437 12.1387 28.7205 12.1387 32C12.1387 35.2795 12.9309 38.3564 14.3127 41.0831L19.5636 36.993L21.056 35.8507Z" stroke="white" stroke-width="2" stroke-linejoin="round"/> 2180</svg> 2181`,$n=Z`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"> 2182 <g clip-path="url(#clip0_241_31635)"> 2183 <path d="M0 26.5595C0 16.6913 0 11.7572 2.1019 8.07217C3.5216 5.58317 5.58366 3.52111 8.07266 2.10141C11.7577 -0.000488281 16.6918 -0.000488281 26.56 -0.000488281H37.44C47.3082 -0.000488281 52.2423 -0.000488281 55.9273 2.10141C58.4163 3.52111 60.4784 5.58317 61.8981 8.07217C64 11.7572 64 16.6913 64 26.5595V37.4395C64 47.3077 64 52.2418 61.8981 55.9268C60.4784 58.4158 58.4163 60.4779 55.9273 61.8976C52.2423 63.9995 47.3082 63.9995 37.44 63.9995H26.56C16.6918 63.9995 11.7577 63.9995 8.07266 61.8976C5.58366 60.4779 3.5216 58.4158 2.1019 55.9268C0 52.2418 0 47.3077 0 37.4395V26.5595Z" fill="#EB8B47"/> 2184 <path d="M0.5 26.5595C0.5 21.6163 0.50047 17.942 0.760736 15.0418C1.02039 12.1485 1.53555 10.0742 2.53621 8.3199C3.91155 5.90869 5.90917 3.91106 8.32039 2.53572C10.0747 1.53506 12.1489 1.01991 15.0423 0.760247C17.9425 0.499981 21.6168 0.499512 26.56 0.499512H37.44C42.3832 0.499512 46.0575 0.499981 48.9577 0.760247C51.8511 1.01991 53.9253 1.53506 55.6796 2.53572C58.0908 3.91106 60.0885 5.90869 61.4638 8.3199C62.4645 10.0742 62.9796 12.1485 63.2393 15.0418C63.4995 17.942 63.5 21.6163 63.5 26.5595V37.4395C63.5 42.3827 63.4995 46.057 63.2393 48.9572C62.9796 51.8506 62.4645 53.9248 61.4638 55.6791C60.0885 58.0903 58.0908 60.088 55.6796 61.4633C53.9253 62.464 51.8511 62.9791 48.9577 63.2388C46.0575 63.499 42.3832 63.4995 37.44 63.4995H26.56C21.6168 63.4995 17.9425 63.499 15.0423 63.2388C12.1489 62.9791 10.0747 62.464 8.32039 61.4633C5.90917 60.088 3.91155 58.0903 2.53621 55.6791C1.53555 53.9248 1.02039 51.8506 0.760736 48.9572C0.50047 46.057 0.5 42.3827 0.5 37.4395V26.5595Z" stroke="#141414" stroke-opacity="0.1"/> 2185 <path d="M28.1042 49.2329L13.1024 51.2077L15.0772 36.2059L37.1015 14.1815C39.2441 12.039 40.3154 10.9677 41.5718 10.624C42.4205 10.3918 43.3159 10.3918 44.1645 10.624C45.421 10.9677 46.4922 12.039 48.6348 14.1815L50.1286 15.6753C52.2711 17.8179 53.3424 18.8891 53.6861 20.1456C53.9183 20.9942 53.9183 21.8896 53.6861 22.7383C53.3424 23.9947 52.2711 25.066 50.1286 27.2086L28.1042 49.2329Z" fill="#FF974C" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> 2186 <path d="M38.5962 20.5376L22.4199 36.7139" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> 2187 <path d="M43.7727 25.714L27.5964 41.8903" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> 2188 <path d="M22.3703 36.7635C19.3258 39.808 16.0198 36.6395 16.2616 35.0324" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> 2189 <path d="M27.5466 41.9399C24.5034 44.9831 28.155 48.7098 29.2738 48.0475" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> 2190 <path d="M27.5468 41.9398C23.428 46.0586 18.2516 40.8822 22.3704 36.7634" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> 2191 <path d="M15.8191 50.5214C15.4711 49.5823 14.728 48.8392 13.7889 48.4912" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> 2192 <path d="M49.2862 29.5805L34.7275 15.0219" stroke="#E4E7E7" stroke-width="2" stroke-linejoin="round"/> 2193 </g> 2194 <defs> 2195 <clipPath id="clip0_241_31635"> 2196 <rect width="64" height="64" fill="white"/> 2197 </clipPath> 2198 </defs> 2199</svg> 2200`,zn=Z`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"> 2201 <g clip-path="url(#clip0_241_31636)"> 2202 <path d="M0 26.5595C0 16.6913 0 11.7572 2.1019 8.07217C3.5216 5.58318 5.58366 3.52111 8.07266 2.10141C11.7577 -0.000488281 16.6918 -0.000488281 26.56 -0.000488281H37.44C47.3082 -0.000488281 52.2423 -0.000488281 55.9273 2.10141C58.4163 3.52111 60.4784 5.58318 61.8981 8.07217C64 11.7572 64 16.6913 64 26.5595V37.4395C64 47.3077 64 52.2418 61.8981 55.9269C60.4784 58.4159 58.4163 60.4779 55.9273 61.8976C52.2423 63.9995 47.3082 63.9995 37.44 63.9995H26.56C16.6918 63.9995 11.7577 63.9995 8.07266 61.8976C5.58366 60.4779 3.5216 58.4159 2.1019 55.9269C0 52.2418 0 47.3077 0 37.4395V26.5595Z" fill="#794CFF"/> 2203 <path d="M0.5 26.5595C0.5 21.6163 0.50047 17.942 0.760736 15.0418C1.02039 12.1485 1.53555 10.0742 2.53621 8.3199
2203C3.91155 5.90869 5.90917 3.91106 8.32039 2.53572C10.0747 1.53506 12.1489 1.01991 15.0423 0.760247C17.9425 0.499981 21.6168 0.499512 26.56 0.499512H37.44C42.3832 0.499512 46.0575 0.499981 48.9577 0.760247C51.8511 1.01991 53.9253 1.53506 55.6796 2.53572C58.0908 3.91106 60.0885 5.90869 61.4638 8.3199C62.4645 10.0742 62.9796 12.1485 63.2393 15.0418C63.4995 17.942 63.5 21.6163 63.5 26.5595V37.4395C63.5 42.3827 63.4995 46.057 63.2393 48.9572C62.9796 51.8506 62.4645 53.9248 61.4638 55.6791C60.0885 58.0903 58.0908 60.088 55.6796 61.4633C53.9253 62.464 51.8511 62.9791 48.9577 63.2388C46.0575 63.499 42.3832 63.4995 37.44 63.4995H26.56C21.6168 63.4995 17.9425 63.499 15.0423 63.2388C12.1489 62.9791 10.0747 62.464 8.32039 61.4633C5.90917 60.088 3.91155 58.0903 2.53621 55.6791C1.53555 53.9248 1.02039 51.8506 0.760736 48.9572C0.50047 46.057 0.5 42.3827 0.5 37.4395V26.5595Z" stroke="#141414" stroke-opacity="0.1"/> 2204 <path d="M40 39.4595C44.7824 36.693 48 31.5222 48 25.6C48 16.7634 40.8366 9.59998 32 9.59998C23.1634 9.59998 16 16.7634 16 25.6C16 31.5222 19.2176 36.693 24 39.4595V45.8144H40V39.4595Z" fill="#906EF7"/> 2205 <path d="M24 49.9689C24 51.8192 24 52.7444 24.3941 53.4353C24.6603 53.902 25.0469 54.2886 25.5136 54.5548C26.2046 54.9489 27.1297 54.9489 28.98 54.9489H35.02C36.8703 54.9489 37.7954 54.9489 38.4864 54.5548C38.9531 54.2886 39.3397 53.902 39.6059 53.4353C40 52.7444 40 51.8192 40 49.9689V45.8144H24V49.9689Z" fill="#906EF7"/> 2206 <path d="M24 45.8144V39.4595C19.2176 36.693 16 31.5222 16 25.6C16 16.7634 23.1634 9.59998 32 9.59998C40.8366 9.59998 48 16.7634 48 25.6C48 31.5222 44.7824 36.693 40 39.4595V45.8144M24 45.8144H40M24 45.8144V49.9689C24 51.8192 24 52.7444 24.3941 53.4353C24.6603 53.902 25.0469 54.2886 25.5136 54.5548C26.2046 54.9489 27.1297 54.9489 28.98 54.9489H35.02C36.8703 54.9489 37.7954 54.9489 38.4864 54.5548C38.9531 54.2886 39.3397 53.902 39.6059 53.4353C40 52.7444 40 51.8192 40 49.9689V45.8144" stroke="white" stroke-width="2" stroke-linejoin="round"/> 2207 <path d="M24 49.9689C24 51.8192 24 52.7444 24.3941 53.4353C24.6603 53.902 25.0469 54.2886 25.5136 54.5548C26.2046 54.9489 27.1297 54.9489 28.98 54.9489H35.02C36.8703 54.9489 37.7954 54.9489 38.4864 54.5548C38.9531 54.2886 39.3397 53.902 39.6059 53.4353C40 52.7444 40 51.8192 40 49.9689V45.8144H24V49.9689Z" fill="#643CDD" stroke="white" stroke-width="2" stroke-linejoin="round"/> 2208 <path d="M29.6735 26.9101V29.1109H34.0753V26.9101C34.0753 25.6945 35.0607 24.7092 36.2762 24.7092C37.4917 24.7092 38.4771 25.6945 38.4771 26.9101C38.4771 28.1256 37.4917 29.1109 36.2762 29.1109H34.0753H29.6735H27.4726C26.2571 29.1109 25.2717 28.1256 25.2717 26.9101C25.2717 25.6945 26.2571 24.7092 27.4726 24.7092C28.6881 24.7092 29.6735 25.6945 29.6735 26.9101Z" fill="#906EF7"/> 2209 <path d="M29.6735 45.3183V26.9101C29.6735 25.6945 28.6881 24.7092 27.4726 24.7092V24.7092C26.2571 24.7092 25.2717 25.6945 25.2717 26.9101V26.9101C25.2717 28.1256 26.2571 29.1109 27.4726 29.1109H36.2762C37.4917 29.1109 38.4771 28.1256 38.4771 26.9101V26.9101C38.4771 25.6945 37.4917 24.7092 36.2762 24.7092V24.7092C35.0607 24.7092 34.0753 25.6945 34.0753 26.9101V45.3183" stroke="white" stroke-width="2" stroke-linejoin="round"/> 2210 </g> 2211 <defs> 2212 <clipPath id="clip0_241_31636"> 2213 <rect width="64" height="64" fill="white"/> 2214 </clipPath> 2215 </defs> 2216</svg> 2217`,Hn=l` 2218 :host { 2219 display: block; 2220 width: var(--local-size); 2221 height: var(--local-size); 2222 } 2223 2224 :host svg { 2225 width: 100%; 2226 height: 100%; 2227 } 2228`;var Wn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};const qn={browser:En,dao:_n,defi:kn,defiAlt:Cn,eth:An,layers:Sn,lock:In,login:Tn,network:Pn,nft:Nn,noun:Rn,profile:On,system:Mn,coinbase:jn,onrampCard:Un,moonpay:Ln,stripe:Dn,paypal:Bn,google:Fn,pencil:$n,lightbulb:zn};let Vn=class extends pe{constructor(){super(...arguments),this.name="browser",this.size="md"}render(){return this.style.cssText=`\n --local-size: var(--wui-visual-size-${this.size});\n `,K`${qn[this.name]}`}};Vn.styles=[Ce,Hn],Wn([Oe()],Vn.prototype,"name",void 0),Wn([Oe()],Vn.prototype,"size",void 0),Vn=Wn([Ie("wui-visual")],Vn);const Gn=e=>e??Q,Kn={getSpacingStyles:(e,t)=>Array.isArray(e)?e[t]?`var(--wui-spacing-${e[t]})`:void 0:"string"===typeof e?`var(--wui-spacing-${e})`:void 0,getFormattedDate:e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(e),getHostName(e){try{return new URL(e).hostname}catch(t){return""}},getTruncateString(e){let{string:t,charsStart:n,charsEnd:r,truncate:i}=e;return t.length<=n+r?t:"end"===i?`${t.substring(0,n)}...`:"start"===i?`...${t.substring(t.length-r)}`:`${t.substring(0,Math.floor(n))}...${t.substring(t.length-Math.floor(r))}`},generateAvatarColors(e){const t=e.toLowerCase().replace(/^0x/iu,"").substring(0,6),n=this.hexToRgb(t),r=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),i=100-3*Number(r?.replace("px","")),s=`${i}% ${i}% at 65% 40%`,o=[];for(let a=0;a<5;a+=1){const e=this.tintColor(n,.15*a);o.push(`rgb(${e[0]}, ${e[1]}, ${e[2]})`)}return`\n --local-color-1: ${o[0]};\n --local-color-2: ${o[1]};\n --local-color-3: ${o[2]};\n --local-color-4: ${o[3]};\n --local-color-5: ${o[4]};\n --local-radial-circle: ${s}\n `},hexToRgb(e){const t=parseInt(e,16);return[t>>16&255,t>>8&255,255&t]},tintColor(e,t){const[n,r,i]=e;return[Math.round(n+(255-n)*t),Math.round(r+(255-r)*t),Math.round(i+(255-i)*t)]},isNumber:e=>/^[0-9]+$/u.test(e),getColorTheme:e=>e||("undefined"!==typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
2228k":"light":"dark"),splitBalance(e){const t=e.split(".");return 2===t.length?[t[0],t[1]]:["0","00"]},roundNumber:(e,t,n)=>e.toString().length>=t?Number(e).toFixed(n):e,formatNumberToLocalString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return void 0===e?"0.00":"number"===typeof e?e.toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t}):parseFloat(e).toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t})}},Zn=l` 2229 :host { 2230 display: flex; 2231 width: inherit; 2232 height: inherit; 2233 } 2234`;var Yn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Qn=class extends pe{render(){return this.style.cssText=`\n flex-direction: ${this.flexDirection};\n flex-wrap: ${this.flexWrap};\n flex-basis: ${this.flexBasis};\n flex-grow: ${this.flexGrow};\n flex-shrink: ${this.flexShrink};\n align-items: ${this.alignItems};\n justify-content: ${this.justifyContent};\n column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};\n row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};\n gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};\n padding-top: ${this.padding&&Kn.getSpacingStyles(this.padding,0)};\n padding-right: ${this.padding&&Kn.getSpacingStyles(this.padding,1)};\n padding-bottom: ${this.padding&&Kn.getSpacingStyles(this.padding,2)};\n padding-left: ${this.padding&&Kn.getSpacingStyles(this.padding,3)};\n margin-top: ${this.margin&&Kn.getSpacingStyles(this.margin,0)};\n margin-right: ${this.margin&&Kn.getSpacingStyles(this.margin,1)};\n margin-bottom: ${this.margin&&Kn.getSpacingStyles(this.margin,2)};\n margin-left: ${this.margin&&Kn.getSpacingStyles(this.margin,3)};\n `,K`<slot></slot>`}};Qn.styles=[Ce,Zn],Yn([Oe()],Qn.prototype,"flexDirection",void 0),Yn([Oe()],Qn.prototype,"flexWrap",void 0),Yn([Oe()],Qn.prototype,"flexBasis",void 0),Yn([Oe()],Qn.prototype,"flexGrow",void 0),Yn([Oe()],Qn.prototype,"flexShrink",void 0),Yn([Oe()],Qn.prototype,"alignItems",void 0),Yn([Oe()],Qn.prototype,"justifyContent",void 0),Yn([Oe()],Qn.prototype,"columnGap",void 0),Yn([Oe()],Qn.prototype,"rowGap",void 0),Yn([Oe()],Qn.prototype,"gap",void 0),Yn([Oe()],Qn.prototype,"padding",void 0),Yn([Oe()],Qn.prototype,"margin",void 0),Qn=Yn([Ie("wui-flex")],Qn);const Jn=l` 2235 :host { 2236 display: block; 2237 width: var(--wui-icon-box-size-xl); 2238 height: var(--wui-icon-box-size-xl); 2239 border-radius: var(--wui-border-radius-3xl); 2240 box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005); 2241 overflow: hidden; 2242 position: relative; 2243 } 2244 2245 :host([data-variant='generated']) { 2246 --mixed-local-color-1: var(--local-color-1); 2247 --mixed-local-color-2: var(--local-color-2); 2248 --mixed-local-color-3: var(--local-color-3); 2249 --mixed-local-color-4: var(--local-color-4); 2250 --mixed-local-color-5: var(--local-color-5); 2251 } 2252 2253 @supports (background: color-mix(in srgb, white 50%, black)) { 2254 :host([data-variant='generated']) { 2255 --mixed-local-color-1: color-mix( 2256 in srgb, 2257 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2258 var(--local-color-1) 2259 ); 2260 --mixed-local-color-2: color-mix( 2261 in srgb, 2262 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2263 var(--local-color-2) 2264 ); 2265 --mixed-local-color-3: color-mix( 2266 in srgb, 2267 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2268 var(--local-color-3) 2269 ); 2270 --mixed-local-color-4: color-mix( 2271 in srgb, 2272 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2273 var(--local-color-4) 2274 ); 2275 --mixed-local-color-5: color-mix( 2276 in srgb, 2277 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2278 var(--local-color-5) 2279 ); 2280 } 2281 } 2282 2283 :host([data-variant='generated']) { 2284 box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005); 2285 background: radial-gradient( 2286 var(--local-radial-circle), 2287 #fff 0.52%, 2288 var(--mixed-local-color-5) 31.25%, 2289 var(--mixed-local-color-3) 51.56%, 2290 var(--mixed-local-color-2) 65.63%, 2291 var(--mixed-local-color-1) 82.29%, 2292 var(--mixed-local-color-4) 100% 2293 ); 2294 } 2295 2296 :host([data-variant='default']) { 2297 box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005); 2298 background: radial-gradient( 2299 75.29% 75.29% at 64.96% 24.36%, 2300 #fff 0.52%, 2301 #f5ccfc 31.25%, 2302 #dba4f5 51.56%, 2303 #9a8ee8 65.63%, 2304 #6493da 82.29%, 2305 #6ebdea 100% 2306 ); 2307 } 2308`;var Xn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let er=class extends pe{constructor(){super(...arguments),this.imageSrc=void 0,this.alt=void 0,this.address=void 0}render(){return K`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",K`<wui-image src=${this.imageSrc} alt=${this.alt??"avatar"}></wui-image>`;if(this.address){this.dataset.variant="generated";const e=Kn.generateAvatarColors(this.address);return this.style.cssText=e,null}return this.dataset.variant="default",null}};er.styles=[Ce,Jn],Xn([Oe()],er.prototype,"imageSrc",void 0),Xn([Oe()],er.prototype,"alt",void 0),Xn([Oe()],er.prototype,"address",void 0),er=Xn([Ie("wui-avatar")],er);const tr=l` 2309 :host { 2310 display: inline-flex; 2311 justify-content: center;
2312 align-items: center; 2313 position: relative; 2314 overflow: hidden; 2315 background-color: var(--wui-color-gray-glass-020); 2316 border-radius: var(--local-border-radius); 2317 border: var(--local-border); 2318 box-sizing: content-box; 2319 width: var(--local-size); 2320 height: var(--local-size); 2321 min-height: var(--local-size); 2322 min-width: var(--local-size); 2323 } 2324 2325 @supports (background: color-mix(in srgb, white 50%, black)) { 2326 :host { 2327 background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent); 2328 } 2329 } 2330`;var nr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let rr=class extends pe{constructor(){super(...arguments),this.size="md",this.backgroundColor="accent-100",this.iconColor="accent-100",this.background="transparent",this.border=!1,this.borderColor="wui-color-bg-125",this.icon="copy"}render(){const e=this.iconSize||this.size,t="lg"===this.size,n="xl"===this.size,r=t?"12%":"16%",i=t?"xxs":n?"s":"3xl",s="gray"===this.background,o="opaque"===this.background,a="accent-100"===this.backgroundColor&&o||"success-100"===this.backgroundColor&&o||"error-100"===this.backgroundColor&&o||"inverse-100"===this.backgroundColor&&o;let c=`var(--wui-color-${this.backgroundColor})`;return a?c=`var(--wui-icon-box-bg-${this.backgroundColor})`:s&&(c=`var(--wui-gray-${this.backgroundColor})`),this.style.cssText=`\n --local-bg-value: ${c};\n --local-bg-mix: ${a||s?"100%":r};\n --local-border-radius: var(--wui-border-radius-${i});\n --local-size: var(--wui-icon-box-size-${this.size});\n --local-border: ${"wui-color-bg-125"===this.borderColor?"2px":"1px"} solid ${this.border?`var(--${this.borderColor})`:"transparent"}\n `,K` <wui-icon color=${this.iconColor} size=${e} name=${this.icon}></wui-icon> `}};rr.styles=[Ce,Ae,tr],nr([Oe()],rr.prototype,"size",void 0),nr([Oe()],rr.prototype,"backgroundColor",void 0),nr([Oe()],rr.prototype,"iconColor",void 0),nr([Oe()],rr.prototype,"iconSize",void 0),nr([Oe()],rr.prototype,"background",void 0),nr([Oe({type:Boolean})],rr.prototype,"border",void 0),nr([Oe()],rr.prototype,"borderColor",void 0),nr([Oe()],rr.prototype,"icon",void 0),rr=nr([Ie("wui-icon-box")],rr);const ir=l` 2331 :host { 2332 display: block; 2333 } 2334 2335 button { 2336 border-radius: var(--wui-border-radius-3xl); 2337 background: var(--wui-color-gray-glass-002); 2338 display: flex; 2339 gap: var(--wui-spacing-xs); 2340 padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) var(--wui-spacing-3xs) 2341 var(--wui-spacing-xs); 2342 border: 1px solid var(--wui-color-gray-glass-005); 2343 } 2344 2345 button:disabled { 2346 background: var(--wui-color-gray-glass-015); 2347 } 2348 2349 button:disabled > wui-text { 2350 color: var(--wui-color-gray-glass-015); 2351 } 2352 2353 button:disabled > wui-flex > wui-text { 2354 color: var(--wui-color-gray-glass-015); 2355 } 2356 2357 button:disabled > wui-image, 2358 button:disabled > wui-icon-box, 2359 button:disabled > wui-flex > wui-avatar { 2360 filter: grayscale(1); 2361 } 2362 2363 button:has(wui-image) { 2364 padding: var(--wui-spacing-3xs) var(--wui-spacing-3xs) var(--wui-spacing-3xs) 2365 var(--wui-spacing-xs); 2366 } 2367 2368 wui-text { 2369 color: var(--wui-color-fg-100); 2370 } 2371 2372 wui-flex > wui-text { 2373 color: var(--wui-color-fg-200); 2374 } 2375 2376 wui-image, 2377 wui-icon-box { 2378 border-radius: var(--wui-border-radius-3xl); 2379 width: 24px; 2380 height: 24px; 2381 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 2382 } 2383 2384 wui-flex { 2385 border-radius: var(--wui-border-radius-3xl); 2386 border: 1px solid var(--wui-color-gray-glass-005); 2387 background: var(--wui-color-gray-glass-005); 2388 padding: 4px var(--wui-spacing-m) 4px var(--wui-spacing-xxs); 2389 } 2390 2391 button.local-no-balance { 2392 border-radius: 0px; 2393 border: none; 2394 background: transparent; 2395 } 2396 2397 wui-avatar { 2398 width: 20px; 2399 height: 20px; 2400 box-shadow: 0 0 0 2px var(--wui-color-accent-glass-010); 2401 } 2402 2403 @media (max-width: 500px) { 2404 button { 2405 gap: 0px; 2406 padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) !important; 2407 height: 32px; 2408 } 2409 wui-image, 2410 wui-icon-box, 2411 button > wui-text { 2412 visibility: hidden; 2413 width: 0px; 2414 height: 0px; 2415 } 2416 button { 2417 border-radius: 0px; 2418 border: none; 2419 background: transparent; 2420 padding: 0px; 2421 } 2422 } 2423 2424 @media (hover: hover) and (pointer: fine) { 2425 button:hover:enabled > wui-flex > wui-text { 2426 color: var(--wui-color-fg-175); 2427 } 2428 2429 button:active:enabled > wui-flex > wui-text { 2430 color: var(--wui-color-fg-175); 2431 } 2432 } 2433`;var sr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let or=class extends pe{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.balance=void 0,this.isUnsupportedChain=void 0,this.disabled=!1,this.address="",this.profileName="",this.charsStart=4,this.charsEnd=6}render(){return K` 2434 <button 2435 ?disabled=${this.disabled} 2436 class=${Gn(this.balance?void 0:"local-no-balance")} 2437 > 2438 ${this.balanceTemplate()}
2439 <wui-flex gap="xxs" alignItems="center"> 2440 <wui-avatar 2441 .imageSrc=${this.avatarSrc} 2442 alt=${this.address} 2443 address=${this.address} 2444 ></wui-avatar> 2445 <wui-text variant="paragraph-600" color="inherit"> 2446 ${this.address?Kn.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?18:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"}):null} 2447 </wui-text> 2448 </wui-flex> 2449 </button> 2450 `}balanceTemplate(){if(this.isUnsupportedChain)return K` <wui-icon-box 2451 size="sm" 2452 iconColor="error-100" 2453 backgroundColor="error-100" 2454 icon="warningCircle" 2455 ></wui-icon-box> 2456 <wui-text variant="paragraph-600" color="inherit"> Switch Network</wui-text>`;if(this.balance){const e=this.networkSrc?K`<wui-image src=${this.networkSrc}></wui-image>`:K` 2457 <wui-icon-box 2458 size="sm" 2459 iconColor="fg-200" 2460 backgroundColor="fg-300" 2461 icon="networkPlaceholder" 2462 ></wui-icon-box> 2463 `;return K` 2464 ${e} 2465 <wui-text variant="paragraph-600" color="inherit"> ${this.balance}</wui-text> 2466 `}return null}};or.styles=[Ce,Ae,ir],sr([Oe()],or.prototype,"networkSrc",void 0),sr([Oe()],or.prototype,"avatarSrc",void 0),sr([Oe()],or.prototype,"balance",void 0),sr([Oe({type:Boolean})],or.prototype,"isUnsupportedChain",void 0),sr([Oe({type:Boolean})],or.prototype,"disabled",void 0),sr([Oe()],or.prototype,"address",void 0),sr([Oe()],or.prototype,"profileName",void 0),sr([Oe()],or.prototype,"charsStart",void 0),sr([Oe()],or.prototype,"charsEnd",void 0),or=sr([Ie("wui-account-button")],or);const ar=l` 2467 :host { 2468 position: relative; 2469 background-color: var(--wui-color-gray-glass-002); 2470 display: flex; 2471 justify-content: center; 2472 align-items: center; 2473 width: var(--local-size); 2474 height: var(--local-size); 2475 border-radius: inherit; 2476 border-radius: var(--local-border-radius); 2477 } 2478 2479 :host > wui-flex { 2480 overflow: hidden; 2481 border-radius: inherit; 2482 border-radius: var(--local-border-radius); 2483 } 2484 2485 :host::after { 2486 content: ''; 2487 position: absolute; 2488 top: 0; 2489 bottom: 0; 2490 left: 0; 2491 right: 0; 2492 border-radius: inherit; 2493 border: 1px solid var(--wui-color-gray-glass-010); 2494 pointer-events: none; 2495 } 2496 2497 :host([name='Extension'])::after { 2498 border: 1px solid var(--wui-color-accent-glass-010); 2499 } 2500 2501 :host([data-wallet-icon='allWallets']) { 2502 background-color: var(--wui-all-wallets-bg-100); 2503 } 2504 2505 :host([data-wallet-icon='allWallets'])::after { 2506 border: 1px solid var(--wui-color-accent-glass-010); 2507 } 2508 2509 wui-icon[data-parent-size='inherit'] { 2510 width: 75%; 2511 height: 75%; 2512 align-items: center; 2513 } 2514 2515 wui-icon[data-parent-size='sm'] { 2516 width: 18px; 2517 height: 18px; 2518 } 2519 2520 wui-icon[data-parent-size='md'] { 2521 width: 24px; 2522 height: 24px; 2523 } 2524 2525 wui-icon[data-parent-size='lg'] { 2526 width: 42px; 2527 height: 42px; 2528 } 2529 2530 wui-icon[data-parent-size='full'] { 2531 width: 100%; 2532 height: 100%; 2533 } 2534 2535 :host > wui-icon-box { 2536 position: absolute; 2537 overflow: hidden; 2538 right: -1px; 2539 bottom: -2px; 2540 z-index: 1; 2541 border: 2px solid var(--wui-color-bg-150, #1e1f1f); 2542 padding: 1px; 2543 } 2544`;var cr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let lr=class extends pe{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="xxs";return e="lg"===this.size?"m":"md"===this.size?"xs":"xxs",this.style.cssText=`\n --local-border-radius: var(--wui-border-radius-${e});\n --local-size: var(--wui-wallet-image-size-${this.size});\n `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),K` 2545 <wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex> 2546 `}templateVisual(){return this.imageSrc?K`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:this.walletIcon?K`<wui-icon 2547 data-parent-size="md" 2548 size="md" 2549 color="inherit" 2550 name=${this.walletIcon} 2551 ></wui-icon>`:K`<wui-icon 2552 data-parent-size=${this.size} 2553 size="inherit" 2554 color="inherit" 2555 name="walletPlaceholder" 2556 ></wui-icon>`}};lr.styles=[Ce,ar],cr([Oe()],lr.prototype,"size",void 0),cr([Oe()],lr.prototype,"name",void 0),cr([Oe()],lr.prototype,"imageSrc",void 0),cr([Oe()],lr.prototype,"walletIcon",void 0),cr([Oe({type:Boolean})],lr.prototype,"installed",void 0),cr([Oe()],lr.prototype,"badgeSize",void 0),lr=cr([Ie("wui-wallet-image")],lr);const ur=l` 2557 :host { 2558 position: relative; 2559 border-radius: var(--wui-border-radius-xxs); 2560 width: 40px; 2561 height: 40px; 2562 overflow: hidden; 2563 background: var(--wui-color-gray-glass-002); 2564 display: flex; 2565 justify-content: center;
2566 align-items: center; 2567 flex-wrap: wrap; 2568 gap: var(--wui-spacing-4xs); 2569 padding: 3.75px !important; 2570 } 2571 2572 :host::after { 2573 content: ''; 2574 position: absolute; 2575 top: 0; 2576 bottom: 0; 2577 left: 0; 2578 right: 0; 2579 border-radius: inherit; 2580 border: 1px solid var(--wui-color-gray-glass-010); 2581 pointer-events: none; 2582 } 2583 2584 :host > wui-wallet-image { 2585 width: 14px; 2586 height: 14px; 2587 border-radius: var(--wui-border-radius-5xs); 2588 } 2589 2590 :host > wui-flex { 2591 padding: 2px; 2592 position: fixed; 2593 overflow: hidden; 2594 left: 34px; 2595 bottom: 8px; 2596 background: var(--dark-background-150, #1e1f1f); 2597 border-radius: 50%; 2598 z-index: 2; 2599 display: flex; 2600 } 2601`;var dr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let hr=class extends pe{constructor(){super(...arguments),this.walletImages=[]}render(){const e=this.walletImages.length<4;return K`${this.walletImages.slice(0,4).map((e=>{let{src:t,walletName:n}=e;return K` 2602 <wui-wallet-image 2603 size="inherit" 2604 imageSrc=${t} 2605 name=${Gn(n)} 2606 ></wui-wallet-image> 2607 `}))} 2608 ${e?[...Array(4-this.walletImages.length)].map((()=>K` <wui-wallet-image size="inherit" name=""></wui-wallet-image>`)):null} 2609 <wui-flex> 2610 <wui-icon-box 2611 size="xxs" 2612 iconSize="xxs" 2613 iconcolor="success-100" 2614 backgroundcolor="success-100" 2615 icon="checkmark" 2616 background="opaque" 2617 ></wui-icon-box> 2618 </wui-flex>`}};hr.styles=[Ce,ur],dr([Oe({type:Array})],hr.prototype,"walletImages",void 0),hr=dr([Ie("wui-all-wallets-image")],hr);const pr=l` 2619 :host { 2620 width: var(--local-width); 2621 position: relative; 2622 } 2623 2624 button { 2625 border: none; 2626 border-radius: var(--local-border-radius); 2627 width: var(--local-width); 2628 white-space: nowrap; 2629 } 2630 2631 /* -- Sizes --------------------------------------------------- */ 2632 button[data-size='md'] { 2633 padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l); 2634 height: 36px; 2635 } 2636 2637 button[data-size='md'][data-icon-left='true'][data-icon-right='false'] { 2638 padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s); 2639 } 2640 2641 button[data-size='md'][data-icon-right='true'][data-icon-left='false'] { 2642 padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l); 2643 } 2644 2645 button[data-size='lg'] { 2646 padding: var(--wui-spacing-m) var(--wui-spacing-2l); 2647 height: 48px; 2648 } 2649 2650 /* -- Variants --------------------------------------------------------- */ 2651 button[data-variant='main'] { 2652 background-color: var(--wui-color-accent-100); 2653 color: var(--wui-color-inverse-100); 2654 border: none; 2655 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 2656 } 2657 2658 button[data-variant='inverse'] { 2659 background-color: var(--wui-color-inverse-100); 2660 color: var(--wui-color-inverse-000); 2661 border: none; 2662 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 2663 } 2664 2665 button[data-variant='accent'] { 2666 background-color: var(--wui-color-accent-glass-010); 2667 color: var(--wui-color-accent-100); 2668 border: none; 2669 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 2670 } 2671 2672 button[data-variant='accent-error'] { 2673 background: var(--wui-color-error-glass-015); 2674 color: var(--wui-color-error-100); 2675 border: none; 2676 box-shadow: inset 0 0 0 1px var(--wui-color-error-glass-010); 2677 } 2678 2679 button[data-variant='accent-success'] { 2680 background: var(--wui-color-success-glass-015); 2681 color: var(--wui-color-success-100); 2682 border: none; 2683 box-shadow: inset 0 0 0 1px var(--wui-color-success-glass-010); 2684 } 2685 2686 button[data-variant='neutral'] { 2687 background: transparent; 2688 color: var(--wui-color-fg-100); 2689 border: none; 2690 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 2691 } 2692 2693 /* -- Focus states --------------------------------------------------- */ 2694 button[data-variant='main']:focus-visible:enabled { 2695 background-color: var(--wui-color-accent-090); 2696 box-shadow: 2697 inset 0 0 0 1px var(--wui-color-accent-100), 2698 0 0 0 4px var(--wui-color-accent-glass-020); 2699 } 2700 button[data-variant='inverse']:focus-visible:enabled { 2701 background-color: var(--wui-color-inverse-100); 2702 box-shadow: 2703 inset 0 0 0 1px var(--wui-color-gray-glass-010), 2704 0 0 0 4px var(--wui-color-accent-glass-020); 2705 } 2706 button[data-variant='accent']:focus-visible:enabled { 2707 background-color: var(--wui-color-accent-glass-010); 2708 box-shadow: 2709 inset 0 0 0 1px var(--wui-color-accent-100), 2710 0 0 0 4px var(--wui-color-accent-glass-020); 2711 } 2712 button[data-variant='accent-error']:focus-visible:enabled { 2713 background: var(--wui-color-error-glass-015); 2714 box-shadow: 2715 inset 0 0 0 1px var(--wui-color-error-100), 2716 0 0 0 4px var(--wui-color-error-glass-020); 2717 } 2718 button[data-variant='accent-success']:focus-visible:enabled { 2719 background: var(--wui-color-success-glass-015); 2720 box-shadow: 2721 inset 0 0 0 1px var(--wui-color-success-100), 2722 0 0 0 4px var(--wui-color-success-glass-020); 2723 } 2724 button[data-variant='neutral']:focus-visible:enabled { 2725 background: var(--wui-color-gray-glass-005); 2726 box-shadow: 2727 inset 0 0 0 1px var(--wui-color-gray-glass-010), 2728 0 0 0 4px var(--wui-color-gray-glass-002); 2729 } 2730 2731 /* -- Hover & Active states ----------------------------------------------------------- */ 2732 button[data-variant='main']:hover:enabled { 2733 background-color: var(--wui-color-accent-090); 2734 } 2735 2736 button[data-variant='main']:active:enabled { 2737 background-color: var(--wui-color-accent-080); 2738 } 2739 2740 button[data-variant='inverse']:hover:enabled { 2741 background-color: var(--wui-color-inverse-100); 2742 } 2743 2744 button[data-variant='accent']:hover:enabled { 2745 background-color: var(--wui-color-accent-glass-010); 2746 } 2747 2748 button[data-variant='accent-error']:hover:enabled { 2749 background: var(--wui-color-error-glass-015); 2750 color: var(--wui-color-error-100); 2751 } 2752 2753 button[data-variant='accent-success']:hover:enabled { 2754 background: var(--wui-color-success-glass-015); 2755 color: var(--wui-color-success-100); 2756 } 2757 2758 button[data-variant='neutral']:hover:enabled { 2759 background: var(--wui-color-gray-glass-005); 2760 } 2761 2762 button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] { 2763 padding-left: var(--wui-spacing-m); 2764 } 2765 2766 button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] { 2767 padding-right: var(--wui-spacing-m); 2768 } 2769 2770 /* -- Disabled state --------------------------------------------------- */ 2771 button:disabled { 2772 background-color: var(--wui-color-gray-glass-002); 2773 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 2774 color: var(--wui-color-gray-glass-020);
2775 cursor: not-allowed; 2776 } 2777 2778 button > wui-text { 2779 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 2780 will-change: opacity; 2781 opacity: var(--local-opacity-100); 2782 } 2783 2784 ::slotted(*) { 2785 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 2786 will-change: opacity; 2787 opacity: var(--local-opacity-100); 2788 } 2789 2790 wui-loading-spinner { 2791 position: absolute; 2792 left: 50%; 2793 top: 50%; 2794 transform: translate(-50%, -50%); 2795 opacity: var(--local-opacity-000); 2796 } 2797`;var fr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};const mr={main:"inverse-100",inverse:"inverse-000",accent:"accent-100","accent-error":"error-100","accent-success":"success-100",neutral:"fg-100",disabled:"gray-glass-020"},gr={lg:"paragraph-600",md:"small-600"},yr={lg:"md",md:"md"};let vr=class extends pe{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="main",this.hasIconLeft=!1,this.hasIconRight=!1,this.borderRadius="m"}render(){this.style.cssText=`\n --local-width: ${this.fullWidth?"100%":"auto"};\n --local-opacity-100: ${this.loading?0:1};\n --local-opacity-000: ${this.loading?1:0};\n --local-border-radius: var(--wui-border-radius-${this.borderRadius});\n `;const e=this.textVariant??gr[this.size];return K` 2798 <button 2799 data-variant=${this.variant} 2800 data-icon-left=${this.hasIconLeft} 2801 data-icon-right=${this.hasIconRight} 2802 data-size=${this.size} 2803 ?disabled=${this.disabled} 2804 ontouchstart 2805 > 2806 ${this.loadingTemplate()} 2807 <slot name="iconLeft" @slotchange=${()=>this.handleSlotLeftChange()}></slot> 2808 <wui-text variant=${e} color="inherit"> 2809 <slot></slot> 2810 </wui-text> 2811 <slot name="iconRight" @slotchange=${()=>this.handleSlotRightChange()}></slot> 2812 </button> 2813 `}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){if(this.loading){const e=yr[this.size],t=this.disabled?mr.disabled:mr[this.variant];return K`<wui-loading-spinner color=${t} size=${e}></wui-loading-spinner>`}return K``}};vr.styles=[Ce,Ae,pr],fr([Oe()],vr.prototype,"size",void 0),fr([Oe({type:Boolean})],vr.prototype,"disabled",void 0),fr([Oe({type:Boolean})],vr.prototype,"fullWidth",void 0),fr([Oe({type:Boolean})],vr.prototype,"loading",void 0),fr([Oe()],vr.prototype,"variant",void 0),fr([Oe({type:Boolean})],vr.prototype,"hasIconLeft",void 0),fr([Oe({type:Boolean})],vr.prototype,"hasIconRight",void 0),fr([Oe()],vr.prototype,"borderRadius",void 0),fr([Oe()],vr.prototype,"textVariant",void 0),vr=fr([Ie("wui-button")],vr);const wr=Z`<svg viewBox="0 0 48 54" fill="none"> 2814 <path 2815 d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z" 2816 /> 2817</svg>`,br=l` 2818 :host { 2819 display: flex; 2820 flex-direction: column; 2821 align-items: center; 2822 width: 76px; 2823 row-gap: var(--wui-spacing-xs); 2824 padding: var(--wui-spacing-xs) 10px; 2825 background-color: var(--wui-color-gray-glass-002); 2826 border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); 2827 position: relative; 2828 } 2829 2830 wui-shimmer[data-type='network'] { 2831 border: none; 2832 -webkit-clip-path: var(--wui-path-network); 2833 clip-path: var(--wui-path-network); 2834 } 2835 2836 svg { 2837 position: absolute; 2838 width: 48px; 2839 height: 54px; 2840 z-index: 1; 2841 } 2842 2843 svg > path { 2844 stroke: var(--wui-color-gray-glass-010); 2845 stroke-width: 1px; 2846 } 2847`;var xr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Er=class extends pe{constructor(){super(...arguments),this.type="wallet"}render(){return K` 2848 ${this.shimmerTemplate()} 2849 <wui-shimmer width="56px" height="20px" borderRadius="xs"></wui-shimmer> 2850 `}shimmerTemplate(){return"network"===this.type?K` <wui-shimmer 2851 data-type=${this.type} 2852 width="48px" 2853 height="54px" 2854 borderRadius="xs" 2855 ></wui-shimmer> 2856 ${wr}`:K`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}};Er.styles=[Ce,Ae,br],xr([Oe()],Er.prototype,"type",void 0),Er=xr([Ie("wui-card-select-loader")],Er);const _r=Z` 2857 <svg fill="none" viewBox="0 0 36 40"> 2858 <path 2859 d="M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.
285961 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z" 2860 /> 2861 </svg> 2862`,kr=Z`<svg width="86" height="96" fill="none"> 2863 <path 2864 d="M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z" 2865 /> 2866</svg>`,Cr=l` 2867 :host { 2868 position: relative; 2869 border-radius: inherit; 2870 display: flex; 2871 justify-content: center; 2872 align-items: center; 2873 width: var(--local-width); 2874 height: var(--local-height); 2875 } 2876 2877 svg { 2878 position: absolute; 2879 top: 0; 2880 left: 0; 2881 width: 100%; 2882 height: 100%; 2883 z-index: 1; 2884 fill: var(--wui-color-gray-glass-002); 2885 } 2886 2887 svg > path { 2888 stroke: var(--local-stroke); 2889 } 2890 2891 wui-image { 2892 width: 100%; 2893 height: 100%; 2894 -webkit-clip-path: var(--local-path); 2895 clip-path: var(--local-path); 2896 background: var(--wui-color-gray-glass-002); 2897 } 2898 2899 wui-icon { 2900 transform: translateY(-5%); 2901 width: var(--local-icon-size); 2902 height: var(--local-icon-size); 2903 } 2904`;var Ar=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Sr=class extends pe{constructor(){super(...arguments),this.size="md",this.name="uknown",this.selected=!1}render(){const e={sm:_r,md:wr,lg:kr};return this.style.cssText=`\n --local-stroke: ${this.selected?"var(--wui-color-accent-100)":"var(--wui-color-gray-glass-010)"};\n --local-path: var(--wui-path-network-${this.size});\n --local-width: var(--wui-width-network-${this.size});\n --local-height: var(--wui-height-network-${this.size});\n --local-icon-size: var(--wui-icon-size-network-${this.size});\n `,K`${this.templateVisual()} ${e[this.size]}`}templateVisual(){return this.imageSrc?K`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:K`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};Sr.styles=[Ce,Cr],Ar([Oe()],Sr.prototype,"size",void 0),Ar([Oe()],Sr.prototype,"name",void 0),Ar([Oe()],Sr.prototype,"imageSrc",void 0),Ar([Oe({type:Boolean})],Sr.prototype,"selected",void 0),Sr=Ar([Ie("wui-network-image")],Sr);const Ir=l` 2905 button { 2906 flex-direction: column; 2907 width: 76px; 2908 row-gap: var(--wui-spacing-xs); 2909 padding: var(--wui-spacing-xs) var(--wui-spacing-0); 2910 background-color: var(--wui-color-gray-glass-002); 2911 border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); 2912 } 2913 2914 button > wui-text { 2915 color: var(--wui-color-fg-100); 2916 max-width: var(--wui-icon-box-size-xl); 2917 white-space: nowrap; 2918 overflow: hidden; 2919 text-overflow: ellipsis; 2920 justify-content: center; 2921 } 2922 2923 button:hover:enabled { 2924 background-color: var(--wui-color-gray-glass-005); 2925 } 2926 2927 button:disabled > wui-text { 2928 color: var(--wui-color-gray-glass-015); 2929 } 2930 2931 [data-selected='true'] { 2932 background-color: var(--wui-color-accent-glass-020); 2933 } 2934 2935 @media (hover: hover) and (pointer: fine) { 2936 [data-selected='true']:hover:enabled { 2937 background-color: var(--wui-color-accent-glass-015); 2938 } 2939 } 2940 2941 [data-selected='true']:active:enabled { 2942 background-color: var(--wui-color-accent-glass-010); 2943 } 2944`;var Tr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Pr=class extends pe{constructor(){super(...arguments),this.name="Unknown",this.type="wallet",this.imageSrc=void 0,this.disabled=!1,this.selected=!1,this.installed=!1}render(){return K` 2945 <button data-selected=${Gn(this.selected)} ?disabled=${this.disabled} ontouchstart> 2946 ${this.imageTemplate()} 2947 <wui-text variant="tiny-500" color=${this.selected?"accent-100":"inherit"}> 2948 ${this.name} 2949 </wui-text> 2950 </button> 2951 `}imageTemplate(){return"network"===this.type?K` 2952 <wui-network-image 2953 .selected=${this.selected} 2954 imageSrc=${Gn(this.imageSrc)} 2955 name=${this.name} 2956 > 2957 </wui-network-image> 2958 `:K` 2959 <wui-wallet-image 2960 size="md" 2961 imageSrc=${Gn(this.imageSrc)} 2962 name=${this.name} 2963 .installed=${this.installed} 2964 badgeSize="sm" 2965 > 2966 </wui-wallet-image> 2967 `}};Pr.styles=[Ce,Ae,Ir],Tr([Oe()],Pr.prototype,"name",void 0),Tr([Oe()],Pr.prototype,"type",void 0),Tr([Oe()],Pr.prototype,"imageSrc",void 0),Tr([Oe({type:Boolean})],Pr.prototype,"disabled",void 0),Tr([Oe({type:Boolean})],Pr.prototype,"selected",void 0),Tr([Oe({type:Boolean})],Pr.prototype,"installed",void 0),Pr=Tr([Ie("wui-card-select")],Pr);const Nr=l` 2968 a { 2969 border: 1px solid var(--wui-color-gray-glass-010); 2970 border-radius: var(--wui-border-radius-3xl); 2971 } 2972 2973 wui-image { 2974 border-radius: var(--wui-border-radius-3xl); 2975 overflow: hidden; 2976 } 2977 2978 a.disabled > wui-icon, 2979 a.disabled > wui-image { 2980 filter: grayscale(1); 2981 } 2982 2983 a[data-variant='fill'] { 2984 color: var(--wui-color-inverse-100); 2985 background-color: var(--wui-color-accent-100); 2986 } 2987 2988 a[data-variant='shade'], 2989 a[data-variant='shadeSmall'] { 2990 background-color: transparent; 2991 background-color: var(--wui-color-gray-glass-010); 2992 color: var(--wui-color-fg-200); 2993 } 2994 2995 a[data-variant='success'] { 2996 column-gap: var(--wui-spacing-xxs); 2997 border: 1px solid var(--wui-color-success-glass-010); 2998 background-color: var(--wui-color-success-glass-010); 2999 color: var(--wui-color-success-100); 3000 } 3001 3002 a[data-variant='error'] { 3003 column-gap: var(--wui-spacing-xxs); 3004 border: 1px solid var(--wui-color-error-glass-010); 3005 background-color: var(--wui-color-error-glass-010); 3006 color: var(--wui-color-error-100); 3007 } 3008 3009 a[data-variant='transparent'] { 3010 column-gap: var(--wui-spacing-xxs); 3011 background-color: transparent; 3012 color: var(--wui-color-fg-150); 3013 } 3014 3015 a[data-variant='transparent'], 3016 a[data-variant='success'], 3017 a[data-variant='shadeSmall'], 3018 a[data-variant='error'] { 3019 padding: 7px var(--wui-spacing-s) 7px 10px; 3020 } 3021 3022 a[data-variant='transparent']:has(wui-text:first-child), 3023 a[data-variant='success']:has(wui-text:first-child), 3024 a[data-variant='shadeSmall']:has(wui-text:first-child), 3025 a[data-variant='error']:has(wui-text:first-child) { 3026 padding: 7px var(--wui-spacing-s); 3027 } 3028 3029 a[data-variant='fill'], 3030 a[data-variant='shade'] { 3031 column-gap: var(--wui-spacing-xs); 3032 padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs) 3033 var(--wui-spacing-xs); 3034 } 3035 3036 a[data-variant='fill']:has(wui-text:first-child), 3037 a[data-variant='shade']:has(wui-text:first-child) { 3038 padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m); 3039 } 3040 3041 a[data-variant='fill'] > wui-image, 3042 a[data-variant='shade'] > wui-image { 3043 width: 24px; 3044 height: 24px; 3045 } 3046 3047 a[data-variant='fill'] > wui-image { 3048 box-shadow: inset 0 0 0 1px var(--wui-color-accent-090); 3049 } 3050 3051 a[data-variant='shade'] > wui-image, 3052 a[data-variant='shadeSmall'] > wui-image { 3053 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 3054 } 3055 3056 a[data-variant='fill'] > wui-icon, 3057 a[data-variant='shade'] > wui-icon { 3058 width: 14px; 3059 height: 14px; 3060 } 3061 3062 a[data-variant='transparent'] > wui-image, 3063 a[data-variant='success'] > wui-image, 3064 a[data-variant='shadeSmall'] > wui-image, 3065 a[data-variant='error'] > wui-image { 3066 width: 14px; 3067 height: 14px; 3068 } 3069 3070 a[data-variant='transparent'] > wui-icon, 3071 a[data-variant='success'] > wui-icon, 3072 a[data-variant='shadeSmall'] > wui-icon, 3073 a[data-variant='error'] > wui-icon { 3074 width: 12px; 3075 height: 12px; 3076 } 3077 3078 a[data-variant='fill']:focus-visible { 3079 background-color: var(--wui-color-accent-090); 3080 } 3081 3082 a[data-variant='shade']:focus-visible, 3083 a[data-variant='shadeSmall']:focus-visible { 3084 background-color: var(--wui-color-gray-glass-015); 3085 } 3086 3087 a[data-variant='transparent']:focus-visible { 3088 background-color: var(--wui-color-gray-glass-005); 3089 } 3090 3091 a[data-variant='success']:focus-visible { 3092 background-color: var(--wui-color-success-glass-015); 3093 } 3094 3095 a[data-variant='error']:focus-visible { 3096 background-color: var(--wui-color-error-glass-015); 3097 } 3098 3099 a.disabled { 3100 color: var(--wui-color-gray-glass-015); 3101 background-color: var(--wui-color-gray-glass-015); 3102 pointer-events: none; 3103 } 3104 3105 @media (hover: hover) and (pointer: fine) { 3106 a[data-variant='fill']:hover { 3107 background-color: var(--wui-color-accent-090); 3108 } 3109 3110 a[data-variant='shade']:hover, 3111 a[data-variant='shadeSmall']:hover { 3112 background-color: var(--wui-color-gray-glass-015); 3113 } 3114 3115 a[data-variant='transparent']:hover { 3116 background-color: var(--wui-color-gray-glass-005); 3117 } 3118 3119 a[data-variant='success']:hover { 3120 background-color: var(--wui-color-success-glass-015); 3121 } 3122 3123 a[data-variant='error']:hover { 3124 background-color: var(--wui-color-error-glass-015); 3125 } 3126 } 3127 3128 a[data-variant='fill']:active { 3129 background-color: var(--wui-color-accent-080); 3130 } 3131 3132 a[data-variant='shade']:active, 3133 a[data-variant='shadeSmall']:active { 3134 background-color: var(--wui-color-gray-glass-020); 3135 } 3136 3137 a[data-variant='transparent']:active { 3138 background-color: var(--wui-color-gray-glass-010); 3139 } 3140 3141 a[data-variant='success']:active { 3142 background-color: var(--wui-color-success-glass-020); 3143 } 3144 3145 a[data-variant='error']:active { 3146 background-color: var(--wui-color-error-glass-020); 3147 } 3148`;var Rr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Or=class extends pe{constructor(){super(...arguments),this.variant="fill",this.imageSrc=void 0,this.disabled=!1,this.icon="externalLink",this.href="",this.text=void 0}render(){const e="success"===this.variant||"transparent"===this.variant||"shadeSmall"===this.variant?"small-600":"paragraph-600";return K` 3149 <a 3150 rel="noreferrer" 3151 target="_blank" 3152 href=${this.href} 3153 class=${this.disabled?"disabled":""} 3154 data-variant=${this.variant} 3155 > 3156 ${this.imageTemplate()} 3157 <wui-text variant=${e} color="inherit"> 3158 ${this.title?this.title:Kn.getHostName(this.href)} 3159 </wui-text> 3160 <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon> 3161 </a> 3162 `}imageTemplate(){return this.imageSrc?K`<wui-image src=${this.imageSrc}></wui-image>`:null}};Or.styles=[Ce,Ae,Nr],Rr([Oe()],Or.prototype,"variant",void 0),Rr([Oe()],Or.prototype,"imageSrc",void 0),Rr([Oe({type:Boolean})],Or.prototype,"disabled",void 0),Rr([Oe()],Or.prototype,"icon",void 0),Rr([Oe()],Or.prototype,"href",void 0),Rr([Oe()],Or.prototype,"text",void 0),Or=Rr([Ie("wui-chip")],Or);const Mr=l` 3163 :host { 3164 position: relative; 3165 display: block; 3166 } 3167 3168 button { 3169 background: var(--wui-color-accent-100); 3170 border: 1px solid var(--wui-color-gray-glass-010); 3171 border-radius: var(--wui-border-radius-m); 3172 gap: var(--wui-spacing-xs); 3173 } 3174 3175 button.loading { 3176 background: var(--wui-color-gray-glass-010); 3177 border: 1px solid var(--wui-color-gray-glass-010); 3178 pointer-events: none; 3179 } 3180 3181 button:disabled { 3182 background-color: var(--wui-color-gray-glass-015); 3183 border: 1px solid var(--wui-color-gray-glass-010); 3184 } 3185 3186 button:disabled > wui-text { 3187 color: var(--wui-color-gray-glass-015); 3188 } 3189 3190 @media (hover: hover) and (pointer: fine) { 3191 button:hover:enabled { 3192 background-color: var(--wui-color-accent-090); 3193 } 3194 3195 button:active:enabled { 3196 background-color: var(--wui-color-accent-080); 3197 } 3198 } 3199 3200 button:focus-visible { 3201 border: 1px solid var(--wui-color-gray-glass-010); 3202 background-color: var(--wui-color-accent-090);
3203 -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); 3204 -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); 3205 box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); 3206 } 3207 3208 button[data-size='sm'] { 3209 padding: 6.75px 10px 7.25px; 3210 } 3211 3212 ::slotted(*) { 3213 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 3214 will-change: opacity; 3215 opacity: var(--local-opacity-100); 3216 } 3217 3218 button > wui-text { 3219 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 3220 will-change: opacity; 3221 opacity: var(--local-opacity-100); 3222 color: var(--wui-color-inverse-100); 3223 } 3224 3225 button[data-size='md'] { 3226 padding: 9px var(--wui-spacing-l) 9px var(--wui-spacing-l); 3227 } 3228 3229 button[data-size='md'] + wui-text { 3230 padding-left: var(--wui-spacing-3xs); 3231 } 3232 3233 @media (max-width: 500px) { 3234 button[data-size='md'] { 3235 height: 32px; 3236 padding: 5px 12px; 3237 } 3238 3239 button[data-size='md'] > wui-text > slot { 3240 font-size: 14px !important; 3241 } 3242 } 3243 3244 wui-loading-spinner { 3245 width: 14px; 3246 height: 14px; 3247 } 3248 3249 wui-loading-spinner::slotted(svg) { 3250 width: 10px !important; 3251 height: 10px !important; 3252 } 3253 3254 button[data-size='sm'] > wui-loading-spinner { 3255 width: 12px; 3256 height: 12px; 3257 } 3258`;var jr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Lr=class extends pe{constructor(){super(...arguments),this.size="md",this.loading=!1}render(){const e="md"===this.size?"paragraph-600":"small-600";return K` 3259 <button data-size=${this.size} ?disabled=${this.loading} ontouchstart> 3260 ${this.loadingTemplate()} 3261 <wui-text variant=${e} color=${this.loading?"accent-100":"inherit"}> 3262 <slot></slot> 3263 </wui-text> 3264 </button> 3265 `}loadingTemplate(){return this.loading?K`<wui-loading-spinner size=${this.size} color="accent-100"></wui-loading-spinner>`:null}};Lr.styles=[Ce,Ae,Mr],jr([Oe()],Lr.prototype,"size",void 0),jr([Oe({type:Boolean})],Lr.prototype,"loading",void 0),Lr=jr([Ie("wui-connect-button")],Lr);const Dr=l` 3266 wui-flex { 3267 width: 100%; 3268 background-color: var(--wui-color-gray-glass-002); 3269 border-radius: var(--wui-border-radius-xs); 3270 } 3271`;var Br=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ur=class extends pe{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return K` 3272 <wui-flex 3273 justifyContent="space-between" 3274 alignItems="center" 3275 .padding=${["1xs","2l","1xs","2l"]} 3276 > 3277 <wui-text variant="paragraph-500" color="fg-200">${this.label}</wui-text> 3278 <wui-chip-button size="sm" variant="shade" text=${this.buttonLabel} icon="chevronRight"> 3279 </wui-chip-button> 3280 </wui-flex> 3281 `}};Ur.styles=[Ce,Ae,Dr],Br([Oe({type:Boolean})],Ur.prototype,"disabled",void 0),Br([Oe()],Ur.prototype,"label",void 0),Br([Oe()],Ur.prototype,"buttonLabel",void 0),Ur=Br([Ie("wui-cta-button")],Ur);const Fr=l` 3282 :host { 3283 display: block; 3284 padding: var(--wui-spacing-l) var(--wui-spacing-m); 3285 background-color: var(--wui-color-gray-glass-002); 3286 border-radius: var(--wui-border-radius-xs); 3287 width: 100%; 3288 } 3289`;var $r=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let zr=class extends pe{render(){return K` 3290 <wui-flex gap="xl" flexDirection="column" justifyContent="space-between" alignItems="center"> 3291 <slot></slot> 3292 </wui-flex> 3293 `}};zr.styles=[Ce,Ae,Fr],zr=$r([Ie("wui-details-group")],zr);const Hr=l` 3294 :host { 3295 display: flex; 3296 flex-direction: row; 3297 gap: var(--wui-spacing-l); 3298 width: 100%; 3299 border-radius: var(--wui-border-radius-xs); 3300 } 3301`;var Wr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let qr=class extends pe{constructor(){super(...arguments),this.name=""}render(){return K` 3302 <wui-flex justifyContent="space-between" alignItems="center"> 3303 <wui-text variant="paragraph-500" color="fg-200">${this.name}</wui-text> 3304 <wui-flex gap="xs" alignItems="center"> 3305 <slot></slot> 3306 </wui-flex> 3307 </wui-flex> 3308 `}};qr.styles=[Ce,Ae,Hr],Wr([Oe()],qr.prototype,"name",void 0),qr=Wr([Ie("wui-details-group-item")],qr);const{I:Vr}=de,Gr=(e,t)=>{const n=e._$AN;if(void 0===n)return!1;for(const r of n)r._$AO?.(t,!1),Gr(r,t);return!0},Kr=e=>{let t,n;do{if(void 0===(t=e._$AM))break;n=t._$AN,n.delete(e),e=t}while(0===n?.size)},Zr=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(void 0===n)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),Jr(t)}};function Yr(e){void 0!==this._$AN?(Kr(this),this._$AM=e,Zr(this)):this._$AM=e}function Qr(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(t)if(Array.isArray(r))for(let s=n;s<r.length;s++)Gr(r[s],!1),Kr(r[s]);else null!=r&&(Gr(r,!1),Kr(r));else Gr(this,e)}const Jr=e=>{e.type==mn&&(e._$AP??=Qr,e._$AQ??=Yr)};class Xr extends yn{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),Zr(this),this.isConnected=e._$AU}_$AO(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(Gr(this,e),Kr(this))}setValue(e){if((e=>void 0===e.strings)(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}const ei=()=>new ti;class ti{}const ni=new WeakMap,ri=gn(class extends Xr{render(e){return Q}update(e,t){let[n]=t;const r=n!==this.Y;return r&&void 0!==this.Y&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.Y=n,this.ht=e.options?.host,this.rt(this.ct=e.element)),Q}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.Y){const t=this.ht??globalThis;let n=ni.get(t);void 0===n&&(n=new WeakMap,ni.set(t,n)),void 0!==n.get(this.Y)&&this.Y.call(this.ht,void 0),n.set(this.Y,e),void 0!==e&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){return"function"==typeof this.Y?ni.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),ii=l` 3309 :host { 3310 position: relative; 3311 width: 100%; 3312 display: inline-block; 3313 color: var(--wui-color-fg-275); 3314 } 3315 3316 input { 3317 width: 100%; 3318 border-radius: var(--wui-border-radius-xs); 3319 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 3320 background: var(--wui-color-gray-glass-002); 3321 font-size: var(--wui-font-size-paragraph); 3322 letter-spacing: var(--wui-letter-spacing-paragraph); 3323 color: var(--wui-color-fg-100); 3324 transition: 3325 background-color var(--wui-ease-inout-power-1) var(--wui-duration-md), 3326 border-color var(--wui-ease-inout-power-1) var(--wui-duration-md), 3327 box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md); 3328 will-change: background-color, border-color, box-shadow; 3329 caret-color: var(--wui-color-accent-100); 3330 } 3331 3332 input:disabled {
3333 cursor: not-allowed; 3334 border: 1px solid var(--wui-color-gray-glass-010); 3335 } 3336 3337 input:disabled::placeholder, 3338 input:disabled + wui-icon { 3339 color: var(--wui-color-fg-300); 3340 } 3341 3342 input::placeholder { 3343 color: var(--wui-color-fg-275); 3344 } 3345 3346 input:focus:enabled { 3347 background-color: var(--wui-color-gray-glass-005); 3348 -webkit-box-shadow: 3349 inset 0 0 0 1px var(--wui-color-accent-100), 3350 0px 0px 0px 4px var(--wui-box-shadow-blue); 3351 -moz-box-shadow: 3352 inset 0 0 0 1px var(--wui-color-accent-100), 3353 0px 0px 0px 4px var(--wui-box-shadow-blue); 3354 box-shadow: 3355 inset 0 0 0 1px var(--wui-color-accent-100), 3356 0px 0px 0px 4px var(--wui-box-shadow-blue); 3357 } 3358 3359 input:hover:enabled { 3360 background-color: var(--wui-color-gray-glass-005); 3361 } 3362 3363 wui-icon { 3364 position: absolute; 3365 top: 50%; 3366 transform: translateY(-50%); 3367 pointer-events: none; 3368 } 3369 3370 .wui-size-sm { 3371 padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s); 3372 } 3373 3374 wui-icon + .wui-size-sm { 3375 padding: 9px var(--wui-spacing-m) 10px 36px; 3376 } 3377 3378 wui-icon[data-input='sm'] { 3379 left: var(--wui-spacing-s); 3380 } 3381 3382 .wui-size-md { 3383 padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m); 3384 } 3385 3386 wui-icon + .wui-size-md, 3387 wui-loading-spinner + .wui-size-md { 3388 padding: 10.5px var(--wui-spacing-3xl) 10.5px var(--wui-spacing-3xl); 3389 } 3390 3391 wui-icon[data-input='md'] { 3392 left: var(--wui-spacing-l); 3393 } 3394 3395 .wui-size-lg { 3396 padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l); 3397 letter-spacing: var(--wui-letter-spacing-medium-title); 3398 font-size: var(--wui-font-size-medium-title); 3399 font-weight: var(--wui-font-weight-light); 3400 line-height: 130%; 3401 color: var(--wui-color-fg-100); 3402 height: 64px; 3403 } 3404 3405 .wui-padding-right-xs { 3406 padding-right: var(--wui-spacing-xs); 3407 } 3408 3409 .wui-padding-right-s { 3410 padding-right: var(--wui-spacing-s); 3411 } 3412 3413 .wui-padding-right-m { 3414 padding-right: var(--wui-spacing-m); 3415 } 3416 3417 .wui-padding-right-l { 3418 padding-right: var(--wui-spacing-l); 3419 } 3420 3421 .wui-padding-right-xl { 3422 padding-right: var(--wui-spacing-xl); 3423 } 3424 3425 .wui-padding-right-2xl { 3426 padding-right: var(--wui-spacing-2xl); 3427 } 3428 3429 .wui-padding-right-3xl { 3430 padding-right: var(--wui-spacing-3xl); 3431 } 3432 3433 .wui-padding-right-4xl { 3434 padding-right: var(--wui-spacing-4xl); 3435 } 3436 3437 .wui-padding-right-5xl { 3438 padding-right: var(--wui-spacing-5xl); 3439 } 3440 3441 wui-icon + .wui-size-lg, 3442 wui-loading-spinner + .wui-size-lg { 3443 padding-left: 50px; 3444 } 3445 3446 wui-icon[data-input='lg'] { 3447 left: var(--wui-spacing-l); 3448 } 3449 3450 .wui-size-mdl { 3451 padding: 17.25px var(--wui-spacing-m) 17.25px var(--wui-spacing-m); 3452 } 3453 wui-icon + .wui-size-mdl, 3454 wui-loading-spinner + .wui-size-mdl { 3455 padding: 17.25px var(--wui-spacing-3xl) 17.25px 40px; 3456 } 3457 wui-icon[data-input='mdl'] { 3458 left: var(--wui-spacing-m); 3459 } 3460 3461 input:placeholder-shown ~ ::slotted(wui-input-element), 3462 input:placeholder-shown ~ ::slotted(wui-icon) { 3463 opacity: 0; 3464 pointer-events: none; 3465 } 3466 3467 input::-webkit-outer-spin-button, 3468 input::-webkit-inner-spin-button { 3469 -webkit-appearance: none; 3470 margin: 0; 3471 } 3472 3473 input[type='number'] { 3474 -moz-appearance: textfield; 3475 } 3476 3477 ::slotted(wui-input-element), 3478 ::slotted(wui-icon) { 3479 position: absolute; 3480 top: 50%; 3481 transform: translateY(-50%); 3482 } 3483 3484 ::slotted(wui-input-element) { 3485 right: var(--wui-spacing-m); 3486 } 3487 3488 ::slotted(wui-icon) { 3489 right: 0px; 3490 } 3491`;var si=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let oi=class extends pe{constructor(){super(...arguments),this.inputElementRef=ei(),this.size="md",this.disabled=!1,this.placeholder="",this.type="text",this.value=""}render(){const e=`wui-padding-right-${this.inputRightPadding}`,t=`wui-size-${this.size}`,n={[t]:!0,[e]:Boolean(this.inputRightPadding)};return K`${this.templateIcon()} 3492 <input 3493 ${ri(this.inputElementRef)} 3494 class=${vn(n)} 3495 type=${this.type} 3496 enterkeyhint=${Gn(this.enterKeyHint)} 3497 ?disabled=${this.disabled} 3498 placeholder=${this.placeholder}
3499 @input=${this.dispatchInputChangeEvent.bind(this)} 3500 .value=${this.value||""} 3501 /> 3502 <slot></slot>`}templateIcon(){return this.icon?K`<wui-icon 3503 data-input=${this.size} 3504 size=${this.size} 3505 color="inherit" 3506 name=${this.icon} 3507 ></wui-icon>`:null}dispatchInputChangeEvent(){this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};oi.styles=[Ce,Ae,ii],si([Oe()],oi.prototype,"size",void 0),si([Oe()],oi.prototype,"icon",void 0),si([Oe({type:Boolean})],oi.prototype,"disabled",void 0),si([Oe()],oi.prototype,"placeholder",void 0),si([Oe()],oi.prototype,"type",void 0),si([Oe()],oi.prototype,"keyHint",void 0),si([Oe()],oi.prototype,"value",void 0),si([Oe()],oi.prototype,"inputRightPadding",void 0),oi=si([Ie("wui-input-text")],oi);const ai=l` 3508 :host { 3509 position: relative; 3510 display: inline-block; 3511 } 3512 3513 wui-text { 3514 margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m); 3515 } 3516`;var ci=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let li=class extends pe{constructor(){super(...arguments),this.disabled=!1}render(){return K` 3517 <wui-input-text 3518 placeholder="Email" 3519 icon="mail" 3520 size="mdl" 3521 .disabled=${this.disabled} 3522 .value=${this.value} 3523 data-testid="wui-email-input" 3524 ></wui-input-text> 3525 ${this.templateError()} 3526 `}templateError(){return this.errorMessage?K`<wui-text variant="tiny-500" color="error-100">${this.errorMessage}</wui-text>`:null}};li.styles=[Ce,ai],ci([Oe()],li.prototype,"errorMessage",void 0),ci([Oe({type:Boolean})],li.prototype,"disabled",void 0),ci([Oe()],li.prototype,"value",void 0),li=ci([Ie("wui-email-input")],li);const ui=l` 3527 :host { 3528 position: relative; 3529 width: 100%; 3530 display: inline-block; 3531 color: var(--wui-color-fg-275); 3532 } 3533 3534 .error { 3535 margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m); 3536 } 3537 3538 .base-name { 3539 position: absolute; 3540 right: 45px; 3541 top: 15px; 3542 text-align: right; 3543 } 3544`;var di=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let hi=class extends pe{constructor(){super(...arguments),this.disabled=!1,this.loading=!1}render(){return K` 3545 <wui-input-text 3546 value=${Gn(this.value)} 3547 ?disabled=${this.disabled} 3548 .value=${this.value||""} 3549 data-testId="wui-ens-input" 3550 inputRightPadding="5xl" 3551 > 3552 ${this.baseNameTemplate()} ${this.errorTemplate()}${this.loadingTemplate()} 3553 </wui-input-text> 3554 `}baseNameTemplate(){return K`<wui-text variant="paragraph-400" color="fg-200" class="base-name"> 3555 ${ye.oU.WC_NAME_SUFFIX} 3556 </wui-text>`}loadingTemplate(){return this.loading?K`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:null}errorTemplate(){return this.errorMessage?K`<wui-text variant="tiny-500" color="error-100" class="error" 3557 >${this.errorMessage}</wui-text 3558 >`:null}};hi.styles=[Ce,ui],di([Oe()],hi.prototype,"errorMessage",void 0),di([Oe({type:Boolean})],hi.prototype,"disabled",void 0),di([Oe()],hi.prototype,"value",void 0),di([Oe({type:Boolean})],hi.prototype,"loading",void 0),hi=di([Ie("wui-ens-input")],hi);const pi=l` 3559 button { 3560 border-radius: var(--local-border-radius); 3561 color: var(--wui-color-fg-100); 3562 padding: var(--local-padding); 3563 } 3564 3565 button:hover:enabled { 3566 background-color: var(--wui-color-gray-glass-005); 3567 } 3568 3569 @media (max-width: 700px) { 3570 button { 3571 padding: var(--wui-spacing-s); 3572 } 3573 } 3574 3575 button > wui-icon { 3576 pointer-events: none; 3577 } 3578 3579 button:disabled > wui-icon { 3580 color: var(--wui-color-bg-300) !important; 3581 } 3582 3583 button:disabled { 3584 background-color: transparent; 3585 } 3586`;var fi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let mi=class extends pe{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}
3586render(){const e="lg"===this.size?"--wui-border-radius-xs":"--wui-border-radius-xxs",t="lg"===this.size?"--wui-spacing-1xs":"--wui-spacing-2xs";return this.style.cssText=`\n --local-border-radius: var(${e});\n --local-padding: var(${t});\n`,K` 3587 <button ?disabled=${this.disabled} ontouchstart> 3588 <wui-icon color=${this.iconColor} size=${this.size} name=${this.icon}></wui-icon> 3589 </button> 3590 `}};mi.styles=[Ce,Ae,Se,pi],fi([Oe()],mi.prototype,"size",void 0),fi([Oe({type:Boolean})],mi.prototype,"disabled",void 0),fi([Oe()],mi.prototype,"icon",void 0),fi([Oe()],mi.prototype,"iconColor",void 0),mi=fi([Ie("wui-icon-link")],mi);const gi=l` 3591 button { 3592 background-color: var(--wui-color-fg-300); 3593 border-radius: var(--wui-border-radius-4xs); 3594 width: 16px; 3595 height: 16px; 3596 } 3597 3598 button:disabled { 3599 background-color: var(--wui-color-bg-300); 3600 } 3601 3602 wui-icon { 3603 color: var(--wui-color-bg-200) !important; 3604 } 3605 3606 button:focus-visible { 3607 background-color: var(--wui-color-fg-250); 3608 border: 1px solid var(--wui-color-accent-100); 3609 } 3610 3611 button:active:enabled { 3612 background-color: var(--wui-color-fg-225); 3613 } 3614 3615 @media (hover: hover) and (pointer: fine) { 3616 button:hover:enabled { 3617 background-color: var(--wui-color-fg-250); 3618 } 3619 } 3620`;var yi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let vi=class extends pe{constructor(){super(...arguments),this.icon="copy"}render(){return K` 3621 <button> 3622 <wui-icon color="inherit" size="xxs" name=${this.icon}></wui-icon> 3623 </button> 3624 `}};vi.styles=[Ce,Ae,gi],yi([Oe()],vi.prototype,"icon",void 0),vi=yi([Ie("wui-input-element")],vi);const wi=l` 3625 :host { 3626 position: relative; 3627 display: inline-block; 3628 } 3629 3630 input { 3631 width: 50px; 3632 height: 50px; 3633 background: var(--wui-color-gray-glass-010); 3634 border-radius: var(--wui-border-radius-xs); 3635 border: 1px solid var(--wui-color-gray-glass-005); 3636 font-family: var(--wui-font-family); 3637 font-size: var(--wui-font-size-large); 3638 font-weight: var(--wui-font-weight-regular); 3639 letter-spacing: var(--wui-letter-spacing-large); 3640 text-align: center; 3641 color: var(--wui-color-fg-100); 3642 caret-color: var(--wui-color-accent-100); 3643 transition: 3644 background-color var(--wui-ease-inout-power-1) var(--wui-duration-md), 3645 border-color var(--wui-ease-inout-power-1) var(--wui-duration-md), 3646 box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md); 3647 will-change: background-color, border-color, box-shadow; 3648 box-sizing: border-box; 3649 -webkit-appearance: none; 3650 -moz-appearance: textfield; 3651 padding: 0px; 3652 } 3653 3654 input::-webkit-outer-spin-button, 3655 input::-webkit-inner-spin-button { 3656 -webkit-appearance: none; 3657 margin: 0; 3658 } 3659 3660 input[type='number'] { 3661 -moz-appearance: textfield; 3662 } 3663 3664 input:disabled { 3665 cursor: not-allowed; 3666 border: 1px solid var(--wui-color-gray-glass-010); 3667 background: var(--wui-color-gray-glass-005); 3668 } 3669 3670 input:focus:enabled { 3671 background-color: var(--wui-color-gray-glass-015); 3672 border: 1px solid var(--wui-color-accent-100); 3673 -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); 3674 -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); 3675 box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); 3676 } 3677 3678 @media (hover: hover) and (pointer: fine) { 3679 input:hover:enabled { 3680 background-color: var(--wui-color-gray-glass-015); 3681 } 3682 } 3683`;var bi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let xi=class extends pe{constructor(){super(...arguments),this.disabled=!1,this.value=""}render(){return K`<input 3684 type="number" 3685 maxlength="1" 3686 inputmode="numeric" 3687 autofocus 3688 ?disabled=${this.disabled} 3689 value=${this.value} 3690 /> `}};xi.styles=[Ce,Ae,wi],bi([Oe({type:Boolean})],xi.prototype,"disabled",void 0),bi([Oe({type:String})],xi.prototype,"value",void 0),xi=bi([Ie("wui-input-numeric")],xi);const Ei=l` 3691 button { 3692 padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs); 3693 border-radius: var(--wui-border-radius-3xs); 3694 background-color: transparent; 3695 color: var(--wui-color-accent-100); 3696 } 3697 3698 button:disabled { 3699 background-color: transparent; 3700 color: var(--wui-color-gray-glass-015); 3701 } 3702 3703 button:hover { 3704 background-color: var(--wui-color-gray-glass-005); 3705 } 3706`;var _i=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let ki=class extends pe{constructor(){super(...arguments),this.disabled=!1,this.color="inherit"}render(){return K` 3707 <button ?disabled=${this.disabled} ontouchstart> 3708 <slot name="iconLeft"></slot> 3709 <wui-text variant="small-600" color=${this.color}> 3710 <slot></slot> 3711 </wui-text> 3712 <slot name="iconRight"></slot> 3713 </button> 3714 `}};ki.styles=[Ce,Ae,Ei],_i([Oe({type:Boolean})],ki.prototype,"disabled",void 0),_i([Oe()],ki.prototype,"color",void 0),ki=_i([Ie("wui-l
3714ink")],ki);const Ci=l` 3715 button { 3716 column-gap: var(--wui-spacing-s); 3717 padding: 11px 18px 11px var(--wui-spacing-s); 3718 width: 100%; 3719 background-color: var(--wui-color-gray-glass-002); 3720 border-radius: var(--wui-border-radius-xs); 3721 color: var(--wui-color-fg-250); 3722 transition: 3723 color var(--wui-ease-out-power-1) var(--wui-duration-md), 3724 background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 3725 will-change: color, background-color; 3726 } 3727 3728 button[data-iconvariant='square'], 3729 button[data-iconvariant='square-blue'] { 3730 padding: 6px 18px 6px 9px; 3731 } 3732 3733 button > wui-flex { 3734 flex: 1; 3735 } 3736 3737 button > wui-image { 3738 width: 32px; 3739 height: 32px; 3740 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 3741 border-radius: var(--wui-border-radius-3xl); 3742 } 3743 3744 button > wui-icon { 3745 width: 36px; 3746 height: 36px; 3747 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 3748 will-change: opacity; 3749 } 3750 3751 button > wui-icon-box[data-variant='blue'] { 3752 box-shadow: 0 0 0 2px var(--wui-color-accent-glass-005); 3753 } 3754 3755 button > wui-icon-box[data-variant='overlay'] { 3756 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 3757 } 3758 3759 button > wui-icon-box[data-variant='square-blue'] { 3760 border-radius: var(--wui-border-radius-3xs); 3761 position: relative; 3762 border: none; 3763 width: 36px; 3764 height: 36px; 3765 } 3766 3767 button > wui-icon-box[data-variant='square-blue']::after { 3768 content: ''; 3769 position: absolute; 3770 top: 0; 3771 bottom: 0; 3772 left: 0; 3773 right: 0; 3774 border-radius: inherit; 3775 border: 1px solid var(--wui-color-accent-glass-010); 3776 pointer-events: none; 3777 } 3778 3779 button > wui-icon:last-child { 3780 width: 14px; 3781 height: 14px; 3782 } 3783 3784 button:hover:enabled { 3785 background-color: var(--wui-color-gray-glass-005); 3786 } 3787 3788 button:disabled { 3789 background-color: var(--wui-color-gray-glass-015); 3790 color: var(--wui-color-gray-glass-015); 3791 } 3792 3793 button[data-loading='true'] > wui-icon { 3794 opacity: 0; 3795 } 3796 3797 wui-loading-spinner { 3798 position: absolute; 3799 right: 18px; 3800 top: 50%; 3801 transform: translateY(-50%); 3802 } 3803`;var Ai=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Si=class extends pe{constructor(){super(...arguments),this.variant="icon",this.disabled=!1,this.imageSrc=void 0,this.alt=void 0,this.chevron=!1,this.loading=!1}render(){return K` 3804 <button 3805 ?disabled=${!!this.loading||Boolean(this.disabled)} 3806 data-loading=${this.loading} 3807 data-iconvariant=${Gn(this.iconVariant)} 3808 ontouchstart 3809 > 3810 ${this.loadingTemplate()} ${this.visualTemplate()} 3811 <wui-flex gap="3xs"> 3812 <slot></slot> 3813 </wui-flex> 3814 ${this.chevronTemplate()} 3815 </button> 3816 `}visualTemplate(){if("image"===this.variant&&this.imageSrc)return K`<wui-image src=${this.imageSrc} alt=${this.alt??"list item"}></wui-image>`;if("square"===this.iconVariant&&this.icon&&"icon"===this.variant)return K`<wui-icon name=${this.icon}></wui-icon>`;if("icon"===this.variant&&this.icon&&this.iconVariant){const e=["blue","square-blue"].includes(this.iconVariant)?"accent-100":"fg-200",t="square-blue"===this.iconVariant?"mdl":"md",n=this.iconSize?this.iconSize:t;return K` 3817 <wui-icon-box 3818 data-variant=${this.iconVariant} 3819 icon=${this.icon} 3820 iconSize=${n} 3821 background="transparent" 3822 iconColor=${e} 3823 backgroundColor=${e} 3824 size=${t} 3825 ></wui-icon-box> 3826 `}return null}loadingTemplate(){return this.loading?K`<wui-loading-spinner color="fg-300"></wui-loading-spinner>`:K``}chevronTemplate(){return this.chevron?K`<wui-icon size="inherit" color="fg-200" name="chevronRight"></wui-icon>`:null}};var Ii;Si.styles=[Ce,Ae,Ci],Ai([Oe()],Si.prototype,"icon",void 0),Ai([Oe()],Si.prototype,"iconSize",void 0),Ai([Oe()],Si.prototype,"variant",void 0),Ai([Oe()],Si.prototype,"iconVariant",void 0),Ai([Oe({type:Boolean})],Si.prototype,"disabled",void 0),Ai([Oe()],Si.prototype,"imageSrc",void 0),Ai([Oe()],Si.prototype,"alt",void 0),Ai([Oe({type:Boolean})],Si.prototype,"chevron",void 0),Ai([Oe({type:Boolean}
3826)],Si.prototype,"loading",void 0),Si=Ai([Ie("wui-list-item")],Si),function(e){e.approve="approved",e.bought="bought",e.borrow="borrowed",e.burn="burnt",e.cancel="canceled",e.claim="claimed",e.deploy="deployed",e.deposit="deposited",e.execute="executed",e.mint="minted",e.receive="received",e.repay="repaid",e.send="sent",e.sell="sold",e.stake="staked",e.trade="swapped",e.unstake="unstaked",e.withdraw="withdrawn"}(Ii||(Ii={}));const Ti=l` 3827 :host > wui-flex { 3828 display: flex; 3829 justify-content: center; 3830 align-items: center; 3831 position: relative; 3832 width: 40px; 3833 height: 40px; 3834 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 3835 background-color: var(--wui-color-gray-glass-005); 3836 } 3837 3838 :host > wui-flex wui-image { 3839 display: block; 3840 } 3841 3842 :host > wui-flex, 3843 :host > wui-flex wui-image, 3844 .swap-images-container, 3845 .swap-images-container.nft, 3846 wui-image.nft { 3847 border-top-left-radius: var(--local-left-border-radius); 3848 border-top-right-radius: var(--local-right-border-radius); 3849 border-bottom-left-radius: var(--local-left-border-radius); 3850 border-bottom-right-radius: var(--local-right-border-radius); 3851 } 3852 3853 wui-icon { 3854 width: 20px; 3855 height: 20px; 3856 } 3857 3858 wui-icon-box { 3859 position: absolute; 3860 right: 0; 3861 bottom: 0; 3862 transform: translate(20%, 20%); 3863 } 3864 3865 .swap-images-container { 3866 position: relative; 3867 width: 40px; 3868 height: 40px; 3869 overflow: hidden; 3870 } 3871 3872 .swap-images-container wui-image:first-child { 3873 position: absolute; 3874 width: 40px; 3875 height: 40px; 3876 top: 0; 3877 left: 0%; 3878 clip-path: inset(0px calc(50% + 2px) 0px 0%); 3879 } 3880 3881 .swap-images-container wui-image:last-child { 3882 clip-path: inset(0px 0px 0px calc(50% + 2px)); 3883 } 3884`;var Pi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ni=class extends pe{constructor(){super(...arguments),this.images=[],this.secondImage={type:void 0,url:""}}render(){const[e,t]=this.images,n="NFT"===e?.type,r=n?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)",i=(t?.url?"NFT"===t.type:n)?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)";return this.style.cssText=`\n --local-left-border-radius: ${r};\n --local-right-border-radius: ${i};\n `,K`<wui-flex> ${this.templateVisual()} ${this.templateIcon()} </wui-flex>`}templateVisual(){const[e,t]=this.images,n=e?.type;return 2===this.images.length&&(e?.url||t?.url)?K`<div class="swap-images-container"> 3885 ${e?.url?K`<wui-image src=${e.url} alt="Transaction image"></wui-image>`:null} 3886 ${t?.url?K`<wui-image src=${t.url} alt="Transaction image"></wui-image>`:null} 3887 </div>`:e?.url?K`<wui-image src=${e.url} alt="Transaction image"></wui-image>`:"NFT"===n?K`<wui-icon size="inherit" color="fg-200" name="nftPlaceholder"></wui-icon>`:K`<wui-icon size="inherit" color="fg-200" name="coinPlaceholder"></wui-icon>`}templateIcon(){let e,t="accent-100";return e=this.getIcon(),this.status&&(t=this.getStatusColor()),e?K` 3888 <wui-icon-box 3889 size="xxs" 3890 iconColor=${t} 3891 backgroundColor=${t} 3892 background="opaque" 3893 icon=${e} 3894 ?border=${!0} 3895 borderColor="wui-color-bg-125" 3896 ></wui-icon-box> 3897 `:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():"trade"===this.type?"swapHorizontalBold":"approve"===this.type?"checkmark":"cancel"===this.type?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success-100";case"failed":return"error-100";case"pending":return"inverse-100";default:return"accent-100"}}};Ni.styles=[Ti],Pi([Oe()],Ni.prototype,"type",void 0),Pi([Oe()],Ni.prototype,"status",void 0),Pi([Oe()],Ni.prototype,"direction",void 0),Pi([Oe({type:Boolean})],Ni.prototype,"onlyDirectionIcon",void 0),Pi([Oe({type:Array})],Ni.prototype,"images",void 0),Pi([Oe({type:Object})],Ni.prototype,"secondImage",void 0),Ni=Pi([Ie("wui-transaction-visual")],Ni);const Ri=l` 3898 :host > wui-flex:first-child {
3899 align-items: center; 3900 column-gap: var(--wui-spacing-s); 3901 padding: 6.5px var(--wui-spacing-xs) 6.5px var(--wui-spacing-xs); 3902 width: 100%; 3903 } 3904 3905 :host > wui-flex:first-child wui-text:nth-child(1) { 3906 text-transform: capitalize; 3907 } 3908 3909 wui-transaction-visual { 3910 width: 40px; 3911 height: 40px; 3912 } 3913 3914 wui-flex { 3915 flex: 1; 3916 } 3917 3918 :host wui-flex wui-flex { 3919 overflow: hidden; 3920 } 3921 3922 :host .description-container wui-text span { 3923 word-break: break-all; 3924 } 3925 3926 :host .description-container wui-text { 3927 overflow: hidden; 3928 } 3929 3930 :host .description-separator-icon { 3931 margin: 0px 6px; 3932 } 3933 3934 :host wui-text > span { 3935 overflow: hidden; 3936 display: -webkit-box; 3937 -webkit-box-orient: vertical; 3938 -webkit-line-clamp: 1; 3939 } 3940`;var Oi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Mi=class extends pe{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[],this.price=[],this.amount=[],this.symbol=[]}render(){return K` 3941 <wui-flex> 3942 <wui-transaction-visual 3943 .status=${this.status} 3944 direction=${Gn(this.direction)} 3945 type=${this.type} 3946 onlyDirectionIcon=${Gn(this.onlyDirectionIcon)} 3947 .images=${this.images} 3948 ></wui-transaction-visual> 3949 <wui-flex flexDirection="column" gap="3xs"> 3950 <wui-text variant="paragraph-600" color="fg-100"> 3951 ${Ii[this.type]||this.type} 3952 </wui-text> 3953 <wui-flex class="description-container"> 3954 ${this.templateDescription()} ${this.templateSecondDescription()} 3955 </wui-flex> 3956 </wui-flex> 3957 <wui-text variant="micro-700" color="fg-300"><span>${this.date}</span></wui-text> 3958 </wui-flex> 3959 `}templateDescription(){const e=this.descriptions?.[0];return e?K` 3960 <wui-text variant="small-500" color="fg-200"> 3961 <span>${e}</span> 3962 </wui-text> 3963 `:null}templateSecondDescription(){const e=this.descriptions?.[1];return e?K` 3964 <wui-icon class="description-separator-icon" size="xxs" name="arrowRight"></wui-icon> 3965 <wui-text variant="small-400" color="fg-200"> 3966 <span>${e}</span> 3967 </wui-text> 3968 `:null}};Mi.styles=[Ce,Ri],Oi([Oe()],Mi.prototype,"type",void 0),Oi([Oe({type:Array})],Mi.prototype,"descriptions",void 0),Oi([Oe()],Mi.prototype,"date",void 0),Oi([Oe({type:Boolean})],Mi.prototype,"onlyDirectionIcon",void 0),Oi([Oe()],Mi.prototype,"status",void 0),Oi([Oe()],Mi.prototype,"direction",void 0),Oi([Oe({type:Array})],Mi.prototype,"images",void 0),Oi([Oe({type:Array})],Mi.prototype,"price",void 0),Oi([Oe({type:Array})],Mi.prototype,"amount",void 0),Oi([Oe({type:Array})],Mi.prototype,"symbol",void 0),Mi=Oi([Ie("wui-transaction-list-item")],Mi);const ji=l` 3969 :host > wui-flex:first-child { 3970 column-gap: var(--wui-spacing-s); 3971 padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); 3972 width: 100%; 3973 } 3974 3975 wui-flex { 3976 display: flex; 3977 flex: 1; 3978 } 3979`;var Li=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Di=class extends pe{render(){return K` 3980 <wui-flex alignItems="center"> 3981 <wui-shimmer width="40px" height="40px"></wui-shimmer> 3982 <wui-flex flexDirection="column" gap="2xs"> 3983 <wui-shimmer width="72px" height="16px" borderRadius="4xs"></wui-shimmer> 3984 <wui-shimmer width="148px" height="14px" borderRadius="4xs"></wui-shimmer> 3985 </wui-flex> 3986 <wui-shimmer width="24px" height="12px" borderRadius="5xs"></wui-shimmer> 3987 </wui-flex> 3988 `}};Di.styles=[Ce,ji],Di=Li([Ie("wui-transaction-list-item-loader")],Di);const Bi=l` 3989 :host { 3990 display: flex; 3991 justify-content: center;
3992 align-items: center; 3993 height: var(--wui-spacing-m); 3994 padding: 0 var(--wui-spacing-3xs) !important; 3995 border-radius: var(--wui-border-radius-5xs); 3996 } 3997 3998 :host > wui-text { 3999 transform: translateY(5%); 4000 } 4001 4002 :host([data-variant='main']) { 4003 background-color: var(--wui-color-accent-glass-015); 4004 color: var(--wui-color-accent-100); 4005 } 4006 4007 :host([data-variant='shade']) { 4008 background-color: var(--wui-color-gray-glass-010); 4009 color: var(--wui-color-fg-200); 4010 } 4011 4012 :host([data-variant='success']) { 4013 background-color: var(--wui-icon-box-bg-success-100); 4014 color: var(--wui-color-success-100); 4015 } 4016 4017 :host([data-variant='error']) { 4018 background-color: var(--wui-icon-box-bg-error-100); 4019 color: var(--wui-color-error-100); 4020 } 4021 4022 :host([data-size='lg']) { 4023 padding: 11px 5px !important; 4024 } 4025 4026 :host([data-size='lg']) > wui-text { 4027 transform: translateY(2%); 4028 } 4029`;var Ui=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Fi=class extends pe{constructor(){super(...arguments),this.variant="main",this.size="lg"}render(){this.dataset.variant=this.variant,this.dataset.size=this.size;const e="md"===this.size?"mini-700":"micro-700";return K` 4030 <wui-text data-variant=${this.variant} variant=${e} color="inherit"> 4031 <slot></slot> 4032 </wui-text> 4033 `}};Fi.styles=[Ce,Bi],Ui([Oe()],Fi.prototype,"variant",void 0),Ui([Oe()],Fi.prototype,"size",void 0),Fi=Ui([Ie("wui-tag")],Fi);const $i=l` 4034 button { 4035 column-gap: var(--wui-spacing-s); 4036 padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); 4037 width: 100%; 4038 background-color: var(--wui-color-gray-glass-002); 4039 border-radius: var(--wui-border-radius-xs); 4040 color: var(--wui-color-fg-100); 4041 } 4042 4043 button > wui-text:nth-child(2) { 4044 display: flex; 4045 flex: 1; 4046 } 4047 4048 button:hover:enabled { 4049 background-color: var(--wui-color-gray-glass-005); 4050 } 4051 4052 button:disabled { 4053 background-color: var(--wui-color-gray-glass-015); 4054 color: var(--wui-color-gray-glass-015); 4055 } 4056 4057 button:disabled > wui-tag { 4058 background-color: var(--wui-color-gray-glass-010); 4059 color: var(--wui-color-fg-300); 4060 } 4061 4062 wui-icon { 4063 color: var(--wui-color-fg-200) !important; 4064 } 4065`;var zi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Hi=class extends pe{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.installed=!1,this.disabled=!1,this.showAllWallets=!1}render(){return K` 4066 <button ?disabled=${this.disabled} ontouchstart> 4067 ${this.templateAllWallets()} ${this.templateWalletImage()} 4068 <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text> 4069 ${this.templateStatus()} 4070 </button> 4071 `}templateAllWallets(){return this.showAllWallets&&this.imageSrc?K` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `:this.showAllWallets&&this.walletIcon?K` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?K`<wui-wallet-image 4072 size="sm" 4073 imageSrc=${this.imageSrc} 4074 name=${this.name} 4075 .installed=${this.installed} 4076 ></wui-wallet-image>`:this.showAllWallets||this.imageSrc?null:K`<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>`}templateStatus(){return this.tagLabel&&this.tagVariant?K`<wui-tag variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`:this.icon?K`<wui-icon color="inherit" size="sm" name=${this.icon}></wui-icon>`:null}};Hi.styles=[Ce,Ae,$i],zi([Oe({type:Array})],Hi.prototype,"walletImages",void 0),zi([Oe()],Hi.prototype,"imageSrc",void 0),zi([Oe()],Hi.prototype,"name",void 0),zi([Oe()],Hi.prototype,"tagLabel",void 0),zi([Oe()],Hi.prototype,"tagVariant",void 0),zi([Oe()],Hi.prototype,"icon",void 0),zi([Oe()],Hi.prototype,"walletIcon",void 0),zi([Oe({type:Boolean})],Hi.prototype,"installed",void 0),zi([Oe({type:Boolean})],Hi.prototype,"disabled",void 0),zi([Oe({type:Boolean}
4076)],Hi.prototype,"showAllWallets",void 0),Hi=zi([Ie("wui-list-wallet")],Hi);const Wi=l` 4077 :host { 4078 display: flex; 4079 justify-content: center; 4080 align-items: center; 4081 width: 40px; 4082 height: 40px; 4083 border-radius: var(--wui-border-radius-3xl); 4084 border: 1px solid var(--wui-color-gray-glass-005); 4085 overflow: hidden; 4086 } 4087 4088 wui-icon { 4089 width: 100%; 4090 height: 100%; 4091 } 4092`;var qi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Vi=class extends pe{constructor(){super(...arguments),this.logo="google"}render(){return K`<wui-icon color="inherit" size="inherit" name=${this.logo}></wui-icon> `}};Vi.styles=[Ce,Wi],qi([Oe()],Vi.prototype,"logo",void 0),Vi=qi([Ie("wui-logo")],Vi);const Gi=l` 4093 :host { 4094 display: block; 4095 width: 100%; 4096 } 4097 4098 button { 4099 width: 100%; 4100 height: 56px; 4101 background: var(--wui-color-gray-glass-002); 4102 border-radius: var(--wui-border-radius-xs); 4103 } 4104`;var Ki=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Zi=class extends pe{constructor(){super(...arguments),this.logo="google",this.disabled=!1}render(){return K` 4105 <button ?disabled=${this.disabled} ontouchstart> 4106 <wui-logo logo=${this.logo}></wui-logo> 4107 </button> 4108 `}};Zi.styles=[Ce,Ae,Gi],Ki([Oe()],Zi.prototype,"logo",void 0),Ki([Oe({type:Boolean})],Zi.prototype,"disabled",void 0),Zi=Ki([Ie("wui-logo-select")],Zi);const Yi=l` 4109 :host { 4110 display: block; 4111 } 4112 4113 button { 4114 border-radius: var(--wui-border-radius-3xl); 4115 display: flex; 4116 gap: var(--wui-spacing-xs); 4117 padding: var(--wui-spacing-2xs) var(--wui-spacing-s) var(--wui-spacing-2xs) 4118 var(--wui-spacing-xs); 4119 border: 1px solid var(--wui-color-gray-glass-010); 4120 background-color: var(--wui-color-gray-glass-005); 4121 color: var(--wui-color-fg-100); 4122 } 4123 4124 button:disabled { 4125 border: 1px solid var(--wui-color-gray-glass-005); 4126 background-color: var(--wui-color-gray-glass-015); 4127 color: var(--wui-color-gray-glass-015); 4128 } 4129 4130 @media (hover: hover) and (pointer: fine) { 4131 button:hover:enabled { 4132 background-color: var(--wui-color-gray-glass-010); 4133 } 4134 4135 button:active:enabled { 4136 background-color: var(--wui-color-gray-glass-015); 4137 } 4138 } 4139 4140 wui-image, 4141 wui-icon-box { 4142 border-radius: var(--wui-border-radius-3xl); 4143 width: 24px; 4144 height: 24px; 4145 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 4146 } 4147`;var Qi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ji=class extends pe{constructor(){super(...arguments),this.imageSrc=void 0,this.isUnsupportedChain=void 0,this.disabled=!1}render(){return K` 4148 <button ?disabled=${this.disabled}> 4149 ${this.visualTemplate()} 4150 <wui-text variant="paragraph-600" color="inherit"> 4151 <slot></slot> 4152 </wui-text> 4153 </button> 4154 `}visualTemplate(){return this.isUnsupportedChain?K` 4155 <wui-icon-box 4156 size="sm" 4157 iconColor="error-100" 4158 backgroundColor="error-100" 4159 icon="warningCircle" 4160 ></wui-icon-box> 4161 `:this.imageSrc?K`<wui-image src=${this.imageSrc}></wui-image>`:K` 4162 <wui-icon-box 4163 size="sm" 4164 iconColor="inverse-100" 4165 backgroundColor="fg-100" 4166 icon="networkPlaceholder" 4167 ></wui-icon-box> 4168 `}};Ji.styles=[Ce,Ae,Yi],Qi([Oe()],Ji.prototype,"imageSrc",void 0),Qi([Oe({type:Boolean})],Ji.prototype,"isUnsupportedChain",void 0),Qi([Oe({type:Boolean})],Ji.prototype,"disabled",void 0),Ji=Qi([Ie("wui-network-button")],Ji);const Xi=l` 4169 :host { 4170 position: relative; 4171 display: block; 4172 } 4173`;var es=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let ts=class extends pe{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map((()=>"")),this.numerics=[],this.shouldInputBeEnabled=e=>this.values.slice(0,e).every((e=>""!==e)),this.handleKeyDown=(e,t)=>{const n=e.target,r=this.getInputElement(n);if(!r)return;
4173["ArrowLeft","ArrowRight","Shift","Delete"].includes(e.key)&&e.preventDefault();const i=r.selectionStart;switch(e.key){case"ArrowLeft":i&&r.setSelectionRange(i+1,i+1),this.focusInputField("prev",t);break;case"ArrowRight":case"Shift":this.focusInputField("next",t);break;case"Delete":case"Backspace":""===r.value?this.focusInputField("prev",t):this.updateInput(r,t,"")}},this.focusInputField=(e,t)=>{if("next"===e){const e=t+1;if(!this.shouldInputBeEnabled(e))return;const n=this.numerics[e<this.length?e:t],r=n?this.getInputElement(n):void 0;r&&(r.disabled=!1,r.focus())}if("prev"===e){const e=t-1,n=this.numerics[e>-1?e:t],r=n?this.getInputElement(n):void 0;r&&r.focus()}}}firstUpdated(){this.otp&&(this.values=this.otp.split(""));const e=this.shadowRoot?.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),this.numerics[0]?.focus()}render(){return K` 4174 <wui-flex gap="xxs" data-testid="wui-otp-input"> 4175 ${Array.from({length:this.length}).map(((e,t)=>K` 4176 <wui-input-numeric 4177 @input=${e=>this.handleInput(e,t)} 4178 @click=${e=>this.selectInput(e)} 4179 @keydown=${e=>this.handleKeyDown(e,t)} 4180 .disabled=${!this.shouldInputBeEnabled(t)} 4181 .value=${this.values[t]||""} 4182 > 4183 </wui-input-numeric> 4184 `))} 4185 </wui-flex> 4186 `}updateInput(e,t,n){const r=this.numerics[t],i=e||(r?this.getInputElement(r):void 0);i&&(i.value=n,this.values=this.values.map(((e,r)=>r===t?n:e)))}selectInput(e){const t=e.target;if(t){const e=this.getInputElement(t);e?.select()}}handleInput(e,t){const n=e.target,r=this.getInputElement(n);if(r){const n=r.value;if("insertFromPaste"===e.inputType)this.handlePaste(r,n,t);else{Kn.isNumber(n)&&e.data?(this.updateInput(r,t,e.data),this.focusInputField("next",t)):this.updateInput(r,t,"")}}this.dispatchInputChangeEvent()}handlePaste(e,t,n){const r=t[0];if(r&&Kn.isNumber(r)){this.updateInput(e,n,r);const i=t.substring(1);if(n+1<this.length&&i.length){const e=this.numerics[n+1],t=e?this.getInputElement(e):void 0;t&&this.handlePaste(t,i,n+1)}else this.focusInputField("next",n)}else this.updateInput(e,n,"")}getInputElement(e){return e.shadowRoot?.querySelector("input")?e.shadowRoot.querySelector("input"):null}dispatchInputChangeEvent(){const e=this.values.join("");this.dispatchEvent(new CustomEvent("inputChange",{detail:e,bubbles:!0,composed:!0}))}};ts.styles=[Ce,Xi],es([Oe({type:Number})],ts.prototype,"length",void 0),es([Oe({type:String})],ts.prototype,"otp",void 0),es([Me()],ts.prototype,"values",void 0),ts=es([Ie("wui-otp")],ts);var ns=n(8021);function rs(e,t,n){if(e===t)return!1;return(e-t<0?t-e:e-t)<=n+.1}const is={generate(e,t,n){const r="#141414",i=[],s=function(e,t){const n=Array.prototype.slice.call(ns.create(e,{errorCorrectionLevel:t}).modules.data,0),r=Math.sqrt(n.length);return n.reduce(((e,t,n)=>(n%r===0?e.push([t]):e[e.length-1].push(t))&&e),[])}(e,"Q"),o=t/s.length,a=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];a.forEach((e=>{let{x:t,y:n}=e;const c=(s.length-7)*o*t,l=(s.length-7)*o*n,u=.45;for(let s=0;s<a.length;s+=1){const e=o*(7-2*s);i.push(Z` 4187 <rect 4188 fill=${2===s?r:"transparent"} 4189 width=${0===s?e-5:e} 4190 rx= ${0===s?(e-5)*u:e*u} 4191 ry= ${0===s?(e-5)*u:e*u} 4192 stroke=${r} 4193 stroke-width=${0===s?5:0} 4194 height=${0===s?e-5:e} 4195 x= ${0===s?l+o*s+2.5:l+o*s} 4196 y= ${0===s?c+o*s+2.5:c+o*s} 4197 /> 4198 `)}}));const c=Math.floor((n+25)/o),l=s.length/2-c/2,u=s.length/2+c/2-1,d=[];s.forEach(((e,t)=>{e.forEach(((e,n)=>{if(s[t][n]&&!(t<7&&n<7||t>s.length-8&&n<7||t<7&&n>s.length-8)&&!(t>l&&t<u&&n>l&&n<u)){const e=t*o+o/2,r=n*o+o/2;d.push([e,r])}}))}));const h={};return d.forEach((e=>{let[t,n]=e;h[t]?h[t]?.push(n):h[t]=[n]})),Object.entries(h).map((e=>{let[t,n]=e;const r=n.filter((e=>n.every((t=>!rs(e,t,o)))));return[Number(t),r]})).forEach((e=>{let[t,n]=e;n.forEach((e=>{i.push(Z`<circle cx=${t} cy=${e} fill=${r} r=${o/2.5} />`)}))})),Object.entries(h).filter((e=>{let[t,n]=e;return n.length>1})).map((e=>{let[t,n]=e;const r=n.filter((e=>n.some((t=>rs(e,t,o)))));return[Number(t),r]})).map((e=>{let[t,n]=e;n.sort(((e,t)=>e<t?-1:1));const r=[];for(const i of n){const e=r.find((e=>e.some((e=>rs(i,e,o)))));e?e.push(i):r.push([i])}return[t,r.map((e=>[e[0],e[e.length-1]]))]}
4198)).forEach((e=>{let[t,n]=e;n.forEach((e=>{let[n,s]=e;i.push(Z` 4199 <line 4200 x1=${t} 4201 x2=${t} 4202 y1=${n} 4203 y2=${s} 4204 stroke=${r} 4205 stroke-width=${o/1.25} 4206 stroke-linecap="round" 4207 /> 4208 `)}))})),i}},ss=l` 4209 :host { 4210 position: relative; 4211 user-select: none; 4212 display: block; 4213 overflow: hidden; 4214 aspect-ratio: 1 / 1; 4215 width: var(--local-size); 4216 } 4217 4218 :host([data-theme='dark']) { 4219 border-radius: clamp(0px, var(--wui-border-radius-l), 40px); 4220 background-color: var(--wui-color-inverse-100); 4221 padding: var(--wui-spacing-l); 4222 } 4223 4224 :host([data-theme='light']) { 4225 box-shadow: 0 0 0 1px var(--wui-color-bg-125); 4226 background-color: var(--wui-color-bg-125); 4227 } 4228 4229 :host([data-clear='true']) > wui-icon { 4230 display: none; 4231 } 4232 4233 svg:first-child, 4234 wui-image, 4235 wui-icon { 4236 position: absolute; 4237 top: 50%; 4238 left: 50%; 4239 transform: translateY(-50%) translateX(-50%); 4240 } 4241 4242 wui-image { 4243 width: 25%; 4244 height: 25%; 4245 border-radius: var(--wui-border-radius-xs); 4246 } 4247 4248 wui-icon { 4249 width: 100%; 4250 height: 100%; 4251 color: #3396ff !important; 4252 transform: translateY(-50%) translateX(-50%) scale(0.25); 4253 } 4254`;var os=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let as=class extends pe{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`--local-size: ${this.size}px`,K`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){const e="light"===this.theme?this.size:this.size-32;return Z` 4255 <svg height=${e} width=${e}> 4256 ${is.generate(this.uri,e,this.arenaClear?0:e/4)} 4257 </svg> 4258 `}templateVisual(){return this.imageSrc?K`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:K`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};as.styles=[Ce,ss],os([Oe()],as.prototype,"uri",void 0),os([Oe({type:Number})],as.prototype,"size",void 0),os([Oe()],as.prototype,"theme",void 0),os([Oe()],as.prototype,"imageSrc",void 0),os([Oe()],as.prototype,"alt",void 0),os([Oe({type:Boolean})],as.prototype,"arenaClear",void 0),as=os([Ie("wui-qr-code")],as);const cs=l` 4259 :host { 4260 position: relative; 4261 display: inline-block; 4262 width: 100%; 4263 } 4264`;var ls=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let us=class extends pe{constructor(){super(...arguments),this.inputComponentRef=ei()}render(){return K` 4265 <wui-input-text 4266 ${ri(this.inputComponentRef)} 4267 placeholder="Search wallet" 4268 icon="search" 4269 type="search" 4270 enterKeyHint="search" 4271 size="sm" 4272 > 4273 <wui-input-element @click=${this.clearValue} icon="close"></wui-input-element> 4274 </wui-input-text> 4275 `}clearValue(){const e=this.inputComponentRef.value,t=e?.inputElementRef.value;t&&(t.value="",t.focus(),t.dispatchEvent(new Event("input")))}};us.styles=[Ce,cs],us=ls([Ie("wui-search-bar")],us);const ds=l` 4276 :host { 4277 display: flex; 4278 column-gap: var(--wui-spacing-xs); 4279 align-items: center; 4280 padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs); 4281 border-radius: var(--wui-border-radius-3xl); 4282 border: 1px solid var(--wui-color-gray-glass-005); 4283 box-sizing: border-box; 4284 max-height: 40px; 4285 background-color: var(--wui-color-bg-175); 4286 box-shadow: 4287 0px 14px 64px -4px rgba(0, 0, 0, 0.15), 4288 0px 8px 22px -6px rgba(0, 0, 0, 0.15); 4289 } 4290`;var hs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let ps=class extends pe{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message=""}render(){return K` 4291 <wui-icon-box 4292 size="sm" 4293 iconSize="xs" 4294 iconColor=${this.iconColor} 4295 backgroundColor=${this.backgroundColor} 4296 icon=${this.icon} 4297 background="opaque" 4298 ></wui-icon-box> 4299 <wui-text variant="paragraph-500" color="fg-100">${this.message}</wui-text> 4300 `}};ps.styles=[Ce,ds],hs([Oe()],ps.prototype,"backgroundColor",void 0),hs([Oe()],ps.prototype,"iconColor",void 0),hs([Oe()],ps.prototype,"icon",void 0),hs([Oe()],ps.prototype,"message",void 0),ps=hs([Ie("wui-snackbar")],ps);const fs=l` 4301 :host { 4302 display: inline-flex; 4303 background-color: var(--wui-color-gray-glass-002); 4304 border-radius: var(--wui-border-radius-3xl); 4305 padding: var(--wui-spacing-3xs); 4306 position: relative; 4307 height: 36px; 4308 overflow: hidden; 4309 } 4310 4311 :host::before { 4312 content: ''; 4313 position: absolute; 4314 pointer-events: none; 4315 top: 4px; 4316 left: 4px; 4317 display: block; 4318 width: var(--local-tab-width); 4319 height: 28px; 4320 border-radius: var(--wui-border-radius-3xl); 4321 background-color: var(--wui-color-gray-glass-002); 4322 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 4323 transform: translateX(calc(var(--local-tab) * var(--local-tab-width))); 4324 transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md); 4325 will-change: background-color, opacity; 4326 } 4327 4328 :host([data-type='flex'])::before { 4329 left: 3px; 4330 transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px))); 4331 } 4332 4333 :host([data-type='flex']) { 4334 display: flex; 4335 padding: 0px 0px 0px 12px; 4336 gap: 4px; 4337 } 4338 4339 :host([data-type='flex']) > button > wui-text { 4340 position: absolute; 4341 left: 18px; 4342 opacity: 0; 4343 } 4344 4345 button[data-active='true'] > wui-icon, 4346 button[data-active='true'] > wui-text { 4347 color: var(--wui-color-fg-100); 4348 } 4349 4350 button[data-active='false'] > wui-icon, 4351 button[data-active='false'] > wui-text { 4352 color: var(--wui-color-fg-200); 4353 } 4354 4355 button[data-active='true']:disabled, 4356 button[data-active='false']:disabled { 4357 background-color: transparent; 4358 opacity: 0.5;
4359 cursor: not-allowed; 4360 } 4361 4362 button[data-active='true']:disabled > wui-text { 4363 color: var(--wui-color-fg-200); 4364 } 4365 4366 button[data-active='false']:disabled > wui-text { 4367 color: var(--wui-color-fg-300); 4368 } 4369 4370 button > wui-icon, 4371 button > wui-text { 4372 pointer-events: none; 4373 transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md); 4374 will-change: color; 4375 } 4376 4377 button { 4378 width: var(--local-tab-width); 4379 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 4380 will-change: background-color; 4381 } 4382 4383 :host([data-type='flex']) > button { 4384 width: 34px; 4385 position: relative; 4386 display: flex; 4387 justify-content: flex-start; 4388 } 4389 4390 button:hover:enabled, 4391 button:active:enabled { 4392 background-color: transparent !important; 4393 } 4394 4395 button:hover:enabled > wui-icon, 4396 button:active:enabled > wui-icon { 4397 color: var(--wui-color-fg-125); 4398 } 4399 4400 button:hover:enabled > wui-text, 4401 button:active:enabled > wui-text { 4402 color: var(--wui-color-fg-125); 4403 } 4404 4405 button { 4406 border-radius: var(--wui-border-radius-3xl); 4407 } 4408`;var ms=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let gs=class extends pe{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth="100px",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=`\n --local-tab: ${this.activeTab};\n --local-tab-width: ${this.localTabWidth};\n `,this.dataset.type=this.isDense?"flex":"block",this.tabs.map(((e,t)=>{const n=t===this.activeTab;return K` 4409 <button 4410 ?disabled=${this.disabled} 4411 @click=${()=>this.onTabClick(t)} 4412 data-active=${n} 4413 data-testid="tab-${e.label?.toLowerCase()}" 4414 > 4415 ${this.iconTemplate(e)} 4416 <wui-text variant="small-600" color="inherit"> ${e.label} </wui-text> 4417 </button> 4418 `}))}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout((()=>{this.animateTabs(0,!0)}),0))}iconTemplate(e){return e.icon?K`<wui-icon size="xs" color="inherit" name=${e.icon}></wui-icon>`:null}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,t){const n=this.buttons[this.activeTab],r=this.buttons[e],i=n?.querySelector("wui-text"),s=r?.querySelector("wui-text"),o=r?.getBoundingClientRect(),a=s?.getBoundingClientRect();n&&i&&!t&&e!==this.activeTab&&(i.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),n.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),r&&o&&a&&s&&(e!==this.activeTab||t)&&(this.localTabWidth=`${Math.round(o.width+a.width)+6}px`,r.animate([{width:`${o.width+a.width}px`}],{duration:t?0:500,fill:"forwards",easing:"ease"}),s.animate([{opacity:1}],{duration:t?0:125,delay:t?0:200,fill:"forwards",easing:"ease"}))}};gs.styles=[Ce,Ae,fs],ms([Oe({type:Array})],gs.prototype,"tabs",void 0),ms([Oe()],gs.prototype,"onTabChange",void 0),ms([Oe({type:Array})],gs.prototype,"buttons",void 0),ms([Oe({type:Boolean})],gs.prototype,"disabled",void 0),ms([Oe()],gs.prototype,"localTabWidth",void 0),ms([Me()],gs.prototype,"activeTab",void 0),ms([Me()],gs.prototype,"isDense",void 0),gs=ms([Ie("wui-tabs")],gs);const ys=l` 4419 :host { 4420 display: block; 4421 } 4422 4423 :host > button { 4424 gap: var(--wui-spacing-xxs); 4425 padding: var(--wui-spacing-xs); 4426 padding-right: var(--wui-spacing-1xs); 4427 height: 40px; 4428 border-radius: var(--wui-border-radius-l); 4429 background: var(--wui-color-gray-glass-002); 4430 border-width: 0px; 4431 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 4432 } 4433 4434 :host > button wui-image { 4435 width: 24px; 4436 height: 24px; 4437 border-radius: var(--wui-border-radius-s); 4438 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 4439 } 4440`;var vs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let ws=class extends pe{constructor(){super(...arguments),this.text=""}render(){return K` 4441 <button ontouchstart> 4442 ${this.tokenTemplate()} 4443 <wui-text variant="paragraph-600" color="fg-100">${this.text}</wui-text> 4444 </button> 4445 `}tokenTemplate(){return this.imageSrc?K`<wui-image src=${this.imageSrc}></wui-image>`:K` 4446 <wui-icon-box 4447 size="sm" 4448 iconColor="fg-200" 4449 backgroundColor="fg-300" 4450 icon="networkPlaceholder" 4451 ></wui-icon-box> 4452 `}};ws.styles=[Ce,Ae,ys],vs([Oe()],ws.prototype,"imageSrc",void 0),vs([Oe()],ws.prototype,"text",void 0),ws=vs([Ie("wui-token-button")],ws);const bs=l` 4453 :host { 4454 display: block; 4455 padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s); 4456 border-radius: var(--wui-border-radius-xxs); 4457 4458 color: var(--wui-color-bg-100); 4459 position: relative; 4460 } 4461 4462 :host([data-variant='shade']) { 4463 background-color: var(--wui-color-bg-150); 4464 border: 1px solid var(--wui-color-gray-glass-005); 4465 } 4466 4467 :host([data-variant='shade']) > wui-text { 4468 color: var(--wui-color-fg-150); 4469 } 4470 4471 :host([data-variant='fill']) { 4472 background-color: var(--wui-color-fg-100); 4473 border: none; 4474 } 4475 4476 wui-icon { 4477 position: absolute; 4478 width: 12px !important; 4479 height: 4px !important; 4480 } 4481 4482 wui-icon[data-placement='top'] { 4483 bottom: 0px; 4484 left: 50%; 4485 transform: translate(-50%, 95%); 4486 } 4487 4488 wui-icon[data-placement='bottom'] { 4489 top: 0; 4490 left: 50%; 4491 transform: translate(-50%, -95%) rotate(180deg); 4492 } 4493 4494 wui-icon[data-placement='right'] { 4495 top: 50%; 4496 left: 0; 4497 transform: translate(-65%, -50%) rotate(90deg); 4498 } 4499 4500 wui-icon[data-placement='left'] { 4501 top: 50%; 4502 right: 0%; 4503 transform: translate(65%, -50%) rotate(270deg); 4504 } 4505`;var xs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Es=class extends pe{constructor(){super(...arguments),this.placement="top",this.variant="fill",this.message=""}render(){return this.dataset.variant=this.variant,K`<wui-icon 4506 data-placement=${this.placement} 4507 color="fg-100" 4508 size="inherit"
4509 name=${"fill"===this.variant?"cursor":"cursorTransparent"} 4510 ></wui-icon> 4511 <wui-text color="inherit" variant="small-500">${this.message}</wui-text>`}};Es.styles=[Ce,Ae,bs],xs([Oe()],Es.prototype,"placement",void 0),xs([Oe()],Es.prototype,"variant",void 0),xs([Oe()],Es.prototype,"message",void 0),Es=xs([Ie("wui-tooltip")],Es);const _s=l` 4512 :host > wui-flex { 4513 cursor: pointer; 4514 display: flex; 4515 column-gap: var(--wui-spacing-s); 4516 padding: var(--wui-spacing-xs); 4517 padding-right: var(--wui-spacing-l); 4518 width: 100%; 4519 background-color: transparent; 4520 border-radius: var(--wui-border-radius-xs); 4521 color: var(--wui-color-fg-250); 4522 transition: background-color 0.2s linear; 4523 } 4524 4525 :host > wui-flex:hover { 4526 background-color: var(--wui-color-gray-glass-002); 4527 } 4528 4529 :host([disabled]) > wui-flex { 4530 opacity: 0.6; 4531 } 4532 4533 :host([disabled]) > wui-flex:hover { 4534 background-color: transparent; 4535 } 4536 4537 :host > wui-flex > wui-flex { 4538 flex: 1; 4539 } 4540 4541 :host > wui-flex > wui-image { 4542 width: 40px; 4543 height: 40px; 4544 border-radius: var(--wui-border-radius-3xl); 4545 position: relative; 4546 } 4547 4548 :host > wui-flex > wui-image::after { 4549 position: absolute; 4550 content: ''; 4551 inset: 0; 4552 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 4553 border-radius: var(--wui-border-radius-l); 4554 } 4555 4556 button > wui-icon-box[data-variant='square-blue'] { 4557 border-radius: var(--wui-border-radius-3xs); 4558 position: relative; 4559 border: none; 4560 width: 36px; 4561 height: 36px; 4562 } 4563`;var ks=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Cs=class extends pe{constructor(){super(...arguments),this.imageSrc=void 0,this.name=void 0,this.symbol=void 0,this.price=void 0,this.amount=void 0}render(){const e=this.amount&&this.price?ye.Se.multiply(this.price,this.amount)?.toFixed(3):null;return K` 4564 <wui-flex alignItems="center"> 4565 ${this.visualTemplate()} 4566 <wui-flex flexDirection="column" gap="3xs"> 4567 <wui-flex justifyContent="space-between"> 4568 <wui-text variant="paragraph-500" color="fg-100">${this.name}</wui-text> 4569 ${e?K` 4570 <wui-text variant="paragraph-500" color="fg-100"> 4571 $${Kn.formatNumberToLocalString(e,3)} 4572 </wui-text> 4573 `:null} 4574 </wui-flex> 4575 <wui-flex justifyContent="space-between"> 4576 <wui-text variant="small-400" color="fg-200">${this.symbol}</wui-text> 4577 ${this.amount?K`<wui-text variant="small-400" color="fg-200"> 4578 ${Kn.formatNumberToLocalString(this.amount,4)} 4579 </wui-text>`:null} 4580 </wui-flex> 4581 </wui-flex> 4582 </wui-flex> 4583 `}visualTemplate(){return this.imageSrc?K`<wui-image width="40" height="40" src=${this.imageSrc}></wui-image>`:null}};Cs.styles=[Ce,Ae,_s],ks([Oe()],Cs.prototype,"imageSrc",void 0),ks([Oe()],Cs.prototype,"name",void 0),ks([Oe()],Cs.prototype,"symbol",void 0),ks([Oe()],Cs.prototype,"price",void 0),ks([Oe()],Cs.prototype,"amount",void 0),Cs=ks([Ie("wui-token-list-item")],Cs);const As=l` 4584 :host { 4585 display: flex; 4586 justify-content: center; 4587 align-items: center; 4588 width: var(--wui-icon-box-size-xl); 4589 height: var(--wui-icon-box-size-xl); 4590 box-shadow: 0 0 0 8px var(--wui-thumbnail-border); 4591 border-radius: var(--local-border-radius); 4592 overflow: hidden; 4593 } 4594 4595 wui-icon { 4596 width: 32px; 4597 height: 32px; 4598 } 4599`;var Ss=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Is=class extends pe{render(){return this.style.cssText=`--local-border-radius: ${this.borderRadiusFull?"1000px":"20px"};`,K`${this.templateVisual()}`}templateVisual(){return this.imageSrc?K`<wui-image src=${this.imageSrc} alt=${this.alt??""}></wui-image>`:K`<wui-icon 4600 data-parent-size="md" 4601 size="inherit" 4602 color="inherit" 4603 name="walletPlaceholder" 4604 ></wui-icon>`}};Is.styles=[Ce,As],Ss([Oe()],Is.prototype,"imageSrc",void 0),Ss([Oe()],Is.prototype,"alt",void 0),Ss([Oe({type:Boolean})],Is.prototype,"borderRadiusFull",void 0),Is=Ss([Ie("wui-visual-thumbnail")],Is);const Ts=l` 4605 :host { 4606 display: block; 4607 } 4608 4609 button { 4610 width: 100%; 4611 display: block; 4612 padding-top: var(--wui-spacing-l); 4613 padding-bottom: var(--wui-spacing-l); 4614 padding-left: var(--wui-spacing-s); 4615 padding-right: var(--wui-spacing-2l); 4616 border-radius: var(--wui-border-radius-s); 4617 background-color: var(--wui-color-accent-glass-015); 4618 } 4619 4620 button:hover { 4621 background-color: var(--wui-color-accent-glass-010) !important; 4622 } 4623 4624 button:active { 4625 background-color: var(--wui-color-accent-glass-020) !important; 4626 } 4627`;var Ps=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ns=class extends pe{constructor(){super(...arguments),this.label="",this.description="",this.icon="wallet"}render(){return K` 4628 <button> 4629 <wui-flex gap="m" alignItems="center" justifyContent="space-between"> 4630 <wui-icon-box 4631 size="lg" 4632 iconcolor="accent-100" 4633 backgroundcolor="accent-100" 4634 icon=${this.icon} 4635 background="transparent" 4636 ></wui-icon-box> 4637 4638 <wui-flex flexDirection="column" gap="3xs"> 4639 <wui-text variant="paragraph-500" color="fg-100">${this.label}</wui-text> 4640 <wui-text variant="small-400" color="fg-200">${this.description}</wui-text> 4641 </wui-flex> 4642 4643 <wui-icon size="md" color="fg-200" name="chevronRight"></wui-icon> 4644 </wui-flex> 4645 </button> 4646 `}};Ns.styles=[Ce,Ae,Ts],Ps([Oe()],Ns.prototype,"label",void 0),Ps([Oe()],Ns.prototype,"description",void 0),Ps([Oe()],Ns.prototype,"icon",void 0),Ns=Ps([Ie("wui-notice-card")],Ns);const Rs=l` 4647 button { 4648 height: auto; 4649 position: relative; 4650 flex-direction: column; 4651 gap: var(--wui-spacing-s); 4652 padding: 17px 18px 17px var(--wui-spacing-m); 4653 width: 100%; 4654 background-color: var(--wui-color-gray-glass-002); 4655 border-radius: var(--wui-border-radius-xs); 4656 color: var(--wui-color-fg-250); 4657 } 4658 4659 .overflowedContent { 4660 width: 100%; 4661 overflow: hidden; 4662 } 4663 4664 .overflowedContent[data-active='false']:after { 4665 content: ''; 4666 position: absolute; 4667 top: 50%; 4668 left: 0; 4669 right: 0; 4670 bottom: 0; 4671 background: linear-gradient(to top, var(--wui-color-bg-200), transparent); 4672 border-bottom-left-radius: var(--wui-border-radius-xs); 4673 border-bottom-right-radius: var(--wui-border-radius-xs); 4674 } 4675 4676 .heightContent { 4677 max-height: 100px; 4678 } 4679 4680 pre { 4681 text-align: left; 4682 white-space: pre-wrap; 4683 height: auto; 4684 overflow-x: auto;
4685 overflow-wrap: anywhere; 4686 } 4687`;var Os=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ms=class extends pe{constructor(){super(...arguments),this.textTitle="",this.overflowedContent="",this.toggled=!1,this.enableAccordion=!1,this.scrollElement=void 0,this.scrollHeightElement=0}updated(e){super.updated(e),(e.has("textTitle")||e.has("overflowedContent"))&&setTimeout((()=>{this.checkHeight()}),1)}checkHeight(){this.updateComplete.then((()=>{const e=this.shadowRoot?.querySelector(".heightContent"),t=this.shadowRoot?.querySelector(".textContent");if(e&&t){this.scrollElement=e;const n=t?.scrollHeight;n&&n>100&&(this.enableAccordion=!0,this.scrollHeightElement=n,this.requestUpdate())}}))}render(){return K` 4688 <button ontouchstart @click=${()=>this.onClick()}> 4689 <wui-flex justifyContent="space-between" alignItems="center"> 4690 <wui-text variant="paragraph-500" color="fg-100">${this.textTitle}</wui-text> 4691 ${this.chevronTemplate()} 4692 </wui-flex> 4693 <div 4694 data-active=${!this.enableAccordion||Boolean(this.toggled)} 4695 class="overflowedContent" 4696 > 4697 <div class="heightContent"> 4698 <wui-text class="textContent" variant="paragraph-400" color="fg-200"> 4699 <pre>${this.overflowedContent}</pre> 4700 </wui-text> 4701 </div> 4702 </div> 4703 </button> 4704 `}onClick(){const e=this.shadowRoot?.querySelector("wui-icon");this.enableAccordion&&(this.toggled=!this.toggled,this.requestUpdate(),this.scrollElement&&this.scrollElement.animate([{maxHeight:this.toggled?"100px":`${this.scrollHeightElement}px`},{maxHeight:this.toggled?`${this.scrollHeightElement}px`:"100px"}],{duration:300,fill:"forwards",easing:"ease"}),e&&e.animate([{transform:this.toggled?"rotate(0deg)":"rotate(180deg)"},{transform:this.toggled?"rotate(180deg)":"rotate(0deg)"}],{duration:300,fill:"forwards",easing:"ease"}))}chevronTemplate(){return this.enableAccordion?K` <wui-icon color="fg-100" size="sm" name="chevronBottom"></wui-icon>`:null}};Ms.styles=[Ce,Ae,Rs],Os([Oe()],Ms.prototype,"textTitle",void 0),Os([Oe()],Ms.prototype,"overflowedContent",void 0),Ms=Os([Ie("wui-list-accordion")],Ms);const js=l` 4705 :host { 4706 display: flex; 4707 column-gap: var(--wui-spacing-s); 4708 padding: 17px 18px 17px var(--wui-spacing-m); 4709 width: 100%; 4710 background-color: var(--wui-color-gray-glass-002); 4711 border-radius: var(--wui-border-radius-xs); 4712 color: var(--wui-color-fg-250); 4713 } 4714 4715 wui-image { 4716 width: var(--wui-icon-size-lg); 4717 height: var(--wui-icon-size-lg); 4718 border-radius: var(--wui-border-radius-3xl); 4719 } 4720 4721 wui-icon { 4722 width: var(--wui-icon-size-lg); 4723 height: var(--wui-icon-size-lg); 4724 } 4725`;var Ls=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ds=class extends pe{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return K` 4726 <wui-flex justifyContent="space-between" alignItems="center"> 4727 <wui-text variant="paragraph-500" color=${this.textValue?"fg-200":"fg-100"}> 4728 ${this.textTitle} 4729 </wui-text> 4730 ${this.templateContent()} 4731 </wui-flex> 4732 `}templateContent(){return this.imageSrc?K`<wui-image src=${this.imageSrc} alt=${this.textTitle}></wui-image>`:this.textValue?K` <wui-text variant="paragraph-400" color="fg-100"> ${this.textValue} </wui-text>`:K`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};Ds.styles=[Ce,Ae,js],Ls([Oe()],Ds.prototype,"imageSrc",void 0),Ls([Oe()],Ds.prototype,"textTitle",void 0),Ls([Oe()],Ds.prototype,"textValue",void 0),Ds=Ls([Ie("wui-l
4732ist-content")],Ds);const Bs=l` 4733 button { 4734 column-gap: var(--wui-spacing-s); 4735 padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); 4736 width: 100%; 4737 background-color: var(--wui-color-gray-glass-002); 4738 border-radius: var(--wui-border-radius-xs); 4739 color: var(--wui-color-fg-100); 4740 } 4741 4742 button > wui-text:nth-child(2) { 4743 display: flex; 4744 flex: 1; 4745 } 4746 4747 button[data-transparent='true'] { 4748 pointer-events: none; 4749 background-color: transparent; 4750 } 4751 4752 wui-icon { 4753 color: var(--wui-color-fg-200) !important; 4754 } 4755 4756 button:disabled { 4757 background-color: var(--wui-color-gray-glass-015); 4758 color: var(--wui-color-gray-glass-015); 4759 } 4760 4761 button:disabled > wui-tag { 4762 background-color: var(--wui-color-gray-glass-010); 4763 color: var(--wui-color-fg-300); 4764 } 4765`;var Us=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Fs=class extends pe{constructor(){super(...arguments),this.imageSrc="",this.name="",this.disabled=!1,this.transparent=!1}render(){return K` 4766 <button data-transparent=${this.transparent} ?disabled=${this.disabled} ontouchstart> 4767 ${this.templateNetworkImage()} 4768 <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text> 4769 </button> 4770 `}templateNetworkImage(){return this.imageSrc?K`<wui-network-image 4771 size="sm" 4772 imageSrc=${this.imageSrc} 4773 name=${this.name} 4774 ></wui-network-image>`:this.imageSrc?null:K`<wui-network-image size="sm" name=${this.name}></wui-network-image>`}};Fs.styles=[Ce,Ae,Bs],Us([Oe()],Fs.prototype,"imageSrc",void 0),Us([Oe()],Fs.prototype,"name",void 0),Us([Oe({type:Boolean})],Fs.prototype,"disabled",void 0),Us([Oe({type:Boolean})],Fs.prototype,"transparent",void 0),Fs=Us([Ie("wui-list-network")],Fs);const $s=l` 4775 :host { 4776 display: flex; 4777 flex-direction: column; 4778 gap: var(--wui-spacing-l); 4779 padding: 17px 18px 17px var(--wui-spacing-m); 4780 width: 100%; 4781 background-color: var(--wui-color-gray-glass-002); 4782 border-radius: var(--wui-border-radius-xs); 4783 color: var(--wui-color-fg-250); 4784 } 4785 4786 wui-image { 4787 width: var(--wui-icon-size-lg); 4788 height: var(--wui-icon-size-lg); 4789 border-radius: var(--wui-border-radius-3xl); 4790 } 4791 4792 wui-icon { 4793 width: var(--wui-icon-size-lg); 4794 height: var(--wui-icon-size-lg); 4795 } 4796`;var zs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Hs=class extends pe{constructor(){super(...arguments),this.amount="",this.networkCurreny="",this.networkImageUrl="",this.receiverAddress="",this.addressExplorerUrl=""}render(){return K` 4797 <wui-flex justifyContent="space-between" alignItems="center"> 4798 <wui-text variant="paragraph-500" color="fg-200">Sending</wui-text> 4799 <wui-flex gap="xs" alignItems="center"> 4800 <wui-text variant="paragraph-400" color="fg-100"> 4801 ${this.amount} ${this.networkCurreny} 4802 </wui-text> 4803 ${this.templateNetworkVisual()} 4804 </wui-flex> 4805 </wui-flex> 4806 <wui-flex justifyContent="space-between" alignItems="center"> 4807 <wui-text variant="paragraph-500" color="fg-200">To</wui-text> 4808 <wui-chip 4809 icon="externalLink" 4810 variant="shadeSmall" 4811 href=${this.addressExplorerUrl} 4812 title=${this.receiverAddress} 4813 ></wui-chip> 4814 </wui-flex> 4815 `}templateNetworkVisual(){return this.networkImageUrl?K`<wui-image src=${this.networkImageUrl} alt="Network Image"></wui-image>`:K`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};Hs.styles=[Ce,Ae,$s],zs([Oe()],Hs.prototype,"amount",void 0),zs([Oe()],Hs.prototype,"networkCurreny",void 0),zs([Oe()],Hs.prototype,"networkImageUrl",void 0),zs([Oe()],Hs.prototype,"receiverAddress",void 0),zs([Oe()],Hs.prototype,"addressExplorerUrl",void 0),Hs=zs([Ie("wui-l
4815ist-wallet-transaction")],Hs);const Ws=l` 4816 :host { 4817 width: 100%; 4818 } 4819 4820 :host > wui-flex { 4821 width: 100%; 4822 padding: var(--wui-spacing-s); 4823 border-radius: var(--wui-border-radius-xs); 4824 width: 100%; 4825 display: flex; 4826 align-items: center; 4827 justify-content: flex-start; 4828 gap: var(--wui-spacing-s); 4829 } 4830 4831 :host > wui-flex:hover { 4832 background-color: var(--wui-color-gray-glass-002); 4833 } 4834 4835 .purchase-image-container { 4836 display: flex; 4837 justify-content: center; 4838 align-items: center; 4839 position: relative; 4840 width: var(--wui-icon-box-size-lg); 4841 height: var(--wui-icon-box-size-lg); 4842 } 4843 4844 .purchase-image-container wui-image { 4845 width: 100%; 4846 height: 100%; 4847 position: relative; 4848 border-radius: calc(var(--wui-icon-box-size-lg) / 2); 4849 } 4850 4851 .purchase-image-container wui-image::after { 4852 content: ''; 4853 display: block; 4854 width: 100%; 4855 height: 100%; 4856 position: absolute; 4857 inset: 0; 4858 border-radius: calc(var(--wui-icon-box-size-lg) / 2); 4859 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 4860 } 4861 4862 .purchase-image-container wui-icon-box { 4863 position: absolute; 4864 right: 0; 4865 bottom: 0; 4866 transform: translate(20%, 20%); 4867 } 4868`;var qs=n(5718),Vs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Gs=class extends pe{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="Bought",this.purchaseValue="",this.purchaseCurrency="",this.date="",this.completed=!1,this.inProgress=!1,this.failed=!1,this.onClick=null,this.symbol=""}firstUpdated(){this.icon||this.fetchTokenImage()}render(){return K` 4869 <wui-flex> 4870 ${this.imageTemplate()} 4871 <wui-flex flexDirection="column" gap="4xs" flexGrow="1"> 4872 <wui-flex gap="xxs" alignItems="center" justifyContent="flex-start"> 4873 ${this.statusIconTemplate()} 4874 <wui-text variant="paragraph-500" color="fg-100"> ${this.label}</wui-text> 4875 </wui-flex> 4876 <wui-text variant="small-400" color="fg-200"> 4877 + ${this.purchaseValue} ${this.purchaseCurrency} 4878 </wui-text> 4879 </wui-flex> 4880 ${this.inProgress?K`<wui-loading-spinner color="fg-200" size="md"></wui-loading-spinner>`:K`<wui-text variant="micro-700" color="fg-300"><span>${this.date}</span></wui-text>`} 4881 </wui-flex> 4882 `}async fetchTokenImage(){await qs.Np._fetchTokenImage(this.purchaseCurrency)}statusIconTemplate(){return this.inProgress?null:this.completed?this.boughtIconTemplate():this.errorIconTemplate()}errorIconTemplate(){return K`<wui-icon-box 4883 size="xxs" 4884 iconColor="error-100" 4885 backgroundColor="error-100" 4886 background="opaque" 4887 icon="close" 4888 borderColor="wui-color-bg-125" 4889 ></wui-icon-box>`}imageTemplate(){const e=this.icon||`https://avatar.vercel.sh/andrew.svg?size=50&text=${this.symbol}`;return K`<wui-flex class="purchase-image-container"> 4890 <wui-image src=${e}></wui-image> 4891 </wui-flex>`}boughtIconTemplate(){return K`<wui-icon-box 4892 size="xxs" 4893 iconColor="success-100" 4894 backgroundColor="success-100" 4895 background="opaque" 4896 icon="arrowBottom" 4897 borderColor="wui-color-bg-125" 4898 ></wui-icon-box>`}};Gs.styles=[Ce,Ae,Ws],Vs([Oe({type:Boolean})],Gs.prototype,"disabled",void 0),Vs([Oe()],Gs.prototype,"color",void 0),Vs([Oe()],Gs.prototype,"label",void 0),Vs([Oe()],Gs.prototype,"purchaseValue",void 0),Vs([Oe()],Gs.prototype,"purchaseCurrency",void 0),Vs([Oe()],Gs.prototype,"date",void 0),Vs([Oe({type:Boolean})],Gs.prototype,"completed",void 0),Vs([Oe({type:Boolean})],Gs.prototype,"inProgress",void 0),Vs([Oe({type:Boolean})],Gs.prototype,"failed",void 0),Vs([Oe()],Gs.prototype,"onClick",void 0),Vs([Oe()],Gs.prototype,"symbol",void 0),Vs([Oe()],Gs.prototype,"icon",void 0),Gs=Vs([Ie("wui-onramp-activity-item")],Gs);const Ks=l` 4899 button { 4900 padding: var(--wui-spacing-s); 4901 border-radius: var(--wui-border-radius-xs); 4902 background-color: var(--wui-color-gray-glass-002); 4903 width: 100%; 4904 display: flex; 4905 align-items: center; 4906 justify-content: flex-start; 4907 gap: var(--wui-spacing-s); 4908 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 4909 will-change: background-color; 4910 } 4911 4912 button:hover { 4913 background-color: var(--wui-color-gray-glass-005); 4914 } 4915 4916 .provider-image { 4917 width: var(--wui-spacing-3xl); 4918 min-width: var(--wui-spacing-3xl); 4919 height: var(--wui-spacing-3xl); 4920 border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2)); 4921 position: relative; 4922 overflow: hidden; 4923 } 4924 4925 .provider-image::after { 4926 content: ''; 4927 display: block; 4928 width: 100%; 4929 height: 100%; 4930 position: absolute; 4931 inset: 0; 4932 border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2)); 4933 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 4934 } 4935 4936 .network-icon { 4937 width: var(--wui-spacing-m); 4938 height: var(--wui-spacing-m); 4939 border-radius: calc(var(--wui-spacing-m) / 2); 4940 overflow: hidden; 4941 box-shadow: 4942 0 0 0 3px var(--wui-color-gray-glass-002), 4943 0 0 0 3px var(--wui-color-modal-bg); 4944 transition: box-shadow var(--wui-ease-out-power-1) var(--wui-duration-md); 4945 will-change: box-shadow; 4946 } 4947 4948 button:hover .network-icon { 4949 box-shadow: 4950 0 0 0 3px var(--wui-color-gray-glass-005), 4951 0 0 0 3px var(--wui-color-modal-bg); 4952 } 4953`;var Zs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ys=class extends pe{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="",this.feeRange="",this.loading=!1,this.onClick=null}render(){return K` 4954 <button ?disabled=${this.disabled} ontouchstart> 4955 <wui-visual name=${Gn(this.name)} class="provider-image"></wui-visual> 4956 <wui-flex flexDirection="column" gap="4xs"> 4957 <wui-text variant="paragraph-500" color="fg-100">${this.label}</wui-text> 4958 <wui-flex alignItems="center" justifyContent="flex-start" gap="l"> 4959 <wui-text variant="tiny-500" color="fg-100"> 4960 <wui-text variant="tiny-400" color="fg-200">Fees</wui-text> 4961 ${this.feeRange} 4962 </wui-text> 4963 <wui-flex gap="xxs"> 4964 <wui-icon name="bank" size="xs" color="fg-150"></wui-icon> 4965 <wui-icon name="card" size="xs" color="fg-150"></wui-icon> 4966 </wui-flex> 4967 ${this.networksTemplate()} 4968 </wui-flex> 4969 </wui-flex> 4970 ${this.loading?K`<wui-loading-spinner color="fg-200" size="md"></wui-loading-spinner>`:K`<wui-icon name="chevronRight" color="fg-200" size="sm"></wui-icon>`} 4971 </button> 4972 `}networksTemplate(){const e=qs.p_.getRequestedCaipNetworks(),t=e?.filter((e=>e?.imageId))?.slice(0,5);return K` 4973 <wui-flex class="networks"> 4974 ${t?.map((e=>K` 4975 <wui-flex class="network-icon"> 4976 <wui-image src=${Gn(qs.$m.getNetworkImage(e))}></wui-image> 4977 </wui-flex> 4978 `))} 4979 </wui-flex> 4980 `}};Ys.styles=[Ce,Ae,Ks],Zs([Oe({type:Boolean})],Ys.prototype,"disabled",void 0),Zs([Oe()],Ys.prototype,"color",void 0),Zs([Oe()],Ys.prototype,"name",void 0),Zs([Oe()],Ys.prototype,"label",void 0),Zs([Oe()],Ys.prototype,"feeRange",void 0),Zs([Oe({type:Boolean})],Ys.prototype,"loading",void 0),Zs([Oe()],Ys.prototype,"onClick",void 0),Ys=Zs([Ie("wui-onramp-provider-item")],Ys);const Qs=l` 4981 button { 4982 display: flex; 4983 gap: var(--wui-spacing-3xs); 4984 align-items: center; 4985 padding: 6.25px var(--wui-spacing-xs) 7.25px var(--wui-spacing-s); 4986 background-color: var(--wui-color-gray-glass-090); 4987 border-radius: var(--wui-border-radius-3xl); 4988 border: 1px solid var(--wui-color-gray-glass-060); 4989 transition: background-color var(--wui-duration-md) var(--wui-ease-inout-power-1); 4990 will-change: background-color; 4991 } 4992 4993 @media (hover: hover) and (pointer: fine) { 4994 button:hover:enabled { 4995 background-color: var(--wui-color-gray-glass-080); 4996 } 4997 4998 button:active:enabled { 4999 background-color: var(--wui-color-gray-glass-060); 5000 } 5001 } 5002`;var Js=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Xs=class extends pe{constructor(){super(...arguments),this.text=""}render(){return K`<button ontouchstart> 5003 <wui-text variant="small-600" color="bg-100">${this.text}</wui-text> 5004 <wui-icon color="bg-100" size="xs" name="arrowRight"></wui-icon> 5005 </button>`}}
5005;Xs.styles=[Ce,Ae,Qs],Js([Oe()],Xs.prototype,"text",void 0),Xs=Js([Ie("wui-promo")],Xs);const eo=l` 5006 span { 5007 font-weight: 500; 5008 font-size: 40px; 5009 color: var(--wui-color-fg-100); 5010 line-height: 130%; /* 52px */ 5011 letter-spacing: -1.6px; 5012 text-align: center; 5013 } 5014 5015 .pennies { 5016 color: var(--wui-color-fg-200); 5017 } 5018`;var to=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let no=class extends pe{constructor(){super(...arguments),this.dollars="0",this.pennies="00"}render(){return K`<span>$${this.dollars}<span class="pennies">.${this.pennies}</span></span>`}};no.styles=[Ce,eo],to([Oe()],no.prototype,"dollars",void 0),to([Oe()],no.prototype,"pennies",void 0),no=to([Ie("wui-balance")],no);const ro=l` 5019 button { 5020 background-color: var(--wui-color-gray-glass-002); 5021 border-radius: var(--wui-border-radius-3xl); 5022 border: 1px solid var(--wui-color-gray-glass-002); 5023 padding: var(--wui-spacing-xs) var(--wui-spacing-s) var(--wui-spacing-xs) var(--wui-spacing-xs); 5024 position: relative; 5025 } 5026 5027 wui-avatar { 5028 width: 32px; 5029 height: 32px; 5030 box-shadow: 0 0 0 0; 5031 outline: 3px solid var(--wui-color-gray-glass-005); 5032 } 5033 5034 wui-icon-box, 5035 wui-image { 5036 width: 16px; 5037 height: 16px; 5038 border-radius: var(--wui-border-radius-3xl); 5039 position: absolute; 5040 left: 26px; 5041 top: 24px; 5042 } 5043 5044 wui-image { 5045 outline: 2px solid var(--wui-color-bg-125); 5046 } 5047 5048 wui-icon-box { 5049 outline: 2px solid var(--wui-color-bg-200); 5050 background-color: var(--wui-color-bg-250); 5051 } 5052`;var io=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let so=class extends pe{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.profileName="",this.address="",this.icon="chevronBottom"}render(){return K`<button ontouchstart data-testid="wui-profile-button"> 5053 <wui-flex gap="xs" alignItems="center"> 5054 <wui-avatar 5055 .imageSrc=${this.avatarSrc} 5056 alt=${this.address} 5057 address=${this.address} 5058 ></wui-avatar> 5059 ${this.networkImageTemplate()} 5060 <wui-flex gap="xs" alignItems="center"> 5061 <wui-text variant="large-600" color="fg-100"> 5062 ${Kn.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})} 5063 </wui-text> 5064 <wui-icon size="sm" color="fg-200" name=${this.icon}></wui-icon> 5065 </wui-flex> 5066 </wui-flex> 5067 </button>`}networkImageTemplate(){return this.networkSrc?K`<wui-image src=${this.networkSrc}></wui-image>`:K` 5068 <wui-icon-box 5069 size="xxs" 5070 iconColor="fg-200" 5071 backgroundColor="bg-100" 5072 icon="networkPlaceholder" 5073 ></wui-icon-box> 5074 `}};so.styles=[Ce,Ae,ro],io([Oe()],so.prototype,"networkSrc",void 0),io([Oe()],so.prototype,"avatarSrc",void 0),io([Oe()],so.prototype,"profileName",void 0),io([Oe()],so.prototype,"address",void 0),io([Oe()],so.prototype,"icon",void 0),so=io([Ie("wui-profile-button")],so);const oo=l` 5075 button { 5076 border: none; 5077 border-radius: var(--wui-border-radius-3xl); 5078 } 5079 5080 button[data-variant='main'] { 5081 background-color: var(--wui-color-accent-100); 5082 color: var(--wui-color-inverse-100); 5083 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 5084 } 5085 5086 button[data-variant='accent'] { 5087 background-color: var(--wui-color-accent-glass-010); 5088 color: var(--wui-color-accent-100); 5089 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 5090 } 5091 5092 button[data-variant='gray'] { 5093 background-color: transparent; 5094 color: var(--wui-color-fg-200); 5095 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 5096 } 5097 5098 button[data-variant='shade'] { 5099 background-color: transparent; 5100 color: var(--wui-color-accent-100); 5101 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 5102 } 5103 5104 button[data-size='sm'] { 5105 height: 32px; 5106 padding: 0 var(--wui-spacing-s); 5107 } 5108 5109 button[data-size='md'] { 5110 height: 40px; 5111 padding: 0 var(--wui-spacing-l); 5112 } 5113 5114 button[data-size='sm'] > wui-image { 5115 width: 16px; 5116 height: 16px; 5117 } 5118 5119 button[data-size='md'] > wui-image { 5120 width: 24px; 5121 height: 24px; 5122 } 5123 5124 button[data-size='sm'] > wui-icon { 5125 width: 12px; 5126 height: 12px; 5127 } 5128 5129 button[data-size='md'] > wui-icon { 5130 width: 14px; 5131 height: 14px; 5132 } 5133 5134 wui-image { 5135 border-radius: var(--wui-border-radius-3xl); 5136 overflow: hidden; 5137 } 5138 5139 button.disabled > wui-icon, 5140 button.disabled > wui-image { 5141 filter: grayscale(1); 5142 } 5143 5144 button[data-variant='main'] > wui-image { 5145 box-shadow: inset 0 0 0 1px var(--wui-color-accent-090); 5146 } 5147 5148 button[data-variant='shade'] > wui-image, 5149 button[data-variant='gray'] > wui-image { 5150 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 5151 } 5152 5153 @media (hover: hover) and (pointer: fine) { 5154 button[data-variant='main']:focus-visible { 5155 background-color: var(--wui-color-accent-090); 5156 } 5157 5158 button[data-variant='shade']:focus-visible, 5159 button[data-variant='gray']:focus-visible, 5160 button[data-variant='shade']:hover, 5161 button[data-variant='gray']:hover { 5162 background-color: var(--wui-color-gray-glass-002); 5163 } 5164 5165 button[data-variant='gray']:active, 5166 button[data-variant='shade']:active { 5167 background-color: var(--wui-color-gray-glass-005); 5168 } 5169 } 5170 5171 button.disabled { 5172 color: var(--wui-color-gray-glass-020); 5173 background-color: var(--wui-color-gray-glass-002); 5174 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 5175 pointer-events: none; 5176 } 5177`;var ao=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let co=class extends pe{constructor(){super(...arguments),this.variant="accent",this.imageSrc="",this.disabled=!1,this.icon="externalLink",this.size="md",this.text=""}render(){const e="sm"===this.size?"small-600":"paragraph-600";return K` 5178 <button 5179 class=${this.disabled?"disabled":""} 5180 data-variant=${this.variant} 5181 data-size=${this.size} 5182 > 5183 ${this.imageSrc?K`<wui-image src=${this.imageSrc}></wui-image>`:null} 5184 <wui-text variant=${e} color="inherit"> ${this.text} </wui-text> 5185 <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon> 5186 </button> 5187 `}};co.styles=[Ce,Ae,oo],ao([Oe()],co.prototype,"variant",void 0),ao([Oe()],co.prototype,"imageSrc",void 0),ao([Oe({type:Boolean})],co.prototype,"disabled",void 0),ao([Oe()],co.prototype,"icon",void 0),ao([Oe()],co.prototype,"size",void 0),ao([Oe()],co.prototype,"text",void 0),co=ao([Ie("wui-chip-button")],c
5187o);const lo=l` 5188 button { 5189 display: flex; 5190 gap: var(--wui-spacing-xl); 5191 width: 100%; 5192 background-color: var(--wui-color-gray-glass-002); 5193 border-radius: var(--wui-border-radius-xxs); 5194 padding: var(--wui-spacing-m) var(--wui-spacing-s); 5195 } 5196 5197 wui-text { 5198 width: 100%; 5199 } 5200 5201 wui-flex { 5202 width: auto; 5203 } 5204 5205 .network-icon { 5206 width: var(--wui-spacing-2l); 5207 height: var(--wui-spacing-2l); 5208 border-radius: calc(var(--wui-spacing-2l) / 2); 5209 overflow: hidden; 5210 box-shadow: 5211 0 0 0 3px var(--wui-color-gray-glass-002), 5212 0 0 0 3px var(--wui-color-modal-bg); 5213 } 5214`;var uo=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let ho=class extends pe{constructor(){super(...arguments),this.networkImages=[""],this.text=""}render(){return K` 5215 <button ontouchstart> 5216 <wui-text variant="small-400" color="fg-200">${this.text}</wui-text> 5217 <wui-flex gap="3xs" alignItems="center"> 5218 ${this.networksTemplate()} 5219 <wui-icon name="chevronRight" size="sm" color="fg-200"></wui-icon> 5220 </wui-flex> 5221 </button> 5222 `}networksTemplate(){const e=this.networkImages.slice(0,5);return K` <wui-flex class="networks"> 5223 ${e?.map((e=>K` <wui-flex class="network-icon"> <wui-image src=${e}></wui-image> </wui-flex>`))} 5224 </wui-flex>`}};ho.styles=[Ce,Ae,lo],uo([Oe({type:Array})],ho.prototype,"networkImages",void 0),uo([Oe()],ho.prototype,"text",void 0),ho=uo([Ie("wui-compatible-network")],ho);const po=l` 5225 wui-flex { 5226 width: 100%; 5227 background-color: var(--wui-color-gray-glass-005); 5228 border-radius: var(--wui-border-radius-s); 5229 padding: var(--wui-spacing-1xs) var(--wui-spacing-s) var(--wui-spacing-1xs) 5230 var(--wui-spacing-1xs); 5231 } 5232`;var fo=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let mo=class extends pe{constructor(){super(...arguments),this.icon="externalLink",this.text=""}render(){return K` 5233 <wui-flex gap="1xs" alignItems="center"> 5234 <wui-icon-box 5235 size="sm" 5236 iconcolor="fg-200" 5237 backgroundcolor="fg-200" 5238 icon=${this.icon} 5239 background="transparent" 5240 ></wui-icon-box> 5241 <wui-text variant="small-400" color="fg-200">${this.text}</wui-text> 5242 </wui-flex> 5243 `}};mo.styles=[Ce,Ae,po],fo([Oe()],mo.prototype,"icon",void 0),fo([Oe()],mo.prototype,"text",void 0),mo=fo([Ie("wui-banner")],mo);const go=l` 5244 button { 5245 padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs); 5246 display: flex; 5247 justify-content: space-between; 5248 width: 100%; 5249 border-radius: var(--wui-border-radius-xs); 5250 background-color: var(--wui-color-gray-glass-002); 5251 } 5252 5253 button[data-clickable='false'] { 5254 pointer-events: none; 5255 background-color: transparent; 5256 } 5257 5258 wui-image, 5259 wui-icon { 5260 width: var(--wui-spacing-3xl); 5261 height: var(--wui-spacing-3xl); 5262 } 5263 5264 wui-image { 5265 border-radius: var(--wui-border-radius-3xl); 5266 } 5267`;var yo=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let vo=class extends pe{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return K` 5268 <button data-clickable=${String(this.clickable)} ontouchstart> 5269 <wui-flex gap="s" alignItems="center"> 5270 ${this.visualTemplate()} 5271 <wui-flex flexDirection="column" justifyContent="spaceBetween"> 5272 <wui-text variant="paragraph-500" color="fg-100">${this.tokenName}</wui-text> 5273 <wui-text variant="small-400" color="fg-200"> 5274 ${Kn.formatNumberToLocalString(this.tokenAmount,4)} ${this.tokenCurrency} 5275 </wui-text> 5276 </wui-flex> 5277 </wui-flex> 5278 <wui-text variant="paragraph-500" color="fg-100">$${this.tokenValue.toFixed(2)}</wui-text> 5279 </button> 5280 `}visualTemplate(){return this.tokenName&&this.tokenImageUrl?K`<wui-image alt=${this.tokenName} src=${this.tokenImageUrl}></wui-image>`:K`<wui-icon name="coinPlaceholder" color="fg-100"></wui-icon>`}};vo.styles=[Ce,Ae,go],yo([Oe()],vo.prototype,"tokenName",void 0),yo([Oe()],vo.prototype,"tokenImageUrl",void 0),yo([Oe({type:Number})],vo.prototype,"tokenValue",void 0),yo([Oe()],vo.prototype,"tokenAmount",void 0),yo([Oe()],vo.prototype,"tokenCurrency",void 0),yo([Oe({type:Boolean}
5280)],vo.prototype,"clickable",void 0),vo=yo([Ie("wui-list-token")],vo);const wo=l` 5281 button { 5282 width: 100%; 5283 display: flex; 5284 gap: var(--wui-spacing-s); 5285 align-items: center; 5286 justify-content: flex-start; 5287 padding: var(--wui-spacing-s) var(--wui-spacing-m) var(--wui-spacing-s) var(--wui-spacing-s); 5288 background-color: var(--wui-color-gray-glass-002); 5289 border-radius: var(--wui-border-radius-xs); 5290 } 5291 5292 wui-icon-box { 5293 width: var(--wui-spacing-2xl); 5294 height: var(--wui-spacing-2xl); 5295 } 5296 5297 wui-flex { 5298 width: auto; 5299 } 5300`;var bo=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let xo=class extends pe{constructor(){super(...arguments),this.icon="card",this.text="",this.description="",this.tag=void 0,this.iconBackgroundColor="accent-100",this.iconColor="accent-100",this.disabled=!1}render(){return K` 5301 <button ontouchstart ?disabled=${this.disabled}> 5302 <wui-icon-box 5303 iconColor=${this.iconColor} 5304 backgroundColor=${this.iconBackgroundColor} 5305 size="inherit" 5306 icon=${this.icon} 5307 iconSize="md" 5308 ></wui-icon-box> 5309 <wui-flex flexDirection="column" justifyContent="spaceBetween"> 5310 ${this.titleTemplate()} 5311 <wui-text variant="small-400" color="fg-200"> ${this.description}</wui-text></wui-flex 5312 > 5313 </button> 5314 `}titleTemplate(){return this.tag?K` <wui-flex alignItems="center" gap="xxs" 5315 ><wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text 5316 ><wui-tag tagType="main" size="md">${this.tag}</wui-tag> 5317 </wui-flex>`:K`<wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text>`}};xo.styles=[Ce,Ae,wo],bo([Oe()],xo.prototype,"icon",void 0),bo([Oe()],xo.prototype,"text",void 0),bo([Oe()],xo.prototype,"description",void 0),bo([Oe()],xo.prototype,"tag",void 0),bo([Oe()],xo.prototype,"iconBackgroundColor",void 0),bo([Oe()],xo.prototype,"iconColor",void 0),bo([Oe({type:Boolean})],xo.prototype,"disabled",void 0),xo=bo([Ie("wui-list-description")],xo);const Eo=l` 5318 :host { 5319 position: relative; 5320 display: inline-block; 5321 } 5322 5323 input { 5324 background: transparent; 5325 width: 100%; 5326 height: auto; 5327 font-family: var(--wui-font-family); 5328 color: var(--wui-color-fg-100); 5329 5330 font-feature-settings: 'case' on; 5331 font-size: 32px; 5332 font-weight: var(--wui-font-weight-light); 5333 caret-color: var(--wui-color-accent-100); 5334 line-height: 130%; 5335 letter-spacing: -1.28px; 5336 box-sizing: border-box; 5337 -webkit-appearance: none; 5338 -moz-appearance: textfield; 5339 padding: 0px; 5340 } 5341 5342 input::-webkit-outer-spin-button, 5343 input::-webkit-inner-spin-button { 5344 -webkit-appearance: none; 5345 margin: 0; 5346 } 5347 5348 input::placeholder { 5349 color: var(--wui-color-fg-275); 5350 } 5351`,_o=/[.*+?^${}()|[\]\\]/gu,ko=/[0-9,.]/u;var Co=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ao=class extends pe{constructor(){super(...arguments),this.inputElementRef=ei(),this.disabled=!1,this.value="",this.placeholder="0"}render(){return this.inputElementRef?.value&&this.value&&(this.inputElementRef.value.value=this.value),K`<input 5352 ${ri(this.inputElementRef)} 5353 type="text" 5354 inputmode="decimal" 5355 pattern="[0-9,.]*" 5356 placeholder=${this.placeholder} 5357 ?disabled=${this.disabled} 5358 autofocus 5359 value=${this.value??""} 5360 @input=${this.dispatchInputChangeEvent.bind(this)} 5361 /> `}dispatchInputChangeEvent(e){const t=e.data;if(t&&this.inputElementRef?.value)if(","===t){const e=this.inputElementRef.value.value.replace(",",".");this.inputElementRef.value.value=e,this.value=`${this.value}${e}`}else ko.test(t)||(this.inputElementRef.value.value=this.value.replace(new RegExp(t.replace(_o,"\\$&"),"gu"),""));this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};Ao.styles=[Ce,Ae,Eo],Co([Oe({type:Boolean})],Ao.prototype,"disabled",void 0),Co([Oe({type:String})],Ao.prototype,"value",void 0),Co([Oe({type:String})],Ao.prototype,"placeholder",void 0),Ao=Co([Ie("wui-input-amount")],Ao);const So=l` 5362 :host { 5363 display: flex; 5364 gap: var(--wui-spacing-xs); 5365 border-radius: var(--wui-border-radius-3xl); 5366 border: 1px solid var(--wui-color-gray-glass-002); 5367 background: var(--wui-color-gray-glass-002); 5368 padding: var(--wui-spacing-2xs) var(--wui-spacing-xs) var(--wui-spacing-2xs) 5369 var(--wui-spacing-s); 5370 align-items: center; 5371 } 5372 5373 wui-avatar, 5374 wui-icon, 5375 wui-image { 5376 width: 32px; 5377 height: 32px; 5378 border: 1px solid var(--wui-color-gray-glass-002); 5379 border-radius: var(--wui-border-radius-3xl); 5380 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-002); 5381 } 5382`;var Io=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let To=class extends pe{constructor(){super(...arguments),this.text="",this.address="",this.isAddress=!1}render(){return K`<wui-text variant="large-500" color="fg-100">${this.text}</wui-text> 5383 ${this.imageTemplate()}`}imageTemplate(){return this.isAddress?K`<wui-avatar address=${this.address} .imageSrc=${this.imageSrc}></wui-avatar>`:this.imageSrc?K`<wui-image src=${this.imageSrc}></wui-image>`:K`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};To.styles=[Ce,Ae,So],Io([Oe()],To.prototype,"text",void 0),Io([Oe()],To.prototype,"address",void 0),Io([Oe()],To.prototype,"imageSrc",void 0),Io([Oe({type:Boolean})],To.prototype,"isAddress",void 0),To=Io([Ie("wui-preview-item")],To);const Po=l` 5384 :host { 5385 position: relative; 5386 } 5387 5388 button { 5389 display: flex; 5390 justify-content: center;
5391 align-items: center; 5392 height: 48px; 5393 width: 100%; 5394 background-color: var(--wui-color-accent-glass-010); 5395 border-radius: var(--wui-border-radius-xs); 5396 border: 1px solid var(--wui-color-accent-glass-010); 5397 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 5398 will-change: background-color; 5399 } 5400 5401 wui-tooltip { 5402 padding: 7px var(--wui-spacing-s) 8px var(--wui-spacing-s); 5403 position: absolute; 5404 top: -8px; 5405 left: 50%; 5406 transform: translate(-50%, -100%); 5407 opacity: 0; 5408 display: none; 5409 } 5410 5411 @media (hover: hover) and (pointer: fine) { 5412 button:hover:enabled { 5413 background-color: var(--wui-color-accent-glass-015); 5414 } 5415 5416 button:active:enabled { 5417 background-color: var(--wui-color-accent-glass-020); 5418 } 5419 } 5420`;var No=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ro=class extends pe{constructor(){super(...arguments),this.text="",this.icon="card"}render(){return K`<button> 5421 <wui-icon color="accent-100" name=${this.icon} size="lg"></wui-icon> 5422 </button>`}};Ro.styles=[Ce,Ae,Po],No([Oe()],Ro.prototype,"text",void 0),No([Oe()],Ro.prototype,"icon",void 0),Ro=No([Ie("wui-icon-button")],Ro);const Oo=l` 5423 button { 5424 column-gap: var(--wui-spacing-s); 5425 padding: 16.5px var(--wui-spacing-l) 16.5px var(--wui-spacing-xs); 5426 width: 100%; 5427 background-color: var(--wui-color-gray-glass-002); 5428 border-radius: var(--wui-border-radius-xs); 5429 color: var(--wui-color-fg-100); 5430 justify-content: center; 5431 align-items: center; 5432 } 5433 5434 button:disabled { 5435 background-color: var(--wui-color-gray-glass-015); 5436 color: var(--wui-color-gray-glass-015); 5437 } 5438`;var Mo=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let jo=class extends pe{constructor(){super(...arguments),this.text="",this.disabled=!1}render(){return K` 5439 <button ?disabled=${this.disabled} ontouchstart> 5440 <wui-text align="center" variant="paragraph-500" color="inherit">${this.text}</wui-text> 5441 </button> 5442 `}};jo.styles=[Ce,Ae,Oo],Mo([Oe()],jo.prototype,"text",void 0),Mo([Oe({type:Boolean})],jo.prototype,"disabled",void 0),jo=Mo([Ie("wui-list-button")],jo);const Lo=l` 5443 button { 5444 column-gap: var(--wui-spacing-s); 5445 padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); 5446 width: 100%; 5447 justify-content: flex-start; 5448 background-color: var(--wui-color-gray-glass-002); 5449 border-radius: var(--wui-border-radius-xs); 5450 color: var(--wui-color-fg-100); 5451 } 5452 5453 wui-text { 5454 text-transform: capitalize; 5455 } 5456 5457 wui-text[data-align='left'] { 5458 display: flex; 5459 flex: 1; 5460 } 5461 5462 wui-text[data-align='center'] { 5463 display: flex; 5464 flex: 1; 5465 justify-content: center; 5466 } 5467 5468 .invisible { 5469 opacity: 0; 5470 pointer-events: none; 5471 } 5472 5473 button:disabled { 5474 background-color: var(--wui-color-gray-glass-015); 5475 color: var(--wui-color-gray-glass-015); 5476 } 5477`;var Do=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Bo=class extends pe{constructor(){super(...arguments),this.logo="google",this.name="Continue with google",this.align="left",this.disabled=!1}render(){return K` 5478 <button ?disabled=${this.disabled} ontouchstart> 5479 <wui-logo logo=${this.logo}></wui-logo> 5480 <wui-text 5481 data-align=${this.align} 5482 variant="paragraph-500" 5483 color="inherit" 5484 align=${this.align} 5485 >${this.name}</wui-text 5486 > 5487 ${this.templatePlacement()} 5488 </button> 5489 `}templatePlacement(){return"center"===this.align?K` <wui-logo class="invisible" logo=${this.logo}></wui-logo>`:null}};Bo.styles=[Ce,Ae,Lo],Do([Oe()],Bo.prototype,"logo",void 0),Do([Oe()],Bo.prototype,"name",void 0),Do([Oe()],Bo.prototype,"align",void 0),Do([Oe({type:Boolean}
5489)],Bo.prototype,"disabled",void 0),Bo=Do([Ie("wui-list-social")],Bo);const Uo=l` 5490 :host { 5491 display: grid; 5492 width: inherit; 5493 height: inherit; 5494 } 5495`;var Fo=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let $o=class extends pe{render(){return this.style.cssText=`\n grid-template-rows: ${this.gridTemplateRows};\n grid-template-columns: ${this.gridTemplateColumns};\n justify-items: ${this.justifyItems};\n align-items: ${this.alignItems};\n justify-content: ${this.justifyContent};\n align-content: ${this.alignContent};\n column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};\n row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};\n gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};\n padding-top: ${this.padding&&Kn.getSpacingStyles(this.padding,0)};\n padding-right: ${this.padding&&Kn.getSpacingStyles(this.padding,1)};\n padding-bottom: ${this.padding&&Kn.getSpacingStyles(this.padding,2)};\n padding-left: ${this.padding&&Kn.getSpacingStyles(this.padding,3)};\n margin-top: ${this.margin&&Kn.getSpacingStyles(this.margin,0)};\n margin-right: ${this.margin&&Kn.getSpacingStyles(this.margin,1)};\n margin-bottom: ${this.margin&&Kn.getSpacingStyles(this.margin,2)};\n margin-left: ${this.margin&&Kn.getSpacingStyles(this.margin,3)};\n `,K`<slot></slot>`}};$o.styles=[Ce,Uo],Fo([Oe()],$o.prototype,"gridTemplateRows",void 0),Fo([Oe()],$o.prototype,"gridTemplateColumns",void 0),Fo([Oe()],$o.prototype,"justifyItems",void 0),Fo([Oe()],$o.prototype,"alignItems",void 0),Fo([Oe()],$o.prototype,"justifyContent",void 0),Fo([Oe()],$o.prototype,"alignContent",void 0),Fo([Oe()],$o.prototype,"columnGap",void 0),Fo([Oe()],$o.prototype,"rowGap",void 0),Fo([Oe()],$o.prototype,"gap",void 0),Fo([Oe()],$o.prototype,"padding",void 0),Fo([Oe()],$o.prototype,"margin",void 0),$o=Fo([Ie("wui-grid")],$o);const zo=l` 5496 :host { 5497 position: relative; 5498 display: flex; 5499 width: 100%; 5500 height: 1px; 5501 background-color: var(--wui-color-gray-glass-005); 5502 justify-content: center; 5503 align-items: center; 5504 } 5505 5506 :host > wui-text { 5507 position: absolute; 5508 padding: 0px 10px; 5509 background-color: var(--wui-color-modal-bg); 5510 } 5511`;var Ho=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Wo=class extends pe{constructor(){super(...arguments),this.text=""}render(){return K`${this.template()}`}template(){return this.text?K`<wui-text variant="small-500" color="fg-200">${this.text}</wui-text>`:null}};Wo.styles=[Ce,zo],Ho([Oe()],Wo.prototype,"text",void 0),Wo=Ho([Ie("wui-separator")],Wo);const qo={interpolate(e,t,n){if(2!==e.length||2!==t.length)throw new Error("inputRange and outputRange must be an array of length 2");const r=e[0]||0,i=e[1]||0,s=t[0]||0,o=t[1]||0;return n<r?s:n>i?o:(o-s)/(i-r)*(n-r)+s}},Vo=["receive","deposit","borrow","claim"],Go=["withdraw","repay","burn"],Ko={getMonthName(e){const t=new Date;return t.setMonth(e),t.toLocaleString("en-US",{month:"long"})},getTransactionGroupTitle(e,t){const n=ye.rL.getYear(),r=this.getMonthName(t);return e===n?r:`${r} ${e}`},getTransactionImages(e){const[t,n]=e,r=Boolean(t)&&e?.every((e=>Boolean(e.nft_info))),i=e?.length>1;return 2===e?.length&&!r?[this.getTransactionImage(t),this.getTransactionImage(n)]:i?e.map((e=>this.getTransactionImage(e))):[this.getTransactionImage(t)]},getTransactionImage:e=>({type:Ko.getTransactionTransferTokenType(e),url:Ko.getTransactionImageURL(e)}),getTransactionImageURL(e){let t;const n=Boolean(e?.nft_info),r=Boolean(e?.fungible_info);return e&&n?t=e?.nft_info?.content?.preview?.url:e&&r&&(t=e?.fungible_info?.icon?.url),t},getTransactionTransferTokenType:e=>e?.fungible_info?"FUNGIBLE":e?.nft_info?"NFT":void 0,getTransactionDescriptions(e){const t=e?.metadata?.operationType,n=e?.transfers,r=e?.transfers?.length>0,i=e?.transfers?.length>1,s=r&&n?.every((e=>Boolean(e?.fungible_info))),[o,a]=n;let c=this.getTransferDescription(o),l=this.getTransferDescription(a);if(!r){return("send"===t||"receive"===t)&&s?(c=Kn.getTruncateString({string:e?.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),l=Kn.getTruncateString({string:e?.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[c,l]):[e.metadata.status]}if(i)return n.map((e=>this.getTransferDescription(e)));let u="";return Vo.includes(t)?u="+":Go.includes(t)&&(u="-"),c=u.concat(c),[c]},getTransferDescription(e){let t="";return e?(e?.nft_info?t=e?.nft_info?.name||"-":e?.fungible_info&&(t=this.getFungibleTransferDescription(e)||"-"),t):t},getFungibleTransferDescription(e){if(!e)return null;return[this.getQuantityFixedValue(e?.quantity.numeric),e?.fungible_info?.symbol].join(" ").trim()},getQuantityFixedValue(e){if(!e)return null;return parseFloat(e).toFixed(3)}}},4306:(e,t,n)=>{"use strict";function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=k,k.WritableState=_;var s={deprecate:n(1421)},o=n(4687),a=n(3325).Buffer,c=("undefined"!==typeof n.g?n.g:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var l,u=n(4822),d=n(2809).getHighWaterMark,h=n(7614).F,p=h.ERR_INVALID_ARG_TYPE,f=h.ERR_METHOD_NOT_IMPLEMENT
vendor: 7,417 bytes, line 5511
5511ED,m=h.ERR_MULTIPLE_CALLBACK,g=h.ERR_STREAM_CANNOT_PIPE,y=h.ERR_STREAM_DESTROYED,v=h.ERR_STREAM_NULL_VALUES,w=h.ERR_STREAM_WRITE_AFTER_END,b=h.ERR_UNKNOWN_ENCODING,x=u.errorOrDestroy;function E(){}function _(e,t,s){i=i||n(7544),e=e||{},"boolean"!==typeof s&&(s=t instanceof i),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!==typeof i)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(process.nextTick(i,r),process.nextTick(P,e,t),e._writableState.errorEmitted=!0,x(e,r)):(i(r),e._writableState.errorEmitted=!0,x(e,r),P(e,t))}(e,n,r,t,i);else{var s=I(n)||e.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||S(e,n),r?process.nextTick(A,e,n,s,i):A(e,n,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function k(e){var t=this instanceof(i=i||n(7544));if(!t&&!l.call(k,this))return new k(e);this._writableState=new _(e,this,t),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),o.call(this)}function C(e,t,n,r,i,s,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):n?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function A(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),P(e,t)}function S(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,s=new Array(i),o=t.corkedRequestsFree;o.entry=n;for(var a=0,c=!0;n;)s[a]=n,n.isBuf||(c=!1),n=n.next,a+=1;s.allBuffers=c,C(e,t,!0,t.length,s,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,u=n.encoding,d=n.callback;if(C(e,t,!1,t.objectMode?1:l.length,l,u,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function T(e,t){e._final((function(n){t.pendingcb--,n&&x(e,n),t.prefinished=!0,e.emit("prefinish"),P(e,t)}))}function P(e,t){var n=I(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!==typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(T,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(1596)(k,o),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(_.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===k&&(e&&e._writableState instanceof _)}})):l=function(e){return e instanceof this},k.prototype.pipe=function(){x(this,new g)},k.prototype.write=function(e,t,n){var r,i=this._writableState,s=!1,o=!i.objectMode&&(r=e,a.isBuffer(r)||r instanceof c);return o&&!a.isBuffer(e)&&(e=function(e){return a.from(e)}(e)),"function"===typeof t&&(n=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!==typeof n&&(n=E),i.ending?function(e,t){var n=new w;x(e,n),process.nextTick(t,n)}(this,n):(o||function(e,t,n,r){var i;return null===n?i=new v:"string"===typeof n||t.objectMode||(i=new p("chunk",["string","Buffer"],n)),!i||(x(e,i),process.nextTick(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,s=function(e,t,n,r,i,s){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=a.from(t,n));return t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var c=t.objectMode?1:r.length;t.length+=c;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,c,r,i,s);return l}(this,i,o,e,t,n)),s},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||S(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"===typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new b(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,n){n(new f("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,n){var r=this._writableState;return"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,P(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=u.destroy,k.prototype._undestroy=u.undestroy,k.prototype._destroy=function(e,t){t(e)}},4370:(e,t,n)=>{const r=n(2168);function i(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function s(e,t,n){let r=e+t;return"undefined"!==typeof n&&(r+=" "+n),r}t.render=function(e,t,n){const o=r.getOptions(t),a=e.modules.size,c=e.modules.data,l=a+2*o.margin,u=o.color.light.a?"<path "+i(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+i(o.color.dark,"stroke")+' d="'+function(e,t,n){let r="",i=0,o=!1,a=0;for(let c=0;c<e.length;c++){const l=Math.floor(c%t),u=Math.floor(c/t);l||o||(o=!0),e[c]?(a++,c>0&&l>
55110&&e[c-1]||(r+=o?s("M",l+n,.5+u+n):s("m",i,0),i=0,o=!1),l+1<t&&e[c+1]||(r+=s("h",a),a=0)):i++}return r}(c,a,o.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"===typeof n&&n(null,p),p}},4378:(e,t,n)=>{var r=n(4759);e.exports=function(){return r.Date.now()}},4388:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.injectCssReset=void 0;const i=r(n(6358));t.injectCssReset=function(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(e)}},4414:(e,t,n)=>{"use strict";e.exports=n(2654)},4464:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isErrorResponse=void 0,t.isErrorResponse=function(e){return void 0!==e.errorMessage}},4465:(e,t,n)=>{"use strict";const r=n(6102),i=n(6844),s=n(3942),o=n(8881),a=Symbol("encodeFragmentIdentifier");function c(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function u(e,t){return t.decode?i(e):e}function d(e){return Array.isArray(e)?e.sort():"object"===typeof e?d(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function h(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function p(e){const t=(e=h(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function m(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"===typeof n&&n.includes(e.arrayFormatSeparator),s="string"===typeof n&&!i&&u(n,e).includes(e.arrayFormatSeparator);n=s?u(n,e):n;const o=i||s?n.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===n?n:u(n,e);r[t]=o};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n?u(n,e):n);const s=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],s):r[t]=s};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;let[e,o]=s(t.decode?i.replace(/\+/g," "):i,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:u(o,t),n(u(e,t),o,r)}for(const i of Object.keys(r)){const e=r[i];if("object"===typeof e&&null!==e)for(const n of Object.keys(e))e[n]=f(e[n],t);else r[i]=f(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const n=r[t];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?e[t]=d(n):e[t]=n,e}),Object.create(null))}t.extract=p,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>{return t.skipNull&&(null===(r=e[n])||void 0===r)||t.skipEmptyString&&""===e[n];var r},r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),"[",i,"]"].join("")]:[...n,[l(t,e),"[",l(i,e),"]=",l(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),"[]"].join("")]:[...n,[l(t,e),"[]=",l(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),":list="].join("")]:[...n,[l(t,e),":list=",l(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[l(n,e),t,l(i,e)].join("")]:[[r,l(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,l(t,e)]:[...n,[l(t,e),"=",l(r,e)].join("")]}}(t),i={};
5511for(const o of Object.keys(e))n(o)||(i[o]=e[o]);const s=Object.keys(i);return!1!==t.sort&&s.sort(t.sort),s.map((n=>{const i=e[n];return void 0===i?"":null===i?l(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?l(n,t)+"[]":i.reduce(r(n),[]).join("&"):l(n,t)+"="+l(i,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=s(e,"#");return Object.assign({url:n.split("?")[0]||"",query:m(p(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:u(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);const r=h(e.url).split("?")[0]||"",i=t.extract(e.url),s=t.parse(i,{sort:!1}),o=Object.assign(s,e.query);let c=t.stringify(o,n);c&&(c=`?${c}`);let u=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(u=`#${n[a]?l(e.fragmentIdentifier,n):e.fragmentIdentifier}`),`${r}${c}${u}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);const{url:i,query:s,fragmentIdentifier:c}=t.parseUrl(e,r);return t.stringifyUrl({url:i,query:o(s,n),fragmentIdentifier:c},r)},t.exclude=(e,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,i,r)}},4511:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.standardErrors=void 0;const r=n(1195),i=n(1115);function s(e,t){const[n,r]=a(t);return new c(e,n||(0,i.getMessageFromCode)(e),r)}function o(e,t){const[n,r]=a(t);return new l(e,n||(0,i.getMessageFromCode)(e),r)}function a(e){if(e){if("string"===typeof e)return[e];if("object"===typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;
5511if(t&&"string"!==typeof t)throw new Error("Must specify string message.");return[t||void 0,n]}}return[]}t.standardErrors={rpc:{parse:e=>s(r.standardErrorCodes.rpc.parse,e),invalidRequest:e=>s(r.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>s(r.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>s(r.standardErrorCodes.rpc.methodNotFound,e),internal:e=>s(r.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:e=>s(r.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(r.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(r.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(r.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(r.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(r.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>o(r.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>o(r.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>o(r.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>o(r.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>o(r.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>o(r.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:r}=e;if(!n||"string"!==typeof n)throw new Error('"message" must be a nonempty string');return new l(t,n,r)}}};class c extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!==typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==n&&(this.data=n)}}class l extends c{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}},4520:(e,t,n)=>{"use strict";t.Tc=t.TZ=t.wE=t.Xx=void 0;const r=n(6022),i=n(5070);function s(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}t.Xx=32,t.wE=32;const o=new Uint8Array(32);o[0]=9;const a=s([56129,1]);function c(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function l(e,t,n){const r=~(n-1);for(let i=0;i<16;i++){const n=r&(e[i]^t[i]);e[i]^=n,t[i]^=n}}function u(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function d(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function h(e,t,n){let r,i,s=0,o=0,a=0,c=0,l=0,u=0,d=0,h=0,p=0,f=0,m=0,g=0,y=0,v=0,w=0,b=0,x=0,E=0,_=0,k=0,C=0,A=0,S=0,I=0,T=0,P=0,N=0,R=0,O=0,M=0,j=0,L=n[0],D=n[1],B=n[2],U=n[3],F=n[4],$=n[5],z=n[6],H=n[7],W=n[8],q=n[9],V=n[10],G=n[11],K=n[12],Z=n[13],Y=n[14],Q=n[15];r=t[0],s+=r*L,o+=r*D,a+=r*B,c+=r*U,l+=r*F,u+=r*$,d+=r*z,h+=r*H,p+=r*W,f+=r*q,m+=r*V,g+=r*G,y+=r*K,v+=r*Z,w+=r*Y,b+=r*Q,r=t[1],o+=r*L,a+=r*D,c+=r*B,l+=r*U,u+=r*F,d+=r*$,h+=r*z,p+=r*H,f+=r*W,m+=r*q,g+=r*V,y+=r*G,v+=r*K,w+=r*Z,b+=r*Y,x+=r*Q,r=t[2],a+=r*L,c+=r*D,l+=r*B,u+=r*U,d+=r*F,h+=r*$,p+=r*z,f+=r*H,m+=r*W,g+=r*q,y+=r*V,v+=r*G,w+=r*K,b+=r*Z,x+=r*Y,E+=r*Q,r=t[3],c+=r*L,l+=r*D,u+=r*B,d+=r*U,h+=r*F,p+=r*$,f+=r*z,m+=r*H,g+=r*W,y+=r*q,v+=r*V,w+=r*G,b+=r*K,x+=r*Z,E+=r*Y,_+=r*Q,r=t[4],l+=r*L,u+=r*D,d+=r*B,h+=r*U,p+=r*F,f+=r*$,m+=r*z,g+=r*H,y+=r*W,v+=r*q,w+=r*V,b+=r*G,x+=r*K,E+=r*Z,_+=r*Y,k+=r*Q,r=t[5],u+=r*L,d+=r*D,h+=r*B,p+=r*U,f+=r*F,m+=r*$,g+=r*z,y+=r*H,v+=r*W,w+=r*q,b+=r*V,x+=r*G,E+=r*K,_+=r*Z,k+=r*Y,C+=r*Q,r=t[6],d+=r*L,h+=r*D,p+=r*B,f+=r*U,m+=r*F,g+=r*$,y+=r*z,v+=r*H,w+=r*W,b+=r*q,x+=r*V,E+=r*G,_+=r*K,k+=r*Z,C+=r*Y,A+=r*Q,r=t[7],h+=r*L,p+=r*D,f+=r*B,m+=r*U,g+=r*F,y+=r*$,v+=r*z,w+=r*H,b+=r*W,x+=r*q,E+=r*V,_+=r*G,k+=r*K,C+=r*Z,A+=r*Y,S+=r*Q,r=t[8],p+=r*L,f+=r*D,m+=r*B,g+=r*U,y+=r*F,v+=r*$,w+=r*z,b+=r*H,x+=r*W,E+=r*q,_+=r*V,k+=r*G,C+=r*K,A+=r*Z,S+=r*Y,I+=r*Q,r=t[9],f+=r*L,m+=r*D,g+=r*B,y+=r*U,v+=r*F,w+=r*$,b+=r*z,x+=r*H,E+=r*W,_+=r*q,k+=r*V,C+=r*G,A+=r*K,S+=r*Z,I+=r*Y,T+=r*Q,r=t[10],m+=r*L,g+=r*D,y+=r*B,v+=r*U,w+=r*F,b+=r*$,x+=r*z,E+=r*H,_+=r*W,k+=r*q,C+=r*V,A+=r*G,S+=r*K,I+=r*Z,T+=r*Y,P+=r*Q,r=t[11],g+=r*L,y+=r*D,v+=r*B,w+=r*U,b+=r*F,x+=r*$,E+=r*z,_+=r*H,k+=r*W,C+=r*q,A+=r*V,S+=r*G,I+=r*K,T+=r*Z,P+=r*Y,N+=r*Q,r=t[12],y+=r*L,v+=r*D,w+=r*B,b+=r*U,x+=r*F,E+=r*$,_+=r*z,k+=r*H,C+=r*W,A+=r*q,S+=r*V,I+=r*G,T+=r*K,P+=r*Z,N+=r*Y,R+=r*Q,r=t[13],v+=r*L,w+=r*D,b+=r*B,x+=r*U,E+=r*F,_+=r*$,k+=r*z,C+=r*H,A+=r*W,S+=r*q,I+=r*V,T+=r*G,P+=r*K,N+=r*Z,R+=r*Y,O+=r*Q,r=t[14],w+=r*L,b+=r*D,x+=r*B,E+=r*U,_+=r*F,k+=r*$,C+=r*z,A+=r*H,S+=r*W,I+=r*q,T+=r*V,P+=r*G,N+=r*K,R+=r*Z,O+=r*Y,M+=r*Q,r=t[15],b+=r*L,x+=r*D,E+=r*B,_+=r*U,k+=r*F,C+=r*$,A+=r*z,S+=r*H,I+=r*W,T+=r*q,P+=r*V,N+=r*G,R+=r*K,O+=r*Z,M+=r*Y,j+=r*Q,s+=38*x,o+=38*E,a+=38*_,c+=38*k,l+=38*C,u+=38*A,d+=38*S,h+=38*I,p+=38*T,f+=38*P,m+=38*N,g+=38*R,y+=38*O,v+=38*M,w+=38*j,i=1,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,s+=i-1+37*(i-1),i=1,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,s+=i-1+37*(i-1),e[0]=s,e[1]=o,e[2]=a,e[3]=c,e[4]=l,e[5]=u,e[6]=d,e[7]=h,e[8]=p,e[9]=f,e[10]=m,e[11]=g,e[12]=y,e[13]=v,e[14]=w,e[15]=b}function p(e,t){h(e,t,t)}function f(e,t){const n=new Uint8Array(32),r=new Float64Array(80),i=s(),o=s(),f=s(),m=s(),g=s(),y=s();for(let s=0;s<31;s++)n[s]=e[s];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(r,t);for(let s=0;s<16;s++)o[s]=r[s];i[0]=m[0]=1;for(let s=254;s>=0;--s){const e=n[s>>>3]>>>(7&s)&1;l(i,o,e),l(f,m,e),u(g,i,f),d(i,i,f),u(f,o,m),d(o,o,m),p(m,g),p(y,i),h(i,f,i),h(f,o,g),u(g,i,f),d(i,i,f),p(o,i),d(f,m,y),h(i,f,a),u(i,i,m),h(f,f,i),h(i,m,y),h(m,o,r),p(o,g),l(i,o,e),l(f,m,e)}for(let s=0;s<16;s++)r[s+16]=i[s],r[s+32]=f[s],r[s+48]=o[s],r[s+64]=m[s];const v=r.subarray(32),w=r.subarray(16);!function(e,t){const n=s();for(let r=0;r<16;r++)n[r]=t[r];for(let r=253;r>=0;r--)p(n,n),2!==r&&4!==r&&h(n,n,t);for(let r=0;r<16;r++)e[r]=n[r]}(v,v),h(w,w,v);const b=new Uint8Array(32);return function(e,t){const n=s(),r=s();for(let i=0;i<16;i++)r[i]=t[i];c(r),c(r),c(r);for(let i=0;i<2;i++){n[0]=r[0]-65517;for(let t=1;t<15;t++)n[t]=r[t]-65535-(n[t-1]>>16&1),n[t-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,l(r,n,1-e)}for(let i=0;i<16;i++)e[2*i]=255&r[i],e[2*i+1]=r[i]>>8}(b,w),b}function m(e){return f(e,o)}function g(e){if(e.length!==t.wE)throw new Error(`x25519: seed must be ${t.wE}
vendor: 5,400 bytes, line 5511
5511 bytes`);const n=new Uint8Array(e);return{publicKey:m(n),secretKey:n}}t.TZ=function(e){const t=(0,r.randomBytes)(32,e),n=g(t);return(0,i.wipe)(t),n},t.Tc=function(e,n){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.length!==t.Xx)throw new Error("X25519: incorrect secret key length");if(n.length!==t.Xx)throw new Error("X25519: incorrect public key length");const i=f(e,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}},4524:(e,t,n)=>{var r="undefined"!==typeof globalThis&&globalThis||"undefined"!==typeof self&&self||"undefined"!==typeof n.g&&n.g,i=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var n="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||"undefined"!==typeof n&&n,r="URLSearchParams"in n,i="Symbol"in n&&"iterator"in Symbol,s="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in n,a="ArrayBuffer"in n;if(a)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!==typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:s&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&s&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=f(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(g)}),this.text=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=m(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(x)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=u(e),t=d(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},p.prototype.delete=function(e){delete this.map[u(e)]},p.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},p.prototype.set=function(e,t){this.map[u(e)]=d(t)},p.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},p.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),h(e)},p.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),h(e)},p.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),h(e)},i&&(p.prototype[Symbol.iterator]=p.prototype.entries);
5511var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){if(!(this instanceof b))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=function(e){var t=e.toUpperCase();return w.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),("GET"===this.method||"HEAD"===this.method)&&("no-store"===t.cache||"no-cache"===t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function x(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function E(e){var t=new p;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function _(e,t){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},v.call(b.prototype),v.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];_.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},t.DOMException=n.DOMException;try{new t.DOMException}catch(A){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function C(e,r){return new Promise((function(i,o){var c=new b(e,r);if(c.signal&&c.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function u(){l.abort()}l.onload=function(){var e={status:l.status,statusText:l.statusText,headers:E(l.getAllResponseHeaders()||"")};e.url="responseURL"in l?l.responseURL:e.headers.get("X-Request-URL");var t="response"in l?l.response:l.responseText;setTimeout((function(){i(new _(t,e))}),0)},l.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},l.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},l.onabort=function(){setTimeout((function(){o(new t.DOMException("Aborted","AbortError"))}),0)},l.open(c.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?l.withCredentials=!0:"omit"===c.credentials&&(l.withCredentials=!1),"responseType"in l&&(s?l.responseType="blob":a&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(l.responseType="arraybuffer")),!r||"object"!==typeof r.headers||r.headers instanceof p?c.headers.forEac
5511h((function(e,t){l.setRequestHeader(t,e)})):Object.getOwnPropertyNames(r.headers).forEach((function(e){l.setRequestHeader(e,d(r.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",u),l.onreadystatechange=function(){4===l.readyState&&c.signal.removeEventListener("abort",u)}),l.send("undefined"===typeof c._bodyInit?null:c._bodyInit)}))}C.polyfill=!0,n.fetch||(n.fetch=C,n.Headers=p,n.Request=b,n.Response=_),t.Headers=p,t.Request=b,t.Response=_,t.fetch=C}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var s=r.fetch?r:i;(t=s.fetch).default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,e.exports=t},4549:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1===(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1===(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},4553:(e,t,n)=>{const r=n(6580),i=n(5956),s=n(8415),o=n(794),a=n(6432),c=r.getBCHDigit(7973);function l(e,t){return o.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach((function(e){const r=l(e.mode,t);n+=r+e.getBitsLength()})),n}t.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!a.isValid(e))throw new Error("Invalid QR Code version");"undefined"===typeof n&&(n=o.BYTE);const s=8*(r.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(n===o.MIXED)return s;const c=s-l(n,e);switch(n){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let r;const i=s.from(n,s.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(u(e,r)<=t.getCapacity(r,n,o.MIXED))return r}(e,i);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let i=1;i<=40;i++)if(n<=t.getCapacity(i,r,e))return i}(r.mode,r.getLength(),i)},t.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-c>=0;)t^=7973<<r.getBCHDigit(t)-c;return e<<12|t}},4567:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},4599:(e,t,n)=>{const r=n(8496);function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(let n=0;n<50;++n)this.state[n]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<this.count%4*8,0!==(128&e)&&this.count===this.blockSize-1&&r.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,r.p1600(this.state),this.count=0,this.squeezing=!0},i.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=Buffer.alloc(e);for(let n=0;n<e;++n)t[n]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0);return t},i.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i},4635:(e,t,n)=>{var r=n(4759).Symbol;e.exports=r},4662:(e,t,n)=>{var r=n(1596),i=n(330),s=n(6047).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function l(e){return e<<30|e>>>2}function u(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,c=0|this._e,d=0;d<16;++d)n[d]=e.readInt32BE(4*d);for(;d<80;++d)n[d]=n[d-3]^n[d-8]^n[d-14]^n[d-16];for(var h=0;h<80;++h){var p=~~(h/20),f=0|((t=r)<<5|t>>>27)+u(p,i,s,a)+c+n[h]+o[p];c=a,a=s,s=l(i),i=r,r=f}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},4687:(e,t,n)=>{e.exports=n(8981).EventEmitter},4746:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Component:()=>C,Fragment:()=>k,cloneElement:()=>V,createContext:()=>G,createElement:()=>x,createRef:()=>_,h:()=>x,hydrate:()=>q,isValidElement:()=>o,options:()=>i,render:()=>W,toChildArray:()=>O});var r,i,s,o,a,c,l,u,d,h,p,f,m={},g=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function w(e,t){for(var n in t)e[n]=t[n];return e}function b(e){var t=e.parentNode;t&&t.removeChild(e)}function x(e,t,n){var i,s,o,a={};
5511for(o in t)"key"==o?i=t[o]:"ref"==o?s=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return E(e,a,i,s,null)}function E(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++s:o,__i:-1,__u:0};return null==o&&null!=i.vnode&&i.vnode(a),a}function _(){return{current:null}}function k(e){return e.children}function C(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?A(e):null}function S(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return S(e)}}function I(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!T.__r++||c!==i.debounceRendering)&&((c=i.debounceRendering)||l)(T)}function T(){var e,t,n,r,s,o,c,l;for(a.sort(u);e=a.shift();)e.__d&&(t=a.length,r=void 0,o=(s=(n=e).__v).__e,c=[],l=[],n.__P&&((r=w({},s)).__v=s.__v+1,i.vnode&&i.vnode(r),B(n.__P,r,s,n.__n,n.__P.namespaceURI,32&s.__u?[o]:null,c,null==o?A(s):o,!!(32&s.__u),l),r.__v=s.__v,r.__.__k[r.__i]=r,U(c,r,l),r.__e!=o&&S(r)),a.length>t&&a.sort(u));T.__r=0}function P(e,t,n,r,i,s,o,a,c,l,u){var d,h,p,f,y,v=r&&r.__k||g,w=t.length;for(n.__d=c,N(n,t,v),c=n.__d,d=0;d<w;d++)null!=(p=n.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(h=-1===p.__i?m:v[p.__i]||m,p.__i=d,B(e,p,h,i,s,o,a,c,l,u),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&$(h.ref,null,p),u.push(p.ref,p.__c||f,p)),null==y&&null!=f&&(y=f),65536&p.__u||h.__k===p.__k?c=R(p,c,e):"function"==typeof p.type&&void 0!==p.__d?c=p.__d:f&&(c=f.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=y}function N(e,t,n){var r,i,s,o,a,c=t.length,l=n.length,u=l,d=0;for(e.__k=[],r=0;r<c;r++)o=r+d,null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?E(null,i,null,null,null):v(i)?E(k,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?E(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,a=M(i,n,o,u),i.__i=a,s=null,-1!==a&&(u--,(s=n[a])&&(s.__u|=131072)),null==s||null===s.__v?(-1==a&&d--,"function"!=typeof i.type&&(i.__u|=65536)):a!==o&&(a==o-1?d=a-o:a==o+1?d++:a>o?u>c-o?d+=a-o:d--:a<o&&d++,a!==r+d&&(i.__u|=65536))):(s=n[o])&&null==s.key&&s.__e&&0==(131072&s.__u)&&(s.__e==e.__d&&(e.__d=A(s)),z(s,s,!1),n[o]=null,u--);if(u)for(r=0;r<l;r++)null!=(s=n[r])&&0==(131072&s.__u)&&(s.__e==e.__d&&(e.__d=A(s)),z(s,s))}function R(e,t,n){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=R(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=A(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function O(e,t){return t=t||[],null==e||"boolean"==typeof e||(v(e)?e.some((function(e){O(e,t)})):t.push(e)),t}function M(e,t,n,r){var i=e.key,s=e.type,o=n-1,a=n+1,c=t[n];if(null===c||c&&i==c.key&&s===c.type&&0==(131072&c.__u))return n;if(r>(null!=c&&0==(131072&c.__u)?1:0))for(;o>=0||a<t.length;){if(o>=0){if((c=t[o])&&0==(131072&c.__u)&&i==c.key&&s===c.type)return o;o--}if(a<t.length){if((c=t[a])&&0==(131072&c.__u)&&i==c.key&&s===c.type)return a;a++}}return-1}function j(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||y.test(t)?n:n+"px"}function L(e,t,n,r,i){var s;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||j(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||j(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])s=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=d,e.addEventListener(t,s?p:h,s)):e.removeEventListener(t,s?p:h,s);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function D(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=d++;else if(t.t<n.u)return;return n(i.event?i.event(t):t)}}}function B(e,t,n,r,s,o,a,c,l,u){var d,h,p,f,m,g,y,b,x,E,_,A,S,I,T,N,R=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[c=t.__e=n.__e]),(d=i.__b)&&d(t);e:if("function"==typeof R)try{if(b=t.props,x="prototype"in R&&R.prototype.render,E=(d=R.contextType)&&r[d.__c],_=d?E?E.props.value:d.__:r,n.__c?y=(h=t.__c=n.__c).__=h.__E:(x?t.__c=h=new R(b,_):(t.__c=h=new C(b,_),h.constructor=R,h.render=H),E&&E.sub(h),h.props=b,h.state||(h.state={}),h.context=_,h.__n=r,p=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=R.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=w({}
vendor: 4,124 bytes, line 5511
5511,h.__s)),w(h.__s,R.getDerivedStateFromProps(b,h.__s))),f=h.props,m=h.state,h.__v=t,p)x&&null==R.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(x&&null==R.getDerivedStateFromProps&&b!==f&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,_),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,_)||t.__v===n.__v)){for(t.__v!==n.__v&&(h.props=b,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),A=0;A<h._sb.length;A++)h.__h.push(h._sb[A]);h._sb=[],h.__h.length&&a.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,_),x&&null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(f,m,g)}))}if(h.context=_,h.props=b,h.__P=e,h.__e=!1,S=i.__r,I=0,x){for(h.state=h.__s,h.__d=!1,S&&S(t),d=h.render(h.props,h.state,h.context),T=0;T<h._sb.length;T++)h.__h.push(h._sb[T]);h._sb=[]}else do{h.__d=!1,S&&S(t),d=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++I<25);h.state=h.__s,null!=h.getChildContext&&(r=w(w({},r),h.getChildContext())),x&&!p&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(f,m)),P(e,v(N=null!=d&&d.type===k&&null==d.key?d.props.children:d)?N:[N],t,n,r,s,o,a,c,l,u),h.base=t.__e,t.__u&=-161,h.__h.length&&a.push(h),y&&(h.__E=h.__=null)}catch(e){if(t.__v=null,l||null!=o){for(t.__u|=l?160:32;c&&8===c.nodeType&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,t.__e=c}else t.__e=n.__e,t.__k=n.__k;i.__e(e,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=F(n.__e,t,n,r,s,o,a,l,u);(d=i.diffed)&&d(t)}function U(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)$(n[r],n[++r],n[++r]);i.__c&&i.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){i.__e(e,t.__v)}}))}function F(e,t,n,i,s,o,a,c,l){var u,d,h,p,f,g,y,w=n.props,x=t.props,E=t.type;if("svg"===E?s="http://www.w3.org/2000/svg":"math"===E?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=o)for(u=0;u<o.length;u++)if((f=o[u])&&"setAttribute"in f==!!E&&(E?f.localName===E:3===f.nodeType)){e=f,o[u]=null;break}if(null==e){if(null===E)return document.createTextNode(x);e=document.createElementNS(s,E,x.is&&x),o=null,c=!1}if(null===E)w===x||c&&e.data===x||(e.data=x);else{if(o=o&&r.call(e.childNodes),w=n.props||m,!c&&null!=o)for(w={},u=0;u<e.attributes.length;u++)w[(f=e.attributes[u]).name]=f.value;for(u in w)if(f=w[u],"children"==u);else if("dangerouslySetInnerHTML"==u)h=f;else if("key"!==u&&!(u in x)){if("value"==u&&"defaultValue"in x||"checked"==u&&"defaultChecked"in x)continue;L(e,u,null,f,s)}for(u in x)f=x[u],"children"==u?p=f:"dangerouslySetInnerHTML"==u?d=f:"value"==u?g=f:"checked"==u?y=f:"key"===u||c&&"function"!=typeof f||w[u]===f||L(e,u,f,w[u],s);if(d)c||h&&(d.__html===h.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(h&&(e.innerHTML=""),P(e,v(p)?p:[p],t,n,i,"foreignObject"===E?"http://www.w3.org/1999/xhtml":s,o,a,o?o[0]:n.__k&&A(n,0),c,l),null!=o)for(u=o.length;u--;)null!=o[u]&&b(o[u]);c||(u="value",void 0!==g&&(g!==e[u]||"progress"===E&&!g||"option"===E&&g!==w[u])&&L(e,u,g,w[u],s),u="checked",void 0!==y&&y!==e[u]&&L(e,u,y,w[u],s))}return e}function $(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){i.__e(e,n)}}function z(e,t,n){var r,s;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||$(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){i.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&z(r[s],t,n||"function"!=typeof e.type);n||null==e.__e||b(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function H(e,t,n){return this.constructor(e,n)}function W(e,t,n){var s,o,a,c;i.__&&i.__(e,t),o=(s="function"==typeof n)?null:n&&n.__k||t.__k,a=[],c=[],B(t,e=(!s&&n||t).__k=x(k,null,[e]),o||m,m,t.namespaceURI,!s&&n?[n]:o?null:t.firstChild?r.call(t.childNodes):null,a,!s&&n?n:o?o.__e:t.firstChild,s,c),U(a,e,c)}function q(e,t){W(e,t,q)}
vendor: 1,607 bytes, line 5511
5511function V(e,t,n){var i,s,o,a,c=w({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?i=t[o]:"ref"==o?s=t[o]:c[o]=void 0===t[o]&&void 0!==a?a[o]:t[o];return arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),E(e.type,c,i||e.key,s||e.ref,null)}function G(e,t){var n={__c:t="__cC"+f++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,I(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=g.slice,i={__e:function(e,t,n,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},s=0,o=function(e){return null!=e&&null==e.constructor},C.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=w({},this.state),"function"==typeof e&&(e=e(w({},n),this.props)),e&&w(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),I(this))},C.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),I(this))},C.prototype.render=k,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Prom
5511ise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},T.__r=0,d=0,h=D(!1),p=D(!0),f=0},4754:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},4759:(e,t,n)=>{var r=n(6658),i="object"==typeof self&&self&&self.Object===Object&&self,s=r||i||Function("return this")();e.exports=s},4796:(e,t,n)=>{const{Transform:r}=n(4833);e.exports=e=>class t extends r{constructor(t,n,r,i){super(i),this._rate=t,this._capacity=n,this._delimitedSuffix=r,this._options=i,this._state=new e,this._state.initialize(t,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(i){r=i}n(r)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!Buffer.isBuffer(e)&&"string"!==typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let n=this._state.squeeze(e);return void 0!==t&&(n=n.toString(t)),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},4822:e=>{"use strict";function t(e,t){r(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var s=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(r,this,e)):process.nextTick(r,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?s._writableState?s._writableState.errorEmitted?process.nextTick(n,s):(s._writableState.errorEmitted=!0,process.nextTick(t,s,e)):process.nextTick(t,s,e):i?(process.nextTick(n,s),i(e)):process.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},4833:(e,t,n)=>{(t=e.exports=n(3230)).Stream=t,t.Readable=t,t.Writable=n(4306),t.Duplex=n(7544),t.Transform=n(5624),t.PassThrough=n(2666),t.finished=n(8172),t.pipeline=n(3648)},4914:(e,t,n)=>{"use strict";t._S=t.K=t.TP=t.wE=t.Ee=void 0;const r=n(6022),i=n(9816),s=n(5070);function o(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}t.Ee=64,t.wE=64,t.TP=32;new Uint8Array(32)[0]=9;const a=o(),c=o([1]),l=o([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=o([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),d=o([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=o([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=o([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function f(e,t){for(let n=0;n<16;n++)e[n]=0|t[n]}function m(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function g(e,t,n){const r=~(n-1);for(let i=0;i<16;i++){const n=r&(e[i]^t[i]);e[i]^=n,t[i]^=n}}function y(e,t){const n=o(),r=o();for(let i=0;i<16;i++)r[i]=t[i];m(r),m(r),m(r);for(let i=0;i<2;i++){n[0]=r[0]-65517;for(let t=1;t<15;t++)n[t]=r[t]-65535-(n[t-1]>>16&1),n[t-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,g(r,n,1-e)}for(let i=0;i<16;i++)e[2*i]=255&r[i],e[2*i+1]=r[i]>>8}function v(e,t){let n=0;for(let r=0;r<32;
5511r++)n|=e[r]^t[r];return(1&n-1>>>8)-1}function w(e,t){const n=new Uint8Array(32),r=new Uint8Array(32);return y(n,e),y(r,t),v(n,r)}function b(e){const t=new Uint8Array(32);return y(t,e),1&t[0]}function x(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function E(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function _(e,t,n){let r,i,s=0,o=0,a=0,c=0,l=0,u=0,d=0,h=0,p=0,f=0,m=0,g=0,y=0,v=0,w=0,b=0,x=0,E=0,_=0,k=0,C=0,A=0,S=0,I=0,T=0,P=0,N=0,R=0,O=0,M=0,j=0,L=n[0],D=n[1],B=n[2],U=n[3],F=n[4],$=n[5],z=n[6],H=n[7],W=n[8],q=n[9],V=n[10],G=n[11],K=n[12],Z=n[13],Y=n[14],Q=n[15];r=t[0],s+=r*L,o+=r*D,a+=r*B,c+=r*U,l+=r*F,u+=r*$,d+=r*z,h+=r*H,p+=r*W,f+=r*q,m+=r*V,g+=r*G,y+=r*K,v+=r*Z,w+=r*Y,b+=r*Q,r=t[1],o+=r*L,a+=r*D,c+=r*B,l+=r*U,u+=r*F,d+=r*$,h+=r*z,p+=r*H,f+=r*W,m+=r*q,g+=r*V,y+=r*G,v+=r*K,w+=r*Z,b+=r*Y,x+=r*Q,r=t[2],a+=r*L,c+=r*D,l+=r*B,u+=r*U,d+=r*F,h+=r*$,p+=r*z,f+=r*H,m+=r*W,g+=r*q,y+=r*V,v+=r*G,w+=r*K,b+=r*Z,x+=r*Y,E+=r*Q,r=t[3],c+=r*L,l+=r*D,u+=r*B,d+=r*U,h+=r*F,p+=r*$,f+=r*z,m+=r*H,g+=r*W,y+=r*q,v+=r*V,w+=r*G,b+=r*K,x+=r*Z,E+=r*Y,_+=r*Q,r=t[4],l+=r*L,u+=r*D,d+=r*B,h+=r*U,p+=r*F,f+=r*$,m+=r*z,g+=r*H,y+=r*W,v+=r*q,w+=r*V,b+=r*G,x+=r*K,E+=r*Z,_+=r*Y,k+=r*Q,r=t[5],u+=r*L,d+=r*D,h+=r*B,p+=r*U,f+=r*F,m+=r*$,g+=r*z,y+=r*H,v+=r*W,w+=r*q,b+=r*V,x+=r*G,E+=r*K,_+=r*Z,k+=r*Y,C+=r*Q,r=t[6],d+=r*L,h+=r*D,p+=r*B,f+=r*U,m+=r*F,g+=r*$,y+=r*z,v+=r*H,w+=r*W,b+=r*q,x+=r*V,E+=r*G,_+=r*K,k+=r*Z,C+=r*Y,A+=r*Q,r=t[7],h+=r*L,p+=r*D,f+=r*B,m+=r*U,g+=r*F,y+=r*$,v+=r*z,w+=r*H,b+=r*W,x+=r*q,E+=r*V,_+=r*G,k+=r*K,C+=r*Z,A+=r*Y,S+=r*Q,r=t[8],p+=r*L,f+=r*D,m+=r*B,g+=r*U,y+=r*F,v+=r*$,w+=r*z,b+=r*H,x+=r*W,E+=r*q,_+=r*V,k+=r*G,C+=r*K,A+=r*Z,S+=r*Y,I+=r*Q,r=t[9],f+=r*L,m+=r*D,g+=r*B,y+=r*U,v+=r*F,w+=r*$,b+=r*z,x+=r*H,E+=r*W,_+=r*q,k+=r*V,C+=r*G,A+=r*K,S+=r*Z,I+=r*Y,T+=r*Q,r=t[10],m+=r*L,g+=r*D,y+=r*B,v+=r*U,w+=r*F,b+=r*$,x+=r*z,E+=r*H,_+=r*W,k+=r*q,C+=r*V,A+=r*G,S+=r*K,I+=r*Z,T+=r*Y,P+=r*Q,r=t[11],g+=r*L,y+=r*D,v+=r*B,w+=r*U,b+=r*F,x+=r*$,E+=r*z,_+=r*H,k+=r*W,C+=r*q,A+=r*V,S+=r*G,I+=r*K,T+=r*Z,P+=r*Y,N+=r*Q,r=t[12],y+=r*L,v+=r*D,w+=r*B,b+=r*U,x+=r*F,E+=r*$,_+=r*z,k+=r*H,C+=r*W,A+=r*q,S+=r*V,I+=r*G,T+=r*K,P+=r*Z,N+=r*Y,R+=r*Q,r=t[13],v+=r*L,w+=r*D,b+=r*B,x+=r*U,E+=r*F,_+=r*$,k+=r*z,C+=r*H,A+=r*W,S+=r*q,I+=r*V,T+=r*G,P+=r*K,N+=r*Z,R+=r*Y,O+=r*Q,r=t[14],w+=r*L,b+=r*D,x+=r*B,E+=r*U,_+=r*F,k+=r*$,C+=r*z,A+=r*H,S+=r*W,I+=r*q,T+=r*V,P+=r*G,N+=r*K,R+=r*Z,O+=r*Y,M+=r*Q,r=t[15],b+=r*L,x+=r*D,E+=r*B,_+=r*U,k+=r*F,C+=r*$,A+=r*z,S+=r*H,I+=r*W,T+=r*q,P+=r*V,N+=r*G,R+=r*K,O+=r*Z,M+=r*Y,j+=r*Q,s+=38*x,o+=38*E,a+=38*_,c+=38*k,l+=38*C,u+=38*A,d+=38*S,h+=38*I,p+=38*T,f+=38*P,m+=38*N,g+=38*R,y+=38*O,v+=38*M,w+=38*j,i=1,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,s+=i-1+37*(i-1),i=1,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,s+=i-1+37*(i-1),e[0]=s,e[1]=o,e[2]=a,e[3]=c,e[4]=l,e[5]=u,e[6]=d,e[7]=h,e[8]=p,e[9]=f,e[10]=m,e[11]=g,e[12]=y,e[13]=v,e[14]=w,e[15]=b}function k(e,t){_(e,t,t)}function C(e,t){const n=o();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)k(n,n),2!==r&&4!==r&&_(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function A(e,t){const n=o(),r=o(),i=o(),s=o(),a=o(),c=o(),l=o(),d=o(),h=o();E(n,e[1],e[0]),E(h,t[1],t[0]),_(n,n,h),x(r,e[0],e[1]),x(h,t[0],t[1]),_(r,r,h),_(i,e[3],t[3]),_(i,i,u),_(s,e[2],t[2]),x(s,s,s),E(a,r,n),E(c,s,i),x(l,s,i),x(d,r,n
5511),_(e[0],a,c),_(e[1],d,l),_(e[2],l,c),_(e[3],a,d)}function S(e,t,n){for(let r=0;r<4;r++)g(e[r],t[r],n)}function I(e,t){const n=o(),r=o(),i=o();C(i,t[2]),_(n,t[0],i),_(r,t[1],i),y(e,r),e[31]^=b(n)<<7}function T(e,t,n){f(e[0],a),f(e[1],c),f(e[2],c),f(e[3],a);for(let r=255;r>=0;--r){const i=n[r/8|0]>>(7&r)&1;S(e,t,i),A(t,e),A(e,e),S(e,t,i)}}function P(e,t){const n=[o(),o(),o(),o()];f(n[0],d),f(n[1],h),f(n[2],c),_(n[3],d,h),T(e,n,t)}function N(e){if(e.length!==t.TP)throw new Error(`ed25519: seed must be ${t.TP} bytes`);const n=(0,i.hash)(e);n[0]&=248,n[31]&=127,n[31]|=64;const r=new Uint8Array(32),s=[o(),o(),o(),o()];P(s,n),I(r,s);const a=new Uint8Array(64);return a.set(e),a.set(r,32),{publicKey:r,secretKey:a}}t.K=N;const R=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function O(e,t){let n,r,i,s;for(r=63;r>=32;--r){for(n=0,i=r-32,s=r-12;i<s;++i)t[i]+=n-16*t[r]*R[i-(r-32)],n=Math.floor((t[i]+128)/256),t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*R[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*R[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function M(e){const t=new Float64Array(64);for(let n=0;n<64;n++)t[n]=e[n];for(let n=0;n<64;n++)e[n]=0;O(e,t)}function j(e,t){const n=o(),r=o(),i=o(),s=o(),u=o(),d=o(),h=o();return f(e[2],c),function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(e[1],t),k(i,e[1]),_(s,i,l),E(i,i,e[2]),x(s,e[2],s),k(u,s),k(d,u),_(h,d,u),_(n,h,i),_(n,n,s),function(e,t){const n=o();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)k(n,n),1!==r&&_(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(n,n),_(n,n,i),_(n,n,s),_(n,n,s),_(e[0],n,s),k(r,e[0]),_(r,r,s),w(r,i)&&_(e[0],e[0],p),k(r,e[0]),_(r,r,s),w(r,i)?-1:(b(e[0])===t[31]>>7&&E(e[0],a,e[0]),_(e[3],e[0],e[1]),0)}t._S=function(e,t){const n=new Float64Array(64),r=[o(),o(),o(),o()],s=(0,i.hash)(e.subarray(0,32));s[0]&=248,s[31]&=127,s[31]|=64;const a=new Uint8Array(64);a.set(s.subarray(32),32);const c=new i.SHA512;c.update(a.subarray(32)),c.update(t);const l=c.digest();c.clean(),M(l),P(r,l),I(a,r),c.reset(),c.update(a.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const u=c.digest();M(u);for(let i=0;i<32;i++)n[i]=l[i];for(let i=0;i<32;i++)for(let e=0;e<32;e++)n[i+e]+=u[i]*s[e];return O(a.subarray(32),n),a}},4927:(e,t,n)=>{const r=n(794),i=["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 s(e){this.mode=r.ALPHANUMERIC,this.data=e}s.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*i.indexOf(this.data[t]);n+=i.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=s},5070:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e}},5227:(e,t)=>{"use strict";function n(){return"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product}function r(){return"undefined"!==typeof process&&"undefined"!==typeof process.versions&&"undefined"!==typeof process.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=n,t.isNode=r,t.isBrowser=function(){return!n()&&!r()}},5328:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RedirectDialog=void 0;const i=r(n(2803)),s=n(4746),o=n(4388),a=n(2622),c=n(1101),l=r(n(2906));t.RedirectDialog=class{constructor(){this.root=null,this.darkMode=(0,c.isDarkMode)()}attach(){const e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,o.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,s.render)(null,this.root),e&&(0,s.render)((0,s.h)(u,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}};const u=e=>{let{title:t,buttonText:n,darkMode:r,onButtonClick:o,onDismiss:c}=e;const u=r?"dark":"light";return(0,s.h)(a.SnackbarContainer,{darkMode:r},(0,s.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,s.h)("style",null,l.default),(0,s.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:c}),(0,s.h)("div",{class:(0,i.default)("-cbwsdk-redirect-dialog-box",u)},(0,s.h)("p",null,t),(0,s.h)("button",{onClick:o},n))))}},5336:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5340:(e,t,n)=>{"use strict";e.exports=n(1761)},5360:(e,t)=>{"use strict";
5511Object.defineProperty(t,"__esModule",{value:!0}),t.determineMethodCategory=void 0;const n={handshake:["eth_requestAccounts"],sign:["eth_ecRecover","personal_sign","personal_ecRecover","eth_signTransaction","eth_sendTransaction","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_signTypedData","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_watchAsset","wallet_getCapabilities","wallet_sendCalls","wallet_showCallsStatus"],state:["eth_chainId","eth_accounts","eth_coinbase","net_version"],deprecated:["eth_sign","eth_signTypedData_v2"],unsupported:["eth_subscribe","eth_unsubscribe"],fetch:[]};t.determineMethodCategory=function(e){for(const t in n){const r=t;if(n[r].includes(e))return r}}},5491:(e,t,n)=>{var r=n(4567),i=n(4378),s=n(2588),o=Math.max,a=Math.min;e.exports=function(e,t,n){var c,l,u,d,h,p,f=0,m=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=c,r=l;return c=l=void 0,f=t,d=e.apply(r,n)}function w(e){var n=e-p;return void 0===p||n>=t||n<0||g&&e-f>=u}function b(){var e=i();if(w(e))return x(e);h=setTimeout(b,function(e){var n=t-(e-p);return g?a(n,u-(e-f)):n}(e))}function x(e){return h=void 0,y&&c?v(e):(c=l=void 0,d)}function E(){var e=i(),n=w(e);if(c=arguments,l=this,p=e,n){if(void 0===h)return function(e){return f=e,h=setTimeout(b,t),m?v(e):d}(p);if(g)return clearTimeout(h),h=setTimeout(b,t),v(p)}return void 0===h&&(h=setTimeout(b,t)),d}return t=s(t)||0,r(n)&&(m=!!n.leading,u=(g="maxWait"in n)?o(s(n.maxWait)||0,t):u,y="trailing"in n?!!n.trailing:y),E.cancel=function(){void 0!==h&&clearTimeout(h),f=0,c=p=l=h=void 0},E.flush=function(){return void 0===h?d:x(i())},E}},5509:(e,t,n)=>{"use strict";t.g=void 0;const r=n(2146);t.g=function(){let e,t;try{e=r.getDocumentOrThrow(),t=r.getLocationOrThrow()}catch(s){return null}function n(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=e.getElementsByTagName("meta");for(let e=0;e<i.length;e++){const t=i[e],r=["itemprop","property","name"].map((e=>t.getAttribute(e))).filter((e=>!!e&&n.includes(e)));if(r.length&&r){const e=t.getAttribute("content");if(e)return e}}return""}const i=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:n("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],s=i.getAttribute("rel");if(s&&s.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop();n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}(),name:i}}},5545:(e,t,n)=>{var r=n(1596),i=n(920),s=n(330),o=n(6047).Buffer,a=new Array(160);function c(){this.init(),this._w=a,s.call(this,128,112)}r(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},5589:function(e,t,n){!function(e){"use strict";if(!e.setImmediate){var t,n=1,r={},i=!1,s=e.document,o=Object.getPrototypeOf&&Object.getPrototypeOf(e);o=o&&o.setTimeout?o:e,"[object process]"==={}.toString.call(e.process)?t=function(e){process.nextTick((function(){c(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var n="setImmediate$"+Math.random()+"$",r=function(t){t.source===e&&"string"===typeof t.data&&0===t.data.indexOf(n)&&c(+t.data.slice(n.length))};e.addEventListener?e.addEventListener("message",r,!1):e.attachEvent("onmessage",r),t=function(t){e.postMessage(n+t,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){c(e.data)},t=function(t){e.port2.postMessage(t)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var e=s.documentElement;t=function(t){var n=s.createElement("script");n.onreadystatechange=function(){c(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():t=function(e){setTimeout(c,0,e)},o.setImmediate=function(e){"function"!==typeof e&&(e=new Function(""+e));for(var i=new Array(arguments.length-1),s=0;s<i.length;s++)i[s]=arguments[s+1];var o={callback:e,args:i};return r[n]=o,t(n),n++},o.clearImmediate=a}function a(e){delete r[e]}function c(e){if(i)setTimeout(c,0,e);else{var t=r[e];if(t){i=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{a(e),i=!1}}}}}("undefined"===typeof self?"undefined"===typeof n.g?this:n.g:self)},5624:(e,t,n)=>{"use strict";e.exports=u;
5511var r=n(7614).F,i=r.ERR_METHOD_NOT_IMPLEMENTED,s=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,c=n(7544);function l(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new s);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);c.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"===typeof e.transform&&(this._transform=e.transform),"function"===typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!==typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,n){h(e,t,n)}))}function h(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}n(1596)(u,c),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,n){n(new i("_transform()"))},u.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,(function(e){t(e)}))}},5718:(e,t,n)=>{"use strict";n.d(t,{Uj:()=>V,Np:()=>te,jQ:()=>K,$m:()=>ye,TP:()=>g,x4:()=>R,aK:()=>J,oU:()=>a,wE:()=>c,f:()=>ge,En:()=>I,W3:()=>re,p_:()=>L,aG:()=>ce,Hd:()=>p,z3:()=>M,IN:()=>U,aS:()=>ve,Rv:()=>ue,Pt:()=>v,iT:()=>k,GN:()=>W,Wn:()=>Y,Ib:()=>he,WC:()=>P});var r=n(9907),i=n(5877);const s="https://secure.walletconnect.com",o=[{label:"Coinbase",name:"coinbase",feeRange:"1-2%",url:""}],a={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,ONE_SEC_MS:1e3,SECURE_SITE:s,SECURE_SITE_DASHBOARD:`${s}/dashboard`,SECURE_SITE_FAVICON:`${s}/images/favicon.png`,RESTRICTED_TIMEZONES:["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],WC_COINBASE_PAY_SDK_CHAINS:["ethereum","arbitrum","polygon","avalanche-c-chain","optimism","celo","base"],WC_COINBASE_PAY_SDK_FALLBACK_CHAIN:"ethereum",WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP:{Ethereum:"ethereum","Arbitrum One":"arbitrum",Polygon:"polygon",Avalanche:"avalanche-c-chain","OP Mainnet":"optimism",Celo:"celo",Base:"base"},WC_COINBASE_ONRAMP_APP_ID:"bf18c88d-495a-463b-b249-0b9d3656cf5e",SWAP_SUGGESTED_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP"],SWAP_POPULAR_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP","METAL","DAI","CHAMP","WOLF","SALE","BAL","BUSD","MUST","BTCpx","ROUTE","HEX","WELT","amDAI","VSQ","VISION","AURUM","pSP","SNX","VC","LINK","CHP","amUSDT","SPHERE","FOX","GIDDY","GFC","OMEN","OX_OLD","DE","WNT"],SWAP_SUPPORTED_NETWORKS:["eip155:1","eip155:42161","eip155:10","eip155:324","eip155:8453","eip155:56","eip155:137","eip155:100","eip155:43114","eip155:250","eip155:8217","eip155:1313161554"],NATIVE_TOKEN_ADDRESS:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",CONVERT_SLIPPAGE_TOLERANCE:1},c={isMobile:()=>"undefined"!==typeof window&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),checkCaipNetwork(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e?.id.toLocaleLowerCase().includes(t.toLowerCase())},isAndroid(){const e=window.navigator.userAgent.toLowerCase();return c.isMobile()&&e.includes("android")},isIos(){const e=window.navigator.userAgent.toLowerCase();return c.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isClient:()=>"undefined"!==typeof window,isPairingExpired:e=>!e||e-Date.now()<=a.TEN_SEC_MS,isAllowedRetry:e=>Date.now()-e>=a.ONE_SEC_MS,copyToClopboard(e){navigator.clipboard.writeText(e)},getPairingExpiry:()=>Date.now()+a.FOUR_MINUTES_MS,getNetworkId:e=>e?.split(":")[1],getPlainAddress:e=>e?.split(":")[2],wait:async e=>new Promise((t=>{setTimeout(t,e)})),debounce(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];t&&clearTimeout(t),t=setTimeout((function(){e(...i)}),n)}},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),formatNativeUrl(e,t){if(c.isHttpUrl(e))return this.formatUniversalUrl(e,t);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`);return{redirect:`${n}wc?uri=${encodeURIComponent(t)}`,href:n}},formatUniversalUrl(e,t){if(!c.isHttpUrl(e))return this.formatNativeUrl(e,t);let n=e;n.endsWith("/")||(n=`${n}/`);return{redirect:`${n}wc?uri=${encodeURIComponent(t)}`,href:n}},openHref(e,t,n){window.open(e,t,n||"noreferrer noopener")},returnOpenHref:(e,t,n)=>window.open(e,t,n||"noreferrer noopener"),async preloadImage(e){const t=new Promise(((t,n)=>{const r=new Image;r.onload=t,r.onerror=n,r.crossOrigin="anonymous",r.src=e}));return Promise.race([t,c.wait(2e3)])},formatBalance(e,t){let n;if("0"===e)n="0.000";else if("string"===typeof e){const t=Number(e);t&&(n=t.toString().match(/^-?\d+(?:\.\d{0,3})?/u)?.[0])}return n?`${n} ${t??""}`:`0.000 ${t??""}`},formatBalance2(e,t){let n;if("0"===e)n="0";else if("string"===typeof e){const t=Number(e);t&&(n=t.toString().match(/^-?\d+(?:\.\d{0,3})?/u)?.[0])}
5511return{value:n??"0",rest:"0"===n?"000":"",symbol:t}},isRestrictedRegion(){try{const{timeZone:e}=(new Intl.DateTimeFormat).resolvedOptions(),t=e.toUpperCase();return a.RESTRICTED_TIMEZONES.includes(t)}catch{return!1}},getApiUrl:()=>c.isRestrictedRegion()?"https://api.web3modal.org":"https://api.web3modal.com",getBlockchainApiUrl:()=>c.isRestrictedRegion()?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com",getAnalyticsUrl:()=>c.isRestrictedRegion()?"https://pulse.walletconnect.org":"https://pulse.walletconnect.com",getUUID:()=>crypto?.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),parseError:e=>"string"===typeof e?e:"string"===typeof e?.issues?.[0]?.message?e.issues[0].message:e instanceof Error?e.message:"Unknown error",sortRequestedNetworks(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n={};return t&&e&&(e.forEach(((e,t)=>{n[e]=t})),t.sort(((e,t)=>{const r=n[e.id],i=n[t.id];return void 0!==r&&void 0!==i?r-i:void 0!==r?-1:void 0!==i?1:0}))),t},calculateBalance(e){let t=0;for(const n of e)t+=n.value??0;return t},formatTokenBalance(e){const t=e.toFixed(2),[n,r]=t.split(".");return{dollars:n,pennies:r}},isAddress:e=>!!/^(?:0x)?[0-9a-f]{40}$/iu.test(e)&&!(!/^(?:0x)?[0-9a-f]{40}$/iu.test(e)&&!/^(?:0x)?[0-9A-F]{40}$/iu.test(e))};async function l(){const e=await fetch(...arguments);if(!e.ok){throw new Error(`HTTP status code: ${e.status}`,{cause:e})}return e}class u{constructor(e){let{baseUrl:t}=e;this.baseUrl=t}async get(e){let{headers:t,signal:n,...r}=e;const i=this.createUrl(r);return(await l(i,{method:"GET",headers:t,signal:n,cache:"no-cache"})).json()}async getBlob(e){let{headers:t,signal:n,...r}=e;const i=this.createUrl(r);return(await l(i,{method:"GET",headers:t,signal:n})).blob()}async post(e){let{body:t,headers:n,signal:r,...i}=e;const s=this.createUrl(i);return(await l(s,{method:"POST",headers:n,body:t?JSON.stringify(t):void 0,signal:r})).json()}async put(e){let{body:t,headers:n,signal:r,...i}=e;const s=this.createUrl(i);return(await l(s,{method:"PUT",headers:n,body:t?JSON.stringify(t):void 0,signal:r})).json()}async delete(e){let{body:t,headers:n,signal:r,...i}=e;const s=this.createUrl(i);return(await l(s,{method:"DELETE",headers:n,body:t?JSON.stringify(t):void 0,signal:r})).json()}createUrl(e){let{path:t,params:n}=e;const r=new URL(t,this.baseUrl);return n&&Object.entries(n).forEach((e=>{let[t,n]=e;n&&r.searchParams.append(t,n)})),r}}var d=n(7386);const h=(0,i.BX)({projectId:"",sdkType:"w3m",sdkVersion:"html-wagmi-undefined"}),p={state:h,subscribeKey:(e,t)=>(0,r.u$)(h,e,t),setProjectId(e){h.projectId=e},setAllWallets(e){h.allWallets=e},setIncludeWalletIds(e){h.includeWalletIds=e},setExcludeWalletIds(e){h.excludeWalletIds=e},setFeaturedWalletIds(e){h.featuredWalletIds=e},setTokens(e){h.tokens=e},setTermsConditionsUrl(e){h.termsConditionsUrl=e},setPrivacyPolicyUrl(e){h.privacyPolicyUrl=e},setCustomWallets(e){h.customWallets=e},setIsSiweEnabled(e){h.isSiweEnabled=e},setEnableAnalytics(e){h.enableAnalytics=e},setSdkVersion(e){h.sdkVersion=e},setMetadata(e){h.metadata=e},setOnrampEnabled(e){h.enableOnramp=e},setWalletFeaturesEnabled(e){h.enableWalletFeatures=e},getSnapshot:()=>(0,i.P9)(h)},f={purchaseCurrencies:[{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"Ether",symbol:"ETH",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]}],paymentCurrencies:[{id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},{id:"EUR",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]}]},m=new u({baseUrl:c.getBlockchainApiUrl()}),g={fetchIdentity(e){let{address:t}=e;return m.get({path:`/v1/identity/${t}`,params:{projectId:p.state.projectId}})},fetchTransactions(e){let{account:t,projectId:n,cursor:r,onramp:i,signal:s}=e;const o=r?{cursor:r}:{};return m.get({path:`/v1/account/${t}/history?projectId=${n}${i?`&onramp=${i}`:""}`,params:o,signal:s})},fetchSwapQuote(e){let{projectId:t,amount:n,userAddress:r,from:i,to:s,gasPrice:o}=e;return m.get({path:"/v1/convert/quotes",headers:{"Content-Type":"application/json"},params:{projectId:t,amount:n,userAddress:r,from:i,to:s,gasPrice:o}})},fetchSwapTokens(e){let{projectId:t,chainId:n}=e;return m.get({path:`/v1/convert/tokens?projectId=${t}&chainId=${n}`})},fetchTokenPrice(e){let{projectId:t,addresses:n}=e;return m.post({path:"/v1/fungible/price",body:{projectId:t,currency:"usd",addresses:n},headers:{"Content-Type":"application/json"}})},fetchSwapAllowance(e){let{projectId:t,tokenAddress:n,userAddress:r}=e;const{sdkType:i,sdkVersion:s}=p.state;return m.get({path:`/v1/convert/allowance?projectId=${t}&tokenAddress=${n}&userAddress=${r}`,headers:{"Content-Type":"application/json","x-sdk-type":i,"x-sdk-version":s}})},fetchGasPrice(e){let{projectId:t,chainId:n}=e;const{sdkType:r,sdkVersion:i}=p.state;return m.get({path:"/v1/convert/gas-price",headers:{"Content-Type":"application/json","x-sdk-type":r,"x-sdk-version":i},params:{projectId:t,chainId:n}})},generateSwapCalldata(e){let{amount:t,from:n,projectId:r,to:i,userAddress:s}=e;return m.post({path:"/v1/convert/build-transaction",headers:{"Content-Type":"application/json"},body:{amount:t,eip155:{slippage:a.CONVERT_SLIPPAGE_TOLERANCE},from:n,projectId:r,to:i,userAddress:s}})},generateApproveCalldata(e){let{from:t,projectId:n,to:r,userAddress:i}=e;const{sdkType:s,sdkVersion:o}=p.state;return m.get({path:"/v1/convert/build-approve",headers:{"Content-Type":"application/json","x-sdk-type":s,"x-sdk-version":o},params:{projectId:n,userAddress:i,from:t,to:r}})},async getBalance(e,t,n){const{sdkType:r,sdkVersion:i}=p.state;return m.get({path:`/v1/account/${e}/balance`,headers:{"x-sdk-type":r,"x-sdk-version":i},params:{currency:"usd",projectId:p.state.projectId,chainId:t,forceUpdate:n}})},lookupEnsName:async e=>m.get({path:`/v1/profile/account/${e}${d.oU.WC_NAME_SUFFIX}?projectId=${p.state.projectId}`}),async reverseLookupEnsName(e){let{address:t}=e;return m.get({path:`/v1/profile/reverse/${t}?projectId=${p.state.projectId}`})},getEnsNameSuggestions:async e=>m.get({path:`/v1/profile/suggestions/${e}?projectId=${p.state.projectId}`}
5511),async registerEnsName(e){let{coinType:t,address:n,message:r,signature:i}=e;return m.post({path:"/v1/profile/account",body:{coin_type:t,address:n,message:r,signature:i},headers:{"Content-Type":"application/json"}})},async generateOnRampURL(e){let{destinationWallets:t,partnerUserId:n,defaultNetwork:r,purchaseAmount:i,paymentAmount:s}=e;return(await m.post({path:`/v1/generators/onrampurl?projectId=${p.state.projectId}`,body:{destinationWallets:t,defaultNetwork:r,partnerUserId:n,defaultExperience:"buy",presetCryptoAmount:i,presetFiatAmount:s}})).url},async getOnrampOptions(){try{return await m.get({path:`/v1/onramp/options?projectId=${p.state.projectId}`})}catch(e){return f}},async getOnrampQuote(e){let{purchaseCurrency:t,paymentCurrency:n,amount:r,network:i}=e;try{return await m.post({path:`/v1/onramp/quote?projectId=${p.state.projectId}`,body:{purchaseCurrency:t,paymentCurrency:n,amount:r,network:i}})}catch(s){return{coinbaseFee:{amount:r,currency:n.id},networkFee:{amount:r,currency:n.id},paymentSubtotal:{amount:r,currency:n.id},paymentTotal:{amount:r,currency:n.id},purchaseAmount:{amount:r,currency:n.id},quoteId:"mocked-quote-id"}}}},y=(0,i.BX)({message:"",variant:"success",open:!1}),v={state:y,subscribeKey:(e,t)=>(0,r.u$)(y,e,t),showSuccess(e){y.message=e,y.variant="success",y.open=!0},showError(e){const t=c.parseError(e);y.message=t,y.variant="error",y.open=!0},hide(){y.open=!1}},w="WALLETCONNECT_DEEPLINK_CHOICE",b="@w3m/recent",x="@w3m/connected_wallet_image_url",E="@w3m/connected_connector",_="@w3m/connected_social",k={setWalletConnectDeepLink(e){let{href:t,name:n}=e;try{localStorage.setItem(w,JSON.stringify({href:t,name:n}))}catch{console.info("Unable to set WalletConnect deep link")}},getWalletConnectDeepLink(){try{const e=localStorage.getItem(w);if(e)return JSON.parse(e)}catch{console.info("Unable to get WalletConnect deep link")}},deleteWalletConnectDeepLink(){try{localStorage.removeItem(w)}catch{console.info("Unable to delete WalletConnect deep link")}},setWeb3ModalRecent(e){try{const t=k.getRecentWallets();t.find((t=>t.id===e.id))||(t.unshift(e),t.length>2&&t.pop(),localStorage.setItem(b,JSON.stringify(t)))}catch{console.info("Unable to set Web3Modal recent")}},getRecentWallets(){try{const e=localStorage.getItem(b);return e?JSON.parse(e):[]}catch{console.info("Unable to get Web3Modal recent")}return[]},setConnectedWalletImageUrl(e){try{localStorage.setItem(x,e)}catch{console.info("Unable to set Connected Wallet Image Url")}},removeConnectedWalletImageUrl(){try{localStorage.removeItem(x)}catch{console.info("Unable to remove Connected Wallet Image Url")}},getConnectedWalletImageUrl(){try{return localStorage.getItem(x)}catch{console.info("Unable to set Connected Wallet Image Url")}},setConnectedConnector(e){try{localStorage.setItem(E,e)}catch{console.info("Unable to set Connected Connector")}},getConnectedConnector(){try{return localStorage.getItem(E)}catch{console.info("Unable to get Connected Connector")}},setConnectedSocialProvider(e){try{localStorage.setItem(_,e)}catch{console.info("Unable to set Connected Social Provider")}},getConnectedSocialProvider(){try{return localStorage.getItem(_)}catch{console.info("Unable to get Connected Social Provider")}},getConnectedSocialUsername(){try{return localStorage.getItem("@w3m-storage/SOCIAL_USERNAME")}catch{console.info("Unable to get Connected Social Username")}}},C=new u({baseUrl:c.getAnalyticsUrl()}),A=["MODAL_CREATED"],S=(0,i.BX)({timestamp:Date.now(),data:{type:"track",event:"MODAL_CREATED"}}),I={state:S,subscribe:e=>(0,i.B1)(S,(()=>e(S))),_getApiHeaders(){const{projectId:e,sdkType:t,sdkVersion:n}=p.state;return{"x-project-id":e,"x-sdk-type":t,"x-sdk-version":n}},async _sendAnalyticsEvent(e){try{if(A.includes(e.data.event)||"undefined"===typeof window)return;await C.post({path:"/e",headers:I._getApiHeaders(),body:{eventId:c.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:e.timestamp,props:e.data}})}catch{}},sendEvent(e){S.timestamp=Date.now(),S.data=e,p.state.enableAnalytics&&I._sendAnalyticsEvent(S)}},T=(0,i.BX)({transactions:[],coinbaseTransactions:{},transactionsByYear:{},loading:!1,empty:!1,next:void 0}),P={state:T,subscribe:e=>(0,i.B1)(T,(()=>e(T))),async fetchTransactions(e,t){const{projectId:n}=p.state;if(!n||!e)throw new Error("Transactions can't be fetched without a projectId and an accountAddress");T.loading=!0;try{const r=await g.fetchTransactions({account:e,projectId:n,cursor:T.next,onramp:t}),i=this.filterSpamTransactions(r.data),s=[...T.transactions,...i];T.loading=!1,"coinbase"===t?T.coinbaseTransactions=this.groupTransactionsByYearAndMonth(T.coinbaseTransactions,r.data):(T.transactions=s,T.transactionsByYear=this.groupTransactionsByYearAndMonth(T.transactionsByYear,i)),T.empty=0===s.length,T.next=r.next?r.next:void 0}catch(r){I.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:e,projectId:n,cursor:T.next}}),v.showError("Failed to fetch transactions"),T.loading=!1,T.empty=!0,T.next=void 0}},groupTransactionsByYearAndMonth(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(arguments.length>
55111&&void 0!==arguments[1]?arguments[1]:[]).forEach((t=>{const n=new Date(t.metadata.minedAt).getFullYear(),r=new Date(t.metadata.minedAt).getMonth(),i=e[n]??{},s=(i[r]??[]).filter((e=>e.id!==t.id));e[n]={...i,[r]:[...s,t].sort(((e,t)=>new Date(t.metadata.minedAt).getTime()-new Date(e.metadata.minedAt).getTime()))}})),e},filterSpamTransactions:e=>e.filter((e=>!e.transfers.every((e=>!0===e.nft_info?.flags.is_spam)))),clearCursor(){T.next=void 0},resetTransactions(){T.transactions=[],T.transactionsByYear={},T.loading=!1,T.empty=!1,T.next=void 0}},N=(0,i.BX)({wcError:!1,buffering:!1}),R={state:N,subscribeKey:(e,t)=>(0,r.u$)(N,e,t),_getClient(){if(!N._client)throw new Error("ConnectionController client not set");return N._client},setClient(e){N._client=(0,i.KR)(e)},connectWalletConnect(){N.wcPromise=this._getClient().connectWalletConnect((e=>{N.wcUri=e,N.wcPairingExpiry=c.getPairingExpiry()})),k.setConnectedConnector("WALLET_CONNECT")},async connectExternal(e){await(this._getClient().connectExternal?.(e)),k.setConnectedConnector(e.type)},async reconnectExternal(e){await(this._getClient().reconnectExternal?.(e)),k.setConnectedConnector(e.type)},async signMessage(e){return this._getClient().signMessage(e)},parseUnits(e,t){return this._getClient().parseUnits(e,t)},formatUnits(e,t){return this._getClient().formatUnits(e,t)},async sendTransaction(e){return this._getClient().sendTransaction(e)},async estimateGas(e){return this._getClient().estimateGas(e)},async writeContract(e){return this._getClient().writeContract(e)},async getEnsAddress(e){return this._getClient().getEnsAddress(e)},async getEnsAvatar(e){return this._getClient().getEnsAvatar(e)},checkInstalled(e){return this._getClient().checkInstalled?.(e)},resetWcConnection(){N.wcUri=void 0,N.wcPairingExpiry=void 0,N.wcPromise=void 0,N.wcLinking=void 0,N.recentWallet=void 0,P.resetTransactions(),k.deleteWalletConnectDeepLink()},setWcLinking(e){N.wcLinking=e},setWcError(e){N.wcError=e,N.buffering=!1},setRecentWallet(e){N.recentWallet=e},setBuffering(e){N.buffering=e},async disconnect(){await this._getClient().disconnect(),k.removeConnectedWalletImageUrl(),this.resetWcConnection()}},O=(0,i.BX)({loading:!1,open:!1,selectedNetworkId:void 0}),M={state:O,subscribe:e=>(0,i.B1)(O,(()=>e(O))),set(e){Object.assign(O,{...O,...e})}},j=(0,i.BX)({supportsAllNetworks:!0,isDefaultCaipNetwork:!1,smartAccountEnabledNetworks:[]}),L={state:j,subscribe:e=>(0,i.B1)(j,(()=>e(j))),subscribeKey:(e,t)=>(0,r.u$)(j,e,t),_getClient(){if(!j._client)throw new Error("NetworkController client not set");return j._client},setClient(e){j._client=(0,i.KR)(e)},setCaipNetwork(e){j.caipNetwork=e,M.set({selectedNetworkId:e?.id}),this.state.allowUnsupportedChain||this.checkIfSupportedNetwork()},setDefaultCaipNetwork(e){j.caipNetwork=e,M.set({selectedNetworkId:e?.id}),j.isDefaultCaipNetwork=!0},setRequestedCaipNetworks(e){j.requestedCaipNetworks=e},setAllowUnsupportedChain(e){j.allowUnsupportedChain=e},setSmartAccountEnabledNetworks(e){j.smartAccountEnabledNetworks=e},getRequestedCaipNetworks(){const{approvedCaipNetworkIds:e,requestedCaipNetworks:t}=j,n=e,r=t;return c.sortRequestedNetworks(n,r)},async getApprovedCaipNetworksData(){const e=await this._getClient().getApprovedCaipNetworksData();j.supportsAllNetworks=e.supportsAllNetworks,j.approvedCaipNetworkIds=e.approvedCaipNetworkIds},async switchActiveNetwork(e){await this._getClient().switchCaipNetwork(e),j.caipNetwork=e,e&&I.sendEvent({type:"track",event:"SWITCH_NETWORK",properties:{network:e.id}})},checkIfSupportedNetwork(){j.isUnsupportedChain=!j.requestedCaipNetworks?.some((e=>e.id===j.caipNetwork?.id)),j.isUnsupportedChain&&this.showUnsupportedChainUI()},checkIfSmartAccountEnabled(){const e=d.LX.caipNetworkIdToNumber(j.caipNetwork?.id);return!!e&&Boolean(j.smartAccountEnabledNetworks?.includes(e))},resetNetwork(){j.isDefaultCaipNetwork||(j.caipNetwork=void 0),j.approvedCaipNetworkIds=void 0,j.supportsAllNetworks=!0,j.smartAccountEnabledNetworks=[]},showUnsupportedChainUI(){setTimeout((()=>{re.open({view:"UnsupportedChain"})}),300)}},D={async getTokenList(){const e=await g.fetchSwapTokens({chainId:L.state.caipNetwork?.id,projectId:p.state.projectId});return e?.tokens?.map((e=>({...e,eip2612:!1,quantity:{decimals:"0",numeric:"0"},price:0,value:0})))||[]},async fetchGasPrice(){const e=p.state.projectId,t=L.state.caipNetwork;return t?await g.fetchGasPrice({projectId:e,chainId:t.id}):null},async fetchSwapAllowance(e){let{tokenAddress:t,userAddress:n,sourceTokenAmount:r,sourceTokenDecimals:i}=e;const s=p.state.projectId,o=await g.fetchSwapAllowance({projectId:s,tokenAddress:t,userAddress:n});if(o?.allowance&&r&&i){const e=R.parseUnits(r,i);return BigInt(o.allowance)>=e}return!1},async getMyTokensWithBalance(e){const t=V.state.address,n=L.state.caipNetwork;if(!t||!n)return[];const r=(await g.getBalance(t,n.id,e)).balances.filter((e=>"0"!==e.quantity.decimals));return V.setTokenBalance(r),this.mapBalancesToSwapTokens(r)}
5511,mapBalancesToSwapTokens:e=>e?.map((e=>({...e,address:e?.address?e.address:`${e.chainId}:${a.NATIVE_TOKEN_ADDRESS}`,decimals:parseInt(e.quantity.decimals,10),logoUri:e.iconUrl,eip2612:!1})))||[]},B=(0,i.BX)({view:"Connect",history:["Connect"],transactionStack:[]}),U={state:B,subscribeKey:(e,t)=>(0,r.u$)(B,e,t),pushTransactionStack(e){B.transactionStack.push(e)},popTransactionStack(e){const t=B.transactionStack.pop();t&&(e?(this.goBack(),t?.onCancel?.()):(t.goBack?this.goBack():t.view&&this.reset(t.view),t?.onSuccess?.()))},push(e,t){e!==B.view&&(B.view=e,B.history.push(e),B.data=t)},reset(e){B.view=e,B.history=[e]},replace(e,t){B.history.length>=1&&B.history.at(-1)!==e&&(B.view=e,B.history[B.history.length-1]=e,B.data=t)},goBack(){if(B.history.length>1){B.history.pop();const[e]=B.history.slice(-1);e&&(B.view=e)}},goBackToIndex(e){if(B.history.length>1){B.history=B.history.slice(0,e+1);const[t]=B.history.slice(-1);t&&(B.view=t)}}},F={getGasPriceInEther:(e,t)=>Number(t*e)/1e18,getGasPriceInUSD(e,t,n){const r=F.getGasPriceInEther(t,n);return d.Se.bigNumber(e).multipliedBy(r).toNumber()},getPriceImpact(e){let{sourceTokenAmount:t,sourceTokenPriceInUSD:n,toTokenPriceInUSD:r,toTokenAmount:i}=e;const s=d.Se.bigNumber(t).multipliedBy(n),o=d.Se.bigNumber(i).multipliedBy(r);return s.minus(o).dividedBy(s).multipliedBy(100).toNumber()},getMaxSlippage(e,t){const n=d.Se.bigNumber(e).dividedBy(100);return d.Se.multiply(t,n).toNumber()},getProviderFee(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.0085;return d.Se.bigNumber(e).multipliedBy(t).toString()},isInsufficientNetworkTokenForGas(e,t){const n=t||"0";return!!d.Se.bigNumber(e).isZero()||d.Se.bigNumber(d.Se.bigNumber(n)).isGreaterThan(e)},isInsufficientSourceTokenForSwap(e,t,n){const r=n?.find((e=>e.address===t))?.quantity?.numeric;return d.Se.bigNumber(r||"0").isLessThan(e)},getToTokenAmount(e){let{sourceToken:t,toToken:n,sourceTokenPrice:r,toTokenPrice:i,sourceTokenAmount:s}=e;if("0"===s)return"0";if(!t||!n)return"0";const o=t.decimals,a=r,c=n.decimals,l=i;if(l<=0)return"0";const u=d.Se.bigNumber(s).multipliedBy(.0085),h=d.Se.bigNumber(s).minus(u).multipliedBy(d.Se.bigNumber(10).pow(o)),p=d.Se.bigNumber(a).dividedBy(l),f=o-c;return h.multipliedBy(p).dividedBy(d.Se.bigNumber(10).pow(f)).dividedBy(d.Se.bigNumber(10).pow(c)).toFixed(c).toString()}},$=15e4;Error;const z={initializing:!1,initialized:!1,loading:!1,loadingPrices:!1,fetchError:!1,approvalTransaction:void 0,swapTransaction:void 0,transactionError:void 0,transactionLoading:!1,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",networkTokenSymbol:"",inputError:void 0,slippage:a.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:"0",gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0,providerFee:void 0},H=(0,i.BX)(z),W={state:H,subscribe:e=>(0,i.B1)(H,(()=>e(H))),subscribeKey:(e,t)=>(0,r.u$)(H,e,t),getParams(){const{address:e}=V.state,t=`${L.state.caipNetwork?.id}:${a.NATIVE_TOKEN_ADDRESS}`;if(!e)throw new Error("No address found to swap the tokens from.");const n=V.state.caipAddress,r=!H.toToken?.address||!H.toToken?.decimals,i=!H.sourceToken?.address||!H.sourceToken?.decimals||!d.Se.bigNumber(H.sourceTokenAmount).isGreaterThan(0),s=!H.sourceTokenAmount;return{networkAddress:t,fromAddress:e,fromCaipAddress:V.state.caipAddress,sourceTokenAddress:H.sourceToken?.address,toTokenAddress:H.toToken?.address,toTokenAmount:H.toTokenAmount,toTokenDecimals:H.toToken?.decimals,sourceTokenAmount:H.sourceTokenAmount,sourceTokenDecimals:H.sourceToken?.decimals,invalidToToken:r,invalidSourceToken:i,invalidSourceTokenAmount:s,availableToSwap:n&&!r&&!i&&!s}},setLoading(e){H.loading=e},setSourceToken(e){if(!e)return H.sourceToken=e,H.sourceTokenAmount="",void(H.sourceTokenPriceInUSD=0);H.sourceToken=e,this.setTokenPrice(e.address,"sourceToken")},setSourceTokenAmount(e){H.sourceTokenAmount=e},setToToken(e){if(!e)return H.toToken=e,H.toTokenAmount="",void(H.toTokenPriceInUSD=0);H.toToken=e,this.setTokenPrice(e.address,"toToken")},setToTokenAmount(e){H.toTokenAmount=e?d.Se.formatNumberToLocalString(e,6):""},async setTokenPrice(e,t){const{availableToSwap:n}=this.getParams();let r=H.tokensPriceMap[e]||0;r||(H.loadingPrices=!0,r=await this.getAddressPrice(e)),"sourceToken"===t?H.sourceTokenPriceInUSD=r:"toToken"===t&&(H.toTokenPriceInUSD=r),H.loadingPrices&&(H.loadingPrices=!1,n&&this.swapTokens())},switchTokens(){if(H.initializing||!H.initialized)return;const e=H.toToken?{...H.toToken}:void 0,t=H.sourceToken?{...H.sourceToken}:void 0,n=e&&""===H.toTokenAmount?"1":H.toTokenAmount;this.setSourceToken(e),this.setToToken(t),this.setSourceTokenAmount(n),this.setToTokenAmount(""),this.swapTokens()},resetState(){H.myTokensWithBalance=z.myTokensWithBalance,H.tokensPriceMap=z.tokensPriceMap,H.initialized=z.
5511initialized,H.sourceToken=z.sourceToken,H.sourceTokenAmount=z.sourceTokenAmount,H.sourceTokenPriceInUSD=z.sourceTokenPriceInUSD,H.toToken=z.toToken,H.toTokenAmount=z.toTokenAmount,H.toTokenPriceInUSD=z.toTokenPriceInUSD,H.networkPrice=z.networkPrice,H.networkTokenSymbol=z.networkTokenSymbol,H.networkBalanceInUSD=z.networkBalanceInUSD,H.inputError=z.inputError},resetValues(){const{networkAddress:e}=this.getParams(),t=H.tokens?.find((t=>t.address===e));this.setSourceToken(t),this.setToToken(void 0)},clearError(){H.transactionError=void 0},async initializeState(){if(!H.initializing){if(H.initializing=!0,!H.initialized)try{await this.fetchTokens(),H.initialized=!0}catch(e){H.initialized=!1,v.showError("Failed to initialize swap"),U.goBack()}H.initializing=!1}},async fetchTokens(){const{networkAddress:e}=this.getParams();await this.getTokenList(),await this.getNetworkTokenPrice(),await this.getMyTokensWithBalance();const t=H.tokens?.find((t=>t.address===e));t&&(H.networkTokenSymbol=t.symbol,this.setSourceToken(t),this.setSourceTokenAmount("1"))},async getTokenList(){const e=await D.getTokenList();H.tokens=e,H.popularTokens=e.sort(((e,t)=>e.symbol<t.symbol?-1:e.symbol>t.symbol?1:0)).filter((e=>!!a.SWAP_POPULAR_TOKENS.includes(e.symbol)),{}),H.suggestedTokens=e.filter((e=>!!a.SWAP_SUGGESTED_TOKENS.includes(e.symbol)),{})},async getAddressPrice(e){const t=H.tokensPriceMap[e];if(t)return t;const n=(await g.fetchTokenPrice({projectId:p.state.projectId,addresses:[e]})).fungibles||[],r=[...H.tokens||[],...H.myTokensWithBalance||[]],i=r?.find((t=>t.address===e))?.symbol,s=n.find((e=>e.symbol.toLowerCase()===i?.toLowerCase()))?.price||0,o=parseFloat(s.toString());return H.tokensPriceMap[e]=o,o},async getNetworkTokenPrice(){const{networkAddress:e}=this.getParams(),t=await g.fetchTokenPrice({projectId:p.state.projectId,addresses:[e]}),n=t.fungibles?.[0],r=n?.price.toString()||"0";H.tokensPriceMap[e]=parseFloat(r),H.networkTokenSymbol=n?.symbol||"",H.networkPrice=r},async getMyTokensWithBalance(e){const t=await D.getMyTokensWithBalance(e);t&&(await this.getInitialGasPrice(),this.setBalances(t))},setBalances(e){const{networkAddress:t}=this.getParams(),n=L.state.caipNetwork;if(!n)return;const r=e.find((e=>e.address===t));e.forEach((e=>{H.tokensPriceMap[e.address]=e.price||0})),H.myTokensWithBalance=e.filter((e=>e.address.startsWith(n.id))),H.networkBalanceInUSD=r?d.Se.multiply(r.quantity.numeric,r.price).toString():"0"},async getInitialGasPrice(){const e=await D.fetchGasPrice();if(!e)return{gasPrice:null,gasPriceInUsd:null};const t=e.standard,n=BigInt(t),r=BigInt($),i=F.getGasPriceInUSD(H.networkPrice,r,n);return H.gasFee=t,H.gasPriceInUSD=i,{gasPrice:n,gasPriceInUSD:H.gasPriceInUSD}},async swapTokens(){const e=V.state.address,t=H.sourceToken,n=H.toToken,r=d.Se.bigNumber(H.sourceTokenAmount).isGreaterThan(0);if(!n||!t||H.loadingPrices||!r)return;H.loading=!0;const i=d.Se.bigNumber(H.sourceTokenAmount).multipliedBy(10**t.decimals),s=await g.fetchSwapQuote({userAddress:e,projectId:p.state.projectId,from:t.address,to:n.address,gasPrice:H.gasFee,amount:i.toString()}),o=s?.quotes?.[0]?.toAmount;if(!o)return;const a=d.Se.bigNumber(o).dividedBy(10**n.decimals).toString();this.setToTokenAmount(a);this.hasInsufficientToken(H.sourceTokenAmount,t.address)?H.inputError="Insufficient balance":(H.inputError=void 0,this.setTransactionDetails()),H.loading=!1},async getTransaction(){const{fromCaipAddress:e,availableToSwap:t}=this.getParams(),n=H.sourceToken,r=H.toToken;if(e&&t&&n&&r&&!H.loading)try{H.loading=!0;let t;return t=await D.fetchSwapAllowance({userAddress:e,tokenAddress:n.address,sourceTokenAmount:H.sourceTokenAmount,sourceTokenDecimals:n.decimals})?await this.createSwapTransaction():await this.createAllowanceTransaction(),H.loading=!1,H.fetchError=!1,t}catch(i){return U.goBack(),v.showError("Failed to check allowance"),H.approvalTransaction=void 0,H.swapTransaction=void 0,void(H.fetchError=!0)}},async createAllowanceTransaction(){const{fromCaipAddress:e,fromAddress:t,sourceTokenAddress:n,toTokenAddress:r}=this.getParams();if(e&&r){if(!n)throw new Error(">>> createAllowanceTransaction - No source token address found.");try{const i=await g.generateApproveCalldata({projectId:p.state.projectId,from:n,to:r,userAddress:e}),s=await R.estimateGas({address:t,to:c.getPlainAddress(i.tx.to),data:i.tx.data}),o={data:i.tx.data,to:c.getPlainAddress(i.tx.from),gas:s,gasPrice:BigInt(i.tx.eip155.gasPrice),value:BigInt(i.tx.value),toAmount:H.toTokenAmount};return H.swapTransaction=void 0,H.approvalTransaction=o,o}catch(i){return U.goBack(),v.showError("Failed to create approval transaction"),H.approvalTransaction=void 0,H.swapTransaction=void 0,void(H.fetchError=!0)}}},async createSwapTransaction(){const{networkAddress:e,fromCaipAddress:t,sourceTokenAmount:n}=this.getParams(),r=H.sourceToken,i=H.toToken;if(!t||!n||!r||!i)return;const s=R.parseUnits(n,r.decimals).toString();try{const n=await g.generateSwapCalldata({projectId:p.state.projectId,userAddress:t,from:r.address,to:i.address,amount:s}),o=r.address===e,a=BigInt(n.tx.eip155.gas),l=BigInt(n.tx.eip155.gasPrice),u={data:n.tx.data,to:c.getPlainAddress(n.tx.to),gas:a,gasPrice:l,value:o?BigInt(s):BigInt("0"),toAmount:H.toTokenAmount};return H.gasPriceInUSD=F.getGasPriceInUSD(H.networkPrice,a,l),H.approvalTransaction=void 0,H.swapTransaction=u,u}catch(o){return U.goBack(),v.showError("Failed to create transaction"),H.approvalTransaction=void 0,H.swapTransaction=void 0,void(H.fetchError=!0)}},async sendTransactionForApproval(e){const{fromAddress:t}=this.getParams();H.transactionLoading=!0,U.pushTransactionStack({view:null,goBack:!0});try{await R.sendTransaction({address:t,to:e.to,data:e.data,value:BigInt(e.value),gasPrice:BigInt(e.gasPrice)}),H.approvalTransaction=void 0,H.transactionLoading=!1,this.swapTokens()}catch(n){const e=n;H.transactionError=e?.shortMessage,H.transactionLoading=!1}},async sendTransactionForSwap(e){if(!e)return;const{fromAddress:t,toTokenAmount:n}=this.getParams();H.transactionLoading=!0,U.pushTransactionStack({view:"Account",goBack:!1,onSuccess(){W.resetState()}});try{const r=`Swapped ${H.sourceToken?.symbol} to ${d.Se.formatNumberToLocalString(n,3)} ${H.toToken?.symbol}!`,i=[H.sourceToken?.address,H.toToken?.address].join(","),s=await R.sendTransaction({address:t,to:e.to,data:e.data,gas:e.gas,gasPrice:BigInt(e.gasPrice),value:e.value});return H.transactionLoading=!1,v.showSuccess(r),W.resetState(),W.getMyTokensWithBalance(i),s}catch(r){const e=r;return H.transactionError=e?.shortMessage,H.transactionLoading=!1,void v.showError(e?.shortMessage||"Transaction error")}},hasInsufficientToken(e,t){const n=F.isInsufficientSourceTokenForSwap(e,t,H.myTokensWithBalance);return F.isInsufficientNetworkTokenForGas(H.networkBalanceInUSD,H.gasPriceInUSD)||n}
5511,setTransactionDetails(){const{toTokenAddress:e,toTokenDecimals:t}=this.getParams();e&&t&&(H.gasPriceInUSD=F.getGasPriceInUSD(H.networkPrice,BigInt(H.gasFee),BigInt($)),H.priceImpact=F.getPriceImpact({sourceTokenAmount:H.sourceTokenAmount,sourceTokenPriceInUSD:H.sourceTokenPriceInUSD,toTokenPriceInUSD:H.toTokenPriceInUSD,toTokenAmount:H.toTokenAmount}),H.maxSlippage=F.getMaxSlippage(H.slippage,H.toTokenAmount),H.providerFee=F.getProviderFee(H.sourceTokenAmount))}},q=(0,i.BX)({isConnected:!1,currentTab:0,tokenBalance:[],smartAccountDeployed:!1}),V={state:q,subscribe:e=>(0,i.B1)(q,(()=>e(q))),subscribeKey:(e,t)=>(0,r.u$)(q,e,t),setIsConnected(e){q.isConnected=e},setCaipAddress(e){q.caipAddress=e,q.address=e?c.getPlainAddress(e):void 0},setBalance(e,t){q.balance=e,q.balanceSymbol=t},setProfileName(e){q.profileName=e},setProfileImage(e){q.profileImage=e},setAddressExplorerUrl(e){q.addressExplorerUrl=e},setSmartAccountDeployed(e){q.smartAccountDeployed=e},setCurrentTab(e){q.currentTab=e},setTokenBalance(e){e&&(q.tokenBalance=(0,i.KR)(e))},setConnectedWalletInfo(e){q.connectedWalletInfo=e},setPreferredAccountType(e){q.preferredAccountType=e},setSocialProvider(e){e&&(q.socialProvider=e)},setSocialWindow(e){e&&(q.socialWindow=(0,i.KR)(e))},async fetchTokenBalance(){const e=L.state.caipNetwork?.id;try{if(q.address&&e){const t=await g.getBalance(q.address,e),n=t.balances.filter((e=>"0"!==e.quantity.decimals));this.setTokenBalance(n),W.setBalances(D.mapBalancesToSwapTokens(t.balances))}}catch(t){v.showError("Failed to fetch token balance")}},resetAccount(){q.isConnected=!1,q.smartAccountDeployed=!1,q.currentTab=0,q.caipAddress=void 0,q.address=void 0,q.balance=void 0,q.balanceSymbol=void 0,q.profileName=void 0,q.profileImage=void 0,q.addressExplorerUrl=void 0,q.tokenBalance=[],q.connectedWalletInfo=void 0,q.preferredAccountType=void 0,q.socialProvider=void 0,q.socialWindow=void 0}},G=(0,i.BX)({walletImages:{},networkImages:{},connectorImages:{},tokenImages:{},currencyImages:{}}),K={state:G,subscribeNetworkImages:e=>(0,i.B1)(G.networkImages,(()=>e(G.networkImages))),subscribeKey:(e,t)=>(0,r.u$)(G,e,t),subscribe:e=>(0,i.B1)(G,(()=>e(G))),setWalletImage(e,t){G.walletImages[e]=t},setNetworkImage(e,t){G.networkImages[e]=t},setConnectorImage(e,t){G.connectorImages[e]=t},setTokenImage(e,t){G.tokenImages[e]=t},setCurrencyImage(e,t){G.currencyImages[e]=t}},Z=(0,i.BX)({themeMode:"dark",themeVariables:{},w3mThemeVariables:void 0}),Y={state:Z,subscribe:e=>(0,i.B1)(Z,(()=>e(Z))),setThemeMode(e){Z.themeMode=e;try{const t=J.getAuthConnector();if(t){const n=Y.getSnapshot().themeVariables;t.provider.syncTheme({themeMode:e,themeVariables:n,w3mThemeVariables:(0,d.o_)(n,e)})}}catch{console.info("Unable to sync theme to auth connector")}},setThemeVariables(e){Z.themeVariables={...Z.themeVariables,...e};try{const e=J.getAuthConnector();if(e){const t=Y.getSnapshot().themeVariables;e.provider.syncTheme({themeVariables:t,w3mThemeVariables:(0,d.o_)(Z.themeVariables,Z.themeMode)})}}catch{console.info("Unable to sync theme to auth connector")}},getSnapshot:()=>(0,i.P9)(Z)},Q=(0,i.BX)({connectors:[]}),J={state:Q,subscribeKey:(e,t)=>(0,r.u$)(Q,e,t),setConnectors(e){Q.connectors=e.map((e=>(0,i.KR)(e)))},addConnector(e){if(Q.connectors.push((0,i.KR)(e)),"w3mAuth"===e.id){const t=e,n=(0,i.P9)(p.state),r=Y.getSnapshot().themeMode,s=Y.getSnapshot().themeVariables;t?.provider?.syncDappData?.({metadata:n.metadata,sdkVersion:n.sdkVersion,projectId:n.projectId}),t.provider.syncTheme({themeMode:r,themeVariables:s,w3mThemeVariables:(0,d.o_)(s,r)})}},getAuthConnector:()=>Q.connectors.find((e=>"AUTH"===e.type)),getAnnouncedConnectorRdns:()=>Q.connectors.filter((e=>"ANNOUNCED"===e.type)).map((e=>e.info?.rdns)),getConnectors:()=>Q.connectors,getConnector:(e,t)=>Q.connectors.find((n=>n.explorerId===e||n.info?.rdns===t))},X=new u({baseUrl:c.getApiUrl()}),ee=(0,i.BX)({page:1,count:0,featured:[],recommended:[],wallets:[],search:[],isAnalyticsEnabled:!1}),te={state:ee,subscribeKey:(e,t)=>(0,r.u$)(ee,e,t),_getApiHeaders(){const{projectId:e,sdkType:t,sdkVersion:n}=p.state;return{"x-project-id":e,"x-sdk-type":t,"x-sdk-version":n}},async _fetchWalletImage(e){const t=`${X.baseUrl}/getWalletImage/${e}`,n=await X.getBlob({path:t,headers:te._getApiHeaders()});K.setWalletImage(e,URL.createObjectURL(n))},async _fetchNetworkImage(e){const t=`${X.baseUrl}/public/getAssetImage/${e}`,n=await X.getBlob({path:t,headers:te._getApiHeaders()});K.setNetworkImage(e,URL.createObjectURL(n))},async _fetchConnectorImage(e){const t=`${X.baseUrl}/public/getAssetImage/${e}`,n=await X.getBlob({path:t,headers:te._getApiHeaders()});K.setConnectorImage(e,URL.createObjectURL(n))},async _fetchCurrencyImage(e){const t=`${X.baseUrl}/public/getCurrencyImage/${e}`,n=await X.getBlob({path:t,headers:te._getApiHeaders()});K.setCurrencyImage(e,URL.createObjectURL(n))},async _fetchTokenImage(e){const t=`${X.baseUrl}/public/getTokenImage/${e}`,n=await X.getBlob({path:t,headers:te._getApiHeaders()});K.setTokenImage(e,URL.createObjectURL(n))},async fetchNetworkImages(){const{requestedCaipNetworks:e}=L.state,t=e?.map((e=>{let{imageId:t}=e;return t}
5511)).filter(Boolean);t&&await Promise.allSettled(t.map((e=>te._fetchNetworkImage(e))))},async fetchConnectorImages(){const{connectors:e}=J.state,t=e.map((e=>{let{imageId:t}=e;return t})).filter(Boolean);await Promise.allSettled(t.map((e=>te._fetchConnectorImage(e))))},async fetchCurrencyImages(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];await Promise.allSettled(e.map((e=>te._fetchCurrencyImage(e))))},async fetchTokenImages(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];await Promise.allSettled(e.map((e=>te._fetchTokenImage(e))))},async fetchFeaturedWallets(){const{featuredWalletIds:e}=p.state;if(e?.length){const{data:t}=await X.get({path:"/getWallets",headers:te._getApiHeaders(),params:{page:"1",entries:e?.length?String(e.length):"4",include:e?.join(",")}});t.sort(((t,n)=>e.indexOf(t.id)-e.indexOf(n.id)));const n=t.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled(n.map((e=>te._fetchWalletImage(e)))),ee.featured=t}},async fetchRecommendedWallets(){const{includeWalletIds:e,excludeWalletIds:t,featuredWalletIds:n}=p.state,r=[...t??[],...n??[]].filter(Boolean),{data:i,count:s}=await X.get({path:"/getWallets",headers:te._getApiHeaders(),params:{page:"1",chains:L.state.caipNetwork?.id,entries:"4",include:e?.join(","),exclude:r?.join(",")}}),o=k.getRecentWallets(),a=i.map((e=>e.image_id)).filter(Boolean),c=o.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled([...a,...c].map((e=>te._fetchWalletImage(e)))),ee.recommended=i,ee.count=s??0},async fetchWallets(e){let{page:t}=e;const{includeWalletIds:n,excludeWalletIds:r,featuredWalletIds:i}=p.state,s=[...ee.recommended.map((e=>{let{id:t}=e;return t})),...r??[],...i??[]].filter(Boolean),{data:o,count:a}=await X.get({path:"/getWallets",headers:te._getApiHeaders(),params:{page:String(t),entries:"40",chains:L.state.caipNetwork?.id,include:n?.join(","),exclude:s.join(",")}}),l=o.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled([...l.map((e=>te._fetchWalletImage(e))),c.wait(300)]),ee.wallets=[...ee.wallets,...o],ee.count=a>ee.count?a:ee.count,ee.page=t},async searchWallet(e){let{search:t}=e;const{includeWalletIds:n,excludeWalletIds:r}=p.state;ee.search=[];const{data:i}=await X.get({path:"/getWallets",headers:te._getApiHeaders(),params:{page:"1",entries:"100",search:t?.trim(),chains:L.state.caipNetwork?.id,include:n?.join(","),exclude:r?.join(",")}}),s=i.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled([...s.map((e=>te._fetchWalletImage(e))),c.wait(300)]),ee.search=i},async reFetchWallets(){ee.page=1,ee.wallets=[],await te.fetchFeaturedWallets(),await te.fetchRecommendedWallets()},prefetch(){const e=[te.fetchFeaturedWallets(),te.fetchRecommendedWallets(),te.fetchNetworkImages(),te.fetchConnectorImages()];void 0===p.state.enableAnalytics&&e.push(te.fetchAnalyticsConfig()),ee.prefetchPromise=Promise.race([Promise.allSettled(e),c.wait(3e3)])},async fetchAnalyticsConfig(){const{isAnalyticsEnabled:e}=await X.get({path:"/getAnalyticsConfig",headers:te._getApiHeaders()});p.setEnableAnalytics(e)}},ne=(0,i.BX)({loading:!1,open:!1}),re={state:ne,subscribe:e=>(0,i.B1)(ne,(()=>e(ne))),subscribeKey:(e,t)=>(0,r.u$)(ne,e,t),async open(e){await te.state.prefetchPromise;const t=V.state.isConnected;e?.view?U.reset(e.view):t?U.reset("Account"):U.reset("Connect"),ne.open=!0,M.set({open:!0}),I.sendEvent({type:"track",event:"MODAL_OPEN",properties:{connected:t}})},close(){const e=V.state.isConnected;ne.open=!1,M.set({open:!1}),I.sendEvent({type:"track",event:"MODAL_CLOSE",properties:{connected:e}})},setLoading(e){ne.loading=e,M.set({loading:e})}},ie={id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},se={id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},oe={providers:o,selectedProvider:null,error:null,purchaseCurrency:ie,paymentCurrency:se,purchaseCurrencies:[ie],paymentCurrencies:[],quotesLoading:!1},ae=(0,i.BX)(oe),ce={state:ae,subscribe:e=>(0,i.B1)(ae,(()=>e(ae))),subscribeKey:(e,t)=>(0,r.u$)(ae,e,t),setSelectedProvider(e){ae.selectedProvider=e},setPurchaseCurrency(e){ae.purchaseCurrency=e},setPaymentCurrency(e){ae.paymentCurrency=e},setPurchaseAmount(e){this.state.purchaseAmount=e},setPaymentAmount(e){this.state.paymentAmount=e},async getAvailableCurrencies(){const e=await g.getOnrampOptions();ae.purchaseCurrencies=e.purchaseCurrencies,ae.paymentCurrencies=e.paymentCurrencies,ae.paymentCurrency=e.paymentCurrencies[0]||se,ae.purchaseCurrency=e.purchaseCurrencies[0]||ie,await te.fetchCurrencyImages(e.paymentCurrencies.map((e=>e.id))),await te.fetchTokenImages(e.purchaseCurrencies.map((e=>e.symbol)))},async getQuote(){ae.quotesLoading=!0;try{const e=await g.getOnrampQuote({purchaseCurrency:ae.purchaseCurrency,paymentCurrency:ae.paymentCurrency,amount:ae.paymentAmount?.toString()||"0",network:ae.purchaseCurrency?.symbol});return ae.quotesLoading=!1,ae.purchaseAmount=Number(e.purchaseAmount.amount),e}catch(e){return ae.error=e.message,ae.quotesLoading=!1,null}finally{ae.quotesLoading=!1}},resetState(){ae.providers=o,ae.selectedProvider=null,ae.error=null,ae.purchaseCurrency=ie,ae.paymentCurrency=se,ae.purchaseCurrencies=[ie],ae.paymentCurrencies=[],ae.paymentAmount=void 0,ae.purchaseAmount=void 0,ae.quotesLoading=!1}},le=(0,i.BX)({loading:!1}),ue={state:le,subscribe:e=>(0,i.B1)(le,(()=>e(le))),subscribeKey:(e,t)=>(0,r.u$)(le,e,t),setToken(e){e&&(le.token=(0,i.KR)(e))},setTokenAmount(e){le.sendTokenAmount=e},setReceiverAddress(e){le.receiverAddress=e},setReceiverProfileImageUrl(e){le.receiverProfileImageUrl=e},setReceiverProfileName(e){le.receiverProfileName=e},setGasPrice(e){le.gasPrice=e},setGasPriceInUsd(e){le.gasPriceInUSD=e},setLoading(e){le.loading=e},sendToken(){this.state.token?.address&&this.state.sendTokenAmount&&this.state.receiverAddress?this.sendERC20Token({receiverAddress:this.state.receiverAddress,tokenAddress:this.state.token.address,sendTokenAmount:this.state.sendTokenAmount,decimals:this.state.token.quantity.decimals}):this.state.receiverAddress&&this.state.sendTokenAmount&&this.state.gasPrice&&this.state.token?.quantity.decimals&&this.sendNativeToken({receiverAddress:this.state.receiverAddress,sendTokenAmount:this.state.sendTokenAmount,gasPrice:this.state.gasPrice,decimals:this.state.token.quantity.decimals})},async sendNativeToken(e){U.pushTransactionStack({view:"Account",goBack:!1});
5511const t=e.receiverAddress,n=V.state.address,r=R.parseUnits(e.sendTokenAmount.toString(),Number(e.decimals));try{await R.sendTransaction({to:t,address:n,data:"0x",value:r,gasPrice:e.gasPrice}),v.showSuccess("Transaction started"),this.resetSend()}catch(i){v.showError("Something went wrong")}},async sendERC20Token(e){U.pushTransactionStack({view:"Account",goBack:!1});const t=R.parseUnits(e.sendTokenAmount.toString(),Number(e.decimals));try{V.state.address&&e.sendTokenAmount&&e.receiverAddress&&e.tokenAddress&&(await R.writeContract({fromAddress:V.state.address,tokenAddress:c.getPlainAddress(e.tokenAddress),receiverAddress:e.receiverAddress,tokenAmount:t,method:"transfer",abi:d.Fk}),v.showSuccess("Transaction started"),this.resetSend())}catch(n){v.showError("Something went wrong")}},resetSend(){le.token=void 0,le.sendTokenAmount=void 0,le.receiverAddress=void 0,le.receiverProfileImageUrl=void 0,le.receiverProfileName=void 0,le.loading=!1}},de=(0,i.BX)({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),he={state:de,subscribe:e=>(0,i.B1)(de,(()=>e(de))),subscribeKey:(e,t)=>(0,r.u$)(de,e,t),showTooltip(e){let{message:t,triggerRect:n,variant:r}=e;de.open=!0,de.message=t,de.triggerRect=n,de.variant=r},hide(){de.open=!1,de.message="",de.triggerRect={width:0,height:0,top:0,left:0}}},pe=2147483648,fe={convertEVMChainIdToCoinType(e){if(e>=pe)throw new Error("Invalid chainId");return(pe|e)>>>0}},me=(0,i.BX)({suggestions:[],loading:!1}),ge={state:me,subscribe:e=>(0,i.B1)(me,(()=>e(me))),subscribeKey:(e,t)=>(0,r.u$)(me,e,t),async resolveName(e){try{return await g.lookupEnsName(e)}catch(t){const e=t;throw new Error(e?.reasons?.[0]?.description||"Error resolving name")}},async isNameRegistered(e){try{return await g.lookupEnsName(e),!0}catch{return!1}},async getSuggestions(e){try{me.loading=!0,me.suggestions=[];const t=await g.getEnsNameSuggestions(e);return me.suggestions=t.suggestions.map((e=>({...e,name:e.name.replace(d.oU.WC_NAME_SUFFIX,"")})))||[],me.suggestions}catch(t){const e=this.parseEnsApiError(t,"Error fetching name suggestions");throw new Error(e)}finally{me.loading=!1}},async getNamesForAddress(e){try{if(!L.state.caipNetwork)return[];return await g.reverseLookupEnsName({address:e})}catch(t){const e=this.parseEnsApiError(t,"Error fetching names for address");throw new Error(e)}},async registerName(e){const t=L.state.caipNetwork;if(!t)throw new Error("Network not found");const n=V.state.address,r=J.getAuthConnector();if(!n||!r)throw new Error("Address or auth connector not found");if(!this.isAllowedToRegisterName())throw new Error("Not allowed to register name");me.loading=!0;try{const r=JSON.stringify({name:`${e}${d.oU.WC_NAME_SUFFIX}`,attributes:{},timestamp:Math.floor(Date.now()/1e3)});U.pushTransactionStack({view:"RegisterAccountNameSuccess",goBack:!1,replace:!0,onCancel(){me.loading=!1}});const i=await R.signMessage(r),s=d.LX.caipNetworkIdToNumber(t.id);if(!s)throw new Error("Network not found");const o=fe.convertEVMChainIdToCoinType(s);await g.registerEnsName({coinType:o,address:n,signature:i,message:r}),V.setProfileName(`${e}${d.oU.WC_NAME_SUFFIX}`),U.replace("RegisterAccountNameSuccess")}catch(i){const t=this.parseEnsApiError(i,`Error registering name ${e}`);throw U.replace("RegisterAccountName"),new Error(t)}finally{me.loading=!1}},validateName:e=>/^[a-zA-Z0-9-]{4,}$/u.test(e),parseEnsApiError(e,t){const n=e;return n?.reasons?.[0]?.description||t},isAllowedToRegisterName(){const e=J.getAuthConnector(),t=e?.provider.getEmail()||"",n=t.split("@")?.[1];return n&&d.oU.WC_NAMES_ALLOWED_DOMAINS.includes(n)}},ye={getWalletImage:e=>e?.image_url?e?.image_url:e?.image_id?K.state.walletImages[e.image_id]:void 0,getNetworkImage:e=>e?.imageUrl?e?.imageUrl:e?.imageId?K.state.networkImages[e.imageId]:void 0,getConnectorImage:e=>e?.imageUrl?e.imageUrl:e?.imageId?K.state.connectorImages[e.imageId]:void 0},ve={goBackOrCloseModal(){U.state.history.length>1?U.goBack():re.close()},navigateAfterNetworkSwitch(){const{history:e}=U.state,t=e.findIndex((e=>"Networks"===e));t>=1?U.goBackToIndex(t-1):re.close()},navigateAfterPreferredAccountTypeSelect(){const{isSiweEnabled:e}=p.state,{profileName:t}=V.state;e?U.push("ConnectingSiwe"):t?U.push("Account"):U.push("ChooseAccountName")}}},5722:(e,t,n)=>{"use strict";
5511Object.defineProperty(t,"__esModule",{value:!0}),t.standardErrors=t.standardErrorCodes=void 0;var r=n(1195);Object.defineProperty(t,"standardErrorCodes",{enumerable:!0,get:function(){return r.standardErrorCodes}});var i=n(4511);Object.defineProperty(t,"standardErrors",{enumerable:!0,get:function(){return i.standardErrors}})},5815:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0;t.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!==typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let n=0;n<t.length;n+=65536)this._crypto.getRandomValues(t.subarray(n,n+Math.min(t.length-n,65536)));return t}}},5877:(e,t,n)=>{"use strict";n.d(t,{B1:()=>u,BX:()=>l,KR:()=>h,P9:()=>d});var r=n(3379);const i=e=>"object"===typeof e&&null!==e,s=new WeakMap,o=new WeakSet,a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.is,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e,t)=>new Proxy(e,t),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>i(e)&&!o.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer),a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}},c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new WeakMap,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a;const i=c.get(e);if((null==i?void 0:i[0])===t)return i[1];const u=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return(0,r.OC)(u,!0),c.set(e,[t,u]),Reflect.ownKeys(e).forEach((t=>{if(Object.getOwnPropertyDescriptor(u,t))return;const i=Reflect.get(e,t),a={value:i,enumerable:!0,configurable:!0};if(o.has(i))(0,r.OC)(i,!1);else if(i instanceof Promise)delete a.value,a.get=()=>n(i);else if(s.has(i)){const[e,t]=s.get(i);a.value=l(e,t(),n)}Object.defineProperty(u,t,a)})),Object.preventExtensions(u)},u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new WeakMap,d=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[1,1],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:a=>{if(!i(a))throw new Error("object required");const c=u.get(a);if(c)return c;let p=d[0];const f=new Set,m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:++d[0];p!==t&&(p=t,f.forEach((n=>n(e,t))))};let g=d[1];const y=e=>(t,n)=>{const r=[...t];r[1]=[e,...r[1]],m(r,n)},v=new Map,w=e=>{var t;const n=v.get(e);n&&(v.delete(e),null==(t=n[1])||t.call(n))},b=Array.isArray(a)?[]:Object.create(Object.getPrototypeOf(a)),x=t(b,{deleteProperty(e,t){const n=Reflect.get(e,t);w(t);const r=Reflect.deleteProperty(e,t);return r&&m(["delete",[t],n]),r},set(t,a,c,l){const d=Reflect.has(t,a),p=Reflect.get(t,a,l);if(d&&(e(p,c)||u.has(c)&&e(p,u.get(c))))return!0;w(a),i(c)&&(c=(0,r.Ai)(c)||c);let g=c;if(c instanceof Promise)c.then((e=>{c.status="fulfilled",c.value=e,m(["resolve",[a],e])})).catch((e=>{c.status="rejected",c.reason=e,m(["reject",[a],e])}));else{!s.has(c)&&n(c)&&(g=h(c));const e=!o.has(g)&&s.get(g);e&&((e,t)=>{if(v.has(e))throw new Error("prop listener already exists");if(f.size){const n=t[3](y(e));v.set(e,[t,n])}else v.set(e,[t])})(a,e)}return Reflect.set(t,a,g,l),m(["set",[a],c,p]),!0}});u.set(a,x);const E=[b,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:++d[1];return g===e||f.size||(g=e,v.forEach((t=>{let[n]=t;const r=n[1](e);r>p&&(p=r)}))),p},l,e=>{f.add(e),1===f.size&&v.forEach(((e,t)=>{let[n,r]=e;if(r)throw new Error("remove already exists");const i=n[3](y(t));v.set(t,[n,i])}));return()=>{f.delete(e),0===f.size&&v.forEach(((e,t)=>
5511{let[n,r]=e;r&&(r(),v.set(t,[n]))}))}}];return s.set(x,E),Reflect.ownKeys(a).forEach((e=>{const t=Object.getOwnPropertyDescriptor(a,e);"value"in t&&(x[e]=a[e],delete t.value,delete t.writable),Object.defineProperty(b,e,t)})),x};return[h,s,o,e,t,n,a,c,l,u,d]},[c]=a();function l(){return c(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function u(e,t,n){const r=s.get(e);let i;r||console.warn("Please use proxy object");const o=[],a=r[3];let c=!1;const l=a((e=>{o.push(e),n?t(o.splice(0)):i||(i=Promise.resolve().then((()=>{i=void 0,c&&t(o.splice(0))})))}));return c=!0,()=>{c=!1,l()}}function d(e,t){const n=s.get(e);n||console.warn("Please use proxy object");const[r,i,o]=n;return o(r,i(),t)}function h(e){return o.add(e),e}},5899:(e,t,n)=>{var r=n(1596),i=n(330),s=n(6047).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function l(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function d(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,c=0|this._e,h=0;h<16;++h)n[h]=e.readInt32BE(4*h);for(;h<80;++h)n[h]=(t=n[h-3]^n[h-8]^n[h-14]^n[h-16])<<1|t>>>31;for(var p=0;p<80;++p){var f=~~(p/20),m=l(r)+d(f,i,s,a)+c+n[p]+o[f]|0;c=a,a=s,s=u(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},5955:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,o){if("function"!==typeof r)throw new TypeError("The listener must be a function");var a=new i(r,s||e,o),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function o(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i<s;i++)o[i]=r[i].fn;return o},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,s,o){var a=n?n+e:e;if(!this._events[a])return!1;var c,l,u=this._events[a],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,s),!0;case 6:return u.fn.call(u.context,t,r,i,s,o),!0}for(l=1,c=new Array(d-1);l<d;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var h,p=u.length;for(l=0;l<p;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),d){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,r);break;case 4:u[l].fn.call(u[l].context,t,r,i);break;default:if(!c)for(h=1,c=new Array(d-1);h<d;h++)c[h-1]=arguments[h];u[l].fn.apply(u[l].context,c)}}return!0},a.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return o(this,s),this;var a=this._events[s];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||o(this,s);else{for(var c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==t||i&&!a[c].once||r&&a[c].context!==r)&&l.push(a[c]);l.length?this._events[s]=1===l.length?l[0]:l:o(this,s)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},5956:(e,t,n)=>{const r=n(8415),i=[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],s=[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,
5511192,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];t.getBlocksCount=function(e,t){switch(t){case r.L:return i[4*(e-1)+0];case r.M:return i[4*(e-1)+1];case r.Q:return i[4*(e-1)+2];case r.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return s[4*(e-1)+0];case r.M:return s[4*(e-1)+1];case r.Q:return s[4*(e-1)+2];case r.H:return s[4*(e-1)+3];default:return}}},6022:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const r=n(3074),i=n(3310),s=n(5070);function o(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.defaultRandomSource).randomBytes(e)}t.defaultRandomSource=new r.SystemRandomSource,t.randomBytes=o,t.randomUint32=function(){const e=o(4,arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.defaultRandomSource),n=(0,i.readUint32LE)(e);return(0,s.wipe)(e),n};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function c(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.defaultRandomSource;if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let i="";const c=n.length,l=256-256%c;for(;e>0;){const t=o(Math.ceil(256*e/l),r);for(let r=0;r<t.length&&e>0;r++){const s=t[r];s<l&&(i+=n.charAt(s%c),e--)}(0,s.wipe)(t)}return i}t.randomString=c,t.randomStringForEntropy=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.defaultRandomSource;return c(Math.ceil(e/(Math.log(n.length)/Math.LN2)),n,r)}},6042:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6566),i=n(5070);t.DIGEST_LENGTH=16;var s=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=e[0]|e[1]<<8;this._r[0]=8191&n;var r=e[2]|e[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=e[4]|e[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var s=e[6]|e[7]<<8;this._r[3]=8191&(i>>>7|s<<9);var o=e[8]|e[9]<<8;this._r[4]=255&(s>>>4|o<<12),this._r[5]=o>>>1&8190;var a=e[10]|e[11]<<8;this._r[6]=8191&(o>>>14|a<<2);var c=e[12]|e[13]<<8;this._r[7]=8065&(a>>>11|c<<5);var l=e[14]|e[15]<<8;this._r[8]=8191&(c>>>8|l<<8),this._r[9]=l>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],s=this._h[1],o=this._h[2],a=this._h[3],c=this._h[4],l=this._h[5],u=this._h[6],d=this._h[7],h=this._h[8],p=this._h[9],f=this._r[0],m=this._r[1],g=this._r[2],y=this._r[3],v=this._r[4],w=this._r[5],b=this._r[6],x=this._r[7],E=this._r[8],_=this._r[9];n>=16;){var k=e[t+0]|e[t+1]<<8;i+=8191&k;
5511var C=e[t+2]|e[t+3]<<8;s+=8191&(k>>>13|C<<3);var A=e[t+4]|e[t+5]<<8;o+=8191&(C>>>10|A<<6);var S=e[t+6]|e[t+7]<<8;a+=8191&(A>>>7|S<<9);var I=e[t+8]|e[t+9]<<8;c+=8191&(S>>>4|I<<12),l+=I>>>1&8191;var T=e[t+10]|e[t+11]<<8;u+=8191&(I>>>14|T<<2);var P=e[t+12]|e[t+13]<<8;d+=8191&(T>>>11|P<<5);var N=e[t+14]|e[t+15]<<8,R=0,O=R;O+=i*f,O+=s*(5*_),O+=o*(5*E),O+=a*(5*x),R=(O+=c*(5*b))>>>13,O&=8191,O+=l*(5*w),O+=u*(5*v),O+=d*(5*y),O+=(h+=8191&(P>>>8|N<<8))*(5*g);var M=R+=(O+=(p+=N>>>5|r)*(5*m))>>>13;M+=i*m,M+=s*f,M+=o*(5*_),M+=a*(5*E),R=(M+=c*(5*x))>>>13,M&=8191,M+=l*(5*b),M+=u*(5*w),M+=d*(5*v),M+=h*(5*y),R+=(M+=p*(5*g))>>>13,M&=8191;var j=R;j+=i*g,j+=s*m,j+=o*f,j+=a*(5*_),R=(j+=c*(5*E))>>>13,j&=8191,j+=l*(5*x),j+=u*(5*b),j+=d*(5*w),j+=h*(5*v);var L=R+=(j+=p*(5*y))>>>13;L+=i*y,L+=s*g,L+=o*m,L+=a*f,R=(L+=c*(5*_))>>>13,L&=8191,L+=l*(5*E),L+=u*(5*x),L+=d*(5*b),L+=h*(5*w);var D=R+=(L+=p*(5*v))>>>13;D+=i*v,D+=s*y,D+=o*g,D+=a*m,R=(D+=c*f)>>>13,D&=8191,D+=l*(5*_),D+=u*(5*E),D+=d*(5*x),D+=h*(5*b);var B=R+=(D+=p*(5*w))>>>13;B+=i*w,B+=s*v,B+=o*y,B+=a*g,R=(B+=c*m)>>>13,B&=8191,B+=l*f,B+=u*(5*_),B+=d*(5*E),B+=h*(5*x);var U=R+=(B+=p*(5*b))>>>13;U+=i*b,U+=s*w,U+=o*v,U+=a*y,R=(U+=c*g)>>>13,U&=8191,U+=l*m,U+=u*f,U+=d*(5*_),U+=h*(5*E);var F=R+=(U+=p*(5*x))>>>13;F+=i*x,F+=s*b,F+=o*w,F+=a*v,R=(F+=c*y)>>>13,F&=8191,F+=l*g,F+=u*m,F+=d*f,F+=h*(5*_);var $=R+=(F+=p*(5*E))>>>13;$+=i*E,$+=s*x,$+=o*b,$+=a*w,R=($+=c*v)>>>13,$&=8191,$+=l*y,$+=u*g,$+=d*m,$+=h*f;var z=R+=($+=p*(5*_))>>>13;z+=i*_,z+=s*E,z+=o*x,z+=a*b,R=(z+=c*w)>>>13,z&=8191,z+=l*v,z+=u*y,z+=d*g,z+=h*m,i=O=8191&(R=(R=((R+=(z+=p*f)>>>13)<<2)+R|0)+(O&=8191)|0),s=M+=R>>>=13,o=j&=8191,a=L&=8191,c=D&=8191,l=B&=8191,u=U&=8191,d=F&=8191,h=$&=8191,p=z&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=s,this._h[2]=o,this._h[3]=a,this._h[4]=c,this._h[5]=l,this._h[6]=u,this._h[7]=d,this._h[8]=h,this._h[9]=p},e.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,s,o=new Uint16Array(10);if(this._leftover){for(s=this._leftover,this._buffer[s++]=1;s<16;s++)this._buffer[s]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,s=2;s<10;s++)this._h[s]+=n,n=this._h[s]>>>13,this._h[s]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,o[0]=this._h[0]+5,n=o[0]>>>13,o[0]&=8191,s=1;s<10;s++)o[s]=this._h[s]+n,n=o[s]>>>13,o[s]&=8191;for(o[9]-=8192,r=(1^n)-1,s=0;s<10;s++)o[s]&=r;for(r=~r,s=0;s<10;s++)this._h[s]=this._h[s]&r|o[s];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,s=1;s<8;s++)i=(this._h[s]+this._pad[s]|0)+(i>>>16)|0,this._h[s]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},e.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},e.prototype.clean=function(){return i.wipe(this._buffer),i.wipe(this._r),i.wipe(this._h),i.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},e}();t.Poly1305=s,t.oneTimeAuth=function(e,t){var n=new s(e);n.update(t);var r=n.digest();return n.clean(),r},t.equal=function(e,n){return e.length===t.DIGEST_LENGTH&&n.length===t.DIGEST_LENGTH&&r.equal(e,n)}},6047:(e,t,n)=>{var r=n(3325),i=r.Buffer;function s(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(s(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},6102:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},6104:(e,t)=>
5511{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return"undefined"!==typeof e.saveState&&"undefined"!==typeof e.restoreState&&"undefined"!==typeof e.cleanSavedState}},6106:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,r=3,i=40,s=10;function o(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return r%3===0;case t.Patterns.PATTERN011:return(n+r)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2===0;case t.Patterns.PATTERN101:return n*r%2+n*r%3===0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2===0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,i=0,s=0,o=null,a=null;for(let c=0;c<t;c++){i=s=0,o=a=null;for(let l=0;l<t;l++){let t=e.get(c,l);t===o?i++:(i>=5&&(r+=n+(i-5)),o=t,i=1),t=e.get(l,c),t===a?s++:(s>=5&&(r+=n+(s-5)),a=t,s=1)}i>=5&&(r+=n+(i-5)),s>=5&&(r+=n+(s-5))}return r},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){const t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);4!==t&&0!==t||n++}return n*r},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,s=0;for(let i=0;i<t;i++){r=s=0;for(let o=0;o<t;o++)r=r<<1&2047|e.get(i,o),o>=10&&(1488===r||93===r)&&n++,s=s<<1&2047|e.get(o,i),o>=10&&(1488===s||93===s)&&n++}return n*i},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*s},t.applyMask=function(e,t){const n=t.size;
5511for(let r=0;r<n;r++)for(let i=0;i<n;i++)t.isReserved(i,r)||t.xor(i,r,o(e,i,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let i=0,s=1/0;for(let o=0;o<r;o++){n(o),t.applyMask(o,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(o,e),r<s&&(s=r,i=o)}return i}},6358:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'},6367:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const r=n(9064);t.toMiliseconds=function(e){return e*r.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/r.ONE_THOUSAND)}},6379:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closePopup=t.openPopup=void 0;const r=n(5722);t.openPopup=function(e){const t=(window.innerWidth-420)/2+window.screenX,n=(window.innerHeight-540)/2+window.screenY,i=window.open(e,"Smart Wallet",`width=420, height=540, left=${t}, top=${n}`);if(null===i||void 0===i||i.focus(),!i)throw r.standardErrors.rpc.internal("Pop up window failed to open");return i},t.closePopup=function(e){e&&!e.closed&&e.close()}},6432:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},6487:function(e,t){var n="undefined"!==typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in e,o="ArrayBuffer"in e;if(o)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array
5511]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!==typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=f(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=l(e),t=u(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[l(e)]},h.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},h.prototype.set=function(e,t){this.map[l(e)]=u(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},r&&(h.prototype[Symbol.iterator]=h.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(e,t){var n=(t=t||{}).body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=function(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function x(e){var t=new h;
5511return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},y.call(w.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var _=[301,302,303,307,308];E.redirect=function(e,t){if(-1===_.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(C){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,n){return new Promise((function(r,s){var o=new w(e,n);if(o.signal&&o.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:x(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;r(new E(t,e))},a.onerror=function(){s(new TypeError("Network request failed"))},a.ontimeout=function(){s(new TypeError("Network request failed"))},a.onabort=function(){s(new t.DOMException("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),o.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",c)}),a.send("undefined"===typeof o._bodyInit?null:o._bodyInit)}))}k.polyfill=!0,e.fetch||(e.fetch=k,e.Headers=h,e.Request=w,e.Response=E),t.Headers=h,t.Request=w,t.Response=E,t.fetch=k,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},6538:(e,t,n)=>{"use strict";e.exports=n(7737)},6566:(e,t)=>{"use strict";function n(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,n){return~(e-1)&t|e-1&n},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=n,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==n(e,t)}},6580:(e,t)=>{let n;const 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];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!==typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return"undefined"!==typeof n},t.toSJIS=function(e){return n(e)}},6643:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;t.IWatch=class{}},6658:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},6676:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,s=a(e),o=s[0],c=s[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,c)),u=0,d=c>0?o-4:o;for(n=0;n<d;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],o=16383,a=0,l=r-i;a<l;a+=o)s.push(c(e,a,a+o>l?l:a+o));1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return s.join("")};for(var n=[],r=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
5511+/",o=0;o<64;++o)n[o]=s[o],r[s.charCodeAt(o)]=o;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var i,s,o=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(n[(s=i)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},6695:(e,t,n)=>{const r=n(6580),i=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let s=n<<10;for(;r.getBCHDigit(s)-i>=0;)s^=1335<<r.getBCHDigit(s)-i;return 21522^(n<<10|s)}},6844:e=>{"use strict";var t="%[a-f0-9]{2}",n=new RegExp("("+t+")|([^%]+?)","gi"),r=new RegExp("("+t+")+","gi");function i(e,t){try{return[decodeURIComponent(e.join(""))]}catch(s){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],i(n),i(r))}function s(e){try{return decodeURIComponent(e)}catch(s){for(var t=e.match(n)||[],r=1;r<t.length;r++)t=(e=i(t,r).join("")).match(n)||[];return e}}e.exports=function(e){if("string"!==typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var n={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},i=r.exec(e);i;){try{n[i[0]]=decodeURIComponent(i[0])}catch(t){var o=s(i[0]);o!==i[0]&&(n[i[0]]=o)}i=r.exec(e)}n["%C2"]="\ufffd";for(var a=Object.keys(n),c=0;c<a.length;c++){var l=a[c];e=e.replace(new RegExp(l,"g"),n[l])}return e}(e)}}},6851:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;const r=n(5070);t.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=n(9432);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let r=0;r<n.length;r++)n[r]=t[r];return(0,r.wipe)(t),n}}},6884:(e,t,n)=>{"use strict";n.d(t,{MZ:()=>r.M,wk:()=>i.w});var r=n(4115),i=n(173)},6897:(e,t)=>{t.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,c=(1<<a)-1,l=c>>1,u=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,s=p&(1<<-u)-1,p>>=-u,u+=a;u>0;s=256*s+e[t+d],d+=h,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=r;u>0;o=256*o+e[t+d],d+=h,u-=8);if(0===s)s=1-l;else{if(s===c)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),s-=l}return(p?-1:1)*o*Math.pow(2,s-r)},t.write=function(e,t,n,r,i,s){var o,a,c,l=8*s-i-1,u=(1<<l)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(o++,c/=2),o+d>=u?(a=0,o=u):o+d>=1?(a=(t*c-1)*Math.pow(2,i),o+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+p]=255&a,p+=f,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;e[n+p]=255&o,p+=f,o/=256,l-=8);e[n+p-f]|=128*m}},6914:(e,t,n)=>{var r=n(8798),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},7116:(e,t,n)=>{"use strict";var r,i;n.d(t,{eq:()=>a,z:()=>ct}),function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!==typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"===typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"===typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"===typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map((e=>"string"===typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"===typeof t?t.toString():t}(r||(r={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(i||(i={}));const s=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),o=e=>{switch(typeof e){case"undefined":return s.undefined;case"string":return s.string;case"number":return isNaN(e)?s.nan:s.number;case"boolean":return s.boolean;case"function":return s.function;case"bigint":return s.bigint;case"symbol":return s.symbol;
5511case"object":return Array.isArray(e)?s.array:null===e?s.null:e.then&&"function"===typeof e.then&&e.catch&&"function"===typeof e.catch?s.promise:"undefined"!==typeof Map&&e instanceof Map?s.map:"undefined"!==typeof Set&&e instanceof Set?s.set:"undefined"!==typeof Date&&e instanceof Date?s.date:s.object;default:return s.unknown}},a=r.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class c extends Error{constructor(e){var t;super(),t=this,this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.issues=[...t.issues,...e]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){const n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,r.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>e.message;const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}c.create=e=>new c(e);const l=(e,t)=>{let n;switch(e.code){case a.invalid_type:n=e.received===s.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case a.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,r.jsonStringifyReplacer)}`;break;case a.unrecognized_keys:n=`Unrecognized key(s) in object: ${r.joinValues(e.keys,", ")}`;break;case a.invalid_union:n="Invalid input";break;case a.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${r.joinValues(e.options)}`;break;case a.invalid_enum_value:n=`Invalid enum value. Expected ${r.joinValues(e.options)}, received '${e.received}'`;break;case a.invalid_arguments:n="Invalid function arguments";break;case a.invalid_return_type:n="Invalid function return type";break;case a.invalid_date:n="Invalid date";break;case a.invalid_string:"object"===typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"===typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:r.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case a.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case a.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case a.custom:n="Invalid input";break;case a.invalid_intersection_types:n="Intersection results could not be merged";break;case a.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case a.not_finite:n="Number must be finite";break;default:n=t.defaultError,r.assertNever(e)}return{message:n}};let u=l;function d(){return u}const h=e=>
5511{const{data:t,path:n,errorMaps:r,issueData:i}=e,s=[...n,...i.path||[]],o={...i,path:s};let a="";const c=r.filter((e=>!!e)).slice().reverse();for(const l of c)a=l(o,{data:t,defaultError:a}).message;return{...i,path:s,message:i.message||a}};function p(e,t){const n=h({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,d(),l].filter((e=>!!e))});e.common.issues.push(n)}class f{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return m;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const r of t)n.push({key:await r.key,value:await r.value});return f.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:i}=r;if("aborted"===t.status)return m;if("aborted"===i.status)return m;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"===t.value||"undefined"===typeof i.value&&!r.alwaysSet||(n[t.value]=i.value)}return{status:e.value,value:n}}}const m=Object.freeze({status:"aborted"}),g=e=>({status:"dirty",value:e}),y=e=>({status:"valid",value:e}),v=e=>"aborted"===e.status,w=e=>"dirty"===e.status,b=e=>"valid"===e.status,x=e=>"undefined"!==typeof Promise&&e instanceof Promise;var E;!function(e){e.errToObj=e=>"string"===typeof e?{message:e}:e||{},e.toString=e=>"string"===typeof e?e:null===e||void 0===e?void 0:e.message}(E||(E={}));class _{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const k=(e,t)=>{if(b(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new c(e.common.issues);return this._error=t,this._error}}};function C(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:i};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:"undefined"===typeof t.data?{message:null!==r&&void 0!==r?r:t.defaultError}:{message:null!==n&&void 0!==n?n:t.defaultError},description:i}}class A{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return o(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:o(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new f,ctx:{common:e.parent.common,data:e.data,parsedType:o(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(x(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null===t||void 0===t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null===t||void 0===t?void 0:t.errorMap},path:(null===t||void 0===t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)},i=this._parseSync({data:e,path:r.path,parent:r});return k(r,i)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null===t||void 0===t?void 0:t.errorMap,async:!0},path:(null===t||void 0===t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)},r=this._parse({data:e,path:n.path,parent:n}),i=await(x(r)?r:Promise.resolve(r));return k(n,i)}refine(e,t){const n=e=>"string"===typeof t||"undefined"===typeof t?{message:t}:"function"===typeof t?t(e):t;return this._refinement(((t,r)=>{const i=e(t),s=()=>r.addIssue({code:a.custom,...n(t)});return"undefined"!==typeof Promise&&i instanceof Promise?i.then((e=>!!e||(s(),!1))):!!i||(s(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"===typeof t?t(n,r):t),!1)))}_refinement(e){return new pe({schema:this,typeName:Ce.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return fe.create(this,this._def)}nullable(){return me.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return K.create(this,this._def)}promise(){return he.create(this,this._def)}or(e){return Q.create([this,e],this._def)}and(e){return te.create(this,e,this._def)}transform(e){return new pe({...C(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"===typeof e?e:()=>e;return new ge({...C(this._def),innerType:this,defaultValue:t,typeName:Ce.ZodDefault})}brand(){return new be({typeName:Ce.ZodBranded,type:this,...C(this._def)})}catch(e){const t="function"===typeof e?e:()=>e;return new ye({...C(this._def),innerType:this,catchValue:t,typeName:Ce.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return xe.create(this,e)}readonly(){return Ee.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const S=/^c[^\s-]{8,}
5511$/i,I=/^[a-z][a-z0-9]*$/,T=/^[0-9A-HJKMNP-TV-Z]{26}$/,P=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,N=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let R;const O=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,M=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;class j extends A{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==s.string){const t=this._getOrReturnCtx(e);return p(t,{code:a.invalid_type,expected:s.string,received:t.parsedType}),m}const t=new f;let n;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:a.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("max"===s.kind)e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:a.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const r=e.data.length>s.value,i=e.data.length<s.value;(r||i)&&(n=this._getOrReturnCtx(e,n),r?p(n,{code:a.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):i&&p(n,{code:a.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if("email"===s.kind)N.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"email",code:a.invalid_string,message:s.message}),t.dirty());else if("emoji"===s.kind)R||(R=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),R.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"emoji",code:a.invalid_string,message:s.message}),t.dirty());else if("uuid"===s.kind)P.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"uuid",code:a.invalid_string,message:s.message}),t.dirty());else if("cuid"===s.kind)S.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"cuid",code:a.invalid_string,message:s.message}),t.dirty());else if("cuid2"===s.kind)I.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"cuid2",code:a.invalid_string,message:s.message}),t.dirty());else if("ulid"===s.kind)T.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"ulid",code:a.invalid_string,message:s.message}),t.dirty());else if("url"===s.kind)try{new URL(e.data)}catch(l){n=this._getOrReturnCtx(e,n),p(n,{validation:"url",code:a.invalid_string,message:s.message}),t.dirty()}else if("regex"===s.kind){s.regex.lastIndex=0;s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"regex",code:a.invalid_string,message:s.message}),t.dirty())}else if("trim"===s.kind)e.data=e.data.trim();else if("includes"===s.kind)e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),p(n,{code:a.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),t.dirty());else if("toLowerCase"===s.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===s.kind)e.data=e.data.toUpperCase();else if("startsWith"===s.kind)e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:a.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty());else if("endsWith"===s.kind)e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:a.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty());else if("datetime"===s.kind){((c=s).precision?c.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${c.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${c.precision}}Z$`):0===c.precision?c.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):c.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:a.invalid_string,validation:"datetime",message:s.message}),t.dirty())}else"ip"===s.kind?(i=e.data,("v4"!==(o=s.version)&&o||!O.test(i))&&("v6"!==o&&o||!M.test(i))&&(n=this._getOrReturnCtx(e,n),p(n,{validation:"ip",code:a.invalid_string,message:s.message}),t.dirty())):r.assertNever(s);var i,o,c;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:a.invalid_string,...E.errToObj(n)})}_addCheck(e){return new j({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...E.errToObj(e)})}url(e){return this._addCheck({kind:"url",...E.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...E.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...E.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...E.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...E.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...E.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...E.errToObj(e)})}datetime(e){var t;return"string"===typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:"undefined"===typeof(null===e||void 0===e?void 0:e.precision)?null:null===e||void 0===e?void 0:e.precision,offset:null!==(t=null===e||void 0===e?void 0:e.offset)&&void 0!==t&&t,...E.errToObj(null===e||void 0===e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...E.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null===t||void 0===t?void 0:t.position,...E.errToObj(null===t||void 0===t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...E.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...E.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...E.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...E.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...E.errToObj(t)})}nonempty(e){return this.min(1,E.errToObj(e))}trim(){return new j({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new j({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new j({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}
vendor: 10,626 bytes, line 5511
5511get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function L(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}j.create=e=>{var t;return new j({checks:[],typeName:Ce.ZodString,coerce:null!==(t=null===e||void 0===e?void 0:e.coerce)&&void 0!==t&&t,...C(e)})};class D extends A{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==s.number){const t=this._getOrReturnCtx(e);return p(t,{code:a.invalid_type,expected:s.number,received:t.parsedType}),m}let t;const n=new f;for(const i of this._def.checks)if("int"===i.kind)r.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:a.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty());else if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:a.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:a.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else"multipleOf"===i.kind?0!==L(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:a.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:a.not_finite,message:i.message}),n.dirty()):r.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,E.toString(t))}gt(e,t){return this.setLimit("min",e,!1,E.toString(t))}lte(e,t){return this.setLimit("max",e,!0,E.toString(t))}lt(e,t){return this.setLimit("max",e,!1,E.toString(t))}setLimit(e,t,n,r){return new D({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:E.toString(r)}]})}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:E.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:E.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:E.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:E.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:E.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:E.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:E.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:E.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:E.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&r.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}D.create=e=>new D({checks:[],typeName:Ce.ZodNumber,coerce:(null===e||void 0===e?void 0:e.coerce)||!1,...C(e)});class B extends A{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==s.bigint){const t=this._getOrReturnCtx(e);return p(t,{code:a.invalid_type,expected:s.bigint,received:t.parsedType}),m}let t;const n=new f;for(const i of this._def.checks)if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:a.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:a.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),p(t,{code:a.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):r.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,E.toString(t))}gt(e,t){return this.setLimit("min",e,!1,E.toString(t))}lte(e,t){return this.setLimit("max",e,!0,E.toString(t))}lt(e,t){return this.setLimit("max",e,!1,E.toString(t))}setLimit(e,t,n,r){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:E.toString(r)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:E.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:E.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:E.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:E.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:E.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}B.create=e=>{var t;return new B({checks:[],typeName:Ce.ZodBigInt,coerce:null!==(t=null===e||void 0===e?void 0:e.coerce)&&void 0!==t&&t,...C(e)})};class U extends A{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==s.boolean){const t=this._getOrReturnCtx(e);return p(t,{code:a.invalid_type,expected:s.boolean,received:t.parsedType}),m}return y(e.data)}}U.create=e=>new U({typeName:Ce.ZodBoolean,coerce:(null===e||void 0===e?void 0:e.coerce)||!1,...C(e)});class F extends A{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==s.date){const t=this._getOrReturnCtx(e);return p(t,{code:a.invalid_type,expected:s.date,received:t.parsedType}),m}if(isNaN(e.data.getTime())){return p(this._getOrReturnCtx(e),{code:a.invalid_date}),m}const t=new f;let n;for(const i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:a.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:a.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):r.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new F({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:E.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:E.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}F.create=e=>new F({checks:[],coerce:(null===e||void 0===e?void 0:e.coerce)||!1,typeName:Ce.ZodDate,...C(e)});class $ extends A{_parse(e){if(this._getType(e)!==s.symbol){const t=this._getOrReturnCtx(e);return p(t,{code:a.invalid_type,expected:s.symbol,received:t.parsedType}),m}return y(e.data)}}$.create=e=>new $({typeName:Ce.ZodSymbol,...C(e)});class z extends A{_parse(e){if(this._getType(e)!==s.undefined){const t=this._getOrReturnCtx(e);return p(t,{code:a.invalid_type,expected:s.undefined,received:t.parsedType}),m}return y(e.data)}}z.create=e=>new z({typeName:Ce.ZodUndefined,...C(e)});class H extends A{_parse(e){if(this._getType(e)!==s.null){const t=this._getOrReturnCtx(e);return p(t,{code:a.invalid_type,expected:s.null,received:t.parsedType}),m}return y(e.data)}}H.create=e=>new H({typeName:Ce.ZodNull,...C(e)});class W extends A{constructor(){super(...arguments),this._any=!0}_parse(e){return y(e.data)}}W.create=e=>new W({typeName:Ce.ZodAny,...C(e)});class q extends A{constructor(){super(...arguments),this._unknown=!0}_parse(e){return y(e.data)}}q.create=e=>new q({typeName:Ce.ZodUnknown,...C(e)});class V extends A{_parse(e){const t=this._getOrReturnCtx(e);return p(t,{code:a.invalid_type,expected:s.never,received:t.parsedType}),m}}V.create=e=>new V({typeName:Ce.ZodNever,...C(e)});class G extends A{_parse(e){if(this._getType(e)!==s.undefined){const t=this._getOrReturnCtx(e);return p(t,{code:a.invalid_type,expected:s.void,received:t.parsedType}),m}return y(e.data)}}G.create=e=>new G({typeName:Ce.ZodVoid,...C(e)});class K extends A{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==s.array)return p(t,{code:a.invalid_type,expected:s.array,received:t.parsedType}),m;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(p(t,{code:e?a.too_big:a.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(p(t,{code:a.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(p(t,{code:a.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new _(t,e,t.path,n))))).then((e=>f.mergeArray(n,e)));const i=[...t.data].map(((e,n)=>r.type._parseSync(new _(t,e,t.path,n))));return f.mergeArray(n,i)}
5511get element(){return this._def.type}min(e,t){return new K({...this._def,minLength:{value:e,message:E.toString(t)}})}max(e,t){return new K({...this._def,maxLength:{value:e,message:E.toString(t)}})}length(e,t){return new K({...this._def,exactLength:{value:e,message:E.toString(t)}})}nonempty(e){return this.min(1,e)}}function Z(e){if(e instanceof Y){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=fe.create(Z(r))}return new Y({...e._def,shape:()=>t})}return e instanceof K?new K({...e._def,type:Z(e.element)}):e instanceof fe?fe.create(Z(e.unwrap())):e instanceof me?me.create(Z(e.unwrap())):e instanceof ne?ne.create(e.items.map((e=>Z(e)))):e}K.create=(e,t)=>new K({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...C(t)});class Y extends A{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=r.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==s.object){const t=this._getOrReturnCtx(e);return p(t,{code:a.invalid_type,expected:s.object,received:t.parsedType}),m}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof V&&"strip"===this._def.unknownKeys))for(const s in n.data)i.includes(s)||o.push(s);const c=[];for(const s of i){const e=r[s],t=n.data[s];c.push({key:{status:"valid",value:s},value:e._parse(new _(n,t,n.path,s)),alwaysSet:s in n.data})}if(this._def.catchall instanceof V){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of o)c.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===e)o.length>0&&(p(n,{code:a.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of o){const r=n.data[t];c.push({key:{status:"valid",value:t},value:e._parse(new _(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of c){const n=await t.key;e.push({key:n,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>f.mergeObjectSync(t,e))):f.mergeObjectSync(t,c)}get shape(){return this._def.shape()}strict(e){return E.errToObj,new Y({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,s,o;const a=null!==(s=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==s?s:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(o=E.errToObj(e).message)&&void 0!==o?o:a}:{message:a}}}:{}})}strip(){return new Y({...this._def,unknownKeys:"strip"})}passthrough(){return new Y({...this._def,unknownKeys:"passthrough"})}extend(e){return new Y({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Y({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ce.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Y({...this._def,catchall:e})}pick(e){const t={};return r.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new Y({...this._def,shape:()=>t})}omit(e){const t={};return r.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new Y({...this._def,shape:()=>t})}deepPartial(){return Z(this)}partial(e){const t={};return r.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new Y({...this._def,shape:()=>t})}required(e){const t={};return r.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof fe;)e=e._def.innerType;t[n]=e}})),new Y({...this._def,shape:()=>t})}keyof(){return le(r.objectKeys(this.shape))}}Y.create=(e,t)=>new Y({shape:()=>e,unknownKeys:"strip",catchall:V.create(),typeName:Ce.ZodObject,...C(t)}),Y.strictCreate=(e,t)=>new Y({shape:()=>e,unknownKeys:"strict",catchall:V.create(),typeName:Ce.ZodObject,...C(t)}),Y.lazycreate=(e,t)=>new Y({shape:e,unknownKeys:"strip",catchall:V.create(),typeName:Ce.ZodObject,...C(t)});class Q extends A{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const n=e.map((e=>new c(e.ctx.common.issues)));return p(t,{code:a.invalid_union,unionErrors:n}),m}));{let e;const r=[];for(const s of n){const n={...t,common:{...t.common,issues:[]},parent:null},i=s._parseSync({data:t.data,path:t.path,parent:n});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const i=r.map((e=>new c(e)));return p(t,{code:a.invalid_union,unionErrors:i}),m}}get options(){return this._def.options}}Q.create=(e,t)=>
5511new Q({options:e,typeName:Ce.ZodUnion,...C(t)});const J=e=>e instanceof ae?J(e.schema):e instanceof pe?J(e.innerType()):e instanceof ce?[e.value]:e instanceof ue?e.options:e instanceof de?Object.keys(e.enum):e instanceof ge?J(e._def.innerType):e instanceof z?[void 0]:e instanceof H?[null]:null;class X extends A{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.object)return p(t,{code:a.invalid_type,expected:s.object,received:t.parsedType}),m;const n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:a.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const i of t){const t=J(i.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(r.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);r.set(n,i)}}return new X({typeName:Ce.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...C(n)})}}function ee(e,t){const n=o(e),i=o(t);if(e===t)return{valid:!0,data:e};if(n===s.object&&i===s.object){const n=r.objectKeys(t),i=r.objectKeys(e).filter((e=>-1!==n.indexOf(e))),s={...e,...t};for(const r of i){const n=ee(e[r],t[r]);if(!n.valid)return{valid:!1};s[r]=n.data}return{valid:!0,data:s}}if(n===s.array&&i===s.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const i=ee(e[r],t[r]);if(!i.valid)return{valid:!1};n.push(i.data)}return{valid:!0,data:n}}return n===s.date&&i===s.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}class te extends A{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(v(e)||v(r))return m;const i=ee(e.value,r.value);return i.valid?((w(e)||w(r))&&t.dirty(),{status:t.value,value:i.data}):(p(n,{code:a.invalid_intersection_types}),m)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((e=>{let[t,n]=e;return r(t,n)})):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}te.create=(e,t,n)=>new te({left:e,right:t,typeName:Ce.ZodIntersection,...C(n)});class ne extends A{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.array)return p(n,{code:a.invalid_type,expected:s.array,received:n.parsedType}),m;if(n.data.length<this._def.items.length)return p(n,{code:a.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&n.data.length>this._def.items.length&&(p(n,{code:a.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new _(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>f.mergeArray(t,e))):f.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new ne({...this._def,rest:e})}}ne.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ne({items:e,typeName:Ce.ZodTuple,rest:null,...C(t)})};class re extends A{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.object)return p(n,{code:a.invalid_type,expected:s.object,received:n.parsedType}),m;const r=[],i=this._def.keyType,o=this._def.valueType;for(const s in n.data)r.push({key:i._parse(new _(n,s,n.path,s)),value:o._parse(new _(n,n.data[s],n.path,s))});return n.common.async?f.mergeObjectAsync(t,r):f.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new re(t instanceof A?{keyType:e,valueType:t,typeName:Ce.ZodRecord,...C(n)}:{keyType:j.create(),valueType:e,typeName:Ce.ZodRecord,...C(t)})}}class ie extends A{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.map)return p(n,{code:a.invalid_type,expected:s.map,received:n.parsedType}),m;const r=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(((e,t)=>{let[s,o]=e;return{key:r._parse(new _(n,s,n.path,[t,"key"])),value:i._parse(new _(n,o,n.path,[t,"value"]))}}));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of o){const r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return m;"dirty"!==r.status&&"dirty"!==i.status||t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of o){const r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return m;"dirty"!==r.status&&"dirty"!==i.status||t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}
5511ie.create=(e,t,n)=>new ie({valueType:t,keyType:e,typeName:Ce.ZodMap,...C(n)});class se extends A{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.set)return p(n,{code:a.invalid_type,expected:s.set,received:n.parsedType}),m;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(p(n,{code:a.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(p(n,{code:a.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const i=this._def.valueType;function o(e){const n=new Set;for(const r of e){if("aborted"===r.status)return m;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const c=[...n.data.values()].map(((e,t)=>i._parse(new _(n,e,n.path,t))));return n.common.async?Promise.all(c).then((e=>o(e))):o(c)}min(e,t){return new se({...this._def,minSize:{value:e,message:E.toString(t)}})}max(e,t){return new se({...this._def,maxSize:{value:e,message:E.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}se.create=(e,t)=>new se({valueType:e,minSize:null,maxSize:null,typeName:Ce.ZodSet,...C(t)});class oe extends A{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.function)return p(t,{code:a.invalid_type,expected:s.function,received:t.parsedType}),m;function n(e,n){return h({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,d(),l].filter((e=>!!e)),issueData:{code:a.invalid_arguments,argumentsError:n}})}function r(e,n){return h({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,d(),l].filter((e=>!!e)),issueData:{code:a.invalid_return_type,returnTypeError:n}})}const i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof he){const e=this;return y((async function(){for(var t=arguments.length,s=new Array(t),a=0;a<t;a++)s[a]=arguments[a];const l=new c([]),u=await e._def.args.parseAsync(s,i).catch((e=>{throw l.addIssue(n(s,e)),l})),d=await Reflect.apply(o,this,u);return await e._def.returns._def.type.parseAsync(d,i).catch((e=>{throw l.addIssue(r(d,e)),l}))}))}{const e=this;return y((function(){for(var t=arguments.length,s=new Array(t),a=0;a<t;a++)s[a]=arguments[a];const l=e._def.args.safeParse(s,i);if(!l.success)throw new c([n(s,l.error)]);const u=Reflect.apply(o,this,l.data),d=e._def.returns.safeParse(u,i);if(!d.success)throw new c([r(u,d.error)]);return d.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new oe({...this._def,args:ne.create(t).rest(q.create())})}returns(e){return new oe({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new oe({args:e||ne.create([]).rest(q.create()),returns:t||q.create(),typeName:Ce.ZodFunction,...C(n)})}}class ae extends A{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ae.create=(e,t)=>new ae({getter:e,typeName:Ce.ZodLazy,...C(t)});class ce extends A{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return p(t,{received:t.data,code:a.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}function le(e,t){return new ue({values:e,typeName:Ce.ZodEnum,...C(t)})}ce.create=(e,t)=>new ce({value:e,typeName:Ce.ZodLiteral,...C(t)});class ue extends A{_parse(e){if("string"!==typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return p(t,{expected:r.joinValues(n),received:t.parsedType,code:a.invalid_type}),m}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return p(t,{received:t.data,code:a.invalid_enum_value,options:n}),m}return y(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return ue.create(e)}exclude(e){return ue.create(this.options.filter((t=>!e.includes(t))))}}ue.create=le;class de extends A{_parse(e){const t=r.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==s.string&&n.parsedType!==s.number){const e=r.objectValues(t);return p(n,{expected:r.joinValues(e),received:n.parsedType,code:a.invalid_type}),m}if(-1===t.indexOf(e.data)){const e=r.objectValues(t);return p(n,{received:n.data,code:a.invalid_enum_value,options:e}),m}return y(e.data)}get enum(){return this._def.values}}de.create=(e,t)=>
vendor: 4,134 bytes, line 5511
5511new de({values:e,typeName:Ce.ZodNativeEnum,...C(t)});class he extends A{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.promise&&!1===t.common.async)return p(t,{code:a.invalid_type,expected:s.promise,received:t.parsedType}),m;const n=t.parsedType===s.promise?t.data:Promise.resolve(t.data);return y(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}he.create=(e,t)=>new he({type:e,typeName:Ce.ZodPromise,...C(t)});class pe extends A{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:e=>{p(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===i.type){const e=i.transform(n.data,s);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:n.path,parent:n}))):this._def.schema._parseSync({data:e,path:n.path,parent:n})}if("refinement"===i.type){const e=e=>{const t=i.refinement(e,s);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?m:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?m:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===i.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!b(e))return e;const r=i.transform(e.value,s);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>b(e)?Promise.resolve(i.transform(e.value,s)).then((e=>({status:t.value,value:e}))):e))}r.assertNever(i)}}pe.create=(e,t,n)=>new pe({schema:e,typeName:Ce.ZodEffects,effect:t,...C(n)}),pe.createWithPreprocess=(e,t,n)=>new pe({schema:t,effect:{type:"preprocess",transform:e},typeName:Ce.ZodEffects,...C(n)});class fe extends A{_parse(e){return this._getType(e)===s.undefined?y(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}fe.create=(e,t)=>new fe({innerType:e,typeName:Ce.ZodOptional,...C(t)});class me extends A{_parse(e){return this._getType(e)===s.null?y(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}me.create=(e,t)=>new me({innerType:e,typeName:Ce.ZodNullable,...C(t)});class ge extends A{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===s.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ge.create=(e,t)=>new ge({innerType:e,typeName:Ce.ZodDefault,defaultValue:"function"===typeof t.default?t.default:()=>t.default,...C(t)});class ye extends A{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return x(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new c(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new c(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ye.create=(e,t)=>new ye({innerType:e,typeName:Ce.ZodCatch,catchValue:"function"===typeof t.catch?t.catch:()=>t.catch,...C(t)});class ve extends A{_parse(e){if(this._getType(e)!==s.nan){const t=this._getOrReturnCtx(e);return p(t,{code:a.invalid_type,expected:s.nan,received:t.parsedType}),m}
5511return{status:"valid",value:e.data}}}ve.create=e=>new ve({typeName:Ce.ZodNaN,...C(e)});const we=Symbol("zod_brand");class be extends A{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class xe extends A{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?m:"dirty"===e.status?(t.dirty(),g(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?m:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new xe({in:e,out:t,typeName:Ce.ZodPipeline})}}class Ee extends A{_parse(e){const t=this._def.innerType._parse(e);return b(t)&&(t.value=Object.freeze(t.value)),t}}Ee.create=(e,t)=>new Ee({innerType:e,typeName:Ce.ZodReadonly,...C(t)});const _e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return e?W.create().superRefine(((r,i)=>{var s,o;if(!e(r)){const e="function"===typeof t?t(r):"string"===typeof t?{message:t}:t,a=null===(o=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===o||o,c="string"===typeof e?{message:e}:e;i.addIssue({code:"custom",...c,fatal:a})}})):W.create()},ke={object:Y.lazycreate};var Ce;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Ce||(Ce={}));const Ae=j.create,Se=D.create,Ie=ve.create,Te=B.create,Pe=U.create,Ne=F.create,Re=$.create,Oe=z.create,Me=H.create,je=W.create,Le=q.create,De=V.create,Be=G.create,Ue=K.create,Fe=Y.create,$e=Y.strictCreate,ze=Q.create,He=X.create,We=te.create,qe=ne.create,Ve=re.create,Ge=ie.create,Ke=se.create,Ze=oe.create,Ye=ae.create,Qe=ce.create,Je=ue.create,Xe=de.create,et=he.create,tt=pe.create,nt=fe.create,rt=me.create,it=pe.createWithPreprocess,st=xe.create,ot={string:e=>j.create({...e,coerce:!0}),number:e=>D.create({...e,coerce:!0}),boolean:e=>U.create({...e,coerce:!0}),bigint:e=>B.create({...e,coerce:!0}),date:e=>F.create({...e,coerce:!0})},at=m;var ct=Object.freeze({__proto__:null,defaultErrorMap:l,setErrorMap:function(e){u=e},getErrorMap:d,makeIssue:h,EMPTY_PATH:[],addIssueToContext:p,ParseStatus:f,INVALID:m,DIRTY:g,OK:y,isAborted:v,isDirty:w,isValid:b,isAsync:x,get util(){return r},get objectUtil(){return i},ZodParsedType:s,getParsedType:o,ZodType:A,ZodString:j,ZodNumber:D,ZodBigInt:B,ZodBoolean:U,ZodDate:F,ZodSymbol:$,ZodUndefined:z,ZodNull:H,ZodAny:W,ZodUnknown:q,ZodNever:V,ZodVoid:G,ZodArray:K,ZodObject:Y,ZodUnion:Q,ZodDiscriminatedUnion:X,ZodIntersection:te,ZodTuple:ne,ZodRecord:re,ZodMap:ie,ZodSet:se,ZodFunction:oe,ZodLazy:ae,ZodLiteral:ce,ZodEnum:ue,ZodNativeEnum:de,ZodPromise:he,ZodEffects:pe,ZodTransformer:pe,ZodOptional:fe,ZodNullable:me,ZodDefault:ge,ZodCatch:ye,ZodNaN:ve,BRAND:we,ZodBranded:be,ZodPipeline:xe,ZodReadonly:Ee,custom:_e,Schema:A,ZodSchema:A,late:ke,get ZodFirstPartyTypeKind(){return Ce},coerce:ot,any:je,array:Ue,bigint:Te,boolean:Pe,date:Ne,discriminatedUnion:He,effect:tt,enum:Je,function:Ze,instanceof:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{message:`Input not instance of ${e.name}`};return _e((t=>t instanceof e),t)},intersection:We,lazy:Ye,literal:Qe,map:Ge,nan:Ie,nativeEnum:Xe,never:De,null:Me,nullable:rt,number:Se,object:Fe,oboolean:()=>Pe().optional(),onumber:()=>Se().optional(),optional:nt,ostring:()=>Ae().optional(),pipeline:st,preprocess:it,promise:et,record:Ve,set:Ke,strictObject:$e,string:Ae,symbol:Re,transformer:tt,tuple:qe,undefined:Oe,union:ze,unknown:Le,void:Be,NEVER:at,ZodIssueCode:a,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:c})},7119:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(8345)},7170:(e,t)=>{"use strict";var n;
5511Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkWebSocket=t.ConnectionState=void 0,function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"}(n||(t.ConnectionState=n={}));t.WalletLinkWebSocket=class{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WebSocket;this.WebSocketClass=t,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise(((e,t)=>{var r;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(s){return void t(s)}null===(r=this.connectionStateListener)||void 0===r||r.call(this,n.CONNECTING),i.onclose=e=>{var r;this.clearWebSocket(),t(new Error(`websocket error ${e.code}: ${e.reason}`)),null===(r=this.connectionStateListener)||void 0===r||r.call(this,n.DISCONNECTED)},i.onopen=t=>{var r;if(e(),null===(r=this.connectionStateListener)||void 0===r||r.call(this,n.CONNECTED),this.pendingData.length>0){[...this.pendingData].forEach((e=>this.sendData(e))),this.pendingData=[]}},i.onmessage=e=>{var t,n;if("h"===e.data)null===(t=this.incomingDataListener)||void 0===t||t.call(this,{type:"Heartbeat"});else try{const t=JSON.parse(e.data);null===(n=this.incomingDataListener)||void 0===n||n.call(this,t)}catch(r){}}}))}disconnect(){var e;const{webSocket:t}=this;if(t){this.clearWebSocket(),null===(e=this.connectionStateListener)||void 0===e||e.call(this,n.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{t.close()}catch(r){}}}sendData(e){const{webSocket:t}=this;if(!t)return this.pendingData.push(e),void this.connect();t.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}},7198:(e,t,n)=>{const r=n(3858);function i(e){return Buffer.allocUnsafe(e).fill(0)}function s(e,t){let n=e.toString(16);n.length%2!==0&&(n="0"+n);const r=n.match(/.{1,2}/g).map((e=>parseInt(e,16)));for(;r.length<t;)r.unshift(0);return Buffer.from(r)}function o(e,t,n){const r=i(t);return e=a(e),n?e.length<t?(e.copy(r),r):e.slice(0,t):e.length<t?(e.copy(r,t-e.length),r):e.slice(-t)}function a(e){if(!Buffer.isBuffer(e))if(Array.isArray(e))e=Buffer.from(e);else if("string"===typeof e)e=c(e)?Buffer.from((t=l(e)).length%2?"0"+t:t,"hex"):Buffer.from(e);else if("number"===typeof e)e=intToBuffer(e);else if(null===e||void 0===e)e=Buffer.allocUnsafe(0);else if("bigint"===typeof e)e=s(e);else{if(!e.toArray)throw new Error("invalid type");e=Buffer.from(e.toArray())}var t;return e}function c(e){return"string"===typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)}function l(e){return"string"===typeof e&&e.startsWith("0x")?e.slice(2):e}e.exports={zeros:i,setLength:o,setLengthRight:function(e,t){return o(e,t,!0)},isHexString:c,stripHexPrefix:l,toBuffer:a,bufferToHex:function(e){return"0x"+(e=a(e)).toString("hex")},keccak:function(e,t){return e=a(e),t||(t=256),r("keccak"+t).update(e).digest()},bitLengthFromBigInt:function(e){return e.toString(2).length},bufferBEFromBigInt:s,twosFromBigInt:function(e,t){let n;if(e<0n){n=(~e&(1n<<BigInt(t))-1n)+1n}else n=e;return n&=(1n<<BigInt(t))-1n,n}}},7216:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WLMobileRelayUI=void 0;const r=n(5328),i=n(1101),s=n(4046);t.WLMobileRelayUI=class{constructor(){this.attached=!1,this.redirectDialog=new r.RedirectDialog}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){const t=new URL(s.CBW_MOBILE_DEEPLINK_URL);t.searchParams.append("redirect_url",(0,i.getLocation)().href),e&&t.searchParams.append("wl_url",e);const n=document.createElement("a");n.target="cbw-opener",n.href=t.href,n.rel="noreferrer noopener",n.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout((()=>{this.redirectToCoinbaseWallet(e)}),99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}}},7245:(e,t,n)=>{"use strict";
5511Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkConnection=void 0;const r=n(1384),i=n(7958),s=n(8649),o=n(7170),a=n(168);t.WalletLinkConnection=class{constructor(e){let{session:t,linkAPIUrl:n,listener:c,WebSocketClass:l=WebSocket}=e;this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,a.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=e=>{if(!e)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",t=>e.JsonRpcUrl&&this.handleChainUpdated(t,e.JsonRpcUrl)]]).forEach(((t,n)=>{const r=e[n];void 0!==r&&t(r)}))},this.handleDestroyed=e=>{var t;"1"===e&&(null===(t=this.listener)||void 0===t||t.resetAndReload())},this.handleAccountUpdated=async e=>{var t;{const n=await this.cipher.decrypt(e);null===(t=this.listener)||void 0===t||t.accountUpdated(n)}},this.handleMetadataUpdated=async(e,t)=>{var n;{const r=await this.cipher.decrypt(t);null===(n=this.listener)||void 0===n||n.metadataUpdated(e,r)}},this.handleWalletUsernameUpdated=async e=>{this.handleMetadataUpdated(r.WALLET_USER_NAME_KEY,e)},this.handleAppVersionUpdated=async e=>{this.handleMetadataUpdated(r.APP_VERSION_KEY,e)},this.handleChainUpdated=async(e,t)=>{var n;{const r=await this.cipher.decrypt(e),i=await this.cipher.decrypt(t);null===(n=this.listener)||void 0===n||n.chainUpdated(r,i)}},this.session=t,this.cipher=new i.WalletLinkCipher(t.secret),this.listener=c;const u=new o.WalletLinkWebSocket(`${n}/rpc`,l);u.setConnectionStateListener((async e=>{let t=!1;switch(e){case o.ConnectionState.DISCONNECTED:if(!this.destroyed){const e=async()=>{await new Promise((e=>setTimeout(e,5e3))),this.destroyed||u.connect().catch((()=>{e()}))};e()}break;case o.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),t=!0}catch(n){}this.updateLastHeartbeat(),setInterval((()=>{this.heartbeat()}),1e4),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();case o.ConnectionState.CONNECTING:}this.connected!==t&&(this.connected=t)})),u.setIncomingDataListener((e=>{var t;switch(e.type){case"Heartbeat":return void this.updateLastHeartbeat();case"IsLinkedOK":case"Linked":{const t="IsLinkedOK"===e.type?e.linked:void 0;this.linked=t||e.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":this.handleSessionMetadataUpdated(e.metadata);break;case"Event":this.handleIncomingEvent(e)}void 0!==e.id&&(null===(t=this.requestResolutions.get(e.id))||void 0===t||t(e))})),this.ws=u,this.http=new s.WalletLinkHTTP(n,t.id,t.key)}connect(){if(this.destroyed)throw new Error("instance is destroyed");this.ws.connect()}destroy(){this.destroyed=!0,this.ws.disconnect(),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var t;this._connected=e,e&&(null===(t=this.onceConnected)||void 0===t||t.call(this))}setOnceConnected(e){return new Promise((t=>{this.connected?e().then(t):this.onceConnected=()=>{e().then(t),this.onceConnected=void 0}}))}get linked(){return this._linked}set linked(e){var t,n;this._linked=e,e&&(null===(t=this.onceLinked)||void 0===t||t.call(this)),null===(n=this.listener)||void 0===n||n.linkedUpdated(e)}setOnceLinked(e){return new Promise((t=>{this.linked?e().then(t):this.onceLinked=()=>{e().then(t),this.onceLinked=void 0}}))}async handleIncomingEvent(e){var t;if("Event"===e.type&&"Web3Response"===e.event){const n=await this.cipher.decrypt(e.data),r=JSON.parse(n);if("WEB3_RESPONSE"!==r.type)return;null===(t=this.listener)||void 0===t||t.handleWeb3ResponseMessage(r)}}async checkUnseenEvents(){if(this.connected){await new Promise((e=>setTimeout(e,250)));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}else this.shouldFetchUnseenEventsOnConnect=!0}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1;
5511(await this.http.fetchUnseenEvents()).forEach((e=>this.handleIncomingEvent(e)))}async setSessionMetadata(e,t){const n={type:"SetSessionConfig",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:t}};return this.setOnceConnected((async()=>{const e=await this.makeRequest(n);if("Fail"===e.type)throw new Error(e.error||"failed to set session metadata")}))}async publishEvent(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin,relaySource:"coinbaseWalletExtension"in window&&window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),i={type:"PublishEvent",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:r,callWebhook:n};return this.setOnceLinked((async()=>{const e=await this.makeRequest(i);if("Fail"===e.type)throw new Error(e.error||"failed to publish event");return e.eventId}))}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(e){}}async makeRequest(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4;const n=e.id;let r;return this.sendData(e),Promise.race([new Promise(((e,i)=>{r=window.setTimeout((()=>{i(new Error(`request ${n} timed out`))}),t)})),new Promise((e=>{this.requestResolutions.set(n,(t=>{clearTimeout(r),e(t),this.requestResolutions.delete(n)}))}))])}async authenticate(){const e={type:"HostSession",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},t=await this.makeRequest(e);if("Fail"===t.type)throw new Error(t.error||"failed to authenticate")}sendIsLinked(){const e={type:"IsLinked",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){const e={type:"GetSessionConfig",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}}},7267:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelay=void 0;const r=n(7245),i=n(1384),s=n(911),o=n(1870),a=n(4464),c=n(1101),l=n(1236),u=n(7216),d=n(5722),h=n(8114),p=n(8582);class f{constructor(e){this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.isMobileWeb=(0,c.isMobileWeb)(),this.appName="",this.appLogoUrl=null,this.linkedUpdated=e=>{this.isLinked=e;const t=this.storage.getItem(i.LOCAL_STORAGE_ADDRESSES_KEY);if(e&&(this._session.linked=e),this.isUnlinkedErrorState=!1,t){const n=t.split(" "),r="true"===this.storage.getItem("IsStandaloneSigning");""===n[0]||e||!this._session.linked||r||(this.isUnlinkedErrorState=!0)}},this.metadataUpdated=(e,t)=>{this.storage.setItem(e,t)},this.chainUpdated=(e,t)=>{this.chainCallbackParams.chainId===e&&this.chainCallbackParams.jsonRpcUrl===t||(this.chainCallbackParams={chainId:e,jsonRpcUrl:t},this.chainCallback&&this.chainCallback(e,t))},this.accountUpdated=e=>{this.accountsCallback&&this.accountsCallback([e]),f.accountRequestCallbackIds.size>0&&(Array.from(f.accountRequestCallbackIds.values()).forEach((t=>{const n={type:"WEB3_RESPONSE",id:t,response:{method:"requestEthereumAccounts",result:[e]}};this.invokeCallback(Object.assign(Object.assign({},n),{id:t}))})),f.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage;const{session:t,ui:n,connection:r}=this.subscribe();this._session=t,this.connection=r,this.relayEventManager=new s.RelayEventManager,this.ui=n}subscribe(){const e=o.WalletLinkSession.load(this.storage)||new o.WalletLinkSession(this.storage).save(),{linkAPIUrl:t}=this,n=new r.WalletLinkConnection({session:e,linkAPIUrl:t,listener:this}),i=this.isMobileWeb?new u.WLMobileRelayUI:new l.WalletLinkRelayUI;return n.connect(),{session:e,ui:i,connection:n}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise((e=>setTimeout((()=>e(null)),1e3)))]).then((()=>{this.connection.destroy();const e=o.WalletLinkSession.load(this.storage);(null===e||void 0===e?void 0:e.id)===this._session.id&&p.ScopedLocalStorage.clearAll(),document.location.reload()})).catch((e=>{}))}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}setStorageItem(e,t){this.storage.setItem(e,t)}signEthereumMessage(e,t,n,r){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,h.hexStringFromBuffer)(e,!0),address:t,addPrefix:n,typedDataJson:r||null}})}ethereumAddressFromSignedMessage(e,t,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,h.hexStringFromBuffer)(e,!0),signature:(0,h.hexStringFromBuffer)(t,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,h.bigIntStringFromBigInt)(e.weiValue),data:(0,h.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,h.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,h.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,h.bigIntStringFromBigInt)(e.gasPriceInWei):null,gasLimit:e.gasLim
5511it?(0,h.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,h.bigIntStringFromBigInt)(e.weiValue),data:(0,h.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,h.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,h.bigIntStringFromBigInt)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,h.bigIntStringFromBigInt)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,h.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,h.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getWalletLinkSession(){return this._session}genericRequest(e,t){return this.sendRequest({method:"generic",params:{action:t,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null;const n=(0,h.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,r),null===t||void 0===t||t()};return new Promise(((i,s)=>{t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(n,(e=>{if(null===t||void 0===t||t(),(0,a.isErrorResponse)(e))return s(new Error(e.errorMessage));i(e)})),this.publishWeb3RequestEvent(n,e)}))}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e}publishWeb3RequestEvent(e,t){const n={type:"WEB3_REQUEST",id:e,request:t};this.publishEvent("Web3Request",n,!0).then((e=>{})).catch((e=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n.id,response:{method:t.method,errorMessage:e.message}})})),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(t.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof u.WLMobileRelayUI)switch(e){case"requestEthereumAccounts":case"switchEthereumChain":return;default:window.addEventListener("blur",(()=>{window.addEventListener("focus",(()=>{this.connection.checkUnseenEvents()}),{once:!0})}),{once:!0}),this.ui.openCoinbaseWalletDeeplink()}}publishWeb3RequestCanceledEvent(e){const t={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",t,!1).then()}publishEvent(e,t,n){return this.connection.publishEvent(e,t,n)}handleWeb3ResponseMessage(e){const{response:t}=e;if("requestEthereumAccounts"===t.method)return f.accountRequestCallbackIds.forEach((t=>this.invokeCallback(Object.assign(Object.assign({},e),{id:t})))),void f.accountRequestCallbackIds.clear();this.invokeCallback(e)}handleErrorResponse(e,t,n){var r;const i=null!==(r=null===n||void 0===n?void 0:n.message)&&void 0!==r?r:"Unspecified error message.";this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:t,errorMessage:i}})}invokeCallback(e){const t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},t=(0,h.randomBytesHex)(8);return new Promise(((n,r)=>{this.relayEventManager.callbacks.set(t,(e=>{if((0,a.isErrorResponse)(e))return r(new Error(e.errorMessage));n(e)})),f.accountRequestCallbackIds.add(t),this.publishWeb3RequestEvent(t,e)}))}watchAsset(e,t,n,r,i,s){const o={method:"watchAsset",params:{type:e,options:{address:t,symbol:n,decimals:r,image:i},chainId:s}};let c=null;const l=(0,h.randomBytesHex)(8),u=e=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,o.method,e),null===c||void 0===c||c()};return c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}),new Promise(((e,t)=>{this.relayEventManager.callbacks.set(l,(n=>{if(null===c||void 0===c||c(),(0,a.isErrorResponse)(n))return t(new Error(n.errorMessage));e(n)})),this.publishWeb3RequestEvent(l,o)}))}addEthereumChain(e,t,n,r,i,s){const o={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:s}};let c=null;const l=(0,h.randomBytesHex)(8),u=e=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,o.method,e),null===c||void 0===c||c()};return c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}),new Promise(((e,t)=>{this.relayEventManager.callbacks.set(l,(n=>{if(null===c||void 0===c||c(),(0,a.isErrorResponse)(n))return t(new Error(n.errorMessage));e(n)})),this.publishWeb3RequestEvent(l,o)}))}switchEthereumChain(e,t){const n={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:t})},r=(0,h.randomBytesHex)(8);return new Promise(((e,t)=>{this.relayEventManager.callbacks.set(r,(n=>(0,a.isErrorResponse)(n)&&n.errorCode?t(d.standardErrors.provider.custom({code:n.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):(0,a.isErrorResponse)(n)?t(new Error(n.errorMessage)):void e(n))),this.publishWeb3RequestEvent(r,n)}))}}t.WalletLinkRelay=f,f.accountRequestCallbackIds=new Set},7316:(e,t,n)=>{"use strict";
5511Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=void 0;const r=n(4464),i=n(8035),s=n(1195),o=n(1115);t.serializeError=function(e,t){const n=(0,o.serialize)(function(e){if("string"===typeof e)return{message:e,code:s.standardErrorCodes.rpc.internal};if((0,r.isErrorResponse)(e))return Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}});return e}(e),{shouldIncludeStack:!0}),a=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");a.searchParams.set("version",i.LIB_VERSION),a.searchParams.set("code",n.code.toString());const c=function(e,t){const n=null===e||void 0===e?void 0:e.method;if(n)return n;if(void 0===t)return;if("string"===typeof t)return t;if(!Array.isArray(t))return t.method;if(t.length>0)return t[0].method;return}(n.data,t);return c&&a.searchParams.set("method",c),a.searchParams.set("message",n.message),Object.assign(Object.assign({},n),{docUrl:a.href})}},7386:(e,t,n)=>{"use strict";n.d(t,{oU:()=>m,rL:()=>c,t$:()=>h,TC:()=>f,LX:()=>l,Se:()=>d,Fk:()=>p,o_:()=>g});var r=n(4159),i=n(3856),s=n(7609),o=n(111);r.extend(s),r.extend(o);const a={...i,name:"en-web3-modal",relativeTime:{future:"in %s",past:"%s ago",s:"%d sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}};r.locale("en-web3-modal",a);const c={getYear(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(new Date).toISOString();return r(e).year()},getRelativeDateFromNow:e=>r(e).locale("en-web3-modal").fromNow(!0),formatDate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DD MMM";return r(e).format(t)}},l={caipNetworkIdToNumber:e=>e?Number(e.split(":")[1]):void 0};var u=n(554);const d={bigNumber:e=>new u.A(e),multiply(e,t){if(void 0===e||void 0===t)return(0,u.A)(0);const n=new u.A(e),r=new u.A(t);return n.multipliedBy(r)},formatNumberToLocalString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return void 0===e?"0.00":"number"===typeof e?e.toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t}):parseFloat(e).toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t})}},h={numericInputKeyDown(e,t,n){const r=e.metaKey||e.ctrlKey,i="a"===e.key||"A"===e.key,s="c"===e.key||"C"===e.key,o="v"===e.key||"V"===e.key,a="x"===e.key||"X"===e.key,c=","===e.key,l="."===e.key,u=e.key>="0"&&e.key<="9";!r&&(i||s||o||a)&&e.preventDefault(),"0"!==t||c||l||"0"!==e.key||e.preventDefault(),"0"===t&&u&&(n(e.key),e.preventDefault()),(c||l)&&(t||(n("0."),e.preventDefault()),(t?.includes(".")||t?.includes(","))&&e.preventDefault()),u||["Backspace","Meta","Ctrl","a","A","c","C","x","X","v","V","ArrowLeft","ArrowRight","Tab"].includes(e.key)||l||c||e.preventDefault()}},p=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],f={URLS:{FAQ:"https://walletconnect.com/faq"}}
5511,m={WC_NAME_SUFFIX:".wcn.id",WC_NAMES_ALLOWED_DOMAINS:["walletconnect.com"]};function g(e,t){return"light"===t?{"--w3m-accent":e?.["--w3m-accent"]||"hsla(231, 100%, 70%, 1)","--w3m-background":"#fff"}:{"--w3m-accent":e?.["--w3m-accent"]||"hsla(230, 100%, 67%, 1)","--w3m-background":"#121313"}}},7404:(e,t,n)=>{const r=n(3979),i=n(794);function s(e){this.mode=i.BYTE,"string"===typeof e&&(e=r(e)),this.data=new Uint8Array(e)}s.getBitsLength=function(e){return 8*e},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=s},7544:(e,t,n)=>{"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=l;var i=n(3230),s=n(4306);n(1596)(l,i);for(var o=r(s.prototype),a=0;a<o.length;a++){var c=o[a];l.prototype[c]||(l.prototype[c]=s.prototype[c])}function l(e){if(!(this instanceof l))return new l(e);i.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||process.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},7594:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<<t|e>>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},7609:function(e){e.exports=function(){"use strict";return function(e,t,n){e=e||{};var r=t.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function s(e,t,n,i){return r.fromToBase(e,t,n,i)}n.en.relativeTime=i,r.fromToBase=function(t,r,s,o,a){for(var c,l,u,d=s.$locale().relativeTime||i,h=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],p=h.length,f=0;f<p;f+=1){var m=h[f];m.d&&(c=o?n(t).diff(s,m.d,!0):s.diff(t,m.d,!0));var g=(e.rounding||Math.round)(Math.abs(c));if(u=c>0,g<=m.r||!m.r){g<=1&&f>0&&(m=h[f-1]);var y=d[m.l];a&&(g=a(""+g)),l="string"==typeof y?y.replace("%d",g):y(g,r,m.l,u);break}}if(r)return l;var v=u?d.future:d.past;return"function"==typeof v?v(l):v.replace("%s",l)},r.to=function(e,t){return s(e,t,this,!0)},r.from=function(e,t){return s(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}}()},7614:e=>{"use strict";var t={};function n(e,n,r){r||(r=Error);var i=function(e){var t,r;function i(t,r,i){return e.call(this,function(e,t,r){return"string"===typeof n?n:n(e,t,r)}(t,r,i))||this}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=e,t[e]=i}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invali
5511d for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,s,o,a;if("string"===typeof t&&(s="not ",t.substr(!o||o<0?0:+o,s.length)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(r(t,"type"));else{var c=function(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(r(t,"type"))}return a+=". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},7737:(e,t,n)=>{"use strict";var r=n(9950);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},s=r.useState,o=r.useEffect,a=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(r){return!0}}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=s({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return a((function(){i.value=n,i.getSnapshot=t,l(i)&&u({inst:i})}),[e,n,t]),o((function(){return l(i)&&u({inst:i}),e((function(){l(i)&&u({inst:i})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},7817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchSignerType=t.storeSignerType=t.loadSignerType=void 0;const r=n(2468),i=n(8582),s="SignerType",o=new i.ScopedLocalStorage("CBWSDK","SignerConfigurator");t.loadSignerType=function(){return o.getItem(s)},t.storeSignerType=function(e){o.setItem(s,e)},t.fetchSignerType=async function(e){const{communicator:t,metadata:n}=e;(async function(e,t){await e.onMessage((e=>{let{event:t}=e;return"WalletLinkSessionRequest"===t}));const n=new r.WalletLinkSigner({metadata:t});e.postMessage({event:"WalletLinkUpdate",data:{session:n.getSession()}}),await n.handshake(),e.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})})(t,n).catch((()=>{}));const i={id:crypto.randomUUID(),event:"selectSignerType",data:e.preference},{data:s}=await t.postRequestAndWaitForResponse(i);return s}},7832:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletSDK=void 0;const r=n(2390),i=n(3451),s=n(8582),o=n(8035),a=n(8114),c=n(9631);t.CoinbaseWalletSDK=class{constructor(e){this.metadata={appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||(0,a.getFavicon)(),appChainIds:e.appChainIds||[]},this.storeLatestVersion()}makeWeb3Provider(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{options:"all"};var t;const n={metadata:this.metadata,preference:e};return null!==(t=(0,c.getCoinbaseInjectedProvider)(n))&&void 0!==t?t:new i.CoinbaseWalletProvider(n)}getCoinbaseWalletLogo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:240;return(0,r.walletLogo)(e,t)}storeLatestVersion(){new s.ScopedLocalStorage("CBWSDK").setItem("VERSION",o.LIB_VERSION)}}},7958:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkCipher=void 0;const r=n(8114);t.WalletLinkCipher=class{constructor(e){this.secret=e}async encrypt(e){const t=this.secret;if(64!==t.length)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,r.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,s.encode(e)),a=o.slice(o.byteLength-16),c=o.slice(0,o.byteLength-16),l=new Uint8Array(a),u=new Uint8Array(c),d=new Uint8Array([...n,...l,...u]);return(0,r.uint8ArrayToHex)(d)}async decrypt(e){const t=this.secret;if(64!==t.length)throw Error("secret must be 256 bits");return new Promise(((n,i)=>{!async function(){const s=await crypto.subtle.importKey("raw",(0,r.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,r.hexStringToUint8Array)(e),a=o.slice(0,12),c=o.slice(12,28),l=o.slice(28),u=new Uint8Array([...l,...c]),d={name:"AES-GCM",iv:new Uint8Array(a)};try{const e=await window.crypto.subtle.decrypt(d,s,u),t=new TextDecoder;n(t.decode(e))}catch(h){i(h)}}()}))}}},7997:(e,t)=>{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case s:case a:case o:case p:return e;default:switch(e=e&&e.$$typeof){case l:case h:case g:case m:case c:return e;default:return t}}case i:return t}}}function E(e){return x(e)===d}t.isFragment=function(e){return x(e)===s},t.isMemo=function(e){return x(e)===m}}
5511,8e3:(e,t,n)=>{var r=e.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};r.sha=n(4662),r.sha1=n(5899),r.sha224=n(2824),r.sha256=n(2541),r.sha384=n(5545),r.sha512=n(920)},8007:e=>{e.exports=function(){return"function"===typeof Promise&&Promise.prototype&&Promise.prototype.then}},8021:(e,t,n)=>{const r=n(8007),i=n(487),s=n(2237),o=n(4370);function a(e,t,n,s,o){const a=[].slice.call(arguments,1),c=a.length,l="function"===typeof a[c-1];if(!l&&!r())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=t,t=s=void 0):2!==c||t.getContext||(s=n,n=t,t=void 0),new Promise((function(r,o){try{const o=i.create(n,s);r(e(o,t,s))}catch(a){o(a)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(o=n,n=t,t=s=void 0):3===c&&(t.getContext&&"undefined"===typeof o?(o=s,s=void 0):(o=s,s=n,n=t,t=void 0));try{const r=i.create(n,s);o(null,e(r,t,s))}catch(u){o(u)}}t.create=i.create,t.toCanvas=a.bind(null,s.render),t.toDataURL=a.bind(null,s.renderToDataURL),t.toString=a.bind(null,(function(e,t,n){return o.render(e,n)}))},8023:()=>{},8035:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LIB_VERSION=void 0,t.LIB_VERSION="4.0.0"},8114:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.areAddressArraysEqual=t.getFavicon=t.range=t.isBigNumber=t.ensureParsedJSONObject=t.ensureBigInt=t.ensureRegExpString=t.ensureIntNumber=t.ensureBuffer=t.ensureAddressString=t.ensureEvenLengthHexString=t.ensureHexString=t.isHexString=t.prepend0x=t.strip0x=t.has0xPrefix=t.hexStringFromIntNumber=t.intNumberFromHexString=t.bigIntStringFromBigInt=t.hexStringFromBuffer=t.hexStringToUint8Array=t.uint8ArrayToHex=t.randomBytesHex=void 0;const r=n(5722),i=n(168),s=/^[0-9]*$/,o=/^[a-f0-9]*$/;function a(e){return[...e].map((e=>e.toString(16).padStart(2,"0"))).join("")}function c(e){return e.startsWith("0x")||e.startsWith("0X")}function l(e){return c(e)?e.slice(2):e}function u(e){return c(e)?`0x${e.slice(2)}`:`0x${e}`}function d(e){if("string"!==typeof e)return!1;const t=l(e).toLowerCase();return o.test(t)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"===typeof e){const n=l(e).toLowerCase();if(o.test(n))return(0,i.HexString)(t?`0x${n}`:n)}throw r.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}function p(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=h(e,!1);return n.length%2===1&&(n=(0,i.HexString)(`0${n}`)),t?(0,i.HexString)(`0x${n}`):n}function f(e){if("number"===typeof e&&Number.isInteger(e))return(0,i.IntNumber)(e);if("string"===typeof e){if(s.test(e))return(0,i.IntNumber)(Number(e));if(d(e))return(0,i.IntNumber)(Number(BigInt(p(e,!0))))}throw r.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}function m(e){if(null==e||"function"!==typeof e.constructor)return!1;const{constructor:t}=e;return"function"===typeof t.config&&"number"===typeof t.EUCLID}t.randomBytesHex=function(e){return a(crypto.getRandomValues(new Uint8Array(e)))},t.uint8ArrayToHex=a,t.hexStringToUint8Array=function(e){return new Uint8Array(e.match(/.{1,2}/g).map((e=>parseInt(e,16))))},t.hexStringFromBuffer=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.toString("hex");return(0,i.HexString)(t?`0x${n}`:n)},t.bigIntStringFromBigInt=function(e){return(0,i.BigIntString)(e.toString(10))},t.intNumberFromHexString=function(e){return(0,i.IntNumber)(Number(BigInt(p(e,!0))))},t.hexStringFromIntNumber=function(e){return(0,i.HexString)(`0x${BigInt(e).toString(16)}`)},t.has0xPrefix=c,t.strip0x=l,t.prepend0x=u,t.isHexString=d,t.ensureHexString=h,t.ensureEvenLengthHexString=p,t.ensureAddressString=function(e){if("string"===typeof e){const t=l(e).toLowerCase();if(d(t)&&40===t.length)return(0,i.AddressString)(u(t))}throw r.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)},t.ensureBuffer=function(e){if(Buffer.isBuffer(e))return e;if("string"===typeof e){if(d(e)){const t=p(e,!1);return Buffer.from(t,"hex")}return Buffer.from(e,"utf8")}throw r.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)},t.ensureIntNumber=f,t.ensureRegExpString=function(e){if(e instanceof RegExp)return(0,i.RegExpString)(e.toString());throw r.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)},t.ensureBigInt=function(e){if(null!==e&&("bigint"===typeof e||m(e)))return BigInt(e.toString(10));if("number"===typeof e)return BigInt(f(e));if("string"===typeof e){if(s.test(e))return BigInt(e);if(d(e))return BigInt(p(e,!0))}throw r.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)},t.ensureParsedJSONObject=function(e){if("string"===typeof e)return JSON.parse(e);if("object"===typeof e)return e;throw r.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)},t.isBigNumber=m,t.range=function(e,t){return Array.from({length:t-e},((t,n)=>e+n))},t.getFavicon=function(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:n}=document.location,r=e?e.getAttribute("href"):null;return!r||r.startsWith("javascript:")||r.startsWith("vbscript:")?null:r.startsWith("http://")||r.startsWith("https://")||r.startsWith("data:")?r:r.startsWith("//")?t+r:`${t}//${n}${r}`},t.areAddressArraysEqual=function(e,t){return e.length===t.length&&e.every(((e,n)=>e===t[n]))}},8166:(e,t,n)=>{"use strict";var r=n(3310),i=n(5070);t.On=32,t.cS=64;var s=function(){function e(){this.digestLength=t.On,this.blockSize=t.cS,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._temp),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=a(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,n=this._bufferLength,i=t/536870912|0,s=t<<3,o=t%64<56?64:128;this._buffer[n]=128;for(var c=n+1;c<o-8;c++)this._buffer[c]=0;r.writeUint32BE(i,this._buffer,o-8),r.writeUint32BE(s,this._buffer,o-4),a(this._temp,this._state,this._buffer,0,o),this._finished=!0}for(c=0;c<this.digestLength/4;c++)r.writeUint32BE(this._state[c],e,4*c);return this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.state),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.aD=s;var o=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
5511734187,3204031479,3329325298]);function a(e,t,n,i,s){for(;s>=64;){for(var a=t[0],c=t[1],l=t[2],u=t[3],d=t[4],h=t[5],p=t[6],f=t[7],m=0;m<16;m++){var g=i+4*m;e[m]=r.readUint32BE(n,g)}for(m=16;m<64;m++){var y=e[m-2],v=(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10,w=((y=e[m-15])>>>7|y<<25)^(y>>>18|y<<14)^y>>>3;e[m]=(v+e[m-7]|0)+(w+e[m-16]|0)}for(m=0;m<64;m++){v=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&p)|0)+(f+(o[m]+e[m]|0)|0)|0,w=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&c^a&l^c&l)|0;f=p,p=h,h=d,d=u+v|0,u=l,l=c,c=a,a=v+w|0}t[0]+=a,t[1]+=c,t[2]+=l,t[3]+=u,t[4]+=d,t[5]+=h,t[6]+=p,t[7]+=f,i+=64,s-=64}return i}t.tW=function(e){var t=new s;t.update(e);var n=t.digest();return t.clean(),n}},8172:(e,t,n)=>{"use strict";var r=n(7614).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,s){if("function"===typeof n)return e(t,null,n);n||(n={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(s||i);var o=n.readable||!1!==n.readable&&t.readable,a=n.writable||!1!==n.writable&&t.writable,c=function(){t.writable||u()},l=t._writableState&&t._writableState.finished,u=function(){a=!1,l=!0,o||s.call(t)},d=t._readableState&&t._readableState.endEmitted,h=function(){o=!1,d=!0,a||s.call(t)},p=function(e){s.call(t,e)},f=function(){var e;return o&&!d?(t._readableState&&t._readableState.ended||(e=new r),s.call(t,e)):a&&!l?(t._writableState&&t._writableState.ended||(e=new r),s.call(t,e)):void 0},m=function(){t.req.on("finish",u)};return!function(e){return e.setHeader&&"function"===typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",c),t.on("close",c)):(t.on("complete",u),t.on("abort",f),t.req?m():t.on("request",m)),t.on("end",h),t.on("finish",u),!1!==n.error&&t.on("error",p),t.on("close",f),function(){t.removeListener("complete",u),t.removeListener("abort",f),t.removeListener("request",m),t.req&&t.req.removeListener("finish",u),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("end",h),t.removeListener("error",p),t.removeListener("close",f)}}},8224:(e,t,n)=>{"use strict";n.r(t),n.d(t,{W3mModal:()=>u});var r=n(5718),i=n(4263),s=n(1939),o=n(6884);const a=s.AH` 5512 :host { 5513 z-index: var(--w3m-z-index); 5514 display: block; 5515 backface-visibility: hidden; 5516 will-change: opacity; 5517 position: fixed; 5518 top: 0; 5519 left: 0; 5520 right: 0; 5521 bottom: 0; 5522 pointer-events: none; 5523 opacity: 0; 5524 background-color: var(--wui-cover); 5525 transition: opacity 0.2s var(--wui-ease-out-power-2); 5526 will-change: opacity; 5527 } 5528 5529 :host(.open) { 5530 opacity: 1; 5531 } 5532 5533 @keyframes zoom-in { 5534 0% { 5535 transform: scale(0.95) translateY(0); 5536 } 5537 100% { 5538 transform: scale(1) translateY(0); 5539 } 5540 } 5541 5542 @keyframes slide-in { 5543 0% { 5544 transform: scale(1) translateY(50px); 5545 } 5546 100% { 5547 transform: scale(1) translateY(0); 5548 } 5549 } 5550 5551 wui-card { 5552 max-width: var(--w3m-modal-width); 5553 width: 100%; 5554 position: relative; 5555 animation-duration: 0.2s; 5556 animation-name: zoom-in; 5557 animation-fill-mode: backwards; 5558 animation-timing-function: var(--wui-ease-out-power-2); 5559 outline: none; 5560 } 5561 5562 wui-flex { 5563 overflow-x: hidden; 5564 overflow-y: auto; 5565 display: flex; 5566 align-items: center; 5567 justify-content: center; 5568 width: 100%; 5569 height: 100%; 5570 } 5571 5572 @media (max-height: 700px) and (min-width: 431px) { 5573 wui-flex { 5574 align-items: flex-start; 5575 } 5576 5577 wui-card { 5578 margin: var(--wui-spacing-xxl) 0px; 5579 } 5580 } 5581 5582 @media (max-width: 430px) { 5583 wui-flex { 5584 align-items: flex-end; 5585 } 5586 5587 wui-card { 5588 max-width: 100%; 5589 border-bottom-left-radius: 0; 5590 border-bottom-right-radius: 0; 5591 border-bottom: none; 5592 animation-name: slide-in; 5593 } 5594 } 5595`;var c=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};const l="scroll-lock";let u=class extends s.WF{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.open=r.W3.state.open,this.caipAddress=r.Uj.state.caipAddress,this.isSiweEnabled=r.Hd.state.isSiweEnabled,this.connected=r.Uj.state.isConnected,this.loading=r.W3.state.loading,this.initializeTheming(),r.Np.prefetch(),this.unsubscribe.push(r.W3.subscribeKey("open",(e=>e?this.onOpen():this.onClose())),r.W3.subscribeKey("loading",(e=>{this.loading=e,this.onNewAddress(r.Uj.state.caipAddress)})),r.Uj.subscribeKey("isConnected",(e=>this.connected=e)),r.Uj.subscribeKey("caipAddress",(e=>this.onNewAddress(e))),r.Hd.subscribeKey("isSiweEnabled",(e=>this.isSiweEnabled=e))),r.En.sendEvent({type:"track",event:"MODAL_LOADED"})}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),this.onRemoveKeyboardListener()}render(){return this.open?s.qy` 5596 <wui-flex @click=${this.onOverlayClick.bind(this)}> 5597 <wui-card role="alertdialog" aria-modal="true" tabindex="0"> 5598 <w3m-header></w3m-header> 5599 <w3m-router></w3m-router> 5600 <w3m-snackbar></w3m-snackbar> 5601 </wui-card> 5602 </wui-flex> 5603 <w3m-tooltip></w3m-tooltip> 5604 `:null}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){if(this.isSiweEnabled){const{SIWEController:e}=await n.e(851).then(n.bind(n,4851));"success"!==e.state.status&&await r.x4.disconnect()}r.W3.close()}initializeTheming(){const{themeVariables:e,themeMode:t}=r.Wn.state,n=i.UiHelperUtil.getColorTheme(t);(0,i.initializeTheming)(e,n)}onClose(){this.open=!1,this.classList.remove("open"),this.onScrollUnlock(),r.Pt.hide(),this.onRemoveKeyboardListener()}onOpen(){this.open=!0,this.classList.add("open"),this.onScrollLock(),this.onAddKeyboardListener()}onScrollLock(){const e=document.createElement("style");e.dataset.w3m=l,e.textContent="\n html, body {\n touch-action: none;\n overflow: hidden;\n overscroll-behavior: contain;\n }\n w3m-modal {\n pointer-events: auto;\n }\n ",document.head.appendChild(e)}onScrollUnlock(){const e=document.head.querySelector(`style[data-w3m="${l}"]`);e&&e.remove()}onAddKeyboardListener(){this.abortController=new AbortController;const e=this.shadowRoot?.querySelector("wui-card");e?.focus(),window.addEventListener("keydown",(t=>{if("Escape"===t.key)this.handleClose();else if("Tab"===t.key){const{tagName:n}=t.target;!n||n.includes("W3M-")||n.includes("WUI-")||e?.focus()}}),this.abortController)}onRemoveKeyboardListener(){this.abortController?.abort(),this.abortController=void 0}async onNewAddress(e){if(!this.connected||this.loading)return;const t=r.wE.getPlainAddress(this.caipAddress),i=r.wE.getPlainAddress(e),s=r.wE.getNetworkId(this.caipAddress),o=r.wE.getNetworkId(e);if(this.caipAddress=e,this.isSiweEnabled){const{SIWEController:e}=await n.e(851).then(n.bind(n,4851)),r=await e.getSession();if(r&&t&&i&&t!==i)return void(e.state._client?.options.signOutOnAccountChange&&(await e.signOut(),this.onSiweNavigation()));if(r&&s&&o&&s!==o)return void(e.state._client?.options.signOutOnNetworkChange&&(await e.signOut(),this.onSiweNavigation()));this.onSiweNavigation()}}onSiweNavigation(){this.open?r.IN.push("ConnectingSiwe"):r.W3.open({view:"ConnectingSiwe"})}};u.styles=a,c([(0,o.wk)()],u.prototype,"open",void 0),c([(0,o.wk)()],u.prototype,"caipAddress",void 0),c([(0,o.wk)()],u.prototype,"isSiweEnabled",void 0),c([(0,o.wk)()],u.prototype,"connected",void 0),c([(0,o.wk)()],u.prototype,"loading",void 0),u=c([(0,i.customElement)("w3m-modal")],u)},8316:(e,t,n)=>{const r=n(7198),i=n(494),s={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},o={encodeData(e,t,n){let s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const o=["bytes32"],a=[this.hashType(e,n)];if(s){const c=(e,t,o)=>{if(void 0!==n[t])return["bytes32",null==o?"0x0000000000000000000000000000000000000000000000000000000000000000":r.keccak(this.encodeData(t,o,n,s))];if(void 0===o)throw new Error(`missing value for field ${e} of type ${t}`);if("bytes"===t)return["bytes32",r.keccak(o)];if("string"===t)return"string"===typeof o&&(o=Buffer.from(o,"utf8")),["bytes32",r.keccak(o)];if(t.lastIndexOf("]")===t.length-1){const n=t.slice(0,t.lastIndexOf("[")),s=o.map((t=>c(e,n,t)));return["bytes32",r.keccak(i.rawEncode(s.map((e=>{let[t]=e;return t})),s.map((e=>{let[,t]=e;return t}))))]}return[t,o]};for(const r of n[e]){const[e,n]=c(r.name,r.type,t[r.name]);o.push(e),a.push(n)}}else for(const i of n[e]){let e=t[i.name];
5604if(void 0!==e)if("bytes"===i.type)o.push("bytes32"),e=r.keccak(e),a.push(e);else if("string"===i.type)o.push("bytes32"),"string"===typeof e&&(e=Buffer.from(e,"utf8")),e=r.keccak(e),a.push(e);else if(void 0!==n[i.type])o.push("bytes32"),e=r.keccak(this.encodeData(i.type,e,n,s)),a.push(e);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");o.push(i.type),a.push(e)}}return i.rawEncode(o,a)},encodeType(e,t){let n="",r=this.findTypeDependencies(e,t).filter((t=>t!==e));r=[e].concat(r.sort());for(const i of r){if(!t[i])throw new Error("No type definition specified: "+i);n+=i+"("+t[i].map((e=>{let{name:t,type:n}=e;return n+" "+t})).join(",")+")"}return n},findTypeDependencies(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e=e.match(/^\w*/)[0],n.includes(e)||void 0===t[e])return n;n.push(e);for(const r of t[e])for(const e of this.findTypeDependencies(r.type,t,n))!n.includes(e)&&n.push(e);return n},hashStruct(e,t,n){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return r.keccak(this.encodeData(e,t,n,i))},hashType(e,t){return r.keccak(this.encodeType(e,t))},sanitizeData(e){const t={};for(const n in s.properties)e[n]&&(t[n]=e[n]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.sanitizeData(e),i=[Buffer.from("1901","hex")];return i.push(this.hashStruct("EIP712Domain",n.domain,n.types,t)),"EIP712Domain"!==n.primaryType&&i.push(this.hashStruct(n.primaryType,n.message,n.types,t)),r.keccak(Buffer.concat(i))}};e.exports={TYPED_MESSAGE_SCHEMA:s,TypedDataUtils:o,hashForSignTypedDataLegacy:function(e){return function(e){const t=new Error("Expect argument to be non-empty array");if("object"!==typeof e||!e.length)throw t;const n=e.map((function(e){return"bytes"===e.type?r.toBuffer(e.value):e.value})),s=e.map((function(e){return e.type})),o=e.map((function(e){if(!e.name)throw t;return e.type+" "+e.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(e.length).fill("string"),o),i.soliditySHA3(s,n)])}(e.data)},hashForSignTypedData_v3:function(e){return o.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return o.hash(e.data)}}},8345:(e,t,n)=>{"use strict";var r=n(9950),i=n(5340);function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,a={};function c(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(a[e]=t,e=0;e<t.length;e++)o.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},f={};function m(e,t,n,r,i,s,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)}
vendor: 34,168 bytes, line 5604
5604)),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function w(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,v);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),E=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),S=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var O=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function j(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=M&&e[M]||e["@@iterator"])?e:null}var L,D=Object.assign;function B(e){if(void 0===L)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return"\n"+L+e}var U=!1;function F(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var i=l.stack.split("\n"),s=r.stack.split("\n"),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(1!==o||1!==a)do{if(o--,0>--a||i[o]!==s[a]){var c="\n"+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=o&&0<=a);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?B(e):""}function $(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=F(e.type,!1);case 11:return e=F(e.type.render,!1);case 1:return e=F(e.type,!0);default:return""}}function z(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case _:return"Fragment";case E:return"Portal";case C:return"Profiler";case k:return"StrictMode";case T:return"Suspense";case P:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case S:return(e.displayName||"Context")+".Consumer";case A:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(t=e.displayName||null)?t:z(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return z(e(t))}catch(n){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return z(t);case 8:return t===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function V(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,s.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return D({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Q(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function J(e,t){Q(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function X(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&K(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(s(91));return D({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(s(92));if(te(n)){if(1<n.length)throw Error(s(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function se(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ce(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var le,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((le=le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(pe).forEach((function(e){fe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ye=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(s(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(s(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(s(62))}}function we(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ee=null,_e=null,ke=null;function Ce(e){if(e=wi(e)){if("function"!==typeof Ee)throw Error(s(280));var t=e.stateNode;t&&(t=xi(t),Ee(e.stateNode,e.type,t))}}function Ae(e){_e?ke?ke.push(e):ke=[e]:_e=e}function Se(){if(_e){var e=_e,t=ke;if(ke=_e=null,Ce(e),t)for(e=0;e<t.length;e++)Ce(t[e])}}function Ie(e,t){return e(t)}function Te(){}var Pe=!1;function Ne(e,t,n){if(Pe)return e(t,n);Pe=!0;try{return Ie(e,t,n)}finally{Pe=!1,(null!==_e||null!==ke)&&(Te(),Se())}}function Re(e,t){var n=e.stateNode;if(null===n)return null;var r=xi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(s(231,t,typeof n));return n}var Oe=!1;if(u)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Oe=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ue){Oe=!1}function je(e,t,n,r,i,s,o,a,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(u){this.onError(u)}}var Le=!1,De=null,Be=!1,Ue=null,Fe={onError:function(e){Le=!0,De=e}};function $e(e,t,n,r,i,s,o,a,c){Le=!1,De=null,je.apply(Fe,arguments)}function ze(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function He(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function We(e){if(ze(e)!==e)throw Error(s(188))}function qe(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=ze(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return We(i),e;if(o===r)return We(i),t;o=o.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,c=i.child;c;){if(c===n){a=!0,n=i,r=o;break}if(c===r){a=!0,r=i,n=o;break}c=c.sibling}if(!a){for(c=o.child;c;){if(c===n){a=!0,n=o,r=i;break}if(c===r){a=!0,r=o,n=i;break}c=c.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(e))?Ve(e):null}function Ve(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ve(e);if(null!==t)return t;e=e.sibling}return null}var Ge=i.unstable_scheduleCallback,Ke=i.unstable_cancelCallback,Ze=i.unstable_shouldYield,Ye=i.unstable_requestPaint,Qe=i.unstable_now,Je=i.unstable_getCurrentPriorityLevel,Xe=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,st=null;var ot=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(at(e)/ct|0)|0},at=Math.log,ct=Math.LN2;var lt=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=268435455&n;if(0!==o){var a=o&~i;0!==a?r=dt(a):0!==(s&=o)&&(r=dt(s))}else 0!==(o=n&~i)?r=dt(o):0!==s&&(r=dt(s));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(s=t&-t)||16===i&&0!==(4194240&s)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-ot(t)),r|=e[n],t&=~i;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=lt;return 0===(4194240&(lt<<=1))&&(lt=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var wt=0;function bt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var xt,Et,_t,kt,Ct,At=!1,St=[],It=null,Tt=null,Pt=null,Nt=new Map,Rt=new Map,Ot=[],Mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function jt(e,t){switch(e){case"focusin":case"focusout":It=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":Nt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rt.delete(t.pointerId)}}function Lt(e,t,n,r,i,s){return null===e||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},null!==t&&(null!==(t=wi(t))&&Et(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Dt(e){var t=vi(e.target);if(null!==t){var n=ze(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void Ct(e.priority,(function(){_t(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=wi(n))&&Et(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);be=r,n.target.dispatchEvent(r),be=null,t.shift()}return!0}function Ut(e,t,n){Bt(e)&&n.delete(t)}function Ft(){At=!1,null!==It&&Bt(It)&&(It=null),null!==Tt&&Bt(Tt)&&(Tt=null),null!==Pt&&Bt(Pt)&&(Pt=null),Nt.forEach(Ut),Rt.forEach(Ut)}function $t(e,t){e.blockedOn===t&&(e.blockedOn=null,At||(At=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ft)))}function zt(e){function t(t){return $t(t,e)}if(0<St.length){$t(St[0],e);for(var n=1;n<St.length;n++){var r=St[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==It&&$t(It,e),null!==Tt&&$t(Tt,e),null!==Pt&&$t(Pt,e),Nt.forEach(t),Rt.forEach(t),n=0;n<Ot.length;n++)(r=Ot[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Ot.length&&null===(n=Ot[0]).blockedOn;)Dt(n),null===n.blockedOn&&Ot.shift()}var Ht=b.ReactCurrentBatchConfig,Wt=!0;function qt(e,t,n,r){var i=wt,s=Ht.transition;Ht.transition=null;try{wt=1,Gt(e,t,n,r)}finally{wt=i,Ht.transition=s}}function Vt(e,t,n,r){var i=wt,s=Ht.transition;Ht.transition=null;try{wt=4,Gt(e,t,n,r)}finally{wt=i,Ht.transition=s}}function Gt(e,t,n,r){if(Wt){var i=Zt(e,t,n,r);if(null===i)Wr(e,t,r,Kt,n),jt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return It=Lt(It,e,t,n,r,i),!0;case"dragenter":return Tt=Lt(Tt,e,t,n,r,i),!0;case"mouseover":return Pt=Lt(Pt,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Nt.set(s,Lt(Nt.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Rt.set(s,Lt(Rt.get(s)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(jt(e,r),4&t&&-1<Mt.indexOf(e)){for(;null!==i;){var s=wi(i);if(null!==s&&xt(s),null===(s=Zt(e,t,n,r))&&Wr(e,t,r,Kt,n),s===i)break;i=s}null!==i&&r.stopPropagation()}else Wr(e,t,r,null,n)}}var Kt=null;function Zt(e,t,n,r){if(Kt=null,null!==(e=vi(e=xe(r))))if(null===(t=ze(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Kt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Xe:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Qt=null,Jt=null,Xt=null;function en(){if(Xt)return Xt;var e,t,n=Jt,r=n.length,i="value"in Qt?Qt.value:Qt.textContent,s=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[s-t];t++);return Xt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function sn(e){function t(t,n,r,i,s){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,an,cn,ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=sn(ln),dn=D({},ln,{view:0,detail:0}),hn=sn(dn),pn=D({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cn&&(cn&&"mousemove"===e.type?(on=e.screenX-cn.screenX,an=e.screenY-cn.screenY):an=on=0,cn=e),on)},movementY:function(e){return"movementY"in e?e.movementY:an}}),fn=sn(pn),mn=sn(D({},pn,{dataTransfer:0})),gn=sn(D({},dn,{relatedTarget:0})),yn=sn(D({},ln,{animationName:0,elapsedTime:0,pseudoElement:0})),vn=D({},ln,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wn=sn(vn),bn=sn(D({},ln,{data:0})),xn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},En={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function Cn(){return kn}var An=D({},dn,{key:function(e){if(e.key){var t=xn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?En[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Sn=sn(An),In=sn(D({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=sn(D({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),Pn=sn(D({},ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=D({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=sn(Nn),On=[9,13,27,32],Mn=u&&"CompositionEvent"in window,jn=null;u&&"documentMode"in document&&(jn=document.documentMode);var Ln=u&&"TextEvent"in window&&!jn,Dn=u&&(!Mn||jn&&8<jn&&11>=jn),Bn=String.fromCharCode(32),Un=!1;function Fn(e,t){switch(e){case"keyup":return-1!==On.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $n(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var zn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function qn(e,t,n,r){Ae(r),0<(t=Vr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,Gn=null;function Kn(e){Br(e,0)}function Zn(e){if(G(bi(e)))return e}function Yn(e,t){if("change"===e)return t}var Qn=!1;if(u){var Jn;if(u){var Xn="oninput"in document;if(!Xn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Xn="function"===typeof er.oninput}Jn=Xn}else Jn=!1;Qn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){Vn&&(Vn.detachEvent("onpropertychange",nr),Gn=Vn=null)}function nr(e){if("value"===e.propertyName&&Zn(Gn)){var t=[];qn(t,Gn,e,xe(e)),Ne(Kn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Gn=n,(Vn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Zn(Gn)}function sr(e,t){if("click"===e)return Zn(t)}function or(e,t){if("input"===e||"change"===e)return Zn(t)}var ar="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function cr(e,t){if(ar(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!ar(e[i],t[i]))return!1}return!0}function lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=lr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=K();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=K((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=void 0===r.end?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=ur(n,s);var o=ur(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,yr=null,vr=null,wr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;wr||null==gr||gr!==K(r)||("selectionStart"in(r=gr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&cr(vr,r)||(vr=r,0<(r=Vr(yr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Er={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionend:xr("Transition","TransitionEnd")},_r={},kr={};function Cr(e){if(_r[e])return _r[e];if(!Er[e])return e;var t,n=Er[e];for(t in n)if(n.hasOwnProperty(t)&&t in kr)return _r[e]=n[t];return e}u&&(kr=document.createElement("div").style,"AnimationEvent"in window||(delete Er.animationend.animation,delete Er.animationiteration.animation,delete Er.animationstart.animation),"TransitionEvent"in window||delete Er.transitionend.transition);var Ar=Cr("animationend"),Sr=Cr("animationiteration"),Ir=Cr("animationstart"),Tr=Cr("transitionend"),Pr=new Map,Nr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rr(e,t){Pr.set(e,t),c(t,[e])}for(var Or=0;Or<Nr.length;Or++){var Mr=Nr[Or];Rr(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Rr(Ar,"onAnimationEnd"),Rr(Sr,"onAnimationIteration"),Rr(Ir,"onAnimationStart"),Rr("dblclick","onDoubleClick"),Rr("focusin","onFocus"),Rr("focusout","onBlur"),Rr(Tr,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focu
5604sin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Lr=new Set("cancel close invalid load scroll toggle".split(" ").concat(jr));function Dr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,c,l){if($e.apply(this,arguments),Le){if(!Le)throw Error(s(198));var u=De;Le=!1,De=null,Be||(Be=!0,Ue=u)}}(r,t,void 0,e),e.currentTarget=null}function Br(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],c=a.instance,l=a.currentTarget;if(a=a.listener,c!==s&&i.isPropagationStopped())break e;Dr(i,a,l),s=c}else for(o=0;o<r.length;o++){if(c=(a=r[o]).instance,l=a.currentTarget,a=a.listener,c!==s&&i.isPropagationStopped())break e;Dr(i,a,l),s=c}}}if(Be)throw e=Ue,Be=!1,Ue=null,e}function Ur(e,t){var n=t[mi];void 0===n&&(n=t[mi]=new Set);var r=e+"__bubble";n.has(r)||(Hr(t,e,2,!1),n.add(r))}function Fr(e,t,n){var r=0;t&&(r|=4),Hr(n,e,r,t)}var $r="_reactListening"+Math.random().toString(36).slice(2);function zr(e){if(!e[$r]){e[$r]=!0,o.forEach((function(t){"selectionchange"!==t&&(Lr.has(t)||Fr(t,!1,e),Fr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[$r]||(t[$r]=!0,Fr("selectionchange",!1,t))}}function Hr(e,t,n,r){switch(Yt(t)){case 1:var i=qt;break;case 4:i=Vt;break;default:i=Gt}n=i.bind(null,t,n,e),i=void 0,!Oe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Wr(e,t,n,r,i){var s=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var a=r.stateNode.containerInfo;if(a===i||8===a.nodeType&&a.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var c=o.tag;if((3===c||4===c)&&((c=o.stateNode.containerInfo)===i||8===c.nodeType&&c.parentNode===i))return;o=o.return}for(;null!==a;){if(null===(o=vi(a)))return;if(5===(c=o.tag)||6===c){r=s=o;continue e}a=a.parentNode}}r=r.return}Ne((function(){var r=s,i=xe(n),o=[];e:{var a=Pr.get(e);if(void 0!==a){var c=un,l=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":c=Sn;break;case"focusin":l="focus",c=gn;break;case"focusout":l="blur",c=gn;break;case"beforeblur":case"afterblur":c=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=Tn;break;case Ar:case Sr:case Ir:c=yn;break;case Tr:c=Pn;break;case"scroll":c=hn;break;case"wheel":c=Rn;break;case"copy":case"cut":case"paste":c=wn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=In}var u=0!==(4&t),d=!u&&"scroll"===e,h=u?null!==a?a+"Capture":null:a;u=[];for(var p,f=r;null!==f;){var m=(p=f).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==h&&(null!=(m=Re(f,h))&&u.push(qr(f,m,p)))),d)break;f=f.return}0<u.length&&(a=new c(a,l,null,n,i),o.push({event:a,listeners:u}))}}if(0===(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===be||!(l=n.relatedTarget||n.fromElement)||!vi(l)&&!l[fi])&&(c||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,c?(c=r,null!==(l=(l=n.relatedTarget||n.toElement)?vi(l):null)&&(l!==(d=ze(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(c=null,l=r),c!==l)){if(u=fn,m="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=In,m="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==c?a:bi(c),p=null==l?a:bi(l),(a=new u(m,f+"leave",c,n,i)).target=d,a.relatedTarget=p,m=null,vi(i)===r&&((u=new u(h,f+"enter",l,n,i)).target=p,u.relatedTarget=d,m=u),d=m,c&&l)e:{for(h=l,f=0,p=u=c;p;p=Gr(p))f++;for(p=0,m=h;m;m=Gr(m))p++;for(;0<f-p;)u=Gr(u),f--;for(;0<p-f;)h=Gr(h),p--;for(;f--;){if(u===h||null!==h&&u===h.alternate)break e;u=Gr(u),h=Gr(h)}u=null}else u=null;
vendor: 89,151 bytes, line 5604
5604null!==c&&Kr(o,a,c,u,!1),null!==l&&null!==d&&Kr(o,d,l,u,!0)}if("select"===(c=(a=r?bi(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===c&&"file"===a.type)var g=Yn;else if(Wn(a))if(Qn)g=or;else{g=ir;var y=rr}else(c=a.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(g=sr);switch(g&&(g=g(e,r))?qn(o,g,n,i):(y&&y(e,a,r),"focusout"===e&&(y=a._wrapperState)&&y.controlled&&"number"===a.type&&ee(a,"number",a.value)),y=r?bi(r):window,e){case"focusin":(Wn(y)||"true"===y.contentEditable)&&(gr=y,yr=r,vr=null);break;case"focusout":vr=yr=gr=null;break;case"mousedown":wr=!0;break;case"contextmenu":case"mouseup":case"dragend":wr=!1,br(o,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":br(o,n,i)}var v;if(Mn)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else zn?Fn(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(Dn&&"ko"!==n.locale&&(zn||"onCompositionStart"!==w?"onCompositionEnd"===w&&zn&&(v=en()):(Jt="value"in(Qt=i)?Qt.value:Qt.textContent,zn=!0)),0<(y=Vr(r,w)).length&&(w=new bn(w,e,null,n,i),o.push({event:w,listeners:y}),v?w.data=v:null!==(v=$n(n))&&(w.data=v))),(v=Ln?function(e,t){switch(e){case"compositionend":return $n(t);case"keypress":return 32!==t.which?null:(Un=!0,Bn);case"textInput":return(e=t.data)===Bn&&Un?null:e;default:return null}}(e,n):function(e,t){if(zn)return"compositionend"===e||!Mn&&Fn(e,t)?(e=en(),Xt=Jt=Qt=null,zn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Vr(r,"onBeforeInput")).length&&(i=new bn("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=v))}Br(o,t)}))}function qr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,s=i.stateNode;5===i.tag&&null!==s&&(i=s,null!=(s=Re(e,n))&&r.unshift(qr(e,s,i)),null!=(s=Re(e,t))&&r.push(qr(e,s,i))),e=e.return}return r}function Gr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Kr(e,t,n,r,i){for(var s=t._reactName,o=[];null!==n&&n!==r;){var a=n,c=a.alternate,l=a.stateNode;if(null!==c&&c===r)break;5===a.tag&&null!==l&&(a=l,i?null!=(c=Re(n,s))&&o.unshift(qr(n,c,a)):i||null!=(c=Re(n,s))&&o.push(qr(n,c,a))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Zr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Qr(e){return("string"===typeof e?e:""+e).replace(Zr,"\n").replace(Yr,"")}function Jr(e,t,n){if(t=Qr(t),Qr(e)!==t&&n)throw Error(s(425))}function Xr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,si="function"===typeof Promise?Promise:void 0,oi="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof si?function(e){return si.resolve(null).then(e).catch(ai)}:ri;function ai(e){setTimeout((function(){throw e}))}function ci(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void zt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);zt(t)}function li(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),hi="__reactFiber$"+di,pi="__reactProps$"+di,fi="__reactContainer$"+di,mi="__reactEvents$"+di,gi="__reactListeners$"+di,yi="__reactHandles$"+di;function vi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[hi])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function wi(e){return!(e=e[hi]||e[fi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function bi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(s(33))}function xi(e){return e[pi]||null}var Ei=[],_i=-1;function ki(e){return{current:e}}function Ci(e){0>_i||(e.current=Ei[_i],Ei[_i]=null,_i--)}function Ai(e,t){_i++,Ei[_i]=e.current,e.current=t}var Si={},Ii=ki(Si),Ti=ki(!1),Pi=Si;function Ni(e,t){var n=e.type.contextTypes;if(!n)return Si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,s={};for(i in n)s[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ri(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Oi(){Ci(Ti),Ci(Ii)}function Mi(e,t,n){if(Ii.current!==Si)throw Error(s(168));Ai(Ii,t),Ai(Ti,n)}function ji(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(s(108,H(e)||"Unknown",i));return D({},n,r)}function Li(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Si,Pi=Ii.current,Ai(Ii,e),Ai(Ti,Ti.current),!0}function Di(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=ji(e,t,Pi),r.__reactInternalMemoizedMergedChildContext=e,Ci(Ti),Ci(Ii),Ai(Ii,e)):Ci(Ti),Ai(Ti,n)}var Bi=null,Ui=!1,Fi=!1;function $i(e){null===Bi?Bi=[e]:Bi.push(e)}function zi(){if(!Fi&&null!==Bi){Fi=!0;var e=0,t=wt;try{var n=Bi;for(wt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bi=null,Ui=!1}catch(i){throw null!==Bi&&(Bi=Bi.slice(e+1)),Ge(Xe,zi),i}finally{wt=t,Fi=!1}}return null}var Hi=[],Wi=0,qi=null,Vi=0,Gi=[],Ki=0,Zi=null,Yi=1,Qi="";function Ji(e,t){Hi[Wi++]=Vi,Hi[Wi++]=qi,qi=e,Vi=t}function Xi(e,t,n){Gi[Ki++]=Yi,Gi[Ki++]=Qi,Gi[Ki++]=Zi,Zi=e;var r=Yi;e=Qi;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var s=32-ot(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Yi=1<<32-ot(t)+i|n<<i|r,Qi=s+e}else Yi=1<<s|n<<i|r,Qi=e}function es(e){null!==e.return&&(Ji(e,1),Xi(e,1,0))}function ts(e){for(;e===qi;)qi=Hi[--Wi],Hi[Wi]=null,Vi=Hi[--Wi],Hi[Wi]=null;for(;e===Zi;)Zi=Gi[--Ki],Gi[Ki]=null,Qi=Gi[--Ki],Gi[Ki]=null,Yi=Gi[--Ki],Gi[Ki]=null}var ns=null,rs=null,is=!1,ss=null;function os(e,t){var n=Rl(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function as(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ns=e,rs=li(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ns=e,rs=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Zi?{id:Yi,overflow:Qi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Rl(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ns=e,rs=null,!0);default:return!1}}function cs(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function ls(e){if(is){var t=rs;if(t){var n=t;if(!as(e,t)){if(cs(e))throw Error(s(418));t=li(n.nextSibling);var r=ns;t&&as(e,t)?os(r,n):(e.flags=-4097&e.flags|2,is=!1,ns=e)}}else{if(cs(e))throw Error(s(418));e.flags=-4097&e.flags|2,is=!1,ns=e}}}function us(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ns=e}function ds(e){if(e!==ns)return!1;if(!is)return us(e),is=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=rs)){if(cs(e))throw hs(),Error(s(418));for(;t;)os(e,t),t=li(t.nextSibling)}if(us(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){rs=li(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}rs=null}}else rs=ns?li(e.stateNode.nextSibling):null;return!0}function hs(){for(var e=rs;e;)e=li(e.nextSibling)}function ps(){rs=ns=null,is=!1}function fs(e){null===ss?ss=[e]:ss.push(e)}var ms=b.ReactCurrentBatchConfig;function gs(e,t){if(e&&e.defaultProps){for(var n in t=D({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var ys=ki(null),vs=null,ws=null,bs=null;function xs(){bs=ws=vs=null}function Es(e){var t=ys.current;Ci(ys),e._currentValue=t}function _s(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ks(e,t){vs=e,bs=ws=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ba=!0),e.firstContext=null)}function Cs(e){var t=e._currentValue;if(bs!==e)if(e={context:e,memoizedValue:t,next:null},null===ws){if(null===vs)throw Error(s(308));ws=e,vs.dependencies={lanes:0,firstContext:e}}else ws=ws.next=e;return t}var As=null;function Ss(e){null===As?As=[e]:As.push(e)}function Is(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ss(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ts(e,r)}function Ts(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ps=!1;function Ns(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Os(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ms(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Tc)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ts(e,n)}return null===(i=r.interleaved)?(t.next=t,Ss(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ts(e,n)}function js(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}function Ls(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,s=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===s?i=s=o:s=s.next=o,n=n.next}while(null!==n);null===s?i=s=t:s=s.next=t}else i=s=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ds(e,t,n,r){var i=e.updateQueue;Ps=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var c=a,l=c.next;c.next=null,null===o?s=l:o.next=l,o=c;var u=e.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==o&&(null===a?u.firstBaseUpdate=l:a.next=l,u.lastBaseUpdate=c))}if(null!==s){var d=i.baseState;for(o=0,u=l=c=null,a=s;;){var h=a.lane,p=a.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var f=e,m=a;switch(h=t,p=n,m.tag){case 1:if("function"===typeof(f=m.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null===(h="function"===typeof(f=m.payload)?f.call(p,d,h):f)||void 0===h)break e;d=D({},d,h);break e;case 2:Ps=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(l=u=p,c=d):u=u.next=p,o|=h;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(h=a).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===s&&(i.shared.lanes=0);Dc|=o,e.lanes=o,e.memoizedState=d}}function Bs(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(s(191,i));i.call(r)}}}var Us=(new r.Component).refs;function Fs(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:D({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var $s={isMounted:function(e){return!!(e=e._reactInternals)&&ze(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tl(),i=nl(e),s=Os(r,i);s.payload=t,void 0!==n&&null!==n&&(s.callback=n),null!==(t=Ms(e,s,i))&&(rl(t,e,i,r),js(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tl(),i=nl(e),s=Os(r,i);s.tag=1,s.payload=t,void 0!==n&&null!==n&&(s.callback=n),null!==(t=Ms(e,s,i))&&(rl(t,e,i,r),js(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tl(),r=nl(e),i=Os(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Ms(e,i,r))&&(rl(t,e,r,n),js(t,e,r))}};function zs(e,t,n,r,i,s,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,s,o):!t.prototype||!t.prototype.isPureReactComponent||(!cr(n,r)||!cr(i,s))}function Hs(e,t,n){var r=!1,i=Si,s=t.contextType;return"object"===typeof s&&null!==s?s=Cs(s):(i=Ri(t)?Pi:Ii.current,s=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ni(e,i):Si),t=new t(n,s),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=$s,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Ws(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&$s.enqueueReplaceState(t,t.state,null)}function qs(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Us,Ns(e);var s=t.contextType;"object"===typeof s&&null!==s?i.context=Cs(s):(s=Ri(t)?Pi:Ii.current,i.context=Ni(e,s)),i.state=e.memoizedState,"function"===typeof(s=t.getDerivedStateFromProps)&&(Fs(e,t,s,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&$s.enqueueReplaceState(i,i.state,null),Ds(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function Vs(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var r=n.stateNode}if(!r)throw Error(s(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;t===Us&&(t=i.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function Gs(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ks(e){return(0,e._init)(e._payload)}function Zs(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Ml(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=Bl(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var s=n.type;return s===_?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===s||"object"===typeof s&&null!==s&&s.$$typeof===R&&Ks(s)===t.type)?((r=i(t,n.props)).ref=Vs(e,t,n),r.return=e,r):((r=jl(n.type,n.key,n.props,null,e.mode,r)).ref=Vs(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ul(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,s){return null===t||7!==t.tag?((t=Ll(n,e.mode,r,s)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Bl(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=jl(t.type,t.key,t.props,null,e.mode,n)).ref=Vs(e,null,t),n.return=e,n;case E:return(t=Ul(t,e.mode,n)).return=e,t;case R:return h(e,(0,t._init)(t._payload),n)}if(te(t)||j(t))return(t=Ll(t,e.mode,n,null)).return=e,t;Gs(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:c(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===i?l(e,t,n,r):null;case E:return n.key===i?u(e,t,n,r):null;case R:return p(e,t,(i=n._init)(n._payload),r)}if(te(n)||j(n))return null!==i?null:d(e,t,n,r,null);Gs(e,n)}return null}function f(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return c(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case x:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case E:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case R:return f(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||j(r))return d(t,e=e.get(n)||null,r,i,null);Gs(t,r)}return null}function m(i,s,a,c){for(var l=null,u=null,d=s,m=s=0,g=null;null!==d&&m<a.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var y=p(i,d,a[m],c);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(i,d),s=o(y,s,m),null===u?l=y:u.sibling=y,u=y,d=g}if(m===a.length)return n(i,d),is&&Ji(i,m),l;if(null===d){for(;m<a.length;m++)null!==(d=h(i,a[m],c))&&(s=o(d,s,m),null===u?l=d:u.sibling=d,u=d);return is&&Ji(i,m),l}for(d=r(i,d);m<a.length;m++)null!==(g=f(d,i,m,a[m],c))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),s=o(g,s,m),null===u?l=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(i,e)})),is&&Ji(i,m),l}function g(i,a,c,l){var u=j(c);if("function"!==typeof u)throw Error(s(150));if(null==(c=u.call(c)))throw Error(s(151));for(var d=u=null,m=a,g=a=0,y=null,v=c.next();null!==m&&!v.done;g++,v=c.next()){m.index>g?(y=m,m=null):y=m.sibling;var w=p(i,m,v.value,l);if(null===w){null===m&&(m=y);break}e&&m&&null===w.alternate&&t(i,m),a=o(w,a,g),null===d?u=w:d.sibling=w,d=w,m=y}if(v.done)return n(i,m),is&&Ji(i,g),u;if(null===m){for(;!v.done;g++,v=c.next())null!==(v=h(i,v.value,l))&&(a=o(v,a,g),null===d?u=v:d.sibling=v,d=v);return is&&Ji(i,g),u}for(m=r(i,m);!v.done;g++,v=c.next())null!==(v=f(m,i,g,v.value,l))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),a=o(v,a,g),null===d?u=v:d.sibling=v,d=v);return e&&m.forEach((function(e){return t(i,e)})),is&&Ji(i,g),u}return function e(r,s,o,c){if("object"===typeof o&&null!==o&&o.type===_&&null===o.key&&(o=o.props.children),"object"===typeof o&&null!==o){switch(o.$$typeof){case x:e:{for(var l=o.key,u=s;null!==u;){if(u.key===l){if((l=o.type)===_){if(7===u.tag){n(r,u.sibling),(s=i(u,o.props.children)).return=r,r=s;break e}}else if(u.elementType===l||"object"===typeof l&&null!==l&&l.$$typeof===R&&Ks(l)===u.type){n(r,u.sibling),(s=i(u,o.props)).ref=Vs(r,u,o),s.return=r,r=s;break e}n(r,u);break}t(r,u),u=u.sibling}o.type===_?((s=Ll(o.props.children,r.mode,c,o.key)).return=r,r=s):((c=jl(o.type,o.key,o.props,null,r.mode,c)).ref=Vs(r,s,o),c.return=r,r=c)}return a(r);case E:e:{for(u=o.key;null!==s;){if(s.key===u){if(4===s.tag&&s.stateNode.containerInfo===o.containerInfo&&s.stateNode.implementation===o.implementation){n(r,s.sibling),(s=i(s,o.children||[])).return=r,r=s;break e}n(r,s);break}t(r,s),s=s.sibling}(s=Ul(o,r.mode,c)).return=r,r=s}return a(r);case R:return e(r,s,(u=o._init)(o._payload),c)}if(te(o))return m(r,s,o,c);if(j(o))return g(r,s,o,c);Gs(r,o)}return"string"===typeof o&&""!==o||"number"===typeof o?(o=""+o,null!==s&&6===s.tag?(n(r,s.sibling),(s=i(s,o)).return=r,r=s):(n(r,s),(s=Bl(o,r.mode,c)).return=r,r=s),a(r)):n(r,s)}}var Ys=Zs(!0),Qs=Zs(!1),Js={},Xs=ki(Js),eo=ki(Js),to=ki(Js);function no(e){if(e===Js)throw Error(s(174));return e}function ro(e,t){switch(Ai(to,t),Ai(eo,e),Ai(Xs,Js),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ce(null,"");break;default:t=ce(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ci(Xs),Ai(Xs,t)}function io(){Ci(Xs),Ci(eo),Ci(to)}function so(e){no(to.current);var t=no(Xs.current),n=ce(t,e.type);t!==n&&(Ai(eo,e),Ai(Xs,n))}function oo(e){eo.current===e&&(Ci(Xs),Ci(eo))}var ao=ki(0);function co(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var lo=[];function uo(){for(var e=0;e<lo.length;e++)lo[e]._workInProgressVersionPrimary=null;lo.length=0}var ho=b.ReactCurrentDispatcher,po=b.ReactCurrentBatchConfig,fo=0,mo=null,go=null,yo=null,vo=!1,wo=!1,bo=0,xo=0;function Eo(){throw Error(s(321))}function _o(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ar(e[n],t[n]))return!1;return!0}function ko(e,t,n,r,i,o){if(fo=o,mo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ho.current=null===e||null===e.memoizedState?aa:ca,e=n(r,i),wo){o=0;do{if(wo=!1,bo=0,25<=o)throw Error(s(301));o+=1,yo=go=null,t.updateQueue=null,ho.current=la,e=n(r,i)}while(wo)}if(ho.current=oa,t=null!==go&&null!==go.next,fo=0,yo=go=mo=null,vo=!1,t)throw Error(s(300));return e}function Co(){var e=0!==bo;return bo=0,e}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===yo?mo.memoizedState=yo=e:yo=yo.next=e,yo}function So(){if(null===go){var e=mo.alternate;e=null!==e?e.memoizedState:null}else e=go.next;var t=null===yo?mo.memoizedState:yo.next;if(null!==t)yo=t,go=e;else{if(null===e)throw Error(s(310));e={memoizedState:(go=e).memoizedState,baseState:go.baseState,baseQueue:go.baseQueue,queue:go.queue,next:null},null===yo?mo.memoizedState=yo=e:yo=yo.next=e}return yo}function Io(e,t){return"function"===typeof t?t(e):t}function To(e){var t=So(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=go,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var c=a=null,l=null,u=o;do{var d=u.lane;if((fo&d)===d)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(c=l=h,a=r):l=l.next=h,mo.lanes|=d,Dc|=d}u=u.next}while(null!==u&&u!==o);null===l?a=r:l.next=c,ar(r,t.memoizedState)||(ba=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,mo.lanes|=o,Dc|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Po(e){var t=So(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);ar(o,t.memoizedState)||(ba=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function No(){}function Ro(e,t){var n=mo,r=So(),i=t(),o=!ar(r.memoizedState,i);if(o&&(r.memoizedState=i,ba=!0),r=r.queue,Wo(jo.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==yo&&1&yo.memoizedState.tag){if(n.flags|=2048,Uo(9,Mo.bind(null,n,r,i,t),void 0,null),null===Pc)throw Error(s(349));0!==(30&fo)||Oo(n,t,i)}return i}function Oo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=mo.updateQueue)?(t={lastEffect:null,stores:null},mo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Mo(e,t,n,r){t.value=n,t.getSnapshot=r,Lo(t)&&Do(e)}function jo(e,t,n){return n((function(){Lo(t)&&Do(e)}))}function Lo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ar(e,n)}catch(r){return!0}}function Do(e){var t=Ts(e,1);null!==t&&rl(t,e,1,-1)}function Bo(e){var t=Ao();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t.queue=e,e=e.dispatch=na.bind(null,mo,e),[t.memoizedState,e]}function Uo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=mo.updateQueue)?(t={lastEffect:null,stores:null},mo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Fo(){return So().memoizedState}function $o(e,t,n,r){var i=Ao();mo.flags|=e,i.memoizedState=Uo(1|t,n,void 0,void 0===r?null:r)}function zo(e,t,n,r){var i=So();r=void 0===r?null:r;var s=void 0;if(null!==go){var o=go.memoizedState;if(s=o.destroy,null!==r&&_o(r,o.deps))return void(i.memoizedState=Uo(t,n,s,r))}mo.flags|=e,i.memoizedState=Uo(1|t,n,s,r)}function Ho(e,t){return $o(8390656,8,e,t)}function Wo(e,t){return zo(2048,8,e,t)}function qo(e,t){return zo(4,2,e,t)}function Vo(e,t){return zo(4,4,e,t)}function Go(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ko(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,zo(4,4,Go.bind(null,t,e),n)}function Zo(){}function Yo(e,t){var n=So();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qo(e,t){var n=So();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&_o(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Jo(e,t,n){return 0===(21&fo)?(e.baseState&&(e.baseState=!1,ba=!0),e.memoizedState=n):(ar(n,t)||(n=mt(),mo.lanes|=n,Dc|=n,e.baseState=!0),t)}function Xo(e,t){var n=wt;wt=0!==n&&4>n?n:4,e(!0);var r=po.transition;po.transition={};try{e(!1),t()}finally{wt=n,po.transition=r}}function ea(){return So().memoizedState}function ta(e,t,n){var r=nl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ra(e))ia(t,n);else if(null!==(n=Is(e,t,n,r))){rl(n,e,r,tl()),sa(n,t,r)}}function na(e,t,n){var r=nl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ra(e))ia(t,i);else{var s=e.alternate;if(0===e.lanes&&(null===s||0===s.lanes)&&null!==(s=t.lastRenderedReducer))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,ar(a,o)){var c=t.interleaved;return null===c?(i.next=i,Ss(t)):(i.next=c.next,c.next=i),void(t.interleaved=i)}}catch(l){}null!==(n=Is(e,t,i,r))&&(rl(n,e,r,i=tl()),sa(n,t,r))}}function ra(e){var t=e.alternate;return e===mo||null!==t&&t===mo}function ia(e,t){wo=vo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sa(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}var oa={readContext:Cs,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useInsertionEffect:Eo,useLayoutEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useMutableSource:Eo,useSyncExternalStore:Eo,useId:Eo,unstable_isNewReconciler:!1},aa={readContext:Cs,useCallback:function(e,t){return Ao().memoizedState=[e,void 0===t?null:t],e},useContext:Cs,useEffect:Ho,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,$o(4194308,4,Go.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $o(4194308,4,e,t)},useInsertionEffect:function(e,t){return $o(4,2,e,t)},useMemo:function(e,t){var n=Ao();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ao();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ta.bind(null,mo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ao().memoizedState=e},useState:Bo,useDebugValue:Zo,useDeferredValue:function(e){return Ao().memoizedState=e},useTransition:function(){var e=Bo(!1),t=e[0];return e=Xo.bind(null,e[1]),Ao().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=mo,i=Ao();if(is){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===Pc)throw Error(s(349));0!==(30&fo)||Oo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ho(jo.bind(null,r,o,e),[e]),r.flags|=2048,Uo(9,Mo.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ao(),t=Pc.identifierPrefix;if(is){var n=Qi;t=":"+t+"R"+(n=(Yi&~(1<<32-ot(Yi)-1)).toString(32)+n),0<(n=bo++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=xo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ca={readContext:Cs,useCallback:Yo,useContext:Cs,useEffect:Wo,useImperativeHandle:Ko,useInsertionEffect:qo,useLayoutEffect:Vo,useMemo:Qo,useReducer:To,useRef:Fo,useState:function(){return To(Io)},useDebugValue:Zo,useDeferredValue:function(e){return Jo(So(),go.memoizedState,e)},useTransition:function(){return[To(Io)[0],So().memoizedState]},useMutableSource:No,useSyncExternalStore:Ro,useId:ea,unstable_isNewReconciler:!1},la={readContext:Cs,useCallback:Yo,useContext:Cs,useEffect:Wo,useImperativeHandle:Ko,useInsertionEffect:qo,useLayoutEffect:Vo,useMemo:Qo,useReducer:Po,useRef:Fo,useState:function(){return Po(Io)},useDebugValue:Zo,useDeferredValue:function(e){var t=So();return null===go?t.memoizedState=e:Jo(t,go.memoizedState,e)},useTransition:function(){return[Po(Io)[0],So().memoizedState]},useMutableSource:No,useSyncExternalStore:Ro,useId:ea,unstable_isNewReconciler:!1};function ua(e,t){try{var n="",r=t;do{n+=$(r),r=r.return}while(r);var i=n}catch(s){i="\nError generating stack: "+s.message+"\n"+s.stack}return{value:e,source:t,stack:i,digest:null}}function da(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ha(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var pa="function"===typeof WeakMap?WeakMap:Map;function fa(e,t,n){(n=Os(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qc||(qc=!0,Vc=r),ha(0,t)},n}function ma(e,t,n){(n=Os(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ha(0,t)}}var s=e.stateNode;return null!==s&&"function"===typeof s.componentDidCatch&&(n.callback=function(){ha(0,t),"function"!==typeof r&&(null===Gc?Gc=new Set([this]):Gc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ga(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pa;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Al.bind(null,e,t,n),t.then(e,e))}function ya(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function va(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Os(-1,1)).tag=2,Ms(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var wa=b.ReactCurrentOwner,ba=!1;function xa(e,t,n,r){t.child=null===e?Qs(t,null,n,r):Ys(t,e.child,n,r)}function Ea(e,t,n,r,i){n=n.render;var s=t.ref;return ks(t,i),r=ko(e,t,n,r,s,i),n=Co(),null===e||ba?(is&&n&&es(t),t.flags|=1,xa(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,qa(e,t,i))}function _a(e,t,n,r,i){if(null===e){var s=n.type;return"function"!==typeof s||Ol(s)||void 0!==s.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=jl(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=s,ka(e,t,s,r,i))}if(s=e.child,0===(e.lanes&i)){var o=s.memoizedProps;if((n=null!==(n=n.compare)?n:cr)(o,r)&&e.ref===t.ref)return qa(e,t,i)}return t.flags|=1,(e=Ml(s,r)).ref=t.ref,e.return=t,t.child=e}function ka(e,t,n,r,i){if(null!==e){var s=e.memoizedProps;if(cr(s,r)&&e.ref===t.ref){if(ba=!1,t.pendingProps=r=s,0===(e.lanes&i))return t.lanes=e.lanes,qa(e,t,i);0!==(131072&e.flags)&&(ba=!0)}}return Sa(e,t,n,r,i)}function Ca(e,t,n){var r=t.pendingProps,i=r.children,s=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ai(Mc,Oc),Oc|=n;else{if(0===(1073741824&n))return e=null!==s?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ai(Mc,Oc),Oc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==s?s.baseLanes:n,Ai(Mc,Oc),Oc|=r}else null!==s?(r=s.baseLanes|n,t.memoizedState=null):r=n,Ai(Mc,Oc),Oc|=r;return xa(e,t,i,n),t.child}function Aa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Sa(e,t,n,r,i){var s=Ri(n)?Pi:Ii.current;return s=Ni(t,s),ks(t,i),n=ko(e,t,n,r,s,i),r=Co(),null===e||ba?(is&&r&&es(t),t.flags|=1,xa(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,qa(e,t,i))}function Ia(e,t,n,r,i){if(Ri(n)){var s=!0;Li(t)}else s=!1;if(ks(t,i),null===t.stateNode)Wa(e,t),Hs(t,n,r),qs(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,a=t.memoizedProps;o.props=a;var c=o.context,l=n.contextType;"object"===typeof l&&null!==l?l=Cs(l):l=Ni(t,l=Ri(n)?Pi:Ii.current);var u=n.getDerivedStateFromProps,d="function"===typeof u||"function"===typeof o.getSnapshotBeforeUpdate;d||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a!==r||c!==l)&&Ws(t,o,r,l),Ps=!1;var h=t.memoizedState;o.state=h,Ds(t,r,o,i),c=t.memoizedState,a!==r||h!==c||Ti.current||Ps?("function"===typeof u&&(Fs(t,n,u,r),c=t.memoizedState),(a=Ps||zs(t,n,a,r,h,c,l))?(d||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4194308)):("function"===typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=a):("function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Rs(e,t),a=t.memoizedProps,l=t.type===t.elementType?a:gs(t.type,a),o.props=l,d=t.pendingProps,h=o.context,"object"===typeof(c=n.contextType)&&null!==c?c=Cs(c):c=Ni(t,c=Ri(n)?Pi:Ii.current);var p=n.getDerivedStateFromProps;(u="function"===typeof p||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a!==d||h!==c)&&Ws(t,o,r,c),Ps=!1,h=t.memoizedState,o.state=h,Ds(t,r,o,i);var f=t.memoizedState;a!==d||h!==f||Ti.current||Ps?("function"===typeof p&&(Fs(t,n,p,r),f=t.memoizedState),(l=Ps||zs(t,n,l,r,h,f,c)||!1)?(u||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,f,c),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,f,c)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),o.props=r,o.state=f,o.context=c,r=l):("function"!==typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ta(e,t,n,r,s,i)}function Ta(e,t,n,r,i,s){Aa(e,t);var o=0!==(128&t.flags);if(!r&&!o)return i&&Di(t,n,!1),qa(e,t,s);r=t.stateNode,wa.current=t;var a=o&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=Ys(t,e.child,null,s),t.child=Ys(t,null,a,s)):xa(e,t,a,s),t.memoizedState=r.state,i&&Di(t,n,!0),t.child}function Pa(e){var t=e.stateNode;t.pendingContext?Mi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Mi(0,t.context,!1),ro(e,t.containerInfo)}function Na(e,t,n,r,i){return ps(),fs(i),t.flags|=256,xa(e,t,n,r),t.child}var Ra,Oa,Ma,ja,La={dehydrated:null,treeContext:null,retryLane:0};function Da(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ba(e,t,n){var r,i=t.pendingProps,o=ao.current,a=!1,c=0!==(128&t.flags);if((r=c)||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Ai(ao,1&o),null===e)return ls(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(c=i.children,e=i.fallback,a?(i=t.mode,a=t.child,c={mode:"hidden",children:c},0===(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=c):a=Dl(c,i,0,null),e=Ll(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Da(n),t.memoizedState=La,e):Ua(t,c));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,a){if(n)return 256&t.flags?(t.flags&=-257,Fa(e,t,a,r=da(Error(s(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Dl({mode:"visible",children:r.children},i,0,null),(o=Ll(o,i,a,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!==(1&t.mode)&&Ys(t,e.child,null,a),t.child.memoizedState=Da(a),t.memoizedState=La,o);if(0===(1&t.mode))return Fa(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var c=r.dgst;return r=c,Fa(e,t,a,r=da(o=Error(s(419)),r,void 0))}if(c=0!==(a&e.childLanes),ba||c){if(null!==(r=Pc)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|a))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Ts(e,i),rl(r,e,i,-1))}return gl(),Fa(e,t,a,r=da(Error(s(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Il.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,rs=li(i.nextSibling),ns=t,is=!0,ss=null,null!==e&&(Gi[Ki++]=Yi,Gi[Ki++]=Qi,Gi[Ki++]=Zi,Yi=e.id,Qi=e.overflow,Zi=t),t=Ua(t,r.children),t.flags|=4096,t)}(e,t,c,i,r,o,n);if(a){a=i.fallback,c=t.mode,r=(o=e.child).sibling;var l={mode:"hidden",children:i.children};return 0===(1&c)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null):(i=Ml(o,l)).subtreeFlags=14680064&o.subtreeFlags,null!==r?a=Ml(r,a):(a=Ll(a,c,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,c=null===(c=e.child.memoizedState)?Da(n):{baseLanes:c.baseLanes|n,cachePool:null,transitions:c.transitions},a.memoizedState=c,a.childLanes=e.childLanes&~n,t.memoizedState=La,i}return e=(a=e.child).sibling,i=Ml(a,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Ua(e,t){return(t=Dl({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fa(e,t,n,r){return null!==r&&fs(r),Ys(t,e.child,null,n),(e=Ua(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function $a(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),_s(e.return,t,n)}function za(e,t,n,r,i){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Ha(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(xa(e,t,r.children,n),0!==(2&(r=ao.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&$a(e,n,t);else if(19===e.tag)$a(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ai(ao,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===co(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),za(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===co(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}za(t,!0,n,null,s);break;case"together":za(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wa(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function qa(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Dc|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=Ml(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ml(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Va(e,t){if(!is)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ga(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ka(e,t,n){var r=t.pendingProps;switch(ts(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ga(t),null;case 1:case 17:return Ri(t.type)&&Oi(),Ga(t),null;case 3:return r=t.stateNode,io(),Ci(Ti),Ci(Ii),uo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ds(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==ss&&(al(ss),ss=null))),Oa(e,t),Ga(t),null;case 5:oo(t);var i=no(to.current);if(n=t.type,null!==e&&null!=t.stateNode)Ma(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(s(166));return Ga(t),null}if(e=no(Xs.current),ds(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[hi]=t,r[pi]=o,e=0!==(1&t.mode),n){case"dialog":Ur("cancel",r),Ur("close",r);break;case"iframe":case"object":case"embed":Ur("load",r);break;case"video":case"audio":for(i=0;i<jr.length;i++)Ur(jr[i],r);break;case"source":Ur("error",r);break;case"img":case"image":case"link":Ur("error",r),Ur("load",r);break;case"details":Ur("toggle",r);break;case"input":Y(r,o),Ur("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ur("invalid",r);break;case"textarea":ie(r,o),Ur("invalid",r)}for(var c in ve(n,o),i=null,o)if(o.hasOwnProperty(c)){var l=o[c];"children"===c?"string"===typeof l?r.textContent!==l&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,l,e),i=["children",l]):"number"===typeof l&&r.textContent!==""+l&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,l,e),i=["children",""+l]):a.hasOwnProperty(c)&&null!=l&&"onScroll"===c&&Ur("scroll",r)}switch(n){case"input":V(r),X(r,o,!0);break;case"textarea":V(r),oe(r);break;case"select":case"option":break;default:"function"===typeof o.onClick&&(r.onclick=Xr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{c=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[hi]=t,e[pi]=r,Ra(e,t,!1,!1),t.stateNode=e;e:{switch(c=we(n,r),n){case"dialog":Ur("cancel",e),Ur("close",e),i=r;break;case"iframe":case"object":case"embed":Ur("load",e),i=r;break;case"video":case"audio":for(i=0;i<jr.length;i++)Ur(jr[i],e);i=r;break;case"source":Ur("error",e),i=r;break;case"img":case"image":case"link":Ur("error",e),Ur("load",e),i=r;break;case"details":Ur("toggle",e),i=r;break;case"input":Y(e,r),i=Z(e,r),Ur("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=D({},r,{value:void 0}),Ur("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Ur("invalid",e)}for(o in ve(n,i),l=i)if(l.hasOwnProperty(o)){var u=l[o];"style"===o?ge(e,u):"dangerouslySetInnerHTML"===o?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===o?"string"===typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"===typeof u&&he(e,""+u):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(a.hasOwnProperty(o)?null!=u&&"onScroll"===o&&Ur("scroll",e):null!=u&&w(e,o,u,c))}switch(n){case"input":V(e),X(e,r,!1);break;case"textarea":V(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?ne(e,!!r.multiple,o,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Xr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ga(t),null;case 6:if(e&&null!=t.stateNode)ja(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(s(166));if(n=no(to.current),no(Xs.current),ds(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(o=r.nodeValue!==n)&&null!==(e=ns))switch(e.tag){case 3:Jr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,0!==(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Ga(t),null;case 13:if(Ci(ao),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(is&&null!==rs&&0!==(1&t.mode)&&0===(128&t.flags))hs(),ps(),t.flags|=98560,o=!1;else if(o=ds(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(s(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(s(317));o[hi]=t}else ps(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ga(t),o=!1}else null!==ss&&(al(ss),ss=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ao.current)?0===jc&&(jc=3):gl())),null!==t.updateQueue&&(t.flags|=4),Ga(t),null);case 4:return io(),Oa(e,t),null===e&&zr(t.stateNode.containerInfo),Ga(t),null;case 10:return Es(t.type._context),Ga(t),null;case 19:if(Ci(ao),null===(o=t.memoizedState))return Ga(t),null;if(r=0!==(128&t.flags),null===(c=o.rendering))if(r)Va(o,!1);else{if(0!==jc||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(c=co(e))){for(t.flags|=128,Va(o,!1),null!==(r=c.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(c=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=c.childLanes,o.lanes=c.lanes,o.child=c.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=c.memoizedProps,o.memoizedState=c.memoizedState,o.updateQueue=c.updateQueue,o.type=c.type,e=c.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ai(ao,1&ao.current|2),t.child}e=e.sibling}null!==o.tail&&Qe()>Hc&&(t.flags|=128,r=!0,Va(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=co(c))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Va(o,!0),null===o.tail&&"hidden"===o.tailMode&&!c.alternate&&!is)return Ga(t),null}else 2*Qe()-o.renderingStartTime>Hc&&1073741824!==n&&(t.flags|=128,r=!0,Va(o,!1),t.lanes=4194304);o.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=o.last)?n.sibling=c:t.child=c,o.last=c)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qe(),t.sibling=null,n=ao.current,Ai(ao,r?1&n|2:1&n),t):(Ga(t),null);case 22:case 23:return hl(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Oc)&&(Ga(t),6&t.subtreeFlags&&(t.flags|=8192)):Ga(t),null;case 24:case 25:return null}throw Error(s(156,t.tag))}function Za(e,t){switch(ts(t),t.tag){case 1:return Ri(t.type)&&Oi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return io(),Ci(Ti),Ci(Ii),uo(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return oo(t),null;case 13:if(Ci(ao),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));ps()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ci(ao),null;case 4:return io(),null;case 10:return Es(t.type._context),null;case 22:case 23:return hl(),null;default:return null}}Ra=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Oa=function(){},Ma=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,no(Xs.current);var s,o=null;switch(n){case"input":i=Z(e,i),r=Z(e,r),o=[];break;case"select":i=D({},i,{value:void 0}),r=D({},r,{value:void 0}),o=[];break;case"textarea":i=re(e,i),r=re(e,r),o=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Xr)}for(u in ve(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(a.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(c=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&l!==c&&(null!=l||null!=c))if("style"===u)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(o=o||[]).push(u,l)):"children"===u?"string"!==typeof l&&"number"!==typeof l||(o=o||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(a.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&Ur("scroll",e),o||c===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},ja=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ya=!1,Qa=!1,Ja="function"===typeof WeakSet?WeakSet:Set,Xa=null;function ec(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Cl(e,t,r)}else n.current=null}function tc(e,t,n){try{n()}catch(r){Cl(e,t,r)}}var nc=!1;function rc(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,void 0!==s&&tc(t,n,s)}i=i.next}while(i!==r)}}function ic(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function sc(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function oc(e){var t=e.alternate;null!==t&&(e.alternate=null,oc(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[pi],delete t[mi],delete t[gi],delete t[yi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ac(e){return 5===e.tag||3===e.tag||4===e.tag}function cc(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ac(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function lc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Xr));else if(4!==r&&null!==(e=e.child))for(lc(e,t,n),e=e.sibling;null!==e;)lc(e,t,n),e=e.sibling}function uc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(uc(e,t,n),e=e.sibling;null!==e;)uc(e,t,n),e=e.sibling}var dc=null,hc=!1;function pc(e,t,n){for(n=n.child;null!==n;)fc(e,t,n),n=n.sibling}function fc(e,t,n){if(st&&"function"===typeof st.onCommitFiberUnmount)try{st.onCommitFiberUnmount(it,n)}catch(a){}switch(n.tag){case 5:Qa||ec(n,t);case 6:var r=dc,i=hc;dc=null,pc(e,t,n),hc=i,null!==(dc=r)&&(hc?(e=dc,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dc.removeChild(n.stateNode));break;case 18:null!==dc&&(hc?(e=dc,n=n.stateNode,8===e.nodeType?ci(e.parentNode,n):1===e.nodeType&&ci(e,n),zt(e)):ci(dc,n.stateNode));break;case 4:r=dc,i=hc,dc=n.stateNode.containerInfo,hc=!0,pc(e,t,n),dc=r,hc=i;break;case 0:case 11:case 14:case 15:if(!Qa&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,void 0!==o&&(0!==(2&s)||0!==(4&s))&&tc(n,t,o),i=i.next}while(i!==r)}pc(e,t,n);break;case 1:if(!Qa&&(ec(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Cl(n,t,a)}pc(e,t,n);break;case 21:pc(e,t,n);break;case 22:1&n.mode?(Qa=(r=Qa)||null!==n.memoizedState,pc(e,t,n),Qa=r):pc(e,t,n);break;default:pc(e,t,n)}}function mc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ja),t.forEach((function(t){var r=Tl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gc(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,c=a;e:for(;null!==c;){switch(c.tag){case 5:dc=c.stateNode,hc=!1;break e;case 3:case 4:dc=c.stateNode.containerInfo,hc=!0;break e}c=c.return}if(null===dc)throw Error(s(160));fc(o,a,i),dc=null,hc=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(u){Cl(i,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)yc(t,e),t=t.sibling}function yc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gc(t,e),vc(e),4&r){try{rc(3,e,e.return),ic(3,e)}catch(g){Cl(e,e.return,g)}try{rc(5,e,e.return)}catch(g){Cl(e,e.return,g)}}break;case 1:gc(t,e),vc(e),512&r&&null!==n&&ec(n,n.return);break;case 5:if(gc(t,e),vc(e),512&r&&null!==n&&ec(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(g){Cl(e,e.return,g)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,a=null!==n?n.memoizedProps:o,c=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===c&&"radio"===o.type&&null!=o.name&&Q(i,o),we(c,a);var u=we(c,o);for(a=0;a<l.length;a+=2){var d=l[a],h=l[a+1];"style"===d?ge(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):w(i,d,h,u)}switch(c){case"input":J(i,o);break;case"textarea":se(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var f=o.value;null!=f?ne(i,!!o.multiple,f,!1):p!==!!o.multiple&&(null!=o.defaultValue?ne(i,!!o.multiple,o.defaultValue,!0):ne(i,!!o.multiple,o.multiple?[]:"",!1))}i[pi]=o}catch(g){Cl(e,e.return,g)}}break;case 6:if(gc(t,e),vc(e),4&r){if(null===e.stateNode)throw Error(s(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(g){Cl(e,e.return,g)}}break;case 3:if(gc(t,e),vc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{zt(t.containerInfo)}catch(g){Cl(e,e.return,g)}break;case 4:default:gc(t,e),vc(e);break;case 13:gc(t,e),vc(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(zc=Qe())),4&r&&mc(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Qa=(u=Qa)||d,gc(t,e),Qa=u):gc(t,e),vc(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!==(1&e.mode))for(Xa=e,d=e.child;null!==d;){for(h=Xa=d;null!==Xa;){switch(f=(p=Xa).child,p.tag){case 0:case 11:case 14:case 15:rc(4,p,p.return);break;case 1:ec(p,p.return);var m=p.stateNode;if("function"===typeof m.componentWillUnmount){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Cl(r,n,g)}}break;case 5:ec(p,p.return);break;case 22:if(null!==p.memoizedState){Ec(h);continue}}null!==f?(f.return=p,Xa=f):Ec(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,u?"function"===typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(c=h.stateNode,a=void 0!==(l=h.memoizedProps.style)&&null!==l&&l.hasOwnProperty("display")?l.display:null,c.style.display=me("display",a))}catch(g){Cl(e,e.return,g)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){Cl(e,e.return,g)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:gc(t,e),vc(e),4&r&&mc(e);case 21:}}function vc(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ac(n)){var r=n;break e}n=n.return}throw Error(s(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),uc(e,cc(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;lc(e,cc(e),o);break;default:throw Error(s(161))}}catch(a){Cl(e,e.return,a)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function wc(e,t,n){Xa=e,bc(e,t,n)}function bc(e,t,n){for(var r=0!==(1&e.mode);null!==Xa;){var i=Xa,s=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||Ya;if(!o){var a=i.alternate,c=null!==a&&null!==a.memoizedState||Qa;a=Ya;var l=Qa;if(Ya=o,(Qa=c)&&!l)for(Xa=i;null!==Xa;)c=(o=Xa).child,22===o.tag&&null!==o.memoizedState?_c(i):null!==c?(c.return=o,Xa=c):_c(i);for(;null!==s;)Xa=s,bc(s,t,n),s=s.sibling;Xa=i,Ya=a,Qa=l}xc(e)}else 0!==(8772&i.subtreeFlags)&&null!==s?(s.return=i,Xa=s):xc(e)}}function xc(e){for(;null!==Xa;){var t=Xa;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Qa||ic(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Qa)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:gs(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Bs(t,o,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Bs(t,a,n)}break;case 5:var c=t.stateNode;if(null===n&&4&t.flags){n=c;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&zt(h)}}}break;default:throw Error(s(163))}Qa||512&t.flags&&sc(t)}catch(p){Cl(t,t.return,p)}}if(t===e){Xa=null;break}if(null!==(n=t.sibling)){n.return=t.return,Xa=n;break}Xa=t.return}}function Ec(e){for(;null!==Xa;){var t=Xa;if(t===e){Xa=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Xa=n;break}Xa=t.return}}function _c(e){for(;null!==Xa;){var t=Xa;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ic(4,t)}catch(c){Cl(t,n,c)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(c){Cl(t,i,c)}}var s=t.return;try{sc(t)}catch(c){Cl(t,s,c)}break;case 5:var o=t.return;try{sc(t)}catch(c){Cl(t,o,c)}}}catch(c){Cl(t,t.return,c)}if(t===e){Xa=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Xa=a;break}Xa=t.return}}var kc,Cc=Math.ceil,Ac=b.ReactCurrentDispatcher,Sc=b.ReactCurrentOwner,Ic=b.ReactCurrentBatchConfig,Tc=0,Pc=null,Nc=null,Rc=0,Oc=0,Mc=ki(0),jc=0,Lc=null,Dc=0,Bc=0,Uc=0,Fc=null,$c=null,zc=0,Hc=1/0,Wc=null,qc=!1,Vc=null,Gc=null,Kc=!1,Zc=null,Yc=0,Qc=0,Jc=null,Xc=-1,el=0;function tl(){return 0!==(6&Tc)?Qe():-1!==Xc?Xc:Xc=Qe()}function nl(e){return 0===(1&e.mode)?1:0!==(2&Tc)&&0!==Rc?Rc&-Rc:null!==ms.transition?(0===el&&(el=mt()),el):0!==(e=wt)?e:e=void 0===(e=window.event)?16:Yt(e.type)}function rl(e,t,n,r){if(50<Qc)throw Qc=0,Jc=null,Error(s(185));yt(e,n,r),0!==(2&Tc)&&e===Pc||(e===Pc&&(0===(2&Tc)&&(Bc|=n),4===jc&&cl(e,Rc)),il(e,r),1===n&&0===Tc&&0===(1&t.mode)&&(Hc=Qe()+500,Ui&&zi()))}function il(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-ot(s),a=1<<o,c=i[o];-1===c?0!==(a&n)&&0===(a&r)||(i[o]=pt(a,t)):c<=t&&(e.expiredLanes|=a),s&=~a}}(e,t);var r=ht(e,e===Pc?Rc:0);if(0===r)null!==n&&Ke(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ke(n),1===t)0===e.tag?function(e){Ui=!0,$i(e)}(ll.bind(null,e)):$i(ll.bind(null,e)),oi((function(){0===(6&Tc)&&zi()})),n=null;else{switch(bt(r)){case 1:n=Xe;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Pl(n,sl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function sl(e,t){if(Xc=-1,el=0,0!==(6&Tc))throw Error(s(327));var n=e.callbackNode;if(_l()&&e.callbackNode!==n)return null;var r=ht(e,e===Pc?Rc:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=yl(e,r);else{t=r;var i=Tc;Tc|=2;var o=ml();for(Pc===e&&Rc===t||(Wc=null,Hc=Qe()+500,pl(e,t));;)try{wl();break}catch(c){fl(e,c)}xs(),Ac.current=o,Tc=i,null!==Nc?t=0:(Pc=null,Rc=0,t=jc)}if(0!==t){if(2===t&&(0!==(i=ft(e))&&(r=i,t=ol(e,i))),1===t)throw n=Lc,pl(e,0),cl(e,r),il(e,Qe()),n;if(6===t)cl(e,r);else{if(i=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!ar(s(),i))return!1}catch(a){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=yl(e,r))&&(0!==(o=ft(e))&&(r=o,t=ol(e,o))),1===t))throw n=Lc,pl(e,0),cl(e,r),il(e,Qe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(s(345));case 2:case 5:El(e,$c,Wc);break;case 3:if(cl(e,r),(130023424&r)===r&&10<(t=zc+500-Qe())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){tl(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(El.bind(null,e,$c,Wc),t);break}El(e,$c,Wc);break;case 4:if(cl(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-ot(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=Qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cc(r/1960))-r)){e.timeoutHandle=ri(El.bind(null,e,$c,Wc),r);break}El(e,$c,Wc);break;default:throw Error(s(329))}}}return il(e,Qe()),e.callbackNode===n?sl.bind(null,e):null}function ol(e,t){var n=Fc;return e.current.memoizedState.isDehydrated&&(pl(e,t).flags|=256),2!==(e=yl(e,t))&&(t=$c,$c=n,null!==t&&al(t)),e}function al(e){null===$c?$c=e:$c.push.apply($c,e)}function cl(e,t){for(t&=~Uc,t&=~Bc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function ll(e){if(0!==(6&Tc))throw Error(s(327));_l();var t=ht(e,0);if(0===(1&t))return il(e,Qe()),null;var n=yl(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=ol(e,r))}if(1===n)throw n=Lc,pl(e,0),cl(e,t),il(e,Qe()),n;if(6===n)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,El(e,$c,Wc),il(e,Qe()),null}function ul(e,t){var n=Tc;Tc|=1;try{return e(t)}finally{0===(Tc=n)&&(Hc=Qe()+500,Ui&&zi())}}function dl(e){null!==Zc&&0===Zc.tag&&0===(6&Tc)&&_l();var t=Tc;Tc|=1;var n=Ic.transition,r=wt;try{if(Ic.transition=null,wt=1,e)return e()}finally{wt=r,Ic.transition=n,0===(6&(Tc=t))&&zi()}}function hl(){Oc=Mc.current,Ci(Mc)}function pl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Nc)for(n=Nc.return;null!==n;){var r=n;switch(ts(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Oi();break;case 3:io(),Ci(Ti),Ci(Ii),uo();break;case 5:oo(r);break;case 4:io();break;case 13:case 19:Ci(ao);break;case 10:Es(r.type._context);break;case 22:case 23:hl()}n=n.return}if(Pc=e,Nc=e=Ml(e.current,null),Rc=Oc=t,jc=0,Lc=null,Uc=Bc=Dc=0,$c=Fc=null,null!==As){for(t=0;t<As.length;t++)if(null!==(r=(n=As[t]).interleaved)){n.interleaved=null;var i=r.next,s=n.pending;if(null!==s){var o=s.next;s.next=i,r.next=o}n.pending=r}As=null}return e}function fl(e,t){for(;;){var n=Nc;try{if(xs(),ho.current=oa,vo){for(var r=mo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}vo=!1}if(fo=0,yo=go=mo=null,wo=!1,bo=0,Sc.current=null,null===n||null===n.return){jc=1,Lc=t,Nc=null;break}e:{var o=e,a=n.return,c=n,l=t;if(t=Rc,c.flags|=32768,null!==l&&"object"===typeof l&&"function"===typeof l.then){var u=l,d=c,h=d.tag;if(0===(1&d.mode)&&(0===h||11===h||15===h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=ya(a);if(null!==f){f.flags&=-257,va(f,a,c,0,t),1&f.mode&&ga(o,u,t),l=u;var m=(t=f).updateQueue;if(null===m){var g=new Set;g.add(l),t.updateQueue=g}else m.add(l);break e}if(0===(1&t)){ga(o,u,t),gl();break e}l=Error(s(426))}else if(is&&1&c.mode){var y=ya(a);if(null!==y){0===(65536&y.flags)&&(y.flags|=256),va(y,a,c,0,t),fs(ua(l,c));break e}}o=l=ua(l,c),4!==jc&&(jc=2),null===Fc?Fc=[o]:Fc.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Ls(o,fa(0,l,t));break e;case 1:c=l;var v=o.type,w=o.stateNode;if(0===(128&o.flags)&&("function"===typeof v.getDerivedStateFromError||null!==w&&"function"===typeof w.componentDidCatch&&(null===Gc||!Gc.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t,Ls(o,ma(o,c,t));break e}}o=o.return}while(null!==o)}xl(n)}catch(b){t=b,Nc===n&&null!==n&&(Nc=n=n.return);continue}break}}function ml(){var e=Ac.current;return Ac.current=oa,null===e?oa:e}function gl(){0!==jc&&3!==jc&&2!==jc||(jc=4),null===Pc||0===(268435455&Dc)&&0===(268435455&Bc)||cl(Pc,Rc)}function yl(e,t){var n=Tc;Tc|=2;var r=ml();for(Pc===e&&Rc===t||(Wc=null,pl(e,t));;)try{vl();break}catch(i){fl(e,i)}if(xs(),Tc=n,Ac.current=r,null!==Nc)throw Error(s(261));return Pc=null,Rc=0,jc}function vl(){for(;null!==Nc;)bl(Nc)}function wl(){for(;null!==Nc&&!Ze();)bl(Nc)}function bl(e){var t=kc(e.alternate,e,Oc);e.memoizedProps=e.pendingProps,null===t?xl(e):Nc=t,Sc.current=null}function xl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Ka(n,t,Oc)))return void(Nc=n)}else{if(null!==(n=Za(n,t)))return n.flags&=32767,void(Nc=n);if(null===e)return jc=6,void(Nc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Nc=t);Nc=t=e}while(null!==t);0===jc&&(jc=5)}function El(e,t,n){var r=wt,i=Ic.transition;try{Ic.transition=null,wt=1,function(e,t,n,r){do{_l()}while(null!==Zc);if(0!==(6&Tc))throw Error(s(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ot(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}(e,o),e===Pc&&(Nc=Pc=null,Rc=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Kc||(Kc=!0,Pl(tt,(function(){return _l(),null}))),o=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||o){o=Ic.transition,Ic.transition=null;var a=wt;wt=1;var c=Tc;Tc|=4,Sc.current=null,function(e,t){if(ei=Wt,pr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(x){n=null;break e}var a=0,c=-1,l=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==i&&3!==h.nodeType||(c=a+i),h!==o||0!==r&&3!==h.nodeType||(l=a+r),3===h.nodeType&&(a+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++u===i&&(c=a),p===o&&++d===r&&(l=a),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===c||-1===l?null:{start:c,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Wt=!1,Xa=t;null!==Xa;)if(e=(t=Xa).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Xa=e;else for(;null!==Xa;){t=Xa;try{var m=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,y=m.memoizedState,v=t.stateNode,w=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:gs(t.type,g),y);v.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(s(163))}}catch(x){Cl(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,Xa=e;break}Xa=t.return}m=nc,nc=!1}(e,n),yc(n,e),fr(ti),Wt=!!ei,ti=ei=null,e.current=n,wc(n,e,i),Ye(),Tc=c,wt=a,Ic.transition=o}else e.current=n;if(Kc&&(Kc=!1,Zc=e,Yc=i),o=e.pendingLanes,0===o&&(Gc=null),function(e){if(st&&"function"===typeof st.onCommitFiberRoot)try{st.onCommitFiberRoot(it,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),il(e,Qe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(qc)throw qc=!1,e=Vc,Vc=null,e;0!==(1&Yc)&&0!==e.tag&&_l(),o=e.pendingLanes,0!==(1&o)?e===Jc?Qc++:(Qc=0,Jc=e):Qc=0,zi()}(e,t,n,r)}finally{Ic.transition=i,wt=r}return null}function _l(){if(null!==Zc){var e=bt(Yc),t=Ic.transition,n=wt;try{if(Ic.transition=null,wt=16>e?16:e,null===Zc)var r=!1;else{if(e=Zc,Zc=null,Yc=0,0!==(6&Tc))throw Error(s(331));var i=Tc;for(Tc|=4,Xa=e.current;null!==Xa;){var o=Xa,a=o.child;if(0!==(16&Xa.flags)){var c=o.deletions;if(null!==c){for(var l=0;l<c.length;l++){var u=c[l];for(Xa=u;null!==Xa;){var d=Xa;switch(d.tag){case 0:case 11:case 15:rc(8,d,o)}var h=d.child;if(null!==h)h.return=d,Xa=h;else for(;null!==Xa;){var p=(d=Xa).sibling,f=d.return;if(oc(d),d===u){Xa=null;break}if(null!==p){p.return=f,Xa=p;break}Xa=f}}}var m=o.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(null!==g)}}Xa=o}}if(0!==(2064&o.subtreeFlags)&&null!==a)a.return=o,Xa=a;else e:for(;null!==Xa;){if(0!==(2048&(o=Xa).flags))switch(o.tag){case 0:case 11:case 15:rc(9,o,o.return)}var v=o.sibling;if(null!==v){v.return=o.return,Xa=v;break e}Xa=o.return}}var w=e.current;for(Xa=w;null!==Xa;){var b=(a=Xa).child;if(0!==(2064&a.subtreeFlags)&&null!==b)b.return=a,Xa=b;else e:for(a=w;null!==Xa;){if(0!==(2048&(c=Xa).flags))try{switch(c.tag){case 0:case 11:case 15:ic(9,c)}}catch(E){Cl(c,c.return,E)}if(c===a){Xa=null;break e}var x=c.sibling;if(null!==x){x.return=c.return,Xa=x;break e}Xa=c.return}}if(Tc=i,zi(),st&&"function"===typeof st.onPostCommitFiberRoot)try{st.onPostCommitFiberRoot(it,e)}catch(E){}r=!0}return r}finally{wt=n,Ic.transition=t}}return!1}function kl(e,t,n){e=Ms(e,t=fa(0,t=ua(n,t),1),1),t=tl(),null!==e&&(yt(e,1,t),il(e,t))}function Cl(e,t,n){if(3===e.tag)kl(e,e,n);else for(;null!==t;){if(3===t.tag){kl(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Gc||!Gc.has(r))){t=Ms(t,e=ma(t,e=ua(n,e),1),1),e=tl(),null!==t&&(yt(t,1,e),il(t,e));break}}t=t.return}}function Al(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tl(),e.pingedLanes|=e.suspendedLanes&n,Pc===e&&(Rc&n)===n&&(4===jc||3===jc&&(130023424&Rc)===Rc&&500>Qe()-zc?pl(e,0):Uc|=n),il(e,t)}function Sl(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=tl();null!==(e=Ts(e,t))&&(yt(e,t,n),il(e,n))}function Il(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Sl(e,n)}function Tl(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}null!==r&&r.delete(t),Sl(e,n)}function Pl(e,t){return Ge(e,t)}function Nl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rl(e,t,n,r){return new Nl(e,t,n,r)}function Ol(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ml(e,t){var n=e.alternate;return null===n?((n=Rl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jl(e,t,n,r,i,o){var a=2;if(r=e,"function"===typeof e)Ol(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case _:return Ll(n.children,i,o,t);case k:a=8,i|=8;break;case C:return(e=Rl(12,n,t,2|i)).elementType=C,e.lanes=o,e;case T:return(e=Rl(13,n,t,i)).elementType=T,e.lanes=o,e;case P:return(e=Rl(19,n,t,i)).elementType=P,e.lanes=o,e;case O:return Dl(n,i,o,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case A:a=10;break e;case S:a=9;break e;case I:a=11;break e;case N:a=14;break e;case R:a=16,r=null;break e}throw Error(s(130,null==e?e:typeof e,""))}return(t=Rl(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Ll(e,t,n,r){return(e=Rl(7,e,r,t)).lanes=n,e}function Dl(e,t,n,r){return(e=Rl(22,e,r,t)).elementType=O,e.lanes=n,e.stateNode={isHidden:!1},e}function Bl(e,t,n){return(e=Rl(6,e,null,t)).lanes=n,e}function Ul(e,t,n){return(t=Rl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fl(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $l(e,t,n,r,i,s,o,a,c){return e=new Fl(e,t,n,a,c),1===t?(t=1,!0===s&&(t|=8)):t=0,s=Rl(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ns(s),e}function zl(e){if(!e)return Si;e:{if(ze(e=e._reactInternals)!==e||1!==e.tag)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ri(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(s(171))}if(1===e.tag){var n=e.type;if(Ri(n))return ji(e,n,t)}return t}function Hl(e,t,n,r,i,s,o,a,c){return(e=$l(n,r,!0,e,0,s,0,a,c)).context=zl(null),n=e.current,(s=Os(r=tl(),i=nl(n))).callback=void 0!==t&&null!==t?t:null,Ms(n,s,i),e.current.lanes=i,yt(e,i,r),il(e,r),e}function Wl(e,t,n,r){var i=t.current,s=tl(),o=nl(i);return n=zl(n),null===t.context?t.context=n:t.pendingContext=n,(t=Os(s,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Ms(i,t,o))&&(rl(e,i,o,s),js(e,i,o)),o}function ql(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gl(e,t){Vl(e,t),(e=e.alternate)&&Vl(e,t)}kc=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ti.current)ba=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return ba=!1,function(e,t,n){switch(t.tag){case 3:Pa(t),ps();break;case 5:so(t);break;case 1:Ri(t.type)&&Li(t);break;case 4:ro(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ai(ys,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ai(ao,1&ao.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Ba(e,t,n):(Ai(ao,1&ao.current),null!==(e=qa(e,t,n))?e.sibling:null);Ai(ao,1&ao.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Ha(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ai(ao,ao.current),r)break;return null;case 22:case 23:return t.lanes=0,Ca(e,t,n)}return qa(e,t,n)}(e,t,n);ba=0!==(131072&e.flags)}else ba=!1,is&&0!==(1048576&t.flags)&&Xi(t,Vi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wa(e,t),e=t.pendingProps;var i=Ni(t,Ii.current);ks(t,n),i=ko(null,t,r,e,i,n);var o=Co();return t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ri(r)?(o=!0,Li(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ns(t),i.updater=$s,t.stateNode=i,i._reactInternals=t,qs(t,r,e,n),t=Ta(null,t,r,!0,o,n)):(t.tag=0,is&&o&&es(t),xa(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wa(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"===typeof e)return Ol(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===I)return 11;if(e===N)return 14}return 2}(r),e=gs(r,e),i){case 0:t=Sa(null,t,r,e,n);break e;case 1:t=Ia(null,t,r,e,n);break e;case 11:t=Ea(null,t,r,e,n);break e;case 14:t=_a(null,t,r,gs(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Sa(e,t,r,i=t.elementType===r?i:gs(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ia(e,t,r,i=t.elementType===r?i:gs(r,i),n);case 3:e:{if(Pa(t),null===e)throw Error(s(387));r=t.pendingProps,i=(o=t.memoizedState).element,Rs(e,t),Ds(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Na(e,t,r,n,i=ua(Error(s(423)),t));break e}if(r!==i){t=Na(e,t,r,n,i=ua(Error(s(424)),t));break e}for(rs=li(t.stateNode.containerInfo.firstChild),ns=t,is=!0,ss=null,n=Qs(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ps(),r===i){t=qa(e,t,n);break e}xa(e,t,r,n)}t=t.child}return t;case 5:return so(t),null===e&&ls(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,ni(r,i)?a=null:null!==o&&ni(r,o)&&(t.flags|=32),Aa(e,t),xa(e,t,a,n),t.child;case 6:return null===e&&ls(t),null;case 13:return Ba(e,t,n);case 4:return ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ys(t,null,r,n):xa(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ea(e,t,r,i=t.elementType===r?i:gs(r,i),n);case 7:return xa(e,t,t.pendingProps,n),t.child;case 8:case 12:return xa(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Ai(ys,r._currentValue),r._currentValue=a,null!==o)if(ar(o.value,a)){if(o.children===i.children&&!Ti.current){t=qa(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var c=o.dependencies;if(null!==c){a=o.child;for(var l=c.firstContext;null!==l;){if(l.context===r){if(1===o.tag){(l=Os(-1,n&-n)).tag=2;var u=o.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),_s(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(s(341));a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),_s(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}xa(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ks(t,n),r=r(i=Cs(i)),t.flags|=1,xa(e,t,r,n),t.child;case 14:return i=gs(r=t.type,t.pendingProps),_a(e,t,r,i=gs(r.type,i),n);case 15:return ka(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gs(r,i),Wa(e,t),t.tag=1,Ri(r)?(e=!0,Li(t)):e=!1,ks(t,n),Hs(t,r,i),qs(t,r,i,n),Ta(null,t,r,!0,e,n);case 19:return Ha(e,t,n);case 22:return Ca(e,t,n)}throw Error(s(156,t.tag))};var Kl="function"===typeof reportError?reportError:function(e){console.error(e)};function Zl(e){this._internalRoot=e}function Yl(e){this._internalRoot=e}function Ql(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Xl(){}function eu(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if("function"===typeof i){var a=i;i=function(){var e=ql(o);a.call(e)}}Wl(t,o,e,i)}else o=function(e,t,n,r,i){if(i){if("function"===typeof r){var s=r;r=function(){var e=ql(o);s.call(e)}}var o=Hl(t,r,e,0,null,!1,0,"",Xl);return e._reactRootContainer=o,e[fi]=o.current,zr(8===e.nodeType?e.parentNode:e),dl(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var a=r;r=function(){var e=ql(c);a.call(e)}}var c=$l(e,0,!1,null,0,!1,0,"",Xl);return e._reactRootContainer=c,e[fi]=c.current,zr(8===e.nodeType?e.parentNode:e),dl((function(){Wl(t,c,n,r)})),c}(n,t,e,i,r);return ql(o)}Yl.prototype.render=Zl.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(s(409));Wl(e,t,null,null)},Yl.prototype.unmount=Zl.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dl((function(){Wl(null,e,null,null)})),t[fi]=null}},Yl.prototype.unstable_scheduleHydration=function(e){if(e){var t=kt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ot.length&&0!==t&&t<Ot[n].priority;n++);Ot.splice(n,0,e),0===n&&Dt(e)}},xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(vt(t,1|n),il(t,Qe()),0===(6&Tc)&&(Hc=Qe()+500,zi()))}break;case 13:dl((function(){var t=Ts(e,1);if(null!==t){var n=tl();rl(t,e,1,n)}})),Gl(e,1)}},Et=function(e){if(13===e.tag){var t=Ts(e,134217728);if(null!==t)rl(t,e,134217728,tl());Gl(e,134217728)}},_t=function(e){if(13===e.tag){var t=nl(e),n=Ts(e,t);if(null!==n)rl(n,e,t,tl());Gl(e,t)}},kt=function(){return wt},Ct=function(e,t){var n=wt;try{return wt=e,t()}finally{wt=n}},Ee=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=xi(r);if(!i)throw Error(s(90));G(r),J(r,i)}}}break;case"textarea":se(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ie=ul,Te=dl;var tu={usingClientEntryPoint:!1,Events:[wi,bi,xi,Ae,Se,ul]},nu={findFiberByHostInstance:vi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ru={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qe(e))?null:e.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var iu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iu.isDisabled&&iu.supportsFiber)try{it=iu.inject(ru),st=iu}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ql(t))throw Error(s(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:E,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Ql(e))throw Error(s(299));var n=!1,r="",i=Kl;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=$l(e,1,!1,null,0,n,0,r,i),e[fi]=t.current,zr(8===e.nodeType?e.parentNode:e),new Zl(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return e=null===(e=qe(t))?null:e.stateNode},t.flushSync=function(e){return dl(e)},t.hydrate=function(e,t,n){if(!Jl(t))throw Error(s(200));return eu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Ql(e))throw Error(s(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=Kl;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=Hl(t,null,e,1,null!=n?n:null,i,0,o,a),e[fi]=t.current,zr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Yl(t)},t.render=function(e,t,n){if(!Jl(t))throw Error(s(200));return eu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Jl(e))throw Error(s(40));return!!e._reactRootContainer&&(dl((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[fi]=null}))})),!0)},t.unstable_batchedUpdates=ul,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Jl(n))throw Error(s(200));if(null==e||void 0===e._reactInternals)throw Error(s(38));return eu(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},8361:(e,t)=>{const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)n[t]=e,r[e]=t,e<<=1,256&e&&(e^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return r[e]},t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[r[e]+r[t]]}},8383:(e,t)=>
5604{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var o=i.apply(null,n);o&&e.push(o)}}else if("object"===s){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},8415:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&"undefined"!==typeof e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(r){return n}}},8438:(e,t,n)=>{"use strict";var r=n(1470),i=n(5070),s=function(){function e(e,t,n,i){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var s=r.hmac(this._hash,n,t);this._hmac=new r.HMAC(e,s),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),i.wipe(this._buffer),i.wipe(this._counter),this._bufpos=0},e}();t.i=s},8496:(e,t)=>{const n=[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];t.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],o=e[3]^e[13]^e[23]^e[33]^e[43],a=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],u=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],h=e[9]^e[19]^e[29]^e[39]^e[49];let p=d^(s<<1|o>>>31),f=h^(o<<1|s>>>31);const m=e[0]^p,g=e[1]^f,y=e[10]^p,v=e[11]^f,w=e[20]^p,b=e[21]^f,x=e[30]^p,E=e[31]^f,_=e[40]^p,k=e[41]^f;p=r^(a<<1|c>>>31),f=i^(c<<1|a>>>31);const C=e[2]^p,A=e[3]^f,S=e[12]^p,I=e[13]^f,T=e[22]^p,P=e[23]^f,N=e[32]^p,R=e[33]^f,O=e[42]^p,M=e[43]^f;p=s^(l<<1|u>>>31),f=o^(u<<1|l>>>31);const j=e[4]^p,L=e[5]^f,D=e[14]^p,B=e[15]^f,U=e[24]^p,F=e[25]^f,$=e[34]^p,z=e[35]^f,H=e[44]^p,W=e[45]^f;p=a^(d<<1|h>>>31),f=c^(h<<1|d>>>31);const q=e[6]^p,V=e[7]^f,G=e[16]^p,K=e[17]^f,Z=e[26]^p,Y=e[27]^f,Q=e[36]^p,J=e[37]^f,X=e[46]^p,ee=e[47]^f;p=l^(r<<1|i>>>31),f=u^(i<<1|r>>>31);const te=e[8]^p,ne=e[9]^f,re=e[18]^p,ie=e[19]^f,se=e[28]^p,oe=e[29]^f,ae=e[38]^p,ce=e[39]^f,le=e[48]^p,ue=e[49]^f,de=m,he=g,pe=v<<4|y>>>28,fe=y<<4|v>>>28,me=w<<3|b>>>29,ge=b<<3|w>>>29,ye=E<<9|x>>>23,ve=x<<9|E>>>23,we=_<<18|k>>>14,be=k<<18|_>>>14,xe=C<<1|A>>>31,Ee=A<<1|C>>>31,_e=I<<12|S>>>20,ke=S<<12|I>>>20,Ce=T<<10|P>>>22,Ae=P<<10|T>>>22,Se=R<<13|N>>>19,Ie=N<<13|R>>>19,Te=O<<2|M>>>30,Pe=M<<2|O>>>30,Ne=L<<30|j>>>2,Re=j<<30|L>>>2,Oe=D<<6|B>>>26,Me=B<<6|D>>>26,je=F<<11|U>>>21,Le=U<<11|F>>>21,De=$<<15|z>>>17,Be=z<<15|$>>>17,Ue=W<<29|H>>>3,Fe=H<<29|W>>>3,$e=q<<28|V>>>4,ze=V<<28|q>>>4,He=K<<23|G>>>9,We=G<<23|K>>>9,qe=Z<<25|Y>>>7,Ve=Y<<25|Z>>>7,Ge=Q<<21|J>>>11,Ke=J<<21|Q>>>11,Ze=ee<<24|X>>>8,Ye=X<<24|ee>>>8,Qe=te<<27|ne>>>5,Je=ne<<27|te>>>5,Xe=re<<20|ie>>>12,et=ie<<20|re>>>12,tt=oe<<7|se>>>25,nt=se<<7|oe>>>25,rt=ae<<8|ce>>>24,it=ce<<8|ae>>>24,st=le<<14|ue>>>18,ot=ue<<14|le>>>18;e[0]=de^~_e&je,e[1]=he^~ke&Le,e[10]=$e^~Xe&me,e[11]=ze^~et&ge,e[20]=xe^~Oe&qe,e[21]=Ee^~Me&Ve,e[3
56040]=Qe^~pe&Ce,e[31]=Je^~fe&Ae,e[40]=Ne^~He&tt,e[41]=Re^~We&nt,e[2]=_e^~je&Ge,e[3]=ke^~Le&Ke,e[12]=Xe^~me&Se,e[13]=et^~ge&Ie,e[22]=Oe^~qe&rt,e[23]=Me^~Ve&it,e[32]=pe^~Ce&De,e[33]=fe^~Ae&Be,e[42]=He^~tt&ye,e[43]=We^~nt&ve,e[4]=je^~Ge&st,e[5]=Le^~Ke&ot,e[14]=me^~Se&Ue,e[15]=ge^~Ie&Fe,e[24]=qe^~rt&we,e[25]=Ve^~it&be,e[34]=Ce^~De&Ze,e[35]=Ae^~Be&Ye,e[44]=tt^~ye&Te,e[45]=nt^~ve&Pe,e[6]=Ge^~st&de,e[7]=Ke^~ot&he,e[16]=Se^~Ue&$e,e[17]=Ie^~Fe&ze,e[26]=rt^~we&xe,e[27]=it^~be&Ee,e[36]=De^~Ze&Qe,e[37]=Be^~Ye&Je,e[46]=ye^~Te&Ne,e[47]=ve^~Pe&Re,e[8]=st^~de&_e,e[9]=ot^~he&ke,e[18]=Ue^~$e&Xe,e[19]=Fe^~ze&et,e[28]=we^~xe&Oe,e[29]=be^~Ee&Me,e[38]=Ze^~Qe&pe,e[39]=Ye^~Je&fe,e[48]=Te^~Ne&He,e[49]=Pe^~Re&We,e[0]^=n[2*t],e[1]^=n[2*t+1]}}},8582:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScopedLocalStorage=void 0;class n{constructor(e,t){this.scope=e,this.module=t}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),t=[];for(let n=0;n<localStorage.length;n++){const r=localStorage.key(n);"string"===typeof r&&r.startsWith(e)&&t.push(r)}t.forEach((e=>localStorage.removeItem(e)))}scopedKey(e){return`-${this.scope}${this.module?`:${this.module}`:""}:${e}`}static clearAll(){new n("CBWSDK").clear(),new n("walletlink").clear()}}t.ScopedLocalStorage=n},8598:(e,t,n)=>{"use strict";n.d(t,{A:()=>We});var r={};n.r(r),n.d(r,{identity:()=>I});var i={};n.r(i),n.d(i,{base2:()=>T});var s={};n.r(s),n.d(s,{base8:()=>P});var o={};n.r(o),n.d(o,{base10:()=>N});var a={};n.r(a),n.d(a,{base16:()=>R,base16upper:()=>O});var c={};n.r(c),n.d(c,{base32:()=>M,base32hex:()=>B,base32hexpad:()=>F,base32hexpadupper:()=>$,base32hexupper:()=>U,base32pad:()=>L,base32padupper:()=>D,base32upper:()=>j,base32z:()=>z});var l={};n.r(l),n.d(l,{base36:()=>H,base36upper:()=>W});var u={};n.r(u),n.d(u,{base58btc:()=>q,base58flickr:()=>V});var d={};n.r(d),n.d(d,{base64:()=>G,base64pad:()=>K,base64url:()=>Z,base64urlpad:()=>Y});var h={};n.r(h),n.d(h,{base256emoji:()=>ee});var p={};n.r(p),n.d(p,{sha256:()=>Ce,sha512:()=>Ae});var f={};n.r(f),n.d(f,{identity:()=>Ie});var m={};n.r(m),n.d(m,{code:()=>Pe,decode:()=>Re,encode:()=>Ne,name:()=>Te});var g={};n.r(g),n.d(g,{code:()=>Le,decode:()=>Be,encode:()=>De,name:()=>je});var y=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var s=e.charAt(i),o=s.charCodeAt(0);if(255!==n[o])throw new TypeError(s+" is ambiguous");n[o]=i}var a=e.length,c=e.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function d(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var s=(e.length-t)*l+1>>>0,o=new Uint8Array(s);e[t];){var u=n[e.charCodeAt(t)];if(255===u)return;for(var d=0,h=s-1;(0!==u||d<i)&&-1!==h;h--,d++)u+=a*o[h]>>>0,o[h]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=s-i;p!==s&&0===o[p];)p++;for(var f=new Uint8Array(r+(s-p)),m=r;p!==s;)f[m++]=o[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,s=t.length;i!==s&&0===t[i];)i++,n++;for(var o=(s-i)*u+1>>>0,l=new Uint8Array(o);i!==s;){for(var d=t[i],h=0,p=o-1;(0!==d||h<r)&&-1!==p;p--,h++)d+=256*l[p]>>>0,l[p]=d%a>>>0,d=d/a>>>0;if(0!==d)throw new Error("Non-zero carry");r=h,i++}for(var f=o-r;f!==o&&0===l[f];)f++;for(var m=c.repeat(n);f<o;++f)m+=e.charAt(l[f]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}};const v=y,w=(new Uint8Array(0),e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")});class b{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class x{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"===typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name}
5604 decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return _(this,e)}}class E{constructor(e){this.decoders=e}or(e){return _(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const _=(e,t)=>new E({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class k{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new b(e,t,n),this.decoder=new x(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const C=e=>{let{name:t,prefix:n,encode:r,decode:i}=e;return new k(t,n,r,i)},A=e=>{let{prefix:t,name:n,alphabet:r}=e;const{encode:i,decode:s}=v(r,n);return C({prefix:t,name:n,encode:i,decode:e=>w(s(e))})},S=e=>{let{name:t,prefix:n,bitsPerChar:r,alphabet:i}=e;return C({prefix:n,name:t,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let s="",o=0,a=0;for(let c=0;c<e.length;++c)for(a=a<<8|e[c],o+=8;o>n;)o-=n,s+=t[i&a>>o];if(o&&(s+=t[i&a<<n-o]),r)for(;s.length*n&7;)s+="=";return s})(e,i,r),decode:e=>((e,t,n,r)=>{const i={};for(let u=0;u<t.length;++u)i[t[u]]=u;let s=e.length;for(;"="===e[s-1];)--s;const o=new Uint8Array(s*n/8|0);let a=0,c=0,l=0;for(let u=0;u<s;++u){const t=i[e[u]];if(void 0===t)throw new SyntaxError(`Non-${r} character`);c=c<<n|t,a+=n,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=n||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o})(e,i,r,t)})},I=C({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),T=S({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),P=S({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),N=A({prefix:"9",name:"base10",alphabet:"0123456789"}),R=S({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),O=S({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),M=S({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),j=S({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),L=S({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),D=S({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),B=S({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),U=S({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),F=S({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),$=S({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),z=S({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),H=A({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),W=A({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),q=A({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),V=A({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),G=S({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),K=S({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Z=S({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Y=S({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Q=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),J=Q.reduce(((e,t,n)=>(e[n]=t,e)),[]),X=Q.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const ee=C({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=J[t]),"")},decode:function(e){const t=[];for(const n of e){const e=X[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var te=function e(t,n,r){n=n||[];var i=r=r||0;for(;t>=ie;)n[r++]=255&t|ne,t/=128;for(;t&re;)n[r++]=255&t|ne,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},ne=128,re=-128,ie=Math.pow(2,31);
5604var se=function e(t,n){var r,i=0,s=0,o=n=n||0,a=t.length;do{if(o>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[o++],i+=s<28?(r&ae)<<s:(r&ae)*Math.pow(2,s),s+=7}while(r>=oe);return e.bytes=o-n,i},oe=128,ae=127;var ce=Math.pow(2,7),le=Math.pow(2,14),ue=Math.pow(2,21),de=Math.pow(2,28),he=Math.pow(2,35),pe=Math.pow(2,42),fe=Math.pow(2,49),me=Math.pow(2,56),ge=Math.pow(2,63);const ye={encode:te,decode:se,encodingLength:function(e){return e<ce?1:e<le?2:e<ue?3:e<de?4:e<he?5:e<pe?6:e<fe?7:e<me?8:e<ge?9:10}},ve=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return ye.encode(e,t,n),t},we=e=>ye.encodingLength(e),be=(e,t)=>{const n=t.byteLength,r=we(e),i=r+we(n),s=new Uint8Array(i+n);return ve(e,s,0),ve(n,s,r),s.set(t,i),new xe(e,n,t,s)};class xe{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const Ee=e=>{let{name:t,code:n,encode:r}=e;return new _e(t,n,r)};class _e{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?be(this.code,t):t.then((e=>be(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ke=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Ce=Ee({name:"sha2-256",code:18,encode:ke("SHA-256")}),Ae=Ee({name:"sha2-512",code:19,encode:ke("SHA-512")}),Se=w,Ie={code:0,name:"identity",encode:Se,digest:e=>be(0,Se(e))},Te="raw",Pe=85,Ne=e=>w(e),Re=e=>w(e),Oe=new TextEncoder,Me=new TextDecoder,je="json",Le=512,De=e=>Oe.encode(JSON.stringify(e)),Be=e=>JSON.parse(Me.decode(e));Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom");Symbol.for("@ipld/js-cid/CID");const Ue={...r,...i,...s,...o,...a,...c,...l,...u,...d,...h};var Fe=n(8966);function $e(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const ze=$e("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),He=$e("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{e=e.substring(1);const t=(0,Fe.K)(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),We={utf8:ze,"utf-8":ze,hex:Ue.base16,latin1:He,ascii:He,binary:He,...Ue}},8647:(e,t,n)=>{const r=n(794),i=n(6580);function s(e){this.mode=r.KANJI,this.data=e}s.getBitsLength=function(e){return 13*e},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=i.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=s},8649:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkHTTP=void 0;t.WalletLinkHTTP=class{constructor(e,t,n){this.linkAPIUrl=e,this.sessionId=t;const r=`${t}:${n}`;this.auth=`Basic ${btoa(r)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map((e=>fetch(`${this.linkAPIUrl}/events/${e.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}})))).catch((e=>console.error("Unabled to mark event as failed:",e)))}async fetchUnseenEvents(){var e;const t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){const{events:n,error:r}=await t.json();if(r)throw new Error(`Check unseen events failed: ${r}`);const i=null!==(e=null===n||void 0===n?void 0:n.filter((e=>"Web3Response"===e.event)).map((e=>({type:"Event",sessionId:this.sessionId,eventId:e.id,event:e.event,data:e.data}))))&&void 0!==e?e:[];return this.markUnseenEventsAsSeen(i),i}throw new Error(`Check unseen events failed: ${t.status}`)}}},8686:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__assign:()=>s,__asyncDelegator:()=>b,__asyncGenerator:()=>w,__asyncValues:()=>x,__await:()=>v,__awaiter:()=>u,__classPrivateFieldGet:()=>C,__classPrivateFieldSet:()=>A,__createBinding:()=>h,__decorate:()=>a,__exportStar:()=>p,__extends:()=>i,__generator:()=>d,__importDefault:()=>k,__importStar:()=>
5604_,__makeTemplateObject:()=>E,__metadata:()=>l,__param:()=>c,__read:()=>m,__rest:()=>o,__spread:()=>g,__spreadArrays:()=>y,__values:()=>f});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}function c(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(a){s=[6,a],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function h(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function f(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return o}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var s=arguments[t],o=0,a=s.length;o<a;o++,i++)r[i]=s[o];return r}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){s.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,l):u(s[0][2],n)}catch(r){u(s[0][3],r)}var n}function c(e){a("next",e)}function l(e){a("throw",e)}function u(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=f(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
5604function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function k(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},8798:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},8812:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCWSigner=void 0;const r=n(2908),i=n(3322),s=n(5722),o=n(8114),a=n(4105);t.SCWSigner=class{constructor(e){this.metadata=e.metadata,this.postMessageToPopup=e.postMessageToPopup,this.keyManager=new r.SCWKeyManager,this.stateManager=new i.SCWStateManager({appChainIds:this.metadata.appChainIds,updateListener:e.updateListener}),this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(){const e=await this.createRequestMessage({handshake:{method:"eth_requestAccounts",params:this.metadata}}),t=await this.postMessageToPopup(e);if("failure"in t.content)throw t.content.failure;const n=await(0,a.importKeyFromHexString)("public",t.sender);await this.keyManager.setPeerPublicKey(n);const r=await this.decryptResponseMessage(t);this.updateInternalState({method:"eth_requestAccounts"},r);const i=r.result;if("error"in i)throw i.error;return this.stateManager.accounts}async request(e){const t=this.tryLocalHandling(e);if(void 0!==t){if(t instanceof Error)throw t;return t}const n=await this.sendEncryptedRequest(e),r=await this.decryptResponseMessage(n);this.updateInternalState(e,r);const i=r.result;if("error"in i)throw i.error;return i.value}async disconnect(){this.stateManager.clear(),await this.keyManager.clear()}tryLocalHandling(e){var t;switch(e.method){case"wallet_switchEthereumChain":{const n=e.params;if(!n||!(null===(t=n[0])||void 0===t?void 0:t.chainId))throw s.standardErrors.rpc.invalidParams();const r=(0,o.ensureIntNumber)(n[0].chainId);return this.stateManager.switchChain(r)?null:void 0}case"wallet_getCapabilities":{const e=this.stateManager.walletCapabilities;if(!e)throw s.standardErrors.provider.unauthorized("No wallet capabilities found, please disconnect and reconnect");return e}default:return}}async sendEncryptedRequest(e){const t=await this.keyManager.getSharedSecret();if(!t)throw s.standardErrors.provider.unauthorized("No valid session found, try requestAccounts before other methods");const n=await(0,a.encryptContent)({action:e,chainId:this.stateManager.activeChain.id},t),r=await this.createRequestMessage({encrypted:n});return this.postMessageToPopup(r)}async createRequestMessage(e){const t=await(0,a.exportKeyToHexString)("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:t,content:e,timestamp:new Date}}async decryptResponseMessage(e){const t=e.content;if("failure"in t)throw t.failure;const n=await this.keyManager.getSharedSecret();if(!n)throw s.standardErrors.provider.unauthorized("Invalid session");return(0,a.decryptContent)(t.encrypted,n)}updateInternalState(e,t){var n,r;const i=null===(n=t.data)||void 0===n?void 0:n.chains;i&&this.stateManager.updateAvailableChains(i);const s=null===(r=t.data)||void 0===r?void 0:r.capabilities;s&&this.stateManager.updateWalletCapabilities(s);const a=t.result;if(!("error"in a))switch(e.method){case"eth_requestAccounts":{const e=a.value;this.stateManager.updateAccounts(e);break}case"wallet_switchEthereumChain":{if(null!==a.value)return;const t=e.params,n=(0,o.ensureIntNumber)(t[0].chainId);this.stateManager.switchChain(n);break}}}}},8867:(e,t)=>{"use strict";function n(e){if(Array.isArray(e)){const t=[];let r=0;for(let i=0;i<e.length;i++){const s=n(e[i]);t.push(s),r+=s.length}return h(s(r,192),...t)}const t=g(e);return 1===t.length&&t[0]<128?t:h(s(t.length,128),t)}function r(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function i(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return u(l(e))}function s(e,t){if(e<56)return Uint8Array.from([e+t]);const n=f(e),r=f(t+55+n.length/2);return Uint8Array.from(d(r+n))}function o(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("undefined"===typeof e||null===e||0===e.length)return Uint8Array.from([]);const n=a(g(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function a(e){let t,n,s,o,c;const l=[],u=e[0];if(u<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(u<=183){if(t=u-127,s=128===u?Uint8Array.from([]):r(e,1,t),2===t&&s[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:s,remainder:e.slice(t)}}if(u<=191){if(n=u-182,e.length-1<n)throw new Error("invalid RLP: n
5604ot enough bytes for string length");if(t=i(r(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return s=r(e,n,t+n),{data:s,remainder:e.slice(t+n)}}if(u<=247){for(t=u-191,o=r(e,1,t);o.length;)c=a(o),l.push(c.data),o=c.remainder;return{data:l,remainder:e.slice(t)}}{if(n=u-246,t=i(r(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const s=n+t;if(s>e.length)throw new Error("invalid RLP: total length is larger than the data");for(o=r(e,n,s);o.length;)c=a(o),l.push(c.data),o=c.remainder;return{data:l,remainder:e.slice(s)}}}t.Tj=void 0;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function l(e){let t="";for(let n=0;n<e.length;n++)t+=c[e[n]];return t}function u(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function d(e){if("string"!==typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=2*n;t[n]=u(e.slice(r,r+2))}return t}function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length)return t[0];const r=t.reduce(((e,t)=>e+t.length),0),i=new Uint8Array(r);for(let s=0,o=0;s<t.length;s++){const e=t[s];i.set(e,o),o+=e.length}return i}function p(e){return(new TextEncoder).encode(e)}function f(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function m(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function g(e){if(e instanceof Uint8Array)return e;if("string"===typeof e)return m(e)?d((t="string"!==typeof(n=e)?n:m(n)?n.slice(2):n).length%2?`0${t}`:t):p(e);var t,n;if("number"===typeof e||"bigint"===typeof e)return e?d(f(e)):Uint8Array.from([]);if(null===e||void 0===e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.Tj={encode:n,decode:o}},8881:e=>{"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),s=0;s<r.length;s++){var o=r[s],a=e[o];(i?-1!==t.indexOf(o):t(o,a,e))&&(n[o]=a)}return n}},8966:(e,t,n)=>{"use strict";function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}n.d(t,{K:()=>r})},8981:e=>{"use strict";var t,n="object"===typeof Reflect?Reflect:null,r=n&&"function"===typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,s),r(n)}function s(){"function"===typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"===typeof e.on&&m(e,"error",t,n)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,s,o;if(a(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void 0===o)o=s[t]=n,++e._eventsCount;else if("function"===typeof o?o=s[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,function(e){console&&console.warn&&console.warn(e)}(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):f(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}function f(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"===typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!==typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(s){r.once&&e.removeEventListener(t,i),n(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o}
5604,set:function(e){if("number"!==typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=s[e];if(void 0===c)return!1;if("function"===typeof c)r(c,this,t);else{var l=c.length,u=f(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,s,o;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!==typeof n){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(i=s[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},9055:(e,t,n)=>{"use strict";n.d(t,{x:()=>i});var r=n(8966);function i(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=(0,r.K)(t);let i=0;for(const r of e)n.set(r,i),i+=r.length;return n}},9064:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8686);r.__exportStar(n(4754),t),r.__exportStar(n(4059),t)},9248:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},9432:()=>{},9477:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});var r=n(8598);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const n=r.A[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):globalThis.Buffer.from(e,"utf8")}},9489:(e,t,n)=>{"use strict";n.d(t,{XX:()=>z,c0:()=>C,ge:()=>F,qy:()=>k,s6:()=>A});const r=globalThis,i=r.trustedTypes,s=i?i.createPolicy("lit-html",{createHTML:e=>e}):void 0,o="$lit$",a=`lit$${Math.random().toFixed(9).slice(2)}$`,c="?"+a,l=`<${c}>`,u=document,d=()=>u.createComment(""),h=e=>null===e||"object"!=typeof e&&"function"!=typeof e,p=Array.isArray,f=e=>
vendor: 4,525 bytes, line 5604
5604p(e)||"function"==typeof e?.[Symbol.iterator],m="[ \t\n\f\r]",g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,v=/>/g,w=RegExp(`>|${m}(?:([^\\s"'>=/]+)(${m}*=${m}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),b=/'/g,x=/"/g,E=/^(?:script|style|textarea|title)$/i,_=e=>function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return{_$litType$:e,strings:t,values:r}},k=_(1),C=(_(2),Symbol.for("lit-noChange")),A=Symbol.for("lit-nothing"),S=new WeakMap,I=u.createTreeWalker(u,129);function T(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(t):t}const P=(e,t)=>{const n=e.length-1,r=[];let i,s=2===t?"<svg>":"",c=g;for(let u=0;u<n;u++){const t=e[u];let n,d,h=-1,p=0;for(;p<t.length&&(c.lastIndex=p,d=c.exec(t),null!==d);)p=c.lastIndex,c===g?"!--"===d[1]?c=y:void 0!==d[1]?c=v:void 0!==d[2]?(E.test(d[2])&&(i=RegExp("</"+d[2],"g")),c=w):void 0!==d[3]&&(c=w):c===w?">"===d[0]?(c=i??g,h=-1):void 0===d[1]?h=-2:(h=c.lastIndex-d[2].length,n=d[1],c=void 0===d[3]?w:'"'===d[3]?x:b):c===x||c===b?c=w:c===y||c===v?c=g:(c=w,i=void 0);const f=c===w&&e[u+1].startsWith("/>")?" ":"";s+=c===g?t+l:h>=0?(r.push(n),t.slice(0,h)+o+t.slice(h)+a+f):t+a+(-2===h?u:f)}return[T(e,s+(e[n]||"<?>")+(2===t?"</svg>":"")),r]};class N{constructor(e,t){let n,{strings:r,_$litType$:s}=e;this.parts=[];let l=0,u=0;const h=r.length-1,p=this.parts,[f,m]=P(r,s);if(this.el=N.createElement(f,t),I.currentNode=this.el.content,2===s){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=I.nextNode())&&p.length<h;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(o)){const t=m[u++],r=n.getAttribute(e).split(a),i=/([.?@])?(.*)/.exec(t);p.push({type:1,index:l,name:i[2],strings:r,ctor:"."===i[1]?L:"?"===i[1]?D:"@"===i[1]?B:j}),n.removeAttribute(e)}else e.startsWith(a)&&(p.push({type:6,index:l}),n.removeAttribute(e));if(E.test(n.tagName)){const e=n.textContent.split(a),t=e.length-1;if(t>0){n.textContent=i?i.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],d()),I.nextNode(),p.push({type:2,index:++l});n.append(e[t],d())}}}else if(8===n.nodeType)if(n.data===c)p.push({type:2,index:l});else{let e=-1;for(;-1!==(e=n.data.indexOf(a,e+1));)p.push({type:7,index:l}),e+=a.length-1}l++}}static createElement(e,t){const n=u.createElement("template");return n.innerHTML=e,n}}function R(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3?arguments[3]:void 0;if(t===C)return t;let i=void 0!==r?n._$Co?.[r]:n._$Cl;const s=h(t)?void 0:t._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),void 0===s?i=void 0:(i=new s(e),i._$AT(e,n,r)),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(t=R(e,i._$AS(e,t.values),i,r)),t}class O{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??u).importNode(t,!0);I.currentNode=r;let i=I.nextNode(),s=0,o=0,a=n[0];for(;void 0!==a;){if(s===a.index){let t;2===a.type?t=new M(i,i.nextSibling,this,e):1===a.type?t=new a.ctor(i,a.name,a.strings,this,e):6===a.type&&(t=new U(i,this,e)),this._$AV.push(t),a=n[++o]}s!==a?.index&&(i=I.nextNode(),s++)}return I.currentNode=u,r}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e){e=R(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),h(e)?e===A||null==e||""===e?(this._$AH!==A&&this._$AR(),this._$AH=A):e!==this._$AH&&e!==C&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):f(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==A&&h(this._$AH)?this._$AA.nextSibling.data=e:this.T(u.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,r="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=N.createElement(T(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);
5604else{const e=new O(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=S.get(e.strings);return void 0===t&&S.set(e.strings,t=new N(e)),t}k(e){p(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,r=0;for(const i of e)r===t.length?t.push(n=new M(this.S(d()),this.S(d()),this,this.options)):n=t[r],n._$AI(i),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,t=arguments.length>1?arguments[1]:void 0;for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class j{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=A,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=A}_$AI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=this.strings;let s=!1;if(void 0===i)e=R(this,e,t,0),s=!h(e)||e!==this._$AH&&e!==C,s&&(this._$AH=e);else{const r=e;let o,a;for(e=i[0],o=0;o<i.length-1;o++)a=R(this,r[n+o],t,o),a===C&&(a=this._$AH[o]),s||=!h(a)||a!==this._$AH[o],a===A?e=A:e!==A&&(e+=(a??"")+i[o+1]),this._$AH[o]=a}s&&!r&&this.j(e)}j(e){e===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class L extends j{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===A?void 0:e}}class D extends j{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==A)}}class B extends j{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e){if((e=R(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0)??A)===C)return;const t=this._$AH,n=e===A&&t!==A||e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive,r=e!==A&&(t===A||n);n&&this.element.removeEventListener(this.name,this,t),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class U{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){R(this,e)}}const F={P:o,A:a,C:c,M:1,L:P,R:O,D:f,V:R,I:M,H:j,N:D,U:B,B:L,F:U},$=r.litHtmlPolyfillSupport;$?.(N,M),(r.litHtmlVersions??=[]).push("3.1.4");const z=(e,t,n)=>{const r=n?.renderBefore??t;let i=r._$litPart$;if(void 0===i){const e=n?.renderBefore??null;r._$litPart$=i=new M(t.insertBefore(d(),e),e,void 0,n??{})}return i._$AI(e),i}},9526:(e,t)=>{const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const s=new RegExp("^"+r+"$"),o=new RegExp("^"+n+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return s.test(e)},t.testNumeric=function(e){return o.test(e)},t.testAlphanumeric=function(e){return a.test(e)}},9631:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkErrorForInvalidRequestArgs=t.getCoinbaseInjectedProvider=t.getCoinbaseInjectedSigner=t.fetchRPCRequest=void 0;const r=n(8035),i=n(5722);function s(){return globalThis.coinbaseWalletSigner}t.fetchRPCRequest=async function(e,t){if(!t.rpcUrl)throw i.standardErrors.rpc.internal("No RPC URL set for chain");const n=Object.assign(Object.assign({},e),{jsonrpc:"2.0",id:crypto.randomUUID()}),s=await window.fetch(t.rpcUrl,{method:"POST",body:JSON.stringify(n),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":r.LIB_VERSION}});return(await s.json()).result},t.getCoinbaseInjectedSigner=s,t.getCoinbaseInjectedProvider=function(e){let{metadata:t,preference:n}=e;var r,i,o;const a=globalThis;if("smartWalletOnly"!==n.options){if(s())return;const e=a.coinbaseWalletExtension;if(e){const{appName:n,appLogoUrl:i,appChainIds:s}=t;return null===(r=e.setAppInfo)||void 0===r||r.call(e,n,i,s),e}}const c=null!==(i=a.ethereum)&&void 0!==i?i:null===(o=a.top)||void 0===o?void 0:o.ethereum;if(null===c||void 0===c?void 0:c.isCoinbaseBrowser)return c},t.checkErrorForInvalidRequestArgs=function(e){if(!e||"object"!==typeof e||Array.isArray(e))return i.standardErrors.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:n}=e;
5604return"string"!==typeof t||0===t.length?i.standardErrors.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:e}):void 0===n||Array.isArray(n)||"object"===typeof n&&null!==n?void 0:i.standardErrors.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:e})}},9733:(e,t,n)=>{"use strict";var r;function i(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(8172),o=Symbol("lastResolve"),a=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),u=Symbol("lastPromise"),d=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function f(e){var t=e[o];if(null!==t){var n=e[h].read();null!==n&&(e[u]=null,e[o]=null,e[a]=null,t(p(n,!1)))}}function m(e){process.nextTick(f,e)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(r={get stream(){return this[h]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(t,n){process.nextTick((function(){e[c]?n(e[c]):t(p(void 0,!0))}))}));var n,r=this[u];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[l]?n(p(void 0,!0)):t[d](n,r)}),r)}}(r,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(p(i,!1));n=new Promise(this[d])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[h].destroy(null,(function(e){e?n(e):t(p(void 0,!0))}))}))})),r),g);e.exports=function(e){var t,n=Object.create(y,(i(t={},h,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,d,{value:function(e,t){var r=n[h].read();r?(n[u]=null,n[o]=null,n[a]=null,e(p(r,!1))):(n[o]=e,n[a]=t)},writable:!0}),t));return n[u]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[u]=null,n[o]=null,n[a]=null,t(e)),void(n[c]=e)}var r=n[o];null!==r&&(n[u]=null,n[o]=null,n[a]=null,r(p(void 0,!0))),n[l]=!0})),e.on("readable",m.bind(null,n)),n}},9758:(e,t,n)=>{"use strict";const r=n(79);e.exports=o;const i=function(){function e(e){return"undefined"!==typeof e&&e}try{return"undefined"!==typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},s={mapHttpRequest:h,mapHttpResponse:h,wrapRequestSerializer:p,wrapResponseSerializer:p,wrapErrorSerializer:p,req:h,res:h,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const n in e)void 0===t[n]&&(t[n]=e[n]);return t}};function o(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!==typeof t.send)throw Error("pino: transmit option must have a send function");const n=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);const r=e.serializers||{},s=function(e,t){if(Array.isArray(e))return e.filter((function(e){return"!stdSerializers.err"!==e}));return!0===e&&Object.keys(t)}(e.browser.serialize,r);let h=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(h=!1);"function"===typeof n&&(n.error=n.fatal=n.warn=n.info=n.debug=n.trace=n),!1===e.enabled&&(e.level="silent");const p=e.level||"info",m=Object.create(n);m.log||(m.log=f),Object.defineProperty(m,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(m,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,a(g,m,"error","log"),a(g,m,"fatal","error"),a(g,m,"warn","error"),a(g,m,"info","log"),a(g,m,"debug","log"),a(g,m,"trace","log")}});const g={transmit:t,serialize:s,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:d(e)};return m.levels=o.levels,m.level=p,m.setMaxListeners=m.getMaxListeners=m.emit=m.addListener=m.on=m.prependListener=m.once=m.prependOnceListener=m.removeListener=m.removeAllListeners=m.listeners=m.listenerCount=m.eventNames=m.write=m.flush=f,m.serializers=r,m._seri
5604alize=s,m._stdErrSerialize=h,m.child=function(n,i){if(!n)throw new Error("missing bindings for child Pino");i=i||{},s&&n.serializers&&(i.serializers=n.serializers);const o=i.serializers;if(s&&o){var a=Object.assign({},r,o),d=!0===e.browser.serialize?Object.keys(a):s;delete n.serializers,c([n],d,a,this._stdErrSerialize)}function h(e){this._childLevel=1+(0|e._childLevel),this.error=l(e,n,"error"),this.fatal=l(e,n,"fatal"),this.warn=l(e,n,"warn"),this.info=l(e,n,"info"),this.debug=l(e,n,"debug"),this.trace=l(e,n,"trace"),a&&(this.serializers=a,this._serialize=d),t&&(this._logEvent=u([].concat(e._logEvent.bindings,n)))}return h.prototype=this,new h(this)},t&&(m._logEvent=u()),m}function a(e,t,n,s){const a=Object.getPrototypeOf(t);t[n]=t.levelVal>t.levels.values[n]?f:a[n]?a[n]:i[n]||i[s]||f,function(e,t,n){if(!e.transmit&&t[n]===f)return;t[n]=(s=t[n],function(){const a=e.timestamp(),l=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var h=0;h<l.length;h++)l[h]=arguments[h];if(e.serialize&&!e.asObject&&c(l,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?s.call(d,function(e,t,n,i){e._serialize&&c(n,e._serialize,e.serializers,e._stdErrSerialize);const s=n.slice();let a=s[0];const l={};i&&(l.time=i),l.level=o.levels.values[t];let u=1+(0|e._childLevel);if(u<1&&(u=1),null!==a&&"object"===typeof a){for(;u--&&"object"===typeof s[0];)Object.assign(l,s.shift());a=s.length?r(s.shift(),s):void 0}else"string"===typeof a&&(a=r(s.shift(),s));return void 0!==a&&(l.msg=a),l}(this,n,l,a)):s.apply(d,l),e.transmit){const r=e.transmit.level||t.level,i=o.levels.values[r],s=o.levels.values[n];if(s<i)return;!function(e,t,n){const r=t.send,i=t.ts,s=t.methodLevel,o=t.methodValue,a=t.val,l=e._logEvent.bindings;c(n,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=n.filter((function(e){return-1===l.indexOf(e)})),e._logEvent.level.label=s,e._logEvent.level.value=o,r(s,e._logEvent,a),e._logEvent=u(l)}(this,{ts:a,methodLevel:n,methodValue:s,transmitLevel:r,transmitValue:o.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},l)}});var s}(e,t,n)}function c(e,t,n,r){for(const i in e)if(r&&e[i]instanceof Error)e[i]=o.stdSerializers.err(e[i]);else if("object"===typeof e[i]&&!Array.isArray(e[i]))for(const r in e[i])t&&t.indexOf(r)>-1&&r in n&&(e[i][r]=n[r](e[i][r]))}function l(e,t,n){return function(){const r=new Array(1+arguments.length);r[0]=t;for(var i=1;i<r.length;i++)r[i]=arguments[i-1];return e[n].apply(this,r)}}function u(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function d(e){return"function"===typeof e.timestamp?e.timestamp:!1===e.timestamp?m:g}function h(){return{}}function p(e){return e}function f(){}function m(){return!1}function g(){return Date.now()}o.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},o.stdSerializers=s,o.stdTimeFunctions=Object.assign({},{nullTime:m,epochTime:g,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}})},9816:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3310),i=n(5070);t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var s=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,n){if(void 0===n&&(n=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var r=0;if(this._bytesHashed+=n,this._bufferLength>0){for(;this._bufferLength<t.BLOCK_SIZE&&n>0;)this._buffer[this._bufferLength++]=e[r++],n--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(n>=this.blockSize&&(r=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,r,n),n%=this.blockSize);n>0;)this._buffer[this._bufferLength++]=e[r++],n--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,n=this._bufferLength,i=t/536870912|0,s=t<<3,o=t%128<112?128:256;this._buffer[n]=128;for(var c=n+1;c<o-8;c++)this._buffer[c]=0;r.writeUint32BE(i,this._buffer,o-8),r.writeUint32BE(s,this._buffer,o-4),a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,o),this._finished=!0}for(c=0;c<this.digestLength/8;c++)r.writeUint32BE(this._stateHi[c],e,8*c),r.writeUint32BE(this._stateLo[c],e,8*c+4);return this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.stateHi),i.wipe(e.stateLo),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA512=s;var o=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,
56041322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function a(e,t,n,i,s,a,c){for(var l,u,d,h,p,f,m,g,y=n[0],v=n[1],w=n[2],b=n[3],x=n[4],E=n[5],_=n[6],k=n[7],C=i[0],A=i[1],S=i[2],I=i[3],T=i[4],P=i[5],N=i[6],R=i[7];c>=128;){for(var O=0;O<16;O++){var M=8*O+a;e[O]=r.readUint32BE(s,M),t[O]=r.readUint32BE(s,M+4)}for(O=0;O<80;O++){var j,L,D=y,B=v,U=w,F=b,$=x,z=E,H=_,W=C,q=A,V=S,G=I,K=T,Z=P,Y=N;if(p=65535&(u=R),f=u>>>16,m=65535&(l=k),g=l>>>16,p+=65535&(u=(T>>>14|x<<18)^(T>>>18|x<<14)^(x>>>9|T<<23)),f+=u>>>16,m+=65535&(l=(x>>>14|T<<18)^(x>>>18|T<<14)^(T>>>9|x<<23)),g+=l>>>16,p+=65535&(u=T&P^~T&N),f+=u>>>16,m+=65535&(l=x&E^~x&_),g+=l>>>16,l=o[2*O],p+=65535&(u=o[2*O+1]),f+=u>>>16,m+=65535&l,g+=l>>>16,l=e[O%16],f+=(u=t[O%16])>>>16,m+=65535&l,g+=l>>>16,m+=(f+=(p+=65535&u)>>>16)>>>16,p=65535&(u=h=65535&p|f<<16),f=u>>>16,m=65535&(l=d=65535&m|(g+=m>>>16)<<16),g=l>>>16,p+=65535&(u=(C>>>28|y<<4)^(y>>>2|C<<30)^(y>>>7|C<<25)),f+=u>>>16,m+=65535&(l=(y>>>28|C<<4)^(C>>>2|y<<30)^(C>>>7|y<<25)),g+=l>>>16,f+=(u=C&A^C&S^A&S)>>>16,m+=65535&(l=y&v^y&w^v&w),g+=l>>>16,j=65535&(m+=(f+=(p+=65535&u)>>>16)>>>16)|(g+=m>>>16)<<16,L=65535&p|f<<16,p=65535&(u=G),f=u>>>16,m=65535&(l=F),g=l>>>16,f+=(u=h)>>>16,m+=65535&(l=d),g+=l>>>16,v=D,w=B,b=U,x=F=65535&(m+=(f+=(p+=65535&u)>>>16)>>>16)|(g+=m>>>16)<<16,E=$,_=z,k=H,y=j,A=W,S=q,I=V,T=G=65535&p|f<<16,P=K,N=Z,R=Y,C=L,O%16===15)for(M=0;M<16;M++)l=e[M],p=65535&(u=t[M]),f=u>>>16,m=65535&l,g=l>>>16,l=e[(M+9)%16],p+=65535&(u=t[(M+9)%16]),f+=u>>>16,m+=65535&l,g+=l>>>16,d=e[(M+1)%16],p+=65535&(u=((h=t[(M+1)%16])>>>1|d<<31)^(h>>>8|d<<24)^(h>>>7|d<<25)),f+=u>>>16,m+=65535&(l=(d>>>1|h<<31)^(d>>>8|h<<24)^d>>>7),g+=l>>>16,d=e[(M+14)%16],f+=(u=((h=t[(M+14)%16])>>>19|d<<13)^(d>>>29|h<<3)^(h>>>6|d<<26))>>>16,m+=65535&(l=(d>>>19|h<<13)^(h>>>29|d<<3)^d>>>6),g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,e[M]=65535&m|g<<16,t[M]=65535&p|f<<16}p=65535&(u=C),f=u>>>16,m=65535&(l=y),g=l>>>16,l=n[0],f+=(u=i[0])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,n[0]=y=65535&m|g<<16,i[0]=C=65535&p|f<<16,p=65535&(u=A),f=u>>>16,m=65535&(l=v),g=l>>>16,l=n[1],f+=(u=i[1])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,n[1]=v=65535&m|g<<16,i[1]=A=65535&p|f<<16,p=65535&(u=S),f=u>>>16,m=65535&(l=w),g=l>>>16,l=n[2],f+=(u=i[2])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,n[2]=w=65535&m|g<<16,i[2]=S=65535&p|f<<16,p=65535&(u=I),f=u>>>16,m=65535&(l=b),g=l>>>16,l=n[3],f+=(u=i[3])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,n[3]=b=65535&m|g<<16,i[3]=I=65535&p|f<<16,p=65535&(u=T),f=u>>>16,m=65535&(l=x),g=l>>>16,l=n[4],f+=(u=i[4])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,n[4]=x=65535&m|g<<16,i[4]=T=65535&p|f<<16,p=65535&(u=P),f=u>>>16,m=65535&(l=E),g=l>>>16,l=n[5],f+=(u=i[5])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,n[5]=E=65535&m|g<<16,i[5]=P=65535&p|f<<16,p=65535&(u=N),f=u>>>16,m=65535&(l=_),g=l>>>16,l=n[6],f+=(u=i[6])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,n[6]=_=65535&m|g<<16,i[6]=N=65535&p|f<<16,p=65535&(u=R),f=u>>>16,m=65535&(l=k),g=l>>>16,l=n[7],f+=(u=i[7])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,n[7]=k=65535&m|g<<16,i[7]=R=65535&p|f<<16,a+=128,c-=128}return a}t.hash=function(e){var t=new s;t.update(e);var n=t.digest();return t.clean(),n}},9838:()=>{},9907:(e,t,n)=>{"use strict";n.d(t,{u$:()=>i});var r=n(5877);function i(e,t,n,i){let s=e[t];return(0,r.B1)(e,(()=>{const r=e[t];Object.is(s,r)||n(s=r)}),i)}Symbol()},9950:(e,t,n)=>{"use strict";e.exports=n(2049)},9951:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}}},t={};function n(r){var i=t[r];
5604if(void 0!==i)return i.exports;var s=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var s=Object.create(null);n.r(s);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&i&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>o[e]=()=>r[e]));return o.default=()=>r,n.d(s,o),s}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+"."+{206:"a0432b4e",348:"1345ee5a",541:"42c59c0d",851:"587d1990"}[e]+".chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="dashboard:";n.l=(r,i,s,o)=>{if(e[r])e[r].push(i);else{var a,c;if(void 0!==s)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+s){a=d;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack",t+s),a.src=r),e[r]=[i];var h=(t,n)=>{a.onerror=a.onload=null,clearTimeout(p);var i=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(n))),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),c&&document.head.appendChild(a)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.p="/",(()=>{var e={792:0};n.f.j=(t,r)=>{var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var s=new Promise(((n,r)=>i=e[t]=[n,r]));r.push(i[2]=s);var o=n.p+n.u(t),a=new Error;n.l(o,(r=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var s=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+s+": "+o+")",a.name="ChunkLoadError",a.type=s,a.request=o,i[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var i,s,o=r[0],a=r[1],c=r[2],l=0;if(o.some((t=>0!==e[t]))){for(i in a)n.o(a,i)&&(n.m[i]=a[i]);if(c)c(n)}for(t&&t(r);l<o.length;l++)s=o[l],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0},r=self.webpackChunkdashboard=self.webpackChunkdashboard||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";var e={};n.r(e),n.d(e,{OG:()=>zS,My:()=>OS,Ph:()=>LS,lX:()=>DS,Id:()=>$S,fg:()=>qS,qj:()=>FS,aT:()=>jS,lq:()=>BS,z:()=>US,Q5:()=>GS});var t={};n.r(t),n.d(t,{abiSchemaToJsonSchema:()=>Ij,codePointToInt:()=>Rj,ensureIfUint8Array:()=>Fj,ethAbiToJsonSchema:()=>Tj,fetchArrayElement:()=>Pj,hexToNumber:()=>Oj,hexToUint8Array:()=>Uj,numberToHex:()=>Mj,padLeft:()=>jj,parseBaseType:()=>Aj,transformJsonDataToAbiFormat:()=>Nj,uint8ArrayToHexString:()=>Lj});var r={};n.r(r),n.d(r,{isBatchRequest:()=>QD,isBatchResponse:()=>VD,isResponseRpcError:()=>UD,isResponseWithError:()=>$D,isResponseWithNotification:()=>zD,isResponseWithResult:()=>FD,isSubscriptionResult:()=>HD,isValidResponse:()=>qD,setRequestIdStart:()=>KD,toBatchPayload:()=>YD,toPayload:()=>ZD,validateResponse:()=>WD});var i={};n.r(i),n.d(i,{ChunkResponseParser:()=>tB,Eip1193Provider:()=>rB,EventEmitter:()=>zL,SocketProvider:()=>oB,Web3DeferredPromise:()=>eB,asciiToHex:()=>TL,bytesToHex:()=>mL,bytesToUint8Array:()=>pL,checkAddressCheckSum:()=>qL,compareBlockNumbers:()=>XL,convert:()=>mD,convertScalarValue:()=>pD,encodePacked:()=>CD,ethUnitMap:()=>dL,format:()=>gD,fromAscii:()=>PL,fromDecimal:()=>bL,fromTwosComplement:()=>lD,fromUtf8:()=>_L,fromWei:()=>LL,getStorageSlotNumForLongString:()=>ID,hexToAscii:()=>NL,hexToBytes:()=>gL,hexToNumber:()=>yL,hexToNumberString:()=>xL,hexToString:()=>IL,hexToUtf8:()=>CL,isAddress:()=>VL,isBatchRequest:()=>QD,isBatchResponse:()=>VD,isBloom:()=>GL,isContractAddressInBloom:()=>YL,isContractInitOptions:()=>eD,isDataFormat:()=>dD,isHex:()=>WL,isHexStrict:()=>HL,isInBloom:()=>KL,isNullish:()=>tD,isPromise:()=>RD,isResponseRpcError:()=>UD,isResponseWithError:()=>$D,isResponseWithNotification:()=>zD,isResponseWithResult:()=>FD,isSubscriptionResult:()=>HD,isTopic:()=>QL,isTopicInBloom:()=>JL,isUint8Array:()=>cL,isUserEthereumAddressInBloom:()=>ZL,isValidResponse:()=>qD,jsonRpc:()=>r,keccak256:()=>vD,keccak256Wrapper:()=>vD,leftPad:()=>aD,mergeDeep:()=>rD,numberToHex:()=>wL,padLeft:()=>iD,padRight:()=>sD,pollTillDefined:()=>jD,pollTillDefinedAndReturnIntervalId:()=>MD,processSolidityEncodePackedArgs:()=>kD,randomBytes:()=>TD,randomHex:()=>PD,rejectIfConditionAtInterval:()=>DD,rejectIfTimeout:()=>LD,rightPad:()=>oD,setRequestIdStart:()=>KD,sha3:()=>wD,sha3Raw:()=>bD,soliditySha3:()=>AD,soliditySha3Raw:()=>SD,stringToHex:()=>kL,toAscii:()=>RL,toBatchPayload:()=>YD,toBigInt:()=>jL,toBool:()=>UL,toChecksumAddress:()=>BL,toDecimal:()=>vL,toHex:()=>OL,toNumber:()=>ML,toPayload:()=>ZD,toTwosComplement:()=>cD,toUtf8:()=>AL,toWei:()=>DL,uint8ArrayConcat:()=>lL,uint8ArrayEquals:()=>uL,utf8ToBytes:()=>SL,utf8ToHex:()=>EL,uuidV4:()=>BD,validateResponse:()=>WD,waitWithTimeout:()=>OD});var s={};n.r(s),n.d(s,{DO:()=>uU,OG:()=>_U,My:()=>hU,Ph:()=>yU,lX:()=>vU,Id:()=>EU,fg:()=>AU,qj:()=>xU,aT:()=>gU,aY:()=>lU,lq:()=>wU,z:()=>bU,Q5:()=>IU});var o={};n.r(o),n.d(o,{secp256k1:()=>uF});var a,c=n(9950),l=n.t(c,2),u=n(1352);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(a||(a={}));const h="popstate";function p(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function f(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function m(e,t){return{usr:e.state,key:e.key,idx:t}}function g(e,t,n,r){return void 0===n&&(n=null),d({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?v(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function y(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function v(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function w(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,c=a.Pop,l=null,u=f();function f(){return(o.state||{idx:null}).idx}function v(){c=a.Pop;let e=f(),t=null==e?null:e-u;u=e,l&&l({action:c,location:b.location,delta:t})}function w(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"===typeof e?e:y(e);return p(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,o.replaceState(d({},o.state,{idx:u}),""));let b={get action(){return c},get location(){return e(i,o)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(h,v),l=e,()=>{i.removeEventListener(h,v),l=null}},createHref:e=>
5604t(i,e),createURL:w,encodeLocation(e){let t=w(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=a.Push;let r=g(b.location,e,t);n&&n(r,e),u=f()+1;let d=m(r,u),h=b.createHref(r);try{o.pushState(d,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;i.location.assign(h)}s&&l&&l({action:c,location:b.location,delta:1})},replace:function(e,t){c=a.Replace;let r=g(b.location,e,t);n&&n(r,e),u=f();let i=m(r,u),d=b.createHref(r);o.replaceState(i,"",d),s&&l&&l({action:c,location:b.location,delta:0})},go:e=>o.go(e)};return b}var b;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(b||(b={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function x(e,t,n){void 0===n&&(n="/");let r=j(("string"===typeof t?v(t):t).pathname||"/",n);if(null==r)return null;let i=E(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let s=null;for(let o=0;null==s&&o<i.length;++o)s=R(i[o],M(r));return s}function E(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(e,i,s)=>{let o={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};o.relativePath.startsWith("/")&&(p(o.relativePath.startsWith(r),'Absolute route path "'+o.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(r.length));let a=U([r,o.relativePath]),c=n.concat(o);e.children&&e.children.length>0&&(p(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),E(e.children,t,c,a)),(null!=e.path||e.index)&&t.push({path:a,score:N(a,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of _(e.path))i(e,t,r);else i(e,t)})),t}function _(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(0===r.length)return i?[s,""]:[s];let o=_(r.join("/")),a=[];return a.push(...o.map((e=>""===e?s:[s,e].join("/")))),i&&a.push(...o),a.map((t=>e.startsWith("/")&&""===t?"/":t))}const k=/^:\w+$/,C=3,A=2,S=1,I=10,T=-2,P=e=>"*"===e;function N(e,t){let n=e.split("/"),r=n.length;return n.some(P)&&(r+=T),t&&(r+=A),n.filter((e=>!P(e))).reduce(((e,t)=>e+(k.test(t)?C:""===t?S:I)),r)}function R(e,t){let{routesMeta:n}=e,r={},i="/",s=[];for(let o=0;o<n.length;++o){let e=n[o],a=o===n.length-1,c="/"===i?t:t.slice(i.length)||"/",l=O({path:e.relativePath,caseSensitive:e.caseSensitive,end:a},c);if(!l)return null;
5604Object.assign(r,l.params);let u=e.route;s.push({params:r,pathname:U([i,l.pathname]),pathnameBase:F(U([i,l.pathnameBase])),route:u}),"/"!==l.pathnameBase&&(i=U([i,l.pathnameBase]))}return s}function O(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);f("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((e,t)=>(r.push(t),"/([^\\/]+)")));e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let s=new RegExp(i,t?void 0:"i");return[s,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1),c=r.reduce(((e,t,n)=>{if("*"===t){let e=a[n]||"";o=s.slice(0,s.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return f(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(a[n]||"",t),e}),{});return{params:c,pathname:s,pathnameBase:o,pattern:e}}function M(e){try{return decodeURI(e)}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function j(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function L(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function D(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function B(e,t,n,r){let i;void 0===r&&(r=!1),"string"===typeof e?i=v(e):(i=d({},e),p(!i.pathname||!i.pathname.includes("?"),L("?","pathname","search",i)),p(!i.pathname||!i.pathname.includes("#"),L("#","pathname","hash",i)),p(!i.search||!i.search.includes("#"),L("#","search","hash",i)));let s,o=""===e||""===i.pathname,a=o?"/":i.pathname;if(r||null==a)s=n;else{let e=t.length-1;if(a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}s=e>=0?t[e]:"/"}let c=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"===typeof e?v(e):e,s=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:s,search:$(r),hash:z(i)}}(i,s),l=a&&"/"!==a&&a.endsWith("/"),u=(o||"."===a)&&n.endsWith("/");return c.pathname.endsWith("/")||!l&&!u||(c.pathname+="/"),c}const U=e=>e.join("/").replace(/\/\/+/g,"/"),F=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",z=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function H(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const W=["post","put","patch","delete"],q=(new Set(W),["get",...W]);new Set(q),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}const G=c.createContext(null);const K=c.createContext(null);const Z=c.createContext(null);const Y=c.createContext(null);const Q=c.createContext({outlet:null,matches:[],isDataRoute:!1});const J=c.createContext(null);function X(){return null!=c.useContext(Y)}function ee(){return X()||p(!1),c.useContext(Y).location}function te(e){c.useContext(Z).static||c.useLayoutEffect(e)}function ne(){let{isDataRoute:e}=c.useContext(Q);return e?function(){let{router:e}=fe(he.UseNavigateStable),t=ge(pe.UseNavigateStable),n=c.useRef(!1);te((()=>{n.current=!0}));let r=c.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,V({fromRouteId:t},i)))}),[e,t]);return r}():function(){X()||p(!1);
5604let e=c.useContext(G),{basename:t,navigator:n}=c.useContext(Z),{matches:r}=c.useContext(Q),{pathname:i}=ee(),s=JSON.stringify(D(r).map((e=>e.pathnameBase))),o=c.useRef(!1);te((()=>{o.current=!0}));let a=c.useCallback((function(r,a){if(void 0===a&&(a={}),!o.current)return;if("number"===typeof r)return void n.go(r);let c=B(r,JSON.parse(s),i,"path"===a.relative);null==e&&"/"!==t&&(c.pathname="/"===c.pathname?t:U([t,c.pathname])),(a.replace?n.replace:n.push)(c,a.state,a)}),[t,n,s,i,e]);return a}()}const re=c.createContext(null);function ie(){let{matches:e}=c.useContext(Q),t=e[e.length-1];return t?t.params:{}}function se(e,t){let{relative:n}=void 0===t?{}:t,{matches:r}=c.useContext(Q),{pathname:i}=ee(),s=JSON.stringify(D(r).map((e=>e.pathnameBase)));return c.useMemo((()=>B(e,JSON.parse(s),i,"path"===n)),[e,s,i,n])}function oe(e,t,n){X()||p(!1);let{navigator:r}=c.useContext(Z),{matches:i}=c.useContext(Q),s=i[i.length-1],o=s?s.params:{},l=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let u,d=ee();if(t){var h;let e="string"===typeof t?v(t):t;"/"===l||(null==(h=e.pathname)?void 0:h.startsWith(l))||p(!1),u=e}else u=d;let f=u.pathname||"/",m=x(e,{pathname:"/"===l?f:f.slice(l.length)||"/"});let g=de(m&&m.map((e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:U([l,r.encodeLocation?r.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:U([l,r.encodeLocation?r.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),i,n);return t&&g?c.createElement(Y.Provider,{value:{location:V({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:a.Pop}},g):g}function ae(){let e=function(){var e;let t=c.useContext(J),n=me(pe.UseRouteError),r=ge(pe.UseRouteError);if(t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=H(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r};return c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),n?c.createElement("pre",{style:i},n):null,null)}const ce=c.createElement(ae,null);class le extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?c.createElement(Q.Provider,{value:this.props.routeContext},c.createElement(J.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ue(e){let{routeContext:t,match:n,children:r}=e,i=c.useContext(G);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),c.createElement(Q.Provider,{value:t},r)}function de(e,t,n){var r;if(void 0===t&&(t=[]),void 0===n&&(n=null),null==e){var i;if(null==(i=n)||!i.errors)return null;e=n.matches}let s=e,o=null==(r=n)?void 0:r.errors;if(null!=o){let e=s.findIndex((e=>e.route.id&&(null==o?void 0:o[e.route.id])));e>=0||p(!1),s=s.slice(0,Math.min(s.length,e+1))}return s.reduceRight(((e,r,i)=>{let a=r.route.id?null==o?void 0:o[r.route.id]:null,l=null;n&&(l=r.route.errorElement||ce);let u=t.concat(s.slice(0,i+1)),d=()=>{let t;return t=a?l:r.route.Component?c.createElement(r.route.Component,null):r.route.element?r.route.element:e,c.createElement(ue,{match:r,routeContext:{outlet:e,matches:u,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?c.createElement(le,{location:n.location,revalidation:n.revalidation,component:l,error:a,children:d(),routeContext:{outlet:null,matches:u,isDataRoute:!0}}):d()}),null)}var he,pe;function fe(e){let t=c.useContext(G);return t||p(!1),t}function me(e){let t=c.useContext(K);return t||p(!1),t}function ge(e){let t=function(){let e=c.useContext(Q);return e||p(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||p(!1),n.route.id}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(he||(he={}
5604)),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(pe||(pe={}));function ye(e){return function(e){let t=c.useContext(Q).outlet;return t?c.createElement(re.Provider,{value:e},t):t}(e.context)}function ve(e){p(!1)}function we(e){let{basename:t="/",children:n=null,location:r,navigationType:i=a.Pop,navigator:s,static:o=!1}=e;X()&&p(!1);let l=t.replace(/^\/*/,"/"),u=c.useMemo((()=>({basename:l,navigator:s,static:o})),[l,s,o]);"string"===typeof r&&(r=v(r));let{pathname:d="/",search:h="",hash:f="",state:m=null,key:g="default"}=r,y=c.useMemo((()=>{let e=j(d,l);return null==e?null:{location:{pathname:e,search:h,hash:f,state:m,key:g},navigationType:i}}),[l,d,h,f,m,g,i]);return null==y?null:c.createElement(Z.Provider,{value:u},c.createElement(Y.Provider,{children:n,value:y}))}function be(e){let{children:t,location:n}=e;return oe(Ee(t),n)}var xe;!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(xe||(xe={}));new Promise((()=>{}));c.Component;function Ee(e,t){void 0===t&&(t=[]);let n=[];return c.Children.forEach(e,((e,r)=>{if(!c.isValidElement(e))return;let i=[...t,r];if(e.type===c.Fragment)return void n.push.apply(n,Ee(e.props.children,i));e.type!==ve&&p(!1),e.props.index&&e.props.children&&p(!1);let s={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=Ee(e.props.children,i)),n.push(s)})),n}function _e(){return _e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_e.apply(this,arguments)}function ke(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}const Ce=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];const Ae="startTransition";function Se(e){let{basename:t,children:n,window:r}=e,i=c.useRef();var s;null==i.current&&(i.current=(void 0===(s={window:r,v5Compat:!0})&&(s={}),w((function(e,t){let{pathname:n,search:r,hash:i}=e.location;return g("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:y(t)}),null,s)));let o=i.current,[a,u]=c.useState({action:o.action,location:o.location}),d=c.useCallback((e=>{Ae in l?l[Ae]((()=>u(e))):u(e)}),[u]);return c.useLayoutEffect((()=>o.listen(d)),[o,d]),c.createElement(we,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o})}const Ie="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,Te=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pe=c.forwardRef((function(e,t){let n,{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:d}=e,h=ke(e,Ce),{basename:f}=c.useContext(Z),m=!1;if("string"===typeof u&&Te.test(u)&&(n=u,Ie))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=j(t.pathname,f);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:m=!0}catch(w){}let g=function(e,t){let{relative:n}=void 0===t?{}:t;X()||p(!1);let{basename:r,navigator:i}=c.useContext(Z),{hash:s,pathname:o,search:a}=se(e,{relative:n}),l=o;return"/"!==r&&(l="/"===o?r:U([r,o])),i.createHref({pathname:l,search:a,hash:s})}(u,{relative:i}),v=function(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o}=void 0===t?{}:t,a=ne(),l=ee(),u=se(e,{relative:o});return c.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==r?r:y(l)===y(u);a(e,{replace:n,state:i,preventScrollReset:s,relative:o})}}),[l,a,u,r,i,n,e,s,o])}(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:i});return c.createElement("a",_e({},h,{href:n||g,onClick:m||s?r:function(e){r&&r(e),e.defaultPrevented||v(e)},ref:t,target:l}))}));var Ne,Re;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Ne||(Ne={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Re||(Re={}));const Oe=class{static transform(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;return`${e.substr(0,t)}...${e.substr(e.length-t,t)}`}};var Me=n(5718),je=n(4263),Le=n(1939),De=n(6884),Be=n(9489);const Ue=e=>e??Be.s6;var Fe=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let $e=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.address=Me.Uj.state.address,this.balanceVal=Me.Uj.state.balance,this.balanceSymbol=Me.Uj.state.balanceSymbol,this.profileName=Me.Uj.state.profileName,this.profileImage=Me.Uj.state.profileImage,this.network=Me.p_.state.caipNetwork,this.isUnsupportedChain=Me.p_.state.isUnsupportedChain,this.unsubscribe.push(Me.Uj.subscribe((e=>{e.isConnected?(this.address=e.address,this.balanceVal=e.balance,this.profileName=e.profileName,this.profileImage=e.profileImage,this.balanceSymbol=e.balanceSymbol):(this.address="",this.balanceVal="",this.profileName="",this.profileImage="",this.balanceSymbol="")})),Me.p_.subscribeKey("caipNetwork",(e=>this.network=e)),Me.p_.subscribeKey("isUnsupportedChain",(e=>this.isUnsupportedChain=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=Me.$m.getNetworkImage(this.network),t="show"===this.balance;return Le.qy` 5605 <wui-account-button 5606 .disabled=${Boolean(this.disabled)} 5607 .isUnsupportedChain=${this.isUnsupportedChain} 5608 address=${Ue(this.address)} 5609 profileName=${Ue(this.profileName)} 5610 networkSrc=${Ue(e)} 5611 avatarSrc=${Ue(this.profileImage)} 5612 balance=${t?Me.wE.formatBalance(this.balanceVal,this.balanceSymbol):""} 5613 @click=${this.onClick.bind(this)} 5614 data-testid="account-button" 5615 .charsStart=${this.charsStart} 5616 .charsEnd=${this.charsEnd} 5617 > 5618 </wui-account-button> 5619 `}onClick(){this.isUnsupportedChain?Me.W3.open({view:"UnsupportedChain"}):Me.W3.open()}};Fe([(0,De.MZ)({type:Boolean})],$e.prototype,"disabled",void 0),Fe([(0,De.MZ)()],$e.prototype,"balance",void 0),Fe([(0,De.MZ)()],$e.prototype,"charsStart",void 0),Fe([(0,De.MZ)()],$e.prototype,"charsEnd",void 0),Fe([(0,De.wk)()],$e.prototype,"address",void 0),Fe([(0,De.wk)()],$e.prototype,"balanceVal",void 0),Fe([(0,De.wk)()],$e.prototype,"balanceSymbol",void 0),Fe([(0,De.wk)()],$e.prototype,"profileName",void 0),Fe([(0,De.wk)()],$e.prototype,"profileImage",void 0),Fe([(0,De.wk)()],$e.prototype,"network",void 0),Fe([(0,De.wk)()],$e.prototype,"isUnsupportedChain",void 0),$e=Fe([(0,je.customElement)("w3m-account-button")],$e);const ze=Le.AH` 5620 :host { 5621 display: block; 5622 width: max-content; 5623 } 5624`;var He=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let We=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance=void 0,this.size=void 0,this.label=void 0,this.loadingLabel=void 0,this.charsStart=4,this.charsEnd=6,this.isAccount=Me.Uj.state.isConnected,this.isLoading=Me.W3.state.loading,this.unsubscribe.push(Me.Uj.subscribeKey("isConnected",(e=>{this.isAccount=e})),Me.W3.subscribeKey("loading",(e=>{this.isLoading=e})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return this.isAccount&&!this.isLoading?Le.qy` 5625 <w3m-account-button 5626 .disabled=${Boolean(this.disabled)} 5627 balance=${Ue(this.balance)} 5628 .charsStart=${Ue(this.charsStart)} 5629 .charsEnd=${Ue(this.charsEnd)} 5630 > 5631 </w3m-account-button> 5632 `:Le.qy` 5633 <w3m-connect-button 5634 size=${Ue(this.size)} 5635 label=${Ue(this.label)} 5636 loadingLabel=${Ue(this.loadingLabel)} 5637 ></w3m-connect-button> 5638 `}};We.styles=ze,He([(0,De.MZ)({type:Boolean})],We.prototype,"disabled",void 0),He([(0,De.MZ)()],We.prototype,"balance",void 0),He([(0,De.MZ)()],We.prototype,"size",void 0),He([(0,De.MZ)()],We.prototype,"label",void 0),He([(0,De.MZ)()],We.prototype,"loadingLabel",void 0),He([(0,De.MZ)()],We.prototype,"charsStart",void 0),He([(0,De.MZ)()],We.prototype,"charsEnd",void 0),He([(0,De.wk)()],We.prototype,"isAccount",void 0),He([(0,De.wk)()],We.prototype,"isLoading",void 0),We=He([(0,je.customElement)("w3m-button")],We);var qe=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ve=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.size="md",this.label="Connect Wallet",this.loadingLabel="Connecting...",this.open=Me.W3.state.open,this.loading=Me.W3.state.loading,this.unsubscribe.push(Me.W3.subscribe((e=>{this.open=e.open,this.loading=e.loading}
5638)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.loading||this.open;return Le.qy` 5639 <wui-connect-button 5640 size=${Ue(this.size)} 5641 .loading=${e} 5642 @click=${this.onClick.bind(this)} 5643 data-testid="connect-button" 5644 > 5645 ${e?this.loadingLabel:this.label} 5646 </wui-connect-button> 5647 `}onClick(){this.open?Me.W3.close():this.loading||Me.W3.open()}};qe([(0,De.MZ)()],Ve.prototype,"size",void 0),qe([(0,De.MZ)()],Ve.prototype,"label",void 0),qe([(0,De.MZ)()],Ve.prototype,"loadingLabel",void 0),qe([(0,De.wk)()],Ve.prototype,"open",void 0),qe([(0,De.wk)()],Ve.prototype,"loading",void 0),Ve=qe([(0,je.customElement)("w3m-connect-button")],Ve);n(8224);const Ge=Le.AH` 5648 :host { 5649 display: block; 5650 width: max-content; 5651 } 5652`;var Ke=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ze=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.network=Me.p_.state.caipNetwork,this.connected=Me.Uj.state.isConnected,this.loading=Me.W3.state.loading,this.isUnsupportedChain=Me.p_.state.isUnsupportedChain,this.unsubscribe.push(Me.p_.subscribeKey("caipNetwork",(e=>this.network=e)),Me.Uj.subscribeKey("isConnected",(e=>this.connected=e)),Me.W3.subscribeKey("loading",(e=>this.loading=e)),Me.p_.subscribeKey("isUnsupportedChain",(e=>this.isUnsupportedChain=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return Le.qy` 5653 <wui-network-button 5654 .disabled=${Boolean(this.disabled||this.loading)} 5655 .isUnsupportedChain=${this.isUnsupportedChain} 5656 imageSrc=${Ue(Me.$m.getNetworkImage(this.network))} 5657 @click=${this.onClick.bind(this)} 5658 > 5659 ${this.isUnsupportedChain?"Switch Network":this.network?.name??(this.connected?"Unknown Network":"Select Network")} 5660 </wui-network-button> 5661 `}onClick(){this.loading||(Me.En.sendEvent({type:"track",event:"CLICK_NETWORKS"}),Me.W3.open({view:"Networks"}))}};Ze.styles=Ge,Ke([(0,De.MZ)({type:Boolean})],Ze.prototype,"disabled",void 0),Ke([(0,De.wk)()],Ze.prototype,"network",void 0),Ke([(0,De.wk)()],Ze.prototype,"connected",void 0),Ke([(0,De.wk)()],Ze.prototype,"loading",void 0),Ke([(0,De.wk)()],Ze.prototype,"isUnsupportedChain",void 0),Ze=Ke([(0,je.customElement)("w3m-network-button")],Ze);const Ye=Le.AH` 5662 :host { 5663 display: block; 5664 will-change: transform, opacity; 5665 } 5666`;var Qe=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Je=class extends Le.WF{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=Me.IN.state.view,this.unsubscribe.push(Me.IN.subscribeKey("view",(e=>this.onViewChange(e))))}firstUpdated(){this.resizeObserver=new ResizeObserver((async e=>{let[t]=e;const n=`${t?.contentRect.height}px`;"0px"!==this.prevHeight&&(await this.animate([{height:this.prevHeight},{height:n}],{duration:150,easing:"ease",fill:"forwards"}).finished,this.style.height="auto"),this.prevHeight=n})),this.resizeObserver.observe(this.getWrapper())}disconnectedCallback(){this.resizeObserver?.unobserve(this.getWrapper()),this.unsubscribe.forEach((e=>e()))}render(){return Le.qy`<div>${this.viewTemplate()}</div>`}viewTemplate(){switch(this.view){case"Account":return Le.qy`<w3m-account-view></w3m-account-view>`;case"AccountSettings":return Le.qy`<w3m-account-settings-view></w3m-account-settings-view>`;case"AllWallets":return Le.qy`<w3m-all-wallets-view></w3m-all-wallets-view>`;case"ApproveTransaction":return Le.qy`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case"BuyInProgress":return Le.qy`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case"ChooseAccountName":return Le.qy`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;case"Connect":default:return Le.qy`<w3m-connect-view></w3m-connect-view>`;case"ConnectingWalletConnect":return Le.qy`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;
5666case"ConnectingExternal":return Le.qy`<w3m-connecting-external-view></w3m-connecting-external-view>`;case"ConnectingSiwe":return Le.qy`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case"ConnectWallets":return Le.qy`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;case"ConnectSocials":return Le.qy`<w3m-connect-socials-view></w3m-connect-socials-view>`;case"ConnectingSocial":return Le.qy`<w3m-connecting-social-view></w3m-connecting-social-view>`;case"Downloads":return Le.qy`<w3m-downloads-view></w3m-downloads-view>`;case"EmailVerifyOtp":return Le.qy`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case"EmailVerifyDevice":return Le.qy`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case"Networks":return Le.qy`<w3m-networks-view></w3m-networks-view>`;case"RegisterAccountName":return Le.qy`<w3m-register-account-name-view></w3m-register-account-name-view>`;case"RegisterAccountNameSuccess":return Le.qy`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;case"SwitchNetwork":return Le.qy`<w3m-network-switch-view></w3m-network-switch-view>`;case"GetWallet":return Le.qy`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"Transactions":return Le.qy`<w3m-transactions-view></w3m-transactions-view>`;case"OnRampProviders":return Le.qy`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case"OnRampActivity":return Le.qy`<w3m-onramp-activity-view></w3m-onramp-activity-view>`;case"OnRampTokenSelect":return Le.qy`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case"OnRampFiatSelect":return Le.qy`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case"UpgradeEmailWallet":return Le.qy`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case"UpgradeToSmartAccount":return Le.qy`<w3m-upgrade-to-smart-account-view></w3m-upgrade-to-smart-account-view>`;case"UpdateEmailWallet":return Le.qy`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case"UpdateEmailPrimaryOtp":return Le.qy`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case"UpdateEmailSecondaryOtp":return Le.qy`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case"UnsupportedChain":return Le.qy`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case"WalletReceive":return Le.qy`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case"WalletCompatibleNetworks":return Le.qy`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;case"Swap":return Le.qy`<w3m-swap-view></w3m-swap-view>`;case"SwapSelectToken":return Le.qy`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;case"SwapPreview":return Le.qy`<w3m-swap-preview-view></w3m-swap-preview-view>`;case"WalletSend":return Le.qy`<w3m-wallet-send-view></w3m-wallet-send-view>`;case"WalletSendSelectToken":return Le.qy`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;case"WalletSendPreview":return Le.qy`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;case"WhatIsABuy":return Le.qy`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case"WhatIsANetwork":return Le.qy`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case"WhatIsAWallet":return Le.qy`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`}}async onViewChange(e){Me.Ib.hide();const{history:t}=Me.IN.state;let n=-10,r=10;t.length<this.prevHistoryLength&&(n=10,r=-10),this.prevHistoryLength=t.length,await this.animate([{opacity:1,transform:"translateX(0px)"},{opacity:0,transform:`translateX(${n}px)`}],{duration:150,easing:"ease",fill:"forwards"}).finished,this.view=e,await this.animate([{opacity:0,transform:`translateX(${r}px)`},{opacity:1,transform:"translateX(0px)"}],{duration:150,easing:"ease",fill:"forwards",delay:50}).finished}getWrapper(){return this.shadowRoot?.querySelector("div")}};Je.styles=Ye,Qe([(0,De.wk)()],Je.prototype,"view",void 0),Je=Qe([(0,je.customElement)("w3m-router")],Je);const Xe=Le.AH` 5667 :host > wui-flex { 5668 width: 100%; 5669 max-width: 360px; 5670 } 5671 5672 :host > wui-flex > wui-flex { 5673 border-radius: var(--wui-border-radius-l); 5674 width: 100%; 5675 } 5676 5677 .amounts-container { 5678 width: 100%; 5679 } 5680`;var et=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};const tt={USD:"$",EUR:"\u20ac",GBP:"\xa3"},nt=[100,250,500,1e3];let rt=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.connected=Me.Uj.state.isConnected,this.loading=Me.W3.state.loading,this.paymentCurrency=Me.aG.state.paymentCurrency,this.paymentAmount=Me.aG.state.paymentAmount,this.purchaseAmount=Me.aG.state.purchaseAmount,this.quoteLoading=Me.aG.state.quotesLoading,this.unsubscribe.push(Me.Uj.subscribeKey("isConnected",(e=>{this.connected=e})),Me.W3.subscribeKey("loading",(e=>{this.loading=e})),Me.aG.subscribe((e=>{this.paymentCurrency=e.paymentCurrency,this.paymentAmount=e.paymentAmount,this.purchaseAmount=e.purchaseAmount,this.quoteLoading=e.quotesLoading}
5680)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return Le.qy` 5681 <wui-flex flexDirection="column" justifyContent="center" alignItems="center"> 5682 <wui-flex flexDirection="column" alignItems="center" gap="xs"> 5683 <w3m-onramp-input 5684 type="Fiat" 5685 @inputChange=${this.onPaymentAmountChange.bind(this)} 5686 .value=${this.paymentAmount||0} 5687 ></w3m-onramp-input> 5688 <w3m-onramp-input 5689 type="Token" 5690 .value=${this.purchaseAmount||0} 5691 .loading=${this.quoteLoading} 5692 ></w3m-onramp-input> 5693 <wui-flex justifyContent="space-evenly" class="amounts-container" gap="xs"> 5694 ${nt.map((e=>Le.qy`<wui-button 5695 variant=${this.paymentAmount===e?"accent":"neutral"} 5696 size="md" 5697 textVariant="paragraph-600" 5698 fullWidth 5699 @click=${()=>this.selectPresetAmount(e)} 5700 >${`${tt[this.paymentCurrency?.id||"USD"]} ${e}`}</wui-button 5701 >`))} 5702 </wui-flex> 5703 ${this.templateButton()} 5704 </wui-flex> 5705 </wui-flex> 5706 `}templateButton(){return this.connected?Le.qy`<wui-button 5707 @click=${this.getQuotes.bind(this)} 5708 variant="main" 5709 fullWidth 5710 size="lg" 5711 borderRadius="xs" 5712 > 5713 Get quotes 5714 </wui-button>`:Le.qy`<wui-button 5715 @click=${this.openModal.bind(this)} 5716 variant="accent" 5717 fullWidth 5718 size="lg" 5719 borderRadius="xs" 5720 > 5721 Connect wallet 5722 </wui-button>`}getQuotes(){this.loading||Me.W3.open({view:"OnRampProviders"})}openModal(){Me.W3.open({view:"Connect"})}async onPaymentAmountChange(e){Me.aG.setPaymentAmount(Number(e.detail)),await Me.aG.getQuote()}async selectPresetAmount(e){Me.aG.setPaymentAmount(e),await Me.aG.getQuote()}};rt.styles=Xe,et([(0,De.MZ)({type:Boolean})],rt.prototype,"disabled",void 0),et([(0,De.wk)()],rt.prototype,"connected",void 0),et([(0,De.wk)()],rt.prototype,"loading",void 0),et([(0,De.wk)()],rt.prototype,"paymentCurrency",void 0),et([(0,De.wk)()],rt.prototype,"paymentAmount",void 0),et([(0,De.wk)()],rt.prototype,"purchaseAmount",void 0),et([(0,De.wk)()],rt.prototype,"quoteLoading",void 0),rt=et([(0,je.customElement)("w3m-onramp-widget")],rt);const it=Le.AH` 5723 wui-flex { 5724 width: 100%; 5725 } 5726 5727 wui-icon-link { 5728 margin-right: calc(var(--wui-icon-box-size-md) * -1); 5729 } 5730 5731 .account-links { 5732 display: flex; 5733 justify-content: space-between; 5734 align-items: center; 5735 } 5736 5737 .account-links wui-flex { 5738 cursor: pointer; 5739 display: flex; 5740 align-items: center; 5741 justify-content: center; 5742 flex: 1; 5743 background: red; 5744 align-items: center; 5745 justify-content: center; 5746 height: 48px; 5747 padding: 10px; 5748 flex: 1 0 0; 5749 5750 border-radius: var(--XS, 16px); 5751 border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); 5752 background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); 5753 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 5754 will-change: background-color; 5755 } 5756 5757 .account-links wui-flex:hover { 5758 background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15)); 5759 } 5760 5761 .account-links wui-flex wui-icon { 5762 width: var(--S, 20px); 5763 height: var(--S, 20px); 5764 } 5765 5766 .account-links wui-flex wui-icon svg path { 5767 stroke: #47a1ff; 5768 } 5769`;var st=n(2208),ot=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let at=class extends Le.WF{constructor(){super(),this.usubscribe=[],this.networkImages=Me.jQ.state.networkImages,this.address=Me.Uj.state.address,this.profileImage=Me.Uj.state.profileImage,this.profileName=Me.Uj.state.profileName,this.network=Me.p_.state.caipNetwork,this.preferredAccountType=Me.Uj.state.preferredAccountType,this.disconnecting=!1,this.loading=!1,this.switched=!1,this.text="",this.usubscribe.push(Me.Uj.subscribe((e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.preferredAccountType=e.preferredAccountType):Me.W3.close()})),Me.p_.subscribeKey("caipNetwork",(e=>{e?.id&&(this.network=e)})))}disconnectedCallback(){this.usubscribe.forEach((e=>e()))}
5769render(){if(!this.address)throw new Error("w3m-account-settings-view: No account provided");const e=this.networkImages[this.network?.imageId??""];return Le.qy` 5770 <wui-flex 5771 flexDirection="column" 5772 .padding=${["0","xl","m","xl"]} 5773 alignItems="center" 5774 gap="l" 5775 > 5776 <wui-avatar 5777 alt=${this.address} 5778 address=${this.address} 5779 .imageSrc=${this.profileImage||""} 5780 ></wui-avatar> 5781 <wui-flex flexDirection="column" alignItems="center"> 5782 <wui-flex gap="3xs" alignItems="center" justifyContent="center"> 5783 <wui-text variant="large-600" color="fg-100" data-testid="account-settings-address"> 5784 ${je.UiHelperUtil.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})} 5785 </wui-text> 5786 <wui-icon-link 5787 size="md" 5788 icon="copy" 5789 iconColor="fg-200" 5790 @click=${this.onCopyAddress} 5791 ></wui-icon-link> 5792 </wui-flex> 5793 </wui-flex> 5794 </wui-flex> 5795 5796 <wui-flex flexDirection="column" gap="m"> 5797 <wui-flex flexDirection="column" gap="xs" .padding=${["0","xl","m","xl"]}> 5798 <w3m-account-auth-button></w3m-account-auth-button> 5799 <wui-list-item 5800 .variant=${e?"image":"icon"} 5801 iconVariant="overlay" 5802 icon="networkPlaceholder" 5803 imageSrc=${Ue(e)} 5804 ?chevron=${this.isAllowedNetworkSwitch()} 5805 @click=${this.onNetworks.bind(this)} 5806 data-testid="account-switch-network-button" 5807 > 5808 <wui-text variant="paragraph-500" color="fg-100"> 5809 ${this.network?.name??"Unknown"} 5810 </wui-text> 5811 </wui-list-item> 5812 ${this.togglePreferredAccountBtnTemplate()} ${this.chooseNameButtonTemplate()} 5813 <wui-list-item 5814 variant="icon" 5815 iconVariant="overlay" 5816 icon="disconnect" 5817 ?chevron=${!1} 5818 .loading=${this.disconnecting} 5819 @click=${this.onDisconnect.bind(this)} 5820 data-testid="disconnect-button" 5821 > 5822 <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text> 5823 </wui-list-item> 5824 </wui-flex> 5825 </wui-flex> 5826 `}chooseNameButtonTemplate(){const e=Me.iT.getConnectedConnector(),t=Me.aK.getAuthConnector(),n=Me.f.isAllowedToRegisterName();return t&&"AUTH"===e&&!this.profileName&&n?Le.qy` 5827 <wui-list-item 5828 variant="icon" 5829 iconVariant="overlay" 5830 icon="id" 5831 iconSize="sm" 5832 ?chevron=${!0} 5833 @click=${this.onChooseName.bind(this)} 5834 data-testid="account-choose-name-button" 5835 > 5836 <wui-text variant="paragraph-500" color="fg-100">Choose account name </wui-text> 5837 </wui-list-item> 5838 `:null}isAllowedNetworkSwitch(){const{requestedCaipNetworks:e}=Me.p_.state,t=!!e&&e.length>1,n=e?.find((e=>{let{id:t}=e;return t===this.network?.id}));return t||!n}onCopyAddress(){try{this.address&&(Me.wE.copyToClopboard(this.address),Me.Pt.showSuccess("Address copied"))}catch{Me.Pt.showError("Failed to copy")}}togglePreferredAccountBtnTemplate(){const e=Me.p_.checkIfSmartAccountEnabled(),t=Me.iT.getConnectedConnector();return Me.aK.getAuthConnector()&&"AUTH"===t&&e?(this.switched||(this.text=this.preferredAccountType===st.Vl.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your smart account"),Le.qy` 5839 <wui-list-item 5840 variant="icon" 5841 iconVariant="overlay" 5842 icon="swapHorizontalBold" 5843 iconSize="sm" 5844 ?chevron=${!0} 5845 ?loading=${this.loading} 5846 @click=${this.changePreferredAccountType.bind(this)} 5847 data-testid="account-toggle-preferred-account-type" 5848 > 5849 <wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text> 5850 </wui-list-item> 5851 `):null}onChooseName(){Me.IN.push("ChooseAccountName")}async changePreferredAccountType(){const e=Me.p_.checkIfSmartAccountEnabled(),t=this.preferredAccountType!==st.Vl.ACCOUNT_TYPES.SMART_ACCOUNT&&e?st.Vl.ACCOUNT_TYPES.SMART_ACCOUNT:st.Vl.ACCOUNT_TYPES.EOA,n=Me.aK.getAuthConnector();n&&(this.loading=!0,Me.W3.setLoading(!0),await(n?.provider.setPreferredAccount(t)),await Me.x4.reconnectExternal(n),Me.W3.setLoading(!1),this.text=t===st.Vl.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your smart account",this.switched=!0,Me.Rv.resetSend(),this.loading=!1,this.requestUpdate())}onNetworks(){this.isAllowedNetworkSwitch()&&Me.IN.push("Networks")}async onDisconnect(){try{this.disconnecting=!0,await Me.x4.disconnect(),Me.En.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),Me.W3.close()}catch{Me.En.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),Me.Pt.showError("Failed to disconnect")}finally{this.disconnecting=!1}}};at.styles=it,ot([(0,De.wk)()],at.prototype,"address",void 0),ot([(0,De.wk)()],at.prototype,"profileImage",void 0),ot([(0,De.wk)()],at.prototype,"profileName",void 0),ot([(0,De.wk)()],at.prototype,"network",void 0),ot([(0,De.wk)()],at.prototype,"preferredAccountType",void 0),ot([(0,De.wk)()],at.prototype,"disconnecting",void 0),ot([(0,De.wk)()],at.prototype,"loading",void 0),ot([(0,De.wk)()],at.prototype,"switched",void 0),ot([(0,De.wk)()],at.prototype,"text",void 0),at=ot([(0,je.customElement)("w3m-account-settings-view")],at);var ct=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let lt=class extends Le.WF{render(){const e=Me.iT.getConnectedConnector();return Le.qy` 5852 ${Me.Hd.state.enableWalletFeatures&&"AUTH"===e?this.walletFeaturesTemplate():this.defaultTemplate()} 5853 `}walletFeaturesTemplate(){return Le.qy`<w3m-account-wallet-features-widget></w3m-account-wallet-features-widget>`}defaultTemplate(){return Le.qy`<w3m-account-default-widget></w3m-account-default-widget>`}};lt=ct([(0,je.customElement)("w3m-account-view")],lt);var ut=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let dt=class extends Le.WF{constructor(){super(...arguments),this.search="",this.onDebouncedSearch=Me.wE.debounce((e=>{this.search=e}))}render(){const e=this.search.length>=2;return Le.qy` 5854 <wui-flex .padding=${["0","s","s","s"]} gap="s"> 5855 <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar> 5856 ${this.qrButtonTemplate()} 5857 </wui-flex> 5858 ${e?Le.qy`<w3m-all-wallets-search query=${this.search}></w3m-all-wallets-search>`:Le.qy`<w3m-all-wallets-list></w3m-all-wallets-list>`} 5859 `}onInputChange(e){this.onDebouncedSearch(e.detail)}qrButtonTemplate(){return Me.wE.isMobile()?Le.qy` 5860 <wui-icon-box 5861 size="lg" 5862 iconSize="xl" 5863 iconColor="accent-100" 5864 backgroundColor="accent-100" 5865 icon="qrCode" 5866 background="transparent" 5867 border 5868 borderColor="wui-accent-glass-010" 5869 @click=${this.onWalletConnectQr.bind(this)} 5870 ></wui-icon-box> 5871 `:null}onWalletConnectQr(){Me.IN.push("ConnectingWalletConnect")}};ut([(0,De.wk)()],dt.prototype,"search",void 0),dt=ut([(0,je.customElement)("w3m-all-wallets-view")],dt);const ht=Le.AH` 5872 @keyframes shake { 5873 0% { 5874 transform: translateX(0); 5875 } 5876 25% { 5877 transform: translateX(3px); 5878 } 5879 50% { 5880 transform: translateX(-3px); 5881 } 5882 75% { 5883 transform: translateX(3px); 5884 } 5885 100% { 5886 transform: translateX(0); 5887 } 5888 } 5889 5890 wui-flex:first-child:not(:only-child) { 5891 position: relative; 5892 } 5893 5894 wui-loading-thumbnail { 5895 position: absolute; 5896 } 5897 5898 wui-visual { 5899 width: var(--wui-wallet-image-size-lg); 5900 height: var(--wui-wallet-image-size-lg); 5901 border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs)); 5902 position: relative; 5903 overflow: hidden; 5904 } 5905
5906 wui-visual::after { 5907 content: ''; 5908 display: block; 5909 width: 100%; 5910 height: 100%; 5911 position: absolute; 5912 inset: 0; 5913 border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs)); 5914 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 5915 } 5916 5917 wui-icon-box { 5918 position: absolute; 5919 right: calc(var(--wui-spacing-3xs) * -1); 5920 bottom: calc(var(--wui-spacing-3xs) * -1); 5921 opacity: 0; 5922 transform: scale(0.5); 5923 transition: 5924 opacity var(--wui-ease-out-power-2) var(--wui-duration-lg), 5925 transform var(--wui-ease-out-power-2) var(--wui-duration-lg); 5926 will-change: opacity, transform; 5927 } 5928 5929 wui-text[align='center'] { 5930 width: 100%; 5931 padding: 0px var(--wui-spacing-l); 5932 } 5933 5934 [data-error='true'] wui-icon-box { 5935 opacity: 1; 5936 transform: scale(1); 5937 } 5938 5939 [data-error='true'] > wui-flex:first-child { 5940 animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; 5941 } 5942 5943 [data-retry='false'] wui-link { 5944 display: none; 5945 } 5946 5947 [data-retry='true'] wui-link { 5948 display: block; 5949 opacity: 1; 5950 } 5951 5952 wui-link { 5953 padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs); 5954 } 5955`;var pt=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let ft=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=Me.aG.state.selectedProvider,this.uri=Me.x4.state.wcUri,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.error=!1,this.startTime=null,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(Me.aG.subscribeKey("selectedProvider",(e=>{this.selectedOnRampProvider=e}))),this.watchTransactions()}disconnectedCallback(){this.intervalId&&clearInterval(this.intervalId)}render(){let e="Continue in external window";this.error?e="Buy failed":this.selectedOnRampProvider&&(e=`Buy in ${this.selectedOnRampProvider?.label}`);const t=this.error?"Buy can be declined from your side or due to and error on the provider app":"We\u2019ll notify you once your Buy is processed";return Le.qy` 5956 <wui-flex 5957 data-error=${Ue(this.error)} 5958 data-retry=${this.showRetry} 5959 flexDirection="column" 5960 alignItems="center" 5961 .padding=${["3xl","xl","xl","xl"]} 5962 gap="xl" 5963 > 5964 <wui-flex justifyContent="center" alignItems="center"> 5965 <wui-visual 5966 name=${Ue(this.selectedOnRampProvider?.name)} 5967 size="lg" 5968 class="provider-image" 5969 > 5970 </wui-visual> 5971 5972 ${this.error?null:this.loaderTemplate()} 5973 5974 <wui-icon-box 5975 backgroundColor="error-100" 5976 background="opaque" 5977 iconColor="error-100" 5978 icon="close" 5979 size="sm" 5980 border 5981 borderColor="wui-color-bg-125" 5982 ></wui-icon-box> 5983 </wui-flex> 5984 5985 <wui-flex flexDirection="column" alignItems="center" gap="xs"> 5986 <wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}> 5987 ${e} 5988 </wui-text> 5989 <wui-text align="center" variant="small-500" color="fg-200">${t}</wui-text> 5990 </wui-flex> 5991 5992 ${this.error?this.tryAgainTemplate():null} 5993 </wui-flex> 5994 5995 <wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center"> 5996 <wui-link @click=${this.onCopyUri} color="fg-200"> 5997 <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon> 5998 Copy link 5999 </wui-link> 6000 </wui-flex> 6001 `}watchTransactions(){if(this.selectedOnRampProvider&&"coinbase"===this.selectedOnRampProvider.name)this.startTime=Date.now(),this.initializeCoinbaseTransactions()}async initializeCoinbaseTransactions(){await this.watchCoinbaseTransactions(),this.intervalId=setInterval((()=>this.watchCoinbaseTransactions()),4e3)}async watchCoinbaseTransactions(){try{const e=Me.Uj.state.address,t=Me.Hd.state.projectId;if(!e)throw new Error("No address found");const n=await Me.TP.fetchTransactions({account:e,onramp:"coinbase",projectId:t});n.data.filter((e=>new Date(e.metadata.minedAt)>new Date(this.startTime)||"ONRAMP_TRANSACTION_STATUS_IN_PROGRESS"===e.metadata.status)).length?(clearInterval(this.intervalId),Me.IN.replace("OnRampActivity")):this.startTime&&Date.now()-this.startTime>=18e4&&(clearInterval(this.intervalId),this.error=!0)}catch(e){Me.Pt.showError(e)}}onTryAgain(){this.selectedOnRampProvider&&(this.error=!1,Me.wE.openHref(this.selectedOnRampProvider.url,"popupWindow","width=600,height=800,scrollbars=yes"))}tryAgainTemplate(){return this.selectedOnRampProvider?.url?Le.qy`<wui-button size="md" variant="accent" @click=${this.onTryAgain.bind(this)}> 6002 <wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon> 6003 Try again 6004 </wui-button>
6004`:null}loaderTemplate(){const e=Me.Wn.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return Le.qy`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}onCopyUri(){if(!this.selectedOnRampProvider?.url)return Me.Pt.showError("No link found"),void Me.IN.goBack();try{Me.wE.copyToClopboard(this.selectedOnRampProvider.url),Me.Pt.showSuccess("Link copied")}catch{Me.Pt.showError("Failed to copy")}}};ft.styles=ht,pt([(0,De.wk)()],ft.prototype,"intervalId",void 0),pt([(0,De.wk)()],ft.prototype,"selectedOnRampProvider",void 0),pt([(0,De.wk)()],ft.prototype,"uri",void 0),pt([(0,De.wk)()],ft.prototype,"ready",void 0),pt([(0,De.wk)()],ft.prototype,"showRetry",void 0),pt([(0,De.wk)()],ft.prototype,"buffering",void 0),pt([(0,De.wk)()],ft.prototype,"error",void 0),pt([(0,De.wk)()],ft.prototype,"startTime",void 0),pt([(0,De.MZ)({type:Boolean})],ft.prototype,"isMobile",void 0),pt([(0,De.MZ)()],ft.prototype,"onRetry",void 0),ft=pt([(0,je.customElement)("w3m-buy-in-progress-view")],ft);const mt=Le.AH` 6005 :host > wui-flex { 6006 max-height: clamp(360px, 540px, 80vh); 6007 scrollbar-width: none; 6008 overflow-y: scroll; 6009 overflow-x: hidden; 6010 } 6011 6012 :host > wui-flex::-webkit-scrollbar {
6013 display: none; 6014 } 6015 6016 .all-wallets { 6017 flex-flow: column; 6018 } 6019`;var gt=n(173),yt=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let vt=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.connectors=Me.aK.state.connectors,this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return Le.qy` 6020 <wui-flex flexDirection="column" .padding=${["3xs","s","s","s"]}> 6021 <w3m-email-login-widget></w3m-email-login-widget> 6022 <w3m-social-login-widget></w3m-social-login-widget> 6023 ${this.walletListTemplate()} 6024 </wui-flex> 6025 <w3m-legal-footer></w3m-legal-footer> 6026 `}walletListTemplate(){const e=this.connectors.find((e=>"AUTH"===e.type));return e?.socials?e?.showWallets?Le.qy` 6027 <wui-flex flexDirection="column" gap="xs" .margin=${["xs","0","0","0"]}> 6028 <w3m-connect-walletconnect-widget></w3m-connect-walletconnect-widget> 6029 <w3m-connect-recent-widget></w3m-connect-recent-widget> 6030 <w3m-connect-announced-widget></w3m-connect-announced-widget> 6031 <w3m-connect-injected-widget></w3m-connect-injected-widget> 6032 <w3m-connect-coinbase-widget></w3m-connect-coinbase-widget> 6033 <w3m-connect-custom-widget></w3m-connect-custom-widget> 6034 <w3m-connect-recommended-widget></w3m-connect-recommended-widget> 6035 <wui-flex class="all-wallets" .margin=${["xs","0","0","0"]}> 6036 <w3m-all-wallets-widget></w3m-all-wallets-widget> 6037 </wui-flex> 6038 </wui-flex> 6039 `:Le.qy` <wui-list-button 6040 @click=${this.onContinueWalletClick.bind(this)} 6041 text="Continue with a wallet" 6042 ></wui-list-button>`:Le.qy`<w3m-wallet-login-list></w3m-wallet-login-list>`}onContinueWalletClick(){Me.IN.push("ConnectWallets")}};vt.styles=mt,yt([(0,gt.w)()],vt.prototype,"connectors",void 0),vt=yt([(0,je.customElement)("w3m-connect-view")],vt);const wt=Le.AH` 6043 @keyframes shake { 6044 0% { 6045 transform: translateX(0); 6046 } 6047 25% { 6048 transform: translateX(3px); 6049 } 6050 50% { 6051 transform: translateX(-3px); 6052 } 6053 75% { 6054 transform: translateX(3px); 6055 } 6056 100% { 6057 transform: translateX(0); 6058 } 6059 } 6060 6061 wui-flex:first-child:not(:only-child) { 6062 position: relative; 6063 } 6064 6065 wui-loading-thumbnail { 6066 position: absolute; 6067 } 6068 6069 wui-icon-box { 6070 position: absolute; 6071 right: calc(var(--wui-spacing-3xs) * -1); 6072 bottom: calc(var(--wui-spacing-3xs) * -1); 6073 opacity: 0; 6074 transform: scale(0.5); 6075 transition-property: opacity, transform; 6076 transition-duration: var(--wui-duration-lg); 6077 transition-timing-function: var(--wui-ease-out-power-2); 6078 will-change: opacity, transform; 6079 } 6080 6081 wui-text[align='center'] { 6082 width: 100%; 6083 padding: 0px var(--wui-spacing-l); 6084 } 6085 6086 [data-error='true'] wui-icon-box { 6087 opacity: 1; 6088 transform: scale(1); 6089 } 6090 6091 [data-error='true'] > wui-flex:first-child { 6092 animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; 6093 } 6094 6095 [data-retry='false'] wui-link { 6096 display: none; 6097 } 6098 6099 [data-retry='true'] wui-link { 6100 display: block; 6101 opacity: 1; 6102 } 6103`;var bt=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};class xt extends Le.WF{constructor(){super(),this.wallet=Me.IN.state.data?.wallet,this.connector=Me.IN.state.data?.connector,this.timeout=void 0,this.secondaryBtnLabel="Try again",this.secondaryBtnIcon="refresh",this.secondaryLabel="Accept connection request in the wallet",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=Me.$m.getWalletImage(this.wallet)??Me.$m.getConnectorImage(this.connector),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=Me.x4.state.wcUri,this.error=Me.x4.state.wcError,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(Me.x4.subscribeKey("wcUri",(e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())})),Me.x4.subscribeKey("wcError",(e=>this.error=e)),Me.x4.subscribeKey("buffering",(e=>this.buffering=e)))}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),clearTimeout(this.timeout)}render(){this.onRender?.(),this.onShowRetry();const e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel;let t=`Continue in ${this.name}`;return this.buffering&&(t="Connecting..."),this.error&&(t="Connection declined"),Le.qy` 6104 <wui-flex 6105 data-error=${Ue(this.error)} 6106 data-retry=${this.showRetry} 6107 flexDirection="column" 6108 alignItems="center" 6109 .padding=${["3xl","xl","xl","xl"]} 6110 gap="xl" 6111 > 6112 <wui-flex justifyContent="center" alignItems="center"> 6113 <wui-wallet-image size="lg" imageSrc=${Ue(this.imageSrc)}></wui-wallet-image> 6114 6115 ${this.error?null:this.loaderTemplate()} 6116 6117 <wui-icon-box 6118 backgroundColor="error-100" 6119 background="opaque" 6120 iconColor="error-100" 6121 icon="close" 6122 size="sm" 6123 border 6124 borderColor="wui-color-bg-125" 6125 ></wui-icon-box> 6126 </wui-flex> 6127 6128 <wui-flex flexDirection="column" alignItems="center" gap="xs"> 6129 <wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}> 6130 ${t} 6131 </wui-text> 6132 <wui-text align="center" variant="small-500" color="fg-200">${e}</wui-text> 6133 </wui-flex> 6134 6135 <wui-button 6136 variant="accent" 6137 size="md" 6138 ?disabled=${!this.error&&this.buffering} 6139 @click=${this.onTryAgain.bind(this)} 6140 > 6141 <wui-icon color="inherit" slot="iconLeft" name=${this.secondaryBtnIcon}></wui-icon> 6142 ${this.secondaryBtnLabel} 6143 </wui-button>
6143 6144 </wui-flex> 6145 6146 ${this.isWalletConnect?Le.qy` 6147 <wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center"> 6148 <wui-link @click=${this.onCopyUri} color="fg-200"> 6149 <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon> 6150 Copy link 6151 </wui-link> 6152 </wui-flex> 6153 `:null} 6154 6155 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 6156 `}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;const e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){this.buffering||(Me.x4.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.())}loaderTemplate(){const e=Me.Wn.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return Le.qy`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(Me.wE.copyToClopboard(this.uri),Me.Pt.showSuccess("Link copied"))}catch{Me.Pt.showError("Failed to copy")}}}xt.styles=wt,bt([(0,De.wk)()],xt.prototype,"uri",void 0),bt([(0,De.wk)()],xt.prototype,"error",void 0),bt([(0,De.wk)()],xt.prototype,"ready",void 0),bt([(0,De.wk)()],xt.prototype,"showRetry",void 0),bt([(0,De.wk)()],xt.prototype,"buffering",void 0),bt([(0,De.MZ)({type:Boolean})],xt.prototype,"isMobile",void 0),bt([(0,De.MZ)()],xt.prototype,"onRetry",void 0);var Et=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let _t=class extends xt{constructor(){if(super(),!this.connector)throw new Error("w3m-connecting-view: No connector provided");Me.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.connector.name??"Unknown",platform:"browser"}}),this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),this.isWalletConnect=!1}async onConnectProxy(){try{this.error=!1,this.connector&&(this.connector.imageUrl&&Me.iT.setConnectedWalletImageUrl(this.connector.imageUrl),await Me.x4.connectExternal(this.connector),Me.Hd.state.isSiweEnabled?Me.IN.push("ConnectingSiwe"):Me.W3.close(),Me.En.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.connector.name||"Unknown"}}))}catch(e){Me.En.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};_t=Et([(0,je.customElement)("w3m-connecting-external-view")],_t);var kt=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ct=class extends Le.WF{constructor(){super(),this.interval=void 0,this.lastRetry=Date.now(),this.wallet=Me.IN.state.data?.wallet,this.platform=void 0,this.platforms=[],this.initializeConnection(),this.interval=setInterval(this.initializeConnection.bind(this),Me.oU.TEN_SEC_MS)}disconnectedCallback(){clearTimeout(this.interval)}render(){return this.wallet?(this.determinePlatforms(),Le.qy` 6157 ${this.headerTemplate()} 6158 <div>${this.platformTemplate()}</div> 6159 `):Le.qy`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`}async initializeConnection(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{const{wcPairingExpiry:t}=Me.x4.state;if(e||Me.wE.isPairingExpired(t)){if(Me.x4.connectWalletConnect(),this.wallet){const e=Me.$m.getWalletImage(this.wallet);e&&Me.iT.setConnectedWalletImageUrl(e)}else{const e=Me.aK.state.connectors.find((e=>"WALLET_CONNECT"===e.type)),t=Me.$m.getConnectorImage(e);t&&Me.iT.setConnectedWalletImageUrl(t)}if(await Me.x4.state.wcPromise,this.finalizeConnection(),Me.Hd.state.isSiweEnabled){const{SIWEController:e}=await n.e(851).then(n.bind(n,4851));"success"===e.state.status?Me.W3.close():Me.IN.push("ConnectingSiwe")}else Me.W3.close()}}catch(t){Me.En.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:t?.message??"Unknown"}}),Me.x4.setWcError(!0),Me.wE.isAllowedRetry(this.lastRetry)&&(Me.Pt.showError("Declined"),this.lastRetry=Date.now(),this.initializeConnection(!0))}}finalizeConnection(){const{wcLinking:e,recentWallet:t}=Me.x4.state;e&&Me.iT.setWalletConnectDeepLink(e),t&&Me.iT.setWeb3ModalRecent(t),Me.En.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:e?"mobile":"qrcode",name:this.wallet?.name||"Unknown"}})}determinePlatforms(){if(!this.wallet)throw new Error("w3m-connecting-wc-view:determinePlatforms No wallet");if(this.platform)return;const{mobile_link:e,desktop_link:t,webapp_link:n,injected:r,rdns:i}=this.wallet,s=r?.map((e=>{let{injected_id:t}=e;return t}
6159)).filter(Boolean),o=i?[i]:s??[],a=o.length,c=e,l=n,u=Me.x4.checkInstalled(o),d=a&&u,h=t&&!Me.wE.isMobile();d&&this.platforms.push("browser"),c&&this.platforms.push(Me.wE.isMobile()?"mobile":"qrcode"),l&&this.platforms.push("web"),h&&this.platforms.push("desktop"),!d&&a&&this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return Le.qy`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"desktop":return Le.qy` 6160 <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}> 6161 </w3m-connecting-wc-desktop> 6162 `;case"web":return Le.qy` 6163 <w3m-connecting-wc-web .onRetry=${()=>this.initializeConnection(!0)}> 6164 </w3m-connecting-wc-web> 6165 `;case"mobile":return Le.qy` 6166 <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}> 6167 </w3m-connecting-wc-mobile> 6168 `;case"qrcode":return Le.qy`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`;default:return Le.qy`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?Le.qy` 6169 <w3m-connecting-header 6170 .platforms=${this.platforms} 6171 .onSelectPlatfrom=${this.onSelectPlatform.bind(this)} 6172 > 6173 </w3m-connecting-header> 6174 `:null}async onSelectPlatform(e){const t=this.shadowRoot?.querySelector("div");t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};kt([(0,De.wk)()],Ct.prototype,"platform",void 0),kt([(0,De.wk)()],Ct.prototype,"platforms",void 0),Ct=kt([(0,je.customElement)("w3m-connecting-wc-view")],Ct);const At=Le.AH` 6175 .continue-button-container { 6176 width: 100%; 6177 } 6178`;var St=n(7386),It=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Tt=class extends Le.WF{constructor(){super(...arguments),this.loading=!1}render(){return Le.qy` 6179 <wui-flex 6180 flexDirection="column" 6181 alignItems="center" 6182 gap="xxl" 6183 .padding=${["0","0","l","0"]} 6184 > 6185 ${this.onboardingTemplate()} ${this.buttonsTemplate()} 6186 <wui-link 6187 @click=${()=>{Me.wE.openHref(St.TC.URLS.FAQ,"_blank")}} 6188 > 6189 Learn more about names 6190 <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon> 6191 </wui-link> 6192 </wui-flex> 6193 `}onboardingTemplate(){return Le.qy` <wui-flex 6194 flexDirection="column" 6195 gap="xxl" 6196 alignItems="center" 6197 .padding=${["0","xxl","0","xxl"]} 6198 > 6199 <wui-flex gap="s" alignItems="center" justifyContent="center"> 6200 <wui-icon-box 6201 icon="id" 6202 size="xl" 6203 iconSize="xxl" 6204 iconColor="fg-200" 6205 backgroundColor="fg-200" 6206 ></wui-icon-box> 6207 </wui-flex> 6208 <wui-flex flexDirection="column" alignItems="center" gap="s"> 6209 <wui-text align="center" variant="medium-600" color="fg-100"> 6210 Choose your account name 6211 </wui-text> 6212 <wui-text align="center" variant="paragraph-400" color="fg-100"> 6213 Finally say goodbye to 0x addresses, name your account to make it easier to exchange 6214 assets 6215 </wui-text> 6216 </wui-flex> 6217 </wui-flex>`}buttonsTemplate(){return Le.qy`<wui-flex 6218 .padding=${["0","2l","0","2l"]} 6219 gap="s" 6220 class="continue-button-container" 6221 > 6222 <wui-button 6223 fullWidth 6224 .loading=${this.loading} 6225 size="lg" 6226 borderRadius="xs" 6227 @click=${()=>Me.IN.push("RegisterAccountName")} 6228 >Choose name 6229 </wui-button> 6230 </wui-flex>`}};Tt.styles=At,It([(0,De.wk)()],Tt.prototype,"loading",void 0),Tt=It([(0,je.customElement)("w3m-choose-account-name-view")],Tt);var Pt=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Nt=class extends Le.WF{constructor(){super(...arguments),this.wallet=Me.IN.state.data?.wallet}
6230render(){if(!this.wallet)throw new Error("w3m-downloads-view");return Le.qy` 6231 <wui-flex gap="xs" flexDirection="column" .padding=${["s","s","l","s"]}> 6232 ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()} 6233 ${this.homepageTemplate()} 6234 </wui-flex> 6235 `}chromeTemplate(){return this.wallet?.chrome_store?Le.qy`<wui-list-item 6236 variant="icon" 6237 icon="chromeStore" 6238 iconVariant="square" 6239 @click=${this.onChromeStore.bind(this)} 6240 chevron 6241 > 6242 <wui-text variant="paragraph-500" color="fg-100">Chrome Extension</wui-text> 6243 </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?Le.qy`<wui-list-item 6244 variant="icon" 6245 icon="appStore" 6246 iconVariant="square" 6247 @click=${this.onAppStore.bind(this)} 6248 chevron 6249 > 6250 <wui-text variant="paragraph-500" color="fg-100">iOS App</wui-text> 6251 </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?Le.qy`<wui-list-item 6252 variant="icon" 6253 icon="playStore" 6254 iconVariant="square" 6255 @click=${this.onPlayStore.bind(this)} 6256 chevron 6257 > 6258 <wui-text variant="paragraph-500" color="fg-100">Android App</wui-text> 6259 </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?Le.qy` 6260 <wui-list-item 6261 variant="icon" 6262 icon="browser" 6263 iconVariant="square-blue" 6264 @click=${this.onHomePage.bind(this)} 6265 chevron 6266 > 6267 <wui-text variant="paragraph-500" color="fg-100">Website</wui-text> 6268 </wui-list-item> 6269 `:null}onChromeStore(){this.wallet?.chrome_store&&Me.wE.openHref(this.wallet.chrome_store,"_blank")}onAppStore(){this.wallet?.app_store&&Me.wE.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&Me.wE.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&Me.wE.openHref(this.wallet.homepage,"_blank")}};Nt=Pt([(0,je.customElement)("w3m-downloads-view")],Nt);var Rt=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ot=class extends Le.WF{render(){return Le.qy` 6270 <wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs"> 6271 ${this.recommendedWalletsTemplate()} 6272 <wui-list-wallet 6273 name="Explore all" 6274 showAllWallets 6275 walletIcon="allWallets" 6276 icon="externalLink" 6277 @click=${()=>{Me.wE.openHref("https://walletconnect.com/explorer?type=wallet","_blank")}} 6278 ></wui-list-wallet> 6279 </wui-flex> 6280 `}recommendedWalletsTemplate(){const{recommended:e,featured:t}=Me.Np.state,{customWallets:n}=Me.Hd.state;return[...t,...n??[],...e].slice(0,4).map((e=>Le.qy` 6281 <wui-list-wallet 6282 name=${e.name??"Unknown"} 6283 tagVariant="main" 6284 imageSrc=${Ue(Me.$m.getWalletImage(e))} 6285 @click=${()=>{Me.wE.openHref(e.homepage??"https://walletconnect.com/explorer","_blank")}} 6286 ></wui-list-wallet> 6287 `))}};Ot=Rt([(0,je.customElement)("w3m-get-wallet-view")],Ot);const Mt=Le.AH` 6288 wui-flex { 6289 width: 100%; 6290 } 6291 6292 .suggestion { 6293 background: var(--wui-gray-glass-002); 6294 border-radius: var(--wui-border-radius-xs); 6295 } 6296 6297 .suggestion:hover { 6298 background-color: var(--wui-gray-glass-005); 6299 cursor: pointer; 6300 } 6301 6302 .suggested-name { 6303 max-width: 75%; 6304 overflow: hidden; 6305 text-overflow: ellipsis; 6306 white-space: nowrap; 6307 } 6308 6309 form { 6310 width: 100%; 6311 } 6312 6313 wui-icon-link { 6314 position: absolute; 6315 right: 20px; 6316 transform: translateY(11px); 6317 } 6318`,{I:jt}=Be.ge,Lt=2;class Dt{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const Bt=(e,t)=>
6318{const n=e._$AN;if(void 0===n)return!1;for(const r of n)r._$AO?.(t,!1),Bt(r,t);return!0},Ut=e=>{let t,n;do{if(void 0===(t=e._$AM))break;n=t._$AN,n.delete(e),e=t}while(0===n?.size)},Ft=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(void 0===n)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),Ht(t)}};function $t(e){void 0!==this._$AN?(Ut(this),this._$AM=e,Ft(this)):this._$AM=e}function zt(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(t)if(Array.isArray(r))for(let s=n;s<r.length;s++)Bt(r[s],!1),Ut(r[s]);else null!=r&&(Bt(r,!1),Ut(r));else Bt(this,e)}const Ht=e=>{e.type==Lt&&(e._$AP??=zt,e._$AQ??=$t)};class Wt extends Dt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),Ft(this),this.isConnected=e._$AU}_$AO(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(Bt(this,e),Ut(this))}setValue(e){if((e=>void 0===e.strings)(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}const qt=()=>new Vt;class Vt{}const Gt=new WeakMap,Kt=(e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return{_$litDirective$:e,values:n}})(class extends Wt{render(e){return Be.s6}update(e,t){let[n]=t;const r=n!==this.Y;return r&&void 0!==this.Y&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.Y=n,this.ht=e.options?.host,this.rt(this.ct=e.element)),Be.s6}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.Y){const t=this.ht??globalThis;let n=Gt.get(t);void 0===n&&(n=new WeakMap,Gt.set(t,n)),void 0!==n.get(this.Y)&&this.Y.call(this.ht,void 0),n.set(this.Y,e),void 0!==e&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){return"function"==typeof this.Y?Gt.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Zt=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Yt=class extends Le.WF{constructor(){super(),this.formRef=qt(),this.usubscribe=[],this.name="",this.error="",this.loading=Me.f.state.loading,this.suggestions=Me.f.state.suggestions,this.registered=!1,this.onDebouncedNameInputChange=Me.wE.debounce((e=>{Me.f.validateName(e)?(this.error="",this.name=e,Me.f.getSuggestions(e),Me.f.isNameRegistered(e).then((e=>{this.registered=e}))):e.length<4?this.error="Name must be at least 4 characters long":this.error="Can only contain letters, numbers and - characters"})),this.usubscribe.push(Me.f.subscribe((e=>{this.suggestions=e.suggestions,this.loading=e.loading})))}firstUpdated(){this.formRef.value?.addEventListener("keydown",this.onEnterKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.usubscribe.forEach((e=>e())),this.formRef.value?.removeEventListener("keydown",this.onEnterKey.bind(this))}render(){return Le.qy` 6319 <wui-flex 6320 flexDirection="column" 6321 alignItems="center" 6322 gap="m" 6323 .padding=${["0","s","m","s"]} 6324 > 6325 <form ${Kt(this.formRef)} @submit=${this.onSubmitName.bind(this)}> 6326 <wui-ens-input 6327 @inputChange=${this.onNameInputChange.bind(this)} 6328 .errorMessage=${this.error} 6329 .value=${this.name} 6330 > 6331 </wui-ens-input> 6332 ${this.submitButtonTemplate()} 6333 <input type="submit" hidden /> 6334 </form> 6335 ${this.templateSuggestions()} 6336 </wui-flex> 6337 `}submitButtonTemplate(){return this.isAllowedToSubmit()?Le.qy` 6338 <wui-icon-link 6339 size="sm" 6340 icon="chevronRight" 6341 iconcolor="accent-100" 6342 @click=${this.onSubmitName.bind(this)} 6343 > 6344 </wui-icon-link> 6345 `:null}onSelectSuggestion(e){return()=>{this.name=e,this.registered=!1,this.requestUpdate()}}onNameInputChange(e){this.onDebouncedNameInputChange(e.detail)}nameSuggestionTagTemplate(){return this.loading?Le.qy`<wui-loading-spinner size="lg" color="fg-100"></wui-loading-spinner>`:this.registered?Le.qy`<wui-tag variant="shade" size="lg">Registered</wui-tag>`:Le.qy`<wui-tag variant="success" size="lg">Available</wui-tag>`}templateSuggestions(){if(!this.name||this.name.length<4||this.error)return null;const e=this.registered?this.suggestions.filter((e=>e.name!==this.name)):[];
6345return Le.qy`<wui-flex flexDirection="column" gap="xxs" alignItems="center"> 6346 <wui-flex 6347 .padding=${["m","m","m","m"]} 6348 justifyContent="space-between" 6349 class="suggestion" 6350 > 6351 <wui-text color="fg-100" variant="paragraph-400" class="suggested-name"> 6352 ${this.name}</wui-text 6353 >${this.nameSuggestionTagTemplate()} 6354 </wui-flex> 6355 ${e.map((e=>this.availableNameTemplate(e.name)))} 6356 </wui-flex>`}availableNameTemplate(e){return Le.qy` <wui-flex 6357 .padding=${["m","m","m","m"]} 6358 justifyContent="space-between" 6359 class="suggestion" 6360 @click=${this.onSelectSuggestion(e)} 6361 > 6362 <wui-text color="fg-100" variant="paragraph-400" class="suggested-name"> 6363 ${e} 6364 </wui-text> 6365 <wui-tag variant="success" size="lg">Available</wui-tag> 6366 </wui-flex>`}isAllowedToSubmit(){return!this.loading&&!this.registered&&!this.error&&Me.f.validateName(this.name)}async onSubmitName(){try{if(!this.isAllowedToSubmit())return;await Me.f.registerName(this.name)}catch(e){Me.Pt.showError(e.message)}}onEnterKey(e){"Enter"===e.key&&this.isAllowedToSubmit()&&this.onSubmitName()}};Yt.styles=Mt,Zt([(0,De.MZ)()],Yt.prototype,"errorMessage",void 0),Zt([(0,De.wk)()],Yt.prototype,"name",void 0),Zt([(0,De.wk)()],Yt.prototype,"error",void 0),Zt([(0,De.wk)()],Yt.prototype,"loading",void 0),Zt([(0,De.wk)()],Yt.prototype,"suggestions",void 0),Zt([(0,De.wk)()],Yt.prototype,"registered",void 0),Yt=Zt([(0,je.customElement)("w3m-register-account-name-view")],Yt);const Qt=Le.AH` 6367 .continue-button-container { 6368 width: 100%; 6369 } 6370`;var Jt=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Xt=class extends Le.WF{render(){return Le.qy` 6371 <wui-flex 6372 flexDirection="column" 6373 alignItems="center" 6374 gap="xxl" 6375 .padding=${["0","0","l","0"]} 6376 > 6377 ${this.onboardingTemplate()} ${this.buttonsTemplate()} 6378 <wui-link 6379 @click=${()=>{Me.wE.openHref(St.TC.URLS.FAQ,"_blank")}} 6380 > 6381 Learn more 6382 <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon> 6383 </wui-link> 6384 </wui-flex> 6385 `}onboardingTemplate(){return Le.qy` <wui-flex 6386 flexDirection="column" 6387 gap="xxl" 6388 alignItems="center" 6389 .padding=${["0","xxl","0","xxl"]} 6390 > 6391 <wui-flex gap="s" alignItems="center" justifyContent="center"> 6392 <wui-icon-box 6393 size="xl" 6394 iconcolor="success-100" 6395 backgroundcolor="success-100" 6396 icon="checkmark" 6397 background="opaque" 6398 ></wui-icon-box> 6399 </wui-flex> 6400 <wui-flex flexDirection="column" alignItems="center" gap="s"> 6401 <wui-text align="center" variant="medium-600" color="fg-100"> 6402 Account name chosen successfully 6403 </wui-text> 6404 <wui-text align="center" variant="paragraph-400" color="fg-100"> 6405 You can now fund your account and trade crypto 6406 </wui-text> 6407 </wui-flex> 6408 </wui-flex>`}buttonsTemplate(){return Le.qy`<wui-flex 6409 .padding=${["0","2l","0","2l"]} 6410 gap="s" 6411 class="continue-button-container" 6412 > 6413 <wui-button fullWidth size="lg" borderRadius="xs" @click=${this.redirectToAccount.bind(this)} 6414 >Let's Go! 6415 </wui-button> 6416 </wui-flex>`}redirectToAccount(){Me.IN.replace("Account")}};Xt.styles=Qt,Xt=Jt([(0,je.customElement)("w3m-register-account-name-success-view")],Xt);const en=Le.AH` 6417 @keyframes shake { 6418 0% { 6419 transform: translateX(0); 6420 } 6421 25% { 6422 transform: translateX(3px); 6423 } 6424 50% { 6425 transform: translateX(-3px); 6426 } 6427 75% { 6428 transform: translateX(3px); 6429 } 6430 100% { 6431 transform: translateX(0); 6432 } 6433 } 6434 6435 wui-flex:first-child:not(:only-child) { 6436 position: relative; 6437 } 6438 6439 wui-loading-hexagon { 6440 position: absolute; 6441 } 6442 6443 wui-icon-box { 6444 position: absolute; 6445 right: 4px; 6446 bottom: 0; 6447 opacity: 0; 6448 transform: scale(0.5); 6449 z-index: 1; 6450 } 6451 6452 wui-button { 6453 display: none; 6454 } 6455 6456 [data-error='true'] wui-icon-box { 6457 opacity: 1; 6458 transform: scale(1); 6459 } 6460 6461 [data-error='true'] > wui-flex:first-child { 6462 animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; 6463 } 6464 6465 wui-button[data-retry='true'] { 6466 display: block; 6467 opacity: 1; 6468 } 6469`;var tn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let nn=class extends Le.WF{constructor(){super(),this.network=Me.IN.state.data?.network,this.unsubscribe=[],this.showRetry=!1,this.error=!1}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}firstUpdated(){this.onSwitchNetwork()}
6469render(){if(!this.network)throw new Error("w3m-network-switch-view: No network provided");this.onShowRetry();const e=this.getLabel(),t=this.getSubLabel();return Le.qy` 6470 <wui-flex 6471 data-error=${this.error} 6472 flexDirection="column" 6473 alignItems="center" 6474 .padding=${["3xl","xl","3xl","xl"]} 6475 gap="xl" 6476 > 6477 <wui-flex justifyContent="center" alignItems="center"> 6478 <wui-network-image 6479 size="lg" 6480 imageSrc=${Ue(Me.$m.getNetworkImage(this.network))} 6481 ></wui-network-image> 6482 6483 ${this.error?null:Le.qy`<wui-loading-hexagon></wui-loading-hexagon>`} 6484 6485 <wui-icon-box 6486 backgroundColor="error-100" 6487 background="opaque" 6488 iconColor="error-100" 6489 icon="close" 6490 size="sm" 6491 ?border=${!0} 6492 borderColor="wui-color-bg-125" 6493 ></wui-icon-box> 6494 </wui-flex> 6495 6496 <wui-flex flexDirection="column" alignItems="center" gap="xs"> 6497 <wui-text align="center" variant="paragraph-500" color="fg-100">${e}</wui-text> 6498 <wui-text align="center" variant="small-500" color="fg-200">${t}</wui-text> 6499 </wui-flex> 6500 6501 <wui-button 6502 data-retry=${this.showRetry} 6503 variant="accent" 6504 size="md" 6505 .disabled=${!this.error} 6506 @click=${this.onSwitchNetwork.bind(this)} 6507 > 6508 <wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon> 6509 Try again 6510 </wui-button> 6511 </wui-flex> 6512 `}getSubLabel(){const e=Me.iT.getConnectedConnector();return Me.aK.getAuthConnector()&&"AUTH"===e?"":this.error?"Switch can be declined if chain is not supported by a wallet or previous request is still active":"Accept connection request in your wallet"}getLabel(){const e=Me.iT.getConnectedConnector();return Me.aK.getAuthConnector()&&"AUTH"===e?`Switching to ${this.network?.name??"Unknown"} network...`:this.error?"Switch declined":"Approve in wallet"}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;const e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}async onSwitchNetwork(){try{this.error=!1,this.network&&(await Me.p_.switchActiveNetwork(this.network),Me.Hd.state.isSiweEnabled||Me.aS.navigateAfterNetworkSwitch())}catch{this.error=!0}}};nn.styles=en,tn([(0,De.wk)()],nn.prototype,"showRetry",void 0),tn([(0,De.wk)()],nn.prototype,"error",void 0),nn=tn([(0,je.customElement)("w3m-network-switch-view")],nn);const rn=Le.AH` 6513 :host > wui-grid { 6514 max-height: 360px; 6515 overflow: auto; 6516 } 6517 6518 wui-grid::-webkit-scrollbar {
6519 display: none; 6520 } 6521`;var sn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let on=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.caipNetwork=Me.p_.state.caipNetwork,this.unsubscribe.push(Me.p_.subscribeKey("caipNetwork",(e=>this.caipNetwork=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return Le.qy` 6522 <wui-grid padding="s" gridTemplateColumns="repeat(4, 1fr)" rowGap="l" columnGap="xs"> 6523 ${this.networksTemplate()} 6524 </wui-grid> 6525 6526 <wui-separator></wui-separator> 6527 6528 <wui-flex padding="s" flexDirection="column" gap="m" alignItems="center"> 6529 <wui-text variant="small-400" color="fg-300" align="center"> 6530 Your connected wallet may not support some of the networks available for this dApp 6531 </wui-text> 6532 <wui-link @click=${this.onNetworkHelp.bind(this)}> 6533 <wui-icon size="xs" color="accent-100" slot="iconLeft" name="helpCircle"></wui-icon> 6534 What is a network 6535 </wui-link> 6536 </wui-flex> 6537 `}onNetworkHelp(){Me.En.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),Me.IN.push("WhatIsANetwork")}networksTemplate(){const{approvedCaipNetworkIds:e,requestedCaipNetworks:t,supportsAllNetworks:n}=Me.p_.state,r=Me.wE.sortRequestedNetworks(e,t);return r?.map((t=>Le.qy` 6538 <wui-card-select 6539 .selected=${this.caipNetwork?.id===t.id} 6540 imageSrc=${Ue(Me.$m.getNetworkImage(t))} 6541 type="network" 6542 name=${t.name??t.id} 6543 @click=${()=>this.onSwitchNetwork(t)} 6544 .disabled=${!n&&!e?.includes(t.id)} 6545 data-testid=${`w3m-network-switch-${t.name??t.id}`} 6546 ></wui-card-select> 6547 `))}async onSwitchNetwork(e){const{isConnected:t}=Me.Uj.state,{approvedCaipNetworkIds:n,supportsAllNetworks:r,caipNetwork:i}=Me.p_.state,{data:s}=Me.IN.state;t&&i?.id!==e.id?n?.includes(e.id)?(await Me.p_.switchActiveNetwork(e),Me.aS.navigateAfterNetworkSwitch()):r&&Me.IN.push("SwitchNetwork",{...s,network:e}):t||(Me.p_.setCaipNetwork(e),Me.IN.push("Connect"))}};on.styles=rn,sn([(0,De.wk)()],on.prototype,"caipNetwork",void 0),on=sn([(0,je.customElement)("w3m-networks-view")],on);const an=Le.AH` 6548 :host > wui-flex { 6549 height: 500px; 6550 overflow-y: auto; 6551 overflow-x: hidden; 6552 scrollbar-width: none; 6553 padding: var(--wui-spacing-m); 6554 box-sizing: border-box; 6555 display: flex; 6556 align-items: center; 6557 justify-content: flex-start; 6558 } 6559 6560 :host > wui-flex::-webkit-scrollbar {
6561 display: none; 6562 } 6563 6564 :host > wui-flex > wui-flex { 6565 width: 100%; 6566 } 6567 6568 wui-transaction-list-item-loader { 6569 width: 100%; 6570 } 6571`;var cn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let ln=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=Me.aG.state.selectedProvider,this.loading=!1,this.coinbaseTransactions=Me.WC.state.coinbaseTransactions,this.tokenImages=Me.jQ.state.tokenImages,this.unsubscribe.push(Me.aG.subscribeKey("selectedProvider",(e=>{this.selectedOnRampProvider=e})),Me.jQ.subscribeKey("tokenImages",(e=>this.tokenImages=e)),(()=>{clearTimeout(this.refetchTimeout)}),Me.WC.subscribe((e=>{this.coinbaseTransactions={...e.coinbaseTransactions}}))),Me.WC.clearCursor(),this.fetchTransactions()}render(){return Le.qy` 6572 <wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs"> 6573 ${this.loading?this.templateLoading():this.templateTransactionsByYear()} 6574 </wui-flex> 6575 `}templateTransactions(e){return e?.map((e=>{const t=St.rL.formatDate(e?.metadata?.minedAt),n=e.transfers[0],r=n?.fungible_info;if(!r)return null;const i=r?.icon?.url||this.tokenImages?.[r.symbol||""];return Le.qy` 6576 <wui-onramp-activity-item 6577 label="Bought" 6578 .completed=${"ONRAMP_TRANSACTION_STATUS_SUCCESS"===e.metadata.status} 6579 .inProgress=${"ONRAMP_TRANSACTION_STATUS_IN_PROGRESS"===e.metadata.status} 6580 .failed=${"ONRAMP_TRANSACTION_STATUS_FAILED"===e.metadata.status} 6581 purchaseCurrency=${Ue(r.symbol)} 6582 purchaseValue=${n.quantity.numeric} 6583 date=${t} 6584 icon=${Ue(i)} 6585 symbol=${Ue(r.symbol)} 6586 ></wui-onramp-activity-item> 6587 `}))}templateTransactionsByYear(){return Object.keys(this.coinbaseTransactions).sort().reverse().map((e=>{const t=parseInt(e,10);return new Array(12).fill(null).map(((e,t)=>t)).reverse().map((e=>{const n=je.TransactionUtil.getTransactionGroupTitle(t,e),r=this.coinbaseTransactions[t]?.[e];return r?Le.qy` 6588 <wui-flex flexDirection="column"> 6589 <wui-flex 6590 alignItems="center" 6591 flexDirection="row" 6592 .padding=${["xs","s","s","s"]} 6593 > 6594 <wui-text variant="paragraph-500" color="fg-200">${n}</wui-text> 6595 </wui-flex> 6596 <wui-flex flexDirection="column" gap="xs"> 6597 ${this.templateTransactions(r)} 6598 </wui-flex> 6599 </wui-flex> 6600 `:null}))}))}async fetchTransactions(){await this.fetchCoinbaseTransactions()}async fetchCoinbaseTransactions(){const e=Me.Uj.state.address,t=Me.Hd.state.projectId;if(!e)throw new Error("No address found");if(!t)throw new Error("No projectId found");this.loading=!0,await Me.WC.fetchTransactions(e,"coinbase"),this.loading=!1,this.refetchLoadingTransactions()}refetchLoadingTransactions(){const e=new Date;0!==(this.coinbaseTransactions[e.getFullYear()]?.[e.getMonth()]||[]).filter((e=>"ONRAMP_TRANSACTION_STATUS_IN_PROGRESS"===e.metadata.status)).length?this.refetchTimeout=setTimeout((async()=>{const e=Me.Uj.state.address;await Me.WC.fetchTransactions(e,"coinbase"),this.refetchLoadingTransactions()}),3e3):clearTimeout(this.refetchTimeout)}templateLoading(){return Array(7).fill(Le.qy` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map((e=>e))}};ln.styles=an,cn([(0,De.wk)()],ln.prototype,"selectedOnRampProvider",void 0),cn([(0,De.wk)()],ln.prototype,"loading",void 0),cn([(0,De.wk)()],ln.prototype,"coinbaseTransactions",void 0),cn([(0,De.wk)()],ln.prototype,"tokenImages",void 0),ln=cn([(0,je.customElement)("w3m-onramp-activity-view")],ln);const un=Le.AH` 6601 :host > wui-grid { 6602 max-height: 360px; 6603 overflow: auto; 6604 } 6605 6606 wui-grid::-webkit-scrollbar {
6607 display: none; 6608 } 6609`;var dn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let hn=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=Me.aG.state.paymentCurrency,this.currencies=Me.aG.state.paymentCurrencies,this.currencyImages=Me.jQ.state.currencyImages,this.unsubscribe.push(Me.aG.subscribe((e=>{this.selectedCurrency=e.paymentCurrency,this.currencies=e.paymentCurrencies})),Me.jQ.subscribeKey("currencyImages",(e=>this.currencyImages=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return Le.qy` 6610 <wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs"> 6611 ${this.currenciesTemplate()} 6612 </wui-flex> 6613 <w3m-legal-footer></w3m-legal-footer> 6614 `}currenciesTemplate(){return this.currencies.map((e=>Le.qy` 6615 <wui-list-item 6616 imageSrc=${Ue(this.currencyImages?.[e.id])} 6617 @click=${()=>this.selectCurrency(e)} 6618 variant="image" 6619 > 6620 <wui-text variant="paragraph-500" color="fg-100">${e.id}</wui-text> 6621 </wui-list-item> 6622 `))}selectCurrency(e){e&&(Me.aG.setPaymentCurrency(e),Me.W3.close())}};hn.styles=un,dn([(0,De.wk)()],hn.prototype,"selectedCurrency",void 0),dn([(0,De.wk)()],hn.prototype,"currencies",void 0),dn([(0,De.wk)()],hn.prototype,"currencyImages",void 0),hn=dn([(0,je.customElement)("w3m-onramp-fiat-select-view")],hn);var pn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let fn=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.providers=Me.aG.state.providers,this.unsubscribe.push(Me.aG.subscribeKey("providers",(e=>{this.providers=e})))}firstUpdated(){const e=this.providers.map((async e=>"coinbase"===e.name?await this.getCoinbaseOnRampURL():Promise.resolve(e?.url)));Promise.all(e).then((e=>{this.providers=this.providers.map(((t,n)=>({...t,url:e[n]||""})))}))}render(){return Le.qy` 6623 <wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs"> 6624 ${this.onRampProvidersTemplate()} 6625 </wui-flex> 6626 <w3m-onramp-providers-footer></w3m-onramp-providers-footer> 6627 `}onRampProvidersTemplate(){return this.providers.map((e=>Le.qy` 6628 <wui-onramp-provider-item 6629 label=${e.label} 6630 name=${e.name} 6631 feeRange=${e.feeRange} 6632 @click=${()=>{this.onClickProvider(e)}} 6633 ?disabled=${!e.url} 6634 ></wui-onramp-provider-item> 6635 `))}onClickProvider(e){Me.aG.setSelectedProvider(e),Me.IN.push("BuyInProgress"),Me.wE.openHref(e.url,"popupWindow","width=600,height=800,scrollbars=yes")}async getCoinbaseOnRampURL(){const e=Me.Uj.state.address,t=Me.p_.state.caipNetwork;if(!e)throw new Error("No address found");if(!t?.name)throw new Error("No network found");const n=Me.oU.WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP[t.name]??Me.oU.WC_COINBASE_PAY_SDK_FALLBACK_CHAIN,r=Me.aG.state.purchaseCurrency,i=r?[r.symbol]:Me.aG.state.purchaseCurrencies.map((e=>e.symbol));return await Me.TP.generateOnRampURL({defaultNetwork:n,destinationWallets:[{address:e,blockchains:Me.oU.WC_COINBASE_PAY_SDK_CHAINS,assets:i}],partnerUserId:e,purchaseAmount:Me.aG.state.purchaseAmount})}};pn([(0,De.wk)()],fn.prototype,"providers",void 0),fn=pn([(0,je.customElement)("w3m-onramp-providers-view")],fn);const mn=Le.AH` 6636 :host > wui-grid { 6637 max-height: 360px; 6638 overflow: auto; 6639 } 6640 6641 wui-grid::-webkit-scrollbar {
6642 display: none; 6643 } 6644`;var gn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let yn=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=Me.aG.state.purchaseCurrencies,this.tokens=Me.aG.state.purchaseCurrencies,this.tokenImages=Me.jQ.state.tokenImages,this.unsubscribe.push(Me.aG.subscribe((e=>{this.selectedCurrency=e.purchaseCurrencies,this.tokens=e.purchaseCurrencies})),Me.jQ.subscribeKey("tokenImages",(e=>this.tokenImages=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return Le.qy` 6645 <wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs"> 6646 ${this.currenciesTemplate()} 6647 </wui-flex> 6648 <w3m-legal-footer></w3m-legal-footer> 6649 `}currenciesTemplate(){return this.tokens.map((e=>Le.qy` 6650 <wui-list-item 6651 imageSrc=${Ue(this.tokenImages?.[e.symbol])} 6652 @click=${()=>this.selectToken(e)} 6653 variant="image" 6654 > 6655 <wui-flex gap="3xs" alignItems="center"> 6656 <wui-text variant="paragraph-500" color="fg-100">${e.name}</wui-text> 6657 <wui-text variant="small-400" color="fg-200">${e.symbol}</wui-text> 6658 </wui-flex> 6659 </wui-list-item> 6660 `))}selectToken(e){e&&(Me.aG.setPurchaseCurrency(e),Me.W3.close())}};yn.styles=mn,gn([(0,De.wk)()],yn.prototype,"selectedCurrency",void 0),gn([(0,De.wk)()],yn.prototype,"tokens",void 0),gn([(0,De.wk)()],yn.prototype,"tokenImages",void 0),yn=gn([(0,je.customElement)("w3m-onramp-token-select-view")],yn);const vn=Le.AH` 6661 :host > wui-flex:first-child { 6662 overflow-y: auto; 6663 overflow-x: hidden; 6664 scrollbar-width: none; 6665 } 6666 6667 :host > wui-flex:first-child::-webkit-scrollbar {
6668 display: none; 6669 } 6670 6671 wui-loading-hexagon { 6672 position: absolute; 6673 } 6674 6675 .action-button { 6676 width: 100%; 6677 border-radius: var(--wui-border-radius-xs); 6678 } 6679 6680 .action-button:disabled { 6681 border-color: 1px solid var(--wui-color-gray-glass-005); 6682 } 6683 6684 .swap-inputs-container { 6685 position: relative; 6686 } 6687 6688 .replace-tokens-button-container { 6689 display: flex; 6690 justify-content: center; 6691 align-items: center; 6692 position: absolute; 6693 top: 50%; 6694 left: 50%; 6695 transform: translate(-50%, -50%); 6696 gap: var(--wui-spacing-1xs); 6697 border-radius: var(--wui-border-radius-xs); 6698 background-color: var(--wui-color-modal-bg-base); 6699 padding: var(--wui-spacing-xxs); 6700 } 6701 6702 .replace-tokens-button-container > button { 6703 display: flex; 6704 justify-content: center; 6705 align-items: center; 6706 height: 40px; 6707 width: 40px; 6708 padding: var(--wui-spacing-xs); 6709 border: none; 6710 border-radius: var(--wui-border-radius-xxs); 6711 background: var(--wui-color-gray-glass-002); 6712 transition: background-color var(--wui-duration-md) var(--wui-ease-out-power-1); 6713 will-change: background-color; 6714 z-index: 20; 6715 } 6716 6717 .replace-tokens-button-container > button:hover { 6718 background: var(--wui-color-gray-glass-005); 6719 } 6720 6721 .details-container > wui-flex { 6722 background: var(--wui-color-gray-glass-002); 6723 border-radius: var(--wui-border-radius-xxs); 6724 width: 100%; 6725 } 6726 6727 .details-container > wui-flex > button { 6728 border: none; 6729 background: none; 6730 padding: var(--wui-spacing-s); 6731 border-radius: var(--wui-border-radius-xxs); 6732 transition: background 0.2s linear; 6733 } 6734 6735 .details-container > wui-flex > button:hover { 6736 background: var(--wui-color-gray-glass-002); 6737 } 6738 6739 .details-content-container { 6740 padding: var(--wui-spacing-1xs); 6741 display: flex; 6742 align-items: center; 6743 justify-content: center; 6744 } 6745 6746 .details-content-container > wui-flex { 6747 width: 100%; 6748 } 6749 6750 .details-row { 6751 width: 100%; 6752 padding: var(--wui-spacing-s) var(--wui-spacing-xl); 6753 border-radius: var(--wui-border-radius-xxs); 6754 background: var(--wui-color-gray-glass-002); 6755 } 6756`;var wn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let bn=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.detailsOpen=!1,this.caipNetworkId=Me.p_.state.caipNetwork?.id,this.initialized=Me.GN.state.initialized,this.loading=Me.GN.state.loading,this.loadingPrices=Me.GN.state.loadingPrices,this.sourceToken=Me.GN.state.sourceToken,this.sourceTokenAmount=Me.GN.state.sourceTokenAmount,this.sourceTokenPriceInUSD=Me.GN.state.sourceTokenPriceInUSD,this.toToken=Me.GN.state.toToken,this.toTokenAmount=Me.GN.state.toTokenAmount,this.toTokenPriceInUSD=Me.GN.state.toTokenPriceInUSD,this.inputError=Me.GN.state.inputError,this.gasPriceInUSD=Me.GN.state.gasPriceInUSD,this.transactionLoading=Me.GN.state.transactionLoading,this.fetchError=Me.GN.state.fetchError,this.onDebouncedGetSwapCalldata=Me.wE.debounce((async()=>{await Me.GN.swapTokens()}),200),Me.p_.subscribeKey("caipNetwork",(e=>{this.caipNetworkId!==e?.id&&(this.caipNetworkId=e?.id,Me.GN.resetState(),Me.GN.initializeState())})),this.unsubscribe.push(Me.W3.subscribeKey("open",(e=>{e||Me.GN.resetState()})),Me.IN.subscribeKey("view",(e=>{e.includes("Swap")||Me.GN.resetValues()})),Me.GN.subscribe((e=>{this.initialized=e.initialized,this.loading=e.loading,this.loadingPrices=e.loadingPrices,this.transactionLoading=e.transactionLoading,this.sourceToken=e.sourceToken,this.sourceTokenAmount=e.sourceTokenAmount,this.sourceTokenPriceInUSD=e.sourceTokenPriceInUSD,this.toToken=e.toToken,this.toTokenAmount=e.toTokenAmount,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.inputError=e.inputError,this.gasPriceInUSD=e.gasPriceInUSD,this.fetchError=e.fetchError})))}firstUpdated(){Me.GN.initializeState(),this.watchTokensAndValues()}disconnectedCallback(){this.unsubscribe.forEach((e=>e?.())),clearInterval(this.interval)}render(){return Le.qy` 6757 <wui-flex flexDirection="column" .padding=${["0","l","l","l"]} gap="s"> 6758 ${this.initialized?this.templateSwap():this.templateLoading()} 6759 </wui-flex> 6760 `}watchTokensAndValues(){this.interval=setInterval((()=>{Me.GN.getNetworkTokenPrice(),Me.GN.getMyTokensWithBalance(),Me.GN.swapTokens()}),1e4)}templateSwap(){return Le.qy` 6761 <wui-flex flexDirection="column" gap="s"> 6762 <wui-flex flexDirection="column" alignItems="center" gap="xs" class="swap-inputs-container"> 6763 ${this.templateTokenInput("sourceToken",this.sourceToken)} 6764 ${this.templateTokenInput("toToken",this.toToken)} ${this.templateReplaceTokensButton()} 6765 </wui-flex> 6766 ${this.templateDetails()} ${this.templateActionButton()} 6767 </wui-flex> 6768 `}actionButtonLabel(){return this.fetchError?"Swap":this.sourceToken&&this.toToken?this.sourceTokenAmount?this.initialized?this.inputError?this.inputError:"Review swap":"Swap":"Enter amount":"Select token"}templateReplaceTokensButton(){return Le.qy` 6769 <wui-flex class="replace-tokens-button-container"> 6770 <button @click=${this.onSwitchTokens.bind(this)}> 6771 <wui-icon name="recycleHorizontal" color="fg-250" size="lg"></wui-icon> 6772 </button> 6773 </wui-flex> 6774 `}templateLoading(){return Le.qy` 6775 <wui-flex flexDirection="column" gap="l"> 6776 <wui-flex flexDirection="column" alignItems="center" gap="xs" class="swap-inputs-container"> 6777 <w3m-swap-input-skeleton target="sourceToken"></w3m-swap-input-skeleton> 6778 <w3m-swap-input-skeleton target="toToken"></w3m-swap-input-skeleton> 6779 ${this.templateReplaceTokensButton()} 6780 </wui-flex> 6781 ${this.templateActionButton()} 6782 </wui-flex> 6783 `}templateTokenInput(e,t){const n=Me.GN.state.myTokensWithBalance?.find((e=>e?.address===t?.address)),r="toToken"===e?this.toTokenAmount:this.sourceTokenAmount,i="toToken"===e?this.toTokenPriceInUSD:this.sourceTokenPriceInUSD;let s=parseFloat(r)*i;return"toToken"===e&&(s-=this.gasPriceInUSD||0),Le.qy`<w3m-swap-input 6784 .value=${"toToken"===e?this.toTokenAmount:this.sourceTokenAmount} 6785 ?disabled=${this.loading&&"toToken"===e} 6786 .onSetAmount=${this.handleChangeAmount.bind(this)} 6787 target=${e} 6788 .token=${t} 6789 .balance=${n?.quantity?.numeric} 6790 .price=${n?.price} 6791 .marketValue=${s} 6792 .onSetMaxValue=${this.onSetMaxValue.bind(this)} 6793 ></w3m-swap-input>`}onSetMaxValue(e,t){const n="sourceToken"===e?this.sourceToken:this.toToken,r=n?.address===Me.oU.NATIVE_TOKEN_ADDRESS;let i="0";if(!t)return i="0",void this.handleChangeAmount(e,i);if(!this.gasPriceInUSD)return i=t,void this.handleChangeAmount(e,i);const s=St.Se.bigNumber(this.gasPriceInUSD.toFixed(5)).dividedBy(this.sourceTokenPriceInUSD),o=r?St.Se.bigNumber(t).minus(s):St.Se.bigNumber(t);this.handleChangeAmount(e,o.isGreaterThan(0)?o.toFixed(20):"0")}templateDetails(){return this.sourceToken&&this.toToken&&!this.inputError?Le.qy`<w3m-swap-details .detailsOpen=${this.detailsOpen}></w3m-swap-details>`:null}handleChangeAmount(e,t){Me.GN.clearError(),"sourceToken"===e?Me.GN.setSourceTokenAmount(t):Me.GN.setToTokenAmount(t),this.onDebouncedGetSwapCalldata()}templateActionButton(){const e=!this.toToken||!this.sourceToken,t=!this.sourceTokenAmount,n=this.loading||this.loadingPrices||this.transactionLoading,r=n||e||t||this.inputError;return Le.qy` <wui-flex gap="xs"> 6794 <wui-button 6795 class="action-button" 6796 fullWidth 6797 size="lg" 6798 borderRadius="xs" 6799 variant=${e?"neutral":"main"} 6800 .loading=${n} 6801 .disabled=${r} 6802 @click=${this.onSwapPreview} 6803 > 6804 ${this.actionButtonLabel()} 6805 </wui-button>
6805 6806 </wui-flex>`}onSwitchTokens(){Me.GN.switchTokens()}onSwapPreview(){this.fetchError?Me.GN.swapTokens():Me.IN.push("SwapPreview")}};bn.styles=vn,wn([(0,De.wk)()],bn.prototype,"interval",void 0),wn([(0,De.wk)()],bn.prototype,"detailsOpen",void 0),wn([(0,De.wk)()],bn.prototype,"caipNetworkId",void 0),wn([(0,De.wk)()],bn.prototype,"initialized",void 0),wn([(0,De.wk)()],bn.prototype,"loading",void 0),wn([(0,De.wk)()],bn.prototype,"loadingPrices",void 0),wn([(0,De.wk)()],bn.prototype,"sourceToken",void 0),wn([(0,De.wk)()],bn.prototype,"sourceTokenAmount",void 0),wn([(0,De.wk)()],bn.prototype,"sourceTokenPriceInUSD",void 0),wn([(0,De.wk)()],bn.prototype,"toToken",void 0),wn([(0,De.wk)()],bn.prototype,"toTokenAmount",void 0),wn([(0,De.wk)()],bn.prototype,"toTokenPriceInUSD",void 0),wn([(0,De.wk)()],bn.prototype,"inputError",void 0),wn([(0,De.wk)()],bn.prototype,"gasPriceInUSD",void 0),wn([(0,De.wk)()],bn.prototype,"transactionLoading",void 0),wn([(0,De.wk)()],bn.prototype,"fetchError",void 0),bn=wn([(0,je.customElement)("w3m-swap-view")],bn);const xn=Le.AH` 6807 :host > wui-flex:first-child { 6808 overflow-y: auto; 6809 overflow-x: hidden; 6810 scrollbar-width: none; 6811 } 6812 6813 :host > wui-flex:first-child::-webkit-scrollbar {
6814 display: none; 6815 } 6816 6817 .preview-container, 6818 .details-container { 6819 width: 100%; 6820 } 6821 6822 .token-image { 6823 width: 24px; 6824 height: 24px; 6825 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 6826 border-radius: 12px; 6827 } 6828 6829 wui-loading-hexagon { 6830 position: absolute; 6831 } 6832 6833 .token-item { 6834 display: flex; 6835 align-items: center; 6836 justify-content: center; 6837 gap: var(--wui-spacing-xxs); 6838 padding: var(--wui-spacing-xs); 6839 height: 40px; 6840 border: none; 6841 border-radius: 80px; 6842 background: var(--wui-color-gray-glass-002); 6843 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 6844 cursor: pointer; 6845 transition: background 0.2s linear; 6846 } 6847 6848 .token-item:hover { 6849 background: var(--wui-color-gray-glass-005); 6850 } 6851 6852 .preview-token-details-container { 6853 width: 100%; 6854 } 6855 6856 .details-row { 6857 width: 100%; 6858 padding: var(--wui-spacing-s) var(--wui-spacing-xl); 6859 border-radius: var(--wui-border-radius-xxs); 6860 background: var(--wui-color-gray-glass-002); 6861 } 6862 6863 .action-buttons-container { 6864 width: 100%; 6865 gap: var(--wui-spacing-xs); 6866 } 6867 6868 .action-buttons-container > button { 6869 display: flex; 6870 align-items: center; 6871 justify-content: center; 6872 background: transparent; 6873 height: 48px; 6874 border-radius: var(--wui-border-radius-xs); 6875 border: none; 6876 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 6877 } 6878 6879 .action-buttons-container > button:disabled { 6880 opacity: 0.8; 6881 cursor: not-allowed; 6882 } 6883 6884 .cancel-button:hover, 6885 .action-button:hover { 6886 cursor: pointer; 6887 } 6888 6889 .action-buttons-container > wui-button.cancel-button { 6890 flex: 2; 6891 } 6892 6893 .action-buttons-container > wui-button.action-button { 6894 flex: 4; 6895 } 6896 6897 .action-buttons-container > button.action-button > wui-text { 6898 color: white; 6899 } 6900 6901 .details-container > wui-flex { 6902 background: var(--wui-color-gray-glass-002); 6903 border-radius: var(--wui-border-radius-xxs); 6904 width: 100%; 6905 } 6906 6907 .details-container > wui-flex > button { 6908 border: none; 6909 background: none; 6910 padding: var(--wui-spacing-s); 6911 border-radius: var(--wui-border-radius-xxs); 6912 transition: background 0.2s linear; 6913 } 6914 6915 .details-container > wui-flex > button:hover { 6916 background: var(--wui-color-gray-glass-002); 6917 } 6918 6919 .details-content-container { 6920 padding: var(--wui-spacing-1xs); 6921 display: flex; 6922 align-items: center; 6923 justify-content: center; 6924 } 6925 6926 .details-content-container > wui-flex { 6927 width: 100%; 6928 } 6929 6930 .details-row { 6931 width: 100%; 6932 padding: var(--wui-spacing-s) var(--wui-spacing-xl); 6933 border-radius: var(--wui-border-radius-xxs); 6934 background: var(--wui-color-gray-glass-002); 6935 } 6936`;var En=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let _n=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.detailsOpen=!0,this.approvalTransaction=Me.GN.state.approvalTransaction,this.swapTransaction=Me.GN.state.swapTransaction,this.sourceToken=Me.GN.state.sourceToken,this.sourceTokenAmount=Me.GN.state.sourceTokenAmount??"",this.sourceTokenPriceInUSD=Me.GN.state.sourceTokenPriceInUSD,this.toToken=Me.GN.state.toToken,this.toTokenAmount=Me.GN.state.toTokenAmount??"",this.toTokenPriceInUSD=Me.GN.state.toTokenPriceInUSD,this.caipNetwork=Me.p_.state.caipNetwork,this.transactionLoading=Me.GN.state.transactionLoading,this.balanceSymbol=Me.Uj.state.balanceSymbol,this.gasPriceInUSD=Me.GN.state.gasPriceInUSD,this.inputError=Me.GN.state.inputError,this.loading=Me.GN.state.loading,this.unsubscribe.push(Me.Uj.subscribeKey("balanceSymbol",(e=>{this.balanceSymbol!==e&&Me.IN.goBack()})),Me.p_.subscribeKey("caipNetwork",(e=>{this.caipNetwork!==e&&(this.caipNetwork=e)})),Me.GN.subscribe((e=>{this.approvalTransaction=e.approvalTransaction,this.swapTransaction=e.swapTransaction,this.sourceToken=e.sourceToken,this.gasPriceInUSD=e.gasPriceInUSD,this.toToken=e.toToken,this.transactionLoading=e.transactionLoading,this.gasPriceInUSD=e.gasPriceInUSD,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.sourceTokenAmount=e.sourceTokenAmount??"",this.toTokenAmount=e.toTokenAmount??"",this.inputError=e.inputError,this.loading=e.loading}
6936)))}firstUpdated(){Me.GN.getTransaction(),this.refreshTransaction()}disconnectedCallback(){this.unsubscribe.forEach((e=>e?.())),clearInterval(this.interval)}render(){return Le.qy` 6937 <wui-flex flexDirection="column" .padding=${["0","l","l","l"]} gap="s"> 6938 ${this.templateSwap()} 6939 </wui-flex> 6940 `}refreshTransaction(){this.interval=setInterval((()=>{Me.GN.getTransaction()}),1e4)}templateSwap(){const e=`${je.UiHelperUtil.formatNumberToLocalString(parseFloat(this.sourceTokenAmount))} ${this.sourceToken?.symbol}`,t=`${je.UiHelperUtil.formatNumberToLocalString(parseFloat(this.toTokenAmount))} ${this.toToken?.symbol}`,n=parseFloat(this.sourceTokenAmount)*this.sourceTokenPriceInUSD,r=parseFloat(this.toTokenAmount)*this.toTokenPriceInUSD-(this.gasPriceInUSD||0),i=je.UiHelperUtil.formatNumberToLocalString(n),s=je.UiHelperUtil.formatNumberToLocalString(r);return Le.qy` 6941 <wui-flex flexDirection="column" alignItems="center" gap="l"> 6942 <wui-flex class="preview-container" flexDirection="column" alignItems="flex-start" gap="l"> 6943 <wui-flex 6944 class="preview-token-details-container" 6945 alignItems="center" 6946 justifyContent="space-between" 6947 gap="l" 6948 > 6949 <wui-flex flexDirection="column" alignItems="flex-start" gap="4xs"> 6950 <wui-text variant="small-400" color="fg-150">Send</wui-text> 6951 <wui-text variant="paragraph-400" color="fg-100">$${i}</wui-text> 6952 </wui-flex> 6953 <wui-token-button 6954 flexDirection="row-reverse" 6955 text=${e} 6956 imageSrc=${this.sourceToken?.logoUri} 6957 > 6958 </wui-token-button> 6959 </wui-flex> 6960 <wui-icon name="recycleHorizontal" color="fg-200" size="md"></wui-icon> 6961 <wui-flex 6962 class="preview-token-details-container" 6963 alignItems="center" 6964 justifyContent="space-between" 6965 gap="l" 6966 > 6967 <wui-flex flexDirection="column" alignItems="flex-start" gap="4xs"> 6968 <wui-text variant="small-400" color="fg-150">Receive</wui-text> 6969 <wui-text variant="paragraph-400" color="fg-100">$${s}</wui-text> 6970 </wui-flex> 6971 <wui-token-button 6972 flexDirection="row-reverse" 6973 text=${t} 6974 imageSrc=${this.toToken?.logoUri} 6975 > 6976 </wui-token-button> 6977 </wui-flex> 6978 </wui-flex> 6979 6980 ${this.templateDetails()} 6981 6982 <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="xs"> 6983 <wui-icon size="sm" color="fg-200" name="infoCircle"></wui-icon> 6984 <wui-text variant="small-400" color="fg-200">Review transaction carefully</wui-text> 6985 </wui-flex> 6986 6987 <wui-flex 6988 class="action-buttons-container" 6989 flexDirection="row" 6990 alignItems="center" 6991 justifyContent="space-between" 6992 gap="xs" 6993 > 6994 <wui-button 6995 class="cancel-button" 6996 fullWidth 6997 size="lg" 6998 borderRadius="xs" 6999 variant="neutral" 7000 @click=${this.onCancelTransaction.bind(this)} 7001 > 7002 <wui-text variant="paragraph-600" color="fg-200">Cancel</wui-text> 7003 </wui-button> 7004 <wui-button 7005 class="action-button" 7006 fullWidth 7007 size="lg" 7008 borderRadius="xs" 7009 variant="main" 7010 ?loading=${this.loading} 7011 ?disabled=${this.transactionLoading} 7012 @click=${this.onSendTransaction.bind(this)} 7013 > 7014 ${this.transactionLoading?Le.qy`<wui-loading-spinner color="inverse-100"></wui-loading-spinner>`:Le.qy`<wui-text variant="paragraph-600" color="inverse-100"> 7015 ${this.actionButtonLabel()} 7016 </wui-text>`} 7017 </wui-button> 7018 </wui-flex> 7019 </wui-flex> 7020 `}templateDetails(){return this.sourceToken&&this.toToken&&!this.inputError?Le.qy`<w3m-swap-details .detailsOpen=${this.detailsOpen}></w3m-swap-details>`:null}actionButtonLabel(){return this.approvalTransaction?"Approve":"Swap"}onCancelTransaction(){Me.IN.goBack()}onSendTransaction(){this.approvalTransaction?Me.GN.sendTransactionForApproval(this.approvalTransaction):Me.GN.sendTransactionForSwap(this.swapTransaction)}};_n.styles=xn,En([(0,De.wk)()],_n.prototype,"interval",void 0),En([(0,De.wk)()],_n.prototype,"detailsOpen",void 0),En([(0,De.wk)()],_n.prototype,"approvalTransaction",void 0),En([(0,De.wk)()],_n.prototype,"swapTransaction",void 0),En([(0,De.wk)()],_n.prototype,"sourceToken",void 0),En([(0,De.wk)()],_n.prototype,"sourceTokenAmount",void 0),En([(0,De.wk)()],_n.prototype,"sourceTokenPriceInUSD",void 0),En([(0,De.wk)()],_n.prototype,"toToken",void 0),En([(0,De.wk)()],_n.prototype,"toTokenAmount",void 0),En([(0,De.wk)()],_n.prototype,"toTokenPriceInUSD",void 0),En([(0,De.wk)()],_n.prototype,"caipNetwork",void 0),En([(0,De.wk)()],_n.prototype,"transactionLoading",void 0),En([(0,De.wk)()],_n.prototype,"balanceSymbol",void 0),En([(0,De.wk)()],_n.prototype,"gasPriceInUSD",void 0),En([(0,De.wk)()],_n.prototype,"inputError",void 0),En([(0,De.wk)()],_n.prototype,"loading",void 0),_n=En([(0,je.customElement)("w3m-swap-preview-view")],_n);const kn=Le.AH` 7021 :host { 7022 --tokens-scroll--top-opacity: 0; 7023 --tokens-scroll--bottom-opacity: 1; 7024 --suggested-tokens-scroll--left-opacity: 0; 7025 --suggested-tokens-scroll--right-opacity: 1; 7026 } 7027 7028 :host > wui-flex:first-child { 7029 overflow-y: hidden; 7030 overflow-x: hidden; 7031 scrollbar-width: none; 7032 scrollbar-height: none; 7033 } 7034 7035 :host > wui-flex:first-child::-webkit-scrollbar {
7036 display: none; 7037 } 7038 7039 wui-loading-hexagon { 7040 position: absolute; 7041 } 7042 7043 .suggested-tokens-container { 7044 overflow-x: auto; 7045 mask-image: linear-gradient( 7046 to right, 7047 rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 0px, 7048 rgba(200, 200, 200, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 1px, 7049 black 50px, 7050 black 90px, 7051 black calc(100% - 90px), 7052 black calc(100% - 50px), 7053 rgba(155, 155, 155, calc(1 - var(--suggested-tokens-scroll--right-opacity))) calc(100% - 1px), 7054 rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--right-opacity))) 100% 7055 ); 7056 } 7057 7058 .suggested-tokens-container::-webkit-scrollbar { 7059 display: none; 7060 } 7061 7062 .tokens-container { 7063 border-top: 1px solid var(--wui-color-gray-glass-005); 7064 height: 100%; 7065 max-height: 390px; 7066 } 7067 7068 .tokens { 7069 width: 100%; 7070 overflow-y: auto; 7071 mask-image: linear-gradient( 7072 to bottom, 7073 rgba(0, 0, 0, calc(1 - var(--tokens-scroll--top-opacity))) 0px, 7074 rgba(200, 200, 200, calc(1 - var(--tokens-scroll--top-opacity))) 1px, 7075 black 50px, 7076 black 90px, 7077 black calc(100% - 90px), 7078 black calc(100% - 50px), 7079 rgba(155, 155, 155, calc(1 - var(--tokens-scroll--bottom-opacity))) calc(100% - 1px), 7080 rgba(0, 0, 0, calc(1 - var(--tokens-scroll--bottom-opacity))) 100% 7081 ); 7082 } 7083 7084 .network-search-input, 7085 .select-network-button { 7086 height: 40px; 7087 } 7088 7089 .select-network-button { 7090 border: none; 7091 display: flex; 7092 flex-direction: row; 7093 align-items: center; 7094 justify-content: center; 7095 gap: var(--wui-spacing-xs); 7096 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 7097 background-color: transparent; 7098 border-radius: var(--wui-border-radius-xxs); 7099 padding: var(--wui-spacing-xs); 7100 align-items: center; 7101 transition: background-color 0.2s linear; 7102 } 7103 7104 .select-network-button:hover { 7105 background-color: var(--wui-color-gray-glass-002); 7106 } 7107 7108 .select-network-button > wui-image { 7109 width: 26px; 7110 height: 26px; 7111 border-radius: var(--wui-border-radius-xs); 7112 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 7113 } 7114`;var Cn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let An=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.targetToken=Me.IN.state.data?.target,this.sourceToken=Me.GN.state.sourceToken,this.sourceTokenAmount=Me.GN.state.sourceTokenAmount,this.toToken=Me.GN.state.toToken,this.myTokensWithBalance=Me.GN.state.myTokensWithBalance,this.popularTokens=Me.GN.state.popularTokens,this.searchValue="",this.unsubscribe.push(Me.GN.subscribe((e=>{this.sourceToken=e.sourceToken,this.toToken=e.toToken,this.myTokensWithBalance=e.myTokensWithBalance})))}updated(){const e=this.renderRoot?.querySelector(".suggested-tokens-container");e?.addEventListener("scroll",this.handleSuggestedTokensScroll.bind(this));const t=this.renderRoot?.querySelector(".tokens");t?.addEventListener("scroll",this.handleTokenListScroll.bind(this))}disconnectedCallback(){super.disconnectedCallback();const e=this.renderRoot?.querySelector(".suggested-tokens-container"),t=this.renderRoot?.querySelector(".tokens");e?.removeEventListener("scroll",this.handleSuggestedTokensScroll.bind(this)),t?.removeEventListener("scroll",this.handleTokenListScroll.bind(this)),clearInterval(this.interval)}render(){return Le.qy` 7115 <wui-flex flexDirection="column" gap="s"> 7116 ${this.templateSearchInput()} ${this.templateSuggestedTokens()} ${this.templateTokens()} 7117 </wui-flex> 7118 `}onSelectToken(e){"sourceToken"===this.targetToken?Me.GN.setSourceToken(e):(Me.GN.setToToken(e),this.sourceToken&&this.sourceTokenAmount&&Me.GN.swapTokens()),Me.IN.goBack()}templateSearchInput(){return Le.qy` 7119 <wui-flex .padding=${["0","s","0","s"]} gap="xs"> 7120 <wui-input-text 7121 class="network-search-input" 7122 size="sm" 7123 placeholder="Search token" 7124 icon="search" 7125 .value=${this.searchValue} 7126 @inputChange=${this.onSearchInputChange.bind(this)} 7127 ></wui-input-text> 7128 </wui-flex> 7129 `}templateTokens(){const e=this.myTokensWithBalance?Object.values(this.myTokensWithBalance):[],t=this.popularTokens?this.popularTokens:[],n=this.filterTokensWithText(e,this.searchValue),r=this.filterTokensWithText(t,this.searchValue);return Le.qy` 7130 <wui-flex class="tokens-container"> 7131 <wui-flex class="tokens" .padding=${["0","s","s","s"]} flexDirection="column"> 7132 ${n?.length>0?Le.qy` 7133 <wui-flex justifyContent="flex-start" padding="s"> 7134 <wui-text variant="paragraph-500" color="fg-200">Your tokens</wui-text> 7135 </wui-flex> 7136 ${n.map((e=>{const t=e.symbol===this.sourceToken?.symbol||e.symbol===this.toToken?.symbol;return Le.qy` 7137 <wui-token-list-item 7138 name=${e.name} 7139 ?disabled=${t} 7140 symbol=${e.symbol} 7141 price=${e?.price} 7142 amount=${e?.quantity?.numeric} 7143 imageSrc=${e.logoUri} 7144 @click=${()=>{t||this.onSelectToken(e)}} 7145 > 7146 </wui-token-list-item> 7147 `}))} 7148 `:null} 7149 7150 <wui-flex justifyContent="flex-start" padding="s"> 7151 <wui-text variant="paragraph-500" color="fg-200">Popular tokens</wui-text> 7152 </wui-flex> 7153 ${r?.length>0?r.map((e=>Le.qy` 7154 <wui-token-list-item 7155 name=${e.name} 7156 symbol=${e.symbol} 7157 imageSrc=${e.logoUri} 7158 @click=${()=>this.onSelectToken(e)} 7159 > 7160 </wui-token-list-item> 7161 `)):null} 7162 </wui-flex> 7163 </wui-flex> 7164 `}templateSuggestedTokens(){const e=Me.GN.state.suggestedTokens?Me.GN.state.suggestedTokens.slice(0,8):null;return e?Le.qy` 7165 <wui-flex class="suggested-tokens-container" .padding=${["0","s","0","s"]} gap="xs"> 7166 ${e.map((e=>Le.qy` 7167 <wui-token-button 7168 text=${e.symbol} 7169 imageSrc=${e.logoUri} 7170 @click=${()=>this.onSelectToken(e)} 7171 > 7172 </wui-token-button>
7172 7173 `))} 7174 </wui-flex> 7175 `:null}onSearchInputChange(e){this.searchValue=e.detail}handleSuggestedTokensScroll(){const e=this.renderRoot?.querySelector(".suggested-tokens-container");e&&(e.style.setProperty("--suggested-tokens-scroll--left-opacity",je.MathUtil.interpolate([0,100],[0,1],e.scrollLeft).toString()),e.style.setProperty("--suggested-tokens-scroll--right-opacity",je.MathUtil.interpolate([0,100],[0,1],e.scrollWidth-e.scrollLeft-e.offsetWidth).toString()))}handleTokenListScroll(){const e=this.renderRoot?.querySelector(".tokens");e&&(e.style.setProperty("--tokens-scroll--top-opacity",je.MathUtil.interpolate([0,100],[0,1],e.scrollTop).toString()),e.style.setProperty("--tokens-scroll--bottom-opacity",je.MathUtil.interpolate([0,100],[0,1],e.scrollHeight-e.scrollTop-e.offsetHeight).toString()))}filterTokensWithText(e,t){return e.filter((e=>`${e.symbol} ${e.name} ${e.address}`.toLowerCase().includes(t.toLowerCase())))}};An.styles=kn,Cn([(0,De.wk)()],An.prototype,"interval",void 0),Cn([(0,De.wk)()],An.prototype,"targetToken",void 0),Cn([(0,De.wk)()],An.prototype,"sourceToken",void 0),Cn([(0,De.wk)()],An.prototype,"sourceTokenAmount",void 0),Cn([(0,De.wk)()],An.prototype,"toToken",void 0),Cn([(0,De.wk)()],An.prototype,"myTokensWithBalance",void 0),Cn([(0,De.wk)()],An.prototype,"popularTokens",void 0),Cn([(0,De.wk)()],An.prototype,"searchValue",void 0),An=Cn([(0,je.customElement)("w3m-swap-select-token-view")],An);const Sn=Le.AH` 7176 :host > wui-flex:first-child { 7177 height: 500px; 7178 overflow-y: auto; 7179 overflow-x: hidden; 7180 scrollbar-width: none; 7181 } 7182 7183 :host > wui-flex:first-child::-webkit-scrollbar {
7184 display: none; 7185 } 7186`;var In=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Tn=class extends Le.WF{render(){return Le.qy` 7187 <wui-flex flexDirection="column" .padding=${["0","m","m","m"]} gap="s"> 7188 <w3m-activity-list page="activity"></w3m-activity-list> 7189 </wui-flex> 7190 `}};Tn.styles=Sn,Tn=In([(0,je.customElement)("w3m-transactions-view")],Tn);var Pn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};const Nn=[{images:["network","layers","system"],title:"The system\u2019s nuts and bolts",text:"A network is what brings the blockchain to life, as this technical infrastructure allows apps to access the ledger and smart contract services."},{images:["noun","defiAlt","dao"],title:"Designed for different uses",text:"Each network is designed differently, and may therefore suit certain apps and experiences."}];let Rn=class extends Le.WF{render(){return Le.qy` 7191 <wui-flex 7192 flexDirection="column" 7193 .padding=${["xxl","xl","xl","xl"]} 7194 alignItems="center" 7195 gap="xl" 7196 > 7197 <w3m-help-widget .data=${Nn}></w3m-help-widget> 7198 <wui-button 7199 variant="main" 7200 size="md" 7201 @click=${()=>{Me.wE.openHref("https://ethereum.org/en/developers/docs/networks/","_blank")}} 7202 > 7203 Learn more 7204 <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon> 7205 </wui-button> 7206 </wui-flex> 7207 `}};Rn=Pn([(0,je.customElement)("w3m-what-is-a-network-view")],Rn);var On=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};const Mn=[{images:["login","profile","lock"],title:"One login for all of web3",text:"Log in to any app by connecting your wallet. Say goodbye to countless passwords!"},{images:["defi","nft","eth"],title:"A home for your digital assets",text:"A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs."},{images:["browser","noun","dao"],title:"Your gateway to a new web",text:"With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more."}];let jn=class extends Le.WF{render(){return Le.qy` 7208 <wui-flex 7209 flexDirection="column" 7210 .padding=${["xxl","xl","xl","xl"]} 7211 alignItems="center" 7212 gap="xl" 7213 > 7214 <w3m-help-widget .data=${Mn}></w3m-help-widget> 7215 <wui-button variant="main" size="md" @click=${this.onGetWallet.bind(this)}> 7216 <wui-icon color="inherit" slot="iconLeft" name="wallet"></wui-icon> 7217 Get a wallet 7218 </wui-button> 7219 </wui-flex> 7220 `}onGetWallet(){Me.En.sendEvent({type:"track",event:"CLICK_GET_WALLET"}),Me.IN.push("GetWallet")}};jn=On([(0,je.customElement)("w3m-what-is-a-wallet-view")],jn);var Ln=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Dn=class extends Le.WF{render(){return Le.qy` 7221 <wui-flex 7222 flexDirection="column" 7223 .padding=${["xxl","3xl","xl","3xl"]} 7224 alignItems="center" 7225 gap="xl" 7226 > 7227 <wui-visual name="onrampCard"></wui-visual> 7228 <wui-flex flexDirection="column" gap="xs" alignItems="center"> 7229 <wui-text align="center" variant="paragraph-500" color="fg-100"> 7230 Quickly and easily buy digital assets! 7231 </wui-text> 7232 <wui-text align="center" variant="small-400" color="fg-200"> 7233 Simply select your preferred onramp provider and add digital assets to your account 7234 using your credit card or bank transfer 7235 </wui-text> 7236 </wui-flex> 7237 <wui-button @click=${Me.IN.goBack}> 7238 <wui-icon size="sm" color="inherit" name="add" slot="iconLeft"></wui-icon> 7239 Buy 7240 </wui-button>
7240 7241 </wui-flex> 7242 `}};Dn=Ln([(0,je.customElement)("w3m-what-is-a-buy-view")],Dn);const Bn=Le.AH` 7243 wui-loading-spinner { 7244 margin: 9px auto; 7245 } 7246`;var Un=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Fn=class extends Le.WF{firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}constructor(){super(),this.loading=!1,this.timeoutTimeLeft=st.QH.getTimeToNextEmailLogin(),this.error="",this.otp="",this.email=Me.IN.state.data?.email,this.authConnector=Me.aK.getAuthConnector()}render(){if(!this.email)throw new Error("w3m-email-otp-widget: No email provided");const e=Boolean(this.timeoutTimeLeft),t=this.getFooterLabels(e);return Le.qy` 7247 <wui-flex 7248 flexDirection="column" 7249 alignItems="center" 7250 .padding=${["l","0","l","0"]} 7251 gap="l" 7252 > 7253 <wui-flex flexDirection="column" alignItems="center"> 7254 <wui-text variant="paragraph-400" color="fg-100">Enter the code we sent to</wui-text> 7255 <wui-text variant="paragraph-500" color="fg-100">${this.email}</wui-text> 7256 </wui-flex> 7257 7258 <wui-text variant="small-400" color="fg-200">The code expires in 20 minutes</wui-text> 7259 7260 ${this.loading?Le.qy`<wui-loading-spinner size="xl" color="accent-100"></wui-loading-spinner>`:Le.qy` <wui-flex flexDirection="column" alignItems="center" gap="xs"> 7261 <wui-otp 7262 dissabled 7263 length="6" 7264 @inputChange=${this.onOtpInputChange.bind(this)} 7265 .otp=${this.otp} 7266 ></wui-otp> 7267 ${this.error?Le.qy` 7268 <wui-text variant="small-400" align="center" color="error-100"> 7269 ${this.error}. Try Again 7270 </wui-text> 7271 `:null} 7272 </wui-flex>`} 7273 7274 <wui-flex alignItems="center" gap="xs"> 7275 <wui-text variant="small-400" color="fg-200">${t.title}</wui-text> 7276 <wui-link @click=${this.onResendCode.bind(this)} .disabled=${e}> 7277 ${t.action} 7278 </wui-link> 7279 </wui-flex> 7280 </wui-flex> 7281 `}startOTPTimeout(){this.timeoutTimeLeft=st.QH.getTimeToNextEmailLogin(),this.OTPTimeout=setInterval((()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=st.QH.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)}),1e3)}async onOtpInputChange(e){try{this.loading||(this.otp=e.detail,this.authConnector&&6===this.otp.length&&(this.loading=!0,await(this.onOtpSubmit?.(this.otp))))}catch(t){this.error=Me.wE.parseError(t),this.loading=!1}}async onResendCode(){try{if(this.onOtpResend){if(!this.loading&&!this.timeoutTimeLeft){this.error="",this.otp="";if(!Me.aK.getAuthConnector()||!this.email)throw new Error("w3m-email-otp-widget: Unable to resend email");this.loading=!0,await this.onOtpResend(this.email),this.startOTPTimeout(),Me.Pt.showSuccess("Code email resent")}}else this.onStartOver&&this.onStartOver()}catch(e){Me.Pt.showError(e)}finally{this.loading=!1}}getFooterLabels(e){return this.onStartOver?{title:"Something wrong?",action:"Try again "+(e?`in ${this.timeoutTimeLeft}s`:"")}:{title:"Didn't receive it?",action:"Resend "+(e?`in ${this.timeoutTimeLeft}s`:"Code")}}};Fn.styles=Bn,Un([(0,De.wk)()],Fn.prototype,"loading",void 0),Un([(0,De.wk)()],Fn.prototype,"timeoutTimeLeft",void 0),Un([(0,De.wk)()],Fn.prototype,"error",void 0),Fn=Un([(0,je.customElement)("w3m-email-otp-widget")],Fn);var $n=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let zn=class extends Fn{constructor(){super(),this.unsubscribe=[],this.smartAccountDeployed=Me.Uj.state.smartAccountDeployed,this.onOtpSubmit=async e=>{try{if(this.authConnector){const t=Me.p_.checkIfSmartAccountEnabled();await this.authConnector.provider.connectOtp({otp:e}),Me.En.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),await Me.x4.connectExternal(this.authConnector),Me.En.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"email",name:this.authConnector.name||"Unknown"}}),t&&!this.smartAccountDeployed?Me.IN.push("UpgradeToSmartAccount"):Me.W3.close()}}catch(t){throw Me.En.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),t}},this.onOtpResend=async e=>{this.authConnector&&(await this.authConnector.provider.connectEmail({email:e}),Me.En.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))},this.unsubscribe.push(Me.Uj.subscribeKey("smartAccountDeployed",(e=>{this.smartAccountDeployed=e})))}};$n([(0,De.wk)()],zn.prototype,"smartAccountDeployed",void 0),zn=$n([(0,je.customElement)("w3m-email-verify-otp-view")],zn);const Hn=Le.AH` 7282 wui-icon-box { 7283 height: var(--wui-icon-box-size-xl); 7284 width: var(--wui-icon-box-size-xl); 7285 } 7286`;var Wn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let qn=class extends Le.WF{constructor(){super(),this.email=Me.IN.state.data?.email,this.authConnector=Me.aK.getAuthConnector(),this.loading=!1,this.listenForDeviceApproval()}
7286render(){if(!this.email)throw new Error("w3m-email-verify-device-view: No email provided");if(!this.authConnector)throw new Error("w3m-email-verify-device-view: No auth connector provided");return Le.qy` 7287 <wui-flex 7288 flexDirection="column" 7289 alignItems="center" 7290 .padding=${["xxl","s","xxl","s"]} 7291 gap="l" 7292 > 7293 <wui-icon-box 7294 size="xl" 7295 iconcolor="accent-100" 7296 backgroundcolor="accent-100" 7297 icon="verify" 7298 background="opaque" 7299 ></wui-icon-box> 7300 7301 <wui-flex flexDirection="column" alignItems="center" gap="s"> 7302 <wui-flex flexDirection="column" alignItems="center"> 7303 <wui-text variant="paragraph-400" color="fg-100"> 7304 Approve the login link we sent to 7305 </wui-text> 7306 <wui-text variant="paragraph-400" color="fg-100"><b>${this.email}</b></wui-text> 7307 </wui-flex> 7308 7309 <wui-text variant="small-400" color="fg-200" align="center"> 7310 The code expires in 20 minutes 7311 </wui-text> 7312 7313 <wui-flex alignItems="center" id="w3m-resend-section" gap="xs"> 7314 <wui-text variant="small-400" color="fg-100" align="center"> 7315 Didn't receive it? 7316 </wui-text> 7317 <wui-link @click=${this.onResendCode.bind(this)} .disabled=${this.loading}> 7318 Resend email 7319 </wui-link> 7320 </wui-flex> 7321 </wui-flex> 7322 </wui-flex> 7323 `}async listenForDeviceApproval(){if(this.authConnector)try{await this.authConnector.provider.connectDevice(),Me.En.sendEvent({type:"track",event:"DEVICE_REGISTERED_FOR_EMAIL"}),Me.En.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),Me.IN.replace("EmailVerifyOtp",{email:this.email})}catch(e){Me.IN.goBack()}}async onResendCode(){try{if(!this.loading){if(!this.authConnector||!this.email)throw new Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,await this.authConnector.provider.connectEmail({email:this.email}),this.listenForDeviceApproval(),Me.Pt.showSuccess("Code email resent")}}catch(e){Me.Pt.showError(e)}finally{this.loading=!1}}};qn.styles=Hn,Wn([(0,De.wk)()],qn.prototype,"loading",void 0),qn=Wn([(0,je.customElement)("w3m-email-verify-device-view")],qn);const Vn=Le.AH` 7324 div { 7325 width: 100%; 7326 height: 400px; 7327 } 7328 7329 [data-ready='false'] { 7330 transform: scale(1.05); 7331 } 7332 7333 @media (max-width: 430px) { 7334 [data-ready='false'] { 7335 transform: translateY(-50px); 7336 } 7337 } 7338`;var Gn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Kn=class extends Le.WF{constructor(){super(),this.bodyObserver=void 0,this.unsubscribe=[],this.iframe=document.getElementById("w3m-iframe"),this.ready=!1,this.unsubscribe.push(Me.W3.subscribeKey("open",(e=>{e||(this.onHideIframe(),Me.IN.popTransactionStack())})))}disconnectedCallback(){this.onHideIframe(),this.unsubscribe.forEach((e=>e())),this.bodyObserver?.unobserve(window.document.body)}async firstUpdated(){await this.syncTheme(),this.iframe.style.display="block",this.bodyObserver=new ResizeObserver((e=>{const t=e?.[0]?.contentBoxSize,n=t?.[0]?.inlineSize;this.iframe.style.height="400px",n&&n<=430?(this.iframe.style.width="100%",this.iframe.style.left="0px",this.iframe.style.bottom="0px",this.iframe.style.top="unset"):(this.iframe.style.width="360px",this.iframe.style.left="calc(50% - 180px)",this.iframe.style.top="calc(50% - 200px + 32px)",this.iframe.style.bottom="unset"),this.ready=!0})),this.bodyObserver.observe(window.document.body)}render(){return this.ready&&this.onShowIframe(),Le.qy`<div data-ready=${this.ready}></div>`}onShowIframe(){const e=window.innerWidth<=430;this.iframe.animate([{opacity:0,transform:e?"translateY(50px)":"scale(.95)"},{opacity:1,transform:e?"translateY(0)":"scale(1)"}],{duration:200,easing:"ease",fill:"forwards"})}async onHideIframe(){this.iframe.style.display="none",await this.iframe.animate([{opacity:1},{opacity:0}
7338],{duration:200,easing:"ease",fill:"forwards"}).finished}async syncTheme(){const e=Me.aK.getAuthConnector();if(e){const t=Me.Wn.getSnapshot().themeMode,n=Me.Wn.getSnapshot().themeVariables;await e.provider.syncTheme({themeVariables:n,w3mThemeVariables:(0,St.o_)(n,t)})}}};Kn.styles=Vn,Gn([(0,De.wk)()],Kn.prototype,"ready",void 0),Kn=Gn([(0,je.customElement)("w3m-approve-transaction-view")],Kn);var Zn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Yn=class extends Le.WF{render(){return Le.qy` 7339 <wui-flex flexDirection="column" alignItems="center" gap="xl" padding="xl"> 7340 <wui-text variant="paragraph-400" color="fg-100">Follow the instructions on</wui-text> 7341 <wui-chip 7342 icon="externalLink" 7343 variant="fill" 7344 href=${Me.oU.SECURE_SITE_DASHBOARD} 7345 imageSrc=${Me.oU.SECURE_SITE_FAVICON} 7346 data-testid="w3m-secure-website-button" 7347 > 7348 </wui-chip> 7349 <wui-text variant="small-400" color="fg-200"> 7350 You will have to reconnect for security reasons 7351 </wui-text> 7352 </wui-flex> 7353 `}};Yn=Zn([(0,je.customElement)("w3m-upgrade-wallet-view")],Yn);var Qn=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Jn=class extends Le.WF{constructor(){super(...arguments),this.authConnector=Me.aK.getAuthConnector(),this.loading=!1,this.setPreferSmartAccount=async()=>{if(this.authConnector)try{this.loading=!0,Me.W3.setLoading(!0),await this.authConnector.provider.setPreferredAccount(st.Vl.ACCOUNT_TYPES.SMART_ACCOUNT),await Me.x4.reconnectExternal(this.authConnector),Me.W3.setLoading(!1),this.loading=!1,Me.aS.navigateAfterPreferredAccountTypeSelect()}catch(e){Me.Pt.showError("Error upgrading to smart account")}}}render(){return Le.qy` 7354 <wui-flex 7355 flexDirection="column" 7356 alignItems="center" 7357 gap="xxl" 7358 .padding=${["0","0","l","0"]} 7359 > 7360 ${this.onboardingTemplate()} ${this.buttonsTemplate()} 7361 <wui-link 7362 @click=${()=>{Me.wE.openHref(St.TC.URLS.FAQ,"_blank")}} 7363 > 7364 Learn more 7365 <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon> 7366 </wui-link> 7367 </wui-flex> 7368 `}onboardingTemplate(){return Le.qy` <wui-flex 7369 flexDirection="column" 7370 gap="xxl" 7371 alignItems="center" 7372 .padding=${["0","xxl","0","xxl"]} 7373 > 7374 <wui-flex gap="s" alignItems="center" justifyContent="center"> 7375 <wui-visual name="google"></wui-visual> 7376 <wui-visual name="pencil"></wui-visual> 7377 <wui-visual name="lightbulb"></wui-visual> 7378 </wui-flex> 7379 <wui-flex flexDirection="column" alignItems="center" gap="s"> 7380 <wui-text align="center" variant="medium-600" color="fg-100"> 7381 Discover Smart Accounts 7382 </wui-text> 7383 <wui-text align="center" variant="paragraph-400" color="fg-100"> 7384 Access advanced features such as username, social login, improved security and a smoother 7385 user experience! 7386 </wui-text> 7387 </wui-flex> 7388 </wui-flex>`}buttonsTemplate(){return Le.qy`<wui-flex .padding=${["0","2l","0","2l"]} gap="s"> 7389 <wui-button 7390 variant="accent" 7391 @click=${this.redirectToAccount.bind(this)} 7392 size="lg" 7393 borderRadius="xs" 7394 > 7395 Do it later 7396 </wui-button> 7397 <wui-button 7398 .loading=${this.loading} 7399 size="lg" 7400 borderRadius="xs" 7401 @click=${this.setPreferSmartAccount.bind(this)} 7402 >Continue 7403 </wui-button> 7404 </wui-flex>`}redirectToAccount(){Me.IN.push("Account")}};Qn([(0,De.wk)()],Jn.prototype,"authConnector",void 0),Qn([(0,De.wk)()],Jn.prototype,"loading",void 0),Jn=Qn([(0,je.customElement)("w3m-upgrade-to-smart-account-view")],Jn);const Xn=Le.AH` 7405 wui-email-input { 7406 width: 100%; 7407 } 7408 7409 form { 7410 width: 100%; 7411 display: block; 7412 position: relative; 7413 } 7414`;var er=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let tr=class extends Le.WF{constructor(){super(...arguments),this.formRef=qt(),this.initialEmail=Me.IN.state.data?.email??"",this.email="",this.loading=!1}firstUpdated(){this.formRef.value?.addEventListener("keydown",(e=>{"Enter"===e.key&&this.onSubmitEmail(e)}))}render(){const e=!this.loading&&this.email.length>3&&this.email!==this.initialEmail;return Le.qy` 7415 <wui-flex flexDirection="column" padding="m" gap="m"> 7416 <form ${Kt(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}> 7417 <wui-email-input 7418 value=${this.initialEmail} 7419 .disabled=${this.loading} 7420 @inputChange=${this.onEmailInputChange.bind(this)} 7421 > 7422 </wui-email-input> 7423 <input type="submit" hidden /> 7424 </form> 7425 7426 <wui-flex gap="s"> 7427 <wui-button size="md" variant="neutral" fullWidth @click=${Me.IN.goBack}> 7428 Cancel 7429 </wui-button>
7429 7430 7431 <wui-button 7432 size="md" 7433 variant="main" 7434 fullWidth 7435 @click=${this.onSubmitEmail.bind(this)} 7436 .disabled=${!e} 7437 .loading=${this.loading} 7438 > 7439 Save 7440 </wui-button> 7441 </wui-flex> 7442 </wui-flex> 7443 `}onEmailInputChange(e){this.email=e.detail}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const t=Me.aK.getAuthConnector();if(!t)throw new Error("w3m-update-email-wallet: Auth connector not found");const n=await t.provider.updateEmail({email:this.email});Me.En.sendEvent({type:"track",event:"EMAIL_EDIT"}),"VERIFY_SECONDARY_OTP"===n.action?Me.IN.push("UpdateEmailSecondaryOtp",{email:this.initialEmail,newEmail:this.email}):Me.IN.push("UpdateEmailPrimaryOtp",{email:this.initialEmail,newEmail:this.email})}catch(t){Me.Pt.showError(t),this.loading=!1}}};tr.styles=Xn,er([(0,De.wk)()],tr.prototype,"email",void 0),er([(0,De.wk)()],tr.prototype,"loading",void 0),tr=er([(0,je.customElement)("w3m-update-email-wallet-view")],tr);var nr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let rr=class extends Fn{constructor(){super(),this.email=Me.IN.state.data?.email,this.onOtpSubmit=async e=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailPrimaryOtp({otp:e}),Me.En.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),Me.IN.replace("UpdateEmailSecondaryOtp",Me.IN.state.data))}catch(t){throw Me.En.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),t}},this.onStartOver=()=>{Me.IN.replace("UpdateEmailWallet",Me.IN.state.data)}}};rr=nr([(0,je.customElement)("w3m-update-email-primary-otp-view")],rr);var ir=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let sr=class extends Fn{constructor(){super(),this.email=Me.IN.state.data?.newEmail,this.onOtpSubmit=async e=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailSecondaryOtp({otp:e}),Me.En.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),Me.IN.reset("Account"))}catch(t){throw Me.En.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),t}},this.onStartOver=()=>{Me.IN.replace("UpdateEmailWallet",Me.IN.state.data)}}};sr=ir([(0,je.customElement)("w3m-update-email-secondary-otp-view")],sr);const or=Le.AH` 7444 :host > wui-flex { 7445 max-height: clamp(360px, 540px, 80vh); 7446 overflow: scroll; 7447 scrollbar-width: none; 7448 } 7449 7450 :host > wui-flex::-webkit-scrollbar {
7451 display: none; 7452 } 7453`;var ar=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let cr=class extends Le.WF{constructor(){super(...arguments),this.swapUnsupportedChain=Me.IN.state.data?.swapUnsupportedChain,this.disconecting=!1}render(){return Le.qy` 7454 <wui-flex class="container" flexDirection="column" gap="0"> 7455 <wui-flex 7456 class="container" 7457 flexDirection="column" 7458 .padding=${["m","xl","xs","xl"]} 7459 alignItems="center" 7460 gap="xl" 7461 > 7462 ${this.descriptionTemplate()} 7463 </wui-flex> 7464 7465 <wui-flex flexDirection="column" padding="s" gap="xs"> 7466 ${this.networksTemplate()} 7467 </wui-flex> 7468 7469 <wui-separator text="or"></wui-separator> 7470 <wui-flex flexDirection="column" padding="s" gap="xs"> 7471 <wui-list-item 7472 variant="icon" 7473 iconVariant="overlay" 7474 icon="disconnect" 7475 ?chevron=${!1} 7476 .loading=${this.disconecting} 7477 @click=${this.onDisconnect.bind(this)} 7478 data-testid="disconnect-button" 7479 > 7480 <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text> 7481 </wui-list-item> 7482 </wui-flex> 7483 </wui-flex> 7484 `}descriptionTemplate(){return this.swapUnsupportedChain?Le.qy` 7485 <wui-text variant="small-400" color="fg-200" align="center"> 7486 The swap feature doesn’t support your current network. Switch to an available option to 7487 continue. 7488 </wui-text> 7489 `:Le.qy` 7490 <wui-text variant="small-400" color="fg-200" align="center"> 7491 This app doesn’t support your current network. Switch to an available option to continue. 7492 </wui-text> 7493 `}networksTemplate(){const{approvedCaipNetworkIds:e,requestedCaipNetworks:t}=Me.p_.state,n=Me.wE.sortRequestedNetworks(e,t);return(this.swapUnsupportedChain?n.filter((e=>Me.oU.SWAP_SUPPORTED_NETWORKS.includes(e.id))):n).map((e=>Le.qy` 7494 <wui-list-network 7495 imageSrc=${Ue(Me.$m.getNetworkImage(e))} 7496 name=${e.name??"Unknown"} 7497 @click=${()=>this.onSwitchNetwork(e)} 7498 > 7499 </wui-list-network> 7500 `))}async onDisconnect(){try{this.disconecting=!0,await Me.x4.disconnect(),Me.En.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),Me.W3.close()}catch{Me.En.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),Me.Pt.showError("Failed to disconnect")}finally{this.disconecting=!1}}async onSwitchNetwork(e){const{isConnected:t}=Me.Uj.state,{approvedCaipNetworkIds:n,supportsAllNetworks:r,caipNetwork:i}=Me.p_.state,{data:s}=Me.IN.state;t&&i?.id!==e.id?n?.includes(e.id)?(await Me.p_.switchActiveNetwork(e),Me.aS.navigateAfterNetworkSwitch()):r&&Me.IN.push("SwitchNetwork",{...s,network:e}):t||(Me.p_.setCaipNetwork(e),Me.IN.push("Connect"))}};cr.styles=or,ar([(0,De.wk)()],cr.prototype,"disconecting",void 0),cr=ar([(0,je.customElement)("w3m-unsupported-chain-view")],cr);const lr=Le.AH` 7501 wui-compatible-network { 7502 margin-top: var(--wui-spacing-l); 7503 } 7504`;var ur=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let dr=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.address=Me.Uj.state.address,this.profileName=Me.Uj.state.profileName,this.network=Me.p_.state.caipNetwork,this.preferredAccountType=Me.Uj.state.preferredAccountType,this.unsubscribe.push(Me.Uj.subscribe((e=>{e.address?(this.address=e.address,this.profileName=e.profileName,this.preferredAccountType=e.preferredAccountType):Me.Pt.showError("Account not found")})),Me.p_.subscribeKey("caipNetwork",(e=>{e?.id&&(this.network=e)})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}
7504render(){if(!this.address)throw new Error("w3m-wallet-receive-view: No account provided");const e=Me.$m.getNetworkImage(this.network);return Le.qy` <wui-flex 7505 flexDirection="column" 7506 .padding=${["0","l","l","l"]} 7507 alignItems="center" 7508 > 7509 <wui-chip-button 7510 @click=${this.onCopyClick.bind(this)} 7511 text=${je.UiHelperUtil.getTruncateString({string:this.profileName||this.address||"",charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})} 7512 icon="copy" 7513 size="sm" 7514 imageSrc=${e||""} 7515 variant="gray" 7516 ></wui-chip-button> 7517 <wui-flex 7518 flexDirection="column" 7519 .padding=${["l","0","0","0"]} 7520 alignItems="center" 7521 gap="s" 7522 > 7523 <wui-qr-code 7524 size=${232} 7525 theme=${Me.Wn.state.themeMode} 7526 uri=${this.address} 7527 ?arenaClear=${!0} 7528 data-testid="wui-qr-code" 7529 ></wui-qr-code> 7530 <wui-text variant="paragraph-500" color="fg-100" align="center"> 7531 Copy your address or scan this QR code 7532 </wui-text> 7533 </wui-flex> 7534 ${this.networkTemplate()} 7535 </wui-flex>`}networkTemplate(){const e=Me.p_.getRequestedCaipNetworks(),t=Me.p_.checkIfSmartAccountEnabled(),n=Me.p_.state.caipNetwork;if(this.preferredAccountType===st.Vl.ACCOUNT_TYPES.SMART_ACCOUNT&&t)return n?Le.qy`<wui-compatible-network 7536 @click=${this.onReceiveClick.bind(this)} 7537 text="Only receive assets on this network" 7538 .networkImages=${[Me.$m.getNetworkImage(n)??""]} 7539 ></wui-compatible-network>`:null;const r=e?.filter((e=>e?.imageId))?.slice(0,5),i=r.map(Me.$m.getNetworkImage).filter(Boolean);return Le.qy`<wui-compatible-network 7540 @click=${this.onReceiveClick.bind(this)} 7541 text="Only receive assets on these networks" 7542 .networkImages=${i} 7543 ></wui-compatible-network>`}onReceiveClick(){Me.IN.push("WalletCompatibleNetworks")}onCopyClick(){try{this.address&&(Me.wE.copyToClopboard(this.address),Me.Pt.showSuccess("Address copied"))}catch{Me.Pt.showError("Failed to copy")}}};dr.styles=lr,ur([(0,De.wk)()],dr.prototype,"address",void 0),ur([(0,De.wk)()],dr.prototype,"profileName",void 0),ur([(0,De.wk)()],dr.prototype,"network",void 0),ur([(0,De.wk)()],dr.prototype,"preferredAccountType",void 0),dr=ur([(0,je.customElement)("w3m-wallet-receive-view")],dr);const hr=Le.AH` 7544 :host > wui-flex { 7545 max-height: clamp(360px, 540px, 80vh); 7546 overflow: scroll; 7547 scrollbar-width: none; 7548 } 7549 7550 :host > wui-flex::-webkit-scrollbar {
7551 display: none; 7552 } 7553`;var pr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let fr=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.preferredAccountType=Me.Uj.state.preferredAccountType,this.unsubscribe.push(Me.Uj.subscribeKey("preferredAccountType",(e=>{this.preferredAccountType=e})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return Le.qy` <wui-flex 7554 flexDirection="column" 7555 .padding=${["xs","s","m","s"]} 7556 gap="xs" 7557 > 7558 <wui-banner 7559 icon="warningCircle" 7560 text="You can only receive assets on these networks" 7561 ></wui-banner> 7562 ${this.networkTemplate()} 7563 </wui-flex>`}networkTemplate(){const{approvedCaipNetworkIds:e,requestedCaipNetworks:t,caipNetwork:n}=Me.p_.state,r=Me.p_.checkIfSmartAccountEnabled();let i=Me.wE.sortRequestedNetworks(e,t);if(r&&this.preferredAccountType===st.Vl.ACCOUNT_TYPES.SMART_ACCOUNT){if(!n)return null;i=[n]}return i.map((e=>Le.qy` 7564 <wui-list-network 7565 imageSrc=${Ue(Me.$m.getNetworkImage(e))} 7566 name=${e.name??"Unknown"} 7567 ?transparent=${!0} 7568 > 7569 </wui-list-network> 7570 `))}};fr.styles=hr,pr([(0,De.wk)()],fr.prototype,"preferredAccountType",void 0),fr=pr([(0,je.customElement)("w3m-wallet-compatible-networks-view")],fr);const mr=Le.AH` 7571 :host { 7572 display: block; 7573 } 7574 7575 wui-flex { 7576 position: relative; 7577 } 7578 7579 wui-icon-box { 7580 width: 40px; 7581 height: 40px; 7582 border-radius: var(--wui-border-radius-xs) !important; 7583 border: 5px solid var(--wui-color-bg-125); 7584 background: var(--wui-color-bg-175); 7585 position: absolute; 7586 top: 50%; 7587 left: 50%; 7588 transform: translate(-50%, -50%); 7589 z-index: 1; 7590 } 7591 7592 wui-button { 7593 --local-border-radius: var(--wui-border-radius-xs) !important; 7594 } 7595 7596 .inputContainer { 7597 height: fit-content; 7598 } 7599`;var gr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let yr=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.token=Me.Rv.state.token,this.sendTokenAmount=Me.Rv.state.sendTokenAmount,this.receiverAddress=Me.Rv.state.receiverAddress,this.receiverProfileName=Me.Rv.state.receiverProfileName,this.loading=Me.Rv.state.loading,this.gasPriceInUSD=Me.Rv.state.gasPriceInUSD,this.message="Preview Send",this.fetchNetworkPrice(),this.unsubscribe.push(Me.Rv.subscribe((e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.gasPriceInUSD=e.gasPriceInUSD,this.receiverProfileName=e.receiverProfileName,this.loading=e.loading})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return this.getMessage(),Le.qy` <wui-flex flexDirection="column" .padding=${["0","l","l","l"]}> 7600 <wui-flex class="inputContainer" gap="xs" flexDirection="column"> 7601 <w3m-input-token 7602 .token=${this.token} 7603 .sendTokenAmount=${this.sendTokenAmount} 7604 .gasPriceInUSD=${this.gasPriceInUSD} 7605 ></w3m-input-token> 7606 <wui-icon-box 7607 size="inherit" 7608 backgroundColor="fg-300" 7609 iconSize="lg" 7610 iconColor="fg-250" 7611 background="opaque" 7612 icon="arrowBottom" 7613 ></wui-icon-box> 7614 <w3m-input-address 7615 .value=${this.receiverProfileName?this.receiverProfileName:this.receiverAddress} 7616 ></w3m-input-address> 7617 </wui-flex> 7618 <wui-flex .margin=${["l","0","0","0"]}> 7619 <wui-button 7620 @click=${this.onButtonClick.bind(this)} 7621 ?disabled=${!this.message.startsWith("Preview Send")} 7622 size="lg" 7623 variant="main" 7624 ?loading=${this.loading} 7625 fullWidth 7626 > 7627 ${this.message} 7628 </wui-button>
7628 7629 </wui-flex> 7630 </wui-flex>`}async fetchNetworkPrice(){await Me.GN.getNetworkTokenPrice();const e=await Me.GN.getInitialGasPrice();e?.gasPrice&&e?.gasPriceInUSD&&(Me.Rv.setGasPrice(e.gasPrice),Me.Rv.setGasPriceInUsd(e.gasPriceInUSD))}onButtonClick(){Me.IN.push("WalletSendPreview")}getMessage(){if(this.message="Preview Send",this.receiverAddress&&!Me.wE.isAddress(this.receiverAddress)&&(this.message="Invalid Address"),this.receiverAddress||(this.message="Add Address"),this.sendTokenAmount&&this.token&&this.sendTokenAmount>Number(this.token.quantity.numeric)&&(this.message="Insufficient Funds"),this.sendTokenAmount||(this.message="Add Amount"),this.sendTokenAmount&&this.token?.price){this.sendTokenAmount*this.token.price||(this.message="Incorrect Value")}this.token||(this.message="Select Token")}};yr.styles=mr,gr([(0,De.wk)()],yr.prototype,"token",void 0),gr([(0,De.wk)()],yr.prototype,"sendTokenAmount",void 0),gr([(0,De.wk)()],yr.prototype,"receiverAddress",void 0),gr([(0,De.wk)()],yr.prototype,"receiverProfileName",void 0),gr([(0,De.wk)()],yr.prototype,"loading",void 0),gr([(0,De.wk)()],yr.prototype,"gasPriceInUSD",void 0),gr([(0,De.wk)()],yr.prototype,"message",void 0),yr=gr([(0,je.customElement)("w3m-wallet-send-view")],yr);const vr=Le.AH` 7631 .contentContainer { 7632 height: 440px; 7633 overflow: scroll; 7634 scrollbar-width: none; 7635 } 7636 7637 .contentContainer::-webkit-scrollbar {
7638 display: none; 7639 } 7640 7641 wui-icon-box { 7642 width: 40px; 7643 height: 40px; 7644 border-radius: var(--wui-border-radius-xxs); 7645 } 7646`;var wr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let br=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.tokenBalance=Me.Uj.state.tokenBalance,this.search="",this.onDebouncedSearch=Me.wE.debounce((e=>{this.search=e})),this.unsubscribe.push(Me.Uj.subscribe((e=>{this.tokenBalance=e.tokenBalance})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return Le.qy` 7647 <wui-flex flexDirection="column"> 7648 ${this.templateSearchInput()} <wui-separator></wui-separator> ${this.templateTokens()} 7649 </wui-flex> 7650 `}templateSearchInput(){return Le.qy` 7651 <wui-flex gap="xs" padding="s"> 7652 <wui-input-text 7653 @inputChange=${this.onInputChange.bind(this)} 7654 class="network-search-input" 7655 size="sm" 7656 placeholder="Search token" 7657 icon="search" 7658 ></wui-input-text> 7659 </wui-flex> 7660 `}templateTokens(){return this.tokens=this.tokenBalance?.filter((e=>e.chainId===Me.p_.state.caipNetwork?.id)),this.search?this.filteredTokens=this.tokenBalance?.filter((e=>e.name.toLowerCase().includes(this.search.toLowerCase()))):this.filteredTokens=this.tokens,Le.qy` 7661 <wui-flex 7662 class="contentContainer" 7663 flexDirection="column" 7664 .padding=${["0","s","0","s"]} 7665 > 7666 <wui-flex justifyContent="flex-start" .padding=${["m","s","s","s"]}> 7667 <wui-text variant="paragraph-500" color="fg-200">Your tokens</wui-text> 7668 </wui-flex> 7669 <wui-flex flexDirection="column" gap="xs"> 7670 ${this.filteredTokens&&this.filteredTokens.length>0?this.filteredTokens.map((e=>Le.qy`<wui-list-token 7671 @click=${this.handleTokenClick.bind(this,e)} 7672 ?clickable=${!0} 7673 tokenName=${e.name} 7674 tokenImageUrl=${e.iconUrl} 7675 tokenAmount=${e.quantity.numeric} 7676 tokenValue=${e.value} 7677 tokenCurrency=${e.symbol} 7678 ></wui-list-token>`)):Le.qy`<wui-flex 7679 .padding=${["4xl","0","0","0"]} 7680 alignItems="center" 7681 flexDirection="column" 7682 gap="l" 7683 > 7684 <wui-icon-box 7685 icon="coinPlaceholder" 7686 size="inherit" 7687 iconColor="fg-200" 7688 backgroundColor="fg-200" 7689 iconSize="lg" 7690 ></wui-icon-box> 7691 <wui-flex 7692 class="textContent" 7693 gap="xs" 7694 flexDirection="column" 7695 justifyContent="center" 7696 flexDirection="column" 7697 > 7698 <wui-text variant="paragraph-500" align="center" color="fg-100" 7699 >No tokens found</wui-text 7700 > 7701 <wui-text variant="small-400" align="center" color="fg-200" 7702 >Your tokens will appear here</wui-text 7703 > 7704 </wui-flex> 7705 <wui-link @click=${this.onBuyClick.bind(this)}>Buy</wui-link> 7706 </wui-flex>`} 7707 </wui-flex> 7708 </wui-flex> 7709 `}onBuyClick(){Me.IN.push("OnRampProviders")}onInputChange(e){this.onDebouncedSearch(e.detail)}handleTokenClick(e){Me.Rv.setToken(e),Me.Rv.setTokenAmount(void 0),Me.IN.goBack()}};br.styles=vr,wr([(0,De.wk)()],br.prototype,"tokenBalance",void 0),wr([(0,De.wk)()],br.prototype,"tokens",void 0),wr([(0,De.wk)()],br.prototype,"filteredTokens",void 0),wr([(0,De.wk)()],br.prototype,"search",void 0),br=wr([(0,je.customElement)("w3m-wallet-send-select-token-view")],br);const xr=Le.AH` 7710 wui-avatar, 7711 wui-image { 7712 display: ruby; 7713 width: 32px; 7714 height: 32px; 7715 border-radius: var(--wui-border-radius-3xl); 7716 } 7717 7718 .sendButton { 7719 width: 70%; 7720 --local-width: 100% !important; 7721 --local-border-radius: var(--wui-border-radius-xs) !important; 7722 } 7723 7724 .cancelButton { 7725 width: 30%; 7726 --local-width: 100% !important; 7727 --local-border-radius: var(--wui-border-radius-xs) !important; 7728 } 7729`;var Er=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let _r=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.token=Me.Rv.state.token,this.sendTokenAmount=Me.Rv.state.sendTokenAmount,this.receiverAddress=Me.Rv.state.receiverAddress,this.receiverProfileName=Me.Rv.state.receiverProfileName,this.receiverProfileImageUrl=Me.Rv.state.receiverProfileImageUrl,this.gasPriceInUSD=Me.Rv.state.gasPriceInUSD,this.caipNetwork=Me.p_.state.caipNetwork,this.unsubscribe.push(Me.Rv.subscribe((e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.gasPriceInUSD=e.gasPriceInUSD,this.receiverProfileName=e.receiverProfileName,this.receiverProfileImageUrl=e.receiverProfileImageUrl})),Me.p_.subscribeKey("caipNetwork",(e=>this.caipNetwork=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return Le.qy` <wui-flex flexDirection="column" .padding=${["0","l","l","l"]}> 7730 <wui-flex gap="xs" flexDirection="column" .padding=${["0","xs","0","xs"]}> 7731 <wui-flex alignItems="center" justifyContent="space-between"> 7732 <wui-flex flexDirection="column" gap="4xs"> 7733 <wui-text variant="small-400" color="fg-150">Send</wui-text> 7734 ${this.sendValueTemplate()} 7735 </wui-flex> 7736 <wui-preview-item 7737 text="${this.sendTokenAmount?je.UiHelperUtil.roundNumber(this.sendTokenAmount,6,5):"unknown"} ${this.token?.symbol}" 7738 .imageSrc=${this.token?.iconUrl} 7739 ></wui-preview-item> 7740 </wui-flex> 7741 <wui-flex> 7742 <wui-icon color="fg-200" size="md" name="arrowBottom"></wui-icon> 7743 </wui-flex> 7744 <wui-flex alignItems="center" justifyContent="space-between"> 7745 <wui-text variant="small-400" color="fg-150">To</wui-text> 7746 <wui-preview-item 7747 text="${this.receiverProfileName?je.UiHelperUtil.getTruncateString({string:this.receiverProfileName,charsStart:20,charsEnd:0,truncate:"end"}):je.UiHelperUtil.getTruncateString({string:this.receiverAddress?this.receiverAddress:"",charsStart:4,charsEnd:4,truncate:"middle"})}" 7748 address=${this.receiverAddress??""} 7749 .imageSrc=${this.receiverProfileImageUrl??void 0} 7750 .isAddress=${!0} 7751 ></wui-preview-item> 7752 </wui-flex> 7753 </wui-flex> 7754 <wui-flex flexDirection="column" .padding=${["xxl","0","0","0"]}> 7755 <w3m-wallet-send-details 7756 .caipNetwork=${this.caipNetwork} 7757 .receiverAddress=${this.receiverAddress} 7758 .networkFee=${this.gasPriceInUSD} 7759 ></w3m-wallet-send-details> 7760 <wui-flex justifyContent="center" gap="xxs" .padding=${["s","0","0","0"]}> 7761 <wui-icon size="sm" color="fg-200" name="warningCircle"></wui-icon> 7762 <wui-text variant="small-400" color="fg-200">Review transaction carefully</wui-text> 7763 </wui-flex> 7764 <wui-flex justifyContent="center" gap="s" .padding=${["l","0","0","0"]}> 7765 <wui-button 7766 class="cancelButton" 7767 @click=${this.onCancelClick.bind(this)} 7768 size="lg" 7769 variant="neutral" 7770 > 7771 Cancel 7772 </wui-button>
7772 7773 <wui-button 7774 class="sendButton" 7775 @click=${this.onSendClick.bind(this)} 7776 size="lg" 7777 variant="main" 7778 > 7779 Send 7780 </wui-button> 7781 </wui-flex> 7782 </wui-flex></wui-flex 7783 >`}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const e=this.token.price*this.sendTokenAmount;return Le.qy`<wui-text variant="paragraph-400" color="fg-100" 7784 >$${e.toFixed(2)}</wui-text 7785 >`}return null}onSendClick(){Me.Rv.sendToken()}onCancelClick(){Me.IN.goBack()}};_r.styles=xr,Er([(0,De.wk)()],_r.prototype,"token",void 0),Er([(0,De.wk)()],_r.prototype,"sendTokenAmount",void 0),Er([(0,De.wk)()],_r.prototype,"receiverAddress",void 0),Er([(0,De.wk)()],_r.prototype,"receiverProfileName",void 0),Er([(0,De.wk)()],_r.prototype,"receiverProfileImageUrl",void 0),Er([(0,De.wk)()],_r.prototype,"gasPriceInUSD",void 0),Er([(0,De.wk)()],_r.prototype,"caipNetwork",void 0),_r=Er([(0,je.customElement)("w3m-wallet-send-preview-view")],_r);const kr=Le.AH` 7786 wui-flex { 7787 max-height: clamp(360px, 540px, 80vh); 7788 overflow: scroll; 7789 scrollbar-width: none; 7790 } 7791 wui-flex::-webkit-scrollbar {
7792 display: none; 7793 } 7794`;var Cr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ar=class extends Le.WF{render(){return Le.qy` 7795 <wui-flex flexDirection="column" padding="s" gap="xs"> 7796 <w3m-wallet-login-list></w3m-wallet-login-list> 7797 </wui-flex> 7798 <w3m-legal-footer></w3m-legal-footer> 7799 `}};Ar.styles=kr,Ar=Cr([(0,je.customElement)("w3m-connect-wallets-view")],Ar);const Sr=Le.AH` 7800 wui-flex { 7801 max-height: clamp(360px, 540px, 80vh); 7802 overflow: scroll; 7803 scrollbar-width: none; 7804 } 7805 wui-flex::-webkit-scrollbar { 7806 display: none; 7807 } 7808`;var Ir=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Tr=class extends Le.WF{render(){return Le.qy` 7809 <wui-flex flexDirection="column" padding="s" gap="xs"> 7810 <w3m-social-login-list></w3m-social-login-list> 7811 </wui-flex> 7812 <w3m-legal-footer></w3m-legal-footer> 7813 `}};Tr.styles=Sr,Tr=Ir([(0,je.customElement)("w3m-connect-socials-view")],Tr);const Pr=Le.AH` 7814 wui-logo { 7815 width: 80px; 7816 height: 80px; 7817 border-radius: var(--wui-border-radius-m); 7818 } 7819 @keyframes shake { 7820 0% { 7821 transform: translateX(0); 7822 } 7823 25% { 7824 transform: translateX(3px); 7825 } 7826 50% { 7827 transform: translateX(-3px); 7828 } 7829 75% { 7830 transform: translateX(3px); 7831 } 7832 100% { 7833 transform: translateX(0); 7834 } 7835 } 7836 wui-flex:first-child:not(:only-child) { 7837 position: relative; 7838 } 7839 wui-loading-thumbnail { 7840 position: absolute; 7841 } 7842 wui-icon-box { 7843 position: absolute; 7844 right: calc(var(--wui-spacing-3xs) * -1); 7845 bottom: calc(var(--wui-spacing-3xs) * -1); 7846 opacity: 0; 7847 transform: scale(0.5); 7848 transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg); 7849 } 7850 wui-text[align='center'] { 7851 width: 100%; 7852 padding: 0px var(--wui-spacing-l); 7853 } 7854 [data-error='true'] wui-icon-box { 7855 opacity: 1; 7856 transform: scale(1); 7857 } 7858 [data-error='true'] > wui-flex:first-child { 7859 animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; 7860 } 7861 .capitalize { 7862 text-transform: capitalize; 7863 } 7864`,Nr=[{label:"Tokens"},{label:"NFTs"},{label:"Activity"}],Rr={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.NEXT_PUBLIC_SECURE_SITE_ORIGIN||"https://secure.walletconnect.com";var Or=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Mr=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.socialProvider=Me.Uj.state.socialProvider,this.socialWindow=Me.Uj.state.socialWindow,this.error=!1,this.connecting=!1,this.message="Connect in the provider window",this.authConnector=Me.aK.getAuthConnector(),this.handleSocialConnection=async e=>{if(e.data?.resultUri)if(e.origin===Rr){window.removeEventListener("message",this.handleSocialConnection,!1);try{if(this.authConnector&&!this.connecting){this.socialWindow&&(this.socialWindow.close(),Me.Uj.setSocialWindow(void 0)),this.connecting=!0,this.updateMessage();const t=e.data.resultUri;await this.authConnector.provider.connectSocial(t),this.socialProvider&&Me.iT.setConnectedSocialProvider(this.socialProvider),await Me.x4.connectExternal(this.authConnector)}}catch(t){this.error=!0,this.updateMessage()}}else Me.IN.goBack(),Me.Pt.showError("Untrusted Origin")},this.unsubscribe.push(Me.Uj.subscribe((e=>{e.socialProvider&&(this.socialProvider=e.socialProvider),e.socialWindow&&(this.socialWindow=e.socialWindow),e.address&&Me.W3.state.open&&Me.W3.close()}))),this.authConnector&&this.connectSocial()}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),window.removeEventListener("message",this.handleSocialConnection,!1)}render(){return Le.qy` 7865 <wui-flex 7866 data-error=${Ue(this.error)} 7867 flexDirection="column" 7868 alignItems="center" 7869 .padding=${["3xl","xl","xl","xl"]} 7870 gap="xl" 7871 > 7872 <wui-flex justifyContent="center" alignItems="center"> 7873 <wui-logo logo=${Ue(this.socialProvider)}></wui-logo> 7874 ${this.error?null:this.loaderTemplate()} 7875 <wui-icon-box 7876 backgroundColor="error-100" 7877 background="opaque" 7878 iconColor="error-100" 7879 icon="close" 7880 size="sm" 7881 border 7882 borderColor="wui-color-bg-125" 7883 ></wui-icon-box> 7884 </wui-flex> 7885 <wui-flex flexDirection="column" alignItems="center" gap="xs"> 7886 <wui-text align="center" variant="paragraph-500" color="fg-100" 7887 >
7887Log in with 7888 <span class="capitalize">${this.socialProvider??"Social"}</span></wui-text 7889 > 7890 <wui-text align="center" variant="small-400" color=${this.error?"error-100":"fg-200"} 7891 >${this.message}</wui-text 7892 ></wui-flex 7893 > 7894 </wui-flex> 7895 `}loaderTemplate(){const e=Me.Wn.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return Le.qy`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}connectSocial(){window.addEventListener("message",this.handleSocialConnection,!1)}updateMessage(){this.error?this.message="Something went wrong":this.connecting?this.message="Retrieving user data":this.message="Connect in the provider window"}};Mr.styles=Pr,Or([(0,De.wk)()],Mr.prototype,"socialProvider",void 0),Or([(0,De.wk)()],Mr.prototype,"socialWindow",void 0),Or([(0,De.wk)()],Mr.prototype,"error",void 0),Or([(0,De.wk)()],Mr.prototype,"connecting",void 0),Or([(0,De.wk)()],Mr.prototype,"message",void 0),Mr=Or([(0,je.customElement)("w3m-connecting-social-view")],Mr);const jr=Le.AH` 7896 wui-grid { 7897 max-height: clamp(360px, 400px, 80vh); 7898 overflow: scroll; 7899 scrollbar-width: none; 7900 grid-auto-rows: min-content; 7901 grid-template-columns: repeat(auto-fill, 76px); 7902 } 7903 7904 @media (max-width: 435px) { 7905 wui-grid { 7906 grid-template-columns: repeat(auto-fill, 77px); 7907 } 7908 } 7909 7910 wui-grid[data-scroll='false'] { 7911 overflow: hidden; 7912 } 7913 7914 wui-grid::-webkit-scrollbar {
7915 display: none; 7916 } 7917 7918 wui-loading-spinner { 7919 padding-top: var(--wui-spacing-l); 7920 padding-bottom: var(--wui-spacing-l); 7921 justify-content: center; 7922 grid-column: 1 / span 4; 7923 } 7924`;function Lr(e){const{connectors:t}=Me.aK.state,n=t.filter((e=>"ANNOUNCED"===e.type)).reduce(((e,t)=>t.info?.rdns?(e[t.info.rdns]=!0,e):e),{}),r=e.map((e=>({...e,installed:Boolean(e.rdns)&&Boolean(n[e.rdns??""])}))).sort(((e,t)=>Number(t.installed)-Number(e.installed)));return r}var Dr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};const Br="local-paginator";let Ur=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.initial=!Me.Np.state.wallets.length,this.wallets=Me.Np.state.wallets,this.recommended=Me.Np.state.recommended,this.featured=Me.Np.state.featured,this.unsubscribe.push(Me.Np.subscribeKey("wallets",(e=>this.wallets=e)),Me.Np.subscribeKey("recommended",(e=>this.recommended=e)),Me.Np.subscribeKey("featured",(e=>this.featured=e)))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),this.paginationObserver?.disconnect()}render(){return Le.qy` 7925 <wui-grid 7926 data-scroll=${!this.initial} 7927 .padding=${["0","s","s","s"]} 7928 columnGap="xxs" 7929 rowGap="l" 7930 justifyContent="space-between" 7931 > 7932 ${this.initial?this.shimmerTemplate(16):this.walletsTemplate()} 7933 ${this.paginationLoaderTemplate()} 7934 </wui-grid> 7935 `}async initialFetch(){const e=this.shadowRoot?.querySelector("wui-grid");this.initial&&e&&(await Me.Np.fetchWallets({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.initial=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map((()=>Le.qy` 7936 <wui-card-select-loader type="wallet" id=${Ue(t)}></wui-card-select-loader> 7937 `))}walletsTemplate(){return Lr([...this.featured,...this.recommended,...this.wallets]).map((e=>Le.qy` 7938 <wui-card-select 7939 imageSrc=${Ue(Me.$m.getWalletImage(e))} 7940 type="wallet" 7941 name=${e.name} 7942 @click=${()=>this.onConnectWallet(e)} 7943 .installed=${e.installed} 7944 ></wui-card-select> 7945 `))}paginationLoaderTemplate(){const{wallets:e,recommended:t,featured:n,count:r}=Me.Np.state,i=window.innerWidth<352?3:4,s=e.length+t.length;let o=Math.ceil(s/i)*i-s+i;return o-=e.length?n.length%i:0,0===r&&n.length>0?null:0===r||[...n,...e,...t].length<r?this.shimmerTemplate(o,Br):null}createPaginationObserver(){const e=this.shadowRoot?.querySelector(`#${Br}`);e&&(this.paginationObserver=new IntersectionObserver((e=>{let[t]=e;if(t?.isIntersecting&&!this.initial){const{page:e,count:t,wallets:n}=Me.Np.state;n.length<t&&Me.Np.fetchWallets({page:e+1})}})),this.paginationObserver.observe(e))}onConnectWallet(e){const t=Me.aK.getConnector(e.id,e.rdns);t?Me.IN.push("ConnectingExternal",{connector:t}):Me.IN.push("ConnectingWalletConnect",{wallet:e})}};Ur.styles=jr,Dr([(0,De.wk)()],Ur.prototype,"initial",void 0),Dr([(0,De.wk)()],Ur.prototype,"wallets",void 0),Dr([(0,De.wk)()],Ur.prototype,"recommended",void 0),Dr([(0,De.wk)()],Ur.prototype,"featured",void 0),Ur=Dr([(0,je.customElement)("w3m-all-wallets-list")],Ur);const Fr=Le.AH` 7946 wui-grid, 7947 wui-loading-spinner, 7948 wui-flex { 7949 height: 360px; 7950 } 7951 7952 wui-grid { 7953 overflow: scroll; 7954 scrollbar-width: none; 7955 grid-auto-rows: min-content; 7956 } 7957 7958 wui-grid[data-scroll='false'] { 7959 overflow: hidden; 7960 } 7961 7962 wui-grid::-webkit-scrollbar {
7963 display: none; 7964 } 7965 7966 wui-loading-spinner { 7967 justify-content: center; 7968 align-items: center; 7969 } 7970`;var $r=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let zr=class extends Le.WF{constructor(){super(...arguments),this.prevQuery="",this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?Le.qy`<wui-loading-spinner color="accent-100"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){this.query.trim()!==this.prevQuery.trim()&&(this.prevQuery=this.query,this.loading=!0,await Me.Np.searchWallet({search:this.query}),this.loading=!1)}walletsTemplate(){const{search:e}=Me.Np.state,t=Lr(e);return e.length?Le.qy` 7971 <wui-grid 7972 .padding=${["0","s","s","s"]} 7973 gridTemplateColumns="repeat(4, 1fr)" 7974 rowGap="l" 7975 columnGap="xs" 7976 > 7977 ${t.map((e=>Le.qy` 7978 <wui-card-select 7979 imageSrc=${Ue(Me.$m.getWalletImage(e))} 7980 type="wallet" 7981 name=${e.name} 7982 @click=${()=>this.onConnectWallet(e)} 7983 .installed=${e.installed} 7984 ></wui-card-select> 7985 `))} 7986 </wui-grid> 7987 `:Le.qy` 7988 <wui-flex justifyContent="center" alignItems="center" gap="s" flexDirection="column"> 7989 <wui-icon-box 7990 size="lg" 7991 iconColor="fg-200" 7992 backgroundColor="fg-300" 7993 icon="wallet" 7994 background="transparent" 7995 ></wui-icon-box> 7996 <wui-text color="fg-200" variant="paragraph-500">No Wallet found</wui-text> 7997 </wui-flex> 7998 `}onConnectWallet(e){const t=Me.aK.getConnector(e.id,e.rdns);t?Me.IN.push("ConnectingExternal",{connector:t}):Me.IN.push("ConnectingWalletConnect",{wallet:e})}};zr.styles=Fr,$r([(0,De.wk)()],zr.prototype,"loading",void 0),$r([(0,De.MZ)()],zr.prototype,"query",void 0),zr=$r([(0,je.customElement)("w3m-all-wallets-search")],zr);var Hr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Wr=class extends Le.WF{constructor(){super(),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0,this.buffering=!1,this.unsubscribe.push(Me.x4.subscribeKey("buffering",(e=>this.buffering=e)))}disconnectCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.generateTabs();return Le.qy` 7999 <wui-flex justifyContent="center" .padding=${["0","0","l","0"]}> 8000 <wui-tabs 8001 ?disabled=${this.buffering} 8002 .tabs=${e} 8003 .onTabChange=${this.onTabChange.bind(this)} 8004 ></wui-tabs> 8005 </wui-flex> 8006 `}generateTabs(){const e=this.platforms.map((e=>"browser"===e?{label:"Browser",icon:"extension",platform:"browser"}:"mobile"===e?{label:"Mobile",icon:"mobile",platform:"mobile"}:"qrcode"===e?{label:"Mobile",icon:"mobile",platform:"qrcode"}:"web"===e?{label:"Webapp",icon:"browser",platform:"web"}:"desktop"===e?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"}));return this.platformTabs=e.map((e=>{let{platform:t}=e;return t})),e}onTabChange(e){const t=this.platformTabs[e];t&&this.onSelectPlatfrom?.(t)}};Hr([(0,De.MZ)({type:Array})],Wr.prototype,"platforms",void 0),Hr([(0,De.MZ)()],Wr.prototype,"onSelectPlatfrom",void 0),Hr([(0,De.wk)()],Wr.prototype,"buffering",void 0),Wr=Hr([(0,je.customElement)("w3m-connecting-header")],Wr);var qr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Vr=class extends xt{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),Me.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){try{this.error=!1;const{connectors:e}=Me.aK.state,t=e.find((e=>"ANNOUNCED"===e.type&&e.info?.rdns===this.wallet?.rdns)),n=e.find((e=>"INJECTED"===e.type));t?await Me.x4.connectExternal(t):n&&await Me.x4.connectExternal(n),Me.W3.close(),Me.En.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.wallet?.name||"Unknown"}})}catch(e){Me.En.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};
8006Vr=qr([(0,je.customElement)("w3m-connecting-wc-browser")],Vr);var Gr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Kr=class extends xt{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),Me.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.timeout=setTimeout((()=>{this.onConnect?.()}),200))}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;const{desktop_link:e,name:t}=this.wallet,{redirect:n,href:r}=Me.wE.formatNativeUrl(e,this.uri);Me.x4.setWcLinking({name:t,href:r}),Me.x4.setRecentWallet(this.wallet),Me.wE.openHref(n,"_blank")}catch{this.error=!0}}};Kr=Gr([(0,je.customElement)("w3m-connecting-wc-desktop")],Kr);var Zr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Yr=class extends xt{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),document.addEventListener("visibilitychange",this.onBuffering.bind(this)),Me.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("visibilitychange",this.onBuffering.bind(this))}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.mobile_link&&this.uri)try{this.error=!1;const{mobile_link:e,name:t}=this.wallet,{redirect:n,href:r}=Me.wE.formatNativeUrl(e,this.uri);Me.x4.setWcLinking({name:t,href:r}),Me.x4.setRecentWallet(this.wallet),Me.wE.openHref(n,"_self")}catch{this.error=!0}}onBuffering(){const e=Me.wE.isIos();"visible"===document?.visibilityState&&!this.error&&e&&(Me.x4.setBuffering(!0),setTimeout((()=>{Me.x4.setBuffering(!1)}),5e3))}};Yr=Zr([(0,je.customElement)("w3m-connecting-wc-mobile")],Yr);const Qr=Le.AH` 8007 @keyframes fadein { 8008 from { 8009 opacity: 0; 8010 } 8011 to { 8012 opacity: 1; 8013 } 8014 } 8015 8016 wui-shimmer { 8017 width: 100%; 8018 aspect-ratio: 1 / 1; 8019 border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important; 8020 } 8021 8022 wui-qr-code { 8023 opacity: 0; 8024 animation-duration: 200ms; 8025 animation-timing-function: ease; 8026 animation-name: fadein; 8027 animation-fill-mode: forwards; 8028 } 8029`;var Jr=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Xr=class extends xt{constructor(){super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),Me.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),Le.qy` 8030 <wui-flex 8031 flexDirection="column" 8032 alignItems="center" 8033 .padding=${["0","xl","xl","xl"]} 8034 gap="xl" 8035 > 8036 <wui-shimmer borderRadius="l" width="100%"> ${this.qrCodeTemplate()} </wui-shimmer> 8037 8038 <wui-text variant="paragraph-500" color="fg-100"> 8039 Scan this QR Code with your phone 8040 </wui-text> 8041 ${this.copyTemplate()} 8042 </wui-flex> 8043
8044 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 8045 `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout((()=>{this.ready=!0}),200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const e=this.getBoundingClientRect().width-40,t=this.wallet?this.wallet.name:void 0;return Me.x4.setWcLinking(void 0),Me.x4.setRecentWallet(this.wallet),Le.qy` <wui-qr-code 8046 size=${e} 8047 theme=${Me.Wn.state.themeMode} 8048 uri=${this.uri} 8049 imageSrc=${Ue(Me.$m.getWalletImage(this.wallet))} 8050 alt=${Ue(t)} 8051 data-testid="wui-qr-code" 8052 ></wui-qr-code>`}copyTemplate(){const e=!this.uri||!this.ready;return Le.qy`<wui-link 8053 .disabled=${e} 8054 @click=${this.onCopyUri} 8055 color="fg-200" 8056 data-testid="copy-wc2-uri" 8057 > 8058 <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon> 8059 Copy link 8060 </wui-link>`}};Xr.styles=Qr,Xr=Jr([(0,je.customElement)("w3m-connecting-wc-qrcode")],Xr);var ei=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let ti=class extends Le.WF{constructor(){if(super(),this.wallet=Me.IN.state.data?.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");Me.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return Le.qy` 8061 <wui-flex 8062 flexDirection="column" 8063 alignItems="center" 8064 .padding=${["3xl","xl","xl","xl"]} 8065 gap="xl" 8066 > 8067 <wui-wallet-image 8068 size="lg" 8069 imageSrc=${Ue(Me.$m.getWalletImage(this.wallet))} 8070 ></wui-wallet-image> 8071 8072 <wui-text variant="paragraph-500" color="fg-100">Not Detected</wui-text> 8073 </wui-flex> 8074 8075 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 8076 `}};ti=ei([(0,je.customElement)("w3m-connecting-wc-unsupported")],ti);var ni=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let ri=class extends xt{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel="Open and continue in a new browser tab",this.secondaryBtnIcon="externalLink",Me.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;const{webapp_link:e,name:t}=this.wallet,{redirect:n,href:r}=Me.wE.formatUniversalUrl(e,this.uri);Me.x4.setWcLinking({name:t,href:r}),Me.x4.setRecentWallet(this.wallet),Me.wE.openHref(n,"_blank")}catch{this.error=!0}}};ri=ni([(0,je.customElement)("w3m-connecting-wc-web")],ri);const ii=Le.AH` 8077 :host { 8078 width: 100%; 8079 } 8080 8081 .details-container > wui-flex { 8082 background: var(--wui-color-gray-glass-002); 8083 border-radius: var(--wui-border-radius-xxs); 8084 width: 100%; 8085 } 8086 8087 .details-container > wui-flex > button { 8088 border: none; 8089 background: none; 8090 padding: var(--wui-spacing-s); 8091 border-radius: var(--wui-border-radius-xxs); 8092 cursor: pointer; 8093 } 8094 8095 .details-content-container { 8096 padding: var(--wui-spacing-1xs); 8097 padding-top: 0px; 8098 display: flex; 8099 align-items: center; 8100 justify-content: center; 8101 } 8102 8103 .details-content-container > wui-flex { 8104 width: 100%; 8105 } 8106 8107 .details-row { 8108 width: 100%; 8109 padding: var(--wui-spacing-s); 8110 padding-left: var(--wui-spacing-s); 8111 padding-right: var(--wui-spacing-1xs); 8112 border-radius: calc(var(--wui-border-radius-5xs) + var(--wui-border-radius-4xs)); 8113 background: var(--wui-color-gray-glass-002); 8114 } 8115 8116 .details-row-title { 8117 white-space: nowrap; 8118 } 8119 8120 .details-row.provider-free-row { 8121 padding-right: var(--wui-spacing-xs); 8122 } 8123`;var si=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};const oi=Me.oU.CONVERT_SLIPPAGE_TOLERANCE;let ai=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.networkName=Me.p_.state.caipNetwork?.name,this.detailsOpen=!1,this.sourceToken=Me.GN.state.sourceToken,this.toToken=Me.GN.state.toToken,this.toTokenAmount=Me.GN.state.toTokenAmount,this.sourceTokenPriceInUSD=Me.GN.state.sourceTokenPriceInUSD,this.toTokenPriceInUSD=Me.GN.state.toTokenPriceInUSD,this.gasPriceInUSD=Me.GN.state.gasPriceInUSD,this.priceImpact=Me.GN.state.priceImpact,this.maxSlippage=
8123Me.GN.state.maxSlippage,this.networkTokenSymbol=Me.GN.state.networkTokenSymbol,this.inputError=Me.GN.state.inputError,this.unsubscribe.push(Me.GN.subscribe((e=>{this.sourceToken=e.sourceToken,this.toToken=e.toToken,this.toTokenAmount=e.toTokenAmount,this.gasPriceInUSD=e.gasPriceInUSD,this.priceImpact=e.priceImpact,this.maxSlippage=e.maxSlippage,this.sourceTokenPriceInUSD=e.sourceTokenPriceInUSD,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.inputError=e.inputError})))}render(){const e=this.toTokenAmount&&this.maxSlippage?St.Se.bigNumber(this.toTokenAmount).minus(this.maxSlippage).toString():null;if(!this.sourceToken||!this.toToken||this.inputError)return null;const t=this.sourceTokenPriceInUSD&&this.toTokenPriceInUSD?1/this.toTokenPriceInUSD*this.sourceTokenPriceInUSD:0;return Le.qy` 8124 <wui-flex flexDirection="column" alignItems="center" gap="1xs" class="details-container"> 8125 <wui-flex flexDirection="column"> 8126 <button @click=${this.toggleDetails.bind(this)}> 8127 <wui-flex justifyContent="space-between" .padding=${["0","xs","0","xs"]}> 8128 <wui-flex justifyContent="flex-start" flexGrow="1" gap="xs"> 8129 <wui-text variant="small-400" color="fg-100"> 8130 1 ${this.sourceToken.symbol} = 8131 ${je.UiHelperUtil.formatNumberToLocalString(t,3)} 8132 ${this.toToken.symbol} 8133 </wui-text> 8134 <wui-text variant="small-400" color="fg-200"> 8135 $${je.UiHelperUtil.formatNumberToLocalString(this.sourceTokenPriceInUSD)} 8136 </wui-text> 8137 </wui-flex> 8138 <wui-icon name="chevronBottom"></wui-icon> 8139 </wui-flex> 8140 </button> 8141 ${this.detailsOpen?Le.qy` 8142 <wui-flex flexDirection="column" gap="xs" class="details-content-container"> 8143 <wui-flex flexDirection="column" gap="xs"> 8144 <wui-flex 8145 justifyContent="space-between" 8146 alignItems="center" 8147 class="details-row" 8148 > 8149 <wui-flex alignItems="center" gap="xs"> 8150 <wui-text class="details-row-title" variant="small-400" color="fg-150"> 8151 Network cost 8152 </wui-text> 8153 <w3m-tooltip-trigger 8154 text=${`Network cost is paid in ${this.networkTokenSymbol} on the ${this.networkName} network in order to execute transaction.`} 8155 > 8156 <wui-icon size="xs" color="fg-250" name="infoCircle"></wui-icon> 8157 </w3m-tooltip-trigger> 8158 </wui-flex> 8159 <wui-text variant="small-400" color="fg-100"> 8160 $${je.UiHelperUtil.formatNumberToLocalString(this.gasPriceInUSD,3)} 8161 </wui-text> 8162 </wui-flex> 8163 </wui-flex> 8164 ${this.priceImpact?Le.qy` <wui-flex flexDirection="column" gap="xs"> 8165 <wui-flex 8166 justifyContent="space-between" 8167 alignItems="center" 8168 class="details-row" 8169 > 8170 <wui-flex alignItems="center" gap="xs"> 8171 <wui-text class="details-row-title" variant="small-400" color="fg-150"> 8172 Price impact 8173 </wui-text> 8174 <w3m-tooltip-trigger 8175 text="Price impact reflects the change in market price due to your trade" 8176 > 8177 <wui-icon size="xs" color="fg-250" name="infoCircle"></wui-icon> 8178 </w3m-tooltip-trigger> 8179 </wui-flex> 8180 <wui-flex> 8181 <wui-text variant="small-400" color="fg-200"> 8182 ${je.UiHelperUtil.formatNumberToLocalString(this.priceImpact,3)}% 8183 </wui-text> 8184 </wui-flex> 8185 </wui-flex> 8186 </wui-flex>`:null} 8187 ${this.maxSlippage&&this.sourceToken.symbol?Le.qy`<wui-flex flexDirection="column" gap="xs"> 8188 <wui-flex 8189 justifyContent="space-between" 8190 alignItems="center" 8191 class="details-row" 8192 > 8193 <wui-flex alignItems="center" gap="xs"> 8194 <wui-text class="details-row-title" variant="small-400" color="fg-150"> 8195 Max. slippage 8196 </wui-text> 8197 <w3m-tooltip-trigger 8198 text=${"Max slippage sets the minimum amount you must receive for the transaction to proceed. "+(e?`Transaction will be reversed if you receive less than ${je.UiHelperUtil.formatNumberToLocalString(e,6)} ${this.toToken.symbol} due to price changes.`:"")} 8199 > 8200 <wui-icon size="xs" color="fg-250" name="infoCircle"></wui-icon> 8201 </w3m-tooltip-trigger> 8202 </wui-flex> 8203 <wui-flex> 8204 <wui-text variant="small-400" color="fg-200"> 8205 ${je.UiHelperUtil.formatNumberToLocalString(this.maxSlippage,6)} 8206 ${this.toToken.symbol} ${oi}% 8207 </wui-text> 8208 </wui-flex> 8209 </wui-flex> 8210 </wui-flex>`:null} 8211 <wui-flex flexDirection="column" gap="xs"> 8212 <wui-flex 8213 justifyContent="space-between" 8214 alignItems="center" 8215 class="details-row provider-free-row" 8216 > 8217 <wui-flex alignItems="center" gap="xs"> 8218 <wui-text class="details-row-title" variant="small-400" color="fg-150"> 8219 Provider fee 8220 </wui-text> 8221 </wui-flex> 8222 <wui-flex> 8223 <wui-text variant="small-400" color="fg-200">0.85%</wui-text> 8224 </wui-flex> 8225 </wui-flex> 8226 </wui-flex> 8227 </wui-flex> 8228 `:null} 8229 </wui-flex> 8230 </wui-flex> 8231 `}toggleDetails(){this.detailsOpen=!this.detailsOpen}};ai.styles=[ii],si([(0,De.wk)()],ai.prototype,"networkName",void 0),si([(0,De.MZ)()],ai.prototype,"detailsOpen",void 0),si([(0,De.wk)()],ai.prototype,"sourceToken",void 0),si([(0,De.wk)()],ai.prototype,"toToken",void 0),si([(0,De.wk)()],ai.prototype,"toTokenAmount",void 0),si([(0,De.wk)()],ai.prototype,"sourceTokenPriceInUSD",void 0),si([(0,De.wk)()],ai.prototype,"toTokenPriceInUSD",void 0),si([(0,De.wk)()],ai.prototype,"gasPriceInUSD",void 0),si([(0,De.wk)()],ai.prototype,"priceImpact",void 0),si([(0,De.wk)()],ai.prototype,"maxSlippage",void 0),si([(0,De.wk)()],ai.prototype,"networkTokenSymbol",void 0),si([(0,De.wk)()],ai.prototype,"inputError",void 0),ai=si([(0,je.customElement)("w3m-swap-details")],ai);const ci=Le.AH` 8232 :host > wui-flex { 8233 display: flex; 8234 flex-direction: row; 8235 justify-content: space-between; 8236 align-items: center; 8237 border-radius: var(--wui-border-radius-s); 8238 background-color: var(--wui-color-gray-glass-002); 8239 padding: var(--wui-spacing-xl); 8240 padding-right: var(--wui-spacing-s); 8241 width: 100%; 8242 height: 100px; 8243 box-sizing: border-box; 8244 box-shadow: inset 0px 0px 0px 1px var(--wui-color-gray-glass-002); 8245 position: relative; 8246 transition: box-shadow var(--wui-ease-out-power-1) var(--wui-duration-lg); 8247 will-change: background-color; 8248 } 8249 8250 :host wui-flex.focus { 8251 box-shadow: inset 0px 0px 0px 1px var(--wui-color-gray-glass-005); 8252 } 8253 8254 :host > wui-flex .swap-input, 8255 :host > wui-flex .swap-token-button { 8256 z-index: 10; 8257 } 8258 8259 :host > wui-flex .swap-input { 8260 -webkit-mask-image: linear-gradient( 8261 270deg, 8262 transparent 0px, 8263 transparent 8px, 8264 black 24px, 8265 black 25px, 8266 black 32px, 8267 black 100% 8268 ); 8269 mask-image: linear-gradient( 8270 270deg, 8271 transparent 0px, 8272 transparent 8px, 8273 black 24px, 8274 black 25px, 8275 black 32px, 8276 black 100% 8277 ); 8278 } 8279 8280 :host > wui-flex .swap-input input { 8281 background: none; 8282 border: none; 8283 height: 42px; 8284 width: 100%; 8285 font-size: 32px; 8286 font-style: normal; 8287 font-weight: 400; 8288 line-height: 130%; 8289 letter-spacing: -1.28px; 8290 outline: none; 8291 caret-color: var(--wui-color-accent-100); 8292 color: var(--wui-color-fg-100); 8293 padding: 0px; 8294 } 8295 8296 :host > wui-flex .swap-input input:focus-visible { 8297 outline: none; 8298 } 8299 8300 :host > wui-flex .swap-input input::-webkit-outer-spin-button, 8301 :host > wui-flex .swap-input input::-webkit-inner-spin-button { 8302 -webkit-appearance: none; 8303 margin: 0; 8304 } 8305 8306 .max-value-button { 8307 background-color: transparent; 8308 border: none; 8309 cursor: pointer; 8310 color: var(--wui-color-gray-glass-020); 8311 padding-left: 0px; 8312 } 8313 8314 .market-value { 8315 min-height: 18px; 8316 } 8317`;var li=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let ui=class extends Le.WF{constructor(){super(...arguments),this.focused=!1,this.price=0,this.target="sourceToken",this.onSetAmount=null,this.onSetMaxValue=null}render(){const e=this.marketValue||"0",t=St.Se.bigNumber(e).isGreaterThan("0");return Le.qy` 8318 <wui-flex class="${this.focused?"focus":""}" justifyContent="space-between"> 8319 <wui-flex 8320 flex="1" 8321 flexDirection="column" 8322 alignItems="flex-start" 8323 justifyContent="center" 8324 class="swap-input" 8325 > 8326 <input 8327 @focusin=${()=>this.onFocusChange(!0)} 8328 @focusout=${()=>this.onFocusChange(!1)} 8329 ?disabled=${this.disabled} 8330 .value=${this.value}
8331 @input=${this.dispatchInputChangeEvent} 8332 @keydown=${this.handleKeydown} 8333 placeholder="0" 8334 type="text" 8335 inputmode="decimal" 8336 /> 8337 <wui-text class="market-value" variant="small-400" color="fg-200"> 8338 ${t?`$${je.UiHelperUtil.formatNumberToLocalString(this.marketValue,3)}`:null} 8339 </wui-text> 8340 </wui-flex> 8341 ${this.templateTokenSelectButton()} 8342 </wui-flex> 8343 `}handleKeydown(e){return St.t$.numericInputKeyDown(e,this.value,(e=>this.onSetAmount?.(this.target,e)))}dispatchInputChangeEvent(e){if(!this.onSetAmount)return;const t=e.target.value.replace(/[^0-9.]/gu,"");","===t||"."===t?this.onSetAmount(this.target,"0."):t.endsWith(",")?this.onSetAmount(this.target,t.replace(",",".")):this.onSetAmount(this.target,t)}setMaxValueToInput(){this.onSetMaxValue?.(this.target,this.balance)}templateTokenSelectButton(){return this.token?Le.qy` 8344 <wui-flex 8345 class="swap-token-button" 8346 flexDirection="column" 8347 alignItems="flex-end" 8348 justifyContent="center" 8349 gap="xxs" 8350 > 8351 <wui-token-button 8352 text=${this.token.symbol} 8353 imageSrc=${this.token.logoUri} 8354 @click=${this.onSelectToken.bind(this)} 8355 > 8356 </wui-token-button> 8357 <wui-flex alignItems="center" gap="xxs"> ${this.tokenBalanceTemplate()} </wui-flex> 8358 </wui-flex> 8359 `:Le.qy` <wui-button 8360 class="swap-token-button" 8361 size="md" 8362 variant="accent" 8363 @click=${this.onSelectToken.bind(this)} 8364 > 8365 Select token 8366 </wui-button>`}tokenBalanceTemplate(){const e=St.Se.multiply(this.balance,this.price),t=!!e&&e?.isGreaterThan(5e-5);return Le.qy` 8367 ${t?Le.qy`<wui-text variant="small-400" color="fg-200"> 8368 ${je.UiHelperUtil.formatNumberToLocalString(this.balance,3)} 8369 </wui-text>`:null} 8370 ${"sourceToken"===this.target?this.tokenActionButtonTemplate(t):null} 8371 `}tokenActionButtonTemplate(e){return e?Le.qy` <button class="max-value-button" @click=${this.setMaxValueToInput.bind(this)}> 8372 <wui-text color="accent-100" variant="small-600">Max</wui-text> 8373 </button>`:Le.qy` <button class="max-value-button" @click=${this.onBuyToken.bind(this)}> 8374 <wui-text color="accent-100" variant="small-600">Buy</wui-text> 8375 </button>`}onFocusChange(e){this.focused=e}onSelectToken(){Me.En.sendEvent({type:"track",event:"CLICK_SELECT_TOKEN_TO_SWAP"}),Me.IN.push("SwapSelectToken",{target:this.target})}onBuyToken(){Me.IN.push("OnRampProviders")}};ui.styles=[ci],li([(0,De.MZ)()],ui.prototype,"focused",void 0),li([(0,De.MZ)()],ui.prototype,"balance",void 0),li([(0,De.MZ)()],ui.prototype,"value",void 0),li([(0,De.MZ)()],ui.prototype,"price",void 0),li([(0,De.MZ)()],ui.prototype,"marketValue",void 0),li([(0,De.MZ)()],ui.prototype,"disabled",void 0),li([(0,De.MZ)()],ui.prototype,"target",void 0),li([(0,De.MZ)()],ui.prototype,"token",void 0),li([(0,De.MZ)()],ui.prototype,"onSetAmount",void 0),li([(0,De.MZ)()],ui.prototype,"onSetMaxValue",void 0),ui=li([(0,je.customElement)("w3m-swap-input")],ui);const di=Le.AH` 8376 :host { 8377 width: 100%; 8378 } 8379 8380 :host > wui-flex { 8381 display: flex; 8382 flex-direction: row; 8383 justify-content: space-between; 8384 align-items: center; 8385 border-radius: var(--wui-border-radius-s); 8386 padding: var(--wui-spacing-xl); 8387 padding-right: var(--wui-spacing-s); 8388 background-color: var(--wui-color-gray-glass-002); 8389 box-shadow: inset 0px 0px 0px 1px var(--wui-color-gray-glass-002); 8390 width: 100%; 8391 height: 100px; 8392 box-sizing: border-box; 8393 position: relative; 8394 } 8395 8396 wui-shimmer.market-value { 8397 opacity: 0; 8398 } 8399 8400 :host > wui-flex > svg.input_mask { 8401 position: absolute; 8402 inset: 0; 8403 z-index: 5; 8404 } 8405 8406 :host wui-flex .input_mask__border, 8407 :host wui-flex .input_mask__background { 8408 transition: fill var(--wui-duration-md) var(--wui-ease-out-power-1); 8409 will-change: fill; 8410 } 8411 8412 :host wui-flex .input_mask__border { 8413 fill: var(--wui-color-gray-glass-020); 8414 } 8415 8416 :host wui-flex .input_mask__background { 8417 fill: var(--wui-color-gray-glass-002); 8418 } 8419`;var hi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let pi=class extends Le.WF{constructor(){super(...arguments),this.target="sourceToken"}render(){return Le.qy` 8420 <wui-flex class justifyContent="space-between"> 8421 <wui-flex 8422 flex="1" 8423 flexDirection="column" 8424 alignItems="flex-start" 8425 justifyContent="center" 8426 class="swap-input" 8427 gap="xxs" 8428 > 8429 <wui-shimmer width="80px" height="40px" borderRadius="xxs" variant="light"></wui-shimmer> 8430 </wui-flex> 8431 ${this.templateTokenSelectButton()} 8432 </wui-flex> 8433 `}templateTokenSelectButton(){return Le.qy` 8434 <wui-flex 8435 class="swap-token-button" 8436 flexDirection="column" 8437 alignItems="flex-end" 8438 justifyContent="center" 8439 gap="xxs" 8440 > 8441 <wui-shimmer width="80px" height="40px" borderRadius="3xl" variant="light"></wui-shimmer> 8442 </wui-flex> 8443 `}};pi.styles=[di],hi([(0,De.MZ)()],pi.prototype,"target",void 0),pi=hi([(0,je.customElement)("w3m-swap-input-skeleton")],pi);const fi=Le.AH` 8444 :host { 8445 height: 64px; 8446 } 8447 8448 wui-text { 8449 text-transform: capitalize; 8450 } 8451 8452 wui-icon-link[data-hidden='true'] { 8453 opacity: 0 !important; 8454 pointer-events: none; 8455 } 8456`;var mi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};const gi=["Swap","SwapSelectToken","SwapPreview"];function yi(){const e=Me.IN.state.data?.connector?.name,t=Me.IN.state.data?.wallet?.name,n=Me.IN.state.data?.network?.name,r=t??e,i=Me.aK.getConnectors();return{Connect:`Connect ${1===i.length&&"w3m-email"===i[0]?.id?"Email":""} Wallet`,ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,ConnectingExter
8456nal:r??"Connect Wallet",ConnectingWalletConnect:r??"WalletConnect",ConnectingSiwe:"Sign In",Networks:"Choose Network",SwitchNetwork:n??"Switch Network",AllWallets:"All Wallets",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",GetWallet:"Get a wallet",Downloads:r?`Get ${r}`:"Downloads",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",ApproveTransaction:"Approve Transaction",Transactions:"Activity",UpgradeEmailWallet:"Upgrade your Wallet",UpgradeToSmartAccount:void 0,UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",UnsupportedChain:"Switch Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",WhatIsABuy:"What is Buy?",BuyInProgress:"Buy",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",RegisterAccountName:"Choose name",RegisterAccountNameSuccess:"",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Swap:"Swap",SwapSelectToken:"Select token",SwapPreview:"Preview swap",WalletSend:"Send",WalletSendPreview:"Review send",WalletSendSelectToken:"Select Token",ConnectWallets:"Connect wallet",ConnectSocials:"All socials",ConnectingSocial:Me.Uj.state.socialProvider?Me.Uj.state.socialProvider:"Connect Social"}}let vi=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.heading=yi()[Me.IN.state.view],this.buffering=!1,this.showBack=!1,this.unsubscribe.push(Me.IN.subscribeKey("view",(e=>{this.onViewChange(e),this.onHistoryChange()})),Me.x4.subscribeKey("buffering",(e=>this.buffering=e)))}disconnectCallback(){this.unsubscribe.forEach((e=>e()))}render(){return Le.qy` 8457 <wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center"> 8458 ${this.dynamicButtonTemplate()} ${this.titleTemplate()} 8459 <wui-icon-link 8460 ?disabled=${this.buffering} 8461 icon="close" 8462 @click=${this.onClose.bind(this)} 8463 data-testid="w3m-header-close" 8464 ></wui-icon-link> 8465 </wui-flex> 8466 `}onWalletHelp(){Me.En.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),Me.IN.push("WhatIsAWallet")}async onClose(){if(Me.Hd.state.isSiweEnabled){const{SIWEController:e}=await n.e(851).then(n.bind(n,4851));"success"!==e.state.status&&await Me.x4.disconnect()}Me.W3.close()}titleTemplate(){const e=gi.includes(Me.IN.state.view);return Le.qy` 8467 <wui-flex class="w3m-header-title" alignItems="center" gap="xs"> 8468 <wui-text variant="paragraph-700" color="fg-100">${this.heading}</wui-text> 8469 ${e?Le.qy`<wui-tag variant="main">Beta</wui-tag>`:null} 8470 </wui-flex> 8471 `}dynamicButtonTemplate(){const{view:e}=Me.IN.state,t="Connect"===e,n="ApproveTransaction"===e||"UpgradeToSmartAccount"===e||"ConnectingSiwe"===e;return this.showBack&&!n?Le.qy`<wui-icon-link 8472 id="dynamic" 8473 icon="chevronLeft" 8474 ?disabled=${this.buffering} 8475 @click=${this.onGoBack.bind(this)} 8476 ></wui-icon-link>`:Le.qy`<wui-icon-link 8477 data-hidden=${!t} 8478 id="dynamic" 8479 icon="helpCircle" 8480 @click=${this.onWalletHelp.bind(this)} 8481 ></wui-icon-link>`}getPadding(){return this.heading?["l","2l","l","2l"]:["l","2l","0","2l"]}async onViewChange(e){const t=this.shadowRoot?.querySelector("wui-flex.w3m-header-title");if(t){const n=yi()[e];await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.heading=n,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})}}async onHistoryChange(){const{history:e}=Me.IN.state,t=this.shadowRoot?.querySelector("#dynamic");e.length>1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){Me.IN.goBack()}};vi.styles=[fi],mi([(0,De.wk)()],vi.prototype,"heading",void 0),mi([(0,De.wk)()],vi.prototype,"buffering",void 0),mi([(0,De.wk)()],vi.prototype,"showBack",void 0),vi=mi([(0,je.customElement)("w3m-header")],vi);var wi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let bi=class extends Le.WF{constructor(){super(...arguments),this.data=[]}render(){return Le.qy` 8482 <wui-flex flexDirection="column" alignItems="center" gap="l"> 8483 ${this.data.map((e=>Le.qy` 8484 <wui-flex flexDirection="column" alignItems="center" gap="xl"> 8485 <wui-flex flexDirection="row" justifyContent="center" gap="1xs"> 8486 ${e.images.map((e=>Le.qy`<wui-visual name=${e}></wui-visual>`))} 8487 </wui-flex> 8488 </wui-flex> 8489 <wui-flex flexDirection="column" alignItems="center" gap="xxs"> 8490 <wui-text variant="paragraph-500" color="fg-100" align="center"> 8491 ${e.title} 8492 </wui-text> 8493 <wui-text variant="small-500" color="fg-200" align="center">${e.text}</wui-text> 8494 </wui-flex> 8495 `))} 8496 </wui-flex> 8497 `}};wi([(0,De.MZ)({type:Array})],bi.prototype,"data",void 0),bi=wi([(0,je.customElement)("w3m-help-widget")],bi);const xi=Le.AH` 8498 :host { 8499 width: 100%; 8500 } 8501 8502 wui-loading-spinner { 8503 position: absolute; 8504 top: 50%; 8505 right: 20px; 8506 transform: translateY(-50%); 8507 } 8508 8509 .currency-container { 8510 position: absolute; 8511 top: 50%; 8512 transform: translateY(-50%); 8513 right: var(--wui-spacing-1xs); 8514 height: 40px; 8515 padding: var(--wui-spacing-xs) var(--wui-spacing-1xs) var(--wui-spacing-xs) 8516 var(--wui-spacing-xs); 8517 min-width: 95px; 8518 border-radius: var(--FULL, 1000px); 8519 border: 1px solid var(--wui-color-gray-glass-002); 8520 background: var(--wui-color-gray-glass-002); 8521 cursor: pointer; 8522 } 8523 8524 .currency-container > wui-image { 8525 height: 24px; 8526 width: 24px; 8527 border-radius: 50%; 8528 } 8529`;var Ei=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let _i=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.type="Token",this.value=0,this.currencies=[],this.selectedCurrency=this.currencies?.[0],this.currencyImages=Me.jQ.state.currencyImages,this.tokenImages=Me.jQ.state.tokenImages,this.unsubscribe.push(Me.aG.subscribeKey("purchaseCurrency",(e=>{e&&"Fiat"!==this.type&&(this.selectedCurrency=this.formatPurchaseCurrency(e))})),Me.aG.subscribeKey("paymentCurrency",(e=>{e&&"Token"!==this.type&&(this.selectedCurrency=this.formatPaymentCurrency(e))})),Me.aG.subscribe((e=>{"Fiat"===this.type?this.currencies=e.purchaseCurrencies.map(this.formatPurchaseCurrency):this.currencies=e.paymentCurrencies.map(this.formatPaymentCurrency)})),Me.jQ.subscribe((e=>{this.currencyImages={...e.currencyImages},this.tokenImages={...e.tokenImages}})))}firstUpdated(){Me.aG.getAvailableCurrencies()}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.selectedCurrency?.symbol||"",t=this.currencyImages[e]||this.tokenImages[e];return Le.qy`<wui-input-text type="number" size="lg" value=${this.value}> 8530 ${this.selectedCurrency?Le.qy` <wui-flex 8531 class="currency-container" 8532 justifyContent="space-between" 8533 alignItems="center" 8534 gap="xxs" 8535 @click=${()=>Me.W3.open({view:`OnRamp${this.type}Select`})} 8536 > 8537 <wui-image src=${Ue(t)}></wui-image> 8538 <wui-text color="fg-100">${this.selectedCurrency.symbol}</wui-text> 8539 </wui-flex>`:Le.qy`<wui-loading-spinner></wui-loading-spinner>`} 8540 </wui-input-text>`}formatPaymentCurrency(e){return{name:e.id,symbol:e.id}}formatPurchaseCurrency(e){return{name:e.name,symbol:e.symbol}}};_i.styles=xi,Ei([(0,De.MZ)({type:String})],_i.prototype,"type",void 0),Ei([(0,De.MZ)({type:Number})],_i.prototype,"value",void 0),Ei([(0,De.wk)()],_i.prototype,"currencies",void 0),Ei([(0,De.wk)()],_i.prototype,"selectedCurrency",void 0),Ei([(0,De.wk)()],_i.prototype,"currencyImages",void 0),Ei([(0,De.wk)()],_i.prototype,"tokenImages",void 0),_i=Ei([(0,je.customElement)("w3m-onramp-input")],_i);const ki=Le.AH` 8541 wui-flex { 8542 background-color: var(--wui-color-gray-glass-005); 8543 } 8544 8545 a { 8546 text-decoration: none; 8547 color: var(--wui-color-fg-175); 8548 font-weight: 500; 8549 } 8550`;var Ci=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ai=class extends Le.WF{render(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=Me.Hd.state;return e||t?Le.qy` 8551 <wui-flex .padding=${["m","s","s","s"]} justifyContent="center"> 8552 <wui-text color="fg-250" variant="small-400" align="center"> 8553 By connecting your wallet, you agree to our <br /> 8554 ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()} 8555 </wui-text> 8556 </wui-flex> 8557 `:null}andTemplate(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=Me.Hd.state;return e&&t?"and":""}termsTemplate(){const{termsConditionsUrl:e}=Me.Hd.state;return e?Le.qy`<a href=${e}>Terms of Service</a>`:null}privacyTemplate(){const{privacyPolicyUrl:e}=Me.Hd.state;return e?Le.qy`<a href=${e}>Privacy Policy</a>`:null}};Ai.styles=[ki],Ai=Ci([(0,je.customElement)("w3m-legal-footer")],Ai);const Si=Le.AH` 8558 :host { 8559 display: block; 8560 padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl); 8561 } 8562`;var Ii=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ti=class extends Le.WF{constructor(){super(...arguments),this.wallet=void 0}
8562render(){if(!this.wallet)return this.style.display="none",null;const{name:e,app_store:t,play_store:n,chrome_store:r,homepage:i}=this.wallet,s=Me.wE.isMobile(),o=Me.wE.isIos(),a=Me.wE.isAndroid(),c=[t,n,i,r].filter(Boolean).length>1,l=je.UiHelperUtil.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return c&&!s?Le.qy` 8563 <wui-cta-button 8564 label=${`Don't have ${l}?`} 8565 buttonLabel="Get" 8566 @click=${()=>Me.IN.push("Downloads",{wallet:this.wallet})} 8567 ></wui-cta-button> 8568 `:!c&&i?Le.qy` 8569 <wui-cta-button 8570 label=${`Don't have ${l}?`} 8571 buttonLabel="Get" 8572 @click=${this.onHomePage.bind(this)} 8573 ></wui-cta-button> 8574 `:t&&o?Le.qy` 8575 <wui-cta-button 8576 label=${`Don't have ${l}?`} 8577 buttonLabel="Get" 8578 @click=${this.onAppStore.bind(this)} 8579 ></wui-cta-button> 8580 `:n&&a?Le.qy` 8581 <wui-cta-button 8582 label=${`Don't have ${l}?`} 8583 buttonLabel="Get" 8584 @click=${this.onPlayStore.bind(this)} 8585 ></wui-cta-button> 8586 `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&Me.wE.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&Me.wE.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&Me.wE.openHref(this.wallet.homepage,"_blank")}};Ti.styles=[Si],Ii([(0,De.MZ)({type:Object})],Ti.prototype,"wallet",void 0),Ti=Ii([(0,je.customElement)("w3m-mobile-download-links")],Ti);const Pi=Le.AH` 8587 wui-flex { 8588 border-top: 1px solid var(--wui-color-gray-glass-005); 8589 } 8590 8591 a { 8592 text-decoration: none; 8593 color: var(--wui-color-fg-175); 8594 font-weight: 500; 8595 display: flex; 8596 align-items: center; 8597 justify-content: center; 8598 gap: var(--wui-spacing-3xs); 8599 } 8600`;var Ni=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ri=class extends Le.WF{render(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=Me.Hd.state;return e||t?Le.qy` 8601 <wui-flex 8602 .padding=${["m","s","s","s"]} 8603 flexDirection="column" 8604 alignItems="center" 8605 justifyContent="center" 8606 gap="s" 8607 > 8608 <wui-text color="fg-250" variant="small-400" align="center"> 8609 We work with the best providers to give you the lowest fees and best support. More options 8610 coming soon! 8611 </wui-text> 8612 8613 ${this.howDoesItWorkTemplate()} 8614 </wui-flex> 8615 `:null}howDoesItWorkTemplate(){return Le.qy` <wui-link @click=${this.onWhatIsBuy.bind(this)}> 8616 <wui-icon size="xs" color="accent-100" slot="iconLeft" name="helpCircle"></wui-icon> 8617 How does it work? 8618 </wui-link>`}onWhatIsBuy(){Me.IN.push("WhatIsABuy")}};Ri.styles=[Pi],Ri=Ni([(0,je.customElement)("w3m-onramp-providers-footer")],Ri);const Oi=Le.AH` 8619 :host { 8620 display: block; 8621 position: absolute; 8622 opacity: 0; 8623 pointer-events: none; 8624 top: 11px; 8625 left: 50%; 8626 width: max-content; 8627 } 8628`;var Mi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};const ji={success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}};let Li=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=Me.Pt.state.open,this.unsubscribe.push(Me.Pt.subscribeKey("open",(e=>{this.open=e,this.onOpen()})))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach((e=>e()))}render(){const{message:e,variant:t}=Me.Pt.state,n=ji[t];return Le.qy` 8629 <wui-snackbar 8630 message=${e} 8631 backgroundColor=${n.backgroundColor} 8632 iconColor=${n.iconColor} 8633 icon=${n.icon} 8634 ></wui-snackbar> 8635 `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout=setTimeout((()=>Me.Pt.hide()),2500)):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};Li.styles=Oi,Mi([(0,De.wk)()],Li.prototype,"open",void 0),Li=Mi([(0,je.customElement)("w3m-snackbar")],Li);const Di=Le.AH` 8636 wui-separator { 8637 margin: var(--wui-spacing-s) calc(var(--wui-spacing-s) * -1); 8638 width: calc(100% + var(--wui-spacing-s) * 2); 8639 } 8640 8641 wui-email-input { 8642 width: 100%; 8643 } 8644 8645 form { 8646 width: 100%; 8647 display: block; 8648 position: relative; 8649 } 8650 8651 wui-icon-link, 8652 wui-loading-spinner { 8653 position: absolute; 8654 top: 50%; 8655 transform: translateY(-50%); 8656 } 8657 8658 wui-icon-link { 8659 right: var(--wui-spacing-xs); 8660 } 8661 8662 wui-loading-spinner { 8663 right: var(--wui-spacing-m); 8664 } 8665`;var Bi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ui=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.formRef=qt(),this.connectors=Me.aK.state.connectors,this.email="",this.loading=!1,this.error="",this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}firstUpdated(){this.formRef.value?.addEventListener("keydown",(e=>{"Enter"===e.key&&this.onSubmitEmail(e)}))}render(){const e=this.connectors.find((e=>"AUTH"===e.type)),t=this.connectors.length>1;return e?.email?Le.qy` 8666 <form ${Kt(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}> 8667 <wui-email-input 8668 @focus=${this.onFocusEvent.bind(this)} 8669 .disabled=${this.loading} 8670 @inputChange=${this.onEmailInputChange.bind(this)} 8671 .errorMessage=${this.error} 8672 > 8673 </wui-email-input> 8674 8675 ${this.submitButtonTemplate()}${this.loadingTemplate()} 8676 <input type="submit" hidden /> 8677 </form> 8678 8679 ${e.socials||!t?null:Le.qy`<wui-flex .padding=${["xxs","0","0","0"]}> 8680 <wui-separator text="or"></wui-separator> 8681 </wui-flex>`} 8682 `:null}submitButtonTemplate(){return!this.loading&&this.email.length>3?Le.qy` 8683 <wui-icon-link 8684 size="sm" 8685 icon="chevronRight" 8686 iconcolor="accent-100" 8687 @click=${this.onSubmitEmail.bind(this)} 8688 > 8689 </wui-icon-link> 8690 `:null}loadingTemplate(){return this.loading?Le.qy`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:null}onEmailInputChange(e){this.email=e.detail.trim(),this.error=""}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const t=Me.aK.getAuthConnector();if(!t)throw new Error("w3m-email-login-widget: Auth connector not found");const{action:n}=await t.provider.connectEmail({email:this.email});Me.En.sendEvent({type:"track",event:"EMAIL_SUBMITTED"}),"VERIFY_OTP"===n?(Me.En.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),Me.IN.push("EmailVerifyOtp",{email:this.email})):"VERIFY_DEVICE"===n&&Me.IN.push("EmailVerifyDevice",{email:this.email})}catch(t){const e=Me.wE.parseError(t);e?.includes("Invalid email")?this.error="Invalid email. Try again.":Me.Pt.showError(t)}finally{this.loading=!1}}onFocusEvent(){Me.En.sendEvent({type:"track",event:"EMAIL_LOGIN_SELECTED"})}};Ui.styles=Di,Bi([(0,De.wk)()],Ui.prototype,"connectors",void 0),Bi([(0,De.wk)()],Ui.prototype,"email",void 0),Bi([(0,De.wk)()],Ui.prototype,"loading",void 0),Bi([(0,De.wk)()],Ui.prototype,"error",void 0),Ui=Bi([(0,je.customElement)("w3m-email-login-widget")],Ui);const Fi=Le.AH` 8691 wui-flex { 8692 width: 100%; 8693 } 8694 8695 :host > wui-flex:first-child { 8696 transform: translateY(calc(var(--wui-spacing-xxs) * -1)); 8697 } 8698 8699 wui-icon-link { 8700 margin-right: calc(var(--wui-icon-box-size-md) * -1); 8701 } 8702 8703 wui-notice-card { 8704 margin-bottom: var(--wui-spacing-3xs); 8705 } 8706 8707 w3m-transactions-view { 8708 max-height: 200px; 8709 } 8710 8711 .tab-content-container { 8712 height: 300px; 8713 overflow-y: auto; 8714 overflow-x: hidden; 8715 scrollbar-width: none; 8716 } 8717 8718 .tab-content-container::-webkit-scrollbar {
8719 display: none; 8720 } 8721 8722 .account-button { 8723 width: auto; 8724 border: none; 8725 display: flex; 8726 align-items: center; 8727 justify-content: center; 8728 gap: var(--wui-spacing-s); 8729 height: 48px; 8730 padding: var(--wui-spacing-xs); 8731 padding-right: var(--wui-spacing-s); 8732 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 8733 background-color: var(--wui-color-gray-glass-002); 8734 border-radius: 24px; 8735 transaction: background-color 0.2s linear; 8736 } 8737 8738 .account-button:hover { 8739 background-color: var(--wui-color-gray-glass-005); 8740 } 8741 8742 .avatar-container { 8743 position: relative; 8744 } 8745 8746 wui-avatar.avatar { 8747 width: 32px; 8748 height: 32px; 8749 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 8750 } 8751 8752 wui-avatar.network-avatar { 8753 width: 16px; 8754 height: 16px; 8755 position: absolute; 8756 left: 100%; 8757 top: 100%; 8758 transform: translate(-75%, -75%); 8759 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 8760 } 8761 8762 .account-links { 8763 display: flex; 8764 justify-content: space-between; 8765 align-items: center; 8766 } 8767 8768 .account-links wui-flex { 8769 cursor: pointer; 8770 display: flex; 8771 align-items: center; 8772 justify-content: center; 8773 flex: 1; 8774 background: red; 8775 align-items: center; 8776 justify-content: center; 8777 height: 48px; 8778 padding: 10px; 8779 flex: 1 0 0; 8780 border-radius: var(--XS, 16px); 8781 border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); 8782 background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); 8783 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 8784 will-change: background-color; 8785 } 8786 8787 .account-links wui-flex:hover { 8788 background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15)); 8789 } 8790 8791 .account-links wui-flex wui-icon { 8792 width: var(--S, 20px); 8793 height: var(--S, 20px); 8794 } 8795 8796 .account-links wui-flex wui-icon svg path { 8797 stroke: #667dff; 8798 } 8799`;var $i=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let zi=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.address=Me.Uj.state.address,this.profileImage=Me.Uj.state.profileImage,this.profileName=Me.Uj.state.profileName,this.network=Me.p_.state.caipNetwork,this.disconnecting=!1,this.balance=Me.Uj.state.balance,this.balanceSymbol=Me.Uj.state.balanceSymbol,this.unsubscribe.push(Me.Uj.subscribe((e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.balance=e.balance,this.balanceSymbol=e.balanceSymbol):this.disconnecting||Me.Pt.showError("Account not found")})),Me.p_.subscribeKey("caipNetwork",(e=>{e?.id&&(this.network=e)})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");const e=Me.$m.getNetworkImage(this.network);return Le.qy`<wui-flex 8800 flexDirection="column" 8801 .padding=${["0","xl","m","xl"]} 8802 alignItems="center" 8803 gap="l" 8804 > 8805 <wui-avatar 8806 alt=${Ue(this.address)} 8807 address=${Ue(this.address)} 8808 imageSrc=${Ue(null===this.profileImage?void 0:this.profileImage)} 8809 ></wui-avatar> 8810 <wui-flex flexDirection="column" alignItems="center"> 8811 <wui-flex gap="3xs" alignItems="center" justifyContent="center"> 8812 <wui-text variant="medium-title-600" color="fg-100"> 8813 ${this.profileName?je.UiHelperUtil.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):je.UiHelperUtil.getTruncateString({string:this.address?this.address:"",charsStart:4,charsEnd:4,truncate:"middle"})} 8814 </wui-text> 8815 <wui-icon-link 8816 size="md" 8817 icon="copy" 8818 iconColor="fg-200" 8819 @click=${this.onCopyAddress} 8820 ></wui-icon-link> 8821 </wui-flex> 8822 <wui-text variant="paragraph-500" color="fg-200" 8823 >${Me.wE.formatBalance(this.balance,this.balanceSymbol)}</wui-text 8824 > 8825 </wui-flex> 8826 ${this.explorerBtnTemplate()} 8827 </wui-flex> 8828 8829 <wui-flex flexDirection="column" gap="xs" .padding=${["0","s","s","s"]}> 8830 ${this.emailCardTemplate()} <w3m-account-auth-button></w3m-account-auth-button> 8831 8832 <wui-list-item 8833 .variant=${e?"image":"icon"} 8834 iconVariant="overlay" 8835 icon="networkPlaceholder" 8836 imageSrc=${Ue(e)} 8837 ?chevron=${this.isAllowedNetworkSwitch()} 8838 @click=${this.onNetworks.bind(this)} 8839 data-testid="w3m-account-select-network" 8840 > 8841 <wui-text variant="paragraph-500" color="fg-100"> 8842 ${this.network?.name??"Unknown"} 8843 </wui-text> 8844 </wui-list-item> 8845 ${this.onrampTemplate()} 8846 <wui-list-item 8847 iconVariant="blue" 8848 icon="swapHorizontalMedium" 8849 iconSize="sm" 8850 ?chevron=${!0} 8851 @click=${this.onTransactions.bind(this)} 8852 > 8853 <wui-text variant="paragraph-500" color="fg-100">Activity</wui-text> 8854 </wui-list-item> 8855 <wui-list-item 8856 variant="icon" 8857 iconVariant="overlay" 8858 icon="disconnect" 8859 ?chevron=${!1} 8860 .loading=${this.disconnecting} 8861 @click=${this.onDisconnect.bind(this)} 8862 data-testid="disconnect-button" 8863 > 8864 <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text> 8865 </wui-list-item> 8866 </wui-flex>`}onrampTemplate(){const{enableOnramp:e}=Me.Hd.state;return e?Le.qy` 8867 <wui-list-item 8868 iconVariant="blue" 8869 icon="card" 8870 ?chevron=${!0} 8871 @click=${this.handleClickPay.bind(this)} 8872 > 8873 <wui-text variant="paragraph-500" color="fg-100">Buy crypto</wui-text> 8874 </wui-list-item> 8875 `:null}emailCardTemplate(){const e=Me.iT.getConnectedConnector(),t=Me.aK.getAuthConnector(),{origin:n}=location;return!t||"AUTH"!==e||n.includes(Me.oU.SECURE_SITE)?null:Le.qy` 8876 <wui-notice-card 8877 @click=${this.onGoToUpgradeView.bind(this)} 8878 label="Upgrade your wallet" 8879 description="Transition to a self-custodial wallet" 8880 icon="wallet" 8881 data-testid="w3m-wallet-upgrade-card" 8882 ></wui-notice-card> 8883 `}
8883handleClickPay(){Me.IN.push("OnRampProviders")}explorerBtnTemplate(){const{addressExplorerUrl:e}=Me.Uj.state;return e?Le.qy` 8884 <wui-button size="md" variant="neutral" @click=${this.onExplorer.bind(this)}> 8885 <wui-icon size="sm" color="inherit" slot="iconLeft" name="compass"></wui-icon> 8886 Block Explorer 8887 <wui-icon size="sm" color="inherit" slot="iconRight" name="externalLink"></wui-icon> 8888 </wui-button> 8889 `:null}isAllowedNetworkSwitch(){const{requestedCaipNetworks:e}=Me.p_.state,t=!!e&&e.length>1,n=e?.find((e=>{let{id:t}=e;return t===this.network?.id}));return t||!n}onCopyAddress(){try{this.address&&(Me.wE.copyToClopboard(this.address),Me.Pt.showSuccess("Address copied"))}catch{Me.Pt.showError("Failed to copy")}}onNetworks(){this.isAllowedNetworkSwitch()&&(Me.En.sendEvent({type:"track",event:"CLICK_NETWORKS"}),Me.IN.push("Networks"))}onTransactions(){Me.En.sendEvent({type:"track",event:"CLICK_TRANSACTIONS"}),Me.IN.push("Transactions")}async onDisconnect(){try{this.disconnecting=!0,await Me.x4.disconnect(),Me.En.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),Me.W3.close()}catch{Me.En.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),Me.Pt.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onExplorer(){const{addressExplorerUrl:e}=Me.Uj.state;e&&Me.wE.openHref(e,"_blank")}onGoToUpgradeView(){Me.En.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),Me.IN.push("UpgradeEmailWallet")}};zi.styles=Fi,$i([(0,De.wk)()],zi.prototype,"address",void 0),$i([(0,De.wk)()],zi.prototype,"profileImage",void 0),$i([(0,De.wk)()],zi.prototype,"profileName",void 0),$i([(0,De.wk)()],zi.prototype,"network",void 0),$i([(0,De.wk)()],zi.prototype,"disconnecting",void 0),$i([(0,De.wk)()],zi.prototype,"balance",void 0),$i([(0,De.wk)()],zi.prototype,"balanceSymbol",void 0),zi=$i([(0,je.customElement)("w3m-account-default-widget")],zi);const Hi=Le.AH` 8890 wui-flex { 8891 width: 100%; 8892 } 8893 8894 wui-promo { 8895 position: absolute; 8896 top: -32px; 8897 } 8898 8899 wui-profile-button { 8900 margin-top: calc(-1 * var(--wui-spacing-2l)); 8901 } 8902 8903 wui-promo + wui-profile-button { 8904 margin-top: var(--wui-spacing-2l); 8905 } 8906 8907 wui-tabs { 8908 width: 100%; 8909 } 8910 8911 .contentContainer { 8912 height: 280px; 8913 } 8914 8915 .contentContainer > wui-icon-box { 8916 width: 40px; 8917 height: 40px; 8918 border-radius: var(--wui-border-radius-xxs); 8919 } 8920 8921 .contentContainer > .textContent { 8922 width: 65%; 8923 } 8924`;var Wi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let qi=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.address=Me.Uj.state.address,this.profileImage=Me.Uj.state.profileImage,this.profileName=Me.Uj.state.profileName,this.smartAccountDeployed=Me.Uj.state.smartAccountDeployed,this.network=Me.p_.state.caipNetwork,this.currentTab=Me.Uj.state.currentTab,this.tokenBalance=Me.Uj.state.tokenBalance,this.preferredAccountType=Me.Uj.state.preferredAccountType,this.unsubscribe.push(Me.Uj.subscribe((e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.currentTab=e.currentTab,this.tokenBalance=e.tokenBalance,this.smartAccountDeployed=e.smartAccountDeployed,this.preferredAccountType=e.preferredAccountType):Me.W3.close()})),Me.p_.subscribe((e=>{this.network=e.caipNetwork}))),this.watchSwapValues()}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),clearInterval(this.watchTokenBalance)}firstUpdated(){Me.Uj.fetchTokenBalance()}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");const e=Me.$m.getNetworkImage(this.network);return Le.qy`<wui-flex 8925 flexDirection="column" 8926 .padding=${["0","xl","m","xl"]} 8927 alignItems="center" 8928 gap="m" 8929 > 8930 ${this.activateAccountTemplate()} 8931 <wui-profile-button 8932 @click=${this.onProfileButtonClick.bind(this)} 8933 address=${Ue(this.address)} 8934 networkSrc=${Ue(e)} 8935 icon="chevronBottom" 8936 avatarSrc=${Ue(this.profileImage?this.profileImage:void 0)} 8937 profileName=${this.profileName} 8938 ></wui-profile-button> 8939 ${this.tokenBalanceTemplate()} 8940 <wui-flex gap="s"> 8941 <w3m-tooltip-trigger text="Buy"> 8942 <wui-icon-button @click=${this.onBuyClick.bind(this)} icon="card"></wui-icon-button> 8943 </w3m-tooltip-trigger> 8944 <w3m-tooltip-trigger text="Swap"> 8945 <wui-icon-button @click=${this.onSwapClick.bind(this)} icon="recycleHorizontal"> 8946 </wui-icon-button> 8947 </w3m-tooltip-trigger> 8948 <w3m-tooltip-trigger text="Receive"> 8949 <wui-icon-button @click=${this.onReceiveClick.bind(this)} icon="arrowBottomCircle"> 8950 </wui-icon-button> 8951 </w3m-tooltip-trigger> 8952 <w3m-tooltip-trigger text="Send"> 8953 <wui-icon-button @click=${this.onSendClick.bind(this)} icon="send"></wui-icon-button> 8954 </w3m-tooltip-trigger> 8955 </wui-flex> 8956 8957 <wui-tabs 8958 .onTabChange=${this.onTabChange.bind(this)} 8959 .activeTab=${this.currentTab} 8960 localTabWidth=${Me.wE.isMobile()&&window.innerWidth<430?(window.innerWidth-48)/3+"px":"104px"} 8961 .tabs=${Nr} 8962 ></wui-tabs> 8963 ${this.listContentTemplate()} 8964 </wui-flex>`}watchSwapValues(){this.watchTokenBalance=setInterval((()=>Me.Uj.fetchTokenBalance()),1e4)}listContentTemplate(){return 0===this.currentTab?Le.qy`<w3m-account-tokens-widget></w3m-account-tokens-widget>`:1===this.currentTab?Le.qy`<w3m-account-nfts-widget></w3m-account-nfts-widget>`:2===this.currentTab?Le.qy`<w3m-account-activity-widget></w3m-account-activity-widget>`:Le.qy`<w3m-account-tokens-widget></w3m-account-tokens-widget>`}tokenBalanceTemplate(){if(this.tokenBalance&&this.tokenBalance?.length>=0){const e=Me.wE.calculateBalance(this.tokenBalance),{dollars:t="0",pennies:n="00"}=Me.wE.formatTokenBalance(e);return Le.qy`<wui-balance dollars=${t} pennies=${n}></wui-balance>`}return Le.qy`<wui-balance dollars="0" pennies="00"></wui-balance>`}activateAccountTemplate(){return!Me.p_.checkIfSmartAccountEnabled()||this.preferredAccountType!==st.Vl.ACCOUNT_TYPES.EOA||this.smartAccountDeployed?null:Le.qy` <wui-promo 8965 text=${"Activate your account"} 8966 @click=${this.onUpdateToSmartAccount.bind(this)} 8967 data-testid="activate-smart-account-promo" 8968 ></wui-promo>`}onTabChange(e){Me.Uj.setCurrentTab(e)}onProfileButtonClick(){Me.IN.push("AccountSettings")}
8968onBuyClick(){Me.IN.push("OnRampProviders")}onSwapClick(){this.network?.id&&!Me.oU.SWAP_SUPPORTED_NETWORKS.includes(this.network?.id)?Me.IN.push("UnsupportedChain",{swapUnsupportedChain:!0}):Me.IN.push("Swap")}onReceiveClick(){Me.IN.push("WalletReceive")}onSendClick(){Me.IN.push("WalletSend")}onUpdateToSmartAccount(){Me.IN.push("UpgradeToSmartAccount")}};qi.styles=Hi,Wi([(0,De.wk)()],qi.prototype,"watchTokenBalance",void 0),Wi([(0,De.wk)()],qi.prototype,"address",void 0),Wi([(0,De.wk)()],qi.prototype,"profileImage",void 0),Wi([(0,De.wk)()],qi.prototype,"profileName",void 0),Wi([(0,De.wk)()],qi.prototype,"smartAccountDeployed",void 0),Wi([(0,De.wk)()],qi.prototype,"network",void 0),Wi([(0,De.wk)()],qi.prototype,"currentTab",void 0),Wi([(0,De.wk)()],qi.prototype,"tokenBalance",void 0),Wi([(0,De.wk)()],qi.prototype,"preferredAccountType",void 0),qi=Wi([(0,je.customElement)("w3m-account-wallet-features-widget")],qi);const Vi=Le.AH` 8969 :host { 8970 width: 100%; 8971 max-height: 280px; 8972 overflow: scroll; 8973 scrollbar-width: none; 8974 } 8975 8976 :host::-webkit-scrollbar {
8977 display: none; 8978 } 8979`;var Gi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ki=class extends Le.WF{render(){return Le.qy`<w3m-activity-list page="account"></w3m-activity-list>`}};Ki.styles=Vi,Ki=Gi([(0,je.customElement)("w3m-account-activity-widget")],Ki);const Zi=Le.AH` 8980 .contentContainer { 8981 height: 280px; 8982 } 8983 8984 .contentContainer > wui-icon-box { 8985 width: 40px; 8986 height: 40px; 8987 border-radius: var(--wui-border-radius-xxs); 8988 } 8989 8990 .contentContainer > .textContent { 8991 width: 65%; 8992 } 8993`;var Yi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Qi=class extends Le.WF{render(){return Le.qy`${this.nftTemplate()}`}nftTemplate(){return Le.qy` <wui-flex 8994 class="contentContainer" 8995 alignItems="center" 8996 justifyContent="center" 8997 flexDirection="column" 8998 gap="l" 8999 > 9000 <wui-icon-box 9001 icon="wallet" 9002 size="inherit" 9003 iconColor="fg-200" 9004 backgroundColor="fg-200" 9005 iconSize="lg" 9006 ></wui-icon-box> 9007 <wui-flex 9008 class="textContent" 9009 gap="xs" 9010 flexDirection="column" 9011 justifyContent="center" 9012 flexDirection="column" 9013 > 9014 <wui-text variant="paragraph-500" align="center" color="fg-100">No NFTs yet</wui-text> 9015 <wui-text variant="small-400" align="center" color="fg-200" 9016 >Transfer from another wallets to get started</wui-text 9017 > 9018 </wui-flex> 9019 <wui-link @click=${this.onReceiveClick.bind(this)}>Receive NFTs</wui-link> 9020 </wui-flex>`}onReceiveClick(){Me.IN.push("WalletReceive")}};Qi.styles=Zi,Qi=Yi([(0,je.customElement)("w3m-account-nfts-widget")],Qi);const Ji=Le.AH` 9021 :host { 9022 width: 100%; 9023 } 9024 9025 wui-flex { 9026 width: 100%; 9027 } 9028 9029 .contentContainer { 9030 max-height: 280px; 9031 overflow: scroll; 9032 scrollbar-width: none; 9033 } 9034 9035 .contentContainer::-webkit-scrollbar {
9036 display: none; 9037 } 9038`;var Xi=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let es=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.tokenBalance=Me.Uj.state.tokenBalance,this.unsubscribe.push(Me.Uj.subscribe((e=>{this.tokenBalance=e.tokenBalance})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return Le.qy`${this.tokenTemplate()}`}tokenTemplate(){return this.tokenBalance&&this.tokenBalance?.length>0?Le.qy`<wui-flex class="contentContainer" flexDirection="column" gap="xs"> 9039 ${this.tokenItemTemplate()} 9040 </wui-flex>`:Le.qy` <wui-flex flexDirection="column" gap="xs" 9041 ><wui-list-description 9042 @click=${this.onBuyClick.bind(this)} 9043 text="Buy Crypto" 9044 description="Easy with card or bank account" 9045 icon="card" 9046 iconColor="success-100" 9047 iconBackgroundColor="success-100" 9048 tag="popular" 9049 ></wui-list-description 9050 ><wui-list-description 9051 @click=${this.onReceiveClick.bind(this)} 9052 text="Receive funds" 9053 description="Transfer tokens on your wallet" 9054 icon="arrowBottomCircle" 9055 iconColor="fg-200" 9056 iconBackgroundColor="fg-200" 9057 ></wui-list-description 9058 ></wui-flex>`}tokenItemTemplate(){return this.tokenBalance?.map((e=>Le.qy`<wui-list-token 9059 tokenName=${e.name} 9060 tokenImageUrl=${e.iconUrl} 9061 tokenAmount=${e.quantity.numeric} 9062 tokenValue=${e.value} 9063 tokenCurrency=${e.symbol} 9064 ></wui-list-token>`))}onReceiveClick(){Me.IN.push("WalletReceive")}onBuyClick(){Me.IN.push("OnRampProviders")}};es.styles=Ji,Xi([(0,De.wk)()],es.prototype,"tokenBalance",void 0),es=Xi([(0,je.customElement)("w3m-account-tokens-widget")],es);const ts=Le.AH` 9065 :host { 9066 min-height: 100%; 9067 } 9068 9069 .contentContainer { 9070 height: 280px; 9071 } 9072 9073 .contentContainer > wui-icon-box { 9074 width: 40px; 9075 height: 40px; 9076 border-radius: var(--wui-border-radius-xxs); 9077 } 9078 9079 .contentContainer > .textContent { 9080 width: 65%; 9081 } 9082 9083 .emptyContainer { 9084 height: 100%; 9085 } 9086`;var ns=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};const rs="last-transaction";let is=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.address=Me.Uj.state.address,this.transactionsByYear=Me.WC.state.transactionsByYear,this.loading=Me.WC.state.loading,this.empty=Me.WC.state.empty,this.next=Me.WC.state.next,Me.WC.clearCursor(),this.unsubscribe.push(Me.Uj.subscribe((e=>{e.isConnected&&this.address!==e.address&&(this.address=e.address,Me.WC.resetTransactions(),Me.WC.fetchTransactions(e.address))})),Me.WC.subscribe((e=>{this.transactionsByYear=e.transactionsByYear,this.loading=e.loading,this.empty=e.empty,this.next=e.next})))}firstUpdated(){Me.WC.fetchTransactions(this.address),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return Le.qy` ${this.empty?null:this.templateTransactionsByYear()} 9087 ${this.loading?this.templateLoading():null} 9088 ${!this.loading&&this.empty?this.templateEmpty():null}`}templateTransactionsByYear(){const e=Object.keys(this.transactionsByYear).sort().reverse();return e.map(((t,n)=>{const r=n===e.length-1,i=parseInt(t,10);return new Array(12).fill(null).map(((e,t)=>t)).reverse().map((e=>{const t=je.TransactionUtil.getTransactionGroupTitle(i,e),n=this.transactionsByYear[i]?.[e];return n?Le.qy` 9089 <wui-flex flexDirection="column"> 9090 <wui-flex 9091 alignItems="center" 9092 flexDirection="row" 9093 .padding=${["xs","s","s","s"]} 9094 > 9095 <wui-text variant="paragraph-500" color="fg-200">${t}</wui-text> 9096 </wui-flex> 9097 <wui-flex flexDirection="column" gap="xs"> 9098 ${this.templateTransactions(n,r)} 9099 </wui-flex> 9100 </wui-flex> 9101 `:null}))}))}templateRenderTransaction(e,t){const{date:n,descriptions:r,direction:i,isAllNFT:s,images:o,status:a,transfers:c,type:l}=this.getTransactionListItemProps(e),u=c?.length>1;return 2===c?.length&&!s?Le.qy` 9102 <wui-transaction-list-item 9103 date=${n} 9104 .direction=${i} 9105 id=${t&&this.next?rs:""} 9106 status=${a} 9107 type=${l} 9108 .images=${o} 9109 .descriptions=${r} 9110 ></wui-transaction-list-item> 9111 `:u?c.map(((e,r)=>{const i=je.TransactionUtil.getTransferDescription(e),s=t&&r===c.length-1;return Le.qy` <wui-transaction-list-item 9112 date=${n} 9113 direction=${e.direction} 9114 id=${s&&this.next?rs:""} 9115 status=${a} 9116 type=${l} 9117 .onlyDirectionIcon=${!0} 9118 .images=${[o[r]]} 9119 .descriptions=${[i]} 9120 ></wui-transaction-list-item>`})):Le.qy` 9121 <wui-transaction-list-item 9122 date=${n} 9123 .direction=${i} 9124 id=${t&&this.next?rs:""} 9125 status=${a} 9126 type=${l} 9127 .images=${o} 9128 .descriptions=${r} 9129 ></wui-transaction-list-item> 9130 `}templateTransactions(e,t){return e.map(((n,r)=>{const i=t&&r===e.length-1;return Le.qy`${this.templateRenderTransaction(n,i)}`}))}emptyStateActivity(){return Le.qy`<wui-flex 9131 class="emptyContainer" 9132 flexGrow="1" 9133 flexDirection="column" 9134 justifyContent="center" 9135 alignItems="center" 9136 .padding=${["3xl","xl","3xl","xl"]} 9137 gap="xl" 9138 > 9139 <wui-icon-box 9140 backgroundColor="gray-glass-005" 9141 background="gray" 9142 iconColor="fg-200" 9143 icon="wallet" 9144 size="lg" 9145 ?border=${!0} 9146 borderColor="wui-color-bg-125" 9147 ></wui-icon-box> 9148 <wui-flex flexDirection="column" alignItems="center" gap="xs"> 9149 <wui-text align="center" variant="paragraph-500" color="fg-100" 9150 >No Transactions yet</wui-text 9151 > 9152 <wui-text align="center" variant="small-500" color="fg-200" 9153 >Start trading on dApps <br /> 9154 to grow your wallet!</wui-text 9155 > 9156 </wui-flex> 9157 </wui-flex>`}emptyStateAccount(){return Le.qy`<wui-flex 9158 class="contentContainer" 9159 alignItems="center" 9160 justifyContent="center" 9161 flexDirection="column" 9162 gap="l" 9163 > 9164 <wui-icon-box 9165 icon="swapHorizontal" 9166 size="inherit" 9167 iconColor="fg-200" 9168 backgroundColor="fg-200" 9169 iconSize="lg" 9170 ></wui-icon-box> 9171 <wui-flex 9172 class="textContent" 9173 gap="xs" 9174 flexDirection="column" 9175 justifyContent="center" 9176 flexDirection="column" 9177 > 9178 <wui-text variant="paragraph-500" align="center" color="fg-100">No activity yet</wui-text> 9179 <wui-text variant="small-400" align="center" color="fg-200" 9180 >Your next transactions will appear here</wui-text 9181 > 9182 </wui-flex> 9183 <wui-link @click=${this.onReceiveClick.bind(this)}>Trade</wui-link> 9184 </wui-flex>`}templateEmpty(){return"account"===this.page?Le.qy`${this.emptyStateAccount()}`:Le.qy`${this.emptyStateActivity()}`}templateLoading(){return"activity"===this.page?Array(7).fill(Le.qy` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map((e=>e)):null}onReceiveClick(){Me.IN.push("WalletReceive")}createPaginationObserver(){const{projectId:e}=Me.Hd.state;this.paginationObserver=new IntersectionObserver((t=>{let[n]=t;n?.isIntersecting&&!this.loading&&(Me.WC.fetchTransactions(this.address),Me.En.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:this.address,projectId:e,cursor:this.next}}))}),{}),this.setPaginationObserver()}setPaginationObserver(){this.paginationObserver?.disconnect();const e=this.shadowRoot?.querySelector(`#${rs}`);e&&this.paginationObserver?.observe(e)}getTransactionListItemProps(e){const t=St.rL.formatDate(e?.metadata?.minedAt),n=je.TransactionUtil.getTransactionDescriptions(e),r=e?.transfers,i=e?.transfers?.[0],s=Boolean(i)&&e?.transfers?.every((e=>Boolean(e.nft_info))),o=je.TransactionUtil.getTransactionImages(r);return{date:t,direction:i?.direction,descriptions:n,isAllNFT:s,images:o,status:e.metadata?.status,transfers:r,type:e.metadata?.operationType}}};is.styles=ts,ns([(0,De.MZ)()],is.prototype,"page",void 0),ns([(0,De.wk)()],is.prototype,"address",void 0),ns([(0,De.wk)()],is.prototype,"transactionsByYear",void 0),ns([(0,De.wk)()],is.prototype,"loading",void 0),ns([(0,De.wk)()],is.prototype,"empty",void 0),ns([(0,De.wk)()],is.prototype,"next",void 0),is=ns([(0,je.customElement)("w3m-activity-list")],is);const ss=Le.AH` 9185 :host { 9186 width: 100%; 9187 height: 100px; 9188 border-radius: var(--wui-border-radius-s); 9189 border: 1px solid var(--wui-color-gray-glass-002); 9190 background-color: var(--wui-color-gray-glass-002); 9191 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg); 9192 will-change: background-color; 9193 } 9194 9195 :host(:hover) { 9196 background-color: var(--wui-color-gray-glass-005); 9197 } 9198 9199 wui-flex { 9200 width: 100%; 9201 height: fit-content; 9202 } 9203 9204 wui-button { 9205 width: 100%; 9206 display: flex; 9207 justify-content: flex-end; 9208 } 9209 9210 wui-input-amount { 9211 mask-image: linear-gradient( 9212 270deg, 9213 transparent 0px, 9214 transparent 8px, 9215 black 24px, 9216 black 25px, 9217 black 32px, 9218 black 100% 9219 ); 9220 } 9221 9222 .totalValue { 9223 width: 100%; 9224 } 9225`;var os=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let as=class extends Le.WF{render(){return Le.qy` <wui-flex 9226 flexDirection="column" 9227 gap="4xs" 9228 .padding=${["xl","s","l","l"]} 9229 > 9230 <wui-flex alignItems="center"> 9231 <wui-input-amount 9232 @inputChange=${this.onInputChange.bind(this)} 9233 ?disabled=${!this.token&&!0} 9234 .value=${this.sendTokenAmount?String(this.sendTokenAmount):""} 9235 ></wui-input-amount> 9236 ${this.buttonTemplate()} 9237 </wui-flex> 9238 <wui-flex alignItems="center" justifyContent="space-between"> 9239 ${this.sendValueTemplate()} 9240 <wui-flex alignItems="center" gap="4xs" justifyContent="flex-end"> 9241 ${this.maxAmountTemplate()} ${this.actionTemplate()} 9242 </wui-flex> 9243 </wui-flex> 9244 </wui-flex>`}buttonTemplate(){return this.token?Le.qy`<wui-token-button 9245 text=${this.token.symbol} 9246 imageSrc=${this.token.iconUrl} 9247 @click=${this.handleSelectButtonClick.bind(this)} 9248 > 9249 </wui-token-button>
9249`:Le.qy`<wui-button 9250 size="md" 9251 variant="accent" 9252 @click=${this.handleSelectButtonClick.bind(this)} 9253 >Select token</wui-button 9254 >`}handleSelectButtonClick(){Me.IN.push("WalletSendSelectToken")}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const e=this.token.price*this.sendTokenAmount;return Le.qy`<wui-text class="totalValue" variant="small-400" color="fg-200" 9255 >${e?`$${je.UiHelperUtil.formatNumberToLocalString(e,2)}`:"Incorrect value"}</wui-text 9256 >`}return null}maxAmountTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?Le.qy` <wui-text variant="small-400" color="error-100"> 9257 ${je.UiHelperUtil.roundNumber(Number(this.token.quantity.numeric),6,5)} 9258 </wui-text>`:Le.qy` <wui-text variant="small-400" color="fg-200"> 9259 ${je.UiHelperUtil.roundNumber(Number(this.token.quantity.numeric),6,5)} 9260 </wui-text>`:null}actionTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?Le.qy`<wui-link @click=${this.onBuyClick.bind(this)}>Buy</wui-link>`:Le.qy`<wui-link @click=${this.onMaxClick.bind(this)}>Max</wui-link>`:null}onInputChange(e){Me.Rv.setTokenAmount(e.detail)}onMaxClick(){if(this.token&&this.gasPriceInUSD){const e=St.Se.bigNumber(this.gasPriceInUSD.toFixed(5)).dividedBy(this.token.price),t=void 0===this.token.address?St.Se.bigNumber(this.token.quantity.numeric).minus(e):St.Se.bigNumber(this.token.quantity.numeric);Me.Rv.setTokenAmount(Number(t.toFixed(20)))}}onBuyClick(){Me.IN.push("OnRampProviders")}};as.styles=ss,os([(0,De.MZ)({type:Object})],as.prototype,"token",void 0),os([(0,De.MZ)({type:Number})],as.prototype,"sendTokenAmount",void 0),os([(0,De.MZ)({type:Number})],as.prototype,"gasPriceInUSD",void 0),as=os([(0,je.customElement)("w3m-input-token")],as);const cs=Le.AH` 9261 :host { 9262 width: 100%; 9263 height: 100px; 9264 border-radius: var(--wui-border-radius-s); 9265 border: 1px solid var(--wui-color-gray-glass-002); 9266 background-color: var(--wui-color-gray-glass-002); 9267 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg); 9268 will-change: background-color; 9269 position: relative; 9270 } 9271 9272 :host(:hover) { 9273 background-color: var(--wui-color-gray-glass-005); 9274 } 9275 9276 wui-flex { 9277 width: 100%; 9278 height: fit-content; 9279 } 9280 9281 wui-button { 9282 display: ruby; 9283 color: var(--wui-color-fg-100); 9284 margin: 0 var(--wui-spacing-xs); 9285 } 9286 9287 .instruction { 9288 position: absolute; 9289 top: 50%; 9290 transform: translateY(-50%); 9291 } 9292 9293 .paste { 9294 display: inline-flex; 9295 } 9296 9297 textarea { 9298 background: transparent; 9299 width: 100%; 9300 font-family: var(--w3m-font-family); 9301 font-size: var(--wui-font-size-medium); 9302 font-style: normal; 9303 font-weight: var(--wui-font-weight-light); 9304 line-height: 130%; 9305 letter-spacing: var(--wui-letter-spacing-medium); 9306 color: var(--wui-color-fg-100); 9307 caret-color: var(--wui-color-accent-100); 9308 box-sizing: border-box; 9309 -webkit-appearance: none; 9310 -moz-appearance: textfield; 9311 padding: 0px; 9312 border: none; 9313 outline: none; 9314 appearance: none; 9315 resize: none; 9316 overflow: hidden; 9317 } 9318`;var ls=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let us=class extends Le.WF{constructor(){super(...arguments),this.inputElementRef=qt(),this.instructionElementRef=qt(),this.instructionHidden=Boolean(this.value),this.pasting=!1,this.onDebouncedSearch=Me.wE.debounce((async e=>{const t=await Me.x4.getEnsAddress(e);if(Me.Rv.setLoading(!1),t){Me.Rv.setReceiverProfileName(e),Me.Rv.setReceiverAddress(t);const n=await Me.x4.getEnsAvatar(e);n&&Me.Rv.setReceiverProfileImageUrl(n)}else Me.Rv.setReceiverAddress(e),Me.Rv.setReceiverProfileName(void 0),Me.Rv.setReceiverProfileImageUrl(void 0)}))}firstUpdated(){this.value&&(this.instructionHidden=!0),this.checkHidden()}render(){return Le.qy` <wui-flex 9319 @click=${this.onBoxClick.bind(this)} 9320 flexDirection="column" 9321 justifyContent="center" 9322 gap="4xs" 9323 .padding=${["2xl","l","xl","l"]} 9324 > 9325 <wui-text 9326 ${Kt(this.instructionElementRef)} 9327 class="instruction" 9328 color="fg-300" 9329 variant="medium-400" 9330 > 9331 Type or 9332 <wui-button 9333 class="paste" 9334 size="md" 9335 variant="neutral" 9336 iconLeft="copy" 9337 @click=${this.onPasteClick.bind(this)} 9338 > 9339 <wui-icon size="sm" color="inherit" slot="iconLeft" name="copy"></wui-icon> 9340 Paste 9341 </wui-button>
9341 9342 address 9343 </wui-text> 9344 <textarea 9345 spellcheck="false" 9346 ?disabled=${!this.instructionHidden} 9347 ${Kt(this.inputElementRef)} 9348 @input=${this.onInputChange.bind(this)} 9349 @blur=${this.onBlur.bind(this)} 9350 .value=${this.value??""} 9351 autocomplete="off" 9352 > 9353${this.value??""}</textarea 9354 > 9355 </wui-flex>`}async focusInput(){this.instructionElementRef.value&&(this.instructionHidden=!0,await this.toggleInstructionFocus(!1),this.instructionElementRef.value.style.pointerEvents="none",this.inputElementRef.value?.focus(),this.inputElementRef.value&&(this.inputElementRef.value.selectionStart=this.inputElementRef.value.selectionEnd=this.inputElementRef.value.value.length))}async focusInstruction(){this.instructionElementRef.value&&(this.instructionHidden=!1,await this.toggleInstructionFocus(!0),this.instructionElementRef.value.style.pointerEvents="auto",this.inputElementRef.value?.blur())}async toggleInstructionFocus(e){this.instructionElementRef.value&&await this.instructionElementRef.value.animate([{opacity:e?0:1},{opacity:e?1:0}],{duration:100,easing:"ease",fill:"forwards"}).finished}onBoxClick(){this.value||this.instructionHidden||this.focusInput()}onBlur(){this.value||!this.instructionHidden||this.pasting||this.focusInstruction()}checkHidden(){this.instructionHidden&&this.focusInput()}async onPasteClick(){this.pasting=!0;const e=await navigator.clipboard.readText();Me.Rv.setReceiverAddress(e),this.focusInput()}onInputChange(e){this.pasting=!1;const t=e.target;t.value&&!this.instructionHidden&&this.focusInput(),Me.Rv.setLoading(!0),this.onDebouncedSearch(t.value)}};us.styles=cs,ls([(0,De.MZ)()],us.prototype,"value",void 0),ls([(0,De.wk)()],us.prototype,"instructionHidden",void 0),ls([(0,De.wk)()],us.prototype,"pasting",void 0),us=ls([(0,je.customElement)("w3m-input-address")],us);const ds=Le.AH` 9356 :host { 9357 display: flex; 9358 width: auto; 9359 flex-direction: column; 9360 gap: var(--wui-border-radius-1xs); 9361 border-radius: var(--wui-border-radius-s); 9362 background: var(--wui-color-gray-glass-002); 9363 padding: var(--wui-spacing-s) var(--wui-spacing-1xs) var(--wui-spacing-1xs) 9364 var(--wui-spacing-1xs); 9365 } 9366 9367 wui-text { 9368 padding: 0 var(--wui-spacing-1xs); 9369 } 9370 9371 wui-flex { 9372 margin-top: var(--wui-spacing-1xs); 9373 } 9374 9375 .network { 9376 cursor: pointer; 9377 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg); 9378 will-change: background-color; 9379 } 9380 9381 .network:focus-visible { 9382 border: 1px solid var(--wui-color-accent-100); 9383 background-color: var(--wui-color-gray-glass-005); 9384 -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); 9385 -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); 9386 box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); 9387 } 9388 9389 .network:hover { 9390 background-color: var(--wui-color-gray-glass-005); 9391 } 9392 9393 .network:active { 9394 background-color: var(--wui-color-gray-glass-010); 9395 } 9396`;var hs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let ps=class extends Le.WF{render(){return Le.qy` <wui-text variant="small-400" color="fg-200">Details</wui-text> 9397 <wui-flex flexDirection="column" gap="xxs"> 9398 <wui-list-content textTitle="Network cost" textValue="$${Ue(je.UiHelperUtil.formatNumberToLocalString(this.networkFee,2))}"></wui-list-content></wui-list-content> 9399 <wui-list-content 9400 textTitle="Address" 9401 textValue=${je.UiHelperUtil.getTruncateString({string:this.receiverAddress??"",charsStart:4,charsEnd:4,truncate:"middle"})} 9402 > 9403 </wui-list-content> 9404 ${this.networkTemplate()} 9405 </wui-flex>`}networkTemplate(){return this.caipNetwork?.name?Le.qy` <wui-list-content 9406 @click=${()=>this.onNetworkClick(this.caipNetwork)} 9407 class="network" 9408 textTitle="Network" 9409 imageSrc=${Ue(Me.$m.getNetworkImage(this.caipNetwork))} 9410 ></wui-list-content>`:null}onNetworkClick(e){e&&Me.IN.push("Networks",{network:e})}};ps.styles=ds,hs([(0,De.MZ)()],ps.prototype,"receiverAddress",void 0),hs([(0,De.MZ)({type:Object})],ps.prototype,"caipNetwork",void 0),hs([(0,De.MZ)({type:Number})],ps.prototype,"networkFee",void 0),ps=hs([(0,je.customElement)("w3m-wallet-send-details")],ps);const fs=Le.AH` 9411 :host { 9412 pointer-events: none; 9413 } 9414 9415 :host > wui-flex { 9416 display: var(--w3m-tooltip-display); 9417 opacity: var(--w3m-tooltip-opacity); 9418 padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s); 9419 border-radius: var(--wui-border-radius-xxs); 9420 color: var(--wui-color-bg-100); 9421 position: fixed; 9422 top: var(--w3m-tooltip-top); 9423 left: var(--w3m-tooltip-left); 9424 transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px)); 9425 max-width: calc(var(--w3m-modal-width) - var(--wui-spacing-xl)); 9426 transition: opacity 0.2s var(--wui-ease-out-power-2); 9427 will-change: opacity; 9428 } 9429 9430 :host([data-variant='shade']) > wui-flex { 9431 background-color: var(--wui-color-bg-150); 9432 border: 1px solid var(--wui-color-gray-glass-005); 9433 } 9434 9435 :host([data-variant='shade']) > wui-flex > wui-text { 9436 color: var(--wui-color-fg-150); 9437 } 9438 9439 :host([data-variant='fill']) > wui-flex { 9440 background-color: var(--wui-color-fg-100); 9441 border: none; 9442 } 9443 9444 wui-icon { 9445 position: absolute; 9446 width: 12px !important; 9447 height: 4px !important; 9448 color: var(--wui-color-bg-150); 9449 } 9450 9451 wui-icon[data-placement='top'] { 9452 bottom: 0px; 9453 left: 50%; 9454 transform: translate(-50%, 95%); 9455 } 9456 9457 wui-icon[data-placement='bottom'] { 9458 top: 0; 9459 left: 50%; 9460 transform: translate(-50%, -95%) rotate(180deg); 9461 } 9462 9463 wui-icon[data-placement='right'] { 9464 top: 50%; 9465 left: 0; 9466 transform: translate(-65%, -50%) rotate(90deg); 9467 } 9468 9469 wui-icon[data-placement='left'] { 9470 top: 50%; 9471 right: 0%; 9472 transform: translate(65%, -50%) rotate(270deg); 9473 } 9474`;var ms=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let gs=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.open=Me.Ib.state.open,this.message=Me.Ib.state.message,this.triggerRect=Me.Ib.state.triggerRect,this.variant=Me.Ib.state.variant,this.unsubscribe.push(Me.Ib.subscribe((e=>{this.open=e.open,this.message=e.message,this.triggerRect=e.triggerRect,this.variant=e.variant})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){this.dataset.variant=this.variant;const e=this.triggerRect.top,t=this.triggerRect.left;return this.style.cssText=`\n --w3m-tooltip-top: ${e}px;\n --w3m-tooltip-left: ${t}px;\n --w3m-tooltip-parent-width: ${this.triggerRect.width/2}px;\n --w3m-tooltip-display: ${this.open?"flex":"none"};\n --w3m-tooltip-opacity: ${this.open?1:0};\n `,Le.qy`<wui-flex> 9475 <wui-icon data-placement="top" color="fg-100" size="inherit" name="cursor"></wui-icon> 9476 <wui-text color="inherit" variant="small-500">${this.message}</wui-text> 9477 </wui-flex>`}};gs.styles=[fs],ms([(0,De.wk)()],gs.prototype,"open",void 0),ms([(0,De.wk)()],gs.prototype,"message",void 0),ms([(0,De.wk)()],gs.prototype,"triggerRect",void 0),ms([(0,De.wk)()],gs.prototype,"variant",void 0),gs=ms([(0,je.customElement)("w3m-tooltip")],gs);const ys=Le.AH` 9478 :host { 9479 width: 100%; 9480 display: block; 9481 } 9482`;var vs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let ws=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.text="",this.open=Me.Ib.state.open,this.unsubscribe.push(Me.IN.subscribeKey("view",(()=>{Me.Ib.hide()})),Me.W3.subscribeKey("open",(e=>{e||Me.Ib.hide()})),Me.Ib.subscribeKey("open",(e=>{this.open=e})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),Me.Ib.hide()}render(){return Le.qy` 9483 <div 9484 @pointermove=${this.onMouseEnter.bind(this)} 9485 @pointerleave=${this.onMouseLeave.bind(this)} 9486 > 9487 ${this.renderChildren()} 9488 </div> 9489 `}renderChildren(){return Le.qy`<slot></slot> `}onMouseEnter(){const e=this.getBoundingClientRect();this.open||Me.Ib.showTooltip({message:this.text,triggerRect:{width:e.width,height:e.height,left:e.left,top:e.top},variant:"shade"})}onMouseLeave(e){this.contains(e.relatedTarget)||Me.Ib.hide()}};ws.styles=[ys],vs([(0,De.MZ)()],ws.prototype,"text",void 0),vs([(0,De.wk)()],ws.prototype,"open",void 0),ws=vs([(0,je.customElement)("w3m-tooltip-trigger")],ws);const bs=Le.AH` 9490 wui-flex:first-child { 9491 margin-top: var(--wui-spacing-s); 9492 } 9493 wui-separator { 9494 margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-m) 9495 calc(var(--wui-spacing-m) * -1); 9496 width: calc(100% + var(--wui-spacing-s) * 2); 9497 } 9498`;var xs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Es=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.connectors=Me.aK.state.connectors,this.connector=this.connectors.find((e=>"AUTH"===e.type)),this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>{this.connectors=e,this.connector=this.connectors.find((e=>"AUTH"===e.type))})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return this.connector?.socials?Le.qy` 9499 <wui-flex flexDirection="column" gap="xs" .padding=${["0","0","xs","0"]}> 9500 ${this.topViewTemplate()}${this.bottomViewTemplate()} 9501 </wui-flex> 9502 ${this.separatorTemplate()} 9503 `:null}topViewTemplate(){return this.connector?.socials?2===this.connector.socials.length?Le.qy` <wui-flex gap="xs"> 9504 ${this.connector.socials.slice(0,2).map((e=>Le.qy`<wui-logo-select 9505 data-testid=${`social-selector-${e}`} 9506 @click=${()=>{this.onSocialClick(e)}} 9507 logo=${e} 9508 ></wui-logo-select>`))} 9509 </wui-flex>`:Le.qy` <wui-list-social 9510 data-testid=${`social-selector-${this.connector?.socials?.[0]}`} 9511 @click=${()=>{this.onSocialClick(this.connector?.socials?.[0])}} 9512 logo=${Ue(this.connector.socials[0])} 9513 align="center" 9514 name=${`Continue with ${this.connector.socials[0]}`} 9515 ></wui-list-social>`:null}bottomViewTemplate(){return this.connector?.socials?this.connector?.socials.length<=2?null:this.connector?.socials.length>6?Le.qy`<wui-flex gap="xs"> 9516 ${this.connector.socials.slice(1,5).map((e=>Le.qy`<wui-logo-select 9517 data-testid=${`social-selector-${e}`} 9518 @click=${()=>{this.onSocialClick(e)}} 9519 logo=${e} 9520 ></wui-logo-select>`))} 9521 <wui-logo-select logo="more" @click=${this.onMoreSocialsClick.bind(this)}></wui-logo-select> 9522 </wui-flex>`:Le.qy`<wui-flex gap="xs"> 9523 ${this.connector.socials.slice(1,this.connector.socials.length).map((e=>Le.qy`<wui-logo-select 9524 data-testid=${`social-selector-${e}`} 9525 @click=${()=>{this.onSocialClick(e)}} 9526 logo=${e} 9527 ></wui-logo-select>`))} 9528 </wui-flex>`:null}separatorTemplate(){const e=this.connectors.find((e=>"WALLET_CONNECT"===e.type));return e?Le.qy`<wui-separator text="or"></wui-separator>`:null}onMoreSocialsClick(){Me.IN.push("ConnectSocials")}async onSocialClick(e){const t=Me.aK.getAuthConnector();try{if(t&&e){const{uri:n}=await t.provider.getSocialRedirectUri({provider:e});Me.Uj.setSocialProvider(e),setTimeout((()=>{const e=Me.wE.returnOpenHref(n,"popupWindow","width=600,height=800,scrollbars=yes");e&&Me.Uj.setSocialWindow(e)})),Me.IN.push("ConnectingSocial")}}catch(n){Me.Pt.showError("Something went wrong")}}};Es.styles=bs,xs([(0,De.wk)()],Es.prototype,"connectors",void 0),Es=xs([(0,je.customElement)("w3m-social-login-widget")],Es);const _s=Le.AH` 9529 :host { 9530 margin-top: var(--wui-spacing-3xs); 9531 } 9532 wui-separator { 9533 margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs) 9534 calc(var(--wui-spacing-m) * -1); 9535 width: calc(100% + var(--wui-spacing-s) * 2); 9536 } 9537`;var ks=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Cs=class extends Le.WF{render(){return Le.qy` 9538 <wui-flex flexDirection="column" gap="xs"> 9539 <w3m-connect-walletconnect-widget></w3m-connect-walletconnect-widget> 9540 <w3m-connect-recent-widget></w3m-connect-recent-widget> 9541 <w3m-connect-announced-widget></w3m-connect-announced-widget> 9542 <w3m-connect-injected-widget></w3m-connect-injected-widget> 9543 <w3m-connect-custom-widget></w3m-connect-custom-widget> 9544 <w3m-connect-recommended-widget></w3m-connect-recommended-widget> 9545 <w3m-connect-external-widget></w3m-connect-external-widget> 9546 <w3m-all-wallets-widget></w3m-all-wallets-widget> 9547 </wui-flex> 9548 `}};Cs.styles=_s,Cs=ks([(0,je.customElement)("w3m-wallet-login-list")],Cs);const As=Le.AH` 9549 :host { 9550 margin-top: var(--wui-spacing-3xs); 9551 } 9552 wui-separator { 9553 margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs) 9554 calc(var(--wui-spacing-m) * -1); 9555 width: calc(100% + var(--wui-spacing-s) * 2); 9556 } 9557`;var Ss=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Is=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.connectors=Me.aK.state.connectors,this.connector=this.connectors.find((e=>"AUTH"===e.type)),this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>{this.connectors=e,this.connector=this.connectors.find((e=>"AUTH"===e.type))})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return this.connector?.socials?Le.qy` <wui-flex flexDirection="column" gap="xs"> 9558 ${this.connector.socials.map((e=>Le.qy`<wui-list-social name=${e} logo=${e}></wui-list-social>`))} 9559 </wui-flex>`:null}};Is.styles=As,Ss([(0,De.wk)()],Is.prototype,"connectors",void 0),Is=Ss([(0,je.customElement)("w3m-social-login-list")],Is);var Ts=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ps=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.connectors=Me.aK.state.connectors,this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.connectors.filter((e=>"ANNOUNCED"===e.type));return e?.length?Le.qy` 9560 <wui-flex flexDirection="column" gap="xs"> 9561 ${e.map((e=>Le.qy` 9562 <wui-list-wallet 9563 imageSrc=${Ue(Me.$m.getConnectorImage(e))} 9564 name=${e.name??"Unknown"} 9565 @click=${()=>this.onConnector(e)} 9566 tagVariant="success" 9567 tagLabel="installed" 9568 data-testid=${`wallet-selector-${e.id}`} 9569 .installed=${!0} 9570 > 9571 </wui-list-wallet> 9572 `))} 9573 </wui-flex> 9574 `:(this.style.cssText="display: none",null)}
9574onConnector(e){"WALLET_CONNECT"===e.type?Me.wE.isMobile()?Me.IN.push("AllWallets"):Me.IN.push("ConnectingWalletConnect"):Me.IN.push("ConnectingExternal",{connector:e})}};Ts([(0,De.wk)()],Ps.prototype,"connectors",void 0),Ps=Ts([(0,je.customElement)("w3m-connect-announced-widget")],Ps);var Ns=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Rs=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.connectors=Me.aK.state.connectors,this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const{customWallets:e}=Me.Hd.state;if(!e?.length)return this.style.cssText="display: none",null;const t=this.filterOutDuplicateWallets(e);return Le.qy`<wui-flex flexDirection="column" gap="xs"> 9575 ${t.map((e=>Le.qy` 9576 <wui-list-wallet 9577 imageSrc=${Ue(Me.$m.getWalletImage(e))} 9578 name=${e.name??"Unknown"} 9579 @click=${()=>this.onConnectWallet(e)} 9580 data-testid=${`wallet-selector-${e.id}`} 9581 > 9582 </wui-list-wallet> 9583 `))} 9584 </wui-flex>`}filterOutDuplicateWallets(e){const t=Me.iT.getRecentWallets(),n=this.connectors.map((e=>e.info?.rdns)).filter(Boolean),r=t.map((e=>e.rdns)).filter(Boolean),i=n.concat(r);if(i.includes("io.metamask.mobile")&&Me.wE.isMobile()){const e=i.indexOf("io.metamask.mobile");i[e]="io.metamask"}return e.filter((e=>!i.includes(String(e?.rdns))))}onConnectWallet(e){Me.IN.push("ConnectingWalletConnect",{wallet:e})}};Ns([(0,De.wk)()],Rs.prototype,"connectors",void 0),Rs=Ns([(0,je.customElement)("w3m-connect-custom-widget")],Rs);var Os=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ms=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.connectors=Me.aK.state.connectors,this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.connectors.filter((e=>!["WALLET_CONNECT","INJECTED","ANNOUNCED","AUTH"].includes(e.type)));return e?.length?Le.qy` 9585 <wui-flex flexDirection="column" gap="xs"> 9586 ${e.map((e=>Le.qy` 9587 <wui-list-wallet 9588 imageSrc=${Ue(Me.$m.getConnectorImage(e))} 9589 name=${e.name??"Unknown"} 9590 @click=${()=>this.onConnector(e)} 9591 > 9592 </wui-list-wallet> 9593 `))} 9594 </wui-flex> 9595 `:(this.style.cssText="display: none",null)}onConnector(e){Me.IN.push("ConnectingExternal",{connector:e})}};Os([(0,De.wk)()],Ms.prototype,"connectors",void 0),Ms=Os([(0,je.customElement)("w3m-connect-external-widget")],Ms);var js=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ls=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.connectors=Me.aK.state.connectors,this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const{featured:e}=Me.Np.state;if(!e.length)return this.style.cssText="display: none",null;const t=this.filterOutDuplicateWallets(e);return Le.qy` 9596 <wui-flex flexDirection="column" gap="xs"> 9597 ${t.map((e=>Le.qy` 9598 <wui-list-wallet 9599 imageSrc=${Ue(Me.$m.getWalletImage(e))} 9600 name=${e.name??"Unknown"} 9601 @click=${()=>this.onConnectWallet(e)} 9602 > 9603 </wui-list-wallet> 9604 `))} 9605 </wui-flex> 9606 `}filterOutDuplicateWallets(e){const t=Me.iT.getRecentWallets(),n=this.connectors.map((e=>
9606e.info?.rdns)).filter(Boolean),r=t.map((e=>e.rdns)).filter(Boolean),i=n.concat(r);if(i.includes("io.metamask.mobile")&&Me.wE.isMobile()){const e=i.indexOf("io.metamask.mobile");i[e]="io.metamask"}return e.filter((e=>!i.includes(String(e?.rdns))))}onConnectWallet(e){Me.IN.push("ConnectingWalletConnect",{wallet:e})}};js([(0,De.wk)()],Ls.prototype,"connectors",void 0),Ls=js([(0,je.customElement)("w3m-connect-featured-widget")],Ls);var Ds=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Bs=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.connectors=Me.aK.state.connectors,this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.connectors.filter((e=>"INJECTED"===e.type));return!e?.length||1===e.length&&"Browser Wallet"===e[0]?.name&&!Me.wE.isMobile()?(this.style.cssText="display: none",null):Le.qy` 9607 <wui-flex flexDirection="column" gap="xs"> 9608 ${e.map((e=>(Me.wE.isMobile()||"Browser Wallet"!==e.name)&&Me.x4.checkInstalled()?Le.qy` 9609 <wui-list-wallet 9610 imageSrc=${Ue(Me.$m.getConnectorImage(e))} 9611 .installed=${!0} 9612 name=${e.name??"Unknown"} 9613 tagVariant="success" 9614 tagLabel="installed" 9615 data-testid=${`wallet-selector-${e.id}`} 9616 @click=${()=>this.onConnector(e)} 9617 > 9618 </wui-list-wallet> 9619 `:null))} 9620 </wui-flex> 9621 `}onConnector(e){Me.IN.push("ConnectingExternal",{connector:e})}};Ds([(0,De.wk)()],Bs.prototype,"connectors",void 0),Bs=Ds([(0,je.customElement)("w3m-connect-injected-widget")],Bs);var Us=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Fs=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.connectors=Me.aK.state.connectors,this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.connectors.find((e=>"coinbaseWalletSDK"===e.id));return e?Le.qy` 9622 <wui-flex flexDirection="column" gap="xs"> 9623 <wui-list-wallet 9624 imageSrc=${Ue(Me.$m.getConnectorImage(e))} 9625 .installed=${!0} 9626 name=${Ue(e.name)} 9627 data-testid=${`wallet-selector-${e.id}`} 9628 @click=${()=>this.onConnector(e)} 9629 > 9630 </wui-list-wallet> 9631 </wui-flex> 9632 `:(this.style.cssText="display: none",null)}onConnector(e){Me.IN.push("ConnectingExternal",{connector:e})}};Us([(0,De.wk)()],Fs.prototype,"connectors",void 0),Fs=Us([(0,je.customElement)("w3m-connect-coinbase-widget")],Fs);var $s=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let zs=class extends Le.WF{render(){const e=Me.iT.getRecentWallets();return e?.length?Le.qy` 9633 <wui-flex flexDirection="column" gap="xs"> 9634 ${e.map((e=>Le.qy` 9635 <wui-list-wallet 9636 imageSrc=${Ue(Me.$m.getWalletImage(e))} 9637 name=${e.name??"Unknown"} 9638 @click=${()=>this.onConnectWallet(e)} 9639 tagLabel="recent" 9640 tagVariant="shade" 9641 > 9642 </wui-list-wallet> 9643 `))} 9644 </wui-flex> 9645 `:(this.style.cssText="display: none",null)}onConnectWallet(e){Me.IN.push("ConnectingWalletConnect",{wallet:e})}};zs=$s([(0,je.customElement)("w3m-connect-recent-widget")],zs);var Hs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ws=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.connectors=Me.aK.state.connectors,this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.connectors.find((e=>"WALLET_CONNECT"===e.type));if(!e)return null;const{recommended:t}=Me.Np.state,{customWallets:n,featuredWalletIds:r}=Me.Hd.state,{connectors:i}=Me.aK.state,s=Me.iT.getRecentWallets(),o=i.filter((e=>"INJECTED"===e.type||"ANNOUNCED"===e.type)),a=o.filter((e=>"Browser Wallet"!==e.name));if(r||n||!t.length)return this.style.cssText="display: none",null;const c=a.length+s.length,l=Math.max(0,2-c),u=this.filterOutDuplicateWallets(t).slice(0,l);return u.length?Le.qy` 9646 <wui-flex flexDirection="column" gap="xs"> 9647 ${u.map((e=>Le.qy` 9648 <wui-list-wallet 9649 imageSrc=${Ue(Me.$m.getWalletImage(e))} 9650 name=${e?.name??"Unknown"} 9651 @click=${()=>this.onConnectWallet(e)} 9652 > 9653 </wui-list-wallet> 9654 `))} 9655 </wui-flex> 9656 `:(this.style.cssText="display: none",null)}filterOutDuplicateWallets(e){const t=Me.iT.getRecentWallets(),n=this.connectors.map((e=>
9656e.info?.rdns)).filter(Boolean),r=t.map((e=>e.rdns)).filter(Boolean),i=n.concat(r);if(i.includes("io.metamask.mobile")&&Me.wE.isMobile()){const e=i.indexOf("io.metamask.mobile");i[e]="io.metamask"}return e.filter((e=>!i.includes(String(e?.rdns))))}onConnectWallet(e){Me.IN.push("ConnectingWalletConnect",{wallet:e})}};Hs([(0,De.wk)()],Ws.prototype,"connectors",void 0),Ws=Hs([(0,je.customElement)("w3m-connect-recommended-widget")],Ws);var qs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Vs=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.connectors=Me.aK.state.connectors,this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){if(Me.wE.isMobile())return this.style.cssText="display: none",null;const e=this.connectors.find((e=>"WALLET_CONNECT"===e.type));return e?Le.qy` 9657 <wui-list-wallet 9658 imageSrc=${Ue(Me.$m.getConnectorImage(e))} 9659 name=${e.name??"Unknown"} 9660 @click=${()=>this.onConnector(e)} 9661 tagLabel="qr code" 9662 tagVariant="main" 9663 data-testid="wallet-selector-walletconnect" 9664 > 9665 </wui-list-wallet> 9666 `:(this.style.cssText="display: none",null)}onConnector(e){"WALLET_CONNECT"===e.type?Me.wE.isMobile()?Me.IN.push("AllWallets"):Me.IN.push("ConnectingWalletConnect"):Me.IN.push("ConnectingExternal",{connector:e})}};qs([(0,De.wk)()],Vs.prototype,"connectors",void 0),Vs=qs([(0,je.customElement)("w3m-connect-walletconnect-widget")],Vs);var Gs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ks=class extends Le.WF{constructor(){super(),this.unsubscribe=[],this.connectors=Me.aK.state.connectors,this.count=Me.Np.state.count,this.unsubscribe.push(Me.aK.subscribeKey("connectors",(e=>this.connectors=e)),Me.Np.subscribeKey("count",(e=>this.count=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.connectors.find((e=>"WALLET_CONNECT"===e.type)),{allWallets:t}=Me.Hd.state;if(!e||"HIDE"===t)return null;if("ONLY_MOBILE"===t&&!Me.wE.isMobile())return null;const n=Me.Np.state.featured.length,r=this.count+n,i=r<10?r:10*Math.floor(r/10),s=i<r?`${i}+`:`${i}`;return Le.qy` 9667 <wui-list-wallet 9668 name="All Wallets" 9669 walletIcon="allWallets" 9670 showAllWallets 9671 @click=${this.onAllWallets.bind(this)} 9672 tagLabel=${s} 9673 tagVariant="shade" 9674 data-testid="all-wallets" 9675 ></wui-list-wallet> 9676 `}onAllWallets(){Me.En.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),Me.IN.push("AllWallets")}};Gs([(0,De.wk)()],Ks.prototype,"connectors",void 0),Gs([(0,De.wk)()],Ks.prototype,"count",void 0),Ks=Gs([(0,je.customElement)("w3m-all-wallets-widget")],Ks);var Zs=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let Ys=class extends Le.WF{render(){const e=Me.iT.getConnectedConnector(),t=Me.aK.getAuthConnector();if(!t||"AUTH"!==e)return this.style.cssText="display: none",null;const n=t.provider.getEmail()??"",r=Me.iT.getConnectedSocialProvider(),i=Me.iT.getConnectedSocialUsername();return Le.qy` 9677 <wui-list-item 9678 variant="icon" 9679 iconVariant="overlay" 9680 icon=${r??"mail"} 9681 iconSize=${r?"xxl":"sm"} 9682 data-testid="w3m-account-email-update" 9683 ?chevron=${!r} 9684 @click=${()=>{this.onGoToUpdateEmail(n,r)}} 9685 > 9686 <wui-text variant="paragraph-500" color="fg-100">${i??n}</wui-text> 9687 </wui-list-item> 9688 `}onGoToUpdateEmail(e,t){t||Me.IN.push("UpdateEmailWallet",{email:e})}};Ys=Zs([(0,je.customElement)("w3m-account-auth-button")],Ys);let Qs=!1;class Js{constructor(e){this.initPromise=void 0,this.setIsConnected=e=>{Me.Uj.setIsConnected(e)},this.getIsConnectedState=()=>Me.Uj.state.isConnected,this.setCaipAddress=e=>{Me.Uj.setCaipAddress(e)},this.setBalance=(e,t)=>{Me.Uj.setBalance(e,t)},this.setProfileName=e=>{Me.Uj.setProfileName(e)},this.setProfileImage=e=>{Me.Uj.setProfileImage(e)},this.resetAccount=()=>{Me.Uj.resetAccount()},this.setCaipNetwork=e=>{Me.p_.setCaipNetwork(e)},this.getCaipNetwork=()=>Me.p_.state.caipNetwork,this.setRequestedCaipNetworks=e=>{Me.p_.setRequestedCaipNetworks(e)},this.getApprovedCaipNetworksData=()=>Me.p_.getApprovedCaipNetworksData(),this.resetNetwork=()=>{Me.p_.resetNetwork()},this.setConnectors=e=>{Me.aK.setConnectors(e)},this.addConnector=e=>{Me.aK.addConnector(e)},this.getConnectors=()=>Me.aK.getConnectors(),this.resetWcConnection=()=>{Me.x4.resetWcConnection()},this.fetchIdentity=e=>Me.TP.fetchIdentity(e),this.setAddressExplorerUrl=e=>{Me.Uj.setAddressExplorerUrl(e)},this.setSmartAccountDeployed=e=>{Me.Uj.setSmartAccountDeployed(e)},this.setConnectedWalletInfo=e=>{Me.Uj.setConnectedWalletInfo(e)},this.setSmartAccountEnabledNetworks=e=>{Me.p_.setSmartAccountEnabledNetworks(e)},this.setPreferredAccountType=e=>{Me.Uj.setPreferredAccountType(e)},this.getWalletConnectName=e=>Me.f.getNamesForAddress(e),this.resolveWalletConnectName=async e=>{const t=e.replace(St.oU.WC_NAME_SUFFIX,""),n=await Me.f.resolveName(t),r=Object.values(n?.addresses)||[];return r[0]?.address||!1},this.initControllers(e),this.initOrContinue()}async open(e){await this.initOrContinue(),Me.W3.open(e)}async close(){await this.initOrContinue(),Me.W3.close()}setLoading(e){Me.W3.setLoading(e)}getThemeMode(){return Me.Wn.state.themeMode}getThemeVariables(){return Me.Wn.state.themeVariables}setThemeMode(e){Me.Wn.setThemeMode(e),(0,je.setColorTheme)(Me.Wn.state.themeMode)}setThemeVariables(e){Me.Wn.setThemeVariables(e),(0,je.setThemeVariables)(Me.Wn.state.themeVariables)}subscribeTheme(e){return Me.Wn.subscribe(e)}getWalletInfo(){return Me.Uj.state.connectedWalletInfo}subscribeWalletInfo(e){return Me.Uj.subscribeKey("connectedWalletInfo",e)}
9688getState(){return Me.z3.state}subscribeState(e){return Me.z3.subscribe(e)}showErrorMessage(e){Me.Pt.showError(e)}showSuccessMessage(e){Me.Pt.showSuccess(e)}getEvent(){return{...Me.En.state}}subscribeEvents(e){return Me.En.subscribe(e)}replace(e){Me.IN.replace(e)}redirect(e){Me.IN.push(e)}popTransactionStack(e){Me.IN.popTransactionStack(e)}isOpen(){return Me.W3.state.open}isTransactionStackEmpty(){return 0===Me.IN.state.transactionStack.length}isTransactionShouldReplaceView(){return Me.IN.state.transactionStack[Me.IN.state.transactionStack.length-1]?.replace}async initControllers(e){if(Me.p_.setClient(e.networkControllerClient),Me.p_.setDefaultCaipNetwork(e.defaultChain),Me.Hd.setProjectId(e.projectId),Me.Hd.setAllWallets(e.allWallets),Me.Hd.setIncludeWalletIds(e.includeWalletIds),Me.Hd.setExcludeWalletIds(e.excludeWalletIds),Me.Hd.setFeaturedWalletIds(e.featuredWalletIds),Me.Hd.setTokens(e.tokens),Me.Hd.setTermsConditionsUrl(e.termsConditionsUrl),Me.Hd.setPrivacyPolicyUrl(e.privacyPolicyUrl),Me.Hd.setCustomWallets(e.customWallets),Me.Hd.setEnableAnalytics(e.enableAnalytics),Me.Hd.setSdkVersion(e._sdkVersion),e.metadata&&Me.Hd.setMetadata(e.metadata),e.themeMode&&Me.Wn.setThemeMode(e.themeMode),e.themeVariables&&Me.Wn.setThemeVariables(e.themeVariables),e.enableOnramp&&Me.Hd.setOnrampEnabled(Boolean(e.enableO
9688nramp)),e.enableWalletFeatures&&Me.Hd.setWalletFeaturesEnabled(Boolean(e.enableWalletFeatures)),e.allowUnsupportedChain&&Me.p_.setAllowUnsupportedChain(e.allowUnsupportedChain),e.siweControllerClient){const{SIWEController:t}=await n.e(851).then(n.bind(n,4851));t.setSIWEClient(e.siweControllerClient)}Me.x4.setClient(e.connectionControllerClient)}async initOrContinue(){return this.initPromise||Qs||!Me.wE.isClient()||(Qs=!0,this.initPromise=new Promise((async e=>{await Promise.all([Promise.resolve().then(n.bind(n,4263)),Promise.resolve().then(n.bind(n,8224))]);const t=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",t),e()}))),this.initPromise}}const Xs="walletConnect",eo="injected",to="coinbaseWallet",no="coinbaseWalletSDK",ro="safe",io="ledger",so="eip6963",oo="w3mAuth",ao="eip155",co="wallet_addEthereumChain",lo="eip6963:announceProvider",uo="eip6963:requestProvider",ho="4.2.3",po={ConnectorExplorerIds:{[to]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[ro]:"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f",[io]:"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927"},EIP155NetworkImageIds:{1:"692ed6ba-e569-459a-556a-776476829e00",42161:"3bff954d-5cb0-47a0-9a23-d20192e74600",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00",7777777:"845c60df-d429-4991-e687-91ae45791600",42220:"ab781bbc-ccc6-418d-d32d-789b15da1f00",8453:"7289c336-3981-4081-c5f4-efc26ac64a00",1313161554:"3ff73439-a619-4894-9262-4470c773a100",2020:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",2021:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"a1b58899-f671-4276-6a5e-56ca5bd59700","4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":"a1b58899-f671-4276-6a5e-56ca5bd59700",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:"a1b58899-f671-4276-6a5e-56ca5bd59700"},ConnectorImageIds:{[to]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[no]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[ro]:"461db637-8616-43ce-035a-d89b8a1d5800",[io]:"54a1aa77-d202-4f8d-0fb2-5d2bb6db0300",[Xs]:"ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",[eo]:"07ba87ed-43aa-4adf-4540-9e6a2b9cae00"},ConnectorNamesMap:{[eo]:"Browser Wallet",[Xs]:"WalletConnect",[to]:"Coinbase",[no]:"Coinbase",[io]:"Ledger",[ro]:"Safe"},ConnectorTypesMap:{[eo]:"INJECTED",[Xs]:"WALLET_CONNECT",[so]:"ANNOUNCED",[oo]:"AUTH"},WalletConnectRpcChainIds:[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,100,8453,84531,7777777,999,324,280]},fo={getCaipTokens(e){if(!e)return;const t={};return Object.entries(e).forEach((e=>{let[n,r]=e;t[`${ao}:${n}`]=r})),t}};var mo=n(8981),go=n.n(mo),yo=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},vo=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},wo=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},bo=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},xo=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},Eo=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},_o=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,ko=[["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|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;
9688\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],Co=[["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/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["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 Ao(e){return e?Io(e):"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product?new Eo:"undefined"!==typeof navigator?Io(navigator.userAgent):"undefined"!==typeof process&&process.version?new wo(process.version.slice(1)):null}function So(e){return""!==e&&ko.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var s=i.exec(e);return!!s&&[r,s]}),!1)}function Io(e){var t=So(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new xo;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<3&&(i=yo(yo([],i,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(3-i.length),!0)):i=[];var s=i.join("."),o=function(e){for(var t=0,n=Co.length;t<n;t++){var r=Co[t],i=r[0];if(r[1].exec(e))return i}return null}(e),a=_o.exec(e);return a&&a[1]?new bo(n,s,o,a[1]):new vo(n,s,o)}var To=n(878),Po=n(2146),No=n(5509),Ro=n(4465),Oo=n(462),Mo=n(8438),jo=n(6022),Lo=n(8166),Do=n(4520),Bo=n(19),Uo=n(3586);const Fo=":";function $o(e){const[t,n]=e.split(Fo);return{namespace:t,reference:n}}function zo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[];return Object.keys(e).forEach((r=>{if(t.length&&!t.includes(r))return;const i=e[r];n.push(...i.accounts)})),n}function Ho(e,t){return e.includes(":")?[e]:t.chains||[]}var Wo=Object.defineProperty,qo=Object.getOwnPropertySymbols,Vo=Object.prototype.hasOwnProperty,Go=Object.prototype.propertyIsEnumerable,Ko=(e,t,n)=>t in e?Wo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zo=(e,t)=>{for(var n in t||(t={}))Vo.call(t,n)&&Ko(e,n,t[n]);if(qo)for(var n of qo(t))Go.call(t,n)&&Ko(e,n,t[n]);return e};const Yo="react-native",Qo="node",Jo="browser",Xo="unknown",ea="js";function ta(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function na(){return!(0,Po.getDocument)()&&!!(0,Po.getNavigator)()&&"ReactNative"===navigator.product}function ra(){return!ta()&&!!(0,Po.getNavigator)()&&!!(0,Po.getDocument)()}function ia(){return na()?Yo:ta()?Qo:ra()?Jo:Xo}function sa(e,t,r){const i=function(){if(ia()===Yo&&typeof n.g<"u"&&typeof(null==n.g?void 0:n.g.Platform)<"u"){const{OS:e,Version:t}=n.g.Platform;return[e,t].join("-")}const e=Ao();if(null===e)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}(),s=function(){var e;const t=ia();return t===Jo?[t,(null==(e=(0,Po.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[ea,r].join("-"),i,s].join("/")}function oa(e){let{protocol:t,version:n,relayUrl:r,sdkVersion:i,auth:s,projectId:o,useOnCloseEvent:a,bundleId:c}=e;const l=r.split("?"),u={auth:s,ua:sa(t,n,i),projectId:o,useOnCloseEvent:a||void 0,origin:c||void 0},d=function(e,t){let n=Ro.parse(e);return n=Zo(Zo({},n),t),Ro.stringify(n)}(l[1]||"",u);return l[0]+"?"+d}function aa(e,t){return e.filter((e=>t.includes(e))).length===e.length}function ca(e){return Object.fromEntries(e.entries())}function la(e){return new Map(Object.entries(e))}function ua(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:To.FIVE_MINUTES,t=arguments.length>1?arguments[1]:void 0;const n=(0,To.toMiliseconds)(e||To.FIVE_MINUTES);let r,i,s;return{resolve:e=>{s&&r&&(clearTimeout(s),r(e))},reject:e=>{s&&i&&(clearTimeout(s),i(e))},done:()=>new Promise(((e,o)=>{s=setTimeout((()=>{o(new Error(t))}),n),r=e,i=o}))}}
9688function da(e,t,n){return new Promise((async(r,i)=>{const s=setTimeout((()=>i(new Error(n))),t);try{r(await e)}catch(o){i(o)}clearTimeout(s)}))}function ha(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function pa(e){const[t,n]=e.split(":"),r={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof n)r.topic=n;else{if("id"!==t||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${n}`);r.id=Number(n)}return r}function fa(e,t){return(0,To.fromMiliseconds)((t||Date.now())+(0,To.toMiliseconds)(e))}function ma(e){return Date.now()>=(0,To.toMiliseconds)(e)}function ga(e,t){return`${e}${t?`:${t}`:""}`}function ya(){return[...new Set([...arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]])]}var va=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof n.g<"u"?n.g:typeof self<"u"?self:{};var wa={exports:{}};!function(e){!function(){var t="input is invalid type",n="object"==typeof window,r=n?window:{};
vendor: 4,445 bytes, line 9688
9688r.JS_SHA3_NO_WINDOW&&(n=!1);var i=!n&&"object"==typeof self;!r.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?r=va:i&&(r=self);var s=!r.JS_SHA3_NO_COMMON_JS&&e.exports,o=!r.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",a="0123456789abcdef".split(""),c=[4,1024,262144,67108864],l=[0,8,16,24],u=[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],d=[224,256,384,512],h=[128,256],p=["hex","buffer","arrayBuffer","array","digest"],f={128:168,256:136};(r.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),o&&(r.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var m=function(e,t,n){return function(r){return new P(e,t,e).update(r)[n]()}},g=function(e,t,n){return function(r,i){return new P(e,t,i).update(r)[n]()}},y=function(e,t,n){return function(t,r,i,s){return E["cshake"+e].update(t,r,i,s)[n]()}},v=function(e,t,n){return function(t,r,i,s){return E["kmac"+e].update(t,r,i,s)[n]()}},w=function(e,t,n,r){for(var i=0;i<p.length;++i){var s=p[i];e[s]=t(n,r,s)}return e},b=function(e,t){var n=m(e,t,"hex");return n.create=function(){return new P(e,t,e)},n.update=function(e){return n.create().update(e)},w(n,m,e,t)},x=[{name:"keccak",padding:[1,256,65536,16777216],bits:d,createMethod:b},{name:"sha3",padding:[6,1536,393216,100663296],bits:d,createMethod:b},{name:"shake",padding:[31,7936,2031616,520093696],bits:h,createMethod:function(e,t){var n=g(e,t,"hex");return n.create=function(n){return new P(e,t,n)},n.update=function(e,t){return n.create(t).update(e)},w(n,g,e,t)}},{name:"cshake",padding:c,bits:h,createMethod:function(e,t){var n=f[e],r=y(e,0,"hex");return r.create=function(r,i,s){return i||s?new P(e,t,r).bytepad([i,s],n):E["shake"+e].create(r)},r.update=function(e,t,n,i){return r.create(t,n,i).update(e)},w(r,y,e,t)}},{name:"kmac",padding:c,bits:h,createMethod:function(e,t){var n=f[e],r=v(e,0,"hex");return r.create=function(r,i,s){return new N(e,t,i).bytepad(["KMAC",s],n).bytepad([r],n)},r.update=function(e,t,n,i){return r.create(e,n,i).update(t)},w(r,v,e,t)}}],E={},_=[],k=0;k<x.length;++k)for(var C=x[k],A=C.bits,S=0;S<A.length;++S){var I=C.name+"_"+A[S];if(_.push(I),E[I]=C.createMethod(A[S],C.padding),"sha3"!==C.name){var T=C.name+A[S];_.push(T),E[T]=E[I]}}function P(e,t,n){this.blocks=[],this.s=[],this.padding=t,this.outputBits=n,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<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 N(e,t,n){P.call(this,e,t,n)}P.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var n,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(t);if(null===e)throw new Error(t);if(o&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!o||!ArrayBuffer.isView(e)))throw new Error(t);n=!0}for(var i,s,a=this.blocks,c=this.byteCount,u=e.length,d=this.blockCount,h=0,p=this.s;h<u;){if(this.reset)for(this.reset=!1,a[0]=this.block,i=1;i<d+1;++i)a[i]=0;if(n)for(i=this.start;h<u&&i<c;++h)a[i>>2]|=e[h]<<l[3&i++];else for(i=this.start;h<u&&i<c;++h)(s=e.charCodeAt(h))<128?a[i>>2]|=s<<l[3&i++]:s<2048?(a[i>>2]|=(192|s>>6)<<l[3&i++],a[i>>2]|=(128|63&s)<<l[3&i++]):s<55296||s>=57344?(a[i>>2]|=(224|s>>12)<<l[3&i++],a[i>>2]|=(128|s>>6&63)<<l[3&i++],a[i>>2]|=(128|63&s)<<l[3&i++]):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++h)),a[i>>2]|=(240|s>>18)<<l[3&i++],a[i>>2]|=(128|s>>12&63)<<l[3&i++],a[i>>2]|=(128|s>>6&63)<<l[3&i++],a[i>>2]|=(128|63&s)<<l[3&i++]);if(this.lastByteIndex=i,i>=c){for(this.start=i-c,this.block=a[d],i=0;i<d;++i)p[i]^=a[i];R(p),this.reset=!0}else this.start=i}return this},P.prototype.encode=function(e,t){var n=255&e,r=1,i=[n];for(n=255&(e>>=8);n>0;)i.unshift(n),n=255&(e>>=8),++r;return t?i.push(r):i.unshift(r),this.update(i),i.length},P.prototype.encodeString=function(e){var n,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(t);if(null===e)throw new Error(t);
vendor: 3,882 bytes, line 9688
9688if(o&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!o||!ArrayBuffer.isView(e)))throw new Error(t);n=!0}var i=0,s=e.length;if(n)i=s;else for(var a=0;a<e.length;++a){var c=e.charCodeAt(a);c<128?i+=1:c<2048?i+=2:c<55296||c>=57344?i+=3:(c=65536+((1023&c)<<10|1023&e.charCodeAt(++a)),i+=4)}return i+=this.encode(8*i),this.update(e),i},P.prototype.bytepad=function(e,t){for(var n=this.encode(t),r=0;r<e.length;++r)n+=this.encodeString(e[r]);var i=t-n%t,s=[];return s.length=i,this.update(s),this},P.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,n=this.blockCount,r=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t<n+1;++t)e[t]=0;for(e[n-1]|=2147483648,t=0;t<n;++t)r[t]^=e[t];R(r)}},P.prototype.toString=P.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,s=0,o=0,c="";o<r;){for(s=0;s<t&&o<r;++s,++o)e=n[s],c+=a[e>>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];o%t===0&&(R(n),s=0)}return i&&(e=n[s],c+=a[e>>4&15]+a[15&e],i>1&&(c+=a[e>>12&15]+a[e>>8&15]),i>2&&(c+=a[e>>20&15]+a[e>>16&15])),c},P.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,s=0,o=0,a=this.outputBits>>3;e=i?new ArrayBuffer(r+1<<2):new ArrayBuffer(a);for(var c=new Uint32Array(e);o<r;){for(s=0;s<t&&o<r;++s,++o)c[o]=n[s];o%t===0&&R(n)}return i&&(c[s]=n[s],e=e.slice(0,a)),e},P.prototype.buffer=P.prototype.arrayBuffer,P.prototype.digest=P.prototype.array=function(){this.finalize();for(var e,t,n=this.blockCount,r=this.s,i=this.outputBlocks,s=this.extraBytes,o=0,a=0,c=[];a<i;){for(o=0;o<n&&a<i;++o,++a)e=a<<2,t=r[o],c[e]=255&t,c[e+1]=t>>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;a%n===0&&R(r)}return s&&(e=a<<2,t=r[o],c[e]=255&t,s>1&&(c[e+1]=t>>8&255),s>2&&(c[e+2]=t>>16&255)),c},N.prototype=new P,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),P.prototype.finalize.call(this)};var R=function(e){var t,n,r,i,s,o,a,c,l,d,h,p,f,m,g,y,v,w,b,x,E,_,k,C,A,S,I,T,P,N,R,O,M,j,L,D,B,U,F,$,z,H,W,q,V,G,K,Z,Y,Q,J,X,ee,te,ne,re,ie,se,oe,ae,ce,le,ue;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],s=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|a>>>31),n=(f=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|o>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(c<<1|l>>>31),n=s^(l<<1|c>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=o^(d<<1|h>>>31),n=a^(h<<1|d>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=c^(p<<1|f>>>31),n=l^(f<<1|p>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=d^(i<<1|s>>>31),n=h^(s<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,m=e[0],g=e[1],G=e[11]<<4|e[10]>>>28,K=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,P=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,W=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,L=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,N=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ue=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,D=e[14]<<6|e[15]>>>26,B=e[15]<<6|e[14]>>>26,w=e[25]<<11|e[24]>>>21,b=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,O=e[45]<<29|e[44]>>>3,M=e[44]<<29|e[45]>>>3,C=e[6]<<28|e[7]>>>4,A=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>
96889,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,x=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,S=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,se=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,$=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=m^~y&w,e[1]=g^~v&b,e[10]=C^~S&T,e[11]=A^~I&P,e[20]=j^~D&U,e[21]=L^~B&F,e[30]=q^~G&Z,e[31]=V^~K&Y,e[40]=te^~re&se,e[41]=ne^~ie&oe,e[2]=y^~w&x,e[3]=v^~b&E,e[12]=S^~T&N,e[13]=I^~P&R,e[22]=D^~U&$,e[23]=B^~F&z,e[32]=G^~Z&Q,e[33]=K^~Y&J,e[42]=re^~se&ae,e[43]=ie^~oe&ce,e[4]=w^~x&_,e[5]=b^~E&k,e[14]=T^~N&O,e[15]=P^~R&M,e[24]=U^~$&H,e[25]=F^~z&W,e[34]=Z^~Q&X,e[35]=Y^~J&ee,e[44]=se^~ae&le,e[45]=oe^~ce&ue,e[6]=x^~_&m,e[7]=E^~k&g,e[16]=N^~O&C,e[17]=R^~M&A,e[26]=$^~H&j,e[27]=z^~W&L,e[36]=Q^~X&q,e[37]=J^~ee&V,e[46]=ae^~le&te,e[47]=ce^~ue&ne,e[8]=_^~m&y,e[9]=k^~g&v,e[18]=O^~C&S,e[19]=M^~A&I,e[28]=H^~j&D,e[29]=W^~L&B,e[38]=X^~q&G,e[39]=ee^~V&K,e[48]=le^~te&re,e[49]=ue^~ne&ie,e[0]^=u[r],e[1]^=u[r+1]};if(s)e.exports=E;else for(k=0;k<_.length;++k)r[_[k]]=E[_[k]]}()}(wa);var ba=wa.exports;let xa=!1,Ea=!1;const _a={debug:1,default:2,info:2,warning:3,error:4,off:5};let ka=_a.default,Ca=null;const Aa=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch{e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var Sa,Ia;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(Sa||(Sa={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(Ia||(Ia={}));const Ta="0123456789abcdef";class Pa{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();null==_a[n]&&this.throwArgumentError("invalid log level name","logLevel",e),!(ka>_a[n])&&console.log.apply(console,t)}debug(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(Pa.levels.DEBUG,t)}info(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(Pa.levels.INFO,t)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(Pa.levels.WARNING,t)}makeError(e,t,n){if(Ea)return this.makeError("censored error",t,{});t||(t=Pa.errors.UNKNOWN_ERROR),n||(n={});const r=[];Object.keys(n).forEach((e=>{const t=n[e];try{if(t instanceof Uint8Array){let n="";for(let e=0;e<t.length;e++)n+=Ta[t[e]>>4],n+=Ta[15&t[e]];r.push(e+"=Uint8Array(0x"+n+")")}else r.push(e+"="+JSON.stringify(t))}catch{r.push(e+"="+JSON.stringify(n[e].toString()))}})),r.push(`code=${t}`),r.push(`version=${this.version}`);const i=e;let s="";switch(t){case Ia.NUMERIC_FAULT:{s="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":s+="-"+t;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case Ia.CALL_EXCEPTION:case Ia.INSUFFICIENT_FUNDS:case Ia.MISSING_NEW:case Ia.NONCE_EXPIRED:case Ia.REPLACEMENT_UNDERPRICED:case Ia.TRANSACTION_REPLACED:case Ia.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),r.length&&(e+=" ("+r.join(", ")+")");const o=new Error(e);
9688return o.reason=i,o.code=t,Object.keys(n).forEach((function(e){o[e]=n[e]})),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,Pa.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(e){Aa&&this.throwError("platform missing String.prototype.normalize",Pa.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Aa})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,Pa.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,Pa.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n=n?": "+n:"",e<t&&this.throwError("missing argument"+n,Pa.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+n,Pa.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",Pa.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",Pa.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",Pa.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Ca||(Ca=new Pa("logger/5.7.0")),Ca}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",Pa.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}
vendor: 5,697 bytes, line 9688
9688),xa){if(!e)return;this.globalLogger().throwError("error censorship permanent",Pa.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Ea=!!e,xa=!!t}static setLogLevel(e){const t=_a[e.toLowerCase()];null!=t?ka=t:Pa.globalLogger().warn("invalid log level - "+e)}static from(e){return new Pa(e)}}Pa.errors=Ia,Pa.levels=Sa;const Na=new Pa("bytes/5.7.0");function Ra(e){return!!e.toHexString}function Oa(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return Oa(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function Ma(e){return"number"==typeof e&&e==e&&e%1===0}function ja(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e||!Ma(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){const n=e[t];if(!Ma(n)||n<0||n>=256)return!1}return!0}function La(e,t){if(t||(t={}),"number"==typeof e){Na.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),Oa(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Ra(e)&&(e=e.toHexString()),Da(e)){let n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":Na.throwArgumentError("hex data is odd-length","value",e));const r=[];for(let e=0;e<n.length;e+=2)r.push(parseInt(n.substring(e,e+2),16));return Oa(new Uint8Array(r))}return ja(e)?Oa(new Uint8Array(e)):Na.throwArgumentError("invalid arrayify value","value",e)}function Da(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}const Ba="0123456789abcdef";function Ua(e,t){if(t||(t={}),"number"==typeof e){Na.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=Ba[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Ra(e))return e.toHexString();if(Da(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":Na.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(ja(e)){let t="0x";for(let n=0;n<e.length;n++){let r=e[n];t+=Ba[(240&r)>>4]+Ba[15&r]}return t}return Na.throwArgumentError("invalid hexlify value","value",e)}function Fa(e,t,n){return"string"!=typeof e?e=Ua(e):(!Da(e)||e.length%2)&&Na.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=n?"0x"+e.substring(t,2+2*n):"0x"+e.substring(t)}function $a(e,t){for("string"!=typeof e?e=Ua(e):Da(e)||Na.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&Na.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function za(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(function(e){return Da(e)&&!(e.length%2)||ja(e)}(e)){let n=La(e);64===n.length?(t.v=27+(n[32]>>7),n[32]&=127,t.r=Ua(n.slice(0,32)),t.s=Ua(n.slice(32,64))):65===n.length?(t.r=Ua(n.slice(0,32)),t.s=Ua(n.slice(32,64)),t.v=n[64]):Na.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:Na.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(n[32]|=128),t._vs=Ua(n.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const n=function(e,t){(e=La(e)).length>t&&Na.throwArgumentError("value out of range","value",arguments[0]);const n=new Uint8Array(t);return n.set(e,t-e.length),Oa(n)}(La(t._vs),32);t._vs=Ua(n);const r=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=r:t.recoveryParam!==r&&Na.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;const i=Ua(n);null==t.s?t.s=i:t.s!==i&&Na.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?Na.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const n=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==n&&Na.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&Da(t.r)?t.r=$a(t.r,32):Na.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&Da(t.s)?t.s=$a(t.s,32):Na.throwArgumentError("signature missing or invalid s","signature",e);const n=La(t.s);n[0]>=128&&Na.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(n[0]|=128);const r=Ua(n);t._vs&&(Da(t._vs)||Na.throwArgumentError("signature invalid _vs","signature",e),t._vs=$a(t._vs,32)),null==t._vs?t._vs=r:t._vs!==r&&Na.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function Ha(e){return"0x"+ba.keccak_256(La(e))}var Wa={exports:{}},qa=function(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}(Object.freeze({__proto__:null,default:{}}));!function(e){!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;
vendor: 4,442 bytes, line 9688
9688"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{s=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:qa.Buffer}catch{}function o(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function a(e,t,n){var r=o(e,n);return n-1>=t&&(r|=o(e,n-1)<<4),r}function c(e,t,r,i){for(var s=0,o=0,a=Math.min(e.length,r),c=t;c<a;c++){var l=e.charCodeAt(c)-48;s*=i,o=l>=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&o<i,"Invalid character"),s+=o}return s}function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===r)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===r)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,o=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=a(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(r=(e.length-t)%2===0?t+1:t;r<e.length;r+=2)i=a(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,o=s%r,a=Math.min(s,s-o)+n,l=0,u=n;u<a;u+=r)l=c(e,u,u+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var d=1;for(l=c(e,u,e.length,t),u=0;u<o;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype._move=function(e){l(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)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},typeof Symbol<"u"&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch{i.prototype.inspect=u}else i.prototype.inspect=u;function u(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","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"],h=[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],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16
vendor: 6,069 bytes, line 9688
9688777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],c=(16777215&(a<<i|s)).toString(16);s=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,o--),r=0!==s||o!==this.length-1?d[6-c.length]+c+r:c+r}for(0!==s&&(r=s.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],u=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(u).toString(e);r=(f=f.idivn(u)).isZero()?m+r:d[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},s&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,c=o/67108864|0;n.words[0]=a;for(var l=1;l<r;l++){for(var u=c>>>26,d=67108863&c,h=Math.min(l,t.length-1),p=Math.max(0,l-e.length+1);p<=h;p++){var f=l-p|0;u+=(o=(i=0|e.words[f])*(s=0|t.words[p])+d)/67108864|0,d=67108863&o}n.words[l]=0|d,c=0|u}return 0!==c?n.words[l]=0|c:n.length--,n._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),s=r||Math.max(1,i);n(i<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,i),o},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|r;e[n++]=255&o,n<e.length&&(e[n++]=o>>8&255),n<e.length&&(e[n++]=o>>16&255),6===s?(n<e.length&&(e[n++]=o>>24&255),r=0,s=0):(r=o>>>24,s+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|r;e[n--]=255&o,n>=0&&(e[n--]=o>>8&255),n>=0&&(e[n--]=o>>16&255),6===s?(n>=0&&(e[n--]=o>>24&255),r=0,s=0):(r=o>>>24,s+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).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(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>
vendor: 1,385 bytes, line 9688
9688>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,o=0;o<r.length;o++)s=(t=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<n.length;o++)s=(t=(0|n.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,i,s,o=e.words,a=t.words,c=n.words,l=0,u=0|o[0],d=8191&u,h=u>>>13,p=0|o[1],f=8191&p,m=p>>>13,g=0|o[2],y=8191&g,v=g>>>13,w=0|o[3],b=8191&w,x=w>
vendor: 5,498 bytes, line 9688
9688>>13,E=0|o[4],_=8191&E,k=E>>>13,C=0|o[5],A=8191&C,S=C>>>13,I=0|o[6],T=8191&I,P=I>>>13,N=0|o[7],R=8191&N,O=N>>>13,M=0|o[8],j=8191&M,L=M>>>13,D=0|o[9],B=8191&D,U=D>>>13,F=0|a[0],$=8191&F,z=F>>>13,H=0|a[1],W=8191&H,q=H>>>13,V=0|a[2],G=8191&V,K=V>>>13,Z=0|a[3],Y=8191&Z,Q=Z>>>13,J=0|a[4],X=8191&J,ee=J>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],ce=8191&ae,le=ae>>>13,ue=0|a[8],de=8191&ue,he=ue>>>13,pe=0|a[9],fe=8191&pe,me=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(l+(r=Math.imul(d,$))|0)+((8191&(i=(i=Math.imul(d,z))+Math.imul(h,$)|0))<<13)|0;l=((s=Math.imul(h,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(f,$),i=(i=Math.imul(f,z))+Math.imul(m,$)|0,s=Math.imul(m,z);var ye=(l+(r=r+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,q)|0)+Math.imul(h,W)|0))<<13)|0;l=((s=s+Math.imul(h,q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,$),i=(i=Math.imul(y,z))+Math.imul(v,$)|0,s=Math.imul(v,z),r=r+Math.imul(f,W)|0,i=(i=i+Math.imul(f,q)|0)+Math.imul(m,W)|0,s=s+Math.imul(m,q)|0;var ve=(l+(r=r+Math.imul(d,G)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(h,G)|0))<<13)|0;l=((s=s+Math.imul(h,K)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(b,$),i=(i=Math.imul(b,z))+Math.imul(x,$)|0,s=Math.imul(x,z),r=r+Math.imul(y,W)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(v,W)|0,s=s+Math.imul(v,q)|0,r=r+Math.imul(f,G)|0,i=(i=i+Math.imul(f,K)|0)+Math.imul(m,G)|0,s=s+Math.imul(m,K)|0;var we=(l+(r=r+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(h,Y)|0))<<13)|0;l=((s=s+Math.imul(h,Q)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(_,$),i=(i=Math.imul(_,z))+Math.imul(k,$)|0,s=Math.imul(k,z),r=r+Math.imul(b,W)|0,i=(i=i+Math.imul(b,q)|0)+Math.imul(x,W)|0,s=s+Math.imul(x,q)|0,r=r+Math.imul(y,G)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(v,G)|0,s=s+Math.imul(v,K)|0,r=r+Math.imul(f,Y)|0,i=(i=i+Math.imul(f,Q)|0)+Math.imul(m,Y)|0,s=s+Math.imul(m,Q)|0;var be=(l+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(h,X)|0))<<13)|0;l=((s=s+Math.imul(h,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(A,$),i=(i=Math.imul(A,z))+Math.imul(S,$)|0,s=Math.imul(S,z),r=r+Math.imul(_,W)|0,i=(i=i+Math.imul(_,q)|0)+Math.imul(k,W)|0,s=s+Math.imul(k,q)|0,r=r+Math.imul(b,G)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(x,G)|0,s=s+Math.imul(x,K)|0,r=r+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(v,Y)|0,s=s+Math.imul(v,Q)|0,r=r+Math.imul(f,X)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,X)|0,s=s+Math.imul(m,ee)|0;var xe=(l+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(h,ne)|0))<<13)|0;l=((s=s+Math.imul(h,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(T,$),i=(i=Math.imul(T,z))+Math.imul(P,$)|0,s=Math.imul(P,z),r=r+Math.imul(A,W)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(S,W)|0,s=s+Math.imul(S,q)|0,r=r+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(k,G)|0,s=s+Math.imul(k,K)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(x,Y)|0,s=s+Math.imul(x,Q)|0,r=r+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,X)|0,s=s+Math.imul(v,ee)|0,r=r+Math.imul(f,ne)|0,i=(i=i+Math.imul(f,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var Ee=(l+(r=r+Math.imul(d,se)|0)|0)+((8191&(i=(i=i+Math.imul(d,oe)|0)+Math.imul(h,se)|0))<<13)|0;l=((s=s+Math.imul(h,oe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(R,$),i=(i=Math.imul(R,z))+Math.imul(O,$)|0,s=Math.imul(O,z),r=r+Math.imul(T,W)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(P,W)|0,s=s+Math.imul(P,q)|0,r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(S,G)|0,s=s+Math.imul(S,K)|0,r=r+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(k,Y)|0,s=s+Math.imul(k,Q)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(x,X)|0,s=s+Math.imul(x,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(v,ne)|0,s=s+Math.imul(v,re)|0,r=r+Math.imul(f,se)|0,i=(i=i+Math.imul(f,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var _e=(l+(r=r+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(h,ce)|0))<<13)|0;l=((s=s+Math.imul(h,le)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,z))+Math.imul(L,$)|0,s=Math.imul(L,z),r=r+Math.imul(R,W)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(O,W)|0,s=s+Math.imul(O,q)|0,r=r+Math.imul(T,G)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(P,G)|0,s=s+Math.imul(P,K)|0,r=r+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(S,Y)|0,s=s+Math.imul(S,Q)|0,r=r+Math.imul(_,X)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(k,X)|0,s=s+Math.imul(k,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(x,ne)|0,s=s+Math.imul(x,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,oe)|0)+Math.imul(v,se)|0,s=s+Math.imul(v,oe)|0,r=r+Math.imul(f,ce)|0,i=(i=i+Math.imul(f,le)|0)+Math.imul(m,ce)|0,s=s+Math.imul(m,le)|0;var ke=(l+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,he)|0)+Math.imul(h,de)|0))<<13)|0;l=((s=s+Math.imul(h,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,z))+Math.imul(U,$)|0,s=Math.imul(U,z),r=r+Math.imul(j,W)|0,i=(i=i+Math.imul(j,q)|0)+Math.imul(L,W)|0,s=s+Math.imul(L,q)|0,r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(O,G)|0,s=s+Math.imul(O,K)|0,r=r+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(P,Y)|0,s=s+Math.imul(P,Q)|0,r=r+Math.imul(A,X)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(S,X)|0,s=s+Math.imul(S,ee)|0,r=r+Math.imul(_,ne)|0,i=(i=i+Math.imul(_,re)|0)+Math.imul(k,ne)|0,s=s+Math.imul(k,re)|0,r=r+Math.imul(b,se)|0,i=(i=i+Math.imul(b,oe)|0)+Math.imul(x,se)|0,s=s+Math.imul(x,oe)|0,r=r+Math.imul(y,
vendor: 8,758 bytes, line 9688
9688ce)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(v,ce)|0,s=s+Math.imul(v,le)|0,r=r+Math.imul(f,de)|0,i=(i=i+Math.imul(f,he)|0)+Math.imul(m,de)|0,s=s+Math.imul(m,he)|0;var Ce=(l+(r=r+Math.imul(d,fe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(h,fe)|0))<<13)|0;l=((s=s+Math.imul(h,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,W),i=(i=Math.imul(B,q))+Math.imul(U,W)|0,s=Math.imul(U,q),r=r+Math.imul(j,G)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(L,G)|0,s=s+Math.imul(L,K)|0,r=r+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(O,Y)|0,s=s+Math.imul(O,Q)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(P,X)|0,s=s+Math.imul(P,ee)|0,r=r+Math.imul(A,ne)|0,i=(i=i+Math.imul(A,re)|0)+Math.imul(S,ne)|0,s=s+Math.imul(S,re)|0,r=r+Math.imul(_,se)|0,i=(i=i+Math.imul(_,oe)|0)+Math.imul(k,se)|0,s=s+Math.imul(k,oe)|0,r=r+Math.imul(b,ce)|0,i=(i=i+Math.imul(b,le)|0)+Math.imul(x,ce)|0,s=s+Math.imul(x,le)|0,r=r+Math.imul(y,de)|0,i=(i=i+Math.imul(y,he)|0)+Math.imul(v,de)|0,s=s+Math.imul(v,he)|0;var Ae=(l+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;l=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,G),i=(i=Math.imul(B,K))+Math.imul(U,G)|0,s=Math.imul(U,K),r=r+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,Q)|0)+Math.imul(L,Y)|0,s=s+Math.imul(L,Q)|0,r=r+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,X)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(P,ne)|0,s=s+Math.imul(P,re)|0,r=r+Math.imul(A,se)|0,i=(i=i+Math.imul(A,oe)|0)+Math.imul(S,se)|0,s=s+Math.imul(S,oe)|0,r=r+Math.imul(_,ce)|0,i=(i=i+Math.imul(_,le)|0)+Math.imul(k,ce)|0,s=s+Math.imul(k,le)|0,r=r+Math.imul(b,de)|0,i=(i=i+Math.imul(b,he)|0)+Math.imul(x,de)|0,s=s+Math.imul(x,he)|0;var Se=(l+(r=r+Math.imul(y,fe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(v,fe)|0))<<13)|0;l=((s=s+Math.imul(v,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(B,Y),i=(i=Math.imul(B,Q))+Math.imul(U,Y)|0,s=Math.imul(U,Q),r=r+Math.imul(j,X)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(L,X)|0,s=s+Math.imul(L,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(O,ne)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(T,se)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(P,se)|0,s=s+Math.imul(P,oe)|0,r=r+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(S,ce)|0,s=s+Math.imul(S,le)|0,r=r+Math.imul(_,de)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(k,de)|0,s=s+Math.imul(k,he)|0;var Ie=(l+(r=r+Math.imul(b,fe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(x,fe)|0))<<13)|0;l=((s=s+Math.imul(x,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,X),i=(i=Math.imul(B,ee))+Math.imul(U,X)|0,s=Math.imul(U,ee),r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(L,ne)|0,s=s+Math.imul(L,re)|0,r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,oe)|0)+Math.imul(O,se)|0,s=s+Math.imul(O,oe)|0,r=r+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(P,ce)|0,s=s+Math.imul(P,le)|0,r=r+Math.imul(A,de)|0,i=(i=i+Math.imul(A,he)|0)+Math.imul(S,de)|0,s=s+Math.imul(S,he)|0;var Te=(l+(r=r+Math.imul(_,fe)|0)|0)+((8191&(i=(i=i+Math.imul(_,me)|0)+Math.imul(k,fe)|0))<<13)|0;l=((s=s+Math.imul(k,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,ne),i=(i=Math.imul(B,re))+Math.imul(U,ne)|0,s=Math.imul(U,re),r=r+Math.imul(j,se)|0,i=(i=i+Math.imul(j,oe)|0)+Math.imul(L,se)|0,s=s+Math.imul(L,oe)|0,r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(O,ce)|0,s=s+Math.imul(O,le)|0,r=r+Math.imul(T,de)|0,i=(i=i+Math.imul(T,he)|0)+Math.imul(P,de)|0,s=s+Math.imul(P,he)|0;var Pe=(l+(r=r+Math.imul(A,fe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(S,fe)|0))<<13)|0;l=((s=s+Math.imul(S,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(B,se),i=(i=Math.imul(B,oe))+Math.imul(U,se)|0,s=Math.imul(U,oe),r=r+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,le)|0)+Math.imul(L,ce)|0,s=s+Math.imul(L,le)|0,r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(O,de)|0,s=s+Math.imul(O,he)|0;var Ne=(l+(r=r+Math.imul(T,fe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(P,fe)|0))<<13)|0;l=((s=s+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(B,ce),i=(i=Math.imul(B,le))+Math.imul(U,ce)|0,s=Math.imul(U,le),r=r+Math.imul(j,de)|0,i=(i=i+Math.imul(j,he)|0)+Math.imul(L,de)|0,s=s+Math.imul(L,he)|0;var Re=(l+(r=r+Math.imul(R,fe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(O,fe)|0))<<13)|0;l=((s=s+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(B,de),i=(i=Math.imul(B,he))+Math.imul(U,de)|0,s=Math.imul(U,he);var Oe=(l+(r=r+Math.imul(j,fe)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(L,fe)|0))<<13)|0;l=((s=s+Math.imul(L,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Me=(l+(r=Math.imul(B,fe))|0)+((8191&(i=(i=Math.imul(B,me))+Math.imul(U,fe)|0))<<13)|0;return l=((s=Math.imul(U,me))+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,c[0]=ge,c[1]=ye,c[2]=ve,c[3]=we,c[4]=be,c[5]=xe,c[6]=Ee,c[7]=_e,c[8]=ke,c[9]=Ce,c[10]=Ae,c[11]=Se,c[12]=Ie,c[13]=Te,c[14]=Pe,c[15]=Ne,c[16]=Re,c[17]=Oe,c[18]=Me,0!==l&&(c[19]=l,n.length++),n};function g(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,c=Math.min(s,t.length-1),l=Math.max(0,s-e.length+1);l<=c;l++){var u=s-l,d=(0|e.words[u])*(0|t.words[l]),h=67108863&d;a=67108863&(h=h+a|0),i+=(o=(o=o+(d/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n._strip()}function y(e,t,n){return g(e,t,n)}Math.imul||(m=f),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?f(this,e,t):n<1024?g(this,e,t):y(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),y(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var s=(0|this.words[i])*e,o=(67108863&s)+(67108863&r);r>>=26,r+=s/67108864|0,r+=o>>>26,this.words[i]=67108863&o}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var s=n.sqr();r<t.length;r++,s=s.sqr())0!==t[r]&&(n=n.mul(s));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,c=(0|this.words[t])-a<<r;this.words[t]=c|o,o=a>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,c=r;if(i-=o,i=Math.max(0,i),c){for(var l=0;l<o;l++)c.words[l]=this.words[l];c.length=o}if(0!==o)if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(0!==u||l>=i);l--){var d=0|this.words[l];this.words[l]=u<<26-s|d>>>s,u=d&a}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?
vendor: 6,096 bytes, line 9688
9688(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,s=e.length+r;this._expand(s);var o,a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var c=(0|e.words[i])*t;a=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),s=e,o=0|s.words[s.length-1];0!==(n=26-this._countBits(o))&&(s=s.ushln(n),r.iushln(n),o=0|s.words[s.length-1]);var a,c=r.length-s.length;if("mod"!==t){(a=new i(null)).length=c+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var u=r.clone()._ishlnsubmul(s,1,c);0===u.negative&&(r=u,a&&(a.words[c]=1));for(var d=c-1;d>=0;d--){var h=67108864*(0|r.words[s.length+d])+(0|r.words[s.length+d-1]);for(h=Math.min(h/o|0,67108863),r._ishlnsubmul(s,h,d);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(s,1,d),r.isZero()||(r.negative^=1);a&&(a.words[d]=h)}return a&&a._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(s=a.div.neg()),"div"!==t&&(o=a.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:s,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(s=a.div.neg()),{div:s,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var s,o,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(r*i+(0|this.words[s]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*r;this.words[i]=s/e|0,r=s%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s=new i(1),o=new i(0),a=new i(0),c=new i(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(s.isOdd()||o.isOdd())&&(s.iadd(u),o.isub(d)),s.iushrn(1),o.iushrn(1);for(var f=0,m=1;!(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(u),c.isub(d)),a.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a),o.isub(c)):(r.isub(t),a.isub(s),c.isub(o))}return{a:a,b:c,gcd:r.iushln(l)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,s=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var o=new i(1),a=new i(0),c=s.clone();r.cmpn(1)>0&&s.cmpn(1)>0;){for(var l=0,u=1;!(r.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,h=1;!(s.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(s.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);r.cmp(s)>=0?(r.isub(s),o.isub(a)):(s.isub(r),a.isub(o))}return(t=0===r.cmpn(1)?o:a).cmpn(0)<0&&t.iadd(e),t},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var s=i,o=r;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;
vendor: 5,052 bytes, line 9688
9688if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){k.call(this,e),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)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},r(b,w),b.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&n,i=10;i<e.length;i++){var o=0|e.words[i];
vendor: 22,760 bytes, line 9688
9688e.words[i-10]=(o&n)<<4|s>>>22,s=o}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(x,w),r(E,w),r(_,w),_.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new x;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},k.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var s=this.m.subn(1),o=0;!s.isZero()&&0===s.andln(1);)o++,s.iushrn(1);n(!s.isZero());var a=new i(1).toRed(this),c=a.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,s),h=this.pow(e,s.addn(1).iushrn(1)),p=this.pow(e,s),f=o;0!==p.cmp(a);){for(var m=p,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<f);var y=this.pow(d,new i(1).iushln(f-g-1));h=h.redMul(y),d=y.redSqr(),p=p.redMul(d),f=g}return h},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var s=n[0],o=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],u=c-1;u>=0;u--){var d=l>>u&1;(s!==n[0]&&(s=this.sqr(s)),0!==d||0!==o)?(o<<=1,o|=d,(4===++a||0===r&&0===u)&&(s=this.mul(s,n[o]),a=0,o=0)):a=0}c=26}return s},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new C(e)},r(C,k),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(r).iushrn(this.shift),o=s;return s.cmp(this.m)>=0?o=s.isub(this.m):s.cmpn(0)<0&&(o=s.iadd(this.m)),o._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,va)}(Wa);var Va=Wa.exports;const Ga="bignumber/5.7.0";var Ka=Va.BN;const Za=new Pa(Ga),Ya={},Qa=9007199254740991;let Ja=!1;class Xa{constructor(e,t){e!==Ya&&Za.throwError("cannot call constructor directly; use BigNumber.from",Pa.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return tc(nc(this).fromTwos(e))}toTwos(e){return tc(nc(this).toTwos(e))}abs(){return"-"===this._hex[0]?Xa.from(this._hex.substring(1)):this}add(e){return tc(nc(this).add(nc(e)))}sub(e){return tc(nc(this).sub(nc(e)))}div(e){return Xa.from(e).isZero()&&rc("division-by-zero","div"),tc(nc(this).div(nc(e)))}mul(e){return tc(nc(this).mul(nc(e)))}mod(e){const t=nc(e);return t.isNeg()&&rc("division-by-zero","mod"),tc(nc(this).umod(t))}pow(e){const t=nc(e);return t.isNeg()&&rc("negative-power","pow"),tc(nc(this).pow(t))}and(e){const t=nc(e);return(this.isNegative()||t.isNeg())&&rc("unbound-bitwise-result","and"),tc(nc(this).and(t))}or(e){const t=nc(e);return(this.isNegative()||t.isNeg())&&rc("unbound-bitwise-result","or"),tc(nc(this).or(t))}xor(e){const t=nc(e);return(this.isNegative()||t.isNeg())&&rc("unbound-bitwise-result","xor"),tc(nc(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&rc("negative-width","mask"),tc(nc(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&rc("negative-width","shl"),tc(nc(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&rc("negative-width","shr"),tc(nc(this).shrn(e))}eq(e){return nc(this).eq(nc(e))}lt(e){return nc(this).lt(nc(e))}lte(e){return nc(this).lte(nc(e))}gt(e){return nc(this).gt(nc(e))}gte(e){return nc(this).gte(nc(e))}isNegative(){return"-"===this._hex[0]}isZero(){return nc(this).isZero()}toNumber(){try{return nc(this).toNumber()}catch{rc("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Za.throwError("this platform does not support BigInt",Pa.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?Ja||(Ja=!0,Za.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?Za.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Pa.errors.UNEXPECTED_ARGUMENT,{}):Za.throwError("BigNumber.toString does not accept parameters",Pa.errors.UNEXPECTED_ARGUMENT,{})),nc(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Xa)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new Xa(Ya,ec(e)):e.match(/^-?[0-9]+$/)?new Xa(Ya,ec(new Ka(e))):Za.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&rc("underflow","BigNumber.from",e),(e>=Qa||e<=-Qa)&&rc("overflow","BigNumber.from",e),Xa.from(String(e));const t=e;if("bigint"==typeof t)return Xa.from(t.toString());if(ja(t))return Xa.from(Ua(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return Xa.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(Da(e)||"-"===e[0]&&Da(e.substring(1))))return Xa.from(e)}return Za.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function ec(e){if("string"!=typeof e)return ec(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&Za.throwArgumentError("invalid hex","value",e),"0x00"===(e=ec(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function tc(e){return Xa.from(ec(e))}function nc(e){const t=Xa.from(e).toHexString();return"-"===t[0]?new Ka("-"+t.substring(3),16):new Ka(t.substring(2),16)}function rc(e,t,n){const r={fault:e,operation:t};return null!=n&&(r.value=n),Za.throwError(e,Pa.errors.NUMERIC_FAULT,r)}const ic=new Pa(Ga),sc={},oc=Xa.from(0),ac=Xa.from(-1);function cc(e,t,n,r){const i={fault:t,operation:n};return void 0!==r&&(i.value=r),ic.throwError(e,Pa.errors.NUMERIC_FAULT,i)}let lc="0";for(;lc.length<256;)lc+=lc;function uc(e){if("number"!=typeof e)try{e=Xa.from(e).toNumber()}catch{}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+lc.substring(0,e):ic.throwArgumentError("invalid decimal size","decimals",e)}function dc(e,t){null==t&&(t=0);const n=uc(t),r=(e=Xa.from(e)).lt(oc);r&&(e=e.mul(ac));let i=e.mod(n).toString();for(;i.length<n.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];const s=e.div(n).toString();return e=1===n.length?s:s+"."+i,r&&(e="-"+e),e}function hc(e,t){null==t&&(t=0);const n=uc(t);("string"!=typeof e||!e.match(/^-?[0-9.]+$/))&&ic.throwArgumentError("invalid decimal value","value",e);const r="-"===e.substring(0,1);r&&(e=e.substring(1)),"."===e&&ic.throwArgumentError("missing value","value",e);const i=e.split(".");i.length>2&&ic.throwArgumentError("too many decimal points","value",e);let s=i[0],o=i[1];for(s||(s="0"),o||(o="0");"0"===o[o.length-1];)o=o.substring(0,o.length-1);for(o.length>n.length-1&&cc("fractional component exceeds decimals","underflow","parseFixed"),""===o&&(o="0");o.length<n.length-1;)o+="0";const a=Xa.from(s),c=Xa.from(o);let l=a.mul(n).add(c);return r&&(l=l.mul(ac)),l}class pc{constructor(e,t,n,r){e!==sc&&ic.throwError("cannot use FixedFormat constructor; use FixedFormat.from",Pa.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=t,this.width=n,this.decimals=r,this.name=(t?"":"u")+"fixed"+String(n)+"x"+String(r),this._multiplier=uc(r),Object.freeze(this)}static from(e){if(e instanceof pc)return e;"number"==typeof e&&(e=`fixed128x${e}`);let t=!0,n=128,r=18;if("string"==typeof e){if("fixed"!==e)if("ufixed"===e)t=!1;else{const i=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||ic.throwArgumentError("invalid fixed format","format",e),t="u"!==i[1],n=parseInt(i[2]),r=parseInt(i[3])}}else if(e){const i=(t,n,r)=>null==e[t]?r:(typeof e[t]!==n&&ic.throwArgumentError("invalid fixed format ("+t+" not "+n+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),n=i("width","number",n),r=i("decimals","number",r)}return n%8&&ic.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),r>80&&ic.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",r),new pc(sc,t,n,r)}}class fc{constructor(e,t,n,r){e!==sc&&ic.throwError("cannot use FixedNumber constructor; use FixedNumber.from",Pa.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=r,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&ic.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=hc(this._value,this.format.decimals),n=hc(e._value,e.format.decimals);return fc.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=hc(this._value,this.format.decimals),n=hc(e._value,e.format.decimals);return fc.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=hc(this._value,this.format.decimals),n=hc(e._value,e.format.decimals);return fc.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=hc(this._value,this.format.decimals),n=hc(e._value,e.format.decimals);return fc.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=fc.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(mc.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=fc.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(mc.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&ic.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const n=fc.from("1"+lc.substring(0,e),this.format),r=gc.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(r).floor().divUnsafe(n)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&ic.throwArgumentError("invalid byte width","width",e);return $a(Xa.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString(),e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return fc.fromString(this._value,e)}static fromValue(e,t,n){return null==n&&null!=t&&!function(e){return null!=e&&(Xa.isBigNumber(e)||"number"==typeof e&&e%1===0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||Da(e)||"bigint"==typeof e||ja(e))}(t)&&(n=t,t=null),null==t&&(t=0),null==n&&(n="fixed"),fc.fromString(dc(e,t),pc.from(n))}static fromString(e,t){null==t&&(t="fixed");const n=pc.from(t),r=hc(e,n.decimals);!n.signed&&r.lt(oc)&&cc("unsigned value cannot be negative","overflow","value",e);let i=null;n.signed?i=r.toTwos(n.width).toHexString():(i=r.toHexString(),i=$a(i,n.width/8));const s=dc(r,n.decimals);return new fc(sc,i,s,n)}static fromBytes(e,t){null==t&&(t="fixed");const n=pc.from(t);if(La(e).length>n.width/8)throw new Error("overflow");let r=Xa.from(e);n.signed&&(r=r.fromTwos(n.width));const i=r.toTwos((n.signed?0:1)+n.width).toHexString(),s=dc(r,n.decimals);return new fc(sc,i,s,n)}static from(e,t){if("string"==typeof e)return fc.fromString(e,t);if(ja(e))return fc.fromBytes(e,t);try{return fc.fromValue(e,0,t)}catch(n){if(n.code!==Pa.errors.INVALID_ARGUMENT)throw n}return ic.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const mc=fc.from(1),gc=fc.from("0.5"),yc=new Pa("strings/5.7.0");var vc,wc;function bc(e,t,n,r,i){if(e===wc.BAD_PREFIX||e===wc.UNEXPECTED_CONTINUE){let e=0;for(let r=t+1;r<n.length&&n[r]>>6===2;r++)e++;return e}return e===wc.OVERRUN?n.length-t-1:0}function xc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vc.current;t!=vc.current&&(yc.checkNormalize(),e=e.normalize(t));let n=[];for(let r=0;r<e.length;r++){const t=e.charCodeAt(r);if(t<128)n.push(t);else if(t<2048)n.push(t>>6|192),n.push(63&t|128);else if(55296==(64512&t)){r++;const i=e.charCodeAt(r);if(r>=e.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const s=65536+((1023&t)<<10)+(1023&i);n.push(s>>18|240),n.push(s>>12&63|128),n.push(s>>6&63|128),n.push(63&s|128)}else n.push(t>>12|224),n.push(t>>6&63|128),n.push(63&t|128)}return La(n)}function Ec(e,t){t||(t=function(e){return[parseInt(e,16)]});let n=0,r={};return e.split(",").forEach((e=>{let i=e.split(":");n+=parseInt(i[0],16),r[n]=t(i[1])})),r}function _c(e){let t=0;return e.split(",").map((e=>{let n=e.split("-");1===n.length?n[1]="0":""===n[1]&&(n[1]="1");let r=t+parseInt(n[0],16);return t=parseInt(n[1],16),{l:r,h:t}}))}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(vc||(vc={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(wc||(wc={})),Object.freeze({error:function(e,t,n,r,i){return yc.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",n)},ignore:bc,replace:function(e,t,n,r,i){return e===wc.OVERLONG?(r.push(i),0):(r.push(65533),bc(e,t,n))}}),_c("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),Ec("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Ec("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),Ec("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!==0)throw new Error("bad data");let t=[];for(let n=0;n<e.length;n+=4)t.push(parseInt(e.substring(n,n+4),16));return t})),_c("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");const kc="hash/5.7.0";function Cc(e,t){null==t&&(t=1);const n=[],r=n.forEach,i=function(e,t){r.call(e,(function(e){t>0&&Array.isArray(e)?i(e,t-1):n.push(e)}))};return i(e,t),n}function Ac(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function n(){return e[t++]<<8|e[t++]}let r=n(),i=1,s=[0,1];for(let b=1;b<r;b++)s.push(i+=n());let o=n(),a=t;t+=o;let c=0,l=0;function u(){return 0==c&&(l=l<<8|e[t++],c=8),l>>--c&1}const d=Math.pow(2,31),h=d>>>1,p=h>>1,f=d-1;let m=0;for(let b=0;b<31;b++)m=m<<1|u();let g=[],y=0,v=d;for(;;){let e=Math.floor(((m-y+1)*i-1)/v),t=0,n=r;for(;n-t>1;){let r=t+n>>>1;e<s[r]?n=r:t=r}if(0==t)break;g.push(t);let o=y+Math.floor(v*s[t]/i),a=y+Math.floor(v*s[t+1]/i)-1;for(;!((o^a)&h);)m=m<<1&f|u(),o=o<<1&f,a=a<<1&f|1;for(;o&~a&p;)m=m&h|m<<1&f>>>1|u(),o=o<<1^h,a=(a^h)<<1|h|1;y=o,v=1+a-o}let w=r-4;return g.map((t=>{switch(t-w){case 3:return w+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return w+256+(e[a++]<<8|e[a++]);case 1:return w+e[a++];default:return t-1}}))}(e))}function Sc(e){return 1&e?~e>>1:e>>1}function Ic(e,t){let n=Array(e);for(let r=0,i=-1;r<e;r++)n[r]=i+=1+t();return n}function Tc(e,t){let n=Array(e);for(let r=0,i=0;r<e;r++)n[r]=i+=Sc(t());return n}function Pc(e,t){let n=Ic(e(),e),r=e(),i=Ic(r,e),s=function(e,t){let n=Array(e);for(let r=0;r<e;r++)n[r]=1+t();return n}(r,e);for(let o=0;o<r;o++)for(let e=0;e<s[o];e++)n.push(i[o]+e);return t?n.map((e=>t[e])):n}function Nc(e,t,n){let r=Array(e).fill(void 0).map((()=>[]));for(let i=0;i<t;i++)Tc(e,n).forEach(((e,t)=>r[t].push(e)));return r}function Rc(e,t){let n=1+t(),r=t(),i=function(e){let t=[];for(;;){let n=e();if(0==n)break;t.push(n)}return t}(t);return Cc(Nc(i.length,1+e,t).map(((e,t)=>{const s=e[0],o=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*r;return[s+t*n,o.map((e=>e+i))]}))})))}function Oc(e,t){return Nc(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const Mc=Ac(function(e){e=atob(e);const t=[];for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));return La(t
vendor: 14,759 bytes, line 9688
9688)}("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))
9688;new Set(Pc(Mc)),new Set(Pc(Mc)),function(e){let t=[];for(;;){let n=e();if(0==n)break;t.push(Rc(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push(Oc(n,e))}(function(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];t[r[0]]=r[1]}})(Cc(t))}(Mc),function(e){let t=Pc(e).sort(((e,t)=>e-t));(function n(){let r=[];for(;;){let i=Pc(e,t);if(0==i.length)break;r.push({set:new Set(i),node:n()})}r.sort(((e,t)=>t.set.size-e.set.size));let i=e(),s=i%3;i=i/3|0;let o=!!(1&i);i>>=1;let a=1==i,c=2==i;return{branches:r,valid:s,fe0f:o,save:a,check:c}})()}(Mc),new Pa(kc);new Uint8Array(32).fill(0);function jc(e){return"string"==typeof e&&(e=xc(e)),Ha(function(e){const t=e.map((e=>La(e))),n=t.reduce(((e,t)=>
9688e+t.length),0),r=new Uint8Array(n);return t.reduce(((e,t)=>(r.set(t,e),e+t.length)),0),Oa(r)}([xc("\x19Ethereum Signed Message:\n"),xc(String(e.length)),e]))}new Pa("rlp/5.7.0");const Lc=new Pa("address/5.7.0");function Dc(e){Da(e,20)||Lc.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let i=0;i<40;i++)n[i]=t[i].charCodeAt(0);const r=La(Ha(n));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&r[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const Bc={};for(let n=0;n<10;n++)Bc[String(n)]=String(n);for(let n=0;n<26;n++)Bc[String.fromCharCode(65+n)]=String(10+n);const Uc=Math.floor(function(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}(9007199254740991));function Fc(e){let t=null;if("string"!=typeof e&&Lc.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=Dc(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&Lc.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>Bc[e])).join("");for(;t.length>=Uc;){let e=t.substring(0,Uc);t=parseInt(e,10)%97+t.substring(e.length)}let n=String(98-parseInt(t,10)%97);for(;n.length<2;)n="0"+n;return n}(e)&&Lc.throwArgumentError("bad icap checksum","address",e),t=function(e){return new Ka(e,36).toString(16)}(e.substring(4));t.length<40;)t="0"+t;t=Dc("0x"+t)}else Lc.throwArgumentError("invalid address","address",e);return t}function $c(e,t,n){Object.defineProperty(e,t,{enumerable:!0,value:n,writable:!1})}new Pa("properties/5.7.0"),new Pa(kc);new Uint8Array(32).fill(0),Xa.from(-1);const zc=Xa.from(0),Hc=Xa.from(1);Xa.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),$a(Hc.toHexString(),32),$a(zc.toHexString(),32);var Wc={},qc={},Vc=Gc;function Gc(e,t){if(!e)throw new Error(t||"Assertion failed")}Gc.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Kc={exports:{}};"function"==typeof Object.create?Kc.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Kc.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Zc=Vc,Yc=Kc.exports;function Qc(e,t){return!(55296!==(64512&e.charCodeAt(t))||t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1))}function Jc(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function Xc(e){return 1===e.length?"0"+e:e}function el(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}qc.inherits=Yc,qc.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):Qc(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},qc.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=Xc(e[n].toString(16));return t},qc.htonl=Jc,qc.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=Jc(i)),n+=el(i.toString(16))}return n},qc.zero2=Xc,qc.zero8=el,qc.join32=function(e,t,n,r){var i=n-t;Zc(i%4===0);for(var s=new Array(i/4),o=0,a=t;o<s.length;o++,a+=4){var c;c="big"===r?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],s[o]=c>>>0}return s},qc.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var s=e[r];"big"===t?(n[i]=s>>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=255&s):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=255&s)}return n},qc.rotr32=function(e,t){return e>>>t|e<<32-t},qc.rotl32=function(e,t){return e<<t|e>>>32-t},qc.sum32=function(e,t){return e+t>>>0},qc.sum32_3=function(e,t,n){return e+t+n>>>0},qc.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},qc.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},qc.sum64=function(e,t,n,r){var i=e[t],s=r+e[t+1]>>>0,o=(s<r?1:0)+n+i;e[t]=o>>>
vendor: 4,356 bytes, line 9688
96880,e[t+1]=s},qc.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},qc.sum64_lo=function(e,t,n,r){return t+r>>>0},qc.sum64_4_hi=function(e,t,n,r,i,s,o,a){var c=0,l=t;return c+=(l=l+r>>>0)<t?1:0,c+=(l=l+s>>>0)<s?1:0,e+n+i+o+(c+=(l=l+a>>>0)<a?1:0)>>>0},qc.sum64_4_lo=function(e,t,n,r,i,s,o,a){return t+r+s+a>>>0},qc.sum64_5_hi=function(e,t,n,r,i,s,o,a,c,l){var u=0,d=t;return u+=(d=d+r>>>0)<t?1:0,u+=(d=d+s>>>0)<s?1:0,u+=(d=d+a>>>0)<a?1:0,e+n+i+o+c+(u+=(d=d+l>>>0)<l?1:0)>>>0},qc.sum64_5_lo=function(e,t,n,r,i,s,o,a,c,l){return t+r+s+a+l>>>0},qc.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},qc.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},qc.shr64_hi=function(e,t,n){return e>>>n},qc.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0};var tl={},nl=qc,rl=Vc;function il(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}tl.BlockHash=il,il.prototype.update=function(e,t){if(e=nl.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=nl.join32(e,0,e.length-n,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},il.prototype.digest=function(e){return this.update(this._pad()),rl(null===this.pending),this._digest(e)},il.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,s=8;s<this.padLength;s++)r[i++]=0;return r};var sl={},ol={},al=qc.rotr32;function cl(e,t,n){return e&t^~e&n}function ll(e,t,n){return e&t^e&n^t&n}function ul(e,t,n){return e^t^n}ol.ft_1=function(e,t,n,r){return 0===e?cl(t,n,r):1===e||3===e?ul(t,n,r):2===e?ll(t,n,r):void 0},ol.ch32=cl,ol.maj32=ll,ol.p32=ul,ol.s0_256=function(e){return al(e,2)^al(e,13)^al(e,22)},ol.s1_256=function(e){return al(e,6)^al(e,11)^al(e,25)},ol.g0_256=function(e){return al(e,7)^al(e,18)^e>>>3},ol.g1_256=function(e){return al(e,17)^al(e,19)^e>>>10};var dl=qc,hl=tl,pl=ol,fl=dl.rotl32,ml=dl.sum32,gl=dl.sum32_5,yl=pl.ft_1,vl=hl.BlockHash,wl=[1518500249,1859775393,2400959708,3395469782];function bl(){if(!(this instanceof bl))return new bl;vl.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}dl.inherits(bl,vl);var xl=bl;bl.blockSize=512,bl.outSize=160,bl.hmacStrength=80,bl.padLength=64,bl.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=fl(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],s=this.h[1],o=this.h[2],a=this.h[3],c=this.h[4];for(r=0;r<n.length;r++){var l=~~(r/20),u=gl(fl(i,5),yl(l,s,o,a),c,n[r],wl[l]);c=a,a=o,o=fl(s,30),s=i,i=u}this.h[0]=ml(this.h[0],i),this.h[1]=ml(this.h[1],s),this.h[2]=ml(this.h[2],o),this.h[3]=ml(this.h[3],a),this.h[4]=ml(this.h[4],c)},bl.prototype._digest=function(e){return"hex"===e?dl.toHex32(this.h,"big"):dl.split32(this.h,"big")};var El=qc,_l=tl,kl=ol,Cl=Vc,Al=El.sum32,Sl=El.sum32_4,Il=El.sum32_5,Tl=kl.ch32,Pl=kl.maj32,Nl=kl.s0_256,Rl=kl.s1_256,Ol=kl.g0_256,Ml=kl.g1_256,jl=_l.BlockHash,Ll=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
vendor: 3,260 bytes, line 9688
9688734187,3204031479,3329325298];function Dl(){if(!(this instanceof Dl))return new Dl;jl.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Ll,this.W=new Array(64)}El.inherits(Dl,jl);var Bl=Dl;Dl.blockSize=512,Dl.outSize=256,Dl.hmacStrength=192,Dl.padLength=64,Dl.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=Sl(Ml(n[r-2]),n[r-7],Ol(n[r-15]),n[r-16]);var i=this.h[0],s=this.h[1],o=this.h[2],a=this.h[3],c=this.h[4],l=this.h[5],u=this.h[6],d=this.h[7];for(Cl(this.k.length===n.length),r=0;r<n.length;r++){var h=Il(d,Rl(c),Tl(c,l,u),this.k[r],n[r]),p=Al(Nl(i),Pl(i,s,o));d=u,u=l,l=c,c=Al(a,h),a=o,o=s,s=i,i=Al(h,p)}this.h[0]=Al(this.h[0],i),this.h[1]=Al(this.h[1],s),this.h[2]=Al(this.h[2],o),this.h[3]=Al(this.h[3],a),this.h[4]=Al(this.h[4],c),this.h[5]=Al(this.h[5],l),this.h[6]=Al(this.h[6],u),this.h[7]=Al(this.h[7],d)},Dl.prototype._digest=function(e){return"hex"===e?El.toHex32(this.h,"big"):El.split32(this.h,"big")};var Ul=qc,Fl=Bl;function $l(){if(!(this instanceof $l))return new $l;Fl.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Ul.inherits($l,Fl);var zl=$l;$l.blockSize=512,$l.outSize=224,$l.hmacStrength=192,$l.padLength=64,$l.prototype._digest=function(e){return"hex"===e?Ul.toHex32(this.h.slice(0,7),"big"):Ul.split32(this.h.slice(0,7),"big")};var Hl=qc,Wl=tl,ql=Vc,Vl=Hl.rotr64_hi,Gl=Hl.rotr64_lo,Kl=Hl.shr64_hi,Zl=Hl.shr64_lo,Yl=Hl.sum64,Ql=Hl.sum64_hi,Jl=Hl.sum64_lo,Xl=Hl.sum64_4_hi,eu=Hl.sum64_4_lo,tu=Hl.sum64_5_hi,nu=Hl.sum64_5_lo,ru=Wl.BlockHash,iu=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,
vendor: 5,588 bytes, line 9688
96881126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function su(){if(!(this instanceof su))return new su;ru.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=iu,this.W=new Array(160)}Hl.inherits(su,ru);var ou=su;function au(e,t,n,r,i){var s=e&n^~e&i;return s<0&&(s+=4294967296),s}function cu(e,t,n,r,i,s){var o=t&r^~t&s;return o<0&&(o+=4294967296),o}function lu(e,t,n,r,i){var s=e&n^e&i^n&i;return s<0&&(s+=4294967296),s}function uu(e,t,n,r,i,s){var o=t&r^t&s^r&s;return o<0&&(o+=4294967296),o}function du(e,t){var n=Vl(e,t,28)^Vl(t,e,2)^Vl(t,e,7);return n<0&&(n+=4294967296),n}function hu(e,t){var n=Gl(e,t,28)^Gl(t,e,2)^Gl(t,e,7);return n<0&&(n+=4294967296),n}function pu(e,t){var n=Vl(e,t,14)^Vl(e,t,18)^Vl(t,e,9);return n<0&&(n+=4294967296),n}function fu(e,t){var n=Gl(e,t,14)^Gl(e,t,18)^Gl(t,e,9);return n<0&&(n+=4294967296),n}function mu(e,t){var n=Vl(e,t,1)^Vl(e,t,8)^Kl(e,t,7);return n<0&&(n+=4294967296),n}function gu(e,t){var n=Gl(e,t,1)^Gl(e,t,8)^Zl(e,t,7);return n<0&&(n+=4294967296),n}function yu(e,t){var n=Vl(e,t,19)^Vl(t,e,29)^Kl(e,t,6);return n<0&&(n+=4294967296),n}function vu(e,t){var n=Gl(e,t,19)^Gl(t,e,29)^Zl(e,t,6);return n<0&&(n+=4294967296),n}su.blockSize=1024,su.outSize=512,su.hmacStrength=192,su.padLength=128,su.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=yu(n[r-4],n[r-3]),s=vu(n[r-4],n[r-3]),o=n[r-14],a=n[r-13],c=mu(n[r-30],n[r-29]),l=gu(n[r-30],n[r-29]),u=n[r-32],d=n[r-31];n[r]=Xl(i,s,o,a,c,l,u,d),n[r+1]=eu(i,s,o,a,c,l,u,d)}},su.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],i=this.h[1],s=this.h[2],o=this.h[3],a=this.h[4],c=this.h[5],l=this.h[6],u=this.h[7],d=this.h[8],h=this.h[9],p=this.h[10],f=this.h[11],m=this.h[12],g=this.h[13],y=this.h[14],v=this.h[15];ql(this.k.length===n.length);for(var w=0;w<n.length;w+=2){var b=y,x=v,E=pu(d,h),_=fu(d,h),k=au(d,h,p,f,m),C=cu(d,h,p,f,m,g),A=this.k[w],S=this.k[w+1],I=n[w],T=n[w+1],P=tu(b,x,E,_,k,C,A,S,I,T),N=nu(b,x,E,_,k,C,A,S,I,T);b=du(r,i),x=hu(r,i),E=lu(r,i,s,o,a),_=uu(r,i,s,o,a,c);var R=Ql(b,x,E,_),O=Jl(b,x,E,_);y=m,v=g,m=p,g=f,p=d,f=h,d=Ql(l,u,P,N),h=Jl(u,u,P,N),l=a,u=c,a=s,c=o,s=r,o=i,r=Ql(P,N,R,O),i=Jl(P,N,R,O)}Yl(this.h,0,r,i),Yl(this.h,2,s,o),Yl(this.h,4,a,c),Yl(this.h,6,l,u),Yl(this.h,8,d,h),Yl(this.h,10,p,f),Yl(this.h,12,m,g),Yl(this.h,14,y,v)},su.prototype._digest=function(e){return"hex"===e?Hl.toHex32(this.h,"big"):Hl.split32(this.h,"big")};var wu=qc,bu=ou;function xu(){if(!(this instanceof xu))return new xu;bu.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}wu.inherits(xu,bu);var Eu=xu;xu.blockSize=1024,xu.outSize=384,xu.hmacStrength=192,xu.padLength=128,xu.prototype._digest=function(e){return"hex"===e?wu.toHex32(this.h.slice(0,12),"big"):wu.split32(this.h.slice(0,12),"big")},sl.sha1=xl,sl.sha224=zl,sl.sha256=Bl,sl.sha384=Eu,sl.sha512=ou;var _u={},ku=qc,Cu=tl,Au=ku.rotl32,Su=ku.sum32,Iu=ku.sum32_3,Tu=ku.sum32_4,Pu=Cu.BlockHash;function Nu(){if(!(this instanceof Nu))return new Nu;Pu.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Ru(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function Ou(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function Mu(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}ku.inherits(Nu,Pu),_u.ripemd160=Nu,Nu.blockSize=512,Nu.outSize=160,Nu.hmacStrength=192,Nu.padLength=64,Nu.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],i=this.h[2],s=this.h[3],o=this.h[4],a=n,c=r,l=i,u=s,d=o,h=0;h<80;h++){var p=Su(Au(Tu(n,Ru(h,r,i,s),e[ju[h]+t],Ou(h)),Du[h]),o);n=o,o=s,s=Au(i,10),i=r,r=p,p=Su(Au(Tu(a,Ru(79-h,c,l,u),e[Lu[h]+t],Mu(h)),Bu[h]),d),a=d,d=u,u=Au(l,10),l=c,c=p}p=Iu(this.h[1],i,u),this.h[1]=Iu(this.h[2],s,d),this.h[2]=Iu(this.h[3],o,a),this.h[3]=Iu(this.h[4],n,c),this.h[4]=Iu(this.h[0],r,l),this.h[0]=p},Nu.prototype._digest=function(e){return"hex"===e?ku.toHex32(this.h,"little"):ku.split32(this.h,"little")};var ju=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Lu=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Du=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Bu=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Uu=qc,Fu=Vc;function $u(e,t,n){if(!(this instanceof $u))return new $u(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(Uu.toArray(t,n))}var zu=$u;function Hu(e,t,n){return n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t??n.path)}}
vendor: 10,101 bytes, line 9688
9688,e(n,n.exports),n.exports}$u.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),Fu(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},$u.prototype.update=function(e,t){return this.inner.update(e,t),this},$u.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},function(e){var t=e;t.utils=qc,t.common=tl,t.sha=sl,t.ripemd=_u,t.hmac=zu,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}(Wc);var Wu=qu;function qu(e,t){if(!e)throw new Error(t||"Assertion failed")}qu.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Vu=Hu((function(e,t){var n=t;function r(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e);for(r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),s=i>>8,o=255&i;s?n.push(s,o):n.push(o)}return n},n.zero2=r,n.toHex=i,n.encode=function(e,t){return"hex"===t?i(e):e}})),Gu=Hu((function(e,t){var n=t;n.assert=Wu,n.toArray=Vu.toArray,n.zero2=Vu.zero2,n.toHex=Vu.toHex,n.encode=Vu.encode,n.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<<t+1,s=e.clone(),o=0;o<r.length;o++){var a,c=s.andln(i-1);s.isOdd()?(a=c>(i>>1)-1?(i>>1)-c:c,s.isubn(a)):a=0,r[o]=a,s.iushrn(1)}return r},n.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,s=0;e.cmpn(-i)>0||t.cmpn(-s)>0;){var o,a,c=e.andln(3)+i&3,l=t.andln(3)+s&3;3===c&&(c=-1),3===l&&(l=-1),1&c?o=3!==(r=e.andln(7)+i&7)&&5!==r||2!==l?c:-c:o=0,n[0].push(o),1&l?a=3!==(r=t.andln(7)+s&7)&&5!==r||2!==c?l:-l:a=0,n[1].push(a),2*i===o+1&&(i=1-i),2*s===a+1&&(s=1-s),e.iushrn(1),t.iushrn(1)}return n},n.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new Va(e,"hex","le")}})),Ku=Gu.getNAF,Zu=Gu.getJSF,Yu=Gu.assert;function Qu(e,t){this.type=e,this.p=new Va(t.p,16),this.red=t.prime?Va.red(t.prime):Va.mont(this.p),this.zero=new Va(0).toRed(this.red),this.one=new Va(1).toRed(this.red),this.two=new Va(2).toRed(this.red),this.n=t.n&&new Va(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Ju=Qu;function Xu(e,t){this.curve=e,this.type=t,this.precomputed=null}Qu.prototype.point=function(){throw new Error("Not implemented")},Qu.prototype.validate=function(){throw new Error("Not implemented")},Qu.prototype._fixedNafMul=function(e,t){Yu(e.precomputed);var n=e._getDoubles(),r=Ku(t,1,this._bitLength),i=(1<<n.step+1)-(n.step%2===0?2:1);i/=3;var s,o,a=[];for(s=0;s<r.length;s+=n.step){o=0;for(var c=s+n.step-1;c>=s;c--)o=(o<<1)+r[c];a.push(o)}for(var l=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=i;d>0;d--){for(s=0;s<a.length;s++)(o=a[s])===d?u=u.mixedAdd(n.points[s]):o===-d&&(u=u.mixedAdd(n.points[s].neg()));l=l.add(u)}return l.toP()},Qu.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var i=r.points,s=Ku(t,n,this._bitLength),o=this.jpoint(null,null,null),a=s.length-1;a>=0;a--){for(var c=0;a>=0&&0===s[a];a--)c++;if(a>=0&&c++,o=o.dblp(c),a<0)break;var l=s[a];Yu(0!==l),o="affine"===e.type?l>0?o.mixedAdd(i[l-1>>1]):o.mixedAdd(i[-l-1>>1].neg()):l>0?o.add(i[l-1>>1]):o.add(i[-l-1>>1].neg())}return"affine"===e.type?o.toP():o},Qu.prototype._wnafMulAdd=function(e,t,n,r,i){var s,o,a,c=this._wnafT1,l=this._wnafT2,u=this._wnafT3,d=0;for(s=0;s<r;s++){var h=(a=t[s])._getNAFPoints(e);c[s]=h.wnd,l[s]=h.points}for(s=r-1;s>=1;s-=2){var p=s-1,f=s;if(1===c[p]&&1===c[f]){var m=[t[p],null,null,t[f]];0===t[p].y.cmp(t[f].y)?(m[1]=t[p].add(t[f]),m[2]=t[p].toJ().mixedAdd(t[f].neg())):0===t[p].y.cmp(t[f].y.redNeg())?(m[1]=t[p].toJ().mixedAdd(t[f]),m[2]=t[p].add(t[f].neg())):(m[1]=t[p].toJ().mixedAdd(t[f]),m[2]=t[p].toJ().mixedAdd(t[f].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=Zu(n[p],n[f]);for(d=Math.max(y[0].length,d),u[p]=new Array(d),u[f]=new Array(d),o=0;o<d;o++){var v=0|y[0][o],w=0|y[1][o];u[p][o]=g[3*(v+1)+(w+1)],u[f][o]=0,l[p]=m}}else u[p]=Ku(n[p],c[p],this._bitLength),u[f]=Ku(n[f],c[f],this._bitLength),d=Math.max(u[p].length,d),d=Math.max(u[f].length,d)}var b=this.jpoint(null,null,null),x=this._wnafT4;for(s=d;s>=0;s--){for(var E=0;s>=0;){var _=!0;for(o=0;o<r;o++)x[o]=0|u[o][s],0!==x[o]&&(_=!1);if(!_)break;E++,s--}if(s>=0&&E++,b=b.dblp(E),s<0)break;for(o=0;o<r;o++){var k=x[o];0!==k&&(k>0?a=l[o][k-1>>1]:k<0&&(a=l[o][-k-1>>1].neg()),b="affine"===a.type?b.mixedAdd(a):b.add(a))}}for(s=0;s<r;s++)l[s]=null;return i?b:b.toP()},Qu.BasePoint=Xu,Xu.prototype.eq=function(){throw new Error("Not implemented")},Xu.prototype.validate=function(){return this.curve.validate(this)},Qu.prototype.decodePoint=function(e,t){e=Gu.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1===2*n)return 6===e[0]?Yu(e[e.length-1]%2===0):7===e[0]&&Yu(e[e.length-1]%2===1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},Xu.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Xu.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},Xu.prototype.encode=function(e,t){return Gu.encode(this._encode(t),e)},Xu.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},Xu.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},Xu.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var s=0;s<e;s++)r=r.dbl();n.push(r)}return{step:e,points:n}},Xu.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},Xu.prototype._getBeta=function(){return null},Xu.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t};var ed=Hu((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),td=Gu.assert;function nd(e){Ju.call(this,"short",e),this.a=new Va(e.a,16).toRed(this.red),this.b=new Va(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}ed(nd,Ju);var rd=nd;function id(e,t,n,r){Ju.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new Va(t,16),this.y=new Va(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function sd(e,t,n,r){Ju.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Va(0)):(this.x=new Va(t,16),this.y=new Va(n,16),this.z=new Va(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}nd.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n,r;if(e.beta)t=new Va(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=(t=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(e.lambda)n=new Va(e.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(t))?n=s[0]:(n=s[1],td(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return r=e.basis?e.basis.map((function(e){return{a:new Va(e.a,16),b:new Va(e.b,16)}})):this._getEndoBasis(n),{beta:t,lambda:n,basis:r}}},nd.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:Va.mont(e),n=new Va(2).toRed(t).redInvm(),r=n.redNeg(),i=new Va(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(i).fromRed(),r.redSub(i).fromRed()]},nd.prototype._getEndoBasis=function(e){for(var t,n,r,i,s,o,a,c,l,u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new Va(1),f=new Va(0),m=new Va(0),g=new Va(1),y=0;0!==d.cmpn(0);){var v=h.div(d);c=h.sub(v.mul(d)),l=m.sub(v.mul(p));var w=g.sub(v.mul(f));if(!r&&c.cmp(u)<0)t=a.neg(),n=p,r=c.neg(),i=l;else if(r&&2===++y)break;a=c,h=d,d=c,m=p,p=l,g=f,f=w}s=c.neg(),o=l;var b=r.sqr().add(i.sqr());return s.sqr().add(o.sqr()).cmp(b)>=0&&(s=t,o=n),r.negative&&(r=r.neg(),i=i.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:r,b:i},{a:s,b:o}]},nd.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=i.mul(n.a),a=s.mul(r.a),c=i.mul(n.b),l=s.mul(r.b);
vendor: 9,808 bytes, line 9688
9688return{k1:e.sub(o).sub(a),k2:c.add(l).neg()}},nd.prototype.pointFromX=function(e,t){(e=new Va(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var i=r.fromRed().isOdd();return(t&&!i||!t&&i)&&(r=r.redNeg()),this.point(e,r)},nd.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},nd.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,s=0;s<e.length;s++){var o=this._endoSplit(t[s]),a=e[s],c=a._getBeta();o.k1.negative&&(o.k1.ineg(),a=a.neg(!0)),o.k2.negative&&(o.k2.ineg(),c=c.neg(!0)),r[2*s]=a,r[2*s+1]=c,i[2*s]=o.k1,i[2*s+1]=o.k2}for(var l=this._wnafMulAdd(1,r,i,2*s,n),u=0;u<2*s;u++)r[u]=null,i[u]=null;return l},ed(id,Ju.BasePoint),nd.prototype.point=function(e,t,n){return new id(this,e,t,n)},nd.prototype.pointFromJSON=function(e,t){return id.fromJSON(this,e,t)},id.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},id.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},id.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var s=t[2];return r.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[r].concat(s.doubles.points.map(i))},naf:s.naf&&{wnd:s.naf.wnd,points:[r].concat(s.naf.points.map(i))}},r},id.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},id.prototype.isInfinity=function(){return this.inf},id.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},id.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)},id.prototype.getX=function(){return this.x.fromRed()},id.prototype.getY=function(){return this.y.fromRed()},id.prototype.mul=function(e){return e=new Va(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},id.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},id.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},id.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},id.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},id.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},ed(sd,Ju.BasePoint),nd.prototype.jpoint=function(e,t,n){return new sd(this,e,t,n)},sd.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},sd.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},sd.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),a=r.redSub(i),c=s.redSub(o);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),u=l.redMul(a),d=r.redMul(l),h=c.redSqr().redIAdd(u).redISub(d).redISub(d),p=c.redMul(d.redISub(h)).redISub(s.redMul(u)),f=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(h,p,f)},sd.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(r),a=i.redSub(s);if(0===o.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),l=c.redMul(o),u=n.redMul(c),d=a.redSqr().redIAdd(l).redISub(u).redISub(u),h=a.redMul(u.redISub(d)).redISub(i.redMul(l)),p=this.z.redMul(o);return this.curve.jpoint(d,h,p)},sd.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,s=this.x,o=this.y,a=this.z,c=a.redSqr().redSqr(),l=o.redAdd(o);for(t=0;t<e;t++){var u=s.redSqr(),d=l.redSqr(),h=d.redSqr(),p=u.redAdd(u).redIAdd(u).redIAdd(r.redMul(c)),f=s.redMul(d),m=p.redSqr().redISub(f.redAdd(f)),g=f.redISub(m),y=p.redMul(g);y=y.redIAdd(y).redISub(h);var v=l.redMul(a);t+1<e&&(c=c.redMul(h)),s=m,a=v,l=y}return this.curve.jpoint(s,l.redMul(i),a)},sd.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},sd.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(s);o=o.redIAdd(o);var a=r.redAdd(r).redIAdd(r),c=a.redSqr().redISub(o).redISub(o),l=s.redIAdd(s);l=(l=l.redIAdd(l)).redIAdd(l),e=c,t=a.redMul(o.redISub(c)).redISub(l),n=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),d=this.y.redSqr(),h=d.redSqr(),p=this.x.redAdd(d).redSqr().redISub(u).redISub(h);p=p.redIAdd(p);var f=u.redAdd(u).redIAdd(u),m=f.redSqr(),g=h.redIAdd(h);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(p).redISub(p),t=f.redMul(p.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},sd.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(s);o=o.redIAdd(o);var a=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=a.redSqr().redISub(o).redISub(o);e=c;var l=s.redIAdd(s);l=(l=l.redIAdd(l)).redIAdd(l),t=a.redMul(o.redISub(c)).redISub(l),n=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),d=this.y.redSqr(),h=this.x.redMul(d),p=this.x.redSub(u).redMul(this.x.redAdd(u));p=p.redAdd(p).redIAdd(p);var f=h.redIAdd(h),m=(f=f.redIAdd(f)).redAdd(f);e=p.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(u);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=p.redMul(f.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},sd.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),s=t.redSqr(),o=n.redSqr(),a=s.redAdd(s).redIAdd(s).redIAdd(e.redMul(i)),c=t.redAdd(t),l=(c=c.redIAdd(c)).redMul(o),u=a.redSqr().redISub(l.redAdd(l)),d=l.redISub(u),h=o.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var p=a.redMul(d).redISub(h),f=n.redAdd(n).redMul(r);return this.curve.jpoint(u,p,f)},sd.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),s=i.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(r),a=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(s)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var l=i.redIAdd(o).redSqr().redISub(s).redISub(a).redISub(c),u=t.redMul(l);u=(u=u.redIAdd(u)).redIAdd(u);var d=this.x.redMul(a).redISub(u);d=(d=d.redIAdd(d)).redIAdd(d);var h=this.y.redMul(l.redMul(c.redISub(l)).redISub(o.redMul(a)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var p=this.z.redAdd(o).redSqr().redISub(n).redISub(a);return this.curve.jpoint(d,h,p)},sd.prototype.mul=function(e,t){return e=new Va(e,t),this.curve._wnafMul(this,e)},sd.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},sd.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},sd.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>
9688":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},sd.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var od=Hu((function(e,t){var n=t;n.base=Ju,n.short=rd,n.mont=null,n.edwards=null})),ad=Hu((function(e,t){var n,r=t,i=Gu.assert;function s(e){"short"===e.type?this.curve=new od.short(e):"edwards"===e.type?this.curve=new od.edwards(e):this.curve=new od.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function o(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new s(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=s,o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Wc.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Wc.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Wc.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Wc.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Wc.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Wc.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Wc.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=null.crash()}catch{n=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Wc.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"}
vendor: 9,160 bytes, line 9688
9688,{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})}));function cd(e){if(!(this instanceof cd))return new cd(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=Vu.toArray(e.entropy,e.entropyEnc||"hex"),n=Vu.toArray(e.nonce,e.nonceEnc||"hex"),r=Vu.toArray(e.pers,e.persEnc||"hex");Wu(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}var ld=cd;cd.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},cd.prototype._hmac=function(){return new Wc.hmac(this.hash,this.K)},cd.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},cd.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=Vu.toArray(e,t),n=Vu.toArray(n,r),Wu(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},cd.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=Vu.toArray(n,r||"hex"),this._update(n));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var s=i.slice(0,e);return this._update(n),this._reseed++,Vu.encode(s,t)};var ud=Gu.assert;function dd(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var hd=dd;dd.fromPublic=function(e,t,n){return t instanceof dd?t:new dd(e,{pub:t,pubEnc:n})},dd.fromPrivate=function(e,t,n){return t instanceof dd?t:new dd(e,{priv:t,privEnc:n})},dd.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},dd.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},dd.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},dd.prototype._importPrivate=function(e,t){this.priv=new Va(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},dd.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?ud(e.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&ud(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},dd.prototype.derive=function(e){return e.validate()||ud(e.validate(),"public point not validated"),e.mul(this.priv).getX()},dd.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},dd.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},dd.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var pd=Gu.assert;function fd(e,t){if(e instanceof fd)return e;this._importDER(e,t)||(pd(e.r&&e.s,"Signature without r or s"),this.r=new Va(e.r,16),this.s=new Va(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var md=fd;function gd(){this.place=0}function yd(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,s=0,o=t.place;s<r;s++,o++)i<<=8,i|=e[o],i>>>=0;return!(i<=127)&&(t.place=o,i)}function vd(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function wd(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}fd.prototype._importDER=function(e,t){e=Gu.toArray(e,t);var n=new gd;if(48!==e[n.place++])return!1;var r=yd(e,n);if(!1===r||r+n.place!==e.length||2!==e[n.place++])return!1;var i=yd(e,n);if(!1===i)return!1;var s=e.slice(n.place,i+n.place);if(n.place+=i,2!==e[n.place++])return!1;var o=yd(e,n);if(!1===o||e.length!==o+n.place)return!1;var a=e.slice(n.place,o+n.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new Va(s),this.s=new Va(a),this.recoveryParam=null,!0},fd.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=vd(t),n=vd(n);!n[0]&&!(128&n[1]);)n=n.slice(1);var r=[2];wd(r,t.length),(r=r.concat(t)).push(2),wd(r,n.length);var i=r.concat(n),s=[48];return wd(s,i.length),s=s.concat(i),Gu.encode(s,e)};var bd=function(){throw new Error("unsupported")},xd=Gu.assert;function Ed(e){if(!(this instanceof Ed))return new Ed(e);"string"==typeof e&&(xd(Object.prototype.hasOwnProperty.call(ad,e),"Unknown curve "+e),e=ad[e]),e instanceof ad.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var _d=Ed;Ed.prototype.keyPair=function(e){return new hd(this,e)},Ed.prototype.keyFromPrivate=function(e,t){return hd.fromPrivate(this,e,t)},Ed.prototype.keyFromPublic=function(e,t){return hd.fromPublic(this,e,t)},Ed.prototype.genKeyPair=function(e){e||(e={});for(var t=new ld({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||bd(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new Va(2));;){var i=new Va(t.generate(n));if(!(i.cmp(r)>0))return i.iaddn(1),this.keyFromPrivate(i)}},Ed.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Ed.prototype.sign=function(e,t,n,r){"object"==typeof n&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new Va(e,16));for(var i=this.n.byteLength(),s=t.getPrivate().toArray("be",i),o=e.toArray("be",i),a=new ld({hash:this.hash,entropy:s,nonce:o,pers:r.pers,persEnc:r.persEnc||"utf8"}),c=this.n.sub(new Va(1)),l=0;;l++){var u=r.k?r.k(l):new Va(a.generate(this.n.byteLength()));if(!((u=this._truncateToN(u,!0)).cmpn(1)<=0||u.cmp(c)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(0!==p.cmpn(0)){var f=u.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(f=f.umod(this.n)).cmpn(0)){var m=(d.getY().isOdd()?1:0)|(0!==h.cmp(p)?2:0);return r.canonical&&f.cmp(this.nh)>0&&(f=this.n.sub(f),m^=1),new md({r:p,s:f,recoveryParam:m})}}}}}},Ed.prototype.verify=function(e,t,n,r){e=this._truncateToN(new Va(e,16)),n=this.keyFromPublic(n,r);var i=(t=new md(t,"hex")).r,s=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o,a=s.invm(this.n),c=a.mul(e).umod(this.n),l=a.mul(i).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(c,n.getPublic(),l)).isInfinity()&&o.eqXToP(i):!(o=this.g.mulAdd(c,n.getPublic(),l)).isInfinity()&&0===o.getX().umod(this.n).cmp(i)},Ed.prototype.recoverPubKey=function(e,t,n,r){xd((3&n)===n,"The recovery param is more than two bits"),t=new md(t,r);var i=this.n,s=new Va(e),o=t.r,a=t.s,c=1&n,l=n>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");o=l?this.curve.pointFromX(o.add(this.curve.n),c):this.curve.pointFromX(o,c);var u=t.r.invm(i),d=i.sub(s).mul(u).umod(i),h=a.mul(u).umod(i);return this.g.mulAdd(d,o,h)},Ed.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new md(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(e,t,i)}catch{continue}if(s.eq(n))return i}throw new Error("Unable to find valid recovery factor")};var kd=Hu((function(e,t){var n=t;n.version="6.5.4",n.utils=Gu,n.rand=function(){throw new Error("unsupported")},n.curve=od,n.curves=ad,n.ec=_d,n.eddsa=null})),Cd=kd.ec;const Ad=new Pa("signing-key/5.7.0");let Sd=null;function Id(){return Sd||(Sd=new Cd("secp256k1")),Sd}class Td{constructor(e){$c(this,"curve","secp256k1"),$c(this,"privateKey",Ua(e)),32!==function(e){if("string"!=typeof e)e=Ua(e);else if(!Da(e)||e.length%2)return null;return(e.length-2)/2}(this.privateKey)&&Ad.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=Id().keyFromPrivate(La(this.privateKey));$c(this,"publicKey","0x"+t.getPublic(!1,"hex")),$c(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),$c(this,"_isSigningKey",!0)}_addPoint(e){const t=Id().keyFromPublic(La(this.publicKey)),n=Id().keyFromPublic(La(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}
9688signDigest(e){const t=Id().keyFromPrivate(La(this.privateKey)),n=La(e);32!==n.length&&Ad.throwArgumentError("bad digest length","digest",e);const r=t.sign(n,{canonical:!0});return za({recoveryParam:r.recoveryParam,r:$a("0x"+r.r.toString(16),32),s:$a("0x"+r.s.toString(16),32)})}computeSharedSecret(e){const t=Id().keyFromPrivate(La(this.privateKey)),n=Id().keyFromPublic(La(Pd(e)));return $a("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function Pd(e,t){const n=La(e);if(32===n.length){const e=new Td(n);return t?"0x"+Id().keyFromPrivate(n).getPublic(!0,"hex"):e.publicKey}return 33===n.length?t?Ua(n):"0x"+Id().keyFromPublic(n).getPublic(!1,"hex"):65===n.length?t?"0x"+Id().keyFromPublic(n).getPublic(!0,"hex"):Ua(n):Ad.throwArgumentError("invalid public or private key","key","[REDACTED]")}var Nd;function Rd(e,t){return function(e){return Fc(Fa(Ha(Fa(Pd(e),1)),12))}(function(e,t){const n=za(t),r={r:La(n.r),s:La(n.s)};return"0x"+Id().recoverPubKey(La(e),r,n.recoveryParam).encode("hex",!1)}(La(e),t))}new Pa("transactions/5.7.0"),function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(Nd||(Nd={}));const Od="https://rpc.walletconnect.com/v1";async function Md(e,t,n,r,i,s){switch(n.t){case"eip191":return function(e,t,n){return Rd(jc(t),n).toLowerCase()===e.toLowerCase()}(e,t,n.s);case"eip1271":return await async function(e,t,n,r,i,s){try{const o="0x1626ba7e",a="0000000000000000000000000000000000000000000000000000000000000040",c="0000000000000000000000000000000000000000000000000000000000000041",l=n.substring(2),u=o+jc(t).substring(2)+a+c+l,d=await fetch(`${s||Od}/?chainId=${r}&projectId=${i}`,{method:"POST",body:JSON.stringify({id:jd(),jsonrpc:"2.0",method:"eth_call",params:[{to:e,data:u},"latest"]})}),{result:h}=await d.json();return!!h&&h.slice(0,o.length).toLowerCase()===o.toLowerCase()}catch(o){return console.error("isValidEip1271Signature: ",o),!1}}(e,t,n.s,r,i,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${n.t}`)}}function jd(){return Date.now()+Math.floor(1e3*Math.random())}var Ld=Object.defineProperty,Dd=Object.defineProperties,Bd=Object.getOwnPropertyDescriptors,Ud=Object.getOwnPropertySymbols,Fd=Object.prototype.hasOwnProperty,$d=Object.prototype.propertyIsEnumerable,zd=(e,t,n)=>t in e?Ld(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hd=(e,t)=>{for(var n in t||(t={}))Fd.call(t,n)&&zd(e,n,t[n]);if(Ud)for(var n of Ud(t))$d.call(t,n)&&zd(e,n,t[n]);return e},Wd=(e,t)=>Dd(e,Bd(t));const qd=e=>e?.split(":"),Vd=e=>{const t=e&&qd(e);if(t)return e.includes("did:pkh:")?t[3]:t[1]},Gd=e=>{const t=e&&qd(e);if(t)return t[2]+":"+t[3]},Kd=e=>{const t=e&&qd(e);if(t)return t.pop()};async function Zd(e){const{cacao:t,projectId:n}=e,{s:r,p:i}=t,s=Yd(i,i.iss),o=Kd(i.iss);return await Md(o,s,r,Vd(i.iss),n)}const Yd=(e,t)=>{const n=`${e.domain} wants you to sign in with your Ethereum account:`,r=Kd(t);if(!e.aud&&!e.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let i=e.statement||void 0;const s=`URI: ${e.aud||e.uri}`,o=`Version: ${e.version}`,a=`Chain ID: ${Vd(t)}`,c=`Nonce: ${e.nonce}`,l=`Issued At: ${e.iat}`,u=e.resources?`Resources:${e.resources.map((e=>`\n- ${e}`)).join("")}`:void 0,d=ah(e.resources);if(d){i=ih(i,eh(d))}return[n,r,"",i,"",s,o,a,c,l,u].filter((e=>null!=e)).join("\n")};function Qd(e){if(!e)throw new Error("No recap provided, value is undefined");if(!e.att)throw new Error("No `att` property found");const t=Object.keys(e.att);if(null==t||!t.length)throw new Error("No resources found in `att` property");t.forEach((t=>{const n=e.att[t];if(Array.isArray(n))throw new Error(`Resource must be an object: ${t}`);if("object"!=typeof n)throw new Error(`Resource must be an object: ${t}`);if(!Object.keys(n).length)throw new Error(`Resource object is empty: ${t}`);Object.keys(n).forEach((e=>{const t=n[e];if(!Array.isArray(t))throw new Error(`Ability limits ${e} must be an array of objects, found: ${t}`);if(!t.length)throw new Error(`Value of ${e} is empty array, must be an array with objects`);t.forEach((t=>{if("object"!=typeof t)throw new Error(`Ability limits (${e}) must be an array of objects, found: ${t}`)}))}))}))}function Jd(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t=t?.sort(((e,t)=>e.localeCompare(t)));const r=t.map((t=>({[`${e}/${t}`]:[n]})));return Object.assign({},...r)}function Xd(e){return Qd(e),`urn:recap:${function(e){return Buffer.from(JSON.stringify(e)).toString("base64")}(e).replace(/=/g,"")}`}function eh(e){const t=function(e){return JSON.parse(Buffer.from(e,"base64").toString("utf-8"))}(e.replace("urn:recap:",""));return Qd(t),t}function th(e,t,n){const r=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n?.sort(((e,t)=>e.localeCompare(t))),{att:{[e]:Jd(t,n,r)}}}
9688(e,t,n);return Xd(r)}function nh(e){return e&&e.includes("urn:recap:")}function rh(e,t){const n=function(e,t){Qd(e),Qd(t);const n=Object.keys(e.att).concat(Object.keys(t.att)).sort(((e,t)=>e.localeCompare(t))),r={att:{}};return n.forEach((n=>{var i,s;Object.keys((null==(i=e.att)?void 0:i[n])||{}).concat(Object.keys((null==(s=t.att)?void 0:s[n])||{})).sort(((e,t)=>e.localeCompare(t))).forEach((i=>{var s,o;r.att[n]=Wd(Hd({},r.att[n]),{[i]:(null==(s=e.att[n])?void 0:s[i])||(null==(o=t.att[n])?void 0:o[i])})}))})),r}(eh(e),eh(t));return Xd(n)}function ih(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;Qd(t);const n="I further authorize the stated URI to perform the following actions on my behalf: ";if(e.includes(n))return e;const r=[];let i=0;Object.keys(t.att).forEach((e=>{const n=Object.keys(t.att[e]).map((e=>({ability:e.split("/")[0],action:e.split("/")[1]})));n.sort(((e,t)=>e.action.localeCompare(t.action)));const s={};n.forEach((e=>{s[e.ability]||(s[e.ability]=[]),s[e.ability].push(e.action)}));const o=Object.keys(s).map((t=>(i++,`(${i}) '${t}': '${s[t].join("', '")}' for '${e}'.`)));r.push(o.join(", ").replace(".,","."))}));return`${e?e+" ":""}${`${n}${r.join(" ")}`}`}function sh(e){var t;const n=eh(e);Qd(n);const r=null==(t=n.att)?void 0:t.eip155;return r?Object.keys(r).map((e=>e.split("/")[1])):[]}function oh(e){const t=eh(e);Qd(t);const n=[];return Object.values(t.att).forEach((e=>{Object.values(e).forEach((e=>{var t;null!=(t=e?.[0])&&t.chains&&n.push(e[0].chains)}))})),[...new Set(n.flat())]}function ah(e){if(!e)return;const t=e?.[e.length-1];return nh(t)?t:void 0}const ch="base10",lh="base16",uh="base64pad",dh="utf8";function hh(){const e=(0,jo.randomBytes)(32);return(0,Bo.dI)(e,lh)}function ph(e){const t=(0,Lo.tW)((0,Bo.sH)(e,lh));return(0,Bo.dI)(t,lh)}function fh(e){const t=(0,Lo.tW)((0,Bo.sH)(e,dh));return(0,Bo.dI)(t,lh)}function mh(e){return Number((0,Bo.dI)(e,ch))}function gh(e){const t=function(e){return(0,Bo.sH)(`${e}`,ch)}(typeof e.type<"u"?e.type:0);if(1===mh(t)&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?(0,Bo.sH)(e.senderPublicKey,lh):void 0,r=typeof e.iv<"u"?(0,Bo.sH)(e.iv,lh):(0,jo.randomBytes)(12);return function(e){if(1===mh(e.type)){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return(0,Bo.dI)((0,Bo.xW)([e.type,e.senderPublicKey,e.iv,e.sealed]),uh)}return(0,Bo.dI)((0,Bo.xW)([e.type,e.iv,e.sealed]),uh)}({type:t,sealed:new Oo.g6((0,Bo.sH)(e.symKey,lh)).seal(r,(0,Bo.sH)(e.message,dh)),iv:r,senderPublicKey:n})}function yh(e){const t=(0,Bo.sH)(e,uh),n=t.slice(0,1);if(1===mh(n)){const e=33,r=e+12,i=t.slice(1,e),s=t.slice(e,r);return{type:n,sealed:t.slice(r),iv:s,senderPublicKey:i}}const r=t.slice(1,13);return{type:n,sealed:t.slice(13),iv:r}}function vh(e){const t=e?.type||0;if(1===t){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function wh(e){return 1===e.type&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}function bh(e){return e?.relay||{protocol:"irn"}}function xh(e){const t=Uo.CG[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var Eh=Object.defineProperty,_h=Object.defineProperties,kh=Object.getOwnPropertyDescriptors,Ch=Object.getOwnPropertySymbols,Ah=Object.prototype.hasOwnProperty,Sh=Object.prototype.propertyIsEnumerable,Ih=(e,t,n)=>t in e?Eh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Th=(e,t)=>{for(var n in t||(t={}))Ah.call(t,n)&&Ih(e,n,t[n]);if(Ch)for(var n of Ch(t))Sh.call(t,n)&&Ih(e,n,t[n]);return e};function Ph(e){const t={},n="relay"+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-");return Object.keys(e).forEach((r=>{if(r.startsWith(n)){const i=r.replace(n,""),s=e[r];t[i]=s}})),t}function Nh(e){const t=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t),i=e.substring(t+1,n).split("@"),s=typeof n<"u"?e.substring(n):"",o=Ro.parse(s),a="string"==typeof o.methods?o.methods.split(","):void 0;return{protocol:r,topic:Rh(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:Ph(o),methods:a,expiryTimestamp:o.expiryTimestamp?parseInt(o.expiryTimestamp,10):void 0}}function Rh(e){return e.startsWith("//")?e.substring(2):e}function Oh(e){return`${e.protocol}
9688:${e.topic}@${e.version}?`+Ro.stringify(Th(((e,t)=>_h(e,kh(t)))(Th({symKey:e.symKey},function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";const n={};return Object.keys(e).forEach((r=>{const i="relay"+t+r;e[r]&&(n[i]=e[r])})),n}(e.relay)),{expiryTimestamp:e.expiryTimestamp}),e.methods?{methods:e.methods.join(",")}:{}))}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function Mh(e){const t=[];return e.forEach((e=>{const[n,r]=e.split(":");t.push(`${n}:${r}`)})),t}function jh(e){return e.includes(":")}function Lh(e){return jh(e)?e.split(":")[0]:e}function Dh(e,t){t=t.map((e=>e.replace("did:pkh:","")));const n=function(e){const t={};return e?.forEach((e=>{const[n,r]=e.split(":");t[n]||(t[n]={accounts:[],chains:[],events:[]}),t[n].accounts.push(e),t[n].chains.push(`${n}:${r}`)})),t}(t);for(const[r,i]of Object.entries(n))i.methods?i.methods=ya(i.methods,e):i.methods=e,i.events=["chainChanged","accountsChanged"];return n}const Bh={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Uh={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Fh(e,t){const{message:n,code:r}=Uh[e];return{message:t?`${n} ${t}`:n,code:r}}function $h(e,t){const{message:n,code:r}=Bh[e];return{message:t?`${n} ${t}`:n,code:r}}function zh(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function Hh(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function Wh(e){return typeof e>"u"}function qh(e,t){return!(!t||!Wh(e))||"string"==typeof e&&!!e.trim().length}function Vh(e,t){return!(!t||!Wh(e))||"number"==typeof e&&!isNaN(e)}function Gh(e){return!(!qh(e,!1)||!e.includes(":"))&&2===e.split(":").length}function Kh(e){let t=!0;return zh(e)?e.length&&(t=e.every((e=>qh(e,!1)))):t=!1,t}function Zh(e,t,n){let r=null;return Object.entries(e).forEach((e=>{let[i,s]=e;if(r)return;const o=function(e,t,n){let r=null;return zh(t)&&t.length?t.forEach((e=>{r||Gh(e)||(r=$h("UNSUPPORTED_CHAINS",`${n}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):Gh(e)||(r=$h("UNSUPPORTED_CHAINS",`${n}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:
96885"] }`)),r}(i,Ho(i,s),`${t} ${n}`);o&&(r=o)})),r}function Yh(e,t){let n=null;return zh(e)?e.forEach((e=>{n||function(e){if(qh(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&Gh(e)}}return!1}(e)||(n=$h("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):n=$h("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function Qh(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=function(e,t){let n=null;return Kh(e?.methods)?Kh(e?.events)||(n=$h("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=$h("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),n}(e,`${t}, namespace`);r&&(n=r)})),n}function Jh(e,t){let n=null;if(e&&Hh(e)){const r=Qh(e,t);r&&(n=r);const i=function(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=Yh(e?.accounts,`${t} namespace`);r&&(n=r)})),n}(e,t);i&&(n=i)}else n=Fh("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function Xh(e){return qh(e.protocol,!0)}function ep(e){return typeof e<"u"&&null!==typeof e}function tp(e,t){return!(!Gh(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...Mh(e.accounts))})),t}(e).includes(t))}
9688function np(e,t,n){return!!qh(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{Mh(e.accounts).includes(t)&&n.push(...e.methods)})),n}(e,t).includes(n)}function rp(e,t,n){return!!qh(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{Mh(e.accounts).includes(t)&&n.push(...e.events)})),n}(e,t).includes(n)}function ip(e,t,n){let r=null;const i=function(e){const t={};return Object.keys(e).forEach((n=>{var r;n.includes(":")?t[n]=e[n]:null==(r=e[n].chains)||r.forEach((r=>{t[r]={methods:e[n].methods,events:e[n].events}}))})),t}(e),s=function(e){const t={};return Object.keys(e).forEach((n=>{if(n.includes(":"))t[n]=e[n];else{const r=Mh(e[n].accounts);r?.forEach((r=>{t[r]={accounts:e[n].accounts.filter((e=>e.includes(`${r}:`))),methods:e[n].methods,events:e[n].events}}))}})),t}(t),o=Object.keys(i),a=Object.keys(s),c=sp(Object.keys(e)),l=sp(Object.keys(t)),u=c.filter((e=>!l.includes(e)));return u.length&&(r=Fh("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${u.toString()}\n Received: ${Object.keys(t).toString()}`)),aa(o,a)||(r=Fh("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${o.toString()}\n Approved: ${a.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||r)return;const i=Mh(t[e].accounts);i.includes(e)||(r=Fh("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),o.forEach((e=>{r||(aa(i[e].methods,s[e].methods)?aa(i[e].events,s[e].events)||(r=Fh("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=Fh("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))})),r}function sp(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function op(){const e=ia();return new Promise((t=>{switch(e){case Jo:t(ra()&&navigator?.onLine);break;case Yo:t(async function(){if(na()&&typeof n.g<"u"&&null!=n.g&&n.g.NetInfo){const e=await(null==n.g?void 0:n.g.NetInfo.fetch());return e?.isConnected}return!0}());break;default:t(!0)}}))}function ap(e){switch(ia()){case Jo:!function(e){!na()&&ra()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case Yo:!function(e){na()&&typeof n.g<"u"&&null!=n.g&&n.g.NetInfo&&n.g?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e)}}const cp={};class lp{static get(e){return cp[e]}static set(e,t){cp[e]=t}static delete(e){delete cp[e]}}const up=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,dp=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,hp=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function pp(e,t){if(!("__proto__"===e||"constructor"===e&&t&&"object"===typeof t&&"prototype"in t))return t;!function(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}(e)}function fp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!==typeof e)return e;const n=e.trim();if('"'===e[0]&&e.endsWith('"')&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const e=n.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!hp.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(up.test(e)||dp.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,pp)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}function mp(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return(i=e(...n))&&"function"===typeof i.then?i:Promise.resolve(i)}catch(s){return Promise.reject(s)}var i}function gp(e){if(function(e){const t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){const t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"===typeof e.toJSON)return gp(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function yp(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const vp="base64:";function wp(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function bp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return wp(t.join(":"))}function xp(e){return(e=wp(e))?e+":":""}const Ep=()=>{const e=new Map;return{name:"memory",options:{},hasItem:t=>e.has(t),getItem:t=>e.get(t)??null,getItemRaw:t=>e.get(t)??null,setItem(t,n){e.set(t,n)},setItemRaw(t,n){e.set(t,n)},removeItem(t){e.delete(t)},getKeys:()=>Array.from(e.keys()),clear(){e.clear()},dispose(){e.clear()}}};function _p(){const e={mounts:{"":(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).driver||Ep()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}}
9688,t=t=>{for(const n of e.mountpoints)if(t.startsWith(n))return{base:n,relativeKey:t.slice(n.length),driver:e.mounts[n]};return{base:"",relativeKey:t,driver:e.mounts[""]}},n=(t,n)=>e.mountpoints.filter((e=>e.startsWith(t)||n&&t.startsWith(e))).map((n=>({relativeBase:t.length>n.length?t.slice(n.length):void 0,mountpoint:n,driver:e.mounts[n]}))),r=(t,n)=>{if(e.watching){n=wp(n);for(const r of e.watchListeners)r(t,n)}},i=async()=>{if(e.watching){for(const t in e.unwatch)await e.unwatch[t]();e.unwatch={},e.watching=!1}},s=(e,n,r)=>{const i=new Map,s=e=>{let t=i.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},i.set(e.base,t)),t};for(const o of e){const e="string"===typeof o,r=wp(e?o:o.key),i=e?void 0:o.value,a=e||!o.options?n:{...n,...o.options},c=t(r);s(c).items.push({key:r,value:i,relativeKey:c.relativeKey,options:a})}return Promise.all([...i.values()].map((e=>r(e)))).then((e=>e.flat()))},o={hasItem(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=wp(e);const{relativeKey:r,driver:i}=t(e);return mp(i.hasItem,r,n)},getItem(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=wp(e);const{relativeKey:r,driver:i}=t(e);return mp(i.getItem,r,n).then((e=>fp(e)))},getItems:(e,t)=>s(e,t,(e=>e.driver.getItems?mp(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:bp(e.base,t.key),value:fp(t.value)}))))):Promise.all(e.items.map((t=>mp(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:fp(e)})))))))),getItemRaw(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=wp(e);const{relativeKey:r,driver:i}=t(e);return i.getItemRaw?mp(i.getItemRaw,r,n):mp(i.getItem,r,n).then((e=>function(e){return"string"!==typeof e?e:e.startsWith(vp)?(yp(),Buffer.from(e.slice(7),"base64")):e}(e)))},async setItem(e,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(void 0===n)return o.removeItem(e);e=wp(e);const{relativeKey:s,driver:a}=t(e);a.setItem&&(await mp(a.setItem,s,gp(n),i),a.watch||r("update",e))},async setItems(e,t){await s(e,t,(async e=>{if(e.driver.setItems)return mp(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:gp(e.value),options:e.options}))),t);e.driver.setItem&&await Promise.all(e.items.map((t=>mp(e.driver.setItem,t.relativeKey,gp(t.value),t.options))))}))},async setItemRaw(e,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(void 0===n)return o.removeItem(e,i);e=wp(e);const{relativeKey:s,driver:a}=t(e);if(a.setItemRaw)await mp(a.setItemRaw,s,n,i);else{if(!a.setItem)return;await mp(a.setItem,s,function(e){if("string"===typeof e)return e;yp();const t=Buffer.from(e).toString("base64");return vp+t}(n),i)}a.watch||r("update",e)},async removeItem(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"boolean"===typeof n&&(n={removeMeta:n}),e=wp(e);const{relativeKey:i,driver:s}=t(e);s.removeItem&&(await mp(s.removeItem,i,n),(n.removeMeta||n.removeMata)&&await mp(s.removeItem,i+"$",n),s.watch||r("remove",e))},async getMeta(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"boolean"===typeof n&&(n={nativeOnly:n}),e=wp(e);const{relativeKey:r,driver:i}=t(e),s=Object.create(null);if(i.getMeta&&Object.assign(s,await mp(i.getMeta,r,n)),!n.nativeOnly){const e=await mp(i.getItem,r+"$",n).then((e=>fp(e)));e&&"object"===typeof e&&("string"===typeof e.atime&&(e.atime=new Date(e.atime)),"string"===typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(s,e))}return s},setMeta(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.setItem(e+"$",t,n)},removeMeta(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.removeItem(e+"$",t)},async getKeys(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=xp(e);const r=n(e,!0);let i=[];const s=[];for(const n of r){const e=(await mp(n.driver.getKeys,n.relativeBase,t)).map((e=>n.mountpoint+wp(e))).filter((e=>!i.some((t=>e.startsWith(t)))));s.push(...e),i=[n.mountpoint,...i.filter((e=>!e.startsWith(n.mountpoint)))]}return e?s.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):s.filter((e=>!e.endsWith("$")))},async clear(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=xp(e),await Promise.all(n(e,!1).map((async e=>{if(e.driver.clear)return mp(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){const n=await e.driver.getKeys(e.relativeBase||"",t);return Promise.all(n.map((n=>e.driver.removeItem(n,t))))}})))},async dispose(){await Promise.all(Object.values(e.mounts).map((e=>Cp(e))))},watch:async t=>(await(async()=>
9688{if(!e.watching){e.watching=!0;for(const t in e.mounts)e.unwatch[t]=await kp(e.mounts[t],r,t)}})(),e.watchListeners.push(t),async()=>{e.watchListeners=e.watchListeners.filter((e=>e!==t)),0===e.watchListeners.length&&await i()}),async unwatch(){e.watchListeners=[],await i()},mount(t,n){if((t=xp(t))&&e.mounts[t])throw new Error(`already mounted at ${t}`);return t&&(e.mountpoints.push(t),e.mountpoints.sort(((e,t)=>t.length-e.length))),e.mounts[t]=n,e.watching&&Promise.resolve(kp(n,r,t)).then((n=>{e.unwatch[t]=n})).catch(console.error),o},async unmount(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(t=xp(t))&&e.mounts[t]&&(e.watching&&t in e.unwatch&&(e.unwatch[t](),delete e.unwatch[t]),n&&await Cp(e.mounts[t]),e.mountpoints=e.mountpoints.filter((e=>e!==t)),delete e.mounts[t])},getMount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=wp(e)+":";const n=t(e);return{driver:n.driver,base:n.base}},getMounts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=wp(e);return n(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint})))}};return o}function kp(e,t,n){return e.watch?e.watch(((e,r)=>t(e,n+r))):()=>{}}async function Cp(e){"function"===typeof e.dispose&&await mp(e.dispose)}function Ap(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}function Sp(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Ap(n);return(e,n)=>r.then((r=>n(r.transaction(t,e).objectStore(t))))}let Ip;function Tp(){return Ip||(Ip=Sp("keyval-store","keyval")),Ip}function Pp(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tp())("readonly",(t=>Ap(t.get(e))))}function Np(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},Ap(e.transaction)}function Rp(e){if("string"!==typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return(e=>{const t=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"===typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))})(e)}catch(ju){return e}}function Op(e){return"string"===typeof e?e:(e=>JSON.stringify(e,((e,t)=>"bigint"===typeof t?t.toString()+"n":t)))(e)||""}var Mp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.base&&e.base.length>0?`${e.base}:`:"",n=e=>t+e;let r;return e.dbName&&e.storeName&&(r=Sp(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await Pp(n(e),r)>"u"),getItem:async e=>await Pp(n(e),r)??null,setItem:(e,t)=>function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:Tp())("readwrite",(n=>(n.put(t,e),Ap(n.transaction))))}(n(e),t,r),removeItem:e=>function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tp())("readwrite",(t=>(t.delete(e),Ap(t.transaction))))}(n(e),r),getKeys:()=>function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tp())("readonly",(e=>{if(e.getAllKeys)return Ap(e.getAllKeys());const t=[];return Np(e,(e=>t.push(e.key))).then((()=>t))}))}(r),clear:()=>function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tp())("readwrite",(e=>(e.clear(),Ap(e.transaction))))}(r)}};class jp{constructor(){this.indexedDb=_p({driver:Mp({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((e=>[e.key,e.value]))}async getItem(e){const t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,Op(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var Lp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof n.g<"u"?n.g:typeof self<"u"?self:{},Dp={exports:{}};function Bp(e){var t;return[e[0],Rp(null!=(t=e[1])?t:"")]}!function(){let e;function t(){}e=t,e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),typeof Lp<"u"&&Lp.localStorage?Dp.exports=Lp.localStorage:typeof window<"u"&&window.localStorage?Dp.exports=window.localStorage:Dp.exports=new t}();class Up{constructor(){this.localStorage=Dp.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Bp)}async getItem(e){const t=this.localStorage.getItem(e);if(null!==t)return Rp(t)}async setItem(e,t){this.localStorage.setItem(e,Op(t))}async removeItem(e){this.localStorage.removeItem(e)}}const Fp=async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))};class $p{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const e=new Up;this.storage=e;try{(async(e,t,n)=>{const r="wc_storage_version",i=await t.getItem(r);if(i&&i>=1)return void n(t);const s=await e.getKeys();if(!s.length)return void n(t);const o=[];for(;s.length;){const n=s.shift();if(!n)continue;const r=n.toLowerCase();if(r.includes("wc@")||r.includes("walletconnect")||r.includes("wc_")||r.includes("wallet_connect")){const r=await e.getItem(n);await t.setItem(n,r),o.push(n)}}await t.setItem(r,1),n(t),Fp(e,o)})(e,new jp,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise((e=>{const t=setInterval((()=>{this.initialized&&(clearInterval(t),e())}),20)}))}}class zp{}class Hp extends zp{constructor(e){super()}}const Wp=To.FIVE_SECONDS,qp="heartbeat_pulse";class Vp extends Hp{constructor(e){super(e),this.events=new mo.EventEmitter,this.interval=Wp,this.interval=e?.interval||Wp}static async init(e){const t=new Vp(e);return await t.init(),t}
9688async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async initialize(){this.intervalRef=setInterval((()=>this.pulse()),(0,To.toMiliseconds)(this.interval))}pulse(){this.events.emit(qp)}}var Gp=n(9758),Kp=n.n(Gp);const Zp="info",Yp="custom_context",Qp=1024e3;class Jp{constructor(e){this.nodeValue=e,this.sizeInBytes=(new TextEncoder).encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class Xp{constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){const t=new Jp(e);if(t.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=t),this.tail=t):(this.head=t,this.tail=t),this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let t=this.head;for(;null!==t;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const t=e.value;return e=e.next,{done:!1,value:t}}}}}class ef{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qp;this.level=e??"error",this.levelValue=Gp.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new Xp(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,t){t===Gp.levels.values.error?console.error(e):t===Gp.levels.values.warn?console.warn(e):t===Gp.levels.values.debug?console.debug(e):t===Gp.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append(Op({timestamp:(new Date).toISOString(),log:e}));const t="string"==typeof e?JSON.parse(e).level:e.level;t>=this.levelValue&&this.forwardToConsole(e,t)}getLogs(){return this.logs}clearLogs(){this.logs=new Xp(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const t=this.getLogArray();return t.push(Op({extraMetadata:e})),new Blob(t,{type:"application/json"})}}class tf{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qp;this.baseChunkLogger=new ef(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const t=URL.createObjectURL(this.logsToBlob(e)),n=document.createElement("a");n.href=t,n.download=`walletconnect-logs-${(new Date).toISOString()}.txt`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}}class nf{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qp;this.baseChunkLogger=new ef(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}}var rf=Object.defineProperty,sf=Object.defineProperties,of=Object.getOwnPropertyDescriptors,af=Object.getOwnPropertySymbols,cf=Object.prototype.hasOwnProperty,lf=Object.prototype.propertyIsEnumerable,uf=(e,t,n)=>t in e?rf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,df=(e,t)=>{for(var n in t||(t={}))cf.call(t,n)&&uf(e,n,t[n]);if(af)for(var n of af(t))lf.call(t,n)&&uf(e,n,t[n]);return e},hf=(e,t)=>sf(e,of(t));function pf(e){return hf(df({},e),{level:e?.level||Zp})}function ff(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yp,n="";return n=typeof e.bindings>"u"?function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yp]||""}(e,t):e.bindings().context||"",n}function mf(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Yp;const r=function(e,t){const n=ff(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:Yp);return n.trim()?`${n}/${t}`:t}(e,t,n);return function(e,t){return e[arguments.length>2&&void 0!==arguments[2]?arguments[2]:Yp]=t,e}(e.child({context:r}),r,n)}function gf(e){return typeof e.loggerOverride<"u"&&"string"!=typeof e.loggerOverride?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?function(e){var t,n;const r=new tf(null==(t=e.opts)?void 0:t.level,e.maxSizeInBytes);return{logger:Kp()(hf(df({},e.opts),{level:"trace",browser:hf(df({},null==(n=e.opts)?void 0:n.browser),{write:e=>r.write(e)})})),chunkLoggerController:r}}(e):function(e){var t;const n=new nf(null==(t=e.opts)?void 0:t.level,e.maxSizeInBytes);return{logger:Kp()(hf(df({},e.opts),{level:"trace"}),n),chunkLoggerController:n}}(e)}class yf extends zp{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class vf extends zp{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}}class wf{constructor(e,t){this.logger=e,this.core=t}}class bf extends zp{constructor(e,t){super(),this.relayer=e,this.logger=t}}class xf extends zp{constructor(e){super()}}class Ef{constructor(e,t,n,r){this.core=e,this.logger=t,this.name=n}}class _f extends zp{constructor(e,t){super(),this.relayer=e,this.logger=t}}class kf extends zp{constructor(e,t){super(),this.core=e,this.logger=t}}class Cf{constructor(e,t){this.projectId=e,this.logger=t}}class Af{constructor(e,t){this.projectId=e,this.logger=t}}go();class Sf{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}mo.EventEmitter;class If{constructor(e){this.client=e}}var Tf=n(4914);const Pf="base64url",Nf="did",Rf="key",Of="base58btc";var Mf=n(9055),jf=n(4262),Lf=n(9477);function Df(e){return(0,jf.d)((0,Lf.s)(Op(e),"utf8"),Pf)}function Bf(e){const t=(0,Lf.s)("K36",Of),n="z"+(0,jf.d)((0,Mf.x)([t,e]),Of);return[Nf,Rf,n].join(":")}function Uf(e){return(0,jf.d)(e,Pf)}function Ff(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,jo.randomBytes)(32);return Tf.K(e)}async function $f(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:(0,To.fromMiliseconds)(Date.now());const s={alg:"EdDSA",typ:"JWT"},o={iss:Bf(r.publicKey),sub:e,aud:t,iat:i,exp:i+n},a=(c={header:s,payload:o},(0,Lf.s)([Df(c.header),Df(c.payload)].join("."),"utf8"));var c;return function(e){return[Df(e.header),Df(e.payload),Uf(e.signature)].join(".")}({header:s,payload:o,signature:Tf._S(r.secretKey,a)})}n(8023);const zf="PARSE_ERROR",Hf="INVALID_REQUEST",Wf="METHOD_NOT_FOUND",qf="INVALID_PARAMS",Vf="INTERNAL_ERROR",Gf="SERVER_ERROR",Kf=[-32700,-32600,-32601,-32602,-32603],Zf={[zf]:{code:-32700,message:"Parse error"},[Hf]:{code:-32600,message:"Invalid Request"},[Wf]:{code:-32601,message:"Method not found"},[qf]:{code:-32602,message:"Invalid params"},[Vf]:{code:-32603,message:"Internal error"},[Gf]:{code:-32e3,message:"Server error"}},Yf=Gf;function Qf(e){return Kf.includes(e)}function Jf(e){return Object.keys(Zf).includes(e)?Zf[e]:Zf[Yf]}function Xf(e){const t=Object.values(Zf).find((t=>t.code===e));return t||Zf[Yf]}function em(e,t,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${t}`):e}var tm=n(1776);function nm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;
9688return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function rm(){return BigInt(nm(arguments.length>0&&void 0!==arguments[0]?arguments[0]:6))}function im(e,t,n){return{id:n||nm(),jsonrpc:"2.0",method:e,params:t}}function sm(e,t){return{id:e,jsonrpc:"2.0",result:t}}function om(e,t,n){return{id:e,jsonrpc:"2.0",error:am(t,n)}}function am(e,t){return"undefined"===typeof e?Jf(Vf):("string"===typeof e&&(e=Object.assign(Object.assign({},Jf(Gf)),{message:e})),"undefined"!==typeof t&&(e.data=t),Qf(e.code)&&(e=Xf(e.code)),e)}class cm{}class lm extends cm{constructor(){super()}}class um extends lm{constructor(e){super()}}function dm(e,t){const n=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return"undefined"!==typeof n&&new RegExp(t).test(n)}function hm(e){return dm(e,"^https?:")}function pm(e){return dm(e,"^wss?:")}function fm(e){return"object"===typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function mm(e){return fm(e)&&"method"in e}function gm(e){return fm(e)&&(ym(e)||vm(e))}function ym(e){return"result"in e}function vm(e){return"error"in e}class wm extends um{constructor(e){super(e),this.events=new mo.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(im(e.method,e.params||[],e.id||rm().toString()),t)}async requestStrict(e,t){return new Promise((async(n,r)=>{if(!this.connection.connected)try{await this.open()}catch(i){r(i)}this.events.on(`${e.id}`,(e=>{vm(e)?r(e.error):n(e.result)}));try{await this.connection.send(e,t)}catch(i){r(i)}}))}setConnection(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection}onPayload(e){this.events.emit("payload",e),gm(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}const bm=e=>e.split("?")[0],xm=typeof WebSocket<"u"?WebSocket:typeof n.g<"u"&&typeof n.g.WebSocket<"u"?n.g.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:n(726);class Em{constructor(e){if(this.url=e,this.events=new mo.EventEmitter,this.registering=!1,!pm(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;await this.register(e)}async close(){return new Promise(((e,t)=>{typeof this.socket>"u"?t(new Error("Connection already closed")):(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close())}))}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(Op(e))}catch(jt){this.onError(e.id,jt)}}register(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;
9688if(!pm(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,r)=>{const i=new URLSearchParams(e).get("origin"),s=(0,tm.isReactNative)()?{headers:{origin:i}}:{rejectUnauthorized:(a=e,!new RegExp("wss?://localhost(:d{2,5})?").test(a))},o=new xm(e,[],s);var a;typeof WebSocket<"u"||typeof n.g<"u"&&typeof n.g.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?o.onerror=e=>{const t=e;r(this.emitError(t.error))}:o.on("error",(e=>{r(this.emitError(e))})),o.onopen=()=>{this.onOpen(o),t(o)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?Rp(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=om(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.url;return em(e,bm(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${bm(this.url)}`));return this.events.emit("register_error",t),t}}var _m=n(1812),km=n.n(_m),Cm=n(2838),Am=n.n(Cm);var Sm=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var s=e.charAt(i),o=s.charCodeAt(0);if(255!==n[o])throw new TypeError(s+" is ambiguous");n[o]=i}var a=e.length,c=e.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var s=(e.length-t)*l+1>>>0,o=new Uint8Array(s);e[t];){var u=n[e.charCodeAt(t)];if(255===u)return;for(var d=0,h=s-1;(0!==u||d<i)&&-1!==h;h--,d++)u+=a*o[h]>>>0,o[h]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=s-i;p!==s&&0===o[p];)p++;for(var f=new Uint8Array(r+(s-p)),m=r;p!==s;)f[m++]=o[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,s=t.length;i!==s&&0===t[i];)i++,n++;for(var o=(s-i)*u+1>>>0,l=new Uint8Array(o);i!==s;){for(var d=t[i],h=0,p=o-1;(0!==d||h<r)&&-1!==p;p--,h++)d+=256*l[p]>>>0,l[p]=d%a>>>0,d=d/a>>>0;if(0!==d)throw new Error("Non-zero carry");r=h,i++}for(var f=o-r;f!==o&&0===l[f];)f++;for(var m=c.repeat(n);f<o;++f)m+=e.charAt(l[f]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},Im=Sm;const Tm=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class Pm{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Nm{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name}
9688 decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return Om(this,e)}}class Rm{constructor(e){this.decoders=e}or(e){return Om(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Om=(e,t)=>new Rm({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class Mm{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new Pm(e,t,n),this.decoder=new Nm(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const jm=e=>{let{name:t,prefix:n,encode:r,decode:i}=e;return new Mm(t,n,r,i)},Lm=e=>{let{prefix:t,name:n,alphabet:r}=e;const{encode:i,decode:s}=Im(r,n);return jm({prefix:t,name:n,encode:i,decode:e=>Tm(s(e))})},Dm=e=>{let{name:t,prefix:n,bitsPerChar:r,alphabet:i}=e;return jm({prefix:n,name:t,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let s="",o=0,a=0;for(let c=0;c<e.length;++c)for(a=a<<8|e[c],o+=8;o>n;)o-=n,s+=t[i&a>>o];if(o&&(s+=t[i&a<<n-o]),r)for(;s.length*n&7;)s+="=";return s})(e,i,r),decode:e=>((e,t,n,r)=>{const i={};for(let u=0;u<t.length;++u)i[t[u]]=u;let s=e.length;for(;"="===e[s-1];)--s;const o=new Uint8Array(s*n/8|0);let a=0,c=0,l=0;for(let u=0;u<s;++u){const t=i[e[u]];if(void 0===t)throw new SyntaxError(`Non-${r} character`);c=c<<n|t,a+=n,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=n||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o})(e,i,r,t)})},Bm=jm({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var Um=Object.freeze({__proto__:null,identity:Bm});const Fm=Dm({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var $m=Object.freeze({__proto__:null,base2:Fm});const zm=Dm({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Hm=Object.freeze({__proto__:null,base8:zm});const Wm=Lm({prefix:"9",name:"base10",alphabet:"0123456789"});var qm=Object.freeze({__proto__:null,base10:Wm});const Vm=Dm({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Gm=Dm({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Km=Object.freeze({__proto__:null,base16:Vm,base16upper:Gm});const Zm=Dm({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Ym=Dm({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Qm=Dm({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Jm=Dm({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Xm=Dm({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),eg=Dm({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),tg=Dm({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),ng=Dm({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),rg=Dm({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var ig=Object.freeze({__proto__:null,base32:Zm,base32upper:Ym,base32pad:Qm,base32padupper:Jm,base32hex:Xm,base32hexupper:eg,base32hexpad:tg,base32hexpadupper:ng,base32z:rg});const sg=Lm({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),og=Lm({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var ag=Object.freeze({__proto__:null,base36:sg,base36upper:og});const cg=Lm({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),lg=Lm({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var ug=Object.freeze({__proto__:null,base58btc:cg,base58flickr:lg});const dg=Dm({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
9688+/",bitsPerChar:6}),hg=Dm({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),pg=Dm({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),fg=Dm({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var mg=Object.freeze({__proto__:null,base64:dg,base64pad:hg,base64url:pg,base64urlpad:fg});const gg=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),yg=gg.reduce(((e,t,n)=>(e[n]=t,e)),[]),vg=gg.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const wg=jm({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=yg[t]),"")},decode:function(e){const t=[];for(const n of e){const e=vg[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var bg=Object.freeze({__proto__:null,base256emoji:wg}),xg=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=kg;)n[r++]=255&t|Eg,t/=128;for(;t&_g;)n[r++]=255&t|Eg,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},Eg=128,_g=-128,kg=Math.pow(2,31);var Cg=function e(t,n){var r,i=0,s=(n=n||0,0),o=n,a=t.length;do{if(o>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[o++],i+=s<28?(r&Sg)<<s:(r&Sg)*Math.pow(2,s),s+=7}while(r>=Ag);return e.bytes=o-n,i},Ag=128,Sg=127;var Ig=Math.pow(2,7),Tg=Math.pow(2,14),Pg=Math.pow(2,21),Ng=Math.pow(2,28),Rg=Math.pow(2,35),Og=Math.pow(2,42),Mg=Math.pow(2,49),jg=Math.pow(2,56),Lg=Math.pow(2,63),Dg={encode:xg,decode:Cg,encodingLength:function(e){return e<Ig?1:e<Tg?2:e<Pg?3:e<Ng?4:e<Rg?5:e<Og?6:e<Mg?7:e<jg?8:e<Lg?9:10}},Bg=Dg;const Ug=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Bg.encode(e,t,n),t},Fg=e=>Bg.encodingLength(e),$g=(e,t)=>{const n=t.byteLength,r=Fg(e),i=r+Fg(n),s=new Uint8Array(i+n);
9688return Ug(e,s,0),Ug(n,s,r),s.set(t,i),new zg(e,n,t,s)};class zg{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const Hg=e=>{let{name:t,code:n,encode:r}=e;return new Wg(t,n,r)};class Wg{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?$g(this.code,t):t.then((e=>$g(this.code,e)))}throw Error("Unknown type, must be binary type")}}const qg=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Vg=Hg({name:"sha2-256",code:18,encode:qg("SHA-256")}),Gg=Hg({name:"sha2-512",code:19,encode:qg("SHA-512")});Object.freeze({__proto__:null,sha256:Vg,sha512:Gg});const Kg=Tm,Zg={code:0,name:"identity",encode:Kg,digest:e=>$g(0,Kg(e))};Object.freeze({__proto__:null,identity:Zg});new TextEncoder,new TextDecoder;const Yg={...Um,...$m,...Hm,...qm,...Km,...ig,...ag,...ug,...mg,...bg};function Qg(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const Jg=Qg("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Xg=Qg("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),ey={utf8:Jg,"utf-8":Jg,hex:Yg.base16,latin1:Xg,ascii:Xg,binary:Xg,...Yg};const ty="core",ny=`wc@2:${ty}:`,ry="error",iy={database:":memory:"},sy="client_ed25519_seed",oy=To.ONE_DAY,ay=To.SIX_HOURS,cy="wss://relay.walletconnect.com",ly="wss://relay.walletconnect.org",uy="relayer_message",dy="relayer_message_ack",hy="relayer_connect",py="relayer_disconnect",fy="relayer_error",my="relayer_connection_stalled",gy="relayer_publish",yy="payload",vy="connect",wy="disconnect",by="error",xy=To.ONE_SECOND,Ey="subscription_created",_y="subscription_deleted",ky="subscription_sync",Cy="subscription_resubscribed",Ay=1e3*To.FIVE_SECONDS,Sy={wc_pairingDelete:{req:{ttl:To.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:To.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:To.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:To.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:To.ONE_DAY,prompt:!1,tag:0},res:{ttl:To.ONE_DAY,prompt:!1,tag:0}}},Iy="pairing_create",Ty="pairing_expire",Py="pairing_delete",Ny="pairing_ping",Ry="history_created",Oy="history_updated",My="history_deleted",jy="history_sync",Ly="expirer_created",Dy="expirer_deleted",By="expirer_expired",Uy="expirer_sync",Fy="verify-api",$y="https://verify.walletconnect.com",zy="https://verify.walletconnect.org",Hy=[$y,zy];class Wy{constructor(e,t){this.core=e,this.logger=t,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=ny,this.init=async()=>{if(!this.initialized){const e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();const t=this.keychain.get(e);if(typeof t>"u"){const{message:t}=Fh("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=mf(t,this.name)}get context(){return ff(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,ca(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?la(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=Fh("NOT_INITIALIZED",this.name);throw new Error(e)}}}class qy{constructor(e,t,n){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>{this.isInitialized();return Bf(Ff(await this.getClientSeed()).publicKey)},this.generateKeyPair=()=>{this.isInitialized();const e=function(){const e=Do.TZ();return{privateKey:(0,Bo.dI)(e.secretKey,lh),publicKey:(0,Bo.dI)(e.publicKey,lh)}}();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=Ff(await this.getClientSeed()),n=hh(),r=oy;return await $f(n,e,r,t)},this.generateSharedKey=(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=Do.Tc((0,Bo.sH)(e,lh),(0,Bo.sH)(t,lh),!0),r=new Mo.i(Lo.aD,n).expand(32);return(0,Bo.dI)(r,lh)}(this.getPrivateKey(e),t);return this.setSymKey(r,n)},this.setSymKey=async(e,t)=>{this.isInitialized();const n=t||ph(e);return await this.keychain.set(n,e),n},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,n)=>{this.isInitialized();const r=vh(n),i=Op(t);if(wh(r)){const t=r.senderPublicKey,n=r.receiverPublicKey;e=await this.generateSharedKey(t,n)}const s=this.getSymKey(e),{type:o,senderPublicKey:a}=r;return gh({type:o,symKey:s,message:i,senderPublicKey:a})},this.decode=async(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=yh(e);return vh({type:mh(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?(0,Bo.dI)(n.senderPublicKey,lh):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,n);if(wh(r)){const t=r.receiverPublicKey,n=r.senderPublicKey;e=await this.generateSharedKey(t,n)}try{const n=function(e){const t=new Oo.g6((0,Bo.sH)(e.symKey,lh)),{sealed:n,iv:r}=yh(e.encoded),i=t.open(r,n);if(null===i)throw new Error("Failed to decrypt");return(0,Bo.dI)(i,dh)}({symKey:this.getSymKey(e),encoded:t});return Rp(n)}catch(i){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(i)}},this.getPayloadType=e=>mh(yh(e).type),this.getPayloadSenderPublicKey=e=>{const t=yh(e);return t.senderPublicKey?(0,Bo.dI)(t.senderPublicKey,lh):void 0},this.core=e,this.logger=mf(t,this.name),this.keychain=n||new Wy(this.core,this.logger)}get context(){return ff(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(sy)}catch{e=hh(),await this.keychain.set(sy,e)}return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const n=ey[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):globalThis.Buffer.from(e,"utf8")}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=Fh("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Vy extends wf{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=ny,this.init=async()=>
9688{if(!this.initialized){this.logger.trace("Initialized");try{const e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();const n=fh(t);let r=this.messages.get(e);return typeof r>"u"&&(r={}),typeof r[n]<"u"||(r[n]=t,this.messages.set(e,r),await this.persist()),n},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>{this.isInitialized();return typeof this.get(e)[fh(t)]<"u"},this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=mf(e,this.name),this.core=t}get context(){return ff(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,ca(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?la(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=Fh("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Gy extends bf{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new mo.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,To.toMiliseconds)(To.ONE_MINUTE),this.failedPublishTimeout=(0,To.toMiliseconds)(To.ONE_SECOND),this.needsTransportRestart=!1,this.publish=async(e,t,n)=>{var r;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}});const i=n?.ttl||ay,s=bh(n),o=n?.prompt||!1,a=n?.tag||0,c=n?.id||rm().toString(),l={topic:e,message:t,opts:{ttl:i,relay:s,prompt:o,tag:a,id:c}},u=`Failed to publish payload, please try again. id:${c} tag:${a}`,d=Date.now();let h,p=1;try{for(;void 0===h;){if(Date.now()-d>this.publishTimeout)throw new Error(u);this.logger.trace({id:c,attempts:p},`publisher.publish - attempt ${p}`),h=await await da(this.rpcPublish(e,t,i,s,o,a,c).catch((e=>this.logger.warn(e))),this.publishTimeout,u),p++,h||await new Promise((e=>setTimeout(e,this.failedPublishTimeout)))}this.relayer.events.emit(gy,l),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{id:c,topic:e,message:t,opts:n}})}catch(f){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(f),null!=(r=n?.internal)&&r.throwOnFailedPublish)throw f;this.queue.set(c,l)}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=mf(t,this.name),this.registerEventListeners()}get context(){return ff(this.logger)}rpcPublish(e,t,n,r,i,s,o){var a,c,l,u;const d={method:xh(r.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:i,tag:s},id:o};return Wh(null==(a=d.params)?void 0:a.prompt)&&(null==(c=d.params)||delete c.prompt),Wh(null==(l=d.params)?void 0:l.tag)&&(null==(u=d.params)||delete u.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:d}),this.relayer.request(d)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{const{topic:t,message:n,opts:r}=e;await this.publish(t,n,r)}))}registerEventListeners(){this.relayer.core.heartbeat.on(qp,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(my);this.checkQueue()})),this.relayer.on(dy,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class Ky{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);
9688if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const r=n.filter((e=>e!==t));r.length?this.map.set(e,r):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var Zy=Object.defineProperty,Yy=Object.defineProperties,Qy=Object.getOwnPropertyDescriptors,Jy=Object.getOwnPropertySymbols,Xy=Object.prototype.hasOwnProperty,ev=Object.prototype.propertyIsEnumerable,tv=(e,t,n)=>t in e?Zy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nv=(e,t)=>{for(var n in t||(t={}))Xy.call(t,n)&&tv(e,n,t[n]);if(Jy)for(var n of Jy(t))ev.call(t,n)&&tv(e,n,t[n]);return e},rv=(e,t)=>Yy(e,Qy(t));class iv extends _f{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Ky,this.events=new mo.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=ny,this.subscribeTimeout=(0,To.toMiliseconds)(To.ONE_MINUTE),this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.pendingBatchMessages=[],this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{const n=bh(t),r={topic:e,relay:n};this.pending.set(e,r);const i=await this.rpcSubscribe(e,n);return"string"==typeof i&&(this.onSubscribe(i,r),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}})),i}catch(n){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(n),n}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof t?.id<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>{if(this.topics.includes(e))return!0;const t=`${this.pendingSubscriptionWatchLabel}_${e}`;return await new Promise(((n,r)=>{const i=new To.Watch;i.start(t);const s=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(s),i.stop(t),n(!0)),i.elapsed(t)>=Ay&&(clearInterval(s),i.stop(t),r(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1))},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.start=async()=>{await this.onConnect()},this.stop=async()=>{await this.onDisconnect()},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=mf(t,this.name),this.clientId=""}get context(){return ff(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const n=this.topicMap.get(e);await Promise.all(n.map((async n=>await this.unsubscribeById(e,n,t))))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const r=bh(n);await this.rpcUnsubscribe(e,t,r);const i=$h("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(r){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(r),r}}async rpcSubscribe(e,t){const n={method:xh(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await da(this.relayer.request(n).catch((e=>this.logger.warn(e))),this.subscribeTimeout)?fh(e+this.clientId):null}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(my)}return null}async rpcBatchSubscribe(e){if(!e.length)return;const t={method:xh(e[0].relay.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{return await await da(this.relayer.request(t).catch((e=>this.logger.warn(e))),this.subscribeTimeout)}catch{this.relayer.events.emit(my)}}async rpcBatchFetchMessages(e){if(!e.length)return;const t={method:xh(e[0].relay.protocol).batchFetchMessages,params:{topics:e.map((e=>e.topic))}};let n;this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{n=await await da(this.relayer.request(t).catch((e=>this.logger.warn(e))),this.subscribeTimeout)}catch{this.relayer.events.emit(my)}return n}rpcUnsubscribe(e,t,n){const r={method:xh(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r}),this.relayer.request(r)}onSubscribe(e,t){this.setSubscription(e,rv(nv({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,nv({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}
9688async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t)}addSubscription(e,t){this.subscriptions.set(e,nv({},t)),this.topicMap.set(t.topic,e),this.events.emit(Ey,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:t}=Fh("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(_y,rv(nv({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(ky)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t<e;t++){const e=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchFetchMessages(e),await this.batchSubscribe(e)}}this.events.emit(Cy)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=Fh("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);zh(t)&&this.onBatchSubscribe(t.map(((t,n)=>rv(nv({},e[n]),{id:t}))))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);const t=await this.rpcBatchFetchMessages(e);t&&t.messages&&(this.pendingBatchMessages=this.pendingBatchMessages.concat(t.messages))}async onConnect(){await this.restart(),this.onEnable()}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||!this.relayer.connected)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e),this.pendingBatchMessages.length&&(await this.relayer.handleBatchMessageEvents(this.pendingBatchMessages),this.pendingBatchMessages=[])}registerEventListeners(){this.relayer.core.heartbeat.on(qp,(async()=>{await this.checkPending()})),this.events.on(Ey,(async e=>{const t=Ey;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(_y,(async e=>{const t=_y;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=Fh("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}}var sv=Object.defineProperty,ov=Object.getOwnPropertySymbols,av=Object.prototype.hasOwnProperty,cv=Object.prototype.propertyIsEnumerable,lv=(e,t,n)=>t in e?sv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class uv extends xf{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new mo.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","stalled","interrupted"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.heartBeatTimeout=(0,To.toMiliseconds)(To.THIRTY_SECONDS+To.ONE_SECOND),this.request=async e=>{var t,n;this.logger.debug("Publishing Request Payload");const r=e.id||rm().toString();await this.toEstablishConnection();try{const i=this.provider.request(e);this.requestsInFlight.set(r,{promise:i,request:e}),this.logger.trace({id:r,method:e.method,topic:null==(t=e.params)?void 0:t.topic},"relayer.request - attempt to publish...");const s=await new Promise((async(e,t)=>{const n=()=>{t(new Error(`relayer.request - publish interrupted, id: ${r}`))};this.provider.on(wy,n);const s=await i;this.provider.off(wy,n),e(s)}));return this.logger.trace({id:r,method:e.method,topic:null==(n=e.params)?void 0:n.topic},"relayer.request - published"),s}catch(i){throw this.logger.debug(`Failed to Publish Request: ${r}`),i}finally{this.requestsInFlight.delete(r)}},this.resetPingTimeout=()=>{if(ta())try{clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout((()=>{var e,t,n;null==(n=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)||n.terminate()}),this.heartBeatTimeout)}catch(jt){this.logger.warn(jt)}},this.onPayloadHandler=e=>{this.onProviderPayload(e),this.resetPingTimeout()},this.onConnectHandler=()=>{this.startPingTimeout(),this.events.emit(hy)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(fy,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(yy,this.onPayloadHandler),this.provider.on(vy,this.onConnectHandler),this.provider.on(wy,this.onDisconnectHandler),this.provider.on(by,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?mf(e.logger,this.name):Kp()(pf({level:e.logger||"error"})),this.messages=new Vy(this.logger,e.core),this.subscriber=new iv(this,this.logger),this.publisher=new Gy(this,this.logger),this.relayUrl=e?.relayUrl||cy,this.projectId=e.projectId,this.bundleId=function(){var e;try{return na()&&typeof n.g<"u"&&typeof(null==n.g?void 0:n.g.Application)<"u"?null==(e=n.g.Application)?void 0:e.applicationId:void 0}catch{return}}(),this.provider={}}
9688async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${ly}...`),await this.restartTransport(ly)}this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&0===this.subscriber.pending.size&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return ff(this.logger)}get connected(){var e,t,n;return 1===(null==(n=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:n.readyState)}get connecting(){var e,t,n;return 0===(null==(n=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:n.readyState)}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var n;this.isInitialized();let r,i=(null==(n=this.subscriber.topicMap.get(e))?void 0:n[0])||"";const s=t=>{t.topic===e&&(this.subscriber.off(Ey,s),r())};return await Promise.all([new Promise((e=>{r=e,this.subscriber.on(Ey,s)})),new Promise((async n=>{i=await this.subscriber.subscribe(e,t)||i,n()}))]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportDisconnect(){if(!this.hasExperiencedNetworkDisruption&&this.connected&&this.requestsInFlight.size>0)try{await Promise.all(Array.from(this.requestsInFlight.values()).map((e=>e.promise)))}catch(e){this.logger.warn(e)}this.hasExperiencedNetworkDisruption||this.connected?await da(this.provider.disconnect(),2e3,"provider.disconnect()").catch((()=>this.onProviderDisconnect())):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),await this.createProvider(),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;try{await new Promise((async(e,t)=>{const n=()=>{this.provider.off(wy,n),t(new Error("Connection interrupted while trying to subscribe"))};this.provider.on(wy,n),await da(this.provider.connect(),(0,To.toMiliseconds)(To.ONE_MINUTE),`Socket stalled when trying to connect to ${this.relayUrl}`).catch((e=>{t(e)})),await this.subscriber.start(),this.hasExperiencedNetworkDisruption=!1,e()}))}catch(jt){this.logger.error(jt);const t=jt;if(this.hasExperiencedNetworkDisruption=!0,!this.isConnectionStalled(t.message))throw jt}finally{this.connectionAttemptInProgress=!1}}async restartTransport(e){this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await op())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if(0===e?.length)return void this.logger.trace("Batch message events is empty. Ignoring...");const t=e.sort(((e,t)=>e.publishedAt-t.publishedAt));this.logger.trace(`Batch of ${t.length} message events sorted`);for(const r of t)try{await this.onMessageEvent(r)}catch(n){this.logger.warn(n)}this.logger.trace(`Batch of ${t.length} message events processed`)}startPingTimeout(){var e,t,n,r,i;if(ta())try{null!=(t=null==(e=this.provider)?void 0:e.connection)&&t.socket&&(null==(i=null==(r=null==(n=this.provider)?void 0:n.connection)?void 0:r.socket)||i.once("ping",(()=>{this.resetPingTimeout()}))),this.resetPingTimeout()}catch(s){this.logger.warn(s)}}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new wm(new Em(oa({sdkVersion:"2.13.0",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:n}=e;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(e){const{topic:t,message:n}=e;if(!n||0===n.length)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const r=this.messages.has(t,n);return r&&this.logger.debug(`Ignoring duplicate message: ${n}`),r}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),mm(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:n,message:r,publishedAt:i}=t.data,s={topic:n,message:r,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var n in t||(t={}))av.call(t,n)&&lv(e,n,t[n]);if(ov)for(var n of ov(t))cv.call(t,n)&&lv(e,n,t[n]);return e})({type:"event",event:t.id}
9688,s)),this.events.emit(t.id,s),await this.acknowledgePayload(e),await this.onMessageEvent(s)}else gm(e)&&this.events.emit(dy,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(uy,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=sm(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(yy,this.onPayloadHandler),this.provider.off(vy,this.onConnectHandler),this.provider.off(wy,this.onDisconnectHandler),this.provider.off(by,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await op();ap((async t=>{e!==t&&(e=t,t?await this.restartTransport().catch((e=>this.logger.error(e))):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}))}async onProviderDisconnect(){await this.subscriber.stop(),this.requestsInFlight.clear(),clearTimeout(this.pingTimeout),this.events.emit(py),this.connectionAttemptInProgress=!1,!this.transportExplicitlyClosed&&setTimeout((async()=>{await this.transportOpen().catch((e=>this.logger.error(e)))}),(0,To.toMiliseconds)(xy))}isInitialized(){if(!this.initialized){const{message:e}=Fh("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){await this.confirmOnlineStateOrThrow(),!this.connected&&(this.connectionAttemptInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)})),await this.transportOpen())}}var dv=Object.defineProperty,hv=Object.getOwnPropertySymbols,pv=Object.prototype.hasOwnProperty,fv=Object.prototype.propertyIsEnumerable,mv=(e,t,n)=>t in e?dv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gv=(e,t)=>{for(var n in t||(t={}))pv.call(t,n)&&mv(e,n,t[n]);if(hv)for(var n of hv(t))fv.call(t,n)&&mv(e,n,t[n]);return e};class yv extends Ef{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ny,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;super(e,t,n,r),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=ny,this.recentlyDeleted=[],this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!Wh(e)?this.map.set(this.getKey(e),e):function(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}(e)?this.map.set(e.id,e):function(e){return e?.topic}(e)&&this.map.set(e.topic,e)})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((n=>km()(t[n],e[n]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});const n=gv(gv({},this.getData(e)),t);this.map.set(e,n),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),this.addToRecentlyDeleted(e),await this.persist())},this.logger=mf(t,this.name),this.storagePrefix=r,this.getKey=i}get context(){return ff(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){if(this.recentlyDeleted.includes(e)){const{message:t}=Fh("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}const{message:t}=Fh("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}
9688async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:e}=Fh("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=Fh("NOT_INITIALIZED",this.name);throw new Error(e)}}}class vv{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new(go()),this.initialized=!1,this.storagePrefix=ny,this.ignoredPayloadTypes=[1],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=e=>{let{methods:t}=e;this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...t])]},this.create=async e=>{this.isInitialized();const t=hh(),n=await this.core.crypto.setSymKey(t),r=fa(To.FIVE_MINUTES),i={protocol:"irn"},s={topic:n,expiry:r,relay:i,active:!1},o=Oh({protocol:this.core.protocol,version:this.core.version,topic:n,symKey:t,relay:i,expiryTimestamp:r,methods:e?.methods});return this.core.expirer.set(n,r),await this.pairings.set(n,s),await this.core.relayer.subscribe(n),{topic:n,uri:o}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:n,relay:r,expiryTimestamp:i,methods:s}=Nh(e.uri);let o;if(this.pairings.keys.includes(t)&&(o=this.pairings.get(t),o.active))throw new Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);const a=i||fa(To.FIVE_MINUTES),c={topic:t,relay:r,expiry:a,active:!1,methods:s};return this.core.expirer.set(t,a),await this.pairings.set(t,c),e.activatePairing&&await this.activate({topic:t}),this.events.emit(Iy,c),this.core.crypto.keychain.has(t)||await this.core.crypto.setSymKey(n,t),await this.core.relayer.subscribe(t,{relay:r}),c},this.activate=async e=>{let{topic:t}=e;this.isInitialized();const n=fa(To.THIRTY_DAYS);this.core.expirer.set(t,n),await this.pairings.update(t,{active:!0,expiry:n})},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.pairings.keys.includes(t)){const e=await this.sendRequest(t,"wc_pairingPing",{}),{done:n,resolve:r,reject:i}=ua();this.events.once(ga("pairing_ping",e),(e=>{let{error:t}=e;t?i(t):r()})),await n()}},this.updateExpiry=async e=>{let{topic:t,expiry:n}=e;this.isInitialized(),await this.pairings.update(t,{expiry:n})},this.updateMetadata=async e=>{let{topic:t,metadata:n}=e;this.isInitialized(),await this.pairings.update(t,{peerMetadata:n})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",$h("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,n)=>{const r=im(t,n),i=await this.core.crypto.encode(e,r),s=Sy[t].req;return this.core.history.set(e,r),this.core.relayer.publish(e,i,s),r.id},this.sendResult=async(e,t,n)=>{const r=sm(e,n),i=await this.core.crypto.encode(t,r),s=await this.core.history.get(t,e),o=Sy[s.request.method].res;await this.core.relayer.publish(t,i,o),await this.core.history.resolve(r)},this.sendError=async(e,t,n)=>{const r=om(e,n),i=await this.core.crypto.encode(t,r),s=await this.core.history.get(t,e),o=Sy[s.request.method]?Sy[s.request.method].res:Sy.unregistered_method.res;await this.core.relayer.publish(t,i,o),await this.core.history.resolve(r)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,$h("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{const e=this.pairings.getAll().filter((e=>ma(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{const{topic:t,payload:n}=e;switch(n.method){case"wc_pairingPing":return this.onPairingPingRequest(t,n);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,n);default:return this.onUnknownRpcMethodRequest(t,n)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.core.history.get(t,n.id)).request.method;return"wc_pairingPing"===r?this.onPairingPingResponse(t,n):this.onUnknownRpcMethodResponse(r)},this.onPairingPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult(n,e,!0),this.events.emit(Ny,{id:n,topic:e})}catch(r){await this.sendError(n,e,r),this.logger.error(r)}},this.onPairingPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{ym(t)?this.events.emit(ga("pairing_ping",n),{}):vm(t)&&this.events.emit(ga("pairing_ping",n),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(Py,{id:n,topic:e})}catch(r){await this.sendError(n,e,r),this.logger.error(r)}},this.onUnknownRpcMethodRequest=async(e,t)=>{const{id:n,method:r}=t;try{if(this.registeredMethods.includes(r))return;const t=$h("WC_METHOD_UNSUPPORTED",r);await this.sendError(n,e,t),this.logger.error(t)}catch(wf){await this.sendError(n,e,wf),this.logger.error(wf)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error($h("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!function(e){if(qh(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}(e.uri)){const{message:t}=Fh("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}const n=Nh(e.uri);if(null==(t=n?.relay)||!t.protocol){const{message:e}=Fh("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==n||!n.symKey){const{message:e}=Fh("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}if(null!=n&&n.expiryTimestamp&&(0,To.toMiliseconds)(n?.expiryTimestamp)<Date.now()){const{message:e}=Fh("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(e)}},this.isValidPing=async e=>{if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!qh(e,!1)){const{message:t}=Fh("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=Fh("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(ma(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=Fh("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=mf(t,this.name),this.pairings=new yv(this.core,this.logger,this.name,this.storagePrefix)}get context(){return ff(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=Fh("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(uy,(async e=>{const{topic:t,message:n}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const r=await this.core.crypto.decode(t,n);try{mm(r)?(this.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):gm(r)&&(await this.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.core.history.delete(t,r.id))}catch(i){this.logger.error(i)}}))}registerExpirerEvents(){this.core.expirer.on(By,(async e=>{const{topic:t}=pa(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(Ty,{topic:t}))}))}}class wv extends vf{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new mo.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=ny,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(
9688),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,n)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:n}),this.records.has(t.id))return;const r={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:n,expiry:fa(To.THIRTY_DAYS)};this.records.set(r.id,r),this.persist(),this.events.emit(Ry,r)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;const t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=vm(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.persist(),this.events.emit(Oy,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((n=>{if(n.topic===e){if(typeof t<"u"&&n.id!==t)return;this.records.delete(n.id),this.events.emit(My,n)}})),this.persist()},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=mf(t,this.name)}get context(){return ff(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:im(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:t}=Fh("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(jy)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=Fh("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Ry,(e=>{const t=Ry;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})})),this.events.on(Oy,(e=>{const t=Oy;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})})),this.events.on(My,(e=>{const t=My;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})})),this.core.heartbeat.on(qp,(()=>{this.cleanup()}))}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach((t=>{(0,To.toMiliseconds)(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.records.delete(t.id),this.events.emit(My,t,!1),e=!0)})),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=Fh("NOT_INITIALIZED",this.name);throw new Error(e)}}}class bv extends kf{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new mo.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=ny,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(
9688),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{const t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();const n=this.formatTarget(e),r={target:n,expiry:t};this.expirations.set(n,r),this.checkExpiry(n,r),this.events.emit(Ly,{target:n,expiration:r})},this.get=e=>{this.isInitialized();const t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){const t=this.formatTarget(e),n=this.getExpiration(t);this.expirations.delete(t),this.events.emit(Dy,{target:t,expiration:n})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=mf(t,this.name)}get context(){return ff(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function(e){return ha("topic",e)}(e);if("number"==typeof e)return function(e){return ha("id",e)}(e);const{message:t}=Fh("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Uy)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=Fh("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:t}=Fh("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:n}=t;(0,To.toMiliseconds)(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(By,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(qp,(()=>this.checkExpirations())),this.events.on(Ly,(e=>{const t=Ly;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(By,(e=>{const t=By;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(Dy,(e=>{const t=Dy;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=Fh("NOT_INITIALIZED",this.name);throw new Error(e)}}}class xv extends Cf{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=Fy,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||na()||!ra())return;const t=this.getVerifyUrl(e?.verifyUrl);this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(n){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(n)}if(!this.initialized){this.removeIframe(),this.verifyUrl=zy;try{await this.createIframe()}catch(n){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(n),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{if(this.isDevEnv)return"";const t=this.getVerifyUrl(e?.verifyUrl);let n;try{n=await this.fetchAttestation(e.attestationId,t)}catch(r){this.logger.info(`failed to resolve attestation: ${e.attestationId} from url: ${t}`),this.logger.info(r),n=await this.fetchAttestation(e.attestationId,zy)}return n},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);const n=this.startAbortTimer(2*To.ONE_SECOND),r=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(n),200===r.status?await r.json():void 0},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach((e=>this.sendPost(e))),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e;const t=n=>{"verify_ready"===n.data&&(this.onInit(),window.removeEventListener("message",t),e())};await Promise.race([new Promise((n=>{const r=document.getElementById(Fy);if(r)return this.iframe=r,this.onInit(),n();window.addEventListener("message",t);const i=document.createElement("iframe");i.id=Fy,i.src=`${this.verifyUrl}/${this.projectId}`,i.style.display="none",document.body.append(i),this.iframe=i,e=n})),new Promise(((e,n)=>setTimeout((()=>{window.removeEventListener("message",t),n("verify iframe load timeout")}),(0,To.toMiliseconds)(To.FIVE_SECONDS))))])},this.onInit=()=>{this.initialized=!0,this.processQueue()},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||$y;return Hy.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${$y}`),t=$y),t},this.logger=mf(t,this.name),this.verifyUrl=$y,this.abortController=new AbortController,this.isDevEnv=ta()&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.IS_VITEST}get context(){return ff(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),(0,To.toMiliseconds)(e))}}class Ev extends Af{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context="echo",this.registerDeviceToken=async e=>{const{clientId:t,token:n,notificationType:r,enableEncrypted:i=!1}=e,s=`https://echo.walletconnect.com/${this.projectId}/clients`;await Am()(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:r,token:n,always_raw:i})})},this.logger=mf(t,this.context)}}var _v=Object.defineProperty,kv=Object.getOwnPropertySymbols,Cv=Object.prototype.hasOwnProperty,Av=Object.prototype.propertyIsEnumerable,Sv=(e,t,n)=>t in e?_v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Iv=(e,t)=>{for(var n in t||(t={}))Cv.call(t,n)&&Sv(e,n,t[n]);if(kv)for(var n of kv(t))Av.call(t,n)&&Sv(e,n,t[n]);return e};class Tv extends yf{constructor(e){var t;super(e),this.protocol="wc",this.version=2,this.name=ty,this.events=new mo.EventEmitter,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||cy,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const n=pf({level:"string"==typeof e?.logger&&e.logger?e.logger:ry}),{logger:r,chunkLoggerController:i}=gf({opts:n,maxSizeInBytes:e?.maxLogBlobSizeInBytes,loggerOverride:e?.logger});this.logChunkController=i,null!=(t=this.logChunkController)&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var e,t;null!=(e=this.logChunkController)&&e.downloadLogsBlobInBrowser&&(null==(t=this.logChunkController)||t.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=mf(r,this.name),this.heartbeat=new Vp,this.crypto=new qy(this,this.logger,e?.keychain),this.history=new wv(this,this.logger),this.expirer=new bv(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new $p(Iv(Iv({},iy),e?.storageOptions)),this.relayer=new uv({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new vv(this,this.logger),this.verify=new xv(this.projectId||"",this.logger),this.echoClient=new Ev(this.projectId||"",this.logger)}static async init(e){const t=new Tv(e);await t.initialize();const n=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",n),t}get context(){return ff(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return null==(e=this.logChunkController)?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(
9688),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const Pv=Tv,Nv="client",Rv=`wc@2:${Nv}:`,Ov=Nv,Mv="error",jv="WALLETCONNECT_DEEPLINK_CHOICE",Lv="Proposal expired",Dv=To.SEVEN_DAYS,Bv={wc_sessionPropose:{req:{ttl:To.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:To.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:To.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:To.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:To.ONE_DAY,prompt:!1,tag:1104},res:{ttl:To.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:To.ONE_DAY,prompt:!1,tag:1106},res:{ttl:To.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:To.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:To.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:To.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:To.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:To.ONE_DAY,prompt:!1,tag:1112},res:{ttl:To.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:To.ONE_DAY,prompt:!1,tag:1114},res:{ttl:To.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:To.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:To.ONE_HOUR,prompt:!1,tag:1117}}},Uv={min:To.FIVE_MINUTES,max:To.SEVEN_DAYS},Fv="IDLE",$v="ACTIVE",zv=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"],Hv="[email protected]:auth:",Wv=`${Hv}:PUB_KEY`;var qv=Object.defineProperty,Vv=Object.defineProperties,Gv=Object.getOwnPropertyDescriptors,Kv=Object.getOwnPropertySymbols,Zv
9688=Object.prototype.hasOwnProperty,Yv=Object.prototype.propertyIsEnumerable,Qv=(e,t,n)=>t in e?qv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jv=(e,t)=>{for(var n in t||(t={}))Zv.call(t,n)&&Qv(e,n,t[n]);if(Kv)for(var n of Kv(t))Yv.call(t,n)&&Qv(e,n,t[n]);return e},Xv=(e,t)=>Vv(e,Gv(t));class ew extends If{constructor(e){var t;super(e),t=this,this.name="engine",this.events=new(go()),this.initialized=!1,this.requestQueue={state:Fv,queue:[]},this.sessionRequestQueue={state:Fv,queue:[]},this.requestQueueDelay=To.ONE_SECOND,this.expectedPairingMethodMap=new Map,this.recentlyDeletedMap=new Map,this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(Bv)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),(0,To.toMiliseconds)(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=Xv(Jv({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:n,requiredNamespaces:r,optionalNamespaces:i,sessionProperties:s,relays:o}=t;let a,c=n,l=!1;try{c&&(l=this.client.core.pairing.pairings.get(c).active)}catch(dw){throw this.client.logger.error(`connect() -> pairing.get(${c}) failed`),dw}if(!c||!l){const{topic:e,uri:t}=await this.client.core.pairing.create();c=e,a=t}if(!c){const{message:e}=Fh("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(e)}const u=await this.client.core.crypto.generateKeyPair(),d=Bv.wc_sessionPropose.req.ttl||To.FIVE_MINUTES,h=fa(d),p=Jv({requiredNamespaces:r,optionalNamespaces:i,relays:o??[{protocol:"irn"}],proposer:{publicKey:u,metadata:this.client.metadata},expiryTimestamp:h},s&&{sessionProperties:s}),{reject:f,resolve:m,done:g}=ua(d,Lv);this.events.once(ga("session_connect"),(async e=>{let{error:t,session:n}=e;if(t)f(t);else if(n){n.self.publicKey=u;const e=Xv(Jv({},n),{requiredNamespaces:p.requiredNamespaces,optionalNamespaces:p.optionalNamespaces});await this.client.session.set(n.topic,e),await this.setExpiry(n.topic,n.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:n.peer.metadata}),m(e)}}));const y=await this.sendRequest({topic:c,method:"wc_sessionPropose",params:p,throwOnFailedPublish:!0});return await this.setProposal(y,Jv({id:y},p)),{uri:a,approval:g}},this.pair=async e=>{await this.isInitialized();try{return await this.client.core.pairing.pair(e)}catch(t){throw this.client.logger.error("pair() failed"),t}},this.approve=async e=>{await this.isInitialized();try{await this.isValidApprove(e)}catch(sf){throw this.client.logger.error("approve() -> isValidApprove() failed"),sf}const{id:t,relayProtocol:n,namespaces:r,sessionProperties:i,sessionConfig:s}=e;let o;try{o=this.client.proposal.get(t)}catch(sf){throw this.client.logger.error(`approve() -> proposal.get(${t}) failed`),sf}let{pairingTopic:a,proposer:c,requiredNamespaces:l,optionalNamespaces:u}=o;a=a||"";const d=await this.client.core.crypto.generateKeyPair(),h=c.publicKey,p=await this.client.core.crypto.generateSharedKey(d,h),f=Jv(Jv({relay:{protocol:n??"irn"},namespaces:r,pairingTopic:a,controller:{publicKey:d,metadata:this.client.metadata},expiry:fa(Dv)},i&&{sessionProperties:i}),s&&{sessionConfig:s});await this.client.core.relayer.subscribe(p);const m=Xv(Jv({},f),{topic:p,requiredNamespaces:l,optionalNamespaces:u,pairingTopic:a,acknowledged:!1,self:f.controller,peer:{publicKey:c.publicKey,metadata:c.metadata},controller:d});await this.client.session.set(p,m);try{await this.sendResult({id:t,topic:a,result:{relay:{protocol:n??"irn"},responderPublicKey:d},throwOnFailedPublish:!0}),await this.sendRequest({topic:p,method:"wc_sessionSettle",params:f,throwOnFailedPublish:!0})}catch(sf){throw this.client.logger.error(sf),this.client.session.delete(p,$h("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(p),sf}return await this.client.core.pairing.updateMetadata({topic:a,metadata:c.metadata}),await this.client.proposal.delete(t,$h("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:a}),await this.setExpiry(p,fa(Dv)),{topic:p,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(p))),500)))}},this.reject=async e=>{await this.isInitialized();try{await this.isValidReject(e)}catch(i){throw this.client.logger.error("reject() -> isValidReject() failed"),i}const{id:t,reason:n}=e;let r;try{r=this.client.proposal.get(t).pairingTopic}catch(i){throw this.client.logger.error(`reject() -> proposal.get(${t}) failed`),i}
9688r&&(await this.sendError({id:t,topic:r,error:n}),await this.client.proposal.delete(t,$h("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized();try{await this.isValidUpdate(e)}catch(l){throw this.client.logger.error("update() -> isValidUpdate() failed"),l}const{topic:t,namespaces:n}=e,{done:r,resolve:i,reject:s}=ua(),o=nm(),a=rm().toString(),c=this.client.session.get(t).namespaces;return this.events.once(ga("session_update",o),(e=>{let{error:t}=e;t?s(t):i()})),await this.client.session.update(t,{namespaces:n}),await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:n},throwOnFailedPublish:!0,clientRpcId:o,relayRpcId:a}).catch((e=>{this.client.logger.error(e),this.client.session.update(t,{namespaces:c}),s(e)})),{acknowledged:r}},this.extend=async e=>{await this.isInitialized();try{await this.isValidExtend(e)}catch(wf){throw this.client.logger.error("extend() -> isValidExtend() failed"),wf}const{topic:t}=e,n=nm(),{done:r,resolve:i,reject:s}=ua();return this.events.once(ga("session_extend",n),(e=>{let{error:t}=e;t?s(t):i()})),await this.setExpiry(t,fa(Dv)),this.sendRequest({topic:t,method:"wc_sessionExtend",params:{},clientRpcId:n,throwOnFailedPublish:!0}).catch((e=>{s(e)})),{acknowledged:r}},this.request=async e=>{await this.isInitialized();try{await this.isValidRequest(e)}catch(h){throw this.client.logger.error("request() -> isValidRequest() failed"),h}const{chainId:t,request:r,topic:i,expiry:s=Bv.wc_sessionRequest.req.ttl}=e,o=this.client.session.get(i),a=nm(),c=rm().toString(),{done:l,resolve:u,reject:d}=ua(s,"Request expired. Please try again.");return this.events.once(ga("session_request",a),(e=>{let{error:t,result:n}=e;t?d(t):u(n)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:a,relayRpcId:c,topic:i,method:"wc_sessionRequest",params:{request:Xv(Jv({},r),{expiryTimestamp:fa(s)}),chainId:t},expiry:s,throwOnFailedPublish:!0}).catch((e=>d(e))),this.client.events.emit("session_request_sent",{topic:i,request:r,chainId:t,id:a}),e()})),new Promise((async e=>{var t;if(null==(t=o.sessionConfig)||!t.disableDeepLink){const e=await async function(e,t){try{return await e.getItem(t)||(ra()?localStorage.getItem(t):void 0)}catch(s){console.error(s)}}(this.client.core.storage,jv);!async function(e){let{id:t,topic:r,wcDeepLink:s}=e;try{if(!s)return;const e="string"==typeof s?JSON.parse(s):s;let i=e?.href;if("string"!=typeof i)return;i.endsWith("/")&&(i=i.slice(0,-1));const o=`${i}/wc?requestId=${t}&sessionTopic=${r}`,a=ia();a===Jo?o.startsWith("https://")||o.startsWith("http://")?window.open(o,"_blank","noreferrer noopener"):window.open(o,"_self","noreferrer noopener"):a===Yo&&typeof(null==n.g?void 0:n.g.Linking)<"u"&&await n.g.Linking.openURL(o)}catch(i){console.error(i)}}({id:a,topic:i,wcDeepLink:e})}e()})),l()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:n}=e,{id:r}=n;ym(n)?await this.sendResult({id:r,topic:t,result:n.result,throwOnFailedPublish:!0}):vm(n)&&await this.sendError({id:r,topic:t,error:n.error}),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized();try{await this.isValidPing(e)}catch(n){throw this.client.logger.error("ping() -> isValidPing() failed"),n}const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=nm(),n=rm().toString(),{done:r,resolve:i,reject:s}=ua();this.events.once(ga("session_ping",e),(e=>{let{error:t}=e;t?s(t):i()})),await Promise.all([this.sendRequest({topic:t,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:e,relayRpcId:n}),r()])}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:n,chainId:r}=e,i=rm().toString();await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:n,chainId:r},throwOnFailedPublish:!0,relayRpcId:i})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:"wc_sessionDelete",params:$h("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else{if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:e}=Fh("MISMATCHED_TOPIC",`Session or pairing topic not found: ${t}`);throw new Error(e)}
9688await this.client.core.pairing.disconnect({topic:t})}},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>function(e,t){const{requiredNamespaces:n}=t,r=Object.keys(e.namespaces),i=Object.keys(n);let s=!0;return!!aa(i,r)&&(r.forEach((t=>{const{accounts:r,methods:i,events:o}=e.namespaces[t],a=Mh(r),c=n[t];(!aa(Ho(t,c),a)||!aa(c.methods,i)||!aa(c.events,o))&&(s=!1)})),s)}(t,e)))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.authenticate=async e=>{this.isInitialized(),this.isValidAuthenticate(e);const{chains:t,statement:n="",uri:r,domain:i,nonce:s,type:o,exp:a,nbf:c,methods:l=[],expiry:u}=e,d=[...e.resources||[]],{topic:h,uri:p}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"]});this.client.logger.info({message:"Generated new pairing",pairing:{topic:h,uri:p}});const f=await this.client.core.crypto.generateKeyPair(),m=ph(f);if(await Promise.all([this.client.auth.authKeys.set(Wv,{responseTopic:m,publicKey:f}),this.client.auth.pairingTopics.set(m,{topic:m,pairingTopic:h})]),await this.client.core.relayer.subscribe(m),this.client.logger.info(`sending request to new pairing topic: ${h}`),l.length>0){const{namespace:e}=$o(t[0]);let n=th(e,"request",l);ah(d)&&(n=rh(n,d.pop())),d.push(n)}const g=u&&u>Bv.wc_sessionAuthenticate.req.ttl?u:Bv.wc_sessionAuthenticate.req.ttl,y={authPayload:{type:o??"caip122",chains:t,statement:n,aud:r,domain:i,version:"1",nonce:s,iat:(new Date).toISOString(),exp:a,nbf:c,resources:d},requester:{publicKey:f,metadata:this.client.metadata},expiryTimestamp:fa(g)},v={requiredNamespaces:{},optionalNamespaces:{eip155:{chains:t,methods:[...new Set(["personal_sign",...l])],events:["chainChanged","accountsChanged"]}},relays:[{protocol:"irn"}],proposer:{publicKey:f,metadata:this.client.metadata},expiryTimestamp:fa(Bv.wc_sessionPropose.req.ttl)},{done:w,resolve:b,reject:x}=ua(g,"Request expired"),E=async e=>{let{error:t,session:n}=e;if(this.events.off(ga("session_request",k),_),t)x(t);else if(n){n.self.publicKey=f,await this.client.session.set(n.topic,n),await this.setExpiry(n.topic,n.expiry),h&&await this.client.core.pairing.updateMetadata({topic:h,metadata:n.peer.metadata});const e=this.client.session.get(n.topic);await this.deleteProposal(C),b({session:e})}},_=async e=>{if(await this.deletePendingAuthRequest(k,{message:"fulfilled",code:0}),e.error){const t=$h("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return e.error.code===t.code?void 0:(this.events.off(ga("session_connect"),E),x(e.error.message))}await this.deleteProposal(C),this.events.off(ga("session_connect"),E);const{cacaos:t,responder:n}=e.result,r=[],i=[];for(const a of t){await Zd({cacao:a,projectId:this.client.core.projectId})||(this.client.logger.error(a,"Signature verification failed"),x($h("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:e}=a,t=ah(e.resources),n=[Gd(e.iss)],s=Kd(e.iss);if(t){const e=sh(t),i=oh(t);r.push(...e),n.push(...i)}for(const r of n)i.push(`${r}:${s}`)}const s=await this.client.core.crypto.generateSharedKey(f,n.publicKey);let o;r.length>0&&(o={topic:s,acknowledged:!0,self:{publicKey:f,metadata:this.client.metadata},peer:n,controller:n.publicKey,expiry:fa(Dv),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:h,namespaces:Dh([...new Set(r)],[...new Set(i)])},await this.client.core.relayer.subscribe(s),await this.client.session.set(s,o),o=this.client.session.get(s)),b({auths:t,session:o})},k=nm(),C=nm();this.events.once(ga("session_connect"),E),this.events.once(ga("session_request",k),_);try{await Promise.all([this.sendRequest({topic:h,method:"wc_sessionAuthenticate",params:y,expiry:e.expiry,throwOnFailedPublish:!0,clientRpcId:k}),this.sendRequest({topic:h,method:"wc_sessionPropose",params:v,expiry:Bv.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:C})])}catch(cf){throw this.events.off(ga("session_connect"),E),this.events.off(ga("session_request",k),_),cf}return await this.setProposal(C,Jv({id:C},v)),await this.setAuthRequest(k,{request:Xv(Jv({},y),{verifyContext:{}}),pairingTopic:h}),{uri:p,response:w}},this.approveSessionAuthenticate=async e=>{this.isInitialized();const{id:t,auths:n}=e,r=this.getPendingAuthRequest(t);if(!r)throw new Error(`Could not find pending auth request with id ${t}`);const i=r.requester.publicKey,s=await this.client.core.crypto.generateKeyPair(),o=ph(i),a={type:1,receiverPublicKey:i,senderPublicKey:s},c=[],l=[];for(const h of n){if(!await Zd({cacao:h,projectId:this.client.core.projectId})){const e=$h("SESSION_SETTLEMENT_FAILED","Signature verification failed");
9688throw await this.sendError({id:t,topic:o,error:e,encodeOpts:a}),new Error(e.message)}const{p:e}=h,n=ah(e.resources),r=[Gd(e.iss)],i=Kd(e.iss);if(n){const e=sh(n),t=oh(n);c.push(...e),r.push(...t)}for(const t of r)l.push(`${t}:${i}`)}const u=await this.client.core.crypto.generateSharedKey(s,i);let d;return c?.length>0&&(d={topic:u,acknowledged:!0,self:{publicKey:s,metadata:this.client.metadata},peer:{publicKey:i,metadata:r.requester.metadata},controller:i,expiry:fa(Dv),authentication:n,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:"",namespaces:Dh([...new Set(c)],[...new Set(l)])},await this.client.core.relayer.subscribe(u),await this.client.session.set(u,d)),await this.sendResult({topic:o,id:t,result:{cacaos:n,responder:{publicKey:s,metadata:this.client.metadata}},encodeOpts:a,throwOnFailedPublish:!0}),await this.client.auth.requests.delete(t,{message:"fullfilled",code:0}),await this.client.core.pairing.activate({topic:r.pairingTopic}),{session:d}},this.rejectSessionAuthenticate=async e=>{await this.isInitialized();const{id:t,reason:n}=e,r=this.getPendingAuthRequest(t);if(!r)throw new Error(`Could not find pending auth request with id ${t}`);const i=r.requester.publicKey,s=await this.client.core.crypto.generateKeyPair(),o=ph(i),a={type:1,receiverPublicKey:i,senderPublicKey:s};await this.sendError({id:t,topic:o,error:n,encodeOpts:a}),await this.client.auth.requests.delete(t,{message:"rejected",code:0}),await this.client.proposal.delete(t,$h("USER_DISCONNECTED"))},this.formatAuthMessage=e=>{this.isInitialized();const{request:t,iss:n}=e;return Yd(t,n)},this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),n=this.client.core.pairing.pairings.getAll().filter((n=>{var r,i;return(null==(r=n.peerMetadata)?void 0:r.url)&&(null==(i=n.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&n.topic&&n.topic!==t.topic}));if(0===n.length)return;this.client.logger.info(`Cleaning up ${n.length} duplicate pairing(s)`),await Promise.all(n.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(t){this.client.logger.error(t)}},this.deleteSession=async e=>{const{topic:t,expirerHasDeleted:n=!1,emitEvent:r=!0,id:i=0}=e,{self:s}=this.client.session.get(t);await this.client.core.relayer.unsubscribe(t),await this.client.session.delete(t,$h("USER_DISCONNECTED")),this.addToRecentlyDeleted(t,"session"),this.client.core.crypto.keychain.has(s.publicKey)&&await this.client.core.crypto.deleteKeyPair(s.publicKey),this.client.core.crypto.keychain.has(t)&&await this.client.core.crypto.deleteSymKey(t),n||this.client.core.expirer.del(t),this.client.core.storage.removeItem(jv).catch((e=>this.client.logger.warn(e))),this.getPendingSessionRequests().forEach((e=>{e.topic===t&&this.deletePendingSessionRequest(e.id,$h("USER_DISCONNECTED"))})),r&&this.client.events.emit("session_delete",{id:i,topic:t})},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,$h("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,"proposal")},this.deletePendingSessionRequest=async function(e,n){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];await Promise.all([t.client.pendingRequest.delete(e,n),r?Promise.resolve():t.client.core.expirer.del(e)]),t.addToRecentlyDeleted(e,"request"),t.sessionRequestQueue.queue=t.sessionRequestQueue.queue.filter((t=>t.id!==e)),r&&(t.sessionRequestQueue.state=Fv,t.client.events.emit("session_request_expire",{id:e}))},this.deletePendingAuthRequest=async function(e,n){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];await Promise.all([t.client.auth.requests.delete(e,n),r?Promise.resolve():t.client.core.expirer.del(e)])},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&(this.client.core.expirer.set(e,t),await this.client.session.update(e,{expiry:t}))},this.setProposal=async(e,t)=>{this.client.core.expirer.set(e,fa(Bv.wc_sessionPropose.req.ttl)),await this.client.proposal.set(e,t)},this.setAuthRequest=async(e,t)=>{const{request:n,pairingTopic:r}=t;this.client.core.expirer.set(e,n.expiryTimestamp),await this.client.auth.requests.set(e,{authPayload:n.authPayload,requester:n.requester,expiryTimestamp:n.expiryTimestamp,id:e,pairingTopic:r,verifyContext:n.verifyContext})},this.setPendingSessionRequest=async e=>{const{id:t,topic:n,params:r,verifyContext:i}
9688=e,s=r.request.expiryTimestamp||fa(Bv.wc_sessionRequest.req.ttl);this.client.core.expirer.set(t,s),await this.client.pendingRequest.set(t,{id:t,topic:n,params:r,verifyContext:i})},this.sendRequest=async e=>{const{topic:t,method:n,params:r,expiry:i,relayRpcId:s,clientRpcId:o,throwOnFailedPublish:a}=e,c=im(n,r,o);if(ra()&&zv.includes(n)){const e=fh(JSON.stringify(c));this.client.core.verify.register({attestationId:e})}let l;try{l=await this.client.core.crypto.encode(t,c)}catch(d){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${t} failed`),d}const u=Bv[n].req;return i&&(u.ttl=i),s&&(u.id=s),this.client.core.history.set(t,c),a?(u.internal=Xv(Jv({},u.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,l,u)):this.client.core.relayer.publish(t,l,u).catch((e=>this.client.logger.error(e))),c.id},this.sendResult=async e=>{const{id:t,topic:n,result:r,throwOnFailedPublish:i,encodeOpts:s}=e,o=sm(t,r);let a,c;try{a=await this.client.core.crypto.encode(n,o,s)}catch(hf){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${n} failed`),hf}try{c=await this.client.core.history.get(n,t)}catch(hf){throw this.client.logger.error(`sendResult() -> history.get(${n}, ${t}) failed`),hf}const l=Bv[c.request.method].res;i?(l.internal=Xv(Jv({},l.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,a,l)):this.client.core.relayer.publish(n,a,l).cat
9688ch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(o)},this.sendError=async e=>{const{id:t,topic:n,error:r,encodeOpts:i}=e,s=om(t,r);let o,a;try{o=await this.client.core.crypto.encode(n,s,i)}catch(l){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${n} failed`),l}try{a=await this.client.core.history.get(n,t)}catch(l){throw this.client.logger.error(`sendError() -> history.get(${n}, ${t}) failed`),l}const c=Bv[a.request.method].res;this.client.core.relayer.publish(n,o,c),await this.client.core.history.resolve(s)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{let n=!1;ma(t.expiry)&&(n=!0),this.client.core.crypto.keychain.has(t.topic)||(n=!0),n&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{ma(e.expiryTimestamp)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession({topic:e}))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state!==$v){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=$v;const t=this.requestQueue.queue.shift();if(t)try{this.processRequest(t),await new Promise((e=>setTimeout(e,300)))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=Fv}else this.client.logger.info("Request queue already active, skipping...")},this.processRequest=e=>{const{topic:t,payload:n}=e,r=n.method;if(!this.shouldIgnorePairingRequest({topic:t,requestMethod:r}))switch(r){case"wc_sessionPropose":return this.onSessionProposeRequest
9688(t,n);case"wc_sessionSettle":return this.onSessionSettleRequest(t,n);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,n);case"wc_sessionExtend":return this.onSessionExtendRequest(t,n);case"wc_sessionPing":return this.onSessionPingRequest(t,n);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,n);case"wc_sessionRequest":return this.onSessionRequest(t,n);case"wc_sessionEvent":return this.onSessionEventRequest(t,n);case"wc_sessionAuthenticate":return this.onSessionAuthenticateRequest(t,n);default:return this.client.logger.info(`Unsupported request method ${r}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.client.core.history.get(t,n.id)).request.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeResponse(t,n);case"wc_sessionSettle":return this.onSessionSettleResponse(t,n);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,n);case"wc_sessionExtend":return this.onSessionExtendResponse(t,n);case"wc_sessionPing":return this.onSessionPingResponse(t,n);case"wc_sessionRequest":return this.onSessionRequestResponse(t,n);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(t,n);default:return this.client.logger.info(`Unsupported response method ${r}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:n}=Fh("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(n)},this.shouldIgnorePairingRequest=e=>{const{topic:t,requestMethod:n}=e,r=this.expectedPairingMethodMap.get(t);return!(!r||r.includes(n))&&!!(r.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)},this.onSessionProposeRequest=async(e,t)=>{const{params:n,id:r}=t;try{this.isValidConnect(Jv({},t.params));const i=n.expiryTimestamp||fa(Bv.wc_sessionPropose.req.ttl),s=Jv({id:r,pairingTopic:e,expiryTimestamp:i},n);await this.setProposal(r,s);const o=fh(JSON.stringify(t)),a=await this.getVerifyContext(o,s.proposer.metadata);this.client.events.emit("session_proposal",{id:r,params:s,verifyContext:a})}catch(i){await this.sendError({id:r,topic:e,error:i}),this.client.logger.error(i)}},this.onSessionProposeResponse=async(e,t)=>{const{id:n}=t;if(ym(t)){const{result:r}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:r});const i=this.client.proposal.get(n);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const s=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:s});const o=r.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:o});const a=await this.client.core.crypto.generateSharedKey(s,o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:a});const c=await this.client.core.relayer.subscribe(a);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else if(vm(t)){await this.client.proposal.delete(n,$h("USER_DISCONNECTED"));const e=ga("session_connect");if(0===this.events.listenerCount(e))throw new Error(`emitting ${e} without any listeners, 954`);this.events.emit(ga("session_connect"),{error:t.error})}},this.onSessionSettleRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidSessionSettleRequest(r);const{relay:n,controller:i,expiry:s,namespaces:o,sessionProperties:a,pairingTopic:c,sessionConfig:l}=t.params,u=Jv(Jv({topic:e,relay:n,expiry:s,namespaces:o,acknowledged:!0,pairingTopic:c,requiredNamespaces:{},optionalNamespaces:{},controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},a&&{sessionProperties:a}),l&&{sessionConfig:l});await this.sendResult({id:t.id,topic:e,result:!0,throwOnFailedPublish:!0});const d=ga("session_connect");if(0===this.events.listenerCount(d))throw new Error(`emitting ${d} without any listeners 997`);this.events.emit(ga("session_connect"),{session:u}
9688),this.cleanupDuplicatePairings(u)}catch(i){await this.sendError({id:n,topic:e,error:i}),this.client.logger.error(i)}},this.onSessionSettleResponse=async(e,t)=>{const{id:n}=t;ym(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(ga("session_approve",n),{})):vm(t)&&(await this.client.session.delete(e,$h("USER_DISCONNECTED")),this.events.emit(ga("session_approve",n),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:n,id:r}=t;try{const t=`${e}_session_update`,i=lp.get(t);if(i&&this.isRequestOutOfSync(i,r))return this.client.logger.info(`Discarding out of sync request - ${r}`),void this.sendError({id:r,topic:e,error:$h("INVALID_UPDATE_REQUEST")});this.isValidUpdate(Jv({topic:e},n));try{lp.set(t,r),await this.client.session.update(e,{namespaces:n.namespaces}),await this.sendResult({id:r,topic:e,result:!0,throwOnFailedPublish:!0})}catch(wf){throw lp.delete(t),wf}this.client.events.emit("session_update",{id:r,topic:e,params:n})}catch(i){await this.sendError({id:r,topic:e,error:i}),this.client.logger.error(i)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{const{id:n}=t,r=ga("session_update",n);if(0===this.events.listenerCount(r))throw new Error(`emitting ${r} without any listeners`);ym(t)?this.events.emit(ga("session_update",n),{}):vm(t)&&this.events.emit(ga("session_update",n),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:n}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,fa(Dv)),await this.sendResult({id:n,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_extend",{id:n,topic:e})}catch(r){await this.sendError({id:n,topic:e,error:r}),this.client.logger.error(r)}},this.onSessionExtendResponse=(e,t)=>{const{id:n}=t,r=ga("session_extend",n);if(0===this.events.listenerCount(r))throw new Error(`emitting ${r} without any listeners`);ym(t)?this.events.emit(ga("session_extend",n),{}):vm(t)&&this.events.emit(ga("session_extend",n),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:n,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:n,topic:e})}catch(r){await this.sendError({id:n,topic:e,error:r}),this.client.logger.error(r)}},this.onSessionPingResponse=(e,t)=>{const{id:n}=t,r=ga("session_ping",n);if(0===this.events.listenerCount(r))throw new Error(`emitting ${r} without any listeners`);setTimeout((()=>{ym(t)?this.events.emit(ga("session_ping",n),{}):vm(t)&&this.events.emit(ga("session_ping",n),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(gy,(async()=>{t(await this.deleteSession({topic:e,id:n}))}))})),this.sendResult({id:n,topic:e,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:$h("USER_DISCONNECTED")})])}catch(r){this.client.logger.error(r)}},this.onSessionRequest=async(e,t)=>{var n;const{id:r,params:i}=t;try{await this.isValidRequest(Jv({topic:e},i));const t=fh(JSON.stringify(im("wc_sessionRequest",i,r))),s=this.client.session.get(e),o={id:r,topic:e,params:i,verifyContext:await this.getVerifyContext(t,s.peer.metadata)};await this.setPendingSessionRequest(o),null!=(n=this.client.signConfig)&&n.disableRequestQueue?this.emitSessionRequest(o):(this.addSessionRequestToSessionRequestQueue(o),this.processSessionRequestQueue())}catch(Ue){await this.sendError({id:r,topic:e,error:Ue}),this.client.logger.error(Ue)}},this.onSessionRequestResponse=(e,t)=>{const{id:n}=t,r=ga("session_request",n);if(0===this.events.listenerCount(r))throw new Error(`emitting ${r} without any listeners`);ym(t)?this.events.emit(ga("session_request",n),{result:t.result}):vm(t)&&this.events.emit(ga("session_request",n),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:n,params:r}=t;try{const t=`${e}_session_event_${r.event.name}`,i=lp.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info(`Discarding out of sync request - ${n}`);this.isValidEmit(Jv({topic:e},r)),this.client.events.emit("session_event",{id:n,topic:e,params:r}),lp.set(t,n)}
9688catch(i){await this.sendError({id:n,topic:e,error:i}),this.client.logger.error(i)}},this.onSessionAuthenticateResponse=(e,t)=>{const{id:n}=t;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:e,payload:t}),ym(t)?this.events.emit(ga("session_request",n),{result:t.result}):vm(t)&&this.events.emit(ga("session_request",n),{error:t.error})},this.onSessionAuthenticateRequest=async(e,t)=>{const{requester:n,authPayload:r,expiryTimestamp:i}=t.params,s=fh(JSON.stringify(t)),o=await this.getVerifyContext(s,this.client.metadata),a={requester:n,pairingTopic:e,id:t.id,authPayload:r,verifyContext:o,expiryTimestamp:i};await this.setAuthRequest(t.id,{request:a,pairingTopic:e}),this.client.events.emit("session_authenticate",{topic:e,params:t.params,id:t.id})},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.sessionRequestQueue.state=Fv,this.processSessionRequestQueue()}),(0,To.toMiliseconds)(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=e=>{let{topic:t,error:n}=e;const r=this.client.core.history.pending;r.length>0&&r.filter((e=>e.topic===t&&"wc_sessionRequest"===e.request.method)).forEach((e=>{const t=ga("session_request",e.request.id);if(0===this.events.listenerCount(t))throw new Error(`emitting ${t} without any listeners`);this.events.emit(ga("session_request",e.request.id),{error:n})}))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===$v)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=$v,this.emitSessionRequest(e)}catch(t){this.client.logger.error(t)}else this.client.logger.info("session request queue is empty.")},this.emitSessionRequest=e=>{this.client.events.emit("session_request",e)},this.onPairingCreated=e=>{if(e.methods&&this.expectedPairingMethodMap.set(e.topic,e.methods),e.active)return;const t=this.client.proposal.getAll().find((t=>t.pairingTopic===e.topic));
9688t&&this.onSessionProposeRequest(e.topic,im("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:n,optionalNamespaces:r,sessionProperties:i,relays:s}=e;if(Wh(t)||await this.isValidPairingTopic(t),!function(e,t){let n=!1;return t&&!e?n=!0:e&&zh(e)&&e.length&&e.forEach((e=>{n=Xh(e)})),n}(s,!0)){const{message:e}=Fh("MISSING_OR_INVALID",`connect() relays: ${s}`);throw new Error(e)}!Wh(n)&&0!==Hh(n)&&this.validateNamespaces(n,"requiredNamespaces"),!Wh(r)&&0!==Hh(r)&&this.validateNamespaces(r,"optionalNamespaces"),Wh(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const n=function(e,t,n){let r=null;if(e&&Hh(e)){const i=Qh(e,t);i&&(r=i);const s=Zh(e,t,n);s&&(r=s)}else r=Fh("MISSING_OR_INVALID",`${t}, ${n} should be an object with data`);return r}(e,"connect()",t);if(n)throw new Error(n.message)},this.isValidApprove=async e=>{if(!ep(e))throw new Error(Fh("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:n,relayProtocol:r,sessionProperties:i}=e;this.checkRecentlyDeleted(t),await this.isValidProposalId(t);const s=this.client.proposal.get(t),o=Jh(n,"approve()");if(o)throw new Error(o.message);const a=ip(s.requiredNamespaces,n,"approve()");if(a)throw new Error(a.message);if(!qh(r,!0)){const{message:e}=Fh("MISSING_OR_INVALID",`approve() relayProtocol: ${r}`);throw new Error(e)}Wh(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:n}=e;if(this.checkRecentlyDeleted(t),await this.isValidProposalId(t),!function(e){return!(!e||"object"!=typeof e||!e.code||!Vh(e.code,!1)||!e.message||!qh(e.message,!1))}(n)){const{message:e}=Fh("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:n,namespaces:r,expiry:i}=e;if(!Xh(t)){const{message:e}=Fh("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const s=function(e,t){let n=null;return qh(e?.publicKey,!1)||(n=Fh("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}(n,"onSessionSettleRequest()");if(s)throw new Error(s.message);const o=Jh(r,"onSessionSettleRequest()");if(o)throw new Error(o.message);if(ma(i)){const{message:e}=Fh("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}const{topic:t,namespaces:n}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);const r=this.client.session.get(t),i=Jh(n,"update()");if(i)throw new Error(i.message);const s=ip(r.requiredNamespaces,n,"update()");if(s)throw new Error(s.message)},this.isValidExtend=async e=>{if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}const{topic:t,request:n,chainId:r,expiry:i}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);const{namespaces:s}=this.client.session.get(t);if(!tp(s,r)){const{message:e}=Fh("MISSING_OR_INVALID",`request() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(Wh(e)||!qh(e.method,!1))}(n)){const{message:e}=Fh("MISSING_OR_INVALID",`request() ${JSON.stringify(n)}`);throw new Error(e)}if(!np(s,r,n.method)){const{message:e}=Fh("MISSING_OR_INVALID",`request() method: ${n.method}`);throw new Error(e)}if(i&&!function(e,t){return Vh(e,!1)&&e<=t.max&&e>=t.min}(i,Uv)){const{message:e}=Fh("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${Uv.min} and ${Uv.max}`);throw new Error(e)}},this.isValidRespond=async e=>{var t;if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:n,response:r}=e;try{await this.isValidSessionTopic(n)}catch(i){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),i}if(!function(e){return!(Wh(e)||Wh(e.result)&&Wh(e.error)||!Vh(e.id,!1)||!qh(e.jsonrpc,!1))}(r)){const{message:e}=Fh("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}const{topic:t,event:n,chainId:r}=e;await this.isValidSessionTopic(t);const{namespaces:i}=this.client.session.get(t);if(!tp(i,r)){const{message:e}=Fh("MISSING_OR_INVALID",`emit() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(Wh(e)||!qh(e.name,!1))}(n)){const{message:e}=Fh("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}if(!rp(i,r,n.name)){const{message:e}=Fh("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!ep(e)){const{message:t}=Fh("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidAuthenticate=e=>{const{chains:t,uri:n,domain:r,nonce:i}=e;if(!Array.isArray(t)||0===t.length)throw new Error("chains is required and must be a non-empty array");if(!qh(n,!1))throw new Error("uri is required parameter");if(!qh(r,!1))throw new Error("domain is required parameter");if(!qh(i,!1))throw new Error("nonce is required parameter");if([...new Set(t.map((e=>$o(e).namespace)))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:s}=$o(t[0]);if("eip155"!==s)throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")},this.getVerifyContext=async(e,t)=>{const n={verified:{verifyUrl:t.verifyUrl||$y,validation:"UNKNOWN",origin:t.url||""}};try{const r=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});r&&(n.verified.origin=r.origin,n.verified.isScam=r.isScam,n.verified.validation=r.origin===new URL(t.url).origin?"VALID":"INVALID")}catch(r){this.client.logger.info(r)}return this.client.logger.info(`Verify context: ${JSON.stringify(n)}`),n},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!qh(e,!1)){const{message:n}=Fh("MISSING_OR_INVALID",`${t} must be in Record<string, string> format. Received: ${JSON.stringify(e)}`);throw new Error(n)}}))},this.getPendingAuthRequest=e=>{const t=this.client.auth.requests.get(e);return"object"==typeof t?t:void 0},this.addToRecentlyDeleted=(e,t)=>{if(this.recentlyDeletedMap.set(e,t),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let e=0;const t=this.recentlyDeletedLimit/2;
9688for(const n of this.recentlyDeletedMap.keys()){if(e++>=t)break;this.recentlyDeletedMap.delete(n)}}},this.checkRecentlyDeleted=e=>{const t=this.recentlyDeletedMap.get(e);if(t){const{message:n}=Fh("MISSING_OR_INVALID",`Record was recently deleted - ${t}: ${e}`);throw new Error(n)}}}async isInitialized(){if(!this.initialized){const{message:e}=Fh("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(uy,(async e=>{const{topic:t,message:n}=e,{publicKey:r}=this.client.auth.authKeys.keys.includes(Wv)?this.client.auth.authKeys.get(Wv):{responseTopic:void 0,publicKey:void 0},i=await this.client.core.crypto.decode(t,n,{receiverPublicKey:r});try{mm(i)?(this.client.core.history.set(t,i),this.onRelayEventRequest({topic:t,payload:i})):gm(i)?(await this.client.core.history.resolve(i),await this.onRelayEventResponse({topic:t,payload:i}),this.client.core.history.delete(t,i.id)):this.onRelayEventUnknownPayload({topic:t,payload:i})}catch(s){this.client.logger.error(s)}}))}registerExpirerEvents(){this.client.core.expirer.on(By,(async e=>
9688{const{topic:t,id:n}=pa(e.target);return n&&this.client.pendingRequest.keys.includes(n)?await this.deletePendingSessionRequest(n,Fh("EXPIRED"),!0):n&&this.client.auth.requests.keys.includes(n)?await this.deletePendingAuthRequest(n,Fh("EXPIRED"),!0):void(t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n})))}))}registerPairingEvents(){this.client.core.pairing.events.on(Iy,(e=>this.onPairingCreated(e))),this.client.core.pairing.events.on(Py,(e=>{this.addToRecentlyDeleted(e.topic,"pairing")}))}isValidPairingTopic(e){if(!qh(e,!1)){const{message:t}=Fh("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=Fh("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(ma(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=Fh("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!qh(e,!1)){const{message:t}=Fh("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){const{message:t}=Fh("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(ma(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=Fh("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=Fh("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if(qh(e,!1)){const{message:t}=Fh("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=Fh("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if(!function(e){return"number"==typeof e}(e)){const{message:t}=Fh("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=Fh("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(ma(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=Fh("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class tw extends yv{constructor(e,t){super(e,t,"proposal",Rv),this.core=e,this.logger=t}}class nw extends yv{constructor(e,t){super(e,t,"session",Rv),this.core=e,this.logger=t}}class rw extends yv{constructor(e,t){super(e,t,"request",Rv,(e=>e.id)),this.core=e,this.logger=t}}class iw extends yv{constructor(e,t){super(e,t,"authKeys",Hv,(()=>Wv)),this.core=e,this.logger=t}}class sw extends yv{constructor(e,t){super(e,t,"pairingTopics",Hv),this.core=e,this.logger=t}}class ow extends yv{constructor(e,t){super(e,t,"requests",Hv,(e=>e.id)),this.core=e,this.logger=t}}class aw{constructor(e,t){this.core=e,this.logger=t,this.authKeys=new iw(this.core,this.logger),this.pairingTopics=new sw(this.core,this.logger),this.requests=new ow(this.core,this.logger)}
9688async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}class cw extends Sf{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=Ov,this.events=new mo.EventEmitter,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(t){throw this.logger.error(t.message),t}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(t){throw this.logger.error(t.message),t}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(t){throw this.logger.error(t.message),t}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(t){throw this.logger.error(t.message),t}},this.update=async e=>{try{return await this.engine.update(e)}catch(t){throw this.logger.error(t.message),t}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(t){throw this.logger.error(t.message),t}},this.request=async e=>{try{return await this.engine.request(e)}catch(t){throw this.logger.error(t.message),t}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(t){throw this.logger.error(t.message),t}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(t){throw this.logger.error(t.message),t}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(t){throw this.logger.error(t.message),t}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(t){throw this.logger.error(t.message),t}},this.find=e=>{try{return this.engine.find(e)}catch(t){throw this.logger.error(t.message),t}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.authenticate=async e=>{try{return await this.engine.authenticate(e)}catch(t){throw this.logger.error(t.message),t}},this.formatAuthMessage=e=>{try{return this.engine.formatAuthMessage(e)}catch(t){throw this.logger.error(t.message),t}},this.approveSessionAuthenticate=async e=>{try{return await this.engine.approveSessionAuthenticate(e)}catch(t){throw this.logger.error(t.message),t}},this.rejectSessionAuthenticate=async e=>{try{return await this.engine.rejectSessionAuthenticate(e)}catch(t){throw this.logger.error(t.message),t}},this.name=e?.name||Ov,this.metadata=e?.metadata||(0,No.g)()||{name:"",description:"",url:"",icons:[""]},this.signConfig=e?.signConfig;const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:Kp()(pf({level:e?.logger||Mv}));this.core=e?.core||new Pv(e),this.logger=mf(t,this.name),this.session=new nw(this.core,this.logger),this.proposal=new tw(this.core,this.logger),this.pendingRequest=new rw(this.core,this.logger),this.engine=new ew(this),this.auth=new aw(this.core,this.logger)}static async init(e){const t=new cw(e);return await t.initialize(),t}get context(){return ff(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),await this.auth.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var lw=n(6487),uw=n.n(lw),dw=Object.defineProperty,hw=Object.defineProperties,pw=Object.getOwnPropertyDescriptors,fw=Object.getOwnPropertySymbols,mw=Object.prototype.hasOwnProperty,gw=Object.prototype.propertyIsEnumerable,yw=(e,t,n)=>t in e?dw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vw=(e,t)=>{for(var n in t||(t={}))mw.call(t,n)&&yw(e,n,t[n]);if(fw)for(var n of fw(t))gw.call(t,n)&&yw(e,n,t[n]);return e},ww=(e,t)=>hw(e,pw(t));const bw={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class xw{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.url=e,this.disableProviderPing=t,this.events=new mo.EventEmitter,this.isAvailable=!1,this.registering=!1,!hm(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}
9688get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const t=Op(e),n=await(await uw()(this.url,ww(vw({},bw),{body:t}))).json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;if(!hm(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=Op({id:1,jsonrpc:"2.0",method:"test",params:[]});await uw()(e,ww(vw({},bw),{body:t}))}this.onOpen()}catch(t){const e=this.parseError(t);throw this.events.emit("register_error",e),this.onClose(),e}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?Rp(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=om(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e){return em(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.url,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const Ew="error",_w="wc@2:universal_provider:",kw="default_chain_changed";var Cw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof n.g<"u"?n.g:typeof self<"u"?self:{},Aw={exports:{}};!function(e,t){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",s="__lodash_placeholder__",o=16,a=32,c=64,l=128,u=256,d=1/0,h=9007199254740991,p=NaN,f=4294967295,m=f-1,g=f>>>1,y=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",a],["partialRight",c],["rearg",u]],v="[object Arguments]",w="[object Array]",b="[object Boolean]",x="[object Date]",E="[object Error]",_="[object Function]",k="[object GeneratorFunction]",C="[object Map]",A="[object Number]",S="[object Object]",I="[object Promise]",T="[object RegExp]",P="[object Set]",N="[object String]",R="[object Symbol]",O="[object WeakMap]",M="[object ArrayBuffer]",j="[object DataView]",L="[object Float32Array]",D="[object Float64Array]",B="[object Int8Array]",U="[object Int16Array]",F="[object Int32Array]",$="[object Uint8Array]",z="[object Uint8ClampedArray]",H="[object Uint16Array]",W="[object Uint32Array]",q=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,Y=RegExp(K.source),Q=RegExp(Z.source),J=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,se=RegExp(ie.source),oe=/^\s+/,ae=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,we=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 6,049 bytes, line 9688
96887f]/g,Ee=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,ke="\\ud800-\\udfff",Ce="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ne="['\u2019]",Re="["+ke+"]",Oe="["+Pe+"]",Me="["+Ce+"]",je="\\d+",Le="["+Ae+"]",De="["+Se+"]",Be="[^"+ke+Pe+je+Ae+Se+Ie+"]",Ue="\\ud83c[\\udffb-\\udfff]",Fe="[^"+ke+"]",$e="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ie+"]",We="\\u200d",qe="(?:"+De+"|"+Be+")",Ve="(?:"+He+"|"+Be+")",Ge="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ke="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ze="(?:"+Me+"|"+Ue+")"+"?",Ye="["+Te+"]?",Qe=Ye+Ze+("(?:"+We+"(?:"+[Fe,$e,ze].join("|")+")"+Ye+Ze+")*"),Je="(?:"+[Le,$e,ze].join("|")+")"+Qe,Xe="(?:"+[Fe+Me+"?",Me,$e,ze,Re].join("|")+")",et=RegExp(Ne,"g"),tt=RegExp(Me,"g"),nt=RegExp(Ue+"(?="+Ue+")|"+Xe+Qe,"g"),rt=RegExp([He+"?"+De+"+"+Ge+"(?="+[Oe,He,"$"].join("|")+")",Ve+"+"+Ke+"(?="+[Oe,He+qe,"$"].join("|")+")",He+"?"+qe+"+"+Ge,He+"+"+Ke,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je,Je].join("|"),"g"),it=RegExp("["+We+ke+Ce+Te+"]"),st=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,ct={};ct[L]=ct[D]=ct[B]=ct[U]=ct[F]=ct[$]=ct[z]=ct[H]=ct[W]=!0,ct[v]=ct[w]=ct[M]=ct[b]=ct[j]=ct[x]=ct[E]=ct[_]=ct[C]=ct[A]=ct[S]=ct[T]=ct[P]=ct[N]=ct[O]=!1;var lt={};lt[v]=lt[w]=lt[M]=lt[j]=lt[b]=lt[x]=lt[L]=lt[D]=lt[B]=lt[U]=lt[F]=lt[C]=lt[A]=lt[S]=lt[T]=lt[P]=lt[N]=lt[R]=lt[$]=lt[z]=lt[H]=lt[W]=!0,lt[E]=lt[_]=lt[O]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ht=parseInt,pt="object"==typeof Cw&&Cw&&Cw.Object===Object&&Cw,ft="object"==typeof self&&self&&self.Object===Object&&self,mt=pt||ft||Function("return this")(),gt=t&&!t.nodeType&&t,yt=gt&&e&&!e.nodeType&&e,vt=yt&&yt.exports===gt,wt=vt&&pt.process,bt=function(){try{return yt&&yt.require&&yt.require("util").types||wt&&wt.binding&&wt.binding("util")}catch{}}(),xt=bt&&bt.isArrayBuffer,Et=bt&&bt.isDate,_t=bt&&bt.isMap,kt=bt&&bt.isRegExp,Ct=bt&&bt.isSet,At=bt&&bt.isTypedArray;function St(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function It(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i<s;){var o=e[i];t(r,o,n(o),e)}return r}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Pt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Nt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function Ot(e,t){return!!(null==e?0:e.length)&&Ht(e,t,0)>-1}function Mt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function jt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Dt(e,t,n,r){var i=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function Bt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Ut(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ft=Gt("length");function $t(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function zt(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function Ht(e,t,n){return t===t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):zt(e,qt,n)}function Wt(e,t,n,r){for(var i=n-1,s=e.length;++i<s;)if(r(e[i],t))return i;return-1}function qt(e){return e!==e}function Vt(e,t){var n=null==e?0:e.length;return n?Yt(e,t)/n:p}function Gt(e){return function(t){return null==t?n:t[e]}}function Kt(e){return function(t){return null==e?n:e[t]}}function Zt(e,t,n,r,i){return i(e,(function(e,i,s){n=r?(r=!1,e):t(n,e,i,s)})),n}function Yt(e,t){for(var r,i=-1,s=e.length;++i<s;){var o=t(e[i]);o!==n&&(r=r===n?o:r+o)}return r}function Qt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Jt(e){return e&&e.slice(0,mn(e)+1).replace(oe,"")}function Xt(e){return function(t){return e(t)}}function en(e,t){return jt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Ht(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ht(t,e[n],0)>-1;);return n}var sn=Kt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"
9688c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),on=Kt({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(e){return"\\"+ut[e]}function cn(e){return it.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function un(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];(a===t||a===s)&&(e[n]=s,o[i++]=n)}return o}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function pn(e){return cn(e)?function(e){for(var t=nt.lastIndex=0;nt.test(e);)++t;return t}(e):Ft(e)}function fn(e){return cn(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function mn(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var gn=Kt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var yn=function e(t){var ae=(t=null==t?mt:yn.defaults(mt.Object(),t,yn.pick(mt,ot))).Array,ke=t.Date,Ce=t.Error,Ae=t.Function,Se=t.Math,Ie=t.Object,Te=t.RegExp,Pe=t.String,Ne=t.TypeError,Re=ae.prototype,Oe=Ae.prototype,Me=Ie.prototype,je=t["__core-js_shared__"],Le=Oe.toString,De=Me.hasOwnProperty,Be=0,Ue=function(){var e=/[^.]+$/.exec(je&&je.keys&&je.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Fe=Me.toString,$e=Le.call(Ie),ze=mt._,He=Te("^"+Le.call(De).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=vt?t.Buffer:n,qe=t.Symbol,Ve=t.Uint8Array,Ge=We?We.allocUnsafe:n,Ke=un(Ie.getPrototypeOf,Ie),Ze=Ie.create,Ye=Me.propertyIsEnumerable,Qe=Re.splice,Je=qe?qe.isConcatSpreadable:n,Xe=qe?qe.iterator:n,nt=qe?qe.toStringTag:n,it=function(){try{var e=hs(Ie,"defineProperty");return e({},"",{}),e}catch{}}(),ut=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,pt=ke&&ke.now!==mt.Date.now&&ke.now,ft=t.setTimeout!==mt.setTimeout&&t.setTimeout,gt=Se.ceil,yt=Se.floor,wt=Ie.getOwnPropertySymbols,bt=We?We.isBuffer:n,Ft=t.isFinite,Kt=Re.join,vn=un(Ie.keys,Ie),wn=Se.max,bn=Se.min,xn=ke.now,En=t.parseInt,_n=Se.random,kn=Re.reverse,Cn=hs(t,"DataView"),An=hs(t,"Map"),Sn=hs(t,"Promise"),In=hs(t,"Set"),Tn=hs(t,"WeakMap"),Pn=hs(Ie,"create"),Nn=Tn&&new Tn,Rn={},On=Bs(Cn),Mn=Bs(An),jn=Bs(Sn),Ln=Bs(In),Dn=Bs(Tn),Bn=qe?qe.prototype:n,Un=Bn?Bn.valueOf:n,Fn=Bn?Bn.toString:n;function $n(e){if(na(e)&&!qo(e)&&!(e instanceof qn)){if(e instanceof Wn)return e;if(De.call(e,"__wrapped__"))return Us(e)}return new Wn(e)}var zn=function(){function e(){}return function(t){if(!ta(t))return{};if(Ze)return Ze(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Hn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Zn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Kn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new Gn(e);this.size=t.size}function Qn(e,t){var n=qo(e),r=!n&&Wo(e),i=!n&&!r&&Zo(e),s=!n&&!r&&!i&&ua(e),o=n||r||i||s,a=o?Qt(e.length,Pe):[],c=a.length;for(var l in e)(t||De.call(e,l))&&(!o||!("length"==l||i&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ws(l,c)))&&a.push(l);return a}function Jn(e){var t=e.length;return t?e[Zr(0,t-1)]:n}function Xn(e,t){return js(Pi(e),cr(t,0,e.length))}function er(e){return js(Pi(e))}function tr(e,t,r){(r!==n&&!$o(e[t],r)||r===n&&!(t in e))&&or(e,t,r)}function nr(e,t,r){var i=e[t];(!De.call(e,t)||!$o(i,r)||r===n&&!(t in e))&&or(e,t,r)}function rr(e,t){for(var n=e.length;n--;)if($o(e[n][0],t))return n;return-1}function ir(e,t,n,r){return pr(e,(function(e,i,s){t(r,e,n(e),s)})),r}function sr(e,t){return e&&Ni(t,Ra(t),e)}
vendor: 5,206 bytes, line 9688
9688function or(e,t,n){"__proto__"==t&&it?it(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,i=t.length,s=ae(i),o=null==e;++r<i;)s[r]=o?n:Sa(e,t[r]);return s}function cr(e,t,r){return e===e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function lr(e,t,r,i,s,o){var a,c=1&t,l=2&t,u=4&t;if(r&&(a=s?r(e,i,s,o):r(e)),a!==n)return a;if(!ta(e))return e;var d=qo(e);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!c)return Pi(e,a)}else{var h=ms(e),p=h==_||h==k;if(Zo(e))return ki(e,c);if(h==S||h==v||p&&!s){if(a=l||p?{}:ys(e),!c)return l?function(e,t){return Ni(e,fs(e),t)}(e,function(e,t){return e&&Ni(t,Oa(t),e)}(a,e)):function(e,t){return Ni(e,ps(e),t)}(e,sr(a,e))}else{if(!lt[h])return s?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case M:return Ci(e);case b:case x:return new r(+e);case j:return function(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case D:case B:case U:case F:case $:case z:case H:case W:return Ai(e,n);case C:return new r;case A:case N:return new r(e);case T:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new r;case R:return function(e){return Un?Ie(Un.call(e)):{}}(e)}}(e,h,c)}}o||(o=new Yn);var f=o.get(e);if(f)return f;o.set(e,a),aa(e)?e.forEach((function(n){a.add(lr(n,t,r,n,e,o))})):ra(e)&&e.forEach((function(n,i){a.set(i,lr(n,t,r,i,e,o))}));var m=d?n:(u?l?ss:is:l?Oa:Ra)(e);return Tt(m||e,(function(n,i){m&&(n=e[i=n]),nr(a,i,lr(n,t,r,i,e,o))})),a}function ur(e,t,r){var i=r.length;if(null==e)return!i;for(e=Ie(e);i--;){var s=r[i],o=t[s],a=e[s];if(a===n&&!(s in e)||!o(a))return!1}return!0}function dr(e,t,i){if("function"!=typeof e)throw new Ne(r);return Ns((function(){e.apply(n,i)}),t)}function hr(e,t,n,r){var i=-1,s=Ot,o=!0,a=e.length,c=[],l=t.length;if(!a)return c;n&&(t=jt(t,Xt(n))),r?(s=Mt,o=!1):t.length>=200&&(s=tn,o=!1,t=new Zn(t));e:for(;++i<a;){var u=e[i],d=null==n?u:n(u);if(u=r||0!==u?u:0,o&&d===d){for(var h=l;h--;)if(t[h]===d)continue e;c.push(u)}else s(t,d,r)||c.push(u)}return c}$n.templateSettings={escape:J,evaluate:X,interpolate:ee,variable:"",imports:{_:$n}},$n.prototype=Hn.prototype,$n.prototype.constructor=$n,Wn.prototype=zn(Hn.prototype),Wn.prototype.constructor=Wn,qn.prototype=zn(Hn.prototype),qn.prototype.constructor=qn,Vn.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vn.prototype.get=function(e){var t=this.__data__;if(Pn){var r=t[e];return r===i?n:r}return De.call(t,e)?t[e]:n},Vn.prototype.has=function(e){var t=this.__data__;return Pn?t[e]!==n:De.call(t,e)},Vn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pn&&t===n?i:t,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=rr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Qe.call(t,n,1),--this.size,!0)},Gn.prototype.get=function(e){var t=this.__data__,r=rr(t,e);return r<0?n:t[r][1]},Gn.prototype.has=function(e){return rr(this.__data__,e)>-1},Gn.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Kn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(An||Gn),string:new Vn}},Kn.prototype.delete=function(e){var t=us(this,e).delete(e);return this.size-=t?1:0,t},Kn.prototype.get=function(e){return us(this,e).get(e)},Kn.prototype.has=function(e){return us(this,e).has(e)},Kn.prototype.set=function(e,t){var n=us(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Zn.prototype.add=Zn.prototype.push=function(e){return this.__data__.set(e,i),this},Zn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!An||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Kn(r)}return n.set(e,t),this.size=n.size,this};var pr=Mi(xr),fr=Mi(Er,!0);function mr(e,t){var n=!0;return pr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function gr(e,t,r){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=t(o);if(null!=a&&(c===n?a===a&&!la(a):r(a,c)))var c=a,l=o}return l}function yr(e,t){var n=[];return pr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function vr(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=vs),i||(i=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?vr(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var wr=ji(),br=ji(!0);function xr(e,t){return e&&wr(e,t,Ra)}function Er(e,t){return e&&br(e,t,Ra)}function _r(e,t){return Rt(t,(function(t){return Jo(e[t])}))}function kr(e,t){for(var r=0,i=(t=bi(t,e)).length;null!=e&&r<i;)e=e[Ds(t[r++])];return r&&r==i?e:n}function Cr(e,t,n){var r=t(e);return qo(e)?r:Lt(r,n(e))}
9688function Ar(e){return null==e?e===n?"[object Undefined]":"[object Null]":nt&&nt in Ie(e)?function(e){var t=De.call(e,nt),r=e[nt];try{e[nt]=n;var i=!0}catch{}var s=Fe.call(e);return i&&(t?e[nt]=r:delete e[nt]),s}(e):function(e){return Fe.call(e)}(e)}function Sr(e,t){return e>t}function Ir(e,t){return null!=e&&De.call(e,t)}function Tr(e,t){return null!=e&&t in Ie(e)}function Pr(e,t,r){for(var i=r?Mt:Ot,s=e[0].length,o=e.length,a=o,c=ae(o),l=1/0,u=[];a--;){var d=e[a];a&&t&&(d=jt(d,Xt(t))),l=bn(d.length,l),c[a]=!r&&(t||s>=120&&d.length>=120)?new Zn(a&&d):n}d=e[0];var h=-1,p=c[0];e:for(;++h<s&&u.length<l;){var f=d[h],m=t?t(f):f;if(f=r||0!==f?f:0,!(p?tn(p,m):i(u,m,r))){for(a=o;--a;){var g=c[a];if(!(g?tn(g,m):i(e[a],m,r)))continue e}p&&p.push(m),u.push(f)}}return u}function Nr(e,t,r){var i=null==(e=Is(e,t=bi(t,e)))?e:e[Ds(Ys(t))];return null==i?n:St(i,e,r)}function Rr(e){return na(e)&&Ar(e)==v}function Or(e,t,r,i,s){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!==e&&t!==t:function(e,t,r,i,s,o){var a=qo(e),c=qo(t),l=a?w:ms(e),u=c?w:ms(t);l=l==v?S:l,u=u==v?S:u;var d=l==S,h=u==S,p=l==u;if(p&&Zo(e)){if(!Zo(t))return!1;a=!0,d=!1}if(p&&!d)return o||(o=new Yn),a||ua(e)?ns(e,t,r,i,s,o):function(e,t,n,r,i,s,o){switch(n){case j:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!s(new Ve(e),new Ve(t)));case b:case x:case A:return $o(+e,+t);case E:return e.name==t.name&&e.message==t.message;case T:case N:return e==t+"";case C:var a=ln;case P:var c=1&r;if(a||(a=hn),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=2,o.set(e,t);var u=ns(a(e),a(t),r,i,s,o);return o.delete(e),u;case R:if(Un)return Un.call(e)==Un.call(t)}return!1}(e,t,l,r,i,s,o);if(!(1&r)){var f=d&&De.call(e,"__wrapped__"),m=h&&De.call(t,"__wrapped__");
vendor: 5,581 bytes, line 9688
9688if(f||m){var g=f?e.value():e,y=m?t.value():t;return o||(o=new Yn),s(g,y,r,i,o)}}return!!p&&(o||(o=new Yn),function(e,t,r,i,s,o){var a=1&r,c=is(e),l=c.length,u=is(t),d=u.length;if(l!=d&&!a)return!1;for(var h=l;h--;){var p=c[h];if(!(a?p in t:De.call(t,p)))return!1}var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var y=a;++h<l;){var v=e[p=c[h]],w=t[p];if(i)var b=a?i(w,v,p,t,e,o):i(v,w,p,e,t,o);if(!(b===n?v===w||s(v,w,r,i,o):b)){g=!1;break}y||(y="constructor"==p)}if(g&&!y){var x=e.constructor,E=t.constructor;x!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof E&&E instanceof E)&&(g=!1)}return o.delete(e),o.delete(t),g}(e,t,r,i,s,o))}(e,t,r,i,Or,s))}function Mr(e,t,r,i){var s=r.length,o=s,a=!i;if(null==e)return!o;for(e=Ie(e);s--;){var c=r[s];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<o;){var l=(c=r[s])[0],u=e[l],d=c[1];if(a&&c[2]){if(u===n&&!(l in e))return!1}else{var h=new Yn;if(i)var p=i(u,d,l,e,t,h);if(!(p===n?Or(d,u,3,i,h):p))return!1}}return!0}function jr(e){return!(!ta(e)||function(e){return!!Ue&&Ue in e}(e))&&(Jo(e)?He:ve).test(Bs(e))}function Lr(e){return"function"==typeof e?e:null==e?ic:"object"==typeof e?qo(e)?zr(e[0],e[1]):$r(e):pc(e)}function Dr(e){if(!ks(e))return vn(e);var t=[];for(var n in Ie(e))De.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Br(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Ie(e))t.push(n);return t}(e);var t=ks(e),n=[];for(var r in e)"constructor"==r&&(t||!De.call(e,r))||n.push(r);return n}function Ur(e,t){return e<t}function Fr(e,t){var n=-1,r=Go(e)?ae(e.length):[];return pr(e,(function(e,i,s){r[++n]=t(e,i,s)})),r}function $r(e){var t=ds(e);return 1==t.length&&t[0][2]?As(t[0][0],t[0][1]):function(n){return n===e||Mr(n,e,t)}}function zr(e,t){return xs(e)&&Cs(t)?As(Ds(e),t):function(r){var i=Sa(r,e);return i===n&&i===t?Ia(r,e):Or(t,i,3)}}function Hr(e,t,r,i,s){e!==t&&wr(t,(function(o,a){if(s||(s=new Yn),ta(o))!function(e,t,r,i,s,o,a){var c=Ts(e,r),l=Ts(t,r),u=a.get(l);if(u)return void tr(e,r,u);var d=o?o(c,l,r+"",e,t,a):n,h=d===n;if(h){var p=qo(l),f=!p&&Zo(l),m=!p&&!f&&ua(l);d=l,p||f||m?qo(c)?d=c:Ko(c)?d=Pi(c):f?(h=!1,d=ki(l,!0)):m?(h=!1,d=Ai(l,!0)):d=[]:sa(l)||Wo(l)?(d=c,Wo(c)?d=va(c):(!ta(c)||Jo(c))&&(d=ys(l))):h=!1}h&&(a.set(l,d),s(d,l,i,o,a),a.delete(l)),tr(e,r,d)}(e,t,a,r,Hr,i,s);else{var c=i?i(Ts(e,a),o,a+"",e,t,s):n;c===n&&(c=o),tr(e,a,c)}}),Oa)}function Wr(e,t){var r=e.length;if(r)return ws(t+=t<0?r:0,r)?e[t]:n}function qr(e,t,n){t=t.length?jt(t,(function(e){return qo(e)?function(t){return kr(t,1===e.length?e[0]:e)}:e})):[ic];var r=-1;t=jt(t,Xt(ls()));var i=Fr(e,(function(e,n,i){var s=jt(t,(function(t){return t(e)}));return{criteria:s,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,s=t.criteria,o=i.length,a=n.length;++r<o;){var c=Si(i[r],s[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Vr(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],a=kr(e,o);n(a,o)&&ei(s,bi(o,e),a)}return s}function Gr(e,t,n,r){var i=r?Wt:Ht,s=-1,o=t.length,a=e;for(e===t&&(t=Pi(t)),n&&(a=jt(e,Xt(n)));++s<o;)for(var c=0,l=t[s],u=n?n(l):l;(c=i(a,u,c,r))>-1;)a!==e&&Qe.call(a,c,1),Qe.call(e,c,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==s){var s=i;ws(i)?Qe.call(e,i,1):hi(e,i)}}return e}function Zr(e,t){return e+yt(_n()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=yt(t/2))&&(e+=e)}while(t);return n}function Qr(e,t){return Rs(Ss(e,t,ic),e+"")}function Jr(e){return Jn($a(e))}function Xr(e,t){var n=$a(e);return js(n,cr(t,0,n.length))}function ei(e,t,r,i){if(!ta(e))return e;for(var s=-1,o=(t=bi(t,e)).length,a=o-1,c=e;null!=c&&++s<o;){var l=Ds(t[s]),u=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=a){var d=c[l];(u=i?i(d,l,c):n)===n&&(u=ta(d)?d:ws(t[s+1])?[]:{})}nr(c,l,u),c=c[l]}return e}var ti=Nn?function(e,t){return Nn.set(e,t),e}:ic,ni=it?function(e,t){return it(e,"toString",{configurable:!0,enumerable:!1,value:tc(t),writable:!0})}:ic;function ri(e){return js($a(e))}function ii(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=ae(i);++r<i;)s[r]=e[r+t];return s}function si(e,t){var n;return pr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=g){for(;r<i;){var s=r+i>>>1,o=e[s];null!==o&&!la(o)&&(n?o<=t:o<t)?r=s+1:i=s}return i}return ai(e,t,ic,n)}function ai(e,t,r,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=r(t))!==t,c=null===t,l=la(t),u=t===n;s<o;){var d=yt((s+o)/2),h=r(e[d]),p=h!==n,f=null===h,g=h===h,y=la(h);if(a)var v=i||g;else v=u?g&&(i||p):c?g&&p&&(i||!f):l?g&&p&&!f&&(i||!y):!f&&!y&&(i?h<=t:h<t);v?s=d+1:o=d}return bn(o,m)}function ci(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var o=e[n],a=t?t(o):o;if(!n||!$o(a,c)){var c=a;s[i++]=0===o?0:o}}return s}function li(e){return"number"==typeof e?e:la(e)?p:+e}function ui(e){if("string"==typeof e)return e;if(qo(e))return jt(e,ui)+"";if(la(e))return Fn?Fn.call(e):"";var t=e+"";return"0"==t&&1/e==-d?"-0":t}function di(e,t,n){var r=-1,i=Ot,s=e.length,o=!0,a=[],c=a;if(n)o=!1,i=Mt;else if(s>=200){var l=t?null:Yi(e);if(l)return hn(l);o=!1,i=tn,c=new Zn}else c=t?[]:a;e:for(;++r<s;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,o&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),a.push(u)}
vendor: 4,906 bytes, line 9688
9688else i(c,d,n)||(c!==a&&c.push(d),a.push(u))}return a}function hi(e,t){return null==(e=Is(e,t=bi(t,e)))||delete e[Ds(Ys(t))]}function pi(e,t,n,r){return ei(e,t,n(kr(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,s=r?i:-1;(r?s--:++s<i)&&t(e[s],s,e););return n?ii(e,r?0:s,r?s+1:i):ii(e,r?s+1:0,r?i:s)}function mi(e,t){var n=e;return n instanceof qn&&(n=n.value()),Dt(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function gi(e,t,n){var r=e.length;if(r<2)return r?di(e[0]):[];for(var i=-1,s=ae(r);++i<r;)for(var o=e[i],a=-1;++a<r;)a!=i&&(s[i]=hr(s[i]||o,e[a],t,n));return di(vr(s,1),t,n)}function yi(e,t,r){for(var i=-1,s=e.length,o=t.length,a={};++i<s;){var c=i<o?t[i]:n;r(a,e[i],c)}return a}function vi(e){return Ko(e)?e:[]}function wi(e){return"function"==typeof e?e:ic}function bi(e,t){return qo(e)?e:xs(e,t)?[e]:Ls(wa(e))}var xi=Qr;function Ei(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:ii(e,t,r)}var _i=ut||function(e){return mt.clearTimeout(e)};function ki(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}function Ci(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Ai(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Si(e,t){if(e!==t){var r=e!==n,i=null===e,s=e===e,o=la(e),a=t!==n,c=null===t,l=t===t,u=la(t);if(!c&&!u&&!o&&e>t||o&&a&&l&&!c&&!u||i&&a&&l||!r&&l||!s)return 1;if(!i&&!o&&!u&&e<t||u&&r&&s&&!i&&!o||c&&r&&s||!a&&s||!l)return-1}return 0}function Ii(e,t,n,r){for(var i=-1,s=e.length,o=n.length,a=-1,c=t.length,l=wn(s-o,0),u=ae(c+l),d=!r;++a<c;)u[a]=t[a];for(;++i<o;)(d||i<s)&&(u[n[i]]=e[i]);for(;l--;)u[a++]=e[i++];return u}function Ti(e,t,n,r){for(var i=-1,s=e.length,o=-1,a=n.length,c=-1,l=t.length,u=wn(s-a,0),d=ae(u+l),h=!r;++i<u;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++o<a;)(h||i<s)&&(d[p+n[o]]=e[i++]);return d}function Pi(e,t){var n=-1,r=e.length;for(t||(t=ae(r));++n<r;)t[n]=e[n];return t}function Ni(e,t,r,i){var s=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var c=t[o],l=i?i(r[c],e[c],c,r,e):n;l===n&&(l=e[c]),s?or(r,c,l):nr(r,c,l)}return r}function Ri(e,t){return function(n,r){var i=qo(n)?It:ir,s=t?t():{};return i(n,e,ls(r,2),s)}}function Oi(e){return Qr((function(t,r){var i=-1,s=r.length,o=s>1?r[s-1]:n,a=s>2?r[2]:n;for(o=e.length>3&&"function"==typeof o?(s--,o):n,a&&bs(r[0],r[1],a)&&(o=s<3?n:o,s=1),t=Ie(t);++i<s;){var c=r[i];c&&e(t,c,i,o)}return t}))}function Mi(e,t){return function(n,r){if(null==n)return n;if(!Go(n))return e(n,r);for(var i=n.length,s=t?i:-1,o=Ie(n);(t?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function ji(e){return function(t,n,r){for(var i=-1,s=Ie(t),o=r(t),a=o.length;a--;){var c=o[e?a:++i];if(!1===n(s[c],c,s))break}return t}}function Li(e){return function(t){var r=cn(t=wa(t))?fn(t):n,i=r?r[0]:t.charAt(0),s=r?Ei(r,1).join(""):t.slice(1);return i[e]()+s}}function Di(e){return function(t){return Dt(Ja(Wa(t).replace(et,"")),e,"")}}function Bi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=zn(e.prototype),r=e.apply(n,t);return ta(r)?r:n}}function Ui(e){return function(t,r,i){var s=Ie(t);if(!Go(t)){var o=ls(r,3);t=Ra(t),r=function(e){return o(s[e],e,s)}}var a=e(t,r,i);return a>-1?s[o?t[a]:a]:n}}function Fi(e){return rs((function(t){var i=t.length,s=i,o=Wn.prototype.thru;for(e&&t.reverse();s--;){var a=t[s];if("function"!=typeof a)throw new Ne(r);if(o&&!c&&"wrapper"==as(a))var c=new Wn([],!0)}for(s=c?s:i;++s<i;){var l=as(a=t[s]),u="wrapper"==l?os(a):n;c=u&&Es(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[as(u[0])].apply(c,u[3]):1==a.length&&Es(a)?c[l]():c.thru(a)}return function(){var e=arguments,n=e[0];if(c&&1==e.length&&qo(n))return c.plant(n).value();for(var r=0,s=i?t[r].apply(this,e):n;++r<i;)s=t[r].call(this,s);return s}}))}function $i(e,t,r,i,s,o,a,c,u,d){var h=t&l,p=1&t,f=2&t,m=24&t,g=512&t,y=f?n:Bi(e);return function l(){for(var v=arguments.length,w=ae(v),b=v;b--;)w[b]=arguments[b];if(m)var x=cs(l),E=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,x);if(i&&(w=Ii(w,i,s,m)),o&&(w=Ti(w,o,a,m)),v-=E,m&&v<d){var _=dn(w,x);return Ki(e,t,$i,l.placeholder,r,w,_,c,u,d-v)}var k=p?r:this,C=f?k[e]:e;return v=w.length,c?w=function(e,t){for(var r=e.length,i=bn(t.length,r),s=Pi(e);i--;){var o=t[i];e[i]=ws(o,r)?s[o]:n}return e}(w,c):g&&v>1&&w.reverse(),h&&u<v&&(w.length=u),this&&this!==mt&&this instanceof l&&(C=y||Bi(C)),C.apply(k,w)}}function zi(e,t){return function(n,r){return function(e,t,n,r){return xr(e,(function(e,i,s){t(r,n(e),i,s)})),r}(n,e,t(r),{})}}function Hi(e,t){return function(r,i){var s;if(r===n&&i===n)return t;
vendor: 2,674 bytes, line 9688
9688if(r!==n&&(s=r),i!==n){if(s===n)return i;"string"==typeof r||"string"==typeof i?(r=ui(r),i=ui(i)):(r=li(r),i=li(i)),s=e(r,i)}return s}}function Wi(e){return rs((function(t){return t=jt(t,Xt(ls())),Qr((function(n){var r=this;return e(t,(function(e){return St(e,r,n)}))}))}))}function qi(e,t){var r=(t=t===n?" ":ui(t)).length;if(r<2)return r?Yr(t,e):t;var i=Yr(t,gt(e/pn(t)));return cn(t)?Ei(fn(i),0,e).join(""):i.slice(0,e)}function Vi(e){return function(t,r,i){return i&&"number"!=typeof i&&bs(t,r,i)&&(r=i=n),t=fa(t),r===n?(r=t,t=0):r=fa(r),function(e,t,n,r){for(var i=-1,s=wn(gt((t-e)/(n||1)),0),o=ae(s);s--;)o[r?s:++i]=e,e+=n;return o}(t,r,i=i===n?t<r?1:-1:fa(i),e)}}function Gi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ya(t),n=ya(n)),e(t,n)}}function Ki(e,t,r,i,s,o,l,u,d,h){var p=8&t;t|=p?a:c,4&(t&=~(p?c:a))||(t&=-4);var f=[e,t,s,p?o:n,p?l:n,p?n:o,p?n:l,u,d,h],m=r.apply(n,f);return Es(e)&&Ps(m,f),m.placeholder=i,Os(m,e,t)}function Zi(e){var t=Se[e];return function(e,n){if(e=ya(e),(n=null==n?0:bn(ma(n),292))&&Ft(e)){var r=(wa(e)+"e").split("e");return+((r=(wa(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Yi=In&&1/hn(new In([,-0]))[1]==d?function(e){return new In(e)}:lc;function Qi(e){return function(t){var n=ms(t);return n==C?ln(t):n==P?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return jt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ji(e,t,i,d,h,p,f,m){var g=2&t;if(!g&&"function"!=typeof e)throw new Ne(r);var y=d?d.length:0;if(y||(t&=-97,d=h=n),f=f===n?f:wn(ma(f),0),m=m===n?m:ma(m),y-=h?h.length:0,t&c){var v=d,w=h;d=h=n}var b=g?n:os(e),x=[e,t,i,d,h,v,w,p,f,m];if(b&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==l&&8==n||r==l&&n==u&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var c=t[3];if(c){var d=e[3];e[3]=d?Ii(d,c,t[4]):c,e[4]=d?dn(e[3],s):t[4]}c=t[5],c&&(d=e[5],e[5]=d?Ti(d,c,t[6]):c,e[6]=d?dn(e[5],s):t[6]),c=t[7],c&&(e[7]=c),r&l&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(x,b),e=x[0],t=x[1],i=x[2],d=x[3],h=x[4],!(m=x[9]=x[9]===n?g?0:e.length:wn(x[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||t==o?function(e,t,r){var i=Bi(e);return function s(){for(var o=arguments.length,a=ae(o),c=o,l=cs(s);c--;)a[c]=arguments[c];var u=o<3&&a[0]!==l&&a[o-1]!==l?[]:dn(a,l);return(o-=u.length)<r?Ki(e,t,$i,s.placeholder,n,a,u,n,n,r-o):St(this&&this!==mt&&this instanceof s?i:e,this,a)}}(e,t,m):t!=a&&33!=t||h.length?$i.apply(n,x):function(e,t,n,r){var i=1&t,s=Bi(e);return function t(){for(var o=-1,a=arguments.length,c=-1,l=r.length,u=ae(l+a
vendor: 5,611 bytes, line 9688
9688),d=this&&this!==mt&&this instanceof t?s:e;++c<l;)u[c]=r[c];for(;a--;)u[c++]=arguments[++o];return St(d,i?n:this,u)}}(e,t,i,d);else var E=function(e,t,n){var r=1&t,i=Bi(e);return function t(){return(this&&this!==mt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,i);return Os((b?ti:Ps)(E,x),e,t)}function Xi(e,t,r,i){return e===n||$o(e,Me[r])&&!De.call(i,r)?t:e}function es(e,t,r,i,s,o){return ta(e)&&ta(t)&&(o.set(t,e),Hr(e,t,n,es,o),o.delete(t)),e}function ts(e){return sa(e)?n:e}function ns(e,t,r,i,s,o){var a=1&r,c=e.length,l=t.length;if(c!=l&&!(a&&l>c))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var h=-1,p=!0,f=2&r?new Zn:n;for(o.set(e,t),o.set(t,e);++h<c;){var m=e[h],g=t[h];if(i)var y=a?i(g,m,h,t,e,o):i(m,g,h,e,t,o);if(y!==n){if(y)continue;p=!1;break}if(f){if(!Ut(t,(function(e,t){if(!tn(f,t)&&(m===e||s(m,e,r,i,o)))return f.push(t)}))){p=!1;break}}else if(m!==g&&!s(m,g,r,i,o)){p=!1;break}}return o.delete(e),o.delete(t),p}function rs(e){return Rs(Ss(e,n,qs),e+"")}function is(e){return Cr(e,Ra,ps)}function ss(e){return Cr(e,Oa,fs)}var os=Nn?function(e){return Nn.get(e)}:lc;function as(e){for(var t=e.name+"",n=Rn[t],r=De.call(Rn,t)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==e)return i.name}return t}function cs(e){return(De.call($n,"placeholder")?$n:e).placeholder}function ls(){var e=$n.iteratee||sc;return e=e===sc?Lr:e,arguments.length?e(arguments[0],arguments[1]):e}function us(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ds(e){for(var t=Ra(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Cs(i)]}return t}function hs(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return jr(r)?r:n}var ps=wt?function(e){return null==e?[]:(e=Ie(e),Rt(wt(e),(function(t){return Ye.call(e,t)})))}:gc,fs=wt?function(e){for(var t=[];e;)Lt(t,ps(e)),e=Ke(e);return t}:gc,ms=Ar;function gs(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,s=!1;++r<i;){var o=Ds(t[r]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++r!=i?s:!!(i=null==e?0:e.length)&&ea(i)&&ws(o,i)&&(qo(e)||Wo(e))}function ys(e){return"function"!=typeof e.constructor||ks(e)?{}:zn(Ke(e))}function vs(e){return qo(e)||Wo(e)||!!(Je&&e&&e[Je])}function ws(e,t){var n=typeof e;return!!(t=t??h)&&("number"==n||"symbol"!=n&&be.test(e))&&e>-1&&e%1==0&&e<t}function bs(e,t,n){if(!ta(n))return!1;var r=typeof t;return!!("number"==r?Go(n)&&ws(t,n.length):"string"==r&&t in n)&&$o(n[t],e)}function xs(e,t){if(qo(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!la(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ie(t))}function Es(e){var t=as(e),n=$n[t];if("function"!=typeof n||!(t in qn.prototype))return!1;if(e===n)return!0;var r=os(n);return!!r&&e===r[0]}(Cn&&ms(new Cn(new ArrayBuffer(1)))!=j||An&&ms(new An)!=C||Sn&&ms(Sn.resolve())!=I||In&&ms(new In)!=P||Tn&&ms(new Tn)!=O)&&(ms=function(e){var t=Ar(e),r=t==S?e.constructor:n,i=r?Bs(r):"";if(i)switch(i){case On:return j;case Mn:return C;case jn:return I;case Ln:return P;case Dn:return O}return t});var _s=je?Jo:yc;function ks(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Me)}function Cs(e){return e===e&&!ta(e)}function As(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in Ie(r)))}}function Ss(e,t,r){return t=wn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=wn(n.length-t,0),o=ae(s);++i<s;)o[i]=n[t+i];i=-1;for(var a=ae(t+1);++i<t;)a[i]=n[i];return a[t]=r(o),St(e,this,a)}}function Is(e,t){return t.length<2?e:kr(e,ii(t,0,-1))}function Ts(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ps=Ms(ti),Ns=ft||function(e,t){return mt.setTimeout(e,t)},Rs=Ms(ni);function Os(e,t,n){var r=t+"";return Rs(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Tt(y,(function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ue):[]}(r),n)))}function Ms(e){var t=0,r=0;return function(){var i=xn(),s=16-(i-r);if(r=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function js(e,t){var r=-1,i=e.length,s=i-1;for(t=t===n?i:t;++r<t;){var o=Zr(r,s),a=e[o];e[o]=e[r],e[r]=a}return e.length=t,e}var Ls=function(e){var t=jo(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,i){t.push(r?i.replace(pe,"$1"):n||e)})),t}));function Ds(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-d?"-0":t}function Bs(e){if(null!=e){try{return Le.call(e)}catch{}try{return e+""}catch{}}return""}function Us(e){if(e instanceof qn)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=Pi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fs=Qr((function(e,t){return Ko(e)?hr(e,vr(t,1,Ko,!0)):[]})),$s=Qr((function(e,t){var r=Ys(t);return Ko(r)&&(r=n),Ko(e)?hr(e,vr(t,1,Ko,!0),ls(r,2)):[]})),zs=Qr((function(e,t){var r=Ys(t);return Ko(r)&&(r=n),Ko(e)?hr(e,vr(t,1,Ko,!0),n,r):[]}));function Hs(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ma(n);return i<0&&(i=wn(r+i,0)),zt(e,ls(t,3),i)}function Ws(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return r!==n&&(s=ma(r),s=r<0?wn(i+s,0):bn(s,i-1)),zt(e,ls(t,3),s,!0)}function qs(e){return(null==e?0:e.length)?vr(e,1):[]}function Vs(e){return e&&e.length?e[0]:n}
vendor: 12,506 bytes, line 9688
9688var Gs=Qr((function(e){var t=jt(e,vi);return t.length&&t[0]===e[0]?Pr(t):[]})),Ks=Qr((function(e){var t=Ys(e),r=jt(e,vi);return t===Ys(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Pr(r,ls(t,2)):[]})),Zs=Qr((function(e){var t=Ys(e),r=jt(e,vi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Pr(r,n,t):[]}));function Ys(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Qs=Qr(Js);function Js(e,t){return e&&e.length&&t&&t.length?Gr(e,t):e}var Xs=rs((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Kr(e,jt(t,(function(e){return ws(e,n)?+e:e})).sort(Si)),r}));function eo(e){return null==e?e:kn.call(e)}var to=Qr((function(e){return di(vr(e,1,Ko,!0))})),no=Qr((function(e){var t=Ys(e);return Ko(t)&&(t=n),di(vr(e,1,Ko,!0),ls(t,2))})),ro=Qr((function(e){var t=Ys(e);return t="function"==typeof t?t:n,di(vr(e,1,Ko,!0),n,t)}));function io(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(Ko(e))return t=wn(e.length,t),!0})),Qt(t,(function(t){return jt(e,Gt(t))}))}function so(e,t){if(!e||!e.length)return[];var r=io(e);return null==t?r:jt(r,(function(e){return St(t,n,e)}))}var oo=Qr((function(e,t){return Ko(e)?hr(e,t):[]})),ao=Qr((function(e){return gi(Rt(e,Ko))})),co=Qr((function(e){var t=Ys(e);return Ko(t)&&(t=n),gi(Rt(e,Ko),ls(t,2))})),lo=Qr((function(e){var t=Ys(e);return t="function"==typeof t?t:n,gi(Rt(e,Ko),n,t)})),uo=Qr(io);var ho=Qr((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,so(e,r)}));function po(e){var t=$n(e);return t.__chain__=!0,t}function fo(e,t){return t(e)}var mo=rs((function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,s=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&i instanceof qn&&ws(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:fo,args:[s],thisArg:n}),new Wn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(s)}));var go=Ri((function(e,t,n){De.call(e,n)?++e[n]:or(e,n,1)}));var yo=Ui(Hs),vo=Ui(Ws);function wo(e,t){return(qo(e)?Tt:pr)(e,ls(t,3))}function bo(e,t){return(qo(e)?Pt:fr)(e,ls(t,3))}var xo=Ri((function(e,t,n){De.call(e,n)?e[n].push(t):or(e,n,[t])}));var Eo=Qr((function(e,t,n){var r=-1,i="function"==typeof t,s=Go(e)?ae(e.length):[];return pr(e,(function(e){s[++r]=i?St(t,e,n):Nr(e,t,n)})),s})),_o=Ri((function(e,t,n){or(e,n,t)}));function ko(e,t){return(qo(e)?jt:Fr)(e,ls(t,3))}var Co=Ri((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ao=Qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&bs(e,t[0],t[1])?t=[]:n>2&&bs(t[0],t[1],t[2])&&(t=[t[0]]),qr(e,vr(t,1),[])})),So=pt||function(){return mt.Date.now()};function Io(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Ji(e,l,n,n,n,n,t)}function To(e,t){var i;if("function"!=typeof t)throw new Ne(r);return e=ma(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var Po=Qr((function(e,t,n){var r=1;if(n.length){var i=dn(n,cs(Po));r|=a}return Ji(e,r,t,n,i)})),No=Qr((function(e,t,n){var r=3;if(n.length){var i=dn(n,cs(No));r|=a}return Ji(t,r,e,n,i)}));function Ro(e,t,i){var s,o,a,c,l,u,d=0,h=!1,p=!1,f=!0;if("function"!=typeof e)throw new Ne(r);function m(t){var r=s,i=o;return s=o=n,d=t,c=e.apply(i,r)}function g(e){var r=e-u;return u===n||r>=t||r<0||p&&e-d>=a}function y(){var e=So();if(g(e))return v(e);l=Ns(y,function(e){var n=t-(e-u);return p?bn(n,a-(e-d)):n}(e))}function v(e){return l=n,f&&s?m(e):(s=o=n,c)}function w(){var e=So(),r=g(e);if(s=arguments,o=this,u=e,r){if(l===n)return function(e){return d=e,l=Ns(y,t),h?m(e):c}(u);if(p)return _i(l),l=Ns(y,t),m(u)}return l===n&&(l=Ns(y,t)),c}return t=ya(t)||0,ta(i)&&(h=!!i.leading,a=(p="maxWait"in i)?wn(ya(i.maxWait)||0,t):a,f="trailing"in i?!!i.trailing:f),w.cancel=function(){l!==n&&_i(l),d=0,s=u=o=l=n},w.flush=function(){return l===n?c:v(So())},w}var Oo=Qr((function(e,t){return dr(e,1,t)})),Mo=Qr((function(e,t,n){return dr(e,ya(t)||0,n)}));function jo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ne(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(jo.Cache||Kn),n}function Lo(e){if("function"!=typeof e)throw new Ne(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}jo.Cache=Kn;var Do=xi((function(e,t){var n=(t=1==t.length&&qo(t[0])?jt(t[0],Xt(ls())):jt(vr(t,1),Xt(ls()))).length;return Qr((function(r){for(var i=-1,s=bn(r.length,n);++i<s;)r[i]=t[i].call(this,r[i]);return St(e,this,r)}))})),Bo=Qr((function(e,t){var r=dn(t,cs(Bo));return Ji(e,a,n,t,r)})),Uo=Qr((function(e,t){var r=dn(t,cs(Uo));return Ji(e,c,n,t,r)})),Fo=rs((function(e,t){return Ji(e,u,n,n,n,t)}));function $o(e,t){return e===t||e!==e&&t!==t}var zo=Gi(Sr),Ho=Gi((function(e,t){return e>=t})),Wo=Rr(function(){return arguments}())?Rr:function(e){return na(e)&&De.call(e,"callee")&&!Ye.call(e,"callee")},qo=ae.isArray,Vo=xt?Xt(xt):function(e){return na(e)&&Ar(e)==M};function Go(e){return null!=e&&ea(e.length)&&!Jo(e)}function Ko(e){return na(e)&&Go(e)}var Zo=bt||yc,Yo=Et?Xt(Et):function(e){return na(e)&&Ar(e)==x};function Qo(e){if(!na(e))return!1;var t=Ar(e);return t==E||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!sa(e)}function Jo(e){if(!ta(e))return!1;var t=Ar(e);return t==_||t==k||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xo(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ra=_t?Xt(_t):function(e){return na(e)&&ms(e)==C};function ia(e){return"number"==typeof e||na(e)&&Ar(e)==A}function sa(e){if(!na(e)||Ar(e)!=S)return!1;var t=Ke(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==$e}var oa=kt?Xt(kt):function(e){return na(e)&&Ar(e)==T};var aa=Ct?Xt(Ct):function(e){return na(e)&&ms(e)==P};function ca(e){return"string"==typeof e||!qo(e)&&na(e)&&Ar(e)==N}function la(e){return"symbol"==typeof e||na(e)&&Ar(e)==R}var ua=At?Xt(At):function(e){return na(e)&&ea(e.length)&&!!ct[Ar(e)]};var da=Gi(Ur),ha=Gi((function(e,t){return e<=t}));function pa(e){if(!e)return[];if(Go(e))return ca(e)?fn(e):Pi(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=ms(e);return(t==C?ln:t==P?hn:$a)(e)}function fa(e){return e?(e=ya(e))===d||e===-d?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ma(e){var t=fa(e),n=t%1;return t===t?n?t-n:t:0}function ga(e){return e?cr(ma(e),0,f):0}function ya(e){if("number"==typeof e)return e;if(la(e))return p;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var n=ye.test(e);return n||we.test(e)?ht(e.slice(2),n?2:8):ge.test(e)?p:+e}function va(e){return Ni(e,Oa(e))}function wa(e){return null==e?"":ui(e)}var ba=Oi((function(e,t){if(ks(t)||Go(t))Ni(t,Ra(t),e);else for(var n in t)De.call(t,n)&&nr(e,n,t[n])})),xa=Oi((function(e,t){Ni(t,Oa(t),e)})),Ea=Oi((function(e,t,n,r){Ni(t,Oa(t),e,r)})),_a=Oi((function(e,t,n,r){Ni(t,Ra(t),e,r)})),ka=rs(ar);var Ca=Qr((function(e,t){e=Ie(e);var r=-1,i=t.length,s=i>2?t[2]:n;for(s&&bs(t[0],t[1],s)&&(i=1);++r<i;)for(var o=t[r],a=Oa(o),c=-1,l=a.length;++c<l;){var u=a[c],d=e[u];(d===n||$o(d,Me[u])&&!De.call(e,u))&&(e[u]=o[u])}return e})),Aa=Qr((function(e){return e.push(n,es),St(ja,n,e)}));function Sa(e,t,r){var i=null==e?n:kr(e,t);return i===n?r:i}function Ia(e,t){return null!=e&&gs(e,t,Tr)}var Ta=zi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n}),tc(ic)),Pa=zi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),De.call(e,t)?e[t].push(n):e[t]=[n]}),ls),Na=Qr(Nr);function Ra(e){return Go(e)?Qn(e):Dr(e)}function Oa(e){return Go(e)?Qn(e,!0):Br(e)}var Ma=Oi((function(e,t,n){Hr(e,t,n)})),ja=Oi((function(e,t,n,r){Hr(e,t,n,r)})),La=rs((function(e,t){var n={};if(null==e)return n;var r=!1;t=jt(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ni(e,ss(e),n),r&&(n=lr(n,7,ts));for(var i=t.length;i--;)hi(n,t[i]);return n}));var Da=rs((function(e,t){return null==e?{}:function(e,t){return Vr(e,t,(function(t,n){return Ia(e,n)}))}(e,t)}));function Ba(e,t){if(null==e)return{};var n=jt(ss(e),(function(e){return[e]}));return t=ls(t),Vr(e,n,(function(e,n){return t(e,n[0])}))}var Ua=Qi(Ra),Fa=Qi(Oa);function $a(e){return null==e?[]:en(e,Ra(e))}var za=Di((function(e,t,n){return t=t.toLowerCase(),e+(n?Ha(t):t)}));function Ha(e){return Qa(wa(e).toLowerCase())}function Wa(e){return(e=wa(e))&&e.replace(xe,sn).replace(tt,"")}var qa=Di((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Va=Di((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ga=Li("toLowerCase");var Ka=Di((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Za=Di((function(e,t,n){return e+(n?" ":"")+Qa(t)}));var Ya=Di((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qa=Li("toUpperCase");function Ja(e,t,r){return e=wa(e),(t=r?n:t)===n?function(e){return st.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Xa=Qr((function(e,t){try{return St(e,n,t)}catch(r){return Qo(r)?r:new Ce(r)}})),ec=rs((function(e,t){return Tt(t,(function(t){t=Ds(t),or(e,t,Po(e[t],e))})),e}));function tc(e){return function(){return e}}var nc=Fi(),rc=Fi(!0);function ic(e){return e}function sc(e){return Lr("function"==typeof e?e:lr(e,1))}var oc=Qr((function(e,t){return function(n){return Nr(n,e,t)}})),ac=Qr((function(e,t){return function(n){return Nr(e,n,t)}}));function cc(e,t,n){var r=Ra(t),i=_r(t,r);null==n&&(!ta(t)||!i.length&&r.length)&&(n=t,t=e,e=this,i=_r(t,Ra(t)));var s=!(ta(n)&&"chain"in n)||!!n.chain,o=Jo(e);return Tt(i,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__);return(n.__actions__=Pi(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function lc(){}var uc=Wi(jt),dc=Wi(Nt),hc=Wi(Ut);function pc(e){return xs(e)?Gt(Ds(e)):function(e){return function(t){return kr(t,e)}}(e)}var fc=Vi(),mc=Vi(!0);function gc(){return[]}function yc(){return!1}var vc=Hi((function(e,t){return e+t}),0),wc=Zi("ceil"),bc=Hi((function(e,t){return e/t}),1),xc=Zi("floor");var Ec=Hi((function(e,t){return e*t}),1),_c=Zi("round"),kc=Hi((function(e,t){return e-t}),0);return $n.after=function(e,t){if("function"!=typeof t)throw new Ne(r);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},$n.ary=Io,$n.assign=ba,$n.assignIn=xa,$n.assignInWith=Ea,$n.assignWith=_a,$n.at=ka,$n.before=To,$n.bind=Po,$n.bindAll=ec,$n.bindKey=No,$n.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qo(e)?e:[e]},$n.chain=po,$n.chunk=function(e,t,r){t=(r?bs(e,t,r):t===n)?1:wn(ma(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,o=0,a=ae(gt(i/t));s<i;)a[o++]=ii(e,s,s+=t);return a},$n.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var s=e[t];s&&(i[r++]=s)}return i},$n.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ae(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Lt(qo(n)?Pi(n):[n],vr(t,1))},$n.cond=function(e){var t=null==e?0:e.length,n=ls();return e=t?jt(e,(function(e){if("function"!=typeof e[1])throw new Ne(r);return[n(e[0]),e[1]]})):[],Qr((function(n){for(var r=-1;++r<t;){var i=e[r];if(St(i[0],this,n))return St(i[1],this,n)}}))},$n.conforms=function(e){return function(e){var t=Ra(e);return function(n){return ur(n,e,t)}}(lr(e,1))},$n.constant=tc,$n.countBy=go,$n.create=function(e,t){var n=zn(e);return null==t?n:sr(n,t)},$n.curry=function e(t,r,i){var s=Ji(t,8,n,n,n,n,n,r=i?n:r);return s.placeholder=e.placeholder,s},$n.curryRight=function e(t,r,i){var s=Ji(t,o,n,n,n,n,n,r=i?n:r);return s.placeholder=e.placeholder,s},$n.debounce=Ro,$n.defaults=Ca,$n.defaultsDeep=Aa,$n.defer=Oo,$n.delay=Mo,$n.difference=Fs,$n.differenceBy=$s,$n.differenceWith=zs,$n.drop=function(e,t,r){var i=null==e?0:e.length;return i?ii(e,(t=r||t===n?1:ma(t))<0?0:t,i):[]},$n.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?ii(e,0,(t=i-(t=r||t===n?1:ma(t)))<0?0:t):[]},$n.dropRightWhile=function(e,t){return e&&e.length?fi(e,ls(t,3),!0,
vendor: 5,834 bytes, line 9688
9688!0):[]},$n.dropWhile=function(e,t){return e&&e.length?fi(e,ls(t,3),!0):[]},$n.fill=function(e,t,r,i){var s=null==e?0:e.length;return s?(r&&"number"!=typeof r&&bs(e,t,r)&&(r=0,i=s),function(e,t,r,i){var s=e.length;for((r=ma(r))<0&&(r=-r>s?0:s+r),(i=i===n||i>s?s:ma(i))<0&&(i+=s),i=r>i?0:ga(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},$n.filter=function(e,t){return(qo(e)?Rt:yr)(e,ls(t,3))},$n.flatMap=function(e,t){return vr(ko(e,t),1)},$n.flatMapDeep=function(e,t){return vr(ko(e,t),d)},$n.flatMapDepth=function(e,t,r){return r=r===n?1:ma(r),vr(ko(e,t),r)},$n.flatten=qs,$n.flattenDeep=function(e){return(null==e?0:e.length)?vr(e,d):[]},$n.flattenDepth=function(e,t){return(null==e?0:e.length)?vr(e,t=t===n?1:ma(t)):[]},$n.flip=function(e){return Ji(e,512)},$n.flow=nc,$n.flowRight=rc,$n.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},$n.functions=function(e){return null==e?[]:_r(e,Ra(e))},$n.functionsIn=function(e){return null==e?[]:_r(e,Oa(e))},$n.groupBy=xo,$n.initial=function(e){return(null==e?0:e.length)?ii(e,0,-1):[]},$n.intersection=Gs,$n.intersectionBy=Ks,$n.intersectionWith=Zs,$n.invert=Ta,$n.invertBy=Pa,$n.invokeMap=Eo,$n.iteratee=sc,$n.keyBy=_o,$n.keys=Ra,$n.keysIn=Oa,$n.map=ko,$n.mapKeys=function(e,t){var n={};return t=ls(t,3),xr(e,(function(e,r,i){or(n,t(e,r,i),e)})),n},$n.mapValues=function(e,t){var n={};return t=ls(t,3),xr(e,(function(e,r,i){or(n,r,t(e,r,i))})),n},$n.matches=function(e){return $r(lr(e,1))},$n.matchesProperty=function(e,t){return zr(e,lr(t,1))},$n.memoize=jo,$n.merge=Ma,$n.mergeWith=ja,$n.method=oc,$n.methodOf=ac,$n.mixin=cc,$n.negate=Lo,$n.nthArg=function(e){return e=ma(e),Qr((function(t){return Wr(t,e)}))},$n.omit=La,$n.omitBy=function(e,t){return Ba(e,Lo(ls(t)))},$n.once=function(e){return To(2,e)},$n.orderBy=function(e,t,r,i){return null==e?[]:(qo(t)||(t=null==t?[]:[t]),qo(r=i?n:r)||(r=null==r?[]:[r]),qr(e,t,r))},$n.over=uc,$n.overArgs=Do,$n.overEvery=dc,$n.overSome=hc,$n.partial=Bo,$n.partialRight=Uo,$n.partition=Co,$n.pick=Da,$n.pickBy=Ba,$n.property=pc,$n.propertyOf=function(e){return function(t){return null==e?n:kr(e,t)}},$n.pull=Qs,$n.pullAll=Js,$n.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Gr(e,t,ls(n,2)):e},$n.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Gr(e,t,n,r):e},$n.pullAt=Xs,$n.range=fc,$n.rangeRight=mc,$n.rearg=Fo,$n.reject=function(e,t){return(qo(e)?Rt:yr)(e,Lo(ls(t,3)))},$n.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],s=e.length;for(t=ls(t,3);++r<s;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return Kr(e,i),n},$n.rest=function(e,t){if("function"!=typeof e)throw new Ne(r);return Qr(e,t=t===n?t:ma(t))},$n.reverse=eo,$n.sampleSize=function(e,t,r){return t=(r?bs(e,t,r):t===n)?1:ma(t),(qo(e)?Xn:Xr)(e,t)},$n.set=function(e,t,n){return null==e?e:ei(e,t,n)},$n.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:ei(e,t,r,i)},$n.shuffle=function(e){return(qo(e)?er:ri)(e)},$n.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&bs(e,t,r)?(t=0,r=i):(t=null==t?0:ma(t),r=r===n?i:ma(r)),ii(e,t,r)):[]},$n.sortBy=Ao,$n.sortedUniq=function(e){return e&&e.length?ci(e):[]},$n.sortedUniqBy=function(e,t){return e&&e.length?ci(e,ls(t,2)):[]},$n.split=function(e,t,r){return r&&"number"!=typeof r&&bs(e,t,r)&&(t=r=n),(r=r===n?f:r>>>0)?(e=wa(e))&&("string"==typeof t||null!=t&&!oa(t))&&(!(t=ui(t))&&cn(e))?Ei(fn(e),0,r):e.split(t,r):[]},$n.spread=function(e,t){if("function"!=typeof e)throw new Ne(r);return t=null==t?0:wn(ma(t),0),Qr((function(n){var r=n[t],i=Ei(n,0,t);return r&&Lt(i,r),St(e,this,i)}))},$n.tail=function(e){var t=null==e?0:e.length;return t?ii(e,1,t):[]},$n.take=function(e,t,r){return e&&e.length?ii(e,0,(t=r||t===n?1:ma(t))<0?0:t):[]},$n.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?ii(e,(t=i-(t=r||t===n?1:ma(t)))<0?0:t,i):[]},$n.takeRightWhile=function(e,t){return e&&e.length?fi(e,ls(t,3),!1,!0):[]},$n.takeWhile=function(e,t){return e&&e.length?fi(e,ls(t,3)):[]},$n.tap=function(e,t){return t(e),e},$n.throttle=function(e,t,n){var i=!0,s=!0;if("function"!=typeof e)throw new Ne(r);return ta(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),Ro(e,t,{leading:i,maxWait:t,trailing:s})},$n.thru=fo,$n.toArray=pa,$n.toPairs=Ua,$n.toPairsIn=Fa,$n.toPath=function(e){return qo(e)?jt(e,Ds):la(e)?[e]:Pi(Ls(wa(e)))},$n.toPlainObject=va,$n.transform=function(e,t,n){var r=qo(e),i=r||Zo(e)||ua(e);if(t=ls(t,4),null==n){var s=e&&e.constructor;n=i?r?new s:[]:ta(e)&&Jo(s)?zn(Ke(e)):{}}return(i?Tt:xr)(e,(function(e,r,i){return t(n,e,r,i)})),n},$n.unary=function(e){return Io(e,1)},$n.union=to,$n.unionBy=no,$n.unionWith=ro,$n.uniq=function(e){return e&&e.length?di(e):[]},$n.uniqBy=function(e,t){return e&&e.length?di(e,ls(t,2)):[]},$n.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?di(e,n,t):[]},$n.unset=function(e,t){return null==e||hi(e,t)},$n.unzip=io,$n.unzipWith=so,$n.update=function(e,t,n){return null==e?e:pi(e,t,wi(n))},$n.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:pi(e,t,wi(r),i)},$n.values=$a,$n.valuesIn=function(e){return null==e?[]:en(e,Oa(e))},$n.without=oo,$n.words=Ja,$n.wrap=function(e,t){return Bo(wi(t),e)},$n.xor=ao,$n.xorBy=co,$n.xorWith=lo,$n.zip=uo,$n.zipObject=function(e,t){return yi(e||[],t||[],nr)},$n.zipObjectDeep=function(e,t){return yi(e||[],t||[],ei)},$n.zipWith=ho,$n.entries=Ua,$n.entriesIn=Fa,$n.extend=xa,$n.extendWith=Ea,cc($n,$n),$n.add=vc,$n.attempt=Xa,$n.camelCase=za,$n.capitalize=Ha,$n.ceil=wc,$n.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=ya(r))===r?r:0),t!==n&&(t=(t=ya(t))===t?t:0),cr(ya(e),t,r)},$n.clone=function(e){return lr(e,4)},$n.cloneDeep=function(e){return lr(e,5)},$n.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:n)}
vendor: 7,323 bytes, line 9688
9688,$n.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:n)},$n.conformsTo=function(e,t){return null==t||ur(e,t,Ra(t))},$n.deburr=Wa,$n.defaultTo=function(e,t){return null==e||e!==e?t:e},$n.divide=bc,$n.endsWith=function(e,t,r){e=wa(e),t=ui(t);var i=e.length,s=r=r===n?i:cr(ma(r),0,i);return(r-=t.length)>=0&&e.slice(r,s)==t},$n.eq=$o,$n.escape=function(e){return(e=wa(e))&&Q.test(e)?e.replace(Z,on):e},$n.escapeRegExp=function(e){return(e=wa(e))&&se.test(e)?e.replace(ie,"\\$&"):e},$n.every=function(e,t,r){var i=qo(e)?Nt:mr;return r&&bs(e,t,r)&&(t=n),i(e,ls(t,3))},$n.find=yo,$n.findIndex=Hs,$n.findKey=function(e,t){return $t(e,ls(t,3),xr)},$n.findLast=vo,$n.findLastIndex=Ws,$n.findLastKey=function(e,t){return $t(e,ls(t,3),Er)},$n.floor=xc,$n.forEach=wo,$n.forEachRight=bo,$n.forIn=function(e,t){return null==e?e:wr(e,ls(t,3),Oa)},$n.forInRight=function(e,t){return null==e?e:br(e,ls(t,3),Oa)},$n.forOwn=function(e,t){return e&&xr(e,ls(t,3))},$n.forOwnRight=function(e,t){return e&&Er(e,ls(t,3))},$n.get=Sa,$n.gt=zo,$n.gte=Ho,$n.has=function(e,t){return null!=e&&gs(e,t,Ir)},$n.hasIn=Ia,$n.head=Vs,$n.identity=ic,$n.includes=function(e,t,n,r){e=Go(e)?e:$a(e),n=n&&!r?ma(n):0;var i=e.length;return n<0&&(n=wn(i+n,0)),ca(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ht(e,t,n)>-1},$n.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ma(n);return i<0&&(i=wn(r+i,0)),Ht(e,t,i)},$n.inRange=function(e,t,r){return t=fa(t),r===n?(r=t,t=0):r=fa(r),function(e,t,n){return e>=bn(t,n)&&e<wn(t,n)}(e=ya(e),t,r)},$n.invoke=Na,$n.isArguments=Wo,$n.isArray=qo,$n.isArrayBuffer=Vo,$n.isArrayLike=Go,$n.isArrayLikeObject=Ko,$n.isBoolean=function(e){return!0===e||!1===e||na(e)&&Ar(e)==b},$n.isBuffer=Zo,$n.isDate=Yo,$n.isElement=function(e){return na(e)&&1===e.nodeType&&!sa(e)},$n.isEmpty=function(e){if(null==e)return!0;if(Go(e)&&(qo(e)||"string"==typeof e||"function"==typeof e.splice||Zo(e)||ua(e)||Wo(e)))return!e.length;var t=ms(e);if(t==C||t==P)return!e.size;if(ks(e))return!Dr(e).length;for(var n in e)if(De.call(e,n))return!1;return!0},$n.isEqual=function(e,t){return Or(e,t)},$n.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?Or(e,t,n,r):!!i},$n.isError=Qo,$n.isFinite=function(e){return"number"==typeof e&&Ft(e)},$n.isFunction=Jo,$n.isInteger=Xo,$n.isLength=ea,$n.isMap=ra,$n.isMatch=function(e,t){return e===t||Mr(e,t,ds(t))},$n.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Mr(e,t,ds(t),r)},$n.isNaN=function(e){return ia(e)&&e!=+e},$n.isNative=function(e){if(_s(e))throw new Ce("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return jr(e)},$n.isNil=function(e){return null==e},$n.isNull=function(e){return null===e},$n.isNumber=ia,$n.isObject=ta,$n.isObjectLike=na,$n.isPlainObject=sa,$n.isRegExp=oa,$n.isSafeInteger=function(e){return Xo(e)&&e>=-h&&e<=h},$n.isSet=aa,$n.isString=ca,$n.isSymbol=la,$n.isTypedArray=ua,$n.isUndefined=function(e){return e===n},$n.isWeakMap=function(e){return na(e)&&ms(e)==O},$n.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Ar(e)},$n.join=function(e,t){return null==e?"":Kt.call(e,t)},$n.kebabCase=qa,$n.last=Ys,$n.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var s=i;return r!==n&&(s=(s=ma(r))<0?wn(i+s,0):bn(s,i-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,s):zt(e,qt,s,!0)},$n.lowerCase=Va,$n.lowerFirst=Ga,$n.lt=da,$n.lte=ha,$n.max=function(e){return e&&e.length?gr(e,ic,Sr):n},$n.maxBy=function(e,t){return e&&e.length?gr(e,ls(t,2),Sr):n},$n.mean=function(e){return Vt(e,ic)},$n.meanBy=function(e,t){return Vt(e,ls(t,2))},$n.min=function(e){return e&&e.length?gr(e,ic,Ur):n},$n.minBy=function(e,t){return e&&e.length?gr(e,ls(t,2),Ur):n},$n.stubArray=gc,$n.stubFalse=yc,$n.stubObject=function(){return{}},$n.stubString=function(){return""},$n.stubTrue=function(){return!0},$n.multiply=Ec,$n.nth=function(e,t){return e&&e.length?Wr(e,ma(t)):n},$n.noConflict=function(){return mt._===this&&(mt._=ze),this},$n.noop=lc,$n.now=So,$n.pad=function(e,t,n){e=wa(e);var r=(t=ma(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return qi(yt(i),n)+e+qi(gt(i),n)},$n.padEnd=function(e,t,n){e=wa(e);var r=(t=ma(t))?pn(e):0;return t&&r<t?e+qi(t-r,n):e},$n.padStart=function(e,t,n){e=wa(e);var r=(t=ma(t))?pn(e):0;return t&&r<t?qi(t-r,n)+e:e},$n.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),En(wa(e).replace(oe,""),t||0)},$n.random=function(e,t,r){if(r&&"boolean"!=typeof r&&bs(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=fa(e),t===n?(t=e,e=0):t=fa(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var s=_n();return bn(e+s*(t-e+dt("1e-"+((s+"").length-1))),t)}return Zr(e,t)},$n.reduce=function(e,t,n){var r=qo(e)?Dt:Zt,i=arguments.length<3;return r(e,ls(t,4),n,i,pr)},$n.reduceRight=function(e,t,n){var r=qo(e)?Bt:Zt,i=arguments.length<3;return r(e,ls(t,4),n,i,fr)},$n.repeat=function(e,t,r){return t=(r?bs(e,t,r):t===n)?1:ma(t),Yr(wa(e),t)},$n.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},$n.result=function(e,t,r){var i=-1,s=(t=bi(t,e)).length;for(s||(s=1,e=n);++i<s;){var o=null==e?n:e[Ds(t[i])];o===n&&(i=s,o=r),e=Jo(o)?o.call(e):o}return e},$n.round=_c,$n.runInContext=e,$n.sample=function(e){return(qo(e)?Jn:Jr)(e)},$n.size=function(e){if(null==e)return 0;if(Go(e))return ca(e)?pn(e):e.length;var t=ms(e);return t==C||t==P?e.size:Dr(e).length},$n.snakeCase=Ka,$n.some=function(e,t,r){var i=qo(e)?Ut:si;return r&&bs(e,t,r)&&(t=n),i(e,ls(t,3))},$n.sortedIndex=function(e,t){return oi(e,t)},$n.sortedIndexBy=function(e,t,n){return ai(e,t,ls(n,2))},$n.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&$o(e[r],t))return r}return-1},$n.sortedLastIndex=function(e,t){return oi(e,t,!0)},$n.sortedLastIndexBy=function(e,t,n){return ai(e,t,ls(n,2),!0)},$n.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oi(e,t,!0)-1;if($o(e[n],t))return n}return-1},$n.startCase=Za,$n.startsWith=function(e,t,n){return e=wa(e),n=null==n?0:cr(ma(n),0,e.length),t=ui(t),e.slice(n,n+t.length)==t},$n.subtract=kc,$n.sum=function(e){return e&&e.length?Yt(e,ic):0},$n.sumBy=function(e,t){return e&&e.length?Yt(e,ls(t,2)):0},$n.template=function(e,t,r){var i=$n.templateSettings;r&&bs(e,t,r)&&(t=n),e=wa(e),t=Ea({},t,i,Xi);var s,o,a=Ea({},t.imports,i.imports,Xi),c=Ra(a),l=en(a,c),u=0,d=t.interpolate||Ee,h="__p += '",p=Te((t.escape||Ee).source+"|"+d.source+"|"+(d===ee?fe:Ee).source+"|"+(t.evaluate||Ee).source+"|$","g"),f="//# sourceURL="+(De.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";e.replace(p,(function(t,n,r,i,a,c){return r||(r=i),h+=e.slice(u,c).replace(_e,an),n&&(s=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=c+t.length,t})),h+="';\n";var m=De.call(t,"variable")&&t.variable;if(m){if(he.test(m))throw new Ce("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(q,""):h).replace(V,"$1").replace(G,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";
9688\n")+h+"return __p\n}";var g=Xa((function(){return Ae(c,f+"return "+h).apply(n,l)}));if(g.source=h,Qo(g))throw g;return g},$n.times=function(e,t){if((e=ma(e))<1||e>h)return[];var n=f,r=bn(e,f);t=ls(t),e-=f;for(var i=Qt(r,t);++n<e;)t(n);return i},$n.toFinite=fa,$n.toInteger=ma,$n.toLength=ga,$n.toLower=function(e){return wa(e).toLowerCase()},$n.toNumber=ya,$n.toSafeInteger=function(e){return e?cr(ma(e),-h,h):0===e?e:0},$n.toString=wa,$n.toUpper=function(e){return wa(e).toUpperCase()},$n.trim=function(e,t,r){if((e=wa(e))&&(r||t===n))return Jt(e);if(!e||!(t=ui(t)))return e;var i=fn(e),s=fn(t);return Ei(i,nn(i,s),rn(i,s)+1).join("")},$n.trimEnd=function(e,t,r){if((e=wa(e))&&(r||t===n))return e.slice(0,mn(e)+1);if(!e||!(t=ui(t)))return e;var i=fn(e);return Ei(i,0,rn(i,fn(t))+1).join("")},$n.trimStart=function(e,t,r){if((e=wa(e))&&(r||t===n))return e.replace(oe,"");if(!e||!(t=ui(t)))return e;var i=fn(e);return Ei(i,nn(i,fn(t))).join("")},$n.truncate=function(e,t){var r=30,i="...";if(ta(t)){var s="separator"in t?t.separator:s;r="length"in t?ma(t.length):r,i="omission"in t?ui(t.omission):i}var o=(e=wa(e)).length;if(cn(e)){var a=fn(e);o=a.length}if(r>=o)return e;var c=r-pn(i);if(c<1)return i;var l=a?Ei(a,0,c).join(""):e.slice(0,c);if(s===n)return l+i;if(a&&(c+=l.length-c),oa(s)){if(e.slice(c).search(s)){var u,d=l;for(s.global||(s=Te(s.source,wa(me.exec(s))+"g")),s.lastIndex=0;u=s.exec(d);)var h=u.index;l=l.slice(0,h===n?c:h)}}else if(e.indexOf(ui(s),c)!=c){var p=l.lastIndexOf(s);p>-1&&(l=l.slice(0,p))}return l+i},$n.unescape=function(e){return(e=wa(e))&&Y.test(e)?e.replace(K,gn):e},$n.uniqueId=function(e){var t=++Be;return wa(e)+t},$n.upperCase=Ya,$n.upperFirst=Qa,$n.each=wo,$n.eachRight=bo,$n.first=Vs,cc($n,function(){var e={};return xr($n,(function(t,n){De.call($n.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),$n.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){$n[e].placeholder=$n})),Tt(["drop","take"],(function(e,t){qn.prototype[e]=function(r){r=r===n?1:wn(ma(r),0);var i=this.__filtered__&&!t?new qn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(r,i.__takeCount__):i.__views__.push({size:bn(r,f),type:e+(i.__dir__<0?"Right":"")}),i},qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ls(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Tt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");qn.prototype[e]=function(){return this[n](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");qn.prototype[e]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(ic)},qn.prototype.find=function(e){return this.filter(e).head()},qn.prototype.findLast=function(e){return this.reverse().find(e)},qn.prototype.invokeMap=Qr((function(e,t){return"function"==typeof e?new qn(this):this.map((function(n){return Nr(n,e,t)}))})),qn.prototype.reject=function(e){return this.filter(Lo(ls(e)))},qn.prototype.slice=function(e,t){e=ma(e);var r=this;return r.__filtered__&&(e>0||t<0)?new qn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=ma(t))<0?r.dropRight(-t):r.take(t-e)),r)},qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qn.prototype.toArray=function(){return this.take(f)},xr(qn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=$n[i?"take"+("last"==t?"Right":""):t],o=i||/^find/.test(t);s&&($n.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,c=t instanceof qn,l=a[0],u=c||qo(t),d=function(e){var t=s.apply($n,Lt([e],a));return i&&h?t[0]:t};u&&r&&"function"==typeof l&&1!=l.length&&(c=u=!1);var h=this.__chain__,p=!!this.__actions__.length,f=o&&!h,m=c&&!p;if(!o&&u){t=m?t:new qn(this);var g=e.apply(t,a);return g.__actions__.push({func:fo,args:[d],thisArg:n}),new Wn(g,h)}return f&&m?e.apply(this,a):(g=this.thru(d),f?i?g.value()[0]:g.value():g)})}
9688)),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Re[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);$n.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(qo(i)?i:[],e)}return this[n]((function(n){return t.apply(qo(n)?n:[],e)}))}})),xr(qn.prototype,(function(e,t){var n=$n[t];if(n){var r=n.name+"";De.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:t,func:n})}})),Rn[$i(n,2).name]=[{name:"wrapper",func:n}],qn.prototype.clone=function(){var e=new qn(this.__wrapped__);return e.__actions__=Pi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Pi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Pi(this.__views__),e},qn.prototype.reverse=function(){if(this.__filtered__){var e=new qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=qo(e),r=t<0,i=n?e.length:0,s=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=bn(t,e+o);break;case"takeRight":e=wn(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=s.start,a=s.end,c=a-o,l=r?a:o-1,u=this.__iteratees__,d=u.length,h=0,p=bn(c,this.__takeCount__);if(!n||!r&&i==c&&p==c)return mi(e,this.__actions__);var f=[];e:for(;c--&&h<p;){for(var m=-1,g=e[l+=t];++m<d;){var y=u[m],v=y.iteratee,w=y.type,b=v(g);if(2==w)g=b;else if(!b){if(1==w)continue e;break e}}f[h++]=g}return f},$n.prototype.at=mo,$n.prototype.chain=function(){return po(this)},$n.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},$n.prototype.next=function(){this.__values__===n&&(this.__values__=pa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},$n.prototype.plant=function(e){for(var t,r=this;r instanceof Hn;){var i=Us(r);i.__index__=0,i.__values__=n,t?s.__wrapped__=i:t=i;var s=i;r=r.__wrapped__}return s.__wrapped__=e,t},$n.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof qn){var t=e;return this.__actions__.length&&(t=new qn(this)),(t=t.reverse()).__actions__.push({func:fo,args:[eo],thisArg:n}),new Wn(t,this.__chain__)}return this.thru(eo)},$n.prototype.toJSON=$n.prototype.valueOf=$n.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},$n.prototype.first=$n.prototype.head,Xe&&($n.prototype[Xe]=function(){return this}),$n}();yt?((yt.exports=yn)._=yn,gt._=yn):mt._=yn}).call(Cw)}(Aw,Aw.exports);var Sw=Object.defineProperty,Iw=Object.defineProperties,Tw=Object.getOwnPropertyDescriptors,Pw=Object.getOwnPropertySymbols,Nw=Object.prototype.hasOwnProperty,Rw=Object.prototype.propertyIsEnumerable,Ow=(e,t,n)=>t in e?Sw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mw=(e,t)=>{for(var n in t||(t={}))Nw.call(t,n)&&Ow(e,n,t[n]);if(Pw)for(var n of Pw(t))Rw.call(t,n)&&Ow(e,n,t[n]);return e},jw=(e,t)=>Iw(e,Tw(t));function Lw(e,t,n){var r;const i=$o(e);return(null==(r=t.rpcMap)?void 0:r[i.reference])||`https://rpc.walletconnect.com/v1/?chainId=${i.namespace}:${i.reference}&projectId=${n}`}function Dw(e){return e.includes(":")?e.split(":")[1]:e}function Bw(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function Uw(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const t=Fw(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),n=Fw(e);return Aw.exports.merge(t,n)}function Fw(e){var t,n,r,i;const s={};if(!Hh(e))return s;for(const[o,a]of Object.entries(e)){const e=jh(o)?[o]:a.chains,c=a.methods||[],l=a.events||[],u=a.rpcMap||{},d=Lh(o);s[d]=jw(Mw(Mw({},s[d]),a),{chains:ya(e,null==(t=s[d])?void 0:t.chains),methods:ya(c,null==(n=s[d])?void 0:n.methods),events:ya(l,null==(r=s[d])?void 0:r.events),rpcMap:Mw(Mw({},u),null==(i=s[d])?void 0:i.rpcMap)})}return s}function $w(e){return e.includes(":")?e.split(":")[2]:e}function zw(e){const t={};for(const[n,r]of Object.entries(e)){const e=r.methods||[],i=r.events||[],s=r.accounts||[],o=jh(n)?[n]:r.chains?r.chains:Bw(r.accounts);t[n]={chains:o,methods:e,events:i,accounts:s}}return t}function Hw(e){return"number"==typeof e?e:e.includes("0x")?parseInt(e,16):(e=e.includes(":")?e.split(":")[1]:e,isNaN(Number(e))?e:Number(e))}const Ww={},qw=e=>Ww[e],Vw=(e,t)=>{Ww[e]=t};class Gw{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=qw("events"),this.client=qw("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(kw,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Dw(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Lw(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new wm(new xw(n,qw("disableProviderPing")))}}class Kw{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=qw("events"),this.client=qw("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(kw,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||Lw(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new wm(new xw(n,qw("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=parseInt(Dw(t));e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let r=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";r=r.startsWith("0x")?r:`0x${r}`;const i=parseInt(r,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:r}]},chainId:null==(n=this.namespace.chains)?void 0:n[0]}),this.setDefaultChain(`${i}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class Zw{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=qw("events"),this.client=qw("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(kw,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Dw(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Lw(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new wm(new xw(n,qw("disableProviderPing")))}}class Yw{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=qw("events"),this.client=qw("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(kw,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Dw(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Lw(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new wm(new xw(n,qw("disableProviderPing")))}}class Qw{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=qw("events"),this.client=qw("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(kw,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const n=this.getCardanoRPCUrl(t),r=Dw(t);e[r]=this.createHttpProvider(r,n)})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new wm(new xw(n,qw("disableProviderPing")))}}class Jw{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=qw("events"),this.client=qw("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(kw,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Dw(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Lw(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new wm(new xw(n,qw("disableProviderPing")))}}class Xw{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=qw("events"),this.client=qw("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(kw,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Dw(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Lw(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new wm(new xw(n,qw("disablePro
9688viderPing")))}}class eb{constructor(e){this.name="near",this.namespace=e.namespace,this.events=qw("events"),this.client=qw("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Lw(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(kw,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Lw(e,this.namespace);return typeof n>"u"?void 0:new wm(new xw(n,qw("disableProviderPing")))}}var tb=Object.defineProperty,nb=Object.defineProperties,rb=Object.getOwnPropertyDescriptors,ib=Object.getOwnPropertySymbols,sb=Object.prototype.hasOwnProperty,ob=Object.prototype.propertyIsEnumerable,ab=(e,t,n)=>t in e?tb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cb=(e,t)=>{for(var n in t||(t={}))sb.call(t,n)&&ab(e,n,t[n]);if(ib)for(var n of ib(t))ob.call(t,n)&&ab(e,n,t[n]);return e},lb=(e,t)=>nb(e,rb(t));class ub{constructor(e){this.events=new(go()),this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:Kp()(pf({level:e?.logger||Ew})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new ub(e);return await t.initialize(),t}async request(e,t,n){const[r,i]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(r).request({request:cb({},e),chainId:`${r}:${i}`,topic:this.session.topic,expiry:n})}sendAsync(e,t,n,r){const i=(new Date).getTime();this.request(e,n,r).then((e=>t(null,sm(i,e)))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:$h("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:t,response:n}=await this.client.authenticate(e);t&&(this.uri=t,this.events.emit("display_uri",t));const r=await n();if(this.session=r.session,this.session){const e=zw(this.session.namespaces);this.namespaces=Uw(this.namespaces,e),this.persist("namespaces",this.namespaces),this.onConnect()}return r}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:r}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await r().then((e=>{this.session=e;const t=zw(e.namespaces);this.namespaces=Uw(this.namespaces,t),this.persist("namespaces",this.namespaces)})).catch((e=>{if(e.message!==Lv)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,r]=this.validateChain(e);this.getProvider(n).setDefaultChain(r,t)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(zh(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await cw.init({logger:this.providerOpts.logger||Ew,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map((e=>Lh(e))))];Vw("client",this.client),Vw("events",this.events),Vw("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=function(e,t){const n=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!n.length)return[];const r=[];
9688return n.forEach((e=>{const n=t.namespaces[e].accounts;r.push(...n)})),r}(e,this.session),n=Bw(t),r=Uw(this.namespaces,this.optionalNamespaces),i=lb(cb({},r[e]),{accounts:t,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new Kw({namespace:i});break;case"solana":this.rpcProviders[e]=new Zw({namespace:i});break;case"cosmos":this.rpcProviders[e]=new Yw({namespace:i});break;case"polkadot":this.rpcProviders[e]=new Gw({namespace:i});break;case"cip34":this.rpcProviders[e]=new Qw({namespace:i});break;case"elrond":this.rpcProviders[e]=new Jw({namespace:i});break;case"multiversx":this.rpcProviders[e]=new Xw({namespace:i});break;case"near":this.rpcProviders[e]=new eb({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{const{params:t}=e,{event:n}=t;if("accountsChanged"===n.name){const e=n.data;e&&zh(e)&&this.events.emit("accountsChanged",e.map($w))}else if("chainChanged"===n.name){const e=t.chainId,n=t.event.data,r=Lh(e),i=Hw(e)!==Hw(n)?`${r}:${Hw(n)}`:e;this.onChainChanged(i)}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)})),this.client.on("session_update",(e=>{let{topic:t,params:n}=e;var r;const{namespaces:i}=n,s=null==(r=this.client)?void 0:r.session.get(t);this.session=lb(cb({},s),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:n})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",lb(cb({},$h("USER_DISCONNECTED")),{data:e.topic}))})),this.on(kw,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:r}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=r,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map((e=>Lh(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const r=Lh(Object.keys(this.namespaces)[0]);return[r,this.rpcProviders[r].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.namespaces)return;const[n,r]=this.validateChain(e);r&&(t||this.getProvider(n).setDefaultChain(r),this.namespaces[n]?this.namespaces[n].defaultChain=r:this.namespaces[`${n}:${r}`]?this.namespaces[`${n}:${r}`].defaultChain=r:this.namespaces[`${n}:${r}`]={defaultChain:r},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",r))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${_w}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${_w}/${e}`)}}const db=ub,hb=["eth_sendTransaction","personal_sign"],pb=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_sendCalls","wallet_getCapabilities","wallet_getCallsStatus","wallet_showCallsStatus"],fb=["chainChanged","accountsChanged"],mb=["chainChanged","accountsChanged","message","disconnect","connect"];var gb=Object.defineProperty,yb=Object.defineProperties,vb=Object.getOwnPropertyDescriptors,wb=Object.getOwnPropertySymbols,bb=Object.prototype.hasOwnProperty,xb=Object.prototype.propertyIsEnumerable,Eb=(e,t,n
9688)=>t in e?gb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_b=(e,t)=>{for(var n in t||(t={}))bb.call(t,n)&&Eb(e,n,t[n]);if(wb)for(var n of wb(t))xb.call(t,n)&&Eb(e,n,t[n]);return e},kb=(e,t)=>yb(e,vb(t));function Cb(e){return Number(e[0].split(":")[1])}function Ab(e){return`0x${e.toString(16)}`}class Sb{constructor(){this.events=new mo.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new Sb;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,n){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),n)}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=function(e){const{chains:t,optionalChains:n,methods:r,optionalMethods:i,events:s,optionalEvents:o,rpcMap:a}=e;if(!zh(t))throw new Error("Invalid chains");const c={chains:t,methods:r||hb,events:s||fb,rpcMap:_b({},t.length?{[Cb(t)]:a[Cb(t)]}:{})},l=s?.filter((e=>!fb.includes(e))),u=r?.filter((e=>!hb.includes(e)));if(!n&&!o&&!i&&(null==l||!l.length)&&(null==u||!u.length))return{required:t.length?c:void 0};const d={chains:[...new Set(l?.length&&u?.length||!n?c.chains.concat(n||[]):n)],methods:[...new Set(c.methods.concat(null!=i&&i.length?i:pb))],events:[...new Set(c.events.concat(null!=o&&o.length?o:mb))],rpcMap:a};return{required:t.length?c:void 0,optional:n.length?d:void 0}}(this.rpc);try{const r=await new Promise((async(r,i)=>{var s;this.rpc.showQrModal&&(null==(s=this.modal)||s.subscribeModal((e=>{!e.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),i(new Error("Connection request reset. Please try again.")))}))),await this.signer.connect(kb(_b({namespaces:_b({},t&&{[this.namespace]:t})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:e?.pairingTopic})).then((e=>{r(e)})).catch((e=>{i(new Error(e.message))}))}));if(!r)return;const i=zo(r.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:i),this.setAccounts(i),this.events.emit("connect",{chainId:Ab(this.chainId)})}catch(r){throw this.signer.logger.error(r),r}finally{this.modal&&this.modal.closeModal()}}async authenticate(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts({chains:e?.chains});try{const t=await new Promise((async(t,n)=>{var r;this.rpc.showQrModal&&(null==(r=this.modal)||r.subscribeModal((e=>{!e.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),n(new Error("Connection request reset. Please try again.")))}))),await this.signer.authenticate(kb(_b({},e),{chains:this.rpc.chains})).then((e=>{t(e)})).catch((e=>{n(new Error(e.message))}))})),n=t.session;if(n){const e=zo(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:e),this.setAccounts(e),this.events.emit("connect",{chainId:Ab(this.chainId)})}return t}catch(t){throw this.signer.logger.error(t),t}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{const{params:t}=e,{event:n}=t;"accountsChanged"===n.name?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===n.name?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Ab(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",kb(_b({},$h("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{var t,n;this.rpc.showQrModal&&(null==(t=this.modal)||t.closeModal(),null==(n=this.modal)||n.openModal({uri:e})),this.events.emit("display_uri",e)}))}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter((e=>this.isCompatibleChainId(e))).map((e=>this.parseChainId(e)));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",Ab(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,r]=e.split(":");return{chainId:`${t}:${n}`,address:r}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,n;const r=null!=(t=e?.chains)?t:[],i=null!=(n=e?.optionalChains)?n:[],s=r.concat(i);if(!s.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const o=r.length?e?.methods||hb:[],a=r.length?e?.events||fb:[],c=e?.optionalMethods||[],l=e?.optionalEvents||[],u=e?.rpcMap||this.buildRpcMap(s,e.projectId),d=e?.qrModalOptions||void 0;return{chains:r?.map((e=>this.formatChainId(e))),optionalChains:i.map((e=>this.formatChainId(e))),methods:o,events:a,optionalMethods:c,optionalEvents:l,rpcMap:u,showQrModal:!(null==e||!e.showQrModal),qrModalOptions:d,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach((e=>{n[e]=this.getRpcUrl(e,t)})),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?Cb(this.rpc.chains):Cb(this.rpc.optionalChains),this.signer=await db.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let e;
9688try{const{WalletConnectModal:t}=await n.e(348).then(n.bind(n,4348));e=t}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(e)try{this.modal=new e(_b({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(t){throw this.signer.logger.error(t),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:r}=e;t&&zh(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=r?.[e]||this.getRpcUrl(e)}))),n&&zh(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n?.map((e=>this.formatChainId(e))),n.forEach((e=>{this.rpc.rpcMap[e]=r?.[e]||this.getRpcUrl(e)})))}getRpcUrl(e,t){var n;return(null==(n=this.rpc.rpcMap)?void 0:n[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(this.session)try{const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t?.accounts),this.setAccounts(t?.accounts)}catch(jt){this.signer.logger.error("Failed to load persisted session, clearing state..."),this.signer.logger.error(jt),await this.disconnect().catch((e=>this.signer.logger.warn(e)))}}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}function Ib(e,t,n){const r=t.split("|").map((e=>e.trim()));for(let s=0;s<r.length;s++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof e===t)return}const i=new Error(`invalid value for type ${t}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${n}`,i.value=e,i}async function Tb(e){const t=Object.keys(e),n=await Promise.all(t.map((t=>Promise.resolve(e[t]))));return n.reduce(((e,n,r)=>(e[t[r]]=n,e)),{})}function Pb(e,t,n){for(let r in t){let i=t[r];const s=n?n[r]:null;s&&Ib(i,s,r),Object.defineProperty(e,r,{enumerable:!0,value:i,writable:!1})}}function Nb(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(Nb).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let n="0x";for(let r=0;r<e.length;r++)n+=t[e[r]>>4],n+=t[15&e[r]];return n}if("object"===typeof e&&"function"===typeof e.toJSON)return Nb(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{ "+t.map((t=>`${Nb(t)}: ${Nb(e[t])}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Rb(e,t){return e&&e.code===t}function Ob(e){return Rb(e,"CALL_EXCEPTION")}function Mb(e,t,n){let r,i=e;{const r=[];if(n){if("message"in n||"code"in n||"name"in n)throw new Error(`value will overwrite populated values: ${Nb(n)}`);for(const e in n){if("shortMessage"===e)continue;const t=n[e];r.push(e+"="+Nb(t))}}r.push(`code=${t}`),r.push("version=6.14.0"),r.length&&(e+=" ("+r.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":r=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":r=new RangeError(e);break;default:r=new Error(e)}return Pb(r,{code:t}),n&&Object.assign(r,n),null==r.shortMessage&&Pb(r,{shortMessage:i}),r}function jb(e,t,n,r){if(!e)throw Mb(t,n,r)}function Lb(e,t,n,r){jb(e,t,"INVALID_ARGUMENT",{argument:n,value:r})}function Db(e,t,n){null==n&&(n=""),n&&(n=": "+n),jb(e>=t,"missing argument"+n,"MISSING_ARGUMENT",{count:e,expectedCount:t}),jb(e<=t,"too many arguments"+n,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})}const Bb=["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){const e=String.fromCharCode(233).normalize("NFD");if(e!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(n){}return e}),[]);function Ub(e,t,n){if(null==n&&(n=""),e!==t){let e=n,t="new";n&&(e+=".",t+=" "+n),jb(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}function Fb(e,t,n){if(e instanceof Uint8Array)return n?new Uint8Array(e):e;if("string"===typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let n=2;
9688for(let r=0;r<t.length;r++)t[r]=parseInt(e.substring(n,n+2),16),n+=2;return t}Lb(!1,"invalid BytesLike value",t||"value",e)}function $b(e,t){return Fb(e,t,!1)}function zb(e,t){return Fb(e,t,!0)}function Hb(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(("number"!==typeof t||e.length===2+2*t)&&(!0!==t||e.length%2===0))}function Wb(e){return Hb(e,!0)||e instanceof Uint8Array}const qb="0123456789abcdef";function Vb(e){const t=$b(e);let n="0x";for(let r=0;r<t.length;r++){const e=t[r];n+=qb[(240&e)>>4]+qb[15&e]}return n}function Gb(e){return"0x"+e.map((e=>Vb(e).substring(2))).join("")}function Kb(e){return Hb(e,!0)?(e.length-2)/2:$b(e).length}function Zb(e,t,n){const r=$b(e);return null!=n&&n>r.length&&jb(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n}),Vb(r.slice(null==t?0:t,null==n?r.length:n))}function Yb(e,t,n){const r=$b(e);jb(t>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:t,offset:t+1});const i=new Uint8Array(t);return i.fill(0),n?i.set(r,t-r.length):i.set(r,0),Vb(i)}function Qb(e,t){return Yb(e,t,!0)}function Jb(e,t,n,r,i){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let r=t+1;r<n.length&&n[r]>>6===2;r++)e++;return e}return"OVERRUN"===e?n.length-t-1:0}const Xb=Object.freeze({error:function(e,t,n,r,i){Lb(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",n)},ignore:Jb,replace:function(e,t,n,r,i){return"OVERLONG"===e?(Lb("number"===typeof i,"invalid bad code point for replacement","badCodepoint",i),r.push(i),0):(r.push(65533),Jb(e,t,n))}});function ex(e,t){null==t&&(t=Xb.error);const n=$b(e,"bytes"),r=[];let i=0;for(;i<n.length;){const e=n[i++];if(e>>7===0){r.push(e);continue}let s=null,o=null;if(192===(224&e))s=1,o=127;else if(224===(240&e))s=2,o=2047;else{if(240!==(248&e)){i+=t(128===(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",i-1,n,r);continue}s=3,o=65535}if(i-1+s>=n.length){i+=t("OVERRUN",i-1,n,r);continue}let a=e&(1<<8-s-1)-1;for(let c=0;c<s;c++){let e=n[i];if(128!=(192&e)){i+=t("MISSING_CONTINUE",i,n,r),a=null;break}a=a<<6|63&e,i++}null!==a&&(a>1114111?i+=t("OUT_OF_RANGE",i-1-s,n,r,a):a>=55296&&a<=57343?i+=t("UTF16_SURROGATE",i-1-s,n,r,a):a<=o?i+=t("OVERLONG",i-1-s,n,r,a):r.push(a))}return r}function tx(e,t){Lb("string"===typeof e,"invalid string value","str",e),null!=t&&(!function(e){jb(Bb.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})}(t),e=e.normalize(t));let n=[];for(let r=0;r<e.length;r++){const t=e.charCodeAt(r);if(t<128)n.push(t);else if(t<2048)n.push(t>>6|192),n.push(63&t|128);else if(55296==(64512&t)){r++;const i=e.charCodeAt(r);Lb(r<e.length&&56320===(64512&i),"invalid surrogate pair","str",e);const s=65536+((1023&t)<<10)+(1023&i);n.push(s>>18|240),n.push(s>>12&63|128),n.push(s>>6&63|128),n.push(63&s|128)}else n.push(t>>12|224),n.push(t>>6&63|128),n.push(63&t|128)}return new Uint8Array(n)}function nx(e,t){return ex(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}const rx=BigInt(0),ix=BigInt(1),sx=9007199254740991;function ox(e,t){const n=ux(e,"value"),r=BigInt(px(t,"width"));if(jb(n>>r===rx,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),n>>r-ix){return-((~n&(ix<<r)-ix)+ix)}return n}function ax(e,t){let n=lx(e,"value");const r=BigInt(px(t,"width")),i=ix<<r-ix;if(n<rx){n=-n,jb(n<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e});return(~n&(ix<<r)-ix)+ix}return jb(n<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),n}function cx(e,t){const n=ux(e,"value"),r=BigInt(px(t,"bits"));return n&(ix<<r)-ix}function lx(e,t){switch(typeof e){case"bigint":return e;case"number":return Lb(Number.isInteger(e),"underflow",t||"value",e),Lb(e>=-sx&&e<=sx,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(n){Lb(!1,`invalid BigNumberish string: ${n.message}`,t||"value",e)}}Lb(!1,"invalid BigNumberish value",t||"value",e)}function ux(e,t){const n=lx(e,t);return jb(n>=rx,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),n}const dx="0123456789abcdef";function hx(e){if(e instanceof Uint8Array){let t="0x0";for(const n of e)t+=dx[n>>4],t+=dx[15&n];return BigInt(t)}return lx(e)}function px(e,t){switch(typeof e){case"bigint":return Lb(e>=-sx&&e<=sx,"overflow",t||"value",e),Number(e);case"number":return Lb(Number.isInteger(e),"underflow",t||"value",e),Lb(e>=-sx&&e<=sx,"overflow",t||"value",e),e;
9688case"string":try{if(""===e)throw new Error("empty string");return px(BigInt(e),t)}catch(n){Lb(!1,`invalid numeric string: ${n.message}`,t||"value",e)}}Lb(!1,"invalid numeric value",t||"value",e)}function fx(e,t){let n=ux(e,"value").toString(16);if(null==t)n.length%2&&(n="0"+n);else{const r=px(t,"width");for(jb(2*r>=n.length,`value exceeds width (${r} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});n.length<2*r;)n="0"+n}return"0x"+n}function mx(e){const t=ux(e,"value");if(t===rx)return new Uint8Array([]);let n=t.toString(16);n.length%2&&(n="0"+n);const r=new Uint8Array(n.length/2);for(let i=0;i<r.length;i++){const e=2*i;r[i]=parseInt(n.substring(e,e+2),16)}return r}function gx(e){let t=Vb(Wb(e)?e:mx(e)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return""===t&&(t="0"),"0x"+t}const yx=BigInt(-1),vx=BigInt(0),wx=BigInt(1),bx=BigInt(5),xx={};let Ex="0000";for(;Ex.length<80;)Ex+=Ex;function _x(e){let t=Ex;for(;t.length<e;)t+=t;return BigInt("1"+t.substring(0,e))}function kx(e,t,n){const r=BigInt(t.width);if(t.signed){const t=wx<<r-wx;jb(null==n||e>=-t&&e<t,"overflow","NUMERIC_FAULT",{operation:n,fault:"overflow",value:e}),e=e>vx?ox(cx(e,r),r):-ox(cx(-e,r),r)}else{const t=wx<<r;jb(null==n||e>=0&&e<t,"overflow","NUMERIC_FAULT",{operation:n,fault:"overflow",value:e}),e=(e%t+t)%t&t-wx}return e}function Cx(e){"number"===typeof e&&(e=`fixed128x${e}`);let t=!0,n=128,r=18;if("string"===typeof e)if("fixed"===e);else if("ufixed"===e)t=!1;else{const i=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);Lb(i,"invalid fixed format","format",e),t="u"!==i[1],n=parseInt(i[2]),r=parseInt(i[3])}else if(e){const i=e,s=(e,t,n)=>null==i[e]?n:(Lb(typeof i[e]===t,"invalid fixed format ("+e+" not "+t+")","format."+e,i[e]),i[e]);t=s("signed","boolean",t),n=s("width","number",n),r=s("decimals","number",r)}Lb(n%8===0,"invalid FixedNumber width (not byte aligned)","format.width",n),Lb(r<=80,"invalid FixedNumber decimals (too large)","format.decimals",r);return{signed:t,width:n,decimals:r,name:(t?"":"u")+"fixed"+String(n)+"x"+String(r)}}class Ax{format;#e;#t;#n;_value;constructor(e,t,n){Ub(e,xx,"FixedNumber"),this.#t=t,this.#e=n;const r=function(e,t){let n="";e<vx&&(n="-",e*=yx);let r=e.toString();if(0===t)return n+r;for(;r.length<=t;)r=Ex+r;const i=r.length-t;for(r=r.substring(0,i)+"."+r.substring(i);"0"===r[0]&&"."!==r[1];)r=r.substring(1);for(;"0"===r[r.length-1]&&"."!==r[r.length-2];)r=r.substring(0,r.length-1);return n+r}(t,n.decimals);Pb(this,{format:n.name,_value:r}),this.#n=_x(n.decimals)}get signed(){return this.#e.signed}get width(){return this.#e.width}get decimals(){return this.#e.decimals}get value(){return this.#t}#r(e){Lb(this.format===e.format,"incompatible format; use fixedNumber.toFormat","other",e)}#i(e,t){return e=kx(e,this.#e,t),new Ax(xx,e,this.#e)}#s(e,t){return this.#r(e),this.#i(this.#t+e.#t,t)}addUnsafe(e){return this.#s(e)}add(e){return this.#s(e,"add")}#o(e,t){return this.#r(e),this.#i(this.#t-e.#t,t)}subUnsafe(e){return this.#o(e)}sub(e){return this.#o(e,"sub")}#a(e,t){return this.#r(e),this.#i(this.#t*e.#t/this.#n,t)}mulUnsafe(e){return this.#a(e)}mul(e){return this.#a(e,"mul")}mulSignal(e){this.#r(e);const t=this.#t*e.#t;return jb(t%this.#n===vx,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),this.#i(t/this.#n,"mulSignal")}#c(e,t){return jb(e.#t!==vx,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#r(e),this.#i(this.#t*this.#n/e.#t,t)}divUnsafe(e){return this.#c(e)}div(e){return this.#c(e,"div")}divSignal(e){jb(e.#t!==vx,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#r(e);const t=this.#t*this.#n;return jb(t%e.#t===vx,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),this.#i(t/e.#t,"divSignal")}cmp(e){let t=this.value,n=e.value;const r=this.decimals-e.decimals;return r>0?n*=_x(r):r<0&&(t*=_x(-r)),t<n?-1:t>n?1:0}eq(e){return 0===this.cmp(e)}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=this.#t;return this.#t<vx&&(e-=this.#n-wx),e=this.#t/this.#n*this.#n,this.#i(e,"floor")}ceiling(){let e=this.#t;return this.#t>vx&&(e+=this.#n-wx),e=this.#t/this.#n*this.#n,this.#i(e,"ceiling")}round(e){if(null==e&&(e=0),e>=this.decimals)return this;const t=this.decimals-e,n=bx*_x(t-1);let r=this.value+n;const i=_x(t);return r=r/i*i,kx(r,this.#e,"round"),new Ax(xx,r,this.#e)}isZero(){return this.#t===vx}isNegative(){return this.#t<vx}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Ax.fromString(this.toString(),e)}static fromValue(e,t,n){const r=null==t?0:px(t),i=Cx(n);let s=lx(e,"value");const o=r-i.decimals;if(o>0){const t=_x(o);jb(s%t===vx,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),s/=t}else o<0&&(s*=_x(-o));return kx(s,i,"fromValue"),new Ax(xx,s,i)}static fromString(e,t){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);Lb(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const r=Cx(t);let i=n[2]||"0",s=n[3]||"";for(;s.length<r.decimals;)s+=Ex;jb(s.substring(r.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),s=s.substring(0,r.decimals);const o=BigInt(n[1]+i+s);return kx(o,r,"fromString"),new Ax(xx,o,r)}static fromBytes(e,t){let n=hx($b(e,"value"));const r=Cx(t);return r.signed&&(n=ox(n,r.width)),kx(n,r,"fromBytes"),new Ax(xx,n,r)}}const Sx=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Ix(e,t){let n=18;if("string"===typeof t){const e=Sx.indexOf(t);
9688Lb(e>=0,"invalid unit","unit",t),n=3*e}else null!=t&&(n=px(t,"unit"));return Ax.fromValue(e,n,{decimals:n,width:512}).toString()}function Tx(e,t){Lb("string"===typeof e,"value must be a string","value",e);let n=18;if("string"===typeof t){const e=Sx.indexOf(t);Lb(e>=0,"invalid unit","unit",t),n=3*e}else null!=t&&(n=px(t,"unit"));return Ax.fromString(e,{decimals:n,width:512}).value}const Px=32,Nx=new Uint8Array(Px),Rx=["then"],Ox={},Mx=new WeakMap;function jx(e){return Mx.get(e)}function Lx(e,t){Mx.set(e,t)}function Dx(e,t){const n=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw n.error=t,n}function Bx(e,t,n){return e.indexOf(null)>=0?t.map(((e,t)=>e instanceof Ux?Bx(jx(e),e,n):e)):e.reduce(((e,r,i)=>{let s=t.getValue(r);return r in e||(n&&s instanceof Ux&&(s=Bx(jx(s),s,n)),e[r]=s),e}),{})}class Ux extends Array{#l;constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0];let i=t[1],s=(t[2]||[]).slice(),o=!0;r!==Ox&&(i=t,s=[],o=!1),super(i.length),i.forEach(((e,t)=>{this[t]=e}));const a=s.reduce(((e,t)=>("string"===typeof t&&e.set(t,(e.get(t)||0)+1),e)),new Map);if(Lx(this,Object.freeze(i.map(((e,t)=>{const n=s[t];return null!=n&&1===a.get(n)?n:null})))),this.#l=[],null==this.#l&&this.#l,!o)return;Object.freeze(this);const c=new Proxy(this,{get:(e,t,n)=>{if("string"===typeof t){if(t.match(/^[0-9]+$/)){const n=px(t,"%index");if(n<0||n>=this.length)throw new RangeError("out of result range");const r=e[n];return r instanceof Error&&Dx(`index ${n}`,r),r}if(Rx.indexOf(t)>=0)return Reflect.get(e,t,n);const r=e[t];if(r instanceof Function)return function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return r.apply(this===n?e:this,i)};if(!(t in e))return e.getValue.apply(this===n?e:this,[t])}return Reflect.get(e,t,n)}});return Lx(c,jx(this)),c}toArray(e){const t=[];return this.forEach(((n,r)=>{n instanceof Error&&Dx(`index ${r}`,n),e&&n instanceof Ux&&(n=n.toArray(e)),t.push(n)})),t}toObject(e){const t=jx(this);return t.reduce(((n,r,i)=>(jb(null!=r,`value at index ${i} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),Bx(t,this,e))),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const n=jx(this),r=[],i=[];for(let s=e;s<t;s++)r.push(this[s]),i.push(n[s]);return new Ux(Ox,r,i)}filter(e,t){const n=jx(this),r=[],i=[];for(let s=0;s<this.length;s++){const o=this[s];o instanceof Error&&Dx(`index ${s}`,o),e.call(t,o,s,this)&&(r.push(o),i.push(n[s]))}return new Ux(Ox,r,i)}map(e,t){const n=[];for(let r=0;r<this.length;r++){const i=this[r];i instanceof Error&&Dx(`index ${r}`,i),n.push(e.call(t,i,r,this))}return n}getValue(e){const t=jx(this).indexOf(e);if(-1===t)return;const n=this[t];return n instanceof Error&&Dx(`property ${JSON.stringify(e)}`,n.error),n}static fromItems(e,t){return new Ux(Ox,e,t)}}function Fx(e){let t=mx(e);return jb(t.length<=Px,"value out-of-bounds","BUFFER_OVERRUN",{buffer:t,length:Px,offset:t.length}),t.length!==Px&&(t=zb(Gb([Nx.slice(t.length%Px),t]))),t}class $x{name;type;localName;dynamic;constructor(e,t,n,r){Pb(this,{name:e,type:t,localName:n,dynamic:r},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,t){Lb(!1,e,this.localName,t)}}class zx{#u;#d;constructor(){this.#u=[],this.#d=0}get data(){return Gb(this.#u)}get length(){return this.#d}#h(e){return this.#u.push(e),this.#d+=e.length,e.length}appendWriter(e){return this.#h(zb(e.data))}writeBytes(e){let t=zb(e);const n=t.length%Px;return n&&(t=zb(Gb([t,Nx.slice(n)]))),this.#h(t)}writeValue(e){return this.#h(Fx(e))}writeUpdatableValue(){const e=this.#u.length;return this.#u.push(Nx),this.#d+=Px,t=>{this.#u[e]=Fx(t)}}}class Hx{allowLoose;#u;#p;#f;#m;#g;constructor(e,t,n){Pb(this,{allowLoose:!!t}),this.#u=zb(e),this.#f=0,this.#m=null,this.#g=null!=n?n:1024,this.#p=0}get data(){return Vb(this.#u)}get dataLength(){return this.#u.length}get consumed(){return this.#p}get bytes(){return new Uint8Array(this.#u)}#y(e){if(this.#m)return this.#m.#y(e);
9688this.#f+=e,jb(this.#g<1||this.#f<=this.#g*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#g} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:zb(this.#u),offset:this.#p,length:e,info:{bytesRead:this.#f,dataLength:this.dataLength}})}#v(e,t,n){let r=Math.ceil(t/Px)*Px;return this.#p+r>this.#u.length&&(this.allowLoose&&n&&this.#p+t<=this.#u.length?r=t:jb(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:zb(this.#u),length:this.#u.length,offset:this.#p+r})),this.#u.slice(this.#p,this.#p+r)}subReader(e){const t=new Hx(this.#u.slice(this.#p+e),this.allowLoose,this.#g);return t.#m=this,t}readBytes(e,t){let n=this.#v(0,e,!!t);return this.#y(e),this.#p+=n.length,n.slice(0,e)}readValue(){return hx(this.readBytes(Px))}readIndex(){return px(hx(this.readBytes(Px)))}}function Wx(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function qx(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(n.length>0&&!n.includes(e.length))throw new Error(`Expected Uint8Array of length ${n}, not of length=${e.length}`)}function Vx(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");Wx(e.outputLen),Wx(e.blockLen)}function Gx(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Kx(e,t){qx(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const Zx=BigInt(2**32-1),Yx=BigInt(32);function Qx(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&Zx),l:Number(e>>Yx&Zx)}:{h:0|Number(e>>Yx&Zx),l:0|Number(e&Zx)}}function Jx(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Uint32Array(e.length),r=new
9688Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:s,l:o}=Qx(e[i],t);[n[i],r[i]]=[s,o]}return[n,r]}const Xx=(e,t,n)=>e<<n|t>>>32-n,eE=(e,t,n)=>t<<n|e>>>32-n,tE=(e,t,n)=>t<<n-32|e>>>64-n,nE=(e,t,n)=>e<<n-32|t>>>64-n;const rE={fromBig:Qx,split:Jx,toBig:(e,t)=>BigInt(e>>>0)<<Yx|BigInt(t>>>0),shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:Xx,rotlSL:eE,rotlBH:tE,rotlBL:nE,add:function(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,add5H:(e,t,n,r,i,s)=>t+n+r+i+s+(e/2**32|0)|0,add5L:(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0)},iE=rE,sE="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,oE=e=>e instanceof Uint8Array,aE=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),cE=(e,t)=>e<<32-t|e>>>t;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");function lE(e){if("string"===typeof e&&(e=function(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!oE(e))throw new Error("expected Uint8Array, got "+typeof e);return e}class uE{clone(){return this._cloneInto()}}function dE(e){const t=t=>e().update(lE(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function hE(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(sE&&"function"===typeof sE.getRandomValues)return sE.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}const[pE,fE,mE]=[[],[],[]],gE=BigInt(0),yE=BigInt(1),vE=BigInt(2),wE=BigInt(7),bE=BigInt(256),xE=BigInt(113);for(let n=0,A2=yE,S2=1,I2=0;n<24;n++){[S2,I2]=[I2,(2*S2+3*I2)%5],pE.push(2*(5*I2+S2)),fE.push((n+1)*(n+2)/2%64);let e=gE;for(let t=0;t<7;t++)A2=(A2<<yE^(A2>>wE)*xE)%bE,A2&vE&&(e^=yE<<(yE<<BigInt(t))-yE);mE.push(e)}const[EE,_E]=Jx(mE,!0),kE=(e,t,n)=>n>32?tE(e,t,n):Xx(e,t,n),CE=(e,t,n)=>n>32?nE(e,t,n):eE(e,t,n);class AE extends uE{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Wx(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}keccak(){!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24;const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,i=(r+2)%10,s=n[i],o=n[i+1],a=kE(s,o,1)^n[t],c=CE(s,o,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=a,e[r+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){const r=fE[n],s=kE(t,i,r),o=CE(t,i,r),a=pE[n];t=e[a],i=e[a+1],e[a]=s,e[a+1]=o}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=EE[r],e[1]^=_E[r]}n.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Gx(this);const{blockLen:t,state:n}=this,r=(e=lE(e)).length;for(let i=0;i<r;){const s=Math.min(t-this.pos,r-i);for(let t=0;t<s;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,0!==(128&t)&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){Gx(this,!1),qx(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();const s=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+s),r),this.posOut+=s,r+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Wx(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Kx(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:s}=this;return e||(e=new AE(t,n,r,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=s,e.destroyed=this.destroyed,e}}const SE=(e,t,n)=>dE((()=>new AE(t,e,n))),IE=SE(1,136,32);let TE=!1;const PE=function(e){return IE(e)};let NE=PE;function RE(e){const t=$b(e,"data");return Vb(NE(t))}RE._=PE,RE.lock=function(){TE=!0},RE.register=function(e){if(TE)throw new TypeError("keccak256 is locked");NE=e},Object.freeze(RE);const OE=BigInt(0),ME=BigInt(36);function jE(e){const t=(e=e.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let i=0;i<40;
9688i++)n[i]=t[i].charCodeAt(0);const r=$b(RE(n));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&r[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const LE={};for(let n=0;n<10;n++)LE[String(n)]=String(n);for(let n=0;n<26;n++)LE[String.fromCharCode(65+n)]=String(10+n);function DE(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>LE[e])).join("");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let n=String(98-parseInt(t,10)%97);for(;n.length<2;)n="0"+n;return n}const BE=function(){const e={};for(let t=0;t<36;t++){e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t)}return e}();function UE(e){if(Lb("string"===typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=jE(e);return Lb(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){Lb(e.substring(2,4)===DE(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=OE;for(let n=0;n<e.length;n++)t=t*ME+BE[e[n]];return t}(e.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return jE("0x"+t)}Lb(!1,"invalid address","address",e)}const FE={};function $E(e,t){let n=!1;return t<0&&(n=!0,t*=-1),new WE(FE,`${n?"":"u"}int${t}`,e,{signed:n,width:t})}function zE(e,t){return new WE(FE,`bytes${t||""}`,e,{size:t})}const HE=Symbol.for("_ethers_typed");class WE{type;value;#w;_typedSymbol;constructor(e,t,n,r){null==r&&(r=null),Ub(FE,e,"Typed"),Pb(this,{_typedSymbol:HE,type:t,value:n}),this.#w=r,this.format()}format(){if("array"===this.type)throw new Error("");if("dynamicArray"===this.type)throw new Error("");return"tuple"===this.type?`tuple(${this.value.map((e=>e.format())).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#w}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#w?-1:!1===this.#w?this.value.length:null}static from(e,t){return new WE(FE,e,t)}static uint8(e){return $E(e,8)}static uint16(e){return $E(e,16)}static uint24(e){return $E(e,24)}static uint32(e){return $E(e,32)}static uint40(e){return $E(e,40)}static uint48(e){return $E(e,48)}static uint56(e){return $E(e,56)}static uint64(e){return $E(e,64)}static uint72(e){return $E(e,72)}static uint80(e){return $E(e,80)}static uint88(e){return $E(e,88)}static uint96(e){return $E(e,96)}static uint104(e){return $E(e,104)}static uint112(e){return $E(e,112)}static uint120(e){return $E(e,120)}static uint128(e){return $E(e,128)}static uint136(e){return $E(e,136)}static uint144(e){return $E(e,144)}static uint152(e){return $E(e,152)}static uint160(e){return $E(e,160)}static uint168(e){return $E(e,168)}static uint176(e){return $E(e,176)}static uint184(e){return $E(e,184)}static uint192(e){return $E(e,192)}static uint200(e){return $E(e,200)}static uint208(e){return $E(e,208)}static uint216(e){return $E(e,216)}static uint224(e){return $E(e,224)}static uint232(e){return $E(e,232)}static uint240(e){return $E(e,240)}static uint248(e){return $E(e,248)}static uint256(e){return $E(e,256)}static uint(e){return $E(e,256)}static int8(e){return $E(e,-8)}static int16(e){return $E(e,-16)}static int24(e){return $E(e,-24)}static int32(e){return $E(e,-32)}static int40(e){return $E(e,-40)}static int48(e){return $E(e,-48)}static int56(e){return $E(e,-56)}static int64(e){return $E(e,-64)}static int72(e){return $E(e,-72)}static int80(e){return $E(e,-80)}static int88(e){return $E(e,-88)}static int96(e){return $E(e,-96)}static int104(e){return $E(e,-104)}static int112(e){return $E(e,-112)}static int120(e){return $E(e,-120)}static int128(e){return $E(e,-128)}static int136(e){return $E(e,-136)}static int144(e){return $E(e,-144)}static int152(e){return $E(e,-152)}static int160(e){return $E(e,-160)}static int168(e){return $E(e,-168)}static int176(e){return $E(e,-176)}static int184(e){return $E(e,-184)}static int192(e){return $E(e,-192)}static int200(e){return $E(e,-200)}static int208(e){return $E(e,-208)}static int216(e){return $E(e,-216)}static int224(e){return $E(e,-224)}static int232(e){return $E(e,-232)}static int240(e){return $E(e,-240)}static int248(e){return $E(e,-248)}static int256(e){return $E(e,-256)}static int(e){return $E(e,-256)}static bytes1(e){return zE(e,1)}static bytes2(e){return zE(e,2)}static bytes3(e){return zE(e,3)}static bytes4(e){return zE(e,4)}static bytes5(e){return zE(e,5)}static bytes6(e){return zE(e,6)}static bytes7(e){return zE(e,7)}static bytes8(e){return zE(e,8)}static bytes9(e){return zE(e,9)}static bytes10(e){return zE(e,10)}static bytes11(e){return zE(e,11)}static bytes12(e){return zE(e,12)}static bytes13(e){return zE(e,13)}static bytes14(e){return zE(e,14)}static bytes15(e){return zE(e,15)}static bytes16(e){return zE(e,16)}static bytes17(e){return zE(e,17)}static bytes18(e){return zE(e,18)}static bytes19(e){return zE(e,19)}static bytes20(e){return zE(e,20)}static bytes21(e){return zE(e,21)}static bytes22(e){return zE(e,22)}static bytes23(e){return zE(e,23)}static bytes24(e){return zE(e,24)}static bytes25(e){return zE(e,25)}static bytes26(e){return zE(e,26)}static bytes27(e){return zE(e,27)}static bytes28(e){return zE(e,28)}static bytes29(e){return zE(e,29)}static bytes30(e){return zE(e,30)}static bytes31(e){return zE(e,31)}static bytes32(e){return zE(e,32)}static address(e){return new WE(FE,"address",e)}static bool(e){return new WE(FE,"bool",!!e)}static bytes(e){return new WE(FE,"bytes",e)}static string(e){return new WE(FE,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new WE(FE,"overrides",Object.assign({},e))}
9688static isTyped(e){return e&&"object"===typeof e&&"_typedSymbol"in e&&e._typedSymbol===HE}static dereference(e,t){if(WE.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}class qE extends $x{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let n=WE.dereference(t,"string");try{n=UE(n)}catch(r){return this._throwError(r.message,t)}return e.writeValue(n)}decode(e){return UE(fx(e.readValue(),20))}}class VE extends $x{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}function GE(e,t,n){let r=[];if(Array.isArray(n))r=n;else if(n&&"object"===typeof n){let e={};r=t.map((t=>{const r=t.localName;return jb(r,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:n}),jb(!e[r],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:n}),e[r]=!0,n[r]}))}else Lb(!1,"invalid tuple value","tuple",n);Lb(t.length===r.length,"types/value length mismatch","tuple",n);let i=new zx,s=new zx,o=[];t.forEach(((e,t)=>{let n=r[t];if(e.dynamic){let t=s.length;e.encode(s,n);let r=i.writeUpdatableValue();o.push((e=>{r(e+t)}))}else e.encode(i,n)})),o.forEach((e=>{e(i.length)}));let a=e.appendWriter(i);return a+=e.appendWriter(s),a}function KE(e,t){let n=[],r=[],i=e.subReader(0);return t.forEach((t=>{let s=null;if(t.dynamic){let n=e.readIndex(),r=i.subReader(n);try{s=t.decode(r)}catch(o){if(Rb(o,"BUFFER_OVERRUN"))throw o;s=o,s.baseType=t.name,s.name=t.localName,s.type=t.type}}else try{s=t.decode(e)}catch(o){if(Rb(o,"BUFFER_OVERRUN"))throw o;s=o,s.baseType=t.name,s.name=t.localName,s.type=t.type}if(void 0==s)throw new Error("investigate");n.push(s),r.push(t.localName||null)})),Ux.fromItems(n,r)}class ZE extends $x{coder;length;constructor(e,t,n){super("array",e.type+"["+(t>=0?t:"")+"]",n,-1===t||e.dynamic),Pb(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let n=0;n<this.length;n++)t.push(e);return t}encode(e,t){const n=WE.dereference(t,"array");Array.isArray(n)||this._throwError("expected array value",n);let r=this.length;-1===r&&(r=n.length,e.writeValue(n.length)),Db(n.length,r,"coder array"+(this.localName?" "+this.localName:""));let i=[];for(let s=0;s<n.length;s++)i.push(this.coder);return GE(e,i,n)}decode(e){let t=this.length;-1===t&&(t=e.readIndex(),jb(t*Px<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:t*Px,length:e.dataLength}));let n=[];for(let r=0;r<t;r++)n.push(new VE(this.coder));return KE(e,n)}}class YE extends $x{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){const n=WE.dereference(t,"bool");return e.writeValue(n?1:0)}decode(e){return!!e.readValue()}}class QE extends $x{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=zb(t);let n=e.writeValue(t.length);return n+=e.writeBytes(t),n}decode(e){return e.readBytes(e.readIndex(),!0)}}class JE extends QE{constructor(e){super("bytes",e)}decode(e){return Vb(super.decode(e))}}class XE extends $x{size;constructor(e,t){let n="bytes"+String(e);super(n,n,t,!1),Pb(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let n=zb(WE.dereference(t,this.type));return n.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(n)}decode(e){return Vb(e.readBytes(this.size))}}const e_=new Uint8Array([]);class t_ extends $x{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes(e_)}decode(e){return e.readBytes(0),null}}const n_=BigInt(0),r_=BigInt(1),i_=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class s_ extends $x{size;signed;constructor(e,t,n){const r=(t?"int":"uint")+8*e;super(r,r,n,!1),Pb(this,{size:e,signed:t},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,t){let n=lx(WE.dereference(t,this.type)),r=cx(i_,256);if(this.signed){let e=cx(r,8*this.size-1);(n>e||n<-(e+r_))&&this._throwError("value out-of-bounds",t),n=ax(n,256)}else(n<n_||n>cx(r,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(n)}decode(e){let t=cx(e.readValue(),8*this.size);return this.signed&&(t=ox(t,8*this.size)),t}}class o_ extends QE{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,tx(WE.dereference(t,"string")))}decode(e){return nx(super.decode(e))}}class a_ extends $x{coders;constructor(e,t){let n=!1;const r=[];e.forEach((e=>{e.dynamic&&(n=!0),r.push(e.type)}));super("tuple","tuple("+r.join(",")+")",t,n),Pb(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];
9688this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const n=t.localName;return n&&(e[n]||(e[n]=0),e[n]++),e}),{});return this.coders.forEach(((n,r)=>{let i=n.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[r]))})),Object.freeze(e)}encode(e,t){const n=WE.dereference(t,"tuple");return GE(e,this.coders,n)}decode(e){return KE(e,this.coders)}}function c_(e){return RE(tx(e))}function l_(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}const u_=l_("external public payable override".split(" ")),d_="constant external internal payable private public pure view override",h_=l_(d_.split(" ")),p_="constructor error event fallback function receive struct",f_=l_(p_.split(" ")),m_="calldata memory storage payable indexed",g_=l_(m_.split(" ")),y_=l_([p_,m_,"tuple returns",d_].join(" ").split(" ")),v_={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},w_=new RegExp("^(\\s*)"),b_=new RegExp("^([0-9]+)"),x_=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),E_=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),__=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class k_{#p;#b;get offset(){return this.#p}get length(){return this.#b.length-this.#p}constructor(e){this.#p=0,this.#b=e.slice()}clone(){return new k_(this.#b)}reset(){this.#p=0}#x(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new k_(this.#b.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#x(this.#p+1,e.match+1);return this.#p=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#p<e.match-1;){const e=this.peek().linkNext;t.push(this.#x(this.#p+1,e)),this.#p=e}return this.#p=e.match+1,t}peek(){if(this.#p>=this.#b.length)throw new Error("out-of-bounds");return this.#b[this.#p]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#p++,e}toString(){const e=[];for(let t=this.#p;t<this.#b.length;t++){const n=this.#b[t];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(" ")}>`}}function C_(e){const t=[],n=t=>{const n=s<e.length?JSON.stringify(e[s]):"$EOI";throw new Error(`invalid token ${n} at ${s}: ${t}`)};let r=[],i=[],s=0;for(;s<e.length;){let o=e.substring(s),a=o.match(w_);a&&(s+=a[1].length,o=e.substring(s));const c={depth:r.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};t.push(c);let l=v_[o[0]]||"";if(l){if(c.type=l,c.text=o[0],s++,"OPEN_PAREN"===l)r.push(t.length-1),i.push(t.length-1);else if("CLOSE_PAREN"==l)0===r.length&&n("no matching open bracket"),c.match=r.pop(),t[c.match].match=t.length-1,c.depth--,c.linkBack=i.pop(),t[c.linkBack].linkNext=t.length-1;else if("COMMA"===l)c.linkBack=i.pop(),t[c.linkBack].linkNext=t.length-1,i.push(t.length-1);else if("OPEN_BRACKET"===l)c.type="BRACKET";else if("CLOSE_BRACKET"===l){let e=t.pop().text;if(t.length>0&&"NUMBER"===t[t.length-1].type){const n=t.pop().text;e=n+e,t[t.length-1].value=px(n)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(a=o.match(x_),a){if(c.text=a[1],s+=c.text.length,y_.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(__)){c.type="TYPE";continue}c.type="ID"}else{if(a=o.match(b_),!a)throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${s}`);c.text=a[1],c.type="NUMBER",s+=c.text.length}}return new k_(t.map((e=>Object.freeze(e))))}function A_(e,t){let n=[];for(const r in t.keys())e.has(r)&&n.push(r);if(n.length>1)throw new Error(`conflicting types: ${n.join(", ")}`)}function S_(e,t){if(t.peekKeyword(f_)){const n=t.pop().text;if(n!==e)throw new Error(`expected ${e}, got ${n}`)}return t.popType("ID")}function I_(e,t){const n=new Set;for(;;
9688){const r=e.peekType("KEYWORD");if(null==r||t&&!t.has(r))break;if(e.pop(),n.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);n.add(r)}return Object.freeze(n)}function T_(e){let t=I_(e,h_);return A_(t,l_("constant payable nonpayable".split(" "))),A_(t,l_("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function P_(e,t){return e.popParams().map((e=>W_.from(e,t)))}function N_(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return lx(e.pop().text);throw new Error("invalid gas")}return null}function R_(e){if(e.length)throw new Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}const O_=new RegExp(/^(.*)\[([0-9]*)\]$/);function M_(e){const t=e.match(__);if(Lb(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const n=parseInt(t[2]);Lb(0!==n&&n<=32,"invalid bytes length","type",e)}else if(t[3]){const n=parseInt(t[3]);Lb(0!==n&&n<=256&&n%8===0,"invalid numeric width","type",e)}return e}const j_={},L_=Symbol.for("_ethers_internal"),D_="_ParamTypeInternal",B_="_ErrorInternal",U_="_EventInternal",F_="_ConstructorInternal",$_="_FallbackInternal",z_="_FunctionInternal",H_="_StructInternal";class W_{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,n,r,i,s,o,a){if(Ub(e,j_,"ParamType"),Object.defineProperty(this,L_,{value:D_}),s&&(s=Object.freeze(s.slice())),"array"===r){if(null==o||null==a)throw new Error("")}else if(null!=o||null!=a)throw new Error("");if("tuple"===r){if(null==s)throw new Error("")}else if(null!=s)throw new Error("");Pb(this,{name:t,type:n,baseType:r,indexed:i,components:s,arrayLength:o,arrayChildren:a})}format(e){if(null==e&&(e="sighash"),"json"===e){const t=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const n={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"===typeof this.indexed&&(n.indexed=this.indexed),this.isTuple()&&(n.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(n)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map((e=>n.arrayChildren.walk(e,t)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map(((e,r)=>n.components[r].walk(e,t)))}return t(this.type,e)}#E(e,t,n,r){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const i=this.arrayChildren,s=t.slice();return s.forEach(((t,r)=>{i.#E(e,t,n,(e=>{s[r]=e}))})),void r(s)}if(this.isTuple()){const i=this.components;let s;if(Array.isArray(t))s=t.slice();else{if(null==t||"object"!==typeof t)throw new Error("invalid tuple value");s=i.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(s.length!==this.components.length)throw new Error("array is wrong length");return s.forEach(((t,r)=>{i[r].#E(e,t,n,(e=>{s[r]=e}))})),void r(s)}const i=n(this.type,t);i.then?e.push(async function(){r(await i)}()):r(i)}async walkAsync(e,t){const n=[],r=[e];return this.#E(n,e,t,(e=>{r[0]=e})),n.length&&await Promise.all(n),r[0]}static from(e,t){if(W_.isParamType(e))return e;if("string"===typeof e)try{return W_.from(C_(e),t)}catch(o){Lb(!1,"invalid param type","obj",e)}else if(e instanceof k_){let n="",r="",i=null;I_(e,l_(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(r="tuple",i=e.popParams().map((e=>W_.from(e))),n=`tuple(${i.map((e=>e.format())).join(",")})`):(n=M_(e.popType("TYPE")),r=n);let s=null,o=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();s=new W_(j_,"",n,r,null,i,o,s),o=t.value,n+=t.text,r="array",i=null}let a=null;if(I_(e,g_).has("indexed")){if(!t)throw new Error("");a=!0}const c=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new W_(j_,c,n,r,a,i,o,s)}const n=e.name;Lb(!n||"string"===typeof n&&n.match(E_),"invalid name","obj.name",n);let r=e.indexed;null!=r&&(Lb(t,"parameter cannot be indexed","obj.indexed",e.indexed),r=!!r);let i=e.type,s=i.match(O_);if(s){const t=parseInt(s[2]||"-1"),o=W_.from({type:s[1],components:e.components});return new W_(j_,n||"",i,"array",r,null,t,o)}if("tuple"===i||i.startsWith("tuple(")||i.startsWith("(")){const t=null!=e.components?e.components.map((e=>W_.from(e))):null;return new W_(j_,n||"",i,"tuple",r,t,null,null)}return i=M_(e.type),new W_(j_,n||"",i,i,r,null,null,null)}static isParamType(e){return e&&e[L_]===D_}}class q_{type;inputs;constructor(e,t,n){Ub(e,j_,"Fragment"),Pb(this,{type:t,inputs:n=Object.freeze(n.slice())})}static from(e){if("string"===typeof e){try{q_.from(JSON.parse(e))}catch(t){}return q_.from(C_(e))}if(e instanceof k_){switch(e.peekKeyword(f_)){case"constructor":return Y_.from(e);case"error":return K_.from(e);case"event":return Z_.from(e);case"fallback":case"receive":return Q_.from(e);case"function":return J_.from(e);case"struct":return X_.from(e)}}else if("object"===typeof e){switch(e.type){case"constructor":return Y_.from(e);case"error":return K_.from(e);case"event":return Z_.from(e);case"fallback":case"receive":return Q_.from(e);case"function":return J_.from(e);case"struct":return X_.from(e)}jb(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}Lb(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Y_.isFragment(e)}static isError(e){return K_.isFragment(e)}static isEvent(e){return Z_.isFragment(e)}static isFunction(e){return J_.isFragment(e)}static isStruct(e){return X_.isFragment(e)}}class V_ extends q_{name;constructor(e,t,n,r){super(e,t,r),Lb("string"===typeof n&&n.match(E_),"invalid identifier","name",n),r=Object.freeze(r.slice()),Pb(this,{name:n})}}function G_(e,t){return"("+t.map((t=>t.format(e))).join("full"===e?", ":",")+")"}class K_ extends V_{constructor(e,t,n){super(e,"error",t,n),Object.defineProperty(this,L_,{value:B_})}get selector(){return c_(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];
9688return"sighash"!==e&&t.push("error"),t.push(this.name+G_(e,this.inputs)),t.join(" ")}static from(e){if(K_.isFragment(e))return e;if("string"===typeof e)return K_.from(C_(e));if(e instanceof k_){const t=S_("error",e),n=P_(e);return R_(e),new K_(j_,t,n)}return new K_(j_,e.name,e.inputs?e.inputs.map(W_.from):[])}static isFragment(e){return e&&e[L_]===B_}}class Z_ extends V_{anonymous;constructor(e,t,n,r){super(e,"event",t,n),Object.defineProperty(this,L_,{value:U_}),Pb(this,{anonymous:r})}get topicHash(){return c_(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+G_(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){t=(t||[]).map((e=>W_.from(e)));return new Z_(j_,e,t,!1).topicHash}static from(e){if(Z_.isFragment(e))return e;if("string"===typeof e)try{return Z_.from(C_(e))}catch(t){Lb(!1,"invalid event fragment","obj",e)}else if(e instanceof k_){const t=S_("event",e),n=P_(e,!0),r=!!I_(e,l_(["anonymous"])).has("anonymous");return R_(e),new Z_(j_,t,n,r)}return new Z_(j_,e.name,e.inputs?e.inputs.map((e=>W_.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[L_]===U_}}class Y_ extends q_{payable;gas;constructor(e,t,n,r,i){super(e,t,n),Object.defineProperty(this,L_,{value:F_}),Pb(this,{payable:r,gas:i})}format(e){if(jb(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[`constructor${G_(e,this.inputs)}`];return this.payable&&t.push("payable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(Y_.isFragment(e))return e;if("string"===typeof e)try{return Y_.from(C_(e))}catch(t){Lb(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof k_){I_(e,l_(["constructor"]));const t=P_(e),n=!!I_(e,u_).has("payable"),r=N_(e);return R_(e),new Y_(j_,"constructor",t,n,r)}return new Y_(j_,"constructor",e.inputs?e.inputs.map(W_.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[L_]===F_}}class Q_ extends q_{payable;constructor(e,t,n){super(e,"fallback",t),Object.defineProperty(this,L_,{value:$_}),Pb(this,{payable:n})}format(e){const t=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?" payable":""}`}static from(e){if(Q_.isFragment(e))return e;if("string"===typeof e)try{return Q_.from(C_(e))}catch(t){Lb(!1,"invalid fallback fragment","obj",e)}else if(e instanceof k_){const t=e.toString();Lb(e.peekKeyword(l_(["fallback","receive"])),"type must be fallback or receive","obj",t);if("receive"===e.popKeyword(l_(["fallback","receive"]))){const t=P_(e);return Lb(0===t.length,"receive cannot have arguments","obj.inputs",t),I_(e,l_(["payable"])),R_(e),new Q_(j_,[],!0)}let n=P_(e);n.length?Lb(1===n.length&&"bytes"===n[0].type,"invalid fallback inputs","obj.inputs",n.map((e=>e.format("minimal"))).join(", ")):n=[W_.from("bytes")];const r=T_(e);if(Lb("nonpayable"===r||"payable"===r,"fallback cannot be constants","obj.stateMutability",r),I_(e,l_(["returns"])).has("returns")){const t=P_(e);Lb(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map((e=>e.format("minimal"))).join(", "))}return R_(e),new Q_(j_,n,"payable"===r)}if("receive"===e.type)return new Q_(j_,[],!0);if("fallback"===e.type){const t=[W_.from("bytes")],n="payable"===e.stateMutability;return new Q_(j_,t,n)}Lb(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[L_]===$_}}class J_ extends V_{constant;outputs;stateMutability;payable;gas;constructor(e,t,n,r,i,s){super(e,"function",t,r),Object.defineProperty(this,L_,{value:z_});Pb(this,{constant:"view"===n||"pure"===n,gas:s,outputs:i=Object.freeze(i.slice()),payable:"payable"===n,stateMutability:n})}get selector(){return c_(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+G_(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(G_(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){t=(t||[]).map((e=>W_.from(e)));return new J_(j_,e,"view",t,[],null).selector}static from(e){if(J_.isFragment(e))return e;if("string"===typeof e)try{return J_.from(C_(e))}catch(n){Lb(!1,"invalid function fragment","obj",e)}else if(e instanceof k_){const t=S_("function",e),n=P_(e),r=T_(e);let i=[];I_(e,l_(["returns"])).has("returns")&&(i=P_(e));const s=N_(e);return R_(e),new J_(j_,t,r,n,i,s)}let t=e.stateMutability;return null==t&&(t="payable","boolean"===typeof e.constant?(t="view",e.constant||(t="payable","boolean"!==typeof e.payable||e.payable||(t="nonpayable"))):"boolean"!==typeof e.payable||e.payable||(t="nonpayable")),new J_(j_,e.name,t,e.inputs?e.inputs.map(W_.from):[],e.outputs?e.outputs.map(W_.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[L_]===z_}}class X_ extends V_{constructor(e,t,n){super(e,"struct",t,n),Object.defineProperty(this,L_,{value:H_})}format(){throw new Error("@TODO")}static from(e){if("string"===typeof e)try{return X_.from(C_(e))}catch(t){Lb(!1,"invalid struct fragment","obj",e)}else if(e instanceof k_){const t=S_("struct",e),n=P_(e);return R_(e),new X_(j_,t,n)}return new X_(j_,e.name,e.inputs?e.inputs.map(W_.from):[])}static isFragment(e){return e&&e[L_]===H_}}const ek=new Map;ek.set(0,"GENERIC_PANIC"),ek.set(1,"ASSERT_FALSE"),ek.set(17,"OVERFLOW"),ek.set(18,"DIVIDE_BY_ZERO"),ek.set(33,"ENUM_RANGE_ERROR"),ek.set(34,"BAD_STORAGE_DATA"),ek.set(49,"STACK_UNDERFLOW"),ek.set(50,"ARRAY_RANGE_ERROR"),ek.set(65,"OUT_OF_MEMORY"),ek.set(81,"UNINITIALIZED_FUNCTION_CALL");const tk=new RegExp(/^bytes([0-9]*)$/),nk=new RegExp(/^(u?int)([0-9]*)$/);let rk=null,ik=1024;class sk{#_(e){if(e.isArray())return new ZE(this.#_(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new a_(e.components.map((e=>this.#_(e))),e.name);switch(e.baseType){case"address":return new qE(e.name);case"bool":return new YE(e.name);case"string":return new o_(e.name);case"bytes":return new JE(e.name);case"":return new t_(e.name)}
9688let t=e.type.match(nk);if(t){let n=parseInt(t[2]||"256");return Lb(0!==n&&n<=256&&n%8===0,"invalid "+t[1]+" bit length","param",e),new s_(n/8,"int"===t[1],e.name)}if(t=e.type.match(tk),t){let n=parseInt(t[1]);return Lb(0!==n&&n<=32,"invalid bytes length","param",e),new XE(n,e.name)}Lb(!1,"invalid type","type",e.type)}getDefaultValue(e){const t=e.map((e=>this.#_(W_.from(e))));return new a_(t,"_").defaultValue()}encode(e,t){Db(t.length,e.length,"types/values length mismatch");const n=e.map((e=>this.#_(W_.from(e)))),r=new a_(n,"_"),i=new zx;return r.encode(i,t),i.data}decode(e,t,n){const r=e.map((e=>this.#_(W_.from(e))));return new a_(r,"_").decode(new Hx(t,n,ik))}static _setDefaultMaxInflation(e){Lb("number"===typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),ik=e}static defaultAbiCoder(){return null==rk&&(rk=new sk),rk}static getBuiltinCallException(e,t,n){return function(e,t,n,r){let i="missing revert data",s=null,o=null;if(n){i="execution reverted";const e=$b(n);if(n=Vb(n),0===e.length)i+=" (no data present; likely require(false) occurred",s="require(false)";else if(e.length%32!==4)i+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===Vb(e.slice(0,4)))try{s=r.decode(["string"],e.slice(4))[0],o={signature:"Error(string)",name:"Error",args:[s]},i+=`: ${JSON.stringify(s)}`}catch(c){i+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===Vb(e.slice(0,4)))try{const t=Number(r.decode(["uint256"],e.slice(4))[0]);o={signature:"Panic(uint256)",name:"Panic",args:[t]},s=`Panic due to ${ek.get(t)||"UNKNOWN"}(${t})`,i+=`: ${s}`}catch(c){i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const a={to:t.to?UE(t.to):null,data:t.data||"0x"};return t.from&&(a.from=UE(t.from)),Mb(i,"CALL_EXCEPTION",{action:e,data:n,reason:s,transaction:a,invocation:null,revert:o})}(e,t,n,sk.defaultAbiCoder())}}function ok(e){return e&&"function"===typeof e.getAddress}async function ak(e,t){const n=await t;return null!=n&&"0x0000000000000000000000000000000000000000"!==n||(jb("string"!==typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),Lb(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),UE(n)}function ck(e,t){return"string"===typeof e?e.match(/^0x[0-9a-f]{40}$/i)?UE(e):(jb(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),ak(e,t.resolveName(e))):ok(e)?ak(e,e.getAddress()):e&&"function"===typeof e.then?ak(e,e):void Lb(!1,"unsupported addressable value","target",e)}const lk=new Uint8Array(32);lk.fill(0);const uk=BigInt(-1),dk=BigInt(0),hk=BigInt(1),pk=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const fk=fx(hk,32),mk=fx(dk,32),gk={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},yk=["name","version","chainId","verifyingContract","salt"];function vk(e){return function(t){return Lb("string"===typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const wk={name:vk("name"),version:vk("version"),chainId:function(e){const t=lx(e,"domain.chainId");return Lb(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t)?Number(t):gx(t)},verifyingContract:function(e){try{return UE(e).toLowerCase()}catch(t){}Lb(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=$b(e,"domain.salt");return Lb(32===t.length,'invalid domain value "salt"',"domain.salt",e),Vb(t)}};function bk(e){{const t=e.match(/^(u?)int(\d+)$/);if(t){const n=""===t[1],r=parseInt(t[2]);Lb(r%8===0&&0!==r&&r<=256&&t[2]===String(r),"invalid numeric width","type",e);const i=cx(pk,n?r-1:r),s=n?(i+hk)*uk:dk;return function(t){const r=lx(t,"value");return Lb(r>=s&&r<=i,`value out-of-bounds for ${e}`,"value",r),fx(n?ax(r,256):r,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const n=parseInt(t[1]);return Lb(0!==n&&n<=32&&t[1]===String(n),"invalid bytes width","type",e),function(t){return Lb($b(t).length===n,`invalid length for ${e}`,"value",t),function(e){const t=$b(e),n=t.length%32;return n?Gb([t,lk.slice(n)]):Vb(t)}(t)}}}switch(e){case"address":return function(e){return Qb(UE(e),32)};case"bool":return function(e){return e?fk:mk};case"bytes":return function(e){return RE(e)};case"string":return function(e){return c_(e)}}return null}function xk(e,t){return`${e}(${t.map((e=>{let{name:t,type:n}=e;return n+" "+t})).join(",")})`}function Ek(e){const t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class _k{primaryType;#k;get types(){return JSON.parse(this.#k)}#C;#A;constructor(e){this.#C=new Map,this.#A=new Map;const t=new Map,n=new Map,r=new Map,i={};Object.keys(e).forEach((s=>{i[s]=e[s].map((t=>{let{name:n,type:r}=t,{base:i,index:s}=Ek(r);return"int"!==i||e.int||(i="int256"),"uint"!==i||e.uint||(i="uint256"),{name:n,type:i+(s||"")}})),t.set(s,new Set),n.set(s,[]),r.set(s,new Set)})),this.#k=JSON.stringify(i);for(const o in i){const r=new Set;for(const s of i[o]){Lb(!r.has(s.name),`duplicate variable name ${JSON.stringify(s.name)} in ${JSON.stringify(o)}`,"types",e),r.add(s.name);const i=Ek(s.type).base;Lb(i!==o,`circular type reference to ${JSON.stringify(i)}`,"types",e);bk(i)||(Lb(n.has(i),`unknown type ${JSON.stringify(i)}`,"types",e),n.get(i).push(o),t.get(o).add(i))}}const s=Array.from(n.keys()).filter((e=>0===n.get(e).length));Lb(0!==s.length,"missing primary type","types",e),Lb(1===s.length,`ambiguous primary types or unused types: ${s.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),Pb(this,{primaryType:s[0]}),function i(s,o){Lb(!o.has(s),`circular type reference to ${JSON.stringify(s)}`,"types",e),o.add(s);
9688for(const e of t.get(s))if(n.has(e)){i(e,o);for(const t of o)r.get(t).add(e)}o.delete(s)}(this.primaryType,new Set);for(const[o,a]of r){const e=Array.from(a);e.sort(),this.#C.set(o,xk(o,i[o])+e.map((e=>xk(e,i[e]))).join(""))}}getEncoder(e){let t=this.#A.get(e);return t||(t=this.#S(e),this.#A.set(e,t)),t}#S(e){{const t=bk(e);if(t)return t}const t=Ek(e).array;if(t){const e=t.prefix,n=this.getEncoder(e);return r=>{Lb(-1===t.count||t.count===r.length,`array length mismatch; expected length ${t.count}`,"value",r);let i=r.map(n);return this.#C.has(e)&&(i=i.map(RE)),RE(Gb(i))}}const n=this.types[e];if(n){const t=c_(this.#C.get(e));return e=>{const r=n.map((t=>{let{name:n,type:r}=t;const i=this.getEncoder(r)(e[n]);return this.#C.has(r)?RE(i):i}));return r.unshift(t),Gb(r)}}Lb(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const t=this.#C.get(e);return Lb(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return RE(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(bk(e))return n(e,t);const r=Ek(e).array;if(r)return Lb(-1===r.count||r.count===t.length,`array length mismatch; expected length ${r.count}`,"value",t),t.map((e=>this._visit(r.prefix,e,n)));const i=this.types[e];if(i)return i.reduce(((e,r)=>{let{name:i,type:s}=r;return e[i]=this._visit(s,t[i],n),e}),{});Lb(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new _k(e)}static getPrimaryType(e){return _k.from(e).primaryType}static hashStruct(e,t,n){return _k.from(t).hashStruct(e,n)}static hashDomain(e){const t=[];for(const n in e){if(null==e[n])continue;const r=gk[n];Lb(r,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:r})}return t.sort(((e,t)=>yk.indexOf(e.name)-yk.indexOf(t.name))),_k.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return Gb(["0x1901",_k.hashDomain(e),_k.from(t).hash(n)])}static hash(e,t,n){return RE(_k.encode(e,t,n))}static async resolveNames(e,t,n,r){e=Object.assign({},e);for(const o in e)null==e[o]&&delete e[o];const i={};e.verifyingContract&&!Hb(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const s=_k.from(t);s.visit(n,((e,t)=>("address"!==e||Hb(t,20)||(i[t]="0x"),t)));for(const o in i)i[o]=await r(o);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=s.visit(n,((e,t)=>"address"===e&&i[t]?i[t]:t)),{domain:e,value:n}}static getPayload(e,t,n){_k.hashDomain(e);const r={},i=[];yk.forEach((t=>{const n=e[t];null!=n&&(r[t]=wk[t](n),i.push({name:t,type:gk[t]}))}));const s=_k.from(t);t=s.types;const o=Object.assign({},t);return Lb(null==o.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),o.EIP712Domain=i,s.encode(n),{types:o,domain:r,primaryType:s.primaryType,message:s.visit(n,((e,t)=>{if(e.match(/^bytes(\d*)/))return Vb($b(t));if(e.match(/^u?int/))return lx(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return Lb("string"===typeof t,"invalid string","value",t),t}Lb(!1,"unsupported type","type",e)}))}}}function kk(e,t){return{address:UE(e),storageKeys:t.map(((e,t)=>(Lb(Hb(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase())))}}function Ck(e){if(Array.isArray(e))return e.map(((t,n)=>Array.isArray(t)?(Lb(2===t.length,"invalid slot set",`value[${n}]`,t),kk(t[0],t[1])):(Lb(null!=t&&"object"===typeof t,"invalid address-slot set","value",e),kk(t.address,t.storageKeys))));Lb(null!=e&&"object"===typeof e,"invalid access list","value",e);const t=Object.keys(e).map((t=>{const n=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return kk(t,Object.keys(n).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}const Ak="0x0000000000000000000000000000000000000000000000000000000000000000",Sk=BigInt(0),Ik=BigInt(1),Tk=BigInt(2),Pk=BigInt(27),Nk=BigInt(28),Rk=BigInt(35),Ok={};function Mk(e){return Qb(mx(e),32)}class jk{#I;#T;#P;#N;get r(){return this.#I}set r(e){Lb(32===Kb(e),"invalid r","value",e),this.#I=Vb(e)}get s(){return this.#T}set s(e){Lb(32===Kb(e),"invalid s","value",e);const t=Vb(e);Lb(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),this.#T=t}get v(){return this.#P}set v(e){const t=px(e,"value");
9688Lb(27===t||28===t,"invalid v","v",e),this.#P=t}get networkV(){return this.#N}get legacyChainId(){const e=this.networkV;return null==e?null:jk.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=$b(this.s);return this.yParity&&(e[0]|=128),Vb(e)}get compactSerialized(){return Gb([this.r,this.yParityAndS])}get serialized(){return Gb([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,n,r){Ub(e,Ok,"Signature"),this.#I=t,this.#T=n,this.#P=r,this.#N=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new jk(Ok,this.r,this.s,this.v);return this.networkV&&(e.#N=this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=lx(e,"v");return t==Pk||t==Nk?Sk:(Lb(t>=Rk,"invalid EIP-155 v","v",e),(t-Rk)/Tk)}static getChainIdV(e,t){return lx(e)*Tk+BigInt(35+t-27)}static getNormalizedV(e){const t=lx(e);return t===Sk||t===Pk?27:t===Ik||t===Nk?28:(Lb(t>=Rk,"invalid v","v",e),t&Ik?27:28)}static from(e){function t(t,n){Lb(t,n,"signature",e)}if(null==e)return new jk(Ok,Ak,Ak,27);if("string"===typeof e){const n=$b(e,"signature");if(64===n.length){const e=Vb(n.slice(0,32)),t=n.slice(32,64),r=128&t[0]?28:27;return t[0]&=127,new jk(Ok,e,Vb(t),r)}if(65===n.length){const e=Vb(n.slice(0,32)),r=n.slice(32,64);t(0===(128&r[0]),"non-canonical s");const i=jk.getNormalizedV(n[64]);return new jk(Ok,e,Vb(r),i)}t(!1,"invalid raw signature length")}if(e instanceof jk)return e.clone();const n=e.r;t(null!=n,"missing r");const r=Mk(n),i=function(e,n){if(null!=e)return Mk(e);if(null!=n){t(Hb(n,32),"invalid yParityAndS");const e=$b(n);return e[0]&=127,Vb(e)}t(!1,"missing s")}(e.s,e.yParityAndS);t(0==(128&$b(i)[0]),"non-canonical s");const{networkV:s,v:o}=function(e,n,r){if(null!=e){const t=lx(e);return{networkV:t>=Rk?t:void 0,v:jk.getNormalizedV(t)}}if(null!=n)return t(Hb(n,32),"invalid yParityAndS"),{v:128&$b(n)[0]?28:27};if(null!=r){switch(px(r,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),a=new jk(Ok,r,i,o);return s&&(a.#N=s),t(null==e.yParity||px(e.yParity,"sig.yParity")===a.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===a.yParityAndS,"yParityAndS mismatch"),a}
9688}function Lk(e){return{address:UE(e.address),nonce:lx(null!=e.nonce?e.nonce:0),chainId:lx(null!=e.chainId?e.chainId:0),signature:jk.from(e.signature)}}function Dk(e){return async function(t,n){jb(null==n||!n.cancelled,"request cancelled before sending","CANCELLED");const r=t.url.split(":")[0].toLowerCase();jb("http"===r||"https"===r,`unsupported protocol ${r}`,"UNSUPPORTED_OPERATION",{info:{protocol:r},operation:"request"}),jb("https"===r||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let i=null;const s=new AbortController,o=setTimeout((()=>{i=Mb("request timeout","TIMEOUT"),s.abort()}),t.timeout);n&&n.addListener((()=>{i=Mb("request cancelled","CANCELLED"),s.abort()}));const a=Object.assign({},e,{method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:s.signal});let c;try{c=await fetch(t.url,a)}catch(h){if(clearTimeout(o),i)throw i;throw h}clearTimeout(o);const l={};c.headers.forEach(((e,t)=>{l[t.toLowerCase()]=e}));const u=await c.arrayBuffer(),d=null==u?null:new Uint8Array(u);return{statusCode:c.status,statusMessage:c.statusText,headers:l,body:d}}}Dk({});let Bk=Dk();const Uk=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),Fk=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let $k=!1;async function zk(e,t){try{const t=e.match(Uk);if(!t)throw new Error("invalid data");return new Zk(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?function(e){e=atob(e);const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return $b(t)}(t[3]):tx(t[3].replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))}catch(n){return new Zk(599,"BAD REQUEST (invalid data: URI)",{},null,new Kk(e))}}function Hk(e){return async function(t,n){try{const n=t.match(Fk);if(!n)throw new Error("invalid link");return new Kk(`${e}${n[2]}`)}catch(r){return new Zk(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Kk(t))}}}const Wk={data:zk,ipfs:Hk("https://gateway.ipfs.io/ipfs/")},qk=new WeakMap;class Vk{#R;#O;constructor(e){this.#R=[],this.#O=!1,qk.set(e,(()=>{if(!this.#O){this.#O=!0;for(const e of this.#R)setTimeout((()=>{e()}),0);this.#R=[]}}))}addListener(e){jb(!this.#O,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#R.push(e)}get cancelled(){return this.#O}checkSignal(){jb(!this.cancelled,"cancelled","CANCELLED",{})}}function Gk(e){if(null==e)throw new Error("missing signal; should not happen");return e.checkSignal(),e}class Kk{#M;#j;#L;#D;#B;#U;#F;#$;#z;#H;#W;#q;#V;#G;#K;get url(){return this.#U}set url(e){this.#U=String(e)}get body(){return null==this.#F?null:new Uint8Array(this.#F)}set body(e){if(null==e)this.#F=void 0,this.#$=void 0;else if("string"===typeof e)this.#F=tx(e),this.#$="text/plain";else if(e instanceof Uint8Array)this.#F=e,this.#$="application/octet-stream";else{if("object"!==typeof e)throw new Error("invalid body");this.#F=tx(JSON.stringify(e)),this.#$="application/json"}}hasBody(){return null!=this.#F}get method(){return this.#D?this.#D:this.hasBody()?"POST":"GET"}set method(e){null==e&&(e=""),this.#D=String(e).toUpperCase()}get headers(){const e=Object.assign({},this.#L);return this.#z&&(e.authorization=`Basic ${function(e){const t=$b(e);let n="";for(let r=0;r<t.length;r++)n+=String.fromCharCode(t[r]);return btoa(n)}(tx(this.#z))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),null==e["content-type"]&&this.#$&&(e["content-type"]=this.#$),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){this.#L[String(e).toLowerCase()]=String(t)}clearHeaders(){this.#L={}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let n=0;return{next:()=>{if(n<t.length){const r=t[n++];return{value:[r,e[r]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#z||null}setCredentials(e,t){Lb(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),this.#z=`${e}:${t}`}get allowGzip(){return this.#j}set allowGzip(e){this.#j=!!e}get allowInsecureAuthentication(){return!!this.#M}set allowInsecureAuthentication(e){this.#M=!!e}get timeout(){return this.#B}set timeout(e){Lb(e>=0,"timeout must be non-zero","timeout",e),this.#B=e}get preflightFunc(){return this.#H||null}set preflightFunc(e){this.#H=e}get processFunc(){return this.#W||null}set processFunc(e){this.#W=e}get retryFunc(){return this.#q||null}set retryFunc(e){this.#q=e}get getUrlFunc(){return this.#K||Bk}set getUrlFunc(e){this.#K=e}constructor(e){this.#U=String(e),this.#M=!1,this.#j=!0,this.#L={},this.#D="",this.#B=3e5,this.#G={slotInterval:250,maxAttempts:12},this.#K=null}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#F?Vb(this.#F):"null"}>`}setThrottleParams(e){null!=e.slotInterval&&(this.#G.slotInterval=e.slotInterval),null!=e.maxAttempts&&(this.#G.maxAttempts=e.maxAttempts)}async#Z(e,t,n,r,i){if(e>=this.#G.maxAttempts)return i.makeServerError("exceeded maximum retry limit");jb(Yk()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:r}),n>0&&await function(e){return new Promise((t=>setTimeout(t,e)))}(n);let s=this.clone();const o=(s.url.split(":")[0]||"").toLowerCase();if(o in Wk){const e=await Wk[o](s.url,Gk(r.#V));if(e instanceof Zk){let t=e;if(this.processFunc){Gk(r.#V);try{t=await this.processFunc(s,t)}catch(l){null!=l.throttle&&"number"===typeof l.stall||t.makeServerError("error in post-processing function",l).assertOk()}}return t}s=e}this.preflightFunc&&(s=await this.preflightFunc(s));const a=await this.getUrlFunc(s,Gk(r.#V));let c=new Zk(a.statusCode,a.statusMessage,a.headers,a.body,r);if(301===c.statusCode||302===c.statusCode){try{const n=c.headers.location||"";return s.redirect(n).#Z(e+1,t,0,r,c)}catch(l){}return c}if(429===c.statusCode&&(null==this.retryFunc||await this.retryFunc(s,c,e))){const n=c.headers["retry-after"];let i=this.#G.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return"string"===typeof n&&n.match(/^[1-9][0-9]*$/)&&(i=parseInt(n)),s.clone().#Z(e+1,t,i,r,c)}if(this.processFunc){Gk(r.#V);try{c=await this.processFunc(s,c)}catch(l){null!=l.throttle&&"number"===typeof l.stall||c.makeServerError("error in post-processing function",l).assertOk();let n=this.#G.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return l.stall>=0&&(n=l.stall),s.clone().#Z(e+1,t,n,r,c)}}return c}send(){return jb(null==this.#V,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#V=new Vk(this),this.#Z(0,Yk()+this.timeout,0,this,new Zk(0,"",{},null,this))}cancel(){jb(null!=this.#V,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=qk.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const t=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();jb("GET"===this.method&&("https"!==t||"http"!==n)&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const r=new Kk(e);return r.method="GET",r.allowGzip=this.allowGzip,r.timeout=this.timeout,r.#L=Object.assign({},this.#L),this.#F&&(r.#F=new Uint8Array(this.#F)),r.#$=this.#$,r}clone(){const e=new Kk(this.url);return e.#D=this.#D,this.#F&&(e.#F=this.#F),e.#$=this.#$,e.#L=Object.assign({},this.#L),e.#z=this.#z,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#H=this.#H,e.#W=this.#W,e.#q=this.#q,e.#G=Object.assign({},this.#G),e.#K=this.#K,e}static lockConfig(){$k=!0}static getGateway(e){return Wk[e.toLowerCase()]||null}static registerGateway(e,t){if("http"===(e=e.toLowerCase())||"https"===e)throw new Error(`cannot intercept ${e}; use registerGetUrl`);if($k)throw new Error("gateways locked");Wk[e]=t}static registerGetUrl(e){if($k)throw new Error("gateways locked");Bk=e}static createGetUrlFunc(e){return Dk(e)}static createDataGateway(){return zk}static createIpfsGatewayFunc(e){return Hk(e)}}class Zk{#Y;#Q;#L;#F;#J;#X;toString(){return`<FetchResponse status=${this.statusCode} body=${this.#F?Vb(this.#F):"null"}>`}get statusCode(){return this.#Y}get statusMessage(){return this.#Q}get headers(){return Object.assign({},this.#L)}get body(){return null==this.#F?null:new Uint8Array(this.#F)}get bodyText(){try{return null==this.#F?"":nx(this.#F)}
9688catch(e){jb(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch(e){jb(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let n=0;return{next:()=>{if(n<t.length){const r=t[n++];return{value:[r,e[r]],done:!1}}return{value:void 0,done:!0}}}}constructor(e,t,n,r,i){this.#Y=e,this.#Q=t,this.#L=Object.keys(n).reduce(((e,t)=>(e[t.toLowerCase()]=String(n[t]),e)),{}),this.#F=null==r?null:new Uint8Array(r),this.#J=i||null,this.#X={message:""}}makeServerError(e,t){let n;n=e?`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:`CLIENT ESCALATED SERVER ERROR (${e=`${this.statusCode} ${this.statusMessage}`})`;const r=new Zk(599,n,this.headers,this.body,this.#J||void 0);return r.#X={message:e,error:t},r}throwThrottleError(e,t){null==t?t=-1:Lb(Number.isInteger(t)&&t>=0,"invalid stall timeout","stall",t);const n=new Error(e||"throttling requests");throw Pb(n,{stall:t,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return null!=this.#F}get request(){return this.#J}ok(){return""===this.#X.message&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=this.#X;""===e&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let r=null;try{this.#F&&(r=nx(this.#F))}catch(i){}jb(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:n,responseBody:r,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function Yk(){return(new Date).getTime()}const Qk="0x0000000000000000000000000000000000000000";class Jk{fragment;name;signature;topic;args;constructor(e,t,n){const r=e.name,i=e.format();Pb(this,{fragment:e,name:r,signature:i,topic:t,args:n})}}class Xk{fragment;name;args;signature;selector;value;constructor(e,t,n,r){const i=e.name,s=e.format();Pb(this,{fragment:e,name:i,args:n,signature:s,selector:t,value:r})}}class eC{fragment;name;args;signature;selector;constructor(e,t,n){const r=e.name,i=e.format();Pb(this,{fragment:e,name:r,args:n,signature:i,selector:t})}}class tC{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){Pb(this,{hash:e,_isIndexed:!0})}}const nC={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},rC={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&nC[e.toString()]&&(t=nC[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class iC{fragments;deploy;fallback;receive;#ee;#te;#ne;#re;constructor(e){let t=[];t="string"===typeof e?JSON.parse(e):e,this.#ne=new Map,this.#ee=new Map,this.#te=new Map;const n=[];for(const o of t)try{n.push(q_.from(o))}catch(s){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,s.message)}Pb(this,{fragments:Object.freeze(n)});let r=null,i=!1;this.#re=this.getAbiCoder(),this.fragments.forEach(((e,t)=>{let n;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void Pb(this,{deploy:e});case"fallback":return void(0===e.inputs.length?i=!0:(Lb(!r||e.payable!==r.payable,"conflicting fallback fragments",`fragments[${t}]`,e),r=e,i=r.payable));case"function":n=this.#ne;break;case"event":n=this.#te;break;case"error":n=this.#ee;break;default:return}const s=e.format();n.has(s)||n.set(s,e)})),this.deploy||Pb(this,{deploy:Y_.from("constructor()")}),Pb(this,{fallback:r,receive:i})}format(e){const t=e?"minimal":"full",n=this.fragments.map((e=>e.format(t)));return n}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return sk.defaultAbiCoder()}#ie(e,t,n){if(Hb(e)){const t=e.toLowerCase();for(const e of this.#ne.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const r=[];for(const[t,n]of this.#ne)t.split("(")[0]===e&&r.push(n);if(t){const e=t.length>0?t[t.length-1]:null;let n=t.length,i=!0;WE.isTyped(e)&&"overrides"===e.type&&(i=!1,n--);for(let t=r.length-1;t>=0;t--){const e=r[t].inputs.length;e===n||i&&e===n-1||r.splice(t,1)}for(let s=r.length-1;s>=0;s--){const e=r[s].inputs;for(let n=0;n<t.length;n++)if(WE.isTyped(t[n])){if(n>=e.length){if("overrides"===t[n].type)continue;r.splice(s,1);break}if(t[n].type!==e[n].baseType){r.splice(s,1);break}}}}if(1===r.length&&t&&t.length!==r[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||"object"!==typeof e)&&r.splice(0,1)}if(0===r.length)return null;if(r.length>1&&n){const t=r.map((e=>JSON.stringify(e.format()))).join(", ");Lb(!1,`ambiguous function description (i.e. matches ${t})`,"key",e)}return r[0]}const r=this.#ne.get(J_.from(e).format());return r||null}getFunctionName(e){const t=this.#ie(e,null,!1);return Lb(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#ie(e,null,!1)}getFunction(e,t){return this.#ie(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#ne.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let n=0;n<t.length;n++){const r=t[n];e(this.#ne.get(r),n)}}#se(e,t,n){if(Hb(e)){const t=e.toLowerCase();for(const e of this.#te.values())if(t===e.topicHash)return e;return null}if(-1===e.indexOf("(")){const r=[];for(const[t,n]of this.#te)t.split("(")[0]===e&&r.push(n);if(t){for(let e=r.length-1;e>=0;e--)r[e].inputs.length<t.length&&r.splice(e,1);for(let e=r.length-1;e>=0;e--){const n=r[e].inputs;for(let i=0;i<t.length;i++)if(WE.isTyped(t[i])&&t[i].type!==n[i].baseType){r.splice(e,1);break}}}if(0===r.length)return null;if(r.length>1&&n){const t=r.map((e=>JSON.stringify(e.format()))).join(", ");Lb(!1,`ambiguous event description (i.e. matches ${t})`,"key",e)}return r[0]}const r=this.#te.get(Z_.from(e).format());return r||null}getEventName(e){const t=this.#se(e,null,!1);return Lb(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#se(e,null,!1)}getEvent(e,t){return this.#se(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#te.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let n=0;n<t.length;n++){const r=t[n];e(this.#te.get(r),n)}}getError(e,t){if(Hb(e)){const t=e.toLowerCase();if(rC[t])return K_.from(rC[t].signature);for(const e of this.#ee.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const t=[];for(const[n,r]of this.#ee)n.split("(")[0]===e&&t.push(r);if(0===t.length)return"Error"===e?K_.from("error Error(string)"):"Panic"===e?K_.from("error Panic(uint256)"):null;if(t.length>1){const n=t.map((e=>JSON.stringify(e.format()))).join(", ");Lb(!1,`ambiguous error description (i.e. ${n})`,"name",e)}return t[0]}if("Error(string)"===(e=K_.from(e).format()))return K_.from("error Error(string)");if("Panic(uint256)"===e)return K_.from("error Panic(uint256)");const n=this.#ee.get(e);return n||null}forEachError(e){const t=Array.from(this.#ee.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let n=0;n<t.length;n++){const r=t[n];e(this.#ee.get(r),n)}}_decodeParams(e,t){return this.#re.decode(e,t)}_encodeParams(e,t){return this.#re.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){if("string"===typeof e){const t=this.getError(e);Lb(t,"unknown error","fragment",e),e=t}return Lb(Zb(t,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",t),this._decodeParams(e.inputs,Zb(t,4))}encodeErrorResult(e,t){if("string"===typeof e){const t=this.getError(e);Lb(t,"unknown error","fragment",e),e=t}return Gb([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionData(e,t){if("string"===typeof e){const t=this.getFunction(e);Lb(t,"unknown function","fragment",e),e=t}return Lb(Zb(t,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",t),this._decodeParams(e.inputs,Zb(t,4))}encodeFunctionData(e,t){if("string"===typeof e){const t=this.getFunction(e);Lb(t,"unknown function","fragment",e),e=t}return Gb([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionResult(e,t){if("string"===typeof e){const t=this.getFunction(e);Lb(t,"unknown function","fragment",e),e=t}let n="invalid length for result data";const r=zb(t);if(r.length%32===0)try{return this.#re.decode(e.outputs,r)}catch(i){n="could not decode result data"}jb(!1,n,"BAD_DATA",{value:Vb(r),info:{method:e.name,signature:e.format()}})}makeError(e,t){const n=$b(e,"data"),r=sk.getBuiltinCallException("call",t,n);if(r.message.startsWith("execution reverted (unknown custom error)")){const e=Vb(n.slice(0,4)),t=this.getError(e);
9688if(t)try{const e=this.#re.decode(t.inputs,n.slice(4));r.revert={name:t.name,signature:t.format(),args:e},r.reason=r.revert.signature,r.message=`execution reverted: ${r.reason}`}catch(s){r.message="execution reverted (coult not decode custom error)"}}const i=this.parseTransaction(t);return i&&(r.invocation={method:i.name,signature:i.signature,args:i.args}),r}encodeFunctionResult(e,t){if("string"===typeof e){const t=this.getFunction(e);Lb(t,"unknown function","fragment",e),e=t}return Vb(this.#re.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){if("string"===typeof e){const t=this.getEvent(e);Lb(t,"unknown event","eventFragment",e),e=t}jb(t.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:t.length,expectedCount:e.inputs.length});const n=[];e.anonymous||n.push(e.topicHash);const r=(e,t)=>"string"===e.type?c_(t):"bytes"===e.type?RE(Vb(t)):("bool"===e.type&&"boolean"===typeof t?t=t?"0x01":"0x00":e.type.match(/^u?int/)?t=fx(t):e.type.match(/^bytes/)?t=function(e,t){return Yb(e,t,!1)}(t,32):"address"===e.type&&this.#re.encode(["address"],[t]),Qb(Vb(t),32));for(t.forEach(((t,i)=>{const s=e.inputs[i];s.indexed?null==t?n.push(null):"array"===s.baseType||"tuple"===s.baseType?Lb(!1,"filtering with tuples or arrays not supported","contract."+s.name,t):Array.isArray(t)?n.push(t.map((e=>r(s,e)))):n.push(r(s,t)):Lb(null==t,"cannot filter non-indexed parameters; must be null","contract."+s.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}encodeEventLog(e,t){if("string"===typeof e){const t=this.getEvent(e);Lb(t,"unknown event","eventFragment",e),e=t}const n=[],r=[],i=[];return e.anonymous||n.push(e.topicHash),Lb(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach(((e,s)=>{const o=t[s];if(e.indexed)if("string"===e.type)n.push(c_(o));else if("bytes"===e.type)n.push(RE(o));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(this.#re.encode([e.type],[o]))}else r.push(e),i.push(o)})),{data:this.#re.encode(r,i),topics:n}}decodeEventLog(e,t,n){if("string"===typeof e){const t=this.getEvent(e);Lb(t,"unknown event","eventFragment",e),e=t}if(null!=n&&!e.anonymous){const t=e.topicHash;Lb(Hb(n[0],32)&&n[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const r=[],i=[],s=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(r.push(W_.from({type:"bytes32",name:e.name})),s.push(!0)):(r.push(e),s.push(!1)):(i.push(e),s.push(!1))}));const o=null!=n?this.#re.decode(r,Gb(n)):null,a=this.#re.decode(i,t,!0),c=[],l=[];let u=0,d=0;return e.inputs.forEach(((e,t)=>{let n=null;if(e.indexed)if(null==o)n=new tC(null);else if(s[t])n=new tC(o[d++]);else try{n=o[d++]}catch(r){n=r}else try{n=a[u++]}catch(r){n=r}c.push(n),l.push(e.name||null)})),Ux.fromItems(c,l)}parseTransaction(e){const t=$b(e.data,"tx.data"),n=lx(null!=e.value?e.value:0,"tx.value"),r=this.getFunction(Vb(t.slice(0,4)));if(!r)return null;const i=this.#re.decode(r.inputs,t.slice(4));return new Xk(r,r.selector,i,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Jk(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=Vb(e),n=this.getError(Zb(t,0,4));if(!n)return null;const r=this.#re.decode(n.inputs,Zb(t,4));return new eC(n,n.selector,r)}static from(e){return e instanceof iC?e:"string"===typeof e?new iC(JSON.parse(e)):"function"===typeof e.formatJson?new iC(e.formatJson()):"function"===typeof e.format?new iC(e.format("json")):new iC(e)}}const sC=BigInt(0);function oC(e){return null==e?null:e}function aC(e){return null==e?null:e.toString()}class cC{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,t,n){Pb(this,{gasPrice:oC(e),maxFeePerGas:oC(t),maxPriorityFeePerGas:oC(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:aC(e),maxFeePerGas:aC(t),maxPriorityFeePerGas:aC(n)}}}function lC(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=Vb(e.data));const n="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of n)i in e&&null!=e[i]&&(t[i]=lx(e[i],`request.${i}`));const r="type,nonce".split(/,/);for(const i of r)i in e&&null!=e[i]&&(t[i]=px(e[i],`request.${i}`));return e.accessList&&(t.accessList=Ck(e.accessList)),e.authorizationList&&(t.authorizationList=e.authorizationList.slice()),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(t.kzg=e.kzg),"blobs"in e&&e.blobs&&(t.blobs=e.blobs.map((e=>Wb(e)?Vb(e):Object.assign({},e)))),t}class uC{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;
9688gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#oe;constructor(e,t){this.#oe=e.transactions.map((e=>"string"!==typeof e?new pC(e,t):e)),Pb(this,{provider:t,hash:oC(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:oC(e.prevRandao),extraData:e.extraData,baseFeePerGas:oC(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return this.#oe.map((e=>"string"===typeof e?e:e.hash))}get prefetchedTransactions(){const e=this.#oe.slice();return 0===e.length?[]:(jb("object"===typeof e[0],"transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:t,extraData:n,gasLimit:r,gasUsed:i,hash:s,miner:o,prevRandao:a,nonce:c,number:l,parentHash:u,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,timestamp:f,transactions:m}=this;return{_type:"Block",baseFeePerGas:aC(e),difficulty:aC(t),extraData:n,gasLimit:aC(r),gasUsed:aC(i),blobGasUsed:aC(this.blobGasUsed),excessBlobGas:aC(this.excessBlobGas),hash:s,miner:o,prevRandao:a,nonce:c,number:l,parentHash:u,timestamp:f,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,transactions:m}}[Symbol.iterator](){let e=0;const t=this.transactions;return{next:()=>e<this.length?{value:t[e++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#oe.length}get date(){return null==this.timestamp?null:new Date(1e3*this.timestamp)}async getTransaction(e){let t;if("number"===typeof e)t=this.#oe[e];else{const n=e.toLowerCase();for(const e of this.#oe){if("string"===typeof e){if(e!==n)continue;t=e;break}if(e.hash===n){t=e;break}}}if(null==t)throw new Error("no such tx");return"string"===typeof t?await this.provider.getTransaction(t):t}getPrefetchedTransaction(e){const t=this.prefetchedTransactions;if("number"===typeof e)return t[e];e=e.toLowerCase();for(const n of t)if(n.hash===e)return n;Lb(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return{orphan:"drop-block",hash:(e=this).hash,number:e.number};var e}}class dC{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(e,t){this.provider=t;const n=Object.freeze(e.topics.slice());Pb(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:n,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:t,blockNumber:n,data:r,index:i,removed:s,topics:o,transactionHash:a,transactionIndex:c}=this;return{_type:"log",address:e,blockHash:t,blockNumber:n,data:r,index:i,removed:s,topics:o,transactionHash:a,transactionIndex:c}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return jb(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return jb(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return jb(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return{orphan:"drop-log",log:{transactionHash:(e=this).transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,address:e.address,data:e.data,topics:Object.freeze(e.topics.slice()),index:e.index}};var e}}class hC{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#ae;constructor(e,t){this.#ae=Object.freeze(e.logs.map((e=>new dC(e,t))));let n=sC;null!=e.effectiveGasPrice?n=e.effectiveGasPrice:null!=e.gasPrice&&(n=e.gasPrice),Pb(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#ae}toJSON(){const{to:e,from:t,contractAddress:n,hash:r,index:i,blockHash:s,blockNumber:o,logsBloom:a,logs:c,status:l,root:u}=this;return{_type:"TransactionReceipt",blockHash:s,blockNumber:o,contractAddress:n,cumulativeGasUsed:aC(this.cumulativeGasUsed),from:t,gasPrice:aC(this.gasPrice),blobGasUsed:aC(this.blobGasUsed),blobGasPrice:aC(this.blobGasPrice),gasUsed:aC(this.gasUsed),hash:r,index:i,logs:c,logs
9688Bloom:a,root:u,status:l,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const e=await this.provider.getBlock(this.blockHash);if(null==e)throw new Error("TODO");return e}async getTransaction(){const e=await this.provider.getTransaction(this.hash);if(null==e)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return mC(this)}reorderedEvent(e){return jb(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),fC(this,e)}}class pC{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;authorizationList;#ce;constructor(e,t){this.provider=t,this.blockNumber=null!=e.blockNumber?e.blockNumber:null,this.blockHash=null!=e.blockHash?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=null!=e.maxPriorityFeePerGas?e.maxPriorityFeePerGas:null,this.maxFeePerGas=null!=e.maxFeePerGas?e.maxFeePerGas:null,this.maxFeePerBlobGas=null!=e.maxFeePerBlobGas?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=null!=e.accessList?e.accessList:null,this.blobVersionedHashes=null!=e.blobVersionedHashes?e.blobVersionedHashes:null,this.authorizationList=null!=e.authorizationList?e.authorizationList:null,this.#ce=-1}toJSON(){const{blockNumber:e,blockHash:t,index:n,hash:r,type:i,to:s,from:o,nonce:a,data:c,signature:l,accessList:u,blobVersionedHashes:d}=this;return{_type:"TransactionResponse",accessList:u,blockNumber:e,blockHash:t,blobVersionedHashes:d,chainId:aC(this.chainId),data:c,from:o,gasLimit:aC(this.gasLimit),gasPrice:aC(this.gasPrice),hash:r,maxFeePerGas:aC(this.maxFeePerGas),maxPriorityFeePerGas:aC(this.maxPriorityFeePerGas),maxFeePerBlobGas:aC(this.maxFeePerBlobGas),nonce:a,signature:l,to:s,index:n,type:i,value:aC(this.value)}}async getBlock(){let e=this.blockNumber;if(null==e){const t=await this.getTransaction();t&&(e=t.blockNumber)}if(null==e)return null;const t=this.provider.getBlock(e);if(null==t)throw new Error("TODO");return t}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(null==this.blockNumber){const{tx:e,blockNumber:t}=await Tb({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return null==e||null==e.blockNumber?0:t-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,t){const n=null==e?1:e,r=null==t?0:t;let i=this.#ce,s=-1,o=-1===i;const a=async()=>{if(o)return null;const{blockNumber:e,nonce:t}=await Tb({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(t<this.nonce)return void(i=e);if(o)return null;const r=await this.getTransaction();if(!r||null==r.blockNumber)for(-1===s&&(s=i-3,s<this.#ce&&(s=this.#ce));s<=e;){if(o)return null;const t=await this.provider.getBlock(s,!0);if(null==t)return;for(const e of t)if(e===this.hash)return;for(let r=0;r<t.length;r++){const s=await t.getTransaction(r);if(s.from===this.from&&s.nonce===this.nonce){if(o)return null;const t=await this.provider.getTransactionReceipt(s.hash);if(null==t)return;if(e-t.blockNumber+1<n)return;let r="replaced";s.data===this.data&&s.to===this.to&&s.value===this.value?r="repriced":"0x"===s.data&&s.from===s.to&&s.value===sC&&(r="cancelled"),jb(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:"replaced"===r||"cancelled"===r,reason:r,replacement:s.replaceableTransaction(i),hash:s.hash,receipt:t})}}s++}},c=e=>{if(null==e||0!==e.status)return e;jb(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},l=await this.provider.getTransactionReceipt(this.hash);if(0===n)return c(l);if(l){if(await l.confirmations()>=n)return c(l)}else if(await a(),0===n)return null;const u=new Promise(((e,t)=>{const s=[],l=()=>
9688{s.forEach((e=>e()))};if(s.push((()=>{o=!0})),r>0){const e=setTimeout((()=>{l(),t(Mb("wait for transaction timeout","TIMEOUT"))}),r);s.push((()=>{clearTimeout(e)}))}const u=async r=>{if(await r.confirmations()>=n){l();try{e(c(r))}catch(i){t(i)}}};if(s.push((()=>{this.provider.off(this.hash,u)})),this.provider.on(this.hash,u),i>=0){const e=async()=>{try{await a()}catch(n){if(Rb(n,"TRANSACTION_REPLACED"))return l(),void t(n)}o||this.provider.once("block",e)};s.push((()=>{this.provider.off("block",e)})),this.provider.once("block",e)}}));return await u}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return jb(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),mC(this)}reorderedEvent(e){return jb(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),jb(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),fC(this,e)}replaceableTransaction(e){Lb(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new pC(this,this.provider);return t.#ce=e,t}}function fC(e,t){return{orphan:"reorder-transaction",tx:e,other:t}}function mC(e){return{orphan:"drop-transaction",tx:e}}class gC{filter;emitter;#le;constructor(e,t,n){this.#le=t,Pb(this,{emitter:e,filter:n})}async removeListener(){null!=this.#le&&await this.emitter.off(this.filter,this.#le)}}class yC extends dC{interface;fragment;args;constructor(e,t,n){super(e,e.provider);Pb(this,{args:t.decodeEventLog(n,e.data,e.topics),fragment:n,interface:t})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class vC extends dC{error;constructor(e,t){super(e,e.provider),Pb(this,{error:t})}}class wC extends hC{#ue;constructor(e,t,n){super(n,t),this.#ue=e}get logs(){return super.logs.map((e=>{const t=e.topics.length?this.#ue.getEvent(e.topics[0]):null;if(t)try{return new yC(e,this.#ue,t)}catch(n){return new vC(e,n)}return e}))}}class bC extends pC{#ue;constructor(e,t,n){super(n,t),this.#ue=e}async wait(e,t){const n=await super.wait(e,t);return null==n?null:new wC(this.#ue,this.provider,n)}}class xC extends gC{log;constructor(e,t,n,r){super(e,t,n),Pb(this,{log:r})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class EC extends xC{constructor(e,t,n,r,i){super(e,t,n,new yC(i,e.interface,r));Pb(this,{args:e.interface.decodeEventLog(r,this.log.data,this.log.topics),fragment:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const _C=BigInt(0);function kC(e){return e&&"function"===typeof e.call}function CC(e){return e&&"function"===typeof e.estimateGas}function AC(e){return e&&"function"===typeof e.resolveName}function SC(e){return e&&"function"===typeof e.sendTransaction}function IC(e){if(null!=e){if(AC(e))return e;if(e.provider)return e.provider}}class TC{#de;fragment;constructor(e,t,n){if(Pb(this,{fragment:t}),t.inputs.length<n.length)throw new Error("too many arguments");const r=PC(e.runner,"resolveName"),i=AC(r)?r:null;this.#de=async function(){const r=await Promise.all(t.inputs.map(((e,t)=>null==n[t]?null:e.walkAsync(n[t],((e,t)=>"address"===e?Array.isArray(t)?Promise.all(t.map((e=>ck(e,i)))):ck(t,i):t)))));return e.interface.encodeFilterTopics(t,r)}()}getTopicFilter(){return this.#de}}function PC(e,t){return null==e?null:"function"===typeof e[t]?e:e.provider&&"function"===typeof e.provider[t]?e.provider:null}function NC(e){return null==e?null:e.provider||null}async function RC(e,t){const n=WE.dereference(e,"overrides");Lb("object"===typeof n,"invalid overrides parameter","overrides",e);const r=lC(n);return Lb(null==r.to||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",r.to),Lb(null==r.data||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",r.data),r.from&&(r.from=r.from),r}function OC(e){const t=async function(t){const n=await RC(t,["data"]);n.to=await e.getAddress(),n.from&&(n.from=await ck(n.from,IC(e.runner)));const r=e.interface,i=lx(n.value||_C,"overrides.value")===_C,s="0x"===(n.data||"0x");!r.fallback||r.fallback.payable||!r.receive||s||i||Lb(!1,"cannot send data to receive or send value to non-payable fallback","overrides",t),Lb(r.fallback||s,"cannot send data to receive-only contract","overrides.data",n.data);return Lb(r.receive||r.fallback&&r.fallback.payable||i,"cannot send value to non-payable fallback","overrides.value",n.value),Lb(r.fallback||s,"cannot send data to receive-only contract","overrides.data",n.data),n},n=async function(n){const r=e.runner;jb(SC(r),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const i=await r.sendTransaction(await t(n)),s=NC(e.runner);return new bC(e.interface,s,i)},r=async e=>await n(e);return Pb(r,{_contract:e,estimateGas:async function(n){const r=PC(e.runner,"estimateGas");return jb(CC(r),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await r.estimateGas(await t(n))},populateTransaction:t,send:n,staticCall:async function(n){const r=PC(e.runner,"call");jb(kC(r),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const i=await t(n);try{return await r.call(i)}catch(s){if(Ob(s)&&s.data)throw e.interface.makeError(s.data,i);throw s}}}),r}function MC(e,t){const n=function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];const s=e.interface.getFunction(t,r);return jb(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),s},r=async function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];const s=n(...r);let o={};if(s.inputs.length+1===r.length&&(o=await RC(r.pop()),o.from&&(o.from=await ck(o.from,IC(e.runner)))),s.inputs.length!==r.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const a=await async function(e,t,n){const r=PC(e,"resolveName"),i=AC(r)?r:null;return await Promise.all(t.map(((e,t)=>e.walkAsync(n[t],((e,t)=>(t=WE.dereference(t,e),"address"===e?ck(t,i):t))))))}(e.runner,s.inputs,r);return Object.assign({},o,await Tb({to:e.getAddress(),data:e.interface.encodeFunctionData(s,a)}))},i=async function(){const e=await o(...arguments);return 1===e.length?e[0]:e},s=async function(){const t=e.runner;jb(SC(t),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const n=await t.sendTransaction(await r(...arguments)),i=NC(e.runner);return new bC(e.interface,i,n)},o=async function(){const t=PC(e.runner,"call");jb(kC(t),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const i=await r(...arguments);let s="0x";try{s=await t.call(i)}catch(a){if(Ob(a)&&a.data)throw e.interface.makeError(a.data,i);throw a}const o=n(...arguments);return e.interface.decodeFunctionResult(o,s)},a=async function(){return n(...arguments).constant?await i(...arguments):await s(...arguments)};return Pb(a,{name:e.interface.getFunctionName(t),_contract:e,_key:t,getFragment:n,estimateGas:async function(){const t=PC(e.runner,"estimateGas");return jb(CC(t),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await t.estimateGas(await r(...arguments))},populateTransaction:r,send:s,staticCall:i,staticCallResult:o}),Object.defineProperty(a,"fragment",{configurable:!1,enumerable:!0,get:()=>{const n=e.interface.getFunction(t);return jb(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),n}}),a}const jC=Symbol.for("_ethersInternal_contract"),LC=new WeakMap;function DC(e){return LC.get(e[jC])}async function BC(e,t){let n,r=null;if(Array.isArray(t)){const r=function(t){if(Hb(t,32))return t;const n=e.interface.getEvent(t);return Lb(n,"unknown fragment","name",t),n.topicHash};n=t.map((e=>null==e?null:Array.isArray(e)?e.map(r):r(e)))}else"*"===t?n=[null]:"string"===typeof t?Hb(t,32)?n=[t]:(r=e.interface.getEvent(t),Lb(r,"unknown fragment","event",t),n=[r.topicHash]):(i=t)&&"object"===typeof i&&"getTopicFilter"in i&&"function"===typeof i.getTopicFilter&&i.fragment?n=await t.getTopicFilter():"fragment"in t?(r=t.fragment,n=[r.topicHash]):Lb(!1,"unknown event name","event",t);var i;n=n.map((e=>{if(null==e)return null;if(Array.isArray(e)){const t=Array.from(new Set(e.map((e=>e.toLowerCase()))).values());return 1===t.length?t[0]:(t.sort(),t)}return e.toLowerCase()}));const s=n.map((e=>null==e?"null":Array.isArray(e)?e.join("|"):e)).join("&");return{fragment:r,tag:s,topics:n}}async function UC(e,t){const{subs:n}=DC(e);return n.get((await BC(e,t)).tag)||null}async function FC(e,t,n){const r=NC(e.runner);jb(r,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:i,tag:s,topics:o}=await BC(e,n),{addr:a,subs:c}=DC(e);let l=c.get(s);if(!l){const t={address:a||e,topics:o},u=t=>{let r=i;if(null==r)try{r=e.interface.getEvent(t.topics[0])}catch(s){}if(r){const s=r,o=i?e.interface.decodeEventLog(i,t.data,t.topics):[];zC(e,n,o,(r=>new EC(e,r,n,s,t)))}else zC(e,n,[],(r=>new xC(e,r,n,t)))};let d=[];l={tag:s,listeners:[],start:()=>{d.length||d.push(r.on(t,u))},stop:async()=>
9688{if(0==d.length)return;let e=d;d=[],await Promise.all(e),r.off(t,u)}},c.set(s,l)}return l}let $C=Promise.resolve();async function zC(e,t,n,r){try{await $C}catch(s){}const i=async function(e,t,n,r){await $C;const i=await UC(e,t);if(!i)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter((t=>{let{listener:i,once:o}=t;const a=Array.from(n);r&&a.push(r(o?null:i));try{i.call(e,...a)}catch(s){}return!o})),0===i.listeners.length&&(i.stop(),DC(e).subs.delete(i.tag)),o>0}(e,t,n,r);return $C=i,await i}const HC=["then"];class WC{target;interface;runner;filters;[jC];fallback;constructor(e,t,n,r){Lb("string"===typeof e||ok(e),"invalid value for Contract target","target",e),null==n&&(n=null);const i=iC.from(t);let s;Pb(this,{target:e,runner:n,interface:i}),Object.defineProperty(this,jC,{value:{}});let o=null,a=null;if(r){const e=NC(n);a=new bC(this.interface,e,r)}let c=new Map;if("string"===typeof e)if(Hb(e))o=e,s=Promise.resolve(e);else{const t=PC(n,"resolveName");if(!AC(t))throw Mb("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});s=t.resolveName(e).then((t=>{if(null==t)throw Mb("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return DC(this).addr=t,t}))}else s=e.getAddress().then((e=>{if(null==e)throw new Error("TODO");return DC(this).addr=e,e}));!function(e,t){LC.set(e[jC],t)}(this,{addrPromise:s,addr:o,deployTx:a,subs:c});const l=new Proxy({},{get:(e,t,n)=>{if("symbol"===typeof t||HC.indexOf(t)>=0)return Reflect.get(e,t,n);try{return this.getEvent(t)}catch(r){if(!Rb(r,"INVALID_ARGUMENT")||"key"!==r.argument)throw r}},has:(e,t)=>HC.indexOf(t)>=0?Reflect.has(e,t):Reflect.has(e,t)||this.interface.hasEvent(String(t))});return Pb(this,{filters:l}),Pb(this,{fallback:i.receive||i.fallback?OC(this):null}),new Proxy(this,{get:(e,t,n)=>{if("symbol"===typeof t||t in e||HC.indexOf(t)>=0)return Reflect.get(e,t,n);try{return e.getFunction(t)}catch(r){if(!Rb(r,"INVALID_ARGUMENT")||"key"!==r.argument)throw r}},has:(e,t)=>"symbol"===typeof t||t in e||HC.indexOf(t)>=0?Reflect.has(e,t):e.interface.hasFunction(t)})}connect(e){return new WC(this.target,this.interface,e)}attach(e){return new WC(e,this.interface,this.runner)}async getAddress(){return await DC(this).addrPromise}async getDeployedCode(){const e=NC(this.runner);jb(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return"0x"===t?null:t}async waitForDeployment(){const e=this.deploymentTransaction();
9688if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;const t=NC(this.runner);return jb(null!=t,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise(((e,n)=>{const r=async()=>{try{if(null!=await this.getDeployedCode())return e(this);t.once("block",r)}catch(i){n(i)}};r()}))}deploymentTransaction(){return DC(this).deployTx}getFunction(e){"string"!==typeof e&&(e=e.format());return MC(this,e)}getEvent(e){return"string"!==typeof e&&(e=e.format()),function(e,t){const n=function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];const s=e.interface.getEvent(t,r);return jb(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),s},r=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return new TC(e,n(...r),r)};return Pb(r,{name:e.interface.getEventName(t),_contract:e,_key:t,getFragment:n}),Object.defineProperty(r,"fragment",{configurable:!1,enumerable:!0,get:()=>{const n=e.interface.getEvent(t);return jb(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),n}}),r}(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,n){null==t&&(t=0),null==n&&(n="latest");const{addr:r,addrPromise:i}=DC(this),s=r||await i,{fragment:o,topics:a}=await BC(this,e),c={address:s,topics:a,fromBlock:t,toBlock:n},l=NC(this.runner);return jb(l,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await l.getLogs(c)).map((e=>{let t=o;if(null==t)try{t=this.interface.getEvent(e.topics[0])}catch(n){}if(t)try{return new yC(e,this.interface,t)}catch(n){return new vC(e,n)}return new dC(e,l)}))}async on(e,t){const n=await FC(this,"on",e);return n.listeners.push({listener:t,once:!1}),n.start(),this}async once(e,t){const n=await FC(this,"once",e);return n.listeners.push({listener:t,once:!0}),n.start(),this}async emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return await zC(this,e,n,null)}async listenerCount(e){if(e){const t=await UC(this,e);return t?t.listeners.length:0}const{subs:t}=DC(this);let n=0;for(const{listeners:r}of t.values())n+=r.length;return n}async listeners(e){if(e){const t=await UC(this,e);return t?t.listeners.map((e=>{let{listener:t}=e;return t})):[]}const{subs:t}=DC(this);let n=[];for(const{listeners:r}of t.values())n=n.concat(r.map((e=>{let{listener:t}=e;return t})));return n}async off(e,t){const n=await UC(this,e);if(!n)return this;if(t){const e=n.listeners.map((e=>{let{listener:t}=e;return t})).indexOf(t);e>=0&&n.listeners.splice(e,1)}return null!=t&&0!==n.listeners.length||(n.stop(),DC(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const t=await UC(this,e);if(!t)return this;t.stop(),DC(this).subs.delete(t.tag)}else{const{subs:e}=DC(this);for(const{tag:t,stop:n}of e.values())n(),e.delete(t)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){return class extends WC{constructor(t){super(t,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)}}}static from(e,t,n){null==n&&(n=null);return new this(e,t,n)}}class qC extends(function(){return WC}()){}const VC=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]);function GC(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function n(){return e[t++]<<8|e[t++]}let r=n(),i=1,s=[0,1];for(let b=1;b<r;b++)s.push(i+=n());let o=n(),a=t;t+=o;let c=0,l=0;function u(){return 0==c&&(l=l<<8|e[t++],c=8),l>>--c&1}const d=2**31,h=d>>>1,p=h>>1,f=d-1;let m=0;for(let b=0;b<31;b++)m=m<<1|u();let g=[],y=0,v=d;for(;;){let e=Math.floor(((m-y+1)*i-1)/v),t=0,n=r;for(;n-t>1;){let r=t+n>>>1;e<s[r]?n=r:t=r}if(0==t)break;g.push(t);let o=y+Math.floor(v*s[t]/i),a=y+Math.floor(v*s[t+1]/i)-1;for(;0==((o^a)&h);)m=m<<1&f|u(),o=o<<1&f,a=a<<1&f|1;for(;o&~a&p;)m=m&h|m<<1&f>>>1|u(),o=o<<1^h,a=(a^h)<<1|h|1;y=o,v=1+a-o}let w=r-4;return g.map((t=>
vendor: 2,233 bytes, line 9688
9688{switch(t-w){case 3:return w+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return w+256+(e[a++]<<8|e[a++]);case 1:return w+e[a++];default:return t-1}}))}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,n)=>t[e.charCodeAt(0)]=n));let n=e.length,r=new Uint8Array(6*n>>3);for(let i=0,s=0,o=0,a=0;i<n;i++)a=a<<6|t[e.charCodeAt(i)],o+=6,o>=8&&(r[s++]=a>>(o-=8));return r}(e)))}function KC(e){return 1&e?~e>>1:e>>1}function ZC(e,t){let n=Array(e);for(let r=0,i=0;r<e;r++)n[r]=i+=KC(t());return n}function YC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];for(;;){let r=e(),i=e();if(!i)break;t+=r;for(let e=0;e<i;e++)n.push(t+e);t+=i+1}return n}function QC(e){return XC((()=>{let t=YC(e);if(t.length)return t}))}function JC(e){let t=[];for(;;){let n=e();if(0==n)break;t.push(tA(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push(nA(n,e))}return t.flat()}function XC(e){let t=[];for(;;){let n=e(t.length);if(!n)break;t.push(n)}return t}function eA(e,t,n){let r=Array(e).fill().map((()=>[]));for(let i=0;i<t;i++)ZC(e,n).forEach(((e,t)=>r[t].push(e)));return r}function tA(e,t){let n=1+t(),r=t(),i=XC(t);return eA(i.length,1+e,t).flatMap(((e,t)=>{let[s,...o]=e;return Array(i[t]).fill().map(((e,t)=>{let i=t*r;return[s+t*n,o.map((e=>e+i))]}))}))}function nA(e,t){return eA(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}function rA(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function iA(e){let t=[];for(let n=0,r=e.length;n<r;){let r=e.codePointAt(n);n+=r<65536?1:2,t.push(r)}return t}function sA(e){let t=e.length;if(t<4096)return String.fromCodePoint(...e);let n=[];for(let r=0;r<t;)n.push(String.fromCodePoint(...e.slice(r,r+=4096)));return n.join("")}function oA(e,t){let n=e.length,r=n-t.length;for(let i=0;0==r&&i<n;i++)r=e[i]-t[i];return r}const aA=44032,cA=4352,lA=4449,uA=4519,dA=28,hA=588;function pA(e){return e>>24&255}function fA(e){return 16777215&e}let mA,gA,yA,vA;function wA(e){return e>=aA&&e<55204}function bA(e,t){if(e>=cA&&e<4371&&t>=lA&&t<4470)return aA+(e-cA)*hA+(t-lA)*dA;if(wA(e)&&t>uA&&t<4547&&(e-aA)%dA==0)return e+(t-uA);{let n=vA.get(e);return n&&(n=n.get(t),n)?n:-1}}function xA(e){mA||function(){let e=GC
vendor: 7,456 bytes, line 9688
9688("AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g");
vendor: 2,749 bytes, line 9688
9688mA=new Map(QC(e).flatMap(((e,t)=>e.map((e=>[e,t+1<<24]))))),gA=new Set(YC(e)),yA=new Map,vA=new Map;for(let[t,n]of JC(e)){if(!gA.has(t)&&2==n.length){let[e,r]=n,i=vA.get(e);i||(i=new Map,vA.set(e,i)),i.set(r,t)}yA.set(t,n.reverse())}}();let t=[],n=[],r=!1;function i(e){let n=mA.get(e);n&&(r=!0,e|=n),t.push(e)}for(let s of e)for(;;){if(s<128)t.push(s);else if(wA(s)){let e=s-aA,t=e%hA/dA|0,n=e%dA;i(cA+(e/hA|0)),i(lA+t),n>0&&i(uA+n)}else{let e=yA.get(s);e?n.push(...e):i(s)}if(!n.length)break;s=n.pop()}if(r&&t.length>1){let e=pA(t[0]);for(let n=1;n<t.length;n++){let r=pA(t[n]);if(0==r||e<=r){e=r;continue}let i=n-1;for(;;){let n=t[i+1];if(t[i+1]=t[i],t[i]=n,!i)break;if(e=pA(t[--i]),e<=r)break}e=pA(t[n])}}return t}function EA(e){return xA(e).map(fA)}function _A(e){return function(e){let t=[],n=[],r=-1,i=0;for(let s of e){let e=pA(s),o=fA(s);if(-1==r)0==e?r=o:t.push(o);else if(i>0&&i>=e)0==e?(t.push(r,...n),n.length=0,r=o):n.push(o),i=e;else{let s=bA(r,o);s>=0?r=s:0==i&&0==e?(t.push(r),r=o):(n.push(o),i=e)}}return r>=0&&t.push(r,...n),t}(xA(e))}const kA=".",CA=e=>Array.from(e);function AA(e,t){return e.P.has(t)||e.Q.has(t)}class SA extends Array{get is_emoji(){return!0}}let IA,TA,PA,NA,RA,OA,MA,jA,LA,DA,BA,UA;function FA(){if(IA)return;let e=GC("AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhT
9688yiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9ey
9688MgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduP
9688jbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESV
9688FFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI");const t=()=>YC(e),n=()=>new Set(t()),r=(e,t)=>t.forEach((t=>e.add(t)));IA=new Map(JC(e)),TA=n(),PA=t(),NA=new Set(t().map((e=>
9688PA[e]))),PA=new Set(PA),RA=n(),OA=n();let i=QC(e),s=e();const o=()=>{let e=new Set;return t().forEach((t=>r(e,i[t]))),r(e,t()),e};MA=XC((t=>{let n=XC(e).map((e=>e+96));if(n.length){let r=t>=s;return n[0]-=32,n=sA(n),r&&(n=`Restricted[${n}]`),{N:n,P:o(),Q:o(),M:!e(),R:r}}})),jA=n(),LA=new Map;let a=t().concat(CA(jA)).sort(((e,t)=>e-t));a.forEach(((t,n)=>{let r=e(),i=a[n]=r?a[n-r]:{V:[],M:new Map};i.V.push(t),jA.has(t)||LA.set(t,i)}));for(let{V:u,M:d}of new Set(LA.values())){let e=[];for(let n of u){let t=MA.filter((e=>AA(e,n))),i=e.find((e=>{let{G:n}=e;return t.some((e=>n.has(e)))}));i||(i={G:new Set,V:[]},e.push(i)),i.V.push(n),r(i.G,t)}let t=e.flatMap((e=>CA(e.G)));for(let{G:n,V:r}of e){let e=new Set(t.filter((e=>!n.has(e))));for(let t of r)d.set(t,e)}}DA=new Set;let c=new Set;const l=e=>DA.has(e)?c.add(e):DA.add(e);for(let u of MA){for(let e of u.P)l(e);for(let e of u.Q)l(e)}for(let u of DA)LA.has(u)||c.has(u)||LA.set(u,1);r(DA,EA(DA)),BA=function(e){let t=[],n=YC(e);return function e(n,r,i){let{S:s,B:o}=n;if(!(4&s&&i===r[r.length-1])){2&s&&(i=r[r.length-1]),1&s&&t.push(r);for(let t of o)for(let n of t.Q)e(t,[...r,n],i)}}(function t(r){let i=e(),s=XC((()=>{let r=YC(e).map((e=>n[e]));if(r.length)return t(r)}));return{S:i,B:s,Q:r}}([]),[]),t}(e).map((e=>SA.from(e))).sort(oA),UA=new Map;for(let u of BA){let e=[UA];for(let t of u){let n=e.map((e=>{let n=e.get(t);return n||(n=new Map,e.set(t,n)),n}));65039===t?e.push(...n):e=n}for(let t of e)t.V=u}}function $A(e){return(WA(e)?"":`${zA(HA([e]))} `)+rA(e)}function zA(e){return`"${e}"\u200e`}function HA(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:rA,r=[];var i;i=e[0],FA(),PA.has(i)&&r.push("\u25cc"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let s=0,o=e.length;for(let a=0;a<o;a++){let t=e[a];WA(t)&&(r.push(sA(e.slice(s,a))),r.push(n(t)),s=a+1)}return r.push(sA(e.slice(s,o))),r.join("")}function WA(e){return FA(),RA.has(e)}function qA(e){return GA(VA(e,_A,JA))}function VA(e,t,n){if(!e)return[];FA();let r=0;return e.split(kA).map((e=>{let i=iA(e),s={input:i,offset:r};r+=i.length+1;try{let e,r=s.tokens=QA(i,t,n),o=r.length;if(!o)throw new Error("empty label");let a=s.output=r.flat();if(function(e){for(let t=e.lastIndexOf(95);t>0;)if(95!==e[--t])throw new Error("underscore allowed only at start")}(a),!(s.emoji=o>1||r[0].is_emoji)&&a.every((e=>e<128)))!function(e){if(e.length>=4&&45==e[2]&&45==e[3])throw new Error(`invalid label extension: "${sA(e.slice(0,4))}"`)}(a),e="ASCII";else{let t=r.flatMap((e=>e.is_emoji?[]:e));if(t.length){if(PA.has(a[0]))throw YA("leading combining mark");for(let e=1;e<o;e++){let t=r[e];
9688if(!t.is_emoji&&PA.has(t[0]))throw YA(`emoji + combining mark: "${sA(r[e-1])} + ${HA([t[0]])}"`)}!function(e){let t=e[0],n=VC.get(t);if(n)throw YA(`leading ${n}`);let r=e.length,i=-1;for(let s=1;s<r;s++){t=e[s];let r=VC.get(t);if(r){if(i==s)throw YA(`${n} + ${r}`);i=s+1,n=r}}if(i==r)throw YA(`trailing ${n}`)}(a);let n=CA(new Set(t)),[i]=function(e){let t=MA;for(let n of e){let e=t.filter((e=>AA(e,n)));if(!e.length)throw MA.some((e=>AA(e,n)))?ZA(t[0],n):KA(n);if(t=e,1==e.length)break}return t}(n);!function(e,t){for(let n of t)if(!AA(e,n))throw ZA(e,n);if(e.M){let e=EA(t);for(let t=1,n=e.length;t<n;t++)if(NA.has(e[t])){let r=t+1;for(let i;r<n&&NA.has(i=e[r]);r++)for(let n=t;n<r;n++)if(e[n]==i)throw new Error(`duplicate non-spacing marks: ${$A(i)}`);if(r-t>4)throw new Error(`excessive non-spacing marks: ${zA(HA(e.slice(t-1,r)))} (${r-t}/4)`);t=r}}}(i,t),function(e,t){let n,r=[];for(let i of t){let e=LA.get(i);if(1===e)return;if(e){let t=e.M.get(i);if(n=n?n.filter((e=>t.has(e))):CA(t),!n.length)return}else r.push(i)}if(n)for(let i of n)if(r.every((e=>AA(i,e))))throw new Error(`whole-script confusable: ${e.N}/${i.N}`)}(i,n),e=i.N}else e="Emoji"}s.type=e}catch(o){s.error=o}return s}))}function GA(e){return e.map((t=>{let{input:n,error:r,output:i}=t;if(r){let t=r.message;throw new Error(1==e.length?t:`Invalid label ${zA(HA(n,63))}: ${t}`)}return sA(i)})).join(kA)}function KA(e){return new Error(`disallowed character: ${$A(e)}`)}function ZA(e,t){let n=$A(t),r=MA.find((e=>e.P.has(t)));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${e.N} + ${n}`)}function YA(e){return new Error(`illegal placement: ${e}`)}function QA(e,t,n){let r=[],i=[];for(e=e.slice().reverse();e.length;){let s=XA(e);if(s)i.length&&(r.push(t(i)),i=[]),r.push(n(s));else{let t=e.pop();if(DA.has(t))i.push(t);else{let e=IA.get(t);if(e)i.push(...e);else if(!TA.has(t))throw KA(t)}}}return i.length&&r.push(t(i)),r}function JA(e){return e.filter((e=>65039!=e))}function XA(e,t){let n,r=UA,i=e.length;for(;i&&(r=r.get(e[--i]),r);){let{V:s}=r;s&&(n=s,t&&t.push(...e.slice(i).reverse()),e.length=i)}return n}const eS=new Uint8Array(32);function tS(e){return Lb(0!==e.length,"invalid ENS name; empty component","comp",e),e}function nS(e){const t=tx(function(e){try{if(0===e.length)throw new Error("empty label");return qA(e)}catch(t){Lb(!1,`invalid ENS name (${t.message})`,"name",e)}}(e)),n=[];if(0===e.length)return n;let r=0;for(let i=0;i<t.length;i++){46===t[i]&&(n.push(tS(t.slice(r,i))),r=i+1)}return Lb(r<t.length,"invalid ENS name; empty component","name",e),n.push(tS(t.slice(r))),n}function rS(e){Lb("string"===typeof e,"invalid ENS name; not a string","name",e),Lb(e.length,"invalid ENS name (empty label)","name",e);let t=eS;const n=nS(e);for(;n.length;)t=RE(Gb([t,RE(n.pop())]));return Vb(t)}function iS(e,t){const n=null!=t?t:63;return Lb(n<=255,"DNS encoded label cannot exceed 255","length",n),Vb(Gb(nS(e).map((t=>{Lb(t.length<=n,`label ${JSON.stringify(e)} exceeds ${n} bytes`,"name",e);const r=new Uint8Array(t.length+1);return r.set(t,1),r[0]=r.length-1,r}))))+"00"}eS.fill(0);class sS extends uE{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=aE(this.buffer)}update(e){Gx(this);const{view:t,buffer:n,blockLen:r}=this,i=(e=lE(e)).length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);if(o!==r)n.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=aE(e);for(;r<=i-s;s+=r)this.process(t,s)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){Gx(this),Kx(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:i}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>r-s&&(this.process(n,0),s=0);for(let u=s;u<r;u++)t[u]=0;!function(e,t,n,r){if("function"===typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(n>>i&s),a=Number(n&s),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,a,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);const o=aE(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<c;u++)o.setUint32(4*u,l[u],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:s,pos:o}=this;return e.length=r,e.pos=o,e.finished=i,e.destroyed=s,r%t&&e.buffer.set(n),e}}const oS=(e,t,n)=>e&t^~e&n,aS=(e,t,n)=>e&t^e&n^t&n,cS=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
vendor: 2,157 bytes, line 9688
9688734187,3204031479,3329325298]),lS=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),uS=new Uint32Array(64);class dS extends sS{constructor(){super(64,32,8,!1),this.A=0|lS[0],this.B=0|lS[1],this.C=0|lS[2],this.D=0|lS[3],this.E=0|lS[4],this.F=0|lS[5],this.G=0|lS[6],this.H=0|lS[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:s,G:o,H:a}=this;return[e,t,n,r,i,s,o,a]}set(e,t,n,r,i,s,o,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|s,this.G=0|o,this.H=0|a}process(e,t){for(let u=0;u<16;u++,t+=4)uS[u]=e.getUint32(t,!1);for(let u=16;u<64;u++){const e=uS[u-15],t=uS[u-2],n=cE(e,7)^cE(e,18)^e>>>3,r=cE(t,17)^cE(t,19)^t>>>10;uS[u]=r+uS[u-7]+n+uS[u-16]|0}let{A:n,B:r,C:i,D:s,E:o,F:a,G:c,H:l}=this;for(let u=0;u<64;u++){const e=l+(cE(o,6)^cE(o,11)^cE(o,25))+oS(o,a,c)+cS[u]+uS[u]|0,t=(cE(n,2)^cE(n,13)^cE(n,22))+aS(n,r,i)|0;l=c,c=a,a=o,o=s+e|0,s=i,i=r,r=n,n=e+t|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,s=s+this.D|0,o=o+this.E|0,a=a+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,s,o,a,c,l)}roundClean(){uS.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const hS=dE((()=>new dS)),[pS,fS]=(()=>iE.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
96885771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),mS=new Uint32Array(80),gS=new Uint32Array(80);class yS extends sS{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:s,Dh:o,Dl:a,Eh:c,El:l,Fh:u,Fl:d,Gh:h,Gl:p,Hh:f,Hl:m}=this;return[e,t,n,r,i,s,o,a,c,l,u,d,h,p,f,m]}set(e,t,n,r,i,s,o,a,c,l,u,d,h,p,f,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|s,this.Dh=0|o,this.Dl=0|a,this.Eh=0|c,this.El=0|l,this.Fh=0|u,this.Fl=0|d,this.Gh=0|h,this.Gl=0|p,this.Hh=0|f,this.Hl=0|m}process(e,t){for(let v=0;v<16;v++,t+=4)mS[v]=e.getUint32(t),gS[v]=e.getUint32(t+=4);for(let v=16;v<80;v++){const e=0|mS[v-15],t=0|gS[v-15],n=iE.rotrSH(e,t,1)^iE.rotrSH(e,t,8)^iE.shrSH(e,t,7),r=iE.rotrSL(e,t,1)^iE.rotrSL(e,t,8)^iE.shrSL(e,t,7),i=0|mS[v-2],s=0|gS[v-2],o=iE.rotrSH(i,s,19)^iE.rotrBH(i,s,61)^iE.shrSH(i,s,6),a=iE.rotrSL(i,s,19)^iE.rotrBL(i,s,61)^iE.shrSL(i,s,6),c=iE.add4L(r,a,gS[v-7],gS[v-16]),l=iE.add4H(c,n,o,mS[v-7],mS[v-16]);mS[v]=0|l,gS[v]=0|c}let{Ah:n,Al:r,Bh:i,Bl:s,Ch:o,Cl:a,Dh:c,Dl:l,Eh:u,El:d,Fh:h,Fl:p,Gh:f,Gl:m,Hh:g,Hl:y}=this;for(let v=0;v<80;v++){const e=iE.rotrSH(u,d,14)^iE.rotrSH(u,d,18)^iE.rotrBH(u,d,41),t=iE.rotrSL(u,d,14)^iE.rotrSL(u,d,18)^iE.rotrBL(u,d,41),w=u&h^~u&f,b=d&p^~d&m,x=iE.add5L(y,t,b,fS[v],gS[v]),E=iE.add5H(x,g,e,w,pS[v],mS[v]),_=0|x,k=iE.rotrSH(n,r,28)^iE.rotrBH(n,r,34)^iE.rotrBH(n,r,39),C=iE.rotrSL(n,r,28)^iE.rotrBL(n,r,34)^iE.rotrBL(n,r,39),A=n&i^n&o^i&o,S=r&s^r&a^s&a;g=0|f,y=0|m,f=0|h,m=0|p,h=0|u,p=0|d,({h:u,l:d}=iE.add(0|c,0|l,0|E,0|_)),c=0|o,l=0|a,o=0|i,a=0|s,i=0|n,s=0|r;const I=iE.add3L(_,C,S);n=iE.add3H(I,E,k,A),r=0|I}({h:n,l:r}=iE.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:i,l:s}=iE.add(0|this.Bh,0|this.Bl,0|i,0|s)),({h:o,l:a}=iE.add(0|this.Ch,0|this.Cl,0|o,0|a)),({h:c,l:l}=iE.add(0|this.Dh,0|this.Dl,0|c,0|l)),({h:u,l:d}=iE.add(0|this.Eh,0|this.El,0|u,0|d)),({h:h,l:p}=iE.add(0|this.Fh,0|this.Fl,0|h,0|p)),({h:f,l:m}=iE.add(0|this.Gh,0|this.Gl,0|f,0|m)),({h:g,l:y}=iE.add(0|this.Hh,0|this.Hl,0|g,0|y)),this.set(n,r,i,s,o,a,c,l,u,d,h,p,f,m,g,y)}roundClean(){mS.fill(0),gS.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const vS=dE((()=>new yS));const wS=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw new Error("unable to locate global object")}();wS.crypto||wS.msCrypto;function bS(e){switch(e){case"sha256":return hS.create();case"sha512":return vS.create()}Lb(!1,"invalid hashing algorithm name","algorithm",e)}const xS=function(e){return bS("sha256").update(e).digest()},ES=function(e){return bS("sha512").update(e).digest()};let _S=xS,kS=ES,CS=!1,AS=!1;function SS(e){const t=$b(e,"data");return Vb(_S(t))}function IS(e){const t=$b(e,"data");return Vb(kS(t))}SS._=xS,SS.lock=function(){CS=!0},SS.register=function(e){if(CS)throw new Error("sha256 is locked");_S=e},Object.freeze(SS),IS._=ES,IS.lock=function(){AS=!0},IS.register=function(e){if(AS)throw new Error("sha512 is locked");kS=e},Object.freeze(SS);BigInt(0);const TS=BigInt(1),PS=BigInt(2),NS=e=>e instanceof Uint8Array,RS=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function OS(e){if(!NS(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=RS[e[n]];return t}function MS(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function jS(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(t/2);for(let r=0;r<n.length;r++){const t=2*r,i=e.slice(t,t+2),s=Number.parseInt(i,16);if(Number.isNaN(s)||s<0)throw new Error("Invalid byte sequence");n[r]=s}return n}function LS(e){return MS(OS(e))}function DS(e){if(!NS(e))throw new Error("Uint8Array expected");return MS(OS(Uint8Array.from(e).reverse()))}function BS(e,t){return jS(e.toString(16).padStart(2*t,"0"))}function US(e,t){return BS(e,t).reverse()}function FS(e,t,n){let r;if("string"===typeof t)try{r=jS(t)}catch(s){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${s}`)}else{if(!NS(t))throw new Error(`${e} must be hex string or Uint8Array`);r=Uint8Array.from(t)}const i=r.length;if("number"===typeof n&&i!==n)throw new Error(`${e} expected ${n} bytes, got ${i}`);return r}function $S(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];
9688const r=new Uint8Array(t.reduce(((e,t)=>e+t.length),0));let i=0;return t.forEach((e=>{if(!NS(e))throw new Error("Uint8Array expected");r.set(e,i),i+=e.length})),r}const zS=e=>(PS<<BigInt(e-1))-TS,HS=e=>new Uint8Array(e),WS=e=>Uint8Array.from(e);function qS(e,t,n){if("number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!==typeof n)throw new Error("hmacFn must be a function");let r=HS(e),i=HS(e),s=0;const o=()=>{r.fill(1),i.fill(0),s=0},a=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return n(i,r,...t)},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:HS();i=a(WS([0]),e),r=a(),0!==e.length&&(i=a(WS([1]),e),r=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){r=a();const t=r.slice();n.push(t),e+=r.length}return $S(...n)};return(e,t)=>{let n;for(o(),c(e);!(n=t(l()));)c();return o(),n}}const VS={bigint:e=>"bigint"===typeof e,function:e=>"function"===typeof e,boolean:e=>"boolean"===typeof e,string:e=>"string"===typeof e,stringOrUint8Array:e=>"string"===typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"===typeof e&&Number.isSafeInteger(e.outputLen)};function GS(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(t,n,r)=>{const i=VS[n];if("function"!==typeof i)throw new Error(`Invalid validator "${n}", expected function`);const s=e[t];if((!r||void 0!==s)&&!i(s,e))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${n}`)};for(const[i,s]of Object.entries(t))r(i,s,!1);for(const[i,s]of Object.entries(n))r(i,s,!0);return e}const KS=BigInt(0),ZS=BigInt(1),YS=BigInt(2),QS=BigInt(3),JS=BigInt(4),XS=BigInt(5),eI=BigInt(8);BigInt(9),BigInt(16);function tI(e,t){const n=e%t;return n>=KS?n:t+n}function nI(e,t,n){if(n<=KS||t<KS)throw new Error("Expected power/modulo > 0");if(n===ZS)return KS;let r=ZS;for(;t>KS;)t&ZS&&(r=r*e%n),e=e*e%n,t>>=ZS;return r}function rI(e,t,n){let r=e;for(;t-- >KS;)r*=r,r%=n;return r}function iI(e,t){if(e===KS||t<=KS)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=tI(e,t),r=t,i=KS,s=ZS,o=ZS,a=KS;for(;n!==KS;){const e=r/n,t=r%n,c=i-o*e,l=s-a*e;r=n,n=t,i=o,s=a,o=c,a=l}if(r!==ZS)throw new Error("invert: does not exist");return tI(i,t)}function sI(e){if(e%JS===QS){const t=(e+ZS)/JS;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}if(e%eI===XS){const t=(e-XS)/eI;return function(e,n){const r=e.mul(n,YS),i=e.pow(r,t),s=e.mul(n,i),o=e.mul(e.mul(s,YS),i),a=e.mul(s,e.sub(o,e.ONE));if(!e.eql(e.sqr(a),n))throw new Error("Cannot find square root");return a}}return function(e){const t=(e-ZS)/YS;let n,r,i;for(n=e-ZS,r=0;n%YS===KS;n/=YS,r++);for(i=YS;i<e&&nI(i,t,e)!==e-ZS;i++);if(1===r){const t=(e+ZS)/JS;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}const s=(n+ZS)/YS;return function(e,o){if(e.pow(o,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let a=r,c=e.pow(e.mul(e.ONE,i),n),l=e.pow(o,s),u=e.pow(o,n);for(;!e.eql(u,e.ONE);){if(e.eql(u,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(u);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const n=e.pow(c,ZS<<BigInt(a-t-1));c=e.sqr(n),l=e.mul(l,n),u=e.mul(u,c),a=t}return l}}(e)}const oI=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function aI(e,t){const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function cI(e){if("bigint"!==typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function lI(e){const t=cI(e);return t+Math.ceil(t/2)}class uI extends uE{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Vx(e);const n=lE(t);if(this.iHash=e.create(),"function"!==typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=e.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),i.fill(0)}update(e){return Gx(this),this.iHash.update(e),this}digestInto(e){Gx(this),qx(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:s,outputLen:o}=this;return e.finished=r,e.destroyed=i,e.blockLen=s,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const dI=(e,t,n)=>new uI(e,t).update(n).digest();dI.create=(e,t)=>
9688new uI(e,t);const hI=BigInt(0),pI=BigInt(1);function fI(e){return GS(e.Fp,oI.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),GS(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...aI(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:mI,aT:gI}=e,yI={Err:class extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}},_parseInt(e){const{Err:t}=yI;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(128&r[0])throw new t("Invalid signature integer: negative");if(0===r[0]&&!(128&r[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:mI(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=yI,n="string"===typeof e?gI(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||48!=n[0])throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:i,l:s}=yI._parseInt(n.subarray(2)),{d:o,l:a}=yI._parseInt(s);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,n=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},r=t(n(e.s)),i=t(n(e.r)),s=r.length/2,o=i.length/2,a=n(s),c=n(o);return`30${n(o+s+4)}02${c}${i}02${a}${r}`}},vI=BigInt(0),wI=BigInt(1),bI=(BigInt(2),BigInt(3));BigInt(4);function xI(e){const t=function(e){const t=fI(e);GS(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==typeof n||"bigint"!==typeof n.beta||"function"!==typeof n.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=t,r=t.toBytes||((e,t,r)=>{const i=t.toAffine();return $S(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),i=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function s(e){const{a:r,b:i}=t,s=n.sqr(e),o=n.mul(s,e);return n.add(n.add(o,n.mul(e,r)),i)}if(!n.eql(n.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function o(e){return"bigint"===typeof e&&vI<e&&e<t.n}function a(e){if(!o(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(e){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:i,n:s}=t;if(n&&"bigint"!==typeof e){if(e instanceof Uint8Array&&(e=OS(e)),"string"!==typeof e||!n.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*r,"0")}let o;try{o="bigint"===typeof e?e:LS(FS("private key",e,r))}catch(c){throw new Error(`private key must be ${r} bytes, hex or bigint, not ${typeof e}`)}return i&&(o=tI(o,s)),a(o),o}const l=new Map;function u(e){if(!(e instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required")}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof d)throw new Error("projective point not allowed");const i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?d.ZERO:new d(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(i(FS("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,l.delete(this)}
vendor: 4,462 bytes, line 9688
9688assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:r}=this.toAffine();if(!n.isValid(e)||!n.isValid(r))throw new Error("bad point: x or y not FE");const i=n.sqr(r),o=s(e);if(!n.eql(i,o))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){u(e);const{px:t,py:r,pz:i}=this,{px:s,py:o,pz:a}=e,c=n.eql(n.mul(t,a),n.mul(s,i)),l=n.eql(n.mul(r,a),n.mul(o,i));return c&&l}negate(){return new d(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,i=n.mul(r,bI),{px:s,py:o,pz:a}=this;let c=n.ZERO,l=n.ZERO,u=n.ZERO,h=n.mul(s,s),p=n.mul(o,o),f=n.mul(a,a),m=n.mul(s,o);return m=n.add(m,m),u=n.mul(s,a),u=n.add(u,u),c=n.mul(e,u),l=n.mul(i,f),l=n.add(c,l),c=n.sub(p,l),l=n.add(p,l),l=n.mul(c,l),c=n.mul(m,c),u=n.mul(i,u),f=n.mul(e,f),m=n.sub(h,f),m=n.mul(e,m),m=n.add(m,u),u=n.add(h,h),h=n.add(u,h),h=n.add(h,f),h=n.mul(h,m),l=n.add(l,h),f=n.mul(o,a),f=n.add(f,f),h=n.mul(f,m),c=n.sub(c,h),u=n.mul(f,p),u=n.add(u,u),u=n.add(u,u),new d(c,l,u)}add(e){u(e);const{px:r,py:i,pz:s}=this,{px:o,py:a,pz:c}=e;let l=n.ZERO,h=n.ZERO,p=n.ZERO;const f=t.a,m=n.mul(t.b,bI);let g=n.mul(r,o),y=n.mul(i,a),v=n.mul(s,c),w=n.add(r,i),b=n.add(o,a);w=n.mul(w,b),b=n.add(g,y),w=n.sub(w,b),b=n.add(r,s);let x=n.add(o,c);return b=n.mul(b,x),x=n.add(g,v),b=n.sub(b,x),x=n.add(i,s),l=n.add(a,c),x=n.mul(x,l),l=n.add(y,v),x=n.sub(x,l),p=n.mul(f,b),l=n.mul(m,v),p=n.add(l,p),l=n.sub(y,p),p=n.add(y,p),h=n.mul(l,p),y=n.add(g,g),y=n.add(y,g),v=n.mul(f,v),b=n.mul(m,b),y=n.add(y,v),v=n.sub(g,v),v=n.mul(f,v),b=n.add(b,v),g=n.mul(y,b),h=n.add(h,g),g=n.mul(x,b),l=n.mul(w,l),l=n.sub(l,g),g=n.mul(w,y),p=n.mul(x,p),p=n.add(p,g),new d(l,h,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,l,e,(e=>{const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(d.fromAffine)}))}multiplyUnsafe(e){const r=d.ZERO;if(e===vI)return r;if(a(e),e===wI)return this;const{endo:i}=t;if(!i)return p.unsafeLadder(this,e);let{k1neg:s,k1:o,k2neg:c,k2:l}=i.splitScalar(e),u=r,h=r,f=this;for(;o>vI||l>vI;)o&wI&&(u=u.add(f)),l&wI&&(h=h.add(f)),f=f.double(),o>>=wI,l>>=wI;return s&&(u=u.negate()),c&&(h=h.negate()),h=new d(n.mul(h.px,i.beta),h.py,h.pz),u.add(h)}multiply(e){a(e);let r,i,s=e;const{endo:o}=t;if(o){const{k1neg:e,k1:t,k2neg:a,k2:c}=o.splitScalar(s);let{p:l,f:u}=this.wNAF(t),{p:h,f:f}=this.wNAF(c);l=p.constTimeNegate(e,l),h=p.constTimeNegate(a,h),h=new d(n.mul(h.px,o.beta),h.py,h.pz),r=l.add(h),i=u.add(f)}else{const{p:e,f:t}=this.wNAF(s);r=e,i=t}return d.normalizeZ([r,i])[0]}multiplyAndAddUnsafe(e,t,n){const r=d.BASE,i=(e,t)=>t!==vI&&t!==wI&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),s=i(this,t).add(i(e,n));return s.is0()?void 0:s}toAffine(e){const{px:t,py:r,pz:i}=this,s=this.is0();null==e&&(e=s?n.ONE:n.inv(i));const o=n.mul(t,e),a=n.mul(r,e),c=n.mul(i,e);if(s)return{x:n.ZERO,y:n.ZERO};if(!n.eql(c,n.ONE))throw new Error("invZ was invalid");return{x:o,y:a}}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===wI)return!0;if(n)return n(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===wI?this:n?n(d,this):this.multiplyUnsafe(t.h)}toRawBytes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.assertValidity(),r(d,this,e)}toHex(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return OS(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,n.ONE),d.ZERO=new d(n.ZERO,n.ONE,n.ZERO);const h=t.nBitLength,p=function(e,t){const n=(e,t)=>{const n=t.negate();return e?n:t},r=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,i=t;for(;n>hI;)n&pI&&(r=r.add(i)),i=i.double(),n>>=pI;return r},precomputeWindow(e,t){const{windows:n,windowSize:i}=r(t),s=[];let o=e,a=o;for(let r=0;r<n;r++){a=o,s.push(a);for(let e=1;e<i;e++)a=a.add(o),s.push(a);o=a.double()}return s},wNAF(t,i,s){const{windows:o,windowSize:a}=r(t);let c=e.ZERO,l=e.BASE;const u=BigInt(2**t-1),d=2**t,h=BigInt(t);for(let e=0;e<o;e++){const t=e*a;let r=Number(s&u);s>>=h,r>a&&(r-=d,s+=pI);const o=t,p=t+Math.abs(r)-1,f=e%2!==0,m=r<0;0===r?l=l.add(n(f,i[o])):c=c.add(n(m,i[p]))}return{p:c,f:l}}
9688,wNAFCached(e,t,n,r){const i=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,i),1!==i&&t.set(e,r(s))),this.wNAF(i,s,n)}}}(d,t.endo?Math.ceil(h/2):h);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function EI(e){const t=function(e){const t=fI(e);return GS(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:n,n:r}=t,i=n.BYTES+1,s=2*n.BYTES+1;function o(e){return tI(e,r)}function a(e){return iI(e,r)}const{ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:u,isWithinCurveOrder:d}=xI({...t,toBytes(e,t,r){const i=t.toAffine(),s=n.toBytes(i.x),o=$S;return r?o(Uint8Array.from([t.hasEvenY()?2:3]),s):o(Uint8Array.from([4]),s,n.toBytes(i.y))},fromBytes(e){const t=e.length,r=e[0],o=e.subarray(1);if(t!==i||2!==r&&3!==r){if(t===s&&4===r){return{x:n.fromBytes(o.subarray(0,n.BYTES)),y:n.fromBytes(o.subarray(n.BYTES,2*n.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${i} compressed bytes or ${s} uncompressed bytes`)}{const e=LS(o);if(!(vI<(a=e)&&a<n.ORDER))throw new Error("Point is not on curve");const t=u(e);let i=n.sqrt(t);return 1===(1&r)!==((i&wI)===wI)&&(i=n.neg(i)),{x:e,y:i}}var a}}),h=e=>OS(BS(e,t.nByteLength));function p(e){return e>r>>wI}const f=(e,t,n)=>LS(e.slice(t,n));class m{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const n=t.nByteLength;return e=FS("compactSignature",e,2*n),new m(f(e,0,n),f(e,n,2*n))}static fromDER(e){const{r:t,s:n}=yI.toSig(FS("DER",e));return new m(t,n)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new m(this.r,this.s,e)}recoverPublicKey(e){const{r:r,s:i,recovery:s}=this,l=w(FS("msgHash",e));if(null==s||![0,1,2,3].includes(s))throw new Error("recovery id invalid");const u=2===s||3===s?r+t.n:r;if(u>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=0===(1&s)?"02":"03",p=c.fromHex(d+h(u)),f=a(u),m=o(-l*f),g=o(i*f),y=c.BASE.multiplyAndAddUnsafe(p,m,g);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new m(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return jS(this.toDERHex())}toDERHex(){return yI.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return jS(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const g={isValidPrivateKey(e){try{return l(e),!0}catch(t){return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{const e=lI(t.n);return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.length,i=cI(t),s=lI(t);if(r<16||r<s||r>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${r}`);const o=tI(n?LS(e):DS(e),t-ZS)+ZS;return n?US(o,i):BS(o,i)}(t.randomBytes(e),t.n)},precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BASE;return t._setWindowSize(e),t.multiply(BigInt(3)),t}};function y(e){const t=e instanceof Uint8Array,n="string"===typeof e,r=(t||n)&&e.length;return t?r===i||r===s:n?r===2*i||r===2*s:e instanceof c}const v=t.bits2int||function(e){const n=LS(e),r=8*e.length-t.nBitLength;return r>0?n>>BigInt(r):n},w=t.bits2int_modN||function(e){return o(v(e))},b=zS(t.nBitLength);function x(e){if("bigint"!==typeof e)throw new Error("bigint expected");if(!(vI<=e&&e<b))throw new Error(`bigint expected < 2^${t.nBitLength}`);return BS(e,t.nByteLength)}function E(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_;if(["recovered","canonical"].some((e=>e in i)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:u}=t;let{lowS:h,prehash:f,extraEntropy:g}=i;null==h&&(h=!0),e=FS("msgHash",e),f&&(e=FS("prehashed msgHash",s(e)));const y=w(e),b=l(r),E=[x(b),x(y)];if(null!=g){const e=!0===g?u(n.BYTES):g;E.push(FS("extraEntropy",e))}const k=$S(...E),C=y;return{seed:k,k2sig:function(e){const t=v(e);if(!d(t))return;const n=a(t),r=c.BASE.multiply(t).toAffine(),i=o(r.x);if(i===vI)return;const s=o(n*o(C+i*b));if(s===vI)return;let l=(r.x===i?0:2)|Number(r.y&wI),u=s;return h&&p(s)&&(u=function(e){return p(e)?o(-e):e}(s),l^=1),new m(i,u,l)}}}const _={lowS:t.lowS,prehash:!1},k={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(y(e))throw new Error("first arg must be private key");if(!y(t))throw new Error("second arg must be public key");return c.fromHex(t).multiply(l(e)).toRawBytes(n)},sign:function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_;const{seed:i,k2sig:s}=E(e,n,r),o=t;return qS(o.hash.outputLen,o.nByteLength,o.hmac)(i,s)},verify:function(e,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k;const s=e;if(n=FS("msgHash",n),r=FS("publicKey",r),"strict"in i)throw new Error("options.strict was renamed to lowS");const{lowS:l,prehash:u}=i;let d,h;try{if("string"===typeof s||s instanceof Uint8Array)try{d=m.fromDER(s)}
9688catch(E){if(!(E instanceof yI.Err))throw E;d=m.fromCompact(s)}else{if("object"!==typeof s||"bigint"!==typeof s.r||"bigint"!==typeof s.s)throw new Error("PARSE");{const{r:e,s:t}=s;d=new m(e,t)}}h=c.fromHex(r)}catch(_){if("PARSE"===_.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(l&&d.hasHighS())return!1;u&&(n=t.hash(n));const{r:p,s:f}=d,g=w(n),y=a(f),v=o(g*y),b=o(p*y),x=c.BASE.multiplyAndAddUnsafe(h,v,b)?.toAffine();return!!x&&o(x.x)===p},ProjectivePoint:c,Signature:m,utils:g}}function _I(e){return{hash:e,hmac:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return dI(e,t,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=new Uint8Array(t.reduce(((e,t)=>e+t.length),0));let i=0;return t.forEach((e=>{if(!oE(e))throw new Error("Uint8Array expected");r.set(e,i),i+=e.length})),r}(...r))},randomBytes:hE}}const kI=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),CI=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),AI=BigInt(1),SI=BigInt(2),II=(e,t)=>(e+t/SI)/t;function TI(e){const t=kI,n=BigInt(3),r=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,d=rI(u,n,t)*u%t,h=rI(d,n,t)*u%t,p=rI(h,SI,t)*l%t,f=rI(p,i,t)*p%t,m=rI(f,s,t)*f%t,g=rI(m,a,t)*m%t,y=rI(g,c,t)*g%t,v=rI(y,a,t)*m%t,w=rI(v,n,t)*u%t,b=rI(w,o,t)*f%t,x=rI(b,r,t)*l%t,E=rI(x,SI,t);if(!PI.eql(PI.sqr(E),e))throw new Error("Cannot find square root");return E}const PI=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=KS)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:s}=aI(e,t);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=sI(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:s,MASK:zS(i),ZERO:KS,ONE:ZS,create:t=>tI(t,e),isValid:t=>{if("bigint"!==typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return KS<=t&&t<e},is0:e=>e===KS,isOdd:e=>(e&ZS)===ZS,neg:t=>tI(-t,e),eql:(e,t)=>e===t,sqr:t=>tI(t*t,e),add:(t,n)=>tI(t+n,e),sub:(t,n)=>tI(t-n,e),mul:(t,n)=>tI(t*n,e),pow:(e,t)=>function(e,t,n){if(n<KS)throw new Error("Expected power > 0");if(n===KS)return e.ONE;if(n===ZS)return t;let r=e.ONE,i=t;for(;n>KS;)n&ZS&&(r=e.mul(r,i)),i=e.sqr(i),n>>=ZS;return r}(a,e,t),div:(t,n)=>tI(t*iI(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>iI(t,e),sqrt:r.sqrt||(e=>o(a,e)),invertBatch:e=>function(e,t){const n=new Array(t.length),r=t.reduce(((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r))),e.ONE),i=e.inv(r);return t.reduceRight(((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r))),i),n}(a,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?US(e,s):BS(e,s),fromBytes:e=>{if(e.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`);return n?DS(e):LS(e)}});return Object.freeze(a)}(kI,void 0,void 0,{sqrt:TI}),NI=function(e,t){const n=t=>EI({...e,..._I(t)});return Object.freeze({...n(t),create:n})}({a:BigInt(0),b:BigInt(7),Fp:PI,n:CI,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=CI,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-AI*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,o=BigInt("0x100000000000000000000000000000000"),a=II(s*e,t),c=II(-r*e,t);let l=tI(e-a*n-c*i,t),u=tI(-a*r-c*s,t);const d=l>o,h=u>o;if(d&&(l=t-l),h&&(u=t-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:l,k2neg:h,k2:u}}}},hS);BigInt(0);NI.ProjectivePoint;class RI{#he;constructor(e){Lb(32===Kb(e),"invalid private key","privateKey","[REDACTED]"),this.#he=Vb(e)}get privateKey(){return this.#he}get publicKey(){return RI.computePublicKey(this.#he)}get compressedPublicKey(){return RI.computePublicKey(this.#he,!0)}sign(e){Lb(32===Kb(e),"invalid digest length","digest",e);const t=NI.sign(zb(e),zb(this.#he),{lowS:!0});return jk.from({r:fx(t.r,32),s:fx(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=RI.computePublicKey(e);return Vb(NI.getSharedSecret(zb(this.#he),$b(t),!1))}static computePublicKey(e,t){let n=$b(e,"key");if(32===n.length){return Vb(NI.getPublicKey(n,!!t))}if(64===n.length){const e=new Uint8Array(65);e[0]=4,e.set(n,1),n=e}return Vb(NI.ProjectivePoint.fromHex(n).toRawBytes(t))}static recoverPublicKey(e,t){Lb(32===Kb(e),"invalid digest length","digest",e);const n=jk.from(t);let r=NI.Signature.fromCompact(zb(Gb([n.r,n.s])));r=r.addRecoveryBit(n.yParity);const i=r.recoverPublicKey(zb(e));return Lb(null!=i,"invalid signature for digest","signature",t),"0x"+i.toHex(!1)}
9688static addPoints(e,t,n){const r=NI.ProjectivePoint.fromHex(RI.computePublicKey(e).substring(2)),i=NI.ProjectivePoint.fromHex(RI.computePublicKey(t).substring(2));return"0x"+r.add(i).toHex(!!n)}}function OI(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function MI(e,t,n){let r=0;for(let i=0;i<n;i++)r=256*r+e[t+i];return r}function jI(e,t,n,r){const i=[];for(;n<t+1+r;){const s=LI(e,n);i.push(s.result),jb((n+=s.consumed)<=t+1+r,"child data too short","BUFFER_OVERRUN",{buffer:e,length:r,offset:t})}return{consumed:1+r,result:i}}function LI(e,t){jb(0!==e.length,"data too short","BUFFER_OVERRUN",{buffer:e,length:0,offset:1});const n=t=>{jb(t<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){const r=e[t]-247;n(t+1+r);const i=MI(e,t+1,r);return n(t+1+r+i),jI(e,t,t+1+r,r+i)}if(e[t]>=192){const r=e[t]-192;return n(t+1+r),jI(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;n(t+1+r);const i=MI(e,t+1,r);n(t+1+r+i);return{consumed:1+r+i,result:Vb(e.slice(t+1+r,t+1+r+i))}}if(e[t]>=128){const r=e[t]-128;n(t+1+r);return{consumed:1+r,result:Vb(e.slice(t+1,t+1+r))}}return{consumed:1,result:OI(e[t])}}function DI(e){const t=$b(e,"data"),n=LI(t,0);return Lb(n.consumed===t.length,"unexpected junk after rlp payload","data",e),n.result}function BI(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function UI(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(UI(e))})),t.length<=55)return t.unshift(192+t.length),t;const n=BI(t.length);return n.unshift(247+n.length),n.concat(t)}const t=Array.prototype.slice.call($b(e,"object"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const n=BI(t.length);return n.unshift(183+n.length),n.concat(t)}const FI="0123456789abcdef";function $I(e){let t="0x";for(const n of UI(e))t+=FI[n>>4],t+=FI[15&n];return t}function zI(e,t){return function(e){let t;return t="string"===typeof e?RI.computePublicKey(e,!1):e.publicKey,UE(RE("0x"+t.substring(4)).substring(26))}(RI.recoverPublicKey(e,t))}const HI=BigInt(0),WI=BigInt(2),qI=BigInt(27),VI=BigInt(28),GI=BigInt(35),KI=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ZI=131072;function YI(e,t){let n=e.toString(16);for(;n.length<2;)n="0"+n;return n+=SS(t).substring(4),"0x"+n}function QI(e){return"0x"===e?null:UE(e)}function JI(e,t){try{return Ck(e)}catch(n){Lb(!1,n.message,t,e)}}function XI(e,t){try{if(!Array.isArray(e))throw new Error("authorizationList: invalid array");const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(!Array.isArray(r))throw new Error(`authorization[${n}]: invalid array`);if(6!==r.length)throw new Error(`authorization[${n}]: wrong length`);if(!r[1])throw new Error(`authorization[${n}]: null address`);t.push({address:QI(r[1]),nonce:tT(r[2],"nonce"),chainId:tT(r[0],"chainId"),signature:jk.from({yParity:eT(r[3],"yParity"),r:Qb(r[4],32),s:Qb(r[5],32)})})}return t}catch(n){Lb(!1,n.message,t,e)}}function eT(e,t){return"0x"===e?0:px(e,t)}function tT(e,t){if("0x"===e)return HI;const n=lx(e,t);return Lb(n<=KI,"value exceeds uint size",t,n),n}function nT(e,t){const n=lx(e,"value"),r=mx(n);return Lb(r.length<=32,"value too large",`tx.${t}`,n),r}function rT(e){return Ck(e).map((e=>[e.address,e.storageKeys]))}function iT(e,t){Lb(Array.isArray(e),`invalid ${t}`,"value",e);for(let n=0;n<e.length;n++)Lb(Hb(e[n],32),"invalid ${ param } hash",`value[${n}]`,e[n]);return e}function sT(e,t){let n;try{if(n=eT(t[0],"yParity"),0!==n&&1!==n)throw new Error("bad yParity")}catch(o){Lb(!1,"invalid yParity","yParity",t[0])}
9688const r=Qb(t[1],32),i=Qb(t[2],32),s=jk.from({r:r,s:i,yParity:n});e.signature=s}class oT{#pe;#fe;#u;#me;#ge;#ye;#ve;#we;#be;#xe;#Ee;#_e;#ke;#Ce;#Ae;#Se;#Ie;get type(){return this.#pe}set type(e){switch(e){case null:this.#pe=null;break;case 0:case"legacy":this.#pe=0;break;case 1:case"berlin":case"eip-2930":this.#pe=1;break;case 2:case"london":case"eip-1559":this.#pe=2;break;case 3:case"cancun":case"eip-4844":this.#pe=3;break;case 4:case"pectra":case"eip-7702":this.#pe=4;break;default:Lb(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844";case 4:return"eip-7702"}return null}get to(){const e=this.#fe;return null==e&&3===this.type?Qk:e}set to(e){this.#fe=null==e?null:UE(e)}get nonce(){return this.#me}set nonce(e){this.#me=px(e,"value")}get gasLimit(){return this.#ge}set gasLimit(e){this.#ge=lx(e)}get gasPrice(){const e=this.#ye;return null!=e||0!==this.type&&1!==this.type?e:HI}set gasPrice(e){this.#ye=null==e?null:lx(e,"gasPrice")}get maxPriorityFeePerGas(){const e=this.#ve;return null==e?2===this.type||3===this.type?HI:null:e}set maxPriorityFeePerGas(e){this.#ve=null==e?null:lx(e,"maxPriorityFeePerGas")}get maxFeePerGas(){const e=this.#we;return null==e?2===this.type||3===this.type?HI:null:e}set maxFeePerGas(e){this.#we=null==e?null:lx(e,"maxFeePerGas")}get data(){return this.#u}set data(e){this.#u=Vb(e)}get value(){return this.#be}set value(e){this.#be=lx(e,"value")}get chainId(){return this.#xe}set chainId(e){this.#xe=lx(e)}get signature(){return this.#Ee||null}set signature(e){this.#Ee=null==e?null:jk.from(e)}get accessList(){const e=this.#_e||null;return null==e?1===this.type||2===this.type||3===this.type?[]:null:e}set accessList(e){this.#_e=null==e?null:Ck(e)}get authorizationList(){const e=this.#Ie||null;return null==e&&4===this.type?[]:e}set authorizationList(e){this.#Ie=null==e?null:e.map((e=>Lk(e)))}get maxFeePerBlobGas(){const e=this.#ke;return null==e&&3===this.type?HI:e}set maxFeePerBlobGas(e){this.#ke=null==e?null:lx(e,"maxFeePerBlobGas")}get blobVersionedHashes(){let e=this.#Ce;return null==e&&3===this.type?[]:e}set blobVersionedHashes(e){if(null!=e){Lb(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let t=0;t<e.length;t++)Lb(Hb(e[t],32),"invalid blobVersionedHash",`value[${t}]`,e[t])}this.#Ce=e}get blobs(){return null==this.#Se?null:this.#Se.map((e=>Object.assign({},e)))}set blobs(e){if(null==e)return void(this.#Se=null);const t=[],n=[];for(let r=0;r<e.length;r++){const i=e[r];if(Wb(i)){jb(this.#Ae,"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let e=$b(i);if(Lb(e.length<=ZI,"blob is too large",`blobs[${r}
9688]`,i),e.length!==ZI){const t=new Uint8Array(ZI);t.set(e),e=t}const s=this.#Ae.blobToKzgCommitment(e),o=Vb(this.#Ae.computeBlobKzgProof(e,s));t.push({data:Vb(e),commitment:Vb(s),proof:o}),n.push(YI(1,s))}else{const e=Vb(i.commitment);t.push({data:Vb(i.data),commitment:e,proof:Vb(i.proof)}),n.push(YI(1,e))}}this.#Se=t,this.#Ce=n}get kzg(){return this.#Ae}set kzg(e){this.#Ae=null==e?null:function(e){return{blobToKzgCommitment:t=>{if("computeBlobProof"in e){if("blobToKzgCommitment"in e&&"function"===typeof e.blobToKzgCommitment)return $b(e.blobToKzgCommitment(Vb(t)))}else if("blobToKzgCommitment"in e&&"function"===typeof e.blobToKzgCommitment)return $b(e.blobToKzgCommitment(t));if("blobToKZGCommitment"in e&&"function"===typeof e.blobToKZGCommitment)return $b(e.blobToKZGCommitment(Vb(t)));Lb(!1,"unsupported KZG library","kzg",e)},computeBlobKzgProof:(t,n)=>"computeBlobProof"in e&&"function"===typeof e.computeBlobProof?$b(e.computeBlobProof(Vb(t),Vb(n))):"computeBlobKzgProof"in e&&"function"===typeof e.computeBlobKzgProof?e.computeBlobKzgProof(t,n):"computeBlobKZGProof"in e&&"function"===typeof e.computeBlobKZGProof?$b(e.computeBlobKZGProof(Vb(t),Vb(n))):void Lb(!1,"unsupported KZG library","kzg",e)}}(e)}constructor(){this.#pe=null,this.#fe=null,this.#me=0,this.#ge=HI,this.#ye=null,this.#ve=null,this.#we=null,this.#u="0x",this.#be=HI,this.#xe=HI,this.#Ee=null,this.#_e=null,this.#ke=null,this.#Ce=null,this.#Ae=null,this.#Se=null,this.#Ie=null}get hash(){return null==this.signature?null:RE(this.#Te(!0,!1))}get unsignedHash(){return RE(this.unsignedSerialized)}get from(){return null==this.signature?null:zI(this.unsignedHash,this.signature)}get fromPublicKey(){return null==this.signature?null:RI.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return null!=this.signature}#Te(e,t){jb(!e||null!=this.signature,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const n=e?this.signature:null;switch(this.inferType()){case 0:return function(e,t){const n=[nT(e.nonce,"nonce"),nT(e.gasPrice||0,"gasPrice"),nT(e.gasLimit,"gasLimit"),e.to||"0x",nT(e.value,"value"),e.data];let r=HI;if(e.chainId!=HI)r=lx(e.chainId,"tx.chainId"),Lb(!t||null==t.networkV||t.legacyChainId===r,"tx.chainId/sig.v mismatch","sig",t);else if(e.signature){const t=e.signature.legacyChainId;null!=t&&(r=t)}if(!t)return r!==HI&&(n.push(mx(r)),n.push("0x"),n.push("0x")),$I(n);let i=BigInt(27+t.yParity);return r!==HI?i=jk.getChainIdV(r,t.v):BigInt(t.v)!==i&&Lb(!1,"tx.chainId/sig.v mismatch","sig",t),n.push(mx(i)),n.push(mx(t.r)),n.push(mx(t.s)),$I(n)}(this,n);case 1:return function(e,t){const n=[nT(e.chainId,"chainId"),nT(e.nonce,"nonce"),nT(e.gasPrice||0,"gasPrice"),nT(e.gasLimit,"gasLimit"),e.to||"0x",nT(e.value,"value"),e.data,rT(e.accessList||[])];return t&&(n.push(nT(t.yParity,"recoveryParam")),n.push(mx(t.r)),n.push(mx(t.s))),Gb(["0x01",$I(n)])}(this,n);case 2:return function(e,t){const n=[nT(e.chainId,"chainId"),nT(e.nonce,"nonce"),nT(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),nT(e.maxFeePerGas||0,"maxFeePerGas"),nT(e.gasLimit,"gasLimit"),e.to||"0x",nT(e.value,"value"),e.data,rT(e.accessList||[])];return t&&(n.push(nT(t.yParity,"yParity")),n.push(mx(t.r)),n.push(mx(t.s))),Gb(["0x02",$I(n)])}(this,n);case 3:return function(e,t,n){const r=[nT(e.chainId,"chainId"),nT(e.nonce,"nonce"),nT(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),nT(e.maxFeePerGas||0,"maxFeePerGas"),nT(e.gasLimit,"gasLimit"),e.to||Qk,nT(e.value,"value"),e.data,rT(e.accessList||[]),nT(e.maxFeePerBlobGas||0,"maxFeePerBlobGas"),iT(e.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(r.push(nT(t.yParity,"yParity")),r.push(mx(t.r)),r.push(mx(t.s)),n)?Gb(["0x03",$I([r,n.map((e=>e.data)),n.map((e=>e.commitment)),n.map((e=>e.proof))])]):Gb(["0x03",$I(r)])}(this,n,t?this.blobs:null);case 4:return function(e,t){const n=[nT(e.chainId,"chainId"),nT(e.nonce,"nonce"),nT(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),nT(e.maxFeePerGas||0,"maxFeePerGas"),nT(e.gasLimit,"gasLimit"),e.to||"0x",nT(e.value,"value"),e.data,rT(e.accessList||[]),(r=e.authorizationList||[],r.map((e=>[nT(e.chainId,"chainId"),e.address,nT(e.nonce,"nonce"),nT(e.signature.yParity,"yParity"),e.signature.r,e.signature.s])))];var r;return t&&(n.push(nT(t.yParity,"yParity")),n.push(mx(t.r)),n.push(mx(t.s))),Gb(["0x04",$I(n)])}(this,n)}jb(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#Te(!0,!0)}get unsignedSerialized(){return this.#Te(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,n=null!=this.accessList,r=null!=this.#ke||this.#Ce;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&jb(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),jb(!t||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),jb(0!==this.type||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return null!=this.type?i.push(this.type):this.authorizationList&&this.authorizationList.length?
vendor: 4,175 bytes, line 9688
9688i.push(4):t?i.push(2):e?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(r&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return oT.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new oT;if("string"===typeof e){const t=$b(e);if(t[0]>=127)return oT.from(function(e){const t=DI(e);Lb(Array.isArray(t)&&(9===t.length||6===t.length),"invalid field count for legacy transaction","data",e);const n={type:0,nonce:eT(t[0],"nonce"),gasPrice:tT(t[1],"gasPrice"),gasLimit:tT(t[2],"gasLimit"),to:QI(t[3]),value:tT(t[4],"value"),data:Vb(t[5]),chainId:HI};if(6===t.length)return n;const r=tT(t[6],"v"),i=tT(t[7],"r"),s=tT(t[8],"s");if(i===HI&&s===HI)n.chainId=r;else{let e=(r-GI)/WI;e<HI&&(e=HI),n.chainId=e,Lb(e!==HI||r===qI||r===VI,"non-canonical legacy v","v",t[6]),n.signature=jk.from({r:Qb(t[7],32),s:Qb(t[8],32),v:r})}return n}(t));switch(t[0]){case 1:return oT.from(function(e){const t=DI($b(e).slice(1));Lb(Array.isArray(t)&&(8===t.length||11===t.length),"invalid field count for transaction type: 1","data",Vb(e));const n={type:1,chainId:tT(t[0],"chainId"),nonce:eT(t[1],"nonce"),gasPrice:tT(t[2],"gasPrice"),gasLimit:tT(t[3],"gasLimit"),to:QI(t[4]),value:tT(t[5],"value"),data:Vb(t[6]),accessList:JI(t[7],"accessList")};return 8===t.length||sT(n,t.slice(8)),n}(t));case 2:return oT.from(function(e){const t=DI($b(e).slice(1));Lb(Array.isArray(t)&&(9===t.length||12===t.length),"invalid field count for transaction type: 2","data",Vb(e));const n={type:2,chainId:tT(t[0],"chainId"),nonce:eT(t[1],"nonce"),maxPriorityFeePerGas:tT(t[2],"maxPriorityFeePerGas"),maxFeePerGas:tT(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:tT(t[4],"gasLimit"),to:QI(t[5]),value:tT(t[6],"value"),data:Vb(t[7]),accessList:JI(t[8],"accessList")};return 9===t.length||sT(n,t.slice(9)),n}(t));case 3:return oT.from(function(e){let t=DI($b(e).slice(1)),n="3",r=null;if(4===t.length&&Array.isArray(t[0])){n="3 (network format)";const e=t[1],i=t[2],s=t[3];Lb(Array.isArray(e),"invalid network format: blobs not an array","fields[1]",e),Lb(Array.isArray(i),"invalid network format: commitments not an array","fields[2]",i),Lb(Array.isArray(s),"invalid network format: proofs not an array","fields[3]",s),Lb(e.length===i.length,"invalid network format: blobs/commitments length mismatch","fields",t),Lb(e.length===s.length,"invalid network format: blobs/proofs length mismatch","fields",t),r=[];for(let n=0;n<t[1].length;n++)r.push({data:e[n],commitment:i[n],proof:s[n]});t=t[0]}Lb(Array.isArray(t)&&(11===t.length||14===t.length),`invalid field count for transaction type: ${n}`,"data",Vb(e));const i={type:3,chainId:tT(t[0],"chainId"),nonce:eT(t[1],"nonce"),maxPriorityFeePerGas:tT(t[2],"maxPriorityFeePerGas"),maxFeePerGas:tT(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:tT(t[4],"gasLimit"),to:QI(t[5]),value:tT(t[6],"value"),data:Vb(t[7]),accessList:JI(t[8],"accessList"),maxFeePerBlobGas:tT(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};r&&(i.blobs=r),Lb(null!=i.to,`invalid address for transaction type: ${n}`,"data",e),Lb(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",e);for(let s=0;s<i.blobVersionedHashes.length;s++)Lb(Hb(i.blobVersionedHashes[s],32),`invalid blobVersionedHash at index ${s}: must be length 32`,"data",e);return 11===t.length||sT(i,t.slice(11)),i}(t));case 4:return oT.from(function(e){const t=DI($b(e).slice(1));Lb(Array.isArray(t)&&(10===t.length||13===t.length),"invalid field count for transaction type: 4","data",Vb(e));const n={type:4,chainId:tT(t[0],"chainId"),nonce:eT(t[1],"nonce"),maxPriorityFeePerGas:tT(t[2],"maxPriorityFeePerGas"),maxFeePerGas:tT(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:tT(t[4],"gasLim
9688it"),to:QI(t[5]),value:tT(t[6],"value"),data:Vb(t[7]),accessList:JI(t[8],"accessList"),authorizationList:XI(t[9],"authorizationList")};return 10===t.length||sT(n,t.slice(10)),n}(t))}jb(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const t=new oT;return null!=e.type&&(t.type=e.type),null!=e.to&&(t.to=e.to),null!=e.nonce&&(t.nonce=e.nonce),null!=e.gasLimit&&(t.gasLimit=e.gasLimit),null!=e.gasPrice&&(t.gasPrice=e.gasPrice),null!=e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),null!=e.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null!=e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),null!=e.data&&(t.data=e.data),null!=e.value&&(t.value=e.value),null!=e.chainId&&(t.chainId=e.chainId),null!=e.signature&&(t.signature=jk.from(e.signature)),null!=e.accessList&&(t.accessList=e.accessList),null!=e.authorizationList&&(t.authorizationList=e.authorizationList),null!=e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),null!=e.kzg&&(t.kzg=e.kzg),null!=e.blobs&&(t.blobs=e.blobs),null!=e.hash&&(Lb(t.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),Lb(t.hash===e.hash,"hash mismatch","tx",e)),null!=e.from&&(Lb(t.isSigned(),"unsigned transaction cannot define '.from'","tx",e),Lb(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}}const aT="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";BigInt(0);const cT=BigInt(58);function lT(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):Lb(!1,"unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}class uT{name;constructor(e){Pb(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw new Error("unsupported coin")}async decodeAddress(e,t){throw new Error("unsupported coin")}}const dT=new RegExp("^(ipfs)://(.*)$","i"),hT=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),dT,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];class pT{provider;address;name;#Pe;#Ne;constructor(e,t,n){Pb(this,{provider:e,address:t,name:n}),this.#Pe=null,this.#Ne=new qC(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e)}async supportsWildcard(){return null==this.#Pe&&(this.#Pe=(async()=>{try{return await this.#Ne.supportsInterface("0x9061b923")}catch(e){if(Rb(e,"CALL_EXCEPTION"))return!1;throw this.#Pe=null,e}})()),await this.#Pe}async#Re(e,t){t=(t||[]).slice();const n=this.#Ne.interface;t.unshift(rS(this.name));let r=null;await this.supportsWildcard()&&(r=n.getFunction(e),jb(r,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),t=[iS(this.name,255),n.encodeFunctionData(r,t)],e="resolve(bytes,bytes)"),t.push({enableCcipRead:!0});try{const i=await this.#Ne[e](...t);return r?n.decodeFunctionResult(r,i)[0]:i}catch(i){if(!Rb(i,"CALL_EXCEPTION"))throw i}return null}async getAddress(e){if(null==e&&(e=60),60===e)try{const e=await this.#Re("addr(bytes32)");return null==e||e===Qk?null:e}catch(i){if(Rb(i,"CALL_EXCEPTION"))return null;throw i}if(e>=0&&e<2147483648){let t=e+2147483648;const n=await this.#Re("addr(bytes32,uint)",[t]);if(Hb(n,20))return UE(n)}let t=null;for(const s of this.provider.plugins)if(s instanceof uT&&s.supportsCoinType(e)){t=s;break}if(null==t)return null;const n=await this.#Re("addr(bytes32,uint)",[e]);if(null==n||"0x"===n)return null;const r=await t.decodeAddress(e,n);if(null!=r)return r;jb(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const t=await this.#Re("text(bytes32,string)",[e]);return null==t||"0x"===t?null:t}async getContentHash(){const e=await this.#Re("contenthash(bytes32)");if(null==e||"0x"===e)return null;const t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e="e3010170"===t[1]?"ipfs":"ipns",n=parseInt(t[4],16);if(t[5].length===2*n)return`${e}://${function(e){const t=$b(e);let n=hx(t),r="";for(;n;)r=aT[Number(n%cT)]+r,n/=cT;for(let i=0;i<t.length&&!t[i];i++)r=aT[0]+r;return r}("0x"+t[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return`bzz://${n[1]}`;jb(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const n=await this.getText("avatar");if(null==n)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:n});for(let r=0;r<hT.length;r++){const i=n.match(hT[r]);if(null==i)continue;const s=i[1].toLowerCase();switch(s){case"https":case"data":return e.push({type:"url",value:n}),{linkage:e,url:n};case"ipfs":{const t=lT(n);return e.push({type:"ipfs",value:n}),e.push({type:"url",value:t}),{linkage:e,url:t}}case"erc721":case"erc1155":{const r="erc721"===s?"tokenURI(uint256)":"uri(uint256)";e.push({type:s,value:n});const o=await this.getAddress();if(null==o)return e.push({type:"!owner",value:""}),{url:null,linkage:e};const a=(i[2]||"").split("/");if(2!==a.length)return e.push({type:`!${s}caip`,value:i[2]||""}),{url:null,linkage:e};const c=a[1],l=new qC(a[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if("erc721"===s){const t=await l.ownerOf(c);if(o!==t)return e.push({type:"!owner",value:t}),{url:null,linkage:e};e.push({type:"owner",value:t})}else if("erc1155"===s){const t=await l.balanceOf(o,c);
9688if(!t)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:t.toString()})}let u=await l[r](c);if(null==u||"0x"===u)return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:u}),"erc1155"===s&&(u=u.replace("{id}",fx(c,32).substring(2)),e.push({type:"metadata-url-expanded",value:u})),u.match(/^ipfs:/i)&&(u=lT(u)),e.push({type:"metadata-url",value:u});let d={};const h=await new Kk(u).send();h.assertOk();try{d=h.bodyJson}catch(t){try{e.push({type:"!metadata",value:h.bodyText})}catch(t){const n=h.body;return n&&e.push({type:"!metadata",value:Vb(n)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!d)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(d)});let p=d.image;if("string"!==typeof p)return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(p.match(/^(https:\/\/|data:)/i));else{if(null==p.match(dT))return e.push({type:"!imageUrl-ipfs",value:p}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:p}),p=lT(p)}return e.push({type:"url",value:p}),{linkage:e,url:p}}}}}catch(t){}return{linkage:e,url:null}}static async getEnsAddress(e){const t=await e.getNetwork(),n=t.getPlugin("org.ethers.plugins.network.Ens");return jb(n,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:t}}),n.address}static async#Oe(e,t){const n=await pT.getEnsAddress(e);try{const r=new qC(n,["function resolver(bytes32) view returns (address)"],e),i=await r.resolver(rS(t),{enableCcipRead:!0});return i===Qk?null:i}catch(r){throw r}return null}static async fromName(e,t){let n=t;for(;;){if(""===n||"."===n)return null;if("eth"!==t&&"eth"===n)return null;const r=await pT.#Oe(e,n);if(null!=r){const i=new pT(e,r,t);return n===t||await i.supportsWildcard()?i:null}n=n.split(".").slice(1).join(".")}}}const fT=BigInt(0);function mT(e,t){return function(n){return null==n?t:e(n)}}function gT(e,t){return n=>{if(t&&null==n)return null;if(!Array.isArray(n))throw new Error("not an array");return n.map((t=>e(t)))}}function yT(e,t){return n=>{const r={};for(const s in e){let o=s;if(t&&s in t&&!(o in n))for(const e of t[s])if(e in n){o=e;break}try{const t=e[s](n[o]);void 0!==t&&(r[s]=t)}catch(i){jb(!1,`invalid value for value.${s} (${i instanceof Error?i.message:"not-an-error"})`,"BAD_DATA",{value:n})}}return r}}function vT(e){return Lb(Hb(e,!0),"invalid data","value",e),e}function wT(e){return Lb(Hb(e,32),"invalid hash","value",e),e}const bT=yT({address:UE,blockHash:wT,blockNumber:px,data:vT,index:px,removed:mT((function(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}Lb(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)}),!1),topics:gT(wT),transactionHash:wT,transactionIndex:px},{index:["logIndex"]});const xT=yT({hash:mT(wT),parentHash:wT,parentBeaconBlockRoot:mT(wT,null),number:px,timestamp:px,nonce:mT(vT),difficulty:lx,gasLimit:lx,gasUsed:lx,stateRoot:mT(wT,null),receiptsRoot:mT(wT,null),blobGasUsed:mT(lx,null),excessBlobGas:mT(lx,null),miner:mT(UE),prevRandao:mT(wT,null),extraData:vT,baseFeePerGas:mT(lx)},{prevRandao:["mixHash"]});const ET=yT({transactionIndex:px,blockNumber:px,transactionHash:wT,address:UE,topics:gT(wT),data:vT,index:px,blockHash:wT},{index:["logIndex"]});const _T=yT({to:mT(UE,null),from:mT(UE,null),contractAddress:mT(UE,null),index:px,root:mT(Vb),gasUsed:lx,blobGasUsed:mT(lx,null),logsBloom:mT(vT),blockHash:wT,hash:wT,logs:gT((function(e){return ET(e)})),blockNumber:px,cumulativeGasUsed:lx,effectiveGasPrice:mT(lx),blobGasPrice:mT(lx,null),status:mT(px),type:mT(px,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function kT(e){e.to&&lx(e.to)===fT&&(e.to="0x0000000000000000000000000000000000000000");const t=yT({hash:wT,index:mT(px,void 0),type:e=>"0x"===e||null==e?0:px(e),accessList:mT(Ck,null),blobVersionedHashes:mT(gT(wT,!0),null),authorizationList:mT(gT((e=>({address:UE(e.address),chainId:lx(e.chainId),nonce:lx(e.nonce),signature:jk.from(e.signature?e.signature:e)})),!1),null),blockHash:mT(wT,null),blockNumber:mT(px,null),transactionIndex:mT(px,null),from:UE,gasPrice:mT(lx),maxPriorityFeePerGas:mT(lx),maxFeePerGas:mT(lx),maxFeePerBlobGas:mT(lx,null),gasLimit:lx,to:mT(UE,null),value:lx,nonce:px,data:vT,creates:mT(UE,null),
9688chainId:mT(lx,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(e);if(null==t.to&&null==t.creates&&(t.creates=function(e){const t=UE(e.from);let n=lx(e.nonce,"tx.nonce").toString(16);return n="0"===n?"0x":n.length%2?"0x0"+n:"0x"+n,UE(Zb(RE($I([t,n])),12))}(t)),1!==e.type&&2!==e.type||null!=e.accessList||(t.accessList=[]),e.signature?t.signature=jk.from(e.signature):t.signature=jk.from(e),null==t.chainId){const e=t.signature.legacyChainId;null!=e&&(t.chainId=e)}return t.blockHash&&lx(t.blockHash)===fT&&(t.blockHash=null),t}class CT{name;constructor(e){Pb(this,{name:e})}clone(){return new CT(this.name)}}class AT extends CT{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,t){null==e&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);const n={effectiveBlock:e};function r(e,r){let i=(t||{})[e];null==i&&(i=r),Lb("number"===typeof i,`invalud value for ${e}`,"costs",t),n[e]=i}r("txBase",21e3),r("txCreate",32e3),r("txDataZero",4),r("txDataNonzero",16),r("txAccessListStorageKey",1900),r("txAccessListAddress",2400),Pb(this,n)}clone(){return new AT(this.effectiveBlock,this)}}class ST extends CT{address;targetNetwork;constructor(e,t){super("org.ethers.plugins.network.Ens"),Pb(this,{address:e||"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",targetNetwork:null==t?1:t})}clone(){return new ST(this.address,this.targetNetwork)}}class IT extends CT{#U;#Me;get url(){return this.#U}get processFunc(){return this.#Me}constructor(e,t){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#U=e,this.#Me=t}clone(){return this}}const TT=new Map;class PT{#je;#xe;#Le;constructor(e,t){this.#je=e,this.#xe=lx(t),this.#Le=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#je}set name(e){this.#je=e}get chainId(){return this.#xe}set chainId(e){this.#xe=lx(e,"chainId")}matches(e){if(null==e)return!1;if("string"===typeof e){try{return this.chainId===lx(e)}catch(t){}return this.name===e}if("number"===typeof e||"bigint"===typeof e){try{return this.chainId===lx(e)}catch(t){}return!1}if("object"===typeof e){if(null!=e.chainId){try{return this.chainId===lx(e.chainId)}catch(t){}return!1}return null!=e.name&&this.name===e.name}return!1}get plugins(){return Array.from(this.#Le.values())}attachPlugin(e){if(this.#Le.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#Le.set(e.name,e.clone()),this}getPlugin(e){return this.#Le.get(e)||null}getPlugins(e){return this.plugins.filter((t=>t.name.split("#")[0]===e))}clone(){const e=new PT(this.name,this.chainId);return this.plugins.forEach((t=>{e.attachPlugin(t.clone())})),e}computeIntrinsicGas(e){const t=this.getPlugin("org.ethers.plugins.network.GasCost")||new AT;let n=t.txBase;if(null==e.to&&(n+=t.txCreate),e.data)for(let r=2;r<e.data.length;r+=2)"00"===e.data.substring(r,r+2)?n+=t.txDataZero:n+=t.txDataNonzero;if(e.accessList){const r=Ck(e.accessList);for(const e in r)n+=t.txAccessListAddress+t.txAccessListStorageKey*r[e].storageKeys.length}return n}static from(e){if(function(){if(OT)return;function e(e,t,n){const r=function(){const r=new PT(e,t);return null!=n.ensNetwork&&r.attachPlugin(new ST(null,n.ensNetwork)),r.attachPlugin(new AT),(n.plugins||[]).forEach((e=>{r.attachPlugin(e)})),r};PT.register(e,r),PT.register(t,r),n.altNames&&n.altNames.forEach((e=>{PT.register(e,r)}))}OT=!0,e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",11155111,{ensNetwork:11155111}),e("holesky",17e3,{ensNetwork:17e3}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("arbitrum-sepolia",421614,{}),e("base",8453,{ensNetwork:1}),e("base-goerli",84531,{}),e("base-sepolia",84532,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("linea-sepolia",59141,{}),e("matic",137,{ensNetwork:1,plugins:[RT("https://gasstation.polygon.technology/v2")]}),e("matic-amoy",80002,{}
9688),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[RT("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[]}),e("optimism-goerli",420,{}),e("optimism-sepolia",11155420,{}),e("xdai",100,{ensNetwork:1})}(),null==e)return PT.from("mainnet");if("number"===typeof e&&(e=BigInt(e)),"string"===typeof e||"bigint"===typeof e){const t=TT.get(e);if(t)return t();if("bigint"===typeof e)return new PT("unknown",e);Lb(!1,"unknown network","network",e)}if("function"===typeof e.clone){return e.clone()}if("object"===typeof e){Lb("string"===typeof e.name&&"number"===typeof e.chainId,"invalid network object name or chainId","network",e);const t=new PT(e.name,e.chainId);return(e.ensAddress||null!=e.ensNetwork)&&t.attachPlugin(new ST(e.ensAddress,e.ensNetwork)),t}Lb(!1,"invalid network","network",e)}static register(e,t){"number"===typeof e&&(e=BigInt(e));const n=TT.get(e);n&&Lb(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",e),TT.set(e,t)}}function NT(e,t){const n=String(e);if(!n.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${e}`);const r=n.split(".");if(1===r.length&&r.push(""),2!==r.length)throw new Error(`invalid gwei value: ${e}`);for(;r[1].length<t;)r[1]+="0";if(r[1].length>9){let e=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||e++,r[1]=e.toString()}return BigInt(r[0]+r[1])}function RT(e){return new IT(e,(async(e,t,n)=>{let r;n.setHeader("User-Agent","ethers");try{const[t,i]=await Promise.all([n.send(),e()]);r=t;const s=r.bodyJson.standard;return{gasPrice:i.gasPrice,maxFeePerGas:NT(s.maxFee,9),maxPriorityFeePerGas:NT(s.maxPriorityFee,9)}}catch(i){jb(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:r,error:i})}}))}let OT=!1;function MT(e){return JSON.parse(JSON.stringify(e))}class jT{#De;#Be;#Ue;#Fe;constructor(e){this.#De=e,this.#Be=null,this.#Ue=4e3,this.#Fe=-2}get pollingInterval(){return this.#Ue}set pollingInterval(e){this.#Ue=e}async#$e(){try{const e=await this.#De.getBlockNumber();if(-2===this.#Fe)return void(this.#Fe=e);if(e!==this.#Fe){for(let t=this.#Fe+1;t<=e;t++){if(null==this.#Be)return;await this.#De.emit("block",t)}this.#Fe=e}}catch(e){}null!=this.#Be&&(this.#Be=this.#De._setTimeout(this.#$e.bind(this),this.#Ue))}start(){this.#Be||(this.#Be=this.#De._setTimeout(this.#$e.bind(this),this.#Ue),this.#$e())}stop(){this.#Be&&(this.#De._clearTimeout(this.#Be),this.#Be=null)}pause(e){this.stop(),e&&(this.#Fe=-2)}resume(){this.start()}}class LT{#De;#$e;#ze;constructor(e){this.#De=e,this.#ze=!1,this.#$e=e=>{this._poll(e,this.#De)}}async _poll(e,t){throw new Error("sub-classes must override this")}start(){this.#ze||(this.#ze=!0,this.#$e(-2),this.#De.on("block",this.#$e))}stop(){this.#ze&&(this.#ze=!1,this.#De.off("block",this.#$e))}pause(e){this.stop()}resume(){this.start()}}class DT extends LT{#He;#We;constructor(e,t){super(e),this.#He=t,this.#We=-2}pause(e){e&&(this.#We=-2),super.pause(e)}async _poll(e,t){const n=await t.getBlock(this.#He);null!=n&&(-2===this.#We?this.#We=n.number:n.number>this.#We&&(t.emit(this.#He,n.number),this.#We=n.number))}}class BT extends LT{#de;constructor(e,t){super(e),this.#de=MT(t)}async _poll(e,t){throw new Error("@TODO")}}class UT extends LT{#qe;constructor(e,t){super(e),this.#qe=t}async _poll(e,t){const n=await t.getTransactionReceipt(this.#qe);n&&t.emit(this.#qe,n)}}class FT{#De;#de;#Be;#ze;#Fe;constructor(e,t){this.#De=e,this.#de=MT(t),this.#Be=this.#$e.bind(this),this.#ze=!1,this.#Fe=-2}async#$e(e){if(-2===this.#Fe)return;const t=MT(this.#de);t.fromBlock=this.#Fe+1,t.toBlock=e;const n=await this.#De.getLogs(t);if(0!==n.length)for(const r of n)this.#De.emit(this.#de,r),this.#Fe=r.blockNumber;else this.#Fe<e-60&&(this.#Fe=e-60)}start(){this.#ze||(this.#ze=!0,-2===this.#Fe&&this.#De.getBlockNumber().then((e=>{this.#Fe=e})),this.#De.on("block",this.#Be))}stop(){this.#ze&&(this.#ze=!1,this.#De.off("block",this.#Be))}pause(e){this.stop(),e&&(this.#Fe=-2)}resume(){this.start()}}const $T=BigInt(2);function zT(e){return e&&"function"===typeof e.then}function HT(e,t){return e+":"+JSON.stringify(t,((e,t)=>
9688{if(null==t)return"null";if("bigint"===typeof t)return`bigint:${t.toString()}`;if("string"===typeof t)return t.toLowerCase();if("object"===typeof t&&!Array.isArray(t)){const e=Object.keys(t);return e.sort(),e.reduce(((e,n)=>(e[n]=t[n],e)),{})}return t}))}class WT{name;constructor(e){Pb(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function qT(e){return(e=Array.from(new Set(e).values())).sort(),e}async function VT(e,t){if(null==e)throw new Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),"string"===typeof e)switch(e){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:e,tag:e}}if(Hb(e,32)){const t=e.toLowerCase();return{type:"transaction",tag:HT("tx",{hash:t}),hash:t}}if(e.orphan){const t=e;return{type:"orphan",tag:HT("orphan",t),filter:(n=t,JSON.parse(JSON.stringify(n)))}}var n;if(e.address||e.topics){const n=e,r={topics:(n.topics||[]).map((e=>null==e?null:Array.isArray(e)?qT(e.map((e=>e.toLowerCase()))):e.toLowerCase()))};if(n.address){const e=[],i=[],s=n=>{Hb(n)?e.push(n):i.push((async()=>{e.push(await ck(n,t))})())};Array.isArray(n.address)?n.address.forEach(s):s(n.address),i.length&&await Promise.all(i),r.address=qT(e.map((e=>e.toLowerCase())))}return{filter:r,tag:HT("event",r),type:"event"}}Lb(!1,"unknown ProviderEvent","event",e)}function GT(){return(new Date).getTime()}const KT={cacheTimeout:250,pollingInterval:4e3};class ZT{#Ve;#Le;#Ge;#Ke;#Ze;#Ye;#Qe;#Je;#Xe;#et;#tt;#w;constructor(e,t){if(this.#w=Object.assign({},KT,t||{}),"any"===e)this.#Ye=!0,this.#Ze=null;else if(e){const t=PT.from(e);this.#Ye=!1,this.#Ze=Promise.resolve(t),setTimeout((()=>{this.emit("network",t,null)}),0)}else this.#Ye=!1,this.#Ze=null;this.#Je=-1,this.#Qe=new Map,this.#Ve=new Map,this.#Le=new Map,this.#Ge=null,this.#Ke=!1,this.#Xe=1,this.#et=new Map,this.#tt=!1}get pollingInterval(){return this.#w.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#Le.values())}attachPlugin(e){if(this.#Le.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#Le.set(e.name,e.connect(this)),this}getPlugin(e){return this.#Le.get(e)||null}get disableCcipRead(){return this.#tt}set disableCcipRead(e){this.#tt=!!e}async#nt(e){const t=this.#w.cacheTimeout;if(t<0)return await this._perform(e);const n=HT(e.method,e);let r=this.#Qe.get(n);return r||(r=this._perform(e),this.#Qe.set(n,r),setTimeout((()=>{this.#Qe.get(n)===r&&this.#Qe.delete(n)}),t)),await r}async ccipReadFetch(e,t,n){if(this.disableCcipRead||0===n.length||null==e.to)return null;const r=e.to.toLowerCase(),i=t.toLowerCase(),s=[];for(let a=0;a<n.length;a++){const t=n[a],c=t.replace("{sender}",r).replace("{data}",i),l=new Kk(c);-1===t.indexOf("{data}")&&(l.body={data:i,sender:r}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:l,index:a,urls:n});let u,d="unknown error";try{u=await l.send()}catch(o){s.push(o.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:l,result:{error:o}});continue}try{const e=u.bodyJson;if(e.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:l,result:e}),e.data;e.message&&(d=e.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:l,result:e})}catch(o){}jb(u.statusCode<400||u.statusCode>=500,`response not found during CCIP fetch: ${d}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:t,errorMessage:d}}),s.push(d)}jb(!1,`error encountered during CCIP fetch: ${s.map((e=>JSON.stringify(e))).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:s}})}_wrapBlock(e,t){return new uC(function(e){const t=xT(e);return t.transactions=e.transactions.map((e=>"string"===typeof e?e:kT(e))),t}(e),this)}_wrapLog(e,t){return new dC(function(e){return bT(e)}(e),this)}_wrapTransactionReceipt(e,t){return new hC(function(e){return _T(e)}(e),this)}_wrapTransactionResponse(e,t){return new pC(kT(e),this)}_detectNetwork(){jb(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){jb(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=px(await this.#nt({method:"getBlockNumber"}),"%response");return this.#Je>=0&&(this.#Je=e),e}_getAddress(e){return ck(e,this)}_getBlockTag(e){if(null==e)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}return Hb(e)?Hb(e,32)?e:gx(e):("bigint"===typeof e&&(e=px(e,"blockTag")),"number"===typeof e?e>=0?gx(e):this.#Je>=0?gx(this.#Je+e):this.getBlockNumber().then((t=>gx(t+e))):void Lb(!1,"invalid blockTag","blockTag",e))}_getFilter(e){const t=(e.topics||[]).map((e=>null==e?null:Array.isArray(e)?qT(e.map((e=>e.toLowerCase()))):e.toLowerCase())),n="blockHash"in e?e.blockHash:void 0,r=(e,r,i
9688)=>{let s;switch(e.length){case 0:break;case 1:s=e[0];break;default:e.sort(),s=e}if(n&&(null!=r||null!=i))throw new Error("invalid filter");const o={};return s&&(o.address=s),t.length&&(o.topics=t),r&&(o.fromBlock=r),i&&(o.toBlock=i),n&&(o.blockHash=n),o};let i,s,o=[];if(e.address)if(Array.isArray(e.address))for(const a of e.address)o.push(this._getAddress(a));else o.push(this._getAddress(e.address));return"fromBlock"in e&&(i=this._getBlockTag(e.fromBlock)),"toBlock"in e&&(s=this._getBlockTag(e.toBlock)),o.filter((e=>"string"!==typeof e)).length||null!=i&&"string"!==typeof i||null!=s&&"string"!==typeof s?Promise.all([Promise.all(o),i,s]).then((e=>r(e[0],e[1],e[2]))):r(o,i,s)}_getTransactionRequest(e){const t=lC(e),n=[];if(["to","from"].forEach((e=>{if(null==t[e])return;const r=ck(t[e],this);zT(r)?n.push(async function(){t[e]=await r}()):t[e]=r})),null!=t.blockTag){const e=this._getBlockTag(t.blockTag);zT(e)?n.push(async function(){t.blockTag=await e}()):t.blockTag=e}return n.length?async function(){return await Promise.all(n),t}():t}async getNetwork(){if(null==this.#Ze){const e=(async()=>{try{const e=await this._detectNetwork();return this.emit("network",e,null),e}catch(t){throw this.#Ze===e&&(this.#Ze=null),t}})();return this.#Ze=e,(await e).clone()}const e=this.#Ze,[t,n]=await Promise.all([e,this._detectNetwork()]);
9688return t.chainId!==n.chainId&&(this.#Ye?(this.emit("network",n,t),this.#Ze===e&&(this.#Ze=Promise.resolve(n))):jb(!1,`network changed: ${t.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){const e=await this.getNetwork(),t=async()=>{const{_block:t,gasPrice:n,priorityFee:r}=await Tb({_block:this.#rt("latest",!1),gasPrice:(async()=>{try{return lx(await this.#nt({method:"getGasPrice"}),"%response")}catch(e){}return null})(),priorityFee:(async()=>{try{return lx(await this.#nt({method:"getPriorityFee"}),"%response")}catch(e){}return null})()});let i=null,s=null;const o=this._wrapBlock(t,e);return o&&o.baseFeePerGas&&(s=null!=r?r:BigInt("1000000000"),i=o.baseFeePerGas*$T+s),new cC(n,i,s)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const e=new Kk(n.url),r=await n.processFunc(t,this,e);return new cC(r.gasPrice,r.maxFeePerGas,r.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return zT(t)&&(t=await t),lx(await this.#nt({method:"estimateGas",transaction:t}),"%response")}async#it(e,t,n){jb(n<10,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:t,enableCcipRead:!0})});const r=lC(e);try{return Vb(await this._perform({method:"call",transaction:r,blockTag:t}))}catch(i){if(!this.disableCcipRead&&Ob(i)&&i.data&&n>=0&&"latest"===t&&null!=r.to&&"0x556f1830"===Zb(i.data,0,4)){const e=i.data,s=await ck(r.to,this);let o;try{o=function(e){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};jb(Kb(e)>=160,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const n=Zb(e,0,32);jb(Zb(n,0,12)===Zb(nP,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=Zb(n,12);try{const n=[],r=px(Zb(e,32,64)),i=px(Zb(e,r,r+32)),s=Zb(e,r+32);for(let e=0;e<i;e++){const t=YT(s,32*e);if(null==t)throw new Error("abort");n.push(t)}t.urls=n}catch(i){jb(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const n=QT(e,64);if(null==n)throw new Error("abort");t.calldata=n}catch(i){jb(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}jb(Zb(e,100,128)===Zb(nP,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=Zb(e,96,100);try{const n=QT(e,128);if(null==n)throw new Error("abort");t.extraData=n}catch(i){jb(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map((e=>t[e])),t}(Zb(i.data,4))}catch(i){jb(!1,i.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:r,info:{data:e}})}jb(o.sender.toLowerCase()===s.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:e,reason:"OffchainLookup",transaction:r,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:o.errorArgs}});const a=await this.ccipReadFetch(r,o.calldata,o.urls);jb(null!=a,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:r,info:{data:i.data,errorArgs:o.errorArgs}});const c={to:s,data:Gb([o.selector,tP([a,o.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:c});try{const e=await this.#it(c,t,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},c),result:e}),e}catch(i){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},c),error:i}),i}}throw i}}async#st(e){const{value:t}=await Tb({network:this.getNetwork(),value:e});return t}async call(e){const{tx:t,blockTag:n}=await Tb({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await this.#st(this.#it(t,n,e.enableCcipRead?0:-1))}async#ot(e,t,n){let r=this._getAddress(t),i=this._getBlockTag(n);return"string"===typeof r&&"string"===typeof i||([r,i]=await Promise.all([r,i])),await this.#st(this.#nt(Object.assign(e,{address:r,blockTag:i})))}async getBalance(e,t){return lx(await this.#ot({method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return px(await this.#ot({method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return Vb(await this.#ot({method:"getCode"},e,t))}async getStorage(e,t,n){const r=lx(t,"position");return Vb(await this.#ot({method:"getStorage",position:r},e,n))}async broadcastTransaction(e){const{blockNumber:t,hash:n,network:r}=await Tb({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=oT.from(e);if(i.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,r).replaceableTransaction(t)}async#rt(e,t){if(Hb(e,32))return await this.#nt({method:"getBlock",blockHash:e,includeTransactions:t});let n=this._getBlockTag(e);return"string"!==typeof n&&(n=await n),await this.#nt({method:"getBlock",blockTag:n,includeTransactions:t})}async getBlock(e,t){const{network:n,params:r}=await Tb({network:this.getNetwork(),params:this.#rt(e,!!t)});return null==r?null:this._wrapBlock(r,n)}async getTransaction(e){const{network:t,params:n}=await Tb({network:this.getNetwork(),params:this.#nt({method:"getTransaction",hash:e})});return null==n?null:this._wrapTransactionResponse(n,t)}async getTransactionReceipt(e){const{network:t,params:n}=await Tb({network:this.getNetwork(),params:this.#nt({method:"getTransactionReceipt",hash:e})});if(null==n)return null;if(null==n.gasPrice&&null==n.effectiveGasPrice){const t=await this.#nt({method:"getTransaction",hash:e});if(null==t)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=t.gasPrice}return this._wrapTransactionReceipt(n,t)}async getTransactionResult(e){const{result:t}=await Tb({network:this.getNetwork(),result:this.#nt({method:"getTransactionResult",hash:e})});return null==t?null:Vb(t)}
9688async getLogs(e){let t=this._getFilter(e);zT(t)&&(t=await t);const{network:n,params:r}=await Tb({network:this.getNetwork(),params:this.#nt({method:"getLogs",filter:t})});return r.map((e=>this._wrapLog(e,n)))}_getProvider(e){jb(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await pT.fromName(this,e)}async getAvatar(e){const t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){const t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){const t=rS((e=UE(e)).substring(2).toLowerCase()+".addr.reverse");try{const n=await pT.getEnsAddress(this),r=new qC(n,["function resolver(bytes32) view returns (address)"],this),i=await r.resolver(t);if(null==i||i===Qk)return null;const s=new qC(i,["function name(bytes32) view returns (string)"],this),o=await s.name(t);return await this.resolveName(o)!==e?null:o}catch(n){if(Rb(n,"BAD_DATA")&&"0x"===n.value)return null;if(Rb(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,t,n){const r=null!=t?t:1;return 0===r?this.getTransactionReceipt(e):new Promise((async(t,i)=>{let s=null;const o=async n=>{try{const i=await this.getTransactionReceipt(e);if(null!=i&&n-i.blockNumber+1>=r)return t(i),void(s&&(clearTimeout(s),s=null))}catch(i){console.log("EEE",i)}this.once("block",o)};null!=n&&(s=setTimeout((()=>{null!=s&&(s=null,this.off("block",o),i(Mb("timeout","TIMEOUT",{reason:"timeout"})))}),n)),o(await this.getBlockNumber())}))}async waitForBlock(e){jb(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const t=this.#et.get(e);t&&(t.timer&&clearTimeout(t.timer),this.#et.delete(e))}_setTimeout(e,t){null==t&&(t=0);const n=this.#Xe++,r=()=>{this.#et.delete(n),e()};if(this.paused)this.#et.set(n,{timer:null,func:r,time:t});else{const e=setTimeout(r,t);this.#et.set(n,{timer:e,func:r,time:GT()})}return n}_forEachSubscriber(e){for(const t of this.#Ve.values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new WT(e.type);case"block":{const e=new jT(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new DT(this,e.type);case"event":return new FT(this,e.filter);case"transaction":return new UT(this,e.hash);case"orphan":return new BT(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(const n of this.#Ve.values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=t,n.started&&t.start(),null!=this.#Ge&&t.pause(this.#Ge);break}}async#at(e,t){let n=await VT(e,this);return"event"===n.type&&t&&t.length>0&&!0===t[0].removed&&(n=await VT({orphan:"drop-log",log:t[0]},this)),this.#Ve.get(n.tag)||null}async#ct(e){const t=await VT(e,this),n=t.tag;let r=this.#Ve.get(n);if(!r){r={subscriber:this._getSubscriber(t),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#Ve.set(n,r)}return r}async on(e,t){const n=await this.#ct(e);return n.listeners.push({listener:t,once:!1}),n.started||(n.subscriber.start(),n.started=!0,null!=this.#Ge&&n.subscriber.pause(this.#Ge)),this}async once(e,t){const n=await this.#ct(e);return n.listeners.push({listener:t,once:!0}),n.started||(n.subscriber.start(),n.started=!0,null!=this.#Ge&&n.subscriber.pause(this.#Ge)),this}async emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=await this.#at(e,n);if(!i||0===i.listeners.length)return!1;const s=i.listeners.length;return i.listeners=i.listeners.filter((t=>{let{listener:r,once:i}=t;const s=new gC(this,i?null:r,e);try{r.call(this,...n,s)}catch(o){}return!i})),0===i.listeners.length&&(i.started&&i.subscriber.stop(),this.#Ve.delete(i.tag)),s>0}async listenerCount(e){if(e){const t=await this.#at(e);return t?t.listeners.length:0}let t=0;for(const{listeners:n}of this.#Ve.values())t+=n.length;return t}async listeners(e){if(e){const t=await this.#at(e);return t?t.listeners.map((e=>{let{listener:t}=e;return t})):[]}let t=[];for(const{listeners:n}of this.#Ve.values())t=t.concat(n.map((e=>{let{listener:t}=e;return t})));return t}async off(e,t){const n=await this.#at(e);if(!n)return this;if(t){const e=n.listeners.map((e=>{let{listener:t}=e;return t})).indexOf(t);e>=0&&n.listeners.splice(e,1)}return t&&0!==n.listeners.length||(n.started&&n.subscriber.stop(),this.#Ve.delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:t,started:n,subscriber:r}=await this.#ct(e);n&&r.stop(),this.#Ve.delete(t)}else for(const[t,{started:n,subscriber:r}]of this.#Ve)n&&r.stop(),this.#Ve.delete(t);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return this.#Ke}destroy(){this.removeAllListeners();for(const e of this.#et.keys())this._clearTimeout(e);this.#Ke=!0}get paused(){return null!=this.#Ge}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#Je=-1,null!=this.#Ge){if(this.#Ge==!!e)return;jb(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}
9688this._forEachSubscriber((t=>t.pause(e))),this.#Ge=!!e;for(const t of this.#et.values())t.timer&&clearTimeout(t.timer),t.time=GT()-t.time}resume(){if(null!=this.#Ge){this._forEachSubscriber((e=>e.resume())),this.#Ge=null;for(const e of this.#et.values()){let t=e.time;t<0&&(t=0),e.time=GT(),setTimeout(e.func,t)}}}}function YT(e,t){try{const n=QT(e,t);if(n)return nx(n)}catch(n){}return null}function QT(e,t){if("0x"===e)return null;try{const n=px(Zb(e,t,t+32)),r=px(Zb(e,n,n+32));return Zb(e,n+32,n+32+r)}catch(n){}return null}function JT(e){const t=mx(e);if(t.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(t,32-t.length),n}function XT(e){if(e.length%32===0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}const eP=new Uint8Array([]);function tP(e){const t=[];let n=0;for(let r=0;r<e.length;r++)t.push(eP),n+=32;for(let r=0;r<e.length;r++){const i=$b(e[r]);t[r]=JT(n),t.push(JT(i.length)),t.push(XT(i)),n+=32+32*Math.ceil(i.length/32)}return Gb(t)}const nP="0x0000000000000000000000000000000000000000000000000000000000000000";function rP(e,t){if(e.provider)return e.provider;jb(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function iP(e,t){let n=lC(t);if(null!=n.to&&(n.to=ck(n.to,e)),null!=n.from){const t=n.from;n.from=Promise.all([e.getAddress(),ck(t,e)]).then((e=>{let[t,n]=e;return Lb(t.toLowerCase()===n.toLowerCase(),"transaction from mismatch","tx.from",n),t}))}else n.from=e.getAddress();return await Tb(n)}class sP{provider;constructor(e){Pb(this,{provider:e||null})}async getNonce(e){return rP(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await iP(this,e)}async populateTransaction(e){const t=rP(this,"populateTransaction"),n=await iP(this,e);null==n.nonce&&(n.nonce=await this.getNonce("pending")),null==n.gasLimit&&(n.gasLimit=await this.estimateGas(n));const r=await this.provider.getNetwork();if(null!=n.chainId){Lb(lx(n.chainId)===r.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=r.chainId;const i=null!=n.maxFeePerGas||null!=n.maxPriorityFeePerGas;if(null==n.gasPrice||2!==n.type&&!i?0!==n.type&&1!==n.type||!i||Lb(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e):Lb(!1,"eip-1559 transaction do not support gasPrice","tx",e),2!==n.type&&null!=n.type||null==n.maxFeePerGas||null==n.maxPriorityFeePerGas)if(0===n.type||1===n.type){const e=await t.getFeeData();jb(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==n.gasPrice&&(n.gasPrice=e.gasPrice)}else{const e=await t.getFeeData();if(null==n.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(n.authorizationList&&n.authorizationList.length?n.type=4:n.type=2,null!=n.gasPrice){const e=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=e,n.maxPriorityFeePerGas=e}else null==n.maxFeePerGas&&(n.maxFeePerGas=e.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(jb(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==n.gasPrice&&(n.gasPrice=e.gasPrice),n.type=0):jb(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else 2!==n.type&&3!==n.type&&4!==n.type||(null==n.maxFeePerGas&&(n.maxFeePerGas=e.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else n.type=2;return await Tb(n)}async populateAuthorization(e){const t=Object.assign({},e);return null==t.chainId&&(t.chainId=(await rP(this,"getNetwork").getNetwork()).chainId),null==t.nonce&&(t.nonce=await this.getNonce()),t}async estimateGas(e){return rP(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return rP(this,"call").call(await this.populateCall(e))}async resolveName(e){const t=rP(this,"resolveName");return await t.resolveName(e)}async sendTransaction(e){const t=rP(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const r=oT.from(n);return await t.broadcastTransaction(await this.signTransaction(r))}authorize(e){jb(!1,"authorization not implemented for this signer","UNSUPPORTED_OPERATION",{operation:"authorize"})}}class oP{#De;#lt;#Be;#ze;#ut;#dt;constructor(e){this.#De=e,this.#lt=null,this.#Be=this.#$e.bind(this),this.#ze=!1,this.#ut=null,this.#dt=!1}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,t){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}async#$e(e){try{null==this.#lt&&(this.#lt=this._subscribe(this.#De));let e=null;try{e=await this.#lt}catch(t){if(!Rb(t,"UNSUPPORTED_OPERATION")||"eth_newFilter"!==t.operation)throw t}if(null==e)return this.#lt=null,void this.#De._recoverSubscriber(this,this._recover(this.#De));const n=await this.#De.getNetwork();if(this.#ut||(this.#ut=n),this.#ut.chainId!==n.chainId)throw new Error("chaid changed");if(this.#dt)return;const r=await this.#De.send("eth_getFilterChanges",[e]);await this._emitResults(this.#De,r)}catch(t){console.log("@TODO",t)}this.#De.once("block",this.#Be)}#ht(){const e=this.#lt;e&&(this.#lt=null,e.then((e=>{this.#De.destroyed||this.#De.send("eth_uninstallFilter",[e])})))}start(){this.#ze||(this.#ze=!0,this.#$e(-2))}stop(){this.#ze&&(this.#ze=!1,this.#dt=!0,this.#ht(),this.#De.off("block",this.#Be))}pause(e){e&&this.#ht(),this.#De.off("block",this.#Be)}resume(){this.start()}}class aP extends oP{#pt;constructor(e,t){var n;super(e),this.#pt=(n=t,JSON.parse(JSON.stringify(n)))}_recover(e){return new FT(e,this.#pt)}async _subscribe(e){return await e.send("eth_newFilter",[this.#pt])}async _emitResults(e,t){for(const n of t)e.emit(this.#pt,e._wrapLog(n,e._network))}}class cP extends oP{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(const n of t)e.emit("pending",n)}}const lP="bigint,boolean,function,number,string,symbol".split(/,/g);function uP(e){if(null==e||lP.indexOf(typeof e)>=0)return e;if("function"===typeof e.getAddress)return e;if(Array.isArray(e))return e.map(uP);if("object"===typeof e)return Object.keys(e).reduce(((t,n)=>(t[n]=e[n],t)),{});throw new Error(`should not happen: ${e} (${typeof e})`)}function dP(e){return new Promise((t=>{setTimeout(t,e)}))}function hP(e){return e?e.toLowerCase():e}function pP(e){return e&&"number"===typeof e.pollingInterval}const fP={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class mP extends sP{address;constructor(e,t){super(e),Pb(this,{address:t=UE(t)})}connect(e){jb(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const t=uP(e),n=[];if(t.from){const r=t.from;n.push((async()=>{const n=await ck(r,this.provider);Lb(null!=n&&n.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=n})())}else t.from=this.address;if(null==t.gasLimit&&n.push((async()=>
9688{t.gasLimit=await this.provider.estimateGas({...t,from:this.address})})()),null!=t.to){const e=t.to;n.push((async()=>{t.to=await ck(e,this.provider)})())}n.length&&await Promise.all(n);const r=this.provider.getRpcTransaction(t);return this.provider.send("eth_sendTransaction",[r])}async sendTransaction(e){const t=await this.provider.getBlockNumber(),n=await this.sendUncheckedTransaction(e);return await new Promise(((e,r)=>{const i=[1e3,100];let s=0;const o=async()=>{try{const r=await this.provider.getTransaction(n);if(null!=r)return void e(r.replaceableTransaction(t))}catch(a){if(Rb(a,"CANCELLED")||Rb(a,"BAD_DATA")||Rb(a,"NETWORK_ERROR")||Rb(a,"UNSUPPORTED_OPERATION"))return null==a.info&&(a.info={}),a.info.sendTransactionHash=n,void r(a);if(Rb(a,"INVALID_ARGUMENT")&&(s++,null==a.info&&(a.info={}),a.info.sendTransactionHash=n,s>10))return void r(a);this.provider.emit("error",Mb("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:a}))}this.provider._setTimeout((()=>{o()}),i.pop()||4e3)};o()}))}async signTransaction(e){const t=uP(e);if(t.from){const n=await ck(t.from,this.provider);Lb(null!=n&&n.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=n}else t.from=this.address;const n=this.provider.getRpcTransaction(t);return await this.provider.send("eth_signTransaction",[n])}async signMessage(e){const t="string"===typeof e?tx(e):e;return await this.provider.send("personal_sign",[Vb(t),this.address.toLowerCase()])}async signTypedData(e,t,n){const r=uP(n),i=await _k.resolveNames(e,t,r,(async e=>{const t=await ck(e);return Lb(null!=t,"TypedData does not support null address","value",e),t}));return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(_k.getPayload(i.domain,t,i.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const t="string"===typeof e?tx(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),Vb(t)])}}class gP extends ZT{#w;#ft;#mt;#gt;#yt;#ut;#vt;#wt(){if(this.#gt)return;const e=1===this._getOption("batchMaxCount")?0:this._getOption("batchStallTime");this.#gt=setTimeout((()=>{this.#gt=null;const e=this.#mt;for(this.#mt=[];e.length;){const t=[e.shift()];for(;e.length&&t.length!==this.#w.batchMaxCount;){t.push(e.shift());const n=JSON.stringify(t.map((e=>e.payload)));if(n.length>this.#w.batchMaxSize){e.unshift(t.pop());break}}(async()=>{const e=1===t.length?t[0].payload:t.map((e=>e.payload));this.emit("debug",{action:"sendRpcPayload",payload:e});try{const n=await this._send(e);this.emit("debug",{action:"receiveRpcResult",result:n});for(const{resolve:e,reject:r,payload:i}of t){if(this.destroyed){r(Mb("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:i.method}));continue}const t=n.filter((e=>e.id===i.id))[0];if(null!=t)"error"in t?r(this.getRpcError(i,t)):e(t.result);else{const e=Mb("missing response for request","BAD_DATA",{value:n,info:{payload:i}});this.emit("error",e),r(e)}}}catch(n){this.emit("debug",{action:"receiveRpcError",error:n});for(const{reject:e}of t)e(n)}})()}}),e)}constructor(e,t){super(e,t),this.#ft=1,this.#w=Object.assign({},fP,t||{}),this.#mt=[],this.#gt=null,this.#ut=null,this.#vt=null;{let e=null;const t=new Promise((t=>{e=t}));this.#yt={promise:t,resolve:e}}const n=this._getOption("staticNetwork");"boolean"===typeof n?(Lb(!n||"any"!==e,"staticNetwork cannot be used on special network 'any'","options",t),n&&null!=e&&(this.#ut=PT.from(e))):n&&(Lb(null==e||n.matches(e),"staticNetwork MUST match network object","options",t),this.#ut=n)}_getOption(e){return this.#w[e]}get _network(){return jb(this.#ut,"network is not available yet","NETWORK_ERROR"),this.#ut}async _perform(e){if("call"===e.method||"estimateGas"===e.method){let t=e.transaction;if(t&&null!=t.type&&lx(t.type)&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){const n=await this.getFeeData();null==n.maxFeePerGas&&null==n.maxPriorityFeePerGas&&(e=Object.assign({},e,{transaction:Object.assign({},t,{type:void 0})}))}}const t=this.getRpcRequest(e);return null!=t?await this.send(t.method,t.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e){if(!0!==e)return e;if(this.#ut)return this.#ut}return this.#vt?await this.#vt:this.ready?(this.#vt=(async()=>{try{const e=PT.from(lx(await this.send("eth_chainId",[])));return this.#vt=null,e}catch(e){throw this.#vt=null,e}})(),await this.#vt):(this.#vt=(async()=>{const e={id:this.#ft++,method:"eth_chainId",params:[],jsonrpc:"2.0"};let t;
9688this.emit("debug",{action:"sendRpcPayload",payload:e});try{t=(await this._send(e))[0],this.#vt=null}catch(n){throw this.#vt=null,this.emit("debug",{action:"receiveRpcError",error:n}),n}if(this.emit("debug",{action:"receiveRpcResult",result:t}),"result"in t)return PT.from(lx(t.result));throw this.getRpcError(e,t)})(),await this.#vt)}_start(){null!=this.#yt&&null!=this.#yt.resolve&&(this.#yt.resolve(),this.#yt=null,(async()=>{for(;null==this.#ut&&!this.destroyed;)try{this.#ut=await this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",Mb("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await dP(1e3)}this.#wt()})())}async _waitUntilReady(){if(null!=this.#yt)return await this.#yt.promise}_getSubscriber(e){return"pending"===e.type?new cP(this):"event"===e.type?this._getOption("polling")?new FT(this,e.filter):new aP(this,e.filter):"orphan"===e.type&&"drop-log"===e.filter.orphan?new WT("orphan"):super._getSubscriber(e)}get ready(){return null==this.#yt}getRpcTransaction(e){const t={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((n=>{if(null==e[n])return;let r=n;"gasLimit"===n&&(r="gas"),t[r]=gx(lx(e[n],`tx.${n}`))})),["from","to","data"].forEach((n=>{null!=e[n]&&(t[n]=Vb(e[n]))})),e.accessList&&(t.accessList=Ck(e.accessList)),e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.map((e=>e.toLowerCase()))),e.authorizationList&&(t.authorizationList=e.authorizationList.map((e=>{const t=Lk(e);return{address:t.address,nonce:gx(t.nonce),chainId:gx(t.chainId),yParity:gx(t.signature.yParity),r:t.signature.r,s:t.signature.s}}))),t}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[hP(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[hP(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[hP(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[hP(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&null!=e.filter.address&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(hP):e.filter.address=hP(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,t){const{method:n}=e,{error:r}=t;if("eth_estimateGas"===n&&r.message){const t=r.message;if(!t.match(/revert/i)&&t.match(/insufficient funds/i))return Mb("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:r}});if(t.match(/nonce/i)&&t.match(/too low/i))return Mb("nonce has already been used","NONCE_EXPIRED",{transaction:e.params[0],info:{payload:e,error:r}})}if("eth_call"===n||"eth_estimateGas"===n){const t=wP(r),i=sk.getBuiltinCallException("eth_call"===n?"call":"estimateGas",e.params[0],t?t.data:null);return i.info={error:r,payload:e},i}const i=JSON.stringify(function(e){const t=[];return bP(e,t),t}(r));if("string"===typeof r.message&&r.message.match(/user denied|ethers-user-denied/i)){return Mb("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[n]||"unknown",reason:"rejected",info:{payload:e,error:r}})}if("eth_sendRawTransaction"===n||"eth_sendTransaction"===n){const t=e.params[0];if(i.match(/insufficient funds|base fee exceeds gas limit/i))return Mb("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t,info:{error:r}});if(i.match(/nonce/i)&&i.match(/too low/i))return Mb("nonce has already been used","NONCE_EXPIRED",{transaction:t,info:{error:r}});if(i.match(/replacement transaction/i)&&i.match(/underpriced/i))return Mb("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t,info:{error:r}});if(i.match(/only replay-protected/i))return Mb("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:n,info:{transaction:t,info:{error:r}}})}let s=!!i.match(/the method .* does not exist/i);return s||r&&r.details&&r.details.startsWith("Unauthorized method:")&&(s=!0),s?Mb("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:r,payload:e}}):Mb("could not coalesce error","UNKNOWN_ERROR",{error:r,payload:e})}send(e,t){if(this.destroyed)return Promise.reject(Mb("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const n=this.#ft++,r=new Promise(((r,i)=>{this.#mt.push({resolve:r,reject:i,payload:{method:e,params:t,id:n,jsonrpc:"2.0"}})}));return this.#wt(),r}async getSigner(e){null==e&&(e=0);const t=this.send("eth_accounts",[]);if("number"===typeof e){const n=await t;if(e>=n.length)throw new Error("no such account");return new mP(this,n[e])}const{accounts:n}=await Tb({network:this.getNetwork(),accounts:t});e=UE(e);for(const r of n)if(UE(r)===e)return new mP(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map((e=>new mP(this,e)))}destroy(){this.#gt&&(clearTimeout(this.#gt),this.#gt=null);for(const{payload:e,reject:t}of this.#mt)t(Mb("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#mt=[],super.destroy()}}class yP extends gP{#bt;constructor(e,t){super(e,t);let n=this._getOption("pollingInterval");null==n&&(n=fP.pollingInterval),this.#bt=n}_getSubscriber(e){const t=super._getSubscriber(e);return pP(t)&&(t.pollingInterval=this.#bt),t}get pollingInterval(){return this.#bt}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");
9688this.#bt=e,this._forEachSubscriber((e=>{pP(e)&&(e.pollingInterval=this.#bt)}))}}class vP extends yP{#xt;constructor(e,t,n){null==e&&(e="http://localhost:8545"),super(t,n),this.#xt="string"===typeof e?new Kk(e):e.clone()}_getConnection(){return this.#xt.clone()}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){const t=this._getConnection();t.body=JSON.stringify(e),t.setHeader("content-type","application/json");const n=await t.send();n.assertOk();let r=n.bodyJson;return Array.isArray(r)||(r=[r]),r}}function wP(e){if(null==e)return null;if("string"===typeof e.message&&e.message.match(/revert/i)&&Hb(e.data))return{message:e.message,data:e.data};if("object"===typeof e){for(const t in e){const n=wP(e[t]);if(n)return n}return null}if("string"===typeof e)try{return wP(JSON.parse(e))}catch(t){}return null}function bP(e,t){if(null!=e){if("string"===typeof e.message&&t.push(e.message),"object"===typeof e)for(const n in e)bP(e[n],t);if("string"===typeof e)try{return bP(JSON.parse(e),t)}catch(n){}}}class xP extends yP{#J;#Et;constructor(e,t,n){const r=Object.assign({},null!=n?n:{},{batchMaxCount:1});Lb(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(t,r),this.#Et=null,n&&n.providerInfo&&(this.#Et=n.providerInfo),this.#J=async(t,n)=>{const r={method:t,params:n};this.emit("debug",{action:"sendEip1193Request",payload:r});try{const t=await e.request(r);return this.emit("debug",{action:"receiveEip1193Result",result:t}),t}catch(i){const e=new Error(i.message);throw e.code=i.code,e.data=i.data,e.payload=r,this.emit("debug",{action:"receiveEip1193Error",error:e}),e}}}get providerInfo(){return this.#Et}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){Lb(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const t=await this.#J(e.method,e.params||[]);return[{id:e.id,result:t}]}catch(t){return[{id:e.id,error:{code:t.code,data:t.data,message:t.message}}]}}getRpcError(e,t){switch((t=JSON.parse(JSON.stringify(t))).error.code||-1){case 4001:t.error.message=`ethers-user-denied: ${t.error.message}`;break;case 4200:t.error.message=`ethers-unsupported: ${t.error.message}`}return super.getRpcError(e,t)}async hasSigner(e){null==e&&(e=0);const t=await this.send("eth_accounts",[]);return"number"===typeof e?t.length>e:(e=e.toLowerCase(),0!==t.filter((t=>t.toLowerCase()===e)).length)}async getSigner(e){if(null==e&&(e=0),!await this.hasSigner(e))try{await this.#J("eth_requestAccounts",[])}catch(t){const e=t.payload;throw this.getRpcError(e,{id:e.id,error:t})}return await super.getSigner(e)}static async discover(e){if(null==e&&(e={}),e.provider)return new xP(e.provider);const t=e.window?e.window:"undefined"!==typeof window?window:null;if(null==t)return null;const n=e.anyProvider;if(n&&t.ethereum)return new xP(t.ethereum);if(!("addEventListener"in t&&"dispatchEvent"in t&&"removeEventListener"in t))return null;const r=e.timeout?e.timeout:300;return 0===r?null:await new Promise(((i,s)=>{let o=[];const a=e=>{o.push(e.detail),n&&c()},c=()=>{if(clearTimeout(l),o.length)if(e&&e.filter){const t=e.filter(o.map((e=>Object.assign({},e.info))));if(null==t)i(null);else if(t instanceof xP)i(t);else{let e=null;if(t.uuid){const n=o.filter((e=>t.uuid===e.info.uuid));e=n[0]}if(e){const{provider:t,info:n}=e;i(new xP(t,void 0,{providerInfo:n}))}else s(Mb("filter returned unknown info","UNSUPPORTED_OPERATION",{value:t}))}}else{const{provider:e,info:t}=o[0];i(new xP(e,void 0,{providerInfo:t}))}else i(null);t.removeEventListener("eip6963:announceProvider",a)},l=setTimeout((()=>{c()}),r);t.addEventListener("eip6963:announceProvider",a),t.dispatchEvent(new Event("eip6963:requestProvider"))}))}}const EP=new Set;const _P=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw new Error("unable to locate global object")}().WebSocket;class kP{#De;#de;get filter(){return JSON.parse(this.#de)}#_t;#kt;#Ct;constructor(e,t){this.#De=e,this.#de=JSON.stringify(t),this.#_t=null,this.#kt=null,this.#Ct=null}start(){this.#_t=this.#De.send("eth_subscribe",this.filter).then((e=>(this.#De._register(e,this),e)))}stop(){this.#_t.then((e=>{this.#De.destroyed||this.#De.send("eth_unsubscribe",[e])})),this.#_t=null}pause(e){jb(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),this.#kt=!!e}resume(){this.#kt=null}_handleMessage(e){if(null!=this.#_t&&null===this.#kt){let t=this.#Ct;t=null==t?this._emit(this.#De,e):t.then((async()=>{await this._emit(this.#De,e)})),this.#Ct=t.then((()=>{this.#Ct===t&&(this.#Ct=null)}))}}async _emit(e,t){throw new Error("sub-classes must implemente this; _emit")}}class CP extends kP{constructor(e){super(e,["newHeads"])}async _emit(e,t){e.emit("block",parseInt(t.number))}}class AP extends kP{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,t){e.emit("pending",t)}}class SP extends kP{#At;get logFilter(){return JSON.parse(this.#At)}constructor(e,t){super(e,["logs",t]),this.#At=JSON.stringify(t)}async _emit(e,t){e.emit(this.logFilter,e._wrapLog(t,e._network))}}class IP extends gP{#St;#Ve;#It;constructor(e,t){const n=Object.assign({},null!=t?t:{});Lb(null==n.batchMaxCount||1===n.batchMaxCount,"sockets-based providers do not support batches","options.batchMaxCount",t),n.batchMaxCount=1,null==n.staticNetwork&&(n.staticNetwork=!0),super(e,n),this.#St=new Map,this.#Ve=new Map,this.#It=new Map}
9688_getSubscriber(e){switch(e.type){case"close":return new WT("close");case"block":return new CP(this);case"pending":return new AP(this);case"event":return new SP(this,e.filter);case"orphan":if("drop-log"===e.filter.orphan)return new WT("drop-log")}return super._getSubscriber(e)}_register(e,t){this.#Ve.set(e,t);const n=this.#It.get(e);if(n){for(const e of n)t._handleMessage(e);this.#It.delete(e)}}async _send(e){Lb(!Array.isArray(e),"WebSocket does not support batch send","payload",e);const t=new Promise(((t,n)=>{this.#St.set(e.id,{payload:e,resolve:t,reject:n})}));return await this._waitUntilReady(),await this._write(JSON.stringify(e)),[await t]}async _processMessage(e){const t=JSON.parse(e);if(t&&"object"===typeof t&&"id"in t){const e=this.#St.get(t.id);if(null==e)return void this.emit("error",Mb("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:t}));this.#St.delete(t.id),e.resolve(t)}else{if(!t||"eth_subscription"!==t.method)return void this.emit("error",Mb("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:t}));{const e=t.params.subscription,n=this.#Ve.get(e);if(n)n._handleMessage(t.params.result);else{let n=this.#It.get(e);null==n&&(n=[],this.#It.set(e,n)),n.push(t.params.result)}}}}async _write(e){throw new Error("sub-classes must override this")}}class TP extends IP{#xt;#Tt;get websocket(){if(null==this.#Tt)throw new Error("websocket closed");return this.#Tt}constructor(e,t,n){super(t,n),"string"===typeof e?(this.#xt=()=>new _P(e),this.#Tt=this.#xt()):"function"===typeof e?(this.#xt=e,this.#Tt=e()):(this.#xt=null,this.#Tt=e),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(e){console.log("failed to start WebsocketProvider",e)}},this.websocket.onmessage=e=>{this._processMessage(e.data)}}async _write(e){this.websocket.send(e)}async destroy(){null!=this.#Tt&&(this.#Tt.close(),this.#Tt=null),super.destroy()}}const PP="84842078b09946638c03157f83405213";class NP extends TP{projectId;projectSecret;constructor(e,t){const n=new RP(e,t),r=n._getConnection();jb(!r.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});super(r.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),n._network),Pb(this,{projectId:n.projectId,projectSecret:n.projectSecret})}isCommunityResource(){return this.projectId===PP}}class RP extends vP{projectId;projectSecret;constructor(e,t,n){null==e&&(e="mainnet");const r=PT.from(e);null==t&&(t=PP),null==n&&(n=null);super(RP.getRequest(r,t,n),r,{staticNetwork:r}),Pb(this,{projectId:t,projectSecret:n})}_getProvider(e){try{return new RP(e,this.projectId,this.projectSecret)}catch(t){}return super._getProvider(e)}isCommunityResource(){return this.projectId===PP}static getWebSocketProvider(e,t){return new NP(e,t)}static getRequest(e,t,n){null==t&&(t=PP),null==n&&(n=null);const r=new Kk(`https://${function(e){switch(e){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":case"base-goerli":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bsc-mainnet.infura.io";case"bnbt":return"bsc-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}Lb(!1,"unsupported network","network",e)}(e.name)}/v3/${t}`);return r.allowGzip=!0,n&&r.setCredentials("",n),t===PP&&(r.retryFunc=async(e,t,n)=>{var r;return r="InfuraProvider",EP.has(r)||(EP.add(r),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${r} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("==========================")),!0}),r}}const OP="@w3m/wallet_id",MP=4902,jP=5e3,LP={getCaipDefaultChain(e){if(e)return{id:`${ao}:${e.chainId}`,name:e.name,imageId:po.EIP155NetworkImageIds[e.chainId]}},hexStringToNumber(e){const t=e.startsWith("0x")?e.slice(2):e;return parseInt(t,16)},numberToHexString:e=>`0x${e.toString(16)}`,async getUserInfo(e){const[t,n]=await Promise.all([LP.getAddress(e),LP.getChainId(e)]);return{chainId:n,address:t}},async getChainId(e){const t=await e.request({method:"eth_chainId"});return Number(t)},async getAddress(e){const[t]=await e.request({method:"eth_accounts"});return t},async addEthereumChain(e,t){await e.request({method:"wallet_addEthereumChain",params:[{chainId:LP.numberToHexString(t.chainId),rpcUrls:[t.rpcUrl],chainName:t.name,nativeCurrency:{name:t.currency,decimals:18,symbol
9688:t.currency},blockExplorerUrls:[t.explorerUrl],iconUrls:[po.EIP155NetworkImageIds[t.chainId]]}]})}};var DP=n(9907),BP=n(5877);const UP=(0,BP.BX)({provider:void 0,providerType:void 0,address:void 0,chainId:void 0,isConnected:!1}),FP={state:UP,subscribeKey:(e,t)=>(0,DP.u$)(UP,e,t),subscribe:e=>(0,BP.B1)(UP,(()=>e(UP))),setProvider(e){e&&(UP.provider=(0,BP.KR)(e))},setProviderType(e){UP.providerType=e},setAddress(e){UP.address=e},setPreferredAccountType(e){UP.preferredAccountType=e},setChainId(e){UP.chainId=e},setIsConnected(e){UP.isConnected=e},setError(e){UP.error=e},reset(){UP.provider=void 0,UP.address=void 0,UP.chainId=void 0,UP.providerType=void 0,UP.isConnected=!1,UP.error=void 0,UP.preferredAccountType=void 0}};class $P extends Js{constructor(e){const{ethersConfig:t,siweConfig:r,chains:i,defaultChain:s,tokens:o,chainImages:a,_sdkVersion:c,...l}=e;if(!t)throw new Error("web3modal:constructor - ethersConfig is undefined");if(!l.projectId)throw new Error("web3modal:constructor - projectId is undefined");const u={switchCaipNetwork:async e=>{const t=St.LX.caipNetworkIdToNumber(e?.id);if(t)try{FP.setError(void 0),await this.switchNetwork(t)}catch(n){throw FP.setError(n),new Error("networkControllerClient:switchCaipNetwork - unable to switch chain")}},getApprovedCaipNetworksData:async()=>new Promise((async e=>{const t=localStorage.getItem(OP);if(t?.includes(Xs)){const t=await this.getWalletConnectProvider();if(!t)throw new Error("networkControllerClient:getApprovedCaipNetworks - connector is undefined");const n=t.signer?.session?.namespaces,r=n?.[ao]?.methods,i=n?.[ao]?.chains;e({supportsAllNetworks:r?.includes(co)??!1,approvedCaipNetworkIds:i})}else{e({approvedCaipNetworkIds:void 0,supportsAllNetworks:!0})}}))},d={connectWalletConnect:async e=>{const t=await this.getWalletConnectProvider();if(!t)throw new Error("connectionControllerClient:getWalletConnectUri - provider is undefined");if(t.on("display_uri",(t=>{e(t)})),r?.options?.enabled){const{SIWEController:e,getDidChainId:s,getDidAddress:o}=await n.e(851).then(n.bind(n,4851)),a=await t.authenticate({nonce:await r.getNonce(),methods:pb,...await r.getMessageParams()}),c=a?.auths?.[0];if(c){const{p:n,s:r}=c,a=s(n.iss),l=o(n.iss);l&&a&&e.setSession({address:l,chainId:parseInt(a,10)});try{const i=t.signer.client.formatAuthMessage({request:n,iss:n.iss});await e.verifyMessage({message:i,signature:r.s,cacao:c})}catch(i){throw console.error("Error verifying message",i),await t.disconnect().catch(console.error),await e.signOut().catch(console.error),i}}}else await t.connect();await this.setWalletConnectProvider()},connectExternal:async e=>{let{id:n,info:r,provider:i}=e;if(n===eo){const e=t.injected;if(!e)throw new Error("connectionControllerClient:connectInjected - provider is undefined");try{FP.setError(void 0),await e.request({method:"eth_requestAccounts"}),this.setInjectedProvider(t)}catch(s){FP.setError(s)}}else if(n===so&&r&&i)try{FP.setError(void 0),await i.request({method:"eth_requestAccounts"}),this.setEIP6963Provider(i,r.name)}catch(s){FP.setError(s)}else if(n===no){const e=t.coinbase;if(!e)throw new Error("connectionControllerClient:connectCoinbase - connector is undefined");try{FP.setError(void 0),await e.request({method:"eth_requestAccounts"}),this.setCoinbaseProvider(t)}catch(s){FP.setError(s)}}else n===oo&&this.setAuthProvider()},checkInstalled:e=>e?!(t.injected&&!window?.ethereum)&&e.some((e=>Boolean(window.ethereum?.[String(e)]))):Boolean(window.ethereum),disconnect:async()=>{const e=FP.state.provider,t=FP.state.providerType;if(localStorage.removeItem(OP),FP.reset(),r?.options?.signOutOnDisconnect){const{SIWEController:e}=await n.e(851).then(n.bind(n,4851));await e.signOut()}if(t===Xs||"coinbaseWalletSDK"===t){const t=e;await t.disconnect()}else t===oo?await(this.authProvider?.disconnect()):e?.emit("disconnect");localStorage.removeItem(OP),FP.reset()},signMessage:async e=>
9688{const t=FP.state.provider;if(!t)throw new Error("connectionControllerClient:signMessage - provider is undefined");const n=Hb(e)?e:Vb(tx(e));return await t.request({method:"personal_sign",params:[n,this.getAddress()]})},parseUnits:(e,t)=>Tx(e,t),formatUnits:(e,t)=>Ix(e,t),async estimateGas(e){const{chainId:t,provider:n,address:r}=FP.state;if(!n)throw new Error("connectionControllerClient:sendTransaction - provider is undefined");if(!r)throw new Error("connectionControllerClient:sendTransaction - address is undefined");const i={from:e.address,to:e.to,data:e.data,type:0},s=new xP(n,t),o=new mP(s,r);return await o.estimateGas(i)},sendTransaction:async e=>{const{chainId:t,provider:n,address:r}=FP.state;if(!n)throw new Error("ethersClient:sendTransaction - provider is undefined");if(!r)throw new Error("ethersClient:sendTransaction - address is undefined");const i={to:e.to,value:e.value,gasLimit:e.gas,gasPrice:e.gasPrice,data:e.data,type:0},s=new xP(n,t),o=new mP(s,r),a=await o.sendTransaction(i),c=await a.wait();return c?.hash||null},writeContract:async e=>{const{chainId:t,provider:n,address:r}=FP.state;if(!n)throw new Error("ethersClient:writeContract - provider is undefined");if(!r)throw new Error("ethersClient:writeContract - address is undefined");const i=new xP(n,t),s=new mP(i,r),o=new qC(e.tokenAddress,e.abi,s);if(!o||!e.method)throw new Error("Contract method is undefined");const a=o[e.method];if(a){return await a(e.receiverAddress,e.tokenAmount)}throw new Error("Contract method is undefined")},getEnsAddress:async e=>{try{const t=St.LX.caipNetworkIdToNumber(this.getCaipNetwork()?.id);let n=null,r=!1;if(e?.endsWith(St.oU.WC_NAME_SUFFIX)&&(r=await this.resolveWalletConnectName(e)),1===t){const t=new RP("mainnet");n=await t.resolveName(e)}return n||r||!1}catch{return!1}},getEnsAvatar:async e=>{const{chainId:t}=FP.state;if(t&&1===t){const t=new RP("mainnet"),n=await t.getAvatar(e);return n||!1}return!1}};super({networkControllerClient:u,connectionControllerClient:d,siweControllerClient:r,defaultChain:LP.getCaipDefaultChain(s),tokens:fo.getCaipTokens(o),_sdkVersion:c??`html-ethers-${ho}`,...l}),this.hasSyncedConnectedAccount=!1,this.EIP6963Providers=[],this.options=void 0,this.options=e,this.metadata=t.metadata,this.projectId=l.projectId,this.chains=i,this.createProvider(),FP.subscribeKey("address",(()=>{this.syncAccount()})),FP.subscribeKey("chainId",(()=>{this.syncNetwork(a)})),this.syncRequestedNetworks(i,a),this.syncConnectors(t),t.EIP6963&&"undefined"!==typeof window&&(this.listenConnectors(t.EIP6963),this.checkActive6963Provider()),t.injected&&this.checkActiveInjectedProvider(t),(t.auth||t.email)&&this.syncAuthConnector(l.projectId,t.auth,t.email),t.coinbase&&this.checkActiveCoinbaseProvider(t)}getState(){const e=super.getState();return{...e,selectedNetworkId:St.LX.caipNetworkIdToNumber(e.selectedNetworkId)}}subscribeState(e){return super.subscribeState((t=>e({...t,selectedNetworkId:St.LX.caipNetworkIdToNumber(t.selectedNetworkId)})))}setAddress(e){const t=e?UE(e):void 0;FP.setAddress(t)}getAddress(){const{address:e}=FP.state;return e?UE(e):void 0}getError(){return FP.state.error}getChainId(){const e=FP.state.chainId,t=St.LX.caipNetworkIdToNumber(this.getCaipNetwork()?.id);return e??t}getIsConnected(){return FP.state.isConnected}getWalletProvider(){return FP.state.provider}getWalletProviderType(){return FP.state.providerType}subscribeProvider(e){return FP.subscribe(e)}async disconnect(){const{provider:e,providerType:t}=FP.state;if(localStorage.removeItem(OP),FP.reset(),t===oo)await(this.authProvider?.disconnect());else if("injected"===t||"eip6963"===t)e?.emit("disconnect");else if("walletConnect"===t||"coinbaseWalletSDK"===t){const t=e;if(t)try{FP.setError(void 0),await t.disconnect()}catch(n){FP.setError(n)}}}createProvider(){return this.walletConnectProviderInitPromise||"undefined"===typeof window||(this.walletConnectProviderInitPromise=this.initWalletConnectProvider()),this.walletConnectProviderInitPromise}async initWalletConnectProvider(){const e={projectId:this.projectId,showQrModal:!1,rpcMap:this.chains?this.chains.reduce(((e,t)=>(e[t.chainId]=t.rpcUrl,e)),{}):{},optionalChains:[...this.chains.map((e=>e.chainId))],metadata:{name:this.metadata?this.metadata.name:"",description:this.metadata?this.metadata.description:"",url:this.metadata?this.metadata.url:"",icons:this.metadata?this.metadata.icons:[""]}};this.walletConnectProvider=await Sb.init(e),await this.checkActiveWalletConnectProvider()}
9688async getWalletConnectProvider(){if(!this.walletConnectProvider)try{FP.setError(void 0),await this.createProvider()}catch(e){FP.setError(e)}return this.walletConnectProvider}syncRequestedNetworks(e,t){const n=e?.map((e=>({id:`${ao}:${e.chainId}`,name:e.name,imageId:po.EIP155NetworkImageIds[e.chainId],imageUrl:t?.[e.chainId]})));this.setRequestedCaipNetworks(n??[])}async checkActiveWalletConnectProvider(){const e=await this.getWalletConnectProvider(),t=localStorage.getItem(OP);e&&t===Xs&&await this.setWalletConnectProvider()}checkActiveInjectedProvider(e){const t=e.injected,n=localStorage.getItem(OP);t&&n===eo&&(this.setInjectedProvider(e),this.watchInjected(e))}checkActiveCoinbaseProvider(e){const t=e.coinbase,n=localStorage.getItem(OP);t&&n===no&&(t.accounts&&t.accounts?.length>0?(this.setCoinbaseProvider(e),this.watchCoinbase(e)):(localStorage.removeItem(OP),FP.reset()))}checkActive6963Provider(){const e=window?.localStorage.getItem(OP);if(e){const t=this.EIP6963Providers.find((t=>t.info.name===e));t&&this.setEIP6963Provider(t.provider,t.info.name)}}async setWalletConnectProvider(){window?.localStorage.setItem(OP,Xs);const e=await this.getWalletConnectProvider();e&&(FP.setChainId(e.chainId),FP.setProviderType("walletConnect"),FP.setProvider(e),FP.setIsConnected(!0),this.setAddress(e.accounts?.[0]),this.watchWalletConnect())}async setInjectedProvider(e){window?.localStorage.setItem(OP,eo);const t=e.injected;if(t){const{address:n,chainId:r}=await LP.getUserInfo(t);n&&r&&(FP.setChainId(r),FP.setProviderType("injected"),FP.setProvider(e.injected),FP.setIsConnected(!0),this.setAddress(n),this.watchCoinbase(e))}}async setEIP6963Provider(e,t){if(window?.localStorage.setItem(OP,t),e){const{address:t,chainId:n}=await LP.getUserInfo(e);t&&n&&(FP.setChainId(n),FP.setProviderType("eip6963"),FP.setProvider(e),FP.setIsConnected(!0),this.setAddress(t),this.watchEIP6963(e))}}async setCoinbaseProvider(e){window?.localStorage.setItem(OP,no);const t=e.coinbase;if(t){const{address:n,chainId:r}=await LP.getUserInfo(t);n&&r&&(FP.setChainId(r),FP.setProviderType("coinbaseWalletSDK"),FP.setProvider(e.coinbase),FP.setIsConnected(!0),this.setAddress(n),this.watchCoinbase(e))}}
9688async setAuthProvider(){if(window?.localStorage.setItem(OP,oo),this.authProvider){super.setLoading(!0);const{address:e,chainId:t,smartAccountDeployed:n,preferredAccountType:r}=await this.authProvider.connect({chainId:this.getChainId()}),{smartAccountEnabledNetworks:i}=await this.authProvider.getSmartAccountEnabledNetworks();this.setSmartAccountEnabledNetworks(i),e&&t&&(FP.setChainId(t),FP.setProviderType(oo),FP.setProvider(this.authProvider),FP.setIsConnected(!0),FP.setAddress(e),FP.setPreferredAccountType(r),this.setSmartAccountDeployed(Boolean(n)),this.watchAuth(),this.watchModal()),super.setLoading(!1)}}async watchWalletConnect(){const e=await this.getWalletConnectProvider();function t(e){if(e){const t=LP.hexStringToNumber(e);FP.setChainId(t)}}const n=async e=>{e.length>0&&await this.setWalletConnectProvider()};e&&(e.on("disconnect",(function r(){localStorage.removeItem(OP),FP.reset(),e?.removeListener("disconnect",r),e?.removeListener("accountsChanged",n),e?.removeListener("chainChanged",t)})),e.on("accountsChanged",n),e.on("chainChanged",t))}watchInjected(e){const t=e.injected;function n(e){const t=e?.[0];t?FP.setAddress(UE(t)):(localStorage.removeItem(OP),FP.reset())}function r(e){if(e){const t="string"===typeof e?LP.hexStringToNumber(e):Number(e);FP.setChainId(t)}}t&&(t.on("disconnect",(function e(){localStorage.removeItem(OP),FP.reset(),t?.removeListener("disconnect",e),t?.removeListener("accountsChanged",n),t?.removeListener("chainChanged",r)})),t.on("accountsChanged",n),t.on("chainChanged",r))}watchEIP6963(e){function t(e){const t=e?.[0];t?FP.setAddress(UE(t)):(localStorage.removeItem(OP),FP.reset())}function n(e){if(e){const t="string"===typeof e?LP.hexStringToNumber(e):Number(e);FP.setChainId(t)}}e&&(e.on("disconnect",(function r(){localStorage.removeItem(OP),FP.reset(),e.removeListener("disconnect",r),e.removeListener("accountsChanged",t),e.removeListener("chainChanged",n)})),e.on("accountsChanged",t),e.on("chainChanged",n))}watchCoinbase(e){const t=e.coinbase,n=localStorage.getItem(OP);function r(e){const t=e?.[0];t?FP.setAddress(UE(t)):(localStorage.removeItem(OP),FP.reset())}function i(e){if(e&&n===no){const t=Number(e);FP.setChainId(t)}}t&&(t.on("disconnect",(function e(){localStorage.removeItem(OP),FP.reset(),t?.removeListener("disconnect",e),t?.removeListener("accountsChanged",r),t?.removeListener("chainChanged",i)})),t.on("accountsChanged",r),t.on("chainChanged",i))}watchAuth(){this.authProvider&&(this.authProvider.onRpcRequest((e=>{if(st.QH.checkIfRequestExists(e)){if(!st.QH.checkIfRequestIsAllowed(e))if(super.isOpen()){if(super.isTransactionStackEmpty())return;super.isTransactionShouldReplaceView()?super.replace("ApproveTransaction"):super.redirect("ApproveTransaction")}else super.open({view:"ApproveTransaction"})}else{super.open();const t=st.QH.getRequestMethod(e);console.error(st.Vl.RPC_METHOD_NOT_ALLOWED_MESSAGE,{method:t}),setTimeout((()=>{this.showErrorMessage(st.Vl.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE)}),300)}})),this.authProvider.onRpcResponse((e=>{switch(st.QH.getResponseType(e)){case st.s1.RPC_RESPONSE_TYPE_ERROR:super.isOpen()&&(super.isTransactionStackEmpty()?super.close():super.popTransactionStack(!0));break;case st.s1.RPC_RESPONSE_TYPE_TX:super.isTransactionStackEmpty()?super.close():super.popTransactionStack()}})),this.authProvider.onNotConnected((()=>{this.setIsConnected(!1),super.setLoading(!1)})),this.authProvider.onIsConnected((e=>{let{preferredAccountType:t}=e;this.setIsConnected(!0),super.setLoading(!1),FP.setPreferredAccountType(t)})),this.authProvider.onSetPreferredAccount((e=>{let{address:t,type:n}=e;if(!t)return;super.setLoading(!0);const r=St.LX.caipNetworkIdToNumber(this.getCaipNetwork()?.id);FP.setAddress(t),FP.setChainId(r),FP.setIsConnected(!0),FP.setPreferredAccountType(n),this.syncAccount().then((()=>super.setLoading(!1)))})))}watchModal(){this.authProvider&&this.subscribeState((e=>{e.open||this.authProvider?.rejectRpcRequest()}))}async syncAccount(){const e=FP.state.address,t=FP.state.chainId,n=FP.state.isConnected,r=FP.state.preferredAccountType;if(this.resetAccount(),n&&e&&t){const i=`${ao}:${t}:${e}`;this.setIsConnected(n),this.setPreferredAccountType(r),this.setCaipAddress(i),this.syncConnectedWalletInfo(),await Promise.all([this.syncProfile(e),this.syncBalance(e),this.getApprovedCaipNetworksData()]),this.hasSyncedConnectedAccount=!0}else!n&&this.hasSyncedConnectedAccount&&(this.resetWcConnection(),this.resetNetwork())}
9688async syncNetwork(e){const t=FP.state.address,n=FP.state.chainId,r=FP.state.isConnected;if(this.chains){const i=this.chains.find((e=>e.chainId===n));if(i){const s=`${ao}:${i.chainId}`;if(this.setCaipNetwork({id:s,name:i.name,imageId:po.EIP155NetworkImageIds[i.chainId],imageUrl:e?.[i.chainId]}),r&&t){const e=`${ao}:${n}:${t}`;if(this.setCaipAddress(e),i.explorerUrl){const e=`${i.explorerUrl}/address/${t}`;this.setAddressExplorerUrl(e)}else this.setAddressExplorerUrl(void 0);this.hasSyncedConnectedAccount&&(await this.syncProfile(t),await this.syncBalance(t))}}else r&&this.setCaipNetwork({id:`${ao}:${n}`})}}async syncWalletConnectName(e){try{const t=await this.getWalletConnectName(e);if(t[0]){const e=t[0];this.setProfileName(e.name)}else this.setProfileName(null)}catch{this.setProfileName(null)}}async syncProfile(e){const t=FP.state.chainId;try{const{name:t,avatar:n}=await this.fetchIdentity({address:e});this.setProfileName(t),this.setProfileImage(n),t||await this.syncWalletConnectName(e)}catch{if(1===t){const t=new RP("mainnet"),n=await t.lookupAddress(e),r=await t.getAvatar(e);n?this.setProfileName(n):await this.syncWalletConnectName(e),r&&this.setProfileImage(r)}else await this.syncWalletConnectName(e),this.setProfileImage(null)}}
9688async syncBalance(e){const t=FP.state.chainId;if(t&&this.chains){const n=this.chains.find((e=>e.chainId===t));if(n){const r=new vP(n.rpcUrl,{chainId:t,name:n.name});if(r){const t=await r.getBalance(e),i=Ix(t,18);this.setBalance(i,n.currency)}}}}syncConnectedWalletInfo(){const e=window?.localStorage.getItem(OP),t=FP.state.providerType;if(t===so){if(e){const t=this.EIP6963Providers.find((t=>t.info.name===e));t&&this.setConnectedWalletInfo({...t.info})}}else if(t===Xs){const e=FP.state.provider;e.session&&this.setConnectedWalletInfo({...e.session.peer.metadata,name:e.session.peer.metadata.name,icon:e.session.peer.metadata.icons?.[0]})}else e&&this.setConnectedWalletInfo({name:e})}async switchNetwork(e){const t=FP.state.provider,n=FP.state.providerType;if(this.chains){const i=this.chains.find((t=>t.chainId===e));if(n===Xs&&i){const n=t;if(n)try{await n.request({method:"wallet_switchEthereumChain",params:[{chainId:LP.numberToHexString(i.chainId)}]}),FP.setChainId(e)}catch(r){if(r.code!==MP&&r.code!==jP&&r?.data?.originalError?.code!==MP)throw new Error("Chain is not supported");await LP.addEthereumChain(n,i)}}else if(n===eo&&i){const e=t;if(e)try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:LP.numberToHexString(i.chainId)}]}),FP.setChainId(i.chainId)}catch(r){if(r.code!==MP&&r.code!==jP&&r?.data?.originalError?.code!==MP)throw new Error("Chain is not supported");await LP.addEthereumChain(e,i)}}else if(n===so&&i){const e=t;if(e)try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:LP.numberToHexString(i.chainId)}]}),FP.setChainId(i.chainId)}catch(r){if(r.code!==MP&&r.code!==jP&&r?.data?.originalError?.code!==MP)throw new Error("Chain is not supported");await LP.addEthereumChain(e,i)}}else if(n===no&&i){const e=t;if(e)try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:LP.numberToHexString(i.chainId)}]}),FP.setChainId(i.chainId)}catch(r){if(r.code!==MP&&r.code!==jP&&r?.data?.originalError?.code!==MP)throw new Error("Error switching network");await LP.addEthereumChain(e,i)}}else if(n===oo&&this.authProvider&&i?.chainId)try{super.setLoading(!0),await this.authProvider.switchNetwork(i?.chainId),FP.setChainId(i.chainId);const{address:e,preferredAccountType:t}=await this.authProvider.connect({chainId:i?.chainId});FP.setAddress(e),FP.setPreferredAccountType(t),await this.syncAccount()}catch{throw new Error("Switching chain failed")}finally{super.setLoading(!1)}}}syncConnectors(e){const t=[],n=po.ConnectorTypesMap[Xs];if(n&&t.push({id:Xs,explorerId:po.ConnectorExplorerIds[Xs],imageId:po.ConnectorImageIds[Xs],imageUrl:this.options?.connectorImages?.[Xs],name:po.ConnectorNamesMap[Xs],type:n}),e.injected){const e=po.ConnectorTypesMap[eo];e&&t.push({id:eo,explorerId:po.ConnectorExplorerIds[eo],imageId:po.ConnectorImageIds[eo],imageUrl:this.options?.connectorImages?.[eo],name:po.ConnectorNamesMap[eo],type:e})}e.coinbase&&t.push({id:no,explorerId:po.ConnectorExplorerIds[to],imageId:po.ConnectorImageIds[to],imageUrl:this.options?.connectorImages?.[to],name:po.ConnectorNamesMap[to],type:"EXTERNAL"}),this.setConnectors(t)}async syncAuthConnector(e,t,n){if("undefined"!==typeof window){this.authProvider=new st.YW(e),this.addConnector({id:oo,type:"AUTH",name:"Auth",provider:this.authProvider,email:n,socials:t?.socials,showWallets:void 0===t?.showWallets||t.showWallets}),super.setLoading(!0);const r=this.authProvider.getLoginEmailUsed();super.setLoading(r);const{isConnected:i}=await this.authProvider.isConnected();i?await this.setAuthProvider():super.setLoading(!1)}}eip6963EventHandler(e){if(e.detail){const{info:t,provider:n}=e.detail,r=this.getConnectors().find((e=>e.name===t.name));if(!r){const e=po.ConnectorTypesMap[so];if(e){this.addConnector({id:so,type:e,imageUrl:t.icon??this.options?.connectorImages?.[so],name:t.name,provider:n,info:t});const r={provider:n,info:t};this.EIP6963Providers.push(r)}}}}listenConnectors(e){if("undefined"!==typeof window&&e){const e=this.eip6963EventHandler.bind(this);window.addEventListener(lo,e),window.dispatchEvent(new Event(uo))}}}let zP;function HP(){if(!zP)throw new Error('Please call "createWeb3Modal" before using "useWeb3Modal" hook');return{open:async function(e){await(zP?.open(e))},close:async function(){await(zP?.close())}}}function WP(){if(!zP)throw new Error('Please call "createWeb3Modal" before using "useWeb3ModalState" hook');const[e,t]=(0,c.useState)(zP.getState());return(0,c.useEffect)((()=>{const e=zP?.subscribeState((e=>{t({...e})}));return()=>{e?.()}}),[]),e}var qP=n(3379),VP=n(6538);const{use:GP}=c,{useSyncExternalStore:KP}=VP,ZP=new WeakMap;function YP(e,t){const n=null==t?void 0:t.sync,r=(0,c.useRef)(),i=(0,c.useRef)();let s=!0;const o=KP((0,c.useCallback)((t=>
9688{const r=(0,BP.B1)(e,t,n);return t(),r}),[e,n]),(()=>{const t=(0,BP.P9)(e,GP);try{if(!s&&r.current&&i.current&&!(0,qP.Hq)(r.current,t,i.current,new WeakMap))return r.current}catch(n){}return t}),(()=>(0,BP.P9)(e,GP)));s=!1;const a=new WeakMap;(0,c.useEffect)((()=>{r.current=o,i.current=a})),((e,t)=>{const n=(0,c.useRef)();(0,c.useEffect)((()=>{n.current=(0,qP.JR)(e,t,!0)})),(0,c.useDebugValue)(n.current)})(o,a);const l=(0,c.useMemo)((()=>new WeakMap),[]);return(0,qP.tz)(o,a,l,ZP)}n(3436);var QP=n(2267);function JP(e){const{enableEIP6963:t=!0,enableCoinbase:n=!0,enableInjected:r=!0,enableEmail:i=!1,auth:s,metadata:o,rpcUrl:a,defaultChainId:c}=e;let l,u;const d={metadata:o};return r&&(d.injected=l||("undefined"!==typeof window&&window.ethereum?(l=window.ethereum,l):void 0)),n&&a&&c&&(d.coinbase=function(){if(u)return u;if("undefined"===typeof window)return;const t=new QP.Il({appName:o.name,appLogoUrl:o.icons[0],appChainIds:e.chains?.map((e=>e.chainId))||[1,84532]});return u=t.makeWeb3Provider({options:e.coinbasePreference||"all"}),u}()),t&&(d.EIP6963=!0),i&&(d.email=!0),s&&(d.auth=s),d}let XP;function eN(e){var t;return XP||(XP=new $P({...e,_sdkVersion:`react-ethers-${ho}`})),(t=XP)&&(zP=t),XP}function tN(){const{provider:e,providerType:t}=YP(FP.state);return{walletProvider:e,walletProviderType:t}}function nN(){return{switchNetwork:async function(e){await(XP?.switchNetwork(e))}}}function rN(){const{address:e,isConnected:t,chainId:n}=YP(FP.state);return{address:e,isConnected:t,chainId:n}}var iN=n(4414);const sN=e=>{const{address:t,chainId:n,isConnected:r}=rN(),{walletProvider:i}=tN(),{open:s}=HP(),{selectedNetworkId:o}=WP(),a=r&&t&&null!=t?Oe.transform(t):"Not connected";return(0,iN.jsx)("div",{children:r?(0,iN.jsx)("button",{className:"userConnectButton btn btn-outline-primary rounded-pill px-4",onClick:()=>s(),children:a}):(0,iN.jsx)("div",{className:"connectWalletBtnContainer",children:(0,iN.jsxs)("button",{className:"btn btn-primary rounded-pill px-4",onClick:()=>s({view:"Networks"}),children:[(0,iN.jsx)("i",{className:"fa-solid fa-right-to-bracket"})," Connect Wallet"]})})})},oN={1:{name:"Ethereum",minName:"ETH",symbol:"ETH",urlName:"eth",rpc:"https://mainnet.infura.io/v3/e1fe0d616b29495ab139715a748caf1e",rpcName:"",explorerUrl:"https://etherscan.io",explorerAddress:"https://etherscan.io/address/",explorerToken:"https://etherscan.io/token/",explorerTx:"https://etherscan.io/tx/",networkType:"mainnet",compatible:!1,defaultMiniumGasETH:5e-4},56:{name:"Binance Smart Chain",minName:"BNB",symbol:"BNB",urlName:"bsc",rpc:"https://bsc-dataseed.binance.org",rpcName:"binance",explorerUrl:"https://bscscan.com",explorerAddress:"https://bscscan.com/address/",explorerToken:"https://bscscan.com/token/",explorerTx:"https://bscscan.com/tx/",networkType:"mainnet",compatible:!1,defaultMiniumGasETH:5e-4},97:{name:"Binance Smart Chain Testnet",minName:"BNB TEST",symbol:"BNB",urlName:"bsc-testnet",rpc:"https://data-seed-prebsc-1-s1.binance.org:8545",rpcName:"binance",explorerUrl:"https://testnet.bscscan.com",explorerAddress:"https://testnet.bscscan.com/address/",explorerToken:"https://testnet.bscscan.com/token/",explorerTx:"https://testnet.bscscan.com/tx/",networkType:"testnet",compatible:!1,defaultMiniumGasETH:5e-4},137:{name:"Polygon",minName:"MATIC",symbol:"MATIC",urlName:"matic",rpc:"https://rpc-mainnet.maticvigil.com/",rpcName:"matic",explorerUrl:"https://polygonscan.com",explorerAddress:"https://polygonscan.com/address/",explorerToken:"https://polygonscan.com/token/",explorerTx:"https://polygonscan.com/tx/",networkType:"mainnet",compatible:!1,defaultMiniumGasETH:5e-4},42440:{name:"Genesys Testnet",minName:"GSYS TEST",symbol:"GSYS",urlName:"gsys-testnet",rpc:"https://testnet-rpc.genesys.network",rpcName:"genesys",explorerUrl:"https://testnet-gchainexplorer.genesys.network",explorerAddress:"https://testnet-gchainexplorer.genesys.network/address/",explorerToken:"https://testnet-gchainexplorer.genesys.network/token/",explorerTx:"https://testnet-gchainexplorer.genesys.network/tx/",networkType:"testnet",compatible:!0,defaultMiniumGasETH:5e-4},16507:{name:"Genesys Mainnet",minName:"GSYS",symbol:"GSYS",urlName:"gsys",rpc:"https://rpc.genesys.network",rpcName:"genesys",explorerUrl:"https://gchainexplorer.genesys.network",explorerAddress:"https://gchainexplorer.genesys.network/address/",explorerToken:"https://gchainexplorer.genesys.network/token/",explorerTx:"https://gchainexplorer.genesys.network/tx/",networkType:"mainnet",compatible:!1,defaultMiniumGasETH:5e-4}
9688,8453:{name:"Base",minName:"BASE",nameCoin:"Ether",symbol:"ETH",urlName:"base",rpc:"https://mainnet.base.org",explorerUrl:"https://basescan.org",explorerAddress:"https://basescan.org/address/",explorerToken:"https://basescan.org/token/",explorerTx:"https://basescan.org/tx/",networkType:"mainnet",compatible:!0,defaultMiniumGasETH:5e-4}},aN=e=>void 0!=e&&null!=e&&Object.keys(oN).includes(e.toString())?oN[e]:{name:"Unsupported",minName:"Unsupported",symbol:"",urlName:"",rpc:"",rpcName:"",explorerUrl:"",explorerAddress:"",explorerToken:"",explorerTx:"",networkType:"",compatible:!1},cN=(Object.keys(oN).map((e=>oN[e])),Object.keys(oN)),lN=e=>{const{address:t,chainId:n,isConnected:r}=rN(),{selectedNetworkId:i}=WP(),{open:s}=HP(),[o,a]=(0,c.useState)(!1),[l,u]=(0,c.useState)(null),[d,h]=(0,c.useState)(null);window.openNetworkModal=()=>{s({view:"Networks"})},(0,c.useEffect)((()=>{r&&p()}),[n]);const p=()=>{cN.includes(n.toString())?(a(!0),u(oN[n].name),h(oN[n].minName)):a(!1)};return r?o?(0,iN.jsxs)("button",{onClick:()=>s({view:"Networks"}),className:"blockchain-button btn btn-outline-danger rounded-pill px-4",children:[(0,iN.jsx)("img",{className:"blockchain-logo",alt:`Chain ${n}`,src:`/assets/img/icons/chain-${n}.png`}),(0,iN.jsx)("span",{className:"networkNameFull",children:l}),(0,iN.jsx)("span",{className:"networkNameMin",children:d})]}):(0,iN.jsxs)("button",{onClick:()=>s({view:"Networks"}),className:"blockchain-button_unsuported btn btn-outline-danger rounded-pill px-4",children:[(0,iN.jsx)("i",{className:"fa-solid fa-circle-exclamation"}),(0,iN.jsx)("span",{className:"networkNameFull",children:" Network not supported"}),(0,iN.jsx)("span",{className:"networkNameMin",children:" Unsupported"})]}):null};class uN extends c.Component{constructor(e){super(e),this.state={actualPage:this.props.actualPage}}toggleSidebar(){document.querySelector("body").classList.toggle("toggle-sidebar")}render(){return(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"deco_header",children:(0,iN.jsxs)("header",{id:"header",className:"header fixed-top d-flex align-items-center",children:[(0,iN.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,iN.jsx)("a",{onClick:()=>this.toggleSidebar(),children:(0,iN.jsx)("i",{className:"bi bi-list toggle-sidebar-btn px-2 actionable"})}),(0,iN.jsxs)(Pe,{to:"/",className:"logo-pc logo d-flex align-items-center px-2 actionable actionable-sm",children:[(0,iN.jsx)("img",{className:"logo_dark",src:"assets/img/logo_dark.png",alt:"Logo"}),(0,iN.jsx)("img",{className:"logo_light",src:"assets/img/logo_light.png",alt:"Logo"})]})]}),(0,iN.jsx)("nav",{className:"header-nav ms-auto",children:(0,iN.jsxs)("ul",{className:"d-flex align-items-center",children:[(0,iN.jsx)("li",{className:"nav-item pe-3 header-btn-container",children:(0,iN.jsx)(lN,{})}),(0,iN.jsx)("li",{className:"nav-item pe-3 header-btn-container",children:(0,iN.jsx)(sN,{walletInfo:this.props.walletInfo})})]})})]})})})}}const dN=uN,hN={GameToken:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"_decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"_name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"_symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"burn",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}],PowaWormsCharacters:[{inputs:[{internalType:"address",name:"_powaWormsPartsMetadata",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"addNftClassQuantity",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burnTokenOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burnTokenOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentTokenID",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}
9688],name:"getEntityMint",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getEntityMintVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getEntityMintVersionContract",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"nftId",type:"uint256"}],name:"getNFTClass",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"nftId",type:"uint256"},{internalType:"uint32",name:"partIndex",type:"uint32"}],name:"getNFTOnlyPartPower",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"nftId",type:"uint256"}],name:"getNFTParts",outputs:[{internalType:"uint32[]",name:"",type:"uint32[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"nftId",type:"uint256"}],name:"getNFTPartsPower",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalMinted",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"isGenesis",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"lastRandomGenerated",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_receiver",type:"address"}],name:"mintForAddressMintPlatform",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_receiver",type:"address"}],name:"mintForAddressOracle",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_receiver",type:"address"}],name:"mintForAddressOwner",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_receiver",type:"address"},{internalType:"uint32[7]",name:"_partsIndex",type:"uint32[7]"},{internalType:"uint32",name:"_nftClass",type:"uint32"}],name:"mintForAddressOwnerGenesis",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_receivers",type:"address[]"}],name:"mintForAddressOwnerMulti",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"mintPlatform",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"mintPlatformVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"mintPlatformVersionList",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"nftClass",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nftClassQuantity",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],name:"nftParts",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"oracleGenerator",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"oracleGeneratorVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"oracleGeneratorVersionList",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"oracleMintPaused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"platformMintPaused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"powaWormsPartsMetadata",outputs:[{internalType:"contract IPowaWormsPartsMetadata",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"randomMode",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"randomNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_mintPlatform",type:"address"}],name:"setMintPlatform",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_oracleGenerator",type:"address"}],name:"setOracleGenerator",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_state",type:"bool"}],name:"setOracleMintPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_state",type:"bool"}],name:"setPlatformMintPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newAddress",type:"address"}],name:"setPowaWormsPartsMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"setRandomMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"setSaltOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_uriPrefix",type:"string"}],name:"setUriPrefix",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_uriSuffix",type:"string"}],name:"setUriSuffix",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalCirculation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalMinted",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"uriPrefix",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"uriSuffix",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"walletOfOwner",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_startIndex",type:"uint256"},{internalType:"uint256",name:"_count",type:"uint256"}],name:"walletOfOwnerIndexOffset",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"}],PowaWormsPartsMetadata:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"}
9688,{inputs:[{internalType:"uint8[]",name:"_partType",type:"uint8[]"},{internalType:"string[]",name:"_name",type:"string[]"},{internalType:"uint256[]",name:"_value",type:"uint256[]"}],name:"addMultiplePart",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"_partType",type:"uint8"},{internalType:"string",name:"_name",type:"string"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"addSinglePart",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint32",name:"_partIndex",type:"uint32"}],name:"getPartData",outputs:[{internalType:"uint8",name:"_partType",type:"uint8"},{internalType:"string",name:"_name",type:"string"},{internalType:"uint256",name:"_value",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"_partType",type:"uint8"},{internalType:"uint32",name:"_partIndex",type:"uint32"}],name:"getPartIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"_partType",type:"uint8"}],name:"getPartListLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"_partIndex",type:"uint32"}],name:"getPartPower",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32[7]",name:"_partsIndex",type:"uint32[7]"}],name:"getPartPowerMulti",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"_partIndex",type:"uint32"},{internalType:"uint8",name:"_partType",type:"uint8"},{internalType:"string",name:"_name",type:"string"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"modifySinglePart",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"",type:"uint32"}],name:"partInfo",outputs:[{internalType:"uint8",name:"partType",type:"uint8"},{internalType:"string",name:"name",type:"string"},{internalType:"uint256",name:"value",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"",type:"uint8"},{internalType:"uint256",name:"",type:"uint256"}],name:"partTypes",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}],PowaWormsArena:[{inputs:[{internalType:"uint32",name:"_advantage",type:"uint32"}],name:"addStage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_charId",type:"uint256"},{internalType:"bool",name:"_state",type:"bool"}],name:"banPlayerState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"battle",outputs:[{internalType:"uint256",name:"_battleID",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint32",name:"_stageToConfig",type:"uint32"},{internalType:"uint32",name:"_advantage",type:"uint32"}],name:"modifyStageAdvantage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_powaWormsCharacters",type:"address"},{internalType:"address",name:"_tokenRewardAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"battleID",type:"uint256"}],name:"Battle",type:"event"},{inputs:[{internalType:"uint256",name:"characterId",type:"uint256"}],name:"buyAttackRecharge",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"characterId",type:"uint256"},{internalType:"uint256",name:"daysToBuy",type:"uint256"}],name:"buyDefenceCooldown",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"characterId",type:"uint256"},{internalType:"uint8",name:"attributeToUp",type:"uint8"}],name:"buyLevel",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"nftIndexTemp",type:"uint256"}],name:"claimNFTandRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quantity",type:"uint256"}],name:"claimOnlyRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint32",name:"_classToConfig",type:"uint32"},{internalType:"uint32",name:"_advantage",type:"uint32"}],name:"configClassAdvantage",outputs:[],stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[{internalType:"uint256",name:"nftID",type:"uint256"}],name:"rechargeBalanceNFT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"recoverFeeBalance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"nftID",type:"uint256"}],name:"registerNFT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_intValue",type:"uint256"}],name:"setAmountTokenForRegister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_valueInSeconds",type:"uint256"}],name:"setAttackCooldown",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"_value",type:"uint8"}],name:"setAttacksAvailableBeforeCooldown",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_value",type:"uint256"}],name:"setBaseExperienceForBattle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_valueInWei",type:"uint256"}],name:"setBasePriceToBuyCoolDown",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_valueInWei",type:"uint256"}],name:"setBasePriceToBuyLevels",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_intValue",type:"uint256"}],name:"setBasePrizeForBattle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_state",type:"bool"}],name:"setBattleFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"setBattleFeePercent",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_valueInSeconds",type:"uint256"}],name:"setBuyAttackRechargeCooldownTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_valueInSeconds",type:"uint256"}],name:"setDefenceCooldown",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newAddress",type:"address"}],name:"setFeeReceiver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_state",type:"bool"}],name:"setGamePaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_value",type:"uint256"}],name:"setMaxAvailableLevelsToBuy",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_value",type:"uint256"}],name:"setMaxDaysToBuyCoolDown",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_valueInSeconds",type:"uint256"}],name:"setMinLockTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_newMaxLevel",type:"uint256"}],name:"setNewMaxLevel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newAddress",type:"address"}],name:"setPowaWormsCharacters",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_valueInWei",type:"uint256"}],name:"setPriceToBuyAttackRecharge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"setRandomMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newAddress",type:"address"}],name:"setRewardTokenAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"setSaltOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"characterId",type:"uint256"},{internalType:"uint8",name:"attributeToUp",type:"uint8"}],name:"upLevel",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"amountTokenForRegister",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"attackCooldown",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"attacksAvailableBeforeCooldown",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"autoEliminatedOfPlayerList",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"bannedPlayers",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"baseExperienceForBattle",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"basePriceToBuyCoolDown",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"basePriceToBuyLevels",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"basePrizeForBattle",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"battleFee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"battleFeeBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"battleFeePercent",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"battleHistory",outputs:[{internalType:"uint256",name:"attackCharacter",type:"uint256"},{internalType:"uint256",name:"defenceCharacter",type:"uint256"},{internalType:"uint256",name:"totalAttackPower",type:"uint256"},{internalType:"uint256",name:"totalDefencePower",type:"uint256"},{internalType:"uint256",name:"finalAttackPower",type:"uint256"},{internalType:"uint256",name:"finalDefencePower",type:"uint256"},{internalType:"bool",name:"luckyActive",type:"bool"},{internalType:"uint32",name:"stage",type:"uint32"},{internalType:"uint256",name:"result",type:"uint256"},{internalType:"uint256",name:"seed",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"},{internalType:"uint256",name:"prizeRaw",type:"uint256"},{internalType:"uint256",name:"prizeMinusPerc",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"battleID",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"buyAttackRechargeCooldown",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"buyAttackRechargeCooldownTime",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"buyDefenseCooldownRecharge",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"characterAttributes",outputs:[{internalType:"uint32",name:"attackPower",type:"uint32"},{internalType:"uint32",name:"defencePower",type:"uint32"},{internalType:"uint32",name:"dexterity",type:"uint32"},{internalType:"uint32",name:"lucky",type:"uint32"},{internalType:"uint32",name:"nftClass",type:"uint32"},{internalType:"uint256",name:"partsPower",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"characterBuyedLevels",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"characterOfPlayer",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"characterStats",outputs:[{internalType:"bool",name:"initialized",type:"bool"},{internalType:"uint256",name:"level",type:"uint256"},{internalType:"uint256",name:"experienceTotal",type:"uint256"},{internalType:"uint256",name:"experienceInLevel",type:"uint256"},{internalType:"uint256",name:"experienceForNextLevel",type:"uint256"},{internalType:"uint256",name:"attackWins",type:"uint256"},{internalType:"uint256",name:"defenceWins",type:"uint256"},{internalType:"uint256",name:"attackLost",type:"uint256"},{internalType:"uint256",name:"defenceLost",type:"uint256"},{internalType:"uint256",name:"draw",type:"uint256"},{internalType:"uint256",name:"totalBattleCount",type:"uint256"},{internalType:"uint256",name:"defenceTimestampCooldown",type:"uint256"},{internalType:"uint256",name:"attackTimestampCooldown",type:"uint256"},{internalType:"uint8",name:"attacksAvailable",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"characterTokenBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"",type:"uint32"}],name:"classAdvantage",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"defenceCooldown",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeReceiver",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"gamePaused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"nftID",type:"uint256"},{internalType:"uint256",name:"start",type:"uint256"},{internalType:"uint256",name:"end",type:"uint256"},{internalType:"bool",name:"reverse",type:"bool"}],name:"getNFTBattleHistory",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"nftId",type:"uint256"}],name:"getNftLevel",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"isPlaying",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"lastRandomGenerated",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxAvailableLevelsToBuy",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxDaysToBuyCoolDown",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLevel",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxStages",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"minLockTime",outputs:
9688[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"minLockTimeForCharacter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"ownerOfCharacter",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"playerList",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"playerRegistered",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"playersLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"powaWormsCharacters",outputs:[{internalType:"contract IPowaWormsCharacters",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"priceToBuyAttackRecharge",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"randomMode",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"randomNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"nftId",type:"uint256"},{internalType:"uint256",name:"indexStart",type:"uint256"},{internalType:"uint256",name:"indexEnd",type:"uint256"}],name:"searchIndexOfPlayer",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"",type:"uint32"}],name:"stagesAdv",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"tokenRewardAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],PowaWormsMinter:[{inputs:[{internalType:"address",name:"_nftContract",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint256",name:"cost",type:"uint256"},{indexed:!1,internalType:"uint256",name:"payed",type:"uint256"},{indexed:!1,internalType:"uint256",name:"tokenID",type:"uint256"},{indexed:!1,internalType:"bool",name:"discount",type:"bool"},{indexed:!1,internalType:"address",name:"referAddress",type:"address"}],name:"BuyNFT",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"NFTOriginalBuyer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"Sweep",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_state",type:"bool"},{internalType:"address",name:"_tokenContract",type:"address"},{internalType:"uint256",name:"_minTokensRequireINT",type:"uint256"},{internalType:"uint8",name:"_discountPercent",type:"uint8"}],name:"addTokenPartnerDiscount",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"baseCost",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_refer",type:"bool"},{internalType:"address",name:"_referAddress",type:"address"}],name:"buy",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"buyersCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"buyersList",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"checkTokenPartnerUserBestDiscount",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenContract",type:"address"}],name:"checkTokenPartnerUserCompliance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"collectionWallet",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"contractAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMinCostForUser",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenContract",type:"address"}],name:"getTokenPartnerInfo",outputs:[{components:[{internalType:"bool",name:"enable",type:"bool"},{internalType:"address",name:"tokenContract",type:"address"},{internalType:"uint8",name:"tokenDecimals",type:"uint8"},{internalType:"uint256",name:"minTokensRequireINT",type:"uint256"},{internalType:"uint256",name:"minTokensRequire",type:"uint256"},{internalType:"uint8",name:"discountPercent",type:"uint8"}],internalType:"struct PowaWormsCharactersMint.tokenPartnerDiscount",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getUserRewardsCollected",outputs:[{components:[{internalType:"uint256",name:"quantityMint",type:"uint256"},{internalType:"uint256",name:"totalAmount",type:"uint256"},{internalType:"uint256",name:"lastTimestamp",type:"uint256"}],internalType:"struct PowaWormsCharactersMint.rewardsCollected",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"lock",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"_state",type:"bool"},{internalType:"address",name:"_tokenContract",type:"address"},{internalType:"uint256",name:"_minTokensRequireINT",type:"uint256"},{internalType:"uint8",name:"_discountPercent",type:"uint8"}],name:"modifyTokenPartnerDiscount",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"percentForRefer",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tokenContract",type:"address"}],name:"removeTokenPartnerDiscount",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_cost",type:"uint256"}],name:"setBaseCost",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_collectionWallet",type:"address"}],name:"setCollectionWallet",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_state",type:"bool"}],name:"setLockSell",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_contractAddress",type:"address"}],name:"setNFTContract",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_value",type:"uint256"}],name:"setPercentForRefer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_state",type:"bool"}],name:"setTokenPartnersDiscountState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"tokenPartnersDiscountEnabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"tokensSold",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}],erc20:[{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"success",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"showMeTheMoney",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"success",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"success",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"_from",type:"address"},{indexed:!0,name:"_to",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_owner",type:"address"},{indexed:!0,name:"_spender",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"Approval",type:"event"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"remaining",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}]},pN=hN,fN="0x0000000000000000000000000000000000000000",mN={1:{GameToken:"",PowaWormsCharacters:"",PowaWormsPartsMetadata:"",PowaWormsArena:""},56:{GameToken:["0x5FDa925294F9e5B31b7c0e81Bad6BAD5b5E792eE","0xcb8382B4F7Bc012F0eff12e62Ca2801F54aca975","0x55d398326f99059fF775485246999027B3197955"],PowaWormsCharacters:"0x598528CFe1a49a7E1224698D171E7827bc4e3F16",PowaWormsPartsMetadata:"0x4CF7D59b7cfC02c7Ce0e22B108b6A1A180a8D492",PowaWormsArena:["0x0bd7D08f6116637249E934Ec68D39ec47c8dC02e","0x7fD098774452b69DD98229b8937588B62C962fBa","0x8d252FA1062914952d8F6534133a458a4e9a38C2"],PowaWormsMinter:"0x7808fC0Ef81d922Ece008E5e69E
9688d43ae565Fd731"},97:{GameToken:"",PowaWormsCharacters:"",PowaWormsPartsMetadata:"",PowaWormsArena:""},137:{GameToken:"",PowaWormsCharacters:"",PowaWormsPartsMetadata:"",PowaWormsArena:""},42440:{GameToken:["0x8272FE566De40938D306646b23901885AA6C0502"],PowaWormsCharacters:"0x89Bd6E87FcbD9De24E013c8151A62284Fc64024D",PowaWormsPartsMetadata:"0x713BA558403E8eD23BBa60868C2b623b5B7C390E",PowaWormsArena:["0x2c13Ea98BAF6b93d9ef6a457D8e8B19537991c4A"],PowaWormsMinter:"0x59a367ff2e7b1f42cbc708250bf72c40e29bbbda"},16507:{GameToken:"",PowaWormsCharacters:"",PowaWormsPartsMetadata:"",PowaWormsArena:""},8453:{GameToken:["0x67838fc7dC7E801A0C02Fd0ac1e667a2Affd0e5E"],PowaWormsCharacters:"0xF96eCB4C568529016e0D157633166c153002E8Ff",PowaWormsPartsMetadata:"0xD0A3d351Eab9e4984B5d6648Dd4f8FcAF0e48958",PowaWormsArena:["0x4CF7D59b7cfC02c7Ce0e22B108b6A1A180a8D492","0x8d252FA1062914952d8F6534133a458a4e9a38C2","0x02e280ff4Dd79D34567F9e4E552812F91d983902"],PowaWormsMinter:"0x4A32bB41F72151c95ac1C34C2df05BB8003e1e36"}},gN={56:"0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",8453:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},yN={56:"0x55d398326f99059ff775485246999027b3197955",97:"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",16507:"0x766c8aed079d43d6b29da8792b818373b933d80e"},vN={56:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",97:"0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd",16507:"0xaa7ae83eb30dddd14a017d4222121776317ea8ba",42440:"0x7606c6f637a2352aa9cb24855c867609c84dce11",8453:"0x4200000000000000000000000000000000000006"},wN={56:[{index:0,id:1,name:"POWA Arena (MID)",urlName:"powa",GameToken:mN[56].GameToken[0],PowaWormsArena:mN[56].PowaWormsArena[0],tokenDecimals:18,tokenName:"Powabit Token",tokenSymbol:"POWA"},{index:1,id:2,name:"BBTC Arena (MID)",urlName:"bbtc",GameToken:mN[56].GameToken[1],PowaWormsArena:mN[56].PowaWormsArena[1],tokenDecimals:18,tokenName:"Baby Bitcoin",tokenSymbol:"BBTC"},{index:2,id:3,name:"USDT Arena (MID)",urlName:"usdt",GameToken:mN[56].GameToken[2],PowaWormsArena:mN[56].PowaWormsArena[2],tokenDecimals:18,tokenName:"Theter USD",tokenSymbol:"USDT"}],42440:[{index:0,id:1,name:"TEST Arena",urlName:"gametok",GameToken:mN[42440].GameToken[0],PowaWormsArena:mN[42440].PowaWormsArena[0],tokenDecimals:18,tokenName:"TOKGAM",tokenSymbol:"TOKGAM"}],8453:[{index:0,id:1,name:"NILEX Arena (LOW)",urlName:"nilex-low",GameToken:mN[8453].GameToken[0],PowaWormsArena:mN[8453].PowaWormsArena[0],tokenDecimals:18,tokenName:"Nitro Layer",tokenSymbol:"NILEX"},{index:1,id:2,name:"NILEX Arena (MID)",urlName:"nilex-mid",GameToken:mN[8453].GameToken[0],PowaWormsArena:mN[8453].PowaWormsArena[1],tokenDecimals:18,tokenName:"Nitro Layer",tokenSymbol:"NILEX"},{index:2,id:3,name:"NILEX Arena (HIGH)",urlName:"nilex-high",GameToken:mN[8453].GameToken[0],PowaWormsArena:mN[8453].PowaWormsArena[2],tokenDecimals:18,tokenName:"Nitro Layer",tokenSymbol:"NILEX"}]};class bN extends c.Component{constructor(e){super(e),this.state={chainConnected:!1}}get collapsable(){return!0}get chainAddUrl(){return this.state.chainConnected&&aN(this.state.chainConnected).urlName?"?chain="+aN(this.state.chainConnected).urlName:""}get gameArenasList(){return!(!this.state.chainConnected||!aN(this.state.chainConnected).compatible)&&wN[this.state.chainConnected]}componentDidMount(){this.refresh(),window.sidebar_ChainConnected_Interval=setInterval((()=>this.refresh()),2e3)}refresh(){const e=_2.networkId;e!==this.state.chainConnected&&this.setState({...this.state,chainConnected:e})}mobileCheck(){let e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
9688sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e}componentDidUpdate(){this.mobileCheck&&document.querySelector("body").classList.remove("toggle-sidebar")}renderMenuGroupHeader(e,t,n){return(0,iN.jsxs)(iN.Fragment,{children:[this.collapsable?(0,iN.jsxs)("a",{className:"nav-link collapsed","data-bs-target":"#"+t,"data-bs-toggle":"collapse",children:[(0,iN.jsx)("i",{className:n}),(0,iN.jsx)("span",{children:e}),this.collapsable?(0,iN.jsx)("i",{className:"bi bi-chevron-down ms-auto"}):null]}):null,this.collapsable?null:(0,iN.jsxs)("span",{className:"p-3 text-primary fw-600",children:[(0,iN.jsx)("i",{className:n||"bi bi-gem"}),(0,iN.jsx)("span",{className:"text-primary ps-2",children:e})]})]})}renderMenuStandaloneHeader(e,t,n){return(0,iN.jsxs)(iN.Fragment,{children:[(0,iN.jsx)(Pe,{to:n,children:this.collapsable?(0,iN.jsxs)("span",{className:"nav-link standalone",children:[(0,iN.jsx)("i",{className:t}),(0,iN.jsx)("span",{children:e})]}):null}),this.collapsable?null:(0,iN.jsxs)("span",{className:"p-3 text-primary fw-600",children:[(0,iN.jsx)("i",{className:t||"bi bi-gem"}),(0,iN.jsx)("span",{className:"text-primary ps-2",children:e})]})]})}renderMenuStandaloneHeaderExternal(e,t,n){return(0,iN.jsxs)(iN.Fragment,{children:[(0,iN.jsx)("a",{href:n,target:"_blank",children:this.collapsable?(0,iN.jsxs)("span",{className:"nav-link standalone",children:[(0,iN.jsx)("i",{className:t}),(0,iN.jsx)("span",{children:e})]}):null}),this.collapsable?null:(0,iN.jsxs)("span",{className:"p-3 text-primary fw-600",children:[(0,iN.jsx)("i",{className:t||"bi bi-gem"}),(0,iN.jsx)("span",{className:"text-primary ps-2",children:e})]})]})}renderMenuComingSoonHeader(e,t,n){return(0,iN.jsxs)(iN.Fragment,{children:[(0,iN.jsx)(Pe,{to:n,children:this.collapsable?(0,iN.jsxs)("span",{className:"nav-link standalone",children:[(0,iN.jsx)("i",{className:t}),(0,iN.jsx)("span",{children:e}),(0,iN.jsx)("sup",{className:"menuComingSoon",children:"Soon!"})]}):null}),this.collapsable?null:(0,iN.jsxs)("span",{className:"p-3 text-primary fw-600",children:[(0,iN.jsx)("i",{className:t||"bi bi-gem"}),(0,iN.jsx)("span",{className:"text-primary ps-2",children:e})]})]})}renderMenuComingSoonHeaderExternal(e,t,n){return(0,iN.jsxs)(iN.Fragment,{children:[(0,iN.jsx)("a",{href:n,target:"_blank",children:this.collapsable?(0,iN.jsxs)("span",{className:"nav-link standalone",children:[(0,iN.jsx)("i",{className:t}),(0,iN.jsx)("span",{children:e}),(0,iN.jsx)("sup",{className:"menuComingSoon",children:"Soon!"})]}):null}),this.collapsable?null:(0,iN.jsxs)("span",{className:"p-3 text-primary fw-600",children:[(0,iN.jsx)("i",{className:t||"bi bi-gem"}),(0,iN.jsx)("span",{className:"text-primary ps-2",children:e})]})]})}setIsDark(e){const t=document.getElementById("ant_style");e?(document.body.className="theme-dark",t.href="assets/css/ant_dark.css"):(document.body.className="theme-light",t.href="assets/css/ant.css")}render(){return(0,iN.jsxs)("aside",{id:"sidebar",className:"sidebar",children:[(0,iN.jsxs)(Pe,{to:"/",className:"logo-mobile logo d-flex align-items-center px-2 actionable actionable-sm",children:[(0,iN.jsx)("img",{className:"logo_dark",src:"assets/img/logo_dark.png",alt:"Logo"}),(0,iN.jsx)("img",{className:"logo_light",src:"assets/img/logo_light.png",alt:"Logo"})]}),(0,iN.jsx)("div",{className:"earlyAccessContainer",children:(0,iN.jsx)("span",{className:"earlyAccessTitle",children:"Beta Season"})}),(0,iN.jsxs)("ul",{className:"sidebar-nav",id:"sidebar-nav",children:[(0,iN.jsx)("li",{className:"nav-item",children:(0,iN.jsxs)(Pe,{to:"/"+this.chainAddUrl,className:"/"===this.props.actualPage?"nav-link":"nav-link collapsed",children:[(0,iN.jsx)("i",{className:"bi bi-grid"}),(0,iN.jsx)("span",{children:"Dashboard"})]})}),(0,iN.jsx)("li",{className:"nav-item",children:(0,iN.jsxs)(Pe,{to:"/my"+this.chainAddUrl,className:"/my"===this.props.actualPage?"nav-link":"nav-link collapsed",children:[(0,iN.jsx)("i",{className:"fa-solid fa-worm"}),(0,iN.jsx)("span",{children:"My Powa Worms"})]})}),(0,iN.jsx)("li",{className:"nav-item",children:(0,iN.jsxs)(Pe,{to:"/mint"+this.chainAddUrl,className:"/mint"===this.props.actualPage?"nav-link":"nav-link collapsed",children:[(0,iN.jsx)("i",{className:"fa-solid fa-egg"}),(0,iN.jsx)("span",{children:"Mint Worm"})]})}),(0,iN.jsx)("li",{className:"nav-item",children:(0,iN.jsxs)(Pe,{to:"/rewards"+this.chainAddUrl,className:"/rewards"===this.props.actualPage?"nav-link":"nav-link collapsed",children:[(0,iN.jsx)("i",{className:"fa-solid fa-sack-dollar"}),(0,iN.jsx)("span",{children:"Share & Earn"})]})}),(0,iN.jsxs)("li",{className:"nav-item",children:[this.renderMenuGroupHeader("Powa Arena","td-icons-nav","fa-solid fa-khanda"),(0,iN.jsxs)("ul",{id:"td-icons-nav",className:"nav-content "+(this.collapsable?"collapse":""),"data-bs-parent":"#sidebar-nav",children:[this.gameArenasList&&(0,iN.jsx)(iN.Fragment,{children:this.gameArenasList.map(((e,t)=>(0,iN.jsx)("li",{children:(0,iN.jsxs)(Pe,{to:"/arena/"+e.urlName+"/"+this.chainAddUrl,className:this.props.actualPage==="/arena/"+e.urlName?"nav-link":"nav-link collapsed",children:[(0,iN.jsx)("img",{className:"me-1",style:{maxWidth:"20px"},src:"/assets/img/arena_icon/"+this.state.chainConnected+"/"+e.id+"_alt.png"}),(0,iN.jsx)("span",{children:e.name})]})},t)))}),!this.gameArenasList&&(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("li",{children:(0,iN.jsxs)("a",{onClick:()=>window.openNetworkModal(),className:"/previewArena/"===this.props.actualPage?"nav-link":"nav-link collapsed",children:[(0,iN.jsx)("i",{className:"fa-solid fa-square-plus"}),(0,iN.jsx)("span",{children:"Connect to compatible network"})]})})})]})]}),(0,iN.jsx)("li",{className:"nav-item",children:this.renderMenuComingSoonHeader("Clan Wars","fa-solid fa-trophy","#")}),(0,iN.jsx)("li",{className:"nav-item",children:this.renderMenuComingSoonHeader("Marketplace","fa-solid fa-store","#")}),(0,iN.jsx)("li",{className:"nav-item",children:this.renderMenuStandaloneHeaderExternal("Docs","fa fa-book","https://nitrolayer.gitbook.io/powa-worms")}),(0,iN.jsxs)("li",{className:"nav-item",children:[this.renderMenuGroupHeader("Webs","webs-icons-nav","fa-solid fa-globe"),
9688(0,iN.jsxs)("ul",{id:"webs-icons-nav",className:"nav-content "+(this.collapsable?"collapse":""),"data-bs-parent":"#sidebar-nav",children:[(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://powaworms.com/",target:"_blank",children:"Powa Worms Web"})}),(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://powadap.com/",target:"_blank",children:"PowaDAP Platform"})}),(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://kinderswap.finance/",target:"_blank",children:"Kinderswap DEX"})}),(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://nitrolayer.org/",target:"_blank",children:"Nitro Layer Ecosystem Web"})}),(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://babybitcoin.finance/",target:"_blank",children:"Baby Bitcoin Web"})}),(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://devmexos.com/",target:"_blank",children:"Dev Mexos Blog"})})]})]}),(0,iN.jsxs)("li",{className:"nav-item",children:[this.renderMenuGroupHeader("Telegram","telegram-icons-nav","fa-solid fa-paper-plane"),(0,iN.jsxs)("ul",{id:"telegram-icons-nav",className:"nav-content "+(this.collapsable?"collapse":""),"data-bs-parent":"#sidebar-nav",children:[(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://t.me/NitroLayer",target:"_blank",children:"Nitro Layer Official Community"})}),(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://t.me/powaworms_game",target:"_blank",children:"Powa Worms Channel"})}),(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://t.me/PowaDAP",target:"_blank",children:"PowaDAP Channel"})}),(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://t.me/KinderSwapDEX",target:"_blank",children:"KinderSwap Channel"})})]})]}),(0,iN.jsxs)("li",{className:"nav-item",children:[this.renderMenuGroupHeader("Twitter","twitter-icons-nav","fa-brands fa-twitter"),(0,iN.jsxs)("ul",{id:"twitter-icons-nav",className:"nav-content "+(this.collapsable?"collapse":""),"data-bs-parent":"#sidebar-nav",children:[(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://x.com/NitroLayer",target:"_blank",children:"Nitro Layer Official Account"})}),(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://twitter.com/powadap",target:"_blank",children:"PowaDAP Official Account"})}),(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://twitter.com/KinderSwapDEX",target:"_blank",children:"KinderSwap DEX Account"})}),(0,iN.jsx)("li",{children:(0,iN.jsx)("a",{href:"https://twitter.com/DevMexos",target:"_blank",children:"Dev Mexos Account"})})]})]})]}),(0,iN.jsxs)("div",{className:"flex_box_theme_control d-none",children:[(0,iN.jsx)("button",{className:"light_theme",onClick:()=>this.setIsDark(!1),children:(0,iN.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 512 512",height:20,width:20,xmlns:"http://www.w3.org/2000/svg",children:[(0,iN.jsx)("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:32,d:"M256 48v48m0 320v48m147.08-355.08l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48m-320 0H48m355.08 147.08l-33.94-33.94M142.86 142.86l-33.94-33.94"}),(0,iN.jsx)("circle",{cx:256,cy:256,r:80,fill:"none",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:32})]})}),"/",(0,iN.jsx)("button",{className:"dark_theme",onClick:()=>this.setIsDark(!0),children:(0,iN.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 512 512",height:18,width:18,xmlns:"http://www.w3.org/2000/svg",children:(0,iN.jsx)("path",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z"})})})]})]})}}const xN=bN,EN={productName:"Powa Worms",ecosystemName:"Nitro Layer Ecosystem"},_N={productUrl:"https://powaworms.com",ecosystemUrl:"https://nitrolayer.org"};class kN extends c.Component{constructor(e){super(e),this.state={appName:EN.productName,ecoName:EN.ecosystemName,appUrl:_N.productUrl,ecoUrl:_N.ecosystemUrl,year:(new Date).getFullYear()}}render(){return(0,iN.jsx)("footer",{id:"footer",className:"footer mt-4",children:(0,iN.jsxs)("div",{className:"copyright",children:["\xa9 Copyright ",this.state.year," ",(0,iN.jsx)("strong",{children:(0,iN.jsx)("span",{children:this.state.appName})})," - A product of ",(0,iN.jsx)("strong",{children:(0,iN.jsx)("span",{children:(0,iN.jsx)("a",{target:"_blank",href:this.state.ecoUrl,children:this.state.ecoName})})})," - All Rights Reserved.",(0,iN.jsx)("br",{}),(0,iN.jsx)("a",{target:"_blank",href:"https://nitrolayer.gitbook.io/powa-worms/information/privacy-policy",children:"Privacy Policy"})," - ",(0,iN.jsx)("a",{target:"_blank",href:"https://nitrolayer.gitbook.io/powa-worms/information/terms-of-service",children:"Terms of Service"})]})})}}const CN=kN;class AN extends c.Component{constructor(e){super(e),window.walletRequiredInterval&&clearInterval(window.walletRequiredInterval),this.state={componentId:window.componentId++,isConnected:!1}}componentDidMount(){this.refresh(),window.walletRequiredInterval=setInterval((()=>this.refresh()),1e3)}componentWillUnmount(){clearInterval(window.walletRequiredInterval)}refresh(){const e=_2.isConnected,t=_2.networkId;e!==this.state.isConnected&&(this.setState({...this.state,isConnected:e}),this.props.onStatusChange&&this.props.onStatusChange(e,t))}render(){return this.state.isConnected?null:(0,iN.jsx)("div",{className:"walletDisconnectedAlert gradient-border",role:"alert",children:(0,iN.jsxs)("div",{className:"walletDisconnectedAlert_inner",children:[(0,iN.jsx)("img",{src:"/assets/img/arenadeco2.png",alt:"Wallet disconnected",className:"walletDisconnectedImage2"}),(0,iN.jsxs)("strong",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-circle-exclamation"})," Wallet disconnected"]}),(0,iN.jsx)("br",{}),"Please, connect your web3 wallet to use this tool.",(0,iN.jsx)("br",{}),(0,iN.jsx)("button",{onClick:()=>window.openNetworkModal(),className:"btn btn-primary rounded-pill px-4 d-block m-auto my-3",children:(0,iN.jsxs)("span",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-right-to-bracket"})," Connect to compatible network"]})}),(0,iN.jsx)("a",{href:"https://nitrolayer.gitbook.io/powa-worms/introduction/connect-wallet",target:"_blank",children:(0,iN.jsx)("strong",{children:"How can I connect my wallet?"})})]})})}}const SN=AN;class IN{static goToTop(){window.scrollTo(0,0)}static showLoader(){window.showLoader()}
9688static hideLoader(){window.hideLoader()}static showError(e){window.Swal.fire(IN.getErrorMsg(e))}static toastSuccess(e){window.Swal.fire({position:"bottom-end",icon:"success",titleText:e,showConfirmButton:!1,timer:3e3,toast:!0})}static toastWarning(e){window.Swal.fire({position:"bottom-end",icon:"warning",titleText:e,showConfirmButton:!1,timer:3e3,toast:!0})}static toastError(e){window.Swal.fire({position:"bottom-end",icon:"error",titleText:IN.getErrorMsg(e),showConfirmButton:!1,timer:3e3,toast:!0})}static getErrorMsg(e){return e&&"string"!==typeof e&&(e=e.message?e.message:`${e}`),e.includes("logsBloom")&&(e="Transaction has been reverted by the EVM."),e||"Error"}static copyToClipboard(e){var t=document.createElement("textarea");document.body.appendChild(t),t.value=e,t.select(),document.execCommand("copy"),document.body.removeChild(t)}static copyToClipboardAlt(e){navigator.clipboard.writeText(e)}static mobileCheck(){let e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e}}const TN=IN;class PN extends c.Component{constructor(e){super(e),this.state={error:null,errorInfo:null}}componentDidCatch(e,t){console.error(e,t),TN.showError("An error has occured. "+TN.getErrorMsg(e))}render(){return this.props.children}}const NN=PN,RN=["/my","/worm","/arena","/mint","/rewards"],ON=e=>(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"pageloader1",children:(0,iN.jsxs)("div",{className:"boxes",children:[(0,iN.jsxs)("div",{className:"box",children:[(0,iN.jsx)("div",{}),(0,iN.jsx)("div",{}),(0,iN.jsx)("div",{}),(0,iN.jsx)("div",{})]}),(0,iN.jsxs)("div",{className:"box",children:[(0,iN.jsx)("div",{}),(0,iN.jsx)("div",{}),(0,iN.jsx)("div",{}),(0,iN.jsx)("div",{})]}),(0,iN.jsxs)("div",{className:"box",children:[(0,iN.jsx)("div",{}),(0,iN.jsx)("div",{}),(0,iN.jsx)("div",{}),(0,iN.jsx)("div",{})]}),(0,iN.jsxs)("div",{className:"box",children:[(0,iN.jsx)("div",{}),(0,iN.jsx)("div",{}),(0,iN.jsx)("div",{}),(0,iN.jsx)("div",{})]})]})})}),MN=e=>{const{isConnected:t,chainId:n,address:r}=rN(),{walletProvider:i}=tN(),{open:s}=HP(),{selectedNetworkId:o}=WP(),{switchNetwork:a}=nN(),{data:l}=function(){if(!zP)throw new Error('Please call "createWeb3Modal" before using "useWeb3ModalState" hook');const[e,t]=(0,c.useState)(zP.getEvent());return(0,c.useEffect)((()=>{const e=zP?.subscribeEvents((e=>{t({...e})}));return()=>{e?.()}}),[]),e}(),[u,d]=(ee(),(0,c.useState)(!1));(0,c.useEffect)((()=>{h()}),[t,n,o,r,e.forceCall]);const h=async()=>{e.onChangedStatus(t,n,o,r)};(0,c.useEffect)((()=>{e.switchNetworkCall&&!1!==e.switchNetworkCall&&p()}),[e.switchNetworkCall]);const p=async()=>{a(e.switchNetworkCall)};return null};class jN extends c.Component{constructor(e){super(e),this.state={initConnSync:!1,signal:0}}get pageNeedExplicitConn(){return e=this.props.actualPage.toLowerCase(),RN.includes(e);var e}testCompatibilty(){return aN(this.props.chainId).compatible}getConnectionObserver(){return(0,iN.jsx)(MN,{forceCall:this.state.initConnSync,onChangedStatus:(e,t,n,r)=>this.connStatusChanged({isConnected:e,chainId:t,selectedNetworkId:n,address:r})})}connStatusChanged(e){e.isConnected&&aN(e.chainId).compatible&&e.chainId!=_2.networkId?setTimeout((()=>{this.sendSignal(),this.connStatusChanged(e)}),500):this.sendSignal()}sendSignal(){this.setState({...this.state,signal:this.state.signal+1})}render(){return _2.isConnected?_2.isConnected?this.testCompatibilty()?this.pageNeedExplicitConn&&_2.networkId!=this.props.chainId?(0,iN.jsxs)(iN.Fragment,{children:[this.getConnectionObserver(),(0,iN.jsx)("section",{className:"section",children:(0,iN.jsx)(ON,{})})]}):(0,iN.jsxs)(iN.Fragment,{children:[this.getConnectionObserver(),(0,iN.jsx)("section",{className:"section",children:(0,iN.jsx)(ye,{})})]}):this.pageNeedExplicitConn?(0,iN.jsxs)(iN.Fragment,{children:[this.getConnectionObserver(),(0,iN.jsx)("div",{className:"d-flex align-items-center justify-content-center text-center",children:(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"mt-5",children:(0,iN.jsx)("img",{className:"",src:"/assets/img/logo_undefined.png",alt:"Network not compatible",style:{maxWidth:"100px",width:"100%"}})}),(0,iN.jsxs)("div",{className:"mt-3",children:["The current network you are connected to ",(0,iN.jsx)("strong",{children:"is not currently supported"})," by the application.",(0,iN.jsx)("br",{}),"Select a compatible network to use PowaDAP."]}),(0,iN.jsx)("div",{className:"mt-3",children:(0,iN.jsxs)("button",{onClick:()=>window.openNetworkModal(),className:"btn btn-primary btn_line_anim",children:[(0,iN.jsx)("span",{className:"animLine animLine_1"}),(0,iN.jsx)("span",{className:"animLine animLine_2"}),(0,iN.jsx)("span",{className:"animLine animLine_3"}),(0,iN.jsx)("span",{className:"animLine animLine_4"}),(0,iN.jsx)("i",{className:"fa-solid fa-gear fa-spin"})," Select compatible network"]})})]}),(0,iN.jsx)("div",{className:"mt-3",children:(0,iN.jsx)("a",{href:"https://nitrolayer.gitbook.io/powa-worms/introduction/connect-wallet",target:"_blank",children:"Why do I have this issue?"})})]})})]}):(0,iN.jsxs)(iN.Fragment,{children:[this.getConnectionObserver(),(0,iN.jsx)("section",{className:"section",children:(0,iN.jsx)(ye,{})})]}):void 0:this.pageNeedExplicitConn?(0,iN.jsxs)(iN.Fragment,{children:[this.getConnectionObserver(),(0,iN.jsx)(NN,{children:(0,iN.jsx)("div",{children:(0,iN.jsx)(SN,{})})}),TN.mobileCheck()&&null!=document.querySelector("#walletconnect-wrapper")&&(0,iN.jsx)("div",{className:"alert alert-warning alertMobileUseWallets",children:(0,iN.jsx)("span",{children:"If you're connected from a mobile device, we recommend using the wallets' built-in browsers to connect to the dapp."})})]}):(0,iN.jsxs)(iN.Fragment,{children:[this.getConnectionObserver(),(0,iN.jsx)("section",{className:"section",children:(0,iN.jsx)(ye,{})})]})}}const LN=jN;const DN=class{static getPathTitleAndSubtitle(e){let t,n,r,i,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=!1,a=!1;switch(e.toLowerCase()){case"/"+(s?"/":""):t="Dashboard",n="Start your adventure!",o=!0;break;case"/my"+(s?"/":""):t="My Powa Worms",n="Manage your Powaworms and see your statistics.",o=!0;break;case"/mint"+(s?"/":""):t="Mint Powa Worms",n="Generate your own Worm right now!",o=!0;break;case"/rewards"+(s?"/":""):t="Share & Earn",n="Earn rewards by inviting your friends with your referral link!",o=!0;break;case"/worm"+(s?"/":""):t="Worm Info";break;case"/arena"+(s?"/":""):t="Powa Arena",n="Choose your best worm and fight in the Arena!",o=!0;break;case"/arena/powa"+(s?"/":""):t="POWA Arena",n="Choose your best worm and fight in the Arena!",o=!0;break;case"/arena/gametok"+(s?"/":""):t="Test Arena",n="Choose your best worm and fight in the Arena!",o=!0;break;case"/arena/bbtc"+(s?"/":""):t="BBTC Arena",n="Choose your best worm and fight in the Arena!",o=!0;break;case"/arena/usdt"+(s?"/":""):t="USDT Arena",n="Choose your best worm and fight in the Arena!",o=!0;break;
9688case"/arena/nilex-low"+(s?"/":""):t="NILEX Arena (LOW)",n="Choose your best worm and fight in the Arena! This is a low bet arena.",o=!0;break;case"/arena/nilex-mid"+(s?"/":""):t="NILEX Arena (MID)",n="Choose your best worm and fight in the Arena! This is a mid bet arena.",o=!0;break;case"/arena/nilex-high"+(s?"/":""):t="NILEX Arena (HIGH)",n="Choose your best worm and fight in the Arena! This is a high bet arena.",o=!0;break;default:e.startsWith("/worm/")?t="Worm Info":(t="Error 404",n="Didn't find what you were looking for?",o=!0,a=!0,r="Ask in the community!",i="https://t.me/NitroLayer")}return{title:t,subTitle:n,isTitleVisible:!0,isSubTitleVisible:o,tutorial:a,tutorialTitle:r,tutorialLink:i}}};const BN=function(){const{address:e,chainId:t,isConnected:n}=rN(),r=ee(),[i,s]=(0,c.useState)(0),[o,a]=(0,c.useState)(0),[l,u]=(0,c.useState)(0),[d,h]=(0,c.useState)(0),[p,f]=(0,c.useState)(0),[m,g]=(0,c.useState)(0),[y,v]=(0,c.useState)(0),[w,b]=(0,c.useState)(0),[x,E]=(0,c.useState)(0);return window.hideLoader=()=>{f(""),g(!1)},window.showLoader=e=>{f(e||"Loading"),g(!0)},(0,c.useEffect)((()=>{let e=DN.getPathTitleAndSubtitle(r.pathname,!1);"Error 404"==e.title&&(e=DN.getPathTitleAndSubtitle(r.pathname,!0)),s(e.title),a(e.isTitleVisible),u(e.subTitle),h(e.isSubTitleVisible),g(!1),f(""),v(e.tutorial),b(e.tutorialTitle),E(e.tutorialLink),document.title=e.title+" - "+EN.productName}),[r]),(0,iN.jsxs)("div",{children:[m?(0,iN.jsx)("div",{className:"global-loader d-flex align-items-center justify-content-center",children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)("img",{src:"/assets/img/iso_min.png",className:"logoLoadingBox_img"}),(0,iN.jsx)("div",{className:"loadingTextContainer",children:(0,iN.jsxs)("h5",{className:"loadingText",children:[(0,iN.jsx)("span",{id:"loadingTextInfo",children:p}),(0,iN.jsx)("span",{className:"dotLoading-one",children:" ."})," ",(0,iN.jsx)("span",{className:"dotLoading-two",children:" ."})," ",(0,iN.jsx)("span",{className:"dotLoading-three",children:" ."})]})})]})}):null,(0,iN.jsx)(dN,{actualPage:r.pathname,lchainId:t}),(0,iN.jsx)(xN,{actualPage:r.pathname}),(0,iN.jsxs)("main",{id:"main",className:"main",children:[(0,iN.jsxs)("div",{className:"pageTitleContainer",children:[o&&(0,iN.jsx)("h1",{className:"pageTitle",children:i}),d&&(0,iN.jsx)("h2",{className:"pageSubtitle",children:l}),y&&(0,iN.jsxs)("a",{href:x,target:"_blank",className:"tutorialLink",children:[(0,iN.jsx)("i",{className:"fa-regular fa-circle-question"})," ",w]}),o&&(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsxs)("div",{className:"animatedSeparator my-4",children:[(0,iN.jsx)("div",{className:"animatedSeparator_light"}),(0,iN.jsx)("div",{className:"animatedSeparator_black_overlay"})]})})]}),(0,iN.jsx)(LN,{chainId:t,isConnected:n,actualPage:r.pathname})]}),(0,iN.jsx)(CN,{})]})};class UN extends c.Component{constructor(e){super(e),this.state={image:null,min:1,max:3}}setRandomModel(){let e="/assets/img/error404_"+(Math.floor(Math.random()*(this.state.max-this.state.min+1))+this.state.min)+".png";this.setState({...this.state,image:e})}componentDidMount(){this.setRandomModel()}render(){return(0,iN.jsxs)("div",{className:"error404Container",children:[(0,iN.jsx)("img",{className:"error404Img",src:this.state.image}),(0,iN.jsxs)("h3",{className:"error404Desc",children:[(0,iN.jsx)("a",{href:"https://powaworms.com",target:"_blank",children:"Powa Worms"})," image, a product of ",(0,iN.jsx)("a",{href:"https://nitrolayer.org",target:"_blank",children:"Nitro Layer Ecosystem"}),"."]})]})}}const FN=UN;const $N=function(){return(0,iN.jsx)("div",{children:(0,iN.jsx)(FN,{})})};var zN=n(2770);const HN={56:{img:"https://nft.powaworms.com/bsc/images/",json:"https://nft.powaworms.com/bsc/json/"},42440:{img:"https://nft.powaworms.com/gsys-testnet/images/",json:"https://nft.powaworms.com/gsys-testnet/json/"},16507:{img:"",json:""},8453:{img:"https://nft.powaworms.com/base/images/",json:"https://nft.powaworms.com/base/json/"}},WN={img:"/nfts/layers/",dictionary:"/nfts/partDictionary.json"};const qN=class{static transform(e){return 1===e?"Warrior":2===e?"Mage":3===e?"Shadow":4===e?"Fire":5===e?"Nature":6===e?"Water":e}};var VN,GN,KN=n(3232),ZN=n(554);!function(e){e.NUMBER="NUMBER_NUMBER",e.HEX="NUMBER_HEX",e.STR="NUMBER_STR",e.BIGINT="NUMBER_BIGINT"}(VN||(VN={})),function(e){e.HEX="BYTES_HEX",e.UINT8ARRAY="BYTES_UINT8ARRAY"}(GN||(GN={}));const YN={number:VN.BIGINT,bytes:GN.HEX},QN={number:VN.HEX,bytes:GN.HEX};var JN,XN;!function(e){e.EARLIEST="earliest",e.LATEST="latest",e.PENDING="pending",e.SAFE="safe",e.FINALIZED="finalized"}(JN||(JN={})),function(e){e.chainstart="chainstart",e.frontier="frontier",e.homestead="homestead",e.dao="dao",e.tangerineWhistle="tangerineWhistle",e.spuriousDragon="spuriousDragon",e.byzantium="byzantium",e.constantinople="constantinople",e.petersburg="petersburg",e.istanbul="istanbul",e.muirGlacier="muirGlacier",e.berlin="berlin",e.london="london",e.altair="altair",e.arrowGlacier="arrowGlacier",e.grayGlacier="grayGlacier",e.bellatrix="bellatrix",e.merge="merge",e.capella="capella",e.shanghai="shanghai"}(XN||(XN={}));const eR=Object.getPrototypeOf(Uint8Array);
9688var tR=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const nR=Symbol.for("web3/base-provider");class rR{static isWeb3Provider(e){return e instanceof rR||Boolean(e&&e[nR])}get[nR](){return!0}send(e,t){this.request(e).then((e=>{t(null,e)})).catch((e=>{t(e)}))}sendAsync(e){return tR(this,void 0,void 0,(function*(){return this.request(e)}))}asEIP1193Provider(){const e=Object.create(this),t=e.request;return e.request=function(e){return tR(this,void 0,void 0,(function*(){return(yield t(e)).result}))},e.asEIP1193Provider=void 0,e}}class iR extends Array{constructor(e){super(),this._accountProvider=e}}const sR=4001,oR=4100,aR=4200,cR=4900,lR=4901,uR=-32700,dR=-32600,hR=-32601,pR=-32602,fR=-32603,mR=-32e3,gR=-32001,yR=-32002,vR=-32003,wR=-32004,bR=-32005,xR=-32006;class ER extends Error{constructor(e,t){super(e),Array.isArray(t)?this.cause=new _R(t):this.cause=t,this.name=this.constructor.name,"function"===typeof Error.captureStackTrace?Error.captureStackTrace(new.target.constructor):this.stack=(new Error).stack}get innerError(){return this.cause instanceof _R?this.cause.errors:this.cause}set innerError(e){Array.isArray(e)?this.cause=new _R(e):this.cause=e}static convertToString(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null===e||void 0===e)return"undefined";const n=JSON.stringify(e,((e,t)=>"bigint"===typeof t?t.toString():t));return t&&["bigint","string"].includes(typeof e)?n.replace(/['\\"]+/g,""):n}toJSON(){return{name:this.name,code:this.code,message:this.message,cause:this.cause,innerError:this.cause}}}
9688class _R extends ER{constructor(e){super(`Multiple errors occurred: [${e.map((e=>e.message)).join("], [")}]`),this.code=208,this.errors=e}}class kR extends ER{constructor(e,t){super(`Invalid value given "${ER.convertToString(e,!0)}". Error: ${t}.`),this.name=this.constructor.name}}class CR extends ER{constructor(){super("Private key must be 32 bytes."),this.code=701}}class AR extends ER{constructor(){super("Invalid Private Key, Not a valid string or uint8Array"),this.code=702}}class SR extends ER{constructor(e){super(`"${e}"`),this.code=802}}class IR extends ER{constructor(){super("Invalid key derivation function"),this.code=703}}class TR extends ER{constructor(){super("Key derivation failed - possibly wrong password"),this.code=704}}class PR extends ER{constructor(){super("Unsupported key store version"),this.code=705}}class NR extends ER{constructor(){super("Password cannot be empty"),this.code=706}}class RR extends ER{constructor(){super("Initialization vector must be 16 bytes"),this.code=707}}class OR extends ER{constructor(){super("c > 1000, pbkdf2 is less secure with less iterations"),this.code=709}}class MR extends ER{constructor(e,t){super(e),this.code=500,t&&(this.errorCode=t.code,this.errorReason=t.reason)}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{errorCode:this.errorCode,errorReason:this.errorReason})}}class jR extends MR{constructor(e){super("Connection not open",e),this.code=503}}class LR extends MR{constructor(e){super(`Maximum number of reconnect attempts reached! (${e})`),this.code=505}}class DR extends MR{constructor(){super("CONNECTION ERROR: Provider started to reconnect before the response got received!"),this.code=506}}class BR extends MR{constructor(e){super(`Request already sent with following id: ${e}`),this.code=507}}class UR extends ER{constructor(e,t){super(e),this.code=300,this.receipt=t}}class FR extends ER{constructor(e,t){super(`The resolver at ${e} does not implement requested method: "${t}".`),this.address=e,this.name=t,this.code=301}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{address:this.address,name:this.name})}}class $R extends UR{constructor(e){if(super(e.message||"Error"),this.name="name"in e&&e.name||this.constructor.name,this.stack="stack"in e&&e.stack||void 0,this.code=e.code,"object"===typeof e.data){let t;t=e.data&&"originalError"in e.data?e.data.originalError:e.data,this.data=t.data,this.cause=new $R(t)}else this.data=e.data}setDecodedProperties(e,t,n){this.errorName=e,this.errorSignature=t,this.errorArgs=n}toJSON(){let e=Object.assign(Object.assign({},super.toJSON()),{data:this.data});return this.errorName&&(e=Object.assign(Object.assign({},e),{errorName:this.errorName,errorSignature:this.errorSignature,errorArgs:this.errorArgs})),e}}class zR extends UR{constructor(e){super("Error happened while trying to execute a function inside a smart contract"),this.code=310,this.cause=new $R(e)}}class HR extends kR{constructor(e){var t,n;super(`data: ${null!==(t=e.data)&&void 0!==t?t:"undefined"}, input: ${null!==(n=e.input)&&void 0!==n?n:"undefined"}`,'You can\'t have "data" and "input" as properties of a contract at the same time, please use either "data" or "input" instead.'),this.code=311}}class WR extends ER{constructor(e){super(`ENS is not supported on network ${e}`),this.code=902}}class qR extends ER{constructor(){super("Network not synced"),this.code=903}}class VR extends ER{constructor(e){super(`Invalid parameters passed. "${"undefined"!==typeof e?e:""}"`),this.hint=e,this.code=207}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{hint:this.hint})}}class GR extends ER{constructor(){super(...arguments),this.code=201}}class KR extends ER{constructor(){super("The method you're trying to call is not implemented."),this.code=202}}class ZR extends ER{constructor(){super(...arguments),this.code=203}}class YR extends ER{constructor(){super(...arguments),this.code=204}}class QR extends ER{constructor(e,t){super(e),this.code=205,this.props=null!==t&&void 0!==t?t:{}}}
9688class JR extends ER{constructor(e){super(`A plugin with the namespace: ${e} has already been registered.`),this.code=206}}class XR extends ER{constructor(){super(...arguments),this.code=600}}class eO extends ER{constructor(e){super(`Client URL "${e}" is invalid.`),this.code=602}}class tO extends ER{constructor(){super(...arguments),this.code=603}}class nO extends ER{constructor(){super(...arguments),this.code=604}}class rO extends kR{constructor(){super(...arguments),this.code=801}}class iO extends ER{constructor(e,t){super(e),this.receipt=t,this.code=400}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{receipt:this.receipt})}}class sO extends ER{constructor(e,t,n,r){super("Transaction has been reverted by the EVM"+(void 0===n?"":`:\n ${ER.convertToString(n)}`)),this.reason=e,this.signature=t,this.receipt=n,this.data=r,this.code=402}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reason:this.reason,signature:this.signature,receipt:this.receipt,data:this.data})}}class oO extends sO{constructor(e,t,n,r,i,s,o){super(e),this.reason=e,this.customErrorName=t,this.customErrorDecodedSignature=n,this.customErrorArguments=r,this.signature=i,this.receipt=s,this.data=o,this.code=438}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reason:this.reason,customErrorName:this.customErrorName,customErrorDecodedSignature:this.customErrorDecodedSignature,customErrorArguments:this.customErrorArguments,signature:this.signature,receipt:this.receipt,data:this.data})}}class aO extends iO{constructor(e){super("Transaction has been reverted by the EVM"+(void 0===e?"":`:\n ${ER.convertToString(e)}`),e),this.code=405}}class cO extends iO{constructor(){super("Raw transaction undefined"),this.code=407}}class lO extends iO{constructor(){super("Transaction not found"),this.code=430}}class uO extends kR{constructor(e){super(e,"invalid transaction with invalid sender"),this.code=408}}class dO extends kR{constructor(e){super(e,"invalid transaction with invalid receiver"),this.code=437}}class hO extends kR{constructor(){super("MissingCustomChainError","If tx.common is provided it must have tx.common.customChain"),this.code=410}}class pO extends kR{constructor(){super("MissingCustomChainIdError","If tx.common is provided it must have tx.common.customChain and tx.common.customChain.chainId"),this.code=411}}class fO extends kR{constructor(e){super(JSON.stringify(e),"Chain Id doesnt match in tx.chainId tx.common.customChain.chainId"),this.code=412}}class mO extends kR{constructor(e){super(JSON.stringify(e),"Chain doesnt match in tx.chain tx.common.basechain"),this.code=435}}class gO extends kR{constructor(e){super(JSON.stringify(e),"hardfork doesnt match in tx.hardfork tx.common.hardfork"),this.code=436}}class yO extends kR{constructor(){super("CommonOrChainAndHardforkError","Please provide the common object or the chain and hardfork property but not all together."),this.code=413}}class vO extends kR{constructor(e){var t,n;super("MissingChainOrHardforkError",`When specifying chain and hardfork, both values must be defined. Received "chain": ${null!==(t=e.chain)&&void 0!==t?t:"undefined"}, "hardfork": ${null!==(n=e.hardfork)&&void 0!==n?n:"undefined"}`),this.code=414}}class wO extends ER{constructor(){super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions'),this.code=440}}class bO extends kR{constructor(e){var t,n,r,i;super(`gas: ${null!==(t=e.gas)&&void 0!==t?t:"undefined"}, gasPrice: ${null!==(n=e.gasPrice)&&void 0!==n?n:"undefined"}, maxPriorityFeePerGas: ${null!==(r=e.maxPriorityFeePerGas)&&void 0!==r?r:"undefined"}, maxFeePerGas: ${null!==(i=e.maxFeePerGas)&&void 0!==i?i:"undefined"}`,'"gas" is missing'),this.code=415,this.cause=new wO}}class xO extends ER{constructor(){super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions, not both'),this.code=441}}class EO extends kR{constructor(e){var t,n,r,i;super(`gas: ${null!==(t=e.gas)&&void 0!==t?t:"undefined"}, gasPrice: ${null!==(n=e.gasPrice)&&void 0!==n?n:"undefined"}, maxPriorityFeePerGas: ${null!==(r=e.maxPriorityFeePerGas)&&void 0!==r?r:"undefined"}, maxFeePerGas: ${null!==(i=e.maxFeePerGas)&&void 0!==i?i:"undefined"}`,"transaction must specify legacy or fee market gas properties, not both"),this.code=434,this.cause=new xO}}class _O extends kR{constructor(e){var t,n;super(`gas: ${null!==(t=e.gas)&&void 0!==t?t:"undefined"}, gasPrice: ${null!==(n=e.gasPrice)&&void 0!==n?n:"undefined"}`,"Gas or gasPrice is lower than 0"),this.code=416}}class kO extends kR{constructor(e){var t,n;super(`maxPriorityFeePerGas: ${null!==(t=e.maxPriorityFeePerGas)&&void 0!==t?t:"undefined"}, maxFeePerGas: ${null!==(n=e.maxFeePerGas)&&void 0!==n?n:"undefined"}`,"maxPriorityFeePerGas or maxFeePerGas is lower than 0"),this.code=417}}class CO extends kR{constructor(e){super(e,"eip-1559 transactions don't support gasPrice"),this.code=418}}class AO extends kR{constructor(e){var t,n;super(`maxPriorityFeePerGas: ${null!==(t=e.maxPriorityFeePerGas)&&void 0!==t?t:"undefined"}, maxFeePerGas: ${null!==(n=e.maxFeePerGas)&&void 0!==n?n:"undefined"}
9688`,"pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas"),this.code=419}}class SO extends kR{constructor(e){super(e,"invalid transaction object"),this.code=420}}class IO extends kR{constructor(e){var t,n;super(`nonce: ${null!==(t=e.nonce)&&void 0!==t?t:"undefined"}, chainId: ${null!==(n=e.chainId)&&void 0!==n?n:"undefined"}`,"Nonce or chainId is lower than 0"),this.code=421}}class TO extends kR{constructor(){super("UnableToPopulateNonceError","unable to populate nonce, no from address available"),this.code=422}}class PO extends kR{constructor(){super("Eip1559NotSupportedError","Network doesn't support eip-1559"),this.code=423}}class NO extends kR{constructor(e){super(e,"unsupported transaction type"),this.code=424}}class RO extends kR{constructor(e){var t,n;super(`data: ${null!==(t=e.data)&&void 0!==t?t:"undefined"}, input: ${null!==(n=e.input)&&void 0!==n?n:"undefined"}`,'You can\'t have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.'),this.code=425}}class OO extends ER{constructor(e){super(`The connected Ethereum Node did not respond within ${e.numberOfSeconds} seconds, please make sure your transaction was properly sent and you are connected to a healthy Node. Be aware that transaction might still be pending or mined!\n\tTransaction Hash: ${e.transactionHash?e.transactionHash.toString():"not available"}`),this.code=431}}function MO(e){return`Please make sure your transaction was properly sent and there are no previous pending transaction for the same account. However, be aware that it might still be mined!\n\tTransaction Hash: ${e?e.toString():"not available"}`}class jO extends ER{constructor(e){super(`Transaction was not mined within ${e.numberOfSeconds} seconds. ${MO(e.transactionHash)}`),this.code=426}}class LO extends ER{constructor(e){super(`Transaction started at ${e.starterBlockNumber} but was not mined within ${e.numberOfBlocks} blocks. ${MO(e.transactionHash)}`),this.code=432}}class DO extends kR{constructor(e){var t,n;super(`receipt: ${JSON.stringify(e.receipt)}, blockHash: ${null===(t=e.blockHash)||void 0===t?void 0:t.toString()}, transactionHash: ${null===(n=e.transactionHash)||void 0===n?void 0:n.toString()}`,"Receipt missing or blockHash null"),this.code=427}}class BO extends kR{constructor(e){super(`receipt: ${JSON.stringify(e.receipt)}`,"Receipt missing block number"),this.code=428}}class UO extends ER{constructor(e){super(`Invalid signature. "${e}"`),this.code=433}}class FO extends kR{constructor(){super("LocalWalletNotAvailableError","Attempted to index account in local wallet, but no wallet is available"),this.code=429}}class $O extends ER{constructor(e,t){const n=[];e.forEach((e=>n.push(e.keyword))),super(`The following properties are invalid for the transaction type ${t}: ${n.join(", ")}`),this.code=439}}class zO extends kR{constructor(e){super(e,"can not parse as byte data"),this.code=1002}}class HO extends kR{constructor(e){super(e,"can not parse as number data"),this.code=1003}}class WO extends kR{constructor(e){super(e,"invalid ethereum address"),this.code=1005}}class qO extends kR{constructor(e){super(e,"not a valid string"),this.code=1001}}class VO extends kR{constructor(e){super(e,"invalid unit"),this.code=1004}}class GO extends kR{constructor(e){super(e,"not a valid unit. Must be a positive integer"),this.code=1015}}class KO extends kR{constructor(e){super(e,"can not be converted to hex"),this.code=1006}}class ZO extends kR{constructor(e){super(e,"value greater than the nibble width"),this.code=1014}}class YO extends kR{constructor(e){super(e,"not a valid boolean."),this.code=1008}}class QO extends kR{constructor(e){super(e,"not a valid unsigned integer."),this.code=1009}}class JO extends kR{constructor(e){super(e,"invalid size given."),this.code=1010}}class XO extends kR{constructor(e){super(e,"value is larger than size."),this.code=1011}}class eM extends kR{constructor(e){super(e,"invalid string given"),this.code=1012}}const tM=e=>(e=>!Array.isArray(e)&&"2.0"===e.jsonrpc&&!!e&&(void 0===e.result||null===e.result)&&"error"in e&&("number"===typeof e.id||"string"===typeof e.id))(e)?e.error.message:"";
9688class nM extends ER{constructor(e,t,n){var r;let i;super(null!==t&&void 0!==t?t:`Returned error: ${Array.isArray(e)?e.map((e=>tM(e))).join(","):tM(e)}`),this.code=100,t||(this.data=Array.isArray(e)?e.map((e=>{var t;return null===(t=e.error)||void 0===t?void 0:t.data})):null===(r=null===e||void 0===e?void 0:e.error)||void 0===r?void 0:r.data),this.request=n,"error"in e?i=e.error:e instanceof Array&&(i=e.filter((e=>e.error)).map((e=>e.error))),Array.isArray(i)&&i.length>0?this.cause=new _R(i):this.cause=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{data:this.data,request:this.request})}}class rM extends nM{constructor(e,t){let n;super(e,void 0,t),this.code=101,"error"in e?n=e.error:e instanceof Array&&(n=e.map((e=>e.error))),Array.isArray(n)?this.cause=new _R(n):this.cause=n}}class iM extends ER{constructor(e,t){super(`Web3Config hardfork doesnt match in defaultHardfork ${e} and common.hardfork ${t}`),this.code=1101}}class sM extends ER{constructor(e,t){super(`Web3Config chain doesnt match in defaultHardfork ${e} and common.hardfork ${t}`),this.code=1101}}const oM="An Rpc error has occured with a code of *code*",aM={[uR]:{message:"Parse error",description:"Invalid JSON"},[dR]:{message:"Invalid request",description:"JSON is not a valid request object\t"},[hR]:{message:"Method not found",description:"Method does not exist\t"},[pR]:{message:"Invalid params",description:"Invalid method parameters"},[fR]:{message:"Internal error",description:"Internal JSON-RPC error"},[mR]:{message:"Invalid input",description:"Missing or invalid parameters"},[gR]:{message:"Resource not found",description:"Requested resource not found"},[yR]:{message:"Resource unavailable",description:"Requested resource not available"},[vR]:{message:"Transaction rejected",description:"Transaction creation failed"},[wR]:{message:"Method not supported",description:"Method is not implemented"},[bR]:{message:"Limit exceeded",description:"Request exceeds defined limit"},[xR]:{message:"JSON-RPC version not supported",description:"Version of JSON-RPC protocol is not supported"},[sR]:{name:"User Rejected Request",message:"The user rejected the request."},[oR]:{name:"Unauthorized",message:"The requested method and/or account has not been authorized by the user."},[aR]:{name:"Unsupported Method",message:"The Provider does not support the requested method."},[cR]:{name:"Disconnected",message:"The Provider is disconnected from all chains."},[lR]:{name:"Chain Disconnected",message:"The Provider is not connected to the requested chain."},"0-999":{name:"",message:"Not used."},1e3:{name:"Normal Closure",message:"The connection successfully completed the purpose for which it was created."},1001:{name:"Going Away",message:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection."},1002:{name:"Protocol error",message:"The endpoint is terminating the connection due to a protocol error."},1003:{name:"Unsupported Data",message:"The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)"},1004:{name:"Reserved",message:"Reserved. A meaning might be defined in the future."},1005:{name:"No Status Rcvd",message:"Reserved. Indicates that no status code was provided even though one was expected."},1006:{name:"Abnormal Closure",message:"Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected."},1007:{name:"Invalid frame payload data",message:"The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message)."},1008:{name:"Policy Violation",message:"The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable."},1009:{name:"Message Too Big",message:"The endpoint is terminating the connection because a data frame was received that is too large."},1010:{name:"Mandatory Ext.",message:"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't."},1011:{name:"Internal Error",message:"The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."},1012:{name:"Service Restart",message:"The server is terminating the connection because it is restarting."},1013:{name:"Try Again Later",message:"The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients."},1014:{name:"Bad Gateway",message:"The server was acting as a gateway or proxy and received an invali
9688d response from the upstream server. This is similar to 502 HTTP Status Code."},1015:{name:"TLS handshake",message:"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."},"1016-2999":{name:"",message:"For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications."},"3000-3999":{name:"",message:"For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol."},"4000-4999":{name:"",message:"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol."}};class cM extends ER{constructor(e,t){super(null!==t&&void 0!==t?t:oM.replace("*code*",e.error.code.toString())),this.code=e.error.code,this.id=e.id,this.jsonrpc=e.jsonrpc,this.jsonRpcError=e.error}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{error:this.jsonRpcError,id:this.id,jsonRpc:this.jsonrpc})}}class lM extends ER{constructor(e,t){var n,r,i,s;if(e)if(null===(n=aM[e])||void 0===n?void 0:n.message)super(aM[e].message);else{const t=Object.keys(aM).find((t=>"string"===typeof t&&e>=parseInt(t.split("-")[0],10)&&e<=parseInt(t.split("-")[1],10)));super(null!==(i=null===(r=aM[null!==t&&void 0!==t?t:""])||void 0===r?void 0:r.message)&&void 0!==i?i:oM.replace("*code*",null!==(s=null===e||void 0===e?void 0:e.toString())&&void 0!==s?s:'""'))}else super();this.code=e,this.data=t}}const uM=new Map;uM.set(uR,{error:class extends cM{constructor(e){super(e,aM[-32700].message),this.code=uR}}}),uM.set(dR,{error:class extends cM{constructor(e){super(e,aM[-32600].message),this.code=dR}}}),uM.set(hR,{error:class extends cM{constructor(e){super(e,aM[-32601].message),this.code=hR}}}),uM.set(pR,{error:class extends cM{constructor(e){super(e,aM[-32602].message),this.code=pR}}}),uM.set(fR,{error:class extends cM{constructor(e){super(e,aM[-32603].message),this.code=fR}}}),uM.set(mR,{error:class extends cM{constructor(e){super(e,aM[-32e3].message),this.code=mR}}}),uM.set(wR,{error:class extends cM{constructor(e){super(e,aM[-32004].message),this.code=wR}}}),uM.set(yR,{error:class extends cM{constructor(e){super(e,aM[-32002].message),this.code=yR}}}),uM.set(vR,{error:class extends cM{constructor(e){super(e,aM[-32003].message),this.code=vR}}}),uM.set(gR,{error:class extends cM{constructor(e){super(e,aM[-32001].message),this.code=gR}}}),uM.set(xR,{error:class extends cM{constructor(e){super(e,aM[-32006].message),this.code=xR}}}),uM.set(bR,{error:class extends cM{constructor(e){super(e,aM[-32005].message),this.code=bR}}});class dM extends ER{constructor(e){super(`Format for the type ${e} is unsupported`),this.type=e,this.code=1200}toJSON(){return Object.assign(Object.assign({}
9688,super.toJSON()),{type:this.type})}}function hM(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function pM(e){if(!function(e){return e instanceof Uint8Array||null!=e&&"object"===typeof e&&"Uint8Array"===e.constructor.name}(e))throw new Error("Uint8Array expected");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(n.length>0&&!n.includes(e.length))throw new Error(`Uint8Array expected of length ${n}, not of length=${e.length}`)}function fM(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");hM(e.outputLen),hM(e.blockLen)}function mM(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function gM(e,t){pM(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const yM={number:hM,bool:function(e){if("boolean"!==typeof e)throw new Error(`boolean expected, not ${e}`)},bytes:pM,hash:fM,exists:mM,output:gM},vM=yM,wM=BigInt(2**32-1),bM=BigInt(32);function xM(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&wM),l:Number(e>>bM&wM)}:{h:0|Number(e>>bM&wM),l:0|Number(e&wM)}}function EM(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Uint32Array(e.length),r=new
9688Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:s,l:o}=xM(e[i],t);[n[i],r[i]]=[s,o]}return[n,r]}const _M=(e,t,n)=>e<<n|t>>>32-n,kM=(e,t,n)=>t<<n|e>>>32-n,CM=(e,t,n)=>t<<n-32|e>>>64-n,AM=(e,t,n)=>e<<n-32|t>>>64-n;const SM={fromBig:xM,split:EM,toBig:(e,t)=>BigInt(e>>>0)<<bM|BigInt(t>>>0),shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:_M,rotlSL:kM,rotlBH:CM,rotlBL:AM,add:function(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,add5H:(e,t,n,r,i,s)=>t+n+r+i+s+(e/2**32|0)|0,add5L:(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0)},IM=SM,TM="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;const PM=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),NM=e=>
9688new DataView(e.buffer,e.byteOffset,e.byteLength),RM=(e,t)=>e<<32-t|e>>>t,OM=(e,t)=>e<<t|e>>>32-t>>>0,MM=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],jM=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function LM(e){for(let t=0;t<e.length;t++)e[t]=jM(e[t])}function DM(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function BM(e){return"string"===typeof e&&(e=DM(e)),pM(e),e}function UM(){let e=0;for(let n=0;n<arguments.length;n++){const t=n<0||arguments.length<=n?void 0:arguments[n];pM(t),e+=t.length}const t=new Uint8Array(e);for(let n=0,r=0;n<arguments.length;n++){const e=n<0||arguments.length<=n?void 0:arguments[n];t.set(e,r),r+=e.length}return t}class FM{clone(){return this._cloneInto()}}const $M={}.toString;function zM(e,t){if(void 0!==t&&"[object Object]"!==$M.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)}function HM(e){const t=t=>e().update(BM(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function WM(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(TM&&"function"===typeof TM.getRandomValues)return TM.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}const qM=[],VM=[],GM=[],KM=BigInt(0),ZM=BigInt(1),YM=BigInt(2),QM=BigInt(7),JM=BigInt(256),XM=BigInt(113);for(let n=0,A2=ZM,S2=1,I2=0;n<24;n++){[S2,I2]=[I2,(2*S2+3*I2)%5],qM.push(2*(5*I2+S2)),VM.push((n+1)*(n+2)/2%64);let e=KM;for(let t=0;t<7;t++)A2=(A2<<ZM^(A2>>QM)*XM)%JM,A2&YM&&(e^=ZM<<(ZM<<BigInt(t))-ZM);GM.push(e)}const[ej,tj]=EM(GM,!0),nj=(e,t,n)=>n>32?CM(e,t,n):_M(e,t,n),rj=(e,t,n)=>n>32?AM(e,t,n):kM(e,t,n);class ij extends FM{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,hM(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=PM(this.state)}keccak(){MM||LM(this.state32),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24;const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,i=(r+2)%10,s=n[i],o=n[i+1],a=nj(s,o,1)^n[t],c=rj(s,o,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=a,e[r+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){const r=VM[n],s=nj(t,i,r),o=rj(t,i,r),a=qM[n];t=e[a],i=e[a+1],e[a]=s,e[a+1]=o}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=ej[r],e[1]^=tj[r]}n.fill(0)}(this.state32,this.rounds),MM||LM(this.state32),this.posOut=0,this.pos=0}update(e){mM(this);const{blockLen:t,state:n}=this,r=(e=BM(e)).length;for(let i=0;i<r;){const s=Math.min(t-this.pos,r-i);for(let t=0;t<s;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,0!==(128&t)&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){mM(this,!1),pM(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();const s=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+s),r),this.posOut+=s,r+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return hM(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(gM(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:s}=this;return e||(e=new ij(t,n,r,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=s,e.destroyed=this.destroyed,e}}const sj=(e,t,n)=>HM((()=>new ij(t,e,n))),oj=sj(1,144,28),aj=sj(1,136,32),cj=sj(1,104,48),lj=sj(1,72,64),uj=(vM.bool,vM.bytes);function dj(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)}function hj(e){return t=>(vM.bytes(t),e(t))}(()=>{const e="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,t="undefined"!==typeof module&&"function"===typeof module.require&&module.require.bind(module);t&&!e&&t("crypto")})(),hj(oj);const pj=(()=>{const e=hj(aj);return e.create=aj.create,e})();hj(cj),hj(lj);var fj=n(7116);const mj=e=>e.message?e.message:"unspecified error";
9688class gj extends ER{constructor(e){super(),this.code=1100,this.errors=e,super.message=`Web3 validator found ${e.length} error[s]:\n${this._compileErrors().join("\n")}`}_compileErrors(){return this.errors.map(mj)}}const yj=["bool","int","uint","bytes","string","address","tuple"],vj=e=>"object"===typeof e&&"type"in e&&"name"in e,wj=e=>"string"===typeof e,bj=e=>"string"===typeof e&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(e);function xj(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&!("undefined"!==typeof t&&t>0&&e.length!==2+2*t)}const Ej=e=>"number"===typeof e||"bigint"===typeof e||"string"===typeof e&&/^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(e);function _j(e){if("string"!==typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return e.startsWith("0x")}const kj=function(e){for(const[t,n]of Object.entries(e))if(void 0!==n&&n.length>0&&0===n[0])throw new Error(`${t} cannot have leading zeroes, received: ${n.toString()}`)},Cj=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],Aj=e=>{let t,n=e.replace(/ /,""),r=!1,i=[];if(e.includes("[")&&(n=n.slice(0,n.indexOf("[")),i=[...e.matchAll(/(?:\[(\d*)\])/g)].map((e=>parseInt(e[1],10))).map((e=>Number.isNaN(e)?-1:e)),r=i.length>0),yj.includes(n))return{baseType:n,isArray:r,baseTypeSize:t,arraySizes:i};if(n.startsWith("int"))t=parseInt(n.substring(3),10),n="int";else if(n.startsWith("uint"))t=parseInt(e.substring(4),10),n="uint";else{if(!n.startsWith("bytes"))return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:i};t=parseInt(n.substring(5),10),n="bytes"}return{baseType:n,isArray:r,baseTypeSize:t,arraySizes:i}},Sj=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Object.keys(t).includes("type"))throw new gj([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:e},instancePath:"",schemaPath:""}]);const{baseType:n,baseTypeSize:r}=Aj(e);if(!n&&!Cj.includes(e))throw new gj([{keyword:"eth",message:`Eth data type "${e}" is not valid`,params:{eth:e},instancePath:"",schemaPath:""}]);if(n){if("tuple"===n)throw new Error('"tuple" type is not implemented directly.');return{format:`${n}${null!==r&&void 0!==r?r:""}`,required:!0}}return e?{format:e,required:!0}:{}},Ij=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/0";const n={type:"array",items:[],maxItems:e.length,minItems:e.length};for(const[r,i]of e.entries()){let e,s,o=[];vj(i)?(e=i.type,s=i.name||`${t}/${r}`,o=i.components):"string"===typeof i?(e=i,s=`${t}/${r}`):Array.isArray(i)&&(i[0]&&"string"===typeof i[0]&&i[0].startsWith("tuple")&&!Array.isArray(i[0])&&i[1]&&Array.isArray(i[1])?(e=i[0],s=`${t}/${r}`,o=i[1]):(e="tuple",s=`${t}/${r}`,o=i));const{baseType:a,isArray:c,arraySizes:l}=Aj(e);let u,d=n;for(let t=l.length-1;t>0;t-=1)u={type:"array",$id:s,items:[],maxItems:l[t],minItems:l[t]},l[t]<0&&(delete u.maxItems,delete u.minItems),Array.isArray(d.items)?0===d.items.length?d.items=[u]:d.items.push(u):d.items=[d.items,u],d=u;if("tuple"!==a||c)if("tuple"===a&&c){const e=l[0],t=Object.assign({type:"array",$id:s,items:Ij(o,s)},e>=0&&{minItems:e,maxItems:e});d.items.push(t)}else if(c){const t=l[0],n=Object.assign({type:"array",$id:s,items:Sj(e)},t>=0&&{minItems:t,maxItems:t});d.items.push(n)}else Array.isArray(d.items),d.items.push(Object.assign({$id:s},Sj(e)));else{const e=Ij(o,s);e.$id=s,d.items.push(e)}d=n}return n},Tj=e=>Ij(e),Pj=(e,t)=>1===t?e:Pj(e[0],t-1),Nj=(e,t,n)=>{const r=[];for(const[i,s]of e.entries()){let e,o,a=[];vj(s)?(e=s.type,o=s.name,a=s.components):"string"===typeof s?e=s:Array.isArray(s)&&(s[1]&&Array.isArray(s[1])?(e=s[0],a=s[1]):(e="tuple",a=s));const{baseType:c,isArray:l,arraySizes:u}=Aj(e),d=Array.isArray(t)?t[i]:t[o];if("tuple"!==c||l)if("tuple"===c&&l){const e=[];for(const t of d)if(u.length>1){const r=Pj(t,u.length-1),i=[];for(const e of r)i.push(Nj(a,e,n));e.push(i)}else e.push(Nj(a,t,n));r.push(e)}else r.push(d);else r.push(Nj(a,d,n))}return(n=null!==n&&void 0!==n?n:[]).push(...r),n},Rj=e=>{if(e>=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error(`Invalid code point: ${e}`)},Oj=e=>{if(!bj(e))throw new Error("Invalid hex string");const[t,n]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],r=BigInt(n);return r>Number.MAX_SAFE_INTEGER?t?-r:r:r<Number.MIN_SAFE_INTEGER?r:t?-1*Number(r):Number(r)},Mj=e=>{if(("number"===typeof e||"bigint"===typeof e)&&e<0)return`-0x${e.toString(16).slice(1)}`;if(("number"===typeof e||"bigint"===typeof e)&&e>=0)return`0x${e.toString(16)}`;if("string"===typeof e&&bj(e)){const[t,n]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e];return`${t?"-":""}0x${n.split(/^(-)?0(x|X)/).slice(-1)[0].replace(/^0+/,"").toLowerCase()}`}if("string"===typeof e&&!bj(e))return Mj(BigInt(e));throw new HO(e)},jj=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0";if("string"===typeof e&&!bj(e))return e.padStart(t,n);const r="string"===typeof e&&bj(e)?e:Mj(e),[i,s]=r.startsWith("-")?["-0x",r.slice(3)]:["0x",r.slice(2)];return`${i}${s.padStart(t,n)}`};function Lj(e){let t="0x";for(const n of e){const e=n.toString(16);t+=1===e.length?`0${e}`:e}return t}const Dj={zero:48,nine:57,A:65,F:70,a:97,f:102};function Bj(e){return e>=Dj.zero&&e<=Dj.nine?e-Dj.zero:e>=Dj.A&&e<=Dj.F?e-(Dj.A-10):e>=Dj.a&&e<=Dj.f?e-(Dj.a-10):void 0}function Uj(e){let t=0;if(!e.startsWith("0")||"x"!==e[1]&&"X"!==e[1]||(t=2),e.length%2!==0)throw new zO(`hex string has odd length: ${e}`);const n=(e.length-t)/2,r=new Uint8Array(n);for(let i=0,s=t;i<n;i+=1){const t=Bj(e.charCodeAt(s++)),n=Bj(e.charCodeAt(s++));if(void 0===t||void 0===n)throw new zO(`Invalid byte sequence ("${e[s-2]}${e[s-1]}" in "${e}").`);r[i]=16*t+n}return r}function Fj(e){var t;return e instanceof Uint8Array||"Uint8Array"!==(null===(t=null===e||void 0===e?void 0:e.constructor)||void 0===t?void 0:t.name)?e:Uint8Array.from(e)}const $j=e=>{var t,n;return e instanceof Uint8Array||"Uint8Array"===(null===(t=null===e||void 0===e?void 0:e.constructor)||void 0===t?void 0:t.name)||"Buffer"===(null===(n=null===e||void 0===e?void 0:e.constructor)||void 0===n?void 0:n.name)},zj=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{abiType:"bytes"};if("string"!==typeof e&&!Array.isArray(e)&&!$j(e))return!1;if("string"===typeof e&&bj(e)&&e.startsWith("-"))return!1;if("string"===typeof e&&!bj(e))return!1;if("string"===typeof e){if(e.length%2!==0)return!1;t=Uj(e)}else if(Array.isArray(e)){if(e.some((e=>e<0||e>255||!Number.isInteger(e))))return!1;t=new Uint8Array(e)}else t=e;if(null===n||void 0===n?void 0:n.abiType){const{baseTypeSize:e}=Aj(n.abiType);return!e||t.length===e}return!(null===n||void 0===n?void 0:n.size)||t.length===(null===n||void 0===n?void 0:n.size)},Hj=e=>{if(!/^(0x)?[0-9a-f]{40}$/i.test(e))return!1;const t=e.slice(2),n=DM(t.toLowerCase()),r=Lj(pj(Fj(n))).slice(2);for(let i=0;i<40;i+=1)if(parseInt(r[i],16)>7&&t[i].toUpperCase()!==t[i]||parseInt(r[i],16)<=7&&t[i].toLowerCase()!==t[i])return!1;return!0},Wj=function(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!("string"!==typeof e&&!$j(e))&&(t=$j(e)?Lj(e):"string"!==typeof e||bj(e)||e.toLowerCase().startsWith("0x")?e:`0x${e}`,!!/^(0x)?[0-9a-f]{40}$/i.test(t)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(t)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(t))||(!n||Hj(t))))},qj=(e,t)=>{if(t===BigInt(0))return BigInt(1);let n=e;for(let r=1;r<t;r+=1)n*=e;return n},Vj=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{abiType:"uint"};if(!["number","string","bigint"].includes(typeof e)||"string"===typeof e&&0===e.length)return!1;if(null===n||void 0===n?void 0:n.abiType){const{baseTypeSize:e}=Aj(n.abiType);e&&(t=e)}else n.bitSize&&(t=n.bitSize);const r=qj(BigInt(2),BigInt(null!==t&&void 0!==t?t:256))-BigInt(1);try{const t="string"===typeof e&&bj(e)?BigInt(Oj(e)):BigInt(e);return t>=0&&t<=r}catch(i){return!1}},Gj=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{abiType:"int"};if(!["number","string","bigint"].includes(typeof e))return!1;if("number"===typeof e&&e>Number.MAX_SAFE_INTEGER)return!1;if(null===n||void 0===n?void 0:n.abiType){const{baseTypeSize:e,baseType:r}=Aj(n.abiType);if("int"!==r)return!1;e&&(t=e)}else n.bitSize&&(t=n.bitSize);const r=qj(BigInt(2),BigInt((null!==t&&void 0!==t?t:256)-1)),i=BigInt(-1)*qj(BigInt(2),BigInt((null!==t&&void 0!==t?t:256)-1));try{const t="string"===typeof e&&bj(e)?BigInt(Oj(e)):BigInt(e);return t>=i&&t<=r}catch(s){return!1}},Kj=e=>
9688!!Gj(e)||(!("string"!==typeof e||!/[0-9.]/.test(e)||e.indexOf(".")!==e.lastIndexOf("."))||"number"===typeof e),Zj=e=>Vj(e),Yj=e=>Object.values(JN).includes(e),Qj=e=>Yj(e)||Zj(e),Jj=e=>"string"===typeof e&&(!!/^(0x)?[0-9a-f]{512}$/i.test(e)&&!(!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e))),Xj=(e,t)=>{if("string"===typeof t&&!bj(t))return!1;if(!Jj(e))return!1;const n="string"===typeof t?Uj(t):t,r=Lj(pj(n)).slice(2);for(let i=0;i<12;i+=4){const t=(parseInt(r.slice(i,i+2),16)<<8)+parseInt(r.slice(i+2,i+4),16)&2047,n=1<<t%4;if((Rj(e.charCodeAt(e.length-1-Math.floor(t/4)))&n)!==n)return!1}return!0},eL=e=>void 0===e||null===e,tL=e=>"object"===typeof e&&!eL(e)&&!Array.isArray(e)&&!(e instanceof eR),nL=e=>"string"===typeof e&&(!!/^(0x)?[0-9a-f]{64}$/i.test(e)&&!(!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e))),rL={address:e=>Wj(e),bloom:e=>Jj(e),blockNumber:e=>Zj(e),blockTag:e=>Yj(e),blockNumberOrTag:e=>Qj(e),bool:e=>{return!!["number","string","boolean"].includes(typeof(t=e))&&("boolean"===typeof t||("string"!==typeof t||bj(t)?"string"===typeof t&&bj(t)?"0x1"===t||"0x0"===t:1===t||0===t:"1"===t||"0"===t));var t},bytes:e=>zj(e),filter:e=>(e=>{const t=["fromBlock","toBlock","address","topics","blockHash"];if(eL(e)||"object"!==typeof e)return!1;if(!Object.keys(e).every((e=>t.includes(e))))return!1;if(!eL(e.fromBlock)&&!Qj(e.fromBlock)||!eL(e.toBlock)&&!Qj(e.toBlock))return!1;if(!eL(e.address))if(Array.isArray(e.address)){if(!e.address.every((e=>Wj(e))))return!1}else if(!Wj(e.address))return!1;return!(!eL(e.topics)&&!e.topics.every((e=>!!eL(e)||(Array.isArray(e)?e.every((e=>nL(e))):!!nL(e)))))})(e),hex:e=>bj(e),uint:e=>Vj(e),int:e=>Gj(e),number:e=>Kj(e),string:e=>wj(e)};for(let n=8;n<=256;n+=8)rL[`int${n}`]=e=>Gj(e,{bitSize:n}),rL[`uint${n}`]=e=>Vj(e,{bitSize:n});for(let n=1;n<=32;n+=1)rL[`bytes${n}`]=e=>zj(e,{size:n});rL.bytes256=rL.bytes;const iL=rL,sL=e=>{if((!(null===e||void 0===e?void 0:e.type)||"object"===(null===e||void 0===e?void 0:e.type))&&(null===e||void 0===e?void 0:e.properties)){const t={};for(const n of Object.keys(e.properties)){const r=sL(e.properties[n]);r&&(t[n]=r)}return Array.isArray(e.required)?fj.z.object(t).partial().required(e.required.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:!0})),{})):fj.z.object(t).partial()}if("array"===(null===e||void 0===e?void 0:e.type)&&(null===e||void 0===e?void 0:e.items)){if(Array.isArray(e.items)&&e.items.length>1&&void 0!==e.maxItems&&new Set(e.items.map((e=>e.$id))).size===e.items.length){const t=[];for(const n of e.items){const e=sL(n);e&&t.push(e)}return fj.z.tuple(t)}const t=Array.isArray(e.items)?e.items[0]:e.items;let n=fj.z.array(sL(t));return n=void 0!==e.minItems?n.min(e.minItems):n,n=void 0!==e.maxItems?n.max(e.maxItems):n,n}if(e.oneOf&&Array.isArray(e.oneOf))return fj.z.union(e.oneOf.map((e=>sL(e))));if(null===e||void 0===e?void 0:e.format){if(!iL[e.format])throw new dM(e.format);return fj.z.any().refine(iL[e.format],(t=>({params:{value:t,format:e.format}})))}return(null===e||void 0===e?void 0:e.type)&&"object"!==(null===e||void 0===e?void 0:e.type)&&"function"===typeof fj.z[String(e.type)]?fj.z[String(e.type)]():fj.z.object({data:fj.z.any()}).partial()};class oL{static factory(){return oL.validatorInstance||(oL.validatorInstance=new oL),oL.validatorInstance}validate(e,t,n){var r,i;const s=sL(e).safeParse(t);if(!s.success){const e=this.convertErrors(null!==(i=null===(r=s.error)||void 0===r?void 0:r.issues)&&void 0!==i?i:[]);if(e){if(null===n||void 0===n?void 0:n.silent)return e;throw new gj(e)}}}convertErrors(e){if(e&&Array.isArray(e)&&e.length>0)return e.map((e=>{var t;let n,r,i,s;s=e.path.join("/");const o=String(e.path[e.path.length-1]),a=e.path.join("/");if(e.code===fj.eq.too_big)r="maxItems",s=`${a}/maxItems`,i={limit:e.maximum},n=`must NOT have more than ${e.maximum} items`;else if(e.code===fj.eq.too_small)r="minItems",s=`${a}/minItems`,i={limit:e.minimum},n=`must NOT have fewer than ${e.minimum} items`;else if(e.code===fj.eq.custom){const{value:r,format:o}=null!==(t=e.params)&&void 0!==t?t:{};n="undefined"===typeof r?`value at "/${s}" is required`:`value "${"object"===typeof r?JSON.stringify(r):r}" at "/${s}" must pass "${o}" validation`,i={value:r}}return{keyword:null!==r&&void 0!==r?r:o,instancePath:a?`/${a}`:"",schemaPath:s?`#${s}`:"#",params:null!==i&&void 0!==i?i:{value:e.message},message:null!==n&&void 0!==n?n:e.message}}))}}
9688const aL=new class{constructor(){this._validator=oL.factory()}validateJSONSchema(e,t,n){return this._validator.validate(e,t,n)}validate(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};var r,i;const s=Tj(e);if(!Array.isArray(s.items)||0!==(null===(r=s.items)||void 0===r?void 0:r.length)||0!==t.length){if(Array.isArray(s.items)&&0===(null===(i=s.items)||void 0===i?void 0:i.length)&&0!==t.length)throw new gj([{instancePath:"/0",schemaPath:"/",keyword:"required",message:"empty schema against data can not be validated",params:t}]);return this._validator.validate(s,t,n)}}};function cL(e){var t,n;return e instanceof Uint8Array||"Uint8Array"===(null===(t=null===e||void 0===e?void 0:e.constructor)||void 0===t?void 0:t.name)||"Buffer"===(null===(n=null===e||void 0===e?void 0:e.constructor)||void 0===n?void 0:n.name)}function lL(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(((e,t)=>e+t.length),0),i=new Uint8Array(r);let s=0;for(const o of t)i.set(o,s),s+=o.length;return i}function uL(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n+=1)if(e[n]!==t[n])return!1;return!0}const dL={noether:BigInt(0),wei:BigInt(1),kwei:BigInt(1e3),Kwei:BigInt(1e3),babbage:BigInt(1e3),femtoether:BigInt(1e3),mwei:BigInt(1e6),Mwei:BigInt(1e6),lovelace:BigInt(1e6),picoether:BigInt(1e6),gwei:BigInt(1e9),Gwei:BigInt(1e9),shannon:BigInt(1e9),nanoether:BigInt(1e9),nano:BigInt(1e9),szabo:BigInt(1e12),microether:BigInt(1e12),micro:BigInt(1e12),finney:BigInt(1e15),milliether:BigInt(1e15),milli:BigInt(1e15),ether:BigInt("1000000000000000000"),kether:BigInt("1000000000000000000000"),grand:BigInt("1000000000000000000000"),mether:BigInt("1000000000000000000000000"),gether:BigInt("1000000000000000000000000000"),tether:BigInt("1000000000000000000000000000000")},hL="Warning: Using type `number` with values that are large or contain many decimals may cause loss of precision, it is recommended to use type `string` or `BigInt` when using conversion methods",pL=e=>{if(aL.validate(["bytes"],[e]),cL(e))return e;if(Array.isArray(e))return new Uint8Array(e);if("string"===typeof e)return Uj(e);throw new zO(e)},{uint8ArrayToHexString:fL}=t,mL=e=>fL(pL(e)),gL=e=>"string"===typeof e&&"0x"!==e.slice(0,2).toLowerCase()?pL(`0x${e}`):pL(e),yL=e=>(aL.validate(["hex"],[e]),Oj(e)),vL=yL,wL=(e,t)=>{"bigint"!==typeof e&&aL.validate(["int"],[e]);let n=Mj(e);return t&&(n.startsWith("-")||n.length%2!==1?n.length%2===0&&n.startsWith("-")&&(n="-0x0".concat(n.slice(3))):n="0x0".concat(n.slice(2))),n},bL=wL,xL=e=>yL(e).toString(),EL=e=>{aL.validate(["string"],[e]);let t=e.replace(/^(?:\u0000)/,"");return t=t.replace(/(?:\u0000)$/,""),mL((new TextEncoder).encode(t))},_L=EL,kL=EL,CL=e=>dj(gL(e)),AL=e=>"string"===typeof e?CL(e):(aL.validate(["bytes"],[e]),dj(e)),SL=DM,IL=CL,TL=e=>{aL.validate(["string"],[e]);let t="";for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n).toString(16);t+=r.length%2!==0?`0${r}`:r}return`0x${t}`},PL=TL,NL=e=>new TextDecoder("ascii").decode(gL(e)),RL=NL,OL=(e,t)=>{if("string"===typeof e&&Wj(e))return t?"address":`0x${e.toLowerCase().replace(/^0x/i,"")}`;if("boolean"===typeof e)return t?"bool":e?"0x01":"0x00";if("number"===typeof e)return t?e<0?"int256":"uint256":wL(e);if("bigint"===typeof e)return t?"bigint":wL(e);if(cL(e))return t?"bytes":mL(e);if("object"===typeof e&&e)return t?"string":EL(JSON.stringify(e));if("string"===typeof e){if(e.startsWith("-0x")||e.startsWith("-0X"))return t?"int256":wL(e);if(bj(e))return t?"bytes":e;if(Ej(e)&&!Gj(e)&&!Vj(e))return t?"bytes":`0x${e}`;if(Ej(e)&&!Gj(e)&&Vj(e))return t?"uint":wL(e);if(!Number.isFinite(e))return t?"string":EL(e)}throw new KO(e)},ML=e=>{if("number"===typeof e)return e>1e20?(console.warn(hL),BigInt(e)):e;if("bigint"===typeof e)return e>=Number.MIN_SAFE_INTEGER&&e<=Number.MAX_SAFE_INTEGER?Number(e):e;if("string"===typeof e&&bj(e))return yL(e);try{return ML(BigInt(e))}catch(ju){throw new HO(e)}},jL=e=>{if("number"===typeof e)return BigInt(e);if("bigint"===typeof e)return e;if("string"===typeof e&&Ej(e))return e.startsWith("-")?-BigInt(e.substring(1)):BigInt(e);throw new HO(e)},LL=(e,t)=>{let n;if("string"===typeof t){if(n=dL[t],!n)throw new VO(t)}
9688else{if(t<0||!Number.isInteger(t))throw new GO(t);n=qj(BigInt(10),BigInt(t))}const r=String(ML(e)),i=n.toString().length-1;if(i<=0)return r.toString();const s=r.padStart(i,"0"),o=s.slice(0,-i),a=s.slice(-i).replace(/\.?0+$/,"");if(""===o)return`0.${a}`;if(""===a)return o;return`${o}.${a}`.slice(0,o.length+i+1)},DL=(e,t)=>{let n;if(aL.validate(["number"],[e]),"string"===typeof t){if(n=dL[t],!n)throw new VO(t)}else{if(t<0||!Number.isInteger(t))throw new GO(t);n=qj(BigInt(10),BigInt(t))}let r=e;"number"===typeof r&&(r<1e-15&&console.warn(hL),r>1e20?(console.warn(hL),r=BigInt(r)):r=r.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20}));const[i,s]=String("string"!==typeof r||bj(r)?ML(r):r).split(".").concat(""),o=BigInt(`${i}${s}`)*n,a=s.length;return 0===a?o.toString():o.toString().slice(0,-a)},BL=e=>{if(!Wj(e,!1))throw new WO(e);const t=e.toLowerCase().replace(/^0x/i,""),n=Lj(pj(Fj(SL(t))));if(eL(n)||"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"===n)return"";let r="0x";const i=n.replace(/^0x/i,"");for(let s=0;s<t.length;s+=1)parseInt(i[s],16)>7?r+=t[s].toUpperCase():r+=t[s];return r},UL=e=>{if("boolean"===typeof e)return e;if("number"===typeof e&&(0===e||1===e))return Boolean(e);if("bigint"===typeof e&&(e===BigInt(0)||e===BigInt(1)))return Boolean(e);if("string"===typeof e&&!bj(e)&&("1"===e||"0"===e||"false"===e||"true"===e))return"true"===e||"false"!==e&&Boolean(Number(e));if("string"===typeof e&&bj(e)&&("0x1"===e||"0x0"===e))return Boolean(ML(e));throw new YO(e)};var FL=n(5955);const $L=FL;class zL extends $L{constructor(){super(...arguments),this.maxListeners=Number.MAX_SAFE_INTEGER}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}}const HL=bj,WL=Ej,qL=Hj,VL=Wj,GL=Jj,KL=Xj,ZL=(e,t)=>{if(!Jj(e))return!1;if(!Wj(t))return!1;const n=jj(t,64);return Xj(e,n)},YL=(e,t)=>!!Jj(e)&&(!!Wj(t)&&Xj(e,t)),QL=nL,JL=(e,t)=>!!Jj(e)&&(!!nL(t)&&Xj(e,t)),XL=(e,t)=>{const n="string"===typeof e&&Yj(e),r="string"===typeof t&&Yj(t);if(e===t||("earliest"===e||0===e)&&("earliest"===t||0===t))return 0;if("earliest"===e&&t>0)return-1;if("earliest"===t&&e>0)return 1;if(n&&r){const n={[JN.EARLIEST]:1,[JN.FINALIZED]:2,[JN.SAFE]:3,[JN.LATEST]:4,[JN.PENDING]:5};return n[e]<n[t]?-1:1}if(n&&!r||!n&&r)throw new eM("Cannot compare blocktag with provided non-blocktag input.");const i=BigInt(e),s=BigInt(t);return i<s?-1:i===s?0:1},eD=e=>"object"===typeof e&&!eL(e)&&0!==Object.keys(e).length&&["input","data","from","gas","gasPrice","gasLimit","address","jsonInterface","syncWithContext","dataInputFill"].some((t=>t in e)),tD=eL,nD=e=>"object"===typeof e&&!eL(e)&&!Array.isArray(e)&&!(e instanceof eR),rD=function(e){if(!nD(e))return e;const t=Object.assign({},e);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(const s of r)for(const e in s)nD(s[e])?(t[e]||(t[e]={}),t[e]=rD(t[e],s[e])):!eL(s[e])&&Object.hasOwnProperty.call(s,e)&&(Array.isArray(s[e])||s[e]instanceof eR?t[e]=s[e].slice(0):t[e]=s[e]);return t},iD=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0";return"string"===typeof e?bj(e)?jj(e,t,n):e.padStart(t,n):(aL.validate(["int"],[e]),jj(e,t,n))},sD=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0";if("string"===typeof e&&!bj(e))return e.padEnd(t,n);aL.validate(["int"],[e]);const r="string"===typeof e&&bj(e)?e:wL(e),i=r.startsWith("-")?3:2;return r.padEnd(t+i,n)},oD=sD,aD=iD,cD=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64;aL.validate(["int"],[e]);const n=ML(e);if(n>=0)return iD(OL(n),t);const r=qj(BigInt(2),BigInt(4*t));if(-n>=r)throw new ZO(`value: ${e}, nibbleWidth: ${t}`);const i=BigInt(n);return iD(wL(i+r),t)},lD=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64;aL.validate(["int"],[e]);const n=ML(e);if(n<0)return n;const r=Math.ceil(Math.log(Number(n))/Math.log(2));if(r>4*t)throw new ZO(`value: "${e}", nibbleWidth: "${t}"`);if(4*t!==r)return n;const i=qj(BigInt(2),BigInt(t)*BigInt(4));return ML(BigInt(n)-i)},{parseBaseType:uD}=t,dD=e=>"object"===typeof e&&!eL(e)&&"number"in e&&"bytes"in e,hD=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=Object.assign({},e);for(const s of t){if(i.oneOf&&n){const e=n,t=r.find((t=>{let[n]=t;return n===e}));t&&t[0]===n&&(i=i.oneOf[t[1]])}if(!i.properties&&!i.items)return;if(i.properties)i=i.properties[s];else if(i.items&&i.items.properties){i=i.items.properties[s]}else i.items&&tL(i.items)?i=i.items:i.items&&Array.isArray(i.items)&&(i=i.items[parseInt(s,10)]);i&&s&&(n=s)}return i},pD=(e,t,n)=>{try{const{baseType:r,baseTypeSize:i}=uD(t);if("int"===r||"uint"===r)switch(n.number){case VN.NUMBER:return Number(jL(e));case VN.HEX:return wL(jL(e));case VN.STR:return jL(e).toString();case VN.BIGINT:return jL(e);default:throw new GR(`Invalid format: ${String(n.number)}`)}if("bytes"===r){let t;
9688switch(i?"string"===typeof e?t=iD(e,2*i):cL(e)&&(t=lL(new Uint8Array(i-e.length),e)):t=e,n.bytes){case GN.HEX:return mL(pL(t));case GN.UINT8ARRAY:return pL(t);default:throw new GR(`Invalid format: ${String(n.bytes)}`)}}}catch(r){return e}return e},fD=e=>{let{value:t,schemaProp:n,schema:r,object:i,key:s,dataPath:o,format:a,oneOfPath:c=[]}=e;var l,u;if(Array.isArray(t)){let e=n;if(void 0!==(null===n||void 0===n?void 0:n.oneOf)&&n.oneOf.forEach(((r,i)=>{var o,a;!Array.isArray(null===n||void 0===n?void 0:n.items)&&("object"===typeof t[0]&&"object"===(null===(o=null===r||void 0===r?void 0:r.items)||void 0===o?void 0:o.type)||"string"===typeof t[0]&&"object"!==(null===(a=null===r||void 0===r?void 0:r.items)||void 0===a?void 0:a.type))&&(e=r,c.push([s,i]))})),eL(null===e||void 0===e?void 0:e.items))return delete i[s],o.pop(),!0;if(tL(e.items)&&!eL(e.items.format)){for(let n=0;n<t.length;n+=1)i[s][n]=pD(t[n],null===(l=null===e||void 0===e?void 0:e.items)||void 0===l?void 0:l.format,a);return o.pop(),!0}if(!Array.isArray(null===e||void 0===e?void 0:e.items)&&"object"===(null===(u=null===e||void 0===e?void 0:e.items)||void 0===u?void 0:u.type)){for(const e of t)mD(e,r,o,a,c);return o.pop(),!0}if(Array.isArray(null===e||void 0===e?void 0:e.items)){for(let n=0;n<t.length;n+=1)i[s][n]=pD(t[n],e.items[n].format,a);return o.pop(),!0}}return!1},mD=function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];var s;if(!tL(e)&&!Array.isArray(e))return pD(e,null===t||void 0===t?void 0:t.format,r);const o=e;if(Array.isArray(o)&&"array"===(null===t||void 0===t?void 0:t.type)&&"object"===(null===(s=null===t||void 0===t?void 0:t.items)||void 0===s?void 0:s.type))fD({value:o,schemaProp:t,schema:t,object:o,key:"",dataPath:n,format:r,oneOfPath:i});else for(const[a,c]of Object.entries(o)){n.push(a);const e=hD(t,n,i);eL(e)?(delete o[a],n.pop()):tL(c)?(mD(c,t,n,r,i),n.pop()):fD({value:c,schemaProp:e,schema:t,object:o,key:a,dataPath:n,format:r,oneOfPath:i})||(o[a]=pD(c,e.format,r),n.pop())}return o},gD=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:YN;n=tL(t)?rD({},t):Array.isArray(t)?[...t]:t;const i=tL(e)?e:Tj(e);if(!i.properties&&!i.items&&!i.format)throw new GR("Invalid json schema for formatting");return mD(n,i,[],r)},yD="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",vD=e=>{let t;return t="bigint"===typeof e||"number"===typeof e?DM(e.toString()):Array.isArray(e)?new Uint8Array(e):"string"!==typeof e||bj(e)?pL(e):DM(e),mL(pj(Fj(t)))},wD=e=>{let t;t="string"===typeof e?e.startsWith("0x")&&bj(e)?gL(e):DM(e):e;const n=vD(t);return n===yD?void 0:n},bD=e=>{const t=wD(e);return eL(t)?yD:t},xD=(e,t)=>{const n=/^(\d+).*$/.exec(e.slice(t));return n?parseInt(n[1],10):0},ED=e=>e.toString(2).length,_D=(e,t)=>{const n=t.toString();if("string"===e){if("string"===typeof t)return EL(t);throw new qO(t)}if("bool"===e||"boolean"===e){if("boolean"===typeof t)return t?"01":"00";throw new YO(t)}if("address"===e){if(!Wj(n))throw new WO(n);return n}const r=(e=>e.startsWith("int[")?`int256${e.slice(3)}`:"int"===e?"int256":e.startsWith("uint[")?`uint256'${e.slice(4)}`:"uint"===e?"uint256":e)(e);if(e.startsWith("uint")){const e=xD(r,4);if(e%8||e<8||e>256)throw new JO(n);const t=ML(n);if(ED(t)>e)throw new XO(n);if(t<BigInt(0))throw new QO(n);return e?aD(t.toString(16),e/8*2):t.toString(16)}if(e.startsWith("int")){const t=xD(r,3);if(t%8||t<8||t>256)throw new JO(e);const i=ML(n);if(ED(i)>t)throw new XO(n);return i<BigInt(0)?cD(i.toString(),t/8*2):t?aD(i.toString(16),t/4):i.toString(16)}if("bytes"===r){if(n.replace(/^0x/i,"").length%2!==0)throw new zO(n);return n}if(e.startsWith("bytes")){if(n.replace(/^0x/i,"").length%2!==0)throw new zO(n);const t=xD(e,5);if(!t||t<1||t>64||t<n.replace(/^0x/i,"").length/2)throw new zO(n);return oD(n,2*t)}return""},kD=e=>{const[t,n]=(e=>{if(Array.isArray(e))throw new Error("Autodetection of array types is not supported.");let t,n;if("object"===typeof e&&("t"in e||"type"in e)&&("v"in e||"value"in e))t="t"in e?e.t:e.type,n="v"in e?e.v:e.value,t="bigint"===t.toLowerCase()?"int":t;else{if("bigint"===typeof e)return["int",e];t=OL(e,!0),n=OL(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")}return!t.startsWith("int")&&!t.startsWith("uint")||"string"!==typeof n||/^(-)?0x/i.test(n)||(n=jL(n)),[t,n]})(e);if(Array.isArray(n)){const e=n.map((e=>_D(t,e).replace("0x","")));return e.join("")}return _D(t,n).replace("0x","")},CD=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return`0x${t.map(kD).join("").toLowerCase()}`},AD=function(){return wD(CD(...arguments))},SD=function(){return bD(CD(...arguments))},ID=e=>wD(`0x${("number"===typeof e?e.toString():e).padStart(64,"0")}`);const TD=e=>function(e){return WM(e)}(e),PD=e=>mL(TD(e));
9688var ND=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};function RD(e){return("object"===typeof e||"function"===typeof e)&&"function"===typeof e.then}function OD(e,t,n){return ND(this,void 0,void 0,(function*(){let r;const i=yield Promise.race([e instanceof Promise?e:e(),new Promise(((e,i)=>{r=setTimeout((()=>n?i(n):e(void 0)),t)}))]);if(r&&clearTimeout(r),i instanceof Error)throw i;return i}))}function MD(e,t){let n;return[new Promise(((r,i)=>{n=setInterval(function s(){return(()=>{ND(this,void 0,void 0,(function*(){try{const i=yield OD(e,t);eL(i)||(clearInterval(n),r(i))}catch(s){clearInterval(n),i(s)}}))})(),s}(),t)})),n]}function jD(e,t){return ND(this,void 0,void 0,(function*(){return MD(e,t)[0]}))}function LD(e,t){let n;const r=new Promise(((r,i)=>{n=setTimeout((()=>{i(t)}),e)}));return[n,r]}function DD(e,t){let n;const r=new Promise(((r,i)=>{n=setInterval((()=>{(()=>{ND(this,void 0,void 0,(function*(){const t=yield e();t&&(clearInterval(n),i(t))}))})()}),t)}));return[n,r]}const BD=()=>{const e=TD(16);e[6]=15&e[6]|64,e[8]=63&e[8]|128;const t=mL(e);return[t.substring(2,10),t.substring(10,14),t.substring(14,18),t.substring(18,22),t.substring(22,34)].join("-")},UD=e=>{const t=e.error.code;return uM.has(t)||t>=-32099&&t<=-32e3},FD=e=>!Array.isArray(e)&&!!e&&"2.0"===e.jsonrpc&&"result"in e&&eL(e.error)&&("number"===typeof e.id||"string"===typeof e.id),$D=e=>!Array.isArray(e)&&"2.0"===e.jsonrpc&&!!e&&eL(e.result)&&"error"in e&&("number"===typeof e.id||"string"===typeof e.id),zD=e=>!Array.isArray(e)&&!!e&&"2.0"===e.jsonrpc&&!eL(e.params)&&!eL(e.method),HD=e=>!Array.isArray(e)&&!!e&&"2.0"===e.jsonrpc&&"id"in e&&"result"in e,WD=e=>FD(e)||$D(e),qD=e=>Array.isArray(e)?e.every(WD):WD(e),VD=e=>Array.isArray(e)&&e.length>0&&qD(e);let GD;const KD=e=>{GD=e},ZD=e=>{var t,n,r,i;return"undefined"!==typeof GD&&(GD+=1),{jsonrpc:null!==(t=e.jsonrpc)&&void 0!==t?t:"2.0",id:null!==(r=null!==(n=e.id)&&void 0!==n?n:GD)&&void 0!==r?r:BD(),method:e.method,params:null!==(i=e.params)&&void 0!==i?i:void 0}},YD=e=>e.map((e=>ZD(e))),QD=e=>Array.isArray(e)&&e.length>0;var JD,XD=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class eB{constructor(){let{timeout:e,eagerStart:t,timeoutMessage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{timeout:0,eagerStart:!1,timeoutMessage:"DeferredPromise timed out"};this[JD]="Promise",this._state="pending",this._promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t})),this._timeoutMessage=n,this._timeoutInterval=e,t&&this.startTimer()}get state(){return this._state}then(e,t){return XD(this,void 0,void 0,(function*(){return this._promise.then(e,t)}))}catch(e){return XD(this,void 0,void 0,(function*(){return this._promise.catch(e)}))}finally(e){return XD(this,void 0,void 0,(function*(){return this._promise.finally(e)}))}resolve(e){this._resolve(e),this._state="fulfilled",this._clearTimeout()}reject(e){this._reject(e),this._state="rejected",this._clearTimeout()}startTimer(){this._timeoutInterval&&this._timeoutInterval>0&&(this._timeoutId=setTimeout(this._checkTimeout.bind(this),this._timeoutInterval))}_checkTimeout(){"pending"===this._state&&this._timeoutId&&this.reject(new ZR(this._timeoutMessage))}_clearTimeout(){this._timeoutId&&clearTimeout(this._timeoutId)}}JD=Symbol.toStringTag;class tB{constructor(e,t){this.eventEmitter=e,this.autoReconnect=t,this.chunkTimeout=15e3}clearQueues(){"function"===typeof this._clearQueues&&this._clearQueues()}onError(e){this._clearQueues=e}parseResponse(e){const t=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((e=>{let n,r=e;this.lastChunk&&(r=this.lastChunk+r);try{n=JSON.parse(r)}catch(i){return this.lastChunk=r,this.lastChunkTimeout&&clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.autoReconnect||(this.clearQueues(),this.eventEmitter.emit("error",new rM({id:1,jsonrpc:"2.0",error:{code:2,message:"Chunk timeout"}})))}),this.chunkTimeout))}clearTimeout(this.lastChunkTimeout),this.lastChunk=void 0,n&&t.push(n)})),t}}
9688var nB=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class rB extends rR{constructor(){super(...arguments),this._eventEmitter=new FL,this._chainId="",this._accounts=[]}_getChainId(){var e;return nB(this,void 0,void 0,(function*(){const t=yield this.request(ZD({method:"eth_chainId",params:[]}));return null!==(e=null===t||void 0===t?void 0:t.result)&&void 0!==e?e:""}))}_getAccounts(){var e;return nB(this,void 0,void 0,(function*(){const t=yield this.request(ZD({method:"eth_accounts",params:[]}));return null!==(e=null===t||void 0===t?void 0:t.result)&&void 0!==e?e:[]}))}_onConnect(){Promise.all([this._getChainId().then((e=>{e!==this._chainId&&(this._chainId=e,this._eventEmitter.emit("chainChanged",this._chainId))})).catch((e=>{console.error(e)})),this._getAccounts().then((e=>{this._accounts.length===e.length&&e.every((t=>e.includes(t)))||(this._accounts=e,this._onAccountsChanged())})).catch((e=>{console.error(e)}))]).then((()=>this._eventEmitter.emit("connect",{chainId:this._chainId}))).catch((e=>{console.error(e)}))}_onDisconnect(e,t){this._eventEmitter.emit("disconnect",new lM(e,t))}_onAccountsChanged(){this._eventEmitter.emit("accountsChanged",this._accounts)}}var iB=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const sB={autoReconnect:!0,delay:5e3,maxAttempts:5};class oB extends rB{constructor(e,t,n){if(super(),this._connectionStatus="connecting",this._onMessageHandler=this._onMessage.bind(this),this._onOpenHandler=this._onConnect.bind(this),this._onCloseHandler=this._onCloseEvent.bind(this),this._onErrorHandler=this._onError.bind(this),!this._validateProviderPath(e))throw new eO(e);this._socketPath=e,this._socketOptions=t,this._reconnectOptions=Object.assign(Object.assign({},sB),null!==n&&void 0!==n?n:{}),this._pendingRequestsQueue=new Map,this._sentRequestsQueue=new Map,this._init(),this.connect(),this.chunkResponseParser=new tB(this._eventEmitter,this._reconnectOptions.autoReconnect),this.chunkResponseParser.onError((()=>{this._clearQueues()})),this.isReconnecting=!1}get SocketConnection(){return this._socketConnection}_init(){this._reconnectAttempts=0}connect(){try{this._openSocketConnection(),this._connectionStatus="connecting",this._addSocketListeners()}catch(e){if(!this.isReconnecting)throw this._connectionStatus="disconnected",e&&e.message?new MR(`Error while connecting to ${this._socketPath}. Reason: ${e.message}`):new eO(this._socketPath);setImmediate((()=>{this._reconnect()}))}}_validateProviderPath(e){return!!e}getPendingRequestQueueSize(){return this._pendingRequestsQueue.size}getSentRequestsQueueSize(){return this._sentRequestsQueue.size}supportsSubscriptions(){return!0}on(e,t){this._eventEmitter.on(e,t)}once(e,t){this._eventEmitter.once(e,t)}removeListener(e,t){this._eventEmitter.removeListener(e,t)}_onDisconnect(e,t){this._connectionStatus="disconnected",super._onDisconnect(e,t)}disconnect(e,t){const n=null!==e&&void 0!==e?e:1e3;this._removeSocketListeners(),"disconnected"!==this.getStatus()&&this._closeSocketConnection(n,t),this._onDisconnect(n,t)}safeDisconnect(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;return iB(this,void 0,void 0,(function*(){let i=0;yield(()=>iB(this,void 0,void 0,(function*(){return new Promise((e=>{const t=setInterval((()=>{n&&i>=5&&this.clearQueues(),0===this.getPendingRequestQueueSize()&&0===this.getSentRequestsQueueSize()&&(clearInterval(t),e(!0)),i+=1}),r)}))})))(),this.disconnect(e,t)}))}removeAllListeners(e){this._eventEmitter.removeAllListeners(e)}_onError(e){this.isReconnecting?this._reconnect():this._eventEmitter.emit("error",e)}reset(){this._sentRequestsQueue.clear(),this._pendingRequestsQueue.clear(),this._init(),this._removeSocketListeners(),this._addSocketListeners()}_reconnect(){this.isReconnecting||(this.isReconnecting=!0,this._sentRequestsQueue.size>0&&this._sentRequestsQueue.forEach(((e,t)=>{e.deferredPromise.reject(new DR),this._sentRequestsQueue.delete(t)})),this._reconnectAttempts<this._reconnectOptions.maxAttempts?(this._reconnectAttempts+=1,setTimeout((()=>{this._removeSocketListeners(),this.connect(),this.isReconnecting=!1}),this._reconnectOptions.delay)):(this.isReconnecting=!1,this._clearQueues(),this._removeSocketListeners(),this._eventEmitter.emit("error",new LR(this._reconnectOptions.maxAttempts))))}request(e){return iB(this,void 0,void 0,(function*(){if(tD(this._socketConnection))throw new Error("Connection is undefined");"disconnected"===this.getStatus()&&this.connect();const t=QD(e)?e[0].id:e.id;if(!t)throw new nO("Request Id not defined");if(this._sentRequestsQueue.has(t))throw new BR(t);const n=new eB;n.catch((e=>{this._eventEmitter.emit("error",e)}));const r={payload:e,deferredPromise:n};if("connecting"===this.getStatus())return this._pendingRequestsQueue.set(t,r),r.deferredPromise;this._sentRequestsQueue.set(t,r);try{this._sendToSocket(r.payload)}catch(i){this._sentRequestsQueue.delete(t),this._eventEmitter.emit("error",i)}return n}))}_onConnect(){this._connectionStatus="connected",this._reconnectAttempts=0,super._onConnect(),this._sendPendingRequests()}_sendPendingRequests(){for(const[t,n]of this._pendingRequestsQueue.entries())try{this._sendToSocket(n.payload),this._pendingRequestsQueue.delete(t),this._sentRequestsQueue.set(t,n)}catch(e){this._pendingRequestsQueue.delete(t),this._eventEmitter.emit("error",e)}}_onMessage(e){const t=this._parseResponses(e);if(!tD(t)&&0!==t.length)for(const n of t){if(zD(n)&&n.method.endsWith("_subscription"))return void this._eventEmitter.emit("message",n);const e=VD(n)?n[0].id:n.id,t=this._sentRequestsQueue.get(e);if(!t)return;(VD(n)||FD(n)||$D(n))&&(this._eventEmitter.emit("message",n),t.deferredPromise.resolve(n)),this._sentRequestsQueue.delete(e)}}clearQueues(e){this._clearQueues(e)}_clearQueues(e){this._pendingRequestsQueue.size>0&&this._pendingRequestsQueue.forEach(((t,n)=>{t.deferredPromise.reject(new jR(e)),this._pendingRequestsQueue.delete(n)})),this._sentRequestsQueue.size>0&&this._sentRequestsQueue.forEach(((t,n)=>{t.deferredPromise.reject(new jR(e)),this._sentRequestsQueue.delete(n)})),this._removeSocketListeners()}}class aB{constructor(){this._emitter=new zL}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e,t){this._emitter.emit(e,t)}listenerCount(e){return this._emitter.listenerCount(e)}listeners(e){return this._emitter.listeners(e)}eventNames(){return this._emitter.eventNames()}removeAllListeners(){return this._emitter.removeAllListeners()}setMaxListenerWarningThreshold(e){this._emitter.setMaxListeners(e)}getMaxListeners(){return this._emitter.getMaxListeners()}}var cB;
9688!function(e){e.CONFIG_CHANGE="CONFIG_CHANGE"}(cB||(cB={}));class lB extends aB{constructor(e){super(),this.config={handleRevert:!1,defaultAccount:void 0,defaultBlock:"latest",transactionBlockTimeout:50,transactionConfirmationBlocks:24,transactionPollingInterval:1e3,transactionPollingTimeout:75e4,transactionReceiptPollingInterval:void 0,transactionSendTimeout:75e4,transactionConfirmationPollingInterval:void 0,blockHeaderTimeout:10,maxListenersWarningThreshold:100,contractDataInputFill:"data",defaultNetworkId:void 0,defaultChain:"mainnet",defaultHardfork:"london",defaultCommon:void 0,defaultTransactionType:"0x2",defaultMaxPriorityFeePerGas:OL(25e8),enableExperimentalFeatures:{useSubscriptionWhenCheckingBlockTimeout:!1,useRpcCallSpecification:!1},transactionBuilder:void 0,transactionTypeParser:void 0,defaultReturnFormat:YN},this.setConfig(null!==e&&void 0!==e?e:{})}setConfig(e){const t=Object.keys(e);for(const n of t)this._triggerConfigChange(n,e[n]);Object.assign(this.config,e)}get handleRevert(){return this.config.handleRevert}set handleRevert(e){this._triggerConfigChange("handleRevert",e),this.config.handleRevert=e}get contractDataInputFill(){return this.config.contractDataInputFill}set contractDataInputFill(e){this._triggerConfigChange("contractDataInputFill",e),this.config.contractDataInputFill=e}get defaultAccount(){return this.config.defaultAccount}set defaultAccount(e){this._triggerConfigChange("defaultAccount",e),this.config.defaultAccount=e}get defaultBlock(){return this.config.defaultBlock}set defaultBlock(e){this._triggerConfigChange("defaultBlock",e),this.config.defaultBlock=e}get transactionSendTimeout(){return this.config.transactionSendTimeout}set transactionSendTimeout(e){this._triggerConfigChange("transactionSendTimeout",e),this.config.transactionSendTimeout=e}get transactionBlockTimeout(){return this.config.transactionBlockTimeout}set transactionBlockTimeout(e){this._triggerConfigChange("transactionBlockTimeout",e),this.config.transactionBlockTimeout=e}get transactionConfirmationBlocks(){return this.config.transactionConfirmationBlocks}set transactionConfirmationBlocks(e){this._triggerConfigChange("transactionConfirmationBlocks",e),this.config.transactionConfirmationBlocks=e}get transactionPollingInterval(){return this.config.transactionPollingInterval}set transactionPollingInterval(e){this._triggerConfigChange("transactionPollingInterval",e),this.config.transactionPollingInterval=e,this.transactionReceiptPollingInterval=e,this.transactionConfirmationPollingInterval=e}get transactionPollingTimeout(){return this.config.transactionPollingTimeout}set transactionPollingTimeout(e){this._triggerConfigChange("transactionPollingTimeout",e),this.config.transactionPollingTimeout=e}get transactionReceiptPollingInterval(){return this.config.transactionReceiptPollingInterval}set transactionReceiptPollingInterval(e){this._triggerConfigChange("transactionReceiptPollingInterval",e),this.config.transactionReceiptPollingInterval=e}get transactionConfirmationPollingInterval(){return this.config.transactionConfirmationPollingInterval}set transactionConfirmationPollingInterval(e){this._triggerConfigChange("transactionConfirmationPollingInterval",e),this.config.transactionConfirmationPollingInterval=e}get blockHeaderTimeout(){return this.config.blockHeaderTimeout}set blockHeaderTimeout(e){this._triggerConfigChange("blockHeaderTimeout",e),this.config.blockHeaderTimeout=e}get enableExperimentalFeatures(){return this.config.enableExperimentalFeatures}set enableExperimentalFeatures(e){this._triggerConfigChange("enableExperimentalFeatures",e),this.config.enableExperimentalFeatures=e}get maxListenersWarningThreshold(){return this.config.maxListenersWarningThreshold}set maxListenersWarningThreshold(e){this._triggerConfigChange("maxListenersWarningThreshold",e),this.setMaxListenerWarningThreshold(e),this.config.maxListenersWarningThreshold=e}get defaultReturnFormat(){return this.config.defaultReturnFormat}set defaultReturnFormat(e){this._triggerConfigChange("defaultReturnFormat",e),this.config.defaultReturnFormat=e}get defaultNetworkId(){return this.config.defaultNetworkId}set defaultNetworkId(e){this._triggerConfigChange("defaultNetworkId",e),this.config.defaultNetworkId=e}get defaultChain(){return this.config.defaultChain}set defaultChain(e){if(!tD(this.config.defaultCommon)&&!tD(this.config.defaultCommon.baseChain)&&e!==this.config.defaultCommon.baseChain)throw new sM(this.config.defaultChain,e);this._triggerConfigChange("defaultChain",e),this.config.defaultChain=e}get defaultHardfork(){return this.config.defaultHardfork}set defaultHardfork(e){if(!tD(this.config.defaultCommon)&&!tD(this.config.defaultCommon.hardfork)&&e!==this.config.defaultCommon.hardfork)throw new iM(this.config.defaultCommon.hardfork,e);this._triggerConfigChange("defaultHardfork",e),this.config.defaultHardfork=e}get defaultCommon(){return this.config.defaultCommon}set defaultCommon(e){if(!tD(this.config.defaultHardfork)&&!tD(e)&&!tD(e.hardfork)&&this.config.defaultHardfork!==e.hardfork)throw new iM(this.config.defaultHardfork,e.hardfork);if(!tD(this.config.defaultChain)&&!tD(e)&&!tD(e.baseChain)&&this.config.defaultChain!==e.baseChain)throw new sM(this.config.defaultChain,e.baseChain);this._triggerConfigChange("defaultCommon",e),this.config.defaultCommon=e}get defaultTransactionType(){return this.config.defaultTransactionType}set defaultTransactionType(e){this._triggerConfigChange("defaultTransactionType",e),this.config.defaultTransactionType=e}get defaultMaxPriorityFeePerGas(){return this.config.defaultMaxPriorityFeePerGas}set defaultMaxPriorityFeePerGas(e){this._triggerConfigChange("defaultMaxPriorityFeePerGas",e),this.config.defaultMaxPriorityFeePerGas=e}get transactionBuilder(){return this.config.transactionBuilder}set transactionBuilder(e){this._triggerConfigChange("transactionBuilder",e),this.config.transactionBuilder=e}get transactionTypeParser(){return this.config.transactionTypeParser}set transactionTypeParser(e){this._triggerConfigChange("transactionTypeParser",e),this.config.transactionTypeParser=e}
9688_triggerConfigChange(e,t){this.emit(cB.CONFIG_CHANGE,{name:e,oldValue:this.config[e],newValue:t})}}var uB=n(4524),dB=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class hB extends rR{constructor(e,t){if(super(),!hB.validateClientUrl(e))throw new eO(e);this.clientUrl=e,this.httpProviderOptions=t}static validateClientUrl(e){return"string"===typeof e&&/^http(s)?:\/\//i.test(e)}getStatus(){throw new KR}supportsSubscriptions(){return!1}request(e,t){var n;return dB(this,void 0,void 0,(function*(){const r=Object.assign(Object.assign({},null===(n=this.httpProviderOptions)||void 0===n?void 0:n.providerOptions),t),i=yield uB(this.clientUrl,Object.assign(Object.assign({},r),{method:"POST",headers:Object.assign(Object.assign({},r.headers),{"Content-Type":"application/json"}),body:JSON.stringify(e)}));if(!i.ok)throw new nM(yield i.json());return yield i.json()}))}on(){throw new KR}removeListener(){throw new KR}once(){throw new KR}removeAllListeners(){throw new KR}connect(){throw new KR}disconnect(){throw new KR}reset(){throw new KR}reconnect(){throw new KR}}var pB=null;"undefined"!==typeof WebSocket?pB=WebSocket:"undefined"!==typeof MozWebSocket?pB=MozWebSocket:"undefined"!==typeof n.g?pB=n.g.WebSocket||n.g.MozWebSocket:"undefined"!==typeof window?pB=window.WebSocket||window.MozWebSocket:"undefined"!==typeof self&&(pB=self.WebSocket||self.MozWebSocket);const fB=pB;const mB=e=>rR.isWeb3Provider(e),gB=e=>"string"!==typeof e&&"request"in e&&"Function"===e.request.constructor.name,yB=e=>"string"!==typeof e&&"request"in e&&"AsyncFunction"===e.request.constructor.name,vB=e=>"string"!==typeof e&&"send"in e,wB=e=>"string"!==typeof e&&"sendAsync"in e,bB=e=>e&&(mB(e)||yB(e)||gB(e)||wB(e)||vB(e));var xB,EB=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};!function(e){e.PROVIDER_CHANGED="PROVIDER_CHANGED",e.BEFORE_PROVIDER_CHANGE="BEFORE_PROVIDER_CHANGE"}(xB||(xB={}));const _B={HttpProvider:hB,WebsocketProvider:class extends oB{constructor(e,t,n){super(e,t,n)}_validateProviderPath(e){return"string"===typeof e&&/^ws(s)?:\/\//i.test(e)}getStatus(){if(this._socketConnection&&!tD(this._socketConnection))switch(this._socketConnection.readyState){case this._socketConnection.CONNECTING:return"connecting";case this._socketConnection.OPEN:return"connected";default:return"disconnected"}return"disconnected"}_openSocketConnection(){this._socketConnection=new fB(this._socketPath,void 0,this._socketOptions&&0===Object.keys(this._socketOptions).length?void 0:this._socketOptions)}_closeSocketConnection(e,t){var n;null===(n=this._socketConnection)||void 0===n||n.close(e,t)}_sendToSocket(e){var t;if("disconnected"===this.getStatus())throw new jR;null===(t=this._socketConnection)||void 0===t||t.send(JSON.stringify(e))}_parseResponses(e){return this.chunkResponseParser.parseResponse(e.data)}_addSocketListeners(){var e,t,n,r;null===(e=this._socketConnection)||void 0===e||e.addEventListener("open",this._onOpenHandler),null===(t=this._socketConnection)||void 0===t||t.addEventListener("message",this._onMessageHandler),null===(n=this._socketConnection)||void 0===n||n.addEventListener("close",(e=>this._onCloseHandler(e))),null===(r=this._socketConnection)||void 0===r||r.addEventListener("error",this._onErrorHandler)}_removeSocketListeners(){var e,t,n;null===(e=this._socketConnection)||void 0===e||e.removeEventListener("message",this._onMessageHandler),null===(t=this._socketConnection)||void 0===t||t.removeEventListener("open",this._onOpenHandler),null===(n=this._socketConnection)||void 0===n||n.removeEventListener("close",this._onCloseHandler)}_onCloseEvent(e){var t;!this._reconnectOptions.autoReconnect||[1e3,1001].includes(e.code)&&e.wasClean?(this._clearQueues(e),this._removeSocketListeners(),this._onDisconnect(e.code,e.reason),null===(t=this._socketConnection)||void 0===t||t.removeEventListener("error",this._onErrorHandler)):this._reconnect()}}};class kB extends aB{constructor(e,t,n){super(),tD(e)||this.setProvider(e),this.useRpcCallSpecification=t,tD(n)||(this.middleware=n)}static get providers(){return _B}get provider(){return this._provider}get providers(){return _B}setProvider(e){let t;if(e&&"string"===typeof e&&this.providers)if(/^http(s)?:\/\//i.test(e))t=new this.providers.HttpProvider(e);else{if(!/^ws(s)?:\/\//i.test(e))throw new XR(`Can't autodetect provider for "${e}"`);t=new this.providers.WebsocketProvider(e)}else t=tD(e)?void 0:e;
9688return this.emit(xB.BEFORE_PROVIDER_CHANGE,this._provider),this._provider=t,this.emit(xB.PROVIDER_CHANGED,this._provider),!0}setMiddleware(e){this.middleware=e}send(e){return EB(this,void 0,void 0,(function*(){const t=Object.assign({},e);let n=yield this._sendRequest(t);if(tD(this.middleware)||(n=yield this.middleware.processResponse(n)),FD(n))return n.result;throw new nM(n)}))}sendBatch(e){return EB(this,void 0,void 0,(function*(){return yield this._sendRequest(e)}))}_sendRequest(e){return EB(this,void 0,void 0,(function*(){const{provider:t}=this;if(tD(t))throw new XR("Provider not available. Use `.setProvider` or `.provider=` to initialize the provider.");let n=QD(e)?YD(e):ZD(e);if(tD(this.middleware)||(n=yield this.middleware.processRequest(n)),mB(t)){let e;try{e=yield t.request(n)}catch(r){e=r}return this._processJsonRpcResponse(n,e,{legacy:!1,error:!1})}if(yB(t))return t.request(n).then((e=>this._processJsonRpcResponse(n,e,{legacy:!0,error:!1}))).catch((e=>this._processJsonRpcResponse(n,e,{legacy:!0,error:!0})));if(gB(t))return new Promise(((e,r)=>{const i=e=>{r(this._processJsonRpcResponse(n,e,{legacy:!0,error:!0}))},s=t=>e(this._processJsonRpcResponse(n,t,{legacy:!0,error:!1})),o=t.request(n,((e,t)=>e?i(e):s(t)));if(RD(o)){o.then(s).catch((e=>{try{const t=this._processJsonRpcResponse(n,e,{legacy:!0,error:!0});r(t)}catch(t){r(t)}}))}}));if(vB(t))return new Promise(((e,r)=>{t.send(n,((t,i)=>{if(t)return r(this._processJsonRpcResponse(n,t,{legacy:!0,error:!0}));if(tD(i))throw new nM({},'Got a "nullish" response from provider.');return e(this._processJsonRpcResponse(n,i,{legacy:!0,error:!1}))}))}));if(wB(t))return t.sendAsync(n).then((e=>this._processJsonRpcResponse(n,e,{legacy:!0,error:!1}))).catch((e=>this._processJsonRpcResponse(n,e,{legacy:!0,error:!0})));throw new XR("Provider does not have a request or send method to use.")}))}_processJsonRpcResponse(e,t,n){let{legacy:r,error:i}=n;if(tD(t))return this._buildResponse(e,null,i);if($D(t)){if(this.useRpcCallSpecification&&UD(t)){const e=t;if(uM.get(e.error.code)){throw new(0,uM.get(e.error.code).error)(e)}throw new cM(e)}if(!kB._isReverted(t))throw new rM(t,e)}if(FD(t))return t;if(t instanceof Error)throw kB._isReverted(t),t;if(!r&&QD(e)&&VD(t))return t;if(r&&!i&&QD(e))return t;if(r&&i&&QD(e))throw t;if(r&&!$D(t)&&!FD(t))return this._buildResponse(e,t,i);if(QD(e)&&!Array.isArray(t))throw new nM(t,"Got normal response for a batch request.");if(!QD(e)&&Array.isArray(t))throw new nM(t,"Got batch response for a normal request.");throw new nM(t,"Invalid response")}static _isReverted(e){let t;if($D(e)?t=e.error:e instanceof Error&&(t=e),null===t||void 0===t?void 0:t.message.includes("revert"))throw new zR(t);return!1}_buildResponse(e,t,n){const r={jsonrpc:"2.0",id:QD(e)?e[0].id:"id"in e?e.id:null};return n?Object.assign(Object.assign({},r),{error:t}):Object.assign(Object.assign({},r),{result:t})}}var CB=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class AB{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.requestManager=e,this.registeredSubscriptions=t,this.tolerateUnlinkedSubscription=n,this._subscriptions=new Map,this.requestManager.on(xB.BEFORE_PROVIDER_CHANGE,(()=>CB(this,void 0,void 0,(function*(){yield this.unsubscribe()})))),this.requestManager.on(xB.PROVIDER_CHANGED,(()=>{this.clear(),this.listenToProviderEvents()})),this.listenToProviderEvents()}listenToProviderEvents(){const e=this.requestManager.provider;this.requestManager.provider&&("function"!==typeof(null===e||void 0===e?void 0:e.supportsSubscriptions)||(null===e||void 0===e?void 0:e.supportsSubscriptions()))&&"function"===typeof this.requestManager.provider.on&&("function"===typeof this.requestManager.provider.request?this.requestManager.provider.on("message",(e=>this.messageListener(e))):e.on("data",(e=>this.messageListener(e))))}messageListener(e){var t,n,r;if(!e)throw new tO("Should not call messageListener with no data. Type was");const i=(null===(t=e.params)||void 0===t?void 0:t.subscription)||(null===(n=e.data)||void 0===n?void 0:n.subscription)||(null===(r=e.id)||void 0===r?void 0:r.toString(16));if(i){const t=this._subscriptions.get(i);null===t||void 0===t||t.processSubscriptionData(e)}}subscribe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:YN;return CB(this,void 0,void 0,(function*(){const r=this.registeredSubscriptions[e];if(!r)throw new tO("Invalid subscription type");const i=new r(null!==t&&void 0!==t?t:void 0,{subscriptionManager:this,returnFormat:n});return yield this.addSubscription(i),i}))}get subscriptions(){return this._subscriptions}addSubscription(e){return CB(this,void 0,void 0,(function*(){if(!this.requestManager.provider)throw new XR("Provider not available");if(!this.supportsSubscriptions())throw new tO("The current provider does not support subscriptions");
9688if(e.id&&this._subscriptions.has(e.id))throw new tO(`Subscription with id "${e.id}" already exists`);if(yield e.sendSubscriptionRequest(),tD(e.id))throw new tO("Subscription is not subscribed yet.");return this._subscriptions.set(e.id,e),e.id}))}removeSubscription(e){return CB(this,void 0,void 0,(function*(){const{id:t}=e;if(tD(t))throw new tO("Subscription is not subscribed yet. Or, had already been unsubscribed but not through the Subscription Manager.");if(!this._subscriptions.has(t)&&!this.tolerateUnlinkedSubscription)throw new tO(`Subscription with id "${t.toString()}" does not exists`);return yield e.sendUnsubscribeRequest(),this._subscriptions.delete(t),t}))}unsubscribe(e){return CB(this,void 0,void 0,(function*(){const t=[];for(const[n,r]of this.subscriptions.entries())(!e||"function"===typeof e&&e({id:n,sub:r}))&&t.push(this.removeSubscription(r));return Promise.all(t)}))}clear(){this._subscriptions.clear()}supportsSubscriptions(){return!tD(this.requestManager.provider)&&((e=this.requestManager.provider)&&"supportsSubscriptions"in e?e.supportsSubscriptions():!(!e||"string"===typeof e||!("on"in e)));var e}}var SB=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class IB extends aB{constructor(e,t){var n;super(),this.args=e;const{requestManager:r}=t,{subscriptionManager:i}=t;this._subscriptionManager=r?new AB(r,{},!0):i,this._returnFormat=null!==(n=null===t||void 0===t?void 0:t.returnFormat)&&void 0!==n?n:YN}get id(){return this._id}get lastBlock(){return this._lastBlock}subscribe(){return SB(this,void 0,void 0,(function*(){return this._subscriptionManager.addSubscription(this)}))}processSubscriptionData(e){var t,n;(null===e||void 0===e?void 0:e.data)?this._processSubscriptionResult(null!==(n=null===(t=null===e||void 0===e?void 0:e.data)||void 0===t?void 0:t.result)&&void 0!==n?n:null===e||void 0===e?void 0:e.data):e&&zD(e)&&this._processSubscriptionResult(null===e||void 0===e?void 0:e.params.result)}sendSubscriptionRequest(){return SB(this,void 0,void 0,(function*(){return this._id=yield this._subscriptionManager.requestManager.send({method:"eth_subscribe",params:this._buildSubscriptionParams()}),this.emit("connected",this._id),this._id}))}get returnFormat(){return this._returnFormat}get subscriptionManager(){return this._subscriptionManager}resubscribe(){return SB(this,void 0,void 0,(function*(){yield this.unsubscribe(),yield this.subscribe()}))}unsubscribe(){return SB(this,void 0,void 0,(function*(){this.id&&(yield this._subscriptionManager.removeSubscription(this))}))}sendUnsubscribeRequest(){return SB(this,void 0,void 0,(function*(){yield this._subscriptionManager.requestManager.send({method:"eth_unsubscribe",params:[this.id]}),this._id=void 0}))}formatSubscriptionResult(e){return e}_processSubscriptionResult(e){this.emit("data",this.formatSubscriptionResult(e))}_processSubscriptionError(e){this.emit("error",e)}_buildSubscriptionParams(){throw new Error("Implement in the child class")}}var TB=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class PB extends iR{constructor(){super(...arguments),this._addressMap=new Map,this._defaultKeyName="web3js_wallet"}static getStorage(){let e;try{e=window.localStorage;const t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch(t){return!t||22!==t.code&&1014!==t.code&&"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||eL(e)||0===e.length?void 0:e}}create(e){for(let t=0;t<e;t+=1)this.add(this._accountProvider.create());return this}add(e){var t;if("string"===typeof e)return this.add(this._accountProvider.privateKeyToAccount(e));let n=this.length;return this.get(e.address)&&(console.warn(`Account ${e.address.toLowerCase()} already exists.`),n=null!==(t=this._addressMap.get(e.address.toLowerCase()))&&void 0!==t?t:n),this._addressMap.set(e.address.toLowerCase(),n),this[n]=e,this}get(e){if("string"===typeof e){const t=this._addressMap.get(e.toLowerCase());return eL(t)?void 0:this[t]}return this[e]}remove(e){if("string"===typeof e){const t=this._addressMap.get(e.toLowerCase());return!eL(t)&&(this._addressMap.delete(e.toLowerCase()),this.splice(t,1),!0)}return!!this[e]&&(this.splice(e,1),!0)}clear(){return this._addressMap.clear(),this.length=0,this}encrypt(e,t){return TB(this,void 0,void 0,(function*(){return Promise.all(this.map((n=>
9688TB(this,void 0,void 0,(function*(){return n.encrypt(e,t)})))))}))}decrypt(e,t,n){return TB(this,void 0,void 0,(function*(){const r=yield Promise.all(e.map((e=>TB(this,void 0,void 0,(function*(){return this._accountProvider.decrypt(e,t,n)})))));for(const e of r)this.add(e);return this}))}save(e,t){return TB(this,void 0,void 0,(function*(){const n=PB.getStorage();if(!n)throw new Error("Local storage not available.");return n.setItem(null!==t&&void 0!==t?t:this._defaultKeyName,JSON.stringify(yield this.encrypt(e))),!0}))}load(e,t){return TB(this,void 0,void 0,(function*(){const n=PB.getStorage();if(!n)throw new Error("Local storage not available.");const r=n.getItem(null!==t&&void 0!==t?t:this._defaultKeyName);return r&&(yield this.decrypt(JSON.parse(r)||[],e)),this}))}}const NB={web:TM};function RB(e,t,n){if(!n.startsWith("aes-"))throw new Error(`AES submodule doesn't support mode ${n}`);if(16!==t.length)throw new Error("AES: wrong IV length");if(n.startsWith("aes-128")&&16!==e.length||n.startsWith("aes-256")&&32!==e.length)throw new Error("AES: wrong key length")}async function OB(e,t,n){if(!NB.web)throw new Error("Browser crypto not available.");let r;if(["aes-128-cbc","aes-256-cbc"].includes(e)&&(r="cbc"),["aes-128-ctr","aes-256-ctr"].includes(e)&&(r="ctr"),!r)throw new Error("AES: unsupported mode");return[await NB.web.subtle.importKey("raw",t,{name:`AES-${r.toUpperCase()}`,length:8*t.length},!0,["encrypt","decrypt"]),{name:`aes-${r}`,iv:n,counter:n,length:128}]}async function MB(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"aes-128-ctr",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(RB(t,n,r),NB.web){const[s,o]=await OB(r,t,n),a=await NB.web.subtle.encrypt(o,s,e);let c=new Uint8Array(a);return i||"aes-cbc"!==o.name||e.length%16||(c=c.slice(0,-16)),c}if(NB.node){const s=NB.node.createCipheriv(r,t,n);return s.setAutoPadding(i),UM(s.update(e),s.final())}throw new Error("The environment doesn't have AES module")}async function jB(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"aes-128-ctr",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(RB(t,n,r),NB.web){const[s,o]=await OB(r,t,n);if(!i&&"aes-cbc"===o.name){const i=await async function(e,t,n,r){const i=e.slice(-16);for(let s=0;s<16;s++)i[s]^=16^n[s];return(await MB(i,t,n,r)).slice(0,16)}(e,t,n,r);e=UM(e,i)}const a=await NB.web.subtle.decrypt(o,s,e),c=new Uint8Array(a);if("aes-cbc"===o.name){if(!function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(await MB(c,t,n,r),e))throw new Error("AES: wrong padding")}return c}if(NB.node){const s=NB.node.createDecipheriv(r,t,n);return s.setAutoPadding(i),UM(s.update(e),s.final())}throw new Error("The environment doesn't have AES module")}class LB extends FM{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,fM(e);const n=BM(t);if(this.iHash=e.create(),"function"!==typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=e.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),i.fill(0)}update(e){return mM(this),this.iHash.update(e),this}digestInto(e){mM(this),pM(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:s,outputLen:o}=this;return e.finished=r,e.destroyed=i,e.blockLen=s,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const DB=(e,t,n)=>new LB(e,t).update(n).digest();function BB(e,t,n,r){fM(e);const i=zM({dkLen:32,asyncTick:10},r),{c:s,dkLen:o,asyncTick:a}=i;if(hM(s),hM(o),hM(a),s<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=BM(t),l=BM(n),u=new Uint8Array(o),d=DB.create(e,c),h=d._cloneInto().update(l);return{c:s,dkLen:o,asyncTick:a,DK:u,PRF:d,PRFSalt:h}}function UB(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}function FB(e,t,n,r){const{c:i,dkLen:s,DK:o,PRF:a,PRFSalt:c}=BB(e,t,n,r);let l;const u=new Uint8Array(4),d=NM(u),h=new Uint8Array(a.outputLen);for(let p=1,f=0;f<s;p++,f+=a.outputLen){const e=o.subarray(f,f+a.outputLen);d.setInt32(0,p,!1),(l=c._cloneInto(l)).update(u).digestInto(h),e.set(h.subarray(0,e.length));for(let t=1;t<i;t++){a._cloneInto(l).update(h).digestInto(h);for(let t=0;t<e.length;t++)e[t]^=h[t]}}return UB(a,c,o,l,h)}DB.create=(e,t)=>
vendor: 4,225 bytes, line 9688
9688new LB(e,t);const $B=(e,t,n)=>e&t^~e&n,zB=(e,t,n)=>e&t^e&n^t&n;class HB extends FM{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=NM(this.buffer)}update(e){mM(this);const{view:t,buffer:n,blockLen:r}=this,i=(e=BM(e)).length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);if(o!==r)n.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=NM(e);for(;r<=i-s;s+=r)this.process(t,s)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){mM(this),gM(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:i}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>r-s&&(this.process(n,0),s=0);for(let u=s;u<r;u++)t[u]=0;!function(e,t,n,r){if("function"===typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(n>>i&s),a=Number(n&s),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,a,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);const o=NM(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<c;u++)o.setUint32(4*u,l[u],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:s,pos:o}=this;return e.length=r,e.pos=o,e.finished=i,e.destroyed=s,r%t&&e.buffer.set(n),e}}const WB=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),qB=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),VB=new Uint32Array(64);class GB extends HB{constructor(){super(64,32,8,!1),this.A=0|qB[0],this.B=0|qB[1],this.C=0|qB[2],this.D=0|qB[3],this.E=0|qB[4],this.F=0|qB[5],this.G=0|qB[6],this.H=0|qB[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:s,G:o,H:a}=this;return[e,t,n,r,i,s,o,a]}set(e,t,n,r,i,s,o,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|s,this.G=0|o,this.H=0|a}process(e,t){for(let u=0;u<16;u++,t+=4)VB[u]=e.getUint32(t,!1);for(let u=16;u<64;u++){const e=VB[u-15],t=VB[u-2],n=RM(e,7)^RM(e,18)^e>>>3,r=RM(t,17)^RM(t,19)^t>>>10;VB[u]=r+VB[u-7]+n+VB[u-16]|0}let{A:n,B:r,C:i,D:s,E:o,F:a,G:c,H:l}=this;for(let u=0;u<64;u++){const e=l+(RM(o,6)^RM(o,11)^RM(o,25))+$B(o,a,c)+WB[u]+VB[u]|0,t=(RM(n,2)^RM(n,13)^RM(n,22))+zB(n,r,i)|0;l=c,c=a,a=o,o=s+e|0,s=i,i=r,r=n,n=e+t|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,s=s+this.D|0,o=o+this.E|0,a=a+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,s,o,a,c,l)}roundClean(){VB.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const KB=HM((()=>new GB)),[ZB,YB]=(()=>IM.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a854
96886d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),QB=new Uint32Array(80),JB=new Uint32Array(80);class XB extends HB{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:s,Dh:o,Dl:a,Eh:c,El:l,Fh:u,Fl:d,Gh:h,Gl:p,Hh:f,Hl:m}=this;return[e,t,n,r,i,s,o,a,c,l,u,d,h,p,f,m]}set(e,t,n,r,i,s,o,a,c,l,u,d,h,p,f,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|s,this.Dh=0|o,this.Dl=0|a,this.Eh=0|c,this.El=0|l,this.Fh=0|u,this.Fl=0|d,this.Gh=0|h,this.Gl=0|p,this.Hh=0|f,this.Hl=0|m}process(e,t){for(let v=0;v<16;v++,t+=4)QB[v]=e.getUint32(t),JB[v]=e.getUint32(t+=4);for(let v=16;v<80;v++){const e=0|QB[v-15],t=0|JB[v-15],n=IM.rotrSH(e,t,1)^IM.rotrSH(e,t,8)^IM.shrSH(e,t,7),r=IM.rotrSL(e,t,1)^IM.rotrSL(e,t,8)^IM.shrSL(e,t,7),i=0|QB[v-2],s=0|JB[v-2],o=IM.rotrSH(i,s,19)^IM.rotrBH(i,s,61)^IM.shrSH(i,s,6),a=IM.rotrSL(i,s,19)^IM.rotrBL(i,s,61)^IM.shrSL(i,s,6),c=IM.add4L(r,a,JB[v-7],JB[v-16]),l=IM.add4H(c,n,o,QB[v-7],QB[v-16]);QB[v]=0|l,JB[v]=0|c}let{Ah:n,Al:r,Bh:i,Bl:s,Ch:o,Cl:a,Dh:c,Dl:l,Eh:u,El:d,Fh:h,Fl:p,Gh:f,Gl:m,Hh:g,Hl:y}=this;for(let v=0;v<80;v++){const e=IM.rotrSH(u,d,14)^IM.rotrSH(u,d,18)^IM.rotrBH(u,d,41),t=IM.rotrSL(u,d,14)^IM.rotrSL(u,d,18)^IM.rotrBL(u,d,41),w=u&h^~u&f,b=d&p^~d&m,x=IM.add5L(y,t,b,YB[v],JB[v]),E=IM.add5H(x,g,e,w,ZB[v],QB[v]),_=0|x,k=IM.rotrSH(n,r,28)^IM.rotrBH(n,r,34)^IM.rotrBH(n,r,39),C=IM.rotrSL(n,r,28)^IM.rotrBL(n,r,34)^IM.rotrBL(n,r,39),A=n&i^n&o^i&o,S=r&s^r&a^s&a;g=0|f,y=0|m,f=0|h,m=0|p,h=0|u,p=0|d,({h:u,l:d}=IM.add(0|c,0|l,0|E,0|_)),c=0|o,l=0|a,o=0|i,a=0|s,i=0|n,s=0|r;const I=IM.add3L(_,C,S);n=IM.add3H(I,E,k,A),r=0|I}({h:n,l:r}=IM.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:i,l:s}=IM.add(0|this.Bh,0|this.Bl,0|i,0|s)),({h:o,l:a}=IM.add(0|this.Ch,0|this.Cl,0|o,0|a)),({h:c,l:l}=IM.add(0|this.Dh,0|this.Dl,0|c,0|l)),({h:u,l:d}=IM.add(0|this.Eh,0|this.El,0|u,0|d)),({h:h,l:p}=IM.add(0|this.Fh,0|this.Fl,0|h,0|p)),({h:f,l:m}=IM.add(0|this.Gh,0|this.Gl,0|f,0|m)),({h:g,l:y}=IM.add(0|this.Hh,0|this.Hl,0|g,0|y)),this.set(n,r,i,s,o,a,c,l,u,d,h,p,f,m,g,y)}roundClean(){QB.fill(0),JB.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const eU=HM((()=>new XB));function tU(e,t,n,r,i){if(!["sha256","sha512"].includes(i))throw new Error("Only sha256 and sha512 are supported");return uj(e),uj(t),FB("sha256"===i?KB:eU,e,t,{c:n,dkLen:r})}function nU(e,t,n,r,i,s){let o=e[t++]^n[r++],a=e[t++]^n[r++],c=e[t++]^n[r++],l=e[t++]^n[r++],u=e[t++]^n[r++],d=e[t++]^n[r++],h=e[t++]^n[r++],p=e[t++]^n[r++],f=e[t++]^n[r++],m=e[t++]^n[r++],g=e[t++]^n[r++],y=e[t++]^n[r++],v=e[t++]^n[r++],w=e[t++]^n[r++],b=e[t++]^n[r++],x=e[t++]^n[r++],E=o,_=a,k=c,C=l,A=u,S=d,I=h,T=p,P=f,N=m,R=g,O=y,M=v,j=w,L=b,D=x;for(let B=0;B<8;B+=2)A^=OM(E+M|0,7),P^=OM(A+E|0,9),M^=OM(P+A|0,13),E^=OM(M+P|0,18),N^=OM(S+_|0,7),j^=OM(N+S|0,9),_^=OM(j+N|0,13),S^=OM(_+j|0,18),L^=OM(R+I|0,7),
9688k^=OM(L+R|0,9),I^=OM(k+L|0,13),R^=OM(I+k|0,18),C^=OM(D+O|0,7),T^=OM(C+D|0,9),O^=OM(T+C|0,13),D^=OM(O+T|0,18),_^=OM(E+C|0,7),k^=OM(_+E|0,9),C^=OM(k+_|0,13),E^=OM(C+k|0,18),I^=OM(S+A|0,7),T^=OM(I+S|0,9),A^=OM(T+I|0,13),S^=OM(A+T|0,18),O^=OM(R+N|0,7),P^=OM(O+R|0,9),N^=OM(P+O|0,13),R^=OM(N+P|0,18),M^=OM(D+L|0,7),j^=OM(M+D|0,9),L^=OM(j+M|0,13),D^=OM(L+j|0,18);i[s++]=o+E|0,i[s++]=a+_|0,i[s++]=c+k|0,i[s++]=l+C|0,i[s++]=u+A|0,i[s++]=d+S|0,i[s++]=h+I|0,i[s++]=p+T|0,i[s++]=f+P|0,i[s++]=m+N|0,i[s++]=g+R|0,i[s++]=y+O|0,i[s++]=v+M|0,i[s++]=w+j|0,i[s++]=b+L|0,i[s++]=x+D|0}function rU(e,t,n,r,i){let s=r+0,o=r+16*i;for(let a=0;a<16;a++)n[o+a]=e[t+16*(2*i-1)+a];for(let a=0;a<i;a++,s+=16,t+=16)nU(n,o,e,t,n,s),a>0&&(o+=16),nU(n,s,e,t+=16,n,o)}function iU(e,t,n){const r=zM({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:i,r:s,p:o,dkLen:a,asyncTick:c,maxmem:l,onProgress:u}=r;if(hM(i),hM(s),hM(o),hM(a),hM(c),hM(l),void 0!==u&&"function"!==typeof u)throw new Error("progressCb should be function");const d=128*s,h=d/4;if(i<=1||0!==(i&i-1)||i>=2**(d/8)||i>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(o<0||o>137438953440/d)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>137438953440)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const p=d*(i+o);if(p>l)throw new Error(`Scrypt: parameters too large, ${p} (128 * r * (N + p)) > ${l} (maxmem)`);const f=FB(KB,e,t,{c:1,dkLen:d*o}),m=PM(f),g=PM(new Uint8Array(d*i)),y=PM(new Uint8Array(d));let v=()=>{};if(u){const e=2*i*o,t=Math.max(Math.floor(e/1e4),1);let n=0;v=()=>{n++,!u||n%t&&n!==e||u(n/e)}}return{N:i,r:s,p:o,dkLen:a,blockSize32:h,V:g,B32:m,B:f,tmp:y,blockMixCb:v,asyncTick:c}}function sU(e,t,n,r,i){const s=FB(KB,e,n,{c:1,dkLen:t});return n.fill(0),r.fill(0),i.fill(0),s}function oU(e,t,n,r,i,s,o){return uj(e),uj(t),function(e,t,n){const{N:r,r:i,p:s,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:d,blockMixCb:h}=iU(e,t,n);MM||LM(l);for(let p=0;p<s;p++){const e=a*p;for(let t=0;t<a;t++)c[t]=l[e+t];for(let t=0,n=0;t<r-1;t++)rU(c,n,c,n+=a,i),h();rU(c,(r-1)*a,l,e,i),h();for(let t=0;t<r;t++){const t=l[e+a-16]%r;for(let n=0;n<a;n++)d[n]=l[e+n]^c[t*a+n];rU(d,0,l,e,i),h()}}return MM||LM(l),sU(e,o,u,c,d)}(e,t,{N:n,r:i,p:r,dkLen:s,onProgress:o})}const aU=BigInt(1),cU=BigInt(2);function lU(e){return e instanceof Uint8Array||null!=e&&"object"===typeof e&&"Uint8Array"===e.constructor.name}function uU(e){if(!lU(e))throw new Error("Uint8Array expected")}const dU=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function hU(e){uU(e);let t="";for(let n=0;n<e.length;n++)t+=dU[e[n]];return t}function pU(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}const fU={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function mU(e){return e>=fU._0&&e<=fU._9?e-fU._0:e>=fU._A&&e<=fU._F?e-(fU._A-10):e>=fU._a&&e<=fU._f?e-(fU._a-10):void 0}function gU(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,s=0;i<n;i++,s+=2){const t=mU(e.charCodeAt(s)),n=mU(e.charCodeAt(s+1));if(void 0===t||void 0===n){const t=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+s)}r[i]=16*t+n}return r}function yU(e){return pU(hU(e))}function vU(e){return uU(e),pU(hU(Uint8Array.from(e).reverse()))}function wU(e,t){return gU(e.toString(16).padStart(2*t,"0"))}function bU(e,t){return wU(e,t).reverse()}function xU(e,t,n){let r;if("string"===typeof t)try{r=gU(t)}catch(s){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${s}`)}else{if(!lU(t))throw new Error(`${e} must be hex string or Uint8Array`);r=Uint8Array.from(t)}const i=r.length;if("number"===typeof n&&i!==n)throw new Error(`${e} expected ${n} bytes, got ${i}`);return r}function EU(){let e=0;for(let n=0;n<arguments.length;n++){const t=n<0||arguments.length<=n?void 0:arguments[n];uU(t),e+=t.length}const t=new Uint8Array(e);for(let n=0,r=0;n<arguments.length;n++){const e=n<0||arguments.length<=n?void 0:arguments[n];t.set(e,r),r+=e.length}return t}const _U=e=>(cU<<BigInt(e-1))-aU,kU=e=>new Uint8Array(e),CU=e=>Uint8Array.from(e);
9688function AU(e,t,n){if("number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!==typeof n)throw new Error("hmacFn must be a function");let r=kU(e),i=kU(e),s=0;const o=()=>{r.fill(1),i.fill(0),s=0},a=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return n(i,r,...t)},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kU();i=a(CU([0]),e),r=a(),0!==e.length&&(i=a(CU([1]),e),r=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){r=a();const t=r.slice();n.push(t),e+=r.length}return EU(...n)};return(e,t)=>{let n;for(o(),c(e);!(n=t(l()));)c();return o(),n}}const SU={bigint:e=>"bigint"===typeof e,function:e=>"function"===typeof e,boolean:e=>"boolean"===typeof e,string:e=>"string"===typeof e,stringOrUint8Array:e=>"string"===typeof e||lU(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"===typeof e&&Number.isSafeInteger(e.outputLen)};function IU(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(t,n,r)=>{const i=SU[n];if("function"!==typeof i)throw new Error(`Invalid validator "${n}", expected function`);const s=e[t];if((!r||void 0!==s)&&!i(s,e))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${n}`)};for(const[i,s]of Object.entries(t))r(i,s,!1);for(const[i,s]of Object.entries(n))r(i,s,!0);return e}const TU=BigInt(0),PU=BigInt(1),NU=BigInt(2),RU=BigInt(3),OU=BigInt(4),MU=BigInt(5),jU=BigInt(8);BigInt(9),BigInt(16);function LU(e,t){const n=e%t;return n>=TU?n:t+n}function DU(e,t,n){if(n<=TU||t<TU)throw new Error("Expected power/modulo > 0");if(n===PU)return TU;let r=PU;for(;t>TU;)t&PU&&(r=r*e%n),e=e*e%n,t>>=PU;return r}function BU(e,t,n){let r=e;for(;t-- >TU;)r*=r,r%=n;return r}function UU(e,t){if(e===TU||t<=TU)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=LU(e,t),r=t,i=TU,s=PU,o=PU,a=TU;for(;n!==TU;){const e=r/n,t=r%n,c=i-o*e,l=s-a*e;r=n,n=t,i=o,s=a,o=c,a=l}if(r!==PU)throw new Error("invert: does not exist");return LU(i,t)}function FU(e){if(e%OU===RU){const t=(e+PU)/OU;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}if(e%jU===MU){const t=(e-MU)/jU;return function(e,n){const r=e.mul(n,NU),i=e.pow(r,t),s=e.mul(n,i),o=e.mul(e.mul(s,NU),i),a=e.mul(s,e.sub(o,e.ONE));if(!e.eql(e.sqr(a),n))throw new Error("Cannot find square root");return a}}return function(e){const t=(e-PU)/NU;let n,r,i;for(n=e-PU,r=0;n%NU===TU;n/=NU,r++);for(i=NU;i<e&&DU(i,t,e)!==e-PU;i++);if(1===r){const t=(e+PU)/OU;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}const s=(n+PU)/NU;return function(e,o){if(e.pow(o,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let a=r,c=e.pow(e.mul(e.ONE,i),n),l=e.pow(o,s),u=e.pow(o,n);for(;!e.eql(u,e.ONE);){if(e.eql(u,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(u);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const n=e.pow(c,PU<<BigInt(a-t-1));c=e.sqr(n),l=e.mul(l,n),u=e.mul(u,c),a=t}return l}}(e)}const $U=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function zU(e,t){const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function HU(e){if("bigint"!==typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function WU(e){const t=HU(e);return t+Math.ceil(t/2)}const qU=BigInt(0),VU=BigInt(1);function GU(e){return IU(e.Fp,$U.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),IU(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...zU(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:KU,aT:ZU}=s,YU={Err:class extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}},_parseInt(e){const{Err:t}=YU;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(128&r[0])throw new t("Invalid signature integer: negative");if(0===r[0]&&!(128&r[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:KU(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=YU,n="string"===typeof e?ZU(e):e;uU(n);let r=n.length;if(r<2||48!=n[0])throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:i,l:s}=YU._parseInt(n.subarray(2)),{d:o,l:a}=YU._parseInt(s);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,n=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},r=t(n(e.s)),i=t(n(e.r)),s=r.length/2,o=i.length/2,a=n(s),c=n(o);return`30${n(o+s+4)}02${c}${i}02${a}${r}`}},QU=BigInt(0),JU=BigInt(1),XU=(BigInt(2),BigInt(3));BigInt(4);function eF(e){const t=function(e){const t=GU(e);IU(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});
9688const{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==typeof n||"bigint"!==typeof n.beta||"function"!==typeof n.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=t,r=t.toBytes||((e,t,r)=>{const i=t.toAffine();return EU(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),i=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function s(e){const{a:r,b:i}=t,s=n.sqr(e),o=n.mul(s,e);return n.add(n.add(o,n.mul(e,r)),i)}if(!n.eql(n.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function o(e){return"bigint"===typeof e&&QU<e&&e<t.n}function a(e){if(!o(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(e){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:i,n:s}=t;if(n&&"bigint"!==typeof e){if(lU(e)&&(e=hU(e)),"string"!==typeof e||!n.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*r,"0")}let o;try{o="bigint"===typeof e?e:yU(xU("private key",e,r))}catch(c){throw new Error(`private key must be ${r} bytes, hex or bigint, not ${typeof e}`)}return i&&(o=LU(o,s)),a(o),o}const l=new Map;function u(e){if(!(e instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required")}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof d)throw new Error("projective point not allowed");const i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?d.ZERO:new d(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(i(xU("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,l.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:r}=this.toAffine();if(!n.isValid(e)||!n.isValid(r))throw new Error("bad point: x or y not FE");const i=n.sqr(r),o=s(e);if(!n.eql(i,o))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){u(e);const{px:t,py:r,pz:i}=this,{px:s,py:o,pz:a}=e,c=n.eql(n.mul(t,a),n.mul(s,i)),l=n.eql(n.mul(r,a),n.mul(o,i));return c&&l}negate(){return new d(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,i=n.mul(r,XU),{px:s,py:o,pz:a}=this;let c=n.ZERO,l=n.ZERO,u=n.ZERO,h=n.mul(s,s),p=n.mul(o,o),f=n.mul(a,a),m=n.mul(s,o);return m=n.add(m,m),u=n.mul(s,a),u=n.add(u,u),c=n.mul(e,u),l=n.mul(i,f),l=n.add(c,l),c=n.sub(p,l),l=n.add(p,l),l=n.mul(c,l),c=n.mul(m,c),u=n.mul(i,u),f=n.mul(e,f),m=n.sub(h,f),m=n.mul(e,m),m=n.add(m,u),u=n.add(h,h),h=n.add(u,h),h=n.add(h,f),h=n.mul(h,m),l=n.add(l,h),f=n.mul(o,a),f=n.add(f,f),h=n.mul(f,m),c=n.sub(c,h),u=n.mul(f,p),u=n.add(u,u),u=n.add(u,u),new d(c,l,u)}add(e){u(e);const{px:r,py:i,pz:s}=this,{px:o,py:a,pz:c}=e;let l=n.ZERO,h=n.ZERO,p=n.ZERO;const f=t.a,m=n.mul(t.b,XU);let g=n.mul(r,o),y=n.mul(i,a),v=n.mul(s,c),w=n.add(r,i),b=n.add(o,a);w=n.mul(w,b),b=n.add(g,y),w=n.sub(w,b),b=n.add(r,s);let x=n.add(o,c);return b=n.mul(b,x),x=n.add(g,v),b=n.sub(b,x),x=n.add(i,s),l=n.add(a,c),x=n.mul(x,l),l=n.add(y,v),x=n.sub(x,l),p=n.mul(f,b),l=n.mul(m,v),p=n.add(l,p),l=n.sub(y,p),p=n.add(y,p),h=n.mul(l,p),y=n.add(g,g),y=n.add(y,g),v=n.mul(f,v),b=n.mul(m,b),y=n.add(y,v),v=n.sub(g,v),v=n.mul(f,v),b=n.add(b,v),g=n.mul(y,b),h=n.add(h,g),g=n.mul(x,b),l=n.mul(w,l),l=n.sub(l,g),g=n.mul(w,y),p=n.mul(x,p),p=n.add(p,g),new d(l,h,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,l,e,(e=>{const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(d.fromAffine)}))}multiplyUnsafe(e){const r=d.ZERO;if(e===QU)return r;if(a(e),e===JU)return this;
9688const{endo:i}=t;if(!i)return p.unsafeLadder(this,e);let{k1neg:s,k1:o,k2neg:c,k2:l}=i.splitScalar(e),u=r,h=r,f=this;for(;o>QU||l>QU;)o&JU&&(u=u.add(f)),l&JU&&(h=h.add(f)),f=f.double(),o>>=JU,l>>=JU;return s&&(u=u.negate()),c&&(h=h.negate()),h=new d(n.mul(h.px,i.beta),h.py,h.pz),u.add(h)}multiply(e){a(e);let r,i,s=e;const{endo:o}=t;if(o){const{k1neg:e,k1:t,k2neg:a,k2:c}=o.splitScalar(s);let{p:l,f:u}=this.wNAF(t),{p:h,f:f}=this.wNAF(c);l=p.constTimeNegate(e,l),h=p.constTimeNegate(a,h),h=new d(n.mul(h.px,o.beta),h.py,h.pz),r=l.add(h),i=u.add(f)}else{const{p:e,f:t}=this.wNAF(s);r=e,i=t}return d.normalizeZ([r,i])[0]}multiplyAndAddUnsafe(e,t,n){const r=d.BASE,i=(e,t)=>t!==QU&&t!==JU&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),s=i(this,t).add(i(e,n));return s.is0()?void 0:s}toAffine(e){const{px:t,py:r,pz:i}=this,s=this.is0();null==e&&(e=s?n.ONE:n.inv(i));const o=n.mul(t,e),a=n.mul(r,e),c=n.mul(i,e);if(s)return{x:n.ZERO,y:n.ZERO};if(!n.eql(c,n.ONE))throw new Error("invZ was invalid");return{x:o,y:a}}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===JU)return!0;if(n)return n(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===JU?this:n?n(d,this):this.multiplyUnsafe(t.h)}toRawBytes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.assertValidity(),r(d,this,e)}toHex(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return hU(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,n.ONE),d.ZERO=new d(n.ZERO,n.ONE,n.ZERO);const h=t.nBitLength,p=function(e,t){const n=(e,t)=>{const n=t.negate();return e?n:t},r=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,i=t;for(;n>qU;)n&VU&&(r=r.add(i)),i=i.double(),n>>=VU;return r},precomputeWindow(e,t){const{windows:n,windowSize:i}=r(t),s=[];let o=e,a=o;for(let r=0;r<n;r++){a=o,s.push(a);for(let e=1;e<i;e++)a=a.add(o),s.push(a);o=a.double()}return s},wNAF(t,i,s){const{windows:o,windowSize:a}=r(t);let c=e.ZERO,l=e.BASE;const u=BigInt(2**t-1),d=2**t,h=BigInt(t);for(let e=0;e<o;e++){const t=e*a;let r=Number(s&u);s>>=h,r>a&&(r-=d,s+=VU);const o=t,p=t+Math.abs(r)-1,f=e%2!==0,m=r<0;0===r?l=l.add(n(f,i[o])):c=c.add(n(m,i[p]))}return{p:c,f:l}},wNAFCached(e,t,n,r){const i=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,i),1!==i&&t.set(e,r(s))),this.wNAF(i,s,n)}}}(d,t.endo?Math.ceil(h/2):h);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function tF(e){const t=function(e){const t=GU(e);return IU(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:n,n:r}=t,i=n.BYTES+1,s=2*n.BYTES+1;function o(e){return LU(e,r)}function a(e){return UU(e,r)}const{ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:u,isWithinCurveOrder:d}=eF({...t,toBytes(e,t,r){const i=t.toAffine(),s=n.toBytes(i.x),o=EU;return r?o(Uint8Array.from([t.hasEvenY()?2:3]),s):o(Uint8Array.from([4]),s,n.toBytes(i.y))},fromBytes(e){const t=e.length,r=e[0],o=e.subarray(1);if(t!==i||2!==r&&3!==r){if(t===s&&4===r){return{x:n.fromBytes(o.subarray(0,n.BYTES)),y:n.fromBytes(o.subarray(n.BYTES,2*n.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${i} compressed bytes or ${s} uncompressed bytes`)}{const e=yU(o);if(!(QU<(a=e)&&a<n.ORDER))throw new Error("Point is not on curve");const t=u(e);let i;try{i=n.sqrt(t)}catch(c){const e=c instanceof Error?": "+c.message:"";throw new Error("Point is not on curve"+e)}return 1===(1&r)!==((i&JU)===JU)&&(i=n.neg(i)),{x:e,y:i}}var a}}),h=e=>hU(wU(e,t.nByteLength));function p(e){return e>r>>JU}const f=(e,t,n)=>yU(e.slice(t,n));class m{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const n=t.nByteLength;return e=xU("compactSignature",e,2*n),new m(f(e,0,n),f(e,n,2*n))}static fromDER(e){const{r:t,s:n}=YU.toSig(xU("DER",e));return new m(t,n)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new m(this.r,this.s,e)}recoverPublicKey(e){const{r:r,s:i,recovery:s}=this,l=w(xU("msgHash",e));if(null==s||![0,1,2,3].includes(s))throw new Error("recovery id invalid");const u=2===s||3===s?r+t.n:r;if(u>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=0===(1&s)?"02":"03",p=c.fromHex(d+h(u)),f=a(u),m=o(-l*f),g=o(i*f),y=c.BASE.multiplyAndAddUnsafe(p,m,g);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new m(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return gU(this.toDERHex())}toDERHex(){return YU.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return gU(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const g={isValidPrivateKey(e){try{return l(e),!0}catch(t){return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{const e=WU(t.n);return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.length,i=HU(t),s=WU(t);if(r<16||r<s||r>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${r}`);const o=LU(n?yU(e):vU(e),t-PU)+PU;return n?bU(o,i):wU(o,i)}(t.randomBytes(e),t.n)},precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BASE;return t._setWindowSize(e),t.multiply(BigInt(3)),t}};function y(e){const t=lU(e),n="string"===typeof e,r=(t||n)&&e.length;return t?r===i||r===s:n?r===2*i||r===2*s:e instanceof c}const v=t.bits2int||function(e){const n=yU(e),r=8*e.length-t.nBitLength;return r>0?n>>BigInt(r):n},w=t.bits2int_modN||function(e){return o(v(e))},b=_U(t.nBitLength);function x(e){if("bigint"!==typeof e)throw new Error("bigint expected");if(!(QU<=e&&e<b))throw new Error(`bigint expected < 2^${t.nBitLength}`);return wU(e,t.nByteLength)}function E(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_;if(["recovered","canonical"].some((e=>e in i)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:u}=t;let{lowS:h,prehash:f,extraEntropy:g}=i;
9688null==h&&(h=!0),e=xU("msgHash",e),f&&(e=xU("prehashed msgHash",s(e)));const y=w(e),b=l(r),E=[x(b),x(y)];if(null!=g&&!1!==g){const e=!0===g?u(n.BYTES):g;E.push(xU("extraEntropy",e))}const k=EU(...E),C=y;return{seed:k,k2sig:function(e){const t=v(e);if(!d(t))return;const n=a(t),r=c.BASE.multiply(t).toAffine(),i=o(r.x);if(i===QU)return;const s=o(n*o(C+i*b));if(s===QU)return;let l=(r.x===i?0:2)|Number(r.y&JU),u=s;return h&&p(s)&&(u=function(e){return p(e)?o(-e):e}(s),l^=1),new m(i,u,l)}}}const _={lowS:t.lowS,prehash:!1},k={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(y(e))throw new Error("first arg must be private key");if(!y(t))throw new Error("second arg must be public key");return c.fromHex(t).multiply(l(e)).toRawBytes(n)},sign:function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_;const{seed:i,k2sig:s}=E(e,n,r),o=t;return AU(o.hash.outputLen,o.nByteLength,o.hmac)(i,s)},verify:function(e,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k;const s=e;if(n=xU("msgHash",n),r=xU("publicKey",r),"strict"in i)throw new Error("options.strict was renamed to lowS");const{lowS:l,prehash:u}=i;let d,h;try{if("string"===typeof s||lU(s))try{d=m.fromDER(s)}catch(E){if(!(E instanceof YU.Err))throw E;d=m.fromCompact(s)}else{if("object"!==typeof s||"bigint"!==typeof s.r||"bigint"!==typeof s.s)throw new Error("PARSE");{const{r:e,s:t}=s;d=new m(e,t)}}h=c.fromHex(r)}catch(_){if("PARSE"===_.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(l&&d.hasHighS())return!1;u&&(n=t.hash(n));const{r:p,s:f}=d,g=w(n),y=a(f),v=o(g*y),b=o(p*y),x=c.BASE.multiplyAndAddUnsafe(h,v,b)?.toAffine();return!!x&&o(x.x)===p},ProjectivePoint:c,Signature:m,utils:g}}function nF(e){return{hash:e,hmac:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return DB(e,t,UM(...r))},randomBytes:WM}}const rF=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),iF=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),sF=BigInt(1),oF=BigInt(2),aF=(e,t)=>(e+t/oF)/t;function cF(e){const t=rF,n=BigInt(3),r=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,d=BU(u,n,t)*u%t,h=BU(d,n,t)*u%t,p=BU(h,oF,t)*l%t,f=BU(p,i,t)*p%t,m=BU(f,s,t)*f%t,g=BU(m,a,t)*m%t,y=BU(g,c,t)*g%t,v=BU(y,a,t)*m%t,w=BU(v,n,t)*u%t,b=BU(w,o,t)*f%t,x=BU(b,r,t)*l%t,E=BU(x,oF,t);if(!lF.eql(lF.sqr(E),e))throw new Error("Cannot find square root");return E}const lF=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=TU)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:s}=zU(e,t);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=FU(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:s,MASK:_U(i),ZERO:TU,ONE:PU,create:t=>LU(t,e),isValid:t=>{if("bigint"!==typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return TU<=t&&t<e},is0:e=>e===TU,isOdd:e=>(e&PU)===PU,neg:t=>LU(-t,e),eql:(e,t)=>e===t,sqr:t=>LU(t*t,e),add:(t,n)=>LU(t+n,e),sub:(t,n)=>LU(t-n,e),mul:(t,n)=>LU(t*n,e),pow:(e,t)=>function(e,t,n){if(n<TU)throw new Error("Expected power > 0");if(n===TU)return e.ONE;if(n===PU)return t;let r=e.ONE,i=t;for(;n>TU;)n&PU&&(r=e.mul(r,i)),i=e.sqr(i),n>>=PU;return r}(a,e,t),div:(t,n)=>LU(t*UU(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>UU(t,e),sqrt:r.sqrt||(e=>o(a,e)),invertBatch:e=>function(e,t){const n=new Array(t.length),r=t.reduce(((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r))),e.ONE),i=e.inv(r);return t.reduceRight(((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r))),i),n}(a,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?bU(e,s):wU(e,s),fromBytes:e=>{if(e.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`);return n?vU(e):yU(e)}});return Object.freeze(a)}(rF,void 0,void 0,{sqrt:cF}),uF=function(e,t){const n=t=>tF({...e,...nF(t)});return Object.freeze({...n(t),create:n})}({a:BigInt(0),b:BigInt(7),Fp:lF,n:iF,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=iF,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-sF*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,o=BigInt("0x100000000000000000000000000000000"),a=aF(s*e,t),c=aF(-r*e,t);let l=LU(e-a*n-c*i,t),u=LU(-a*r-c*s,t);const d=l>o,h=u>o;if(d&&(l=t-l),h&&(u=t-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:l,k2neg:h,k2:u}}}},KB);BigInt(0);uF.ProjectivePoint;var dF;const hF=null!==(dF=uF)&&void 0!==dF?dF:o,pF=BigInt("0xffffffffffffffff"),fF=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),mF=hF.CURVE.n/BigInt(2),gF={type:"object",required:["crypto","id","version","address"],properties:{crypto:{type:"object",required:["cipher","ciphertext","cipherparams","kdf","kdfparams","mac"],properties:{cipher:{type:"string"},ciphertext:{type:"string"},cipherparams:{type:"object"},kdf:{type:"string"},kdfparams:{type:"object"},salt:{type:"string"},mac:{type:"string"}}},id:{type:"string"},version:{type:"number"},address:{type:"string"}}};var yF,vF,wF,bF,xF,EF;!function(e){e[e.Mainnet=1]="Mainnet",e[e.Goerli=5]="Goerli",e[e.Sepolia=11155111]="Sepolia"}(yF||(yF={})),function(e){e.Chainstart="chainstart",e.Homestead="homestead",e.Dao="dao",e.TangerineWhistle="tangerineWhistle",e.SpuriousDragon="spuriousDragon",e.Byzantium="byzantium",e.Constantinople="constantinople",e.Petersburg="petersburg",e.Istanbul="istanbul",e.MuirGlacier="muirGlacier",e.Berlin="berlin",e.London="london",e.ArrowGlacier="arrowGlacier",e.GrayGlacier="grayGlacier",e.MergeForkIdTransition="mergeFor
9688kIdTransition",e.Merge="merge",e.Shanghai="shanghai",e.ShardingForkDev="shardingFork"}(vF||(vF={})),function(e){e.ProofOfStake="pos",e.ProofOfWork="pow",e.ProofOfAuthority="poa"}(wF||(wF={})),function(e){e.Ethash="ethash",e.Clique="clique",e.Casper="casper"}(bF||(bF={})),function(e){e.PolygonMainnet="polygon-mainnet",e.PolygonMumbai="polygon-mumbai",e.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",e.ArbitrumOne="arbitrum-one",e.xDaiChain="x-dai-chain",e.OptimisticKovan="optimistic-kovan",e.OptimisticEthereum="optimistic-ethereum"}(xF||(xF={})),function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Uint8Array=2]="Uint8Array",e[e.PrefixedHexString=3]="PrefixedHexString"}(EF||(EF={}));const _F=e=>{if("string"!==typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return _j(e)?e.slice(2):e};const kF=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`};function CF(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];var n,r;const{name:i,config:s,difficulty:o,mixHash:a,gasLimit:c,coinbase:l,baseFeePerGas:u}=e;let{extraData:d,timestamp:h,nonce:p}=e;const f=Number(h),{chainId:m}=s;if(""===d&&(d="0x"),_j(h)||(h=kF(parseInt(h))),18!==p.length&&(p=function(e){return e&&"0x0"!==e?_j(e)?`0x${_F(e).padStart(16,"0")}`:`0x${e.padStart(16,"0")}`:"0x0000000000000000"}(p)),s.eip155Block!==s.eip158Block)throw new Error("EIP155 block number must equal EIP 158 block number since both are part of SpuriousDragon hardfork and the client only supports activating the full hardfork");const g={name:i,chainId:m,networkId:m,genesis:{timestamp:h,gasLimit:parseInt(c),difficulty:parseInt(o),nonce:p,extraData:d,mixHash:a,coinbase:l,baseFeePerGas:u},hardfork:void 0,hardforks:[],bootstrapNodes:[],consensus:void 0!==s.clique?{type:"poa",algorithm:"clique",clique:{period:null!==(n=s.clique.period)&&void 0!==n?n:s.clique.blockperiodseconds,epoch:null!==(r=s.clique.epoch)&&void 0!==r?r:s.clique.epochlength}}:{type:"pow",algorithm:"ethash",ethash:{}}},y={[vF.Homestead]:{name:"homesteadBlock"},[vF.Dao]:{name:"daoForkBlock"},[vF.TangerineWhistle]:{name:"eip150Block"},[vF.SpuriousDragon]:{name:"eip155Block"},[vF.Byzantium]:{name:"byzantiumBlock"},[vF.Constantinople]:{name:"constantinopleBlock"},[vF.Petersburg]:{name:"petersburgBlock"},[vF.Istanbul]:{name:"istanbulBlock"},[vF.MuirGlacier]:{name:"muirGlacierBlock"},[vF.Berlin]:{name:"berlinBlock"},[vF.London]:{name:"londonBlock"},[vF.MergeForkIdTransition]:{name:"mergeForkBlock",postMerge:t},[vF.Shanghai]:{name:"shanghaiTime",postMerge:!0,isTimestamp:!0},[vF.ShardingForkDev]:{name:"shardingForkTime",postMerge:!0,isTimestamp:!0}},v=Object.keys(y).reduce(((e,t)=>(e[y[t].name]=t,e)),{}),w=Object.keys(s).filter((e=>void 0!==v[e]&&void 0!==s[e]&&null!==s[e]));if(g.hardforks=w.map((e=>({name:v[e],block:!0===y[v[e]].isTimestamp||"number"!==typeof s[e]?null:s[e],timestamp:!0===y[v[e]].isTimestamp&&"number"===typeof s[e]?s[e]:void 0}))).filter((e=>null!==e.block||void 0!==e.timestamp)),g.hardforks.sort(((e,t)=>{var n,r;return(null!==(n=e.block)&&void 0!==n?n:1/0)-(null!==(r=t.block)&&void 0!==r?r:1/0)})),g.hardforks.sort(((e,t)=>{var n,r;return(null!==(n=e.timestamp)&&void 0!==n?n:f)-(null!==(r=t.timestamp)&&void 0!==r?r:f)})),void 0!==s.terminalTotalDifficulty){const e={name:vF.Merge,ttd:s.terminalTotalDifficulty,block:null},t=g.hardforks.findIndex((e=>{var t;return!0===(null===(t=y[e.name])||void 0===t?void 0:t.postMerge)}));-1!==t?g.hardforks.splice(t,0,e):g.hardforks.push(e)}const b=g.hardforks.length>0?g.hardforks.slice(-1)[0]:void 0;return g.hardfork=null===b||void 0===b?void 0:b.name,g.hardforks.unshift({name:vF.Chainstart,block:0}),g}function AF(e){let t=e;if("string"!==typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}const SF=function(e){var t;if(null===e||void 0===e)return new Uint8Array;
9688if(e instanceof Uint8Array)return e;if("Uint8Array"===(null===(t=null===e||void 0===e?void 0:e.constructor)||void 0===t?void 0:t.name))return Uint8Array.from(e);if(Array.isArray(e))return Uint8Array.from(e);if("string"===typeof e){if(!xj(e))throw new Error(`Cannot convert string to Uint8Array. only supports 0x-prefixed hex strings and this string was given: ${e}`);return gL(AF(_F(e)))}if("number"===typeof e)return SF(wL(e));if("bigint"===typeof e){if(e<BigInt(0))throw new Error(`Cannot convert negative bigint to Uint8Array. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t=`0${t}`),SF(`0x${t}`)}if(e.toArray)return Uint8Array.from(e.toArray());throw new Error("invalid type")};function IF(e){const t=mL(e);return"0x"===t?BigInt(0):BigInt(t)}const TF=function(e){return new Uint8Array(e).fill(0)};function PF(e){if(!cL(e)){throw new Error(`This method only supports Uint8Array but input was: ${e}`)}}const NF=function(e,t){return PF(e),function(e,t,n){const r=TF(t);return n?e.length<t?(r.set(e),r):e.subarray(0,t):e.length<t?(r.set(e,t-e.length),r):e.subarray(-t)}(e,t,!1)};const RF=function(e){return PF(e),function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e}(e)},OF=e=>`0x${e.toString(16)}`;function MF(e){return RF(SF(`0x${e.toString(16)}`))}const jF=function(e,t,n,r,i){const s=function(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}(t,i);if(!function(e){return e===BigInt(0)||e===BigInt(1)}(s))throw new Error("Invalid signature v value");return new hF.Signature(IF(n),IF(r)).addRecoveryBit(Number(s)).recoverPublicKey(e).toRawBytes(!1).slice(1)};function LF(e,t){if(null===e)return null;if(void 0===e)return;if("string"===typeof e&&!xj(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"===typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const n=SF(e);switch(t){case EF.Uint8Array:return n;case EF.BigInt:return IF(n);case EF.Number:{const e=IF(n);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case EF.PrefixedHexString:return mL(n);default:throw new Error("unknown outputType")}}var DF=n(8867),BF=n(3656);const UF={name:"goerli",chainId:5,networkId:5,defaultHardfork:"merge",consensus:{type:"poa",algorithm:"clique",clique:{period:15,epoch:3e4}},comment:"Cross-client PoA test network",url:"https://github.com/goerli/testnet",genesis:{timestamp:"0x5c51a607",gasLimit:10485760,difficulty:1,nonce:"0x0000000000000000",extraData:"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},hardforks:[{name:"chainstart",block:0,forkHash:"0xa3f5ab08"},{name:"homestead",block:0,forkHash:"0xa3f5ab08"},{name:"tangerineWhistle",block:0,forkHash:"0xa3f5ab08"},{name:"spuriousDragon",block:0,forkHash:"0xa3f5ab08"},{name:"byzantium",block:0,forkHash:"0xa3f5ab08"},{name:"constantinople",block:0,forkHash:"0xa3f5ab08"},{name:"petersburg",block:0,forkHash:"0xa3f5ab08"},{name:"istanbul",block:1561651,forkHash:"0xc25efa5c"},{name:"berlin",block:4460644,forkHash:"0x757a1c47"},{name:"london",block:5062605,forkHash:"0xb8c6299d"},{"//_comment":"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://goerli.etherscan.io/block/7382818",name:"merge",ttd:"10790000",block:7382819,forkHash:"0xb8c6299d"},{name:"mergeForkIdTransition",block:null,forkHash:null},{name:"shanghai",block:null,forkHash:null}],bootstrapNodes:[],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]},FF={name:"mainnet",chainId:1,networkId:1,defaultHardfork:"merge",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"The Ethereum main chain",url:"https://ethstats.net/",genesis:{gasLimit:5e3,difficulty:171
968879869184,nonce:"0x0000000000000042",extraData:"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfc64ec04"},{name:"homestead",block:115e4,forkHash:"0x97c2c34c"},{name:"dao",block:192e4,forkHash:"0x91d1f948"},{name:"tangerineWhistle",block:2463e3,forkHash:"0x7a64da13"},{name:"spuriousDragon",block:2675e3,forkHash:"0x3edd5b10"},{name:"byzantium",block:437e4,forkHash:"0xa00bc324"},{name:"constantinople",block:728e4,forkHash:"0x668db0af"},{name:"petersburg",block:728e4,forkHash:"0x668db0af"},{name:"istanbul",block:9069e3,forkHash:"0x879d6e30"},{name:"muirGlacier",block:92e5,forkHash:"0xe029e991"},{name:"berlin",block:12244e3,forkHash:"0x0eb440f6"},{name:"london",block:12965e3,forkHash:"0xb715077d"},{name:"arrowGlacier",block:13773e3,forkHash:"0x20c327fc"},{name:"grayGlacier",block:1505e4,forkHash:"0xf0afd0e3"},{"//_comment":"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://etherscan.io/block/15537393",name:"merge",ttd:"58750000000000000000000",block:15537394,forkHash:"0xf0afd0e3"},{name:"mergeForkIdTransition",block:null,forkHash:null},{name:"shanghai",block:null,forkHash:null}],bootstrapNodes:[],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]},$F={name:"sepolia",chainId:11155111,networkId:11155111,defaultHardfork:"merge",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"PoW test network to replace Ropsten",url:"https://github.com/ethereum/go-ethereum/pull/23730",genesis:{timestamp:"0x6159af19",gasLimit:3e7,difficulty:131072,nonce:"0x0000000000000000",extraData:"0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfe3366e7"},{name:"homestead",block:0,forkHash:"0xfe3366e7"},{name:"tangerineWhistle",block:0,forkHash:"0xfe3366e7"},{name:"spuriousDragon",block:0,forkHash:"0xfe3366e7"},{name:"byzantium",block:0,forkHash:"0xfe3366e7"},{name:"constantinople",block:0,forkHash:"0xfe3366e7"},{name:"petersburg",block:0,forkHash:"0xfe3366e7"},{name:"istanbul",block:0,forkHash:"0xfe3366e7"},{name:"muirGlacier",block:0,forkHash:"0xfe3366e7"},{name:"berlin",block:0,forkHash:"0xfe3366e7"},{name:"london",block:0,forkHash:"0xfe3366e7"},{"//_comment":"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://sepolia.etherscan.io/block/1450408",name:"merge",ttd:"17000000000000000",block:1450409,forkHash:"0xfe3366e7"},{name:"mergeForkIdTransition",block:1735371,forkHash:"0xb96cbd13"},{name:"shanghai",block:null,timestamp:"1677557088",forkHash:"0xf7f9bc08"}],bootstrapNodes:[],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net"]},zF={1153:{name:"EIP-1153",number:1153,comment:"Transient Storage",url:"https://eips.ethereum.org/EIPS/eip-1153",status:"Review",minimumHardfork:"chainstart",requiredEIPs:[],gasConfig:{},gasPrices:{tstore:{v:100,d:"Base fee of the TSTORE opcode"},tload:{v:100,d:"Base fee of the TLOAD opcode"}},vm:{},pow:{}},1559:{name:"EIP-1559",number:1559,comment:"Fee market change for ETH 1.0 chain",url:"https://eips.ethereum.org/EIPS/eip-1559",status:"Final",minimumHardfork:"berlin",requiredEIPs:[2930],gasConfig:{baseFeeMaxChangeDenominator:{v:8,d:"Maximum base fee change denominator"},elasticityMultiplier:{v:2,d:"Maximum block gas target elasticity"},initialBaseFee:{v:1e9,d:"Initial base fee on first EIP1559 block"}},gasPrices:{},vm:{},pow:{}},2315:{name:"EIP-2315",number:2315,comment:"Simple subroutines for the EVM",url:"https://eips.ethereum.org/EIPS/eip-2315",status:"Draft",minimumHardfork:"istanbul",gasConfig:{},gasPrices:{beginsub:{v:2,d:"Base fee of the BEGINSUB opcode"},returnsub:{v:5,d:"Base fee of the RETURNSUB opcode"},jumpsub:{v:10,d:"Base fee of the JUMPSUB opcode"}},vm:{},pow:{}},2537:{name:"EIP-2537",number:2537,comment:"BLS12-381 precompiles",url:"https://eips.ethereum.org/EIPS/eip-2537",status:"Draft",minimumHardfork:"chainstart",gasConfig:{}
9688,gasPrices:{Bls12381G1AddGas:{v:600,d:"Gas cost of a single BLS12-381 G1 addition precompile-call"},Bls12381G1MulGas:{v:12e3,d:"Gas cost of a single BLS12-381 G1 multiplication precompile-call"},Bls12381G2AddGas:{v:4500,d:"Gas cost of a single BLS12-381 G2 addition precompile-call"},Bls12381G2MulGas:{v:55e3,d:"Gas cost of a single BLS12-381 G2 multiplication precompile-call"},Bls12381PairingBaseGas:{v:115e3,d:"Base gas cost of BLS12-381 pairing check"},Bls12381PairingPerPairGas:{v:23e3,d:"Per-pair gas cost of BLS12-381 pairing check"},Bls12381MapG1Gas:{v:5500,d:"Gas cost of BLS12-381 map field element to G1"},Bls12381MapG2Gas:{v:11e4,d:"Gas cost of BLS12-381 map field element to G2"},Bls12381MultiExpGasDiscount:{v:[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],d:"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair"}},vm:{},pow:{}},2565:{name:"EIP-2565",number:2565,comment:"ModExp gas cost",url:"https://eips.ethereum.org/EIPS/eip-2565",status:"Final",minimumHardfork:"byzantium",gasConfig:{},gasPrices:{modexpGquaddivisor:{v:3,d:"Gquaddivisor from modexp precompile for gas calculation"}},vm:{},pow:{}},2718:{name:"EIP-2718",comment:"Typed Transaction Envelope",url:"https://eips.ethereum.org/EIPS/eip-2718",status:"Final",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{},vm:{},pow:{}},2929:{name:"EIP-2929",comment:"Gas cost increases for state access opcodes",url:"https://eips.ethereum.org/EIPS/eip-2929",status:"Final",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{coldsload:{v:2100,d:"Gas cost of the first read of storage from a given location (per transaction)"},coldaccountaccess:{v:2600,d:"Gas cost of the first read of a given address (per transaction)"},warmstorageread:{v:100,d:"Gas cost of reading storage locations which have already loaded 'cold'"},sstoreCleanGasEIP2200:{v:2900,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreNoopGasEIP2200:{v:100,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:100,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitRefundEIP2200:{v:19900,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanRefundEIP2200:{v:4900,d:"Once per SSTORE operation for resetting to the original non-zero value"},call:{v:0,d:"Base fee of the CALL opcode"},callcode:{v:0,d:"Base fee of the CALLCODE opcode"},delegatecall:{v:0,d:"Base fee of the DELEGATECALL opcode"},staticcall:{v:0,d:"Base fee of the STATICCALL opcode"},balance:{v:0,d:"Base fee of the BALANCE opcode"},extcodesize:{v:0,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:0,d:"Base fee of the EXTCODECOPY opcode"},extcodehash:{v:0,d:"Base fee of the EXTCODEHASH opcode"},sload:{v:0,d:"Base fee of the SLOAD opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"}},vm:{},pow:{}},2930:{name:"EIP-2930",comment:"Optional access lists",url:"https://eips.ethereum.org/EIPS/eip-2930",status:"Final",minimumHardfork:"istanbul",requiredEIPs:[2718,2929],gasConfig:{},gasPrices:{accessListStorageKeyCost:{v:1900,d:"Gas cost per storage key in an Access List transaction"},accessListAddressCost:{v:2400,d:"Gas cost per storage key in an Access List transaction"}},vm:{},pow:{}},3198:{name:"EIP-3198",number:3198,comment:"BASEFEE opcode",url:"https://eips.ethereum.org/EIPS/eip-3198",status:"Final",minimumHardfork:"london",gasConfig:{},gasPrices:{basefee:{v:2,d:"Gas cost of the BASEFEE opcode"}},vm:{},pow:{}},3529:{name:"EIP-3529",comment:"Reduction in refunds",url:"https://eips.ethereum.org/EIPS/eip-3529",status:"Final",minimumHardfork:"berlin",requiredEIPs:[2929],gasConfig:{maxRefundQuotient:{v:5,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{selfdestructRefund:{v:0,d:"Refunded following a selfdestruct operation"},sstoreClearRefundEIP2200:{v:4800,d:"Once per SSTORE operation for clearing an originally existing storage slot"}},vm:{},pow:{}},3540:{name:"EIP-3540",number:3540,comment:"EVM Object Format (EOF) v1",url:"https://eips.ethereum.org/EIPS/eip-3540",status:"Review",minimumHardfork:"london",requiredEIPs:[3541],gasConfig:{},gasPrices:{},vm:{},pow:{}},3541:{name:"EIP-3541",comment:"Reject new contracts starting with the 0xEF byte",url:"https://eips.ethereum.org/EIPS/eip-3541",status:"Final",minimumHardfork:"berlin",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}},3554:{name:"EIP-3554",comment:"Reduction in refunds",url:"Difficulty Bomb Delay to December 1st 2021",status:"Final",minimumHardfork:"muirGlacier",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:95e5,d:"the amount of blocks to delay the difficulty bomb with"}}},3607:{name:"EIP-3607",number:3607,comment:"Reject transactions from senders with deployed code",url:"https://eips.ethereum.org/EIPS/eip-3607",status:"Final",minimumHardfork:"chainstart",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}},3651:{name:"EIP-3651",number:3198,comment:"Warm COINBASE",url:"https://eips.ethereum.org/EIPS/eip-3651",status:"Review",minimumHardfork:"london",requiredEIPs:[2929],gasConfig:{},gasPrices:{},vm:{},pow:{}},3670:{name:"EIP-3670",number:3670,comment:"EOF - Code Validation",url:"https://eips.ethereum.org/EIPS/eip-3670",status:"Review",minimumHardfork:"london",requiredEIPs:[3540],gasConfig:{},gasPrices:{},vm:{},pow:{}},3675:{name:"EIP-3675",number:3675,comment:"Upgrade consensus to Proof-of-Stake",url:"https://eips.ethereum.org/EIPS/eip-3675",status:"Final",minimumHardfork:"london",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}},3855:{name:"EIP-3855",number:3855,comment:"PUSH0 instruction",url:"https://eips.ethereum.org/EIPS/eip-3855",status:"Review",minimumHardfork:"chainstart",requiredEIPs:[],gasConfig:{},gasPrices:{push0:{v:2,d:"Base fee of the PUSH0 opcode"}},vm:{},pow:{}},3860:{name:"EIP-3860",number:3860,comment:"Limit and meter initcode",url:"https://eips.ethereum.org/EIPS/eip-3860",status:"Review",minimumHardfork:"spuriousDragon",requiredEIPs:[],gasConfig:{},gasPrices:{initCodeWordCost:{v:2,d:"Gas to pay for each word (32 bytes) of initcode when creating a contract"}},vm:{maxInitCodeSize:{v:49152,d:"Maximum length of initialization code when creating a contract"}},pow:{}},4345:{name:"EIP-4345",number:4345,comment:"Difficulty Bomb Delay to June 2022",url:"https://eips.ethereum.org/EIPS/eip-4345",status:"Final",minimumHardfork:"london",gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:107e5,d:"the amount of blocks to delay the difficulty bomb with"}}},4399:{name:"EIP-4399",number:4399,comment:"Supplant DIFFICULTY opcode with PREVRANDAO",url:"https://eips.ethereum.org/EIPS/eip-4399",status:"Review",minimumHardfork:"london",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}},5133:{name:"EIP-5133",number:5133,comment:"Delaying Difficulty Bomb to mid-September 2022",url:"https://eips.ethereum.org/EIPS/eip-5133",status:"Draft",minimumHardfork:"grayGlacier",gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:114e5,d:"the amount of blocks to delay the difficulty bomb with"}}}},HF={chainstart:{name:"chainstart",comment:"Start of the Ethereum main chain",url:"",status:"",gasConfig:{minGasLimit:{v:5e3,d:"Minimum the gas limit may ever be"},gasLimitBoundDivisor:{v:1024,d:"The bound divisor of the gas limit, used in update calculations"},maxRefundQuotient:{v:2,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{base:{v:2,d:"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},tierStep:{v:[0,2,3,5,8,10,20],d:"Once per operation, for a selection of them"},exp:{v:10,d:"Base fee of the EXP opcode"},expByte:{v:10,d:"Times ceil(log256(exponent)) for the EXP instruction"},sha3:{v:30,d:"Base fee of the SHA3 opcode"}
9688,sha3Word:{v:6,d:"Once per word of the SHA3 operation's data"},sload:{v:50,d:"Base fee of the SLOAD opcode"},sstoreSet:{v:2e4,d:"Once per SSTORE operation if the zeroness changes from zero"},sstoreReset:{v:5e3,d:"Once per SSTORE operation if the zeroness does not change from zero"},sstoreRefund:{v:15e3,d:"Once per SSTORE operation if the zeroness changes to zero"},jumpdest:{v:1,d:"Base fee of the JUMPDEST opcode"},log:{v:375,d:"Base fee of the LOG opcode"},logData:{v:8,d:"Per byte in a LOG* operation's data"},logTopic:{v:375,d:"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},create:{v:32e3,d:"Base fee of the CREATE opcode"},call:{v:40,d:"Base fee of the CALL opcode"},callStipend:{v:2300,d:"Free gas given at beginning of call"},callValueTransfer:{v:9e3,d:"Paid for CALL when the value transfor is non-zero"},callNewAccount:{v:25e3,d:"Paid for CALL when the destination address didn't exist prior"},selfdestructRefund:{v:24e3,d:"Refunded following a selfdestruct operation"},memory:{v:3,d:"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},quadCoeffDiv:{v:512,d:"Divisor for the quadratic particle of the memory cost equation"},createData:{v:200,d:""},tx:{v:21e3,d:"Per transaction. NOTE: Not payable on data of calls between transactions"},txCreation:{v:32e3,d:"The cost of creating a contract via tx"},txDataZero:{v:4,d:"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},txDataNonZero:{v:68,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},copy:{v:3,d:"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},ecRecover:{v:3e3,d:""},sha256:{v:60,d:""},sha256Word:{v:12,d:""},ripemd160:{v:600,d:""},ripemd160Word:{v:120,d:""},identity:{v:15,d:""},identityWord:{v:3,d:""},stop:{v:0,d:"Base fee of the STOP opcode"},add:{v:3,d:"Base fee of the ADD opcode"},mul:{v:5,d:"Base fee of the MUL opcode"},sub:{v:3,d:"Base fee of the SUB opcode"},div:{v:5,d:"Base fee of the DIV opcode"},sdiv:{v:5,d:"Base fee of the SDIV opcode"},mod:{v:5,d:"Base fee of the MOD opcode"},smod:{v:5,d:"Base fee of the SMOD opcode"},addmod:{v:8,d:"Base fee of the ADDMOD opcode"},mulmod:{v:8,d:"Base fee of the MULMOD opcode"},signextend:{v:5,d:"Base fee of the SIGNEXTEND opcode"},lt:{v:3,d:"Base fee of the LT opcode"},gt:{v:3,d:"Base fee of the GT opcode"},slt:{v:3,d:"Base fee of the SLT opcode"},sgt:{v:3,d:"Base fee of the SGT opcode"},eq:{v:3,d:"Base fee of the EQ opcode"},iszero:{v:3,d:"Base fee of the ISZERO opcode"},and:{v:3,d:"Base fee of the AND opcode"},or:{v:3,d:"Base fee of the OR opcode"},xor:{v:3,d:"Base fee of the XOR opcode"},not:{v:3,d:"Base fee of the NOT opcode"},byte:{v:3,d:"Base fee of the BYTE opcode"},address:{v:2,d:"Base fee of the ADDRESS opcode"},balance:{v:20,d:"Base fee of the BALANCE opcode"},origin:{v:2,d:"Base fee of the ORIGIN opcode"},caller:{v:2,d:"Base fee of the CALLER opcode"},callvalue:{v:2,d:"Base fee of the CALLVALUE opcode"},calldataload:{v:3,d:"Base fee of the CALLDATALOAD opcode"},calldatasize:{v:2,d:"Base fee of the CALLDATASIZE opcode"},calldatacopy:{v:3,d:"Base fee of the CALLDATACOPY opcode"},codesize:{v:2,d:"Base fee of the CODESIZE opcode"},codecopy:{v:3,d:"Base fee of the CODECOPY opcode"},gasprice:{v:2,d:"Base fee of the GASPRICE opcode"},extcodesize:{v:20,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:20,d:"Base fee of the EXTCODECOPY opcode"},blockhash:{v:20,d:"Base fee of the BLOCKHASH opcode"},coinbase:{v:2,d:"Base fee of the COINBASE opcode"},timestamp:{v:2,d:"Base fee of the TIMESTAMP opcode"},number:{v:2,d:"Base fee of the NUMBER opcode"},difficulty:{v:2,d:"Base fee of the DIFFICULTY opcode"},gaslimit:{v:2,d:"Base fee of the GASLIMIT opcode"},pop:{v:2,d:"Base fee of the POP opcode"},mload:{v:3,d:"Base fee of the MLOAD opcode"},mstore:{v:3,d:"Base fee of the MSTORE opcode"},mstore8:{v:3,d:"Base fee of the MSTORE8 opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"},jump:{v:8,d:"Base fee of the JUMP opcode"},jumpi:{v:10,d:"Base fee of the JUMPI opcode"},pc:{v:2,d:"Base fee of the PC opcode"},msize:{v:2,d:"Base fee of the MSIZE opcode"},gas:{v:2,d:"Base fee of the GAS opcode"},push:{v:3,d:"Base fee of the PUSH opcode"},dup:{v:3,d:"Base fee of the DUP opcode"},swap:{v:3,d:"Base fee of the SWAP opcode"},callcode:{v:40,d:"Base fee of the CALLCODE opcode"},return:{v:0,d:"Base fee of the RETURN opcode"},invalid:{v:0,d:"Base fee of the INVALID opcode"},selfdestruct:{v:0,d:"Base fee of the SELFDESTRUCT opcode"}},vm:{stackLimit:{v:1024,d:"Maximum size of VM stack allowed"},callCreateDepth:{v:1024,d:"Maximum depth of call/create stack"},maxExtraDataSize:{v:32,d:"Maximum size extra data may be after Genesis"}},pow:{minimumDifficulty:{v:131072,d:"The minimum that the difficulty may ever be"},difficultyBoundDivisor:{v:2048,d:"The bound divisor of the difficulty, used in the update calculations"},durationLimit:{v:13,d:"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},epochDuration:{v:3e4,d:"Duration between proof-of-work epochs"},timebombPeriod:{v:1e5,d:"Exponential difficulty timebomb period"},minerReward:{v:"5000000000000000000",d:"the amount a miner get rewarded for mining a block"},difficultyBombDelay:{v:0,d:"the amount of blocks to delay the difficulty bomb with"}}},homestead:{name:"homestead",comment:"Homestead hardfork with protocol and network changes",url:"https://eips.ethereum.org/EIPS/eip-606",status:"Final",gasConfig:{},gasPrices:{delegatecall:{v:40,d:"Base fee of the DELEGATECALL opcode"}},vm:{},pow:{}},dao:{name:"dao",comment:"DAO rescue hardfork",url:"https://eips.ethereum.org/EIPS/eip-779",status:"Final",gasConfig:{},gasPrices:{},vm:{},pow:{}},tangerineWhistle:{name:"tangerineWhistle",comment:"Hardfork with gas cost changes for IO-heavy operations",url:"https://eips.ethereum.org/EIPS/eip-608",status:"Final",gasConfig:{},gasPrices:{sload:{v:200,d:"Once per SLOAD operation"},call:{v:700,d:"Once per CALL operation & message call transaction"},extcodesize:{v:700,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:700,d:"Base fee of the EXTCODECOPY opcode"},balance:{v:400,d:"Base fee of the BALANCE opcode"},delegatecall:{v:700,d:"Base fee of the DELEGATECALL opcode"},callcode:{v:700,d:"Base fee of the CALLCODE opcode"},selfdestruct:{v:5e3,d:"Base fee of the SELFDESTRUCT opcode"}},vm:{},pow:{}},spuriousDragon:{name:"spuriousDragon",comment:"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit",url:"https://eips.ethereum.org/EIPS/eip-607",status:"Final",gasConfig:{},gasPrices:{expByte:{v:50,d:"Times ceil(log256(exponent)) for the EXP instruction"}},vm:{maxCodeSize:{v:24576,d:"Maximum length of contract code"}},pow:{}},byzantium:{name:"byzantium",comment:"Hardfork with new precompiles, instructions and other protocol changes",url:"https://eips.ethereum.org/EIPS/eip-609",status:"Final",gasConfig:{},gasPrices:{modexpGquaddivisor:{v:20,d:"Gquaddivisor from modexp precompile for gas calculation"},ecAdd:{v:500,d:"Gas costs for curve addition precompile"},ecMul:{v:4e4,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:1e5,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:8e4,d:"Gas costs regarding curve pairing precompile input length"},revert:{v:0,d:"Base fee of the REVERT opcode"},staticcall:{v:700,d:"Base fee of the STATICCALL opcode"},returndatasize:{v:2,d:"Base fee of the RETURNDATASIZE opcode"},returndatacopy:{v:3,d:"Base fee of the RETURNDATACOPY opcode"}},vm:{},pow:{minerReward:{v:"3000000000000000000",d:"the amount a miner get rewarded for mining a block"},difficultyBombDelay:{v:3e6,d:"the amount of blocks to delay the difficulty bomb with"}}},constantinople:{name:"constantinople",comment:"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)",url:"https://eips.ethereum.org/EIPS/eip-1013",status:"Final",gasConfig:{},gasPrices:{netSstoreNoopGas:{v:200,d:"Once per SSTORE operation if the value doesn't change"},netSstoreInitGas:{v:2e4,d:"Once per SSTORE operation from clean zero"},netSstoreCleanGas:{v:5e3,d:"Once per SSTORE operation from clean non-zero"},netSstoreDirtyGas:{v:200,d:"Once per SSTORE operation from dirty"},netSstoreClearRefund:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},netSstoreResetRefund:{v:4800,d:"Once per SSTORE operation for resetting to the original non-zero value"},netSstoreResetClearRefund:{v:19800,d:"Once per SSTORE operation for resetting to the original zero value"},shl:{v:3,d:"Base fee of the SHL opcode"},shr:{v:3,d:"Base fee of the SHR opcode"},sar:{v:3,d:"Base fee of the SAR opcode"},extcodehash:{v:400,d:"Base fee of the EXTCODEHASH opcode"},create2:{v:32e3,d:"Base fee of the CREATE2 opcode"}},vm:{},pow:{minerReward:{v:"2000000000000000000",d:"The amount a miner gets rewarded for mining a block"},difficultyBombDelay:{v:5e6,d:"the amount of blocks to delay the difficulty bomb with"}}},petersburg:{name:"petersburg",comment:"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople",url:"https://eips.ethereum.org/EIPS/eip-1716",status:"Final",gasConfig:{},gasPrices:{netSstoreNoopGas:{v:null,d:"Removed along EIP-1283"},netSstoreInitGas:{v:null,d:"Removed along EIP-1283"},netSstoreCleanGas:{v:null,d:"Removed along EIP-1283"},netSstoreDirtyGas:{v:null,d:"Removed along EIP-1283"},netSstoreClearRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetClearRefund:{v:null,d:"Removed along EIP-1283"}},vm:{},pow:{}},istanbul:{name:"istanbul",comment:"HF targeted for December 2019 following the Constantinople/Petersburg HF",url:"https://eips.ethereum.org/EIPS/eip-1679",status:"Final",gasConfig:{},gasPrices:{blake2Round:{v:1,d:"Gas cost per round for the Blake2 F precompile"},ecAdd:{v:150,d:"Gas costs for curve addition precompile"},ecMul:{v:6e3,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:45e3,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:34e3,d:"Gas costs regarding curve pairing precompile input length"},txDataNonZero:{v:16,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},sstoreSentryGasEIP2200:{v:2300,d:"Minimum gas required to be present for an SSTORE call, not consumed"}
9688,sstoreNoopGasEIP2200:{v:800,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:800,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitGasEIP2200:{v:2e4,d:"Once per SSTORE operation from clean zero to non-zero"},sstoreInitRefundEIP2200:{v:19200,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanGasEIP2200:{v:5e3,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreCleanRefundEIP2200:{v:4200,d:"Once per SSTORE operation for resetting to the original non-zero value"},sstoreClearRefundEIP2200:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},balance:{v:700,d:"Base fee of the BALANCE opcode"},extcodehash:{v:700,d:"Base fee of the EXTCODEHASH opcode"},chainid:{v:2,d:"Base fee of the CHAINID opcode"},selfbalance:{v:5,d:"Base fee of the SELFBALANCE opcode"},sload:{v:800,d:"Base fee of the SLOAD opcode"}},vm:{},pow:{}},muirGlacier:{name:"muirGlacier",comment:"HF to delay the difficulty bomb",url:"https://eips.ethereum.org/EIPS/eip-2384",status:"Final",gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:9e6,d:"the amount of blocks to delay the difficulty bomb with"}}},berlin:{name:"berlin",comment:"HF targeted for July 2020 following the Muir Glacier HF",url:"https://eips.ethereum.org/EIPS/eip-2070",status:"Final",eips:[2565,2929,2718,2930]},london:{name:"london",comment:"HF targeted for July 2021 following the Berlin fork",url:"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md",status:"Final",eips:[1559,3198,3529,3541]},shanghai:{name:"shanghai",comment:"Next feature hardfork after the merge hardfork having withdrawals, warm coinbase, push0, limit/meter initcode",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md",status:"Final",eips:[3651,3855,3860,4895]},arrowGlacier:{name:"arrowGlacier",comment:"HF to delay the difficulty bomb",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md",status:"Final",eips:[4345],gasConfig:{},gasPrices:{},vm:{},pow:{}},grayGlacier:{name:"grayGlacier",comment:"Delaying the difficulty bomb to Mid September 2022",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md",status:"Draft",eips:[5133],gasConfig:{},gasPrices:{},vm:{},pow:{}},mergeForkIdTransition:{name:"mergeForkIdTransition",comment:"Pre-merge hardfork to fork off non-upgraded clients",url:"https://eips.ethereum.org/EIPS/eip-3675",status:"Draft",eips:[]},merge:{name:"merge",comment:"Hardfork to upgrade the consensus mechanism to Proof-of-Stake",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md",status:"Final",consensus:{type:"pos",algorithm:"casper",casper:{}},eips:[3675,4399]}},{buf:WF}=BF;class qF extends zL{constructor(e){var t,n;super(),this._eips=[],this._customChains=null!==(t=e.customChains)&&void 0!==t?t:[],this._chainParams=this.setChain(e.chain),this.DEFAULT_HARDFORK=null!==(n=this._chainParams.defaultHardfork)&&void 0!==n?n:vF.Merge,this.HARDFORK_CHANGES=this.hardforks().map((e=>[e.name,HF[e.name]])),this._hardfork=this.DEFAULT_HARDFORK,void 0!==e.hardfork&&this.setHardfork(e.hardfork),e.eips&&this.setEIPs(e.eips)}static custom(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;const r=null!==(n=t.baseChain)&&void 0!==n?n:"mainnet",i=Object.assign({},qF._getChainParams(r));if(i.name="custom-chain","string"!==typeof e)return new qF(Object.assign({chain:Object.assign(Object.assign({},i),e)},t));if(e===xF.PolygonMainnet)return qF.custom({name:xF.PolygonMainnet,chainId:137,networkId:137},t);if(e===xF.PolygonMumbai)return qF.custom({name:xF.PolygonMumbai,chainId:80001,networkId:80001},t);if(e===xF.ArbitrumRinkebyTestnet)return qF.custom({name:xF.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611},t);if(e===xF.ArbitrumOne)return qF.custom({name:xF.ArbitrumOne,chainId:42161,networkId:42161},t);if(e===xF.xDaiChain)return qF.custom({name:xF.xDaiChain,chainId:100,networkId:100},t);if(e===xF.OptimisticKovan)return qF.custom({name:xF.OptimisticKovan,chainId:69,networkId:69},Object.assign({hardfork:vF.Berlin},t));if(e===xF.OptimisticEthereum)return qF.custom({name:xF.OptimisticEthereum,chainId:10,networkId:10},Object.assign({hardfork:vF.Berlin},t));throw new Error(`Custom chain ${e} not supported`)}static fromGethGenesis(e,t){let{chain:n,eips:r,genesisHash:i,hardfork:s,mergeFor
9688kIdPostMerge:o}=t;var a;const c=function(e,t,n){try{if(["config","difficulty","gasLimit","alloc"].some((t=>!(t in e))))throw new Error("Invalid format, expected geth genesis fields missing");return void 0!==t&&(e.name=t),CF(e,n)}catch(r){throw new Error(`Error parsing parameters file: ${r.message}`)}}(e,n,o),l=new qF({chain:null!==(a=c.name)&&void 0!==a?a:"custom",customChains:[c],eips:r,hardfork:null!==s&&void 0!==s?s:c.hardfork});return void 0!==i&&l.setForkHashes(i),l}static isSupportedChainId(e){const t=this._getInitializedChains();return Boolean(t.names[e.toString()])}static _getChainParams(e,t){let n=e;const r=this._getInitializedChains(t);if("number"===typeof n||"bigint"===typeof n){if(n=n.toString(),r.names[n]){return r[r.names[n]]}throw new Error(`Chain with ID ${n} not supported`)}if(void 0!==r[n])return r[n];throw new Error(`Chain with name ${n} not supported`)}setChain(e){if("number"===typeof e||"bigint"===typeof e||"string"===typeof e)this._chainParams=qF._getChainParams(e,this._customChains);else{if("object"!==typeof e)throw new Error("Wrong input format");{if(this._customChains.length>0)throw new Error("Chain must be a string, number, or bigint when initialized with customChains passed in");const t=["networkId","genesis","hardforks","bootstrapNodes"];for(const n of t)if(!(n in e))throw new Error(`Missing required chain parameter: ${n}`);this._chainParams=e}}for(const t of this.hardforks())if(void 0===t.block)throw new Error("Hardfork cannot have undefined block number");return this._chainParams}setHardfork(e){let t=!1;for(const n of this.HARDFORK_CHANGES)n[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),t=!0);if(!t)throw new Error(`Hardfork with name ${e} not supported`)}getHardforkByBlockNumber(e,t,n){const r=LF(e,EF.BigInt),i=LF(t,EF.BigInt),s=LF(n,EF.Number),o=this.hardforks().filter((e=>null!==e.block||null!==e.ttd&&void 0!==e.ttd||void 0!==e.timestamp)),a=o.findIndex((e=>null!==e.ttd&&void 0!==e.ttd)),c=o.slice(a+1).findIndex((e=>null!==e.ttd&&void 0!==e.ttd));if(c>=0)throw Error("More than one merge hardforks found with ttd specified");let l=o.findIndex((e=>null!==e.block&&e.block>r||void 0!==s&&Number(e.timestamp)>s));if(-1===l)l=o.length;else if(0===l)throw Error("Must have at least one hardfork at block 0");if(void 0===s){const e=o.slice(0,l).reverse().findIndex((e=>null!==e.block||void 0!==e.ttd));l-=e}if(l-=1,null===o[l].block&&void 0===o[l].timestamp)(void 0===i||null===i||BigInt(o[l].ttd)>i)&&(l-=1);else if(a>=0&&void 0!==i&&null!==i){if(l>=a&&BigInt(o[a].ttd)>i)throw Error("Maximum HF determined by total difficulty is lower than the block number HF");if(l<a&&BigInt(o[a].ttd)<=i)throw Error("HF determined by block number is lower than the minimum total difficulty HF")}const u=l;for(;l<o.length-1&&(o[l].block===o[l+1].block&&o[l].timestamp===o[l+1].timestamp);l+=1);if(s){const e=o.slice(0,u).reduce(((e,t)=>{var n;return Math.max(Number(null!==(n=t.timestamp)&&void 0!==n?n:"0"),e)}),0);if(e>s)throw Error("Maximum HF determined by timestamp is lower than the block number/ttd HF");const t=o.slice(l+1).reduce(((e,t)=>{var n;return Math.min(Number(null!==(n=t.timestamp)&&void 0!==n?n:s),e)}),s);if(t<s)throw Error("Maximum HF determined by block number/ttd is lower than timestamp HF")}return o[l].name}setHardforkByBlockNumber(e,t,n){const r=this.getHardforkByBlockNumber(e,t,n);return this.setHardfork(r),r}_getHardfork(e){const t=this.hardforks();for(const n of t)if(n.name===e)return n;return null}setEIPs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(const t of e){if(!(t in zF))throw new Error(`${t} not supported`);const n=this.gteHardfork(zF[t].minimumHardfork);if(!n)throw new Error(`${t} cannot be activated on hardfork ${this.hardfork()}, minimumHardfork: ${n}`);if(void 0!==zF[t].requiredEIPs)for(const r of zF[t].requiredEIPs)if(!e.includes(r)&&!this.isActivatedEIP(r))throw new Error(`${t} requires EIP ${r}, but is not included in the EIP list`)}this._eips=e}param(e,t){let n;for(const r of this._eips)if(n=this.paramByEIP(e,t,r),void 0!==n)return n;return this.paramByHardfork(e,t,this._hardfork)}paramByHardfork(e,t,n){let r=null;for(const i of this.HARDFORK_CHANGES){if("eips"in i[1]){const n=i[1].eips;for(const i of n){const n=this.paramByEIP(e,t,i);r="bigint"===typeof n?n:r}}else{if(void 0===i[1][e])throw new Error(`Topic ${e} not defined`);void 0!==i[1][e][t]&&(r=i[1][e][t].v)}if(i[0]===n)break}return BigInt(null!==r&&void 0!==r?r:0)}paramByEIP(e,t,n){if(!(n in zF))throw new Error(`${n} not supported`);const r=zF[n];if(!(e in r))throw new Error(`Topic ${e} not defined`);if(void 0===r[e][t])return;const i=r[e][t].v;return BigInt(i)}paramByBlock(e,t,n,r,i){const s=this.getHardforkByBlockNumber(n,r,i);return this.paramByHardfork(e,t,s)}isActivatedEIP(e){if(this.eips().includes(e))return!0;for(const t of this.HARDFORK_CHANGES){const n=t[1];if(this.gteHardfork(n.name)&&"eips"in n&&n.eips.includes(e))return!0}return!1}hardforkIsActiveOnBlock(e,t){const n=LF(t,EF.BigInt),r=null!==e&&void 0!==e?e:this._hardfork,i=this.hardforkBlock(r);return"bigint"===typeof i&&i!==BigInt(0)&&n>=i}activeOnBlock(e){return this.hardforkIsActiveOnBlock(null,e)}hardforkGteHardfork(e,t){const n=null!==e&&void 0!==e?e:this._hardfork,r=this.hardforks();let i=-1,s=-1,o=0;for(const a of r)a.name===n&&(i=o),a.name===t&&(s=o),o+=1;return i>=s&&-1!==s}gteHardfork(e){return this.hardforkGteHardfork(null,e)}hardforkBlock(e){var t;const n=null!==e&&void 0!==e?e:this._hardfork,r=null===(t=this._getHardfork(n))||void 0===t?void 0:t.block;
9688return void 0===r||null===r?null:BigInt(r)}hardforkTimestamp(e){var t;const n=null!==e&&void 0!==e?e:this._hardfork,r=null===(t=this._getHardfork(n))||void 0===t?void 0:t.timestamp;return void 0===r||null===r?null:BigInt(r)}eipBlock(e){for(const t of this.HARDFORK_CHANGES){const n=t[1];if("eips"in n&&n.eips.includes(e))return this.hardforkBlock("number"===typeof t[0]?String(t[0]):t[0])}return null}hardforkTTD(e){var t;const n=null!==e&&void 0!==e?e:this._hardfork,r=null===(t=this._getHardfork(n))||void 0===t?void 0:t.ttd;return void 0===r||null===r?null:BigInt(r)}isHardforkBlock(e,t){const n=LF(e,EF.BigInt),r=null!==t&&void 0!==t?t:this._hardfork,i=this.hardforkBlock(r);return"bigint"===typeof i&&i!==BigInt(0)&&i===n}nextHardforkBlockOrTimestamp(e){var t,n;const r=null!==e&&void 0!==e?e:this._hardfork,i=this.hardforks();let s=i.findIndex((e=>e.name===r));if(r===vF.Merge&&(s-=1),s<0)return null;let o=null!==(t=i[s].timestamp)&&void 0!==t?t:i[s].block;o=null!==o&&void 0!==o?Number(o):null;const a=i.slice(s+1).find((e=>{var t;let n=null!==(t=e.timestamp)&&void 0!==t?t:e.block;return n=null!==n&&void 0!==n?Number(n):null,e.name!==vF.Merge&&null!==n&&void 0!==n&&n!==o}));if(void 0===a)return null;const c=null!==(n=a.timestamp)&&void 0!==n?n:a.block;return null===c||void 0===c?null:BigInt(c)}nextHardforkBlock(e){const t=null!==e&&void 0!==e?e:this._hardfork;let n=this.hardforkBlock(t);if(null===n&&t===vF.Merge){const e=this.hardforks(),t=e.findIndex((e=>null!==e.ttd&&void 0!==e.ttd));if(t<0)throw Error("Merge hardfork should have been found");n=this.hardforkBlock(e[t-1].name)}if(null===n)return null;const r=this.hardforks().reduce(((e,t)=>{const r=BigInt(null===t.block||void 0!==t.ttd&&null!==t.ttd?0:t.block);return r>n&&null===e?r:e}),null);return r}isNextHardforkBlock(e,t){const n=LF(e,EF.BigInt),r=null!==t&&void 0!==t?t:this._hardfork,i=this.nextHardforkBlock(r);return null!==i&&i===n}_calcForkHash(e,t){let n=new Uint8Array,r=0;for(const o of this.hardforks()){const{block:t,timestamp:i,name:s}=o;let a=null!==i&&void 0!==i?i:t;if(a=null!==a?Number(a):null,"number"===typeof a&&0!==a&&a!==r&&s!==vF.Merge){n=lL(n,gL(a.toString(16).padStart(16,"0"))),r=a}if(o.name===e)break}const i=lL(t,n),s=mL(function(e){const t=kF(e);return gL(`0x${AF(t.slice(2))}`)}(WF(i)>>>0));return s}forkHash(e,t){const n=null!==e&&void 0!==e?e:this._hardfork,r=this._getHardfork(n);if(null===r||null===(null===r||void 0===r?void 0:r.block)&&void 0===(null===r||void 0===r?void 0:r.timestamp)&&void 0===(null===r||void 0===r?void 0:r.ttd)){throw new Error("No fork hash calculation possible for future hardfork")}if(null!==(null===r||void 0===r?void 0:r.forkHash)&&void 0!==(null===r||void 0===r?void 0:r.forkHash))return r.forkHash;if(!t)throw new Error("genesisHash required for forkHash calculation");return this._calcForkHash(n,t)}hardforkForForkHash(e){const t=this.hardforks().filter((t=>t.forkHash===e));return t.length>=1?t[t.length-1]:null}setForkHashes(e){var t;for(const n of this.hardforks()){const r=null!==(t=n.timestamp)&&void 0!==t?t:n.block;null!==n.forkHash&&void 0!==n.forkHash||(null===r||void 0===r)&&"undefined"===typeof n.ttd||(n.forkHash=this.forkHash(n.name,e))}}genesis(){return this._chainParams.genesis}hardforks(){return this._chainParams.hardforks}bootstrapNodes(){return this._chainParams.bootstrapNodes}dnsNetworks(){return this._chainParams.dnsNetworks}hardfork(){return this._hardfork}chainId(){return BigInt(this._chainParams.chainId)}chainName(){return this._chainParams.name}networkId(){return BigInt(this._chainParams.networkId)}eips(){return this._eips}consensusType(){const e=this.hardfork();let t;for(const n of this.HARDFORK_CHANGES)if("consensus"in n[1]&&(t=n[1].consensus.type),n[0]===e)break;return null!==t&&void 0!==t?t:this._chainParams.consensus.type}consensusAlgorithm(){const e=this.hardfork();let t;for(const n of this.HARDFORK_CHANGES)if("consensus"in n[1]&&(t=n[1].consensus.algorithm),n[0]===e)break;return null!==t&&void 0!==t?t:this._chainParams.consensus.algorithm}consensusConfig(){var e;const t=this.hardfork();let n;for(const r of this.HARDFORK_CHANGES)if("consensus"in r[1]&&(n=r[1].consensus[r[1].consensus.algorithm]),r[0]===t)break;return null!==(e=null!==n&&void 0!==n?n:this._chainParams.consensus[this.consensusAlgorithm()])&&void 0!==e?e:{}}copy(){const e=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return e.removeAllListeners(),e}static _getInitializedChains(e){const t={};for(const[r,i]of Object.entries(yF))t[i]=r.toLowerCase();const n={mainnet:FF,goerli:UF,sepolia:$F};if(e)for(const r of e){const{name:e}=r;t[r.chainId.toString()]=e,n[e]=r}return n.names=t,n}}var VF;function GF(e){return!function(e){if(0===e.length)return!0;const t=e[0];return!!Array.isArray(t)}(e)}!function(e){e[e.EIP155ReplayProtection=155]="EIP155ReplayProtection",e[e.EIP1559FeeMarket=1559]="EIP1559FeeMarket",e[e.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",e[e.EIP2930AccessLists=2930]="EIP2930AccessLists"}(VF||(VF={}));class KF{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.buf=e}static zero(){return new KF(TF(20))}equals(e){return uL(this.buf,e.buf)}isZero(){return this.equals(KF.zero())}toString(){return mL(this.buf)}toArray(){return this.buf}static publicToAddress(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e;if(PF(n),t&&64!==n.length&&(n=hF.ProjectivePoint.fromHex(n).toRawBytes(!1).slice(1)),64!==n.length)throw new Error("Expected pubKey to be of length 64");return pj(n).slice(-20)}}const ZF=e=>{let t,n;if(GF(e)){t=e;const r=[];for(let t=0;t<e.length;t+=1){const n=e[t],i=SF(n.address),s=[];for(let e=0;e<n.storageKeys.length;e+=1)s.push(SF(n.storageKeys[e]));r.push([i,s])}n=r}else{n=null!==e&&void 0!==e?e:[];const r=[];for(let e=0;e<n.length;e+=1){const t=n[e],i=mL(t[0]),s=[];for(let e=0;e<t[1].length;e+=1)s.push(mL(t[1][e]));const o={address:i,storageKeys:s};r.push(o)}t=r}return{AccessListJSON:t,accessList:n}},YF=e=>{for(let t=0;t<e.length;t+=1){const n=e[t],r=n[0],i=n[1];if(void 0!==n[2])throw new Error("Access list item cannot have 3 elements. It c
9688an only have an address, and an array of storage slots.");if(20!==r.length)throw new Error("Invalid EIP-2930 transaction: address length should be 20 bytes");for(let e=0;e<i.length;e+=1)if(32!==i[e].length)throw new Error("Invalid EIP-2930 transaction: storage slot length should be 32 bytes")}},QF=e=>{const t=[];for(let n=0;n<e.length;n+=1){const r=e[n],i={address:mL(NF(r[0],20)),storageKeys:[]},s=r&&r[1];for(let e=0;e<s.length;e+=1){const t=s[e];i.storageKeys.push(mL(NF(t,32)))}t.push(i)}return t},JF=(e,t)=>{const n=t.param("gasPrices","accessListStorageKeyCost"),r=t.param("gasPrices","accessListAddressCost");let i=0;for(let s=0;s<e.length;s+=1){i+=e[s][1].length}return e.length*Number(r)+i*Number(n)};class XF{constructor(e,t){var n,r;this.cache={hash:void 0,dataFee:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=yF.Mainnet,this.DEFAULT_HARDFORK=vF.Merge;const{nonce:i,gasLimit:s,to:o,value:a,data:c,v:l,r:u,s:d,type:h}=e;this._type=Number(IF(SF(h))),this.txOptions=t;const p=SF(""===o?"0x":o),f=SF(""===l?"0x":l),m=SF(""===u?"0x":u),g=SF(""===d?"0x":d);this.nonce=IF(SF(""===i?"0x":i)),this.gasLimit=IF(SF(""===s?"0x":s)),this.to=p.length>0?new KF(p):void 0,this.value=IF(SF(""===a?"0x":a)),this.data=SF(""===c?"0x":c),this.v=f.length>0?IF(f):void 0,this.r=m.length>0?IF(m):void 0,this.s=g.length>0?IF(g):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0);const y=void 0===this.to||null===this.to,v=null!==(n=t.allowUnlimitedInitCodeSize)&&void 0!==n&&n,w=null!==(r=t.common)&&void 0!==r?r:this._getCommon();y&&w.isActivatedEIP(3860)&&!v&&((e,t)=>{const n=e.param("vm","maxInitCodeSize");if(n&&BigInt(t)>n)throw new Error(`the initcode size of this transaction is too large: it is ${t} while the max is ${e.param("vm","maxInitCodeSize")}`)})(w,this.data.length)}get type(){return this._type}supports(e){return this.activeCapabilities.includes(e)}validate(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[];return this.getBaseFee()>this.gasLimit&&t.push(`gasLimit is too low. given ${this.gasLimit}, need at least ${this.getBaseFee()}`),this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),e?t:0===t.length}_validateYParity(){const{v:e}=this;if(void 0!==e&&e!==BigInt(0)&&e!==BigInt(1)){const e=this._errorMsg("The y-parity of the transaction should either be 0 or 1");throw new Error(e)}}_validateHighS(){const{s:e}=this;if(this.common.gteHardfork("homestead")&&void 0!==e&&e>mF){const e=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invali
9688d");throw new Error(e)}}getBaseFee(){const e=this.common.param("gasPrices","tx");let t=this.getDataFee();if(e&&(t+=e),this.common.gteHardfork("homestead")&&this.toCreationAddress()){const e=this.common.param("gasPrices","txCreation");e&&(t+=e)}return t}getDataFee(){const e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero");let n=BigInt(0);for(let r=0;r<this.data.length;r+=1)0===this.data[r]?n+=e:n+=t;if((void 0===this.to||null===this.to)&&this.common.isActivatedEIP(3860)){const e=BigInt(Math.ceil(this.data.length/32));n+=this.common.param("gasPrices","initCodeWordCost")*e}return n}toCreationAddress(){return void 0===this.to||0===this.to.buf.length}isSigned(){const{v:e,r:t,s:n}=this;return void 0!==e&&void 0!==t&&void 0!==n}verifySignature(){try{const e=this.getSenderPublicKey();return 0!==RF(e).length}catch(e){return!1}}getSenderAddress(){return new KF(KF.publicToAddress(this.getSenderPublicKey()))}sign(e){if(32!==e.length){const e=this._errorMsg("Private key must be 32 bytes in length.");throw new Error(e)}let t=!1;0===this.type&&this.common.gteHardfork("spuriousDragon")&&!this.supports(VF.EIP155ReplayProtection)&&(this.activeCapabilities.push(VF.EIP155ReplayProtection),t=!0);const n=this.getMessageToSign(!0),{v:r,r:i,s:s}=this._ecsign(n,e),o=this._processSignature(r,i,s);if(t){const e=this.activeCapabilities.indexOf(VF.EIP155ReplayProtection);e>-1&&this.activeCapabilities.splice(e,1)}return o}_getCommon(e,t){var n,r,i,s;if(void 0!==t){const n=IF(SF(t));if(e){if(e.chainId()!==n){const e=this._errorMsg("The chain ID does not match the chain ID of Common");throw new Error(e)}return e.copy()}return qF.isSupportedChainId(n)?new qF({chain:n,hardfork:this.DEFAULT_HARDFORK}):qF.custom({name:"custom-chain",networkId:n,chainId:n},{baseChain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}if((null===e||void 0===e?void 0:e.copy)&&"function"===typeof(null===e||void 0===e?void 0:e.copy))return e.copy();if(e){const t="function"===typeof e.hardfork?e.hardfork():e.hardfork;return qF.custom({name:"custom-chain",networkId:e.networkId?e.networkId():null!==(r=BigInt(null===(n=e.customChain)||void 0===n?void 0:n.networkId))&&void 0!==r?r:void 0,chainId:e.chainId?e.chainId():null!==(s=BigInt(null===(i=e.customChain)||void 0===i?void 0:i.chainId))&&void 0!==s?s:void 0},{baseChain:this.DEFAULT_CHAIN,hardfork:t||this.DEFAULT_HARDFORK})}return new qF({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}_validateCannotExceedMaxInteger(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:256,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(const[r,i]of Object.entries(e))switch(t){case 64:if(n){if(void 0!==i&&i>=pF){const e=this._errorMsg(`${r} cannot equal or exceed MAX_UINT64 (2^64-1), given ${i}`);throw new Error(e)}}else if(void 0!==i&&i>pF){const e=this._errorMsg(`${r} cannot exceed MAX_UINT64 (2^64-1), given ${i}`);throw new Error(e)}break;case 256:if(n){if(void 0!==i&&i>=fF){const e=this._errorMsg(`${r} cannot equal or exceed MAX_INTEGER (2^256-1), given ${i}`);throw new Error(e)}}else if(void 0!==i&&i>fF){const e=this._errorMsg(`${r} cannot exceed MAX_INTEGER (2^256-1), given ${i}`);throw new Error(e)}break;default:{const e=this._errorMsg("unimplemented bits value");throw new Error(e)}}}static _validateNotArray(e){const t=["nonce","gasPrice","gasLimit","to","value","data","v","r","s","type","baseFee","maxFeePerGas","chainId"];for(const[n,r]of Object.entries(e))if(t.includes(n)&&Array.isArray(r))throw new Error(`${n} cannot be an array`)}_getSharedErrorPostfix(){let e="";try{e=this.isSigned()?mL(this.hash()):"not available (unsigned)"}catch(i){e="error"}let t="";try{t=this.isSigned().toString()}catch(i){e="error"}let n="";try{n=this.common.hardfork()}catch(i){n="error"}let r=`tx type=${this.type} hash=${e} nonce=${this.nonce} value=${this.value} `;return r+=`signed=${t} hf=${n}`,r}_ecsign(e,t,n){const r=hF.sign(e,t),i=r.toCompactRawBytes();return{r:i.subarray(0,32),s:i.subarray(32,64),v:void 0===n?BigInt(r.recovery+27):BigInt(r.recovery+35)+BigInt(n)*BigInt(2)}}static fromSerializedTx(e){}static fromTxData(e){}}const e$=gL(2..toString(16).padStart(2,"0"));class t$ extends XF{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;super(Object.assign(Object.assign({},e),{type:2}),t),this.DEFAULT_HARDFORK="london";const{chainId:r,accessList:i,maxFeePerGas:s,maxPriorityFeePerGas:o}=e;if(this.common=this._getCommon(t.common,r),this.chainId=this.common.chainId(),!this.common.isActivatedEIP(1559))throw new Error("EIP-1559 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);const a=ZF(null!==i&&void 0!==i?i:[]);if(this.accessList=a.accessList,this.AccessListJSON=a.AccessListJSON,YF(this.accessList),this.maxFeePerGas=IF(SF(""===s?"0x":s)),this.maxPriorityFeePerGas=IF(SF(""===o?"0x":o)),this._val
9688idateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),XF._validateNotArray(e),this.gasLimit*this.maxFeePerGas>fF){const e=this._errorMsg("gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)");throw new Error(e)}if(this.maxFeePerGas<this.maxPriorityFeePerGas){const e=this._errorMsg("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)");throw new Error(e)}this._validateYParity(),this._validateHighS();(null===(n=null===t||void 0===t?void 0:t.freeze)||void 0===n||n)&&Object.freeze(this)}static fromTxData(e){return new t$(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}static fromSerializedTx(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!uL(e.subarray(0,1),e$))throw new Error(`Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: 2, received: ${mL(e.subarray(0,1))}`);const n=DF.Tj.decode(e.subarray(1));if(!Array.isArray(n))throw new Error("Invalid serialized tx input: must be array");return t$.fromValuesArray(n,t)}static fromValuesArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(9!==e.length&&12!==e.length)throw new Error("Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).");const[n,r,i,s,o,a,c,l,u,d,h,p]=e;return this._validateNotArray({chainId:n,v:d}),kj({nonce:r,maxPriorityFeePerGas:i,maxFeePerGas:s,gasLimit:o,value:c,v:d,r:h,s:p}),new t$({chainId:IF(n),nonce:r,maxPriorityFeePerGas:i,maxFeePerGas:s,gasLimit:o,to:a,value:c,data:l,accessList:null!==u&&void 0!==u?u:[],v:void 0!==d?IF(d):void 0,r:h,s:p},t)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let e=super.getDataFee();return e+=BigInt(JF(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:e,hardfork:this.common.hardfork()}),e}getUpfrontCost(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:BigInt(0);const t=this.maxPriorityFeePerGas,n=this.maxFeePerGas-e,r=(t<n?t:n)+e;return this.gasLimit*r+this.value}raw(){return[MF(this.chainId),MF(this.nonce),MF(this.maxPriorityFeePerGas),MF(this.maxFeePerGas),MF(this.gasLimit),void 0!==this.to?this.to.buf:Uint8Array.from([]),MF(this.value),this.data,this.accessList,void 0!==this.v?MF(this.v):Uint8Array.from([]),void 0!==this.r?MF(this.r):Uint8Array.from([]),void 0!==this.s?MF(this.s):Uint8Array.from([])]}serialize(){const e=this.raw();return lL(e$,DF.Tj.encode(e))}getMessageToSign(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this.raw().slice(0,9),n=lL(e$,DF.Tj.encode(t));return e?pj(n):n}hash(){if(!this.isSigned()){const e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=pj(this.serialize())),this.cache.hash):pj(this.serialize())}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const e=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(e)}const e=this.getMessageToVerifySignature(),{v:t,r:n,s:r}=this;this._validateHighS();try{return jF(e,t+BigInt(27),MF(n),MF(r))}catch(i){const e=this._errorMsg("Invalid Signature");throw new Error(e)}}_processSignature(e,t,n){const r=Object.assign(Object.assign({},this.txOptions),{common:this.common});return t$.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:e-BigInt(27),r:IF(t),s:IF(n)},r)}toJSON(){const e=QF(this.accessList);return{chainId:OF(this.chainId),nonce:OF(this.nonce),maxPriorityFeePerGas:OF(this.maxPriorityFeePerGas),maxFeePerGas:OF(this.maxFeePerGas),gasLimit:OF(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:OF(this.value),data:mL(this.data),accessList:e,v:void 0!==this.v?OF(this.v):void 0,r:void 0!==this.r?OF(this.r):void 0,s:void 0!==this.s?OF(this.s):void 0}}errorStr(){let e=this._getSharedErrorPostfix();return e+=` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`,e}_errorMsg(e){return`${e} (${this.errorStr()})`}}const n$=gL(1..toString(16).padStart(2,"0"));class r$ extends XF{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;super(Object.assign(Object.assign({},e),{type:1}),t),this.DEFAULT_HARDFORK="berlin";const{chainId:r,accessList:i,gasPrice:s}=e;if(this.common=this._getCommon(t.common,r),this.chainId=this.common.chainId(),!this.common.isActivatedEIP(2930))throw new Error("EIP-2930 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([2718,2930]);const o=ZF(null!==i&&void 0!==i?i:[]);if(this.accessList=o.accessList,this.AccessListJSON=o.AccessListJSON,YF(this.accessList),this.gasPrice=IF(SF(""===s?"0x":s)),this._val
9688idateCannotExceedMaxInteger({gasPrice:this.gasPrice}),XF._validateNotArray(e),this.gasPrice*this.gasLimit>fF){const e=this._errorMsg("gasLimit * gasPrice cannot exceed MAX_INTEGER");throw new Error(e)}this._validateYParity(),this._validateHighS();(null===(n=null===t||void 0===t?void 0:t.freeze)||void 0===n||n)&&Object.freeze(this)}static fromTxData(e){return new r$(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}static fromSerializedTx(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!uL(e.subarray(0,1),n$))throw new Error(`Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: 1, received: ${mL(e.subarray(0,1))}`);const n=DF.Tj.decode(Uint8Array.from(e.subarray(1)));if(!Array.isArray(n))throw new Error("Invalid serialized tx input: must be array");return r$.fromValuesArray(n,t)}static fromValuesArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(8!==e.length&&11!==e.length)throw new Error("Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).");const[n,r,i,s,o,a,c,l,u,d,h]=e;this._validateNotArray({chainId:n,v:u}),kj({nonce:r,gasPrice:i,gasLimit:s,value:a,v:u,r:d,s:h});return new r$({chainId:IF(n),nonce:r,gasPrice:i,gasLimit:s,to:o,value:a,data:c,accessList:null!==l&&void 0!==l?l:[],v:void 0!==u?IF(u):void 0,r:d,s:h},t)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let e=super.getDataFee();return e+=BigInt(JF(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:e,hardfork:this.common.hardfork()}),e}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}raw(){return[MF(this.chainId),MF(this.nonce),MF(this.gasPrice),MF(this.gasLimit),void 0!==this.to?this.to.buf:Uint8Array.from([]),MF(this.value),this.data,this.accessList,void 0!==this.v?MF(this.v):Uint8Array.from([]),void 0!==this.r?MF(this.r):Uint8Array.from([]),void 0!==this.s?MF(this.s):Uint8Array.from([])]}serialize(){const e=this.raw();return lL(n$,DF.Tj.encode(e))}getMessageToSign(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this.raw().slice(0,8),n=lL(n$,DF.Tj.encode(t));return e?pj(n):n}hash(){if(!this.isSigned()){const e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=pj(this.serialize())),this.cache.hash):pj(this.serialize())}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const e=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(e)}const e=this.getMessageToVerifySignature(),{v:t,r:n,s:r}=this;this._validateHighS();try{return jF(e,t+BigInt(27),MF(n),MF(r))}catch(i){const e=this._errorMsg("Invalid Signature");throw new Error(e)}}_processSignature(e,t,n){const r=Object.assign(Object.assign({},this.txOptions),{common:this.common});return r$.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:e-BigInt(27),r:IF(t),s:IF(n)},r)}toJSON(){const e=QF(this.accessList);return{chainId:OF(this.chainId),nonce:OF(this.nonce),gasPrice:OF(this.gasPrice),gasLimit:OF(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:OF(this.value),data:mL(this.data),accessList:e,v:void 0!==this.v?OF(this.v):void 0,r:void 0!==this.r?OF(this.r):void 0,s:void 0!==this.s?OF(this.s):void 0}}errorStr(){var e,t;let n=this._getSharedErrorPostfix();return n+=` gasPrice=${this.gasPrice} accessListCount=${null!==(t=null===(e=this.accessList)||void 0===e?void 0:e.length)&&void 0!==t?t:0}`,n}_errorMsg(e){return`${e} (${this.errorStr()})`}}function i$(e,t){const n=Number(e),r=2*Number(t);return n===r+35||n===r+36}class s$ extends XF{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;if(super(Object.assign(Object.assign({},e),{type:0}),t),this.common=this._validateTxV(this.v,t.common),this.gasPrice=IF(SF(""===e.gasPrice?"0x":e.gasPrice)),this.gasPrice*this.gasLimit>fF){const e=this._errorMsg("gas limit * gasPrice cannot exceed MAX_INTEGER (2^256-1)");throw new Error(e)}
9688this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),XF._validateNotArray(e),this.common.gteHardfork("spuriousDragon")&&(this.isSigned()?i$(this.v,this.common.chainId())&&this.activeCapabilities.push(VF.EIP155ReplayProtection):this.activeCapabilities.push(VF.EIP155ReplayProtection));(null===(n=null===t||void 0===t?void 0:t.freeze)||void 0===n||n)&&Object.freeze(this)}static fromTxData(e){return new s$(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}static fromSerializedTx(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=DF.Tj.decode(e);if(!Array.isArray(n))throw new Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(n,t)}static fromValuesArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(6!==e.length&&9!==e.length)throw new Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");const[n,r,i,s,o,a,c,l,u]=e;return kj({nonce:n,gasPrice:r,gasLimit:i,value:o,v:c,r:l,s:u}),new s$({nonce:n,gasPrice:r,gasLimit:i,to:s,value:o,data:a,v:c,r:l,s:u},t)}raw(){return[MF(this.nonce),MF(this.gasPrice),MF(this.gasLimit),void 0!==this.to?this.to.buf:Uint8Array.from([]),MF(this.value),this.data,void 0!==this.v?MF(this.v):Uint8Array.from([]),void 0!==this.r?MF(this.r):Uint8Array.from([]),void 0!==this.s?MF(this.s):Uint8Array.from([])]}serialize(){return DF.Tj.encode(this.raw())}_getMessageToSign(){const e=[MF(this.nonce),MF(this.gasPrice),MF(this.gasLimit),void 0!==this.to?this.to.buf:Uint8Array.from([]),MF(this.value),this.data];return this.supports(VF.EIP155ReplayProtection)&&(e.push(SF(this.common.chainId())),e.push(RF(SF(0))),e.push(RF(SF(0)))),e}getMessageToSign(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this._getMessageToSign();return e?pj(DF.Tj.encode(t)):t}getDataFee(){return this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork()?this.cache.dataFee.value:(Object.isFrozen(this)&&(this.cache.dataFee={value:super.getDataFee(),hardfork:this.common.hardfork()}),super.getDataFee())}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}hash(){if(!this.isSigned()){const e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=pj(DF.Tj.encode(this.raw()))),this.cache.hash):pj(DF.Tj.encode(this.raw()))}getMessageToVerifySignature(){if(!this.isSigned()){const e=this._errorMsg("This transaction is not signed");throw new Error(e)}const e=this._getMessageToSign();return pj(DF.Tj.encode(e))}getSenderPublicKey(){const e=this.getMessageToVerifySignature(),{v:t,r:n,s:r}=this;this._validateHighS();try{return jF(e,t,MF(n),MF(r),this.supports(VF.EIP155ReplayProtection)?this.common.chainId():void 0)}catch(i){const e=this._errorMsg("Invalid Signature");throw new Error(e)}}_processSignature(e,t,n){let r=e;this.supports(VF.EIP155ReplayProtection)&&(r+=this.common.chainId()*BigInt(2)+BigInt(8));const i=Object.assign(Object.assign({},this.txOptions),{common:this.common});return s$.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:r,r:IF(t),s:IF(n)},i)}toJSON(){return{nonce:OF(this.nonce),gasPrice:OF(this.gasPrice),gasLimit:OF(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:OF(this.value),data:mL(this.data),v:void 0!==this.v?OF(this.v):void 0,r:void 0!==this.r?OF(this.r):void 0,s:void 0!==this.s?OF(this.s):void 0}}_validateTxV(e,t){let n;const r=void 0!==e?Number(e):void 0;if(void 0!==r&&r<37&&27!==r&&28!==r)throw new Error(`Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ${r}`);if(void 0!==r&&0!==r&&(!t||t.gteHardfork("spuriousDragon"))&&27!==r&&28!==r)if(t){if(!i$(BigInt(r),t.chainId()))throw new Error(`Incompatible EIP155-based V ${r} and chain id ${t.chainId()}. See the Common parameter of the Transaction constructor to set the chain id.`)}else{let e;e=(r-35)%2===0?35:36,n=BigInt(r-e)/BigInt(2)}return this._getCommon(t,n)}errorStr(){let e=this._getSharedErrorPostfix();return e+=` gasPrice=${this.gasPrice}`,e}_errorMsg(e){return`${e} (${this.errorStr()})`}}const o$=new Map;class a${constructor(){}static typeToInt(e){return Number(IF(SF(e)))}static registerTransactionType(e,t){const n=a$.typeToInt(e);o$.set(n,t)}static fromTxData(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!("type"in e)||void 0===e.type)return s$.fromTxData(e,t);const n=a$.typeToInt(e.type);if(0===n)return s$.fromTxData(e,t);if(1===n)return r$.fromTxData(e,t);if(2===n)return t$.fromTxData(e,t);const r=o$.get(n);if(null===r||void 0===r?void 0:r.fromTxData)return r.fromTxData(e,t);throw new Error(`Tx instantiation with type ${n} not supported`)}static fromSerializedData(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e[0]<=127))return s$.fromSerializedTx(e,t);switch(e[0]){case 1:return r$.fromSerializedTx(e,t);case 2:return t$.fromSerializedTx(e,t);default:{const n=o$.get(Number(e[0]));if(null===n||void 0===n?void 0:n.fromSerializedTx)return n.fromSerializedTx(e,t);throw new Error(`TypedTransaction with ID ${e[0]} unknown`)}}}static fromBlockBodyData(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(cL(e))return this.fromSerializedData(e,t);if(Array.isArray(e))return s$.fromValuesArray(e,t);throw new Error("Cannot decode transaction: unknown type input")}}
9688var c$=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const l$=(e,t)=>{let n;if(!t&&"string"===typeof e&&bj(e)&&66!==e.length)throw new CR;try{n=cL(e)?e:pL(e)}catch(ju){throw new AR}if(!t&&32!==n.byteLength)throw new CR;return n},u$=e=>{const t=bj(e)?e:EL(e),n=gL(t),r=lL(gL(_L(`\x19Ethereum Signed Message:\n${n.byteLength}`)),n);return bD(r)},d$=(e,t)=>{const n=l$(t),r=u$(e),i=hF.sign(r.substring(2),n),s=i.toCompactRawBytes(),o=i.r.toString(16).padStart(64,"0"),a=i.s.toString(16).padStart(64,"0"),c=i.recovery+27;return{message:e,messageHash:r,v:wL(c),r:`0x${o}`,s:`0x${a}`,signature:`${mL(s)}${c.toString(16)}`}},h$=e=>{if(eL(e))throw new cO;const t=a$.fromSerializedData(gL(e));return BL(t.getSenderAddress().toString())},p$=(e,t,n,r,i)=>{if("object"===typeof e){const t=`${e.r}${e.s.slice(2)}${e.v.slice(2)}`;return p$(e.messageHash,t,n)}if("string"===typeof t&&"string"===typeof n&&!eL(r)){const s=`${n}${r.slice(2)}${t.slice(2)}`;return p$(e,s,i)}if(eL(t))throw new SR("signature string undefined");const s=n?e:u$(e);let o=parseInt(t.substring(130),16);o>26&&(o-=27);const a=hF.Signature.fromCompact(t.slice(2,130)).addRecoveryBit(o).recoverPublicKey(s.replace("0x","")).toRawBytes(!1),c=bD(a.subarray(1));return BL(`0x${c.slice(-40)}`)},f$=e=>{const t=l$(e),n=hF.getPublicKey(t,!1),r=bD(n.slice(1)).slice(-40);return BL(`0x${r}`)},m$=(e,t)=>{const n=l$(e);return`0x${mL(hF.getPublicKey(n,t)).slice(4)}`},g$=(e,t,n)=>c$(void 0,void 0,void 0,(function*(){var r,i,s,o,a,c,l;const u=l$(e);let d;if(d=(null===n||void 0===n?void 0:n.salt)?"string"===typeof n.salt?gL(n.salt):n.salt:TD(32),!wj(t)&&!cL(t))throw new NR;const h="string"===typeof t?gL(EL(t)):t;let p;if(null===n||void 0===n?void 0:n.iv){if(p="string"===typeof n.iv?gL(n.iv):n.iv,16!==p.length)throw new RR}else p=TD(16);const f=null!==(r=null===n||void 0===n?void 0:n.kdf)&&void 0!==r?r:"scrypt";let m,g;if("pbkdf2"===f){if(g={dklen:null!==(i=null===n||void 0===n?void 0:n.dklen)&&void 0!==i?i:32,salt:mL(d).replace("0x",""),c:null!==(s=null===n||void 0===n?void 0:n.c)&&void 0!==s?s:262144,prf:"hmac-sha256"},g.c<1e3)throw new OR;m=tU(h,d,g.c,g.dklen,"sha256")}else{if("scrypt"!==f)throw new IR;g={n:null!==(o=null===n||void 0===n?void 0:n.n)&&void 0!==o?o:8192,r:null!==(a=null===n||void 0===n?void 0:n.r)&&void 0!==a?a:8,p:null!==(c=null===n||void 0===n?void 0:n.p)&&void 0!==c?c:1,dklen:null!==(l=null===n||void 0===n?void 0:n.dklen)&&void 0!==l?l:32,salt:mL(d).replace("0x","")},m=oU(h,d,g.n,g.p,g.r,g.dklen)}const y=yield MB(u,m.slice(0,16),p,"aes-128-ctr"),v=mL(y).slice(2),w=bD(lL(m.slice(16,32),y)).replace("0x","");return{version:3,id:BD(),address:f$(u).toLowerCase().replace("0x",""),crypto:{ciphertext:v,cipherparams:{iv:mL(p).replace("0x","")},cipher:"aes-128-ctr",kdf:f,kdfparams:g,mac:w}}})),y$=(e,t)=>{const n=l$(e,t);return{address:f$(n),privateKey:mL(n),signTransaction:e=>{throw new UO("Do not have network access to sign the transaction")},sign:e=>d$("string"===typeof e?e:JSON.stringify(e),n),encrypt:(e,t)=>c$(void 0,void 0,void 0,(function*(){return g$(n,e,t)}))}};var v$=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class w${constructor(e){this._requestManager=e,this._requests=new Map}get requests(){return[...this._requests.values()].map((e=>e.payload))}add(e){const t=ZD(e),n=new eB;return this._requests.set(t.id,{payload:t,promise:n}),n}execute(e){var t;return v$(this,void 0,void 0,(function*(){if(0===this.requests.length)return Promise.resolve([]);const n=new eB({timeout:null!==(t=null===e||void 0===e?void 0:e.timeout)&&void 0!==t?t:1e3,eagerStart:!0,timeoutMessage:"Batch request timeout"});return this._processBatchRequest(n).catch((e=>n.reject(e))),n.catch((e=>{e instanceof ZR&&this._abortAllRequests("Batch request timeout"),n.reject(e)})),n}))}_processBatchRequest(e){var t,n;return v$(this,void 0,void 0,(function*(){const r=yield this._requestManager.sendBatch([...this._requests.values()].map((e=>e.payload)));if(r.length!==this._requests.size)throw this._abortAllRequests("Invalid batch response"),new nM(r,`Batch request size mismatch the results size. Requests: ${this._requests.size}, Responses: ${r.length}`);const i=this.requests.map((e=>e.id)).map(Number).sort(((e,t)=>e-t)),s=r.map((e=>e.id)).map(Number).sort(((e,t)=>e-t));if(JSON.stringify(i)!==JSON.stringify(s))throw this._abortAllRequests("Invalid batch response"),new nM(r,`Batch request mismatch the results. Requests: [${i.join()}], Responses: [${s.join()}]`);for(const e of r)FD(e)?null===(t=this._requests.get(e.id))||void 0===t||t.promise.resolve(e.result):$D(e)&&(null===(n=this._requests.get(e.id))||void 0===n||n.promise.reject(e.error));e.resolve(r)}))}_abortAllRequests(e){for(const{promise:t}of this._requests.values())t.reject(new YR(e))}}
9688var b$=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class x$ extends lB{constructor(e){var t;if(super(),this.providers=kB.providers,tD(e)||"string"===typeof e&&""!==e.trim()||bB(e))return this._requestManager=new kB(e),void(this._subscriptionManager=new AB(this._requestManager,{}));const{config:n,provider:r,requestManager:i,subscriptionManager:s,registeredSubscriptions:o,accountProvider:a,wallet:c,requestManagerMiddleware:l}=e;this.setConfig(null!==n&&void 0!==n?n:{}),this._requestManager=null!==i&&void 0!==i?i:new kB(r,null===(t=null===n||void 0===n?void 0:n.enableExperimentalFeatures)||void 0===t?void 0:t.useSubscriptionWhenCheckingBlockTimeout,l),this._subscriptionManager=s||new AB(this.requestManager,null!==o&&void 0!==o?o:{}),a&&(this._accountProvider=a),c&&(this._wallet=c)}get requestManager(){return this._requestManager}get subscriptionManager(){return this._subscriptionManager}get wallet(){return this._wallet}get accountProvider(){return this._accountProvider}static fromContextObject(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new this(...t.reverse())}getContextObject(){var e;return{config:this.config,provider:this.provider,requestManager:this.requestManager,subscriptionManager:this.subscriptionManager,registeredSubscriptions:null===(e=this.subscriptionManager)||void 0===e?void 0:e.registeredSubscriptions,providers:this.providers,wallet:this.wallet,accountProvider:this.accountProvider}}use(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=new e(...[...n,this.getContextObject()]);return this.on(cB.CONFIG_CHANGE,(e=>{i.setConfig({[e.name]:e.newValue})})),this[e.name]=i,i}link(e){this.setConfig(e.config),this._requestManager=e.requestManager,this.provider=e.provider,this._subscriptionManager=e.subscriptionManager,this._wallet=e.wallet,this._accountProvider=e._accountProvider,e.on(cB.CONFIG_CHANGE,(e=>{this.setConfig({[e.name]:e.newValue})}))}registerPlugin(e){if(void 0!==this[e.pluginNamespace])throw new JR(e.pluginNamespace);const t={[e.pluginNamespace]:e};t[e.pluginNamespace].link(this),Object.assign(this,t)}get provider(){return this.currentProvider}set provider(e){this.requestManager.setProvider(e)}get currentProvider(){return this.requestManager.provider}set currentProvider(e){this.requestManager.setProvider(e)}get givenProvider(){return x$.givenProvider}setProvider(e){return this.provider=e,!0}setRequestManagerMiddleware(e){this.requestManager.setMiddleware(e)}get BatchRequest(){return w$.bind(void 0,this._requestManager)}extend(e){var t,n=this;return e.property&&!this[e.property]&&(this[e.property]={}),null===(t=e.methods)||void 0===t||t.forEach((t=>{const r=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return b$(n,void 0,void 0,(function*(){return this.requestManager.send({method:t.call,params:r})}))};e.property?this[e.property][t.name]=r:this[t.name]=r})),this}}x$.providers=kB.providers;class E${constructor(e){if(this.toAddress=()=>{if(this.isDirect()){const e=this._iban.slice(4),t=E$._parseInt(e,36),n=aD(t,40);return BL(n)}throw new Error("Iban is indirect and cannot be converted. Must be length of 34 or 35")},!E$.isIndirect(e)&&!E$.isDirect(e))throw new Error("Invalid IBAN was provided");this._iban=e}static isDirect(e){return 34===e.length||35===e.length}isDirect(){return E$.isDirect(this._iban)}static isIndirect(e){return 20===e.length}isIndirect(){return E$.isIndirect(this._iban)}static isValid(e){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(e)&&1===E$._mod9710(E$._iso13616Prepare(e))}isValid(){return E$.isValid(this._iban)}static fromBban(e){const t=`0${(98-this._mod9710(this._iso13616Prepare(`XE00${e}`))).toString()}`.slice(-2);return new E$(`XE${t}${e}`)}static createIndirect(e){return E$.fromBban(`ETH${e.institution}${e.identifier}`)}static fromAddress(e){if(!Wj(e))throw new WO(e);const t=BigInt(yL(e)).toString(36),n=aD(t,15);return E$.fromBban(n.toUpperCase())}static toIban(e){return E$.fromAddress(e).toString()}client(){return this.isIndirect()?this._iban.slice(11):""}checksum(){return this._iban.slice(2,4)}institution(){return this.isIndirect()?this._iban.slice(7,11):""}toString(){return this._iban}}E$._iso13616Prepare=e=>{const t="A".charCodeAt(0),n="Z".charCodeAt(0),r=e.toUpperCase();return`${r.slice(4)}${r.slice(0,4)}`.split("").map((e=>{const r=e.charCodeAt(0);return r>=t&&r<=n?r-t+10:e})).join("")},E$._parseInt=(e,t)=>
9688[...e].reduce(((e,n)=>BigInt(parseInt(n,t))+BigInt(t)*e),BigInt(0)),E$._mod9710=e=>{let t,n=e;for(;n.length>2;)t=n.slice(0,9),n=`${(parseInt(t,10)%97).toString()}${n.slice(t.length)}`;return parseInt(n,10)%97},E$.toAddress=e=>new E$(e).toAddress();var _$,k$=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class C$ extends aB{constructor(e){super(),this[_$]="Promise",this._promise=new Promise(e)}then(e,t){return k$(this,void 0,void 0,(function*(){return this._promise.then(e,t)}))}catch(e){return k$(this,void 0,void 0,(function*(){return this._promise.catch(e)}))}finally(e){return k$(this,void 0,void 0,(function*(){return this._promise.finally(e)}))}on(e,t){return super.on(e,t),this}once(e,t){return super.once(e,t),this}}_$=Symbol.toStringTag;n(5589);var A$=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};function S$(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_syncing",params:[]})}))}function I$(e,t){return A$(this,void 0,void 0,(function*(){return aL.validate(["hex"],[t]),e.send({method:"eth_sendRawTransaction",params:[t]})}))}function T$(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["blockNumberOrTag","bool"],[t,n]),e.send({method:"eth_getBlockByNumber",params:[t,n]})}))}var P$=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};var N$=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const R$={type:"object",properties:{accessList:{type:"null"},maxFeePerGas:{type:"null"},maxPriorityFeePerGas:{type:"null"}}},O$={type:"object",properties:{maxFeePerGas:{type:"null"},maxPriorityFeePerGas:{type:"null"}}},M$={type:"object",properties:{gasPrice:{type:"null"}}},j$=(e,t,n)=>{try{aL.validateJSONSchema(e,t)}catch(r){if(r instanceof gj)throw new $O(r.errors,n);throw r}},L$=e=>{var t,n;const r=e;if(!eL(r.type)){let e;switch(r.type){case"0x0":e=R$;break;case"0x1":e=O$;break;case"0x2":e=M$;break;default:return gD({format:"uint"},r.type,QN)}return j$(e,r,r.type),gD({format:"uint"},r.type,QN)}if(!eL(r.maxFeePerGas)||!eL(r.maxPriorityFeePerGas))return j$(M$,r,"0x2"),"0x2";if(!eL(r.accessList))return j$(O$,r,"0x1"),"0x1";const i=null!==(t=r.hardfork)&&void 0!==t?t:null===(n=r.common)||void 0===n?void 0:n.hardfork;if(!eL(i)){const e=Object.keys(XN).indexOf(i);if(e>=Object.keys(XN).indexOf("london"))return eL(r.gasPrice)?"0x2":"0x0";if(e===Object.keys(XN).indexOf("berlin"))return"0x0"}return eL(r.gasPrice)?void 0:(j$(R$,r,"0x0"),"0x0")},D$=(e,t)=>
9688{var n;return(null!==(n=null===t||void 0===t?void 0:t.transactionTypeParser)&&void 0!==n?n:L$)(e)},B$={type:"array",items:Object.assign({},{type:"object",properties:{address:{format:"address"},storageKeys:{type:"array",items:{format:"bytes32"}}}})},U$={type:"object",properties:{accessList:Object.assign({},B$),gasUsed:{type:"string"}}},F$={type:"string",enum:["goerli","kovan","mainnet","rinkeby","ropsten","sepolia"]},$$={type:"string",enum:["arrowGlacier","berlin","byzantium","chainstart","constantinople","dao","homestead","istanbul","london","merge","muirGlacier","petersburg","shanghai","spuriousDragon","tangerineWhistle"]},z$={type:"object",properties:{from:{format:"address"},to:{oneOf:[{format:"address"},{type:"null"}]},value:{format:"uint"},gas:{format:"uint"},gasPrice:{format:"uint"},effectiveGasPrice:{format:"uint"},type:{format:"uint"},maxFeePerGas:{format:"uint"},maxPriorityFeePerGas:{format:"uint"},accessList:Object.assign({},B$),data:{format:"bytes"},input:{format:"bytes"},nonce:{format:"uint"},chain:Object.assign({},F$),hardfork:Object.assign({},$$),chainId:{format:"uint"},networkId:{format:"uint"},common:{type:"object",properties:{customChain:Object.assign({},{type:"object",properties:{name:{format:"string"},networkId:{format:"uint"},chainId:{format:"uint"}}}),baseChain:Object.assign({},F$),hardfork:Object.assign({},$$)}},gasLimit:{format:"uint"},v:{format:"uint"},r:{format:"bytes32"},s:{format:"bytes32"}}},H$={type:"object",properties:Object.assign(Object.assign({},z$.properties),{blockHash:{format:"bytes32"},blockNumber:{format:"uint"},hash:{format:"bytes32"},transactionIndex:{format:"uint"},from:{format:"address"},to:{oneOf:[{format:"address"},{type:"null"}]},value:{format:"uint"},gas:{format:"uint"},gasPrice:{format:"uint"},effectiveGasPrice:{format:"uint"},type:{format:"uint"},maxFeePerGas:{format:"uint"},maxPriorityFeePerGas:{format:"uint"},accessList:Object.assign({},B$),data:{format:"bytes"},input:{format:"bytes"},nonce:{format:"uint"},gasLimit:{format:"uint"},v:{format:"uint"},r:{format:"bytes32"},s:{format:"bytes32"}})},W$={type:"object",properties:{index:{format:"uint"},validatorIndex:{format:"uint"},address:{format:"address"},amount:{format:"uint"}}},q$={type:"object",properties:{baseFeePerGas:{format:"uint"},blobGasUsed:{format:"uint"},difficulty:{format:"uint"},excessBlobGas:{format:"uint"},extraData:{format:"bytes"},gasLimit:{format:"uint"},gasUsed:{format:"uint"},hash:{format:"bytes32"},logsBloom:{format:"bytes256"},miner:{format:"bytes"},mixHash:{format:"bytes32"},nonce:{format:"uint"},number:{format:"uint"},parentBeaconBlockRoot:{format:"bytes32"},parentHash:{format:"bytes32"},receiptsRoot:{format:"bytes32"},sha3Uncles:{format:"bytes32"},size:{format:"uint"},stateRoot:{format:"bytes32"},timestamp:{format:"uint"},totalDifficulty:{format:"uint"},transactions:{oneOf:[{type:"array",items:Object.assign({},H$)},{type:"array",items:{format:"bytes32"}}]},transactionsRoot:{format:"bytes32"},uncles:{type:"array",items:{format:"bytes32"}},withdrawals:{type:"array",items:Object.assign({},W$)},withdrawalsRoot:{format:"bytes32"}}},V$={type:"object",properties:{author:{format:"bytes32"},excessDataGas:{format:"uint"},baseFeePerGas:{format:"uint"},blobGasUsed:{format:"uint"},difficulty:{format:"uint"},excessBlobGas:{format:"uint"},extraData:{format:"bytes"},gasLimit:{format:"uint"},gasUsed:{format:"uint"},hash:{format:"bytes32"},logsBloom:{format:"bytes256"},miner:{format:"bytes"},mixHash:{format:"bytes32"},nonce:{format:"uint"},number:{format:"uint"},parentBeaconBlockRoot:{format:"bytes32"},parentHash:{format:"bytes32"},receiptsRoot:{format:"bytes32"},sha3Uncles:{format:"bytes32"},size:{format:"uint"},stateRoot:{format:"bytes32"},timestamp:{format:"uint"},totalDifficulty:{format:"uint"},transactions:{type:"array",items:{format:"bytes32"}},transactionsRoot:{format:"bytes32"},uncles:{type:"array",items:{format:"bytes32"}},withdrawals:{type:"array",items:Object.assign({},W$)},withdrawalsRoot:{format:"bytes32"}}},G$={type:"object",properties:{removed:{format:"bool"},logIndex:{format:"uint"},transactionIndex:{format:"uint"},transactionHash:{format:"bytes32"},blockHash:{format:"bytes32"},blockNumber:{format:"uint"},address:{format:"address"},data:{format:"bytes"},topics:{type:"array",items:{format:"bytes32"}}}},K$={type:"object",properties:{startingBlock:{format:"string"},currentBlock:{format:"string"},highestBlock:{format:"string"},knownStates:{format:"string"},pulledStates:{format:"string"}}},Z$={type:"object",properties:{transactionHash:{format:"bytes32"},transactionIndex:{format:"uint"},blockHash:{format:"bytes32"},blockNumber:{format:"uint"},from:{format:"address"},to:{format:"address"},cumulativeGasUsed:{format:"uint"},gasUsed:{format:"uint"},effectiveGasPrice:{format:"uint"},contractAddress:{format:"address"},logs:{type:"array",items:Object.assign({},G$)},logsBloom:{format:"bytes"},root:{format:"bytes"},status:{format:"uint"},type:{format:"uint"}}},Y$={type:"object",properties:{messageHash:{format:"bytes"},r:{format:"bytes32"},s:{format:"bytes32"},v:{format:"bytes"},message:{format:"bytes"},signature:{format:"bytes"}}}
9688,Q$={type:"object",properties:{oldestBlock:{format:"uint"},baseFeePerGas:{type:"array",items:{format:"uint"}},reward:{type:"array",items:{type:"array",items:{format:"uint"}}},gasUsedRatio:{type:"array",items:{type:"number"}}}},J$={type:"object",properties:{balance:{format:"uint"},codeHash:{format:"bytes32"},nonce:{format:"uint"},storageHash:{format:"bytes32"},accountProof:{type:"array",items:{format:"bytes32"}},storageProof:{type:"array",items:Object.assign({},{type:"object",properties:{key:{format:"bytes32"},value:{format:"uint"},proof:{type:"array",items:{format:"bytes32"}}}})}}};function X$(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:YN,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{transactionSchema:H$,fillInputAndData:!1};var r,i;let s=rD({},e);if(eL(null===e||void 0===e?void 0:e.common)||(s.common=Object.assign({},e.common),eL(null===(r=e.common)||void 0===r?void 0:r.customChain)||(s.common.customChain=Object.assign({},e.common.customChain))),s=gD(null!==(i=n.transactionSchema)&&void 0!==i?i:H$,s,t),!eL(s.data)&&!eL(s.input)&&OL(s.data)!==OL(s.input))throw new RO({data:mL(s.data),input:mL(s.input)});return n.fillInputAndData&&(eL(s.data)?eL(s.input)||(s.data=s.input):s.input=s.data),eL(s.gasLimit)||(s.gas=s.gasLimit,delete s.gasLimit),s}var ez=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};function tz(e,t){return ez(this,void 0,void 0,(function*(){const n=yield function(e){return P$(this,void 0,void 0,(function*(){return e.send({method:"net_version",params:[]})}))}(e.requestManager);return gD({format:"uint"},n,t)}))}function nz(e,t){return ez(this,void 0,void 0,(function*(){const n=yield function(e){return P$(this,void 0,void 0,(function*(){return e.send({method:"net_peerCount",params:[]})}))}(e.requestManager);return gD({format:"uint"},n,t)}))}const rz=e=>ez(void 0,void 0,void 0,(function*(){return function(e){return P$(this,void 0,void 0,(function*(){return e.send({method:"net_listening",params:[]})}))}(e.requestManager)}));var iz=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class sz extends x${getId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultReturnFormat;return iz(this,void 0,void 0,(function*(){return tz(this,e)}))}getPeerCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultReturnFormat;return iz(this,void 0,void 0,(function*(){return nz(this,e)}))}isListening(){return iz(this,void 0,void 0,(function*(){return rz(this)}))}}const oz="ALLEVENTS",az={name:oz,signature:"",type:"event",inputs:[]},cz={bytes:GN.HEX,number:VN.NUMBER};var lz=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};function uz(e,t,n){return lz(this,void 0,void 0,(function*(){const r=pz(e,t);if(!eL(r)){if(r.startsWith("-"))throw new NO(r);if(Number(r)<0||Number(r)>127)throw new NO(r);if(eL(e.gasPrice)&&("0x0"===r||"0x1"===r))return{gasPrice:yield qH(t,n),maxPriorityFeePerGas:void 0,maxFeePerGas:void 0};if("0x2"===r)return Object.assign({gasPrice:void 0},yield function(e,t,n){var r,i,s,o;return lz(this,void 0,void 0,(function*(){const a=yield QH(t,t.defaultBlock,!1,QN);if(eL(a.baseFeePerGas))throw new PO;let c;if(eL(e.gasPrice)&&BigInt(a.baseFeePerGas)===BigInt(0)&&(c=yield qH(t,n)),!eL(e.gasPrice)||!eL(c)){const t=gD({format:"uint"},null!==(r=e.gasPrice)&&void 0!==r?r:c,n);return{maxPriorityFeePerGas:t,maxFeePerGas:t}}return{maxPriorityFeePerGas:gD({format:"uint"},null!==(i=e.maxPriorityFeePerGas)&&void 0!==i?i:t.defaultMaxPriorityFeePerGas,n),maxFeePerGas:gD({format:"uint"},null!==(s=e.maxFeePerGas)&&void 0!==s?s:BigInt(a.baseFeePerGas)*BigInt(2)+BigInt(null!==(o=e.maxPriorityFeePerGas)&&void 0!==o?o:t.defaultMaxPriorityFeePerGas),n)}}))}
9688(e,t,n))}}))}var dz=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const hz=(e,t,n,r)=>{if(void 0!==n&&e in n&&void 0!==n[e]){if("string"===typeof n[e]&&Wj(n[e]))return n[e];if(!bj(n[e])&&Kj(n[e])){if(t.wallet){const r=t.wallet.get(gD({format:"uint"},n[e],cz));if(!eL(r))return r.address;throw new FO}throw new FO}throw"from"===e?new uO(n.from):new dO(n.to)}if("from"===e){if(!eL(r))return f$(r);if(!eL(t.defaultAccount))return t.defaultAccount}},pz=(e,t)=>{const n=D$(e,t);return eL(n)?eL(t.defaultTransactionType)?void 0:gD({format:"uint"},t.defaultTransactionType,QN):n};function fz(e){var t,n;return dz(this,void 0,void 0,(function*(){let r=gD(z$,e.transaction,e.web3Context.defaultReturnFormat);if(eL(r.from)&&(r.from=hz("from",e.web3Context,void 0,e.privateKey)),eL(r.nonce)&&(r.nonce=yield function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultReturnFormat;return dz(void 0,void 0,void 0,(function*(){if(eL(t))throw new TO;return sW(e,t,e.defaultBlock,n)}))}(e.web3Context,r.from,QN)),eL(r.value)&&(r.value="0x0"),eL(r.data))eL(r.input)?r.input="0x":r.input.startsWith("0x")||(r.input=`0x${r.input}`);else{if(!eL(r.input)&&r.data!==r.input)throw new RO({data:mL(r.data),input:mL(r.input)});r.data.startsWith("0x")||(r.data=`0x${r.data}`)}if(eL(r.common)){if(e.web3Context.defaultCommon){const t=e.web3Context.defaultCommon,n=t.customChain.chainId,i=t.customChain.networkId,s=t.customChain.name;r.common=Object.assign(Object.assign({},t),{customChain:{chainId:n,networkId:i,name:s}})}eL(r.chain)&&(r.chain=e.web3Context.defaultChain),eL(r.hardfork)&&(r.hardfork=e.web3Context.defaultHardfork)}if(eL(r.chainId)&&eL(null===(t=r.common)||void 0===t?void 0:t.customChain.chainId)&&(r.chainId=yield hW(e.web3Context,QN)),eL(r.networkId)&&(r.networkId=null!==(n=e.web3Context.defaultNetworkId)&&void 0!==n?n:yield tz(e.web3Context,QN)),eL(r.gasLimit)&&!eL(r.gas)&&(r.gasLimit=r.gas),r.type=pz(r,e.web3Context),!eL(r.accessList)||"0x1"!==r.type&&"0x2"!==r.type||(r.accessList=[]),e.fillGasPrice&&(r=Object.assign(Object.assign({},r),yield uz(r,e.web3Context,QN))),eL(r.gas)&&eL(r.gasLimit)&&e.fillGasLimit){const t=yield uW(e.web3Context,r,"latest",QN);r=Object.assign(Object.assign({},r),{gas:gD({format:"uint"},t,QN)})}return r}))}var mz=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};function gz(e,t,n){const r=e.transactionPollingInterval,[i,s]=DD((()=>mz(this,void 0,void 0,(function*(){let r;try{r=yield GH(e,cz)}catch(s){return void console.warn("An error happen while trying to get the block number",s)}const i=r-t;if(i>=e.transactionBlockTimeout)return new LO({starterBlockNumber:t,numberOfBlocks:i,transactionHash:n})}))),r);return[s,{clean:()=>{clearInterval(i)}}]}function yz(e,t){var n,r;return mz(this,void 0,void 0,(function*(){const{provider:i}=e.requestManager;let s;const o=yield GH(e,cz);return s=(null===(r=(n=i).supportsSubscriptions)||void 0===r?void 0:r.call(n))&&e.enableExperimentalFeatures.useSubscriptionWhenCheckingBlockTimeout?yield function(e,t,n){var r;return mz(this,void 0,void 0,(function*(){let i,s,o=!0;function a(r,i){i&&console.warn("error happened at subscription. So revert to polling...",i),s.clean(),o=!1;const[a,c]=gz(e,t,n);s.clean=c.clean,a.catch((e=>r(e)))}try{i=yield null===(r=e.subscriptionManager)||void 0===r?void 0:r.subscribe("newHeads"),s={clean:()=>{var t;i.id&&(null===(t=e.subscriptionManager)||void 0===t||t.removeSubscription(i).then((()=>{})).catch((()=>{})))}}}catch(c){return gz(e,t,n)}return[new Promise(((r,s)=>{try{i.on("data",(r=>{if(o=!1,!(null===r||void 0===r?void 0:r.number))return;const i=Number(BigInt(r.number)-BigInt(t));i>=e.transactionBlockTimeout&&s(new LO({starterBlockNumber:t,numberOfBlocks:i,transactionHash:n}))})),i.on("error",(e=>{a(s,e)}))}catch(c){a(s,c)}setTimeout((()=>{o&&a(s)}),1e3*e.blockHeaderTimeout)})),s]}))}(e,o,t):gz(e,o,t),s}))}
9688var vz=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};function wz(e,t,n){return vz(this,void 0,void 0,(function*(){const[r,i]=LD(e.transactionSendTimeout,new OO({numberOfSeconds:e.transactionSendTimeout/1e3,transactionHash:n})),[s,o]=yield yz(e,n);try{return yield Promise.race([t(),i,s])}finally{clearTimeout(r),o.clean()}}))}var bz=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};function xz(e,t,n,r){var i;return bz(this,void 0,void 0,(function*(){const s=null!==(i=e.transactionReceiptPollingInterval)&&void 0!==i?i:e.transactionPollingInterval,[o,a]=MD((()=>bz(this,void 0,void 0,(function*(){try{return(null!==r&&void 0!==r?r:iW)(e,t,n)}catch(i){return void console.warn("An error happen while trying to get the transaction receipt",i)}}))),s),[c,l]=LD(e.transactionPollingTimeout,new jO({numberOfSeconds:e.transactionPollingTimeout/1e3,transactionHash:t})),[u,d]=yield yz(e,t);try{return yield Promise.race([o,l,u])}finally{c&&clearTimeout(c),a&&clearInterval(a),d.clean()}}))}var Ez=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const _z=e=>{let{web3Context:t,transactionReceipt:n,transactionPromiEvent:r,customTransactionReceiptSchema:i,returnFormat:s}=e;var o;let a=1;const c=setInterval((()=>{Ez(void 0,void 0,void 0,(function*(){if(a>=t.transactionConfirmationBlocks)return void clearInterval(c);const e=yield T$(t.requestManager,wL(BigInt(n.blockNumber)+BigInt(a)),!1);(null===e||void 0===e?void 0:e.hash)&&(a+=1,r.emit("confirmation",{confirmations:gD({format:"uint"},a,s),receipt:gD(null!==i&&void 0!==i?i:Z$,n,s),latestBlockHash:gD({format:"bytes32"},e.hash,s)}))}))}),null!==(o=t.transactionReceiptPollingInterval)&&void 0!==o?o:t.transactionPollingInterval)};var kz=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};function Cz(e,t,n,r,i,s){if(eL(n)||eL(n.blockHash))throw new DO({receipt:n,blockHash:gD({format:"bytes32"},null===n||void 0===n?void 0:n.blockHash,i),transactionHash:gD({format:"bytes32"},r,i)});if(!n.blockNumber)throw new BO({receipt:n});t.emit("confirmation",{confirmations:gD({format:"uint"},1,i),receipt:gD(null!==s&&void 0!==s?s:Z$,n,i),latestBlockHash:gD({format:"bytes32"},n.blockHash,i)});const o=e.requestManager.provider;o&&"supportsSubscriptions"in o&&o.supportsSubscriptions()?(e=>{let t,{web3Context:n,transactionReceipt:r,transactionPromiEvent:i,customTransactionReceiptSchema:s,returnFormat:o}=e,a=!0;setImmediate((()=>{var e;null===(e=n.subscriptionManager)||void 0===e||e.subscribe("newHeads").then((e=>{e.on("data",(c=>kz(void 0,void 0,void 0,(function*(){var l;if(a=!1,!(null===c||void 0===c?void 0:c.number)||t===(null===c||void 0===c?void 0:c.parentHash))return;t=null===c||void 0===c?void 0:c.parentHash;const u=BigInt(c.number)-BigInt(r.blockNumber)+BigInt(1);i.emit("confirmation",{confirmations:gD({format:"uint"},u,o),receipt:gD(null!==s&&void 0!==s?s:Z$,r,o),latestBlockHash:gD({format:"bytes32"},c.parentHash,o)}),u>=n.transactionConfirmationBlocks&&(yield null===(l=n.subscriptionManager)||void 0===l?void 0:l.removeSubscription(e))})))),e.on("error",(()=>kz(void 0,void 0,void 0,(function*(){var t;yield null===(t=n.subscriptionManager)||void 0===t?void 0:t.removeSubscription(e),a=!1,_z({web3Context:n,transactionReceipt:r,transactionPromiEvent:i,customTransactionReceiptSchema:s,returnFormat:o})}))))}
9688)).catch((()=>{a=!1,_z({web3Context:n,transactionReceipt:r,customTransactionReceiptSchema:s,transactionPromiEvent:i,returnFormat:o})}))})),setTimeout((()=>{a&&_z({web3Context:n,transactionReceipt:r,transactionPromiEvent:i,returnFormat:o})}),1e3*n.blockHeaderTimeout)})({web3Context:e,transactionReceipt:n,transactionPromiEvent:t,customTransactionReceiptSchema:s,returnFormat:i}):_z({web3Context:e,transactionReceipt:n,transactionPromiEvent:t,customTransactionReceiptSchema:s,returnFormat:i})}const Az=e=>!tD(e)&&"object"===typeof e&&!tD(e.type)&&"error"===e.type,Sz=e=>!tD(e)&&"object"===typeof e&&!tD(e.type)&&"event"===e.type,Iz=e=>!tD(e)&&"object"===typeof e&&!tD(e.type)&&"function"===e.type,Tz=e=>"object"===typeof e&&"undefined"===typeof e.components&&"undefined"===typeof e.name,Pz=e=>e.includes("[]")?{type:"tuple[]",name:e.slice(0,-2)}:{type:"tuple",name:e},Nz=e=>{const t=[];for(const n of Object.keys(e)){const r=e[n];"object"===typeof r?t.push(Object.assign(Object.assign({},Pz(n)),{components:Nz(r)})):t.push({name:n,type:e[n]})}return t},Rz=(e,t)=>{const n=[];return t.forEach((t=>{if("object"===typeof t.components){if(!t.type.startsWith("tuple"))throw new QR(`Invalid value given "${t.type}". Error: components found but type is not tuple.`);const r=t.type.indexOf("["),i=r>=0?t.type.substring(r):"",s=Rz(e,t.components);Array.isArray(s)&&e?n.push(`tuple(${s.join(",")})${i}`):e?n.push(`(${s.join()})`):n.push(`(${s.join(",")})${i}`)}else n.push(t.type)})),n},Oz=e=>{var t,n,r,i;return Az(e)||Sz(e)||Iz(e)?(null===(t=e.name)||void 0===t?void 0:t.includes("("))?e.name:`${null!==(n=e.name)&&void 0!==n?n:""}(${Rz(!1,null!==(r=e.inputs)&&void 0!==r?r:[]).join(",")})`:`(${Rz(!1,null!==(i=e.inputs)&&void 0!==i?i:[]).join(",")})`},Mz=e=>{if("string"!==typeof e&&!Sz(e))throw new QR("Invalid parameter value in encodeEventSignature");let t;return t=!e||"function"!==typeof e&&"object"!==typeof e?e:Oz(e),bD(t)};function jz(e,t){const n=e.exec(t);return n?.groups}var Lz=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Dz=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Bz=/^\(.+?\).*?$/,Uz=Object.defineProperty,Fz=(e,t,n)=>(((e,t,n)=>{t in e?Uz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!==typeof t?t+"":t,n),n),$z=class extends Error{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.cause instanceof $z?t.cause.details:t.cause?.message?t.cause.message:t.details,r=t.cause instanceof $z&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...r?[`Docs: https://abitype.dev${r}`]:[],...n?[`Details: ${n}`]:[],"Version: [email protected]"].join("\n")),Fz(this,"details"),Fz(this,"docsPath"),Fz(this,"metaMessages"),Fz(this,"shortMessage"),Fz(this,"name","AbiTypeError"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=r,this.metaMessages=t.metaMessages,this.shortMessage=e}};var zz=/^struct (?<name>[a-zA-Z0-9_]+) \{(?<properties>.*?)\}$/;function Hz(e){return zz.test(e)}function Wz(e){return jz(zz,e)}var qz=new Set(["memory","indexed","storage","calldata"]),Vz=new Set(["calldata","memory","storage"]);var Gz=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);var Kz=/^(?<type>[a-zA-Z0-9_]+?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z0-9_]+))?$/,Zz=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z0-9_]+))?$/,Yz=/^u?int$/;function Qz(e,t){const n=function(e,t){return t?`${t}:${e}`:e}(e,t?.type);if(Gz.has(n))return Gz.get(n);const r=Bz.test(e),i=jz(r?Zz:Kz,e);if(!i)throw new $z("Invalid ABI parameter.",{details:e});if(i.name&&function(e){return"address"===e||"bool"===e||"function"===e||"string"===e||"tuple"===e||Lz.test(e)||Dz.test(e)||eH.test(e)}(i.name))throw new $z("Invalid ABI parameter.",{details:e,metaMessages:[`"${i.name}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]});const s=i.name?{name:i.name}:{},o="indexed"===i.modifier?{indexed:!0}:{},a=t?.structs??{};let c,l={};if(r){c="tuple";const e=Jz(i.type),t=[],n=e.length;for(let r=0;r<n;r++)t.push(Qz(e[r],{structs:a}));l={components:t}}else if(i.type in a)c="tuple",l={components:a[i.type]};else if(Yz.test(i.type))c=`${i.type}256`;else if(c=i.type,"struct"!==t?.type&&!Xz(c))throw new $z("Unknown type.",{metaMessages:[`Type "${c}" is not a valid ABI type.`]});if(i.modifier){if(!t?.modifiers?.has?.(i.modifier))throw new $z("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${i.modifier}" not allowed${t?.type?` in "${t.type}" type`:""}.`]});if(Vz.has(i.modifier)&&!function(e,t){return t||"bytes"===e||"string"===e||"tuple"===e}(c,!!i.array))throw new $z("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${i.modifier}" not allowed${t?.type?` in "${t.type}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${i.modifier}" was given.`]})}const u={type:`${c}${i.array??""}`,...s,...o,...l};return Gz.set(n,u),u}function Jz(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;
9688if(""===e){if(""===n)return t;if(0!==r)throw new $z("Unbalanced parentheses.",{metaMessages:[`"${n.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`});return[...t,n.trim()]}const i=e.length;for(let s=0;s<i;s++){const i=e[s],o=e.slice(s+1);switch(i){case",":return 0===r?Jz(o,[...t,n.trim()]):Jz(o,t,`${n}${i}`,r);case"(":return Jz(o,t,`${n}${i}`,r+1);case")":return Jz(o,t,`${n}${i}`,r-1);default:return Jz(o,t,`${n}${i}`,r)}}return[]}function Xz(e){return"address"===e||"bool"===e||"function"===e||"string"===e||Lz.test(e)||Dz.test(e)}var eH=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function tH(e){const t={},n=e.length;for(let o=0;o<n;o++){const n=e[o];if(!Hz(n))continue;const r=Wz(n);if(!r)throw new $z("Invalid struct signature.",{details:n});const i=r.properties.split(";"),s=[],a=i.length;for(let e=0;e<a;e++){const t=i[e].trim();if(!t)continue;const n=Qz(t,{type:"struct"});s.push(n)}if(!s.length)throw new $z("Invalid struct signature.",{details:n,metaMessages:["No properties exist."]});t[r.name]=s}const r={},i=Object.entries(t),s=i.length;for(let o=0;o<s;o++){const[e,n]=i[o];r[e]=rH(n,t)}return r}var nH=/^(?<type>[a-zA-Z0-9_]+?)(?<array>(?:\[\d*?\])+?)?$/;function rH(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const r=[],i=e.length;for(let s=0;s<i;s++){const i=e[s];if(Bz.test(i.type))r.push(i);else{const e=jz(nH,i.type);if(!e?.type)throw new $z("Invalid ABI parameter.",{details:JSON.stringify(i,null,2),metaMessages:["ABI parameter type is invalid."]});const{array:s,type:o}=e;if(o in t){if(n.has(o))throw new $z("Circular reference detected.",{metaMessages:[`Struct "${o}" is a circular reference.`]});r.push({...i,type:`tuple${s??""}`,components:rH(t[o]??[],t,new Set([...n,o]))})}else{if(!Xz(o))throw new $z("Unknown type.",{metaMessages:[`Type "${o}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]});r.push(i)}}}return r}const iH=32;function sH(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;var t;if(void 0!==(null===(t=globalThis.Buffer)||void 0===t?void 0:t.alloc)){const t=globalThis.Buffer.alloc(e);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}return new Uint8Array(e)}function oH(e){var t,n;return Object.assign(Object.assign({},e),{name:null!==(t=e.name)&&void 0!==t?t:"",components:null===(n=e.components)||void 0===n?void 0:n.map((e=>oH(e)))})}function aH(e){return e.map((e=>{var t,n;if(!tD(n=e)&&"object"===typeof n&&!tD(n.type)&&"string"===typeof n.type)return e;if("string"===typeof e)return oH(function(e){let t;if("string"===typeof e)t=Qz(e,{modifiers:qz});else{const n=tH(e),r=e.length;for(let i=0;i<r;i++){const r=e[i];if(!Hz(r)){t=Qz(r,{modifiers:qz,structs:n});break}}}if(!t)throw new $z("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameter-1"});return t}(e.replace(/tuple/,"")));if(Tz(e)){const n=Object.keys(e)[0],r=Pz(n);return r.name=null!==(t=r.name)&&void 0!==t?t:"",Object.assign(Object.assign({},r),{components:Nz(e[n])})}throw new QR("Invalid abi")}))}function cH(e){const t=e.type.lastIndexOf("["),n=e.type.substring(0,t),r=e.type.substring(t);let i=-1;if("[]"!==r&&(i=Number(r.slice(1,-1)),isNaN(i)))throw new QR("Invalid fixed array size",{size:r});return{param:{type:n,name:"",components:e.components},size:i}}function lH(e){var t,n;return!("string"!==e.type&&"bytes"!==e.type&&!e.type.endsWith("[]"))||("tuple"===e.type?null!==(n=null===(t=e.components)||void 0===t?void 0:t.some(lH))&&void 0!==n&&n:!!e.type.endsWith("]")&&lH(cH(e).param))}const uH=new Map;let dH=BigInt(256);for(let n=8;n<=256;n+=8)uH.set(`uint${n}`,{min:BigInt(0),max:dH-BigInt(1)}),uH.set(`int${n}`,{min:-dH/BigInt(2),max:dH/BigInt(2)-BigInt(1)}),dH*=BigInt(256);uH.set("int",uH.get("int256")),uH.set("uint",uH.get("uint256"));const hH=BigInt(1)<<BigInt(256);function pH(e){let t,n=arguments.length>
96881&&void 0!==arguments[1]?arguments[1]:iH;return t=e<0?(hH+e).toString(16):e.toString(16),t=iD(t,2*n),Uj(t)}function fH(e,t){let n;try{n=jL(t)}catch(i){throw new QR("provided input is not number value",{type:e.type,value:t,name:e.name})}const r=uH.get(e.type);if(!r)throw new QR("provided abi contains invalid number datatype",{type:e.type});if(n<r.min)throw new QR("provided input is less then minimum for given type",{type:e.type,value:t,name:e.name,minimum:r.min.toString()});if(n>r.max)throw new QR("provided input is greater then maximum for given type",{type:e.type,value:t,name:e.name,maximum:r.max.toString()});return{dynamic:!1,encoded:pH(n)}}function mH(e,t){if(t.length<iH)throw new QR("Not enough bytes left to decode",{param:e,bytesLeft:t.length});const n=t.subarray(0,iH),r=uH.get(e.type);if(!r)throw new QR("provided abi contains invalid number datatype",{type:e.type});const i=function(e,t){const n=Lj(e),r=BigInt(n);return r<=t?r:r-hH}(n,r.max);if(i<r.min)throw new QR("decoded value is less then minimum for given type",{type:e.type,value:i,name:e.name,minimum:r.min.toString()});if(i>r.max)throw new QR("decoded value is greater then maximum for given type",{type:e.type,value:i,name:e.name,maximum:r.max.toString()});return{result:i,encoded:t.subarray(iH),consumed:iH}}function gH(e,t){if("string"===typeof t&&t.length%2!==0&&(t+="0"),!zj(t))throw new QR("provided input is not valid bytes value",{type:e.type,value:t,name:e.name});const n=pL(t),[,r]=e.type.split("bytes");if(r){if(Number(r)>32||Number(r)<1)throw new QR("invalid bytes type. Static byte type can have between 1 and 32 bytes",{type:e.type});if(Number(r)<n.length)throw new QR("provided input size is different than type size",{type:e.type,value:t,name:e.name});const i=sH(iH);return i.set(n),{dynamic:!1,encoded:i}}const i=Math.ceil(n.length/iH),s=sH(iH+i*iH);return s.set(fH({type:"uint32",name:""},n.length).encoded),s.set(n,iH),{dynamic:!0,encoded:s}}function yH(e,t){const[,n]=e.type.split("bytes");let r=Number(n),i=t,s=1,o=0;if(!r){const e=mH({type:"uint32",name:""},i);r=Number(e.result),o+=e.consumed,i=e.encoded,s=Math.ceil(r/iH)}if(r>t.length)throw new QR("there is not enough data to decode",{type:e.type,encoded:t,size:r});return{result:mL(i.subarray(0,r)),encoded:i.subarray(s*iH),consumed:o+s*iH}}function vH(e){let t=0,n=0;const r=[],i=[];for(const s of e)s.dynamic?t+=iH:t+=s.encoded.length;for(const s of e)s.dynamic?(r.push(fH({type:"uint256",name:""},t+n)),i.push(s),n+=s.encoded.length):r.push(s);return lL(...r.map((e=>e.encoded)),...i.map((e=>e.encoded)))}function wH(e,t){if("string"===e.type)return function(e,t){if("string"!==typeof t)throw new QR("invalid input, should be string",{input:t});return gH({type:"bytes",name:""},SL(t))}(0,t);if("bool"===e.type)return function(e,t){let n;try{n=UL(t)}catch(r){if(r instanceof YO)throw new QR("provided input is not valid boolean value",{type:e.type,value:t,name:e.name})}return fH({type:"uint8",name:""},Number(n))}(e,t);if("address"===e.type)return function(e,t){if("string"!==typeof t)throw new QR("address type expects string as input type",{value:t,name:e.name,type:e.type});let n=t.toLowerCase();if(n.startsWith("0x")||(n=`0x${n}`),!Wj(n))throw new QR("provided input is not valid address",{value:t,name:e.name,type:e.type});const r=Uj(n),i=sH(iH);return i.set(r,12),{dynamic:!1,encoded:i}}(e,t);if("tuple"===e.type)return xH(e,t);if(e.type.endsWith("]"))return function(e,t){if(!Array.isArray(t))throw new QR("Expected value to be array",{abi:e,values:t});const{size:n,param:r}=cH(e),i=t.map((e=>wH(r,e))),s=-1===n,o=i.length>0&&i[0].dynamic;if(!s&&t.length!==n)throw new QR("Given arguments count doesn't match array length",{arrayLength:n,argumentsLength:t.length});if(s||o){const e=vH(i);if(s){const t=fH({type:"uint256",name:""},i.length).encoded;return{dynamic:!0,encoded:i.length>0?lL(t,e):t}}return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:lL(...i.map((e=>e.encoded)))}}(e,t);if(e.type.startsWith("bytes"))return gH(e,t);if(e.type.startsWith("uint")||e.type.startsWith("int"))return fH(e,t);throw new QR("Unsupported",{param:e,value:t})}function bH(e,t){if("string"===e.type)return function(e,t){const n=yH({type:"bytes",name:""},t);return{result:CL(n.result),encoded:n.encoded,consumed:n.consumed}}(0,t);if("bool"===e.type)return function(e,t){const n=mH({type:"uint8",name:""},t);if(n.result>1||n.result<0)throw new QR("Invalid boolean value encoded",{boolBytes:t.subarray(0,iH),numberResult:n});return{result:n.result===BigInt(1),encoded:n.encoded,consumed:iH}}(0,t);if("address"===e.type)return function(e,t){const n=t.subarray(12,iH);if(20!==n.length)throw new QR("Invalid decoding input, not enough bytes to decode address",{bytes:t});const r=Lj(n);return{result:BL(r),encoded:t.subarray(iH),consumed:iH}}(0,t);if("tuple"===e.type)return EH(e,t);if(e.type.endsWith("]"))return function(e,t){let{size:n,param:r}=cH(e),i=0;const s=[];let o=t;if(-1===n){const e=mH({type:"uint32",name:""},t);n=Number(e.result),i=e.consumed,o=e.encoded}if(lH(r)){for(let e=0;e<n;e+=1){const t=mH({type:"uint32",name:""},o.subarray(e*iH));i+=t.consumed;const n=bH(r,o.subarray(Number(t.result)));i+=n.consumed,s.push(n.result)}return{result:s,encoded:o.subarray(i),consumed:i}}for(let a=0;a<n;a+=1){const e=bH(r,t.subarray(i));i+=e.consumed,s.push(e.result)}return{result:s,encoded:t.subarray(i),consumed:i}}(e,t);if(e.type.startsWith("bytes"))return yH(e,t);if(e.type.startsWith("uint")||e.type.startsWith("int"))return mH(e,t);throw new QR("Unsupported",{param:e,bytes:t})}function xH(e,t){var n,r,i;let s=!1;if(!Array.isArray(t)&&"object"!==typeof t)throw new QR("param must be either Array or Object",{param:e,input:t});const o=t,a=[];for(let c=0;c<(null!==(r=null===(n=e.components)||void 0===n?void 0:n.length)&&void 0!==r?r:0);c+=1){const n=e.components[c];let r;if(Array.isArray(o)){if(c>=o.length)throw new QR("input param length missmatch",{param:e,input:t});r=wH(n,o[c])}else{const s=o[null!==(i=n.name)&&void 0!==i?i:""];if(void 0===s||null===s)throw new QR("missing input defined in abi",{param:e,input:t,paramName:n.name});r=wH(n,s)}r.dynamic&&(s=!0),a.push(r)}return s?{dynamic:!0,encoded:vH(a)}:{dynamic:!1,encoded:lL(...a.map((e=>e.encoded)))}}function EH(e,t){const n={__length__:0};let r=0;if(!e.components)return{result:n,encoded:t,consumed:r};let i=0;for(const[s,o]of e.components.entries()){let e;if(lH(o)){const n=mH({type:"uint32",name:""},t.subarray(r));e=bH(o,t.subarray(Number(n.result))),r+=n.consumed,i+=e.consumed}else e=bH(o,t.subarray(r)),r+=e.consumed;n.__length__+=1,n[s]=e.result,o.name&&""!==o.name&&(n[o.name]=e.result)}return{encoded:t.subarray(r+i),result:n,consumed:r+i}
9688}function _H(e){const t=[];return e.forEach((e=>{if(Array.isArray(e)){const n=_H(e);t.push({type:"tuple",components:n,name:""})}else t.push({type:OL(e,!0)})})),t}function kH(e,t){if((null===e||void 0===e?void 0:e.length)!==t.length)throw new QR("Invalid number of values received for given ABI",{expected:null===e||void 0===e?void 0:e.length,received:t.length});return Lj(xH({type:"tuple",name:"",components:aH(e)},t).encoded)}function CH(e){try{return Lj(xH({type:"tuple",name:"",components:_H(e)},e).encoded)}catch(t){throw new QR("Could not infer types from given params",{params:e})}}const AH=(e,t)=>kH([e],[t]),SH=(e,t,n)=>{try{if(e.length>0&&(!t||"0x"===t||"0X"===t))throw new QR("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return function(e,t){return EH({type:"tuple",name:"",components:aH(e)},Uj(t)).result}(e,`0x${t.replace(/0x/i,"")}`)}catch(r){throw new QR(`Parameter decoding error: ${r.message}`,{internalErr:r})}},IH=(e,t)=>SH(e,t),TH=(e,t)=>IH([e],t)[0],PH=e=>{if("string"!==typeof e&&!Iz(e))throw new QR("Invalid parameter value in encodeFunctionSignature");let t;return t=!e||"function"!==typeof e&&"object"!==typeof e?e:Oz(e),bD(t).slice(0,10)},NH=["bool","string","int","uint","address","fixed","ufixed"],RH=(e,t,n)=>{const r=Array.isArray(n)?n:[n],i={},s={};for(const[h,p]of e.entries())p.indexed?i[h]=p:s[h]=p;const o=t?SH(Object.values(s),t):{__length__:0},a=r.length-Object.keys(i).length,c=Object.values(i).map(((e,t)=>{return NH.some((t=>e.type.startsWith(t)))?(n=e.type,i=r[t+a],"string"===n?i:TH(n,i)):r[t+a];var n,i})),l={__length__:0};let u=0,d=0;for(const[h,p]of e.entries())l[h]="string"===p.type?"":void 0,i[h]&&(l[h]=c[u],u+=1),s[h]&&(l[h]=o[String(d)],d+=1),p.name&&(l[p.name]=l[h]),l.__length__+=1;return l},OH=(e,t)=>{if(null===t||void 0===t?void 0:t.data){let r,i,s;try{const n=t.data.slice(0,10),o=e.find((e=>(e=>{if("string"!==typeof e&&!Az(e))throw new QR("Invalid parameter value in encodeErrorSignature");let t;return t=!e||"function"!==typeof e&&"object"!==typeof e?e:Oz(e),bD(t)})(e).startsWith(n)));(null===o||void 0===o?void 0:o.inputs)&&(r=o.name,i=Oz(o),s=IH([...o.inputs],t.data.substring(10)))}catch(n){console.error(n)}r&&t.setDecodedProperties(r,i,s)}};var MH=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const jH=(e,t)=>{var n,r,i,s,o;if(e instanceof zR&&e.cause instanceof $R){if(void 0!==t){const i=t.filter((e=>Az(e)));return OH(i,e.cause),{reason:e.cause.message,signature:null===(n=e.cause.data)||void 0===n?void 0:n.slice(0,10),data:null===(r=e.cause.data)||void 0===r?void 0:r.substring(10),customErrorName:e.cause.errorName,customErrorDecodedSignature:e.cause.errorSignature,customErrorArguments:e.cause.errorArgs}}return{reason:e.cause.message,signature:null===(i=e.cause.data)||void 0===i?void 0:i.slice(0,10),data:null===(s=e.cause.data)||void 0===s?void 0:s.substring(10)}}if(e instanceof rM&&!Array.isArray(null===(o=e.cause)||void 0===o?void 0:o.errors)&&void 0!==e.cause)return e.cause.message;throw e};function LH(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.defaultReturnFormat;return MH(this,void 0,void 0,(function*(){try{return void(yield lW(e,t,e.defaultBlock,r))}catch(i){return jH(i,n)}}))}var DH=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};function BH(e,t,n,r,i,s){return DH(this,void 0,void 0,(function*(){let o,a=s;if(void 0===a&&(void 0!==r?a=jH(r):e.handleRevert&&void 0!==t&&(a=yield LH(e,t,i))),void 0===a)o=new aO(n);else if("string"===typeof a)o=new sO(a,void 0,n);else if(void 0!==a.customErrorName&&void 0!==a.customErrorDecodedSignature&&void 0!==a.customErrorArguments){const e=a;o=new oO(e.reason,e.customErrorName,e.customErrorDecodedSignature,e.customErrorArguments,e.signature,n,e.data)}else o=new sO(a.reason,a.signature,n,a.data);return o}
9688))}const UH=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:YN;var i,s,o,a,c;let l=Object.assign({},e);const u=gD(G$,t,r);if([oz,"allEvents"].includes(l.name)){const e=n.find((e=>e.signature===t.topics[0]));l=e||{anonymous:!0}}if(l.inputs=null!==(s=null!==(i=l.inputs)&&void 0!==i?i:e.inputs)&&void 0!==s?s:[],!l.anonymous){let e=0;(null!==(o=l.inputs)&&void 0!==o?o:[]).forEach((t=>{t.indexed&&(e+=1)})),e>0&&(null===t||void 0===t?void 0:t.topics)&&(null===t||void 0===t?void 0:t.topics.length)!==e+1&&(l=Object.assign(Object.assign({},l),{anonymous:!0,inputs:[]}))}const d=l.anonymous?t.topics:(null!==(a=t.topics)&&void 0!==a?a:[]).slice(1);return Object.assign(Object.assign({},u),{returnValues:RH([...null!==(c=l.inputs)&&void 0!==c?c:[]],t.data,d),event:l.name,signature:!l.anonymous&&t.topics&&0!==t.topics.length&&t.topics[0]?t.topics[0]:void 0,raw:{data:t.data,topics:t.topics}})};var FH=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class $H{constructor(e){let{options:t,web3Context:n,promiEvent:r,returnFormat:i}=e;this.options={checkRevertBeforeSending:!0},this.options=t,this.web3Context=n,this.promiEvent=r,this.returnFormat=i}getReceiptWithEvents(e){var t,n;const r=Object.assign({},null!==e&&void 0!==e?e:{});if((null===(t=this.options)||void 0===t?void 0:t.contractAbi)&&r.logs&&r.logs.length>0){r.events={};for(const e of r.logs){const t=UH(az,e,null===(n=this.options)||void 0===n?void 0:n.contractAbi,this.returnFormat);t.event&&(r.events[t.event]=t)}}return r}checkRevertBeforeSending(e){return FH(this,void 0,void 0,(function*(){if(!1!==this.options.checkRevertBeforeSending){let t=e;eL(e.data)&&eL(e.input)&&eL(e.gas)&&(t=Object.assign(Object.assign({},e),{gas:21e3}));const n=yield LH(this.web3Context,t,this.options.contractAbi);if(void 0!==n)throw yield BH(this.web3Context,e,void 0,void 0,this.options.contractAbi,n)}}))}emitSending(e){this.promiEvent.listenerCount("sending")>0&&this.promiEvent.emit("sending",e)}populateGasPrice(e){let{transactionFormatted:t,transaction:n}=e;var r;return FH(this,void 0,void 0,(function*(){let e=t;return!(null===(r=this.options)||void 0===r?void 0:r.ignoreGasPricing)&&eL(t.gasPrice)&&(eL(n.maxPriorityFeePerGas)||eL(n.maxFeePerGas))&&(e=Object.assign(Object.assign({},t),yield uz(t,this.web3Context,QN))),e}))}signAndSend(e){let{wallet:t,tx:n}=e;return FH(this,void 0,void 0,(function*(){if(t){const e=yield t.signTransaction(n);return wz(this.web3Context,(()=>FH(this,void 0,void 0,(function*(){return I$(this.web3Context.requestManager,e.rawTransaction)}))),e.transactionHash)}return wz(this.web3Context,(()=>FH(this,void 0,void 0,(function*(){return function(e,t){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_sendTransaction",params:[t]})}))}(this.web3Context.requestManager,n)}))))}))}emitSent(e){this.promiEvent.listenerCount("sent")>0&&this.promiEvent.emit("sent",e)}emitTransactionHash(e){this.promiEvent.listenerCount("transactionHash")>0&&this.promiEvent.emit("transactionHash",e)}emitReceipt(e){this.promiEvent.listenerCount("receipt")>0&&this.promiEvent.emit("receipt",e)}handleError(e){let{error:t,tx:n}=e;var r;return FH(this,void 0,void 0,(function*(){let e=t;return e instanceof zR&&this.web3Context.handleRevert&&(e=yield BH(this.web3Context,n,void 0,void 0,null===(r=this.options)||void 0===r?void 0:r.contractAbi)),(e instanceof rM||e instanceof zR||e instanceof oO||e instanceof aO||e instanceof sO||e instanceof jO)&&this.promiEvent.listenerCount("error")>0&&this.promiEvent.emit("error",e),e}))}emitConfirmation(e){let{receipt:t,transactionHash:n,customTransactionReceiptSchema:r}=e;this.promiEvent.listenerCount("confirmation")>0&&Cz(this.web3Context,this.promiEvent,t,n,this.returnFormat,r)}handleResolve(e){let{receipt:t,tx:n}=e;var r,i,s;return FH(this,void 0,void 0,(function*(){if(null===(r=this.options)||void 0===r?void 0:r.transactionResolver)return null===(i=this.options)||void 0===i?void 0:i.transactionResolver(t);if(t.status===BigInt(0)){const e=yield BH(this.web3Context,n,t,void 0,null===(s=this.options)||void 0===s?void 0:s.contractAbi);throw this.promiEvent.listenerCount("error")>0&&this.promiEvent.emit("error",e),e}return t}))}}
9688var zH=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))},HH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function WH(e,t){return zH(this,void 0,void 0,(function*(){const n=yield function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_hashrate",params:[]})}))}(e.requestManager);return gD({format:"uint"},n,null!==t&&void 0!==t?t:e.defaultReturnFormat)}))}function qH(e,t){return zH(this,void 0,void 0,(function*(){const n=yield function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_gasPrice",params:[]})}))}(e.requestManager);return gD({format:"uint"},n,null!==t&&void 0!==t?t:e.defaultReturnFormat)}))}function VH(e,t){return zH(this,void 0,void 0,(function*(){const n=yield function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_maxPriorityFeePerGas",params:[]})}))}(e.requestManager);return gD({format:"uint"},n,null!==t&&void 0!==t?t:e.defaultReturnFormat)}))}function GH(e,t){return zH(this,void 0,void 0,(function*(){const n=yield function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_blockNumber",params:[]})}))}(e.requestManager);return gD({format:"uint"},n,null!==t&&void 0!==t?t:e.defaultReturnFormat)}))}function KH(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultBlock,r=arguments.length>3?arguments[3]:void 0;return zH(this,void 0,void 0,(function*(){const i=Yj(n)?n:gD({format:"uint"},n,QN),s=yield function(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["address","blockNumberOrTag"],[t,n]),e.send({method:"eth_getBalance",params:[t,n]})}))}(e.requestManager,t,i);return gD({format:"uint"},s,null!==r&&void 0!==r?r:e.defaultReturnFormat)}))}function ZH(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.defaultBlock,i=arguments.length>4?arguments[4]:void 0;return zH(this,void 0,void 0,(function*(){const s=gD({format:"uint"},n,QN),o=Yj(r)?r:gD({format:"uint"},r,QN),a=yield function(e,t,n,r){return A$(this,void 0,void 0,(function*(){return aL.validate(["address","hex","blockNumberOrTag"],[t,n,r]),e.send({method:"eth_getStorageAt",params:[t,n,r]})}))}(e.requestManager,t,s,o);return gD({format:"bytes"},a,null!==i&&void 0!==i?i:e.defaultReturnFormat)}))}function YH(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultBlock,r=arguments.length>3?arguments[3]:void 0;return zH(this,void 0,void 0,(function*(){const i=Yj(n)?n:gD({format:"uint"},n,QN),s=yield function(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["address","blockNumberOrTag"],[t,n]),e.send({method:"eth_getCode",params:[t,n]})}))}(e.requestManager,t,i);return gD({format:"bytes"},s,null!==r&&void 0!==r?r:e.defaultReturnFormat)}))}function QH(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaultBlock,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;var i;return zH(this,void 0,void 0,(function*(){let s;if(zj(t)){const r=gD({format:"bytes32"},t,QN);s=yield function(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["bytes32","bool"],[t,n]),e.send({method:"eth_getBlockByHash",params:[t,n]})}))}(e.requestManager,r,n)}else{const r=Yj(t)?t:gD({format:"uint"},t,QN);s=yield T$(e.requestManager,r,n)}const o=gD(q$,s,null!==r&&void 0!==r?r:e.defaultReturnFormat);if(!eL(o)){return Object.assign(Object.assign({},o),{transactions:null!==(i=o.transactions)&&void 0!==i?i:[]})}return o}))}function JH(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaultBlock,n=arguments.length>2?arguments[2]:void 0;return zH(this,void 0,void 0,(function*(){let r;if(zj(t)){const n=gD({format:"bytes32"},t,QN);r=yield function(e,t){return A$(this,void 0,void 0,(function*(){return aL.validate(["bytes32"],[t]),e.send({method:"eth_getBlockTransactionCountByHash",params:[t]})}
9688))}(e.requestManager,n)}else{const n=Yj(t)?t:gD({format:"uint"},t,QN);r=yield function(e,t){return A$(this,void 0,void 0,(function*(){return aL.validate(["blockNumberOrTag"],[t]),e.send({method:"eth_getBlockTransactionCountByNumber",params:[t]})}))}(e.requestManager,n)}return gD({format:"uint"},r,null!==n&&void 0!==n?n:e.defaultReturnFormat)}))}function XH(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaultBlock,n=arguments.length>2?arguments[2]:void 0;return zH(this,void 0,void 0,(function*(){let r;if(zj(t)){const n=gD({format:"bytes32"},t,QN);r=yield function(e,t){return A$(this,void 0,void 0,(function*(){return aL.validate(["bytes32"],[t]),e.send({method:"eth_getUncleCountByBlockHash",params:[t]})}))}(e.requestManager,n)}else{const n=Yj(t)?t:gD({format:"uint"},t,QN);r=yield function(e,t){return A$(this,void 0,void 0,(function*(){return aL.validate(["blockNumberOrTag"],[t]),e.send({method:"eth_getUncleCountByBlockNumber",params:[t]})}))}(e.requestManager,n)}return gD({format:"uint"},r,null!==n&&void 0!==n?n:e.defaultReturnFormat)}))}function eW(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaultBlock,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return zH(this,void 0,void 0,(function*(){const i=gD({format:"uint"},n,QN);let s;if(zj(t)){const n=gD({format:"bytes32"},t,QN);s=yield function(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["bytes32","hex"],[t,n]),e.send({method:"eth_getUncleByBlockHashAndIndex",params:[t,n]})}))}(e.requestManager,n,i)}else{const n=Yj(t)?t:gD({format:"uint"},t,QN);s=yield function(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["blockNumberOrTag","hex"],[t,n]),e.send({method:"eth_getUncleByBlockNumberAndIndex",params:[t,n]})}))}(e.requestManager,n,i)}return gD(q$,s,null!==r&&void 0!==r?r:e.defaultReturnFormat)}))}function tW(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultReturnFormat;return zH(this,void 0,void 0,(function*(){const r=gD({format:"bytes32"},t,YN),i=yield function(e,t){return A$(this,void 0,void 0,(function*(){return aL.validate(["bytes32"],[t]),e.send({method:"eth_getTransactionByHash",params:[t]})}))}(e.requestManager,r);return eL(i)?i:X$(i,n,{fillInputAndData:!0})}))}function nW(e,t){return zH(this,void 0,void 0,(function*(){return(yield function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_pendingTransactions",params:[]})}))}(e.requestManager)).map((n=>X$(n,null!==t&&void 0!==t?t:e.defaultReturnFormat,{fillInputAndData:!0})))}))}function rW(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaultBlock,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return zH(this,void 0,void 0,(function*(){const i=gD({format:"uint"},n,QN);let s;if(zj(t)){const n=gD({format:"bytes32"},t,QN);s=yield function(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["bytes32","hex"],[t,n]),e.send({method:"eth_getTransactionByBlockHashAndIndex",params:[t,n]})}))}(e.requestManager,n,i)}else{const n=Yj(t)?t:gD({format:"uint"},t,QN);s=yield function(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["blockNumberOrTag","hex"],[t,n]),e.send({method:"eth_getTransactionByBlockNumberAndIndex",params:[t,n]})}))}(e.requestManager,n,i)}return eL(s)?s:X$(s,null!==r&&void 0!==r?r:e.defaultReturnFormat,{fillInputAndData:!0})}))}function iW(e,t,n){return zH(this,void 0,void 0,(function*(){const r=gD({format:"bytes32"},t,YN);let i;try{i=yield function(e,t){return A$(this,void 0,void 0,(function*(){return aL.validate(["bytes32"],[t]),e.send({method:"eth_getTransactionReceipt",params:[t]})}))}(e.requestManager,r)}catch(s){if("object"!==typeof s||eL(s)||!("message"in s)||"transaction indexing is in progress"!==s.message)throw s;console.warn("Transaction indexing is in progress.")}return eL(i)?i:gD(Z$,i,null!==n&&void 0!==n?n:e.defaultReturnFormat)}))}function sW(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultBlock,r=arguments.length>3?arguments[3]:void 0;return zH(this,void 0,void 0,(function*(){const i=Yj(n)?n:gD({format:"uint"},n,QN),s=yield function(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["address","blockNumberOrTag"],[t,n]),e.send({method:"eth_getTransactionCount",params:[t,n]})}))}(e.requestManager,t,i);return gD({format:"uint"},s,null!==r&&void 0!==r?r:e.defaultReturnFormat)}))}function oW(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{checkRevertBeforeSending:!0},i=arguments.length>4?arguments[4]:void 0;const s=new C$(((o,a)=>{setImmediate((()=>{(()=>{zH(this,void 0,void 0,(function*(){const c=new $H({web3Context:e,promiEvent:s,options:r,returnFormat:n});let l=Object.assign({},t);eL(i)||(l=yield i.processTransaction(l));let u=X$(Object.assign(Object.assign({},l),{from:hz("from",e,l),to:hz("to",e,l)}),QN);try{let t;u=yield c.populateGasPrice({transaction:l,transactionFormatted:u}),yield c.checkRevertBeforeSending(u),c.emitSending(u),e.wallet&&!eL(u.from)&&(t=e.wallet.get(u.from));const r=yield c.signAndSend({wallet:t,tx:u}),i=gD({format:"bytes32"},r,null!==n&&void 0!==n?n:e.defaultReturnFormat);c.emitSent(u),c.emitTransactionHash(i);const s=yield xz(e,r,null!==n&&void 0!==n?n:e.defaultReturnFormat),a=c.getReceiptWithEvents(gD(Z$,s,null!==n&&void 0!==n?n:e.defaultReturnFormat));c.emitReceipt(a),o(yield c.handleResolve({receipt:a,tx:u})),c.emitConfirmation({receipt:a,transactionHash:r})}catch(d){a(yield c.handleError({error:d,tx:u}))}}))})()}))}));return s}function aW(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.defaultReturnFormat;var i;return zH(this,void 0,void 0,(function*(){const s=gD({format:"bytes"},t,YN);if(null===(i=e.wallet)||void 0===i?void 0:i.get(n)){const t=e.wallet.get(n).sign(s);return gD(Y$,t,r)}if("number"===typeof n)throw new rO(t,'RPC method "eth_sign" does not support index signatures');const o=yield function(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["address","hex"],[t,n]),e.send({method:"eth_sign",params:[t,n]})}))}(e.requestManager,n,s);return gD({format:"bytes"},o,r)}))}function cW(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultReturnFormat;return zH(this,void 0,void 0,(function*(){const r=yield function(e,t){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_signTransaction",params:[t]})}
9688))}(e.requestManager,X$(t,QN));return wj(r)?function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{fillInputAndData:!1};return{raw:gD({format:"bytes"},e,t),tx:X$(Object.assign(Object.assign({},a$.fromSerializedData(gL(e)).toJSON()),{hash:mL(vD(gL(e))),type:(r=gL(e),r[0]>127?"0x0":OL(r[0]))}),t,{fillInputAndData:n.fillInputAndData})};var r}(r,n,{fillInputAndData:!0}):{raw:gD({format:"bytes"},r.raw,n),tx:X$(r.tx,n,{fillInputAndData:!0})}}))}function lW(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultBlock,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.defaultReturnFormat;return zH(this,void 0,void 0,(function*(){const i=Yj(n)?n:gD({format:"uint"},n,QN),s=yield function(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["blockNumberOrTag"],[n]),e.send({method:"eth_call",params:[t,n]})}))}(e.requestManager,X$(t,QN),i);return gD({format:"bytes"},s,r)}))}function uW(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultBlock,r=arguments.length>3?arguments[3]:void 0;return zH(this,void 0,void 0,(function*(){const i=X$(t,QN),s=Yj(n)?n:gD({format:"uint"},n,QN),o=yield function(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["blockNumberOrTag"],[n]),e.send({method:"eth_estimateGas",params:[t,n]})}))}(e.requestManager,i,s);return gD({format:"uint"},o,null!==r&&void 0!==r?r:e.defaultReturnFormat)}))}function dW(e,t,n){return zH(this,void 0,void 0,(function*(){let{toBlock:r,fromBlock:i}=t;eL(r)||"number"!==typeof r&&"bigint"!==typeof r||(r=wL(r)),eL(i)||"number"!==typeof i&&"bigint"!==typeof i||(i=wL(i));const s=Object.assign(Object.assign({},t),{fromBlock:i,toBlock:r}),o=yield function(e,t){return A$(this,void 0,void 0,(function*(){return aL.validate(["filter"],[t]),e.send({method:"eth_getLogs",params:[t]})}))}(e.requestManager,s);return o.map((t=>"string"===typeof t?t:gD(G$,t,null!==n&&void 0!==n?n:e.defaultReturnFormat)))}))}function hW(e,t){return zH(this,void 0,void 0,(function*(){const n=yield function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_chainId",params:[]})}))}(e.requestManager);return gD({format:"uint"},n,null!==t&&void 0!==t?t:e.defaultReturnFormat)}))}function pW(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.defaultBlock,i=arguments.length>4?arguments[4]:void 0;return zH(this,void 0,void 0,(function*(){const s=n.map((e=>gD({format:"bytes"},e,QN))),o=Yj(r)?r:gD({format:"uint"},r,QN),a=yield function(e,t,n,r){return A$(this,void 0,void 0,(function*(){return aL.validate(["address","bytes32[]","blockNumberOrTag"],[t,n,r]),e.send({method:"eth_getProof",params:[t,n,r]})}))}(e.requestManager,t,s,o);return gD(J$,a,null!==i&&void 0!==i?i:e.defaultReturnFormat)}))}function fW(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultBlock,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return zH(this,void 0,void 0,(function*(){const s=gD({format:"uint"},t,QN),o=Yj(n)?n:gD({format:"uint"},n,QN),a=gD({type:"array",items:{format:"uint"}},r,cz),c=yield function(e,t,n,r){return A$(this,void 0,void 0,(function*(){aL.validate(["hex","blockNumberOrTag"],[t,n]);for(const e of r)aL.validate(["number"],[e]);return e.send({method:"eth_feeHistory",params:[t,n,r]})}))}(e.requestManager,s,o,a);return gD(Q$,c,null!==i&&void 0!==i?i:e.defaultReturnFormat)}))}function mW(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultBlock,r=arguments.length>3?arguments[3]:void 0;return zH(this,void 0,void 0,(function*(){const i=Yj(n)?n:gD({format:"uint"},n,QN),s=yield function(e,t,n){return A$(this,void 0,void 0,(function*(){return aL.validate(["blockNumberOrTag"],[n]),e.send({method:"eth_createAccessList",params:[t,n]})}))}(e.requestManager,X$(t,QN),i);return gD(U$,s,null!==r&&void 0!==r?r:e.defaultReturnFormat)}))}function gW(e,t,n,r,i){return zH(this,void 0,void 0,(function*(){const s=yield function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return A$(this,void 0,void 0,(function*(){return aL.validate(["address"],[t]),e.send({method:"eth_signTypedData"+(r?"":"_v4"),params:[t,n]})}))}(e.requestManager,t,n,r);return gD({format:"bytes"},s,null!==i&&void 0!==i?i:e.defaultReturnFormat)}))}class yW extends IB{_buildSubscriptionParams(){return["logs",this.args]}formatSubscriptionResult(e){return gD(G$,e,super.returnFormat)}}class vW extends IB{_buildSubscriptionParams(){return["newPendingTransactions"]}formatSubscriptionResult(e){return gD({format:"string"},e,super.returnFormat)}}class wW extends IB{_buildSubscriptionParams(){return["newHeads"]}formatSubscriptionResult(e){return gD(V$,e,super.returnFormat)}}class bW extends IB{_buildSubscriptionParams(){return["syncing"]}
9688_processSubscriptionResult(e){if("boolean"===typeof e)this.emit("changed",e);else{const t=Object.fromEntries(Object.entries(e.status).map((e=>{let[t,n]=e;return[t.charAt(0).toLowerCase()+t.substring(1),n]})));this.emit("changed",e.syncing),this.emit("data",gD(K$,t,super.returnFormat))}}}var xW=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const EW={logs:yW,newPendingTransactions:vW,newHeads:wW,syncing:bW,pendingTransactions:vW,newBlockHeaders:wW};class _W extends x${constructor(e){"string"===typeof e||bB(e)?super({provider:e,registeredSubscriptions:EW}):e.registeredSubscriptions?super(e):(super(Object.assign(Object.assign({},e),{registeredSubscriptions:EW})),this.getFeeData=this.calculateFeeData)}setTransactionMiddleware(e){this.transactionMiddleware=e}getTransactionMiddleware(){return this.transactionMiddleware}getProtocolVersion(){return xW(this,void 0,void 0,(function*(){return function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_protocolVersion",params:[]})}))}(this.requestManager)}))}isSyncing(){return xW(this,void 0,void 0,(function*(){return S$(this.requestManager)}))}getCoinbase(){return xW(this,void 0,void 0,(function*(){return function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_coinbase",params:[]})}))}(this.requestManager)}))}isMining(){return xW(this,void 0,void 0,(function*(){return function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_mining",params:[]})}))}(this.requestManager)}))}getHashrate(e){var t;return void 0===e&&(e=null!==(t=this.defaultReturnFormat)&&void 0!==t?t:YN),xW(this,void 0,void 0,(function*(){return this.getHashRate(e)}))}getHashRate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return WH(this,e)}))}getGasPrice(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return qH(this,e)}))}getMaxPriorityFeePerGas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return VH(this,e)}))}calculateFeeData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:BigInt(2),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dL.Gwei;var n;return xW(this,void 0,void 0,(function*(){const r=yield this.getBlock(void 0,!1),i=null!==(n=null===r||void 0===r?void 0:r.baseFeePerGas)&&void 0!==n?n:void 0;let s,o,a;try{s=yield this.getGasPrice()}catch(c){}try{o=yield this.getMaxPriorityFeePerGas()}catch(c){}return i&&(o=null!==o&&void 0!==o?o:t,a=i*e+o),{gasPrice:s,maxFeePerGas:a,maxPriorityFeePerGas:o,baseFeePerGas:i}}))}getAccounts(){var e;return xW(this,void 0,void 0,(function*(){return(null!==(e=yield function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_accounts",params:[]})}))}(this.requestManager))&&void 0!==e?e:[]).map((e=>BL(e)))}))}getBlockNumber(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return GH(this,e)}))}getBalance(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultBlock,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return KH(this,e,t,n)}))}getStorageAt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultBlock,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return ZH(this,e,t,n,r)}))}getCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultBlock,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return YH(this,e,t,n)}))}getBlock(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultBlock,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return QH(this,e,t,n)}))}getBlockTransactionCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultBlock,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return JH(this,e,t)}))}getBlockUncleCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultBlock,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return XH(this,e,t)}))}getUncle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultBlock,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return eW(this,e,t,n)}))}getTransaction(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){const n=yield tW(this,e,t);if(!n)throw new lO;return n}))}getPendingTransactions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return nW(this,e)}))}getTransactionFromBlock(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultBlock,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return rW(this,e,t,n)}))}getTransactionReceipt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){const n=yield iW(this,e,t);if(!n)throw new lO;return n}))}getTransactionCount(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultBlock,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return sW(this,e,t,n)}))}sendTransaction(e){return oW(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultReturnFormat,arguments.length>2?arguments[2]:void 0,this.transactionMiddleware)}
9688sendSignedTransaction(e){return function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{checkRevertBeforeSending:!0};const i=new C$(((s,o)=>{setImmediate((()=>{(()=>{zH(this,void 0,void 0,(function*(){const a=new $H({web3Context:e,promiEvent:i,options:r,returnFormat:n}),c=gD({format:"bytes"},t,QN),l=a$.fromSerializedData(pL(gL(c))),u=Object.assign(Object.assign({},l.toJSON()),{from:l.getSenderAddress().toString()});try{const{v:t,r:r,s:i}=u,o=HH(u,["v","r","s"]);yield a.checkRevertBeforeSending(o),a.emitSending(c);const l=yield wz(e,(()=>zH(this,void 0,void 0,(function*(){return I$(e.requestManager,c)}))));a.emitSent(c);const d=gD({format:"bytes32"},l,null!==n&&void 0!==n?n:e.defaultReturnFormat);a.emitTransactionHash(d);const h=yield xz(e,l,null!==n&&void 0!==n?n:e.defaultReturnFormat),p=a.getReceiptWithEvents(gD(Z$,h,null!==n&&void 0!==n?n:e.defaultReturnFormat));a.emitReceipt(p),s(yield a.handleResolve({receipt:p,tx:u})),a.emitConfirmation({receipt:p,transactionHash:l})}catch(d){o(yield a.handleError({error:d,tx:u}))}}))})()}))}));return i}(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultReturnFormat,arguments.length>2?arguments[2]:void 0)}sign(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return aW(this,e,t,n)}))}signTransaction(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return cW(this,e,t)}))}call(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultBlock,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return lW(this,e,t,n)}))}estimateGas(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultBlock,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return uW(this,e,t,n)}))}getPastLogs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return dW(this,e,t)}))}getWork(){return xW(this,void 0,void 0,(function*(){return function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_getWork",params:[]})}))}(this.requestManager)}))}submitWork(e,t,n){return xW(this,void 0,void 0,(function*(){return function(e,t,n,r){return A$(this,void 0,void 0,(function*(){return aL.validate(["bytes8","bytes32","bytes32"],[t,n,r]),e.send({method:"eth_submitWork",params:[t,n,r]})}))}(this.requestManager,e,t,n)}))}requestAccounts(){return xW(this,void 0,void 0,(function*(){return function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"eth_requestAccounts",params:[]})}))}(this.requestManager)}))}getChainId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return hW(this,e)}))}getNodeInfo(){return xW(this,void 0,void 0,(function*(){return function(e){return A$(this,void 0,void 0,(function*(){return e.send({method:"web3_clientVersion",params:[]})}))}(this.requestManager)}))}getProof(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultBlock,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return pW(this,e,t,n,r)}))}getFeeHistory(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultBlock,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return fW(this,e,t,n,r)}))}createAccessList(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultBlock,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultReturnFormat;return xW(this,void 0,void 0,(function*(){return mW(this,e,t,n)}))}signTypedData(e,t,n,r){var i;return void 0===n&&(n=!1),void 0===r&&(r=null!==(i=this.defaultReturnFormat)&&void 0!==i?i:YN),xW(this,void 0,void 0,(function*(){return gW(this,e,t,n,r)}))}subscribe(e,t,n){var r,i;return void 0===n&&(n=null!==(r=this.defaultReturnFormat)&&void 0!==r?r:YN),xW(this,void 0,void 0,(function*(){const r=yield null===(i=this.subscriptionManager)||void 0===i?void 0:i.subscribe(e,t,n);return r instanceof yW&&"logs"===e&&"object"===typeof t&&!tD(t.fromBlock)&&Number.isFinite(Number(t.fromBlock))&&setImmediate((()=>{this.getPastLogs(t).then((e=>{for(const t of e)r._processSubscriptionResult(t)}
9688)).catch((e=>{r._processSubscriptionError(e)}))})),r}))}static shouldClearSubscription(e){let{sub:t}=e;return!(t instanceof bW)}clearSubscriptions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t;return null===(t=this.subscriptionManager)||void 0===t?void 0:t.unsubscribe(e?_W.shouldClearSubscription:void 0)}}const kW=e=>{if(eL(e.gas)||!Vj(e.gas)||eL(e.gasPrice)||!Vj(e.gasPrice))throw new _O({gas:e.gas,gasPrice:e.gasPrice});if(!eL(e.maxFeePerGas)||!eL(e.maxPriorityFeePerGas))throw new AO({maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas})},CW=e=>{if(!eL(e.gasPrice)&&"0x2"===e.type)throw new CO(e.gasPrice);if("0x0"===e.type||"0x1"===e.type)throw new AO({maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas});if(eL(e.maxFeePerGas)||!Vj(e.maxFeePerGas)||eL(e.maxPriorityFeePerGas)||!Vj(e.maxPriorityFeePerGas))throw new kO({maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas})},AW=(e,t)=>{if(!eL(t))return void t(e);if("object"!==typeof e||eL(e))throw new SO(e);(e=>{if(!eL(e.common)){if(eL(e.common.customChain))throw new hO;if(eL(e.common.customChain.chainId))throw new pO;if(!eL(e.chainId)&&e.chainId!==e.common.customChain.chainId)throw new fO({txChainId:e.chainId,customChainId:e.common.customChain.chainId})}})(e),(e=>{if(!eL(e.common)&&!eL(e.chain)&&!eL(e.hardfork))throw new yO;if(!eL(e.chain)&&eL(e.hardfork)||!eL(e.hardfork)&&eL(e.chain))throw new vO({chain:e.chain,hardfork:e.hardfork})})(e),(e=>{if(!eL(e.common)&&!eL(e.common.baseChain)&&!eL(e.chain)&&e.chain!==e.common.baseChain)throw new mO({txChain:e.chain,baseChain:e.common.baseChain})})(e),(e=>{if(!eL(e.common)&&!eL(e.common.hardfork)&&!eL(e.hardfork)&&e.hardfork!==e.common.hardfork)throw new gO({txHardfork:e.hardfork,commonHardfork:e.common.hardfork})})(e);const n=X$(e,QN);if((e=>{const t=!eL(e.gas)||!eL(e.gasLimit),n=t&&!eL(e.gasPrice),r=t&&!eL(e.maxPriorityFeePerGas)&&!eL(e.maxFeePerGas);if(!n&&!r)throw new bO({gas:e.gas,gasPrice:e.gasPrice,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas});if(n&&r)throw new EO({gas:e.gas,gasPrice:e.gasPrice,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas});(n?kW:CW)(e),(!eL(e.type)&&e.type>"0x1"?CW:kW)(e)})(n),eL(n.nonce)||eL(n.chainId)||n.nonce.startsWith("-")||n.chainId.startsWith("-"))throw new IO({nonce:e.nonce,chainId:e.chainId})};var SW=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const IW=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];
9688return SW(void 0,void 0,void 0,(function*(){const s=yield(o={transaction:e,web3Context:t,privateKey:n,fillGasPrice:r,fillGasLimit:i},dz(void 0,void 0,void 0,(function*(){var e;return(null!==(e=o.web3Context.transactionBuilder)&&void 0!==e?e:fz)(Object.assign(Object.assign({},o),{transaction:o.transaction}))})));var o;const a=X$(s,QN);return AW(a),a$.fromTxData((e=>{var t,n;return{nonce:e.nonce,gasPrice:e.gasPrice,gasLimit:null!==(t=e.gasLimit)&&void 0!==t?t:e.gas,to:e.to,value:e.value,data:null!==(n=e.data)&&void 0!==n?n:e.input,type:e.type,chainId:e.chainId,accessList:e.accessList,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas}})(a),((e,t)=>{var n,r,i,s,o,a,c,l,u,d,h,p,f,m,g,y,v,w;let b;if((eL(e.chain)||eL(e.hardfork))&&eL(e.common))t.defaultCommon?(b=Object.assign({},t.defaultCommon),eL(b.hardfork)&&(b.hardfork=null!==(n=e.hardfork)&&void 0!==n?n:t.defaultHardfork),eL(b.baseChain)&&(b.baseChain=t.defaultChain)):b=qF.custom({name:"custom-network",chainId:ML(e.chainId),networkId:eL(e.networkId)?void 0:ML(e.networkId),defaultHardfork:null!==(r=e.hardfork)&&void 0!==r?r:t.defaultHardfork},{baseChain:t.defaultChain});else{const n=null!==(a=null!==(o=null===(s=null===(i=null===e||void 0===e?void 0:e.common)||void 0===i?void 0:i.customChain)||void 0===s?void 0:s.name)&&void 0!==o?o:e.chain)&&void 0!==a?a:"custom-network",r=ML(null!==(u=null===(l=null===(c=null===e||void 0===e?void 0:e.common)||void 0===c?void 0:c.customChain)||void 0===l?void 0:l.chainId)&&void 0!==u?u:null===e||void 0===e?void 0:e.chainId),x=ML(null!==(p=null===(h=null===(d=null===e||void 0===e?void 0:e.common)||void 0===d?void 0:d.customChain)||void 0===h?void 0:h.networkId)&&void 0!==p?p:null===e||void 0===e?void 0:e.networkId),E=null!==(g=null!==(m=null===(f=null===e||void 0===e?void 0:e.common)||void 0===f?void 0:f.hardfork)&&void 0!==m?m:null===e||void 0===e?void 0:e.hardfork)&&void 0!==g?g:t.defaultHardfork,_=null!==(w=null!==(v=null===(y=e.common)||void 0===y?void 0:y.baseChain)&&void 0!==v?v:e.chain)&&void 0!==w?w:t.defaultChain;r&&x&&n&&(b=qF.custom({name:n,chainId:r,networkId:x,defaultHardfork:E},{baseChain:_}))}return{common:b}})(a,t))}))},TW=(e,t,n)=>{let{address:r}=e;var i,s;const o=null===n||void 0===n?void 0:n.topics,a=null!==(i=null===n||void 0===n?void 0:n.filter)&&void 0!==i?i:{},c={};if(tD(null===n||void 0===n?void 0:n.fromBlock)||(c.fromBlock=gD(q$.properties.number,null===n||void 0===n?void 0:n.fromBlock,{number:VN.HEX,bytes:GN.HEX})),tD(null===n||void 0===n?void 0:n.toBlock)||(c.toBlock=gD(q$.properties.number,null===n||void 0===n?void 0:n.toBlock,{number:VN.HEX,bytes:GN.HEX})),o&&Array.isArray(o))c.topics=[...o];else if(c.topics=[],!t||t.anonymous||[oz,"allEvents"].includes(t.name)||c.topics.push(null!==(s=t.signature)&&void 0!==s?s:Mz(Oz(t))),![oz,"allEvents"].includes(t.name)&&t.inputs)for(const l of t.inputs){if(!l.indexed)continue;const e=a[l.name];e?Array.isArray(e)?c.topics.push(e.map((e=>AH(l.type,e)))):"string"===l.type?c.topics.push(vD(e)):c.topics.push(AH(l.type,e)):c.topics.push(null)}return c.topics.length||delete c.topics,r&&(c.address=r.toLowerCase()),c},PW=(e,t,n)=>{const r=Array.isArray(e.inputs)?e.inputs.length:0;if(e.inputs&&r!==t.length)throw new UR(`The number of arguments is not matching the methods required number. You need to pass ${r} arguments.`);let i;if(i=e.inputs?kH(Array.isArray(e.inputs)?e.inputs:[],t).replace("0x",""):CH(t).replace("0x",""),!tD(s=e)&&"object"===typeof s&&!tD(s.type)&&"constructor"===s.type){if(!n)throw new UR("The contract has no contract data option set. This is necessary to append the constructor parameters.");return n.startsWith("0x")?`${n}${i}`:`0x${n}${i}`}var s;return`${PH(e)}${i}`},NW=function(e,t){const n=(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&t&&t.length>=10&&t.startsWith("0x")?t.slice(10):t;if(!e.inputs)throw new UR("No inputs found in the ABI");return IH([...e.inputs],n)};class RW extends IB{constructor(e,t){super(e,t),this.address=e.address,this.topics=e.topics,this.abi=e.abi,this.jsonInterface=e.jsonInterface}_buildSubscriptionParams(){return["logs",{address:this.address,topics:this.topics}]}formatSubscriptionResult(e){return UH(this.abi,e,this.jsonInterface,super.returnFormat)}}Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const OW=(e,t,n,r)=>{var i,s;const o={};return tD(e.data)&&"both"!==r||(o.data=PW(t,n,null!==(i=e.data)&&void 0!==i?i:e.input)),tD(e.input)&&"both"!==r||(o.input=PW(t,n,null!==(s=e.input)&&void 0!==s?s:e.data)),tD(o.input)&&tD(o.data)&&(o[r]=PW(t,n)),{data:o.data,input:o.input}},MW=e=>{let{abi:t,params:n,options:r,contractOptions:i}=e;var s,o,a;if(!(null!==(a=null!==(o=null!==(s=null===r||void 0===r?void 0:r.input)&&void 0!==s?s:null===r||void 0===r?void 0:r.data)&&void 0!==o?o:i.input)&&void 0!==a?a:i.data)&&!(null===r||void 0===r?void 0:r.to)&&!i.address)throw new UR("Contract address not specified");if(!(null===r||void 0===r?void 0:r.from)&&!i.from)throw new UR('Contract "from" address not specified');let c=rD({to:i.address,gas:i.gas,gasPrice:i.gasPrice,from:i.from,input:i.input,maxPriorityFeePerGas:i.maxPriorityFeePerGas,maxFeePerGas:i.maxFeePerGas,data:i.data},r);const l=OW(c,t,n,null===r||void 0===r?void 0:r.dataInputFill);return c=Object.assign(Object.assign({},c),{data:l.data,input:l.input}),c},jW=e=>"object"===typeof e&&!tD(e)&&0!==Object.keys(e).length&&!eD(e);
9688var LW=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const DW={logs:RW,newHeads:wW,newBlockHeaders:wW};class BW extends x${constructor(e,t,n,r,i){var s,o,a;const c=eD(t)?t:eD(n)?n:void 0;let l,u;if(l=jW(t)?t:jW(n)?n:r,u="object"===typeof t&&"provider"in t?t.provider:"object"===typeof n&&"provider"in n?n.provider:"object"===typeof r&&"provider"in r?r.provider:BW.givenProvider,super(Object.assign(Object.assign({},l),{provider:u,registeredSubscriptions:DW})),this.syncWithContext=!1,this._functions={},(null===l||void 0===l?void 0:l.wallet)&&(this._wallet=l.wallet),(null===l||void 0===l?void 0:l.accountProvider)&&(this._accountProvider=l.accountProvider),!eL(c)&&!eL(c.data)&&!eL(c.input)&&"both"!==this.config.contractDataInputFill)throw new HR({data:c.data,input:c.input});this._overloadedMethodAbis=new Map;const d=dD(r)?r:dD(n)?n:null!==i&&void 0!==i?i:this.defaultReturnFormat,h="string"===typeof t?t:void 0;this.config.contractDataInputFill=null!==(s=null===c||void 0===c?void 0:c.dataInputFill)&&void 0!==s?s:this.config.contractDataInputFill,this._parseAndSetJsonInterface(e,d),this.defaultReturnFormat!==d&&(this.defaultReturnFormat=d),eL(h)||this._parseAndSetAddress(h,d),this.options={address:h,jsonInterface:this._jsonInterface,gas:null!==(o=null===c||void 0===c?void 0:c.gas)&&void 0!==o?o:null===c||void 0===c?void 0:c.gasLimit,gasPrice:null===c||void 0===c?void 0:c.gasPrice,from:null===c||void 0===c?void 0:c.from,input:null===c||void 0===c?void 0:c.input,data:null===c||void 0===c?void 0:c.data},this.syncWithContext=null!==(a=null===c||void 0===c?void 0:c.syncWithContext)&&void 0!==a&&a,l instanceof x$&&this.subscribeToContextEvents(l),Object.defineProperty(this.options,"address",{set:e=>this._parseAndSetAddress(e,d),get:()=>this._address}),Object.defineProperty(this.options,"jsonInterface",{set:e=>this._parseAndSetJsonInterface(e,d),get:()=>this._jsonInterface}),l instanceof x$&&l.on(cB.CONFIG_CHANGE,(e=>{this.setConfig({[e.name]:e.newValue})}))}setTransactionMiddleware(e){this.transactionMiddleware=e}getTransactionMiddleware(){return this.transactionMiddleware}get events(){return this._events}get methods(){return this._methods}clone(){let e;return e=this.options.address?new BW([...this._jsonInterface,...this._errorsInterface],this.options.address,{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this.config.contractDataInputFill},this.getContextObject()):new BW([...this._jsonInterface,...this._errorsInterface],{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this.config.contractDataInputFill},this.getContextObject()),this.context&&e.subscribeToContextEvents(this.context),e}deploy(e){var t,n,r,i=this;let s=this._jsonInterface.find((e=>"constructor"===e.type));s||(s={type:"constructor",stateMutability:""});const o=gD({format:"bytes"},null!==(t=null===e||void 0===e?void 0:e.input)&&void 0!==t?t:this.options.input,YN),a=gD({format:"bytes"},null!==(n=null===e||void 0===e?void 0:e.data)&&void 0!==n?n:this.options.data,YN);if((!o||"0x"===o.trim())&&(!a||"0x"===a.trim()))throw new UR("contract creation without any data provided.");const c=null!==(r=null===e||void 0===e?void 0:e.arguments)&&void 0!==r?r:[],l=Object.assign(Object.assign({},this.options),{input:o,data:a}),u=null!==o&&void 0!==o?o:a;return{arguments:c,send:e=>{const t=Object.assign({},e);return this._contractMethodDeploySend(s,c,t,l)},estimateGas:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.defaultReturnFormat;return LW(i,void 0,void 0,(function*(){const n=Object.assign({},e);return this._contractMethodEstimateGas({abi:s,params:c,returnFormat:t,options:n,contractOptions:l})}))},encodeABI:()=>PW(s,c,gD({format:"bytes"},u,this.defaultReturnFormat)),decodeData:e=>Object.assign(Object.assign({},NW(s,e.replace(u,""),!1)),{__method__:s.type})}}
9688getPastEvents(e,t,n){var r;return LW(this,void 0,void 0,(function*(){const i="string"===typeof e?e:oz,s="string"===typeof e||dD(e)?dD(t)?{}:t:e,o=dD(e)?e:dD(t)?t:null!==n&&void 0!==n?n:this.defaultReturnFormat,a="allEvents"===i||i===oz?az:this._jsonInterface.find((e=>"name"in e&&e.name===i));if(!a)throw new UR(`Event ${i} not found.`);const{fromBlock:c,toBlock:l,topics:u,address:d}=TW(this.options,a,null!==s&&void 0!==s?s:{}),h=yield dW(this,{fromBlock:c,toBlock:l,topics:u,address:d},o),p=h?h.map((e=>"string"===typeof e?e:UH(a,e,this._jsonInterface,o))):[],f=null!==(r=null===s||void 0===s?void 0:s.filter)&&void 0!==r?r:{},m=Object.keys(f);return m.length>0?p.filter((e=>"string"===typeof e||m.every((t=>{var n;if(Array.isArray(f[t]))return f[t].some((n=>String(e.returnValues[t]).toUpperCase()===String(n).toUpperCase()));const r=null===(n=a.inputs)||void 0===n?void 0:n.filter((e=>e.name===t))[0];if((null===r||void 0===r?void 0:r.indexed)&&"string"===r.type){if(vD(f[t])===String(e.returnValues[t]))return!0}return String(e.returnValues[t]).toUpperCase()===String(f[t]).toUpperCase()})))):p}))}_parseAndSetAddress(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultReturnFormat;this._address=e?BL(gD({format:"address"},e,t)):e}decodeMethodData(e){const t=e.slice(0,10),n=this._jsonInterface.filter((e=>"error"!==e.type)),r=n.find((e=>t===PH(Oz(e))));if(!r)throw new UR(`The ABI for the provided method signature ${t} was not found.`);return Object.assign(Object.assign({},NW(r,e)),{__method__:Oz(r)})}_parseAndSetJsonInterface(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultReturnFormat;var n,r,i,s,o;this._functions={},this._methods={},this._events={};let a=[];const c=e.filter((e=>"error"!==e.type)),l=e.filter((e=>Az(e)));for(const u of c){const e=Object.assign(Object.assign({},u),{signature:""});if(Iz(e)){const t=Oz(e),a=PH(t);e.methodNameWithInputs=t,e.signature=a,e.constant=null!==(r=null!==(n="view"===e.stateMutability)&&void 0!==n?n:"pure"===e.stateMutability)&&void 0!==r?r:e.constant,e.payable=null!==(i="payable"===e.stateMutability)&&void 0!==i?i:e.payable,this._overloadedMethodAbis.set(e.name,[...null!==(s=this._overloadedMethodAbis.get(e.name))&&void 0!==s?s:[],e]);const c=null!==(o=this._overloadedMethodAbis.get(e.name))&&void 0!==o?o:[],u=this._createContractMethod(c,l),d=this._createContractMethod(c,l,!0);this._functions[t]={signature:a,method:d},this._methods[e.name]=u,this._methods[t]=d,this._methods[a]=d}else if(Sz(e)){const n=Oz(e),r=Mz(n),i=this._createContractEvent(e,t);e.signature=r,n in this._events&&"bound"!==e.name||(this._events[n]=i),this._events[e.name]=i,this._events[r]=i}a=[...a,e]}this._events.allEvents=this._createContractEvent(az,t),this._jsonInterface=[...a],this._errorsInterface=l}_getAbiParams(e,t){var n;try{return Nj(null!==(n=e.inputs)&&void 0!==n?n:[],t)}catch(r){throw new UR(`Invalid parameters for method ${e.name}: ${r.message}`)}}_createContractMethod(e,t){var n=this;let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const i=e[e.length-1];return function(){for(var e=arguments.length,s=new Array(e),o=0;o<e;o++)s[o]=arguments[o];var a,c,l;let u;const d=null!==(c=r?null===(a=n._overloadedMethodAbis.get(i.name))||void 0===a?void 0:a.filter((e=>e.signature===i.signature)):n._overloadedMethodAbis.get(i.name))&&void 0!==c?c:[];let h=d[0];const p=t,f=d.filter((e=>{var t;return(null!==(t=e.inputs)&&void 0!==t?t:[]).length===s.length}));if(1===d.length||0===f.length)u=n._getAbiParams(h,s),aL.validate(null!==(l=i.inputs)&&void 0!==l?l:[],u);else{const e=[],t=[];for(const r of f)try{u=n._getAbiParams(r,s),aL.validate(r.inputs,u),t.push(r)}catch(g){e.push(g)}if(1===t.length?[h]=t:t.length>1&&([h]=t,console.warn(`Multiple methods found that is compatible with the given inputs.\n\tFound ${t.length} compatible methods: ${JSON.stringify(t.map((e=>`${e.methodNameWithInputs} (signature: ${e.signature})`)))} \n\tThe first one will be used: ${h.methodNameWithInputs}`)),e.length===f.length)throw new gj(e)}const m={arguments:u,call:(e,t)=>LW(n,void 0,void 0,(function*(){return this._contractMethodCall(h,u,p,e,t)})),send:e=>n._contractMethodSend(h,u,p,e),populateTransaction:(e,t)=>{var r,o;let a=null!==t&&void 0!==t?t:n.options;a=Object.assign(Object.assign({},a),{input:void 0,from:null!==(o=null!==(r=null===a||void 0===a?void 0:a.from)&&void 0!==r?r:n.defaultAccount)&&void 0!==o?o:void 0});const c=MW({abi:i,params:s,options:Object.assign(Object.assign({},e),{dataInputFill:n.config.contractDataInputFill}),contractOptions:a});return c.dataInputFill&&delete c.dataInputFill,c},estimateGas:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.defaultReturnFormat;return LW(n,void 0,void 0,(function*(){return this._contractMethodEstimateGas({abi:h,params:u,returnFormat:t,options:e})}))},encodeABI:()=>PW(h,u),decodeData:e=>NW(h,e),createAccessList:(e,t)=>
9688LW(n,void 0,void 0,(function*(){return this._contractMethodCreateAccessList(h,u,p,e,t)}))};return h.stateMutability,m}}_contractMethodCall(e,t,n,r,i){var s;return LW(this,void 0,void 0,(function*(){const o=(e=>{let{abi:t,params:n,options:r,contractOptions:i}=e;if(!(null===r||void 0===r?void 0:r.to)&&!i.address)throw new UR("Contract address not specified");let s=rD({to:i.address,gas:i.gas,gasPrice:i.gasPrice,from:i.from,input:i.input,maxPriorityFeePerGas:i.maxPriorityFeePerGas,maxFeePerGas:i.maxFeePerGas,data:i.data},r);const o=OW(s,t,n,null===r||void 0===r?void 0:r.dataInputFill);return s=Object.assign(Object.assign({},s),{data:o.data,input:o.input}),s})({abi:e,params:t,options:Object.assign(Object.assign({},r),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:null!==(s=this.options.from)&&void 0!==s?s:this.config.defaultAccount})});try{const t=yield lW(this,o,i,this.defaultReturnFormat);return((e,t)=>{if("constructor"===e.type)return t;if(!t)return null;const n=t.length>=2?t.slice(2):t;if(!e.outputs)return null;const r=IH([...e.outputs],n);return 1===r.__length__?r[0]:r})(e,t)}catch(a){throw a instanceof zR&&OH(n,a.cause),a}}))}_contractMethodCreateAccessList(e,t,n,r,i){var s;return LW(this,void 0,void 0,(function*(){const o=(e=>{let{abi:t,params:n,options:r,contractOptions:i}=e;if(!(null===r||void 0===r?void 0:r.to)&&!i.address)throw new UR("Contract address not specified");if(!(null===r||void 0===r?void 0:r.from)&&!i.from)throw new UR('Contract "from" address not specified');let s=rD({to:i.address,gas:i.gas,gasPrice:i.gasPrice,from:i.from,input:i.input,maxPriorityFeePerGas:i.maxPriorityFeePerGas,maxFeePerGas:i.maxFeePerGas,data:i.data},r);const o=OW(s,t,n,null===r||void 0===r?void 0:r.dataInputFill);return s=Object.assign(Object.assign({},s),{data:o.data,input:o.input}),s})({abi:e,params:t,options:Object.assign(Object.assign({},r),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:null!==(s=this.options.from)&&void 0!==s?s:this.config.defaultAccount})});try{return mW(this,o,i,this.defaultReturnFormat)}catch(a){throw a instanceof zR&&OH(n,a.cause),a}}))}_contractMethodSend(e,t,n,r,i){var s,o;let a=null!==i&&void 0!==i?i:this.options;a=Object.assign(Object.assign({},a),{input:void 0,from:null!==(o=null!==(s=a.from)&&void 0!==s?s:this.defaultAccount)&&void 0!==o?o:void 0});const c=MW({abi:e,params:t,options:Object.assign(Object.assign({},r),{dataInputFill:this.config.contractDataInputFill}),contractOptions:a}),l=eL(this.transactionMiddleware)?oW(this,c,this.defaultReturnFormat,{checkRevertBeforeSending:!1,contractAbi:this._jsonInterface}):oW(this,c,this.defaultReturnFormat,{checkRevertBeforeSending:!1,contractAbi:this._jsonInterface},this.transactionMiddleware);return l.on("error",(e=>{e instanceof zR&&OH(n,e.cause)})),l}_contractMethodDeploySend(e,t,n,r){var i,s;let o=null!==r&&void 0!==r?r:this.options;o=Object.assign(Object.assign({},o),{from:null!==(s=null!==(i=o.from)&&void 0!==i?i:this.defaultAccount)&&void 0!==s?s:void 0});const a=MW({abi:e,params:t,options:Object.assign(Object.assign({},n),{dataInputFill:this.contractDataInputFill}),contractOptions:o}),c={transactionResolver:e=>{if(e.status===BigInt(0))throw new UR("code couldn't be stored",e);const t=this.clone();return t.options.address=e.contractAddress,t},contractAbi:this._jsonInterface,checkRevertBeforeSending:!1};return eL(this.transactionMiddleware)?oW(this,a,this.defaultReturnFormat,c):oW(this,a,this.defaultReturnFormat,c,this.transactionMiddleware)}_contractMethodEstimateGas(e){let{abi:t,params:n,returnFormat:r,options:i,contractOptions:s}=e;return LW(this,void 0,void 0,(function*(){const e=(e=>{let{abi:t,params:n,options:r,contractOptions:i}=e,s=rD({to:i.address,gas:i.gas,gasPrice:i.gasPrice,from:i.from,input:i.input,data:i.data},r);const o=OW(s,t,n,null===r||void 0===r?void 0:r.dataInputFill);return s=Object.assign(Object.assign({},s),{data:o.data,input:o.input}),s})({abi:t,params:n,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:null!==s&&void 0!==s?s:this.options});return uW(this,e,JN.LATEST,null!==r&&void 0!==r?r:this.defaultReturnFormat)}))}_createContractEvent(e){var t=this;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultReturnFormat;return function(){var r;const{topics:i,fromBlock:s}=TW(t.options,e,arguments.length<=0?void 0:arguments[0]),o=new RW({address:t.options.address,topics:i,abi:e,jsonInterface:t._jsonInterface},{subscriptionManager:t.subscriptionManager,returnFormat:n});return eL(s)||t.getPastEvents(e.name,{fromBlock:s,topics:i},n).then((e=>{e&&e.forEach((e=>o.emit("data",e)))})).catch((e=>
9688{o.emit("error",new tO("Failed to get past events.",e))})),null===(r=t.subscriptionManager)||void 0===r||r.addSubscription(o).catch((e=>{o.emit("error",new tO("Failed to subscribe.",e))})),o}}subscribeToContextEvents(e){const t=this;this.context=e,t.syncWithContext&&e.on(cB.CONFIG_CHANGE,(e=>{t.setConfig({[e.name]:e.newValue})}))}}const UW=BW,FW={addr:"0x3b3b57de",name:"0x691f3431",abi:"0x2203ab56",pubkey:"0xc8690233",text:"0x59d1d43c",contenthash:"0xbc1c58d1"},$W="addr",zW="addr",HW="pubkey",WW="contenthash",qW="text",VW="name",GW={main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},KW={"0x1":"main","0x5":"goerli"},ZW=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"label",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolver",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"ttl",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"}],YW=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"coinType",type:"uint256"},{indexed:!1,internalType:"bytes",name:"newAddress",type:"bytes"}],name:"AddressChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"uint16",name:"resource",type:"uint16"},{indexed:!1,internalType:"bytes",name:"record",type:"bytes"}],name:"DNSRecordChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"uint16",name:"resource",type:"uint16"}],name:"DNSRecordDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"}],name:"DNSZoneCleared",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"lastzonehash",type:"bytes"},{indexed:!1,internalType:"bytes",name:"zonehash",type:"bytes"}],name:"DNSZonehashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes4",name:"interfaceID",type:"bytes4"},{indexed:!1,internalType:"address",name:"implementer",type:"address"}],name:"InterfaceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"string",name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"x",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"string",name:"indexedKey",type:"string"},{indexed:!1,internalType:"string",name:"key",type:"string"}],name:"TextChanged",type:"event"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address payable",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"coinType",type:"uint256"}],name:"addr",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"contenthash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"name",type:"bytes32"},{internalType:"uint16",name:"resource",type:"uint16"}],name:"dnsRecord",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"name",type:"bytes32"}],name:"hasDNSRecords",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"interfaceImplementer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"pubkey",outputs:[{internalType:"bytes32",name:"x",type:"bytes32"},{internalType:"bytes32",name:"y",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"}],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"zonehash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"a",type:"address"}],name:"setAddr",outputs:[],stateMutability:"nonpayable",type:"function"}],QW=e=>{let t="";for(let n=0;n<32;n+=1)t+="00";if(e){const n=(e=>qA(e))(e).split(".");for(let e=n.length-1;e>=0;e-=1){const r=bD(n[e]).slice(2);t=bD(`0x${t}${r}`).slice(2)}}return`0x${t}`};
9688var JW=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class XW{constructor(e,t){this.contract=new BW(ZW,null!==t&&void 0!==t?t:GW.main,e),this.context=e}getOwner(e){return JW(this,void 0,void 0,(function*(){try{return this.contract.methods.owner(QW(e)).call()}catch(t){throw new Error}}))}getTTL(e){return JW(this,void 0,void 0,(function*(){try{return this.contract.methods.ttl(QW(e)).call()}catch(t){throw new Error}}))}recordExists(e){return JW(this,void 0,void 0,(function*(){try{return this.contract.methods.recordExists(QW(e)).call()}catch(t){throw new Error}}))}getResolver(e){return JW(this,void 0,void 0,(function*(){try{return this.contract.methods.resolver(QW(e)).call().then((e=>{if("string"===typeof e){return new BW(YW,e,this.context)}throw new Error}))}catch(t){throw new Error}}))}get events(){return this.contract.events}}var eq=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class tq{constructor(e){this.registry=e}getResolverContractAdapter(e){return eq(this,void 0,void 0,(function*(){return this.registry.getResolver(e)}))}checkInterfaceSupport(e,t){var n,r;return eq(this,void 0,void 0,(function*(){if(tD(FW[t]))throw new FR(null!==(n=e.options.address)&&void 0!==n?n:"",t);if(!(yield e.methods.supportsInterface(FW[t]).call()))throw new FR(null!==(r=e.options.address)&&void 0!==r?r:"",t)}))}supportsInterface(e,t){var n;return eq(this,void 0,void 0,(function*(){const r=yield this.getResolverContractAdapter(e);let i=t;if(!bj(i)){if(i=null!==(n=wD(t))&&void 0!==n?n:"",""===t)throw new Error("Invalid interface Id");i=i.slice(0,10)}return r.methods.supportsInterface(i).call()}))}getAddress(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60;return eq(this,void 0,void 0,(function*(){const n=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(n,zW),n.methods.addr(QW(e),t).call()}))}getPubkey(e){return eq(this,void 0,void 0,(function*(){const t=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(t,HW),t.methods.pubkey(QW(e)).call()}))}getContenthash(e){return eq(this,void 0,void 0,(function*(){const t=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(t,WW),t.methods.contenthash(QW(e)).call()}))}setAddress(e,t,n){return eq(this,void 0,void 0,(function*(){const r=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(r,$W),r.methods.setAddr(QW(e),t).send(n)}))}getText(e,t){return eq(this,void 0,void 0,(function*(){const n=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(n,qW),n.methods.text(QW(e),t).call()}))}getName(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return eq(this,void 0,void 0,(function*(){const n=`${e.toLowerCase().substring(2)}.addr.reverse`,r=yield this.getResolverContractAdapter(n);return t&&(yield this.checkInterfaceSupport(r,VW)),r.methods.name(QW(n)).call()}))}}var nq=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class rq extends x${constructor(e,t){super(null!==t&&void 0!==t?t:""),this.registryAddress=null!==e&&void 0!==e?e:GW.main,this._registry=new XW(this.getContextObject(),e),this._resolver=new tq(this._registry)}getResolver(e){return nq(this,void 0,void 0,(function*(){return this._registry.getResolver(e)}))}recordExists(e){return nq(this,void 0,void 0,(function*(){return this._registry.recordExists(e)}))}getTTL(e){return nq(this,void 0,void 0,(function*(){return this._registry.getTTL(e)}))}getOwner(e){return nq(this,void 0,void 0,(function*(){return this._registry.getOwner(e)}))}getAddress(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60;return nq(this,void 0,void 0,(function*(){return this._resolver.getAddress(e,t)}))}getText(e,t){return nq(this,void 0,void 0,(function*(){return Wj(e)?this._resolver.getText(yield this._resolver.getName(e,!1),t):this._resolver.getText(e,t)}))}getName(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return nq(this,void 0,void 0,(function*(){return this._resolver.getName(e,t)}))}getPubkey(e){return nq(this,void 0,void 0,(function*(){return this._resolver.getPubkey(e)}))}getContenthash(e){return nq(this,void 0,void 0,(function*(){return this._resolver.getContenthash(e)}))}checkNetwork(){return nq(this,void 0,void 0,(function*(){const e=Date.now()/1e3;if(!this._lastSyncCheck||e-this._lastSyncCheck>3600){const n=yield(t=this,zH(void 0,void 0,void 0,(function*(){return S$(t.requestManager)})));if("boolean"!==typeof n||n)throw new qR;this._lastSyncCheck=e}var t;if(this._detectedAddress)return this._detectedAddress;const n=yield tz(this,Object.assign(Object.assign({},this.defaultReturnFormat),{number:VN.HEX})),r=GW[KW[n]];if("undefined"===typeof r)throw new WR(n);return this._detectedAddress=r,this._detectedAddress}))}supportsInterface(e,t){return nq(this,void 0,void 0,(function*(){return this._resolver.supportsInterface(e,t)}))}get events(){return this._registry.events}setAddress(e,t,n){return nq(this,void 0,void 0,(function*(){return this._resolver.setAddress(e,t,n)}))}}
9688var iq=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const sq=e=>iq(void 0,void 0,void 0,(function*(){const t=yield(e=>N$(void 0,void 0,void 0,(function*(){return e.send({method:"personal_listAccounts",params:[]})})))(e);return t.map(BL)})),oq=(e,t)=>iq(void 0,void 0,void 0,(function*(){aL.validate(["string"],[t]);const n=yield((e,t)=>N$(void 0,void 0,void 0,(function*(){return e.send({method:"personal_newAccount",params:[t]})})))(e,t);return BL(n)})),aq=(e,t,n,r)=>iq(void 0,void 0,void 0,(function*(){return aL.validate(["address","string","uint"],[t,n,r]),((e,t,n,r)=>N$(void 0,void 0,void 0,(function*(){return e.send({method:"personal_unlockAccount",params:[t,n,r]})})))(e,t,n,r)})),cq=(e,t)=>iq(void 0,void 0,void 0,(function*(){return aL.validate(["address"],[t]),((e,t)=>N$(void 0,void 0,void 0,(function*(){return e.send({method:"personal_lockAccount",params:[t]})})))(e,t)})),lq=(e,t,n)=>iq(void 0,void 0,void 0,(function*(){return aL.validate(["string","string"],[t,n]),((e,t,n)=>N$(void 0,void 0,void 0,(function*(){return e.send({method:"personal_importRawKey",params:[t,n]})})))(e,t,n)})),uq=(e,t,n)=>iq(void 0,void 0,void 0,(function*(){const r=X$(t,QN);return((e,t,n)=>N$(void 0,void 0,void 0,(function*(){return e.send({method:"personal_sendTransaction",params:[t,n]})})))(e,r,n)})),dq=(e,t,n)=>iq(void 0,void 0,void 0,(function*(){const r=X$(t,QN);return((e,t,n)=>N$(void 0,void 0,void 0,(function*(){return e.send({method:"personal_signTransaction",params:[t,n]})})))(e,r,n)})),hq=(e,t,n,r)=>iq(void 0,void 0,void 0,(function*(){aL.validate(["string","address","string"],[t,n,r]);const i=bj(t)?t:EL(t);return((e,t,n,r)=>N$(void 0,void 0,void 0,(function*(){return e.send({method:"personal_sign",params:[t,n,r]})})))(e,i,n,r)})),pq=(e,t,n)=>iq(void 0,void 0,void 0,(function*(){aL.validate(["string","string"],[t,n]);const r=bj(t)?t:EL(t);return((e,t,n)=>N$(void 0,void 0,void 0,(function*(){return e.send({method:"personal_ecRecover",params:[t,n]})})))(e,r,n)}));var fq=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class mq extends x${getAccounts(){return fq(this,void 0,void 0,(function*(){return sq(this.requestManager)}))}newAccount(e){return fq(this,void 0,void 0,(function*(){return oq(this.requestManager,e)}))}unlockAccount(e,t,n){return fq(this,void 0,void 0,(function*(){return aq(this.requestManager,e,t,n)}))}lockAccount(e){return fq(this,void 0,void 0,(function*(){return cq(this.requestManager,e)}))}importRawKey(e,t){return fq(this,void 0,void 0,(function*(){return lq(this.requestManager,e,t)}))}sendTransaction(e,t){return fq(this,void 0,void 0,(function*(){return uq(this.requestManager,e,t)}))}signTransaction(e,t){return fq(this,void 0,void 0,(function*(){return dq(this.requestManager,e,t)}))}sign(e,t,n){return fq(this,void 0,void 0,(function*(){return hq(this.requestManager,e,t,n)}))}ecRecover(e,t){return fq(this,void 0,void 0,(function*(){return pq(this.requestManager,e,t)}))}}const gq={encodeEventSignature:Mz,encodeFunctionCall:(e,t)=>{var n;if(!Iz(e))throw new QR("Invalid parameter value in encodeFunctionCall");return`${PH(e)}${kH(null!==(n=e.inputs)&&void 0!==n?n:[],null!==t&&void 0!==t?t:[]).replace("0x","")}`},encodeFunctionSignature:PH,encodeParameter:AH,encodeParameters:kH,decodeParameter:TH,decodeParameters:IH,decodeLog:RH};var yq=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const vq=e=>{const t=(t,n)=>yq(void 0,void 0,void 0,(function*(){return((e,t)=>c$(void 0,void 0,void 0,(function*(){const n=e.sign(gL(t));if(eL(n.v)||eL(n.r)||eL(n.s))throw new UO("Signer Error");const r=n.validate(!0);if(r.length>0){let e="Signer Error ";for(const t of r)e+=`${e} ${t}.`;throw new UO(e)}const i=mL(n.serialize()),s=bD(i);return{messageHash:mL(n.getMessageToSign(!0)),v:`0x${n.v.toString(16)}`,r:`0x${n.r.toString(16).padStart(64,"0")}`,s:`0x${n.s.toString(16).padStart(64,"0")}`,rawTransaction:i,transactionHash:mL(s)}})))(yield IW(t,e),gD({format:"bytes"},n,QN))})),n=e=>{const n=y$(e);return Object.assign(Object.assign({},n),{signTransaction:e=>yq(void 0,void 0,void 0,(function*(){return t(e,n.privateKey)}))})},r=(e,n,r)=>yq(void 0,void 0,void 0,(function*(){var i;const s=yield((e,t,n)=>c$(void 0,void 0,void 0,(function*(){const r="object"===typeof e?e:JSON.parse(n?e.toLowerCase():e);if(aL.validateJSONSchema(gF,r),3!==r.version)throw new PR;const i="string"===typeof t?gL(EL(t)):t;let s;if(aL.validate(["bytes"],[i]),"scrypt"===r.crypto.kdf){const e=r.crypto.kdfparams;s=oU(i,"string"===typeof e.salt?gL(e.salt):e.salt,e.n,e.p,e.r,e.dklen)}else{if("pbkdf2"!==r.crypto.kdf)throw new IR;{const e=r.crypto.kdfparams;s=tU(i,"string"===typeof e.salt?gL(e.salt):e.salt,e.c,e.dklen,"sha256")}}const o=gL(r.crypto.ciphertext);if(bD(lL(s.slice(16,32),o)).replace("0x","")!==r.crypto.mac)throw new TR;const a=yield jB(gL(r.crypto.ciphertext),s.slice(0,16),gL(r.crypto.cipherparams.iv));return y$(a)})))(e,n,null===(i=null===r||void 0===r?void 0:r.nonStrict)||void 0===i||i);return Object.assign(Object.assign({},s),{signTransaction:e=>yq(void 0,void 0,void 0,(function*(){return t(e,s.privateKey)}))})})),i=()=>{const e=(()=>{const e=hF.utils.randomPrivateKey();return y$(`${mL(e)}`)})();return Object.assign(Object.assign({},e),{signTransaction:n=>
9688yq(void 0,void 0,void 0,(function*(){return t(n,e.privateKey)}))})},s=new PB({create:i,privateKeyToAccount:n,decrypt:r});return{signTransaction:t,create:i,privateKeyToAccount:n,decrypt:r,recoverTransaction:h$,hashMessage:u$,sign:d$,recover:p$,encrypt:g$,wallet:s,privateKeyToAddress:f$,parseAndValidatePrivateKey:l$,privateKeyToPublicKey:m$}};var wq,bq=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(t){s(t)}}function a(e){try{c(r.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};!function(e){e.eip6963announceProvider="eip6963:announceProvider",e.eip6963requestProvider="eip6963:requestProvider"}(wq||(wq={}));const xq=new Map,Eq="web3:providersMapUpdated";class _q extends x${constructor(e){var t;(tD(e)||"string"===typeof e&&""===e.trim()||"string"!==typeof e&&!bB(e)&&!e.provider)&&console.warn("NOTE: web3.js is running without provider. You need to pass a provider in order to interact with the network!");let n={};"string"===typeof e||bB(e)?n.provider=e:n=e||{},n.registeredSubscriptions=Object.assign(Object.assign({},EW),null!==(t=n.registeredSubscriptions)&&void 0!==t?t:{}),super(n);const r=vq(this);this._wallet=r.wallet,this._accountProvider=r,this.utils=i;const s=this;const o=s.use(_W);this.eth=Object.assign(o,{ens:s.use(rq,GW.main),Iban:E$,net:s.use(sz),personal:s.use(mq),Contract:class extends UW{constructor(e,t,n,r,i){if(eD(t)&&eD(n))throw new VR("Should not provide options at both 2nd and 3rd parameters");let o,a,c,l={};if(!tD(t)&&"object"!==typeof t&&"string"!==typeof t)throw new VR;"string"===typeof t&&(o=t),l=eD(t)?t:eD(n)?n:{},a=t instanceof x$?t:n instanceof x$?n:r instanceof x$?r:s.getContextObject(),i?c=i:dD(n)?c=n:dD(r)&&(c=r),super(e,o,l,a,c),super.subscribeToContextEvents(s)}},abi:gq,accounts:r})}}_q.version="4.9.0",_q.utils=i,_q.requestEIP6963Providers=()=>bq(void 0,void 0,void 0,(function*(){return new Promise(((e,t)=>{"undefined"===typeof window&&t(new Error("window object not available, EIP-6963 is intended to be used within a browser")),window.addEventListener(wq.eip6963announceProvider,(t=>{xq.set(t.detail.info.uuid,t.detail);const n=new CustomEvent(Eq,{detail:xq});window.dispatchEvent(n),e(xq)})),window.dispatchEvent(new Event(wq.eip6963requestProvider))}))})),_q.onNewProviderDiscovered=e=>{if("undefined"===typeof window)throw new Error("window object not available, EIP-6963 is intended to be used within a browser");window.addEventListener(Eq,e)},_q.modules={Web3Eth:_W,Iban:E$,Net:sz,ENS:rq,Personal:mq};const kq=_q;const Cq=class{constructor(){this.web3=null,this.provider=null,this.networkId=0,this.isConnecting=!1,this.account="",window.web3Instance=this}static getInstance(){return window.web3Instance}get chainAddUrl(){return this.chainId&&aN(this.chainId).urlName?"?chain="+aN(this.chainId).urlName:""}get canAutoConnect(){return!0}get isConnected(){return!!this.networkId}get isWalletBrowser(){const e=window;return"undefined"!==typeof e&&("undefined"!==typeof e.ethereum||"undefined"!==typeof e.web3)}get currentChain(){try{return 42440==this.networkId?{name:"Genesys Testnet",chainId:42440,shortName:"gsys",chain:"GSYS",network:"testnet",networkId:42440,nativeCurrency:{name:"Genesys",symbol:"GSYS",decimals:18},rpc:["https://testnet-rpc.genesys.network"],faucets:[],infoURL:"https://testnet-gchainexplorer.genesys.network"}:16507==this.networkId?{name:"Genesys Mainnet",chainId:16507,shortName:"gsys",chain:"GSYS",network:"mainnet",networkId:16507,nativeCurrency:{name:"Genesys",symbol:"GSYS",decimals:18},rpc:["https://rpc.genesys.network"],faucets:[],infoURL:"https://gchainexplorer.genesys.network"}:13600==this.networkId?{name:"Kronobit",chainId:13600,shortName:"knb",chain:"KNB",network:"mainnet",networkId:13600,nativeCurrency:{name:"Kronobit",symbol:"KNB",decimals:18},rpc:["https://mainnet-rpc.qbitscan.com"],faucets:[],infoURL:"https://explorer.qbitscan.com"}:8453==this.networkId?{name:"Base",chainId:8453,shortName:"base",chain:"ETH",network:"mainnet",networkId:8453,nativeCurrency:{name:"Ethereum",symbol
9688:"ETH",decimals:18},rpc:["https://mainnet.base.org"],faucets:[],infoURL:"https://basescan.org"}:KN.getChain(parseInt(this.networkId))}catch(e){}}async addAssetToWallet(e,t,n,r,i){if(this.networkId==e)try{await this.web3.currentProvider.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:t,symbol:n,decimals:r,image:i}}})}catch(s){TN.toastWarning("Problem adding asset to your wallet")}else TN.toastWarning("You are not connected to the correct network: "+oN[e].name)}async switchNetwork(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.networkId!==e)try{await this.web3.currentProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:this.web3.utils.toHex(e)}]})}catch(r){(4902==r.code||TN.mobileCheck())&&await this.addNetwork(e)}t?this.resetParamsAndReload(e):n&&this.resetParams()}async switchNetworkForceAndResetParams(e){try{await this.web3.currentProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:this.web3.utils.toHex(e)}]});let t=location.pathname;"/"==t&&(t=window.location.origin),window.history.replaceState("","",t)}catch(t){(4902==t.code||TN.mobileCheck())&&await this.addNetwork(e)}}resetParams(){let e=location.pathname;"/"==e&&(e=window.location.origin),window.history.replaceState("","",e)}async addNetwork(e){this.networkId=e,await this.web3.currentProvider.request({method:"wallet_addEthereumChain",params:[{chainId:this.web3.utils.toHex(e),chainName:this.currentChain.name,nativeCurrency:{name:this.currentChain.nativeCurrency.name,symbol:this.currentChain.nativeCurrency.symbol,decimals:this.currentChain.nativeCurrency.decimals},rpcUrls:this.currentChain.rpc,blockExplorerUrls:[this.currentChain.infoURL]}]}).catch((t=>{TN.toastWarningHTMLConfirm("Problem adding network",`<p>Try adding the network manually in your wallet:</p>\n <p>Chain ID: ${e}</p>\n <p>Chain Name: ${this.currentChain.name}</p>\n <p>Chain Symbol: ${this.currentChain.nativeCurrency.symbol}</p>\n <p>RPC URL: ${this.currentChain.rpc[0]}</p>\n <p>Explorer URL: ${this.currentChain.infoURL}</p>\n `)}))}async connect(e,t,n,r){if(!r)return null;this.isConnecting=!0;try{return this._provider||(this._provider=await n,this._provider.enable()),this._provider?(this.web3&&null!=this.web3&&(this.web3.eth&&this.web3.eth.clearSubscriptions&&this.web3.eth.clearSubscriptions(),this.web3=null),this.web3=new kq(this._provider),this.networkId=t,this.account=e,!0):{connected:!1}}finally{this.isConnecting=!1}}sign(e,t){return new Promise(((n,r)=>{this.provider.request({method:"eth_requestAccounts"}),this.web3.eth.personal.sign(this.web3.utils.fromUtf8(`I am signing my one-time nonce: ${e}`),t,((e,t)=>{e?r(e):n(t)}))}))}resetParamsAndReload(e){let t=location.pathname;"/"==t&&(t=window.location.origin),window.history.replaceState("","",t+this.chainAddUrl(e)),window.refreshApp()}async _requestAccount(){const e=await this.web3.eth.getAccounts(),t={connected:!0};return t.networkId=await this.web3.eth.net.getId(),t.account=e[0],t}async getNonce(e){return+await this.web3.eth.getTransactionCount(e)}async _getEthBalance(e){return await this.web3.eth.getBalance(e)}async _getEthBalanceBN(e){const t=await this.web3.eth.getBalance(e);return new ZN.A(t)}toHex(e){return this.web3.utils.toHex(e)}toWei(e,t){return this.web3.utils.toWei(e,t)}getContract(e,t){if(!e||"-"===e)throw new Error("Wrong contract address: "+e);return new this.web3.eth.Contract(t,e)}getContract2(e){return new this.web3.eth.Contract(e)}async verifyIfIsAddress(e){return await this.web3.utils.isAddress(e)}async verifyIfIsAddress2(e){try{return await this.web3.utils.toChecksumAddress(e)}catch(t){return console.error("invalid address",t.message),!1}}};const Aq=class{static sum(e){let t=0;return e.forEach((e=>t+=e)),t}static validateNumberPattern(e){return/^\s*[+-]?(\d+|\d*\.\d+|\d+\.\d*)([Ee][+-]?\d+)?\s*$/.test(e)}static parseUnits(e){return Tx(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:18)}static formatUnitsBNINP(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:18;return Ix(this.bigNumberToFixedString(e),t)}static formatUnits(e){return Ix(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:18)}static toWei(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:18;if(e instanceof ZN.g)return e;for(;e<1&&e>0&&t>0;)e*=10,t-=1;for(;t>0&&`${e}`.includes(".");)e*=10,t-=1;const n=new ZN.g(10).exponentiatedBy(t);return new ZN.g(e).multipliedBy(n)}static byDecimals(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:18;const n=new ZN.g(10).exponentiatedBy(t);return new ZN.g(e).dividedBy(n).toNumber()}static numberWithCommas(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}static numberDecimalsFixed(e,t){return e.toFixed(t)}static bigNumberToFixed(e){return e.toFixed(0)}static bigNumberToFixedString(e){return e.toFixed(0).toString()}static abbreviateNumber(e){var t=e;if(e>=1e3){for(var n=Math.floor((""+e).length/4),r="",i=3;i>=2;i--){if(((r=parseFloat((0!=n?e/Math.pow(1e3,n):e).toPrecision(i)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=3)break}r%1!=0&&(r=r.toFixed(2)),t=this.numberWithCommas(r)+["","k","m","b","t"][n]}return t}};const Sq=class{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.address=n,this.web3=e,this.abi=t,this.web3_ext=r,this.chain_ext=i}get zeroAddress(){return"0x0000000000000000000000000000000000000000"}get contract(){return this.web3_ext?this.web3_ext:this.web3.getContract(this.address,this.abi)}get chainId(){return this.chain_ext?this.chain_ext:this.web3.network}_dictionaryToArray(e){return Object.keys(e).map((t=>e[t]))}async estimateGasTopics(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{let r;const i=await this.web3.web3.eth.getGasPrice();return r=n?(await e.estimateGas({from:t,value:n})).toString():(await e.estimateGas({from:t})).toString(),{gas:r,gasPrice:i}}catch(r){throw console.error("Error fetching gas:",r),alert("Error fetching gas. Check if you have the funds to execute the transaction."),r}}async estimateGasTopicsWithoutAlert(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{let r;const i=await this.web3.web3.eth.getGasPrice();return r=n?(await e.estimateGas({from:t,value:n})).toString():(await e.estimateGas({from:t})).toString(),{gas:r,gasPrice:i}}catch(r){return console.error("Error fetching gas:",r),!1}}async estimateGasTopicsExtra(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=new ZN.A(n);try{let n;const s=await this.web3.web3.eth.getGasPrice();return n=r?Aq.bigNumberToFixedString(new ZN.A(await e.estimateGas({from:t,value:r})).multipliedBy(i)):Aq.bigNumberToFixedString(new ZN.A(await e.estimateGas({from:t})).multipliedBy(i)),{gas:n,gasPrice:s}}catch(s){return console.error("Error fetching gas:",s),!1}}};const Iq=class extends Sq{constructor(e,t,n,r){super(e,pN.PowaWormsCharacters,t,n,r)}async walletOfOwner(e){return await this.contract.methods.walletOfOwner(e).call()}async ownerOf(e){return await this.contract.methods.ownerOf(e).call()}async getNFTParts(e){return await this.contract.methods.getNFTParts(e).call()}async getNFTPartsPower(e){const t=await this.contract.methods.getNFTPartsPower(e).call();return parseInt(t)}async getNFTClass(e){const t=await this.contract.methods.getNFTClass(e).call();return parseInt(t)}async getApproved(e){return await this.contract.methods.getApproved(e).call()}async getTotalMinted(){return await this.contract.methods.getTotalMinted().call()}async approve(e,t,n){const r=this.contract.methods.approve(t,n),{gas:i,gasPrice:s}=await this.estimateGasTopics(r,e);return await r.send({from:e,gas:i,gasPrice:s})}};const Tq=class extends Sq{constructor(e,t,n,r){super(e,pN.PowaWormsArena,t,n,r)}async tokenRewardAddress(){return await this.contract.methods.token
9688RewardAddress().call()}async amountTokenForRegister(){const e=await this.contract.methods.amountTokenForRegister().call();return new ZN.g(e.toString())}async attackCooldown(){return await this.contract.methods.attackCooldown().call()}async attacksAvailableBeforeCooldown(){return await this.contract.methods.attacksAvailableBeforeCooldown().call()}async baseExperienceForBattle(){return await this.contract.methods.baseExperienceForBattle().call()}async basePriceToBuyCoolDown(){const e=await this.contract.methods.basePriceToBuyCoolDown().call();return new ZN.g(e.toString())}async basePriceToBuyLevels(){const e=await this.contract.methods.basePriceToBuyLevels().call();return new ZN.g(e.toString())}async basePrizeForBattle(){const e=await this.contract.methods.basePrizeForBattle().call();return new ZN.g(e.toString())}async battleHistory(e){return await this.contract.methods.battleHistory(e).call()}async battleID(){return await this.contract.methods.battleID().call()}async buyAttackRechargeCooldown(e){return await this.contract.methods.buyAttackRechargeCooldown(e).call()}async buyDefenseCooldownRecharge(e){return await this.contract.methods.buyDefenseCooldownRecharge(e).call()}async buyAttackRechargeCooldownTime(){return await this.contract.methods.buyAttackRechargeCooldownTime().call()}async characterAttributes(e){return await this.contract.methods.characterAttributes(e).call()}async characterBuyedLevels(e){return await this.contract.methods.characterBuyedLevels(e).call()}async isPlaying(e){return await this.contract.methods.isPlaying(e).call()}async searchIndexOfPlayer(e,t,n){return await this.contract.methods.searchIndexOfPlayer(e,t,n).call()}async characterOfPlayer(e){const t=await this.contract.methods.characterOfPlayer(e).call();return parseInt(t)}async characterStats(e){return await this.contract.methods.characterStats(e).call()}async characterTokenBalance(e){const t=await this.contract.methods.characterTokenBalance(e).call();return new ZN.g(t.toString())}async checkForOffsetWithOpponents(e,t){return await this.contract.methods.checkForOffsetWithOpponents(e,t).call()}async classAdvantage(e){return await this.contract.methods.classAdvantage(e).call()}async defenceCooldown(){return await this.contract.methods.defenceCooldown().call()}async gamePaused(){return await this.contract.methods.gamePaused().call()}async playersLength(){return await this.contract.methods.playersLength().call()}async playerRegistered(){return await this.contract.methods.playerRegistered().call()}async maxAvailableLevelsToBuy(){return await this.contract.methods.maxAvailableLevelsToBuy().call()}async maxDaysToBuyCoolDown(){return await this.contract.methods.maxDaysToBuyCoolDown().call()}async maxLeague(){return await this.contract.methods.maxLeague().call()}async maxLevel(){return await this.contract.methods.maxLevel().call()}async maxSearchingLoops(){return await this.contract.methods.maxSearchingLoops().call()}async maxStages(){return await this.contract.methods.maxStages().call()}async minLockTime(){return await this.contract.methods.minLockTime().call()}async minLockTimeForCharacter(e){return await this.contract.methods.minLockTimeForCharacter(e).call()}async ownerOfCharacter(e){return await this.contract.methods.ownerOfCharacter(e).call()}async priceToBuyAttackRecharge(){const e=await this.contract.methods.priceToBuyAttackRecharge().call();return new ZN.g(e.toString())}async stagesAdv(e){return await this.contract.methods.stagesAdv(e).call()}async winRatioForEachLeague(){return await this.contract.methods.winRatioForEachLeague().call()}async getNFTBattleHistory(e,t,n,r){return await this.contract.methods.getNFTBattleHistory(e,t,n,r).call()}async registerNFT(e,t){const n=this.contract.methods.registerNFT(t),{gas:r,gasPrice:i}=await this.estimateGasTopics(n,e);return await n.send({from:e,gas:r,gasPrice:i})}async rechargeBalanceNFT(e,t){const n=this.contract.methods.rechargeBalanceNFT(t),{gas:r,gasPrice:i}=await this.estimateGasTopics(n,e);return await n.send({from:e,gas:r,gasPrice:i})}async battle(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1.2,n=this.contract.methods.battle();const r=await this.estimateGasTopicsExtra(n,e,t),i=r.gas,s=r.gasPrice;return await n.send({from:e,gas:i,gasPrice:s})}async claimNFTandRewards(e,t){const n=this.contract.methods.claimNFTandRewards(t),{gas:r,gasPrice:i}=await this.estimateGasTopics(n,e);return await n.send({from:e,gas:r,gasPrice:i})}async claimOnlyRewards(e,t){const n=this.contract.methods.claimOnlyRewards(t),{gas:r,gasPrice:i}=await this.estimateGasTopics(n,e);return await n.send({from:e,gas:r,gasPrice:i})}async upLevel(e,t,n){const r=this.contract.methods.upLevel(t,n),{gas:i,gasPrice:s}=await this.estimateGasTopics(r,e);return await r.send({from:e,gas:i,gasPrice:s})}async buyLevel(e,t,n,r,i){const s=await this.basePriceToBuyLevels(),o=new ZN.g(s).multipliedBy(new ZN.g(r+1));if(i.lt(o))return"gas";{const r=Aq.bigNumberToFixedString(new ZN.g(o)),i=this.contract.methods.buyLevel(t,n),{gas:s,gasPrice:a}=await this.estimateGasTopics(i,e,r);return await i.send({from:e,gas:s,gasPrice:a,value:r})}}async buyDefenceCooldown(e,t,n){const r=await this.basePriceToBuyCoolDown(),i=new ZN.g(r).multipliedBy(new ZN.g(n)),s=Aq.bigNumberToFixedString(new ZN.g(i)),o=this.contract.methods.buyDefenceCooldown(t,n),{gas:a,gasPrice:c}=await this.estimateGasTopics(o,e,s);return await o.send({from:e,gas:a,gasPrice:c,value:s})}async buyAttackRecharge(e,t,n){const r=await this.priceToBuyAttackRecharge(),i=new ZN.g(r);if(n.lt(i))return"gas";{const n=Aq.bigNumberToFixedString(new ZN.g(r)),i=this.contract.methods.buyAttackRecharge(t),{gas:s,gasPrice:o}=await this.estimateGasTopics(i,e,n);return await i.send({from:e,gas:s,gasPrice:o,value:n})}}};const Pq=class extends Sq{constructor(e,t,n,r){super(e,pN.PowaWormsMinter,t,n,r)}async lock(){return await this.contract.methods.lock().call()}async tokensSold(){return await this.contract.methods.tokensSold().call()}async buyersCount(){return await this.contract.methods.buyersCount().c
9688all()}async baseCost(){return await this.contract.methods.baseCost().call()}async percentForRefer(){return await this.contract.methods.percentForRefer().call()}async tokenPartnersDiscountEnabled(){return await this.contract.methods.tokenPartnersDiscountEnabled().call()}async NFTOriginalBuyer(e){return await this.contract.methods.NFTOriginalBuyer(e).call()}async getTokenPartnerInfo(e){return await this.contract.methods.getTokenPartnerInfo(e).call()}async getUserRewardsCollected(e){return await this.contract.methods.getUserRewardsCollected(e).call()}async checkTokenPartnerUserCompliance(e,t){return await this.contract.methods.checkTokenPartnerUserCompliance(t).call({from:e})}async checkTokenPartnerUserBestDiscount(e){return await this.contract.methods.checkTokenPartnerUserBestDiscount().call({from:e})}async getMinCostForUser(e){return await this.contract.methods.getMinCostForUser().call({from:e})}async buy(e,t,n,r){const i=new ZN.g(await this.getMinCostForUser(e));if(r.lt(i))return"gas";{const r=Aq.bigNumberToFixedString(i);
9688let s=this.contract.methods.buy(t,n);const o=await this.estimateGasTopicsExtra(s,e,1.2,r),a=o.gas,c=o.gasPrice;return await s.send({from:e,value:r,gas:a,gasPrice:c})}}};const Nq=class extends Sq{constructor(e,t,n,r){super(e,pN.erc20,t,n,r)}async getSymbol(){return await this.contract.methods.symbol().call()}async getName(){return await this.contract.methods.name().call()}async getDecimals(){const e=await this.contract.methods.decimals().call();return new ZN.g(e).toNumber()}async getTotalSupply(){const e=await this.contract.methods.totalSupply().call();return new ZN.g(e.toString())}async balanceOf(e){const t=await this.contract.methods.balanceOf(e).call(),n=await this.contract.methods.decimals().call();return Aq.byDecimals(t,n)}async blockchainBalanceOf(e){const t=await this.contract.methods.balanceOf(e).call();return new ZN.g(t.toString())}async allowance(e,t){const n=await this.contract.methods.allowance(e,t).call();return new ZN.g(n.toString())}async approve(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:18;const i=this.contract.methods.approve(t,Aq.toWei(n,r).toFixed(0)),{gas:s,gasPrice:o}=await this.estimateGasTopics(i,e);return await i.send({from:e,gas:s,gasPrice:o})}async approveRaw(e,t,n){const r=this.contract.methods.approve(t,n),{gas:i,gasPrice:s}=await this.estimateGasTopics(r,e);return await r.send({from:e,gas:i,gasPrice:s})}async transfer(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:18;const i=this.contract.methods.transfer(t,Aq.toWei(n,r).toFixed(0)),{gas:s,gasPrice:o}=await this.estimateGasTopics(i,e);return await i.send({from:e,gas:s,gasPrice:o})}};const Rq=class{static getExternalWeb3(e,t,n){return new(new kq(oN[e].rpc).eth.Contract)(t,n)}static getPowaWormsCharactersContract(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=!!t&&this.getExternalWeb3(t,pN.PowaWormsCharacters,e);return new Iq(_2,e,n,t)}static getPowaWormsArenaContract(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=!!t&&this.getExternalWeb3(t,pN.PowaWormsArena,e);return new Tq(_2,e,n,t)}static getPowaWormsMinterContract(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=!!t&&this.getExternalWeb3(t,pN.PowaWormsMinter,e);return new Pq(_2,e,n,t)}static getErc20Contract(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=!!t&&this.getExternalWeb3(t,pN.erc20,e);return new Nq(_2,e,n,t)}},Oq=e=>t=>{const n=ne();return(0,iN.jsx)(e,{navigate:n,...t})};class Mq extends c.Component{constructor(e){super(e),this.state={isLoadingBlockchainData:!0,blockChainData:{},inArena:!1,someArenaSpace:!1,indexArenaSpaces:[]}}get currentAddress(){return this.props.connStatus.address}componentDidMount(){this.loadData()}async loadData(){this.setState({...this.state,isLoadingBlockchainData:!0},(async()=>{try{this.props.gameManager.loadSingleNFTBasicData(this.props.nftId,this.props.layersData).then((e=>{let t=!1,n=!1,r=[];for(let i=0;i<this.props.userNftInArena.length;i++)this.props.userNftInArena[i].userNftInArena.toString()===this.props.nftId.toString()&&(t=this.props.userNftInArena[i]),0==this.props.userNftInArena[i].userNftInArena&&(n=!0,r.push(this.props.userNftInArena[i].arenaIndex));this.setState({...this.state,blockChainData:e,isLoadingBlockchainData:!1,inArena:t,someArenaSpace:n,indexArenaSpaces:r})}))}catch(e){console.error(e),this.setState({...this.state,blockChainData:{},isLoadingBlockchainData:!1})}}))}render(){return this.state.isLoadingBlockchainData?(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"pe-5",children:(0,iN.jsx)("div",{className:"",children:(0,iN.jsx)("div",{className:"card custom-card-mini gradient-border",children:(0,iN.jsxs)("div",{className:"nftCardMini_loading_container",children:[(0,iN.jsx)("div",{className:"nftCardMini_loading_icon_float",children:(0,iN.jsx)("i",{className:"fa fa-spin fa-spinner"})}),(0,iN.jsx)("img",{src:"/assets/img/battle_eff/loading_worm.png",className:"nftCardMini_loading_img"})]})})})})}):(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"pe-5",children:(0,iN.jsx)("div",{className:"",children:(0,iN.jsx)("div",{className:"card custom-card-mini gradient-border "+this.state.blockChainData.rarityName,children:(0,iN.jsxs)("div",{className:"nftCardMini_container",children:[(0,iN.jsx)("img",{className:"nftCardMini_classIcon",alt:qN.transform(this.state.blockChainData.userNftClass),src:"/assets/img/nft_class_icon/"+this.state.blockChainData.userNftClass+".png"}),(0,iN.jsxs)("div",{className:"nftCardMini_img_container",children:[(0,iN.jsx)("img",{className:"nftCardMini_img_part nftCard_img_Slime",src:WN.img+"Slime/"+encodeURIComponent(this.state.blockChainData.userNftPartsData.Slime.src)}),(0,iN.jsx)("img",{className:"nftCardMini_img_part nftCard_img_Tail",src:WN.img+"Tail/"+encodeURIComponent(this.state.blockChainData.userNftPartsData.Tail.src)}),(0,iN.jsx)("img",{className:"nftCardMini_img_part nftCard_img_Wings",src:WN.img+"Wings/"+encodeURIComponent(this.state.blockChainData.userNftPartsData.Wings.src)}),(0,iN.jsx)("img",{className:"nftCardMini_img_part nftCard_img_Body",src:WN.img+"Body/"+encodeURIComponent(this.state.blockChainData.userNftPartsData.Body.src)}),(0,iN.jsx)("img",{className:"nftCardMini_img_part nftCard_img_Ears",src:WN.img+"Ears/"+encodeURIComponent(this.state.blockChainData.userNftPartsData.Ears.src)}),(0,iN.jsx)("img",{className:"nftCardMini_img_part nftCard_img_Eyes",src:WN.img+"Eyes/"+encodeURIComponent(this.state.blockChainData.userNftPartsData.Eyes.src)}),(0,iN.jsx)("img",{className:"nftCardMini_img_part nftCard_img_Mouth",
9688src:WN.img+"Mouth/"+encodeURIComponent(this.state.blockChainData.userNftPartsData.Mouth.src)})]}),(0,iN.jsxs)("div",{className:"nftCardMini_info_container",children:[(0,iN.jsxs)("h5",{children:["Worm #",this.props.nftId]}),(0,iN.jsx)("div",{className:"nftCardMini_powaforce",children:(0,iN.jsxs)("span",{className:"nftCardMini_powaforce_sub",children:["POWAFORCE: ",this.state.blockChainData.userNftTotalPower]})})]}),(0,iN.jsxs)("div",{className:"nftCardMini_action_container",children:[(0,iN.jsx)("div",{className:"d-grid gap-2",children:(0,iN.jsx)(Pe,{to:"/worm/"+this.props.nftId+this.props.gameManager.chainAddUrl,className:"neonBtn nbtnMini mt-1",children:"View Info"})}),(0,iN.jsxs)("div",{className:"d-grid gap-2",children:[this.state.inArena&&(0,iN.jsx)(Pe,{to:"/arena/"+this.state.inArena.arenaUrl+this.props.gameManager.chainAddUrl,className:"neonBtn nbtn3 nbtnMini mt-3",children:this.state.inArena.arenaName}),this.state.someArenaSpace&&!this.state.inArena&&(0,iN.jsx)("button",{onClick:()=>this.registerNFT(),className:"neonBtn nbtn2 nbtnMini mt-3",children:"Enter Arena"}),!this.state.someArenaSpace&&!this.state.inArena&&(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("button",{onClick:()=>window.Swal.fire("No available spaces","There are no available spaces in the arenas to enter with this worm.","info"),className:"disabled neonBtn nbtn2 nbtnMini mt-3",children:"Enter Arena"})})]})]})]})})})},this.props.nftId)})}async renderArenaOptions(){return(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("select",{id:"registerArenaOptions",className:"form-select",children:wN[this.props.gameManager.chainId].map(((e,t)=>(0,iN.jsxs)("option",{disabled:!this.state.indexArenaSpaces.includes(e.index),value:e.index,children:[e.name," - ",this.props.userNftInArena[e.index].playersLength," players active"]},t)))})})}async registerNFT(){const{value:e}=await window.Swal.fire({title:"Select Arena",html:zN.renderToStaticMarkup(await this.renderArenaOptions()),focusConfirm:!1,showConfirmButton:!0,confirmButtonText:'\n <i class="fa-solid fa-right-to-bracket"></i> Join Arena!\n ',preConfirm:()=>document.getElementById("registerArenaOptions").value});if(!e)return;const t=wN[this.props.gameManager.chainId][e],n=this.props.tokensData[e];window.Swal.fire({title:"Welcome to the Arena!",html:`To enter the <strong>${t.name}</strong> you must consider that the worm and the minimum entry funds (<strong>${n.tokenRewardInfo.amountTokenForRegisterNormal} ${n.tokenRewardInfo.symbol}</strong>) will be blocked for <strong>24 hours</strong> and you will not be able to withdraw (the minimum funds and the NFT) until after that time.<br><br>Also all statistics such as levels, attributes, etc. will correspond only to the arena you are going to enter.`,icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, let's do it!"}).then((e=>{if(e.isConfirmed){const e=n.tokenRewardInfo.amountTokenForRegister,r=Aq.bigNumberToFixedString(e);this.props.gameManager.registerNFT(t,this.props.nftId,e,r).then((e=>{e&&this.props.navigate("/arena/"+t.urlName)}))}}))}}const jq=Oq(Mq),Lq={56:[{tokenContract:"0x5FDa925294F9e5B31b7c0e81Bad6BAD5b5E792eE",tokenDecimals:18,tokenName:"Powabit Token",tokenSymbol:"POWA"},{tokenContract:"0xcb8382B4F7Bc012F0eff12e62Ca2801F54aca975",tokenDecimals:18,tokenName:"Baby Bitcoin",tokenSymbol:"BBTC"}],42440:[{tokenContract:"0x8272FE566De40938D306646b23901885AA6C0502",tokenDecimals:18,tokenName:"TOKGAM",tokenSymbol:"TOKGAM"}],8453:[{tokenContract:"0x67838fc7dC7E801A0C02Fd0ac1e667a2Affd0e5E",tokenDecimals:18,tokenName:"Nitro Layer",tokenSymbol:"NILEX"}]};const Dq=class{constructor(e){this._erc20Contract=null,this.arenaId=e,this.cache={},this.cache.tokenInfo=[],this.cache.normalTokenInfo=[]}get web3(){return _2}get arenaID(){return this.arenaId}get chainId(){var e;return null===(e=this.web3)||void 0===e?void 0:e.networkId}get currentAddress(){return this.web3.account}get chainAddUrl(){return this.chainId?"?chain="+oN[this.chainId].urlName:""}get generalService(){return zq.getGeneralService()}get generalManager(){return this.generalService.getGeneralManager()}get PowaWormsCharactersAddress(){return mN[this.web3.networkId].PowaWormsCharacters||fN}get PowaWormsCharactersContract(){return Rq.getPowaWormsCharactersContract(this.PowaWormsCharactersAddress)}get PowaWormsArenaAddress(){return wN[this.web3.networkId][this.arenaId].PowaWormsArena||fN}get PowaWormsMinterAddress(){return mN[this.web3.networkId].PowaWormsMinter||fN}get PowaWormsArenaContract(){return Rq.getPowaWormsArenaContract(this.PowaWormsArenaAddress)}get PowaWormsMinterContract(){return Rq.getPowaWormsMinterContract(this.PowaWormsMinterAddress)}get DiscountTokens(){return Lq[this.web3.networkId]||[]}get GameTokenAddress(){return wN[this.web3.networkId][this.arenaId].GameToken||fN}get GameTokenContract(){return Rq.getErc20Contract(this.GameTokenAddress)}async loadAllLayersData(){try{const e=await fetch(WN.dictionary);return await e.json()}catch(e){return console.log(e),!1}}async loadNFTjsonMetadata(e){try{const t=await fetch(HN[this.chainId].json+e+".json");return await t.json()}catch(t){return console.log(t),!1}}async loadBasicGeneralData(){try{const e=await this.PowaWormsCharactersContract.getTotalMinted();return{totalNftMinted:parseInt(e)}}catch(e){return!1}}async loadWalletTokensData(){try{let e=[];const t=wN[this.web3.networkId];for(let n=0;n<t.length;n++){const r=Rq.getPowaWormsArenaContract(t[n].PowaWormsArena),i=t[n].GameToken,s=t[n].name,o=t[n].urlName,a=t[n].index,c=t[n].tokenName,l=t[n].tokenSymbol,u=t[n].tokenDecimals,d=Rq.getErc20Contract(i),h=await d.blockchainBalanceOf(this.currentAddress),p=Aq.byDecimals(h,u),f=await r.amountTokenForRegister(),m={name:c,symbol:l,decimals:u,tokenRewardBalance:h,tokenRewardBalanceNormal:p,amountTokenForRegister:f,amountTokenForRegisterNormal:Aq.byDecimals(f,u),arena_name:s,arena_url:o,arena_index:a};
9688e.push({tokenReward:i,tokenRewardInfo:m})}return e}catch(e){return console.log(e),!1}}async loadWalletNFTsIDs(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{const t=await this.PowaWormsCharactersContract.walletOfOwner(this.currentAddress);let n=[],r=t.map((e=>parseInt(e)));if(e){let e=[];const t=wN[this.web3.networkId];for(let r=0;r<t.length;r++){const i=Rq.getPowaWormsArenaContract(t[r].PowaWormsArena),s=await i.characterOfPlayer(this.currentAddress),o=await i.playersLength(),a=await i.playerRegistered(),c=parseInt(s);c>0&&n.push(c),e.push({arenaIndex:t[r].index,arenaName:t[r].name,arenaUrl:t[r].urlName,userNftInArena:c,playersLength:parseInt(o),playerRegistered:parseInt(a)})}return n=n.concat(r),{userNft:n,userNftInArena_multi:e}}{const e=await this.PowaWormsArenaContract.characterOfPlayer(this.currentAddress);let t=parseInt(e);return t>0&&r.push(t),{userNft:r,userNftInArena:t}}}catch(t){return console.log(t),!1}}async loadWalletNFTinArena(){try{const e=await this.PowaWormsArenaContract.characterOfPlayer(this.currentAddress);return{userNftInArena:parseInt(e)}}catch(e){return!1}}async loadWalletNFTsData(e){try{const t=await this.PowaWormsCharactersContract.walletOfOwner(this.currentAddress),n=await this.PowaWormsArenaContract.characterOfPlayer(this.currentAddress);let r=parseInt(n),i=t.map((e=>parseInt(e)));r>0&&i.push(r);let s={},o={},a={},c={};for(const l of i)s[l]=await this.PowaWormsCharactersContract.getNFTParts(l),a[l]=await this.PowaWormsCharactersContract.getNFTPartsPower(l),c[l]=await this.PowaWormsCharactersContract.getNFTClass(l),o[l]={Body:e[parseInt(s[l][0])],Ears:e[parseInt(s[l][1])],Eyes:e[parseInt(s[l][2])],Mouth:e[parseInt(s[l][3])],Slime:e[parseInt(s[l][4])],Wings:e[parseInt(s[l][5])],Tail:e[parseInt(s[l][6])]};return{userNft:i,userNftPartsIDs:s,userNftPartsData:o,userNftTotalPower:a,userNftClass:c,userNftInArena:r}}catch(t){return!1}}async loadSingleNFTBasicData(e,t){try{let n,r,i,s;n=await this.PowaWormsCharactersContract.getNFTParts(e),i=await this.PowaWormsCharactersContract.getNFTPartsPower(e),s=await this.PowaWormsCharactersContract.getNFTClass(e),r={Body:t[parseInt(n[0])],Ears:t[parseInt(n[1])],Eyes:t[parseInt(n[2])],Mouth:t[parseInt(n[3])],Slime:t[parseInt(n[4])],Wings:t[parseInt(n[5])],Tail:t[parseInt(n[6])]};let o=!1,a=r.Body.name;r.Ears.name==a&&r.Eyes.name==a&&r.Mouth.name==a&&r.Slime.name==a&&r.Wings.name==a&&r.Tail.name==a&&(o=!0);let c=0;c+=parseInt(r.Body.rarity),c+=parseInt(r.Ears.rarity),c+=parseInt(r.Eyes.rarity),c+=parseInt(r.Mouth.rarity),c+=parseInt(r.Slime.rarity),c+=parseInt(r.Wings.rarity),c+=parseInt(r.Tail.rarity);let l=c/7,u="Undefined";return u=o?"Genesis":l<=20?"Legendary":l<=40?"Epic":l<=50?"Rare":l<=60?"Uncommon":"Common",{userNftPartsIDs:n,userNftPartsData:r,userNftTotalPower:i,userNftClass:s,isGenesis:o,rarityPerc:l,rarityName:u}}catch(n){return!1}}async loadSingleNFTExtendedData(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{const r=await this.loadSingleNFTBasicData(e,t);if(n){let t=[];const n=wN[this.web3.networkId];let i=!1,s=!1;for(let r=0;r<n.length;r++){const o=Rq.getPowaWormsArenaContract(n[r].PowaWormsArena);let a,c,l=null;a=await o.characterStats(e);let u={initialized:a.initialized,attackLost:parseInt(a.attackLost),attackTimestampCooldown:parseInt(a.attackTimestampCooldown),attackWins:parseInt(a.attackWins),attacksAvailable:parseInt(a.attacksAvailable),defenceLost:parseInt(a.defenceLost),defenceTimestampCooldown:parseInt(a.defenceTimestampCooldown),defenceWins:parseInt(a.defenceWins),draw:parseInt(a.draw),totalBattleCount:parseInt(a.totalBattleCount),experienceForNextLevel:parseInt(a.experienceForNextLevel),experienceInLevel:parseInt(a.experienceInLevel),experienceTotal:parseInt(a.experienceTotal),level:parseInt(a.level)},d=0,h=0,p=u.draw+u.attackWins+u.defenceWins+u.attackLost+u.defenceLost;p>0&&(d=u.attackWins+u.defenceWins,h=100*d/p),1==u.initialized&&(l=await o.characterAttributes(e),c=await o.isPlaying(e)),c&&(s=await o.ownerOfCharacter(e),i=n[r].name),t.push({arenaData:n[r],characterStats:u,totalBattleCountEff:p,characterWinsQ:d,characterWinRate:h,characterAttributes:l,isPlaying:c})}return s||(s=await this.PowaWormsCharactersContract.ownerOf(e)),{...r,multiStats:t,ownerOfCharacter:s,isPlayingArena:i}}{let t,n,i,s=null;t=await this.PowaWormsArenaContract.characterStats(e);let o={initialized:t.initialized,attackLost:parseInt(t.attackLost),attackTimestampCooldown:parseInt(t.attackTimestampCooldown),attackWins:parseInt(t.attackWins),attacksAvailable:parseInt(t.attacksAvailable),defenceLost:parseInt(t.defenceLost),defenceTimestampCooldown:parseInt(t.defenceTimestampCooldown),defenceWins:parseInt(t.defenceWins),draw:parseInt(t.draw),totalBattleCount:parseInt(t.totalBattleCount),experienceForNextLevel:parseInt(t.experienceForNextLevel),experienceInLevel:parseInt(t.experienceInLevel),experienceTotal:parseInt(t.experienceTotal),level:parseInt(t.level)},a=0,c=0,l=o.draw+o.attackWins+o.defenceWins+o.attackLost+o.defenceLost;return l>0&&(a=o.attackWins+o.defenceWins,c=100*a/l),1==o.initialized&&(s=await this.PowaWormsArenaContract.characterAttributes(e),i=await this.PowaWormsArenaContract.isPlaying(e)),n=i?await this.PowaWormsArenaContract.ownerOfCharacter(e):await this.PowaWormsCharactersContract.ownerOf(e),{...r,characterStats:o,totalBattleCountEff:l,characterWinsQ:a,characterWinRate:c,characterAttributes:s,isPlaying:i,ownerOfCharacter:n}}}catch(r){return!1}}
9688async loadSingleNFTExtendedDataForArena(e,t){try{const n=await this.loadSingleNFTExtendedData(e,t);let r=await this.PowaWormsArenaContract.tokenRewardAddress(),i=Rq.getErc20Contract(r),s=await i.getName(),o=await i.getSymbol(),a=await i.getDecimals(),c={name:s,symbol:o,decimals:a},l=await this.PowaWormsArenaContract.amountTokenForRegister(),u=Aq.byDecimals(l,a),d=await this.PowaWormsArenaContract.basePrizeForBattle(),h=Aq.byDecimals(d,a),p=0,f=0,m=10,g=0,y=0,v=0,w=0,b=0,x=0,E=0,_=5,k=40,C=0,A=0,S=5,I=0,T="0",P=0;return 1==n.characterStats.initialized&&(f=await this.PowaWormsArenaContract.buyDefenseCooldownRecharge(e),p=await this.PowaWormsArenaContract.buyAttackRechargeCooldown(e),m=await this.PowaWormsArenaContract.maxAvailableLevelsToBuy(e),g=await this.PowaWormsArenaContract.characterBuyedLevels(e),y=await this.PowaWormsArenaContract.characterTokenBalance(e),v=Aq.byDecimals(y,a),w=await this.PowaWormsArenaContract.minLockTimeForCharacter(e),b=await this.PowaWormsArenaContract.playersLength(),x=await this.PowaWormsArenaContract.playerRegistered(),_=await this.PowaWormsArenaContract.attacksAvailableBeforeCooldown(),k=await this.PowaWormsArenaContract.maxLevel(),E=v-u,E<0&&(E=0),C=await this.PowaWormsArenaContract.basePriceToBuyLevels(),A=Aq.byDecimals(C,18),S=await this.PowaWormsArenaContract.maxDaysToBuyCoolDown(),y<l&&(I=new ZN.g(l).minus(new ZN.g(y)),T=Aq.bigNumberToFixedString(I),P=Aq.byDecimals(I,a))),{...n,amountTokenForRegister:l,amountTokenForRegisterNormal:u,amountToRechargeArenaBalance:I,amountToRechargeArenaBalance_str:T,amountToRechargeArenaBalanceNormal:P,basePrizeForBattle:d,basePrizeForBattleNormal:h,characterTokenProfit:E,buyAttackRechargeCooldown:parseInt(p),buyDefenseCooldownRecharge:parseInt(f),maxAvailableLevelsToBuy:parseInt(m),characterBuyedLevels:parseInt(g),playersLength:parseInt(b),playerRegistered:parseInt(x),characterTokenBalance:y,characterTokenBalanceNormal:v,minLockTimeForCharacter:parseInt(w),tokenReward:r,tokenRewardInfo:c,attacksAvailableBeforeCooldown:parseInt(_),maxLevel:parseInt(k),basePriceToBuyLevels:C,basePriceToBuyLevelsNormal:A,maxDaysToBuyCoolDown:parseInt(S)}}catch(n){return console.log(n),!1}}async searchingNftIndex(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50;try{const r=await this.PowaWormsArenaContract.searchIndexOfPlayer(e,t,n);return parseInt(r)}catch(r){return await this.searchingNftIndex(e,n,n+50)}}timestampToIsoDate(e){if(!e)return"";const t=new Date(e);let n=new Date(t.getTime()-6e4*t.getTimezoneOffset()).toISOString().slice(0,-1);n=n.split(".")[0];let r=n.split("T");return n=r[0]+" "+r[1],n}async battleHistoryFullInfo(e,t,n){const r=this.PowaWormsArenaContract;try{window.showLoader("Loading battle history");const i=await r.battleHistory(t),s=parseInt(i.attackCharacter),o=parseInt(i.defenceCharacter),a=parseInt(i.finalAttackPower),c=parseInt(i.finalDefencePower),l=i.luckyActive,u=parseInt(i.result),d=parseInt(i.seed),h=parseInt(i.stage),p=parseInt(i.timestamp),f=parseInt(i.totalAttackPower),m=parseInt(i.totalDefencePower),g=i.prizeRaw,y=parseInt(i.prizeMinusPerc),v=y>0;let w,b=!1,x=!1,E=!1,_=!1;e==s?(w=o,b=1==u,_=!0):(w=s,b=2==u,_=!1),3==u&&(x=!0),4==u&&(E=!0);const k=await this.loadSingleNFTBasicData(w,n),C=await this.PowaWormsArenaContract.characterAttributes(w);return window.hideLoader(),{id:t,attackCharacter:s,defenceCharacter:o,finalAttackPower:a,finalDefencePower:c,luckyActive:l,result:u,seed:d,stage:h,timestamp:p,totalAttackPower:f,totalDefencePower:m,opponent:w,battleWin:b,battleDraw:x,battleOpponentDefenseCooldown:E,oponentData:k,oponentData_attr:C,playerIsAttacker:_,prizeRaw_bn:g,prizeMinusPerc:y,prizeWithFee:v}}catch(i){return console.error("Error fetching battle history:",i),!1}}async getNFTBattleHistory(e,t,n,r){const i=this.PowaWormsArenaContract,s=await i.getNFTBattleHistory(e,t,n,r);let o=[];for(let a=0;a<s.length;a++){const t=parseInt(s[a]),n=await i.battleHistory(t);let r,c=!1,l=!1,u=!1,d=!1;e==parseInt(n.attackCharacter)?(r=parseInt(n.defenceCharacter),c=1==parseInt(n.result),d=!0):(r=parseInt(n.attackCharacter),c=2==parseInt(n.result),d=!1),3==parseInt(n.result)&&(l=!0),4==parseInt(n.result)&&(u=!0);const h=this.timestampToIsoDate(1e3*parseInt(n.timestamp)),p=parseInt(n.prizeMinusPerc),f=p>0;o.push({id:t,attackCharacter:parseInt(n.attackCharacter),defenceCharacter:parseInt(n.defenceCharacter),finalAttackPower:parseInt(n.finalAttackPower),finalDefencePower:parseInt(n.finalDefencePower),luckyActive:n.luckyActive,result:parseInt(n.result),seed:parseInt(n.seed),stage:parseInt(n.stage),timestamp:parseInt(n.timestamp),date:h,totalAttackPower:parseInt(n.totalAttackPower),totalDefencePower:parseInt(n.totalDefencePower),opponent:r,battleWin:c,battleDraw:l,battleOpponentDefenseCooldown:u,playerIsAttacker:d,prizeRaw_bn:n.prizeRaw,prizeMinusPerc:p,prizeWithFee:f})}return o}async registerNFT(e,t,n,r){let i="",s=!1;try{window.showLoader("Joining "+e.name);const o=this.PowaWormsCharactersContract,a=Rq.getErc20Contract(e.GameToken),c=Rq.getPowaWormsArenaContract(e.PowaWormsArena),l=await a.allowance(this.currentAddress,e.PowaWormsArena);if((await a.blockchainBalanceOf(this.currentAddress)).isLessThan(n))throw i=": Insufficient token balance",new Error("Insufficient token balance");(l.isNaN()||l.isLessThan(n))&&(window.hideLoader(),window.showLoader("Approving "+e.tokenSymbol+" tokens"),await a.approveRaw(this.currentAddress,e.PowaWormsArena,r),window.hideLoader()),window.showLoader("Joining "+e.name);(await o.getApproved(t)).toLowerCase()!==e.PowaWormsArena.toLowerCase()&&(window.hideLoader(),window.showLoader("Approving NFT"),await o.approve(this.currentAddress,e.PowaWormsArena,t),window.hideLoader()),window.showLoader("Joining "+e.name);await c.registerNFT(this.currentAddress,t)&&(s=!0)}catch(o){return console.error(o),TN.toastError(o),!1}
9688finally{return window.hideLoader(),s?(TN.toastSuccess("NFT registered successfully"),!0):(TN.toastError("Error registering NFT"+i),!1)}}async rechargeBalanceNFT(e,t,n){let r=!1;try{window.showLoader("Recharging Arena Balance");this.PowaWormsCharactersContract;const i=this.GameTokenContract,s=this.PowaWormsArenaContract,o=await i.allowance(this.currentAddress,this.PowaWormsArenaAddress);if((await i.blockchainBalanceOf(this.currentAddress)).isLessThan(t))throw new Error("Insufficient token balance");(o.isNaN()||o.isLessThan(t))&&(window.hideLoader(),window.showLoader("Approving tokens"),await i.approveRaw(this.currentAddress,this.PowaWormsArenaAddress,n),window.hideLoader()),window.showLoader("Recharging Arena Balance");await s.rechargeBalanceNFT(this.currentAddress,e)&&(r=!0)}catch(i){return console.error(i),TN.toastError(i),!1}finally{return window.hideLoader(),r?(TN.toastSuccess("Arena Balance recharged successfully"),!0):(TN.toastError("Error recharging Arena Balance"),!1)}}async battle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=!1,n=1;e<=0?n=1:1==e?n=1.1:2==e?n=1.2:3==e&&(n=1.3);let r=!1,i=!1;try{window.showLoader("Looking for an opponent");const e=this.PowaWormsArenaContract,t=await e.battle(this.currentAddress,n);t&&(i=t)}catch(s){return console.error(s.code.toString()),"100"==s.code.toString()&&(r=!0),!r&&(e<3?(TN.toastWarning("Error fetching gas price, trying again"),t=!0,await this.battle(e+1)):(TN.toastWarning("Error selecting opponent, please try again."),!1))}finally{if(!t)return window.hideLoader(),i?(TN.toastSuccess("Battle success"),i):r?(TN.toastWarning("User denied transaction"),!1):(TN.toastWarning("No available opponents found, please try again."),!1)}}async claimNFTandRewards(e){let t=!1;try{window.showLoader("Searching for NFT index");const n=await this.searchingNftIndex(e);window.hideLoader(),window.showLoader("Claiming NFT and founds");const r=this.PowaWormsArenaContract,i=await r.claimNFTandRewards(this.currentAddress,n);i&&(t=i)}catch(n){return console.error(n),TN.toastError(n),!1}finally{return window.hideLoader(),t?(TN.toastSuccess("NFT and funds recovered successfully"),t):(TN.toastError("Error recovering NFT and funds, try again"),!1)}}async claimOnlyRewards(e){let t=!1;try{window.showLoader();const n=this.PowaWormsArenaContract,r=await n.claimOnlyRewards(this.currentAddress,e);r&&(t=r)}catch(n){return console.error(n),TN.toastError(n),!1}finally{return window.hideLoader(),t?(TN.toastSuccess("Rewards claimed successfully"),t):(TN.toastError("Error claiming rewards"),!1)}}async upLevel(e,t){let n=!1;try{window.showLoader();const r=this.PowaWormsArenaContract,i=await r.upLevel(this.currentAddress,e,t);i&&(n=i)}catch(r){return console.error(r),TN.toastError(r),!1}finally{return window.hideLoader(),n?(TN.toastSuccess("Level up success"),n):(TN.toastError("Error leveling up"),!1)}}async buyLevel(e,t,n){let r=!1;try{window.showLoader();const i=this.PowaWormsArenaContract,s=await this.web3._getEthBalance(this.currentAddress),o=Aq.toWei(oN[this.chainId].defaultMiniumGasETH,oN[this.chainId].decimals),a=new ZN.g(s).minus(o),c=await i.buyLevel(this.currentAddress,e,t,n,a);c&&(r=c)}catch(i){return console.error(i),TN.toastError(i),!1}finally{if(r&&"gas"!=r)return window.hideLoader(),TN.toastSuccess("Level up success"),r;if("gas"!=r)return window.hideLoader(),TN.toastError("Error leveling up"),!1;{const e=this.PowaWormsArenaContract,t=await e.basePriceToBuyLevels(),r=new ZN.g(t).multipliedBy(new ZN.g(n+1)),i=Aq.byDecimals(r,oN[this.chainId].decimals);window.hideLoader(),TN.toastWarning("Insufficient "+oN[this.chainId].symbol+" balance - Required: "+i+" "+oN[this.chainId].symbol)}}}async buyDefenceCooldown(e,t){let n=!1;try{window.showLoader();const r=this.PowaWormsArenaContract,i=await r.buyDefenceCooldown(this.currentAddress,e,t);i&&(n=i)}catch(r){return console.error(r),TN.toastError(r),!1}finally{return window.hideLoader(),n?(TN.toastSuccess("Defence cooldown bought successfully"),n):(TN.toastError("Error buying defence cooldown"),!1)}}async buyAttackRecharge(e){let t=!1;try{window.showLoader();
9688const n=this.PowaWormsArenaContract,r=await this.web3._getEthBalance(this.currentAddress),i=Aq.toWei(oN[this.chainId].defaultMiniumGasETH,oN[this.chainId].decimals),s=new ZN.g(r).minus(i),o=await n.buyAttackRecharge(this.currentAddress,e,s);o&&(t=o)}catch(n){return console.error(n),TN.toastError(n),!1}finally{if(t&&"gas"!=t)return window.hideLoader(),TN.toastSuccess("Attack recharge bought successfully"),t;if("gas"!=t)return window.hideLoader(),TN.toastError("Error buying attack recharge"),!1;{const e=this.PowaWormsArenaContract,t=new ZN.g(await e.priceToBuyAttackRecharge()),n=Aq.byDecimals(t,oN[this.chainId].decimals);window.hideLoader(),TN.toastWarning("Insufficient "+oN[this.chainId].symbol+" balance - Required: "+n+" "+oN[this.chainId].symbol)}}}async loadMinterData(){try{const e=this.PowaWormsMinterContract,t=new ZN.g(await e.baseCost()),n=Aq.byDecimals(t,18),r=parseInt(await e.checkTokenPartnerUserBestDiscount(this.currentAddress)),i=new ZN.g(await e.getMinCostForUser(this.currentAddress)),s=Aq.byDecimals(i,18);let o=[];for(let a=0;a<this.DiscountTokens.length;a++){const t=this.DiscountTokens[a],n=Rq.getErc20Contract(t.tokenContract),r=await n.blockchainBalanceOf(this.currentAddress),i=Aq.byDecimals(r,t.tokenDecimals),s=await e.getTokenPartnerInfo(t.tokenContract),c={token:t,discount:s,tokenCompliance:await e.checkTokenPartnerUserCompliance(this.currentAddress,t.tokenContract),tokenBalance_BN:r,tokenBalance_NORMAL:i};o.push(c)}return{baseCost_BN:t,baseCost:n,tokenDiscountsMeta:o,userBestDiscount:r,minCostForUser_BN:i,minCostForUser:s}}catch(e){return!1}}async loadRewardsData(){const e=this.PowaWormsMinterContract,t=await e.percentForRefer(),n=await e.getUserRewardsCollected(this.currentAddress),r=new ZN.g(n.totalAmount),i=Aq.byDecimals(r,18),s=parseInt(n.quantityMint),o=parseInt(n.lastTimestamp);return{percentForRefer:parseInt(t),rewardQuantity_BN:r,rewardQuantity_NORMAL:i,rewardQuantityMinted:s,rewardLastTimestamp:o}}async mintWorm(e,t){let n=!1;try{window.showLoader("Minting new Worm");const r=this.PowaWormsMinterContract,i=await this.web3._getEthBalance(this.currentAddress),s=Aq.toWei(oN[this.chainId].defaultMiniumGasETH,oN[this.chainId].decimals),o=new ZN.g(i).minus(s),a=await r.buy(this.currentAddress,e,t,o);a&&(n=a)}catch(r){return console.error(r),TN.toastWarning("Error minting NFT, please try again."),!1}finally{if(window.hideLoader(),n&&"gas"!=n)return TN.toastSuccess("Mint success"),n;if("gas"!=n)return TN.toastWarning("Error minting NFT, please try again."),!1;TN.toastWarning("Insufficient "+oN[this.chainId].symbol+" balance")}}};const Bq=class{get controller(){return"game/"}async getGameManager(e){return new Dq(e)}};const Uq=class{constructor(){this.pancakeRouterV2Contract=null,this._erc20Contract=null,this.cache={},this.cache.tokenInfo=[],this.cache.normalTokenInfo=[]}get web3(){return _2}get currentChainId(){return this.web3.currentChain.chainId}get scanUrl(){var e;return oN[null===(e=this.web3)||void 0===e?void 0:e.networkId].explorerAddress}get scanUrlToken(){var e;return oN[null===(e=this.web3)||void 0===e?void 0:e.networkId].explorerToken}async getSpecificErc20Contract(e){return await Rq.getErc20Contract(e)}async getSpecificErc20LPContract(e){return await Rq.getErc20LPContract(e)}async getTokenInfo(e,t,n){try{if(!this.cache.tokenInfo[t]||n){const n=await this.checkLPContractValidation(t);let r,i,s,o,a;
9688if(n){const n=await this.getSpecificErc20LPContract(t);r=await n.getName(),i=await n.getSymbol(),s=await n.getDecimals(),a=await n.blockchainBalanceOf(e)}else{const n=await this.getSpecificErc20Contract(t);r=await n.getName(),i=await n.getSymbol(),s=await n.getDecimals(),a=await n.blockchainBalanceOf(e)}const c=a>0?new ZN.g(a):0;o=c>0?Aq.byDecimals(c,s):0,this.cache.tokenInfo[t]={tokenType:n?"lp":"normal",tokenName:r,tokenSymbol:i,tokenDecimals:s,tokenBalance:o,tokenBalanceBlockchain:a,isLpToken:n}}return this.cache.tokenInfo[t]}catch(r){return{}}}async getNormalTokenInfo(e,t){try{if(!this.cache.normalTokenInfo[e]||t){let t,n,r;const i=await this.getSpecificErc20Contract(e);t=await i.getName(),n=await i.getSymbol(),r=await i.getDecimals(),this.cache.normalTokenInfo[e]={tokenType:"normal",tokenName:t,tokenSymbol:n,tokenDecimals:r}}return this.cache.normalTokenInfo[e]}catch(n){return{}}}async checkLPContractValidation(e){return await this.checkLPContract(e)}async checkLPContract(e){try{const t=await Rq.getErc20LPContract(e);if(!await t.getFactoryContractEstimateGas())return!1;const n=await t.getFactoryContract();if(!n)return!1;const r=await t.getToken0();if(!r)return!1;const i=await t.getToken1();if(!i)return!1;const s=await Rq.getErc20LPFactoryContract(n),o=await s.getPair(r,i);return!!o&&o==e}catch(t){return!1}}async getTokenPriceUsdt(e,t){const n=await Rq.getPancakeRouterV2Contract(t);let r=await n.getAmountsOut(e,yN[this.currentChainId]);return r||0}async getTokenPriceUsdc(e,t){const n=await Rq.getPancakeRouterV2Contract(t);let r=await n.getAmountsOut(e,gN[this.currentChainId]);return r||0}async getTokenPriceWbnb(e,t){const n=await Rq.getPancakeRouterV2Contract(t);let r=await n.getAmountsOut(e,vN[this.currentChainId]);return r||0}};const Fq=class{get controller(){return"general/"}async getGeneralManager(e){return new Uq}};class $q{static getGameService(){return new Bq}static getGeneralService(){return new Fq}}$q.services={};const zq=$q;c.Component;class Hq extends c.Component{get web3(){return _2}get chainId(){var e;return null===(e=this.web3)||void 0===e?void 0:e.networkId}get chainAddUrl(){return this.chainId?"?chain="+oN[this.chainId].urlName:""}get gameArenasList(){return!!aN(this.chainId).compatible&&wN[this.chainId]}render(){return(0,iN.jsxs)(iN.Fragment,{children:[(0,iN.jsx)("div",{className:"modal fade",id:"arenaSelectModal",tabIndex:"-1","aria-labelledby":"arenaSelectModalLabel","aria-hidden":"true",children:(0,iN.jsx)("div",{className:"modal-dialog",children:(0,iN.jsxs)("div",{className:"modal-content",children:[(0,iN.jsxs)("div",{className:"modal-header",children:[(0,iN.jsx)("h1",{className:"modal-title fs-5",id:"arenaSelectModalLabel",children:"Select Arena"}),(0,iN.jsx)("button",{type:"button",className:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})]}),(0,iN.jsx)("div",{className:"modal-body",children:(0,iN.jsxs)("div",{className:"arenaSelectBody",children:[this.gameArenasList&&(0,iN.jsx)(iN.Fragment,{children:this.gameArenasList.map(((e,t)=>(0,iN.jsx)("div",{children:(0,iN.jsxs)("a",{href:"/arena/"+e.urlName+"/"+this.chainAddUrl,children:[(0,iN.jsx)("img",{className:"me-1",style:{maxWidth:"20px"},src:"/assets/img/arena_icon/"+this.chainId+"/"+e.id+"_alt.png"}),(0,iN.jsx)("span",{children:e.name})]})},t)))}),!this.gameArenasList&&(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("a",{onClick:()=>window.openNetworkModal(),className:"/previewArena/"===this.props.actualPage?"nav-link":"nav-link collapsed",children:(0,iN.jsxs)("span",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-square-plus"})," Connect to compatible network"]})})})]})})]})})}),(0,iN.jsx)("div",{className:"container",children:(0,iN.jsxs)("div",{className:"row",children:[(0,iN.jsxs)("div",{className:"dashboard_col dashboard_col_h col-12 col-md-7",children:[(0,iN.jsx)("a",{"data-bs-toggle":"modal","data-bs-target":"#arenaSelectModal",className:"d-block",children:(0,iN.jsx)("img",{className:"dashboard_img",src:"assets/img/dashboard_arena.png",alt:"Arena"})}),(0,iN.jsx)("a",{href:"https://nitrolayer.gitbook.io/powa-worms",target:"_blank",className:"d-block",children:(0,iN.jsx)("img",{className:"dashboard_img",src:"assets/img/dashboard_docs.png",alt:"Docs"})}),(0,iN.jsx)(Pe,{to:"/rewards",className:"d-block",children:(0,iN.jsx)("img",{className:"dashboard_img",src:"assets/img/dashboard_share.png",alt:"Share and earn"})})]}),(0,iN.jsxs)("div",{className:"dashboard_col col-12 col-md-5",children:[(0,iN.jsx)(Pe,{to:"/mint",className:"d-block",children:(0,iN.jsx)("img",{className:"dashboard_img",src:"assets/img/dashboard_mint.png",alt:"Mint worm"})}),(0,iN.jsx)(Pe,{to:"/my",className:"d-block",children:(0,iN.jsx)("img",{className:"dashboard_img",src:"assets/img/dashboard_myworms.png",alt:"My worms"})}),(0,iN.jsx)(Pe,{to:"/worm/1",className:"d-block",children:(0,iN.jsx)("img",{className:"dashboard_img",src:"assets/img/dashboard_discover.png",alt:"Discover"})})]})]})}),(0,iN.jsxs)("div",{className:"mt-4 py-4 m-auto w-75",children:[(0,iN.jsx)("div",{className:"home_ecosystem text-center py-5",children:(0,iN.jsxs)("div",{className:"home_ecosystem_inf",children:[(0,iN.jsx)("a",{href:"https://nitrolayer.org",target:"_blank",children:(0,iN.jsx)("img",{className:"home_ecosystem_img mb-3",src:"assets/img/nitrolayer2.png",alt:"Nitro Layer Ecosystem"})}),(0,iN.jsxs)("p",{children:["Powa Worms is part of ",(0,iN.jsx)("a",{href:"https://nitrolayer.org/",target:"_blank",children:"Nitro
9688Layer"}),", an next-generation blockchain ecosystem built to redefine the real-world utility of EVM networks."]})]})}),(0,iN.jsx)("div",{className:"home_disclaimer pb-5",children:(0,iN.jsx)("p",{className:"text-center text-muted",children:"Disclaimer: The information provided shall not in any way constitute a recommendation as to whether you should invest in any product discussed. We accept no liability for any loss occasioned to any person acting or refraining from action as a result of any material provided or published."})})]})]})}}const Wq=Hq,qq=e=>(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"pageloader2",children:(0,iN.jsxs)("div",{className:"svg-frame",children:[(0,iN.jsx)("svg",{children:(0,iN.jsxs)("g",{id:"out1",children:[(0,iN.jsx)("path",{d:"M72 172C72 116.772 116.772 72 172 72C227.228 72 272 116.772 272 172C272 227.228 227.228 272 172 272C116.772 272 72 227.228 72 172ZM197.322 172C197.322 158.015 185.985 146.678 172 146.678C158.015 146.678 146.678 158.015 146.678 172C146.678 185.985 158.015 197.322 172 197.322C185.985 197.322 197.322 185.985 197.322 172Z"}),(0,iN.jsx)("path",{d:"M72 172C72 116.772 116.772 72 172 72C227.228 72 272 116.772 272 172C272 227.228 227.228 272 172 272C116.772 272 72 227.228 72 172ZM197.322 172C197.322 158.015 185.985 146.678 172 146.678C158.015 146.678 146.678 158.015 146.678 172C146.678 185.985 158.015 197.322 172 197.322C185.985 197.322 197.322 185.985 197.322 172Z",stroke:"#00FFFF",strokeWidth:"2",strokeMiterlimit:"16",mask:"url(#path-1-inside-1_111_3212)"})]})}),(0,iN.jsx)("svg",{children:(0,iN.jsxs)("g",{id:"out2",children:[(0,iN.jsxs)("mask",{id:"path-2-inside-2_111_3212",fill:"white",children:[(0,iN.jsx)("path",{d:"M102.892 127.966C93.3733 142.905 88.9517 160.527 90.2897 178.19L94.3752 177.88C93.1041 161.1 97.3046 144.36 106.347 130.168L102.892 127.966Z"}),(0,iN.jsx)("path",{d:"M93.3401 194.968C98.3049 211.971 108.646 226.908 122.814 237.541L125.273 234.264C111.814 224.163 101.99 209.973 97.2731 193.819L93.3401 194.968Z"}),(0,iN.jsx)("path",{d:"M152.707 92.3592C140.33 95.3575 128.822 101.199 119.097 109.421L121.742 112.55C130.981 104.739 141.914 99.1897 153.672 96.3413L152.707 92.3592Z"}),(0,iN.jsx)("path",{d:"M253.294 161.699C255.099 175.937 253.132 190.4 247.59 203.639L243.811 202.057C249.075 189.48 250.944 175.74 249.23 162.214L253.294 161.699Z"}),(0,iN.jsx)("path",{d:"M172 90.0557C184.677 90.0557 197.18 92.9967 208.528 98.6474C219.875 104.298 229.757 112.505 237.396 122.621L234.126 125.09C226.869 115.479 217.481 107.683 206.701 102.315C195.921 96.9469 184.043 94.1529 172 94.1529V90.0557Z"}),(0,iN.jsx)("path",{d:"M244.195 133.235C246.991 138.442 249.216 143.937 250.83 149.623L246.888 150.742C245.355 145.34 243.242 140.12 240.586 135.174L244.195 133.235Z"}),(0,iN.jsx)("path",{d:"M234.238 225.304C223.932 237.338 210.358 246.126 195.159 250.604C179.961 255.082 163.79 255.058 148.606 250.534L149.775 246.607C164.201 250.905 179.563 250.928 194.001 246.674C208.44 242.42 221.335 234.071 231.126 222.639L234.238 225.304Z"})]}),(0,iN.jsx)("path",{d:"M102.892 127.966L105.579 123.75L101.362 121.063L98.6752 125.28L102.892 127.966ZM90.2897 178.19L85.304 178.567L85.6817 183.553L90.6674 183.175L90.2897 178.19ZM94.3752 177.88L94.7529 182.866L99.7386 182.488L99.3609 177.503L94.3752 177.88ZM106.347 130.168L110.564 132.855L113.251 128.638L109.034 125.951L106.347 130.168ZM93.3401 194.968L91.9387 190.168L87.1391 191.569L88.5405 196.369L93.3401 194.968ZM122.814 237.541L119.813 241.54L123.812 244.541L126.813 240.542L122.814 237.541ZM125.273 234.264L129.272 237.265L132.273 233.266L128.274 230.265L125.273 234.264ZM97.2731 193.819L102.073 192.418L100.671 187.618L95.8717 189.02L97.2731 193.819ZM152.707 92.3592L157.567 91.182L156.389 86.3226L151.53 87.4998L152.707 92.3592ZM119.097 109.421L115.869 105.603L112.05 108.831L115.278 112.649L119.097 109.421ZM121.742 112.55L117.924 115.778L121.152 119.596L124.97 116.368L121.742 112.55ZM153.672 96.3413L154.849 101.201L159.708 100.023L158.531 95.1641L153.672 96.3413ZM253.294 161.699L258.255 161.07L257.626 156.11L252.666 156.738L253.294 161.699ZM247.59 203.639L245.66 208.251L250.272 210.
9688182L252.203 205.569L247.59 203.639ZM243.811 202.057L239.198 200.126L237.268 204.739L241.88 206.669L243.811 202.057ZM249.23 162.214L248.601 157.253L243.641 157.882L244.269 162.842L249.23 162.214ZM172 90.0557V85.0557H167V90.0557H172ZM208.528 98.6474L206.299 103.123L206.299 103.123L208.528 98.6474ZM237.396 122.621L240.409 126.611L244.399 123.598L241.386 119.608L237.396 122.621ZM234.126 125.09L230.136 128.103L233.149 132.093L237.139 129.08L234.126 125.09ZM206.701 102.315L204.473 106.791L204.473 106.791L206.701 102.315ZM172 94.1529H167V99.1529H172V94.1529ZM244.195 133.235L248.601 130.87L246.235 126.465L241.83 128.83L244.195 133.235ZM250.83 149.623L252.195 154.433L257.005 153.067L255.64 148.257L250.83 149.623ZM246.888 150.742L242.078 152.107L243.444 156.917L248.254 155.552L246.888 150.742ZM240.586 135.174L238.22 130.768L233.815 133.134L236.181 137.539L240.586 135.174ZM234.238 225.304L238.036 228.556L241.288 224.759L237.491 221.506L234.238 225.304ZM195.159 250.604L196.572 255.4L196.572 255.4L195.159 250.604ZM148.606 250.534L143.814 249.107L142.386 253.899L147.178 255.326L148.606 250.534ZM149.775 246.607L151.203 241.816L146.411 240.388L144.983 245.18L149.775 246.607ZM194.001 246.674L195.415 251.47L195.415 251.47L194.001 246.674ZM231.126 222.639L234.379 218.841L230.581 215.589L227.329 219.386L231.126 222.639ZM98.6752 125.28C88.5757 141.13 83.8844 159.826 85.304 178.567L95.2754 177.812C94.0191 161.227 98.1709 144.681 107.109 130.653L98.6752 125.28ZM90.6674 183.175L94.7529 182.866L93.9976 172.895L89.912 173.204L90.6674 183.175ZM99.3609 177.503C98.1715 161.8 102.102 146.135 110.564 132.855L102.131 127.481C92.5071 142.585 88.0368 160.4 89.3895 178.258L99.3609 177.503ZM109.034 125.951L105.579 123.75L100.205 132.183L103.661 134.385L109.034 125.951ZM88.5405 196.369C93.8083 214.41 104.78 230.259 119.813 241.54L125.815 233.542C112.512 223.558 102.802 209.532 98.1397 193.566L88.5405 196.369ZM126.813 240.542L129.272 237.265L121.274 231.263L118.815 234.54L126.813 240.542ZM128.274 230.265C115.679 220.813 106.486 207.534 102.073 192.418L92.4735 195.221C97.493 212.412 107.948 227.513 122.272 238.263L128.274 230.265ZM95.8717 189.02L91.9387 190.168L94.7415 199.767L98.6745 198.619L95.8717 189.02ZM151.53 87.4998C138.398 90.681 126.188 96.8793 115.869 105.603L122.325 113.239C131.457 105.519 142.262 100.034 153.884 97.2187L151.53 87.4998ZM115.278 112.649L117.924 115.778L125.56 109.322L122.915 106.193L115.278 112.649ZM124.97 116.368C133.616 109.059 143.846 103.866 154.849 101.201L152.495 91.4818C139.981 94.5132 128.347 100.419 118.514 108.732L124.97 116.368ZM158.531 95.1641L157.567 91.182L147.848 93.5364L148.812 97.5185L158.531 95.1641ZM248.334 162.327C250.028 175.697 248.181 189.277 242.978 201.708L252.203 205.569C258.082 191.522 260.169 176.177 258.255 161.07L248.334 162.327ZM249.521 199.027L245.741 197.445L241.88 206.669L245.66 208.251L249.521 199.027ZM248.423 203.987C254.025 190.602 256.014 175.98 254.19 161.585L244.269 162.842C245.873 175.5 244.125 188.357 239.198 200.126L248.423 203.987ZM249.858 167.174L253.923 166.659L252.666 156.738L248.601 157.253L249.858 167.174ZM172 95.0557C183.903 95.0557 195.644 97.8172 206.299 103.123L210.757 94.1717C198.717 88.1761 185.45 85.0557 172 85.0557V95.0557ZM206.299 103.123C216.954 108.429 226.233 116.135 233.406 125.634L241.386 119.608C233.281 108.874 222.796 100.167 210.757 94.1717L206.299 103.123ZM234.383 118.631L231.113 121.1L237.139 129.08L240.409 126.611L234.383 118.631ZM238.116 122.077C230.393 111.849 220.403 103.552 208.93 97.8393L204.473 106.791C214.56 111.814 223.345 119.11 230.136 128.103L238.116 122.077ZM208.93 97.8393C197.458 92.1263 184.816 89.1529 172 89.1529V99.1529C183.269 99.1529 194.385 101.767 204.473 106.791L208.93 97.8393ZM177 94.1529V90.0557H167V94.1529H177ZM239.79 135.601C242.416 140.49 244.504 145.649 246.02 150.988L255.64 148.257C253.927 142.225 251.567 136.395 248.601 130.87L239.79 135.601ZM249.464 144.813L245.523 145.932L248.254 155.552L252.195 154.433L249.464 144.813ZM251.698 149.376C250.067 143.628 247.818 138.073 244.991 132.808L236.181 137.539C238.666 142.168 240.644 147.052 242.078 152.107L251.698 149.376ZM242.951 139.579L246.561 137.64L241.83 128.83L238.22 130.768L242.951 139.579ZM230.441 222.051C220.763 233.351 208.017 241.603 193.746 245.808L196.572 255.4C212.698 250.649 227.101 241.325 238.036 228.556L230.441 222.051ZM193.746 245.808C179.475 250.012 164.291 249.99 150.033 245.742L147.178 255.326C163.289 260.125 180.447 260.151 196.572 255.4L193.746 245.808ZM153.397 251.962L154.567 248.035L144.983 245.18L143.8
968814 249.107L153.397 251.962ZM148.348 251.399C163.7 255.973 180.049 255.997 195.415 251.47L192.588 241.877C179.077 245.858 164.702 245.837 151.203 241.816L148.348 251.399ZM195.415 251.47C210.78 246.942 224.504 238.058 234.924 225.891L227.329 219.386C218.167 230.084 206.099 237.897 192.588 241.877L195.415 251.47ZM227.874 226.436L230.986 229.101L237.491 221.506L234.379 218.841L227.874 226.436Z",fill:"#00FFFF",mask:"url(#path-2-inside-2_111_3212)"})]})}),(0,iN.jsxs)("svg",{children:[(0,iN.jsxs)("g",{id:"inner3",children:[(0,iN.jsx)("path",{d:"M195.136 135.689C188.115 131.215 179.948 128.873 171.624 128.946C163.299 129.019 155.174 131.503 148.232 136.099L148.42 136.382C155.307 131.823 163.368 129.358 171.627 129.286C179.886 129.213 187.988 131.537 194.954 135.975L195.136 135.689Z"}),(0,iN.jsx)("path",{d:"M195.136 208.311C188.115 212.784 179.948 215.127 171.624 215.054C163.299 214.981 155.174 212.496 148.232 207.901L148.42 207.618C155.307 212.177 163.368 214.642 171.627 214.714C179.886 214.786 187.988 212.463 194.954 208.025L195.136 208.311Z"}),(0,iN.jsx)("path",{d:"M195.136 135.689L195.474 135.904L195.689 135.566L195.351 135.352L195.136 135.689ZM171.624 128.946L171.627 129.346L171.624 128.946ZM148.232 136.099L148.011 135.765L147.678 135.986L147.899 136.32L148.232 136.099ZM148.42 136.382L148.086 136.603L148.307 136.936L148.641 136.716L148.42 136.382ZM171.627 129.286L171.63 129.686L171.627 129.286ZM194.954 135.975L194.739 136.313L195.076 136.528L195.291 136.19L194.954 135.975ZM195.136 208.311L195.351 208.648L195.689 208.433L195.474 208.096L195.136 208.311ZM171.624 215.054L171.627 214.654L171.624 215.054ZM148.232 207.901L147.899 207.68L147.678 208.014L148.011 208.234L148.232 207.901ZM148.42 207.618L148.641 207.284L148.307 207.063L148.086 207.397L148.42 207.618ZM171.627 214.714L171.63 214.314L171.627 214.714ZM194.954 208.025L195.291 207.81L195.076 207.472L194.739 207.687L194.954 208.025ZM195.351 135.352C188.265 130.836 180.022 128.473 171.62 128.546L171.627 129.346C179.874 129.274 187.966 131.594 194.921 136.026L195.351 135.352ZM171.62 128.546C163.218 128.619 155.018 131.127 148.011 135.765L148.453 136.432C155.33 131.88 163.38 129.418 171.627 129.346L171.62 128.546ZM147.899 136.32L148.086 136.603L148.753 136.161L148.566 135.878L147.899 136.32ZM148.641 136.716C155.463 132.199 163.448 129.757 171.63 129.686L171.623 128.886C163.287 128.958 155.15 131.447 148.199 136.049L148.641 136.716ZM171.63 129.686C179.812 129.614 187.839 131.916 194.739 136.313L195.169 135.638C188.138 131.158 179.959 128.813 171.623 128.886L171.63 129.686ZM195.291 136.19L195.474 135.904L194.799 135.474L194.617 135.76L195.291 136.19ZM194.921 207.974C187.966 212.406 179.874 214.726 171.627 214.654L171.62 215.454C180.022 215.527 188.265 213.163 195.351 208.648L194.921 207.974ZM171.627 214.654C163.38 214.582 155.33 212.12 148.453 207.567L148.011 208.234C155.018 212.873 163.218 215.38 171.62 215.454L171.627 214.654ZM148.566 208.122L148.753 207.838L148.086 207.397L147.899 207.68L148.566 208.122ZM148.199 207.951C155.15 212.553 163.287 215.041 171.623 215.114L171.63 214.314C163.448 214.243 155.463 211.801 148.641 207.284L148.199 207.951ZM171.623 215.114C179.959 215.187 188.138 212.842 195.169 208.362L194.739 207.687C187.839 212.084 179.812 214.386 171.63 214.314L171.623 215.114ZM194.617 208.239L194.799 208.526L195.474 208.096L195.291 207.81L194.617 208.239Z",fill:"#00FFFF",mask:"url(#path-5-inside-3_111_3212)"})]}),(0,iN.jsx)("path",{id:"out3",d:"M240.944 172C240.944 187.951 235.414 203.408 225.295 215.738C215.176 228.068 201.095 236.508 185.45 239.62C169.806 242.732 153.567 240.323 139.5 232.804C125.433 225.285 114.408 213.12 108.304 198.384C102.2 183.648 101.394 167.25 106.024 151.987C110.654 136.723 120.434 123.537 133.696 114.675C146.959 105.813 162.884 101.824 178.758 103.388C194.632 104.951 209.472 111.97 220.751 123.249",stroke:"#00FFFF"})]}),(0,iN.jsx)("svg",{children:(0,iN.jsxs)("g",{id:"inner1",children:[(0,iN.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M145.949 124.51L148.554 129.259C156.575 124.859 165.672 122.804 174.806 123.331C183.94 123.858 192.741 126.944 200.203 132.236C207.665 137.529 213.488 144.815 217.004 153.261C220.521 161.707 221.59 170.972 220.09 179.997L224.108 180.665L224.102 180.699L229.537 181.607C230.521 175.715 230.594 169.708 229.753 163.795L225.628 164.381C224.987 159.867 223.775 155.429 222.005 151.179C218.097 141.795 211.628 133.699 203.337 127.818C195.045 121.937 185.266 118.508 175.118 117.923C165.302 117.357 155.525 119.474 146.83 124.037C146.535 124.192 146.241 124.349 145.949 124.51ZM224.638 164.522C224.009 160.091 222.819 155.735 221.082 151.563C217.246 142.352 210.897 134.406 202.758 128.634C194.62 122.862 185.021 119.496 175.06 118.922C165.432 118.367 155.841 120.441 147.311 124.914L148.954 127.91C156.922 123.745 165.876 121.814 174.864 122.333C184.185 122.87 193.166 126.019 200.782 131.421C208.397 136.822 214.339 144.257 217.928 152.877C221.388 161.188 222.526 170.276 221.23 179.173L224.262 179.677C224.998 174.671 225.35 169.535 224.638 164.522Z",fill:"#00FFFF"}),(0,iN.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M139.91 220.713C134.922 217.428 130.469 213.395 126.705 208.758L130.983 205.286L130.985 205.288L134.148 202.721C141.342 211.584 151.417 217.642 162.619 219.839C173.821 222.036 185.438 220.232 195.446 214.742L198.051 219.491C197.759 219.651 197.465 219.809 197.17 219.963C186.252 225.693 173.696 227.531 161.577 225.154C154.613 223.789 148.041 221.08 142.202 217.234L139.91 220.713ZM142.752 216.399C148.483 220.174 154.934 222.833 161.769 224.173C173.658 226.504 185.977 224.704 196.689 219.087L195.046 216.09C185.035 221.323 173.531 222.998 162.427 220.82C151.323 218.643 141.303 212.747 134.01 204.122L131.182 206.5C134.451 210.376 138.515 213.607 142.752 216.399Z",fill:"#00FFFF"})]})}),(0,iN.jsxs)("svg",{children:[(0,iN.jsx)("path",{id:"center1",d:"M180.956 186.056C183.849 184.212 186.103 181.521 187.41 178.349C188.717 175.177 189.013 171.679 188.258 168.332C187.503 164.986 185.734 161.954 183.192 159.65C180.649 157.346 177.458 155.883 174.054 155.46C170.649 155.038 167.197 155.676 164.169 157.288C161.14 158.9 158.683 161.407 157.133 164.468C155.582 167.528 155.014 170.992 155.50
96885 174.388C155.997 177.783 157.524 180.944 159.879 183.439L161.129 182.259C159.018 180.021 157.648 177.186 157.207 174.141C156.766 171.096 157.276 167.989 158.667 165.245C160.057 162.5 162.261 160.252 164.977 158.806C167.693 157.36 170.788 156.788 173.842 157.167C176.895 157.546 179.757 158.858 182.037 160.924C184.317 162.99 185.904 165.709 186.581 168.711C187.258 171.712 186.992 174.849 185.82 177.694C184.648 180.539 182.627 182.952 180.032 184.606L180.956 186.056Z",fill:"#00FFFF"}),(0,iN.jsx)("path",{id:"center",d:"M172 166.445C175.068 166.445 177.556 168.932 177.556 172C177.556 175.068 175.068 177.556 172 177.556C168.932 177.556 166.444 175.068 166.444 172C166.444 168.932 168.932 166.445 172 166.445ZM172 177.021C174.773 177.021 177.021 174.773 177.021 172C177.021 169.227 174.773 166.979 172 166.979C169.227 166.979 166.979 169.227 166.979 172C166.979 174.773 169.227 177.021 172 177.021Z",fill:"#00FFFF"})]})]})})});class Vq extends c.Component{constructor(e){super(e);this.state={error:null,isLoading:!1,gameManager:null,tokensData:[],nftData:{},layersData:null,initConnSync:!1,connStatus:{isConnected:!1,chainId:null,selectedNetworkId:null,address:null}}}connStatusChanged(e){this.setState({...this.state,connStatus:e},(()=>{this.loadData()}))}async loadGameManager(e){return await zq.getGameService().getGameManager(e)}async loadData(){this.setState({...this.state,error:null,isLoading:!0},(()=>{this.loadGameManager(0).then((e=>{this.setState({...this.state,gameManager:e},(()=>{e.loadAllLayersData().then((t=>{t?this.setState({...this.state,layersData:t},(()=>{e.loadWalletTokensData().then((t=>{t?this.setState({...this.state,tokensData:t},(()=>{e.loadWalletNFTsIDs(!0).then((e=>{e?this.setState({...this.state,nftData:e,isLoading:!1}):this.setState({...this.state,error:!0,isLoading:!1})}))})):this.setState({...this.state,error:!0,isLoading:!1})}))})):this.setState({...this.state,error:!0,isLoading:!1})}))}))}))}))}renderNFTInfo(){return this.state.isLoading?(0,iN.jsx)(qq,{}):0!==Object.keys(this.state.nftData).length&&this.state.nftData&&null!=this.state.nftData&&0!==this.state.nftData.userNft.length?(0,iN.jsx)("div",{className:"row mt-4",children:(0,iN.jsx)("div",{className:"col-12 d-flex flex-row justify-content-start flex-wrap",children:this.state.nftData.userNft.map((e=>(0,iN.jsx)(jq,{connStatus:this.state.connStatus,tokensData:this.state.tokensData,nftId:e,layersD
9688ata:this.state.layersData,gameManager:this.state.gameManager,userNftInArena:this.state.nftData.userNftInArena_multi},"NFT_ICC_"+e)))})}):(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"d-flex align-items-center justify-content-center text-center",children:(0,iN.jsx)("div",{children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"mt-5",children:(0,iN.jsx)("img",{className:"",src:"/assets/img/arenadeco2.png",alt:"Join Arena",style:{maxWidth:"500px",width:"100%",filter:"saturate(1.2) drop-shadow(2px 4px 6px #000000ad)"}})}),(0,iN.jsxs)("div",{className:"mt-3",children:["You need a PowaWorms NFT in order to play.",(0,iN.jsx)("br",{}),"Generate your own Worm right now!"]}),(0,iN.jsx)("div",{className:"mt-4",children:(0,iN.jsx)(Pe,{to:"/mint",className:"neonBtn btn_line_anim",children:"Mint a Worm"})})]})})})})}renderContent(){return this.state.error?(0,iN.jsxs)("div",{className:"alert alert-danger mt-2",children:[(0,iN.jsx)("i",{className:"fa fa-exclamation-triangle"})," An error occurred while loading the data. Please try again later."]}):(0,iN.jsx)("div",{className:"py-2",children:this.renderNFTInfo()})}render(){return(0,iN.jsx)(NN,{children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)(MN,{forceCall:this.state.initConnSync,onChangedStatus:(e,t,n,r)=>this.connStatusChanged({isConnected:e,chainId:t,selectedNetworkId:n,address:r})}),this.state.connStatus.isConnected?this.renderContent():null]})})}}const Gq=Vq;class Kq extends c.Component{constructor(e){super(e);this.state={isConnected:!1,error:null,isLoading:!0,wormId:null,gameManager:null,nftData:{},layersData:null,nftJsonMetadata:null,basicGeneralData:null}}get chainId(){return null===_2||void 0===_2?void 0:_2.networkId}get explorerUrl(){return aN(this.chainId).explorerAddress}onConnectedDo(e){this.setState({...this.state,isConnected:e},(()=>{this.loadData()}))}async loadGameManager(e){return await zq.getGameService().getGameManager(e)}async loadData(){const e=parseInt(this.props.params.wormId);this.setState({...this.state,error:null,isLoading:!0},(()=>{this.loadGameManager(0).then((t=>{this.setState({...this.state,gameManager:t},(()=>{t.loadBasicGeneralData().then((n=>{n?t.loadAllLayersData().then((r=>{r?this.setState({...this.state,layersData:r},(()=>{t.loadNFTjsonMetadata(e).then((i=>{t.loadSingleNFTExtendedData(e,r,!0).then((t=>{t?this.setState({...this.state,wormId:e,nftData:t,nftJsonMetadata:i,basicGeneralData:n,isLoading:!1}):this.setState({...this.state,error:!0,isLoading:!1})}))}))})):this.setState({...this.state,error:!0,isLoading:!1})})):this.setState({...this.state,error:!0,isLoading:!1})}))}))}))}))}async loadNewData(e){window.history.replaceState("","",window.location.origin+"/worm/"+e),this.setState({...this.state,isLoading:!0},(()=>{this.state.gameManager.loadNFTjsonMetadata(e).then((t=>{this.state.gameManager.loadSingleNFTExtendedData(e,this.state.layersData,!0).then((n=>{n?this.setState({...this.state,wormId:e,nftData:n,nftJsonMetadata:t,isLoading:!1}):this.setState({...this.state,error:!0,isLoading:!1})}))}))}))}renderContent(){return this.state.isLoading?(0,iN.jsx)(qq,{}):this.state.error?(0,iN.jsxs)("div",{className:"alert alert-danger mt-2",children:[(0,iN.jsx)("i",{className:"fa fa-exclamation-triangle"})," An error occurred while loading the data. Please try again later."]}):(0,iN.jsx)("div",{className:"container",children:(0,iN.jsxs)("div",{className:"row",children:[(0,iN.jsxs)("div",{className:"col-12 col-md-8",children:[(0,iN.jsx)("div",{className:"nftImageBanner",style:{backgroundImage:`url(/assets/img/nft_banner_bg/${this.state.nftData.userNftClass}.png)`},children:(0,iN.jsx)("div",{className:"nftImageBanner_wormContainer",children:(0,iN.jsxs)("div",{className:"nftImageBanner_wormImgContainer",children:[(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Slime",src:WN.img+"Slime/"+encodeURIComponent(this.state.nftData.userNftPartsData.Slime.src)}),(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Tail",src:WN.img+"Tail/"+encodeURIComponent(this.state.nftData.userNftPartsData.Tail.src)}),(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Wings",src:WN.img+"Wings/"+encodeURIComponent(this.state.nftData.userNftPartsData.Wings.src)}),(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Body",src:WN.img+"Body/"+encodeURIComponent(this.state.nftData.userNftPartsData.Body.src)}),(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Ears",src:WN.img+"Ears/"+encodeURIComponent(this.state.nftData.userNftPartsData.Ears.src)}),(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Eyes",src:WN.img+"Eyes/"+encodeURIComponent(this.state.nftData.userNftPartsData.Eyes.src)}),(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Mouth",
9688src:WN.img+"Mouth/"+encodeURIComponent(this.state.nftData.userNftPartsData.Mouth.src)})]})})}),(0,iN.jsx)("div",{className:"card m-0 roundedCard glowBorderGreen",children:(0,iN.jsxs)("div",{className:"card-body pt-4",children:[(0,iN.jsxs)("h5",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-circle-info"})," Description"]}),(0,iN.jsxs)("div",{className:"grid_4_1",children:[(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"ID"}),(0,iN.jsx)("div",{children:(0,iN.jsxs)("span",{className:"badge bg-primary me-1",children:["#",this.state.wormId]})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"CLASS"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:qN.transform(this.state.nftData.userNftClass)})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"TOTAL POWAFORCE"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftTotalPower})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"RARITY"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.rarityName})})]})]}),(0,iN.jsx)("h6",{className:"mt-4",children:"Body Parts"}),(0,iN.jsxs)("div",{className:"grid_3_1 mt-4",children:[(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/body.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Body ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Body.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Body.name})})]})]}),(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/ears.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Ears ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Ears.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Ears.name})})]})]}),(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/eyes.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Eyes ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Eyes.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Eyes.name})})]})]})]}),(0,iN.jsxs)("div",{className:"grid_3_1 mt-4",children:[(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/mouth.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Mouth ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Mouth.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Mouth.name})})]})]}),(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/slime.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Slime ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Slime.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Slime.name})})]})]}),(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/wings.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Wings ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Wings.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Wings.name})})]})]})]}),(0,iN.jsx)("div",{className:"grid_3_1 mt-4",children:(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/tail.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Tail ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Tail.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Tail.name})})]})]})})]})}),this.state.nftData.multiStats.map(((e,t)=>(0,iN.jsx)("div",{className:"card m-0 mt-4 roundedCard glowBorderGreen",children:(0,iN.jsxs)("div",{className:"card-body pt-4",children:[(0,iN.jsxs)("h5",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-square-poll-vertical"})," ",e.arenaData.name," Stats"]}),(0,iN.jsxs)("div",{className:"grid_4_1",children:[(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"PLAYING"}),(0,iN.jsxs)("div",{children:[e.isPlaying&&(0,iN.jsx)("span",{className:"badge bg-success me-1",children:"ACTIVE"}),!e.isPlaying&&(0,iN.jsx)("span",{className:"badge bg-danger me-1",children:"INACTIVE"})]})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"LEVEL"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:e.characterStats.level})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"TOTAL EXPERIENCE"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:e.characterStats.experienceTotal})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"LEVEL EXPERIENCE"}),(0,iN.jsx)("div",{children:(0,iN.jsxs)("span",{className:"badge bg-primary me-1",children:[e.characterStats.experienceInLevel," / ",e.characterStats.experienceForNextLevel]})})]})]}),(0,iN.jsx)("h6",{className:"mt-4",children:"Attributes"}),(0,iN.jsxs)("div",{className:"grid_4_1",children:[(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"ATTACK POWER"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:e.characterAttributes?parseInt(e.characterAttributes.attackPower):0})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"DEFENSE POWER"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:e.characterAttributes?parseInt(e.characterAttributes.defencePower):0})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"DEXTERITY POWER"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:e.characterAttributes?parseInt(e.characterAttributes.dexterity):0})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"LUCKY POWER"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:e.characterAttributes?parseInt(e.characterAttributes.lucky):0})})]})]}),(0,iN.jsxs)("h6",{className:"mt-4",children:["Battles - ",(0,iN.jsxs)("span",{className:"badge bg-primary me-1",children:["WIN RATIO: ",e.characterWinRate.toFixed(2),"%"]})]}),(0,iN.jsxs)("div",{className:"grid_4_1",children:[(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"ATTACK WINS"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-success me-1",children:e.characterStats.attackWins})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"ATTACK LOST"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-danger me-1",children:e.characterStats.attackLost})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"DEFENSE WINS"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-success me-1",children:e.characterStats.defenceWins})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"DEFENSE LOST"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-danger me-1",children:e.characterStats.defenceLost})})]})]})]})},t)))]}),(0,iN.jsx)("div",{className:"col-12 col-md-4",children:(0,iN.jsx)("div",{className:"card m-0 roundedCard glowBorderGreen",children:(0,iN.jsxs)("div",{className:"card-body pt-4",children:[(0,iN.jsxs)("h5",{className:"text-center",children:[(0,iN.jsx)("i",{className:"fa-solid fa-circle-user"})," WORM ID #",this.state.wormId]}),(0,iN.jsxs)("ul",{style:{fontSize:"1rem"},className:"list-group list-group-flush",children:[(0,iN.jsxs)("li",{className:"list-group-item",children:[(0,iN.jsxs)("div",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-user"})," OWNER:"]}),(0,iN.jsx)("div",{children:(0,iN.jsxs)("a",{className:"text-softmint",href:`${this.explorerUrl+this.state.nftData.ownerOfCharacter}`,target:"_blank",children:[(0,iN.jsx)("i",{className:"fa-solid fa-eye"})," ",Oe.transform(this.state.nftData.ownerOfCharacter)]})})]}),(0,iN.jsxs)("li",{className:"list-group-item",children:[(0,iN.jsxs)("div",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-dna"})," DNA:"]}),(0,iN.jsx)("div",{className:"text-softmint",children:(0,iN.jsx)("span",{className:"badge bg-success",children:this.state.nftJsonMetadata?this.state.nftJsonMetadata.dna:(0,iN.jsxs)("span",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-spinner fa-spin"})," Generating..."]})})})]}),(0,iN.jsx)("li",{className:"list-group-item",children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-fire"})," IN ARENA: ",this.state.nftData.isPlayingArena?(0,iN.jsxs)("span",{children:[(0,iN.jsx)("i",{className:"text-success fa-solid fa-circle-check"})," ",this.state.nftData.isPlayingArena]}):(0,iN.jsxs)("span",{children:[(0,iN.jsx)("i",{className:"text-danger fa-solid fa-circle-xmark"})," NO"]})]})})]})]})})}),(0,iN.jsx)("div",{className:"col-12 col-md-8",children:(0,iN.jsxs)("div",{className:"paginationWorm mt-4",children:[this.state.wormId>1&&(0,iN.jsx)("button",{onClick:()=>this.loadNewData(this.state.wormId-1),className:"btn btn-primary float-start",children:"Previous"}),this.state.wormId<this.state.basicGeneralData.totalNftMinted&&(0,iN.jsx)("button",{onClick:()=>this.loadNewData(this.state.wormId+1),className:"btn btn-primary float-end",children:"Next"})]})})]})})}render(){return(0,iN.jsx)(NN,{children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)(SN,{onStatusChange:e=>this.onConnectedDo(e)}),this.state.isConnected?this.renderContent():null]})})}}const Zq=(Yq=Kq,e=>(0,iN.jsx)(Yq,{...e,params:ie()}));var Yq;class Qq extends c.Component{constructor(e){super(e),this.state={startTime:null,countdownTimer:null,time:{hours:0,minutes:0,seconds:0,milliseconds:0},duration:1e3*e.endDate-(new Date).getTime(),timer:null,title:e.title,align:e.align?e.align:"center",design:1,endDate:1e3*e.endDate,nullStyle:!!e.nullStyle&&e.nullStyle},this.startTimer=this.start.bind(this)}
9688msToTime(e){let t=parseInt(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/6e4%60);const i=e/36e5;let s=Math.floor(i),o=s,a=Math.floor(s/24);return o-=24*a,s=s.toString().padStart(2,"0"),r=r.toString().padStart(2,"0"),n=n.toString().padStart(2,"0"),t=t.toString().padStart(3,"0"),{hours:s,minutes:r,seconds:n,milliseconds:t,realHours:i,dayHours:o,days:a}}componentDidMount(){this.startTimer()}start(){this.state.countdownTimer&&(clearInterval(this.state.countdownTimer),this.setState({...this.state,countdownTimer:null})),this.setState({...this.state,startTime:Date.now()}),this.state.countdownTimer=setInterval((()=>this.run()),200)}run(){const e=Date.now()-this.state.startTime;let t=this.state.duration-e;t<0&&(t=0),this.setState((()=>({time:this.msToTime(t)}))),0===t&&(this.props.onUpdateMinPresaleStatus&&this.props.onUpdateMinPresaleStatus(),this.props.onLotteryStatusChanged&&this.props.onLotteryStatusChanged(),clearInterval(this.state.countdownTimer),this.setState({...this.state,countdownTimer:null}))}render(){return 1===this.state.design?this.renderTemplate1():this.renderTemplate2()}renderTemplate1(){return(0,iN.jsxs)("span",{children:[this.state.time.hours,":",this.state.time.minutes,":",this.state.time.seconds]})}renderTemplate2(){return this.state.nullStyle?(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsxs)("span",{className:"countdown_NS_container",children:[""!=this.state.title?(0,iN.jsx)("span",{className:"countdown_NS_title",children:this.state.title+" "}):"",(0,iN.jsxs)("span",{className:"countdown_NS_time",children:[this.state.time.days>0?this.state.time.days+":":"",this.state.time.dayHours+":"+this.state.time.minutes+":"+this.state.time.seconds]})]})}):(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"row",children:(0,iN.jsx)("div",{className:"center"==this.state.align?"col-12 d-flex justify-content-center":"col-12 d-flex",children:(0,iN.jsxs)("div",{children:[""!=this.state.title?(0,iN.jsx)("p",{className:"text-center mb-2",children:this.state.title}):"",(0,iN.jsxs)("div",{className:"d-flex",children:[this.state.time.days>0?(0,iN.jsx)("div",{className:"time-box",children:this.state.time.days}):"",(0,iN.jsx)("div",{className:"time-box ms-2",children:this.state.time.dayHours}),(0,iN.jsx)("div",{className:"time-box ms-2",children:this.state.time.minutes}),(0,iN.jsx)("div",{className:"time-box ms-2",children:this.state.time.seconds})]})]})})})})}}const Jq=Qq;function Xq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eV(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function tV(e,t){if(e){if("string"==typeof e)return Xq(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xq(e,t):void 0}}function nV(e){return function(e){if(Array.isArray(e))return Xq(e)}(e)||eV(e)||tV(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rV(){return rV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rV.apply(null,arguments)}function iV(e){return iV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iV(e)}function sV(e){var t=function(e,t){if("object"!=iV(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=iV(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==iV(t)?t:t+""}function oV(e,t,n){return(t=sV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aV(e){if(Array.isArray(e))return e}
9688function cV(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function lV(e,t){return aV(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s,o,a=[],c=!0,l=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return a}}(e,t)||tV(e,t)||cV()}var uV=n(8383),dV=n.n(uV),hV=c.createContext({getPrefixCls:function(e,t){return t||(e?"ant-".concat(e):"ant")}}),pV=hV.Consumer;const fV=(0,c.createContext)(void 0),mV={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};const gV={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};var yV={lang:rV({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}),timePickerLocale:rV({},gV)};var vV="${label} is not a valid ${type}";const wV={locale:"en",Pagination:mV,DatePicker:yV,TimePicker:gV,Calendar:yV,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:vV,method:vV,array:vV,object:vV,number:vV,date:vV,boolean:vV,integer:vV,float:vV,regexp:vV,email:vV,url:vV,hex:vV},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"}};const bV=function(e){var t=e.componentName,n=void 0===t?"global":t,r=e.defaultLocale,i=e.children,s=c.useContext(fV),o=c.useMemo((function(){var e,t=r||wV[n],i=null!==(e=null===s||void 0===s?void 0:s[n])&&void 0!==e?e:{};return rV(rV({},t instanceof Function?t():t),i||{})}),[n,r,s]);return i(o,c.useMemo((function(){var e=s&&s.locale;return s&&s.exist&&!e?wV.locale:e}),[s]),s)};const xV=function(){var e=(0,c.useContext(hV).getPrefixCls)("empty-img-default");return c.createElement("svg",{className:e,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},c.createElement("g",{fill:"none",fillRule:"evenodd"},c.createElement("g",{transform:"translate(24 31.67)"},c.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),c.createElement("path",{className:"".concat(e,"-path-1"),d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),c.createElement("path",{className:"".concat(e,"-path-2"),d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",transform:"translate(13.56)"}),c.createElement("path",{className:"".concat(e,"-path-3"),d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),c.createElement("path",{className:"".concat(e,"-path-4"),d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.51
96885c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),c.createElement("path",{className:"".concat(e,"-path-5"),d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),c.createElement("g",{className:"".concat(e,"-g"),transform:"translate(149.65 15.383)"},c.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),c.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};const EV=function(){var e=(0,c.useContext(hV).getPrefixCls)("empty-img-simple");return c.createElement("svg",{className:e,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},c.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},c.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),c.createElement("g",{className:"".concat(e,"-g"),fillRule:"nonzero"},c.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),c.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",className:"".concat(e,"-path")}))))};var _V=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},kV=c.createElement(xV,null),CV=c.createElement(EV,null),AV=function(e){var t=e.className,n=e.prefixCls,r=e.image,i=void 0===r?kV:r,s=e.description,o=e.children,a=e.imageStyle,l=_V(e,["className","prefixCls","image","description","children","imageStyle"]),u=c.useContext(hV),d=u.getPrefixCls,h=u.direction;return c.createElement(bV,{componentName:"Empty"},(function(e){var r,u=d("empty",n),p="undefined"!==typeof s?s:e.description,f="string"===typeof p?p:"empty",m=null;return m="string"===typeof i?c.createElement("img",{alt:f,src:i}):i,c.createElement("div",rV({className:dV()(u,(r={},oV(r,"".concat(u,"-normal"),i===CV),oV(r,"".concat(u,"-rtl"),"rtl"===h),r),t)},l),c.createElement("div",{className:"".concat(u,"-image"),style:a},m),p&&c.createElement("div",{className:"".concat(u,"-description")},p),o&&c.createElement("div",{className:"".concat(u,"-footer")},o))}))};AV.PRESENTED_IMAGE_DEFAULT=kV,AV.PRESENTED_IMAGE_SIMPLE=CV;const SV=AV;const IV=function(e){return c.createElement(pV,null,(function(t){var n=(0,t.getPrefixCls)("empty");switch(e){case"Table":case"List":return c.createElement(SV,{image:SV.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return c.createElement(SV,{image:SV.PRESENTED_IMAGE_SIMPLE,className:"".concat(n,"-small")});default:return c.createElement(SV,null)}}))};function TV(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}var PV,NV=function(){if(!TV()||!window.document.documentElement)return!1;if(void 0!==PV)return PV;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),PV=1===e.scrollHeight,document.body.removeChild(e),PV};var RV=["xxl","xl","lg","md","sm","xs"],OV={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},MV=new Map,jV=-1,LV={};const DV={matchHandlers:{},dispatch:function(e){return LV=e,MV.forEach((function(e){return e(LV)})),MV.size>=1},subscribe:function(e){return MV.size||this.register(),jV+=1,MV.set(jV,e),e(LV),jV},unsubscribe:function(e){MV.delete(e),MV.size||this.unregister()},unregister:function(){var e=this;
9688Object.keys(OV).forEach((function(t){var n=OV[t],r=e.matchHandlers[n];null===r||void 0===r||r.mql.removeListener(null===r||void 0===r?void 0:r.listener)})),MV.clear()},register:function(){var e=this;Object.keys(OV).forEach((function(t){var n=OV[t],r=function(n){var r=n.matches;e.dispatch(rV(rV({},LV),oV({},t,r)))},i=window.matchMedia(n);i.addListener(r),e.matchHandlers[n]={mql:i,listener:r},r(i)}))}};var BV=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t};const UV=(0,c.createContext)({});var FV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};BV("top","middle","bottom","stretch"),BV("start","end","center","space-around","space-between","space-evenly");function $V(e,t){var n=lV(c.useState("string"===typeof e?e:""),2),r=n[0],i=n[1];return c.useEffect((function(){!function(){if("string"===typeof e&&i(e),"object"===iV(e))for(var n=0;n<RV.length;n++){var r=RV[n];if(t[r]){var s=e[r];if(void 0!==s)return void i(s)}}}()}),[JSON.stringify(e),t]),r}var zV=c.forwardRef((function(e,t){var n,r=e.prefixCls,i=e.justify,s=e.align,o=e.className,a=e.style,l=e.children,u=e.gutter,d=void 0===u?0:u,h=e.wrap,p=FV(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),f=c.useContext(hV),m=f.getPrefixCls,g=f.direction,y=lV(c.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),2),v=y[0],w=y[1],b=lV(c.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),2),x=b[0],E=b[1],_=$V(s,x),k=$V(i,x),C=function(){var e=lV(c.useState(!1),2),t=e[0],n=e[1];return c.useEffect((function(){n(NV())}),[]),t}(),A=c.useRef(d);c.useEffect((function(){var e=DV.subscribe((function(e){E(e);var t=A.current||0;(!Array.isArray(t)&&"object"===iV(t)||Array.isArray(t)&&("object"===iV(t[0])||"object"===iV(t[1])))&&w(e)}));return function(){return DV.unsubscribe(e)}}),[]);var S=m("row",r),I=function(){var e=[void 0,void 0];return(Array.isArray(d)?d:[d,void 0]).forEach((function(t,n){if("object"===iV(t))for(var r=0;r<RV.length;r++){var i=RV[r];if(v[i]&&void 0!==t[i]){e[n]=t[i];break}}else e[n]=t})),e}(),T=dV()(S,(oV(n={},"".concat(S,"-no-wrap"),!1===h),oV(n,"".concat(S,"-").concat(k),k),oV(n,"".concat(S,"-").concat(_),_),oV(n,"".concat(S,"-rtl"),"rtl"===g),n),o),P={},N=null!=I[0]&&I[0]>0?I[0]/-2:void 0,R=null!=I[1]&&I[1]>0?I[1]/-2:void 0;if(N&&(P.marginLeft=N,P.marginRight=N),C){var O=lV(I,2);P.rowGap=O[1]}else R&&(P.marginTop=R,P.marginBottom=R);var M=lV(I,2),j=M[0],L=M[1],D=c.useMemo((function(){return{gutter:[j,L],wrap:h,supportFlexGap:C}}),[j,L,h,C]);return c.createElement(UV.Provider,{value:D},c.createElement("div",rV({},p,{className:T,style:rV(rV({},P),a),ref:t}),l))}));const HV=zV;const WV=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=(0,c.useRef)({}),n=function(){var e=c.useReducer((function(e){return e+1}),0);return lV(e,2)[1]}();return(0,c.useEffect)((function(){var r=DV.subscribe((function(r){t.current=r,e&&n()}));return function(){return DV.unsubscribe(r)}}),[]),t.current};function qV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function VV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qV(Object(n),!0).forEach((function(t){oV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const GV={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};function KV(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const ZV=(0,c.createContext)({});function YV(e,t){(function(e){return"string"===typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function QV(e){return e<=1?"".concat(100*Number(e),"%"):e}function JV(e){return 1===e.length?"0"+e:String(e)}function XV(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function eG(e){return tG(e)/255}function tG(e){return parseInt(e,16)}var nG={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",s
vendor: 2,890 bytes, line 9688
9688almon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function rG(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,s=null,o=!1,a=!1;return"string"===typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(nG[e])e=nG[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=aG.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=aG.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=aG.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=aG.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=aG.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=aG.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=aG.hex8.exec(e),n)return{r:tG(n[1]),g:tG(n[2]),b:tG(n[3]),a:eG(n[4]),format:t?"name":"hex8"};if(n=aG.hex6.exec(e),n)return{r:tG(n[1]),g:tG(n[2]),b:tG(n[3]),format:t?"name":"hex"};if(n=aG.hex4.exec(e),n)return{r:tG(n[1]+n[1]),g:tG(n[2]+n[2]),b:tG(n[3]+n[3]),a:eG(n[4]+n[4]),format:t?"name":"hex8"};if(n=aG.hex3.exec(e),n)return{r:tG(n[1]+n[1]),g:tG(n[2]+n[2]),b:tG(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"===typeof e&&(cG(e.r)&&cG(e.g)&&cG(e.b)?(t=function(e,t,n){return{r:255*YV(e,255),g:255*YV(t,255),b:255*YV(n,255)}}(e.r,e.g,e.b),o=!0,a="%"===String(e.r).substr(-1)?"prgb":"rgb"):cG(e.h)&&cG(e.s)&&cG(e.v)?(r=QV(e.s),i=QV(e.v),t=function(e,t,n){e=6*YV(e,360),t=YV(t,100),n=YV(n,100);var r=Math.floor(e),i=e-r,s=n*(1-t),o=n*(1-i*t),a=n*(1-(1-i)*t),c=r%6;return{r:255*[n,o,s,s,a,n][c],g:255*[a,n,n,o,s,s][c],b:255*[s,s,a,n,n,o][c]}}(e.h,r,i),o=!0,a="hsv"):cG(e.h)&&cG(e.s)&&cG(e.l)&&(r=QV(e.s),s=QV(e.l),t=function(e,t,n){var r,i,s;if(e=YV(e,360),t=YV(t,100),n=YV(n,100),0===t)i=n,s=n,r=n;else{var o=n<.5?n*(1+t):n+t-n*t,a=2*n-o;r=XV(a,o,e+1/3),i=XV(a,o,e),s=XV(a,o,e-1/3)}return{r:255*r,g:255*i,b:255*s}}(e.h,r,s),o=!0,a="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=function(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}(n),{ok:o,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var iG="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),sG="[\\s|\\(]+(".concat(iG,")[,|\\s]+(").concat(iG,")[,|\\s]+(").concat(iG,")\\s*\\)?"),oG="[\\s|\\(]+(".concat(iG,")[,|\\s]+(").concat(iG,")[,|\\s]+(").concat(iG,")[,|\\s]+(").concat(iG,")\\s*\\)?"),aG={CSS_UNIT:new RegExp(iG),rgb:new RegExp("rgb"+sG),rgba:new RegExp("rgba"+oG),hsl:new RegExp("hsl"+sG),hsla:new RegExp("hsla"+oG),hsv:new RegExp("hsv"+sG),hsva:new RegExp("hsva"
9688+oG),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function cG(e){return Boolean(aG.CSS_UNIT.exec(String(e)))}var lG=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function uG(e){var t=function(e,t,n){e=YV(e,255),t=YV(t,255),n=YV(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),s=0,o=r,a=r-i,c=0===r?0:a/r;if(r===i)s=0;else{switch(r){case e:s=(t-n)/a+(t<n?6:0);break;case t:s=(n-e)/a+2;break;case n:s=(e-t)/a+4}s/=6}return{h:s,s:c,v:o}}(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function dG(e){var t=e.r,n=e.g,r=e.b;return"#".concat(function(e,t,n,r){var i=[JV(Math.round(e).toString(16)),JV(Math.round(t).toString(16)),JV(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}(t,n,r,!1))}function hG(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?r+=360:r>=360&&(r-=360),r}function pG(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function fG(e,t,n){var r;return(r=n?e.v+.05*t:e.v-.15*t)>1&&(r=1),Number(r.toFixed(2))}function mG(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=rG(e),i=5;i>0;i-=1){var s=uG(r),o=dG(rG({h:hG(s,i,!0),s:pG(s,i,!0),v:fG(s,i,!0)}));n.push(o)}n.push(dG(r));for(var a=1;a<=4;a+=1){var c=uG(r),l=dG(rG({h:hG(c,a),s:pG(c,a),v:fG(c,a)}));n.push(l)}return"dark"===t.theme?lG.map((function(e){var r=e.index,i=e.opacity,s=dG(function(e,t,n){var r=n/100;return{r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b}}(rG(t.backgroundColor||"#141414"),rG(n[r]),100*i));return s})):n}var gG={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},yG={},vG={};Object.keys(gG).forEach((function(e){yG[e]=mG(gG[e]),yG[e].primary=yG[e][5],vG[e]=mG(gG[e],{theme:"dark",backgroundColor:"#141414"}),vG[e].primary=vG[e][5]}));yG.red,yG.volcano,yG.gold,yG.orange,yG.yellow,yG.lime,yG.green,yG.cyan,yG.blue,yG.geekblue,yG.purple,yG.magenta,yG.grey;var wG={},bG=[];function xG(e,t){}function EG(e,t){}function _G(e,t,n){t||wG[n]||(e(!1,n),wG[n]=!0)}function kG(e,t){_G(xG,e,t)}kG.preMessage=function(e){bG.push(e)},kG.resetWarned=function(){wG={}},kG.noteOnce=function(e,t){_G(EG,e,t)};const CG=kG;function AG(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var SG="data-rc-order",IG=new Map;function TG(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):"rc-util-key"}function PG(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function NG(e){return Array.from((IG.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function RG(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!TV())return null;
9688var n=t.csp,r=t.prepend,i=document.createElement("style");i.setAttribute(SG,function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r)),null!==n&&void 0!==n&&n.nonce&&(i.nonce=null===n||void 0===n?void 0:n.nonce),i.innerHTML=e;var s=PG(t),o=s.firstChild;if(r){if("queue"===r){var a=NG(s).filter((function(e){return["prepend","prependQueue"].includes(e.getAttribute(SG))}));if(a.length)return s.insertBefore(i,a[a.length-1].nextSibling),i}s.insertBefore(i,o)}else s.appendChild(i);return i}function OG(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return NG(PG(t)).find((function(n){return n.getAttribute(TG(t))===e}))}function MG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var n=IG.get(e);if(!n||!AG(document,n)){var r=RG("",t),i=r.parentNode;IG.set(e,i),e.removeChild(r)}}(PG(n),n);var r=OG(t,n);if(r){var i,s,o;if(null!==(i=n.csp)&&void 0!==i&&i.nonce&&r.nonce!==(null===(s=n.csp)||void 0===s?void 0:s.nonce))r.nonce=null===(o=n.csp)||void 0===o?void 0:o.nonce;return r.innerHTML!==e&&(r.innerHTML=e),r}var a=RG(e,n);return a.setAttribute(TG(n),t),a}function jG(e){return"object"===iV(e)&&"string"===typeof e.name&&"string"===typeof e.theme&&("object"===iV(e.icon)||"function"===typeof e.icon)}function LG(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];if("class"===n)t.className=r,delete t.class;else t[n]=r;return t}),{})}function DG(e,t,n){return n?c.createElement(e.tag,VV(VV({key:t},LG(e.attrs)),n),(e.children||[]).map((function(n,r){return DG(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):c.createElement(e.tag,VV({key:t},LG(e.attrs)),(e.children||[]).map((function(n,r){return DG(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function BG(e){return mG(e)[0]}function UG(e){return e?Array.isArray(e)?e:[e]:[]}var FG=["icon","className","onClick","style","primaryColor","secondaryColor"],$G={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var zG=function(e){var t,n,r=e.icon,i=e.className,s=e.onClick,o=e.style,a=e.primaryColor,l=e.secondaryColor,u=KV(e,FG),d=$G;if(a&&(d={primaryColor:a,secondaryColor:l||BG(a)}),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",t=(0,c.useContext)(ZV).csp;(0,c.useEffect)((function(){MG(e,"@ant-design-icons",{prepend:!0,csp:t})}),[])}(),t=jG(r),n="icon should be icon definiton, but got ".concat(r),CG(t,"[@ant-design/icons] ".concat(n)),!jG(r))return null;var h=r;return h&&"function"===typeof h.icon&&(h=VV(VV({},h),{},{icon:h.icon(d.primaryColor,d.secondaryColor)})),DG(h.icon,"svg-".concat(h.name),VV({className:i,onClick:s,style:o,"data-icon":h.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u))};zG.displayName="IconReact",zG.getTwoToneColors=function(){return VV({},$G)},zG.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;$G.primaryColor=t,$G.secondaryColor=n||BG(t),$G.calculated=!!n};const HG=zG;function WG(e){var t=lV(UG(e),2),n=t[0],r=t[1];return HG.setTwoToneColors({primaryColor:n,secondaryColor:r})}var qG=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];WG("#1890ff");var VG=c.forwardRef((function(e,t){var n,r=e.className,i=e.icon,s=e.spin,o=e.rotate,a=e.tabIndex,l=e.onClick,u=e.twoToneColor,d=KV(e,qG),h=c.useContext(ZV),p=h.prefixCls,f=void 0===p?"anticon":p,m=h.rootClassName,g=dV()(m,f,(oV(n={},"".concat(f,"-").concat(i.name),!!i.name),oV(n,"".concat(f,"-spin"),!!s||"loading"===i.name),n),r),y=a;void 0===y&&l&&(y=-1);var v=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,w=lV(UG(u),2),b=w[0],x=w[1];return c.createElement("span",VV(VV({role:"img","aria-label":i.name},d),{},{ref:t,tabIndex:y,onClick:l,className:g}),c.createElement(HG,{icon:i,primaryColor:b,secondaryColor:x,style:v}))}));VG.displayName="AntdIcon",VG.getTwoToneColor=function(){var e=HG.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},VG.setTwoToneColor=WG;const GG=VG;var KG=function(e,t){return c.createElement(GG,VV(VV({},e),{},{ref:t,icon:GV}))};KG.displayName="DoubleLeftOutlined";const ZG=c.forwardRef(KG);const YG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.
96881 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};var QG=function(e,t){return c.createElement(GG,VV(VV({},e),{},{ref:t,icon:YG}))};QG.displayName="DoubleRightOutlined";const JG=c.forwardRef(QG);const XG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var eK=function(e,t){return c.createElement(GG,VV(VV({},e),{},{ref:t,icon:XG}))};eK.displayName="LeftOutlined";const tK=c.forwardRef(eK);const nK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var rK=function(e,t){return c.createElement(GG,VV(VV({},e),{},{ref:t,icon:nK}))};rK.displayName="RightOutlined";const iK=c.forwardRef(rK);function sK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sV(r.key),r)}}function aK(e,t,n){return t&&oK(e.prototype,t),n&&oK(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cK(e,t){return cK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cK(e,t)}function lK(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cK(e,t)}function uK(e){return uK=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uK(e)}function dK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(dK=function(){return!!e})()}function hK(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pK(e){var t=dK();return function(){var n,r=uK(e);if(t){var i=uK(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==iV(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hK(e)}(this,n)}}const fK=function(e){var t,n="".concat(e.rootPrefixCls,"-item"),r=dV()(n,"".concat(n,"-").concat(e.page),(oV(t={},"".concat(n,"-active"),e.active),oV(t,"".concat(n,"-disabled"),!e.page),oV(t,e.className,!!e.className),t));return c.createElement("li",{title:e.showTitle?e.page:null,className:r,onClick:function(){e.onClick(e.page)},onKeyPress:function(t){e.onKeyPress(t,e.onClick,e.page)},tabIndex:"0"},e.itemRender(e.page,"page",c.createElement("a",{rel:"nofollow"},e.page)))},mK=13,gK=38,yK=40;var vK=function(e){lK(n,e);var t=pK(n);function n(){var e;sK(this,n);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return(e=t.call.apply(t,[this].concat(i))).state={goInputText:""},e.buildOptionText=function(t){return"".concat(t," ").concat(e.props.locale.items_per_page)},e.changeSize=function(t){e.props.changeSize(Number(t))},e.handleChange=function(t){e.setState({goInputText:t.target.value})},e.handleBlur=function(t){var n=e.props,r=n.goButton,i=n.quickGo,s=n.rootPrefixCls,o=e.state.goInputText;r||""===o||(e.setState({goInputText:""}),t.relatedTarget&&(t.relatedTarget.className.indexOf("".concat(s,"-item-link"))>=0||t.relatedTarget.className.indexOf("".concat(s,"-item"))>=0)||i(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==mK&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return aK(n,[{key:"getValidValue",value:function(){var e=this.state.goInputText;return!e||isNaN(e)?void 0:Number(e)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,i=t.rootPrefixCls,s=t.changeSize,o=t.quickGo,a=t.goButton,l=t.selectComponentClass,u=t.buildOptionText,d=t.selectPrefixCls,h=t.disabled,p=this.state.goInputText,f="".concat(i,"-options"),m=l,g=null,y=null,v=null;if(!s&&!o)return null;var w=this.getPageSizeOptions();if(s&&m){var b=w.map((function(t,n){return c.createElement(m.Option,{key:n,value:t.toString()},(u||e.buildOptionText)(t))}));g=c.createElement(m,{disabled:h,prefixCls:d,showSearch:!1,className:"".concat(f,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||w[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode},"aria-label":r.page_size,defaultOpen:!1},b)}return o&&(a&&(v="boolean"===typeof a?c.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:h,className:"".concat(f,"-quick-jumper
9688-button")},r.jump_to_confirm):c.createElement("span",{onClick:this.go,onKeyUp:this.go},a)),y=c.createElement("div",{className:"".concat(f,"-quick-jumper")},r.jump_to,c.createElement("input",{disabled:h,type:"text",value:p,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":r.page}),r.page,v)),c.createElement("li",{className:"".concat(f)},g,y)}}]),n}(c.Component);vK.defaultProps={pageSizeOptions:["10","20","50","100"]};const wK=vK;function bK(){}function xK(e){var t=Number(e);return"number"===typeof t&&!isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function EK(e,t,n){var r="undefined"===typeof e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var _K=function(e){lK(n,e);var t=pK(n);function n(e){var r;sK(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(EK(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,i=e||c.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"===typeof e&&(i=c.createElement(e,VV({},r.props))),i},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){var t=r.props.total;return xK(e)&&e!==r.state.current&&xK(t)&&t>0},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper;return!(e.total<=r.state.pageSize)&&t},r.handleKeyDown=function(e){e.keyCode!==gK&&e.keyCode!==yK||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===mK?r.handleChange(t):e.keyCode===gK?r.handleChange(t-1):e.keyCode===yK&&r.handleChange(t+1)},r.handleBlur=function(e){var t=r.getValidValue(e);r.handleChange(t)},r.changePageSize=function(e){var t=r.state.current,n=EK(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"===typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props,n=t.disabled,i=t.onChange,s=r.state,o=s.pageSize,a=s.current,c=s.currentInputValue;if(r.isValid(e)&&!n){var l=EK(void 0,r.state,r.props),u=e;return e>l?u=l:e<1&&(u=1),"current"in r.props||r.setState({current:u}),u!==c&&r.setState({currentInputValue:u}),i(u,o),u}return a},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current<EK(void 0,r.state,r.props)},r.runIfEnter=function(e,t){if("Enter"===e.key||13===e.charCode){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];t.apply(void 0,r)}},r.runIfEnterPrev=function(e){r.runIfEnter(e,r.prev)},r.runIfEnterNext=function(e){r.runIfEnter(e,r.next)},r.runIfEnterJumpPrev=function(e){r.runIfEnter(e,r.jumpPrev)},r.runIfEnterJumpNext=function(e){r.runIfEnter(e,r.jumpNext)},r.handleGoTO=function(e){e.keyCode!==mK&&"click"!==e.type||r.handleChange(r.state.currentInputValue)};var i=e.onChange!==bK;"current"in e&&!i&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var s=e.defaultCurrent;"current"in e&&(s=e.current);var o=e.defaultPageSize;return"pageSize"in e&&(o=e.pageSize),s=Math.min(s,EK(o,void 0,e)),r.state={current:s,currentInputValue:s,pageSize:o},r}return aK(n,[{key:"componentDidUpdate",value:function(e,t){var n=this.props.prefixCls;if(t.current!==this.state.current&&this.paginationNode){var r=this.paginationNode.querySelector(".".concat(n,"-item-").concat(t.current));r&&document.activeElement===r&&r.blur()}}},{key:"getValidValue",value:function(e){var t=e.target.value,n=EK(void 0,this.state,this.props),r=this.state.currentInputValue;return""===t?t:isNaN(Number(t))?r:t>=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return"undefined"!==typeof t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return(0,c.isValidElement)(r)?(0,c.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return(0,c.isValidElement)(r)?(0,c.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.className,i=t.style,s=t.disabled,o=t.hideOnSinglePage,a=t.total,l=t.locale,u=t.showQuickJumper,d=t.showLessItems,h=t.showTitle,p=t.showTotal,f=t.simple,m=t.itemRender,g=t.showPrevNextJumpers,y=t.jumpPrevIcon,v=t.jumpNextIcon,w=t.selectComponentClass,b=t.selectPrefixCls,x=t.pageSizeOptions,E=this.state,_=E.current,k=E.pageSize,C=E.currentInputValue;if(!0===o&&a<=k)return null;var A=EK(void 0,this.state,this.props),S=[],I=null,T=null,P=null,N=null,R=null,O=u&&u.goButton,M=d?1:2,j=_-1>0?_-1:0,L=_+1<A?_+1:A,D=Object.keys(this.props).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e.props[n]),t}),{}),B=p&&c.createElement("li",{className:"".concat(n,"-total-text")},p(a,[0===a?0:(_-1)*k+1,_*k>a?a:_*k]));if(f)return O&&(R="boolean"===typeof O?c.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},l.jump_to_confirm):c.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},O),R=c.createElement("li",{title:h?"".concat(l.jump_to).concat(_,"/").concat(A):null,className:"".concat(n,"-simple-pager")},R)),c.createElement("ul",rV({className:dV()(n,"".concat(n,"-simple"),oV({},"".concat(n,"-disabled"),s),r),style:i,ref:this.savePaginationNode},D),B,c.createElement("li",{title:h?l.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:dV()("".concat(n,"-prev"),oV({},"".concat(n,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(j)),c.createElement("li",{title:h?"".concat(_,"/").concat(A):null,className:"".concat(n,"-simple-pager")},c.createElement("input",{type:"text",value:C,disabled:s,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:"3"}),c.createElement("span",{className:"".concat(n,"-slash")},"/"),A),c.createElement("li",{title:h?l.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:dV()("".concat(n,"-next"),oV({},"".concat(n,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(L)),R);if(A<=3+2*M){var U={locale:l,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:h,itemRender:m};A||S.push(c.createElement(fK,rV({},U,{key:"noPager",page:1,className:"".concat(n,"-item-disabled")})));for(var F=1;F<=A;F+=1){var $=_===F;S.push(c.createElement(fK,rV({},U,{key:F,page:F,active:$})))}}else{var z=d?l.prev_3:l.prev_5,H=d?l.next_3:l.next_5;g&&(I=c.createElement("li",{title:h?z:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:dV()("".concat(n,"-jump-prev"),oV({},"".concat(n,"-jump-prev-custom-icon"),!!y))},m(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(y,"prev page"))),T=c.createElement("li",{title:h?H:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:dV()("".concat(n,"-jump-next"),oV({},"".concat(n,"-jump-next-custom-icon"),!!v))},m(this.getJumpNextPage(),"jump-next",this.getItemIcon(v,"next page")))),N=c.createElement(fK,{locale:l,last:!0,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:A,page:A,active:!1,showTitle:h,itemRender:m}),P=c.createElement(fK,{locale:l,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:h,itemRender:m});var W=Math.max(1,_-M),q=Math.min(_+M,A);_-1<=M&&(q=1+2*M),A-_<=M&&(W=A-2*M);for(var V=W;V<=q;V+=1){var G=_===V;S.push(c.createElement(fK,{locale:l,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:V,page:V,active:G,showTitle:h,itemRender:m}))}_-1>=2*M&&3!==_&&(S[0]=(0,c.cloneElement)(S[0],{className:"".concat(n,"-item-after-jump-prev")}),S.unshift(I)),A-_>=2*M&&_!==A-2&&(S[S.length-1]=(0,c.cloneElement)(S[S.length-1],{className:"".concat(n,"-item-before-jump-next")}),S.push(T)),1!==W&&S.unshift(P),q!==A&&S.push(N)}var K=!this.hasPrev()||!A,Z=!this.hasNext()||!A;return c.createElement("ul",rV({className:dV()(n,r,oV({},"".concat(n,"-disabled"),s)),style:i,ref:this.savePaginationNode},D),B,c.createElement("li",{title:h?l.prev_page:null,onClick:this.prev,tabIndex:K?null:0,onKeyPress:this.runIfEnterPrev,className:dV()("".concat(n,"-prev"),oV({},"".concat(n,"-disabled"),K)),"aria-disabled":K},this.renderPrev(j)),S,c.createElement("li",{title:h?l.next_page:null,onClick:this.next,tabIndex:Z?null:0,onKeyPress:this.runIfEnterNext,className:dV()("".concat(n,"-next"),oV({},"".concat(n,"-disabled"),Z)),"aria-disabled":Z},this.renderNext(L)),c.createElement(wK,{disabled:s,locale:l,rootPrefixCls:n,selectComponentClass:w,selectPrefixCls:b,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:_,pageSize:k,pageSizeOptions:x,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:O}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,i=EK(e.pageSize,t,e);r=r>i?i:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(c.Component);_K.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:bK,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:bK,locale:{items_per_page:"\u6761/\u9875",jump_to:"\u8df3\u81f3",jump_to_confirm:"\u786e\u5b9a",page:"\u9875",prev_page:"\u4e0a\u4e00\u9875",next_page:"\u4e0b\u4e00\u9875",prev_5:"\u5411\u524d 5 \u9875",next_5:"\u5411\u540e 5 \u9875",prev_3:"\u5411\u524d 3 \u9875",next_3:"\u5411\u540e 3 \u9875",page_size:"\u9875\u7801"},style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};const kK=_K;function CK(e){var t=c.useRef();t.current=e;var n=c.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(r))}),[]);return n}var AK=TV()?c.useLayoutEffect:c.useEffect,SK=function(e,t){var n=c.useRef(!0);AK((function(){return e(n.current)}),t),AK((function(){return n.current=!1,function(){n.current=!0}}),[])},IK=function(e,t){SK((function(t){if(!t)return e()}),t)};const TK=SK;function PK(e){var t=c.useRef(!1),n=lV(c.useState(e),2),r=n[0],i=n[1];return c.useEffect((function(){return t.current=!1,function(){t.current=!0}}
9688),[]),[r,function(e,n){n&&t.current||i(e)}]}function NK(e){return void 0!==e}function RK(e,t){var n=t||{},r=n.defaultValue,i=n.value,s=n.onChange,o=n.postState,a=lV(PK((function(){return NK(i)?i:NK(r)?"function"===typeof r?r():r:"function"===typeof e?e():e})),2),c=a[0],l=a[1],u=void 0!==i?i:c,d=o?o(u):u,h=CK(s),p=lV(PK([u]),2),f=p[0],m=p[1];return IK((function(){var e=f[0];c!==e&&h(c,e)}),[f]),IK((function(){NK(i)||l(i)}),[i]),[d,CK((function(e,t){l(e,t),m([u],t)}))]}const OK=function(){if("undefined"===typeof navigator||"undefined"===typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null===e||void 0===e?void 0:e.substr(0,4))};var MK={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=MK.F1&&t<=MK.F12)return!1;switch(t){case MK.ALT:case MK.CAPS_LOCK:case MK.CONTEXT_MENU:case MK.CTRL:case MK.DOWN:case MK.END:case MK.ESC:case MK.HOME:case MK.INSERT:case MK.LEFT:case MK.MAC_FF_META:case MK.META:case MK.NUMLOCK:case MK.NUM_CENTER:case MK.PAGE_DOWN:case MK.PAGE_UP:case MK.PAUSE:case MK.PRINT_SCREEN:case MK.RIGHT:case MK.SHIFT:case MK.UP:case MK.WIN_KEY:case MK.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=MK.ZERO&&e<=MK.NINE)return!0;
9688if(e>=MK.NUM_ZERO&&e<=MK.NUM_MULTIPLY)return!0;if(e>=MK.A&&e<=MK.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case MK.SPACE:case MK.QUESTION_MARK:case MK.NUM_PLUS:case MK.NUM_MINUS:case MK.NUM_PERIOD:case MK.NUM_DIVISION:case MK.SEMICOLON:case MK.DASH:case MK.EQUALS:case MK.COMMA:case MK.PERIOD:case MK.SLASH:case MK.APOSTROPHE:case MK.SINGLE_QUOTE:case MK.OPEN_SQUARE_BRACKET:case MK.BACKSLASH:case MK.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const jK=MK;var LK=n(3329);function DK(e,t,n){var r=c.useRef({});return"value"in r.current&&!n(r.current.condition,t)||(r.current.value=e(),r.current.condition=t),r.current.value}function BK(e,t){"function"===typeof e?e(t):"object"===iV(e)&&e&&"current"in e&&(e.current=t)}function UK(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter((function(e){return e}));return r.length<=1?r[0]:function(e){t.forEach((function(t){BK(t,e)}))}}function FK(e){var t,n,r=(0,LK.isMemo)(e)?e.type.type:e.type;return!!("function"!==typeof r||null!==(t=r.prototype)&&void 0!==t&&t.render)&&!!("function"!==typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render)}var $K=c.createContext(null);function zK(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=c.useRef(null),n=c.useRef(null);return c.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return t.current},function(r){(r||null===t.current)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout((function(){t.current=null}),e)}]}var HK="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/);function WK(e,t){return 0===e.indexOf(t)}function qK(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:VV({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||WK(n,"aria-"))||t.data&&WK(n,"data-")||t.attr&&HK.includes(n))&&(r[n]=e[n])})),r}function VK(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return c.Children.forEach(e,(function(e){(void 0!==e&&null!==e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(VK(e)):(0,LK.isFragment)(e)&&e.props?n=n.concat(VK(e.props.children,t)):n.push(e))})),n}var GK=n(7119);function KK(e){return function(e){return e instanceof HTMLElement||e instanceof SVGElement}(e)?e:e instanceof c.Component?GK.findDOMNode(e):null}var ZK=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),YK="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,QK="undefined"!==typeof n.g&&n.g.Math===Math?n.g:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),JK="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(QK):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var XK=["top","right","bottom","left","width","height","size","weight"],eZ="undefined"!==typeof MutationObserver,tZ=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;
vendor: 5,366 bytes, line 9688
9688function s(){n&&(n=!1,e()),r&&a()}function o(){JK(s)}function a(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return a}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){YK&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),eZ?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){YK&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;XK.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),nZ=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},rZ=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||QK},iZ=uZ(0,0,0,0);function sZ(e){return parseFloat(e)||0}function oZ(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+sZ(e["border-"+n+"-width"])}),0)}function aZ(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return iZ;var r=rZ(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],s=e["padding-"+i];t[i]=sZ(s)}return t}(r),s=i.left+i.right,o=i.top+i.bottom,a=sZ(r.width),c=sZ(r.height);if("border-box"===r.boxSizing&&(Math.round(a+s)!==t&&(a-=oZ(r,"left","right")+s),Math.round(c+o)!==n&&(c-=oZ(r,"top","bottom")+o)),!function(e){return e===rZ(e).document.documentElement}(e)){var l=Math.round(a+s)-t,u=Math.round(c+o)-n;1!==Math.abs(l)&&(a-=l),1!==Math.abs(u)&&(c-=u)}return uZ(i.left,i.top,a,c)}var cZ="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof rZ(e).SVGGraphicsElement}:function(e){return e instanceof rZ(e).SVGElement&&"function"===typeof e.getBBox};function lZ(e){return YK?cZ(e)?function(e){var t=e.getBBox();return uZ(0,0,t.width,t.height)}(e):aZ(e):iZ}function uZ(e,t,n,r){return{x:e,y:t,width:n,height:r}}var dZ=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=uZ(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=lZ(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),hZ=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,s="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(s.prototype);return nZ(o,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),o}(t);nZ(this,{target:e,contentRect:n})},pZ=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new ZK,"function"!==typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof rZ(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new dZ(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof rZ(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new hZ(e.target,e.broadcastRect())}
9688));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),fZ="undefined"!==typeof WeakMap?new WeakMap:new ZK,mZ=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=tZ.getInstance(),r=new pZ(t,n,this);fZ.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){mZ.prototype[e]=function(){var t;return(t=fZ.get(this))[e].apply(t,arguments)}}));const gZ="undefined"!==typeof QK.ResizeObserver?QK.ResizeObserver:mZ;var yZ=new Map;var vZ=new gZ((function(e){e.forEach((function(e){var t,n=e.target;null===(t=yZ.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));var wZ=function(e){lK(n,e);var t=pK(n);function n(){return sK(this,n),t.apply(this,arguments)}return aK(n,[{key:"render",value:function(){return this.props.children}}]),n}(c.Component),bZ=c.createContext(null);function xZ(e,t){var n=e.children,r=e.disabled,i=c.useRef(null),s=c.useRef(null),o=c.useContext(bZ),a="function"===typeof n,l=a?n(i):n,u=c.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),d=!a&&c.isValidElement(l)&&FK(l),h=d?l.ref:null,p=c.useMemo((function(){return UK(h,i)}),[h,i]),f=function(){return KK(i.current)||KK(s.current)};c.useImperativeHandle(t,(function(){return f()}));var m=c.useRef(e);m.current=e;var g=c.useCallback((function(e){var t=m.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),s=i.width,a=i.height,c=e.offsetWidth,l=e.offsetHeight,d=Math.floor(s),h=Math.floor(a);if(u.current.width!==d||u.current.height!==h||u.current.offsetWidth!==c||u.current.offsetHeight!==l){var p={width:d,height:h,offsetWidth:c,offsetHeight:l};u.current=p;var f=c===Math.round(s)?s:c,g=l===Math.round(a)?a:l,y=VV(VV({},p),{},{offsetWidth:f,offsetHeight:g});null===o||void 0===o||o(y,e,r),n&&Promise.resolve().then((function(){n(y,e)}))}}),[]);return c.useEffect((function(){var e,t,n=f();return n&&!r&&(e=n,t=g,yZ.has(e)||(yZ.set(e,new Set),vZ.observe(e)),yZ.get(e).add(t)),function(){return function(e,t){yZ.has(e)&&(yZ.get(e).delete(t),yZ.get(e).size||(vZ.unobserve(e),yZ.delete(e)))}(n,g)}}),[i.current,r]),c.createElement(wZ,{ref:s},d?c.cloneElement(l,{ref:p}):l)}const EZ=c.forwardRef(xZ);function _Z(e,t){var n=e.children;return("function"===typeof n?[n]:VK(n)).map((function(n,r){var i=(null===n||void 0===n?void 0:n.key)||"".concat("rc-observer-key","-").concat(r);return c.createElement(EZ,rV({},e,{key:i,ref:0===r?t:void 0}),n)}))}var kZ=c.forwardRef(_Z);kZ.Collection=function(e){var t=e.children,n=e.onBatchResize,r=c.useRef(0),i=c.useRef([]),s=c.useContext(bZ),o=c.useCallback((function(e,t,o){r.current+=1;var a=r.current;i.current.push({size:e,element:t,data:o}),Promise.resolve().then((function(){a===r.current&&(null===n||void 0===n||n(i.current),i.current=[])})),null===s||void 0===s||s(e,t,o)}),[n,s]);return c.createElement(bZ.Provider,{value:o},t)};const CZ=kZ;var AZ=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],SZ=void 0;function IZ(e,t){var n=e.prefixCls,r=e.invalidate,i=e.item,s=e.renderItem,o=e.responsive,a=e.responsiveDisabled,l=e.registerSize,u=e.itemKey,d=e.className,h=e.style,p=e.children,f=e.display,m=e.order,g=e.component,y=void 0===g?"div":g,v=KV(e,AZ),w=o&&!f;function b(e){l(u,e)}c.useEffect((function(){return function(){b(null)}}),[]);var x,E=s&&i!==SZ?s(i):p;r||(x={opacity:w?0:1,height:w?0:SZ,overflowY:w?"hidden":SZ,order:o?m:SZ,pointerEvents:w?"none":SZ,position:w?"absolute":SZ});var _={};w&&(_["aria-hidden"]=!0);var k=c.createElement(y,rV({className:dV()(!r&&n,d),style:VV(VV({},x),h)},_,v,{ref:t}),E);return o&&(k=c.createElement(CZ,{onResize:function(e){b(e.offsetWidth)},disabled:a},k)),k}var TZ=c.forwardRef(IZ);TZ.displayName="Item";const PZ=TZ;var NZ=function(e){return+setTimeout(e,16)},RZ=function(e){return clearTimeout(e)};"undefined"!==typeof window&&"requestAnimationFrame"in window&&(NZ=function(e){return window.requestAnimationFrame(e)},RZ=function(e){return window.cancelAnimationFrame(e)});var OZ=0,MZ=new Map;function jZ(e){MZ.delete(e)}var LZ=function(e){var t=OZ+=1;return function n(r){if(0===r)jZ(t),e();else{var i=NZ((function(){n(r-1)}));MZ.set(t,i)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};LZ.cancel=function(e){var t=MZ.get(e);return jZ(t),RZ(t)};const DZ=LZ;function BZ(){var e=c.useRef(null);return function(t){e.current||(e.current=[],function(e){if("undefined"===typeof MessageChannel)DZ(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}((function(){(0,GK.unstable_batchedUpdates)((function(){e.current.forEach((function(e){e()}
9688)),e.current=null}))}))),e.current.push(t)}}function UZ(e,t){var n=lV(c.useState(t),2),r=n[0],i=n[1];return[r,CK((function(t){e((function(){i(t)}))}))]}var FZ=["component"],$Z=["className"],zZ=["className"],HZ=function(e,t){var n=c.useContext(GZ);if(!n){var r=e.component,i=void 0===r?"div":r,s=KV(e,FZ);return c.createElement(i,rV({},s,{ref:t}))}var o=n.className,a=KV(n,$Z),l=e.className,u=KV(e,zZ);return c.createElement(GZ.Provider,{value:null},c.createElement(PZ,rV({ref:t,className:dV()(o,l)},a,u)))},WZ=c.forwardRef(HZ);WZ.displayName="RawItem";const qZ=WZ;var VZ=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],GZ=c.createContext(null),KZ="responsive",ZZ="invalidate";function YZ(e){return"+ ".concat(e.length," ...")}function QZ(e,t){var n=e.prefixCls,r=void 0===n?"rc-overflow":n,i=e.data,s=void 0===i?[]:i,o=e.renderItem,a=e.renderRawItem,l=e.itemKey,u=e.itemWidth,d=void 0===u?10:u,h=e.ssr,p=e.style,f=e.className,m=e.maxCount,g=e.renderRest,y=e.renderRawRest,v=e.suffix,w=e.component,b=void 0===w?"div":w,x=e.itemComponent,E=e.onVisibleChange,_=KV(e,VZ),k="full"===h,C=BZ(),A=lV(UZ(C,null),2),S=A[0],I=A[1],T=S||0,P=lV(UZ(C,new Map),2),N=P[0],R=P[1],O=lV(UZ(C,0),2),M=O[0],j=O[1],L=lV(UZ(C,0),2),D=L[0],B=L[1],U=lV(UZ(C,0),2),F=U[0],$=U[1],z=lV((0,c.useState)(null),2),H=z[0],W=z[1],q=lV((0,c.useState)(null),2),V=q[0],G=q[1],K=c.useMemo((function(){return null===V&&k?Number.MAX_SAFE_INTEGER:V||0}),[V,S]),Z=lV((0,c.useState)(!1),2),Y=Z[0],Q=Z[1],J="".concat(r,"-item"),X=Math.max(M,D),ee=m===KZ,te=s.length&&ee,ne=m===ZZ,re=te||"number"===typeof m&&s.length>m,ie=(0,c.useMemo)((function(){var e=s;return te?e=null===S&&k?s:s.slice(0,Math.min(s.length,T/d)):"number"===typeof m&&(e=s.slice(0,m)),e}),[s,d,S,m,te]),se=(0,c.useMemo)((function(){return te?s.slice(K+1):s.slice(ie.length)}),[s,ie,te,K]),oe=(0,c.useCallback)((function(e,t){var n;return"function"===typeof l?l(e):null!==(n=l&&(null===e||void 0===e?void 0:e[l]))&&void 0!==n?n:t}),[l]),ae=(0,c.useCallback)(o||function(e){return e},[o]);function ce(e,t,n){(V!==e||void 0!==t&&t!==H)&&(G(e),n||(Q(e<s.length-1),null===E||void 0===E||E(e)),void 0!==t&&W(t))}function le(e,t){R((function(n){var r=new Map(n);return null===t?r.delete(e):r.set(e,t),r}))}function ue(e){return N.get(oe(ie[e],e))}TK((function(){if(T&&"number"===typeof X&&ie){var e=F,t=ie.length,n=t-1;if(!t)return void ce(0,null);for(var r=0;r<t;r+=1){var i=ue(r);if(k&&(i=i||0),void 0===i){ce(r-1,void 0,!0);break}if(e+=i,0===n&&e<=T||r===n-1&&e+ue(n)<=T){ce(n,null);break}if(e+X>T){ce(r-1,e-i-F+D);break}}v&&ue(0)+F>T&&W(null)}}),[T,N,D,F,oe,ie]);var de=Y&&!!se.length,he={};null!==H&&te&&(he={position:"absolute",left:H,top:0});var pe,fe={prefixCls:J,responsive:te,component:x,invalidate:ne},me=a?function(e,t){var n=oe(e,t);return c.createElement(GZ.Provider,{key:n,value:VV(VV({},fe),{},{order:t,item:e,itemKey:n,registerSize:le,display:t<=K})},a(e,t))}:function(e,t){var n=oe(e,t);return c.createElement(PZ,rV({},fe,{order:t,key:n,item:e,renderItem:ae,itemKey:n,registerSize:le,display:t<=K}))},ge={order:de?K:Number.MAX_SAFE_INTEGER,className:"".concat(J,"-rest"),registerSize:function(e,t){B(t),j(D)},display:de};if(y)y&&(pe=c.createElement(GZ.Provider,{value:VV(VV({},fe),ge)},y(se)));else{var ye=g||YZ;pe=c.createElement(PZ,rV({},fe,ge),"function"===typeof ye?ye(se):ye)}var ve=c.createElement(b,rV({className:dV()(!ne&&r,f),style:p,ref:t},_),ie.map(me),re?pe:null,v&&c.createElement(PZ,rV({},fe,{responsive:ee,responsiveDisabled:!te,order:K,className:"".concat(J,"-suffix"),registerSize:function(e,t){$(t)},display:!0,style:he}),v));return ee&&(ve=c.createElement(CZ,{onResize:function(e,t){I(t.clientWidth)},disabled:!te},ve)),ve}var JZ=c.forwardRef(QZ);JZ.displayName="Overflow",JZ.Item=qZ,JZ.RESPONSIVE=KZ,JZ.INVALIDATE=ZZ;const XZ=JZ;const eY=function(e){var t,n=e.className,r=e.customizeIcon,i=e.customizeIconProps,s=e.onMouseDown,o=e.onClick,a=e.children;return t="function"===typeof r?r(i):r,c.createElement("span",{className:n,onMouseDown:function(e){e.preventDefault(),s&&s(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:o,"aria-hidden":!0},void 0!==t?t:c.createElement("span",{className:dV()(n.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},a))};var tY=function(e,t){var n,r,i=e.prefixCls,s=e.id,o=e.inputElement,a=e.disabled,l=e.tabIndex,u=e.autoFocus,d=e.autoComplete,h=e.editable,p=e.activeDescendantId,f=e.value,m=e.maxLength,g=e.onKeyDown,y=e.onMouseDown,v=e.onChange,w=e.onPaste,b=e.onCompositionStart,x=e.onCompositionEnd,E=e.open,_=e.attrs,k=o||c.createElement("input",null),C=k,A=C.ref,S=C.props,I=S.onKeyDown,T=S.onChange,P=S.onMouseDown,N=S.onCompositionStart,R=S.onCompositionEnd,O=S.style;return k.props,k=c.cloneElement(k,VV(VV(VV({type:"search"},S),{},{id:s,ref:UK(t,A),disabled:a,tabIndex:l,autoComplete:d||"off",autoFocus:u,className:dV()("".concat(i,"-selection-search-input"),null===(n=k)||void 0===n||null===(r=n.props)||void 0===r?void 0:r.className),role:"combobox","aria-expanded":E,"aria-haspopup":"listbox","aria-owns":"".concat(s,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(s,"_list"),"aria-activedescendant":p},_),{},{value:h?f:"",maxLength:m,readOnly:!h,unselectable:h?null:"on",style:VV(VV({},O),{},{opacity:h?null:0}),onKeyDown:function(e){g(e),I&&I(e)},onMouseDown:function(e){y(e),P&&P(e)},onChange:function(e){v(e),T&&T(e)},onCompositionStart:function(e){b(e),N&&N(e)},onCompositionEnd:function(e){x(e),R&&R(e)},onPaste:w}))},nY=c.forwardRef(tY);nY.displayName="Input";const rY=nY;function iY(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var sY="undefined"!==typeof window&&window.document&&window.document.documentElement;function oY(e){return["string","number"].includes(iV(e))}function aY(e){var t=void 0;return e&&(oY(e.title)?t=e.title.toString():oY(e.label)&&(t=e.label.toString())),t}function cY(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var lY=function(e){e.preventDefault(),e.stopPropagation()};const uY=function(e){var t,n,r=e.id,i=e.prefixCls,s=e.values,o=e.open,a=e.searchValue,l=e.autoClearSearchValue,u=e.inputRef,d=e.placeholder,h=e.disabled,p=e.mode,f=e.showSearch,m=e.autoFocus,g=e.autoComplete,y=e.activeDescendantId,v=e.tabIndex,w=e.removeIcon,b=e.maxTagCount,x=e.maxTagTextLength,E=e.maxTagPlaceholder,_=void 0===E?function(e){return"+ ".concat(e.length," ...")}:E,k=e.tagRender,C=e.onToggleOpen,A=e.onRemove,S=e.onInputChange,I=e.onInputPaste,T=e.onInputKeyDown,P=e.onInputMouseDown,N=e.onInputCompositionStart,R=e.onInputCompositionEnd,O=c.useRef(null),M=lV((0,c.useState)(0),2),j=M[0],L=M[1],D=lV((0,c.useState)(!1),2),B=D[0],U=D[1],F="".concat(i,"-selection"),$=o||"multiple"===p&&!1===l||"tags"===p?a:"",z="tags"===p||"multiple"===p&&!1===l||f&&(o||B);function H(e,t,n,r,i){return c.createElement("span",{className:dV()("".concat(F,"-item"),oV({},"".concat(F,"-item-disabled"),n)),title:aY(e)},c.createElement("span",{className:"".concat(F,"-item-content")},t),r&&c.createElement(eY,{className:"".concat(F,"-item-remove"),onMouseDown:lY,onClick:i,customizeIcon:w},"\xd7"))}t=function(){L(O.current.scrollWidth)},n=[$],sY?c.useLayoutEffect(t,n):c.useEffect(t,n);var W=c.createElement("div",{className:"".concat(F,"-search"),style:{width:j},onFocus:function(){U(!0)},onBlur:function(){U(!1)}},c.createElement(rY,{ref:u,open:o,prefixCls:i,id:r,inputElement:null,disabled:h,autoFocus:m,autoComplete:g,editable:z,activeDescendantId:y,value:$,onKeyDown:T,onMouseDown:P,onChange:S,onPaste:I,onCompositionStart:N,onCompositionEnd:R,tabIndex:v,attrs:qK(e,!0)}),c.createElement("span",{ref:O,className:"".concat(F,"-search-mirror"),"aria-hidden":!0},$,"\xa0")),q=c.createElement(XZ,{prefixCls:"".concat(F,"-overflow"),data:s,renderItem:function(e){var t=e.disabled,n=e.label,r=e.value,i=!h&&!t,s=n;if("number"===typeof x&&("string"===typeof n||"number"===typeof n)){var a=String(s);a.length>x&&(s="".concat(a.slice(0,x),"..."))}var l=function(t){t&&t.stopPropagation(),A(e)};return"function"===typeof k?function(e,t,n,r,i){return c.createElement("span",{onMouseDown:function(e){lY(e),C(!o)}},k({label:t,value:e,disabled:n,closable:r,onClose:i}))}(r,s,t,i,l):H(e,s,t,i,l)},renderRest:function(e){var t="function"===typeof _?_(e):_;return H({title:t},t,!1)},suffix:W,itemKey:cY,maxCount:b});return c.createElement(c.Fragment,null,q,!s.length&&!$&&c.createElement("span",{className:"".concat(F,"-placeholder")},d))};const dY=function(e){var t=e.inputElement,n=e.prefixCls,r=e.id,i=e.inputRef,s=e.disabled,o=e.autoFocus,a=e.autoComplete,l=e.activeDescendantId,u=e.mode,d=e.open,h=e.values,p=e.placeholder,f=e.tabIndex,m=e.showSearch,g=e.searchValue,y=e.activeValue,v=e.maxLength,w=e.onInputKeyDown,b=e.onInputMouseDown,x=e.onInputChange,E=e.onInputPaste,_=e.onInputCompositionStart,k=e.onInputCompositionEnd,C=lV(c.useState(!1),2),A=C[0],S=C[1],I="combobox"===u,T=I||m,P=h[0],N=g||"";I&&y&&!A&&(N=y),c.useEffect((function(){I&&S(!1)}),[I,y]);var R=!("combobox"!==u&&!d&&!m)&&!!N,O=aY(P);return c.createElement(c.Fragment,null,c.createElement("span",{className:"".concat(n,"-selection-search")},c.createElement(rY,{ref:i,prefixCls:n,id:r,open:d,inputElement:t,disabled:s,autoFocus:o,autoComplete:a,editable:T,activeDescendantId:l,value:N,onKeyDown:w,onMouseDown:b,onChange:function(e){
9688S(!0),x(e)},onPaste:E,onCompositionStart:_,onCompositionEnd:k,tabIndex:f,attrs:qK(e,!0),maxLength:I?v:void 0})),!I&&P?c.createElement("span",{className:"".concat(n,"-selection-item"),title:O,style:R?{visibility:"hidden"}:void 0},P.label):null,function(){if(P)return null;var e=R?{visibility:"hidden"}:void 0;return c.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:e},p)}())};var hY=function(e,t){var n=(0,c.useRef)(null),r=(0,c.useRef)(!1),i=e.prefixCls,s=e.open,o=e.mode,a=e.showSearch,l=e.tokenWithEnter,u=e.autoClearSearchValue,d=e.onSearch,h=e.onSearchSubmit,p=e.onToggleOpen,f=e.onInputKeyDown,m=e.domRef;c.useImperativeHandle(t,(function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}}));var g=lV(zK(0),2),y=g[0],v=g[1],w=(0,c.useRef)(null),b=function(e){!1!==d(e,!0,r.current)&&p(!0)},x={inputRef:n,onInputKeyDown:function(e){var t,n=e.which;n!==jK.UP&&n!==jK.DOWN||e.preventDefault(),f&&f(e),n!==jK.ENTER||"tags"!==o||r.current||s||null===h||void 0===h||h(e.target.value),t=n,[jK.ESC,jK.SHIFT,jK.BACKSPACE,jK.TAB,jK.WIN_KEY,jK.ALT,jK.META,jK.WIN_KEY_RIGHT,jK.CTRL,jK.SEMICOLON,jK.EQUALS,jK.CAPS_LOCK,jK.CONTEXT_MENU,jK.F1,jK.F2,jK.F3,jK.F4,jK.F5,jK.F6,jK.F7,jK.F8,jK.F9,jK.F10,jK.F11,jK.F12].includes(t)||p(!0)},onInputMouseDown:function(){v(!0)},onInputChange:function(e){var t=e.target.value;if(l&&w.current&&/[\r\n]/.test(w.current)){var n=w.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,w.current)}w.current=null,b(t)},onInputPaste:function(e){var t=e.clipboardData.getData("text");w.current=t},onInputCompositionStart:function(){r.current=!0},onInputCompositionEnd:function(e){r.current=!1,"combobox"!==o&&b(e.target.value)}},E="multiple"===o||"tags"===o?c.createElement(uY,rV({},e,x)):c.createElement(dY,rV({},e,x));return c.createElement("div",{ref:m,className:"".concat(i,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(e){var t=y();e.target===n.current||t||"combobox"===o||e.preventDefault(),("combobox"===o||a&&t)&&s||(s&&!1!==u&&d("",!0,!1),p())}},E)},pY=c.forwardRef(hY);pY.displayName="Selector";const fY=pY;function mY(e,t,n,r){var i=GK.unstable_batchedUpdates?function(e){GK.unstable_batchedUpdates(n,e)}:n;return null!==e&&void 0!==e&&e.addEventListener&&e.addEventListener(t,i,r),{remove:function(){null!==e&&void 0!==e&&e.removeEventListener&&e.removeEventListener(t,i,r)}}}var gY=(0,c.forwardRef)((function(e,t){var n=e.didUpdate,r=e.getContainer,i=e.children,s=(0,c.useRef)(),o=(0,c.useRef)();(0,c.useImperativeHandle)(t,(function(){return{}}));var a=(0,c.useRef)(!1);return!a.current&&TV()&&(o.current=r(),s.current=o.current.parentNode,a.current=!0),(0,c.useEffect)((function(){null===n||void 0===n||n(e)})),(0,c.useEffect)((function(){return null===o.current.parentNode&&null!==s.current&&s.current.appendChild(o.current),function(){var e,t;null===(e=o.current)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(o.current)}}),[]),o.current?GK.createPortal(i,o.current):null}));const yY=gY;function vY(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var wY=c.createContext({});var bY=function(e){lK(n,e);var t=pK(n);function n(){return sK(this,n),t.apply(this,arguments)}return aK(n,[{key:"render",value:function(){return this.props.children}}]),n}(c.Component);const xY=bY;var EY="none",_Y="appear",kY="enter",CY="leave",AY="none",SY="prepare",IY="start",TY="active",PY="end",NY="prepared";function RY(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var OY=function(e,t){var n={animationend:RY("Animation","AnimationEnd"),transitionend:RY("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}(TV(),"undefined"!==typeof window?window:{}),MY={};if(TV()){var jY=document.createElement("div");MY=jY.style}var LY={};function DY(e){if(LY[e])return LY[e];var t=OY[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var s=n[i];if(Object.prototype.hasOwnProperty.call(t,s)&&s in MY)return LY[e]=t[s],LY[e]}return""}var BY=DY("animationend"),UY=DY("transitionend"),FY=!(!BY||!UY),$Y=BY||"animationend",zY=UY||"transitionend";function HY(e,t){if(!e)return null;if("object"===iV(e)){var n=t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}));return e[n]}return"".concat(e,"-").concat(t)}const WY=TV()?c.useLayoutEffect:c.useEffect;var qY=[SY,IY,TY,PY],VY=[SY,NY],GY=!1;function KY(e){return e===TY||e===PY}const ZY=function(e,t,n){var r=lV(PK(AY),2),i=r[0],s=r[1],o=function(){var e=c.useRef(null);function t(){DZ.cancel(e.current)}return c.useEffect((function(){return function(){t()}}),[]),[function n(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var s=DZ((function(){i<=1?r({isCanceled:function(){return s!==e.current}}):n(r,i-1)}));e.current=s},t]}(),a=lV(o,2),l=a[0],u=a[1];var d=t?VY:qY;return WY((function(){if(i!==AY&&i!==PY){var e=d.indexOf(i),t=d[e+1],r=n(i);r===GY?s(t,!0):t&&l((function(e){function n(){e.isCanceled()||s(t,!0)}!0===r?n():Promise.resolve(r).then(n)}))}}),[e,i]),c.useEffect((function(){return function(){u()}}),[]),[function(){s(SY,!0)},i]};
9688function YY(e,t,n,r){var i=r.motionEnter,s=void 0===i||i,o=r.motionAppear,a=void 0===o||o,l=r.motionLeave,u=void 0===l||l,d=r.motionDeadline,h=r.motionLeaveImmediately,p=r.onAppearPrepare,f=r.onEnterPrepare,m=r.onLeavePrepare,g=r.onAppearStart,y=r.onEnterStart,v=r.onLeaveStart,w=r.onAppearActive,b=r.onEnterActive,x=r.onLeaveActive,E=r.onAppearEnd,_=r.onEnterEnd,k=r.onLeaveEnd,C=r.onVisibleChanged,A=lV(PK(),2),S=A[0],I=A[1],T=lV(PK(EY),2),P=T[0],N=T[1],R=lV(PK(null),2),O=R[0],M=R[1],j=(0,c.useRef)(!1),L=(0,c.useRef)(null);function D(){return n()}var B=(0,c.useRef)(!1);function U(){N(EY,!0),M(null,!0)}function F(e){var t=D();if(!e||e.deadline||e.target===t){var n,r=B.current;P===_Y&&r?n=null===E||void 0===E?void 0:E(t,e):P===kY&&r?n=null===_||void 0===_?void 0:_(t,e):P===CY&&r&&(n=null===k||void 0===k?void 0:k(t,e)),P!==EY&&r&&!1!==n&&U()}}var $=function(e){var t=(0,c.useRef)(),n=(0,c.useRef)(e);n.current=e;var r=c.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(zY,r),e.removeEventListener($Y,r))}return c.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(zY,r),e.addEventListener($Y,r),t.current=e)},i]}(F),z=lV($,1)[0],H=function(e){var t,n,r;switch(e){case _Y:return oV(t={},SY,p),oV(t,IY,g),oV(t,TY,w),t;case kY:return oV(n={},SY,f),oV(n,IY,y),oV(n,TY,b),n;case CY:return oV(r={},SY,m),oV(r,IY,v),oV(r,TY,x),r;default:return{}}},W=c.useMemo((function(){return H(P)}),[P]),q=lV(ZY(P,!e,(function(e){if(e===SY){var t=W[SY];return t?t(D()):GY}var n;G in W&&M((null===(n=W[G])||void 0===n?void 0:n.call(W,D(),null))||null);return G===TY&&(z(D()),d>0&&(clearTimeout(L.current),L.current=setTimeout((function(){F({deadline:!0})}),d))),G===NY&&U(),true})),2),V=q[0],G=q[1],K=KY(G);B.current=K,WY((function(){I(t);var n,r=j.current;j.current=!0,!r&&t&&a&&(n=_Y),r&&t&&s&&(n=kY),(r&&!t&&u||!r&&h&&!t&&u)&&(n=CY);var i=H(n);n&&(e||i[SY])?(N(n),V()):N(EY)}),[t]),(0,c.useEffect)((function(){(P===_Y&&!a||P===kY&&!s||P===CY&&!u)&&N(EY)}),[a,s,u]),(0,c.useEffect)((function(){return function(){j.current=!1,clearTimeout(L.current)}}),[]);var Z=c.useRef(!1);(0,c.useEffect)((function(){S&&(Z.current=!0),void 0!==S&&P===EY&&((Z.current||S)&&(null===C||void 0===C||C(S)),Z.current=!0)}),[S,P]);var Y=O;return W[SY]&&G===IY&&(Y=VV({transition:"none"},Y)),[P,G,Y,null!==S&&void 0!==S?S:t]}const QY=function(e){var t=e;"object"===iV(e)&&(t=e.transitionSupport);var n=c.forwardRef((function(e,n){var r=e.visible,i=void 0===r||r,s=e.removeOnLeave,o=void 0===s||s,a=e.forceRender,l=e.children,u=e.motionName,d=e.leavedClassName,h=e.eventProps,p=function(e,n){return!(!e.motionName||!t||!1===n)}(e,c.useContext(wY).motion),f=(0,c.useRef)(),m=(0,c.useRef)();var g=lV(YY(p,i,(function(){try{return f.current instanceof HTMLElement?f.current:KK(m.current)}catch(e){return null}}),e),4),y=g[0],v=g[1],w=g[2],b=g[3],x=c.useRef(b);b&&(x.current=!0);var E,_=c.useCallback((function(e){f.current=e,BK(n,e)}),[n]),k=VV(VV({},h),{},{visible:i});if(l)if(y===EY)E=b?l(VV({},k),_):!o&&x.current&&d?l(VV(VV({},k),{},{className:d}),_):a||!o&&!d?l(VV(VV({},k),{},{style:{display:"none"}}),_):null;else{var C,A;v===SY?A="prepare":KY(v)?A="active":v===IY&&(A="start");var S=HY(u,"".concat(y,"-").concat(A));E=l(VV(VV({},k),{},{className:dV()(HY(u,y),(C={},oV(C,S,S&&A),oV(C,u,"string"===typeof u),C)),style:w}),_)}else E=null;c.isValidElement(E)&&FK(E)&&(E.ref||(E=c.cloneElement(E,{ref:_})));return c.createElement(xY,{ref:m},E)}));return n.displayName="CSSMotion",n}(FY);var JY="add",XY="keep",eQ="remove",tQ="removed";function nQ(e){var t;return VV(VV({},t=e&&"object"===iV(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function rQ(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(nQ)}var iQ=["component","children","onVisibleChanged","onAllRemoved"],sQ=["status"],oQ=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:QY,t=function(t){lK(r,t);var n=pK(r);function r(){var e;sK(this,r);for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return oV(hK(e=n.call.apply(n,[this].concat(i))),"state",{keyEntities:[]}),oV(hK(e),"removeKey",(function(t){var n=e.state.keyEntities.map((function(e){return e.key!==t?e:VV(VV({},e),{},{status:tQ})}));return e.setState({keyEntities:n}),n.filter((function(e){return e.status!==tQ})).length})),e}return aK(r,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,r
9688=this.props,i=r.component,s=r.children,o=r.onVisibleChanged,a=r.onAllRemoved,l=KV(r,iQ),u=i||c.Fragment,d={};return oQ.forEach((function(e){d[e]=l[e],delete l[e]})),delete l.keys,c.createElement(u,l,n.map((function(n){var r=n.status,i=KV(n,sQ),l=r===JY||r===XY;return c.createElement(e,rV({},d,{key:i.key,visible:l,eventProps:i,onVisibleChanged:function(e){(null===o||void 0===o||o(e,{key:i.key}),e)||0===t.removeKey(i.key)&&a&&a()}}),s)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=rQ(n),s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,s=rQ(e),o=rQ(t);s.forEach((function(e){for(var t=!1,s=r;s<i;s+=1){var a=o[s];if(a.key===e.key){r<s&&(n=n.concat(o.slice(r,s).map((function(e){return VV(VV({},e),{},{status:JY})}))),r=s),n.push(VV(VV({},a),{},{status:XY})),r+=1,t=!0;break}}t||n.push(VV(VV({},e),{},{status:eQ}))})),r<i&&(n=n.concat(o.slice(r).map((function(e){return VV(VV({},e),{},{status:JY})}))));var a={};return n.forEach((function(e){var t=e.key;a[t]=(a[t]||0)+1})),Object.keys(a).filter((function(e){return a[e]>1})).forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==eQ}))).forEach((function(t){t.key===e&&(t.status=XY)}))})),n}(r,i);return{keyEntities:s.filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==tQ||e.status!==eQ}))}}}]),r}(c.Component);oV(t,"defaultProps",{component:"div"})}(FY);const aQ=QY;function cQ(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function lQ(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,i=e.mask,s=e.maskMotion,o=e.maskAnimation,a=e.maskTransitionName;if(!i)return null;var l={};return(s||a||o)&&(l=VV({motionAppear:!0},cQ({motion:s,prefixCls:t,transitionName:a,animation:o}))),c.createElement(aQ,rV({},l,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return c.createElement("div",{style:{zIndex:r},className:dV()("".concat(t,"-mask"),n)})}))}function uQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uQ(Object(n),!0).forEach((function(t){pQ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uQ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hQ(e){return hQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hQ(e)}function pQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fQ,mQ={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function gQ(){if(void 0!==fQ)return fQ;fQ="";var e=document.createElement("p").style;for(var t in mQ)t+"Transform"in e&&(fQ=t);return fQ}function yQ(){return gQ()?"".concat(gQ(),"TransitionProperty"):"transitionProperty"}function vQ(){return gQ()?"".concat(gQ(),"Transform"):"transform"}function wQ(e,t){var n=yQ();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function bQ(e,t){var n=vQ();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}var xQ,EQ=/matrix\((.*)\)/,_Q=/matrix3d\((.*)\)/;function kQ(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}
9688function CQ(e,t,n){var r=n;if("object"!==hQ(t))return"undefined"!==typeof r?("number"===typeof r&&(r="".concat(r,"px")),void(e.style[t]=r)):xQ(e,t);for(var i in t)t.hasOwnProperty(i)&&CQ(e,i,t[i])}function AQ(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!==typeof n){var i=e.document;"number"!==typeof(n=i.documentElement[r])&&(n=i.body[r])}return n}function SQ(e){return AQ(e)}function IQ(e){return AQ(e,!0)}function TQ(e){var t=function(e){var t,n,r,i=e.ownerDocument,s=i.body,o=i&&i.documentElement;return t=e.getBoundingClientRect(),n=Math.floor(t.left),r=Math.floor(t.top),{left:n-=o.clientLeft||s.clientLeft||0,top:r-=o.clientTop||s.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=SQ(r),t.top+=IQ(r),t}function PQ(e){return null!==e&&void 0!==e&&e==e.window}function NQ(e){return PQ(e)?e.document:9===e.nodeType?e:e.ownerDocument}var RQ=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),OQ=/^(top|right|bottom|left)$/,MQ="currentStyle",jQ="runtimeStyle",LQ="left";function DQ(e,t){return"left"===e?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function BQ(e){return"left"===e?"right":"right"===e?"left":"top"===e?"bottom":"bottom"===e?"top":void 0}function UQ(e,t,n){"static"===CQ(e,"position")&&(e.style.position="relative");var r=-999,i=-999,s=DQ("left",n),o=DQ("top",n),a=BQ(s),c=BQ(o);"left"!==s&&(r=999),"top"!==o&&(i=999);var l,u="",d=TQ(e);("left"in t||"top"in t)&&(u=(l=e).style.transitionProperty||l.style[yQ()]||"",wQ(e,"none")),"left"in t&&(e.style[a]="",e.style[s]="".concat(r,"px")),"top"in t&&(e.style[c]="",e.style[o]="".concat(i,"px")),kQ(e);var h=TQ(e),p={};for(var f in t)if(t.hasOwnProperty(f)){var m=DQ(f,n),g="left"===f?r:i,y=d[f]-h[f];p[m]=m===f?g+y:g-y}CQ(e,p),kQ(e),("left"in t||"top"in t)&&wQ(e,u);var v={};for(var w in t)if(t.hasOwnProperty(w)){var b=DQ(w,n),x=t[w]-d[w];v[b]=w===b?p[b]+x:p[b]-x}CQ(e,v)}function FQ(e,t){var n=TQ(e),r=function(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(vQ());if(n&&"none"!==n){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}(e),i={x:r.x,y:r.y};"left"in t&&(i.x=r.x+t.left-n.left),"top"in t&&(i.y=r.y+t.top-n.top),function(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(vQ());if(r&&"none"!==r){var i,s=r.match(EQ);s?((i=(s=s[1]).split(",").map((function(e){return parseFloat(e,10)})))[4]=t.x,i[5]=t.y,bQ(e,"matrix(".concat(i.join(","),")"))):((i=r.match(_Q)[1].split(",").map((function(e){return parseFloat(e,10)})))[12]=t.x,i[13]=t.y,bQ(e,"matrix3d(".concat(i.join(","),")")))}else bQ(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}(e,i)}function $Q(e,t){for(var n=0;n<e.length;n++)t(e[n])}function zQ(e){return"border-box"===xQ(e,"boxSizing")}"undefined"!==typeof window&&(xQ=window.getComputedStyle?function(e,t,n){var r=n,i="",s=NQ(e);return(r=r||s.defaultView.getComputedStyle(e,null))&&(i=r.getPropertyValue(t)||r[t]),i}:function(e,t){var n=e[MQ]&&e[MQ][t];if(RQ.test(n)&&!OQ.test(t)){var r=e.style,i=r[LQ],s=e[jQ][LQ];e[jQ][LQ]=e[MQ][LQ],r[LQ]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[LQ]=i,e[jQ][LQ]=s}return""===n?"auto":n});var HQ=["margin","border","padding"];function WQ(e,t,n){var r,i,s,o=0;for(i=0;i<t.length;i++)if(r=t[i])for(s=0;s<n.length;s++){var a=void 0;a="border"===r?"".concat(r).concat(n[s],"Width"):r+n[s],o+=parseFloat(xQ(e,a))||0}return o}var qQ={getParent:function(e){var t=e;do{t=11===t.nodeType&&t.host?t.host:t.parentNode}while(t&&1!==t.nodeType&&9!==t.nodeType);return t}};function VQ(e,t,n){var r=n;if(PQ(e))return"width"===t?qQ.viewportWidth(e):qQ.viewportHeight(e);if(9===e.nodeType)return"width"===t?qQ.docWidth(e):qQ.docHeight(e);var i="width"===t?["Left","Right"]:["Top","Bottom"],s="width"===t?Math.floor(e.getBoundingClientRect().width):Math.floor(e.getBoundingClientRect().height),o=zQ(e),a=0;(null===s||void 0===s||s<=0)&&(s=void 0,(null===(a=xQ(e,t))||void 0===a||Number(a)<0)&&(a=e.style[t]||0),a=Math.floor(parseFloat(a))||0),void 0===r&&(r=o?1:-1);var c=void 0!==s||o,l=s||a;return-1===r?c?l-WQ(e,["border","padding"],i):a:c?1===r?l:l+(2===r?-WQ(e,["border"],i):WQ(e,["margin"],i)):a+WQ(e,HQ.slice(r),i)}
vendor: 5,713 bytes, line 9688
9688$Q(["Width","Height"],(function(e){qQ["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],qQ["viewport".concat(e)](n))},qQ["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,i=r.body,s=r.documentElement[n];return"CSS1Compat"===r.compatMode&&s||i&&i[n]||s}}));var GQ={position:"absolute",visibility:"hidden",display:"block"};function KQ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=t[0];return 0!==i.offsetWidth?r=VQ.apply(void 0,t):function(e,t,n){var r,i={},s=e.style;for(r in t)t.hasOwnProperty(r)&&(i[r]=s[r],s[r]=t[r]);for(r in n.call(e),t)t.hasOwnProperty(r)&&(s[r]=i[r])}(i,GQ,(function(){r=VQ.apply(void 0,t)})),r}function ZQ(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}$Q(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);qQ["outer".concat(t)]=function(t,n){return t&&KQ(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];qQ[e]=function(t,r){var i=r;return void 0!==i?t?(zQ(t)&&(i+=WQ(t,["padding","border"],n)),CQ(t,e,i)):void 0:t&&KQ(t,e,-1)}}));var YQ={getWindow:function(e){if(e&&e.document&&e.setTimeout)return e;var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},getDocument:NQ,offset:function(e,t,n){if("undefined"===typeof t)return TQ(e);!function(e,t,n){if(n.ignoreShake){var r=TQ(e),i=r.left.toFixed(0),s=r.top.toFixed(0),o=t.left.toFixed(0),a=t.top.toFixed(0);if(i===o&&s===a)return}n.useCssRight||n.useCssBottom?UQ(e,t,n):n.useCssTransform&&vQ()in document.body.style?FQ(e,t):UQ(e,t,n)}(e,t,n||{})},isWindow:PQ,each:$Q,css:CQ,clone:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);if(e.overflow)for(t in e)e.hasOwnProperty(t)&&(n.overflow[t]=e.overflow[t]);return n},mix:ZQ,getWindowScrollLeft:function(e){return SQ(e)},getWindowScrollTop:function(e){return IQ(e)},merge:function(){for(var e={},t=0;t<arguments.length;t++)YQ.mix(e,t<0||arguments.length<=t?void 0:arguments[t]);return e},viewportWidth:0,viewportHeight:0};ZQ(YQ,qQ);var QQ=YQ.getParent;function JQ(e){if(YQ.isWindow(e)||9===e.nodeType)return null;var t,n=YQ.getDocument(e).body,r=YQ.css(e,"position");if(!("fixed"===r||"absolute"===r))return"html"===e.nodeName.toLowerCase()?null:QQ(e);for(t=QQ(e);t&&t!==n&&9!==t.nodeType;t=QQ(t))if("static"!==(r=YQ.css(t,"position")))return t;return null}var XQ=YQ.getParent;function eJ(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=JQ(e),i=YQ.getDocument(e),s=i.defaultView||i.parentWindow,o=i.body,a=i.documentElement;r;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===r.clientWidth||r===o||r===a||"visible"===YQ.css(r,"overflow")){if(r===o||r===a)break}else{var c=YQ.offset(r);c.left+=r.clientLeft,c.top+=r.clientTop,n.top=Math.max(n.top,c.top),n.right=Math.min(n.right,c.left+r.clientWidth),n.bottom=Math.min(n.bottom,c.top+r.clientHeight),n.left=Math.max(n.left,c.left)}r=JQ(r)}var l=null;YQ.isWindow(e)||9===e.nodeType||(l=e.style.position,"absolute"===YQ.css(e,"position")&&(e.style.position="fixed"));var u=YQ.getWindowScrollLeft(s),d=YQ.getWindowScrollTop(s),h=YQ.viewportWidth(s),p=YQ.viewportHeight(s),f=a.scrollWidth,m=a.scrollHeight,g=window.getComputedStyle(o);if("hidden"===g.overflowX&&(f=s.innerWidth),"hidden"===g.overflowY&&(m=s.innerHeight),e.style&&(e.style.position=l),t||function(e){if(YQ.isWindow(e)||9===e.nodeType)return!1;var t=YQ.getDocument(e),n=t.body,r=null;for(r=XQ(e);r&&r!==n&&r!==t;r=XQ(r))if("fixed"===YQ.css(r,"position"))return!0;return!1}(e))n.left=Math.max(n.left,u),n.top=Math.max(n.top,d),n.right=Math.min(n.right,u+h),n.bottom=Math.min(n.bottom,d+p);else{var y=Math.max(f,u+h);n.right=Math.min(n.right,y);var v=Math.max(m,d+p);n.bottom=Math.min(n.bottom,v)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function tJ(e){var t,n,r;if(YQ.isWindow(e)||9===e.nodeType){var i=YQ.getWindow(e);t={left:YQ.getWindowScrollLeft(i),top:YQ.getWindowScrollTop(i)},n=YQ.viewportWidth(i),r=YQ.viewportHeight(i)}else t=YQ.offset(e),n=YQ.outerWidth(e),r=YQ.outerHeight(e);return t.width=n,t.height=r,t}function nJ(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,s=e.height,o=e.left,a=e.top;return"c"===n?a+=s/2:"b"===n&&(a+=s),"c"===r?o+=i/2:"r"===r&&(o+=i),{left:o,top:a}}function rJ(e,t,n,r,i){var s=nJ(t,n[1]),o=nJ(e,n[0]),a=[o.left-s.left,o.top-s.top];return{left:Math.round(e.left-a[0]+r[0]-i[0]),top:Math.round(e.top-a[1]+r[1]-i[1])}}function iJ(e,t,n){return e.left<n.left||e.left+t.width>n.right}function sJ(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function oJ(e,t,n){var r=[];return YQ.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function aJ(e,t){return e[t]=-e[t],e}function cJ(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function lJ(e,t){e[0]=cJ(e[0],t.width),e[1]=cJ(e[1],t.height)}function uJ(e,t,n,r){var i=n.points,s=n.offset||[0,0],o=n.targetOffset||[0,0],a=n.overflow,c=n.source||e;s=[].concat(s),o=[].concat(o);var l={},u=0,d=eJ(c,!(!(a=a||{})||!a.alwaysByViewport)),h=tJ(c);lJ(s,h),lJ(o,t);var p=rJ(h,t,i,s,o),f=YQ.merge(h,p);if(d&&(a.adjustX||a.adjustY)&&r){if(a.adjustX&&iJ(p,h,d)){var m=oJ(i,/[lr]/gi,{l:"r",r:"l"}),g=aJ(s,0),y=aJ(o,0);(function(e,t,n){return e.left>n.right||e.left+t.width<n.left})(rJ(h,t,m,g,y),h,d)||(u=1,i=m,s=g,o=y)}if(a.adjustY&&sJ(p,h,d)){var v=oJ(i,/[tb]/gi,{t:"b",b:"t"}),w=aJ(s,1),b=aJ(o,1);(function(e,t,n){return e.top>n.bottom||e.top+t.height<n.top})(rJ(h,t,v,w,b),h,d)||(u=1,i=v,s=w,o=b)}u&&(p=rJ(h,t,i,s,o),YQ.mix(f,p));var x=iJ(p,h,d),E=sJ(p,h,d);if(x||E){var _=i;x&&(_=oJ(i,/[lr]/gi,{l:"r",r:"l"})),E&&(_=oJ(i,/[tb]/gi,{t:"b",b:"t"})),i=_,s=n.offset||[0,0],o=n.targetOffset||[0,0]}
9688l.adjustX=a.adjustX&&x,l.adjustY=a.adjustY&&E,(l.adjustX||l.adjustY)&&(f=function(e,t,n,r){var i=YQ.clone(e),s={width:t.width,height:t.height};return r.adjustX&&i.left<n.left&&(i.left=n.left),r.resizeWidth&&i.left>=n.left&&i.left+s.width>n.right&&(s.width-=i.left+s.width-n.right),r.adjustX&&i.left+s.width>n.right&&(i.left=Math.max(n.right-s.width,n.left)),r.adjustY&&i.top<n.top&&(i.top=n.top),r.resizeHeight&&i.top>=n.top&&i.top+s.height>n.bottom&&(s.height-=i.top+s.height-n.bottom),r.adjustY&&i.top+s.height>n.bottom&&(i.top=Math.max(n.bottom-s.height,n.top)),YQ.mix(i,s)}(p,h,d,l))}return f.width!==h.width&&YQ.css(c,"width",YQ.width(c)+f.width-h.width),f.height!==h.height&&YQ.css(c,"height",YQ.height(c)+f.height-h.height),YQ.offset(c,{left:f.left,top:f.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:s,targetOffset:o,overflow:l}}function dJ(e,t,n){var r=n.target||t,i=tJ(r),s=!function(e,t){var n=eJ(e,t),r=tJ(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport);return uJ(e,i,n,s)}dJ.__getOffsetParent=JQ,dJ.__getVisibleRectForElement=eJ;const hJ=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,i){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=r.has(t);if(CG(!o,"Warning: There may be circular references"),o)return!1;if(t===i)return!0;if(n&&s>1)return!1;r.add(t);var a=s+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var c=0;c<t.length;c++)if(!e(t[c],i[c],a))return!1;return!0}if(t&&i&&"object"===iV(t)&&"object"===iV(i)){var l=Object.keys(t);return l.length===Object.keys(i).length&&l.every((function(n){return e(t[n],i[n],a)}))}return!1}(e,t)};function pJ(e,t){var n=null,r=null;var i=new gZ((function(e){var i=lV(e,1)[0].target;if(document.documentElement.contains(i)){var s=i.getBoundingClientRect(),o=s.width,a=s.height,c=Math.floor(o),l=Math.floor(a);n===c&&r===l||Promise.resolve().then((function(){t({width:c,height:l})})),n=c,r=l}}));return e&&i.observe(e),function(){i.disconnect()}}function fJ(e){return"function"!==typeof e?null:e()}function mJ(e){return"object"===iV(e)&&e?e:null}var gJ=function(e,t){var n=e.children,r=e.disabled,i=e.target,s=e.align,o=e.onAlign,a=e.monitorWindowResize,l=e.monitorBufferTime,u=void 0===l?0:l,d=c.useRef({}),h=c.useRef(),p=c.Children.only(n),f=c.useRef({});f.current.disabled=r,f.current.target=i,f.current.align=s,f.current.onAlign=o;var m=function(e,t){var n=c.useRef(!1),r=c.useRef(null);function i(){window.clearTimeout(r.current)}return[function s(o){if(i(),n.current&&!0!==o)r.current=window.setTimeout((function(){n.current=!1,s()}),t);else{if(!1===e(o))return;n.current=!0,r.current=window.setTimeout((function(){n.current=!1}),t)}},function(){n.current=!1,i()}]}((function(){var e=f.current,t=e.disabled,n=e.target,r=e.align,i=e.onAlign,s=h.current;if(!t&&n&&s){var o,a=fJ(n),c=mJ(n);d.current.element=a,d.current.point=c,d.current.align=r;var l=document.activeElement;return a&&function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),s=i.width,o=i.height;if(s||o)return!0}}return!1}(a)?o=dJ(s,a,r):c&&(o=function(e,t,n){var r,i,s=YQ.getDocument(e),o=s.defaultView||s.parentWindow,a=YQ.getWindowScrollLeft(o),c=YQ.getWindowScrollTop(o),l=YQ.viewportWidth(o),u=YQ.viewportHeight(o),d={left:r="pageX"in t?t.pageX:a+t.clientX,top:i="pageY"in t?t.pageY:c+t.clientY,width:0,height:0},h=r>=0&&r<=a+l&&i>=0&&i<=c+u,p=[n.points[0],"cc"];return uJ(e,d,dQ(dQ({},n),{},{points:p}),h)}(s,c,r)),function(e,t){e!==document.activeElement&&AG(t,e)&&"function"===typeof e.focus&&e.focus()}(l,s),i&&o&&i(s,o),!0}return!1}),u),g=lV(m,2),y=g[0],v=g[1],w=lV(c.useState(),2),b=w[0],x=w[1],E=lV(c.useState(),2),_=E[0],k=E[1];return TK((function(){x(fJ(i)),k(mJ(i))})),c.useEffect((function(){var e,t;d.current.element===b&&((e=d.current.point)===(t=_)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))&&hJ(d.current.align,s)||y()})),c.useEffect((function(){return pJ(h.current,y)}),[h.current]),c.useEffect((function(){return pJ(b,y)}
9688),[b]),c.useEffect((function(){r?v():y()}),[r]),c.useEffect((function(){if(a)return mY(window,"resize",y).remove}),[a]),c.useEffect((function(){return function(){v()}}),[]),c.useImperativeHandle(t,(function(){return{forceAlign:function(){return y(!0)}}})),c.isValidElement(p)&&(p=c.cloneElement(p,{ref:UK(p.ref,h)})),p},yJ=c.forwardRef(gJ);yJ.displayName="Align";const vJ=yJ;function wJ(){wJ=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function c(e,t,n,r){return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r})}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(t,n,r,i){var s=n&&n.prototype instanceof h?n:h,o=Object.create(s.prototype);return c(o,"_invoke",function(t,n,r){var i=1;return function(s,o){if(3===i)throw Error("Generator is already running");if(4===i){if("throw"===s)throw o;return{value:e,done:!0}}for(r.method=s,r.arg=o;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(1===i)throw i=4,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=3;var l=u(t,n,r);if("normal"===l.type){if(i=r.done?4:2,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=4,r.method="throw",r.arg=l.arg)}}}(t,r,new k(i||[])),!0),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d={};function h(){}function p(){}function f(){}var m={};c(m,s,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(C([])));y&&y!==n&&r.call(y,s)&&(m=y);var v=f.prototype=h.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(i,s,o,a){var c=u(e[i],e,s);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==iV(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,o,a)}),(function(e){n("throw",e,o,a)})):t.resolve(d).then((function(e){l.value=e,o(l)}),(function(e){return n("throw",e,o,a)}))}a(c.arg)}var i;c(this,"_invoke",(function(e,r){function s(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(s,s):s()}),!0)}function x(t,n){var r=n.method,i=t.i[r];if(i===e)return n.delegate=null,"throw"===r&&t.i.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var s=u(i,t.i,n.arg);if("throw"===s.type)return n.method="throw",n.arg=s.arg,n.delegate=null,d;var o=s.arg;return o?o.done?(n[t.r]=o.value,n.next=t.n,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function E(e){this.tryEntries.push(e)}function _(t){var n=t[4]||{};n.type="normal",n.arg=e,t[4]=n}function k(e){this.tryEntries=[[-1]],e.forEach(E,this),this.reset(!0)}function C(t){if(null!=t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(iV(t)+" is not iterable")}return p.prototype=f,c(v,"constructor",f),c(f,"constructor",p),p.displayName=c(f,a,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},t.awrap=function(e){return{__await:e}}
9688,w(b.prototype),c(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,s){void 0===s&&(s=Promise);var o=new b(l(e,n,r,i),s);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},w(v),c(v,a,"Generator"),c(v,s,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},t.values=C,k.prototype={constructor:k,reset:function(t){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0][4];if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(e){o.type="throw",o.arg=t,n.next=e}for(var i=n.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],o=s[4],a=this.prev,c=s[1],l=s[2];if(-1===s[0])return r("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=s[0]&&s[0]<=a){if(a<c)return this.method="next",this.arg=e,r(c),!0;if(a<l)return r(l),!1}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]>-1&&r[0]<=this.prev&&this.prev<r[2]){var i=r;break}}i&&("break"===e||"continue"===e)&&i[0]<=t&&t<=i[2]&&(i=null);var s=i?i[4]:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i[2],d):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[2]===e)return this.complete(n[4],n[3]),_(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[0]===e){var r=n[4];if("throw"===r.type){var i=r.arg;_(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={i:C(t),r:n,n:r},"next"===this.method&&(this.arg=e),d}},t}function bJ(e,t,n,r,i,s,o){try{var a=e[s](o),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,i)}function xJ(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var s=e.apply(t,n);function o(e){bJ(s,r,i,o,a,"next",e)}function a(e){bJ(s,r,i,o,a,"throw",e)}o(void 0)}))}}var EJ=["measure","alignPre","align",null,"motion"];var _J=c.forwardRef((function(e,t){var n=e.visible,r=e.prefixCls,i=e.className,s=e.style,o=e.children,a=e.zIndex,l=e.stretch,u=e.destroyPopupOnHide,d=e.forceRender,h=e.align,p=e.point,f=e.getRootDomNode,m=e.getClassNameFromAlign,g=e.onAlign,y=e.onMouseEnter,v=e.onMouseLeave,w=e.onMouseDown,b=e.onTouchStart,x=e.onClick,E=(0,c.useRef)(),_=(0,c.useRef)(),k=lV((0,c.useState)(),2),C=k[0],A=k[1],S=function(e){var t=lV(c.useState({width:0,height:0}),2),n=t[0],r=t[1];return[c.useMemo((function(){var t={};if(e){var r=n.width,i=n.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&r?t.width=r:-1!==e.indexOf("minWidth")&&r&&(t.minWidth=r)}return t}),[e,n]),function(e){var t=e.offsetWidth,n=e.offsetHeight,i=e.getBoundingClientRect(),s=i.width,o=i.height;Math.abs(t-s)<1&&Math.abs(n-o)<1&&(t=s,n=o),r({width:t,height:n})}]}(l),I=lV(S,2),T=I[0],P=I[1];var N=function(e,t){var n=lV(PK(null),2),r=n[0],i=n[1],s=(0,c.useRef)();function o(e){i(e,!0)}function a(){DZ.cancel(s.current)}return(0,c.useEffect)((function(){o("measure")}),[e]),(0,c.useEffect)((function(){"measure"===r&&t(),r&&(s.current=DZ(xJ(wJ().mark((function e(){var t,n;return wJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=EJ.indexOf(r),(n=EJ[t+1])&&-1!==t&&o(n);case 3:case"end":return e.stop()}}),e)})))))}),[r]),(0,c.useEffect)((function(){return function(){a()}}),[]),[r,function(e){a(),s.current=DZ((function(){o((function(e){switch(r){case"align":return"motion";case"motion":return"stable"}return e})),null===e||void 0===e||e()}))}]}(n,(function(){l&&P(f())})),R=lV(N,2),O=R[0],M=R[1],j=lV((0,c.useState)(0),2),L=j[0],D=j[1],B=(0,c.useRef)();function U(){var e;null===(e=E.current)||void 0===e||e.forceAlign()}function F(e,t){var n=m(t);C!==n&&A(n),D((function(e){return e+1})),"align"===O&&(null===g||void 0===g||g(e,t))}TK((function(){"alignPre"===O&&D(0)}),[O]),TK((function(){"align"===O&&(L<3?U():M((function(){var e;null===(e=B.current)||void 0===e||e.call(B)})))}),[L]);var $=VV({},cQ(e));function z(){return new Promise((function(e){B.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=$[e];$[e]=function(e,n){return M(),null===t||void 0===t?void 0:t(e,n)}})),c.useEffect((function(){$.motionName||"motion"!==O||M()}),[$.motionName,O]),c.useImperativeHandle(t,(function(){return{forceAlign:U,getElement:function(){return _.current}}}));var H=VV(VV({},T),{},{zIndex:a,opacity:"motion"!==O&&"stable"!==O&&n?0:void 0,pointerEvents:n||"stable"===O?void 0:"none"},s),W=!0;null===h||void 0===h||!h.points||"align"!==O&&"stable"!==O||(W=!1);var q=o;return c.Children.count(o)>1&&(q=c.createElement("div",{className:"".concat(r,"-content")},o)),c.createElement(aQ,rV({visible:n,ref:_,leavedClassName:"".concat(r,"-hidden")},$,{onAppearPrepare:z,onEnterPrepare:z,removeOnLeave:u,forceRender:d}),(function(e,t){var n=e.className,s=e.style,o=dV()(r,i,C,n);return c.createElement(vJ,{target:p||f,key:"popup",ref:E,monitorWindowResize:!0,disabled:W,align:h,onAlign:F},c.createElement("div",{ref:t,className:o,onMouseEnter:y,onMouseLeave:v,onMouseDownCapture:w,onTouchStartCapture:b,onClick:x,style:VV(VV({},s),H)},q))}))}));_J.displayName="PopupInner";const kJ=_J;var CJ=c.forwardRef((function(e,t){var n=e.prefixCls,r=e.visible,i=e.zIndex,s=e.children,o=e.mobile,a=(o=void 0===o?{}:o).popupClassName,l=o.popupStyle,u=o.popupMotion,d=void 0===u?{}:u,h=o.popupRender,p=e.onClick,f=c.useRef();c.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return f.current}}}));var m=VV({zIndex:i},l),g=s;return c.Children.count(s)>1&&(g=c.createElement("div",{className:"".concat(n,"-content")},s)),h&&(g=h(g)),c.createElement(aQ,rV({visible:r,ref:f,removeOnLeave:!0},d),(function(e,t){var r=e.className,i=e.style,s=dV()(n,a,r);return c.createElement("div",{ref:t,className:s,onClick:p,style:VV(VV({},i),m)},g)}))}));
9688CJ.displayName="MobilePopupInner";const AJ=CJ;var SJ=["visible","mobile"],IJ=c.forwardRef((function(e,t){var n=e.visible,r=e.mobile,i=KV(e,SJ),s=lV((0,c.useState)(n),2),o=s[0],a=s[1],l=lV((0,c.useState)(!1),2),u=l[0],d=l[1],h=VV(VV({},i),{},{visible:o});(0,c.useEffect)((function(){a(n),n&&r&&d(OK())}),[n,r]);var p=u?c.createElement(AJ,rV({},h,{mobile:r,ref:t})):c.createElement(kJ,rV({},h,{ref:t}));return c.createElement("div",null,c.createElement(lQ,h),p)}));IJ.displayName="Popup";const TJ=IJ;const PJ=c.createContext(null);function NJ(){}function RJ(){return""}function OJ(e){return e?e.ownerDocument:window.document}var MJ=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];const jJ=function(e){var t=function(t){lK(r,t);var n=pK(r);function r(e){var t,i;return sK(this,r),oV(hK(t=n.call(this,e)),"popupRef",c.createRef()),oV(hK(t),"triggerRef",c.createRef()),oV(hK(t),"portalContainer",void 0),oV(hK(t),"attachId",void 0),oV(hK(t),"clickOutsideHandler",void 0),oV(hK(t),"touchOutsideHandler",void 0),oV(hK(t),"contextMenuOutsideHandler1",void 0),oV(hK(t),"contextMenuOutsideHandler2",void 0),oV(hK(t),"mouseDownTimeout",void 0),oV(hK(t),"focu
9688sTime",void 0),oV(hK(t),"preClickTime",void 0),oV(hK(t),"preTouchTime",void 0),oV(hK(t),"delayTimer",void 0),oV(hK(t),"hasPopupMouseDown",void 0),oV(hK(t),"onMouseEnter",(function(e){var n=t.props.mouseEnterDelay;t.fireEvents("onMouseEnter",e),t.delaySetPopupVisible(!0,n,n?null:e)})),oV(hK(t),"onMouseMove",(function(e){t.fireEvents("onMouseMove",e),t.setPoint(e)})),oV(hK(t),"onMouseLeave",(function(e){t.fireEvents("onMouseLeave",e),t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)})),oV(hK(t),"onPopupMouseEnter",(function(){t.clearDelayTimer()})),oV(hK(t),"onPopupMouseLeave",(function(e){var n;e.relatedTarget&&!e.relatedTarget.setTimeout&&AG(null===(n=t.popupRef.current)||void 0===n?void 0:n.getElement(),e.relatedTarget)||t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)})),oV(hK(t),"onFocus",(function(e){t.fireEvents("onFocus",e),t.clearDelayTimer(),t.isFocusToShow()&&(t.focusTime=Date.now(),t.delaySetPopupVisible(!0,t.props.focusDelay))})),oV(hK(t),"onMouseDown",(function(e){t.fireEvents("onMouseDown",e),t.preClickTime=Date.now()})),oV(hK(t),"onTouchStart",(function(e){t.fireEvents("onTouchStart",e),t.preTouchTime=Date.now()})),oV(hK(t),"onBlur",(function(e){t.fireEvents("onBlur",e),t.clearDelayTimer(),t.isBlurToHide()&&t.delaySetPopupVisible(!1,t.props.blurDelay)})),oV(hK(t),"onContextMenu",(function(e){e.preventDefault(),t.fireEvents("onContextMenu",e),t.setPopupVisible(!0,e)})),oV(hK(t),"onContextMenuClose",(function(){t.isContextMenuToShow()&&t.close()})),oV(hK(t),"onClick",(function(e){if(t.fireEvents("onClick",e),t.focusTime){var n;if(t.preClickTime&&t.preTouchTime?n=Math.min(t.preClickTime,t.preTouchTime):t.preClickTime?n=t.preClickTime:t.preTouchTime&&(n=t.preTouchTime),Math.abs(n-t.focusTime)<20)return;t.focusTime=0}t.preClickTime=0,t.preTouchTime=0,t.isClickToShow()&&(t.isClickToHide()||t.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var r=!t.state.popupVisible;(t.isClickToHide()&&!r||r&&t.isClickToShow())&&t.setPopupVisible(!t.state.popupVisible,e)})),oV(hK(t),"onPopupMouseDown",(function(){var e;(t.hasPopupMouseDown=!0,clearTimeout(t.mouseDownTimeout),t.mouseDownTimeout=window.setTimeout((function(){t.hasPopupMouseDown=!1}),0),t.context)&&(e=t.context).onPopupMouseDown.apply(e,arguments)})),oV(hK(t),"onDocumentClick",(function(e){if(!t.props.mask||t.props.maskClosable){var n=e.target,r=t.getRootDomNode(),i=t.getPopupDomNode();AG(r,n)&&!t.isContextMenuOnly()||AG(i,n)||t.hasPopupMouseDown||t.close()}})),oV(hK(t),"getRootDomNode",(function(){var e=t.props.getTriggerDOMNode;if(e)return e(t.triggerRef.current);try{var n=KK(t.triggerRef.current);if(n)return n}catch(r){}return GK.findDOMNode(hK(t))})),oV(hK(t),"getPopupClassNameFromAlign",(function(e){var n=[],r=t.props,i=r.popupPlacement,s=r.builtinPlacements,o=r.prefixCls,a=r.alignPoint,c=r.getPopupClassNameFromAlign;return i&&s&&n.push(function(e,t,n,r){for(var i=n.points,s=Object.keys(e),o=0;o<s.length;o+=1){var a=s[o];if(vY(e[a].points,i,r))return"".concat(t,"-placement-").concat(a)}return""}(s,o,e,a)),c&&n.push(c(e)),n.join(" ")})),oV(hK(t),"getComponent",(function(){var e=t.props,n=e.prefixCls,r=e.destroyPopupOnHide,i=e.popupClassName,s=e.onPopupAlign,o=e.popupMotion,a=e.popupAnimation,l=e.popupTransitionName,u=e.popupStyle,d=e.mask,h=e.maskAnimation,p=e.maskTransitionName,f=e.maskMotion,m=e.zIndex,g=e.popup,y=e.stretch,v=e.alignPoint,w=e.mobile,b=e.forceRender,x=e.onPopupClick,E=t.state,_=E.popupVisible,k=E.point,C=t.getPopupAlign(),A={};return t.isMouseEnterToShow()&&(A.onMouseEnter=t.onPopupMouseEnter),t.isMouseLeaveToHide()&&(A.onMouseLeave=t.onPopupMouseLeave),A.onMouseDown=t.onPopupMouseDown,A.onTouchStart=t.onPopupMouseDown,c.createElement(TJ,rV({prefixCls:n,destroyPopupOnHide:r,visible:_,point:v&&k,className:i,align:C,onAlign:s,animation:a,getClassNameFromAlign:t.getPopupClassNameFromAlign},A,{stretch:y,getRootDomNode:t.getRootDomNode,style:u,mask:d,zIndex:m,transitionName:l,maskAnimation:h,maskTransitionName:p,maskMotion:f,ref:t.popupRef,motion:o,mobile:w,forceRender:b,onClick:x}),"function"===typeof g?g():g)})),oV(hK(t),"attachParent",(function(e){DZ.cancel(t.attachId);var n,r=t.props,i=r.getPopupContainer,s=r.getDocument,o=t.getRootDomNo
9688de();i?(o||0===i.length)&&(n=i(o)):n=s(t.getRootDomNode()).body,n?n.appendChild(e):t.attachId=DZ((function(){t.attachParent(e)}))})),oV(hK(t),"getContainer",(function(){if(!t.portalContainer){var e=(0,t.props.getDocument)(t.getRootDomNode()).createElement("div");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",t.portalContainer=e}return t.attachParent(t.portalContainer),t.portalContainer})),oV(hK(t),"setPoint",(function(e){t.props.alignPoint&&e&&t.setState({point:{pageX:e.pageX,pageY:e.pageY}})})),oV(hK(t),"handlePortalUpdate",(function(){t.state.prevPopupVisible!==t.state.popupVisible&&t.props.afterPopupVisibleChange(t.state.popupVisible)})),oV(hK(t),"triggerContextValue",{onPopupMouseDown:t.onPopupMouseDown}),i="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,t.state={prevPopupVisible:i,popupVisible:i},MJ.forEach((function(e){t["fire".concat(e)]=function(n){t.fireEvents(e,n)}})),t}return aK(r,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=mY(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=mY(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=mY(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=mY(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),DZ.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var e;return(null===(e=this.popupRef.current)||void 0===e?void 0:e.getElement())||null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,r=e.builtinPlacements;return t&&r?function(e,t,n){return VV(VV({},e[t]||{}),n)}(r,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,r=this.state.popupVisible;this.clearDelayTimer(),r!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:r}),this.props.onPopupVisibleChange(e)),n&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var r=this,i=1e3*t;if(this.clearDelayTimer(),i){var s=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){r.setPopupVisible(e,s),r.clearDelayTimer()}),i)}else this.setPopupVisible(e,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuOnly",value:function(){var e=this.props.action;return"contextMenu"===e||1===e.length&&"contextMenu"===e[0]}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;
9688return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var e;this.state.popupVisible&&(null===(e=this.popupRef.current)||void 0===e||e.forceAlign())}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var r=this.props[e];r&&r(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var t=this.state.popupVisible,n=this.props,r=n.children,i=n.forceRender,s=n.alignPoint,o=n.className,a=n.autoDestroy,l=c.Children.only(r),u={key:"trigger"};this.isContextMenuToShow()?u.onContextMenu=this.onContextMenu:u.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(u.onClick=this.onClick,u.onMouseDown=this.onMouseDown,u.onTouchStart=this.onTouchStart):(u.onClick=this.createTwoChains("onClick"),u.onMouseDown=this.createTwoChains("onMouseDown"),u.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(u.onMouseEnter=this.onMouseEnter,s&&(u.onMouseMove=this.onMouseMove)):u.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?u.onMouseLeave=this.onMouseLeave:u.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(u.onFocus=this.onFocus,u.onBlur=this.onBlur):(u.onFocus=this.createTwoChains("onFocus"),u.onBlur=this.createTwoChains("onBlur"));var d=dV()(l&&l.props&&l.props.className,o);d&&(u.className=d);var h=VV({},u);FK(l)&&(h.ref=UK(this.triggerRef,l.ref));var p,f=c.cloneElement(l,h);return(t||this.popupRef.current||i)&&(p=c.createElement(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!t&&a&&(p=null),c.createElement(PJ.Provider,{value:this.triggerContextValue},f,p)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,r={};return void 0!==n&&t.popupVisible!==n&&(r.popupVisible=n,r.prevPopupVisible=t.popupVisible),r}}]),r}(c.Component);return oV(t,"contextType",PJ),oV(t,"defaultProps",{prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:RJ,getDocument:OJ,onPopupVisibleChange:NJ,afterPopupVisibleChange:NJ,onPopupAlign:NJ,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1}),t}(yY);var LJ=["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],DJ=function(e,t){var n=e.prefixCls,r=(e.disabled,e.visible),i=e.children,s=e.popupElement,o=e.containerWidth,a=e.animation,l=e.transitionName,u=e.dropdownStyle,d=e.dropdownClassName,h=e.direction,p=void 0===h?"ltr":h,f=e.placement,m=e.dropdownMatchSelectWidth,g=e.dropdownRender,y=e.dropdownAlign,v=e.getPopupContainer,w=e.empty,b=e.getTriggerDOMNode,x=e.onPopupVisibleChange,E=e.onPopupMouseEnter,_=KV(e,LJ),k="".concat(n,"-dropdown"),C=s;g&&(C=g(s));var A=c.useMemo((function(){return function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}}(m)}),[m]),S=a?"".concat(k,"-").concat(a):l,I=c.useRef(null);c.useImperativeHandle(t,(function(){return{getPopupElement:function(){return I.current}}}));var T=VV({minWidth:o},u);return"number"===typeof m?T.width=m:m&&(T.width=o),c.createElement(jJ,rV({},_,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:f||("rtl"===p?"bottomRight":"bottomLeft"),builtinPlacements:A,prefixCls:k,popupTransitionName:S,popup:c.createElement("div",{ref:I,onMouseEnter:E},C),popupAlign:y,popupVisible:r,getPopupContainer:v,popupClassName:dV()(d,oV({}
9688,"".concat(k,"-empty"),w)),popupStyle:T,getTriggerDOMNode:b,onPopupVisibleChange:x}),i)},BJ=c.forwardRef(DJ);BJ.displayName="SelectTrigger";const UJ=BJ;function FJ(e){return aV(e)||eV(e)||tV(e)||cV()}function $J(e,t){var n,r=e.key;return"value"in e&&(n=e.value),null!==r&&void 0!==r?r:void 0!==n?n:"rc-index-key-".concat(t)}function zJ(e,t){var n=e||{};return{label:n.label||(t?"children":"label"),value:n.value||"value",options:n.options||"options"}}function HJ(e){var t=VV({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return CG(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var WJ=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","showArrow","inputIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],qJ=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function VJ(e){return"tags"===e||"multiple"===e}var GJ=c.forwardRef((function(e,t){var n,r,i=e.id,s=e.prefixCls,o=e.className,a=e.showSearch,l=e.tagRender,u=e.direction,d=e.omitDomProps,h=e.displayValues,p=e.onDisplayValuesChange,f
9688=e.emptyOptions,m=e.notFoundContent,g=void 0===m?"Not Found":m,y=e.onClear,v=e.mode,w=e.disabled,b=e.loading,x=e.getInputElement,E=e.getRawInputElement,_=e.open,k=e.defaultOpen,C=e.onDropdownVisibleChange,A=e.activeValue,S=e.onActiveValueChange,I=e.activeDescendantId,T=e.searchValue,P=e.autoClearSearchValue,N=e.onSearch,R=e.onSearchSplit,O=e.tokenSeparators,M=e.allowClear,j=e.showArrow,L=e.inputIcon,D=e.clearIcon,B=e.OptionList,U=e.animation,F=e.transitionName,$=e.dropdownStyle,z=e.dropdownClassName,H=e.dropdownMatchSelectWidth,W=e.dropdownRender,q=e.dropdownAlign,V=e.placement,G=e.getPopupContainer,K=e.showAction,Z=void 0===K?[]:K,Y=e.onFocus,Q=e.onBlur,J=e.onKeyUp,X=e.onKeyDown,ee=e.onMouseDown,te=KV(e,WJ),ne=VJ(v),re=(void 0!==a?a:ne)||"combobox"===v,ie=VV({},te);qJ.forEach((function(e){delete ie[e]})),null===d||void 0===d||d.forEach((function(e){delete ie[e]}));var se=lV(c.useState(!1),2),oe=se[0],ae=se[1];c.useEffect((function(){ae(OK())}),[]);var ce=c.useRef(null),le=c.useRef(null),ue=c.useRef(null),de=c.useRef(null),he=c.useRef(null),pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=lV(c.useState(!1),2),n=t[0],r=t[1],i=c.useRef(null),s=function(){window.clearTimeout(i.current)};return c.useEffect((function(){return s}),[]),[n,function(t,n){s(),i.current=window.setTimeout((function(){r(t),n&&n()}),e)},s]}(),fe=lV(pe,3),me=fe[0],ge=fe[1],ye=fe[2];c.useImperativeHandle(t,(function(){var e,t;return{focus:null===(e=de.current)||void 0===e?void 0:e.focus,blur:null===(t=de.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=he.current)||void 0===t?void 0:t.scrollTo(e)}}}));var ve=c.useMemo((function(){var e;if("combobox"!==v)return T;var t=null===(e=h[0])||void 0===e?void 0:e.value;return"string"===typeof t||"number"===typeof t?String(t):""}),[T,v,h]),we="combobox"===v&&"function"===typeof x&&x()||null,be="function"===typeof E&&E(),xe=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return DK((function(){return UK.apply(void 0,t)}),t,(function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))}))}(le,null===be||void 0===be||null===(n=be.props)||void 0===n?void 0:n.ref),Ee=lV(RK(void 0,{defaultValue:k,value:_}),2),_e=Ee[0],ke=Ee[1],Ce=_e,Ae=!g&&f;(w||Ae&&Ce&&"combobox"===v)&&(Ce=!1);var Se=!Ae&&Ce,Ie=c.useCallback((function(e){var t=void 0!==e?e:!Ce;w||(ke(t),Ce!==t&&(null===C||void 0===C||C(t)))}),[w,Ce,ke,C]),Te=c.useMemo((function(){return(O||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[O]),Pe=function(e,t,n){var r=!0,i=e;null===S||void 0===S||S(null);var s=n?null:function(e,t){if(!t||!t.length)return null;var n=!1,r=function e(t,r){var i=FJ(r),s=i[0],o=i.slice(1);if(!s)return[t];var a=t.split(s);return n=n||a.length>1,a.reduce((function(t,n){return[].concat(nV(t),nV(e(n,o)))}),[]).filter((function(e){return e}))}(e,t);return n?r:null}(e,O);return"combobox"!==v&&s&&(i="",null===R||void 0===R||R(s),Ie(!1),r=!1),N&&ve!==i&&N(i,{source:t?"typing":"effect"}),r};c.useEffect((function(){Ce||ne||"combobox"===v||Pe("",!1,!1)}),[Ce]),c.useEffect((function(){_e&&w&&ke(!1),w&&ge(!1)}),[w]);var Ne=lV(zK(),2),Re=Ne[0],Oe=Ne[1],Me=c.useRef(!1),je=[];c.useEffect((function(){return function(){je.forEach((function(e){return clearTimeout(e)})),je.splice(0,je.length)}}),[]);var Le,De=lV(c.useState(null),2),Be=De[0],Ue=De[1],Fe=lV(c.useState({}),2)[1];TK((function(){if(Se){var e,t=Math.ceil(null===(e=ce.current)||void 0===e?void 0:e.offsetWidth);Be===t||Number.isNaN(t)||Ue(t)}}),[Se]),be&&(Le=function(e){Ie(e)}),function(e,t,n,r){var i=c.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},c.useEffect((function(){function t(t){var n;if(null===(n=i.current)||void 0===n||!n.customizedTrigger){var r=t.target;r.shadowRoot&&t.composed&&(r=t.composedPath()[0]||r),i.current.open&&e().filter((function(e){return e})).every((function(e){return!e.contains(r)&&e!==r}))&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",t),function(){return window.removeEventListener("mousedown",t)}}),[])}((function(){var e;return[ce.current,null===(e=ue.current)||void 0===e?void 0:e.getPopupElement()]}),Se,Ie,!!be);var $e,ze,He=c.useMemo((function(){return VV(VV({},e),{},{notFoundContent:g,open:Ce,triggerOpen:Se,id:i,showSearch:re,multiple:ne,toggleOpen:Ie})}),[e,g,Se,Ce,i,re,ne,Ie]),We=void 0!==j?j:b||!ne&&"combobox"!==v;We&&($e=c.createElement(eY,{className:dV()("".concat(s,"-arrow"),oV({},"".concat(s,"-arrow-loading"),b)),customizeIcon:L,customizeIconProps:{loading:b,searchValue:ve,open:Ce,focused:me,showSearch:re}}));w||!M||!h.length&&!ve||"combobox"===v&&""===ve||(ze=c.createElement(eY,{className:"".concat(s,"-clear"),onMouseDown:function(){var e;null===y||void 0===y||y(),null===(e=de.current)||void 0===e||e.focus(),p([],{type:"clear",values:h}),Pe("",!1,!1)},customizeIcon:D},"\xd7"));var qe,Ve=c.createElement(B,{ref:he}),Ge=dV()(s,o,(oV(r={},"".concat(s,"-focused"),me),oV(r,"".concat(s,"-multiple"),ne),oV(r,"".concat(s,"-single"),!ne),oV(r,"".concat(s,"-allow-clear"),M),oV(r,"".concat(s,"-show-arrow"),We),oV(r,"".concat(s,"-disabled"),w),oV(r,"".concat(s,"-loading"),b),oV(r,"".concat(s,"-open"),Ce),oV(r,"".concat(s,"-customize-input"),we),oV(r,"".concat(s,"-show-search"),re),r)),Ke=c.createElement(UJ,{ref:ue,disabled:w,prefixCls:s,visible:Se,popupElement:Ve,containerWidth:Be,animation:U,transitionName:F,dropdownStyle:$,dropdownClassName:z,direction:u,dropdownMatchSelectWidth:H,dropdownRender:W,dropdownAlign:q,placement:V,getPopupContainer:G,empty:f,getTriggerDOMNode:function(){return le.current},onPopupVisibleChange:Le,onPopupMouseEnter:function(){Fe({})}},be?c.cloneElement(be,{ref:xe}):c.createElement(fY,rV({},e,{domRef:le,prefixCls:s,inputElement:we,ref:de,id:i,showSearch:re,autoClearSearchValue:P,mode:v,activeDescendantId:I,tagRender:l,values:h,open:Ce,onToggleOpen:Ie,activeValue:A,searchValue:ve,onSearch:Pe,onSearchSubmit:function(e){e&&e.trim()&&N(e,{source:"submit"})},onRemove:function(e){var t=h.filter((function(t){return t!==e}));p(t,{type:"remove",values:[e]})},tokenWithEnter:Te})));return qe=be?Ke:c.createElement("div",rV({className:Ge},ie,{ref:ce,onMouseDown:function(e){var t,n=e.target,r=null===(t=ue.current)||void 0===t?void 0:t.getPopupElement();if(r&&r.contains(n)){var i=setTimeout((function(){var e,t=je.indexOf(i);-1!==t&&je.splice(t,1),ye(),oe||r.contains(document.activeElement)||null===(e=de.current)||void 0===e||e.focus()}));je.push(i)}for(var s=arguments.length,o=new Array(s>1?s-1:0),a=1;a<s;a++)o[a-1]=arguments[a];null===ee||void 0===ee||ee.apply(void 0,[e].concat(o))}
9688,onKeyDown:function(e){var t,n=Re(),r=e.which;if(r===jK.ENTER&&("combobox"!==v&&e.preventDefault(),Ce||Ie(!0)),Oe(!!ve),r===jK.BACKSPACE&&!n&&ne&&!ve&&h.length){for(var i=nV(h),s=null,o=i.length-1;o>=0;o-=1){var a=i[o];if(!a.disabled){i.splice(o,1),s=a;break}}s&&p(i,{type:"remove",values:[s]})}for(var c=arguments.length,l=new Array(c>1?c-1:0),u=1;u<c;u++)l[u-1]=arguments[u];Ce&&he.current&&(t=he.current).onKeyDown.apply(t,[e].concat(l)),null===X||void 0===X||X.apply(void 0,[e].concat(l))},onKeyUp:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i;Ce&&he.current&&(i=he.current).onKeyUp.apply(i,[e].concat(n)),null===J||void 0===J||J.apply(void 0,[e].concat(n))},onFocus:function(){ge(!0),w||(Y&&!Me.current&&Y.apply(void 0,arguments),Z.includes("focus")&&Ie(!0)),Me.current=!0},onBlur:function(){ge(!1,(function(){Me.current=!1,Ie(!1)})),w||(ve&&("tags"===v?N(ve,{source:"submit"}):"multiple"===v&&N("",{source:"blur"})),Q&&Q.apply(void 0,arguments))}}),me&&!Ce&&c.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(h.map((function(e){var t=e.label,n=e.value;return["number","string"].includes(iV(t))?t:n})).join(", "))),Ke,$e,ze),c.createElement($K.Provider,{value:He},qe)}));const KJ=GJ;function ZJ(e,t){return iY(e).join("").toUpperCase().includes(t)}var YJ=0,QJ=TV();function JJ(e){var t=lV(c.useState(),2),n=t[0],r=t[1];return c.useEffect((function(){r("rc_select_".concat(function(){var e;return QJ?(e=YJ,YJ+=1):e="TEST_OR_SSR",e}()))}),[]),e||n}var XJ=["children","value"],eX=["children"];function tX(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return VK(e).map((function(e,n){if(!c.isValidElement(e)||!e.type)return null;var r=e,i=r.type.isSelectOptGroup,s=r.key,o=r.props,a=o.children,l=KV(o,eX);return t||!i?function(e){var t=e,n=t.key,r=t.props,i=r.children,s=r.value;return VV({key:n,value:void 0!==s?s:n,children:i},KV(r,XJ))}(e):VV(VV({key:"__RC_SELECT_GRP__".concat(null===s?n:s,"__"),label:s},l),{},{options:tX(a)})})).filter((function(e){return e}))}function nX(e){var t=c.useRef();t.current=e;var n=c.useCallback((function(){return t.current.apply(t,arguments)}),[]);return n}var rX=function(){return null};rX.isSelectOptGroup=!0;const iX=rX;var sX=function(){return null};sX.isSelectOption=!0;const oX=sX;function aX(e,t){var n=VV({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}var cX=c.forwardRef((function(e,t){var n=e.height,r=e.offset,i=e.children,s=e.prefixCls,o=e.onInnerResize,a=e.innerProps,l={},u={display:"flex",flexDirection:"column"};return void 0!==r&&(l={height:n,position:"relative",overflow:"hidden"},u=VV(VV({},u),{},{transform:"translateY(".concat(r,"px)"),position:"absolute",left:0,right:0,top:0})),c.createElement("div",{style:l},c.createElement(CZ,{onResize:function(e){e.offsetHeight&&o&&o()}},c.createElement("div",rV({style:u,className:dV()(oV({},"".concat(s,"-holder-inner"),s)),ref:t},a),i)))}));cX.displayName="Filler";const lX=cX;function uX(e){return"touches"in e?e.touches[0].pageY:e.pageY}var dX=function(e){lK(n,e);var t=pK(n);function n(){var e;sK(this,n);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return(e=t.call.apply(t,[this].concat(i))).moveRaf=null,e.scrollbarRef=c.createRef(),e.thumbRef=c.createRef(),e.visibleTimeout=null,e.state={dragging:!1,pageY:null,startTop:null,visible:!1},e.delayHidden=function(){clearTimeout(e.visibleTimeout),e.setState({visible:!0}),e.visibleTimeout=setTimeout((function(){e.setState({visible:!1})}),2e3)},e.onScrollbarTouchStart=function(e){e.preventDefault()},e.onContainerMouseDown=function(e){e.stopPropagation(),e.preventDefault()},e.patchEvents=function(){window.addEventListener("mousemove",e.onMouseMove),window.addEventListener("mouseup",e.onMouseUp),e.thumbRef.current.addEventListener("touchmove",e.onMouseMove),e.thumbRef.current.addEventListener("touchend",e.onMouseUp)},e.removeEvents=function(){var t;window.removeEventListener("mousemove",e.onMouseMove),window.removeEventListener("mouseup",e.onMouseUp),null===(t=e.scrollbarRef.current)||void 0===t||t.removeEventListener("touchstart",e.onScrollbarTouchStart),e.thumbRef.current&&(e.thumbRef.current.removeEventListener("touchstart",e.onMouseDown),e.thumbRef.current.removeEventListener("touchmove",e.onMouseMove),e.thumbRef.current.removeEventListener("touchend",e.onMouseUp)),DZ.cancel(e.moveRaf)},e.onMouseDown=function(t){var n=e.props.onStartMove;e.setState({dragging:!0,pageY:uX(t),startTop:e.getTop()}),n(),e.patchEvents(),t.stopPropagation(),t.preventDefault()},e.onMouseMove=function(t){var n=e.state,r=n.dragging,i=n.pageY,s=n.startTop,o=e.props.onScroll;if(DZ.cancel(e.moveRaf),r){var a=s+(uX(t)-i),c=e.getEnableScrollRange(),l=e.getEnableHeightRange(),u=l?a/l:0,d=Math.ceil(u*c);e.moveRaf=DZ((function(){o(d)}))}},e.onMouseUp=function(){var t=e.props.onStopMove;e.setState({dragging:!1}),t(),e.removeEvents()},e.getSpinHeight=function(){var t=e.props,n=t.height,r=n/t.count*10;return r=Math.max(r,20),r=Math.min(r,n/2),Math.floor(r)},e.getEnableScrollRange=function(){var t=e.props;return t.scrollHeight-t.height||0},e.getEnableHeightRange=function(){return e.props.height-e.getSpinHeight()||0},e.getTop=function(){var t=e.props.scrollTop,n=e.getEnableScrollRange(),r=e.getEnableHeightRange();return 0===t||0===n?0:t/n*r},e.showScroll=function(){var t=e.props,n=t.height;return t.scrollHeight>n},e}
9688return aK(n,[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(e){e.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var e=this.state,t=e.dragging,n=e.visible,r=this.props,i=r.prefixCls,s=r.direction,o=this.getSpinHeight(),a=this.getTop(),l=this.showScroll(),u=l&&n,d="rtl"===s?{left:0}:{right:0};return c.createElement("div",{ref:this.scrollbarRef,className:dV()("".concat(i,"-scrollbar"),oV({},"".concat(i,"-scrollbar-show"),l)),style:VV(VV({width:8,top:0,bottom:0},d),{},{position:"absolute",display:u?null:"none"}),onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden},c.createElement("div",{ref:this.thumbRef,className:dV()("".concat(i,"-scrollbar-thumb"),oV({},"".concat(i,"-scrollbar-thumb-moving"),t)),style:{width:"100%",height:o,top:a,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown}))}}]),n}(c.Component);function hX(e){var t=e.children,n=e.setRef,r=c.useCallback((function(e){n(e)}),[]);return c.cloneElement(t,{ref:r})}const pX=function(){function e(){sK(this,e),this.maps=void 0,this.maps=Object.create(null)}return aK(e,[{key:"set",value:function(e,t){this.maps[e]=t}},{key:"get",value:function(e){return this.maps[e]}}]),e}();function fX(e,t,n){var r=lV(c.useState(e),2),i=r[0],s=r[1],o=lV(c.useState(null),2),a=o[0],l=o[1];return c.useEffect((function(){var r=function(e,t,n){var r,i,s=e.length,o=t.length;if(0===s&&0===o)return null;s<o?(r=e,i=t):(r=t,i=e);var a={__EMPTY_ITEM__:!0};function c(e){return void 0!==e?n(e):a}for(var l=null,u=1!==Math.abs(s-o),d=0;d<i.length;d+=1){var h=c(r[d]);if(h!==c(i[d])){l=d,u=u||h!==c(i[d+1]);break}}return null===l?null:{index:l,multiple:u}}(i||[],e||[],t);void 0!==(null===r||void 0===r?void 0:r.index)&&(null===n||void 0===n||n(r.index),l(e[r.index])),s(e)}),[e]),[a]}const mX="object"===("undefined"===typeof navigator?"undefined":iV(navigator))&&/Firefox/i.test(navigator.userAgent),gX=function(e,t){var n=(0,c.useRef)(!1),r=(0,c.useRef)(null);var i=(0,c.useRef)({top:e,bottom:t});return i.current.top=e,i.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=e<0&&i.current.top||e>0&&i.current.bottom;return t&&s?(clearTimeout(r.current),n.current=!1):s&&!n.current||(clearTimeout(r.current),n.current=!0,r.current=setTimeout((function(){n.current=!1}),50)),!n.current&&s}};var yX=14/15;var vX=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","component","onScroll","onVisibleChange","innerProps"],wX=[],bX={overflowY:"auto",overflowAnchor:"none"};function xX(e,t){var n=e.prefixCls,r=void 0===n?"rc-virtual-list":n,i=e.className,s=e.height,o=e.itemHeight,a=e.fullHeight,l=void 0===a||a,u=e.style,d=e.data,h=e.children,p=e.itemKey,f=e.virtual,m=e.direction,g=e.component,y=void 0===g?"div":g,v=e.onScroll,w=e.onVisibleChange,b=e.innerProps,x=KV(e,vX),E=!(!1===f||!s||!o),_=E&&d&&o*d.length>s,k=lV((0,c.useState)(0),2),C=k[0],A=k[1],S=lV((0,c.useState)(!1),2),I=S[0],T=S[1],P=dV()(r,oV({},"".concat(r,"-rtl"),"rtl"===m),i),N=d||wX,R=(0,c.useRef)(),O=(0,c.useRef)(),M=(0,c.useRef)(),j=c.useCallback((function(e){return"function"===typeof p?p(e):null===e||void 0===e?void 0:e[p]}),[p]),L={getKey:j};function D(e){A((function(t){var n=function(e){var t=e;Number.isNaN(X.current)||(t=Math.min(t,X.current));return t=Math.max(t,0),t}("function"===typeof e?e(t):e);return R.current.scrollTop=n,n}))}var B=(0,c.useRef)({start:0,end:N.length}),U=(0,c.useRef)(),F=lV(fX(N,j),1)[0];U.current=F;var $=function(e,t,n){var r=lV(c.useState(0),2),i=r[0],s=r[1],o=(0,c.useRef)(new Map),a=(0,c.useRef)(new pX),l=(0,c.useRef)();function u(){DZ.cancel(l.current)}function d(){u(),l.current=DZ((function(){o.current.forEach((function(e,t){if(e&&e.offsetParent){var n=KK(e),r=n.offsetHeight;a.current.get(t)!==r&&a.current.set(t,n.offsetHeight)}})),s((function(e){return e+1}))}))}return(0,c.useEffect)((function(){return u}),[]),[function(r,i){var s=e(r),a=o.current.get(s);i?(o.current.set(s,i),d()):o.current.delete(s),!a!==!i&&(i?null===t||void 0===t||t(r):null===n||void 0===n||n(r))},d,a.current,i]}(j,null,null),z=lV($,4),H=z[0],W=z[1],q=z[2],V=z[3],G=c.useMemo((function(){if(!E)return{scrollHeight:void 0,start:0,end:N.length-1,offset:void 0};var e;if(!_)return{scrollHeight:(null===(e=O.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:N.length-1,offset:void 0};for(var t,n,r,i=0,a=N.length,c=0;c<a;c+=1){var l=N[c],u=j(l),d=q.get(u),h=i+(void 0===d?o:d);h>=C&&void 0===t&&(t=c,n=i),h>
9688C+s&&void 0===r&&(r=c),i=h}return void 0===t&&(t=0,n=0,r=Math.ceil(s/o)),void 0===r&&(r=N.length-1),{scrollHeight:i,start:t,end:r=Math.min(r+1,N.length),offset:n}}),[_,E,C,N,V,s]),K=G.scrollHeight,Z=G.start,Y=G.end,Q=G.offset;B.current.start=Z,B.current.end=Y;var J=K-s,X=(0,c.useRef)(J);X.current=J;var ee=C<=0,te=C>=J,ne=gX(ee,te);var re=function(e,t,n,r){var i=(0,c.useRef)(0),s=(0,c.useRef)(null),o=(0,c.useRef)(null),a=(0,c.useRef)(!1),l=gX(t,n);return[function(t){if(e){DZ.cancel(s.current);var n=t.deltaY;i.current+=n,o.current=n,l(n)||(mX||t.preventDefault(),s.current=DZ((function(){var e=a.current?10:1;r(i.current*e),i.current=0})))}},function(t){e&&(a.current=t.detail===o.current)}]}(E,ee,te,(function(e){D((function(t){return t+e}))})),ie=lV(re,2),se=ie[0],oe=ie[1];!function(e,t,n){var r,i=(0,c.useRef)(!1),s=(0,c.useRef)(0),o=(0,c.useRef)(null),a=(0,c.useRef)(null),l=function(e){if(i.current){var t=Math.ceil(e.touches[0].pageY),r=s.current-t;s.current=t,n(r)&&e.preventDefault(),clearInterval(a.current),a.current=setInterval((function(){(!n(r*=yX,!0)||Math.abs(r)<=.1)&&clearInterval(a.current)}),16)}},u=function(){i.current=!1,r()},d=function(e){r(),1!==e.touches.length||i.current||(i.current=!0,s.current=Math.ceil(e.touches[0].pageY),o.current=e.target,o.current.addEventListener("touchmove",l),o.current.addEventListener("touchend",u))};r=function(){o.current&&(o.current.removeEventListener("touchmove",l),o.current.removeEventListener("touchend",u))},TK((function(){return e&&t.current.addEventListener("touchstart",d),function(){var e;null===(e=t.current)||void 0===e||e.removeEventListener("touchstart",d),r(),clearInterval(a.current)}}),[e])}(E,R,(function(e,t){return!ne(e,t)&&(se({preventDefault:function(){},deltaY:e}),!0)})),TK((function(){function e(e){E&&e.preventDefault()}return R.current.addEventListener("wheel",se),R.current.addEventListener("DOMMouseScroll",oe),R.current.addEventListener("MozMousePixelScroll",e),function(){R.current&&(R.current.removeEventListener("wheel",se),R.current.removeEventListener("DOMMouseScroll",oe),R.current.removeEventListener("MozMousePixelScroll",e))}}),[E]);var ae=function(e,t,n,r,i,s,o,a){var l=c.useRef();return function(c){if(null!==c&&void 0!==c){if(DZ.cancel(l.current),"number"===typeof c)o(c);else if(c&&"object"===iV(c)){var u,d=c.align;u="index"in c?c.index:t.findIndex((function(e){return i(e)===c.key}));var h=c.offset,p=void 0===h?0:h;!function a(c,h){if(!(c<0)&&e.current){var f=e.current.clientHeight,m=!1,g=h;if(f){for(var y=h||d,v=0,w=0,b=0,x=Math.min(t.length,u),E=0;E<=x;E+=1){var _=i(t[E]);w=v;var k=n.get(_);v=b=w+(void 0===k?r:k),E===u&&void 0===k&&(m=!0)}var C=null;switch(y){case"top":C=w-p;break;case"bottom":C=b-f+p;break;default:var A=e.current.scrollTop;w<A?g="top":b>A+f&&(g="bottom")}null!==C&&C!==e.current.scrollTop&&o(C)}l.current=DZ((function(){m&&s(),a(c-1,g)}),2)}}(3)}}else a()}}(R,N,q,o,j,W,D,(function(){var e;null===(e=M.current)||void 0===e||e.delayHidden()}));c.useImperativeHandle(t,(function(){return{scrollTo:ae}})),TK((function(){if(w){var e=N.slice(Z,Y+1);w(e,N)}}),[Z,Y,N]);var ce=function(e,t,n,r,i,s){var o=s.getKey;return e.slice(t,n+1).map((function(e,n){var s=i(e,t+n,{}),a=o(e);return c.createElement(hX,{key:a,setRef:function(t){return r(e,t)}},s)}))}(N,Z,Y,H,h,L),le=null;return s&&(le=VV(oV({},l?"height":"maxHeight",s),bX),E&&(le.overflowY="hidden",I&&(le.pointerEvents="none"))),c.createElement("div",rV({style:VV(VV({},u),{},{position:"relative"}),className:P},x),c.createElement(y,{className:"".concat(r,"-holder"),style:le,ref:R,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==C&&D(t),null===v||void 0===v||v(e)}},c.createElement(lX,{prefixCls:r,height:K,offset:Q,onInnerResize:W,ref:O,innerProps:b},ce)),E&&c.createElement(dX,{ref:M,prefixCls:r,scrollTop:C,height:s,scrollHeight:K,count:N.length,direction:m,onScroll:function(e){D(e)},onStartMove:function(){T(!0)},onStopMove:function(){T(!1)}}))}var EX=c.forwardRef(xX);EX.displayName="List";const _X=EX;const kX=c.createContext(null);var CX=["disabled","title","children","style","className"];function AX(e){return"string"===typeof e||"number"===typeof e}var SX=function(e,t){var n=c.useContext($K),r=n.prefixCls,i=n.id,s=n.open,o=n.multiple,a=n.mode,l=n.searchValue,u=n.toggleOpen,d=n.notFoundContent,h=n.onPopupScroll,p=c.useContext(kX),f=p.flattenOptions,m=p.onActiveValue,g=p.defaultActiveFirstOption,y=p.onSelect,v=p.menuItemSelectedIcon,w=p.rawValues,b=p.fieldNames,x=p.virtual,E=p.listHeight,_=p.listItemHeight,k="".concat(r,"-item"),C=DK((function(){return f}),[s,f],(function(e,t){return t[0]&&e[1]!==t[1]})),A=c.useRef(null),S=function(e){e.preventDefault()},I=function(e){A.current&&A.current.scrollTo("number"===typeof e?{index:e}:e)},T=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=C.length,r=0;r<n;r+=1){var i=(e+r*t+n)%n,s=C[i],o=s.group,a=s.data;if(!o&&!a.disabled)return i}return-1},P=lV(c.useState((function(){return T(0)})),2),N=P[0],R=P[1],O=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];R(e);var n={source:t?"keyboard":"mouse"},r=C[e];r?m(r.value,e,n):m(null,-1,n)};(0,c.useEffect)((function(){O(!1!==g?T(0):-1)}),[C.length,l]);var M=c.useCallback((function(e){return w.has(e)&&"combobox"!==a}),[a,nV(w).toString(),w.size]);(0,c.useEffect)((function(){var e,t=setTimeout((function(){if(!o&&s&&1===w.size){var e=Array.from(w)[0],t=C.findIndex((function(t){return t.data.value===e}));
9688-1!==t&&(O(t),I(t))}}));s&&(null===(e=A.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[s,l]);var j=function(e){void 0!==e&&y(e,{selected:!w.has(e)}),o||u(!1)};if(c.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case jK.N:case jK.P:case jK.UP:case jK.DOWN:var r=0;if(t===jK.UP?r=-1:t===jK.DOWN?r=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===jK.N?r=1:t===jK.P&&(r=-1)),0!==r){var i=T(N+r,r);I(i),O(i,!0)}break;case jK.ENTER:var o=C[N];o&&!o.data.disabled?j(o.value):j(void 0),s&&e.preventDefault();break;case jK.ESC:u(!1),s&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){I(e)}}})),0===C.length)return c.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(k,"-empty"),onMouseDown:S},d);var L=Object.keys(b).map((function(e){return b[e]})),D=function(e){return e.label},B=function(e){var t=C[e];if(!t)return null;var n=t.data||{},r=n.value,s=t.group,o=qK(n,!0),a=D(t);return t?c.createElement("div",rV({"aria-label":"string"!==typeof a||s?null:a},o,{key:e,role:s?"presentation":"option",id:"".concat(i,"_list_").concat(e),"aria-selected":M(r)}),r):null};return c.createElement(c.Fragment,null,c.createElement("div",{role:"listbox",id:"".concat(i,"_list"),style:{height:0,width:0,overflow:"hidden"}},B(N-1),B(N),B(N+1)),c.createElement(_X,{itemKey:"key",ref:A,data:C,height:E,itemHeight:_,fullHeight:!1,onMouseDown:S,onScroll:h,virtual:x},(function(e,t){var n,r=e.group,i=e.groupOption,s=e.data,o=e.label,a=e.value,l=s.key;if(r){var u,d=null!==(u=s.title)&&void 0!==u?u:AX(o)?o.toString():void 0;return c.createElement("div",{className:dV()(k,"".concat(k,"-group")),title:d},void 0!==o?o:l)}var h=s.disabled,p=s.title,f=(s.children,s.style),m=s.className,g=aX(KV(s,CX),L),y=M(a),w="".concat(k,"-option"),b=dV()(k,w,m,(oV(n={},"".concat(w,"-grouped"),i),oV(n,"".concat(w,"-active"),N===t&&!h),oV(n,"".concat(w,"-disabled"),h),oV(n,"".concat(w,"-selected"),y),n)),x=D(e),E=!v||"function"===typeof v||y,_="number"===typeof x?x:x||a,C=AX(_)?_.toString():void 0;return void 0!==p&&(C=p),c.createElement("div",rV({},qK(g),{"aria-selected":y,className:b,title:C,onMouseMove:function(){N===t||h||O(t)},onClick:function(){h||j(a)},style:f}),c.createElement("div",{className:"".concat(w,"-content")},_),c.isValidElement(v)||y,E&&c.createElement(eY,{className:"".concat(k,"-option-state"),customizeIcon:v,customizeIconProps:{isSelected:y}},y?"\u2713":null))})))},IX=c.forwardRef(SX);IX.displayName="OptionList";const TX=IX;var PX=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],NX=["inputValue"];var RX=c.forwardRef((function(e,t){var n=e.id,r=e.mode,i=e.prefixCls,s=void 0===i?"rc-select":i,o=e.backfill,a=e.fieldNames,l=e.inputValue,u=e.searchValue,d=e.onSearch,h=e.autoClearSearchValue,p=void 0===h||h,f=e.onSelect,m=e.onDeselect,g=e.dropdownMatchSelectWidth,y=void 0===g||g,v=e.filterOption,w=e.filterSort,b=e.optionFilterProp,x=e.optionLabelProp,E=e.options,_=e.children,k=e.defaultActiveFirstOption,C=e.menuItemSelectedIcon,A=e.virtual,S=e.listHeight,I=void 0===S?200:S,T=e.listItemHeight,P=void 0===T?20:T,N=e.value,R=e.defaultValue,O=e.labelInValue,M=e.onChange,j=KV(e,PX),L=JJ(n),D=VJ(r),B=!(E||!_),U=c.useMemo((function(){return(void 0!==v||"combobox"!==r)&&v}),[v,r]),F=c.useMemo((function(){return zJ(a,B)}),[JSON.stringify(a),B]),$=lV(RK("",{value:void 0!==u?u:l,postState:function(e){return e||""}}),2),z=$[0],H=$[1],W=function(e,t,n,r,i){return c.useMemo((function(){var s=e;!e&&(s=tX(t));var o=new Map,a=new Map,c=function(e,t,n){n&&"string"===typeof n&&e.set(t[n],t)};return function e(t){for(var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=0;l<t.length;l+=1){var u=t[l];!u[n.options]||s?(o.set(u[n.value],u),c(a,u,n.label),c(a,u,r),c(a,u,i)):e(u[n.options],!0)}}(s),{options:s,valueOptions:o,labelOptions:a}}),[e,t,n,r,i])}(E,_,F,b,x),q=W.valueOptions,V=W.labelOptions,G=W.options,K=c.useCallback((function(e){return iY(e).map((function(e){var t,n,r,i,s,o;(function(e){return!e||"object"!==iV(e)})(e)?t=e:(r=e.key,n=e.label,t=null!==(o=e.value)&&void 0!==o?o:r);var a,c=q.get(t);c&&(void 0===n&&(n=null===c||void 0===c?void 0:c[x||F.label]),void 0===r&&(r=null!==(a=null===c||void 0===c?void 0:c.key)&&void 0!==a?a:t),i=null===c||void 0===c?void 0:c.disabled,s=null===c||void 0===c?void 0:c.title);return{label:n,value:t,key:r,disabled:i,title:s}}))}),[F,x,q]),Z=lV(RK(R,{value:N}),2),Y=Z[0],Q=Z[1],J=c.useMemo((function(){var e,t=K(Y);return"combobox"!==r||null!==(e=t[0])&&void 0!==e&&e.value?t:[]}),[Y,K,r]),X=function(e,t){var n=c.useRef({values:new Map,options:new Map});return[c.useMemo((function(){var r=n.current,i=r.values,s=r.options,o=e.map((function(e){var t;return void 0===e.label?VV(VV({},e),{},{label:null===(t=i.get(e.value))||void 0===t?void 0:t.label}):e})),a=new Map,c=new Map;return o.forEach((function(e){a.set(e.value,e),c.set(e.value,t.get(e.value)||s.get(e.value))})),n.current.values=a,n.current.options=c,o}),[e,t]),c.useCallback((function(e){return t.get(e)||n.current.options.get(e)}),[t])]}(J,q),ee=lV(X,2),te=ee[0],ne=ee[1],re=c.useMemo((function(){if(!r&&1===te.length){var e=te[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return te.map((function(e){var t;return VV(VV({},e),{},{label:null!==(t=e.label)&&void 0!==t?t:e.value})}))}),[r,te]),ie=c.useMemo((function(){return new Set(te.map((function(e){return e.value})))}),[te]);c.useEffect((function(){if("combobox"===r){var e,t=null===(e=te[0])||void 0===e?void 0:e.value;H(function(e){return void 0!==e&&null!==e}(t)?String(t):"")}}),[te]);var se=nX((function(e,t){var n,r=null!==t&&void 0!==t?t:e;return oV(n={},F.value,e),oV(n,F.label,r),n})),oe=c.useMemo((function(){if("tags"!==r)return G;var e=nV(G);return nV(te).sort((function(e,t){return e.value<t.value?-1:1}
9688)).forEach((function(t){var n=t.value;(function(e){return q.has(e)})(n)||e.push(se(n,t.label))})),e}),[se,G,q,te,r]),ae=function(e,t,n,r,i){return c.useMemo((function(){if(!n||!1===r)return e;var s=t.options,o=t.label,a=t.value,c=[],l="function"===typeof r,u=n.toUpperCase(),d=l?r:function(e,t){return i?ZJ(t[i],u):t[s]?ZJ(t["children"!==o?o:"label"],u):ZJ(t[a],u)},h=l?function(e){return HJ(e)}:function(e){return e};return e.forEach((function(e){if(e[s])if(d(n,h(e)))c.push(e);else{var t=e[s].filter((function(e){return d(n,h(e))}));t.length&&c.push(VV(VV({},e),{},oV({},s,t)))}else d(n,h(e))&&c.push(e)})),c}),[e,r,i,n,t])}(oe,F,z,U,b),ce=c.useMemo((function(){return"tags"!==r||!z||ae.some((function(e){return e[b||"value"]===z}))?ae:[se(z)].concat(nV(ae))}),[se,b,r,ae,z]),le=c.useMemo((function(){return w?nV(ce).sort((function(e,t){return w(e,t)})):ce}),[ce,w]),ue=c.useMemo((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],s=zJ(n,!1),o=s.label,a=s.value,c=s.options;return function e(t,n){t.forEach((function(t){var s=t[o];if(n||!(c in t)){var l=t[a];i.push({key:$J(t,i.length),groupOption:n,data:t,label:s,value:l})}else{var u=s;void 0===u&&r&&(u=t.label),i.push({key:$J(t,i.length),group:!0,data:t,label:u}),e(t[c],!0)}}))}(e,!1),i}(le,{fieldNames:F,childrenAsData:B})}),[le,F,B]),de=function(e){var t=K(e);if(Q(t),M&&(t.length!==te.length||t.some((function(e,t){var n;return(null===(n=te[t])||void 0===n?void 0:n.value)!==(null===e||void 0===e?void 0:e.value)})))){var n=O?t:t.map((function(e){return e.value})),r=t.map((function(e){return HJ(ne(e.value))}));M(D?n:n[0],D?r:r[0])}},he=lV(c.useState(null),2),pe=he[0],fe=he[1],me=lV(c.useState(0),2),ge=me[0],ye=me[1],ve=void 0!==k?k:"combobox"!==r,we=c.useCallback((function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).source,i=void 0===n?"keyboard":n;ye(t),o&&"combobox"===r&&null!==e&&"keyboard"===i&&fe(String(e))}),[o,r]),be=function(e,t,n){var r=function(){var t,n=ne(e);return[O?{label:null===n||void 0===n?void 0:n[F.label],value:e,key:null!==(t=null===n||void 0===n?void 0:n.key)&&void 0!==t?t:e}:e,HJ(n)]};if(t&&f){var i=lV(r(),2),s=i[0],o=i[1];f(s,o)}else if(!t&&m&&"clear"!==n){var a=lV(r(),2),c=a[0],l=a[1];m(c,l)}},xe=nX((function(e,t){var n,i=!D||t.selected;n=i?D?[].concat(nV(te),[e]):[e]:te.filter((function(t){return t.value!==e})),de(n),be(e,i),"combobox"===r?fe(""):VJ&&!p||(H(""),fe(""))})),Ee=c.useMemo((function(){var e=!1!==A&&!1!==y;return VV(VV({},W),{},{flattenOptions:ue,onActiveValue:we,defaultActiveFirstOption:ve,onSelect:xe,menuItemSelectedIcon:C,rawValues:ie,fieldNames:F,virtual:e,listHeight:I,listItemHeight:P,childrenAsData:B})}),[W,ue,we,ve,xe,C,ie,F,A,y,I,P,B]);return c.createElement(kX.Provider,{value:Ee},c.createElement(KJ,rV({},j,{id:L,prefixCls:s,ref:t,omitDomProps:NX,mode:r,displayValues:re,onDisplayValuesChange:function(e,t){de(e);var n=t.type,r=t.values;"remove"!==n&&"clear"!==n||r.forEach((function(e){be(e.value,!1,n)}))},searchValue:z,onSearch:function(e,t){if(H(e),fe(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===r&&de(e),null===d||void 0===d||d(e));else{var n=(e||"").trim();if(n){var i=Array.from(new Set([].concat(nV(ie),[n])));de(i),be(n,!0),H("")}}},autoClearSearchValue:p,onSearchSplit:function(e){var t=e;"tags"!==r&&(t=e.map((function(e){var t=V.get(e);return null===t||void 0===t?void 0:t.value})).filter((function(e){return void 0!==e})));var n=Array.from(new Set([].concat(nV(ie),nV(t))));de(n),n.forEach((function(e){be(e,!0)}))},dropdownMatchSelectWidth:y,OptionList:TX,emptyOptions:!ue.length,activeValue:pe,activeDescendantId:"".concat(L,"_list_").concat(ge)})))}));var OX=RX;OX.Option=oX,OX.OptGroup=iX;const MX=OX;var jX=c.createContext(!1);const LX=jX;var DX=c.createContext(void 0);const BX=DX;var UX="RC_FORM_INTERNAL_HOOKS",FX=function(){CG(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")};const $X=c.createContext({getFieldValue:FX,getFieldsValue:FX,getFieldError:FX,getFieldWarning:FX,getFieldsError:FX,isFieldsTouched:FX,isFieldTouched:FX,isFieldValidating:FX,isFieldsValidating:FX,resetFields:FX,setFields:FX,setFieldValue:FX,setFieldsValue:FX,validateFields:FX,submit:FX,getInternalHooks:function(){return FX(),{dispatch:FX,initEntityValue:FX,registerField:FX,useSubscribe:FX,setInitialValues:FX,destroyForm:FX,setCallbacks:FX,registerWatch:FX,getFields:FX,setValidateMessages:FX,setPreserve:FX,getInitialValue:FX}}});function zX(e){return void 0===e||null===e?[]:Array.isArray(e)?e:[e]}function HX(){return HX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HX.apply(this,arguments)}
9688function WX(e){return WX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},WX(e)}function qX(e,t){return qX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qX(e,t)}function VX(e,t,n){return VX=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&qX(i,n.prototype),i},VX.apply(null,arguments)}function GX(e){var t="function"===typeof Map?new Map:void 0;return GX=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return VX(e,arguments,WX(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),qX(r,e)},GX(e)}var KX=/%[sdj%]/g;function ZX(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)})),t}function YX(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,s=n.length;if("function"===typeof e)return e.apply(null,n);if("string"===typeof e){var o=e.replace(KX,(function(e){if("%%"===e)return"%";if(i>=s)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(jp){return"[Circular]"}break;default:return e}}));return o}return e}function QX(e,t){return void 0===e||null===e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!==typeof e||e))}function JX(e,t,n){var r=0,i=e.length;!function s(o){if(o&&o.length)n(o);else{var a=r;r+=1,a<i?t(e[a],s):n([])}}([])}var XX=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,"Async Validation Error")||this).errors=t,r.fields=n,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,qX(t,n),r}(GX(Error));function e0(e,t,n,r,i){if(t.first){var s=new Promise((function(t,s){var o=function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,e[n]||[])})),t}(e);JX(o,n,(function(e){return r(e),e.length?s(new XX(e,ZX(e))):t(i)}))}));return s.catch((function(e){return e})),s}var o=!0===t.firstFields?Object.keys(e):t.firstFields||[],a=Object.keys(e),c=a.length,l=0,u=[],d=new Promise((function(t,s){var d=function(e){if(u.push.apply(u,e),++l===c)return r(u),u.length?s(new XX(u,ZX(u))):t(i)};a.length||(r(u),t(i)),a.forEach((function(t){var r=e[t];-1!==o.indexOf(t)?JX(r,n,d):function(e,t,n){var r=[],i=0,s=e.length;function o(e){r.push.apply(r,e||[]),++i===s&&n(r)}e.forEach((function(e){t(e,o)}))}(r,n,d)}))}));return d.catch((function(e){return e})),d}function t0(e,t){return function(n){var r,i;return r=e.fullFields?function(e,t){for(var n=e,r=0;r<t.length;r++){if(void 0==n)return n;n=n[t[r]]}return n}(t,e.fullFields):t[n.field||e.fullField],(i=n)&&void 0!==i.message?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:"function"===typeof n?n():n,fieldValue:r,field:n.field||e.fullField}}}function n0(e,t){if(t)for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];"object"===typeof r&&"object"===typeof e[n]?e[n]=HX({},e[n],r):e[n]=r}return e}var r0,i0=function(e,t,n,r,i,s){!e.required||n.hasOwnProperty(e.field)&&!QX(t,s||e.type)||r.push(YX(i.messages.required,e.fullField))},s0=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,o0=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,a0={integer:function(e){return a0.number(e)&&parseInt(e,10)===e},float:function(e){return a0.number(e)&&!a0.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(t){return!1}},date:function(e){return"function"===typeof e.getTime&&"function"===typeof e.getMonth&&"function"===typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"===typeof e},object:function(e){return"object"===typeof e&&!a0.array(e)},method:function(e){return"function"===typeof e},email:function(e){return"string"===typeof e&&e.length<=320&&!!e.match(s0)},url:function(e){return"string"===typeof e&&e.length<=2048&&!!e.match(function(){if(r0)return r0;var e="[a-fA-F\\d:]",t=function(t){return t&&t.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}
9688",i=("\n(?:\n(?:"+r+":){7}(?:"+r+"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:"+r+":){6}(?:"+n+"|:"+r+"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:"+r+":){5}(?::"+n+"|(?::"+r+"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:"+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:"+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:"+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:"+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::"+r+"){0,5}:"+n+"|(?::"+r+"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),s=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),o=new RegExp("^"+n+"$"),a=new RegExp("^"+i+"$"),c=function(e){return e&&e.exact?s:new RegExp("(?:"+t(e)+n+t(e)+")|(?:"+t(e)+i+t(e)+")","g")};c.v4=function(e){return e&&e.exact?o:new RegExp(""+t(e)+n+t(e),"g")},c.v6=function(e){return e&&e.exact?a:new RegExp(""+t(e)+i+t(e),"g")};var l=c.v4().source,u=c.v6().source;return r0=new RegExp("(?:^(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|"+l+"|"+u+'|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?$)',"i")}())},hex:function(e){return"string"===typeof e&&!!e.match(o0)}},c0="enum",l0={required:i0,whitespace:function(e,t,n,r,i){(/^\s+$/.test(t)||""===t)&&r.push(YX(i.messages.whitespace,e.fullField))},type:function(e,t,n,r,i){if(e.required&&void 0===t)i0(e,t,n,r,i);else{var s=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(s)>-1?a0[s](t)||r.push(YX(i.messages.types[s],e.fullField,e.type)):s&&typeof t!==e.type&&r.push(YX(i.messages.types[s],e.fullField,e.type))}},range:function(e,t,n,r,i){var s="number"===typeof e.len,o="number"===typeof e.min,a="number"===typeof e.max,c=t,l=null,u="number"===typeof t,d="string"===typeof t,h=Array.isArray(t);if(u?l="number":d?l="string":h&&(l="array"),!l)return!1;h&&(c=t.length),d&&(c=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),s?c!==e.len&&r.push(YX(i.messages[l].len,e.fullField,e.len)):o&&!a&&c<e.min?r.push(YX(i.messages[l].min,e.fullField,e.min)):a&&!o&&c>e.max?r.push(YX(i.messages[l].max,e.fullField,e.max)):o&&a&&(c<e.min||c>e.max)&&r.push(YX(i.messages[l].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,i){e[c0]=Array.isArray(e[c0])?e[c0]:[],-1===e[c0].indexOf(t)&&r.push(YX(i.messages[c0],e.fullField,e[c0].join(", ")))},pattern:function(e,t,n,r,i){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(YX(i.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"===typeof e.pattern){new RegExp(e.pattern).test(t)||r.push(YX(i.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},u0=function(e,t,n,r,i){var s=e.type,o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(QX(t,s)&&!e.required)return n();l0.required(e,t,r,o,i,s),QX(t,s)||l0.type(e,t,r,o,i)}n(o)},d0={string:function(e,t,n,r,i){var s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(QX(t,"string")&&!e.required)return n();l0.required(e,t,r,s,i,"string"),QX(t,"string")||(l0.type(e,t,r,s,i),l0.range(e,t,r,s,i),l0.pattern(e,t,r,s,i),!0===e.whitespace&&l0.whitespace(e,t,r,s,i))}n(s)},method:function(e,t,n,r,i){var s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(QX(t)&&!e.required)return n();l0.required(e,t,r,s,i),void 0!==t&&l0.type(e,t,r,s,i)}n(s)},number:function(e,t,n,r,i){var s=[];
9688if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),QX(t)&&!e.required)return n();l0.required(e,t,r,s,i),void 0!==t&&(l0.type(e,t,r,s,i),l0.range(e,t,r,s,i))}n(s)},boolean:function(e,t,n,r,i){var s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(QX(t)&&!e.required)return n();l0.required(e,t,r,s,i),void 0!==t&&l0.type(e,t,r,s,i)}n(s)},regexp:function(e,t,n,r,i){var s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(QX(t)&&!e.required)return n();l0.required(e,t,r,s,i),QX(t)||l0.type(e,t,r,s,i)}n(s)},integer:function(e,t,n,r,i){var s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(QX(t)&&!e.required)return n();l0.required(e,t,r,s,i),void 0!==t&&(l0.type(e,t,r,s,i),l0.range(e,t,r,s,i))}n(s)},float:function(e,t,n,r,i){var s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(QX(t)&&!e.required)return n();l0.required(e,t,r,s,i),void 0!==t&&(l0.type(e,t,r,s,i),l0.range(e,t,r,s,i))}n(s)},array:function(e,t,n,r,i){var s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if((void 0===t||null===t)&&!e.required)return n();l0.required(e,t,r,s,i,"array"),void 0!==t&&null!==t&&(l0.type(e,t,r,s,i),l0.range(e,t,r,s,i))}n(s)},object:function(e,t,n,r,i){var s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(QX(t)&&!e.required)return n();l0.required(e,t,r,s,i),void 0!==t&&l0.type(e,t,r,s,i)}n(s)},enum:function(e,t,n,r,i){var s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(QX(t)&&!e.required)return n();l0.required(e,t,r,s,i),void 0!==t&&l0.enum(e,t,r,s,i)}n(s)},pattern:function(e,t,n,r,i){var s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(QX(t,"string")&&!e.required)return n();l0.required(e,t,r,s,i),QX(t,"string")||l0.pattern(e,t,r,s,i)}n(s)},date:function(e,t,n,r,i){var s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(QX(t,"date")&&!e.required)return n();var o;if(l0.required(e,t,r,s,i),!QX(t,"date"))o=t instanceof Date?t:new Date(t),l0.type(e,o,r,s,i),o&&l0.range(e,o.getTime(),r,s,i)}n(s)},url:u0,hex:u0,email:u0,required:function(e,t,n,r,i){var s=[],o=Array.isArray(t)?"array":typeof t;l0.required(e,t,r,s,i,o),n(s)},any:function(e,t,n,r,i){var s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(QX(t)&&!e.required)return n();l0.required(e,t,r,s,i)}n(s)}};function h0(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var p0=h0(),f0=function(){function e(e){this.rules=null,this._messages=p0,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==typeof e||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]}))},t.messages=function(e){return e&&(this._messages=n0(h0(),e)),this._messages},t.validate=function(t,n,r){var i=this;void 0===n&&(n={}),void 0===r&&(r=function(){});var s=t,o=n,a=r;if("function"===typeof o&&(a=o,o={}),!this.rules||0===Object.keys(this.rules).length)return a&&a(null,
9688s),Promise.resolve(s);if(o.messages){var c=this.messages();c===p0&&(c=h0()),n0(c,o.messages),o.messages=c}else o.messages=this.messages();var l={};(o.keys||Object.keys(this.rules)).forEach((function(e){var n=i.rules[e],r=s[e];n.forEach((function(n){var o=n;"function"===typeof o.transform&&(s===t&&(s=HX({},s)),r=s[e]=o.transform(r)),(o="function"===typeof o?{validator:o}:HX({},o)).validator=i.getValidationMethod(o),o.validator&&(o.field=e,o.fullField=o.fullField||e,o.type=i.getType(o),l[e]=l[e]||[],l[e].push({rule:o,value:r,source:s,field:e}))}))}));var u={};return e0(l,o,(function(t,n){var r,i=t.rule,a=("object"===i.type||"array"===i.type)&&("object"===typeof i.fields||"object"===typeof i.defaultField);function c(e,t){return HX({},t,{fullField:i.fullField+"."+e,fullFields:i.fullFields?[].concat(i.fullFields,[e]):[e]})}function l(r){void 0===r&&(r=[]);var l=Array.isArray(r)?r:[r];!o.suppressWarning&&l.length&&e.warning("async-validator:",l),l.length&&void 0!==i.message&&(l=[].concat(i.message));var d=l.map(t0(i,s));if(o.first&&d.length)return u[i.field]=1,n(d);if(a){if(i.required&&!t.value)return void 0!==i.message?d=[].concat(i.message).map(t0(i,s)):o.error&&(d=[o.error(i,YX(o.messages.required,i.field))]),n(d);var h={};i.defaultField&&Object.keys(t.value).map((function(e){h[e]=i.defaultField})),h=HX({},h,t.rule.fields);var p={};Object.keys(h).forEach((function(e){var t=h[e],n=Array.isArray(t)?t:[t];p[e]=n.map(c.bind(null,e))}));var f=new e(p);f.messages(o.messages),t.rule.options&&(t.rule.options.messages=o.messages,t.rule.options.error=o.error),f.validate(t.value,t.rule.options||o,(function(e){var t=[];d&&d.length&&t.push.apply(t,d),e&&e.length&&t.push.apply(t,e),n(t.length?t:null)}))}else n(d)}if(a=a&&(i.required||!i.required&&t.value),i.field=t.field,i.asyncValidator)r=i.asyncValidator(i,t.value,l,t.source,o);else if(i.validator){try{r=i.validator(i,t.value,l,t.source,o)}catch(d){null==console.error||console.error(d),o.suppressValidatorError||setTimeout((function(){throw d}),0),l(d.message)}!0===r?l():!1===r?l("function"===typeof i.message?i.message(i.fullField||i.field):i.message||(i.fullField||i.field)+" fails"):r instanceof Array?l(r):r instanceof Error&&l(r.message)}r&&r.then&&r.then((function(){return l()}),(function(e){return l(e)}))}),(function(e){!function(e){var t=[],n={};function r(e){var n;Array.isArray(e)?t=(n=t).concat.apply(n,e):t.push(e)}for(var i=0;i<e.length;i++)r(e[i]);t.length?(n=ZX(t),a(t,n)):a(null,s)}(e)}),s)},t.getType=function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!==typeof e.validator&&e.type&&!d0.hasOwnProperty(e.type))throw new Error(YX("Unknown rule type %s",e.type));return e.type||"string"},t.getValidationMethod=function(e){if("function"===typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0]?d0.required:d0[this.getType(e)]||void 0},e}();f0.register=function(e,t){if("function"!==typeof t)throw new Error("Cannot register a validator by type, validator is not a function");d0[e]=t},f0.warning=function(){},f0.messages=p0,f0.validators=d0;var m0="'${name}' is not a valid ${type}",g0={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:m0,method:m0,array:m0,object:m0,number:m0,date:m0,boolean:m0,integer:m0,float:m0,regexp:m0,email:m0,url:m0,hex:m0},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};function y0(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null===n||void 0===n)return;n=n[t[r]]}return n}function v0(e,t,n,r){if(!t.length)return n;var i,s=FJ(t),o=s[0],a=s.slice(1);return i=e||"number"!==typeof o?Array.isArray(e)?nV(e):VV({},e):[],r&&void 0===n&&1===a.length?delete i[o][a[0]]:i[o]=v0(i[o],a,n,r),i}function w0(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!y0(e,t.slice(0,-1))?e:v0(e,t,n,r)}function b0(e){return Array.isArray(e)?function(e){return e.map((function(e){return b0(e)}))}(e):"object"===iV(e)&&null!==e?function(e){if(Object.getPrototypeOf(e)===Object.prototype){var t={};for(var n in e)t[n]=b0(e[n]);return t}return e}(e):e}const x0=b0;function E0(e){return zX(e)}function _0(e,t){return y0(e,t)}function k0(e,t,n){return w0(e,t,n,arguments.length>3&&void 0!==arguments[3]&&arguments[3])}function C0(e,t){var n={};return t.forEach((function(t){var r=_0(e,t);n=k0(n,t,r)})),n}function A0(e,t){return e&&e.some((function(e){return P0(e,t)}))}function S0(e){return"object"===iV(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}function I0(e,t){var n=Array.isArray(e)?nV(e):VV({},e);return t?(Object.keys(t).forEach((function(e){var r=n[e],i=t[e],s=S0(r)&&S0(i);n[e]=s?I0(r,i||{}):x0(i)})),n):n}function T0(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((function(e,t){return I0(e,t)}),e)}function P0(e,t){return!(!e||!t||e.length!==t.length)&&e.every((function(e,n){return t[n]===e}))}function N0(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===iV(t.target)&&e in t.target?t.target[e]:t}function R0(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],s=t-n;return s>0?[].concat(nV(e.slice(0,n)),[i],nV(e.slice(n,t)),nV(e.slice(t+1,r))):s<0?[].concat(nV(e.slice(0,t)),nV(e.slice(t+1,n+1)),[i],nV(e.slice(n+1,r))):e}var O0=f0;function M0(e,t){return e.replace(/\$\{\w+\}/g,(function(e){var n=e.slice(2,-1);return t[n]}))}var j0="CODE_LOGIC_ERROR";function L0(e,t,n,r,i){return D0.apply(this,arguments)}function D0(){return D0=xJ(wJ().mark((function e(t,n,r,i,s){var o,a,l,u,d,h,p,f,m;return wJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete(o=VV({},r)).ruleIndex,o.validator&&(a=o.validator,o.validator=function(){try{return a.apply(void 0,arguments)}catch(e){return console.error(e),Promise.reject(j0)}}),l=null,o&&"array"===o.type&&o.defaultField&&(l=o.defaultField,delete o.defaultField),u=new O0(oV({},t,[o])),d=T0({}
vendor: 7,698 bytes, line 9688
9688,g0,i.validateMessages),u.messages(d),h=[],e.prev=9,e.next=12,Promise.resolve(u.validate(oV({},t,n),VV({},i)));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(9),e.t0.errors&&(h=e.t0.errors.map((function(e,t){var n=e.message,r=n===j0?d.default:n;return c.isValidElement(r)?c.cloneElement(r,{key:"error_".concat(t)}):r})));case 17:if(h.length||!l){e.next=22;break}return e.next=20,Promise.all(n.map((function(e,n){return L0("".concat(t,".").concat(n),e,l,i,s)})));case 20:return p=e.sent,e.abrupt("return",p.reduce((function(e,t){return[].concat(nV(e),nV(t))}),[]));case 22:return f=VV(VV({},r),{},{name:t,enum:(r.enum||[]).join(", ")},s),m=h.map((function(e){return"string"===typeof e?M0(e,f):e})),e.abrupt("return",m);case 25:case"end":return e.stop()}}),e,null,[[9,14]])}))),D0.apply(this,arguments)}function B0(e,t,n,r,i,s){var o,a=e.join("."),c=n.map((function(e,t){var n=e.validator,r=VV(VV({},e),{},{ruleIndex:t});return n&&(r.validator=function(e,t,r){var i=!1,s=n(e,t,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((function(){CG(!i,"Your validator function has already return a promise. `callback` will be ignored."),i||r.apply(void 0,t)}))}));i=s&&"function"===typeof s.then&&"function"===typeof s.catch,CG(i,"`callback` is deprecated. Please return a promise instead."),i&&s.then((function(){r()})).catch((function(e){r(e||" ")}))}),r})).sort((function(e,t){var n=e.warningOnly,r=e.ruleIndex,i=t.warningOnly,s=t.ruleIndex;return!!n===!!i?r-s:n?1:-1}));if(!0===i)o=new Promise(function(){var e=xJ(wJ().mark((function e(n,i){var o,l,u;return wJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=0;case 1:if(!(o<c.length)){e.next=12;break}return l=c[o],e.next=5,L0(a,t,l,r,s);case 5:if(!(u=e.sent).length){e.next=9;break}return i([{errors:u,rule:l}]),e.abrupt("return");case 9:o+=1,e.next=1;break;case 12:n([]);case 13:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());else{var l=c.map((function(e){return L0(a,t,e,r,s).then((function(t){return{errors:t,rule:e}}))}));o=(i?function(e){return F0.apply(this,arguments)}(l):function(e){return U0.apply(this,arguments)}(l)).then((function(e){return Promise.reject(e)}))}return o.catch((function(e){return e})),o}function U0(){return(U0=xJ(wJ().mark((function e(t){return wJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,nV(e))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F0(){return(F0=xJ(wJ().mark((function e(t){var n;return wJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise((function(e){t.forEach((function(r){r.then((function(r){r.errors.length&&e([r]),(n+=1)===t.length&&e([])}))}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var $0=["name"],z0=[];function H0(e,t,n,r,i,s){return"function"===typeof e?e(t,n,"source"in s?{source:s.source}:{}):r!==i}var W0=function(e){lK(n,e);var t=pK(n);function n(e){var r;(sK(this,n),(r=t.call(this,e)).state={resetCount:0},r.cancelRegisterFunc=null,r.mounted=!1,r.touched=!1,r.dirty=!1,r.validatePromise=null,r.prevValidating=void 0,r.errors=z0,r.warnings=z0,r.cancelRegister=function(){var e=r.props,t=e.preserve,n=e.isListField,i=e.name;r.cancelRegisterFunc&&r.cancelRegisterFunc(n,t,E0(i)),r.cancelRegisterFunc=null},r.getNamePath=function(){var e=r.props,t=e.name,n=e.fieldContext.prefixName;return void 0!==t?[].concat(nV(void 0===n?[]:n),nV(t)):[]},r.getRules=function(){var e=r.props,t=e.rules,n=void 0===t?[]:t,i=e.fieldContext;return n.map((function(e){return"function"===typeof e?e(i):e}))},r.refresh=function(){r.mounted&&r.setState((function(e){return{resetCount:e.resetCount+1}}))},r.triggerMetaEvent=function(e){var t=r.props.onMetaChange;null===t||void 0===t||t(VV(VV({},r.getMeta()),{},{destroy:e}))},r.onStoreChange=function(e,t,n){var i=r.props,s=i.shouldUpdate,o=i.dependencies,a=void 0===o?[]:o,c=i.onReset,l=n.store,u=r.getNamePath(),d=r.getValue(e),h=r.getValue(l),p=t&&A0(t,u);switch("valueUpdate"===n.type&&"external"===n.source&&d!==h&&(r.touched=!0,r.dirty=!0,r.validatePromise=null,r.errors=z0,r.warnings=z0,r.triggerMetaEvent()),n.type){case"reset":if(!t||p)return r.touched=!1,r.dirty=!1,r.validatePromise=null,r.errors=z0,r.warnings=z0,r.triggerMetaEvent(),null===c||void 0===c||c(),void r.refresh();break;case"remove":if(s)return void r.reRender();break;case"setField":if(p){var f=n.data;return"touched"in f&&(r.touched=f.touched),"validating"in f&&!("originRCField"in f)&&(r.validatePromise=f.validating?Promise.resolve([]):null),"errors"in f&&(r.errors=f.errors||z0),"warnings"in f&&(r.warnings=f.warnings||z0),r.dirty=!0,r.triggerMetaEvent(),void r.reRender()}if(s&&!u.length&&H0(s,e,l,d,h,n))return void r.reRender();break;case"dependenciesUpdate":if(a.map(E0).some((function(e){return A0(n.relatedFields,e)})))return void r.reRender();break;default:if(p||(!a.length||u.length||s)&&H0(s,e,l,d,h,n))return void r.reRender()}!0===s&&r.reRender()},r.validateRules=function(e){var t=r.getNamePath(),n=r.getValue(),i=Promise.resolve().then((function(){if(!r.mounted)return[];var s=r.props,o=s.validateFirst,a=void 0!==o&&o,c=s.messageVariables,l=(e||{}).triggerName,u=r.getRules();l&&(u=u.filter((function(e){return e})).filter((function(e){var t=e.validateTrigger;return!t||zX(t).includes(l)})));var d=B0(t,n,u,e,a,c);return d.catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z0;if(r.validatePromise===i){var t;r.validatePromise=null;var n=[],s=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,r=e.errors,i=void 0===r?z0:r;t?s.push.apply(s,nV(i)):n.push.apply(n,nV(i))})),r.errors=n,r.warnings=s,r.triggerMetaEvent(),r.reRender()}})),d}));return r.validatePromise=i,r.dirty=!0,r.errors=z0,r.warnings=z0,r.triggerMetaEvent(),r.reRender(),i},r.isFieldValidating=function(){return!!r.validatePromise},r.isFieldTouched=function(){return r.touched},r.isFieldDirty=function(){return!(!r.dirty&&void 0===r.props.initialValue)||void 0!==(0,r.props.fieldContext.getInternalHooks(UX).getInitialValue)(r.getNamePath())},r.getErrors=function(){return r.errors},r.getWarnings=function(){return r.warnings},r.isListField=function(){return r.props.isListField},r.isList=function(){return r.props.isList},r.isPreserve=function(){return r.props.preserve},r.getMeta=function(){return r.prevValidating=r.isFieldValidating(),{touched:r.isFieldTouched(),validating:r.prevValidating,errors:r.errors,warnings:r.warnings,name:r.getNamePath()}},r.getOnlyChild=function(e){if("function"===typeof e){var t=r.getMeta();return VV(VV({},r.getOnlyChild(e(r.getControlled(),t,r.props.fieldContext))),{},{isFunction:!0})}var n=VK(e);return 1===n.length&&c.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}},r.getValue=function(e){var t=r.props.fieldContext.getFieldsValue,n=r.getNamePath();return _0(e||t(!0),n)},r.getControlled=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.props,n=t.trigger,i=t.validateTrigger,s=t.getValueFromEvent,o=t.normalize,a=t.valuePropName,c=t.getValueProps,l=t.fieldContext,u=void 0!==i?i:l.validateTrigger,d=r.getNamePath(),h=l.getInternalHooks,p=l.getFieldsValue,f=h(UX).dispatch,m=r.getValue(),g=c||function(e){return oV({},a,e)},y=e[n],v=VV(VV({},e),g(m));return v[n]=function(){var e;r.touched=!0,r.dirty=!0,r.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e=s?s.apply(void 0,n):N0.apply(void 0,[a].concat(n)),o&&(e=o(e,m,p(!0))),f({type:"updateV
9688alue",namePath:d,value:e}),y&&y.apply(void 0,n)},zX(u||[]).forEach((function(e){var t=v[e];v[e]=function(){t&&t.apply(void 0,arguments);var n=r.props.rules;n&&n.length&&f({type:"validateField",namePath:d,triggerName:e})}})),v},e.fieldContext)&&(0,(0,e.fieldContext.getInternalHooks)(UX).initEntityValue)(hK(r));return r}return aK(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,n=e.fieldContext;if(this.mounted=!0,n){var r=(0,n.getInternalHooks)(UX).registerField;this.cancelRegisterFunc=r(this)}!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var e,t=this.state.resetCount,n=this.props.children,r=this.getOnlyChild(n),i=r.child;return r.isFunction?e=i:c.isValidElement(i)?e=c.cloneElement(i,this.getControlled(i.props)):(CG(!i,"`children` of Field is not validate ReactElement."),e=i),c.createElement(c.Fragment,{key:t},e)}}]),n}(c.Component);W0.contextType=$X,W0.defaultProps={trigger:"onChange",valuePropName:"value"};const q0=function(e){var t=e.name,n=KV(e,$0),r=c.useContext($X),i=void 0!==t?E0(t):void 0,s="keep";return n.isListField||(s="_".concat((i||[]).join("_"))),c.createElement(W0,rV({key:s,name:i},n,{fieldContext:r}))};const V0=c.createContext(null);const G0=function(e){var t=e.name,n=e.initialValue,r=e.children,i=e.rules,s=e.validateTrigger,o=c.useContext($X),a=c.useRef({keys:[],id:0}).current,l=c.useMemo((function(){var e=E0(o.prefixName)||[];return[].concat(nV(e),nV(E0(t)))}),[o.prefixName,t]),u=c.useMemo((function(){return VV(VV({},o),{},{prefixName:l})}),[o,l]),d=c.useMemo((function(){return{getKey:function(e){var t=l.length,n=e[t];return[a.keys[n],e.slice(t+1)]}}}),[l]);if("function"!==typeof r)return CG(!1,"Form.List only accepts function as children."),null;return c.createElement(V0.Provider,{value:d},c.createElement($X.Provider,{value:u},c.createElement(q0,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:i,validateTrigger:s,initialValue:n,isList:!0},(function(e,t){var n=e.value,i=void 0===n?[]:n,s=e.onChange,c=o.getFieldValue,u=function(){return c(l||[])||[]},d={add:function(e,t){var n=u();t>=0&&t<=n.length?(a.keys=[].concat(nV(a.keys.slice(0,t)),[a.id],nV(a.keys.slice(t))),s([].concat(nV(n.slice(0,t)),[e],nV(n.slice(t))))):(a.keys=[].concat(nV(a.keys),[a.id]),s([].concat(nV(n),[e]))),a.id+=1},remove:function(e){var t=u(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(a.keys=a.keys.filter((function(e,t){return!n.has(t)})),s(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=u();e<0||e>=n.length||t<0||t>=n.length||(a.keys=R0(a.keys,e,t),s(R0(n,e,t)))}}},h=i||[];return Array.isArray(h)||(h=[]),r(h.map((function(e,t){var n=a.keys[t];return void 0===n&&(a.keys[t]=a.id,n=a.keys[t],a.id+=1),{name:t,key:n,isListField:!0}})),d,t)}))))};var K0="__@field_split__";function Z0(e){return e.map((function(e){return"".concat(iV(e),":").concat(e)})).join(K0)}var Y0=function(){function e(){sK(this,e),this.kvs=new Map}return aK(e,[{key:"set",value:function(e,t){this.kvs.set(Z0(e),t)}},{key:"get",value:function(e){return this.kvs.get(Z0(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(Z0(e))}},{key:"map",value:function(e){return nV(this.kvs.entries()).map((function(t){var n=lV(t,2),r=n[0],i=n[1],s=r.split(K0);return e({key:s.map((function(e){var t=lV(e.match(/^([^:]*):(.*)$/),3),n=t[1],r=t[2];return"number"===n?Number(r):r})),value:i})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}();const Q0=Y0;var J0=["name","errors"],X0=aK((function e(t){var n=this;sK(this,e),this.formHooked=!1,this.forceRootUpdate=void 0,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,is
vendor: 7,355 bytes, line 9688
9688FieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}},this.getInternalHooks=function(e){return e===UX?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(CG(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(e){n.subscribable=e},this.prevWithoutPreserves=null,this.setInitialValues=function(e,t){if(n.initialValues=e||{},t){var r,i=T0({},e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map((function(t){var n=t.key;i=k0(i,n,_0(e,n))})),n.prevWithoutPreserves=null,n.updateStore(i)}},this.destroyForm=function(){var e=new Q0;n.getFieldEntities(!0).forEach((function(t){n.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)})),n.prevWithoutPreserves=e},this.getInitialValue=function(e){var t=_0(n.initialValues,e);return e.length?x0(t):t},this.setCallbacks=function(e){n.callbacks=e},this.setValidateMessages=function(e){n.validateMessages=e},this.setPreserve=function(e){n.preserve=e},this.watchList=[],this.registerWatch=function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter((function(t){return t!==e}))}},this.notifyWatch=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue();n.watchList.forEach((function(n){n(t,e)}))}},this.timeoutId=null,this.warningUnhooked=function(){0},this.updateStore=function(e){n.store=e},this.getFieldEntities=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities},this.getFieldsMap=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new Q0;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t},this.getFieldEntitiesForNamePathList=function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=E0(e);return t.get(n)||{INVALIDATE_NAME_PATH:E0(e)}}))},this.getFieldsValue=function(e,t){if(n.warningUnhooked(),!0===e&&!t)return n.store;var r=n.getFieldEntitiesForNamePathList(Array.isArray(e)?e:null),i=[];return r.forEach((function(n){var r,s="INVALIDATE_NAME_PATH"in n?n.INVALIDATE_NAME_PATH:n.getNamePath();if(e||!(null===(r=n.isListField)||void 0===r?void 0:r.call(n)))if(t){var o="getMeta"in n?n.getMeta():null;t(o)&&i.push(s)}else i.push(s)})),C0(n.store,i.map(E0))},this.getFieldValue=function(e){n.warningUnhooked();var t=E0(e);return _0(n.store,t)},this.getFieldsError=function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:E0(e[n]),errors:[],warnings:[]}}))},this.getFieldError=function(e){n.warningUnhooked();var t=E0(e);return n.getFieldsError([t])[0].errors},this.getFieldWarning=function(e){n.warningUnhooked();var t=E0(e);return n.getFieldsError([t])[0].warnings},this.isFieldsTouched=function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i,s=t[0],o=t[1],a=!1;0===t.length?i=null:1===t.length?Array.isArray(s)?(i=s.map(E0),a=!1):(i=null,a=s):(i=s.map(E0),a=o);var c=n.getFieldEntities(!0),l=function(e){return e.isFieldTouched()};if(!i)return a?c.every(l):c.some(l);var u=new Q0;i.forEach((function(e){u.set(e,[])})),c.forEach((function(e){var t=e.getNamePath();i.forEach((function(n){n.every((function(e,n){return t[n]===e}))&&u.update(n,(function(t){return[].concat(nV(t),[e])}))}))}));var d=function(e){return e.some(l)},h=u.map((function(e){return e.value}));return a?h.every(d):h.some(d)},this.isFieldTouched=function(e){return n.warningUnhooked(),n.isFieldsTouched([e])},this.isFieldsValidating=function(e){n.warningUnhooked();var t=n.getFieldEntities();if(!e)return t.some((function(e){return e.isFieldValidating()}));var r=e.map(E0);return t.some((function(e){var t=e.getNamePath();return A0(r,t)&&e.isFieldValidating()}))},this.isFieldValidating=function(e){return n.warningUnhooked(),n.isFieldsValidating([e])},this.resetWithFieldInitialValue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new Q0,r=n.getFieldEntities(!0);r.forEach((function(e){var n=e.props.initialValue,r=e.getNamePath();if(void 0!==n){var i=t.get(r)||new Set;i.add({entity:e,value:n}),t.set(r,i)}}));var i;e.entities?i=e.entities:e.namePathList?(i=[],e.namePathList.forEach((function(e){var n,r=t.get(e);r&&(n=i).push.apply(n,nV(nV(r).map((function(e){return e.entity}))))}))):i=r,i.forEach((function(r){if(void 0!==r.props.initialValue){var i=r.getNamePath();if(void 0!==n.getInitialValue(i))CG(!1,"Form already set 'initialValues' with path '".concat(i.join("."),"'. Field can not overwrite it."));else{var s=t.get(i);if(s&&s.size>1)CG(!1,"Multiple Field with path '".concat(i.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(s){var o=n.getFieldValue(i);e.skipExist&&void 0!==o||n.updateStore(k0(n.store,i,nV(s)[0].value))}}}}))},this.resetFields=function(e){n.warningUnhooked();var t=n.store;if(!e)return n.updateStore(T0({},n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),void n.notifyWatch();var r=e.map(E0);r.forEach((function(e){var t=n.getInitialValue(e);n.updateStore(k0(n.store,e,t))})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"}),n.notifyWatch(r)},this.setFields=function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach((function(e){var i=e.name,s=(e.errors,KV(e,J0)),o=E0(i);r.push(o),"value"in s&&n.updateStore(k0(n.store,o,s.value)),n.notifyObservers(t,[o],{type:"setField",data:e})})),n.notifyWatch(r)},this.getFields=function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=VV(VV({},e.getMeta()),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(r,"originRCField",{value:!0}),r}))},this.initEntityValue=function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===_0(n.store,r)&&n.updateStore(k0(n.store,r,t))}},this.isMergedPreserve=function(e){var t=void 0!==e?e:n.preserve;return null===t||void 0===t||t},this.registerField=function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(r,i){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!n.isMergedPreserve(i)&&(!r||s.length>1)){var o=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==o&&n.fieldEntities.every((function(e){return!P0(e.getNamePath(),t)}))){var a=n.store;n.updateStore(k0(a,t,o,!0)),n.notifyObservers(a,[t],{type:"remove"}
9688),n.triggerDependenciesUpdate(a,t)}}n.notifyWatch([t])}},this.dispatch=function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var i=e.namePath,s=e.triggerName;n.validateFields([i],{triggerName:s})}},this.notifyObservers=function(e,t,r){if(n.subscribable){var i=VV(VV({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,i)}))}else n.forceRootUpdate()},this.triggerDependenciesUpdate=function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat(nV(r))}),r},this.updateValue=function(e,t){var r=E0(e),i=n.store;n.updateStore(k0(n.store,r,t)),n.notifyObservers(i,[r],{type:"valueUpdate",source:"internal"}),n.notifyWatch([r]);var s=n.triggerDependenciesUpdate(i,r),o=n.callbacks.onValuesChange;o&&o(C0(n.store,[r]),n.getFieldsValue());n.triggerOnFieldsChange([r].concat(nV(s)))},this.setFieldsValue=function(e){n.warningUnhooked();var t=n.store;if(e){var r=T0(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()},this.setFieldValue=function(e,t){n.setFields([{name:e,value:t}])},this.getDependencyChildrenFields=function(e){var t=new Set,r=[],i=new Q0;n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=E0(t);i.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))}));return function e(n){(i.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var i=n.getNamePath();n.isFieldDirty()&&i.length&&(r.push(i),e(i))}}))}(e),r},this.triggerOnFieldsChange=function(e,t){var r=n.callbacks.onFieldsChange;if(r){var i=n.getFields();if(t){var s=new Q0;t.forEach((function(e){var t=e.name,n=e.errors;s.set(t,n)})),i.forEach((function(e){e.errors=s.get(e.name)||e.errors}))}r(i.filter((function(t){var n=t.name;return A0(e,n)})),i)}},this.validateFields=function(e,t){n.warningUnhooked();var r=!!e,i=r?e.map(E0):[],s=[];n.getFieldEntities(!0).forEach((function(o){if(r||i.push(o.getNamePath()),(null===t||void 0===t?void 0:t.recursive)&&r){var a=o.getNamePath();a.every((function(t,n){return e[n]===t||void 0===e[n]}))&&i.push(a)}if(o.props.rules&&o.props.rules.length){var c=o.getNamePath();if(!r||A0(i,c)){var l=o.validateRules(VV({validateMessages:VV(VV({},g0),n.validateMessages)},t));s.push(l.then((function(){return{name:c,errors:[],warnings:[]}})).catch((function(e){var t,n=[],r=[];return null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,i=e.errors;t?r.push.apply(r,nV(i)):n.push.apply(n,nV(i))})),n.length?Promise.reject({name:c,errors:n,warnings:r}):{name:c,errors:n,warnings:r}})))}}}));var o=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(i,s){e.forEach((function(e,o){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[o]=e,n>0||(t&&s(r),i(r))}))}))})):Promise.resolve([])}(s);n.lastValidatePromise=o,o.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));
9688var a=o.then((function(){return n.lastValidatePromise===o?Promise.resolve(n.getFieldsValue(i)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(i),errorFields:t,outOfDate:n.lastValidatePromise!==o})}));return a.catch((function(e){return e})),a},this.submit=function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(r){console.error(r)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))},this.forceRootUpdate=t}));const e1=function(e){var t=c.useRef(),n=lV(c.useState({}),2)[1];if(!t.current)if(e)t.current=e;else{var r=new X0((function(){n({})}));t.current=r.getForm()}return[t.current]};var t1=c.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}});const n1=t1;var r1=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"];const i1=function(e,t){var n=e.name,r=e.initialValues,i=e.fields,s=e.form,o=e.preserve,a=e.children,l=e.component,u=void 0===l?"form":l,d=e.validateMessages,h=e.validateTrigger,p=void 0===h?"onChange":h,f=e.onValuesChange,m=e.onFieldsChange,g=e.onFinish,y=e.onFinishFailed,v=KV(e,r1),w=c.useContext(n1),b=lV(e1(s),1)[0],x=b.getInternalHooks(UX),E=x.useSubscribe,_=x.setInitialValues,k=x.setCallbacks,C=x.setValidateMessages,A=x.setPreserve,S=x.destroyForm;c.useImperativeHandle(t,(function(){return b})),c.useEffect((function(){return w.registerForm(n,b),function(){w.unregisterForm(n)}}),[w,b,n]),C(VV(VV({},w.validateMessages),d)),k({onValuesChange:f,onFieldsChange:function(e){if(w.triggerFormChange(n,e),m){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];m.apply(void 0,[e].concat(r))}},onFinish:function(e){w.triggerFormFinish(n,e),g&&g(e)},onFinishFailed:y}),A(o);var I,T=c.useRef(null);_(r,!T.current),T.current||(T.current=!0),c.useEffect((function(){return S}),[]);var P="function"===typeof a;P?I=a(b.getFieldsValue(!0),b):I=a;E(!P);var N=c.useRef();c.useEffect((function(){(function(e,t){if(e===t)return!0;if(!e&&t||e&&!t)return!1;if(!e||!t||"object"!==iV(e)||"object"!==iV(t))return!1;var n=Object.keys(e),r=Object.keys(t);return nV(new Set([].concat(n,r))).every((function(n){var r=e[n],i=t[n];return"function"===typeof r&&"function"===typeof i||r===i}))})(N.current||[],i||[])||b.setFields(i||[]),N.current=i}),[i,b]);var R=c.useMemo((function(){return VV(VV({},b),{},{validateTrigger:p})}),[b,p]),O=c.createElement($X.Provider,{value:R},I);return!1===u?O:c.createElement(u,rV({},v,{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),b.submit()},onReset:function(e){var t;e.preventDefault(),b.resetFields(),null===(t=v.onReset)||void 0===t||t.call(v,e)}}),O)};function s1(e){try{return JSON.stringify(e)}catch(t){return Math.random()}}var o1=function(){};const a1=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=void 0===r?[]:r,s=t[1],o=lV((0,c.useState)(),2),a=o[0],l=o[1],u=(0,c.useMemo)((function(){return s1(a)}),[a]),d=(0,c.useRef)(u);d.current=u;var h=(0,c.useContext)($X),p=s||h,f=p&&p._init,m=E0(i),g=(0,c.useRef)(m);return g.current=m,o1(m),(0,c.useEffect)((function(){if(f){var e=p.getFieldsValue,t=(0,(0,p.getInternalHooks)(UX).registerWatch)((function(e){var t=_0(e,g.current),n=s1(t);d.current!==n&&(d.current=n,l(t))})),n=_0(e(),g.current);return l(n),t}}),[f]),a};var c1=c.forwardRef(i1);c1.FormProvider=function(e){var t=e.validateMessages,n=e.onFormChange,r=e.onFormFinish,i=e.children,s=c.useContext(t1),o=c.useRef({});return c.createElement(t1.Provider,{value:VV(VV({},s),{},{validateMessages:VV(VV({},s.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:o.current}),s.triggerFormChange(e,t)},triggerFormFinish:function(e,t){r&&r(e,{values:t,forms:o.current}),s.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(o.current=VV(VV({},o.current),{},oV({},e,t))),s.registerForm(e,t)},unregisterForm:function(e){var t=VV({},o.current);delete t[e],o.current=t,s.unregisterForm(e)}})},i)},c1.Field=q0,c1.List=G0,c1.useForm=e1,c1.useWatch=a1;var l1=c.createContext({}),u1=(BV("bottomLeft","bottomRight","topLeft","topRight"),function(e){return void 0===e||"topLeft"!==e&&"topRight"!==e?"slide-up":"slide-down"}),d1=function(e,t,n){return void 0!==n?n:"".concat(e,"-").concat(t)};BV("warning","error","");const h1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};var p1=function(e,t){return c.createElement(GG,VV(VV({},e),{},{ref:t,icon:h1}))};p1.displayName="CheckOutlined";const f1=c.forwardRef(p1);const m1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"};var g1=function(e,t){return c.createElement(GG,VV(VV({},e),{},{ref:t,icon:m1}))};g1.displayName="CloseCircleFilled";const y1=c.forwardRef(g1);const v1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"};var w1=function(e,t){return c.createElement(GG,VV(VV({},e),{},{ref:t,icon:v1}))};w1.displayName="CloseOutlined";const b1=c.forwardRef(w1);const x1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};var E1=function(e,t){return c.createElement(GG,VV(VV({},e),{},{ref:t,icon:x1}))};E1.displayName="DownOutlined";const _1=c.forwardRef(E1);
9688const k1={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};var C1=function(e,t){return c.createElement(GG,VV(VV({},e),{},{ref:t,icon:k1}))};C1.displayName="LoadingOutlined";const A1=c.forwardRef(C1);const S1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};var I1=function(e,t){return c.createElement(GG,VV(VV({},e),{},{ref:t,icon:S1}))};I1.displayName="SearchOutlined";const T1=c.forwardRef(I1);var P1=c.createContext(null);var N1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},R1="SECRET_COMBOBOX_MODE_DO_NOT_USE",O1=function(e,t){var n,r,i=e.prefixCls,s=e.bordered,o=void 0===s||s,a=e.className,l=e.getPopupContainer,u=e.dropdownClassName,d=e.popupClassName,h=e.listHeight,p=void 0===h?256:h,f=e.placement,m=e.listItemHeight,g=void 0===m?24:m,y=e.size,v=e.disabled,w=e.notFoundContent,b=e.status,x=e.showArrow,E=N1(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),_=c.useContext(hV),k=_.getPopupContainer,C=_.getPrefixCls,A=_.renderEmpty,S=_.direction,I=_.virtual,T=_.dropdownMatchSelectWidth,P=c.useContext(BX),N=C("select",i),R=C(),O=function(e,t){var n=c.useContext(P1),r=c.useMemo((function(){var r;if(!n)return"";var i=n.compactDirection,s=n.isFirstItem,o=n.isLastItem,a="vertical"===i?"-vertical-":"-";return dV()((oV(r={},"".concat(e,"-compact").concat(a,"item"),!0),oV(r,"".concat(e,"-compact").concat(a,"first-item"),s),oV(r,"".concat(e,"-compact").concat(a,"last-item"),o),oV(r,"".concat(e,"-compact").concat(a,"item-rtl"),"rtl"===t),r))}),[e,t,n]);return{compactSize:null===n||void 0===n?void 0:n.compactSize,compactDirection:null===n||void 0===n?void 0:n.compactDirection,compactItemClassnames:r}}(N,S),M=O.compactSize,j=O.compactItemClassnames,L=c.useMemo((function(){var e=E.mode;if("combobox"!==e)return e===R1?"combobox":e}),[E.mode]),D="multiple"===L||"tags"===L,B=void 0!==x?x:E.loading||!(D||"combobox"===L),U=(0,c.useContext)(l1),F=U.status,$=U.hasFeedback,z=U.isFormItemInput,H=U.feedbackIcon,W=function(e,t){return t||e}(F,b);r=void 0!==w?w:"combobox"===L?null:(A||IV)("Select");var q=function(e){var t=e.suffixIcon,n=e.clearIcon,r=e.menuItemSelectedIcon,i=e.removeIcon,s=e.loading,o=e.multiple,a=e.hasFeedback,l=e.prefixCls,u=e.showArrow,d=e.feedbackIcon,h=null!==n&&void 0!==n?n:c.createElement(y1,null),p=function(e){return c.createElement(c.Fragment,null,!1!==u&&e,a&&d)},f=null;if(void 0!==t)f=p(t);else if(s)f=p(c.createElement(A1,{spin:!0}));else{var m="".concat(l,"-suffix");f=function(e){var t=e.open,n=e.showSearch;return p(t&&n?c.createElement(T1,{className:m}):c.createElement(_1,{className:m}))}}return{clearIcon:h,suffixIcon:f,itemIcon:void 0!==r?r:o?c.createElement(f1,null):null,removeIcon:void 0!==i?i:c.createElement(b1,null)}}(rV(rV({},E),{multiple:D,hasFeedback:$,feedbackIcon:H,showArrow:B,prefixCls:N})),V=q.suffixIcon,G=q.itemIcon,K=q.removeIcon,Z=q.clearIcon,Y=aX(E,["suffixIcon","itemIcon"]),Q=dV()(d||u,oV({}
9688,"".concat(N,"-dropdown-").concat(S),"rtl"===S)),J=M||y||P,X=c.useContext(LX),ee=null!==v&&void 0!==v?v:X,te=dV()((oV(n={},"".concat(N,"-lg"),"large"===J),oV(n,"".concat(N,"-sm"),"small"===J),oV(n,"".concat(N,"-rtl"),"rtl"===S),oV(n,"".concat(N,"-borderless"),!o),oV(n,"".concat(N,"-in-form-item"),z),n),function(e,t,n){var r;return dV()((oV(r={},"".concat(e,"-status-success"),"success"===t),oV(r,"".concat(e,"-status-warning"),"warning"===t),oV(r,"".concat(e,"-status-error"),"error"===t),oV(r,"".concat(e,"-status-validating"),"validating"===t),oV(r,"".concat(e,"-has-feedback"),n),r))}(N,W,$),j,a);return c.createElement(MX,rV({ref:t,virtual:I,dropdownMatchSelectWidth:T},Y,{transitionName:d1(R,u1(f),E.transitionName),listHeight:p,listItemHeight:g,mode:L,prefixCls:N,placement:void 0!==f?f:"rtl"===S?"bottomRight":"bottomLeft",direction:S,inputIcon:V,menuItemSelectedIcon:G,removeIcon:K,clearIcon:Z,notFoundContent:r,className:te,getPopupContainer:l||k,dropdownClassName:Q,showArrow:$||x,disabled:ee}))},M1=c.forwardRef(O1);M1.SECRET_COMBOBOX_MODE_DO_NOT_USE=R1,M1.Option=oX,M1.OptGroup=iX;const j1=M1;var L1=function(e){return c.createElement(j1,rV({},e,{size:"small"}))},D1=function(e){return c.createElement(j1,rV({},e,{size:"middle"}))};L1.Option=j1.Option,D1.Option=j1.Option;var B1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const U1=function(e){var t=e.prefixCls,n=e.selectPrefixCls,r=e.className,i=e.size,s=e.locale,o=e.selectComponentClass,a=e.responsive,l=e.showSizeChanger,u=B1(e,["prefixCls","selectPrefixCls","className","size","locale","selectComponentClass","responsive","showSizeChanger"]),d=WV(a).xs,h=c.useContext(hV),p=h.getPrefixCls,f=h.direction,m=h.pagination,g=void 0===m?{}:m,y=p("pagination",t),v=null!==l&&void 0!==l?l:g.showSizeChanger;return c.createElement(bV,{componentName:"Pagination",defaultLocale:mV},(function(e){var t,l=rV(rV({},e),s),h="small"===i||!(!d||i||!a),m=p("select",n),g=dV()((oV(t={},"".concat(y,"-mini"),h),oV(t,"".concat(y,"-rtl"),"rtl"===f),t),r);return c.createElement(kK,rV({},function(){var e=c.createElement("span",{className:"".concat(y,"-item-ellipsis")},"\u2022\u2022\u2022"),t=c.createElement("button",{className:"".concat(y,"-item-link"),type:"button",tabIndex:-1},c.createElement(tK,null)),n=c.createElement("button",{className:"".concat(y,"-item-link"),type:"button",tabIndex:-1},c.createElement(iK,null)),r=c.createElement("a",{className:"".concat(y,"-item-link")},c.createElement("div",{className:"".concat(y,"-item-container")},c.createElement(ZG,{className:"".concat(y,"-item-link-icon")}),e)),i=c.createElement("a",{className:"".concat(y,"-item-link")},c.createElement("div",{className:"".concat(y,"-item-container")},c.createElement(JG,{className:"".concat(y,"-item-link-icon")}),e));if("rtl"===f){var s=[n,t];t=s[0],n=s[1];var o=[i,r];r=o[0],i=o[1]}return{prevIcon:t,nextIcon:n,jumpPrevIcon:r,jumpNextIcon:i}}(),u,{prefixCls:y,selectPrefixCls:m,className:g,selectComponentClass:o||(h?L1:D1),locale:l,showSizeChanger:v}))}))},F1=U1;var $1=n(5491),z1=n.n($1),H1=c.isValidElement;function W1(e,t){return function(e,t,n){return H1(e)?c.cloneElement(e,"function"===typeof n?n(e.props||{}):n):t}(e,e,t)}var q1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},V1=(BV("small","default","large"),null);var G1=function(e){var t=e.spinPrefixCls,n=e.spinning,r=void 0===n||n,i=e.delay,s=e.className,o=e.size,a=void 0===o?"default":o,l=e.tip,u=e.wrapperClassName,d=e.style,h=e.children,p=q1(e,["spinPrefixCls","spinning","delay","className","size","tip","wrapperClassName","style","children"]),f=c.useState((function(){return r&&!function(e,t){return!!e&&!!t&&!isNaN(Number(t))}(r,i)})),m=lV(f,2),g=m[0],y=m[1];c.useEffect((function(){var e=z1()((function(){y(r)}),i);return e(),function(){var t;null===(t=null===e||void 0===e?void 0:e.cancel)||void 0===t||t.call(e)}}),[i,r]);var v=function(n){var r,i=n.direction,o=dV()(t,(oV(r={},"".concat(t,"-sm"),"small"===a),oV(r,"".concat(t,"-lg"),"large"===a),oV(r,"".concat(t,"-spinning"),g),oV(r,"".concat(t,"-show-text"),!!l),oV(r,"".concat(t,"-rtl"),"rtl"===i),r),s),f=aX(p,["indicator","prefixCls"]),m=c.createElement("div",rV({},f,{style:d,className:o,"aria-live":"polite","aria-busy":g}),function(e,t){var n=t.indicator,r="".concat(e,"-dot");return null===n?null:H1(n)?W1(n,{className:dV()(n.props.className,r)}):H1(V1)?W1(V1,{className:dV()(V1.props.className,r)}):c.createElement("span",{className:dV()(r,"".concat(e,"-dot-spin"))},c.createElement("i",{className:"".concat(e,"-dot-item")}),c.createElement("i",{className:"".concat(e,"-dot-item")}),c.createElement("i",{className:"".concat(e,"-dot-item")}),c.createElement("i",{className:"".concat(e,"-dot-item")}))}(t,e),l?c.createElement("div",{className:"".concat(t,"-text")},l):null);if("undefined"!==typeof h){var y=dV()("".concat(t,"-container"),oV({},"".concat(t,"-blur"),g));return c.createElement("div",rV({},f,{className:dV()("".concat(t,"-nested-loading"),u)}),g&&c.createElement("div",{key:"loading"},m),c.createElement("div",{className:y,key:"container"},h))}return m};return c.createElement(pV,null,v)},K1=function(e){var t=e.prefixCls,n=(0,c.useContext(hV).getPrefixCls)("spin",t),r=rV(rV({},e),{spinPrefixCls:n});
9688return c.createElement(G1,rV({},r))};K1.setDefaultIndicator=function(e){V1=e};const Z1=K1;var Y1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};var Q1=["xs","sm","md","lg","xl","xxl"],J1=c.forwardRef((function(e,t){var n,r=c.useContext(hV),i=r.getPrefixCls,s=r.direction,o=c.useContext(UV),a=o.gutter,l=o.wrap,u=o.supportFlexGap,d=e.prefixCls,h=e.span,p=e.order,f=e.offset,m=e.push,g=e.pull,y=e.className,v=e.children,w=e.flex,b=e.style,x=Y1(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),E=i("col",d),_={};Q1.forEach((function(t){var n,r={},i=e[t];"number"===typeof i?r.span=i:"object"===iV(i)&&(r=i||{}),delete x[t],_=rV(rV({},_),(oV(n={},"".concat(E,"-").concat(t,"-").concat(r.span),void 0!==r.span),oV(n,"".concat(E,"-").concat(t,"-order-").concat(r.order),r.order||0===r.order),oV(n,"".concat(E,"-").concat(t,"-offset-").concat(r.offset),r.offset||0===r.offset),oV(n,"".concat(E,"-").concat(t,"-push-").concat(r.push),r.push||0===r.push),oV(n,"".concat(E,"-").concat(t,"-pull-").concat(r.pull),r.pull||0===r.pull),oV(n,"".concat(E,"-rtl"),"rtl"===s),n))}));var k=dV()(E,(oV(n={},"".concat(E,"-").concat(h),void 0!==h),oV(n,"".concat(E,"-order-").concat(p),p),oV(n,"".concat(E,"-offset-").concat(f),f),oV(n,"".concat(E,"-push-").concat(m),m),oV(n,"".concat(E,"-pull-").concat(g),g),n),y,_),C={};if(a&&a[0]>0){var A=a[0]/2;C.paddingLeft=A,C.paddingRight=A}if(a&&a[1]>0&&!u){var S=a[1]/2;C.paddingTop=S,C.paddingBottom=S}return w&&(C.flex=function(e){return"number"===typeof e?"".concat(e," ").concat(e," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?"0 0 ".concat(e):e}(w),!1!==l||C.minWidth||(C.minWidth=0)),c.createElement("div",rV({},x,{style:rV(rV({},C),b),className:k,ref:t}),v)}));const X1=J1;var e2=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},t2=function(e,t){var n=e.prefixCls,r=e.children,i=e.actions,s=e.extra,o=e.className,a=e.colStyle,l=e2(e,["prefixCls","children","actions","extra","className","colStyle"]),u=(0,c.useContext)(s2),d=u.grid,h=u.itemLayout,p=(0,c.useContext)(hV).getPrefixCls,f=p("list",n),m=i&&i.length>0&&c.createElement("ul",{className:"".concat(f,"-item-action"),key:"actions"},i.map((function(e,t){return c.createElement("li",{key:"".concat(f,"-item-action-").concat(t)},e,t!==i.length-1&&c.createElement("em",{className:"".concat(f,"-item-action-split")}))}))),g=d?"div":"li",y=c.createElement(g,rV({},l,d?{}:{ref:t},{className:dV()("".concat(f,"-item"),oV({},"".concat(f,"-item-no-flex"),!("vertical"===h?s:!function(){var e;return c.Children.forEach(r,(function(t){"string"===typeof t&&(e=!0)})),e&&c.Children.count(r)>1}())),o)}),"vertical"===h&&s?[c.createElement("div",{className:"".concat(f,"-item-main"),key:"content"},r,m),c.createElement("div",{className:"".concat(f,"-item-extra"),key:"extra"},s)]:[r,m,W1(s,{key:"extra"})]);return d?c.createElement(X1,{ref:t,flex:1,style:a},y):y},n2=(0,c.forwardRef)(t2);n2.Meta=function(e){var t=e.prefixCls,n=e.className,r=e.avatar,i=e.title,s=e.description,o=e2(e,["prefixCls","className","avatar","title","description"]),a=(0,(0,c.useContext)(hV).getPrefixCls)("list",t),l=dV()("".concat(a,"-item-meta"),n),u=c.createElement("div",{className:"".concat(a,"-item-meta-content")},i&&c.createElement("h4",{className:"".concat(a,"-item-meta-title")},i),s&&c.createElement("div",{className:"".concat(a,"-item-meta-description")},s));return c.createElement("div",rV({},o,{className:l}),r&&c.createElement("div",{className:"".concat(a,"-item-meta-avatar")},r),(i||s)&&u)};const r2=n2;var i2=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},s2=c.createContext({});s2.Consumer;function o2(e){var t,n=e.pagination,r=void 0!==n&&n,i=e.prefixCls,s=e.bordered,o=void 0!==s&&s,a=e.split,l=void 0===a||a,u=e.className,d=e.children,h=e.itemLayout,p=e.loadMore,f=e.grid,m=e.dataSource,g=void 0===m?[]:m,y=e.size,v=e.header,w=e.footer,b=e.loading,x=void 0!==b&&b,E=e.rowKey,_=e.renderItem,k=e.locale,C=i2(e,["pagination","prefixCls","bordered","split","className","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),A=r&&"object"===iV(r)?r:{},S=lV(c.useState(A.defaultCurrent||1),2),I=S[0],T=S[1],P=lV(c.useState(A.defaultPageSize||10),2),N=P[0],R=P[1],O=c.useContext(hV),M=O.getPrefixCls,j=O.renderEmpty,L=O.direction,D=function(e){return function(t,n){T(t),R(n),r&&r[e]&&r[e](t,n)}},B=D("onChange"),U=D("onShowSizeChange"),F=M("list",i),$=x;"boolean"===typeof $&&($={spinning:$});var z=$&&$.spinning,H="";switch(y){case"large":H="lg";break;case"small":H="sm"}var W=dV()(F,(oV(t={},"".concat(F,"-vertical"),"vertical"===h),oV(t,"".concat(F,"-").concat(H),H),oV(t,"".concat(F,"-split"),l),oV(t,"".concat(F,"-bordered"),o),oV(t,"".concat(F,"-loading"),z),oV(t,"".concat(F,"-grid"),!!f),oV(t,"".concat(F,"-something-after-last-item"),!!(p||r||w)),oV(t,"".concat(F,"-rtl"),"rtl"===L),t),u),q=rV(rV(rV({},{current:1,total:0}),{total:g.length,current:I,pageSize:N}),r||{}),V=Math.ceil(q.total/q.pageSize);q.current>V&&(q.current=V);var G=r?c.createElement("div",{className:"".concat(F,"-pagination")},c.createElement(F1,rV({},q,{onChange:B,onShowSizeChange:U}))):null,K=nV(g);r&&g.length>(q.current-1)*q.pageSize&&(K=nV(g).splice((q.current-1)*q.pageSize,q.pageSize));var Z=Object.keys(f||{}).some((function(e){return["xs","sm","md","lg","xl","xxl"].includes(e)})),Y=WV(Z),Q=c.useMemo((function(){for(var e=0;e<RV.length;e+=1){var t=RV[e];if(Y[t])return t}}),[Y]),J=c.useMemo((function(){if(f){var e=Q&&f[Q]?f[Q]:f.column;return e?{width:"".concat(100/e,"%"),maxWidth:"".concat(100/e,"%")}:void 0}}),[null===f||void 0===f?void 0:f.column,Q]),X=z&&c.createElement("div",{style:{minHeight:53}});if(K.length>0){var ee=K.map((function(e,t){return function(e,t){return _?((n="function"===typeof E?E(e):E?e[E]:e.key)||(n="list-item-".concat(t)),c.createElement(c.Fragment,{key:n},_(e,t))):null;var n}(e,t)}));X=f?c.createElement(HV,{gutter:f.gutter},c.Children.map(ee,(function(e){return c.createElement("div",{key:null===e||void 0===e?void 0:e.key,style:J},e)}))):c.createElement("ul",{className:"".concat(F,"-items")},ee)}else d||z||(X=function(e,t){return c.createElement("div",{className:"".concat(e,"-empty-text")},k&&k.emptyText||t("List"))}(F,j||IV));var te=q.position||"bottom",ne=c.useMemo((function(){return{grid:f,itemLayout:h}}),[JSON.stringify(f),h]);return c.createElement(s2.Provider,{value:ne},c.createElement("div",rV({className:W},C),("top"===te||"both"===te)&&G,v&&c.createElement("div",{className:"".concat(F,"-header")},v),c.createElement(Z1,rV({},$),X,d),w&&c.createElement("div",{className:"".concat(F,"-footer")},w),p||("bottom"===te||"both"===te)&&G))}o2.Item=r2;const a2=o2;class c2 extends c.Component{constructor(e){super(e),this.state={visibleNumbers:10,actualPage:0}}get visiblePages(){return this.props.pages<this.state.visibleNumbers?this.allPages:this.allPages.slice(this.props.page,this.props.page+this.state.visibleNumbers)}get allPages(){const e=[];for(let t=0;t<this.props.pages;t++)e.push(t+1);return e}get isLastPage(){return this.props.page===this.props.pages-1}get isFirstPage(){return 0===this.props.page}goToPage(e){this._navigateTo(e)}goToPrevPage(){this.isFirstPage||this._navigateTo(this.props.page-1)}goToNextPage(){this.isLastPage||this._navigateTo(this.props.page+1)}_navigateTo(e){this.props.onPageChange&&(this.props.onPageChange(e),this.setState({...this.state,actualPage:e}))}render(){return(0,iN.jsx)(iN.Fragment,{children:this.renderPagination()})}renderPagination(){return this.props.pages>1?(0,iN.jsx)("nav",{className:"pageNavigation","aria-label":"Page navigation",children:(0,iN.jsxs)("ul",{className:"pagination",children:[!this.isFirstPage&&(0,iN.jsx)("li",{className:"page-item",children:(0,iN.jsx)("a",{className:"page-link",href:"javascript:;",onClick:()=>this.goToPrevPage(),children:(0,iN.jsx)("span",{children:"\xab"})})},"page-pre"),this.visiblePages.map((e=>(0,iN.jsx)("li",{"data-index":`Page-${e}`,className:this.state.actualPage==e-1?"page-item active-page":"page-item",children:(0,iN.jsx)("a",{className:"page-link",onClick:()=>this.goToPage(e-1),href:"javascript:;",children:e})},`Page-${e}`))),!this.isLastPage&&(0,iN.jsx)("li",{className:"page-item",children:(0,iN.jsx)("a",{className:"page-link",href:"javascript:;",onClick:()=>this.goToNextPage(),children:(0,iN.jsx)("span",{children:"\xbb"})})},"page-next")]})}):null}}const l2=c2;const u2=class{static transform(e){return 1===e?"Arena":2===e?"Mistic zone":3===e?"Night road":4===e?"Inferno":5===e?"Jungle":6===e?"Snowy Lands":e}};class d2 extends c.Component{constructor(e){super(e),this.state={isLoadingBattleList:!0,battleList:[],page:0,pageSize:5,pages:0,search:"",totalItems:0,basicFilter:"search"}}UNSAFE_componentWillMount(){this.setState({...this.state,isLoadingBattleList:!0},(()=>{this.loadbattleListInfo()}))}async loadbattleListInfo(){try{const e=parseInt(this.props.totalBattleCount),t=Math.ceil(e/this.state.pageSize),n=await this.getbattleListData(this.state.page,this.state.pageSize,e);this.setState({...this.state,battleList:n,totalItems:e,isLoadingBattleList:!1,pages:t})}catch(e){console.error(e),this.setState({...this.state,isLoadingBattleList:!1})}}async getbattleListData(e,t,n){let r,i;r=t>(n=parseInt(n))||0==e?0:(e+1)*t-t,i=(e+1)*t-1>n-1?n-1:(e+1)*t-1;return await this.props.gameManager.getNFTBattleHistory(this.props.nftID,r,i,!0)}renderPagination(){return this.state.totalItems>0&&this.state.pages>1?(0,iN.jsx)(l2,{page:this.state.page,pages:this.state.pages,pageSize:this.state.pageSize,onPageChange:e=>this.onPageChange(e)}
9688):null}onPageChange(e){this.setState({...this.state,isLoadingBattleList:!0,page:e},(()=>{this.loadbattleListInfo()}))}render(){return(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"card m-0 mt-4 roundedCard glowBorderGreen",children:(0,iN.jsxs)("div",{className:"card-body pt-4",children:[(0,iN.jsxs)("h5",{className:"my-4",children:[(0,iN.jsx)("i",{className:"fa-solid fa-clock-rotate-left"})," Battle History ",this.state.isLoadingBattleList?null:"("+this.state.totalItems+")"]}),this.renderbattleList(),(0,iN.jsx)("div",{className:"row",children:(0,iN.jsx)("div",{className:"col-12",children:this.isLoadingBattleList?null:this.renderPagination()})})]})})})}renderbattleList(){return this.state.isLoadingBattleList?(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"card m-0 mt-4 bg-transparent",children:(0,iN.jsx)("div",{className:"card-body pt-4",children:(0,iN.jsx)("div",{className:"text-center my-3",children:(0,iN.jsx)("div",{className:"spinner-border text-softmint",role:"status",children:(0,iN.jsx)("span",{className:"visually-hidden",children:"Loading..."})})})})})}):(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)(a2,{className:"demo-loadmore-list",itemLayout:"horizontal",split:"true",dataSource:this.state.battleList,renderItem:e=>(0,iN.jsx)(a2.Item,{children:(0,iN.jsxs)("div",{style:{flex:"auto"},children:[(0,iN.jsxs)("span",{children:["Battle #",e.id," - ",e.date]}),(0,iN.jsx)("br",{}),e.playerIsAttacker?(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:"Attack"}):(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:"Defense"}),e.battleOpponentDefenseCooldown?(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:"Opponent Protect"}):null,!e.battleOpponentDefenseCooldown&&e.battleDraw?(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:"Draw"}):null,e.battleOpponentDefenseCooldown||e.battleDraw||!e.battleWin?null:(0,iN.jsxs)("span",{className:"badge bg-success me-1",children:["Win (+",Aq.byDecimals(e.prizeRaw_bn,this.props.tokenRewardInfo.decimals)/(e.playerIsAttacker?1:2)-(e.prizeWithFee?e.prizeMinusPerc*(Aq.byDecimals(e.prizeRaw_bn,this.props.tokenRewardInfo.decimals)/(e.playerIsAttacker?1:2))/100:0)," ",this.props.tokenRewardInfo.symbol,")"]}),e.battleOpponentDefenseCooldown||e.battleDraw||e.battleWin?null:(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["Lost (-",Aq.byDecimals(e.prizeRaw_bn,this.props.tokenRewardInfo.decimals)/(e.playerIsAttacker?2:1)," ",this.props.tokenRewardInfo.symbol,")"]}),(0,iN.jsx)("button",{className:"battleHistory_btn float-end",onClick:()=>this.props.playAnimation(e.id),children:(0,iN.jsx)("i",{className:"fa-solid fa-circle-play"})}),(0,iN.jsx)("button",{className:"battleHistory_btn float-end",onClick:()=>this.viewBattleDetails(e),children:(0,iN.jsx)("i",{className:"fa-solid fa-eye"})})]})})})})}async viewBattleDetails(e){let t,n=e.playerIsAttacker?"Attack":"Defense",r=0,i=0,s=0;t=e.battleOpponentDefenseCooldown?"Opponent Protect":e.battleDraw?"Draw":e.battleWin?"Win":"Lost",e.battleDraw||e.battleOpponentDefenseCooldown?r=0:e.playerIsAttacker&&e.battleWin?r=Aq.byDecimals(e.prizeRaw_bn,this.props.tokenRewardInfo.decimals):!e.playerIsAttacker&&e.battleWin||e.playerIsAttacker&&!e.battleWin?r=Aq.byDecimals(e.prizeRaw_bn,this.props.tokenRewardInfo.decimals)/2:e.playerIsAttacker||e.battleWin||(r=Aq.byDecimals(e.prizeRaw_bn,this.props.tokenRewardInfo.decimals)),i=e.prizeMinusPerc,s=r-i*r/100,s<0&&(s=0),window.Swal.fire({title:"Battle #"+e.id+" Details",customClass:{htmlContainer:"battleDetailsHtmlContainer"},showCancelButton:!0,confirmButtonText:"View Opponent Details",cancelButtonText:"Close",html:`\n <ul>\n <li><span>Battle Date:</span> <strong>${e.date}</strong></li>\n <li><span>Battle Type:</span> <strong>${n}</strong></li>\n <li><span>Opponent:</span> <strong>#${e.opponent}</strong></li>\n <li><span>Battle Stage:</span> <strong>${u2.transform(e.stage)}</strong></li>\n ${e.battleWin||e.battleDraw||e.battleOpponentDefenseCooldown?"<li><span>Fee:</span> <strong>"+i+"%</strong></li>":""}\n <li><span>Result:</span> <strong>${t} | ${e.battleWin||e.battleDraw||e.battleOpponentDefenseCooldown?"+"+s:"-"+r}
9688 ${this.props.tokenRewardInfo.symbol}</strong></li>\n <li><span>Final Attack Power:</span> <strong>${e.finalAttackPower} pts</strong></li>\n <li><span>Final Defense Power:</span> <strong>${e.finalDefencePower} pts</strong></li>\n <li><span>Luck Activated:</span> <strong>${e.luckyActive?"Yes":"No"}</strong></li>\n <li><span>Battle seed:</span> <strong>${e.seed}</strong></li>\n </ul>\n `}).then((t=>{t.isConfirmed?this.props.navigate("/worm/"+e.opponent):t.isDenied}))}}const h2=Oq(d2);class p2 extends c.Component{constructor(e){super(e);this.state={...(()=>({initialRender:this.battleComps(),resetOnSkip:!1}))()},window.BattleAnimationComponent=this}UNSAFE_componentWillMount(){}battleComps(){return(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"battleAnimationWrapper",id:"battleAnimationWrapper",children:(0,iN.jsxs)("div",{id:"battleAnimationContainer",children:[(0,iN.jsx)("div",{id:"battleAnimationContainer_bg"}),(0,iN.jsx)("div",{id:"battleAnimationSubContainer",children:(0,iN.jsxs)("div",{id:"battleAnim_animArea",children:[(0,iN.jsx)("img",{src:"/assets/img/nft_banner_bg/1_f.png",id:"battleAnim_land"}),(0,iN.jsx)("div",{id:"battleAnim_worm1",children:(0,iN.jsxs)("div",{className:"battleAnim_wormContainer",children:[(0,iN.jsx)("img",{id:"worm1_slime",className:"battleAnim_worm_part worm_part_Slime",src:this.props.layersDATA.img+"Slime/"+encodeURIComponent(this.props.userNftPartsData.Slime.src)}),(0,iN.jsx)("img",{id:"worm1_tail",className:"battleAnim_worm_part worm_part_Tail",src:this.props.layersDATA.img+"Tail/"+encodeURIComponent(this.props.userNftPartsData.Tail.src)}),(0,iN.jsx)("img",{id:"worm1_wings",className:"battleAnim_worm_part worm_part_Wings",src:this.props.layersDATA.img+"Wings/"+encodeURIComponent(this.props.userNftPartsData.Wings.src)}),(0,iN.jsx)("img",{id:"worm1_body",className:"battleAnim_worm_part worm_part_Body",src:this.props.layersDATA.img+"Body/"+encodeURIComponent(this.props.userNftPartsData.Body.src)}),(0,iN.jsx)("img",{id:"worm1_ears",className:"battleAnim_worm_part worm_part_Ears",src:this.props.layersDATA.img+"Ears/"+encodeURIComponent(this.props.userNftPartsData.Ears.src)}),(0,iN.jsx)("img",{id:"worm1_eyes",className:"battleAnim_worm_part worm_part_Eyes",src:this.props.layersDATA.img+"Eyes/"+encodeURIComponent(this.props.userNftPartsData.Eyes.src)}),(0,iN.jsx)("img",{id:"worm1_mouth",className:"battleAnim_worm_part worm_part_Mouth",src:this.props.layersDATA.img+"Mouth/"+encodeURIComponent(this.props.userNftPartsData.Mouth.src)}),(0,iN.jsx)("img",{src:"/assets/img/battle_eff/hit2.png",id:"battleAnim_hitWorm1"}),(0,iN.jsx)("img",{src:"/assets/img/battle_eff/shield1.png",id:"battleAnim_shieldWorm1"}),(0,iN.jsx)("img",{src:"/assets/img/battle_eff/luck1.png",id:"battleAnim_luckWorm1"})]})}),(0,iN.jsx)("div",{id:"battleAnim_worm2",children:(0,iN.jsxs)("div",{className:"battleAnim_wormContainer",children:[(0,iN.jsx)("img",{id:"worm2_slime",className:"battleAnim_worm_part worm_part_Slime",src:this.props.layersDATA.img+"Slime/"+encodeURIComponent(this.props.userNftPartsData.Slime.src)}),(0,iN.jsx)("img",{id:"worm2_tail",className:"battleAnim_worm_part worm_part_Tail",src:this.props.layersDATA.img+"Tail/"+encodeURIComponent(this.props.userNftPartsData.Tail.src)}),(0,iN.jsx)("img",{id:"worm2_wings",className:"battleAnim_worm_part worm_part_Wings",src:this.props.layersDATA.img+"Wings/"+encodeURIComponent(this.props.userNftPartsData.Wings.src)}),(0,iN.jsx)("img",{id:"worm2_body",className:"battleAnim_worm_part worm_part_Body",src:this.props.layersDATA.img+"Body/"+encodeURIComponent(this.props.userNftPartsData.Body.src)}),(0,iN.jsx)("img",{id:"worm2_ears",className:"battleAnim_worm_part worm_part_Ears",src:this.props.layersDATA.img+"Ears/"+encodeURIComponent(this.props.userNftPartsData.Ears.src)}),(0,iN.jsx)("img",{id:"worm2_eyes",className:"battleAnim_worm_part worm_part_Eyes",src:this.props.layersDATA.img+"Eyes/"+encodeURIComponent(this.props.userNftPartsData.Eyes.src)}),(0,iN.jsx)("img",{id:"worm2_mouth",className:"battleAnim_worm_part worm_part_Mouth",src:this.props.layersDATA.img+"Mouth/"+encodeURIComponent(this.props.userNftPartsData.Mouth.src)}),(0,iN.jsx)("img",{src:"/assets/img/battle_eff/hit2.png",id:"battleAnim_hitWorm2"}),(0,iN.jsx)("img",{src:"/assets/img/battle_eff/shield1.png",id:"battleAnim_shieldWorm2"}),(0,iN.jsx)("img",{src:"/assets/img/battle_eff/luck1.png",id:"battleAnim_luckWorm2"})]})}),(0,iN.jsx)("span",{className:"battleAnimHitPoints",id:"battleAnim_pointsAtt_worm2",children:"0"}),(0,iN.jsx)("span",{className:"battleAnimHitPoints",id:"battleAnim_pointsAtt_worm1",children:"0"}),(0,iN.jsx)("span",{className:"battleAnimHitPoints",id:"battleAnim_pointsDef_worm2",children:"0"}),(0,iN.jsx)("span",{className:"battleAnimHitPoints",id:"battleAnim_pointsDef_worm1",children:"0"}),(0,iN.jsx)("img",{className:"battleAnimResultEl",src:"/assets/img/battle_eff/win.png",id:"battleAnim_win"}),(0,iN.jsx)("img",{className:"battleAnimResultEl",src:"/assets/img/battle_eff/defeat.png",id:"battleAnim_defeat"}),(0,iN.jsx)("img",{className:"battleAnimResultEl",src:"/assets/img/battle_eff/draw.png",id:"battleAnim_draw"})]})}),(0,iN.jsx)("button",{id:"battleAnim_skip",onClick:()=>
9688this.skipBattleAnimationBattle(),children:"SKIP"})]})})})}render(){return(0,iN.jsx)(iN.Fragment,{children:this.state.initialRender})}async setResetOnSkip(e){this.setState({...this.state,resetOnSkip:e})}async skipBattleAnimationBattle(){await this.battleAnimReset(),this.state.resetOnSkip&&await this.props.reloadInfoRequest()}async battleAnimReset(){this.setState({...this.state,initialRender:null},(()=>{this.setState({...this.state,initialRender:this.battleComps()})}))}async sleep(e){return new Promise((t=>setTimeout(t,e)))}async autoFinishBattleAnimation(e){await this.sleep(5e3),e.battleAnimationContainer.style.opacity="0%",await this.sleep(400),await this.battleAnimReset()}async loadElements(){return{battleAnimationContainer:document.getElementById("battleAnimationContainer"),battleAnimationContainer_bg:document.getElementById("battleAnimationContainer_bg"),battleAnim_land:document.getElementById("battleAnim_land"),battleAnim_win:document.getElementById("battleAnim_win"),battleAnim_defeat:document.getElementById("battleAnim_defeat"),battleAnim_draw:document.getElementById("battleAnim_draw"),battleAnim_pointsAtt_worm1:document.getElementById("battleAnim_pointsAtt_worm1"),battleAnim_pointsDef_worm1:document.getElementById("battleAnim_pointsDef_worm1"),battleAnim_pointsAtt_worm2:document.getElementById("battleAnim_pointsAtt_worm2"),battleAnim_pointsDef_worm2:document.getElementById("battleAnim_pointsDef_worm2"),battleAnim_worm1:document.getElementById("battleAnim_worm1"),worm1_slime:document.getElementById("worm1_slime"),worm1_tail:document.getElementById("worm1_tail"),worm1_wings:document.getElementById("worm1_wings"),worm1_body:document.getElementById("worm1_body"),worm1_ears:document.getElementById("worm1_ears"),worm1_eyes:document.getElementById("worm1_eyes"),worm1_mouth:document.getElementById("worm1_mouth"),battleAnim_hitWorm1:document.getElementById("battleAnim_hitWorm1"),battleAnim_shieldWorm1:document.getElementById("battleAnim_shieldWorm1"),battleAnim_luckWorm1:document.getElementById("battleAnim_luckWorm1"),battleAnim_worm2:document.getElementById("battleAnim_worm2"),worm2_slime:document.getElementById("worm2_slime"),worm2_tail:document.getElementById("worm2_tail"),worm2_wings:document.getElementById("worm2_wings"),worm2_body:document.getElementById("worm2_body"),worm2_ears:document.getElementById("worm2_ears"),worm2_eyes:document.getElementById("worm2_eyes"),worm2_mouth:document.getElementById("worm2_mouth"),battleAnim_hitWorm2:document.getElementById("battleAnim_hitWorm2"),battleAnim_shieldWorm2:document.getElementById("battleAnim_shieldWorm2"),battleAnim_luckWorm2:document.getElementById("battleAnim_luckWorm2")}}async setSources(e,t){e.battleAnim_land.src="/assets/img/nft_banner_bg/"+t.stage+"_f.png",e.worm2_slime.src=this.props.layersDATA.img+"Slime/"+encodeURIComponent(t.oponentData.userNftPartsData.Slime.src),e.worm2_tail.src=this.props.layersDATA.img+"Tail/"+encodeURIComponent(t.oponentData.userNftPartsData.Tail.src),e.worm2_wings.src=this.props.layersDATA.img+"Wings/"+encodeURIComponent(t.oponentData.userNftPartsData.Wings.src),e.worm2_body.src=this.props.layersDATA.img+"Body/"+encodeURIComponent(t.oponentData.userNftPartsData.Body.src),e.worm2_ears.src=this.props.layersDATA.img+"Ears/"+encodeURIComponent(t.oponentData.userNftPartsData.Ears.src),e.worm2_eyes.src=this.props.layersDATA.img+"Eyes/"+encodeURIComponent(t.oponentData.userNftPartsData.Eyes.src),e.worm2_mouth.src=this.props.layersDATA.img+"Mouth/"+encodeURIComponent(t.oponentData.userNftPartsData.Mouth.src);let n=t.playerIsAttacker?t.finalAttackPower:t.finalDefencePower,r=t.playerIsAttacker?t.finalDefencePower:t.finalAttackPower;e.battleAnim_pointsAtt_worm1.innerHTML=n,e.battleAnim_pointsDef_worm1.innerHTML=n,e.battleAnim_pointsAtt_worm2.innerHTML=r,e.battleAnim_pointsDef_worm2.innerHTML=r}async setUpArena(e){e.battleAnimationContainer.style.display="block",await this.sleep(200),e.battleAnimationContainer_bg.style.opacity="80%",await this.sleep(500),e.battleAnim_land.style.opacity="100%",await this.sleep(200),e.battleAnim_worm1.style.opacity="100%",e.battleAnim_worm1.style.filter="blur(0px)",e.battleAnim_worm2.style.opacity="100%",e.battleAnim_worm2.style.filter="blur(0px)",await this.sleep(200)}async worm1Attack(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.worm1_tail.style.translate="-20px",e.worm1_wings.style.translate="-20px",e.worm1_body.style.translate="-20px",e.worm1_ears.style.translate="-20px",e.worm1_eyes.style.translate="-20px",e.worm1_mouth.style.translate="-20px",e.battleAnim_hitWorm2.style.opacity="100%",e.battleAnim_hitWorm2.style.rotate="30deg",e.battleAnim_hitWorm2.style.scale="1.5",e.worm2_tail.style.translate="20px",e.worm2_wings.style.translate="20px",e.worm2_body.style.translate="20px",e.worm2_ears.style.translate="20px",e.worm2_eyes.style.translate="20px",e.worm2_mouth.style.translate="20px",t&&(e.battleAnim_pointsAtt_worm1.style.opacity="100%",e.battleAnim_pointsDef_worm2.style.opacity="100%"),await this.sleep(400),e.battleAnim_hitWorm2.style.scale="1.8",e.battleAnim_hitWorm2.style.rotate="60deg",e.battleAnim_hitWorm2.style.opacity="0%",e.battleAnim_hitWorm2.style.filter="blur(10px)",e.worm1_tail.style.translate="0px",e.worm1_wings.style.translate="0px",e.worm1_body.style.translate="0px",e.worm1_ears.style.translate="0px",e.worm1_eyes.style.translate="0px",e.worm1_mouth.style.translate="0px",await this.sleep(200),e.worm2_tail.style.translate="0px",e.worm2_wings.style.translate="0px",e.worm2_body.style.translate="0px",e.worm2_ears.style.translate="0px",e.worm2_eyes.style.translate="0px",e.worm2_mouth.style.translate="0px",await this.sleep(200),e.battleAnim_hitWorm2.style.scale="0.8",e.battleAnim_hitWorm2.style.rotate="0deg",e.battleAnim_hitWorm2.style.filter="blur(0px)"}async worm2Attack(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.worm2_tail.style.translate="-20px",e.worm2_wings.style.translate="-20px",e.worm2_body.style.translate="-20px",e.worm2_ears.style.translate="-20px",e.worm2_eyes.style.translate="-20px",e.worm2_mouth.style.translate="-20px",e.battleAnim_hitWorm1.style.opacity="100%",e.battleAnim_hitWorm1.style.rotate="30deg",e.battleAnim_hitWorm1.style.scale="1.5",e.worm1_tail.style.translate="20px",e.worm1_wings.style.translate="20px",e.worm1_body.style.translate="20px",e.worm1_ears.style.translate="20px",e.worm1_eyes.style.translate="20px",e.worm1_mouth.style.translate="20px",t&&(e.battleAnim_pointsAtt_worm2.style.opacity="100%",e.battleAnim_pointsDef_worm1.style.opacity="100%"),await this.sleep(400),e.battleAnim_hitWorm1.style.scale="1.8",e.battleAnim_hitWorm1.style.rotate="60deg",e.battleAnim_hitWorm1.style.opacity="0%",e.battleAnim_hitWorm1.style.filter="blur(10px)",e.worm2_tail.style.translate="0px",e.worm2_wings.style.translate="0px",e.worm2_body.style.translate="0px",e.worm2_ears.style.translate="0px",e.worm2_eyes.style.translate="0px",e.worm2_mouth.style.translate="0px",await this.sleep(200),e.worm1_tail.style.translate="0px",e.worm1_wings.style.translate="0px",e.worm1_body.style.translate="0px",e.worm1_ears.style.translate="0px",e.worm1_eyes.style.translate="0px",e.worm1_mouth.style.translate="0px",await this.sleep(200),e.battleAnim_hitWorm1.style.scale="0.8",e.battleAnim_hitWorm1.style.rotate="0deg",e.battleAnim_hitWorm1.style.filter="blur(0px)"}async worm1Defense(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.worm2_tail.style.translate="-20px",e.worm2_wings.style.translate="-20px",e.worm2_body.style.translate="-20px",e.worm2_ears.style.translate="-20px",e.worm2_eyes.style.translate="-20px",e.worm2_mouth.style.translate="-20px",e.battleAnim_shieldWorm1.style.opacity="100%",e.battleAnim_shieldWorm1.style.scale="1.2",t&&(e.battleAnim_pointsAtt_worm2.style.opacity="100%",e.battleAnim_pointsDef_worm1.style.opacity="100%"),await this.sleep(500),e.battleAnim_shieldWorm1.style.opacity="0%",e.battleAnim_shieldWorm1.style.top="20px",e.battleAnim_shieldWorm1.style.scale="1",e.battleAnim_shieldWorm1.style.rotate="30deg",e.worm2_tail.style.translate="0px",e.worm2_wings.style.translate="0px",e.worm2_body.style.translate="0px",e.worm2_ears.style.translate="0px",e.worm2_eyes.style.translate="0px",e.worm2_mouth.style.translate="0px",await this.sleep(200),e.battleAnim_shieldWorm1.style.top="70px",e.battleAnim_shieldWorm1.style.rotate="0deg"}async worm2Defense(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.worm1_tail.style.translate="-20px",e.worm1_wings.style.translate="-20px",e.worm1_body.style.translate="-20px",e.worm1_ears.style.translate="-20px",e.worm1_eyes.style.translate="-20px",e.worm1_mouth.style.translate="-20px",e.battleAnim_shieldWorm2.style.opacity="100%",e.battleAnim_shieldWorm2.style.scale="1.2",t&&(e.battleAnim_pointsAtt_worm1.style.opacity="100%",e.battleAnim_pointsDef_worm2.style.opacity="100%"),await this.sleep(500),e.battleAnim_shieldWorm2.style.opacity="0%",e.battleAnim_shieldWorm2.style.top="20px",e.battleAnim_shieldWorm2.style.scale="1",e.battleAnim_shieldWorm2.style.rotate="30deg",e.worm1_tail.style.translate="0px",e.worm1_wings.style.translate="0px",e.worm1_body.style.translate="0px",e.worm1_ears.style.translate="0px",e.worm1_eyes.style.translate="0px",e.worm1_mouth.style.translate="0px",await this.sleep(200),e.battleAnim_shieldWorm2.style.top="70px",e.battleAnim_shieldWorm2.style.rotate="0deg"}async worm1Luck(e){e.battleAnim_luckWorm1.style.opacity="100%",e.battleAnim_luckWorm1.style.scale="1.2",await this.sleep(500),e.battleAnim_luckWorm1.style.opacity="0%",e.battleAnim_luckWorm1.style.top="20px",e.battleAnim_luckWorm1.style.scale="1",e.battleAnim_luckWorm1.style.rotate="30deg",await this.sleep(200),e.battleAnim_luckWorm1.style.top="70px",e.battleAnim_luckWorm1.style.rotate="0deg"}async worm2Luck(e){e.battleAnim_luckWorm2.style.opacity="100%",e.battleAnim_luckWorm2.style.scale="1.2",await this.sleep(500),e.battleAnim_luckWorm2.style.opacity="0%",e.battleAnim_luckWorm2.style.top="20px",e.battleAnim_luckWorm2.style.scale="1",e.battleAnim_luckWorm2.style.rotate="30deg",await this.sleep(200),e.battleAnim_luckWorm2.style.top="70px",e.battleAnim_luckWorm2.style.rotate="0deg"}async worm1Defeat(e){e.battleAnim_worm1.style.filter="grayscale(1)",await this.sleep(500),e.battleAnim_worm1.style.opacity="0%",await this.sleep(200),e.battleAnim_defeat.style.opacity="100%",await this.sleep(200)}async worm2Defeat(e){e.battleAnim_worm2.style.filter="grayscale(1)",await this.sleep(500),e.battleAnim_worm2.style.opacity="0%",await this.sleep(200),e.battleAnim_win.style.opacity="100%"}async battleDraw(e){e.battleAnim_draw.style.opacity="100%"}async testAnimation(){const e=await this.loadElements();await this.setSources(e),await this.setUpArena(e),await this.worm1Attack(e),await this.worm2Defense(e),await this.worm1Attack(e),await this.worm2Defeat(e)}}const f2=p2;class m2 extends c.Component{constructor(e){super(e);this.state={error:null,isLoading:!0,initConnSync:!1,connStatus:{isConnected:!1,chainId:null,
9688selectedNetworkId:null,address:null},isLoadingNftInfo:!0,gameManager:null,userNftsData:{},nftData:{},layersData:null,nftJsonMetadata:null,show_upLevel:!1,show_buyLevel:!1,show_buyDefenceCooldown:!1,arenaData:null,arenaSelectedIndex:null}}componentDidUpdate(e){this.props.params.arenaId!==e.params.arenaId&&this.state.connStatus.isConnected&&null!=this.state.connStatus.chainId&&this.loadData()}get chainId(){return this.state.connStatus.chainId}get explorerUrl(){return aN(this.chainId).explorerAddress}connStatusChanged(e){this.setState({...this.state,connStatus:e},(()=>{this.state.connStatus.isConnected&&null!=this.state.connStatus.chainId&&this.loadData()}))}async loadGameManager(e){return await zq.getGameService().getGameManager(e)}async loadData(){if(!this.props.params.arenaId)return void this.setState({...this.state,error:!0,isLoading:!1});let e=!1;for(let t=0;t<wN[this.chainId].length;t++)if(wN[this.chainId][t].urlName==this.props.params.arenaId.toLowerCase()){e=wN[this.chainId][t].index;break}!1!==e?this.setState({...this.state,error:null,isLoading:!0,arenaSelectedIndex:e},(()=>{this.loadGameManager(parseInt(e)).then((e=>{this.setState({...this.state,gameManager:e},(()=>{e.loadAllLayersData().then((t=>{t?this.setState({...this.state,layersData:t},(()=>{e.loadWalletNFTsIDs().then((n=>{n?this.setState({...this.state,userNftsData:n},(()=>{if(0!=n.userNftInArena){const r=parseInt(n.userNftInArena);e.loadNFTjsonMetadata(r).then((n=>{e.loadSingleNFTExtendedDataForArena(r,t).then((e=>{e?this.setState({...this.state,wormId:r,nftData:e,nftJsonMetadata:n,isLoading:!1,isLoadingNftInfo:!1}):this.setState({...this.state,error:!0,isLoading:!1})}))}))}else this.setState({...this.state,isLoading:!1})})):this.setState({...this.state,error:!0,isLoading:!1})}))})):this.setState({...this.state,error:!0,isLoading:!1})}))}))}))})):this.setState({...this.state,error:!0,isLoading:!1})}async reloadNftInfo(){this.setState({...this.state,error:null,isLoadingNftInfo:!0,show_upLevel:!1,show_buyLevel:!1,show_buyDefenceCooldown:!1},(()=>{this.state.gameManager.loadSingleNFTExtendedDataForArena(this.state.wormId,this.state.layersData).then((e=>{e?this.setState({...this.state,nftData:e,isLoadingNftInfo:!1}):this.setState({...this.state,error:!0})}))}))}renderNFTImg(){return(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"nftImageBanner",style:{backgroundImage:`url(/assets/img/nft_banner_bg/${this.state.nftData.userNftClass}.png)`},children:(0,iN.jsx)("div",{className:"nftImageBanner_wormContainer",children:(0,iN.jsxs)("div",{className:"nftImageBanner_wormImgContainer",children:[(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Slime",src:WN.img+"Slime/"+encodeURIComponent(this.state.nftData.userNftPartsData.Slime.src)}),(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Tail",src:WN.img+"Tail/"+encodeURIComponent(this.state.nftData.userNftPartsData.Tail.src)}),(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Wings",src:WN.img+"Wings/"+encodeURIComponent(this.state.nftData.userNftPartsData.Wings.src)}),(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Body",src:WN.img+"Body/"+encodeURIComponent(this.state.nftData.userNftPartsData.Body.src)}),(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Ears",src:WN.img+"Ears/"+encodeURIComponent(this.state.nftData.userNftPartsData.Ears.src)}),(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Eyes",src:WN.img+"Eyes/"+encodeURIComponent(this.state.nftData.userNftPartsData.Eyes.src)}),(0,iN.jsx)("img",{className:"nftImageBanner_img_part nftCard_img_Mouth",src:WN.img+"Mouth/"+encodeURIComponent(this.state.nftData.userNftPartsData.Mouth.src)})]})})})})}renderNFTDescription(){return this.state.isLoadingNftInfo?(0,iN.jsx)("div",{className:"card m-0 roundedCard glowBorderGreen",children:(0,iN.jsx)("div",{className:"card-body pt-4",children:(0,iN.jsx)("div",{className:"text-center my-3",children:(0,iN.jsx)("div",{className:"spinner-border text-softmint",role:"status",children:(0,iN.jsx)("span",{className:"visually-hidden",children:"Loading..."})})})})}):(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"card m-0 roundedCard glowBorderGreen",children:(0,iN.jsxs)("div",{className:"card-body pt-4",children:[(0,iN.jsxs)("h5",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-circle-info"})," Description"]}),(0,iN.jsxs)("div",{className:"grid_4_1",children:[(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"ID"}),(0,iN.jsx)("div",{children:(0,iN.jsxs)("span",{className:"badge bg-primary me-1",children:["#",this.state.wormId]})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"CLASS"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:qN.transform(this.state.nftData.userNftClass)})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"TOTAL POWAFORCE"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftTotalPower})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"RARITY"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.rarityName})})]})]}),(0,iN.jsx)("h6",{className:"mt-4",children:"Body Parts"}),(0,iN.jsxs)("div",{className:"grid_3_1 mt-4",children:[(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/body.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Body ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Body.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Body.name})})]})]}),(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/ears.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Ears ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Ears.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Ears.name})})]})]}),(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/eyes.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Eyes ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Eyes.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Eyes.name})})]})]})]}),(0,iN.jsxs)("div",{className:"grid_3_1 mt-4",children:[(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/mouth.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Mouth ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Mouth.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Mouth.name})})]})]}),(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/slime.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Slime ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Slime.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Slime.name})})]})]}),(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/wings.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Wings ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Wings.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Wings.name})})]})]})]}),(0,iN.jsx)("div",{className:"grid_3_1 mt-4",children:(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/tail.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Tail ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.nftData.userNftPartsData.Tail.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.userNftPartsData.Tail.name})})]})]})})]})})})}renderNFTStats(){return this.state.isLoadingNftInfo?(0,iN.jsx)("div",{className:"card m-0 mt-4 roundedCard glowBorderGreen",children:(0,iN.jsx)("div",{className:"card-body pt-4",children:(0,iN.jsx)("div",{className:"text-center my-3",children:(0,iN.jsx)("div",{className:"spinner-border text-softmint",role:"status",children:(0,iN.jsx)("span",{className:"visually-hidden",children:"Loading..."})})})})}):(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"card m-0 mt-4 roundedCard glowBorderGreen",children:(0,iN.jsxs)("div",{className:"card-body pt-4",children:[(0,iN.jsxs)("h5",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-square-poll-vertical"})," Statistics"]}),(0,iN.jsxs)("div",{className:"grid_4_1",children:[(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"PLAYING"}),(0,iN.jsxs)("div",{children:[this.state.nftData.isPlaying&&(0,iN.jsx)("span",{className:"badge bg-success me-1",children:"ACTIVE"}),!this.state.nftData.isPlaying&&(0,iN.jsx)("span",{className:"badge bg-danger me-1",children:"INACTIVE"})]})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"LEVEL"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.characterStats.level})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"TOTAL EXPERIENCE"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.characterStats.experienceTotal})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"LEVEL EXPERIENCE"}),(0,iN.jsx)("div",{children:(0,iN.jsxs)("span",{className:"badge bg-primary me-1",children:[this.state.nftData.characterStats.experienceInLevel," / ",this.state.nftData.characterStats.experienceForNextLevel]})})]})]}),(0,iN.jsx)("h6",{className:"mt-4",children:"Attributes"}),(0,iN.jsxs)("div",{className:"grid_4_1",children:[(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"ATTACK POWER"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.characterAttributes?parseInt(this.state.nftData.characterAttributes.attackPower):0})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"DEFENSE POWER"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.characterAttributes?parseInt(this.state.nftData.characterAttributes.defencePower):0})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"DEXTERITY POWER"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.characterAttributes?parseInt(this.state.nftData.characterAttributes.dexterity):0})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"LUCKY POWER"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.nftData.characterAttributes?parseInt(this.state.nftData.characterAttributes.lucky):0})})]})]}),(0,iN.jsxs)("h6",{className:"mt-4",children:["Battles - ",(0,iN.jsxs)("span",{className:"badge bg-primary textNormal me-1",children:["WIN RATIO: ",this.state.nftData.characterWinRate.toFixed(2),"%"]})]}),(0,iN.jsxs)("div",{className:"grid_4_1",children:[(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"ATTACK WINS"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-success me-1",children:this.state.nftData.characterStats.attackWins})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"ATTACK LOST"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-danger me-1",children:this.state.nftData.characterStats.attackLost})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"DEFENSE WINS"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-success me-1",children:this.state.nftData.characterStats.defenceWins})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"DEFENSE LOST"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-danger me-1",children:this.state.nftData.characterStats.defenceLost})})]})]})]})})})}renderNFTPlayerStatus(){return this.state.isLoadingNftInfo?(0,iN.jsx)("div",{className:"card m-0 roundedCard glowBorderGreen",children:(0,iN.jsx)("div",{className:"card-body pt-4",children:(0,iN.jsx)("div",{className:"text-center my-3",children:(0,iN.jsx)("div",{className:"spinner-border text-softmint",role:"status",children:(0,iN.jsx)("span",{className:"visually-hidden",children:"Loading..."})})})})}):(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"card m-0 roundedCard glowBorderGreen",children:(0,iN.jsxs)("div",{className:"card-body pt-4",children:[(0,iN.jsxs)("h5",{className:"text-center",children:[(0,iN.jsx)("i",{className:"fa-solid fa-circle-user"})," STATUS"]}),(0,iN.jsxs)("ul",{style:{fontSize:"1rem"},className:"list-group list-group-flush",children:[this.state.nftData.characterStats.attacksAvailable>0&&(0,iN.jsxs)("li",{className:"list-group-item d-flex",children:[(0,iN.jsx)("div",{className:"flex-fill",children:"Attacks Available"}),(0,iN.jsx)("div",{className:"flex-fill text-end text-softmint",children:this.state.nftData.characterStats.attacksAvailable})]}),this.state.nftData.characterStats.attacksAvailable<=0&&this.state.nftData.characterStats.attackTimestampCooldown<=Math.floor((new Date).getTime()/1e3)&&(0,iN.jsxs)("li",{className:"list-group-item d-flex",children:[(0,iN.jsx)("div",{className:"flex-fill",children:"Attacks Available"}),(0,iN.jsx)("div",{className:"flex-fill text-end text-softmint",children:this.state.nftData.attacksAvailableBeforeCooldown})]}),this.state.nftData.characterStats.attacksAvailable<=0&&this.state.nftData.characterStats.attackTimestampCooldown>Math.floor((new Date).getTime()/1e3)&&(0,iN.jsxs)("li",{className:"list-group-item d-flex",children:[(0,iN.jsx)("div",{className:"flex-fill",children:"Attack free recharge cooldown"}),(0,iN.jsx)("div",{className:"flex-fill text-end text-softmint",children:(0,iN.jsx)(Jq,{endDate:this.state.nftData.characterStats.attackTimestampCooldown})})]}),(0,iN.jsxs)("li",{className:"list-group-item d-flex",children:[(0,iN.jsx)("div",{className:"flex-fill",children:"Arena Balance"}),(0,iN.jsxs)("div",{className:"flex-fill text-end text-softmint",children:[this.state.nftData.characterTokenBalanceNormal," ",this.state.nftData.token
9688RewardInfo.symbol]})]}),(0,iN.jsxs)("li",{className:"list-group-item d-flex",children:[(0,iN.jsx)("div",{className:"flex-fill",children:"Character Profit"}),(0,iN.jsxs)("div",{className:"flex-fill text-end text-softmint",children:[this.state.nftData.characterTokenProfit," ",this.state.nftData.tokenRewardInfo.symbol]})]}),(0,iN.jsxs)("li",{className:"list-group-item d-flex",children:[(0,iN.jsx)("div",{className:"flex-fill",children:"Character lock time"}),(0,iN.jsxs)("div",{className:"flex-fill text-end text-softmint",children:[this.state.nftData.minLockTimeForCharacter>Math.floor((new Date).getTime()/1e3)&&(0,iN.jsx)(Jq,{endDate:this.state.nftData.minLockTimeForCharacter}),this.state.nftData.minLockTimeForCharacter<=Math.floor((new Date).getTime()/1e3)&&(0,iN.jsx)("span",{className:"badge bg-success",children:"UNLOCKED"})]})]}),(0,iN.jsxs)("li",{className:"list-group-item d-flex",children:[(0,iN.jsx)("div",{className:"flex-fill",children:"Defense Cooldown"}),(0,iN.jsxs)("div",{className:"flex-fill text-end text-softmint",children:[this.state.nftData.characterStats.defenceTimestampCooldown>Math.floor((new Date).getTime()/1e3)&&(0,iN.jsx)(Jq,{endDate:this.state.nftData.characterStats.defenceTimestampCooldown}),this.state.nftData.characterStats.defenceTimestampCooldown<=Math.floor((new Date).getTime()/1e3)&&(0,iN.jsx)("span",{className:"badge bg-danger",children:"OPEN"})]})]})]})]})})})}renderNFTPlayerArena(){return this.state.isLoadingNftInfo?(0,iN.jsx)("div",{className:"card m-0 mt-4 roundedCard glowBorderGreen",children:(0,iN.jsx)("div",{className:"card-body pt-4",children:(0,iN.jsx)("div",{className:"text-center my-3",children:(0,iN.jsx)("div",{className:"spinner-border text-softmint",role:"status",children:(0,iN.jsx)("span",{className:"visually-hidden",children:"Loading..."})})})})}):(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"card m-0 mt-4 roundedCard glowBorderGreen",children:(0,iN.jsxs)("div",{className:"card-body pt-4",children:[(0,iN.jsxs)("h5",{className:"text-center",children:[(0,iN.jsx)("i",{className:"fa-solid fa-fire"})," ARENA STATS"]}),(0,iN.jsx)("div",{className:"inArenaLogo",children:(0,iN.jsx)("img",{src:"/assets/img/arena_icon/"+this.chainId+"/"+wN[this.chainId][this.state.arenaSelectedIndex].id+".png"})}),(0,iN.jsxs)("ul",{style:{fontSize:"1rem"},className:"list-group list-group-flush",children:[(0,iN.jsxs)("li",{className:"list-group-item d-flex",children:[(0,iN.jsx)("div",{className:"flex-fill",children:"Name"}),(0,iN.jsx)("div",{className:"flex-fill text-end text-softmint",children:wN[this.chainId][this.state.arenaSelectedIndex].name})]}),(0,iN.jsxs)("li",{className:"list-group-item d-flex",children:[(0,iN.jsx)("div",{className:"flex-fill",children:"Players Active"}),(0,iN.jsx)("div",{className:"flex-fill text-end text-softmint",children:this.state.nftData.playersLength})]}),(0,iN.jsxs)("li",{className:"list-group-item d-flex",children:[(0,iN.jsx)("div",{className:"flex-fill",children:"Registered"}),(0,iN.jsx)("div",{className:"flex-fill text-end text-softmint",children:this.state.nftData.playerRegistered})]})]})]})})})}renderNFTPlayerActions(){return this.state.isLoadingNftInfo?(0,iN.jsx)("div",{className:"card m-0 mt-4 roundedCard glowBorderGreen",children:(0,iN.jsx)("div",{className:"card-body pt-4",children:(0,iN.jsx)("div",{className:"text-center my-3",children:(0,iN.jsx)("div",{className:"spinner-border text-softmint",role:"status",children:(0,iN.jsx)("span",{className:"visually-hidden",children:"Loading..."})})})})}):(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"card m-0 mt-4 roundedCard glowBorderGreen",children:(0,iN.jsxs)("div",{className:"card-body pt-4",children:[(0,iN.jsxs)("h5",{className:"text-center",children:[(0,iN.jsx)("i",{className:"fa-solid fa-circle-check"})," ARENA ACTIONS"]}),(0,iN.jsxs)("div",{className:"d-grid gap-4 mt-3",children:[(0,iN.jsx)("button",{disabled:this.state.nftData.playersLength<=1||0==this.state.nftData.characterStats.attacksAvailable&&this.state.nftData.characterStats.attackTimestampCooldown>Math.floor((new Date).getTime()/1e3),onClick:()=>this.battle(),className:"neonBtn nbtn2",children:"Battle!"}),this.state.nftData.minLockTimeForCharacter>Math.floor((new Date).getTime()/1e3)&&(0,iN.jsxs)("button",{disabled:!0,className:"neonBtn",children:["Recover NFT and funds - ",(0,iN.jsx)(Jq,{endDate:this.state.nftData.minLockTimeForCharacter})]}),this.state.nftData.minLockTimeForCharacter<=Math.floor((new Date).getTime()/1e3)&&(0,iN.jsx)("button",{onClick:()=>this.claimNFTandRewards(),className:"neonBtn",children:"Recover NFT and funds"}),this.state.nftData.amountToRechargeArenaBalance<=0&&(0,iN.jsx)("button",{disabled:!0,className:"neonBtn",children:"Recharge Arena Balance"}),this.state.nftData.amountToRechargeArenaBalance>0&&(0,iN.jsx)("button",{onClick:()=>this.rechargeBalanceNFT(),className:"neonBtn",children:"Recharge Arena Balance"}),this.state.nftData.characterTokenProfit<=0&&(0,iN.jsx)("button",{disabled:!0,className:"neonBtn",children:"Claim Rewards"}),this.state.nftData.characterTokenProfit>0&&(0,iN.jsx)("button",{onClick:()=>this.claimOnlyRewards(),className:"neonBtn",children:"Claim Rewards"}),(this.state.nftData.characterStats.level>=this.state.nftData.maxLevel||this.state.nftData.characterStats.experienceInLevel<this.state.nftData.characterStats.experienceForNextLevel)&&(0,iN.jsxs)("button",{disabled:!0,className:"neonBtn",children:["Up level! - ",this.state.nftData.characterStats.experienceInLevel,"/",this.state.nftData.characterStats.experienceForNextLevel]}),this.state.nftData.characterStats.level<this.state.nftData.maxLevel&&this.state.nftData.characterStats.experienceInLevel>=this.state.nftData.characterStats.experienceForNextLevel&&(0,iN.jsx)("button",{onClick:()=>this.show_upLevel(),className:"neonBtn",children:"Up level!"}),this.state.show_upLevel?this.render_upLevel():null,this.state.nftData.characterBuyedLevels>
9688=this.state.nftData.maxAvailableLevelsToBuy&&(0,iN.jsxs)("button",{disabled:!0,className:"neonBtn",children:["Buy level! (",this.state.nftData.characterBuyedLevels,"/",this.state.nftData.maxAvailableLevelsToBuy,")"]}),this.state.nftData.characterBuyedLevels<this.state.nftData.maxAvailableLevelsToBuy&&(0,iN.jsxs)("button",{onClick:()=>this.show_buyLevel(),className:"neonBtn",children:["Buy level! ",this.state.nftData.characterBuyedLevels,"/",this.state.nftData.maxAvailableLevelsToBuy]}),this.state.show_buyLevel?this.render_buyLevel():null,this.state.nftData.characterStats.buyDefenseCooldownRecharge>Math.floor((new Date).getTime()/1e3)&&(0,iN.jsx)("button",{disabled:!0,className:"neonBtn",children:"Buy Defense Cooldown"}),this.state.nftData.characterStats.buyDefenseCooldownRecharge<=Math.floor((new Date).getTime()/1e3)&&(0,iN.jsx)("button",{onClick:()=>this.show_buyDefenceCooldown(),className:"neonBtn",children:"Buy Defense Cooldown"}),this.state.show_buyDefenceCooldown?this.render_buyDefenceCooldown():null,(this.state.nftData.characterStats.attacksAvailable>0||this.state.nftData.buyAttackRechargeCooldown>Math.floor((new Date).getTime()/1e3))&&(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsxs)("button",{disabled:!0,className:"neonBtn",children:["Buy Attack recharge",this.state.nftData.buyAttackRechargeCooldown>Math.floor((new Date).getTime()/1e3)&&(0,iN.jsxs)(iN.Fragment,{children:[" - ",(0,iN.jsx)(Jq,{endDate:this.state.nftData.buyAttackRechargeCooldown})]})]})}),this.state.nftData.characterStats.attacksAvailable<=0&&this.state.nftData.buyAttackRechargeCooldown<=Math.floor((new Date).getTime()/1e3)&&(0,iN.jsx)("button",{onClick:()=>this.buyAttackRecharge(),className:"neonBtn",children:"Buy Attack recharge"})]})]})})})}renderArenaContent(){return(0,iN.jsxs)(iN.Fragment,{children:[(0,iN.jsx)("div",{className:"container",children:(0,iN.jsxs)("div",{className:"row",children:[(0,iN.jsxs)("div",{className:"col-12 col-md-8",children:[this.renderNFTImg(),this.renderNFTDescription(),this.renderNFTStats(),!this.state.isLoadingNftInfo&&(0,iN.jsx)(h2,{playAnimation:e=>this.battleAnimation(e),totalBattleCount:this.state.nftData.characterStats.totalBattleCount,tokenRewardInfo:this.state.nftData.tokenRewardInfo,gameManager:this.state.gameManager,nftID:this.state.wormId})]}),(0,iN.jsxs)("div",{className:"col-12 col-md-4",children:[this.renderNFTPlayerStatus(),this.renderNFTPlayerArena(),this.renderNFTPlayerActions()]})]})}),!this.state.isLoadingNftInfo&&(0,iN.jsx)(f2,{reloadInfoRequest:()=>this.reloadNftInfo(),layersDATA:WN,userNftPartsData:this.state.nftData.userNftPartsData})]})}async show_upLevel(){this.setState({...this.state,show_upLevel:!this.state.show_upLevel,show_buyLevel:!1,show_buyDefenceCooldown:!1})}async show_buyLevel(){this.setState({...this.state,show_buyLevel:!this.state.show_buyLevel,show_upLevel:!1,show_buyDefenceCooldown:!1})}async show_buyDefenceCooldown(){this.setState({...this.state,show_buyDefenceCooldown:!this.state.show_buyDefenceCooldown,show_upLevel:!1,show_buyLevel:!1})}render_upLevel(){return(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"col-12 col-md-12 mb-3",children:(0,iN.jsx)("div",{className:"card m-0 pt-4",children:(0,iN.jsxs)("div",{className:"card-body",children:[(0,iN.jsx)("h6",{children:"Select attribute to improve:"}),(0,iN.jsxs)("select",{className:"form-select",id:"select_upLevel",name:"select_upLevel",placeholder:"Check",children:[(0,iN.jsx)("option",{value:!1,className:"defaultOption",children:"Select attribute"}),(0,iN.jsx)("option",{value:1,children:"Attack Power"}),(0,iN.jsx)("option",{value:2,children:"Defense Power"}),(0,iN.jsx)("option",{value:3,children:"Dexterity"}),(0,iN.jsx)("option",{value:4,children:"Lucky"})]}),(0,iN.jsx)("div",{className:"d-grid gap-2",children:(0,iN.jsx)("button",{className:"btn btn-success mt-3",onClick:()=>this.upLevel(),children:"Apply"})})]})})})})}render_buyLevel(){return(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"col-12 col-md-12 mb-3",children:(0,iN.jsx)("div",{className:"card m-0 pt-4",children:(0,iN.jsxs)("div",{className:"card-body",children:[(0,iN.jsx)("h6",{children:"Select attribute to improve:"}),(0,iN.jsxs)("select",{className:"form-select",id:"select_buyLevel",name:"select_buyLevel",placeholder:"Check",children:[(0,iN.jsx)("option",{value:!1,className:"defaultOption",children:"Select attribute"}),(0,iN.jsx)("option",{value:1,children:"Attack Power"}),(0,iN.jsx)("option",{value:2,children:"Defense Power"}),(0,iN.jsx)("option",{value:3,children:"Dexterity"}),(0,iN.jsx)("option",{value:4,children:"Lucky"})]}),(0,iN.jsx)("div",{className:"d-grid gap-2",children:(0,iN.jsx)("button",{className:"btn btn-success mt-3",onClick:()=>this.buyLevel(),children:"Apply"})})]})})})})}render_buyDefenceCooldown(){return(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"col-12 col-md-12 mb-3",children:(0,iN.jsx)("div",{className:"card m-0 pt-4",children:(0,iN.jsxs)("div",{className:"card-body",children:[(0,iN.jsx)("h6",{children:"Number of days:"}),(0,iN.jsxs)("select",{className:"form-select",id:"select_buyDefenceCooldown",name:"select_buyDefenceCooldown",placeholder:"Check",children:[(0,iN.jsx)("option",{value:!1,className:"defaultOption",children:"Select quantity"}),(0,iN.jsx)("option",{value:1,children:"1 day"}),(0,iN.jsx)("option",{value:2,children:"2 days"}),(0,iN.jsx)("option",{value:3,children:"3 days"})]}),(0,iN.jsx)("div",{className:"d-grid gap-2",children:(0,iN.jsx)("button",{className:"btn btn-success mt-3",onClick:()=>this.buyDefenceCooldown(),children:"Apply"})})]})})})})}renderContent(){return this.state.error?(0,iN.jsxs)("div",{className:"alert alert-danger mt-2",children:[(0,iN.jsx)("i",{className:"fa fa-exclamation-triangle"})," An error occurred while loading the data. Please try again later."]}):this.state.isLoading?(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)(qq,{})}):0==this.state.userNftsData.userNftInArena?(0,iN.jsx)("div",{className:"d-flex align-items-center justify-content-center text-center",children:(0,iN.jsx)("div",{children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"mt-5",children:(0,iN.jsx)("img",{className:"",src:"/assets/img/arenadeco1.png",alt:"Join Arena",style:{maxWidth:"500px",width:"100%",filter:"saturate(1.2) drop-shadow(2px 4px 6px #000000ad)"}})}),(0,iN.jsxs)("div",{className:"mt-3",children:["You need to register a PowaWorms NFT in the Arena in order to play.",(0,iN.jsx)("br",{}),"Select a Worm in your inventory to begin your adventure!"]}),(0,iN.jsx)("div",{className:"mt-4",children:(0,iN.jsx)(Pe,{to:"/my",className:"neonBtn btn_line_anim",children:"Go to inventory"})})]})})}):(0,iN.jsx)("div",{className:"py-2",children:this.renderArenaContent()})}render(){return(0,iN.jsx)(NN,{children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)(MN,{forceCall:this.state.initConnSync,onChangedStatus:(e,t,n,r)=>this.connStatusChanged({isConnected:e,chainId:t,selectedNetworkId:n,address:r})}),this.state.connStatus.isConnected?this.renderContent():null]})})}async battleAnimation(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=await this.state.gameManager.battleHistoryFullInfo(this.state.wormId,e,this.state.layersD
9688ata);await window.BattleAnimationComponent.setResetOnSkip(t);const r=await window.BattleAnimationComponent.loadElements();await window.BattleAnimationComponent.setSources(r,n),await window.BattleAnimationComponent.setUpArena(r);const i=n.playerIsAttacker,s=n.result,o=n.luckyActive,a=parseInt(this.state.nftData.characterAttributes.lucky),c=parseInt(n.oponentData_attr.lucky);i&&1==s?(o?a>c?(await window.BattleAnimationComponent.worm2Attack(r,!1),await window.BattleAnimationComponent.worm1Luck(r),await window.BattleAnimationComponent.worm1Attack(r)):(await window.BattleAnimationComponent.worm2Luck(r),await window.BattleAnimationComponent.worm2Attack(r,!1),await window.BattleAnimationComponent.worm1Attack(r)):await window.BattleAnimationComponent.worm1Attack(r),await window.BattleAnimationComponent.worm2Defeat(r)):i||2!=s?i&&2==s?(o?a>c?(await window.BattleAnimationComponent.worm1Luck(r),await window.BattleAnimationComponent.worm1Attack(r,!1),await window.BattleAnimationComponent.worm2Attack(r)):(await window.BattleAnimationComponent.worm1Attack(r,!1),await window.BattleAnimationComponent.worm2Luck(r),await window.BattleAnimationComponent.worm2Attack(r)):(await window.BattleAnimationComponent.worm1Attack(r,!1),await window.BattleAnimationComponent.worm2Attack(r)),await window.BattleAnimationComponent.worm1Defeat(r)):i||1!=s?4==s?(i?await window.BattleAnimationComponent.worm2Defense(r,!1):await window.BattleAnimationComponent.worm1Defense(r,!1),await window.BattleAnimationComponent.battleDraw(r)):(await window.BattleAnimationComponent.worm1Attack(r,!1),await window.BattleAnimationComponent.worm2Attack(r,!1),await window.BattleAnimationComponent.battleDraw(r)):(o?a>c?(await window.BattleAnimationComponent.worm1Luck(r),await window.BattleAnimationComponent.worm1Attack(r,!1),await window.BattleAnimationComponent.worm2Defense(r),await window.BattleAnimationComponent.worm2Attack(r,!1)):(await window.BattleAnimationComponent.worm1Attack(r,!1),await window.BattleAnimationComponent.worm2Luck(r),await window.BattleAnimationComponent.worm2Defense(r),await window.BattleAnimationComponent.worm2Attack(r,!1)):await window.BattleAnimationComponent.worm2Attack(r),await window.BattleAnimationComponent.worm1Defeat(r)):(o?a>c?(await window.BattleAnimationComponent.worm2Attack(r,!1),await window.BattleAnimationComponent.worm1Luck(r),await window.BattleAnimationComponent.worm1Defense(r),await window.BattleAnimationComponent.worm1Attack(r,!1)):(await window.BattleAnimationComponent.worm2Luck(r),await window.BattleAnimationComponent.worm1Defense(r),await window.BattleAnimationComponent.worm1Attack(r,!1)):(await window.BattleAnimationComponent.worm1Defense(r),await window.BattleAnimationComponent.worm1Attack(r,!1)),await window.BattleAnimationComponent.worm2Defeat(r)),await window.BattleAnimationComponent.autoFinishBattleAnimation(r)}async battle(){const e=await this.state.gameManager.battle();if(e){const t=parseInt(e.logs[0].data);await this.battleAnimation(t,!0),await this.reloadNftInfo()}}async rechargeBalanceNFT(){await this.state.gameManager.rechargeBalanceNFT(this.state.wormId,this.state.nftData.amountToRechargeArenaBalance,this.state.nftData.amountToRechargeArenaBalance_str)&&await this.reloadNftInfo()}async claimNFTandRewards(){await this.state.gameManager.claimNFTandRewards(this.state.wormId)&&await this.loadData()}async claimOnlyRewards(){const e=Aq.toWei(this.state.nftData.characterTokenProfit,this.state.nftData.tokenRewardInfo.decimals),t=Aq.bigNumberToFixedString(e);await this.state.gameManager.claimOnlyRewards(t)&&await this.reloadNftInfo()}async upLevel(){const e=document.getElementById("select_upLevel").value;if(0==e)return void TN.showAlert("Select attribute to improve");await this.state.gameManager.upLevel(this.state.wormId,parseInt(e))&&await this.reloadNftInfo()}async buyLevel(){const e=document.getElementById("select_buyLevel").value;if(0==e)return void TN.showAlert("Select attribute to improve");await this.state.gameManager.buyLevel(this.state.wormId,parseInt(e),parseInt(this.state.nftData.characterStats.level))&&await this.reloadNftInfo()}async buyDefenceCooldown(){const e=document.getElementById("select_buyDefenceCooldown").value;if(0==e||0==e||e>5)return void TN.showAlert("Select days to buy");await this.state.gameManager.buyDefenceCooldown(this.state.wormId,parseInt(e))&&await this.reloadNftInfo()}async buyAttackRecharge(){await this.state.gameManager.buyAttackRecharge(this.state.wormId)&&await this.reloadNftInfo()}}const g2=function(e){return t=>(0,iN.jsx)(e,{...t,params:ie()})}(m2);class y2 extends c.Component{constructor(e){super(e);this.state={error:null,isLoading:!0,gameManager:null,minterData:{},layersData:null,newNftID:null,newNftBasicData:null,initConnSync:!1,refId:null,connStatus:{isConnected:!1,chainId:null,
9688selectedNetworkId:null,address:null}}}connStatusChanged(e){const t=localStorage.getItem("walletReferal")||null;this.setState({...this.state,connStatus:e,refId:t},(()=>{this.loadData()}))}async loadGameManager(e){return await zq.getGameService().getGameManager(e)}async loadData(){this.setState({...this.state,error:null,isLoading:!0},(()=>{this.loadGameManager(0).then((e=>{this.setState({...this.state,gameManager:e},(()=>{e.loadAllLayersData().then((t=>{t?this.setState({...this.state,layersData:t},(()=>{e.loadMinterData().then((e=>{e?this.setState({...this.state,minterData:e,isLoading:!1}):this.setState({...this.state,error:!0,isLoading:!1})}))})):this.setState({...this.state,error:!0,isLoading:!1})}))}))}))}))}async resetFields(){this.setState({...this.state,error:null,isLoading:!0,newNftID:null,newNftBasicData:null},(()=>{this.setState({...this.state,isLoading:!1})}))}renderNFTInfo(){return this.state.isLoading?(0,iN.jsx)(qq,{}):(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)("div",{className:"container",children:(0,iN.jsxs)("div",{className:"row",children:[(0,iN.jsxs)("div",{className:"col-12 col-md-7",children:[(0,iN.jsxs)("div",{className:"alert alert-info mt-2",children:[(0,iN.jsx)("i",{className:"fa-solid fa-sack-dollar"})," Want to earn passive rewards in ",aN(this.state.connStatus.chainId).symbol,"? Share your referral link with your friends, and for every mint they make, you'll automatically receive rewards."]}),(0,iN.jsx)("div",{className:"minter_base_col",children:(0,iN.jsxs)("div",{className:"minter_base",children:[(0,iN.jsxs)("div",{className:"incubator_anim",id:"incubator_anim_el",children:[(0,iN.jsx)("img",{src:"/assets/img/minter/incubator_base.png",id:"incubator_base"}),(0,iN.jsx)("img",{src:"/assets/img/minter/incubator_baby.png",id:"incubator_baby"}),(0,iN.jsxs)("div",{className:"incubator_bubble_container",children:[(0,iN.jsx)("div",{className:"bubble x1"}),(0,iN.jsx)("div",{className:"bubble x2"}),(0,iN.jsx)("div",{className:"bubble x3"}),(0,iN.jsx)("div",{className:"bubble x4"}),(0,iN.jsx)("div",{className:"bubble x5"}),(0,iN.jsx)("div",{className:"bubble x6"}),(0,iN.jsx)("div",{className:"bubble x7"}),(0,iN.jsx)("div",{className:"bubble x8"}),(0,iN.jsx)("div",{className:"bubble x9"}),(0,iN.jsx)("div",{className:"bubble x10"})]})]}),(0,iN.jsx)("div",{id:"incubator_anim_relspace"}),(0,iN.jsx)("div",{id:"incubator_anim_born"}),(0,iN.jsx)("div",{id:"bornAnim_worm1",children:(0,iN.jsxs)("div",{className:"bornAnim_wormContainer",children:[(0,iN.jsx)("img",{id:"worm1_slime",className:"bornAnim_worm_part worm_part_Slime",src:""}),(0,iN.jsx)("img",{id:"worm1_tail",className:"bornAnim_worm_part worm_part_Tail",src:""}),(0,iN.jsx)("img",{id:"worm1_wings",className:"bornAnim_worm_part worm_part_Wings",src:""}),(0,iN.jsx)("img",{id:"worm1_body",className:"bornAnim_worm_part worm_part_Body",src:""}),(0,iN.jsx)("img",{id:"worm1_ears",className:"bornAnim_worm_part worm_part_Ears",src:""}),(0,iN.jsx)("img",{id:"worm1_eyes",className:"bornAnim_worm_part worm_part_Eyes",src:""}),(0,iN.jsx)("img",{id:"worm1_mouth",className:"bornAnim_worm_part worm_part_Mouth",src:""})]})})]})})]}),(0,iN.jsx)("div",{className:"col-12 col-md-5",children:(0,iN.jsx)("div",{className:"card m-0 roundedCard glowBorderGreen",children:(0,iN.jsxs)("div",{className:"card-body pt-4",children:[null==this.state.newNftBasicData&&(0,iN.jsxs)(iN.Fragment,{children:[(0,iN.jsxs)("h2",{className:"minter_main_title",children:[(0,iN.jsx)("i",{className:"fa-solid fa-egg"})," Mint your Worm!"]}),(0,iN.jsxs)("div",{className:"minter_main_desc",children:["Bring a new worm to life and start competing against players from around the world!",(0,iN.jsx)("br",{}),(0,iN.jsx)("strong",{children:"Get legendary worms and fight to be the best in the league!"})]}),(0,iN.jsxs)("div",{className:"discountDeals",children:[(0,iN.jsx)("h4",{className:"minter_details_title mt-3",children:"Available Deals:"}),(0,iN.jsx)("div",{className:"minter_details_desc mb-2",children:"If you meet the following requirements you can get discounts to mint your NFTs."}),(0,iN.jsx)("div",{className:"discountDeals_list",children:this.state.minterData.tokenDiscountsMeta.map(((e,t)=>(0,iN.jsxs)("div",{className:e.tokenCompliance?"discountDeal_el discountDeal_el_ok":"discountDeal_el",children:[(0,iN.jsxs)("span",{className:"discountDeal_el_check",children:[e.tokenCompliance&&(0,iN.jsx)("span",{className:"bg-success",children:(0,iN.jsx)("i",{className:"fa-solid fa-check"})}),!e.tokenCompliance&&(0,iN.jsx)("span",{className:"bg-warning",children:(0,iN.jsx)("i",{className:"fa-solid fa-hourglass-half"})})]}),(0,iN.jsxs)("div",{className:"discountDeal_el_name",children:[(0,iN.jsx)("img",{src:"/assets/img/tokens_icons/"+e.token.tokenSymbol+".png"}),(0,iN.jsxs)("span",{children:[e.token.tokenSymbol," DEAL:"]})]}),(0,iN.jsxs)("div",{className:"discountDeal_el_eval",children:[(0,iN.jsx)("span",{className:"discountDeal_el_eval_balance",children:e.tokenBalance_NORMAL.toFixed(0)}),(0,iN.jsx)("span",{className:"discountDeal_el_eval_separator",children:" / "}),(0,iN.jsx)("span",{className:"discountDeal_el_eval_required",children:parseInt(e.discount.minTokensRequireINT).toFixed(0)})]}),(0,iN.jsxs)("span",{className:"discount_el_perc",children:[parseInt(e.discount.discountPercent),"% OFF!"]})]},t)))})]}),(0,iN.jsxs)("div",{className:"minter_baseData",children:[(0,iN.jsx)("h4",{className:"minter_details_title mt-4",children:"Total calculation:"}),(0,iN.jsxs)("div",{className:"minter_details_desc mb-1",children:["The price in ",aN(this.state.connStatus.chainId).symbol," to mint your NFT applying the best discount obtained."]}),(0,iN.jsx)("div",{className:"minter_baseData_list",children:(0,iN.jsxs)("ul",{style:{fontSize:"1rem"},className:"list-group list-group-flush",children:[(0,iN.jsx)("li",{className:"list-group-item",children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-fire"})," Base Price: ",this.state.minterData.baseCost," ",aN(this.state.connStatus.chainId).symbol]})}),(0,iN.jsx)("li",{className:"list-group-item",children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-fire"})," Best Discount: ",(0,iN.jsxs)("span",{className:"text-softmint",children:[this.state.minterData.userBestDiscount,"% OFF"]})]})}),(0,iN.jsx)("li",{className:"list-group-item",children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-fire"})," You will pay: ",(0,iN.jsxs)("span",{className:"text-info",children:[this.state.minterData.minCostForUser," ",aN(this.state.connStatus.chainId).symbol]})]})})]})})]}),(0,iN.jsx)("div",{className:"minter_buttons mt-4",children:(0,iN.jsx)("button",{onClick:()=>this.mintWorm(),className:"neonBtn btn_line_anim",children:"Mint a Worm"})})]}),null!=this.state.newNftBasicData&&(0,iN.jsxs)(iN.Fragment,{children:[(0,iN.jsxs)("h2",{className:"minter_main_title",children:[(0,iN.jsx)("i",{className:"fa-solid fa-worm"})," Worm #",this.state.newNftID," Created!"]}),(0,iN.jsx)("h4",{className:"minter_details_title mt-3",children:"Info:"}),(0,iN.jsxs)("div",{className:"grid_3_1 mt-4",children:[(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"Rarity:"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.newNftBasicData.rarityName})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"Class:"}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:qN.transform(this.state.newNftBasicData.userNftClass)})})]}),(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"text_module",children:"PowaForce:"}),(0,iN.jsx)("div",{children:(0,iN.jsxs)("span",{className:"badge bg-primary me-1",children:[this.state.newNftBasicData.userNftTotalPower," PF"]})})]})]}),(0,iN.jsx)("h4",{className:"minter_details_title mt-3",children:"Body Parts:"}),(0,iN.jsxs)("div",{className:"grid_3_1 mt-4",children:[(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/body.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Body ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.newNftBasicData.userNftPartsData.Body.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.newNftBasicData.userNftPartsData.Body.name})})]})]}),(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/ears.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Ears ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.newNftBasicData.userNftPartsData.Ears.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.newNftBasicData.userNftPartsData.Ears.name})})]})]}),(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/eyes.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Eyes ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.newNftBasicData.userNftPartsData.Eyes.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.newNftBasicData.userNftPartsData.Eyes.name})})]})]})]}),(0,iN.jsxs)("div",{className:"grid_3_1 mt-4",children:[(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/mouth.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Mouth ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.newNftBasicData.userNftPartsData.Mouth.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.newNftBasicData.userNftPartsData.Mouth.name})})]})]}),(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/slime.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Slime ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.newNftBasicData.userNftPartsData.Slime.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.newNftBasicData.userNftPartsData.Slime.name})})]})]}),(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/wings.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Wings ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.newNftBasicData.userNftPartsData.Wings.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.newNftBasicData.userNftPartsData.Wings.name})})]})]})]}),(0,iN.jsx)("div",{className:"grid_3_1 mt-4",children:(0,iN.jsxs)("div",{className:"grid_2_0",children:[(0,iN.jsx)("div",{children:(0,iN.jsx)("img",{className:"icon_module",src:"/assets/img/nft_part_icons/tail.png"})}),(0,iN.jsxs)("div",{children:[(0,iN.jsxs)("div",{className:"text_module",children:["Tail ",(0,iN.jsxs)("span",{className:"badge bg-danger me-1",children:["PF ",this.state.newNftBasicData.userNftPartsData.Tail.power]})]}),(0,iN.jsx)("div",{children:(0,iN.jsx)("span",{className:"badge bg-primary me-1",children:this.state.newNftBasicData.userNftPartsData.Tail.name})})]})]})}),(0,iN.jsx)("h4",{className:"minter_details_title mt-3",children:"Options:"}),(0,iN.jsx)("div",{className:"minter_buttons mt-4",children:(0,iN.jsxs)("div",{className:"d-grid gap-4 mt-3",children:[(0,iN.jsx)(Pe,{to:"/worm/"+this.state.newNftID,className:"neonBtn btn_line_anim",children:"View Worm Details"}),(0,iN.jsx)(Pe,{to:"/my",className:"neonBtn btn_line_anim",children:"Go to inventory"}),(0,iN.jsx)("button",{onClick:()=>this.resetFields(),className:"neonBtn btn_line_anim",children:"Mint another Worm"})]})})]})]})})})]})})})}renderContent(){return this.state.error?(0,iN.jsxs)("div",{className:"alert alert-danger mt-2",children:[(0,iN.jsx)("i",{className:"fa fa-exclamation-triangle"})," An error occurred while loading the data. Please try again later."]}):(0,iN.jsx)("div",{className:"py-2",children:this.renderNFTInfo()})}render(){return(0,iN.jsx)(NN,{children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)(MN,{forceCall:this.state.initConnSync,onChangedStatus:(e,t,n,r)=>this.connStatusChanged({isConnected:e,chainId:t,selectedNetworkId:n,address:r})}),this.state.connStatus.isConnected?this.renderContent():null]})})}async mintWorm(){window.scrollTo(0,0);let e=!1,t="0x0000000000000000000000000000000000000000";null!=this.state.refId&&this.state.refId!=this.state.connStatus.address&&(e=!0,t=this.state.refId);const n=await this.state.gameManager.mintWorm(e,t);if(n){const e=parseInt(n.events.BuyNFT.returnValues.tokenID);let t;try{window.showLoader("Getting data"),t=await this.state.gameManager.loadSingleNFTBasicData(e,this.state.layersD
9688ata)}catch(r){}finally{window.hideLoader(),t?this.setState({...this.state,newNftID:e,newNftBasicData:t},(()=>{this.bornAnimation(e,t)})):TN.toastWarning('Error getting NFT data, go to "My Powa Worms" to see your NFT.')}}}async sleep(e){return new Promise((t=>setTimeout(t,e)))}async bornAnimation(e,t){const n=await this.ba_loadElements(t);await this.ba_setSources(n,t),await this.ba_animate(n)}async ba_loadElements(e){return{incubator_anim_relspace:document.getElementById("incubator_anim_relspace"),incubator_anim_el:document.getElementById("incubator_anim_el"),incubator_baby:document.getElementById("incubator_baby"),incubator_anim_born:document.getElementById("incubator_anim_born"),bornAnim_worm1:document.getElementById("bornAnim_worm1"),worm1_slime:document.getElementById("worm1_slime"),worm1_tail:document.getElementById("worm1_tail"),worm1_wings:document.getElementById("worm1_wings"),worm1_body:document.getElementById("worm1_body"),worm1_ears:document.getElementById("worm1_ears"),worm1_eyes:document.getElementById("worm1_eyes"),worm1_mouth:document.getElementById("worm1_mouth")}}async ba_setSources(e,t){e.worm1_slime.src=WN.img+"Slime/"+encodeURIComponent(t.userNftPartsData.Slime.src),e.worm1_tail.src=WN.img+"Tail/"+encodeURIComponent(t.userNftPartsData.Tail.src),e.worm1_wings.src=WN.img+"Wings/"+encodeURIComponent(t.userNftPartsData.Wings.src),e.worm1_body.src=WN.img+"Body/"+encodeURIComponent(t.userNftPartsData.Body.src),e.worm1_ears.src=WN.img+"Ears/"+encodeURIComponent(t.userNftPartsData.Ears.src),e.worm1_eyes.src=WN.img+"Eyes/"+encodeURIComponent(t.userNftPartsData.Eyes.src),e.worm1_mouth.src=WN.img+"Mouth/"+encodeURIComponent(t.userNftPartsData.Mouth.src)}async ba_animate(e){e.incubator_baby.style.filter="brightness(100) blur(3px)",e.incubator_baby.style.zIndex="4",e.incubator_baby.style.animation="none",await this.sleep(300),e.incubator_anim_born.style.background="white",e.incubator_anim_born.style.transform="scale(1.5)",await this.sleep(300),e.incubator_anim_relspace.style.display="block",e.incubator_anim_el.style.display="none",e.bornAnim_worm1.style.opacity="100%",e.bornAnim_worm1.style.transform="scale(1.2)",await this.sleep(400),e.bornAnim_worm1.style.transform="scale(1)",e.bornAnim_worm1.style.filter="blur(0px)",e.incubator_anim_born.style.background="transparent",e.incubator_anim_born.style.transform="scale(1.5)",await this.sleep(200)}}const v2=y2;class w2 extends c.Component{constructor(e){super(e),this.state={pressed:!1}}copyToClipboard(e){TN.copyToClipboard(e),TN.toastSuccess("Copied to clipboard!"),this.setState({...this.state,pressed:!0},(()=>{setTimeout((()=>{this.setState({...this.state,pressed:!1})}),2e3)}))}render(){return this.props.buttonType?(0,iN.jsx)("a",{className:"text-white",onClick:()=>this.copyToClipboard(this.props.text),children:(0,iN.jsx)("button",{"data-bs-dismiss":"modal",type:"button",className:"btn btn-primary",children:(0,iN.jsx)("i",{className:this.state.pressed?"fa-solid fa-check":"fa-solid fa-copy"})})}):(0,iN.jsx)("a",{className:this.state.pressed?"text-success":"text-info",onClick:()=>this.copyToClipboard(this.props.text),children:(0,iN.jsx)("i",{className:this.state.pressed?"fa-solid fa-check":"fa-solid fa-copy"})})}}const b2=w2;class x2 extends c.Component{constructor(e){super(e);this.state={error:null,isLoading:!0,gameManager:null,rewardsData:{},initConnSync:!1,refId:null,connStatus:{isConnected:!1,chainId:null,selectedNetworkId:null,address:null}}}get chainAddUrl(){return this.state.connStatus.chainId?"?chain="+aN(this.state.connStatus.chainId).urlName:""}get shareLink(){let e;return e=encodeURIComponent(window.location.origin+"/mint/"+this.chainAddUrl+"&refId="+this.state.connStatus.address),e}get shareLinkRaw(){let e;return e=window.location.origin+"/mint/"+this.chainAddUrl+"&refId="+this.state.connStatus.address,e}get shareText(){return this.state.rewardsData.percentForRefer?`Share this link with your friends and get ${this.state.rewardsData.percentForRefer}% of their mints in ${aN(this.state.connStatus.chainId).symbol}! You can check your earnings in this page.`:"Collaborate with the project by sharing this with your friends!"}connStatusChanged(e){const t=localStorage.getItem("walletReferal")||null;this.setState({...this.state,connStatus:e,refId:t},(()=>{this.loadData()}))}async loadGameManager(e){return await zq.getGameService().getGameManager(e)}async loadData(){this.setState({...this.state,error:null,isLoading:!0},(()=>{this.loadGameManager(0).then((e=>{this.setState({...this.state,gameManager:e},(()=>{e.loadRewardsData().then((e=>{e?this.setState({...this.state,rewardsData:e,isLoading:!1}):this.setState({...this.state,error:!0,isLoading:!1})}
9688))}))}))}))}renderNFTInfo(){return this.state.isLoading?(0,iN.jsx)(qq,{}):(0,iN.jsxs)(iN.Fragment,{children:[(0,iN.jsx)("div",{className:"modal fade",id:"shareModal",tabIndex:"-1","aria-labelledby":"shareModalLabel","aria-hidden":"true",children:(0,iN.jsx)("div",{className:"modal-dialog",children:(0,iN.jsxs)("div",{className:"modal-content",children:[(0,iN.jsxs)("div",{className:"modal-header",children:[(0,iN.jsx)("h1",{className:"modal-title fs-5",id:"shareModalLabel",children:"Rewards Program"}),(0,iN.jsx)("button",{type:"button",className:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})]}),(0,iN.jsx)("div",{className:"modal-body",children:this.shareText}),(0,iN.jsxs)("div",{className:"modal-footer",children:[(0,iN.jsx)(b2,{text:this.shareLinkRaw,buttonType:!0}),(0,iN.jsx)("a",{href:"https://twitter.com/intent/tweet?text=Mint Your Worm!&url="+this.shareLink+"&hashtags=powaworms",target:"_blank",children:(0,iN.jsx)("button",{"data-bs-dismiss":"modal",type:"button",className:"btn btn-primary",children:(0,iN.jsx)("i",{className:"fa-brands fa-twitter"})})}),(0,iN.jsx)("a",{href:"https://www.facebook.com/sharer/sharer.php?u="+this.shareLink,target:"_blank",children:(0,iN.jsx)("button",{"data-bs-dismiss":"modal",type:"button",className:"btn btn-primary",children:(0,iN.jsx)("i",{className:"fa-brands fa-facebook"})})}),(0,iN.jsx)("a",{href:"https://www.reddit.com/submit?url="+this.shareLink+"&title=Mint Your Worm!",target:"_blank",children:(0,iN.jsx)("button",{"data-bs-dismiss":"modal",type:"button",className:"btn btn-primary",children:(0,iN.jsx)("i",{className:"fa-brands fa-reddit"})})}),(0,iN.jsx)("a",{href:"https://telegram.me/share/url?url="+this.shareLink+"&text=Mint Your Worm!",target:"_blank",children:(0,iN.jsx)("button",{"data-bs-dismiss":"modal",type:"button",className:"btn btn-primary",children:(0,iN.jsx)("i",{className:"fa-brands fa-telegram"})})}),(0,iN.jsx)("a",{href:"https://api.whatsapp.com/send?text=Mint Your Worm!: "+this.shareLink,target:"_blank",children:(0,iN.jsx)("button",{"data-bs-dismiss":"modal",type:"button",className:"btn btn-primary",children:(0,iN.jsx)("i",{className:"fa-brands fa-whatsapp"})})})]})]})})}),(0,iN.jsx)("div",{className:"container",children:(0,iN.jsxs)("div",{className:"row",children:[(0,iN.jsx)("div",{className:"col-12 col-md-7",children:(0,iN.jsx)("div",{className:"card m-0 roundedCard glowBorderGreen",children:(0,iN.jsx)("div",{className:"card-body pt-4",children:(0,iN.jsx)("div",{className:"d-flex align-items-center justify-content-center text-center",children:(0,iN.jsx)("div",{children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)("div",{className:"mt-5",children:(0,iN.jsx)("img",{className:"",src:"/assets/img/rewards_deco1.png",alt:"Rewards",style:{maxWidth:"500px",width:"100%",filter:"saturate(1.2) drop-shadow(2px 4px 6px #000000ad)"}})}),(0,iN.jsxs)("div",{className:"mt-3",children:[(0,iN.jsxs)("h6",{className:"text-softmint",children:["Want to earn passive rewards in ",aN(this.state.connStatus.chainId).symbol,"?"]}),"Share your referral link with your friends, and for every mint they make, you'll automatically receive rewards."]}),(0,iN.jsx)("div",{className:"mt-4",children:(0,iN.jsxs)("button",{"data-bs-toggle":"modal","data-bs-target":"#shareModal",className:"neonBtn btn_line_anim",children:[(0,iN.jsx)("i",{className:"fa-solid fa-share-nodes"})," Share & Earn ",aN(this.state.connStatus.chainId).symbol,"!"]})})]})})})})})}),(0,iN.jsx)("div",{className:"col-12 col-md-5",children:(0,iN.jsx)("div",{className:"card m-0 roundedCard glowBorderGreen",children:(0,iN.jsxs)("div",{className:"card-body pt-4",children:[(0,iN.jsx)("h4",{className:"rewards_details_title mt-4",children:"Your rewards:"}),(0,iN.jsx)("div",{className:"rewards_details_desc mb-1",children:"Your rewards obtained through your referral link."}),(0,iN.jsxs)("ul",{style:{fontSize:"1rem"},className:"list-group list-group-flush",children:[(0,iN.jsx)("li",{className:"list-group-item",children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)("i",{className:"fa-solid fa-sack-dollar"})," Total rewards earned:",(0,iN.jsxs)("h5",{className:"rewards_details_value text-softmint",children:[this.state.rewardsData.rewardQuantity_NORMAL," ",aN(this.state.connStatus.chainId).symbol]})]})}),(0,iN.jsx)("li",{className:"list-group-item",children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)("i",{className:"fa-regular fa-flag"})," Total mints referred:",(0,iN.jsx)("h5",{className:"rewards_details_value text-softmint",children:this.state.rewardsData.rewardQuantityMinted})]})}),(0,iN.jsx)("li",{className:"list-group-item",children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)("i",{className:"fa-regular fa-clock"})," Last reward obtained (date):",(0,iN.jsx)("h5",{className:"rewards_details_value text-softmint",children:this.timestampDate})]})})]})]})})})]})})]})}get timestampDate(){if(this.state.rewardsData.rewardLastTimestamp<=0)return"-";return new Date(1e3*this.state.rewardsData.rewardLastTimestamp).toLocaleDateString()}renderContent(){return this.state.error?(0,iN.jsxs)("div",{className:"alert alert-danger mt-2",children:[(0,iN.jsx)("i",{className:"fa fa-exclamation-triangle"})," An error occurred while loading the data. Please try again later."]}):(0,iN.jsx)("div",{className:"py-2",children:this.renderNFTInfo()})}render(){return(0,iN.jsx)(NN,{children:(0,iN.jsxs)("div",{children:[(0,iN.jsx)(MN,{forceCall:this.state.initConnSync,onChangedStatus:(e,t,n,r)=>this.connStatusChanged({isConnected:e,chainId:t,selectedNetworkId:n,address:r})}),this.state.connStatus.isConnected?this.renderContent():null]})})}}const E2=x2;let _2=new Cq;const k2=function(){const{address:e,chainId:t,isConnected:n}=rN(),{walletProvider:r}=tN(),[i,s]=(0,c.useState)(!1),[o,a]=(0,c.useState)(null),[l,u]=(0,c.useState)(!1),d=[];for(let c=0;cN.length>c;c++)if(oN[parseInt(cN[c])].compatible){const e=parseInt(cN[c]);d.push({chainId:parseInt(cN[c]),name:oN[e].name,currency:oN[e].symbol,explorerUrl:oN[e].explorerUrl,rpcUrl:oN[e].rpc})}eN({ethersConfig:JP({metadata:{name:"Powa Worms",description:"Play-to-Earn PVP c
9688ombat game fully functional on the Blockchain.",url:"https://game.powaworms.com",icons:["https://game.powaworms.com/logo192.png"]}}),chains:d,projectId:"4dcaad8e30ad49cdaadf131c676bf106",chainImages:{1:"https://game.powaworms.com/assets/img/icons/chain-1.png",56:"https://game.powaworms.com/assets/img/icons/chain-56.png",97:"https://game.powaworms.com/assets/img/icons/chain-97.png",137:"https://game.powaworms.com/assets/img/icons/chain-137.png",42440:"https://game.powaworms.com/assets/img/icons/chain-42440.png",16507:"https://game.powaworms.com/assets/img/icons/chain-16507.png",13600:"https://game.powaworms.com/assets/img/icons/chain-13600.png",8453:"https://game.powaworms.com/assets/img/icons/chain-8453.png"},termsConditionsUrl:"https://nitrolayer.gitbook.io/powa-worms/information/terms-of-service",privacyPolicyUrl:"https://nitrolayer.gitbook.io/powa-worms/information/privacy-policy",themeVariables:{"--w3m-accent":"#00d673","--w3m-z-index":1001},enableAnalytics:!0});const{selectedNetworkId:h}=WP(),{open:p,close:f}=HP(),{switchNetwork:m}=nN(),{walletInfo:g}=function(){if(!zP)throw new Error('Please call "createWeb3Modal" before using "useWeb3Modal" hook');return{walletInfo:(0,c.useSyncExternalStore)(zP.subscribeWalletInfo,zP.getWalletInfo,zP.getWalletInfo)}}();(0,c.useEffect)((()=>{null==o&&null!=h&&null!=t&&h!=t&&(cN.includes(t.toString())||b())}),[t,h]),(0,c.useEffect)((()=>{n&&null!=o?w().then((()=>{y()})):y()}),[n,o,t,h,e]),window.refreshApp=()=>{document.getElementById("refreshTransition").style.transform="translateX(0%) translateY(-25%)",setTimeout((()=>{s(!0),setTimeout((()=>{_2=new Cq,s(!1)}),500)}),300)};const y=async()=>{let i=window.location.pathname;if("/"==i&&(i=window.location.origin),window.history.replaceState("","",i),n){if(_2.networkId!=h||_2.networkId!=t||_2.account!=e){const i=_2.account;await _2.connect(e,t,r,n),_2.account!=i&&await v()}}else _2=new Cq},v=async()=>{if(u(!0),!localStorage.getItem("walletReferalChecked")&&localStorage.getItem("walletReferal")){const e=localStorage.getItem("walletReferal");await _2.verifyIfIsAddress(e)?localStorage.setItem("walletReferalChecked",!0):localStorage.removeItem("walletReferal")}},w=async()=>{if(n&&null!=o)if(t!=o){const e=o;a(null),m(e)}else a(null)},b=async()=>{m(h)};return(()=>{const e=window.location.search,t=new URLSearchParams(e);if(t.get("refId")){let e=t.get("refId");const n="0x0000000000000000000000000000000000000000";let r=!1;e&&e.startsWith("0x")&&e.trim().length===n.length&&(r=!0),r&&localStorage.getItem("walletReferal")!=e&&(localStorage.getItem("walletReferal")&&localStorage.removeItem("walletReferal"),localStorage.getItem("walletReferalChecked")&&localStorage.removeItem("walletReferalChecked"),localStorage.setItem("walletReferal",e))}if(t.get("chain")&&null==o){let e=t.get("chain"),n=null;for(let t=0;cN.length>t;t++)if(oN[parseInt(cN[t])].compatible&&oN[parseInt(cN[t])].urlName.toLowerCase()==e.toLowerCase()){n=parseInt(parseInt(cN[t]));break}null!=n&&a(n)}})(),i?(0,iN.jsxs)(iN.Fragment,{children:[(0,iN.jsx)("div",{id:"refreshTransition_over"}),(0,iN.jsx)("div",{id:"refreshTransition",style:{transform:"translateX(0%) translateY(-25%)"}}),(0,iN.jsx)("div",{id:"refreshTransition_back"})]}):(0,iN.jsxs)(iN.Fragment,{children:[(0,iN.jsx)("div",{id:"refreshTransition",style:{transform:"translateX(-120%) translateY(-25%)"}}),(0,iN.jsx)(Se,{test:_2,children:(0,iN.jsxs)(be,{children:[(0,iN.jsx)(ve,{path:"/login",element:(0,iN.jsx)("h1",{children:"Login"})}),(0,iN.jsxs)(ve,{path:"/",element:(0,iN.jsx)(BN,{walletInfo:g}),children:[(0,iN.jsx)(ve,{index:!0,element:(0,iN.jsx)(Wq,{})}),(0,iN.jsx)(ve,{path:"my",element:(0,iN.jsx)(Gq,{})}),(0,iN.jsxs)(ve,{path:"worm",element:(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)(ye,{})}),children:[(0,iN.jsx)(ve,{index:!0,element:(0,iN.jsx)(Zq,{})}),(0,iN.jsx)(ve,{path:":wormId",element:(0,iN.jsx)(Zq,{})})]}),(0,iN.jsxs)(ve,{path:"arena",element:(0,iN.jsx)(iN.Fragment,{children:(0,iN.jsx)(ye,{})}),children:[(0,iN.jsx)(ve,{index:!0,element:(0,iN.jsx)(g2,{})}),(0,iN.jsx)(ve,{path:":arenaId",element:(0,iN.jsx)(g2,{})})]}),(0,iN.jsx)(ve,{path:"mint",element:(0,iN.jsx)(v2,{})}),(0,iN.jsx)(ve,{path:"rewards",element:(0,iN.jsx)(E2,{})}),(0,iN.jsx)(ve,{path:"*",element:(0,iN.jsx)($N,{})})]})]})})]})},C2=e=>{e&&e instanceof Function&&n.e(206).then(n.bind(n,8206)).then((t=>{let{getCLS:n,getFID:r,getFCP:i,getLCP:s,getTTFB:o}=t;n(e),r(e),i(e),s(e),o(e)}))};u.createRoot(document.getElementById("root")).render((0,iN.jsx)(c.StrictMode,{children:(0,iN.jsx)(k2,{})})),C2()})()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.