@reown/appkit-cdn 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{W3MFrameProviderSingleton-CTR1y-dm.js → W3MFrameProviderSingleton-CVeWBhS_.js} +25193 -24911
- package/dist/W3MFrameProviderSingleton-Djv3DKHQ.cjs +11298 -0
- package/dist/ethers.cjs +1 -1
- package/dist/ethers.js +5 -5
- package/dist/{hooks.module-D-0zdEoH.js → hooks.module-BuouNsta.js} +1 -1
- package/dist/{hooks.module-DQotueVv.cjs → hooks.module-OOURZPAN.cjs} +1 -1
- package/dist/{index-Cj_t8zKv.cjs → index-4gPeNAqu.cjs} +1 -1
- package/dist/{index-B-asGkmO.cjs → index-BMspmMjR.cjs} +1 -1
- package/dist/{index-Cb7ygkgK.js → index-BlKzwSJU.js} +2 -2
- package/dist/{index-ChpiA38q.cjs → index-C2Bw1AaS.cjs} +1 -1
- package/dist/{index-Bc0ITjWJ.js → index-C9Wf5FuX.js} +2 -2
- package/dist/{index-CHnv57sx.cjs → index-CUE8WypA.cjs} +1 -1
- package/dist/{index-T8ir_D3p.js → index-Cw3RgM7_.js} +2 -2
- package/dist/{index-W7CfpcrR.js → index-D0AGxgdp.js} +2 -2
- package/dist/{index-CGiwEmEs.cjs → index-D1TRYSj5.cjs} +1 -1
- package/dist/{index-BbRGsaWd.cjs → index-D7cCbFGa.cjs} +2 -2
- package/dist/{index-DPxKz8jH.js → index-DMnytQnR.js} +2 -2
- package/dist/{index-CarL80dX.cjs → index-DP5FsK5O.cjs} +1 -1
- package/dist/{index-BpyGhSL5.cjs → index-YAhLOyG9.cjs} +1 -1
- package/dist/{index-DHINf06o.js → index-cIY_Y6JK.js} +1 -1
- package/dist/{index-CUklmSgy.js → index-rBKRsYhG.js} +2 -2
- package/dist/{index-C4sAe8r2.js → index-xU7rcaOL.js} +2 -2
- package/dist/{index.es-uCwCuHj3.cjs → index.es-DLyLBkNx.cjs} +2 -2
- package/dist/{index.es-iazRHZcQ.js → index.es-DyjLX8Oj.js} +2 -2
- package/dist/{metamask-sdk-CWejtgv4.js → metamask-sdk-DAjmhCmY.js} +1 -1
- package/dist/{metamask-sdk-BR0UffTG.cjs → metamask-sdk-DzX54_vv.cjs} +1 -1
- package/dist/{native-BQEvKOnP.cjs → native-C-0AHtVa.cjs} +1 -1
- package/dist/{native-Cu9ENMNS.js → native-dPjkdH1Q.js} +1 -1
- package/dist/{w3m-modal-D71FClnT.cjs → w3m-modal-CfqGVIE5.cjs} +3 -3
- package/dist/{w3m-modal-C48bKG7t.js → w3m-modal-DuRbCwDx.js} +4 -4
- package/dist/{wagmi-BW31my6S.js → wagmi-CjqErQGH.js} +14 -14
- package/dist/{wagmi-BydfAFoJ.cjs → wagmi-DYp-Wfqq.cjs} +4 -4
- package/dist/wagmi.cjs +1 -1
- package/dist/wagmi.js +2 -2
- package/package.json +5 -5
- package/dist/W3MFrameProviderSingleton-EBSNGCyS.cjs +0 -11201
package/dist/ethers.js
CHANGED
|
@@ -17,8 +17,8 @@ var Fi = (r, e, t, n) => ({
|
|
|
17
17
|
return u(r, e, n);
|
|
18
18
|
}
|
|
19
19
|
}), I = (r, e, t) => (kc(r, e, "access private method"), t);
|
|
20
|
-
import { C as F, P as gt, b as ca, o as Aa, i as Bp, B as ne, s as Lp, p as dt, q as Mp, H as bu, j as On, a as Tn, r as Dp, k as He, g as Tt, h as _t, f as Au, N as Eu, l as xc, m as Up, c as Fp, A as Hp, d as Gp, n as Kp } from "./W3MFrameProviderSingleton-
|
|
21
|
-
import { j as jp, r as rd, a as sd, b as Vp } from "./hooks.module-
|
|
20
|
+
import { C as F, P as gt, b as ca, o as Aa, i as Bp, B as ne, s as Lp, p as dt, q as Mp, H as bu, j as On, a as Tn, r as Dp, k as He, g as Tt, h as _t, f as Au, N as Eu, l as xc, m as Up, c as Fp, A as Hp, d as Gp, n as Kp } from "./W3MFrameProviderSingleton-CVeWBhS_.js";
|
|
21
|
+
import { j as jp, r as rd, a as sd, b as Vp } from "./hooks.module-BuouNsta.js";
|
|
22
22
|
const Pc = {
|
|
23
23
|
ERROR_CODE_UNRECOGNIZED_CHAIN_ID: 4902,
|
|
24
24
|
ERROR_CODE_DEFAULT: 5e3
|
|
@@ -17352,7 +17352,7 @@ class eA {
|
|
|
17352
17352
|
var E, C, S, N, _;
|
|
17353
17353
|
const f = He.getProvider("eip155"), g = He.state.providerIds.eip155;
|
|
17354
17354
|
if ((E = this.appKit) == null || E.setClientId(null), (N = (S = (C = this.options) == null ? void 0 : C.siweConfig) == null ? void 0 : S.options) != null && N.signOutOnDisconnect) {
|
|
17355
|
-
const { SIWEController: x } = await import("./index-
|
|
17355
|
+
const { SIWEController: x } = await import("./index-Cw3RgM7_.js");
|
|
17356
17356
|
await x.signOut();
|
|
17357
17357
|
}
|
|
17358
17358
|
const m = {
|
|
@@ -17785,7 +17785,7 @@ class eA {
|
|
|
17785
17785
|
}
|
|
17786
17786
|
}
|
|
17787
17787
|
}
|
|
17788
|
-
const tA = "@reown/appkit-ethers", nA = "1.0.
|
|
17788
|
+
const tA = "@reown/appkit-ethers", nA = "1.0.6", rA = "module", sA = "./dist/esm/exports/index.js", iA = "./dist/types/exports/index.d.ts", oA = [
|
|
17789
17789
|
"dist",
|
|
17790
17790
|
"!tsconfig.tsbuildinfo"
|
|
17791
17791
|
], aA = {
|
|
@@ -17821,7 +17821,7 @@ const tA = "@reown/appkit-ethers", nA = "1.0.5", rA = "module", sA = "./dist/esm
|
|
|
17821
17821
|
lint: "eslint . --ext .js,.jsx,.ts,.tsx"
|
|
17822
17822
|
}, uA = {
|
|
17823
17823
|
"@coinbase/wallet-sdk": "4.0.3",
|
|
17824
|
-
"@walletconnect/utils": "2.
|
|
17824
|
+
"@walletconnect/utils": "2.17.0",
|
|
17825
17825
|
"@reown/appkit": "workspace:*",
|
|
17826
17826
|
"@reown/appkit-adapter-ethers": "workspace:*",
|
|
17827
17827
|
"@reown/appkit-common": "workspace:*",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as D, bh as Ze, bf as Yt } from "./W3MFrameProviderSingleton-
|
|
1
|
+
import { B as D, bh as Ze, bf as Yt } from "./W3MFrameProviderSingleton-CVeWBhS_.js";
|
|
2
2
|
const { Transform: xn } = Ze;
|
|
3
3
|
var $n = (t) => class tn extends xn {
|
|
4
4
|
constructor(n, _, o, i, c) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const S=require("./W3MFrameProviderSingleton-EBSNGCyS.cjs"),{Transform:wn}=S.readableBrowserExports;var Sn=t=>class Ye extends wn{constructor(n,_,o,i,c){super(c),this._rate=n,this._capacity=_,this._delimitedSuffix=o,this._hashBitLength=i,this._options=c,this._state=new t,this._state.initialize(n,_),this._finalized=!1}_transform(n,_,o){let i=null;try{this.update(n,_)}catch(c){i=c}o(i)}_flush(n){let _=null;try{this.push(this.digest())}catch(o){_=o}n(_)}update(n,_){if(!S.Buffer.isBuffer(n)&&typeof n!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return S.Buffer.isBuffer(n)||(n=S.Buffer.from(n,_)),this._state.absorb(n),this}digest(n){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let _=this._state.squeeze(this._hashBitLength/8);return n!==void 0&&(_=_.toString(n)),this._resetState(),_}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const n=new Ye(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(n._state),n._finalized=this._finalized,n}};const{Transform:xn}=S.readableBrowserExports;var $n=t=>class Ze extends xn{constructor(n,_,o,i){super(i),this._rate=n,this._capacity=_,this._delimitedSuffix=o,this._options=i,this._state=new t,this._state.initialize(n,_),this._finalized=!1}_transform(n,_,o){let i=null;try{this.update(n,_)}catch(c){i=c}o(i)}_flush(){}_read(n){this.push(this.squeeze(n))}update(n,_){if(!S.Buffer.isBuffer(n)&&typeof n!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return S.Buffer.isBuffer(n)||(n=S.Buffer.from(n,_)),this._state.absorb(n),this}squeeze(n,_){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let o=this._state.squeeze(n);return _!==void 0&&(o=o.toString(_)),o}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const n=new Ze(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(n._state),n._finalized=this._finalized,n}};const zn=Sn,Cn=$n;var Pn=function(t){const e=zn(t),n=Cn(t);return function(_,o){switch(typeof _=="string"?_.toLowerCase():_){case"keccak224":return new e(1152,448,null,224,o);case"keccak256":return new e(1088,512,null,256,o);case"keccak384":return new e(832,768,null,384,o);case"keccak512":return new e(576,1024,null,512,o);case"sha3-224":return new e(1152,448,6,224,o);case"sha3-256":return new e(1088,512,6,256,o);case"sha3-384":return new e(832,768,6,384,o);case"sha3-512":return new e(576,1024,6,512,o);case"shake128":return new n(1344,256,31,o);case"shake256":return new n(1088,512,31,o);default:throw new Error("Invald algorithm: "+_)}}},tn={};const Ae=[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];tn.p1600=function(t){for(let e=0;e<24;++e){const n=t[0]^t[10]^t[20]^t[30]^t[40],_=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],i=t[3]^t[13]^t[23]^t[33]^t[43],c=t[4]^t[14]^t[24]^t[34]^t[44],l=t[5]^t[15]^t[25]^t[35]^t[45],f=t[6]^t[16]^t[26]^t[36]^t[46],u=t[7]^t[17]^t[27]^t[37]^t[47],h=t[8]^t[18]^t[28]^t[38]^t[48],r=t[9]^t[19]^t[29]^t[39]^t[49];let a=h^(o<<1|i>>>31),s=r^(i<<1|o>>>31);const g=t[0]^a,k=t[1]^s,b=t[10]^a,p=t[11]^s,v=t[20]^a,C=t[21]^s,x=t[30]^a,E=t[31]^s,P=t[40]^a,L=t[41]^s;a=n^(c<<1|l>>>31),s=_^(l<<1|c>>>31);const H=t[2]^a,q=t[3]^s,w=t[12]^a,T=t[13]^s,_e=t[22]^a,oe=t[23]^s,ie=t[32]^a,re=t[33]^s,se=t[42]^a,ce=t[43]^s;a=o^(f<<1|u>>>31),s=i^(u<<1|f>>>31);const le=t[4]^a,ue=t[5]^s,ae=t[14]^a,fe=t[15]^s,he=t[24]^a,pe=t[25]^s,de=t[34]^a,ve=t[35]^s,me=t[44]^a,ye=t[45]^s;a=c^(h<<1|r>>>31),s=l^(r<<1|h>>>31);const ge=t[6]^a,be=t[7]^s,ke=t[16]^a,we=t[17]^s,Se=t[26]^a,xe=t[27]^s,$e=t[36]^a,ze=t[37]^s,Ce=t[46]^a,Pe=t[47]^s;a=f^(n<<1|_>>>31),s=u^(_<<1|n>>>31);const Ee=t[8]^a,He=t[9]^s,Te=t[18]^a,Be=t[19]^s,Ne=t[28]^a,qe=t[29]^s,De=t[38]^a,Ue=t[39]^s,Fe=t[48]^a,Le=t[49]^s,J=g,Q=k,X=p<<4|b>>>28,Y=b<<4|p>>>28,Z=v<<3|C>>>29,tt=C<<3|v>>>29,et=E<<9|x>>>23,nt=x<<9|E>>>23,_t=P<<18|L>>>14,ot=L<<18|P>>>14,it=H<<1|q>>>31,rt=q<<1|H>>>31,st=T<<12|w>>>20,ct=w<<12|T>>>20,lt=_e<<10|oe>>>22,ut=oe<<10|_e>>>22,at=re<<13|ie>>>19,ft=ie<<13|re>>>19,ht=se<<2|ce>>>30,pt=ce<<2|se>>>30,dt=ue<<30|le>>>2,vt=le<<30|ue>>>2,mt=ae<<6|fe>>>26,yt=fe<<6|ae>>>26,gt=pe<<11|he>>>21,bt=he<<11|pe>>>21,kt=de<<15|ve>>>17,wt=ve<<15|de>>>17,St=ye<<29|me>>>3,xt=me<<29|ye>>>3,$t=ge<<28|be>>>4,zt=be<<28|ge>>>4,Ct=we<<23|ke>>>9,Pt=ke<<23|we>>>9,Et=Se<<25|xe>>>7,Ht=xe<<25|Se>>>7,Tt=$e<<21|ze>>>11,Bt=ze<<21|$e>>>11,Nt=Pe<<24|Ce>>>8,qt=Ce<<24|Pe>>>8,Dt=Ee<<27|He>>>5,Ut=He<<27|Ee>>>5,Ft=Te<<20|Be>>>12,Lt=Be<<20|Te>>>12,At=qe<<7|Ne>>>25,Mt=Ne<<7|qe>>>25,Wt=De<<8|Ue>>>24,Ot=Ue<<8|De>>>24,jt=Fe<<14|Le>>>18,It=Le<<14|Fe>>>18;t[0]=J^~st>,t[1]=Q^~ct&bt,t[10]=$t^~Ft&Z,t[11]=zt^~Lt&tt,t[20]=it^~mt&Et,t[21]=rt^~yt&Ht,t[30]=Dt^~X<,t[31]=Ut^~Y&ut,t[40]=dt^~Ct&At,t[41]=vt^~Pt&Mt,t[2]=st^~gt&Tt,t[3]=ct^~bt&Bt,t[12]=Ft^~Z&at,t[13]=Lt^~tt&ft,t[22]=mt^~Et&Wt,t[23]=yt^~Ht&Ot,t[32]=X^~lt&kt,t[33]=Y^~ut&wt,t[42]=Ct^~At&et,t[43]=Pt^~Mt&nt,t[4]=gt^~Tt&jt,t[5]=bt^~Bt&It,t[14]=Z^~at&St,t[15]=tt^~ft&xt,t[24]=Et^~Wt&_t,t[25]=Ht^~Ot&ot,t[34]=lt^~kt&Nt,t[35]=ut^~wt&qt,t[44]=At^~et&ht,t[45]=Mt^~nt&pt,t[6]=Tt^~jt&J,t[7]=Bt^~It&Q,t[16]=at^~St&$t,t[17]=ft^~xt&zt,t[26]=Wt^~_t&it,t[27]=Ot^~ot&rt,t[36]=kt^~Nt&Dt,t[37]=wt^~qt&Ut,t[46]=et^~ht&dt,t[47]=nt^~pt&vt,t[8]=jt^~J&st,t[9]=It^~Q&ct,t[18]=St^~$t&Ft,t[19]=xt^~zt&Lt,t[28]=_t^~it&mt,t[29]=ot^~rt&yt,t[38]=Nt^~Dt&X,t[39]=qt^~Ut&Y,t[48]=ht^~dt&Ct,t[49]=pt^~vt&Pt,t[0]^=Ae[e*2],t[1]^=Ae[e*2+1]}};const V=tn;function F(){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}F.prototype.initialize=function(t,e){for(let n=0;n<50;++n)this.state[n]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1};F.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(V.p1600(this.state),this.count=0)};F.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<8*(this.count%4),t&128&&this.count===this.blockSize-1&&V.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),V.p1600(this.state),this.count=0,this.squeezing=!0};F.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const e=S.Buffer.alloc(t);for(let n=0;n<t;++n)e[n]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(V.p1600(this.state),this.count=0);return e};F.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing};var En=F,Hn=Pn(En);function en(t){var e,n,_="";if(typeof t=="string"||typeof t=="number")_+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=en(t[e]))&&(_&&(_+=" "),_+=n);else for(e in t)t[e]&&(_&&(_+=" "),_+=e);return _}function Me(){for(var t,e,n=0,_="";n<arguments.length;)(t=arguments[n++])&&(e=en(t))&&(_&&(_+=" "),_+=e);return _}const Tn=Object.freeze(Object.defineProperty({__proto__:null,clsx:Me,default:Me},Symbol.toStringTag,{value:"Module"})),Bn=S.getAugmentedNamespace(Tn);var O,m,nn,_n,B,We,on,Vt,Yt,Kt,Gt,rn,W={},sn=[],Nn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,G=Array.isArray;function $(t,e){for(var n in e)t[n]=e[n];return t}function cn(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Jt(t,e,n){var _,o,i,c={};for(i in e)i=="key"?_=e[i]:i=="ref"?o=e[i]:c[i]=e[i];if(arguments.length>2&&(c.children=arguments.length>3?O.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)c[i]===void 0&&(c[i]=t.defaultProps[i]);return A(t,c,_,o,null)}function A(t,e,n,_,o){var i={type:t,props:e,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++nn,__i:-1,__u:0};return o==null&&m.vnode!=null&&m.vnode(i),i}function qn(){return{current:null}}function j(t){return t.children}function M(t,e){this.props=t,this.context=e}function D(t,e){if(e==null)return t.__?D(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?D(t):null}function ln(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return ln(t)}}function Qt(t){(!t.__d&&(t.__d=!0)&&B.push(t)&&!K.__r++||We!==m.debounceRendering)&&((We=m.debounceRendering)||on)(K)}function K(){var t,e,n,_,o,i,c,l;for(B.sort(Vt);t=B.shift();)t.__d&&(e=B.length,_=void 0,i=(o=(n=t).__v).__e,c=[],l=[],n.__P&&((_=$({},o)).__v=o.__v+1,m.vnode&&m.vnode(_),Zt(n.__P,_,o,n.__n,n.__P.namespaceURI,32&o.__u?[i]:null,c,i??D(o),!!(32&o.__u),l),_.__v=o.__v,_.__.__k[_.__i]=_,hn(c,_,l),_.__e!=i&&ln(_)),B.length>e&&B.sort(Vt));K.__r=0}function un(t,e,n,_,o,i,c,l,f,u,h){var r,a,s,g,k,b=_&&_.__k||sn,p=e.length;for(n.__d=f,Dn(n,e,b),f=n.__d,r=0;r<p;r++)(s=n.__k[r])!=null&&(a=s.__i===-1?W:b[s.__i]||W,s.__i=r,Zt(t,s,a,o,i,c,l,f,u,h),g=s.__e,s.ref&&a.ref!=s.ref&&(a.ref&&te(a.ref,null,s),h.push(s.ref,s.__c||g,s)),k==null&&g!=null&&(k=g),65536&s.__u||a.__k===s.__k?f=an(s,f,t):typeof s.type=="function"&&s.__d!==void 0?f=s.__d:g&&(f=g.nextSibling),s.__d=void 0,s.__u&=-196609);n.__d=f,n.__e=k}function Dn(t,e,n){var _,o,i,c,l,f=e.length,u=n.length,h=u,r=0;for(t.__k=[],_=0;_<f;_++)(o=e[_])!=null&&typeof o!="boolean"&&typeof o!="function"?(c=_+r,(o=t.__k[_]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?A(null,o,null,null,null):G(o)?A(j,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?A(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=t,o.__b=t.__b+1,i=null,(l=o.__i=Un(o,n,c,h))!==-1&&(h--,(i=n[l])&&(i.__u|=131072)),i==null||i.__v===null?(l==-1&&r--,typeof o.type!="function"&&(o.__u|=65536)):l!==c&&(l==c-1?r--:l==c+1?r++:(l>c?r--:r++,o.__u|=65536))):o=t.__k[_]=null;if(h)for(_=0;_<u;_++)(i=n[_])!=null&&!(131072&i.__u)&&(i.__e==t.__d&&(t.__d=D(i)),pn(i,i))}function an(t,e,n){var _,o;if(typeof t.type=="function"){for(_=t.__k,o=0;_&&o<_.length;o++)_[o]&&(_[o].__=t,e=an(_[o],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=D(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function fn(t,e){return e=e||[],t==null||typeof t=="boolean"||(G(t)?t.some(function(n){fn(n,e)}):e.push(t)),e}function Un(t,e,n,_){var o=t.key,i=t.type,c=n-1,l=n+1,f=e[n];if(f===null||f&&o==f.key&&i===f.type&&!(131072&f.__u))return n;if(_>(f!=null&&!(131072&f.__u)?1:0))for(;c>=0||l<e.length;){if(c>=0){if((f=e[c])&&!(131072&f.__u)&&o==f.key&&i===f.type)return c;c--}if(l<e.length){if((f=e[l])&&!(131072&f.__u)&&o==f.key&&i===f.type)return l;l++}}return-1}function Oe(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Nn.test(e)?n:n+"px"}function I(t,e,n,_,o){var i;t:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof _=="string"&&(t.style.cssText=_=""),_)for(e in _)n&&e in n||Oe(t.style,e,"");if(n)for(e in n)_&&n[e]===_[e]||Oe(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")i=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?_?n.u=_.u:(n.u=Yt,t.addEventListener(e,i?Gt:Kt,i)):t.removeEventListener(e,i?Gt:Kt,i);else{if(o=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function je(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Yt++;else if(e.t<n.u)return;return n(m.event?m.event(e):e)}}}function Zt(t,e,n,_,o,i,c,l,f,u){var h,r,a,s,g,k,b,p,v,C,x,E,P,L,H,q,w=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(f=!!(32&n.__u),i=[l=e.__e=n.__e]),(h=m.__b)&&h(e);t:if(typeof w=="function")try{if(p=e.props,v="prototype"in w&&w.prototype.render,C=(h=w.contextType)&&_[h.__c],x=h?C?C.props.value:h.__:_,n.__c?b=(r=e.__c=n.__c).__=r.__E:(v?e.__c=r=new w(p,x):(e.__c=r=new M(p,x),r.constructor=w,r.render=Ln),C&&C.sub(r),r.props=p,r.state||(r.state={}),r.context=x,r.__n=_,a=r.__d=!0,r.__h=[],r._sb=[]),v&&r.__s==null&&(r.__s=r.state),v&&w.getDerivedStateFromProps!=null&&(r.__s==r.state&&(r.__s=$({},r.__s)),$(r.__s,w.getDerivedStateFromProps(p,r.__s))),s=r.props,g=r.state,r.__v=e,a)v&&w.getDerivedStateFromProps==null&&r.componentWillMount!=null&&r.componentWillMount(),v&&r.componentDidMount!=null&&r.__h.push(r.componentDidMount);else{if(v&&w.getDerivedStateFromProps==null&&p!==s&&r.componentWillReceiveProps!=null&&r.componentWillReceiveProps(p,x),!r.__e&&(r.shouldComponentUpdate!=null&&r.shouldComponentUpdate(p,r.__s,x)===!1||e.__v===n.__v)){for(e.__v!==n.__v&&(r.props=p,r.state=r.__s,r.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(T){T&&(T.__=e)}),E=0;E<r._sb.length;E++)r.__h.push(r._sb[E]);r._sb=[],r.__h.length&&c.push(r);break t}r.componentWillUpdate!=null&&r.componentWillUpdate(p,r.__s,x),v&&r.componentDidUpdate!=null&&r.__h.push(function(){r.componentDidUpdate(s,g,k)})}if(r.context=x,r.props=p,r.__P=t,r.__e=!1,P=m.__r,L=0,v){for(r.state=r.__s,r.__d=!1,P&&P(e),h=r.render(r.props,r.state,r.context),H=0;H<r._sb.length;H++)r.__h.push(r._sb[H]);r._sb=[]}else do r.__d=!1,P&&P(e),h=r.render(r.props,r.state,r.context),r.state=r.__s;while(r.__d&&++L<25);r.state=r.__s,r.getChildContext!=null&&(_=$($({},_),r.getChildContext())),v&&!a&&r.getSnapshotBeforeUpdate!=null&&(k=r.getSnapshotBeforeUpdate(s,g)),un(t,G(q=h!=null&&h.type===j&&h.key==null?h.props.children:h)?q:[q],e,n,_,o,i,c,l,f,u),r.base=e.__e,e.__u&=-161,r.__h.length&&c.push(r),b&&(r.__E=r.__=null)}catch(T){if(e.__v=null,f||i!=null){for(e.__u|=f?160:32;l&&l.nodeType===8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,e.__e=l}else e.__e=n.__e,e.__k=n.__k;m.__e(T,e,n)}else i==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=Fn(n.__e,e,n,_,o,i,c,f,u);(h=m.diffed)&&h(e)}function hn(t,e,n){e.__d=void 0;for(var _=0;_<n.length;_++)te(n[_],n[++_],n[++_]);m.__c&&m.__c(e,t),t.some(function(o){try{t=o.__h,o.__h=[],t.some(function(i){i.call(o)})}catch(i){m.__e(i,o.__v)}})}function Fn(t,e,n,_,o,i,c,l,f){var u,h,r,a,s,g,k,b=n.props,p=e.props,v=e.type;if(v==="svg"?o="http://www.w3.org/2000/svg":v==="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((s=i[u])&&"setAttribute"in s==!!v&&(v?s.localName===v:s.nodeType===3)){t=s,i[u]=null;break}}if(t==null){if(v===null)return document.createTextNode(p);t=document.createElementNS(o,v,p.is&&p),l&&(m.__m&&m.__m(e,i),l=!1),i=null}if(v===null)b===p||l&&t.data===p||(t.data=p);else{if(i=i&&O.call(t.childNodes),b=n.props||W,!l&&i!=null)for(b={},u=0;u<t.attributes.length;u++)b[(s=t.attributes[u]).name]=s.value;for(u in b)if(s=b[u],u!="children"){if(u=="dangerouslySetInnerHTML")r=s;else if(!(u in p)){if(u=="value"&&"defaultValue"in p||u=="checked"&&"defaultChecked"in p)continue;I(t,u,null,s,o)}}for(u in p)s=p[u],u=="children"?a=s:u=="dangerouslySetInnerHTML"?h=s:u=="value"?g=s:u=="checked"?k=s:l&&typeof s!="function"||b[u]===s||I(t,u,s,b[u],o);if(h)l||r&&(h.__html===r.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(r&&(t.innerHTML=""),un(t,G(a)?a:[a],e,n,_,v==="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,c,i?i[0]:n.__k&&D(n,0),l,f),i!=null)for(u=i.length;u--;)cn(i[u]);l||(u="value",v==="progress"&&g==null?t.removeAttribute("value"):g!==void 0&&(g!==t[u]||v==="progress"&&!g||v==="option"&&g!==b[u])&&I(t,u,g,b[u],o),u="checked",k!==void 0&&k!==t[u]&&I(t,u,k,b[u],o))}return t}function te(t,e,n){try{if(typeof t=="function"){var _=typeof t.__u=="function";_&&t.__u(),_&&e==null||(t.__u=t(e))}else t.current=e}catch(o){m.__e(o,n)}}function pn(t,e,n){var _,o;if(m.unmount&&m.unmount(t),(_=t.ref)&&(_.current&&_.current!==t.__e||te(_,null,e)),(_=t.__c)!=null){if(_.componentWillUnmount)try{_.componentWillUnmount()}catch(i){m.__e(i,e)}_.base=_.__P=null}if(_=t.__k)for(o=0;o<_.length;o++)_[o]&&pn(_[o],e,n||typeof t.type!="function");n||cn(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function Ln(t,e,n){return this.constructor(t,n)}function dn(t,e,n){var _,o,i,c;m.__&&m.__(t,e),o=(_=typeof n=="function")?null:n&&n.__k||e.__k,i=[],c=[],Zt(e,t=(!_&&n||e).__k=Jt(j,null,[t]),o||W,W,e.namespaceURI,!_&&n?[n]:o?null:e.firstChild?O.call(e.childNodes):null,i,!_&&n?n:o?o.__e:e.firstChild,_,c),hn(i,t,c)}function vn(t,e){dn(t,e,vn)}function An(t,e,n){var _,o,i,c,l=$({},t.props);for(i in t.type&&t.type.defaultProps&&(c=t.type.defaultProps),e)i=="key"?_=e[i]:i=="ref"?o=e[i]:l[i]=e[i]===void 0&&c!==void 0?c[i]:e[i];return arguments.length>2&&(l.children=arguments.length>3?O.call(arguments,2):n),A(t.type,l,_||t.key,o||t.ref,null)}function Mn(t,e){var n={__c:e="__cC"+rn++,__:t,Consumer:function(_,o){return _.children(o)},Provider:function(_){var o,i;return this.getChildContext||(o=[],(i={})[e]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(c){this.props.value!==c.value&&o.some(function(l){l.__e=!0,Qt(l)})},this.sub=function(c){o.push(c);var l=c.componentWillUnmount;c.componentWillUnmount=function(){o&&o.splice(o.indexOf(c),1),l&&l.call(c)}}),_.children}};return n.Provider.__=n.Consumer.contextType=n}O=sn.slice,m={__e:function(t,e,n,_){for(var o,i,c;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(t)),c=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,_||{}),c=o.__d),c)return o.__E=o}catch(l){t=l}throw t}},nn=0,_n=function(t){return t!=null&&t.constructor==null},M.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=$({},this.state),typeof t=="function"&&(t=t($({},n),this.props)),t&&$(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Qt(this))},M.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Qt(this))},M.prototype.render=j,B=[],on=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Vt=function(t,e){return t.__v.__b-e.__v.__b},K.__r=0,Yt=0,Kt=je(!1),Gt=je(!0),rn=0;const Wn=Object.freeze(Object.defineProperty({__proto__:null,Component:M,Fragment:j,cloneElement:An,createContext:Mn,createElement:Jt,createRef:qn,h:Jt,hydrate:vn,get isValidElement(){return _n},get options(){return m},render:dn,toChildArray:fn},Symbol.toStringTag,{value:"Module"})),On=S.getAugmentedNamespace(Wn);var z,d,Rt,Ie,U=0,mn=[],y=m,Re=y.__b,Ve=y.__r,Ke=y.diffed,Ge=y.__c,Je=y.unmount,Qe=y.__;function N(t,e){y.__h&&y.__h(d,t,U||e),U=0;var n=d.__H||(d.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function yn(t){return U=1,gn(kn,t)}function gn(t,e,n){var _=N(z++,2);if(_.t=t,!_.__c&&(_.__=[n?n(e):kn(void 0,e),function(l){var f=_.__N?_.__N[0]:_.__[0],u=_.t(f,l);f!==u&&(_.__N=[u,_.__[1]],_.__c.setState({}))}],_.__c=d,!d.u)){var o=function(l,f,u){if(!_.__c.__H)return!0;var h=_.__c.__H.__.filter(function(a){return!!a.__c});if(h.every(function(a){return!a.__N}))return!i||i.call(this,l,f,u);var r=!1;return h.forEach(function(a){if(a.__N){var s=a.__[0];a.__=a.__N,a.__N=void 0,s!==a.__[0]&&(r=!0)}}),!(!r&&_.__c.props===l)&&(!i||i.call(this,l,f,u))};d.u=!0;var i=d.shouldComponentUpdate,c=d.componentWillUpdate;d.componentWillUpdate=function(l,f,u){if(this.__e){var h=i;i=void 0,o(l,f,u),i=h}c&&c.call(this,l,f,u)},d.shouldComponentUpdate=o}return _.__N||_.__}function jn(t,e){var n=N(z++,3);!y.__s&&ne(n.__H,e)&&(n.__=t,n.i=e,d.__H.__h.push(n))}function bn(t,e){var n=N(z++,4);!y.__s&&ne(n.__H,e)&&(n.__=t,n.i=e,d.__h.push(n))}function In(t){return U=5,ee(function(){return{current:t}},[])}function Rn(t,e,n){U=6,bn(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},n==null?n:n.concat(t))}function ee(t,e){var n=N(z++,7);return ne(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Vn(t,e){return U=8,ee(function(){return t},e)}function Kn(t){var e=d.context[t.__c],n=N(z++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(d)),e.props.value):t.__}function Gn(t,e){y.useDebugValue&&y.useDebugValue(e?e(t):t)}function Jn(t){var e=N(z++,10),n=yn();return e.__=t,d.componentDidCatch||(d.componentDidCatch=function(_,o){e.__&&e.__(_,o),n[1](_)}),[n[0],function(){n[1](void 0)}]}function Qn(){var t=N(z++,11);if(!t.__){for(var e=d.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Xn(){for(var t;t=mn.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(R),t.__H.__h.forEach(Xt),t.__H.__h=[]}catch(e){t.__H.__h=[],y.__e(e,t.__v)}}y.__b=function(t){d=null,Re&&Re(t)},y.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Qe&&Qe(t,e)},y.__r=function(t){Ve&&Ve(t),z=0;var e=(d=t.__c).__H;e&&(Rt===d?(e.__h=[],d.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(R),e.__h.forEach(Xt),e.__h=[],z=0)),Rt=d},y.diffed=function(t){Ke&&Ke(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(mn.push(e)!==1&&Ie===y.requestAnimationFrame||((Ie=y.requestAnimationFrame)||Yn)(Xn)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Rt=d=null},y.__c=function(t,e){e.some(function(n){try{n.__h.forEach(R),n.__h=n.__h.filter(function(_){return!_.__||Xt(_)})}catch(_){e.some(function(o){o.__h&&(o.__h=[])}),e=[],y.__e(_,n.__v)}}),Ge&&Ge(t,e)},y.unmount=function(t){Je&&Je(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(_){try{R(_)}catch(o){e=o}}),n.__H=void 0,e&&y.__e(e,n.__v))};var Xe=typeof requestAnimationFrame=="function";function Yn(t){var e,n=function(){clearTimeout(_),Xe&&cancelAnimationFrame(e),setTimeout(t)},_=setTimeout(n,100);Xe&&(e=requestAnimationFrame(n))}function R(t){var e=d,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),d=e}function Xt(t){var e=d;t.__c=t.__(),d=e}function ne(t,e){return!t||t.length!==e.length||e.some(function(n,_){return n!==t[_]})}function kn(t,e){return typeof e=="function"?e(t):e}const Zn=Object.freeze(Object.defineProperty({__proto__:null,useCallback:Vn,useContext:Kn,useDebugValue:Gn,useEffect:jn,useErrorBoundary:Jn,useId:Qn,useImperativeHandle:Rn,useLayoutEffect:bn,useMemo:ee,useReducer:gn,useRef:In,useState:yn},Symbol.toStringTag,{value:"Module"})),t_=S.getAugmentedNamespace(Zn);exports.js=Hn;exports.require$$0=Bn;exports.require$$1=On;exports.require$$2=t_;
|
|
1
|
+
"use strict";const S=require("./W3MFrameProviderSingleton-Djv3DKHQ.cjs"),{Transform:wn}=S.readableBrowserExports;var Sn=t=>class Ye extends wn{constructor(n,_,o,i,c){super(c),this._rate=n,this._capacity=_,this._delimitedSuffix=o,this._hashBitLength=i,this._options=c,this._state=new t,this._state.initialize(n,_),this._finalized=!1}_transform(n,_,o){let i=null;try{this.update(n,_)}catch(c){i=c}o(i)}_flush(n){let _=null;try{this.push(this.digest())}catch(o){_=o}n(_)}update(n,_){if(!S.Buffer.isBuffer(n)&&typeof n!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return S.Buffer.isBuffer(n)||(n=S.Buffer.from(n,_)),this._state.absorb(n),this}digest(n){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let _=this._state.squeeze(this._hashBitLength/8);return n!==void 0&&(_=_.toString(n)),this._resetState(),_}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const n=new Ye(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(n._state),n._finalized=this._finalized,n}};const{Transform:xn}=S.readableBrowserExports;var $n=t=>class Ze extends xn{constructor(n,_,o,i){super(i),this._rate=n,this._capacity=_,this._delimitedSuffix=o,this._options=i,this._state=new t,this._state.initialize(n,_),this._finalized=!1}_transform(n,_,o){let i=null;try{this.update(n,_)}catch(c){i=c}o(i)}_flush(){}_read(n){this.push(this.squeeze(n))}update(n,_){if(!S.Buffer.isBuffer(n)&&typeof n!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return S.Buffer.isBuffer(n)||(n=S.Buffer.from(n,_)),this._state.absorb(n),this}squeeze(n,_){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let o=this._state.squeeze(n);return _!==void 0&&(o=o.toString(_)),o}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const n=new Ze(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(n._state),n._finalized=this._finalized,n}};const zn=Sn,Cn=$n;var Pn=function(t){const e=zn(t),n=Cn(t);return function(_,o){switch(typeof _=="string"?_.toLowerCase():_){case"keccak224":return new e(1152,448,null,224,o);case"keccak256":return new e(1088,512,null,256,o);case"keccak384":return new e(832,768,null,384,o);case"keccak512":return new e(576,1024,null,512,o);case"sha3-224":return new e(1152,448,6,224,o);case"sha3-256":return new e(1088,512,6,256,o);case"sha3-384":return new e(832,768,6,384,o);case"sha3-512":return new e(576,1024,6,512,o);case"shake128":return new n(1344,256,31,o);case"shake256":return new n(1088,512,31,o);default:throw new Error("Invald algorithm: "+_)}}},tn={};const Ae=[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];tn.p1600=function(t){for(let e=0;e<24;++e){const n=t[0]^t[10]^t[20]^t[30]^t[40],_=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],i=t[3]^t[13]^t[23]^t[33]^t[43],c=t[4]^t[14]^t[24]^t[34]^t[44],l=t[5]^t[15]^t[25]^t[35]^t[45],f=t[6]^t[16]^t[26]^t[36]^t[46],u=t[7]^t[17]^t[27]^t[37]^t[47],h=t[8]^t[18]^t[28]^t[38]^t[48],r=t[9]^t[19]^t[29]^t[39]^t[49];let a=h^(o<<1|i>>>31),s=r^(i<<1|o>>>31);const g=t[0]^a,k=t[1]^s,b=t[10]^a,p=t[11]^s,v=t[20]^a,C=t[21]^s,x=t[30]^a,E=t[31]^s,P=t[40]^a,L=t[41]^s;a=n^(c<<1|l>>>31),s=_^(l<<1|c>>>31);const H=t[2]^a,q=t[3]^s,w=t[12]^a,T=t[13]^s,_e=t[22]^a,oe=t[23]^s,ie=t[32]^a,re=t[33]^s,se=t[42]^a,ce=t[43]^s;a=o^(f<<1|u>>>31),s=i^(u<<1|f>>>31);const le=t[4]^a,ue=t[5]^s,ae=t[14]^a,fe=t[15]^s,he=t[24]^a,pe=t[25]^s,de=t[34]^a,ve=t[35]^s,me=t[44]^a,ye=t[45]^s;a=c^(h<<1|r>>>31),s=l^(r<<1|h>>>31);const ge=t[6]^a,be=t[7]^s,ke=t[16]^a,we=t[17]^s,Se=t[26]^a,xe=t[27]^s,$e=t[36]^a,ze=t[37]^s,Ce=t[46]^a,Pe=t[47]^s;a=f^(n<<1|_>>>31),s=u^(_<<1|n>>>31);const Ee=t[8]^a,He=t[9]^s,Te=t[18]^a,Be=t[19]^s,Ne=t[28]^a,qe=t[29]^s,De=t[38]^a,Ue=t[39]^s,Fe=t[48]^a,Le=t[49]^s,J=g,Q=k,X=p<<4|b>>>28,Y=b<<4|p>>>28,Z=v<<3|C>>>29,tt=C<<3|v>>>29,et=E<<9|x>>>23,nt=x<<9|E>>>23,_t=P<<18|L>>>14,ot=L<<18|P>>>14,it=H<<1|q>>>31,rt=q<<1|H>>>31,st=T<<12|w>>>20,ct=w<<12|T>>>20,lt=_e<<10|oe>>>22,ut=oe<<10|_e>>>22,at=re<<13|ie>>>19,ft=ie<<13|re>>>19,ht=se<<2|ce>>>30,pt=ce<<2|se>>>30,dt=ue<<30|le>>>2,vt=le<<30|ue>>>2,mt=ae<<6|fe>>>26,yt=fe<<6|ae>>>26,gt=pe<<11|he>>>21,bt=he<<11|pe>>>21,kt=de<<15|ve>>>17,wt=ve<<15|de>>>17,St=ye<<29|me>>>3,xt=me<<29|ye>>>3,$t=ge<<28|be>>>4,zt=be<<28|ge>>>4,Ct=we<<23|ke>>>9,Pt=ke<<23|we>>>9,Et=Se<<25|xe>>>7,Ht=xe<<25|Se>>>7,Tt=$e<<21|ze>>>11,Bt=ze<<21|$e>>>11,Nt=Pe<<24|Ce>>>8,qt=Ce<<24|Pe>>>8,Dt=Ee<<27|He>>>5,Ut=He<<27|Ee>>>5,Ft=Te<<20|Be>>>12,Lt=Be<<20|Te>>>12,At=qe<<7|Ne>>>25,Mt=Ne<<7|qe>>>25,Wt=De<<8|Ue>>>24,Ot=Ue<<8|De>>>24,jt=Fe<<14|Le>>>18,It=Le<<14|Fe>>>18;t[0]=J^~st>,t[1]=Q^~ct&bt,t[10]=$t^~Ft&Z,t[11]=zt^~Lt&tt,t[20]=it^~mt&Et,t[21]=rt^~yt&Ht,t[30]=Dt^~X<,t[31]=Ut^~Y&ut,t[40]=dt^~Ct&At,t[41]=vt^~Pt&Mt,t[2]=st^~gt&Tt,t[3]=ct^~bt&Bt,t[12]=Ft^~Z&at,t[13]=Lt^~tt&ft,t[22]=mt^~Et&Wt,t[23]=yt^~Ht&Ot,t[32]=X^~lt&kt,t[33]=Y^~ut&wt,t[42]=Ct^~At&et,t[43]=Pt^~Mt&nt,t[4]=gt^~Tt&jt,t[5]=bt^~Bt&It,t[14]=Z^~at&St,t[15]=tt^~ft&xt,t[24]=Et^~Wt&_t,t[25]=Ht^~Ot&ot,t[34]=lt^~kt&Nt,t[35]=ut^~wt&qt,t[44]=At^~et&ht,t[45]=Mt^~nt&pt,t[6]=Tt^~jt&J,t[7]=Bt^~It&Q,t[16]=at^~St&$t,t[17]=ft^~xt&zt,t[26]=Wt^~_t&it,t[27]=Ot^~ot&rt,t[36]=kt^~Nt&Dt,t[37]=wt^~qt&Ut,t[46]=et^~ht&dt,t[47]=nt^~pt&vt,t[8]=jt^~J&st,t[9]=It^~Q&ct,t[18]=St^~$t&Ft,t[19]=xt^~zt&Lt,t[28]=_t^~it&mt,t[29]=ot^~rt&yt,t[38]=Nt^~Dt&X,t[39]=qt^~Ut&Y,t[48]=ht^~dt&Ct,t[49]=pt^~vt&Pt,t[0]^=Ae[e*2],t[1]^=Ae[e*2+1]}};const V=tn;function F(){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}F.prototype.initialize=function(t,e){for(let n=0;n<50;++n)this.state[n]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1};F.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(V.p1600(this.state),this.count=0)};F.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<8*(this.count%4),t&128&&this.count===this.blockSize-1&&V.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),V.p1600(this.state),this.count=0,this.squeezing=!0};F.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const e=S.Buffer.alloc(t);for(let n=0;n<t;++n)e[n]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(V.p1600(this.state),this.count=0);return e};F.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing};var En=F,Hn=Pn(En);function en(t){var e,n,_="";if(typeof t=="string"||typeof t=="number")_+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=en(t[e]))&&(_&&(_+=" "),_+=n);else for(e in t)t[e]&&(_&&(_+=" "),_+=e);return _}function Me(){for(var t,e,n=0,_="";n<arguments.length;)(t=arguments[n++])&&(e=en(t))&&(_&&(_+=" "),_+=e);return _}const Tn=Object.freeze(Object.defineProperty({__proto__:null,clsx:Me,default:Me},Symbol.toStringTag,{value:"Module"})),Bn=S.getAugmentedNamespace(Tn);var O,m,nn,_n,B,We,on,Vt,Yt,Kt,Gt,rn,W={},sn=[],Nn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,G=Array.isArray;function $(t,e){for(var n in e)t[n]=e[n];return t}function cn(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Jt(t,e,n){var _,o,i,c={};for(i in e)i=="key"?_=e[i]:i=="ref"?o=e[i]:c[i]=e[i];if(arguments.length>2&&(c.children=arguments.length>3?O.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)c[i]===void 0&&(c[i]=t.defaultProps[i]);return A(t,c,_,o,null)}function A(t,e,n,_,o){var i={type:t,props:e,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++nn,__i:-1,__u:0};return o==null&&m.vnode!=null&&m.vnode(i),i}function qn(){return{current:null}}function j(t){return t.children}function M(t,e){this.props=t,this.context=e}function D(t,e){if(e==null)return t.__?D(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?D(t):null}function ln(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return ln(t)}}function Qt(t){(!t.__d&&(t.__d=!0)&&B.push(t)&&!K.__r++||We!==m.debounceRendering)&&((We=m.debounceRendering)||on)(K)}function K(){var t,e,n,_,o,i,c,l;for(B.sort(Vt);t=B.shift();)t.__d&&(e=B.length,_=void 0,i=(o=(n=t).__v).__e,c=[],l=[],n.__P&&((_=$({},o)).__v=o.__v+1,m.vnode&&m.vnode(_),Zt(n.__P,_,o,n.__n,n.__P.namespaceURI,32&o.__u?[i]:null,c,i??D(o),!!(32&o.__u),l),_.__v=o.__v,_.__.__k[_.__i]=_,hn(c,_,l),_.__e!=i&&ln(_)),B.length>e&&B.sort(Vt));K.__r=0}function un(t,e,n,_,o,i,c,l,f,u,h){var r,a,s,g,k,b=_&&_.__k||sn,p=e.length;for(n.__d=f,Dn(n,e,b),f=n.__d,r=0;r<p;r++)(s=n.__k[r])!=null&&(a=s.__i===-1?W:b[s.__i]||W,s.__i=r,Zt(t,s,a,o,i,c,l,f,u,h),g=s.__e,s.ref&&a.ref!=s.ref&&(a.ref&&te(a.ref,null,s),h.push(s.ref,s.__c||g,s)),k==null&&g!=null&&(k=g),65536&s.__u||a.__k===s.__k?f=an(s,f,t):typeof s.type=="function"&&s.__d!==void 0?f=s.__d:g&&(f=g.nextSibling),s.__d=void 0,s.__u&=-196609);n.__d=f,n.__e=k}function Dn(t,e,n){var _,o,i,c,l,f=e.length,u=n.length,h=u,r=0;for(t.__k=[],_=0;_<f;_++)(o=e[_])!=null&&typeof o!="boolean"&&typeof o!="function"?(c=_+r,(o=t.__k[_]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?A(null,o,null,null,null):G(o)?A(j,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?A(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=t,o.__b=t.__b+1,i=null,(l=o.__i=Un(o,n,c,h))!==-1&&(h--,(i=n[l])&&(i.__u|=131072)),i==null||i.__v===null?(l==-1&&r--,typeof o.type!="function"&&(o.__u|=65536)):l!==c&&(l==c-1?r--:l==c+1?r++:(l>c?r--:r++,o.__u|=65536))):o=t.__k[_]=null;if(h)for(_=0;_<u;_++)(i=n[_])!=null&&!(131072&i.__u)&&(i.__e==t.__d&&(t.__d=D(i)),pn(i,i))}function an(t,e,n){var _,o;if(typeof t.type=="function"){for(_=t.__k,o=0;_&&o<_.length;o++)_[o]&&(_[o].__=t,e=an(_[o],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=D(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function fn(t,e){return e=e||[],t==null||typeof t=="boolean"||(G(t)?t.some(function(n){fn(n,e)}):e.push(t)),e}function Un(t,e,n,_){var o=t.key,i=t.type,c=n-1,l=n+1,f=e[n];if(f===null||f&&o==f.key&&i===f.type&&!(131072&f.__u))return n;if(_>(f!=null&&!(131072&f.__u)?1:0))for(;c>=0||l<e.length;){if(c>=0){if((f=e[c])&&!(131072&f.__u)&&o==f.key&&i===f.type)return c;c--}if(l<e.length){if((f=e[l])&&!(131072&f.__u)&&o==f.key&&i===f.type)return l;l++}}return-1}function Oe(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Nn.test(e)?n:n+"px"}function I(t,e,n,_,o){var i;t:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof _=="string"&&(t.style.cssText=_=""),_)for(e in _)n&&e in n||Oe(t.style,e,"");if(n)for(e in n)_&&n[e]===_[e]||Oe(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")i=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?_?n.u=_.u:(n.u=Yt,t.addEventListener(e,i?Gt:Kt,i)):t.removeEventListener(e,i?Gt:Kt,i);else{if(o=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function je(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Yt++;else if(e.t<n.u)return;return n(m.event?m.event(e):e)}}}function Zt(t,e,n,_,o,i,c,l,f,u){var h,r,a,s,g,k,b,p,v,C,x,E,P,L,H,q,w=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(f=!!(32&n.__u),i=[l=e.__e=n.__e]),(h=m.__b)&&h(e);t:if(typeof w=="function")try{if(p=e.props,v="prototype"in w&&w.prototype.render,C=(h=w.contextType)&&_[h.__c],x=h?C?C.props.value:h.__:_,n.__c?b=(r=e.__c=n.__c).__=r.__E:(v?e.__c=r=new w(p,x):(e.__c=r=new M(p,x),r.constructor=w,r.render=Ln),C&&C.sub(r),r.props=p,r.state||(r.state={}),r.context=x,r.__n=_,a=r.__d=!0,r.__h=[],r._sb=[]),v&&r.__s==null&&(r.__s=r.state),v&&w.getDerivedStateFromProps!=null&&(r.__s==r.state&&(r.__s=$({},r.__s)),$(r.__s,w.getDerivedStateFromProps(p,r.__s))),s=r.props,g=r.state,r.__v=e,a)v&&w.getDerivedStateFromProps==null&&r.componentWillMount!=null&&r.componentWillMount(),v&&r.componentDidMount!=null&&r.__h.push(r.componentDidMount);else{if(v&&w.getDerivedStateFromProps==null&&p!==s&&r.componentWillReceiveProps!=null&&r.componentWillReceiveProps(p,x),!r.__e&&(r.shouldComponentUpdate!=null&&r.shouldComponentUpdate(p,r.__s,x)===!1||e.__v===n.__v)){for(e.__v!==n.__v&&(r.props=p,r.state=r.__s,r.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(T){T&&(T.__=e)}),E=0;E<r._sb.length;E++)r.__h.push(r._sb[E]);r._sb=[],r.__h.length&&c.push(r);break t}r.componentWillUpdate!=null&&r.componentWillUpdate(p,r.__s,x),v&&r.componentDidUpdate!=null&&r.__h.push(function(){r.componentDidUpdate(s,g,k)})}if(r.context=x,r.props=p,r.__P=t,r.__e=!1,P=m.__r,L=0,v){for(r.state=r.__s,r.__d=!1,P&&P(e),h=r.render(r.props,r.state,r.context),H=0;H<r._sb.length;H++)r.__h.push(r._sb[H]);r._sb=[]}else do r.__d=!1,P&&P(e),h=r.render(r.props,r.state,r.context),r.state=r.__s;while(r.__d&&++L<25);r.state=r.__s,r.getChildContext!=null&&(_=$($({},_),r.getChildContext())),v&&!a&&r.getSnapshotBeforeUpdate!=null&&(k=r.getSnapshotBeforeUpdate(s,g)),un(t,G(q=h!=null&&h.type===j&&h.key==null?h.props.children:h)?q:[q],e,n,_,o,i,c,l,f,u),r.base=e.__e,e.__u&=-161,r.__h.length&&c.push(r),b&&(r.__E=r.__=null)}catch(T){if(e.__v=null,f||i!=null){for(e.__u|=f?160:32;l&&l.nodeType===8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,e.__e=l}else e.__e=n.__e,e.__k=n.__k;m.__e(T,e,n)}else i==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=Fn(n.__e,e,n,_,o,i,c,f,u);(h=m.diffed)&&h(e)}function hn(t,e,n){e.__d=void 0;for(var _=0;_<n.length;_++)te(n[_],n[++_],n[++_]);m.__c&&m.__c(e,t),t.some(function(o){try{t=o.__h,o.__h=[],t.some(function(i){i.call(o)})}catch(i){m.__e(i,o.__v)}})}function Fn(t,e,n,_,o,i,c,l,f){var u,h,r,a,s,g,k,b=n.props,p=e.props,v=e.type;if(v==="svg"?o="http://www.w3.org/2000/svg":v==="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((s=i[u])&&"setAttribute"in s==!!v&&(v?s.localName===v:s.nodeType===3)){t=s,i[u]=null;break}}if(t==null){if(v===null)return document.createTextNode(p);t=document.createElementNS(o,v,p.is&&p),l&&(m.__m&&m.__m(e,i),l=!1),i=null}if(v===null)b===p||l&&t.data===p||(t.data=p);else{if(i=i&&O.call(t.childNodes),b=n.props||W,!l&&i!=null)for(b={},u=0;u<t.attributes.length;u++)b[(s=t.attributes[u]).name]=s.value;for(u in b)if(s=b[u],u!="children"){if(u=="dangerouslySetInnerHTML")r=s;else if(!(u in p)){if(u=="value"&&"defaultValue"in p||u=="checked"&&"defaultChecked"in p)continue;I(t,u,null,s,o)}}for(u in p)s=p[u],u=="children"?a=s:u=="dangerouslySetInnerHTML"?h=s:u=="value"?g=s:u=="checked"?k=s:l&&typeof s!="function"||b[u]===s||I(t,u,s,b[u],o);if(h)l||r&&(h.__html===r.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(r&&(t.innerHTML=""),un(t,G(a)?a:[a],e,n,_,v==="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,c,i?i[0]:n.__k&&D(n,0),l,f),i!=null)for(u=i.length;u--;)cn(i[u]);l||(u="value",v==="progress"&&g==null?t.removeAttribute("value"):g!==void 0&&(g!==t[u]||v==="progress"&&!g||v==="option"&&g!==b[u])&&I(t,u,g,b[u],o),u="checked",k!==void 0&&k!==t[u]&&I(t,u,k,b[u],o))}return t}function te(t,e,n){try{if(typeof t=="function"){var _=typeof t.__u=="function";_&&t.__u(),_&&e==null||(t.__u=t(e))}else t.current=e}catch(o){m.__e(o,n)}}function pn(t,e,n){var _,o;if(m.unmount&&m.unmount(t),(_=t.ref)&&(_.current&&_.current!==t.__e||te(_,null,e)),(_=t.__c)!=null){if(_.componentWillUnmount)try{_.componentWillUnmount()}catch(i){m.__e(i,e)}_.base=_.__P=null}if(_=t.__k)for(o=0;o<_.length;o++)_[o]&&pn(_[o],e,n||typeof t.type!="function");n||cn(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function Ln(t,e,n){return this.constructor(t,n)}function dn(t,e,n){var _,o,i,c;m.__&&m.__(t,e),o=(_=typeof n=="function")?null:n&&n.__k||e.__k,i=[],c=[],Zt(e,t=(!_&&n||e).__k=Jt(j,null,[t]),o||W,W,e.namespaceURI,!_&&n?[n]:o?null:e.firstChild?O.call(e.childNodes):null,i,!_&&n?n:o?o.__e:e.firstChild,_,c),hn(i,t,c)}function vn(t,e){dn(t,e,vn)}function An(t,e,n){var _,o,i,c,l=$({},t.props);for(i in t.type&&t.type.defaultProps&&(c=t.type.defaultProps),e)i=="key"?_=e[i]:i=="ref"?o=e[i]:l[i]=e[i]===void 0&&c!==void 0?c[i]:e[i];return arguments.length>2&&(l.children=arguments.length>3?O.call(arguments,2):n),A(t.type,l,_||t.key,o||t.ref,null)}function Mn(t,e){var n={__c:e="__cC"+rn++,__:t,Consumer:function(_,o){return _.children(o)},Provider:function(_){var o,i;return this.getChildContext||(o=[],(i={})[e]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(c){this.props.value!==c.value&&o.some(function(l){l.__e=!0,Qt(l)})},this.sub=function(c){o.push(c);var l=c.componentWillUnmount;c.componentWillUnmount=function(){o&&o.splice(o.indexOf(c),1),l&&l.call(c)}}),_.children}};return n.Provider.__=n.Consumer.contextType=n}O=sn.slice,m={__e:function(t,e,n,_){for(var o,i,c;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(t)),c=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,_||{}),c=o.__d),c)return o.__E=o}catch(l){t=l}throw t}},nn=0,_n=function(t){return t!=null&&t.constructor==null},M.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=$({},this.state),typeof t=="function"&&(t=t($({},n),this.props)),t&&$(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Qt(this))},M.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Qt(this))},M.prototype.render=j,B=[],on=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Vt=function(t,e){return t.__v.__b-e.__v.__b},K.__r=0,Yt=0,Kt=je(!1),Gt=je(!0),rn=0;const Wn=Object.freeze(Object.defineProperty({__proto__:null,Component:M,Fragment:j,cloneElement:An,createContext:Mn,createElement:Jt,createRef:qn,h:Jt,hydrate:vn,get isValidElement(){return _n},get options(){return m},render:dn,toChildArray:fn},Symbol.toStringTag,{value:"Module"})),On=S.getAugmentedNamespace(Wn);var z,d,Rt,Ie,U=0,mn=[],y=m,Re=y.__b,Ve=y.__r,Ke=y.diffed,Ge=y.__c,Je=y.unmount,Qe=y.__;function N(t,e){y.__h&&y.__h(d,t,U||e),U=0;var n=d.__H||(d.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function yn(t){return U=1,gn(kn,t)}function gn(t,e,n){var _=N(z++,2);if(_.t=t,!_.__c&&(_.__=[n?n(e):kn(void 0,e),function(l){var f=_.__N?_.__N[0]:_.__[0],u=_.t(f,l);f!==u&&(_.__N=[u,_.__[1]],_.__c.setState({}))}],_.__c=d,!d.u)){var o=function(l,f,u){if(!_.__c.__H)return!0;var h=_.__c.__H.__.filter(function(a){return!!a.__c});if(h.every(function(a){return!a.__N}))return!i||i.call(this,l,f,u);var r=!1;return h.forEach(function(a){if(a.__N){var s=a.__[0];a.__=a.__N,a.__N=void 0,s!==a.__[0]&&(r=!0)}}),!(!r&&_.__c.props===l)&&(!i||i.call(this,l,f,u))};d.u=!0;var i=d.shouldComponentUpdate,c=d.componentWillUpdate;d.componentWillUpdate=function(l,f,u){if(this.__e){var h=i;i=void 0,o(l,f,u),i=h}c&&c.call(this,l,f,u)},d.shouldComponentUpdate=o}return _.__N||_.__}function jn(t,e){var n=N(z++,3);!y.__s&&ne(n.__H,e)&&(n.__=t,n.i=e,d.__H.__h.push(n))}function bn(t,e){var n=N(z++,4);!y.__s&&ne(n.__H,e)&&(n.__=t,n.i=e,d.__h.push(n))}function In(t){return U=5,ee(function(){return{current:t}},[])}function Rn(t,e,n){U=6,bn(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},n==null?n:n.concat(t))}function ee(t,e){var n=N(z++,7);return ne(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Vn(t,e){return U=8,ee(function(){return t},e)}function Kn(t){var e=d.context[t.__c],n=N(z++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(d)),e.props.value):t.__}function Gn(t,e){y.useDebugValue&&y.useDebugValue(e?e(t):t)}function Jn(t){var e=N(z++,10),n=yn();return e.__=t,d.componentDidCatch||(d.componentDidCatch=function(_,o){e.__&&e.__(_,o),n[1](_)}),[n[0],function(){n[1](void 0)}]}function Qn(){var t=N(z++,11);if(!t.__){for(var e=d.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Xn(){for(var t;t=mn.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(R),t.__H.__h.forEach(Xt),t.__H.__h=[]}catch(e){t.__H.__h=[],y.__e(e,t.__v)}}y.__b=function(t){d=null,Re&&Re(t)},y.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Qe&&Qe(t,e)},y.__r=function(t){Ve&&Ve(t),z=0;var e=(d=t.__c).__H;e&&(Rt===d?(e.__h=[],d.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(R),e.__h.forEach(Xt),e.__h=[],z=0)),Rt=d},y.diffed=function(t){Ke&&Ke(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(mn.push(e)!==1&&Ie===y.requestAnimationFrame||((Ie=y.requestAnimationFrame)||Yn)(Xn)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Rt=d=null},y.__c=function(t,e){e.some(function(n){try{n.__h.forEach(R),n.__h=n.__h.filter(function(_){return!_.__||Xt(_)})}catch(_){e.some(function(o){o.__h&&(o.__h=[])}),e=[],y.__e(_,n.__v)}}),Ge&&Ge(t,e)},y.unmount=function(t){Je&&Je(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(_){try{R(_)}catch(o){e=o}}),n.__H=void 0,e&&y.__e(e,n.__v))};var Xe=typeof requestAnimationFrame=="function";function Yn(t){var e,n=function(){clearTimeout(_),Xe&&cancelAnimationFrame(e),setTimeout(t)},_=setTimeout(n,100);Xe&&(e=requestAnimationFrame(n))}function R(t){var e=d,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),d=e}function Xt(t){var e=d;t.__c=t.__(),d=e}function ne(t,e){return!t||t.length!==e.length||e.some(function(n,_){return n!==t[_]})}function kn(t,e){return typeof e=="function"?e(t):e}const Zn=Object.freeze(Object.defineProperty({__proto__:null,useCallback:Vn,useContext:Kn,useDebugValue:Gn,useEffect:jn,useErrorBoundary:Jn,useId:Qn,useImperativeHandle:Rn,useLayoutEffect:bn,useMemo:ee,useReducer:gn,useRef:In,useState:yn},Symbol.toStringTag,{value:"Module"})),t_=S.getAugmentedNamespace(Zn);exports.js=Hn;exports.require$$0=Bn;exports.require$$1=On;exports.require$$2=t_;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CUE8WypA.cjs"),O=require("./W3MFrameProviderSingleton-Djv3DKHQ.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./W3MFrameProviderSingleton-EBSNGCyS.cjs"),N=require("./wagmi-BydfAFoJ.cjs"),P=()=>"9.1.0",Ge=e=>e.toString(16).padStart(2,"0"),We=e=>{const n=new Uint8Array(e/2);return window.crypto.getRandomValues(n),Array.from(n,Ge).join("")},qe=()=>typeof window<"u"?We(10):new Date().getTime().toString(36);class O{}O.makeRequest=(e,n)=>({id:qe(),method:e,params:n,env:{sdkVersion:P()}});O.makeResponse=(e,n,t)=>({id:e,success:!0,version:t,data:n});O.makeErrorResponse=(e,n,t)=>({id:e,success:!1,error:n,version:t});exports.Methods=void 0;(function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage",e.signTypedMessage="signTypedMessage",e.getEnvironmentInfo="getEnvironmentInfo",e.getOffChainSignature="getOffChainSignature",e.requestAddressBook="requestAddressBook",e.wallet_getPermissions="wallet_getPermissions",e.wallet_requestPermissions="wallet_requestPermissions"})(exports.Methods||(exports.Methods={}));exports.RestrictedMethods=void 0;(function(e){e.requestAddressBook="requestAddressBook"})(exports.RestrictedMethods||(exports.RestrictedMethods={}));class Ve{constructor(n=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:i,data:r,source:s})=>{const u=!r,l=!this.isServer&&s===window.parent,g=typeof r.version<"u"&&parseInt(r.version.split(".")[0]),A=typeof g=="number"&&g>=1;let h=!0;return Array.isArray(this.allowedOrigins)&&(h=this.allowedOrigins.find(I=>I.test(i))!==void 0),!u&&l&&A&&h},this.logIncomingMessage=i=>{console.info(`Safe Apps SDK v1: A message was received from origin ${i.origin}. `,i.data)},this.onParentMessage=i=>{this.isValidMessage(i)&&(this.debugMode&&this.logIncomingMessage(i),this.handleIncomingMessage(i.data))},this.handleIncomingMessage=i=>{const{id:r}=i,s=this.callbacks.get(r);s&&(s(i),this.callbacks.delete(r))},this.send=(i,r)=>{const s=O.makeRequest(i,r);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(s,"*"),new Promise((u,l)=>{this.callbacks.set(s.id,g=>{if(!g.success){l(new Error(g.error));return}u(g)})})},this.allowedOrigins=n,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}}const R=e=>typeof e=="object"&&e!=null&&"domain"in e&&"types"in e&&"message"in e;var Fe={},E={},_={},M=m.commonjsGlobal&&m.commonjsGlobal.__awaiter||function(e,n,t,i){function r(s){return s instanceof t?s:new t(function(u){u(s)})}return new(t||(t=Promise))(function(s,u){function l(h){try{A(i.next(h))}catch(I){u(I)}}function g(h){try{A(i.throw(h))}catch(I){u(I)}}function A(h){h.done?s(h.value):r(h.value).then(l,g)}A((i=i.apply(e,n||[])).next())})};Object.defineProperty(_,"__esModule",{value:!0});_.getData=_.fetchData=_.stringifyQuery=_.insertParams=void 0;const ke=e=>typeof e=="object"&&e!==null&&"code"in e&&"message"in e;function Ke(e,n,t){return e.replace(new RegExp(`\\{${n}\\}`,"g"),t)}function Xe(e,n){return n?Object.keys(n).reduce((t,i)=>Ke(t,i,String(n[i])),e):e}_.insertParams=Xe;function Qe(e){if(!e)return"";const n=new URLSearchParams;Object.keys(e).forEach(i=>{e[i]!=null&&n.append(i,String(e[i]))});const t=n.toString();return t?`?${t}`:""}_.stringifyQuery=Qe;function p(e){return M(this,void 0,void 0,function*(){let n;try{n=yield e.json()}catch{n={}}if(!e.ok){const t=ke(n)?`CGW error - ${n.code}: ${n.message}`:`CGW error - status ${e.statusText}`;throw new Error(t)}return n})}function $e(e,n,t,i,r){return M(this,void 0,void 0,function*(){const s=Object.assign({"Content-Type":"application/json"},i),u={method:n??"POST",headers:s};r&&(u.credentials=r),t!=null&&(u.body=typeof t=="string"?t:JSON.stringify(t));const l=yield fetch(e,u);return p(l)})}_.fetchData=$e;function Ye(e,n,t){return M(this,void 0,void 0,function*(){const i={method:"GET"};n&&(i.headers=Object.assign(Object.assign({},n),{"Content-Type":"application/json"})),t&&(i.credentials=t);const r=yield fetch(e,i);return p(r)})}_.getData=Ye;Object.defineProperty(E,"__esModule",{value:!0});E.getEndpoint=E.deleteEndpoint=E.putEndpoint=E.postEndpoint=void 0;const S=_;function C(e,n,t,i){const r=(0,S.insertParams)(n,t),s=(0,S.stringifyQuery)(i);return`${e}${r}${s}`}function Je(e,n,t){const i=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.fetchData)(i,"POST",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.postEndpoint=Je;function ze(e,n,t){const i=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.fetchData)(i,"PUT",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.putEndpoint=ze;function Ze(e,n,t){const i=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.fetchData)(i,"DELETE",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.deleteEndpoint=Ze;function xe(e,n,t,i){if(i)return(0,S.getData)(i,void 0,t==null?void 0:t.credentials);const r=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.getData)(r,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.getEndpoint=xe;var b={};Object.defineProperty(b,"__esModule",{value:!0});b.DEFAULT_BASE_URL=void 0;b.DEFAULT_BASE_URL="https://safe-client.safe.global";var L={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationVersionState=void 0,function(n){n.UP_TO_DATE="UP_TO_DATE",n.OUTDATED="OUTDATED",n.UNKNOWN="UNKNOWN"}(e.ImplementationVersionState||(e.ImplementationVersionState={}))})(L);var B={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppSocialPlatforms=e.SafeAppFeatures=e.SafeAppAccessPolicyTypes=void 0,function(n){n.NoRestrictions="NO_RESTRICTIONS",n.DomainAllowlist="DOMAIN_ALLOWLIST"}(e.SafeAppAccessPolicyTypes||(e.SafeAppAccessPolicyTypes={})),function(n){n.BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS"}(e.SafeAppFeatures||(e.SafeAppFeatures={})),function(n){n.TWITTER="TWITTER",n.GITHUB="GITHUB",n.DISCORD="DISCORD"}(e.SafeAppSocialPlatforms||(e.SafeAppSocialPlatforms={}))})(B);var H={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LabelValue=e.StartTimeValue=e.DurationType=e.DetailedExecutionInfoType=e.TransactionListItemType=e.ConflictType=e.TransactionInfoType=e.SettingsInfoType=e.TransactionTokenType=e.TransferDirection=e.TransactionStatus=e.Operation=void 0,function(n){n[n.CALL=0]="CALL",n[n.DELEGATE=1]="DELEGATE"}(e.Operation||(e.Operation={})),function(n){n.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",n.AWAITING_EXECUTION="AWAITING_EXECUTION",n.CANCELLED="CANCELLED",n.FAILED="FAILED",n.SUCCESS="SUCCESS"}(e.TransactionStatus||(e.TransactionStatus={})),function(n){n.INCOMING="INCOMING",n.OUTGOING="OUTGOING",n.UNKNOWN="UNKNOWN"}(e.TransferDirection||(e.TransferDirection={})),function(n){n.ERC20="ERC20",n.ERC721="ERC721",n.NATIVE_COIN="NATIVE_COIN"}(e.TransactionTokenType||(e.TransactionTokenType={})),function(n){n.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",n.ADD_OWNER="ADD_OWNER",n.REMOVE_OWNER="REMOVE_OWNER",n.SWAP_OWNER="SWAP_OWNER",n.CHANGE_THRESHOLD="CHANGE_THRESHOLD",n.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",n.ENABLE_MODULE="ENABLE_MODULE",n.DISABLE_MODULE="DISABLE_MODULE",n.SET_GUARD="SET_GUARD",n.DELETE_GUARD="DELETE_GUARD"}(e.SettingsInfoType||(e.SettingsInfoType={})),function(n){n.TRANSFER="Transfer",n.SETTINGS_CHANGE="SettingsChange",n.CUSTOM="Custom",n.CREATION="Creation",n.SWAP_ORDER="SwapOrder",n.TWAP_ORDER="TwapOrder",n.SWAP_TRANSFER="SwapTransfer"}(e.TransactionInfoType||(e.TransactionInfoType={})),function(n){n.NONE="None",n.HAS_NEXT="HasNext",n.END="End"}(e.ConflictType||(e.ConflictType={})),function(n){n.TRANSACTION="TRANSACTION",n.LABEL="LABEL",n.CONFLICT_HEADER="CONFLICT_HEADER",n.DATE_LABEL="DATE_LABEL"}(e.TransactionListItemType||(e.TransactionListItemType={})),function(n){n.MULTISIG="MULTISIG",n.MODULE="MODULE"}(e.DetailedExecutionInfoType||(e.DetailedExecutionInfoType={})),function(n){n.AUTO="AUTO",n.LIMIT_DURATION="LIMIT_DURATION"}(e.DurationType||(e.DurationType={})),function(n){n.AT_MINING_TIME="AT_MINING_TIME",n.AT_EPOCH="AT_EPOCH"}(e.StartTimeValue||(e.StartTimeValue={})),function(n){n.Queued="Queued",n.Next="Next"}(e.LabelValue||(e.LabelValue={}))})(H);var j={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FEATURES=e.GAS_PRICE_TYPE=e.RPC_AUTHENTICATION=void 0,function(n){n.API_KEY_PATH="API_KEY_PATH",n.NO_AUTHENTICATION="NO_AUTHENTICATION",n.UNKNOWN="UNKNOWN"}(e.RPC_AUTHENTICATION||(e.RPC_AUTHENTICATION={})),function(n){n.ORACLE="ORACLE",n.FIXED="FIXED",n.FIXED_1559="FIXED1559",n.UNKNOWN="UNKNOWN"}(e.GAS_PRICE_TYPE||(e.GAS_PRICE_TYPE={})),function(n){n.ERC721="ERC721",n.SAFE_APPS="SAFE_APPS",n.CONTRACT_INTERACTION="CONTRACT_INTERACTION",n.DOMAIN_LOOKUP="DOMAIN_LOOKUP",n.SPENDING_LIMIT="SPENDING_LIMIT",n.EIP1559="EIP1559",n.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",n.TX_SIMULATION="TX_SIMULATION",n.EIP1271="EIP1271"}(e.FEATURES||(e.FEATURES={}))})(j);var U={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TokenType=void 0,function(n){n.ERC20="ERC20",n.ERC721="ERC721",n.NATIVE_TOKEN="NATIVE_TOKEN"}(e.TokenType||(e.TokenType={}))})(U);var G={};Object.defineProperty(G,"__esModule",{value:!0});var W={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfirmationViewTypes=void 0,function(n){n.COW_SWAP_ORDER="COW_SWAP_ORDER",n.COW_SWAP_TWAP_ORDER="COW_SWAP_TWAP_ORDER"}(e.ConfirmationViewTypes||(e.ConfirmationViewTypes={}))})(W);var q={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeMessageStatus=e.SafeMessageListItemType=void 0,function(n){n.DATE_LABEL="DATE_LABEL",n.MESSAGE="MESSAGE"}(e.SafeMessageListItemType||(e.SafeMessageListItemType={})),function(n){n.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",n.CONFIRMED="CONFIRMED"}(e.SafeMessageStatus||(e.SafeMessageStatus={}))})(q);var V={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceType=void 0,function(n){n.ANDROID="ANDROID",n.IOS="IOS",n.WEB="WEB"}(e.DeviceType||(e.DeviceType={}))})(V);var F={};Object.defineProperty(F,"__esModule",{value:!0});(function(e){var n=m.commonjsGlobal&&m.commonjsGlobal.__createBinding||(Object.create?function(a,c,o,d){d===void 0&&(d=o);var v=Object.getOwnPropertyDescriptor(c,o);(!v||("get"in v?!c.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return c[o]}}),Object.defineProperty(a,d,v)}:function(a,c,o,d){d===void 0&&(d=o),a[d]=c[o]}),t=m.commonjsGlobal&&m.commonjsGlobal.__exportStar||function(a,c){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(c,o)&&n(c,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.deleteAccount=e.getAccount=e.createAccount=e.verifyAuth=e.getAuthNonce=e.getContract=e.getSafeOverviews=e.unsubscribeAll=e.unsubscribeSingle=e.registerRecoveryModule=e.deleteRegisteredEmail=e.getRegisteredEmail=e.verifyEmail=e.resendEmailVerificationCode=e.changeEmail=e.registerEmail=e.unregisterDevice=e.unregisterSafe=e.registerDevice=e.getDelegates=e.confirmSafeMessage=e.proposeSafeMessage=e.getSafeMessage=e.getSafeMessages=e.getDecodedData=e.getMasterCopies=e.getSafeApps=e.getChainConfig=e.getChainsConfig=e.getConfirmationView=e.proposeTransaction=e.getNonces=e.postSafeGasEstimation=e.deleteTransaction=e.getTransactionDetails=e.getTransactionQueue=e.getTransactionHistory=e.getCollectiblesPage=e.getCollectibles=e.getAllOwnedSafes=e.getOwnedSafes=e.getFiatCurrencies=e.getBalances=e.getMultisigTransactions=e.getModuleTransactions=e.getIncomingTransfers=e.getSafeInfo=e.getRelayCount=e.relayTransaction=e.setBaseUrl=void 0,e.putAccountDataSettings=e.getAccountDataSettings=e.getAccountDataTypes=void 0;const i=E,r=b;t(L,e),t(B,e),t(H,e),t(j,e),t(U,e),t(G,e),t(W,e),t(q,e),t(V,e),t(F,e);let s=r.DEFAULT_BASE_URL;const u=a=>{s=a};e.setBaseUrl=u;function l(a,c){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/relay",{path:{chainId:a},body:c})}e.relayTransaction=l;function g(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/relay/{address}",{path:{chainId:a,address:c}})}e.getRelayCount=g;function A(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:a,address:c}})}e.getSafeInfo=A;function h(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:a,address:c},query:o},d)}e.getIncomingTransfers=h;function I(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:a,address:c},query:o},d)}e.getModuleTransactions=I;function X(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:a,address:c},query:o},d)}e.getMultisigTransactions=X;function Q(a,c,o="usd",d={}){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:a,address:c,currency:o},query:d})}e.getBalances=Q;function $(){return(0,i.getEndpoint)(s,"/v1/balances/supported-fiat-codes")}e.getFiatCurrencies=$;function Y(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:a,address:c}})}e.getOwnedSafes=Y;function J(a){return(0,i.getEndpoint)(s,"/v1/owners/{address}/safes",{path:{address:a}})}e.getAllOwnedSafes=J;function z(a,c,o={}){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:a,address:c},query:o})}e.getCollectibles=z;function Z(a,c,o={},d){return(0,i.getEndpoint)(s,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:a,address:c},query:o},d)}e.getCollectiblesPage=Z;function x(a,c,o={},d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:a,safe_address:c},query:o},d)}e.getTransactionHistory=x;function ee(a,c,o={},d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:a,safe_address:c},query:o},d)}e.getTransactionQueue=ee;function ne(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:a,transactionId:c}})}e.getTransactionDetails=ne;function te(a,c,o){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/transactions/{safeTxHash}",{path:{chainId:a,safeTxHash:c},body:{signature:o}})}e.deleteTransaction=te;function ie(a,c,o){return(0,i.postEndpoint)(s,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:a,safe_address:c},body:o})}e.postSafeGasEstimation=ie;function ae(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/nonces",{path:{chainId:a,safe_address:c}})}e.getNonces=ae;function se(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:a,safe_address:c},body:o})}e.proposeTransaction=se;function ce(a,c,o,d){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/views/transaction-confirmation",{path:{chainId:a,safe_address:c},body:{data:o,to:d}})}e.getConfirmationView=ce;function oe(a){return(0,i.getEndpoint)(s,"/v1/chains",{query:a})}e.getChainsConfig=oe;function re(a){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}",{path:{chainId:a}})}e.getChainConfig=re;function de(a,c={}){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safe-apps",{path:{chainId:a},query:c})}e.getSafeApps=de;function ue(a){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:a}})}e.getMasterCopies=ue;function le(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/data-decoder",{path:{chainId:a},body:{data:c,to:o}})}e.getDecodedData=le;function fe(a,c,o){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:a,safe_address:c},query:{}},o)}e.getSafeMessages=fe;function ge(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:a,message_hash:c}})}e.getSafeMessage=ge;function he(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:a,safe_address:c},body:o})}e.proposeSafeMessage=he;function Ee(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:a,message_hash:c},body:o})}e.confirmSafeMessage=Ee;function _e(a,c={}){return(0,i.getEndpoint)(s,"/v2/chains/{chainId}/delegates",{path:{chainId:a},query:c})}e.getDelegates=_e;function Te(a){return(0,i.postEndpoint)(s,"/v1/register/notifications",{body:a})}e.registerDevice=Te;function ve(a,c,o){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safe_address}",{path:{chainId:a,safe_address:c,uuid:o}})}e.unregisterSafe=ve;function Ae(a,c){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/notifications/devices/{uuid}",{path:{chainId:a,uuid:c}})}e.unregisterDevice=Ae;function Ie(a,c,o,d){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails",{path:{chainId:a,safe_address:c},body:o,headers:d})}e.registerEmail=Ie;function Se(a,c,o,d,v){return(0,i.putEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:a,safe_address:c,signer:o},body:d,headers:v})}e.changeEmail=Se;function me(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify-resend",{path:{chainId:a,safe_address:c,signer:o},body:""})}e.resendEmailVerificationCode=me;function ye(a,c,o,d){return(0,i.putEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify",{path:{chainId:a,safe_address:c,signer:o},body:d})}e.verifyEmail=ye;function Oe(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:a,safe_address:c,signer:o},headers:d})}e.getRegisteredEmail=Oe;function Ne(a,c,o,d){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:a,safe_address:c,signer:o},headers:d})}e.deleteRegisteredEmail=Ne;function Ce(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/recovery",{path:{chainId:a,safe_address:c},body:o})}e.registerRecoveryModule=Ce;function be(a){return(0,i.deleteEndpoint)(s,"/v1/subscriptions",{query:a})}e.unsubscribeSingle=be;function De(a){return(0,i.deleteEndpoint)(s,"/v1/subscriptions/all",{query:a})}e.unsubscribeAll=De;function Re(a,c){return(0,i.getEndpoint)(s,"/v1/safes",{query:Object.assign(Object.assign({},c),{safes:a.join(",")})})}e.getSafeOverviews=Re;function Me(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/contracts/{contractAddress}",{path:{chainId:a,contractAddress:c}})}e.getContract=Me;function we(){return(0,i.getEndpoint)(s,"/v1/auth/nonce",{credentials:"include"})}e.getAuthNonce=we;function Pe(a){return(0,i.postEndpoint)(s,"/v1/auth/verify",{body:a,credentials:"include"})}e.verifyAuth=Pe;function pe(a){return(0,i.postEndpoint)(s,"/v1/accounts",{body:a,credentials:"include"})}e.createAccount=pe;function Le(a){return(0,i.getEndpoint)(s,"/v1/accounts/{address}",{path:{address:a},credentials:"include"})}e.getAccount=Le;function Be(a){return(0,i.deleteEndpoint)(s,"/v1/accounts/{address}",{path:{address:a},credentials:"include"})}e.deleteAccount=Be;function He(){return(0,i.getEndpoint)(s,"/v1/accounts/data-types")}e.getAccountDataTypes=He;function je(a){return(0,i.getEndpoint)(s,"/v1/accounts/{address}/data-settings",{path:{address:a},credentials:"include"})}e.getAccountDataSettings=je;function Ue(a,c){return(0,i.putEndpoint)(s,"/v1/accounts/{address}/data-settings",{path:{address:a},body:c,credentials:"include"})}e.putAccountDataSettings=Ue})(Fe);class en{constructor(n){this.communicator=n}async getBySafeTxHash(n){if(!n)throw new Error("Invalid safeTxHash");return(await this.communicator.send(exports.Methods.getTxBySafeTxHash,{safeTxHash:n})).data}async signMessage(n){const t={message:n};return(await this.communicator.send(exports.Methods.signMessage,t)).data}async signTypedMessage(n){if(!R(n))throw new Error("Invalid typed data");return(await this.communicator.send(exports.Methods.signTypedMessage,{typedData:n})).data}async send({txs:n,params:t}){if(!n||!n.length)throw new Error("No transactions were passed");const i={txs:n,params:t};return(await this.communicator.send(exports.Methods.sendTransactions,i)).data}}const f={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"},T={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};class nn{constructor(n){this.communicator=n,this.call=this.buildRequest({call:f.eth_call,formatters:[null,T.defaultBlockParam]}),this.getBalance=this.buildRequest({call:f.eth_getBalance,formatters:[null,T.defaultBlockParam]}),this.getCode=this.buildRequest({call:f.eth_getCode,formatters:[null,T.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:f.eth_getStorageAt,formatters:[null,T.blockNumberToHex,T.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:f.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:f.eth_getBlockByHash,formatters:[null,T.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:f.eth_getBlockByNumber,formatters:[T.blockNumberToHex,T.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:f.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:f.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:f.eth_getTransactionCount,formatters:[null,T.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:f.eth_gasPrice}),this.getEstimateGas=t=>this.buildRequest({call:f.eth_estimateGas})([t]),this.setSafeSettings=this.buildRequest({call:f.safe_setSettings})}buildRequest(n){const{call:t,formatters:i}=n;return async r=>{i&&Array.isArray(r)&&i.forEach((l,g)=>{l&&(r[g]=l(r[g]))});const s={call:t,params:r||[]};return(await this.communicator.send(exports.Methods.rpcCall,s)).data}}}const tn="0x1626ba7e",an="0x20c13b0b",D=4001;class y extends Error{constructor(n,t,i){super(n),this.code=t,this.data=i,Object.setPrototypeOf(this,y.prototype)}}class k{constructor(n){this.communicator=n}async getPermissions(){return(await this.communicator.send(exports.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(n){if(!this.isPermissionRequestValid(n))throw new y("Permissions request is invalid",D);try{return(await this.communicator.send(exports.Methods.wallet_requestPermissions,n)).data}catch{throw new y("Permissions rejected",D)}}isPermissionRequestValid(n){return n.every(t=>typeof t=="object"?Object.keys(t).every(i=>!!Object.values(exports.RestrictedMethods).includes(i)):!1)}}const w=(e,n)=>n.some(t=>t.parentCapability===e),sn=()=>(e,n,t)=>{const i=t.value;return t.value=async function(){const r=new k(this.communicator);let s=await r.getPermissions();if(w(n,s)||(s=await r.requestPermissions([{[n]:{}}])),!w(n,s))throw new y("Permissions rejected",D);return i.apply(this)},t};var cn=function(e,n,t,i){var r=arguments.length,s=r<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,t):i,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,n,t,i);else for(var l=e.length-1;l>=0;l--)(u=e[l])&&(s=(r<3?u(s):r>3?u(n,t,s):u(n,t))||s);return r>3&&s&&Object.defineProperty(n,t,s),s};class K{constructor(n){this.communicator=n}async getChainInfo(){return(await this.communicator.send(exports.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(exports.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:n="usd"}={}){return(await this.communicator.send(exports.Methods.getSafeBalances,{currency:n})).data}async check1271Signature(n,t="0x"){const i=await this.getInfo(),r=N.encodeFunctionData({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[n,t]}),s={call:f.eth_call,params:[{to:i.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(exports.Methods.rpcCall,s)).data.slice(0,10).toLowerCase()===tn}catch{return!1}}async check1271SignatureBytes(n,t="0x"){const i=await this.getInfo(),r=N.encodeFunctionData({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[n,t]}),s={call:f.eth_call,params:[{to:i.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(exports.Methods.rpcCall,s)).data.slice(0,10).toLowerCase()===an}catch{return!1}}calculateMessageHash(n){return N.hashMessage(n)}calculateTypedMessageHash(n){const t=typeof n.domain.chainId=="object"?n.domain.chainId.toNumber():Number(n.domain.chainId);let i=n.primaryType;if(!i){const r=Object.values(n.types),s=Object.keys(n.types).filter(u=>r.every(l=>l.every(({type:g})=>g.replace("[","").replace("]","")!==u)));if(s.length===0||s.length>1)throw new Error("Please specify primaryType");i=s[0]}return N.hashTypedData({message:n.message,domain:{...n.domain,chainId:t,verifyingContract:n.domain.verifyingContract,salt:n.domain.salt},types:n.types,primaryType:i})}async getOffChainSignature(n){return(await this.communicator.send(exports.Methods.getOffChainSignature,n)).data}async isMessageSigned(n,t="0x"){let i;if(typeof n=="string"&&(i=async()=>{const r=this.calculateMessageHash(n);return await this.isMessageHashSigned(r,t)}),R(n)&&(i=async()=>{const r=this.calculateTypedMessageHash(n);return await this.isMessageHashSigned(r,t)}),i)return await i();throw new Error("Invalid message type")}async isMessageHashSigned(n,t="0x"){const i=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const r of i)if(await r(n,t))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(exports.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(exports.Methods.requestAddressBook,void 0)).data}}cn([sn()],K.prototype,"requestAddressBook",null);class on{constructor(n={}){const{allowedDomains:t=null,debug:i=!1}=n;this.communicator=new Ve(t,i),this.eth=new nn(this.communicator),this.txs=new en(this.communicator),this.safe=new K(this.communicator),this.wallet=new k(this.communicator)}}exports.MessageFormatter=O;exports.RPC_CALLS=f;exports.default=on;exports.getSDKVersion=P;exports.isObjectEIP712TypedData=R;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./W3MFrameProviderSingleton-Djv3DKHQ.cjs"),N=require("./wagmi-DYp-Wfqq.cjs"),P=()=>"9.1.0",Ge=e=>e.toString(16).padStart(2,"0"),We=e=>{const n=new Uint8Array(e/2);return window.crypto.getRandomValues(n),Array.from(n,Ge).join("")},qe=()=>typeof window<"u"?We(10):new Date().getTime().toString(36);class O{}O.makeRequest=(e,n)=>({id:qe(),method:e,params:n,env:{sdkVersion:P()}});O.makeResponse=(e,n,t)=>({id:e,success:!0,version:t,data:n});O.makeErrorResponse=(e,n,t)=>({id:e,success:!1,error:n,version:t});exports.Methods=void 0;(function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage",e.signTypedMessage="signTypedMessage",e.getEnvironmentInfo="getEnvironmentInfo",e.getOffChainSignature="getOffChainSignature",e.requestAddressBook="requestAddressBook",e.wallet_getPermissions="wallet_getPermissions",e.wallet_requestPermissions="wallet_requestPermissions"})(exports.Methods||(exports.Methods={}));exports.RestrictedMethods=void 0;(function(e){e.requestAddressBook="requestAddressBook"})(exports.RestrictedMethods||(exports.RestrictedMethods={}));class Ve{constructor(n=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:i,data:r,source:s})=>{const u=!r,l=!this.isServer&&s===window.parent,g=typeof r.version<"u"&&parseInt(r.version.split(".")[0]),A=typeof g=="number"&&g>=1;let h=!0;return Array.isArray(this.allowedOrigins)&&(h=this.allowedOrigins.find(I=>I.test(i))!==void 0),!u&&l&&A&&h},this.logIncomingMessage=i=>{console.info(`Safe Apps SDK v1: A message was received from origin ${i.origin}. `,i.data)},this.onParentMessage=i=>{this.isValidMessage(i)&&(this.debugMode&&this.logIncomingMessage(i),this.handleIncomingMessage(i.data))},this.handleIncomingMessage=i=>{const{id:r}=i,s=this.callbacks.get(r);s&&(s(i),this.callbacks.delete(r))},this.send=(i,r)=>{const s=O.makeRequest(i,r);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(s,"*"),new Promise((u,l)=>{this.callbacks.set(s.id,g=>{if(!g.success){l(new Error(g.error));return}u(g)})})},this.allowedOrigins=n,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}}const R=e=>typeof e=="object"&&e!=null&&"domain"in e&&"types"in e&&"message"in e;var Fe={},E={},_={},M=m.commonjsGlobal&&m.commonjsGlobal.__awaiter||function(e,n,t,i){function r(s){return s instanceof t?s:new t(function(u){u(s)})}return new(t||(t=Promise))(function(s,u){function l(h){try{A(i.next(h))}catch(I){u(I)}}function g(h){try{A(i.throw(h))}catch(I){u(I)}}function A(h){h.done?s(h.value):r(h.value).then(l,g)}A((i=i.apply(e,n||[])).next())})};Object.defineProperty(_,"__esModule",{value:!0});_.getData=_.fetchData=_.stringifyQuery=_.insertParams=void 0;const ke=e=>typeof e=="object"&&e!==null&&"code"in e&&"message"in e;function Ke(e,n,t){return e.replace(new RegExp(`\\{${n}\\}`,"g"),t)}function Xe(e,n){return n?Object.keys(n).reduce((t,i)=>Ke(t,i,String(n[i])),e):e}_.insertParams=Xe;function Qe(e){if(!e)return"";const n=new URLSearchParams;Object.keys(e).forEach(i=>{e[i]!=null&&n.append(i,String(e[i]))});const t=n.toString();return t?`?${t}`:""}_.stringifyQuery=Qe;function p(e){return M(this,void 0,void 0,function*(){let n;try{n=yield e.json()}catch{n={}}if(!e.ok){const t=ke(n)?`CGW error - ${n.code}: ${n.message}`:`CGW error - status ${e.statusText}`;throw new Error(t)}return n})}function $e(e,n,t,i,r){return M(this,void 0,void 0,function*(){const s=Object.assign({"Content-Type":"application/json"},i),u={method:n??"POST",headers:s};r&&(u.credentials=r),t!=null&&(u.body=typeof t=="string"?t:JSON.stringify(t));const l=yield fetch(e,u);return p(l)})}_.fetchData=$e;function Ye(e,n,t){return M(this,void 0,void 0,function*(){const i={method:"GET"};n&&(i.headers=Object.assign(Object.assign({},n),{"Content-Type":"application/json"})),t&&(i.credentials=t);const r=yield fetch(e,i);return p(r)})}_.getData=Ye;Object.defineProperty(E,"__esModule",{value:!0});E.getEndpoint=E.deleteEndpoint=E.putEndpoint=E.postEndpoint=void 0;const S=_;function C(e,n,t,i){const r=(0,S.insertParams)(n,t),s=(0,S.stringifyQuery)(i);return`${e}${r}${s}`}function Je(e,n,t){const i=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.fetchData)(i,"POST",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.postEndpoint=Je;function ze(e,n,t){const i=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.fetchData)(i,"PUT",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.putEndpoint=ze;function Ze(e,n,t){const i=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.fetchData)(i,"DELETE",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.deleteEndpoint=Ze;function xe(e,n,t,i){if(i)return(0,S.getData)(i,void 0,t==null?void 0:t.credentials);const r=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.getData)(r,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.getEndpoint=xe;var b={};Object.defineProperty(b,"__esModule",{value:!0});b.DEFAULT_BASE_URL=void 0;b.DEFAULT_BASE_URL="https://safe-client.safe.global";var L={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationVersionState=void 0,function(n){n.UP_TO_DATE="UP_TO_DATE",n.OUTDATED="OUTDATED",n.UNKNOWN="UNKNOWN"}(e.ImplementationVersionState||(e.ImplementationVersionState={}))})(L);var B={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppSocialPlatforms=e.SafeAppFeatures=e.SafeAppAccessPolicyTypes=void 0,function(n){n.NoRestrictions="NO_RESTRICTIONS",n.DomainAllowlist="DOMAIN_ALLOWLIST"}(e.SafeAppAccessPolicyTypes||(e.SafeAppAccessPolicyTypes={})),function(n){n.BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS"}(e.SafeAppFeatures||(e.SafeAppFeatures={})),function(n){n.TWITTER="TWITTER",n.GITHUB="GITHUB",n.DISCORD="DISCORD"}(e.SafeAppSocialPlatforms||(e.SafeAppSocialPlatforms={}))})(B);var H={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LabelValue=e.StartTimeValue=e.DurationType=e.DetailedExecutionInfoType=e.TransactionListItemType=e.ConflictType=e.TransactionInfoType=e.SettingsInfoType=e.TransactionTokenType=e.TransferDirection=e.TransactionStatus=e.Operation=void 0,function(n){n[n.CALL=0]="CALL",n[n.DELEGATE=1]="DELEGATE"}(e.Operation||(e.Operation={})),function(n){n.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",n.AWAITING_EXECUTION="AWAITING_EXECUTION",n.CANCELLED="CANCELLED",n.FAILED="FAILED",n.SUCCESS="SUCCESS"}(e.TransactionStatus||(e.TransactionStatus={})),function(n){n.INCOMING="INCOMING",n.OUTGOING="OUTGOING",n.UNKNOWN="UNKNOWN"}(e.TransferDirection||(e.TransferDirection={})),function(n){n.ERC20="ERC20",n.ERC721="ERC721",n.NATIVE_COIN="NATIVE_COIN"}(e.TransactionTokenType||(e.TransactionTokenType={})),function(n){n.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",n.ADD_OWNER="ADD_OWNER",n.REMOVE_OWNER="REMOVE_OWNER",n.SWAP_OWNER="SWAP_OWNER",n.CHANGE_THRESHOLD="CHANGE_THRESHOLD",n.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",n.ENABLE_MODULE="ENABLE_MODULE",n.DISABLE_MODULE="DISABLE_MODULE",n.SET_GUARD="SET_GUARD",n.DELETE_GUARD="DELETE_GUARD"}(e.SettingsInfoType||(e.SettingsInfoType={})),function(n){n.TRANSFER="Transfer",n.SETTINGS_CHANGE="SettingsChange",n.CUSTOM="Custom",n.CREATION="Creation",n.SWAP_ORDER="SwapOrder",n.TWAP_ORDER="TwapOrder",n.SWAP_TRANSFER="SwapTransfer"}(e.TransactionInfoType||(e.TransactionInfoType={})),function(n){n.NONE="None",n.HAS_NEXT="HasNext",n.END="End"}(e.ConflictType||(e.ConflictType={})),function(n){n.TRANSACTION="TRANSACTION",n.LABEL="LABEL",n.CONFLICT_HEADER="CONFLICT_HEADER",n.DATE_LABEL="DATE_LABEL"}(e.TransactionListItemType||(e.TransactionListItemType={})),function(n){n.MULTISIG="MULTISIG",n.MODULE="MODULE"}(e.DetailedExecutionInfoType||(e.DetailedExecutionInfoType={})),function(n){n.AUTO="AUTO",n.LIMIT_DURATION="LIMIT_DURATION"}(e.DurationType||(e.DurationType={})),function(n){n.AT_MINING_TIME="AT_MINING_TIME",n.AT_EPOCH="AT_EPOCH"}(e.StartTimeValue||(e.StartTimeValue={})),function(n){n.Queued="Queued",n.Next="Next"}(e.LabelValue||(e.LabelValue={}))})(H);var j={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FEATURES=e.GAS_PRICE_TYPE=e.RPC_AUTHENTICATION=void 0,function(n){n.API_KEY_PATH="API_KEY_PATH",n.NO_AUTHENTICATION="NO_AUTHENTICATION",n.UNKNOWN="UNKNOWN"}(e.RPC_AUTHENTICATION||(e.RPC_AUTHENTICATION={})),function(n){n.ORACLE="ORACLE",n.FIXED="FIXED",n.FIXED_1559="FIXED1559",n.UNKNOWN="UNKNOWN"}(e.GAS_PRICE_TYPE||(e.GAS_PRICE_TYPE={})),function(n){n.ERC721="ERC721",n.SAFE_APPS="SAFE_APPS",n.CONTRACT_INTERACTION="CONTRACT_INTERACTION",n.DOMAIN_LOOKUP="DOMAIN_LOOKUP",n.SPENDING_LIMIT="SPENDING_LIMIT",n.EIP1559="EIP1559",n.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",n.TX_SIMULATION="TX_SIMULATION",n.EIP1271="EIP1271"}(e.FEATURES||(e.FEATURES={}))})(j);var U={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TokenType=void 0,function(n){n.ERC20="ERC20",n.ERC721="ERC721",n.NATIVE_TOKEN="NATIVE_TOKEN"}(e.TokenType||(e.TokenType={}))})(U);var G={};Object.defineProperty(G,"__esModule",{value:!0});var W={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfirmationViewTypes=void 0,function(n){n.COW_SWAP_ORDER="COW_SWAP_ORDER",n.COW_SWAP_TWAP_ORDER="COW_SWAP_TWAP_ORDER"}(e.ConfirmationViewTypes||(e.ConfirmationViewTypes={}))})(W);var q={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeMessageStatus=e.SafeMessageListItemType=void 0,function(n){n.DATE_LABEL="DATE_LABEL",n.MESSAGE="MESSAGE"}(e.SafeMessageListItemType||(e.SafeMessageListItemType={})),function(n){n.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",n.CONFIRMED="CONFIRMED"}(e.SafeMessageStatus||(e.SafeMessageStatus={}))})(q);var V={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceType=void 0,function(n){n.ANDROID="ANDROID",n.IOS="IOS",n.WEB="WEB"}(e.DeviceType||(e.DeviceType={}))})(V);var F={};Object.defineProperty(F,"__esModule",{value:!0});(function(e){var n=m.commonjsGlobal&&m.commonjsGlobal.__createBinding||(Object.create?function(a,c,o,d){d===void 0&&(d=o);var v=Object.getOwnPropertyDescriptor(c,o);(!v||("get"in v?!c.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return c[o]}}),Object.defineProperty(a,d,v)}:function(a,c,o,d){d===void 0&&(d=o),a[d]=c[o]}),t=m.commonjsGlobal&&m.commonjsGlobal.__exportStar||function(a,c){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(c,o)&&n(c,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.deleteAccount=e.getAccount=e.createAccount=e.verifyAuth=e.getAuthNonce=e.getContract=e.getSafeOverviews=e.unsubscribeAll=e.unsubscribeSingle=e.registerRecoveryModule=e.deleteRegisteredEmail=e.getRegisteredEmail=e.verifyEmail=e.resendEmailVerificationCode=e.changeEmail=e.registerEmail=e.unregisterDevice=e.unregisterSafe=e.registerDevice=e.getDelegates=e.confirmSafeMessage=e.proposeSafeMessage=e.getSafeMessage=e.getSafeMessages=e.getDecodedData=e.getMasterCopies=e.getSafeApps=e.getChainConfig=e.getChainsConfig=e.getConfirmationView=e.proposeTransaction=e.getNonces=e.postSafeGasEstimation=e.deleteTransaction=e.getTransactionDetails=e.getTransactionQueue=e.getTransactionHistory=e.getCollectiblesPage=e.getCollectibles=e.getAllOwnedSafes=e.getOwnedSafes=e.getFiatCurrencies=e.getBalances=e.getMultisigTransactions=e.getModuleTransactions=e.getIncomingTransfers=e.getSafeInfo=e.getRelayCount=e.relayTransaction=e.setBaseUrl=void 0,e.putAccountDataSettings=e.getAccountDataSettings=e.getAccountDataTypes=void 0;const i=E,r=b;t(L,e),t(B,e),t(H,e),t(j,e),t(U,e),t(G,e),t(W,e),t(q,e),t(V,e),t(F,e);let s=r.DEFAULT_BASE_URL;const u=a=>{s=a};e.setBaseUrl=u;function l(a,c){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/relay",{path:{chainId:a},body:c})}e.relayTransaction=l;function g(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/relay/{address}",{path:{chainId:a,address:c}})}e.getRelayCount=g;function A(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:a,address:c}})}e.getSafeInfo=A;function h(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:a,address:c},query:o},d)}e.getIncomingTransfers=h;function I(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:a,address:c},query:o},d)}e.getModuleTransactions=I;function X(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:a,address:c},query:o},d)}e.getMultisigTransactions=X;function Q(a,c,o="usd",d={}){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:a,address:c,currency:o},query:d})}e.getBalances=Q;function $(){return(0,i.getEndpoint)(s,"/v1/balances/supported-fiat-codes")}e.getFiatCurrencies=$;function Y(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:a,address:c}})}e.getOwnedSafes=Y;function J(a){return(0,i.getEndpoint)(s,"/v1/owners/{address}/safes",{path:{address:a}})}e.getAllOwnedSafes=J;function z(a,c,o={}){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:a,address:c},query:o})}e.getCollectibles=z;function Z(a,c,o={},d){return(0,i.getEndpoint)(s,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:a,address:c},query:o},d)}e.getCollectiblesPage=Z;function x(a,c,o={},d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:a,safe_address:c},query:o},d)}e.getTransactionHistory=x;function ee(a,c,o={},d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:a,safe_address:c},query:o},d)}e.getTransactionQueue=ee;function ne(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:a,transactionId:c}})}e.getTransactionDetails=ne;function te(a,c,o){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/transactions/{safeTxHash}",{path:{chainId:a,safeTxHash:c},body:{signature:o}})}e.deleteTransaction=te;function ie(a,c,o){return(0,i.postEndpoint)(s,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:a,safe_address:c},body:o})}e.postSafeGasEstimation=ie;function ae(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/nonces",{path:{chainId:a,safe_address:c}})}e.getNonces=ae;function se(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:a,safe_address:c},body:o})}e.proposeTransaction=se;function ce(a,c,o,d){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/views/transaction-confirmation",{path:{chainId:a,safe_address:c},body:{data:o,to:d}})}e.getConfirmationView=ce;function oe(a){return(0,i.getEndpoint)(s,"/v1/chains",{query:a})}e.getChainsConfig=oe;function re(a){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}",{path:{chainId:a}})}e.getChainConfig=re;function de(a,c={}){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safe-apps",{path:{chainId:a},query:c})}e.getSafeApps=de;function ue(a){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:a}})}e.getMasterCopies=ue;function le(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/data-decoder",{path:{chainId:a},body:{data:c,to:o}})}e.getDecodedData=le;function fe(a,c,o){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:a,safe_address:c},query:{}},o)}e.getSafeMessages=fe;function ge(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:a,message_hash:c}})}e.getSafeMessage=ge;function he(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:a,safe_address:c},body:o})}e.proposeSafeMessage=he;function Ee(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:a,message_hash:c},body:o})}e.confirmSafeMessage=Ee;function _e(a,c={}){return(0,i.getEndpoint)(s,"/v2/chains/{chainId}/delegates",{path:{chainId:a},query:c})}e.getDelegates=_e;function Te(a){return(0,i.postEndpoint)(s,"/v1/register/notifications",{body:a})}e.registerDevice=Te;function ve(a,c,o){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safe_address}",{path:{chainId:a,safe_address:c,uuid:o}})}e.unregisterSafe=ve;function Ae(a,c){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/notifications/devices/{uuid}",{path:{chainId:a,uuid:c}})}e.unregisterDevice=Ae;function Ie(a,c,o,d){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails",{path:{chainId:a,safe_address:c},body:o,headers:d})}e.registerEmail=Ie;function Se(a,c,o,d,v){return(0,i.putEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:a,safe_address:c,signer:o},body:d,headers:v})}e.changeEmail=Se;function me(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify-resend",{path:{chainId:a,safe_address:c,signer:o},body:""})}e.resendEmailVerificationCode=me;function ye(a,c,o,d){return(0,i.putEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify",{path:{chainId:a,safe_address:c,signer:o},body:d})}e.verifyEmail=ye;function Oe(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:a,safe_address:c,signer:o},headers:d})}e.getRegisteredEmail=Oe;function Ne(a,c,o,d){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:a,safe_address:c,signer:o},headers:d})}e.deleteRegisteredEmail=Ne;function Ce(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/recovery",{path:{chainId:a,safe_address:c},body:o})}e.registerRecoveryModule=Ce;function be(a){return(0,i.deleteEndpoint)(s,"/v1/subscriptions",{query:a})}e.unsubscribeSingle=be;function De(a){return(0,i.deleteEndpoint)(s,"/v1/subscriptions/all",{query:a})}e.unsubscribeAll=De;function Re(a,c){return(0,i.getEndpoint)(s,"/v1/safes",{query:Object.assign(Object.assign({},c),{safes:a.join(",")})})}e.getSafeOverviews=Re;function Me(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/contracts/{contractAddress}",{path:{chainId:a,contractAddress:c}})}e.getContract=Me;function we(){return(0,i.getEndpoint)(s,"/v1/auth/nonce",{credentials:"include"})}e.getAuthNonce=we;function Pe(a){return(0,i.postEndpoint)(s,"/v1/auth/verify",{body:a,credentials:"include"})}e.verifyAuth=Pe;function pe(a){return(0,i.postEndpoint)(s,"/v1/accounts",{body:a,credentials:"include"})}e.createAccount=pe;function Le(a){return(0,i.getEndpoint)(s,"/v1/accounts/{address}",{path:{address:a},credentials:"include"})}e.getAccount=Le;function Be(a){return(0,i.deleteEndpoint)(s,"/v1/accounts/{address}",{path:{address:a},credentials:"include"})}e.deleteAccount=Be;function He(){return(0,i.getEndpoint)(s,"/v1/accounts/data-types")}e.getAccountDataTypes=He;function je(a){return(0,i.getEndpoint)(s,"/v1/accounts/{address}/data-settings",{path:{address:a},credentials:"include"})}e.getAccountDataSettings=je;function Ue(a,c){return(0,i.putEndpoint)(s,"/v1/accounts/{address}/data-settings",{path:{address:a},body:c,credentials:"include"})}e.putAccountDataSettings=Ue})(Fe);class en{constructor(n){this.communicator=n}async getBySafeTxHash(n){if(!n)throw new Error("Invalid safeTxHash");return(await this.communicator.send(exports.Methods.getTxBySafeTxHash,{safeTxHash:n})).data}async signMessage(n){const t={message:n};return(await this.communicator.send(exports.Methods.signMessage,t)).data}async signTypedMessage(n){if(!R(n))throw new Error("Invalid typed data");return(await this.communicator.send(exports.Methods.signTypedMessage,{typedData:n})).data}async send({txs:n,params:t}){if(!n||!n.length)throw new Error("No transactions were passed");const i={txs:n,params:t};return(await this.communicator.send(exports.Methods.sendTransactions,i)).data}}const f={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"},T={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};class nn{constructor(n){this.communicator=n,this.call=this.buildRequest({call:f.eth_call,formatters:[null,T.defaultBlockParam]}),this.getBalance=this.buildRequest({call:f.eth_getBalance,formatters:[null,T.defaultBlockParam]}),this.getCode=this.buildRequest({call:f.eth_getCode,formatters:[null,T.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:f.eth_getStorageAt,formatters:[null,T.blockNumberToHex,T.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:f.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:f.eth_getBlockByHash,formatters:[null,T.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:f.eth_getBlockByNumber,formatters:[T.blockNumberToHex,T.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:f.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:f.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:f.eth_getTransactionCount,formatters:[null,T.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:f.eth_gasPrice}),this.getEstimateGas=t=>this.buildRequest({call:f.eth_estimateGas})([t]),this.setSafeSettings=this.buildRequest({call:f.safe_setSettings})}buildRequest(n){const{call:t,formatters:i}=n;return async r=>{i&&Array.isArray(r)&&i.forEach((l,g)=>{l&&(r[g]=l(r[g]))});const s={call:t,params:r||[]};return(await this.communicator.send(exports.Methods.rpcCall,s)).data}}}const tn="0x1626ba7e",an="0x20c13b0b",D=4001;class y extends Error{constructor(n,t,i){super(n),this.code=t,this.data=i,Object.setPrototypeOf(this,y.prototype)}}class k{constructor(n){this.communicator=n}async getPermissions(){return(await this.communicator.send(exports.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(n){if(!this.isPermissionRequestValid(n))throw new y("Permissions request is invalid",D);try{return(await this.communicator.send(exports.Methods.wallet_requestPermissions,n)).data}catch{throw new y("Permissions rejected",D)}}isPermissionRequestValid(n){return n.every(t=>typeof t=="object"?Object.keys(t).every(i=>!!Object.values(exports.RestrictedMethods).includes(i)):!1)}}const w=(e,n)=>n.some(t=>t.parentCapability===e),sn=()=>(e,n,t)=>{const i=t.value;return t.value=async function(){const r=new k(this.communicator);let s=await r.getPermissions();if(w(n,s)||(s=await r.requestPermissions([{[n]:{}}])),!w(n,s))throw new y("Permissions rejected",D);return i.apply(this)},t};var cn=function(e,n,t,i){var r=arguments.length,s=r<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,t):i,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,n,t,i);else for(var l=e.length-1;l>=0;l--)(u=e[l])&&(s=(r<3?u(s):r>3?u(n,t,s):u(n,t))||s);return r>3&&s&&Object.defineProperty(n,t,s),s};class K{constructor(n){this.communicator=n}async getChainInfo(){return(await this.communicator.send(exports.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(exports.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:n="usd"}={}){return(await this.communicator.send(exports.Methods.getSafeBalances,{currency:n})).data}async check1271Signature(n,t="0x"){const i=await this.getInfo(),r=N.encodeFunctionData({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[n,t]}),s={call:f.eth_call,params:[{to:i.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(exports.Methods.rpcCall,s)).data.slice(0,10).toLowerCase()===tn}catch{return!1}}async check1271SignatureBytes(n,t="0x"){const i=await this.getInfo(),r=N.encodeFunctionData({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[n,t]}),s={call:f.eth_call,params:[{to:i.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(exports.Methods.rpcCall,s)).data.slice(0,10).toLowerCase()===an}catch{return!1}}calculateMessageHash(n){return N.hashMessage(n)}calculateTypedMessageHash(n){const t=typeof n.domain.chainId=="object"?n.domain.chainId.toNumber():Number(n.domain.chainId);let i=n.primaryType;if(!i){const r=Object.values(n.types),s=Object.keys(n.types).filter(u=>r.every(l=>l.every(({type:g})=>g.replace("[","").replace("]","")!==u)));if(s.length===0||s.length>1)throw new Error("Please specify primaryType");i=s[0]}return N.hashTypedData({message:n.message,domain:{...n.domain,chainId:t,verifyingContract:n.domain.verifyingContract,salt:n.domain.salt},types:n.types,primaryType:i})}async getOffChainSignature(n){return(await this.communicator.send(exports.Methods.getOffChainSignature,n)).data}async isMessageSigned(n,t="0x"){let i;if(typeof n=="string"&&(i=async()=>{const r=this.calculateMessageHash(n);return await this.isMessageHashSigned(r,t)}),R(n)&&(i=async()=>{const r=this.calculateTypedMessageHash(n);return await this.isMessageHashSigned(r,t)}),i)return await i();throw new Error("Invalid message type")}async isMessageHashSigned(n,t="0x"){const i=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const r of i)if(await r(n,t))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(exports.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(exports.Methods.requestAddressBook,void 0)).data}}cn([sn()],K.prototype,"requestAddressBook",null);class on{constructor(n={}){const{allowedDomains:t=null,debug:i=!1}=n;this.communicator=new Ve(t,i),this.eth=new nn(this.communicator),this.txs=new en(this.communicator),this.safe=new K(this.communicator),this.wallet=new k(this.communicator)}}exports.MessageFormatter=O;exports.RPC_CALLS=f;exports.default=on;exports.getSDKVersion=P;exports.isObjectEIP712TypedData=R;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as u, v as h, c0 as R } from "./W3MFrameProviderSingleton-
|
|
1
|
+
import { t as u, v as h, c0 as R } from "./W3MFrameProviderSingleton-CVeWBhS_.js";
|
|
2
2
|
const n = u({ history: ["ConnectWallet"], view: "ConnectWallet", data: void 0 }), x = { state: n, subscribe(e) {
|
|
3
3
|
return h(n, () => e(n));
|
|
4
4
|
}, push(e, t) {
|
|
@@ -230,7 +230,7 @@ class se {
|
|
|
230
230
|
}
|
|
231
231
|
async initUi() {
|
|
232
232
|
if (typeof window < "u") {
|
|
233
|
-
await import("./index-
|
|
233
|
+
await import("./index-D0AGxgdp.js");
|
|
234
234
|
const t = document.createElement("wcm-modal");
|
|
235
235
|
document.body.insertAdjacentElement("beforeend", t), c.setIsUiLoaded(!0);
|
|
236
236
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const p=require("./W3MFrameProviderSingleton-
|
|
1
|
+
"use strict";const p=require("./W3MFrameProviderSingleton-Djv3DKHQ.cjs");function _(n,a){for(var i=0;i<a.length;i++){const e=a[i];if(typeof e!="string"&&!Array.isArray(e)){for(const s in e)if(s!=="default"&&!(s in n)){const o=Object.getOwnPropertyDescriptor(e,s);o&&Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var l={},g={},f={};Object.defineProperty(f,"__esModule",{value:!0});f.getLowerCase=void 0;function w(n){return n&&n.toLowerCase()}f.getLowerCase=w;Object.defineProperty(g,"__esModule",{value:!0});g.SafeAppProvider=void 0;const m=p.eventsExports,u=f;class k extends m.EventEmitter{constructor(a,i){super(),this.submittedTxs=new Map,this.safe=a,this.sdk=i}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(a){const{method:i,params:e=[]}=a;switch(i){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return`0x${this.chainId.toString(16)}`;case"personal_sign":{const[t,r]=e;if(this.safe.safeAddress.toLowerCase()!==r.toLowerCase())throw new Error("The address or message hash is invalid");const h=await this.sdk.txs.signMessage(t);return("signature"in h?h.signature:void 0)||"0x"}case"eth_sign":{const[t,r]=e;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase()||!r.startsWith("0x"))throw new Error("The address or message hash is invalid");const h=await this.sdk.txs.signMessage(r);return("signature"in h?h.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[t,r]=e,h=typeof r=="string"?JSON.parse(r):r;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase())throw new Error("The address is invalid");const c=await this.sdk.txs.signTypedMessage(h);return("signature"in c?c.signature:void 0)||"0x"}case"eth_sendTransaction":const s={...e[0],value:e[0].value||"0",data:e[0].data||"0x"};typeof s.gas=="string"&&s.gas.startsWith("0x")&&(s.gas=parseInt(s.gas,16));const o=await this.sdk.txs.send({txs:[s],params:{safeTxGas:s.gas}});return this.submittedTxs.set(o.safeTxHash,{from:this.safe.safeAddress,hash:o.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:s.data,value:s.value,to:s.to,blockHash:null,blockNumber:null,transactionIndex:null}),o.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,u.getLowerCase)(e[0]),e[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,u.getLowerCase)(e[0]),e[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,u.getLowerCase)(e[0]),e[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,u.getLowerCase)(e[0]),e[1],e[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([e[0],e[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([e[0],e[1]]);case"eth_getTransactionByHash":let d=e[0];try{d=(await this.sdk.txs.getBySafeTxHash(d)).txHash||d}catch{}return this.submittedTxs.has(d)?this.submittedTxs.get(d):this.sdk.eth.getTransactionByHash([d]).then(t=>(t&&(t.hash=e[0]),t));case"eth_getTransactionReceipt":{let t=e[0];try{t=(await this.sdk.txs.getBySafeTxHash(t)).txHash||t}catch{}return this.sdk.eth.getTransactionReceipt([t]).then(r=>(r&&(r.transactionHash=e[0]),r))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(e[0]);case"eth_call":return this.sdk.eth.call([e[0],e[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([e[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(e[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([e[0]]);default:throw Error(`"${a.method}" not implemented`)}}send(a,i){a||i("Undefined request"),this.request(a).then(e=>i(null,{jsonrpc:"2.0",id:a.id,result:e})).catch(e=>i(e,null))}}g.SafeAppProvider=k;(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.SafeAppProvider=void 0;var a=g;Object.defineProperty(n,"SafeAppProvider",{enumerable:!0,get:function(){return a.SafeAppProvider}})})(l);const y=_({__proto__:null},[l]);exports.index=y;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as m } from "./W3MFrameProviderSingleton-
|
|
2
|
-
import { e as P, h as We, a as Ve } from "./wagmi-
|
|
1
|
+
import { p as m } from "./W3MFrameProviderSingleton-CVeWBhS_.js";
|
|
2
|
+
import { e as P, h as We, a as Ve } from "./wagmi-CjqErQGH.js";
|
|
3
3
|
const qe = () => "9.1.0", ke = (e) => e.toString(16).padStart(2, "0"), Fe = (e) => {
|
|
4
4
|
const n = new Uint8Array(e / 2);
|
|
5
5
|
return window.crypto.getRandomValues(n), Array.from(n, ke).join("");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./W3MFrameProviderSingleton-
|
|
1
|
+
"use strict";const i=require("./W3MFrameProviderSingleton-Djv3DKHQ.cjs"),n=i.proxy({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),U={state:n,subscribe(e){return i.subscribe(n,()=>e(n))},push(e,t){e!==n.view&&(n.view=e,t&&(n.data=t),n.history.push(e))},reset(e){n.view=e,n.history=[e]},replace(e){n.history.length>1&&(n.history[n.history.length-1]=e,n.view=e)},goBack(){if(n.history.length>1){n.history.pop();const[e]=n.history.slice(-1);n.view=e}},setData(e){n.data=e}},r={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return r.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return r.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(r.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let o=e;o.includes("://")||(o=e.replaceAll("/","").replaceAll(":",""),o=`${o}://`),o.endsWith("/")||(o=`${o}/`),this.setWalletConnectDeepLink(o,s);const l=encodeURIComponent(t);return`${o}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!r.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let o=e;o.endsWith("/")||(o=`${o}/`),this.setWalletConnectDeepLink(o,s);const l=encodeURIComponent(t);return`${o}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(r.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(r.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(r.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(r.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=U.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},R=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),a=i.proxy({enabled:R,userSessionId:"",events:[],connectedWalletId:void 0}),_={state:a,subscribe(e){return i.subscribe(a.events,()=>e(i.snapshot(a.events[a.events.length-1])))},initialize(){a.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(a.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){a.connectedWalletId=e},click(e){if(a.enabled){const t={type:"CLICK",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}},track(e){if(a.enabled){const t={type:"TRACK",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}},view(e){if(a.enabled){const t={type:"VIEW",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}}},p=i.proxy({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),c={state:p,subscribe(e){return i.subscribe(p,()=>e(p))},setChains(e){p.chains=e},setWalletConnectUri(e){p.walletConnectUri=e},setIsCustomDesktop(e){p.isCustomDesktop=e},setIsCustomMobile(e){p.isCustomMobile=e},setIsDataLoaded(e){p.isDataLoaded=e},setIsUiLoaded(e){p.isUiLoaded=e},setIsAuth(e){p.isAuth=e}},C=i.proxy({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),b={state:C,subscribe(e){return i.subscribe(C,()=>e(C))},setConfig(e){var t,s;_.initialize(),c.setChains(e.chains),c.setIsAuth(!!e.enableAuthMode),c.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),c.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),r.setModalVersionInStorage(),Object.assign(C,e)}};var V=Object.defineProperty,D=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,k=(e,t,s)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,K=(e,t)=>{for(var s in t||(t={}))H.call(t,s)&&k(e,s,t[s]);if(D)for(var s of D(t))B.call(t,s)&&k(e,s,t[s]);return e};const L="https://explorer-api.walletconnect.com",O="wcm",E="js-2.6.2";async function w(e,t){const s=K({sdkType:O,sdkVersion:E},t),o=new URL(e,L);return o.searchParams.append("projectId",b.state.projectId),Object.entries(s).forEach(([l,d])=>{d&&o.searchParams.append(l,String(d))}),(await fetch(o)).json()}const m={async getDesktopListings(e){return w("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return w("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return w("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return w("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${L}/w3m/v1/getWalletImage/${e}?projectId=${b.state.projectId}&sdkType=${O}&sdkVersion=${E}`},getAssetImageUrl(e){return`${L}/w3m/v1/getAssetImage/${e}?projectId=${b.state.projectId}&sdkType=${O}&sdkVersion=${E}`}};var z=Object.defineProperty,S=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,N=(e,t,s)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,F=(e,t)=>{for(var s in t||(t={}))q.call(t,s)&&N(e,s,t[s]);if(S)for(var s of S(t))J.call(t,s)&&N(e,s,t[s]);return e};const x=r.isMobile(),u=i.proxy({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),G={state:u,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=b.state;if(e==="NONE"||t==="ALL"&&!e)return u.recomendedWallets;if(r.isArray(e)){const s={recommendedIds:e.join(",")},{listings:o}=await m.getAllListings(s),l=Object.values(o);l.sort((d,h)=>{const v=e.indexOf(d.id),f=e.indexOf(h.id);return v-f}),u.recomendedWallets=l}else{const{chains:s,isAuth:o}=c.state,l=s==null?void 0:s.join(","),d=r.isArray(t),h={page:1,sdks:o?"auth_v1":void 0,entries:r.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:d?t.join(","):void 0},{listings:v}=x?await m.getMobileListings(h):await m.getDesktopListings(h);u.recomendedWallets=Object.values(v)}return u.recomendedWallets},async getWallets(e){const t=F({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:o}=b.state,{recomendedWallets:l}=u;if(o==="ALL")return u.wallets;l.length?t.excludedIds=l.map($=>$.id).join(","):r.isArray(s)&&(t.excludedIds=s.join(",")),r.isArray(o)&&(t.excludedIds=[t.excludedIds,o].filter(Boolean).join(",")),c.state.isAuth&&(t.sdks="auth_v1");const{page:d,search:h}=e,{listings:v,total:f}=x?await m.getMobileListings(t):await m.getDesktopListings(t),M=Object.values(v),j=h?"search":"wallets";return u[j]={listings:[...u[j].listings,...M],total:f,page:d??1},{listings:M,total:f}},getWalletImageUrl(e){return m.getWalletImageUrl(e)},getAssetImageUrl(e){return m.getAssetImageUrl(e)},resetSearch(){u.search={listings:[],total:0,page:1}}},y=i.proxy({open:!1}),W={state:y,subscribe(e){return i.subscribe(y,()=>e(y))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:o}=c.state;if(r.removeWalletConnectDeepLink(),c.setWalletConnectUri(e==null?void 0:e.uri),c.setChains(e==null?void 0:e.chains),U.reset("ConnectWallet"),s&&o)y.open=!0,t();else{const l=setInterval(()=>{const d=c.state;d.isUiLoaded&&d.isDataLoaded&&(clearInterval(l),y.open=!0,t())},200)}})},close(){y.open=!1}};var Q=Object.defineProperty,T=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,P=(e,t,s)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Z=(e,t)=>{for(var s in t||(t={}))X.call(t,s)&&P(e,s,t[s]);if(T)for(var s of T(t))Y.call(t,s)&&P(e,s,t[s]);return e};function ee(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const I=i.proxy({themeMode:ee()?"dark":"light"}),A={state:I,subscribe(e){return i.subscribe(I,()=>e(I))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(I.themeMode=t),s&&(I.themeVariables=Z({},s))}},g=i.proxy({open:!1,message:"",variant:"success"}),te={state:g,subscribe(e){return i.subscribe(g,()=>e(g))},openToast(e,t){g.open=!0,g.message=e,g.variant=t},closeToast(){g.open=!1}};class se{constructor(t){this.openModal=W.open,this.closeModal=W.close,this.subscribeModal=W.subscribe,this.setTheme=A.setThemeConfig,A.setThemeConfig(t),b.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>require("./index-4gPeNAqu.cjs"));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),c.setIsUiLoaded(!0)}}}const oe=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:se},Symbol.toStringTag,{value:"Module"}));exports.R=_;exports.T=U;exports.a=r;exports.index=oe;exports.ne=A;exports.oe=te;exports.p=c;exports.se=W;exports.te=G;exports.y=b;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as b, u as x, v, w as E, j as c, O as C, x as T, y as m, z as y, r as u, D as A, F as _, G as d, m as g, I as S, J as I, M as O, R as N } from "./W3MFrameProviderSingleton-
|
|
2
|
-
import { K as k,
|
|
1
|
+
import { t as b, u as x, v, w as E, j as c, O as C, x as T, y as m, z as y, r as u, D as A, F as _, G as d, m as g, I as S, J as I, M as O, R as N } from "./W3MFrameProviderSingleton-CVeWBhS_.js";
|
|
2
|
+
import { K as k, V as z, Y as D } from "./W3MFrameProviderSingleton-CVeWBhS_.js";
|
|
3
3
|
const i = b({
|
|
4
4
|
status: "uninitialized"
|
|
5
5
|
}), p = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as fe, s as Ke, T as E, o as Y, R as Ho, a as g, t as P, p as H, y as ae } from "./index-
|
|
2
|
-
import { bg as Bo,
|
|
1
|
+
import { n as fe, s as Ke, T as E, o as Y, R as Ho, a as g, t as P, p as H, y as ae } from "./index-BlKzwSJU.js";
|
|
2
|
+
import { bg as Bo, L as R, c1 as Zo } from "./W3MFrameProviderSingleton-CVeWBhS_.js";
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
5
5
|
* Copyright 2019 Google LLC
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./W3MFrameProviderSingleton-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./W3MFrameProviderSingleton-Djv3DKHQ.cjs"),t=e.Oe`<svg class="input_mask" width="328" height="100" viewBox="0 0 328 100" fill="none">
|
|
2
2
|
<mask id="path-1-inside-1_18299_4189">
|
|
3
3
|
<path
|
|
4
4
|
class="input_mask__border"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./W3MFrameProviderSingleton-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./W3MFrameProviderSingleton-Djv3DKHQ.cjs"),o=t.proxy({status:"uninitialized"}),u={state:o,subscribeKey(n,e){return t.subscribeKey(o,n,e)},subscribe(n){return t.subscribe(o,()=>n(o))},_getClient(){if(!o._client)throw new Error("SIWEController client not set");return o._client},async getNonce(n){const i=await this._getClient().getNonce(n);return this.setNonce(i),i},async getSession(){try{const e=await this._getClient().getSession();return e&&(this.setSession(e),this.setStatus("success")),e||void 0}catch{return}},createMessage(n){const i=this._getClient().createMessage(n);return this.setMessage(i),i},async verifyMessage(n){return await this._getClient().verifyMessage(n)},async signIn(){return await this._getClient().signIn()},async signOut(){var e;const n=this._getClient();await n.signOut(),this.setStatus("ready"),this.setSession(void 0),(e=n.onSignOut)==null||e.call(n)},onSignIn(n){var i;const e=this._getClient();(i=e.onSignIn)==null||i.call(e,n)},onSignOut(){var e;const n=this._getClient();(e=n.onSignOut)==null||e.call(n)},async setSIWEClient(n){o._client=t.ref(n),o.session=await this.getSession(),o.status=o.session?"success":"ready",t.ChainController.setAccountProp("siweStatus",o.status,"eip155"),t.OptionsController.setIsSiweEnabled(n.options.enabled)},setNonce(n){o.nonce=n},setStatus(n){o.status=n,t.ChainController.setAccountProp("siweStatus",o.status,"eip155")},setMessage(n){o.message=n},setSession(n){o.session=n,o.status=n?"success":"ready",t.ChainController.setAccountProp("siweStatus",o.status,"eip155")}},d=t.i`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
@@ -61,4 +61,4 @@
|
|
|
61
61
|
${this.isSigning?"Signing...":"Sign"}
|
|
62
62
|
</wui-button>
|
|
63
63
|
</wui-flex>
|
|
64
|
-
`}async onSign(){var e,i,r;this.isSigning=!0,t.EventsController.sendEvent({event:"CLICK_SIGN_SIWE_MESSAGE",type:"track",properties:{network:((e=t.ChainController.state.activeCaipNetwork)==null?void 0:e.id)||"",isSmartAccount:t.AccountController.state.preferredAccountType===t.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}});try{u.setStatus("loading");const a=await u.signIn();return u.setStatus("success"),t.EventsController.sendEvent({event:"SIWE_AUTH_SUCCESS",type:"track",properties:{network:((i=t.ChainController.state.activeCaipNetwork)==null?void 0:i.id)||"",isSmartAccount:t.AccountController.state.preferredAccountType===t.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}}),a}catch{const c=t.AccountController.state.preferredAccountType===t.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT;return c?t.SnackController.showError("This application might not support Smart Accounts"):t.SnackController.showError("Signature declined"),u.setStatus("error"),t.EventsController.sendEvent({event:"SIWE_AUTH_ERROR",type:"track",properties:{network:((r=t.ChainController.state.activeCaipNetwork)==null?void 0:r.id)||"",isSmartAccount:c}})}finally{this.isSigning=!1}}async onCancel(){var i;this.isCancelling=!0,t.ChainController.state.activeCaipAddress?(await t.ConnectionController.disconnect(),t.ModalController.close()):t.RouterController.push("Connect"),this.isCancelling=!1,t.EventsController.sendEvent({event:"CLICK_CANCEL_SIWE",type:"track",properties:{network:((i=t.ChainController.state.activeCaipNetwork)==null?void 0:i.id)||"",isSmartAccount:t.AccountController.state.preferredAccountType===t.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}})}};g([t.r()],exports.W3mConnectingSiweView.prototype,"isSigning",void 0);g([t.r()],exports.W3mConnectingSiweView.prototype,"isCancelling",void 0);exports.W3mConnectingSiweView=g([t.customElement("w3m-connecting-siwe-view")],exports.W3mConnectingSiweView);exports.formatMessage=t.
|
|
64
|
+
`}async onSign(){var e,i,r;this.isSigning=!0,t.EventsController.sendEvent({event:"CLICK_SIGN_SIWE_MESSAGE",type:"track",properties:{network:((e=t.ChainController.state.activeCaipNetwork)==null?void 0:e.id)||"",isSmartAccount:t.AccountController.state.preferredAccountType===t.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}});try{u.setStatus("loading");const a=await u.signIn();return u.setStatus("success"),t.EventsController.sendEvent({event:"SIWE_AUTH_SUCCESS",type:"track",properties:{network:((i=t.ChainController.state.activeCaipNetwork)==null?void 0:i.id)||"",isSmartAccount:t.AccountController.state.preferredAccountType===t.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}}),a}catch{const c=t.AccountController.state.preferredAccountType===t.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT;return c?t.SnackController.showError("This application might not support Smart Accounts"):t.SnackController.showError("Signature declined"),u.setStatus("error"),t.EventsController.sendEvent({event:"SIWE_AUTH_ERROR",type:"track",properties:{network:((r=t.ChainController.state.activeCaipNetwork)==null?void 0:r.id)||"",isSmartAccount:c}})}finally{this.isSigning=!1}}async onCancel(){var i;this.isCancelling=!0,t.ChainController.state.activeCaipAddress?(await t.ConnectionController.disconnect(),t.ModalController.close()):t.RouterController.push("Connect"),this.isCancelling=!1,t.EventsController.sendEvent({event:"CLICK_CANCEL_SIWE",type:"track",properties:{network:((i=t.ChainController.state.activeCaipNetwork)==null?void 0:i.id)||"",isSmartAccount:t.AccountController.state.preferredAccountType===t.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}})}};g([t.r()],exports.W3mConnectingSiweView.prototype,"isSigning",void 0);g([t.r()],exports.W3mConnectingSiweView.prototype,"isCancelling",void 0);exports.W3mConnectingSiweView=g([t.customElement("w3m-connecting-siwe-view")],exports.W3mConnectingSiweView);exports.formatMessage=t.Wf;exports.getDidAddress=t.Vi;exports.getDidChainId=t.Yi;exports.SIWEController=u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { L as a } from "./W3MFrameProviderSingleton-CVeWBhS_.js";
|
|
2
|
+
import { Q as e, _ as n, Z as L, a8 as o, aE as W, a9 as l, aa as r, aT as M, aY as Z, aZ as V, ab as d, $ as p, ad as H, ac as c, ae as m, aW as _, aX as k, af as h, ag as g, ah as I, ai as b, aj as B, ak as T, al as v, b7 as w, b8 as S, a0 as f, am as x, b3 as A, an as N, a1 as U, b0 as D, ao as E, ap as P, aq as G, ar as O, aO as Q, b2 as y, b4 as z, aP as F, a$ as X, as as $, aQ as j, b5 as q, a_ as J, av as K, aR as R, a2 as Y, a3 as a1, a4 as i1, ax as s1, aw as C1, ay as u1, az as t1, aN as e1, aA as n1, b1 as L1, aU as o1, aV as W1, aS as l1, aB as r1, aC as M1, b6 as Z1, b9 as V1, a5 as d1, aD as p1, aF as H1, aH as c1, a6 as m1, aG as _1, aJ as k1, aI as h1, at as g1, au as I1, aK as b1, a7 as B1, aL as T1, aM as v1, y as w1, T as S1, U as f1, X as x1 } from "./W3MFrameProviderSingleton-CVeWBhS_.js";
|
|
3
3
|
const s = a`<svg class="input_mask" width="328" height="100" viewBox="0 0 328 100" fill="none">
|
|
4
4
|
<mask id="path-1-inside-1_18299_4189">
|
|
5
5
|
<path
|