@wormhole-foundation/wormhole-connect 1.1.4-beta.1-development → 1.1.4-beta.2-development
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/assets/{algorand-CL9E7qV4.js → algorand-CyJRjYjt.js} +2 -2
- package/dist/assets/{aptos-CYfJ6QKV.js → aptos-k14Q8oIC.js} +2 -2
- package/dist/assets/{ccip-Cfs6IR2H.js → ccip-BNTHR_fq.js} +1 -1
- package/dist/assets/{cosmwasm-B8f9g9-e.js → cosmwasm-Bb55TeV-.js} +3 -3
- package/dist/assets/{evm-BeHPA-N8.js → evm-BxXdWj24.js} +5 -5
- package/dist/assets/{evm-DsaBFKKm.js → evm-C-buBtRY.js} +2 -2
- package/dist/assets/{index-DzWKLl_i.js → index-BAmVCbB-.js} +1 -1
- package/dist/assets/{index-C0jKBHol.js → index-BEc0YFBn.js} +1 -1
- package/dist/assets/{index-DW2PHjzW.js → index-BLMTT3rM.js} +1 -1
- package/dist/assets/{index-CVz7Lfsa.js → index-BY0kgWx8.js} +1 -1
- package/dist/assets/{index-BtIDaBGl.js → index-BfDApobA.js} +1 -1
- package/dist/assets/{index-Cka3pqB6.js → index-BwBQHmYt.js} +1 -1
- package/dist/assets/{index-B1Zd6Tbj.js → index-C0psfra-.js} +1 -1
- package/dist/assets/{index-Dmt4H-sz.js → index-C2FPBPlV.js} +1 -1
- package/dist/assets/{index-DyOk_vKo.js → index-C3Sky6pw.js} +1 -1
- package/dist/assets/{index-DEXJQ6UW.js → index-C87qdc5P.js} +1 -1
- package/dist/assets/{index-QCp2fK6U.js → index-D2LZykJf.js} +2 -2
- package/dist/assets/{index-DSNr6Aeg.js → index-DoWu6bTw.js} +1 -1
- package/dist/assets/{index-DkQt9fOR.js → index-Dqm3REGN.js} +1 -1
- package/dist/assets/{index-BQIi8F3e.js → index-FQGd6qGV.js} +1 -1
- package/dist/assets/{index-QJ2zlRk3.js → index-IlqLhD3I.js} +1 -1
- package/dist/assets/{index-q0W2SHor.js → index-YIP9QK2L.js} +1 -1
- package/dist/assets/{index-TrUYBc0F.js → index-nosdUF9i.js} +1 -1
- package/dist/assets/{index-CFYbGyvs.js → index-xo-ROtuF.js} +1 -1
- package/dist/assets/{index-CZCNUCD6.js → index-yAX3aWkW.js} +1 -1
- package/dist/assets/{index.es-xWGpyzms.js → index.es--WISYjTj.js} +3 -3
- package/dist/assets/{keccak-Dh1-j093.js → keccak-DYzglTc3.js} +1 -1
- package/dist/assets/{solana-FuO6ds45.js → solana-BmGIyTEt.js} +2 -2
- package/dist/assets/{solana-HXT1gH4s.js → solana-D5RkygmT.js} +2 -2
- package/dist/assets/{solanaEmbed.esm-CmWxi_NO.js → solanaEmbed.esm-CFdxIRQj.js} +1 -1
- package/dist/assets/{sui-CQYR74Ws.js → sui-CW05lm4n.js} +2 -2
- package/dist/assets/{unsignedTransaction-YIv7ff3U.js → unsignedTransaction-DAYPmfUj.js} +1 -1
- package/dist/main.js +69 -69
- package/lib/{algorand-DMWnCGDD.js → algorand-B9Pcx34H.js} +1 -1
- package/lib/{algorand-CKeviXZg.mjs → algorand-BfdC8LMm.mjs} +3 -3
- package/lib/{aptos-LGyhejg2.mjs → aptos-CuQYjxz4.mjs} +1 -1
- package/lib/{aptos-DBFfVz6j.js → aptos-D8msRZYc.js} +1 -1
- package/lib/{aptos-DNei2Fw9.mjs → aptos-DISEuAM4.mjs} +3 -3
- package/lib/{aptos-CAJat9Bn.js → aptos-DlboPucS.js} +2 -2
- package/lib/{ccip-E64BZKbj.js → ccip-BqkngZ6V.js} +1 -1
- package/lib/{ccip-gtLK9yzS.mjs → ccip-DV1T5CQz.mjs} +1 -1
- package/lib/{cosmwasm-CnK43h4P.mjs → cosmwasm-BFPK6deV.mjs} +111 -7
- package/lib/{cosmwasm-CmkeZSLD.js → cosmwasm-D3ZKcsjq.js} +2 -2
- package/lib/{events-dBi7i6gd.mjs → events-CaIL5tL1.mjs} +1 -1
- package/lib/{events-D5Nem7a2.js → events-Cxw8aBUy.js} +1 -1
- package/lib/{evm-DyPy8X4q.mjs → evm-7idwo4la.mjs} +5 -5
- package/lib/{evm-Bsq-lyhx.mjs → evm-D11YbeC_.mjs} +7 -7
- package/lib/{evm-BEkpevR1.js → evm-D12EHZXD.js} +4 -4
- package/lib/{evm-JR5REYuq.js → evm-UrRoO3lT.js} +1 -1
- package/lib/{index-DWFG3ux-.js → index-B-m7_r9W.js} +1 -1
- package/lib/{index-BZTaoymt.mjs → index-BEfsEC8g.mjs} +3 -3
- package/lib/{index-Cc_mraT5.mjs → index-BKeG3u48.mjs} +2 -2
- package/lib/{index-FW1hHPsY.js → index-BMLK3kVY.js} +1 -1
- package/lib/{index-CrVV6hQ2.js → index-BMsGsrRe.js} +1 -1
- package/lib/{index-xr-_5YwS.mjs → index-BPD6tZ5I.mjs} +7575 -5146
- package/lib/{index-CL3ekJSh.js → index-BQI2oZiv.js} +1 -1
- package/lib/{index-CeksQZJ0.mjs → index-BUGIe9Q0.mjs} +4 -4
- package/lib/{index-CvX8wxOG.mjs → index-BkUc_QzZ.mjs} +2 -2
- package/lib/{index-DE7BjSqw.js → index-Br_1eyUd.js} +1 -1
- package/lib/{index-C8MkGmi-.mjs → index-C1KUJpQh.mjs} +1 -1
- package/lib/{index-B_wAMidq.js → index-C6ww0FoG.js} +1 -1
- package/lib/{index-YigUyjDr.mjs → index-CBnSdTOm.mjs} +1 -1
- package/lib/{index-DD4g5WJB.mjs → index-CDGkVXf1.mjs} +2 -2
- package/lib/{index-D5un17aL.mjs → index-CG2dc9k1.mjs} +13 -13
- package/lib/{index-CsYGJh8i.js → index-CGqBKzB5.js} +1 -1
- package/lib/{index-TidzojcT.js → index-CHGr1Xo0.js} +1 -1
- package/lib/{index-BHnHO_u8.js → index-CJ8hOjdz.js} +1 -1
- package/lib/{index-BlRWSvuT.js → index-COW9BRyV.js} +1 -1
- package/lib/{index-jnHYrj-0.mjs → index-CeK6G0Jr.mjs} +2 -2
- package/lib/{index-u9NHndtJ.mjs → index-Cfupv0rQ.mjs} +4 -4
- package/lib/{index-C-MpEmke.mjs → index-Cg19mcso.mjs} +1 -1
- package/lib/{index-DhJzyV8c.js → index-Cg6LDJti.js} +1 -1
- package/lib/{index-Cwf7_SpM.js → index-CkHXWtPG.js} +1 -1
- package/lib/{index-B9YINx-j.mjs → index-ClI_55nW.mjs} +7 -7
- package/lib/{index-BSXkcZeB.mjs → index-ClbyJuae.mjs} +2 -2
- package/lib/{index-DRTJX6NI.mjs → index-Cs8OaRdq.mjs} +2 -2
- package/lib/{index-B6Yxe_gd.mjs → index-D4FfgE9k.mjs} +2 -2
- package/lib/{index-PebPsVgf.js → index-D9Ezmk4f.js} +1 -1
- package/lib/{index-BIhEJqD8.js → index-DgKyQSTc.js} +1 -1
- package/lib/{index-BxaWYSOO.js → index-Dh6mkRtz.js} +74 -74
- package/lib/{index-w88sWpdI.js → index-DjZ438HP.js} +1 -1
- package/lib/{index-DSJ41rGf.mjs → index-DlXF_HRr.mjs} +2 -2
- package/lib/{index-DRDlsqLC.js → index-DsMw6BFg.js} +1 -1
- package/lib/{index-CtuM0Nhj.mjs → index-GKdJmpc9.mjs} +2 -2
- package/lib/{index-CAOx_2w0.mjs → index-IwSEAKjs.mjs} +3 -3
- package/lib/{index-CvLvO-ub.mjs → index-VO5jvtPN.mjs} +1 -1
- package/lib/{index-fpX08H1Q.js → index-Vouac_sN.js} +1 -1
- package/lib/{index-snvFYwLU.mjs → index-f6MztC_k.mjs} +2 -2
- package/lib/{index-BrZMeh8Y.js → index-hb33T1qT.js} +1 -1
- package/lib/{index-D9LNItFN.js → index-s_6sncui.js} +1 -1
- package/lib/{index-CN4S3GOd.mjs → index-vmVyLCAM.mjs} +3 -3
- package/lib/{index-CLImffCI.js → index-xTifobUX.js} +1 -1
- package/lib/{index-Brws-ttZ.js → index-yYbCizsj.js} +1 -1
- package/lib/{index.es-BgIY-CJP.mjs → index.es-Bld6bvmZ.mjs} +5 -5
- package/lib/{index.es-DA6xjT-p.js → index.es-DWCjm6mS.js} +2 -2
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{keccak-D3kXYcOs.mjs → keccak-BwFcIiaM.mjs} +1 -1
- package/lib/{keccak-xKB7Kino.js → keccak-C8mX3bFz.js} +1 -1
- package/lib/{pbkdf2-DCnqfxZR.js → pbkdf2-Bk-3RPXm.js} +1 -1
- package/lib/{pbkdf2-Dg0HWbq4.mjs → pbkdf2-CeHVjwwG.mjs} +1 -1
- package/lib/{signer-DIzVzPl8.mjs → signer-DXNU3KLz.mjs} +1 -1
- package/lib/{signer-CbcYYMJ7.js → signer-LadskxdY.js} +1 -1
- package/lib/solana-B15fGx9S.js +1 -0
- package/lib/{solana-BVgObkcE.mjs → solana-BasjNE9K.mjs} +4 -4
- package/lib/{solana-DmCHygOA.js → solana-C9iEiCkx.js} +1 -1
- package/lib/{solana-HKO9jNRD.mjs → solana-CfCGAR-_.mjs} +5 -5
- package/lib/{solanaEmbed.esm-DqNfqaxI.js → solanaEmbed.esm-CJdWWBYT.js} +1 -1
- package/lib/{solanaEmbed.esm-DEAHXGVn.mjs → solanaEmbed.esm-pwzJ8Zc0.mjs} +3 -3
- package/lib/{sui-DN8E0m68.mjs → sui-B9B-EQyp.mjs} +4 -4
- package/lib/{sui-BDoIBdRb.js → sui-BJBxQjSI.js} +2 -2
- package/lib/{sui-Bp2zLhA_.mjs → sui-HC466JTC.mjs} +1 -1
- package/lib/{sui-W_WW-YXK.js → sui-iJeaGeqF.js} +1 -1
- package/lib/{unsignedTransaction-Dkfjd5_o.js → unsignedTransaction-CmgkSLIX.js} +1 -1
- package/lib/unsignedTransaction-Di5zQIK0.mjs +35 -0
- package/package.json +3 -3
- package/lib/solana-BYXqKgjy.js +0 -1
- package/lib/unsignedTransaction-C32EJDkZ.mjs +0 -35
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ge=require("./events-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ge=require("./events-Cxw8aBUy.js"),J=require("./index-Dh6mkRtz.js"),T=require("./index-C6ww0FoG.js"),I=require("./index-D9Ezmk4f.js");var ne={};Object.defineProperty(ne,"__esModule",{value:!0});ne.getLocalStorage=ne.getLocalStorageOrThrow=ne.getCrypto=ne.getCryptoOrThrow=ne.getLocation=ne.getLocationOrThrow=ne.getNavigator=ne.getNavigatorOrThrow=ne.getDocument=ne.getDocumentOrThrow=ne.getFromWindowOrThrow=ne.getFromWindow=void 0;function or(o){let t;return typeof window<"u"&&typeof window[o]<"u"&&(t=window[o]),t}ne.getFromWindow=or;function $r(o){const t=or(o);if(!t)throw new Error(`${o} is not defined in Window`);return t}ne.getFromWindowOrThrow=$r;function ew(){return $r("document")}ne.getDocumentOrThrow=ew;function tw(){return or("document")}ne.getDocument=tw;function rw(){return $r("navigator")}ne.getNavigatorOrThrow=rw;function iw(){return or("navigator")}ne.getNavigator=iw;function sw(){return $r("location")}ne.getLocationOrThrow=sw;function nw(){return or("location")}ne.getLocation=nw;function ow(){return $r("crypto")}ne.getCryptoOrThrow=ow;function aw(){return or("crypto")}ne.getCrypto=aw;function cw(){return $r("localStorage")}ne.getLocalStorageOrThrow=cw;function uw(){return or("localStorage")}ne.getLocalStorage=uw;var bo={};Object.defineProperty(bo,"__esModule",{value:!0});bo.getWindowMetadata=void 0;const pu=ne;function hw(){let o,t;try{o=pu.getDocumentOrThrow(),t=pu.getLocationOrThrow()}catch{return null}function r(){const O=o.getElementsByTagName("link"),N=[];for(let q=0;q<O.length;q++){const D=O[q],B=D.getAttribute("rel");if(B&&B.toLowerCase().indexOf("icon")>-1){const F=D.getAttribute("href");if(F)if(F.toLowerCase().indexOf("https:")===-1&&F.toLowerCase().indexOf("http:")===-1&&F.indexOf("//")!==0){let G=t.protocol+"//"+t.host;if(F.indexOf("/")===0)G+=F;else{const de=t.pathname.split("/");de.pop();const Z=de.join("/");G+=Z+"/"+F}N.push(G)}else if(F.indexOf("//")===0){const G=t.protocol+F;N.push(G)}else N.push(F)}}return N}function s(...O){const N=o.getElementsByTagName("meta");for(let q=0;q<N.length;q++){const D=N[q],B=["itemprop","property","name"].map(F=>D.getAttribute(F)).filter(F=>F?O.includes(F):!1);if(B.length&&B){const F=D.getAttribute("content");if(F)return F}}return""}function a(){let O=s("name","og:site_name","og:title","twitter:title");return O||(O=o.title),O}function u(){return s("description","og:description","twitter:description","keywords")}const l=a(),g=u(),w=t.origin,b=r();return{description:g,url:w,icons:b,name:l}}bo.getWindowMetadata=hw;function lw(o,t=[]){const r=[];return Object.keys(o).forEach(s=>{if(t.length&&!t.includes(s))return;const a=o[s];r.push(...a.accounts)}),r}const pw={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}};function dw(o,t){const{message:r,code:s}=pw[o];return{message:r,code:s}}function co(o,t){return!!Array.isArray(o)}var Ar={};/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -43,4 +43,4 @@ __p += '`),Y&&(R+=`' +
|
|
|
43
43
|
function print() { __p += __j.call(arguments, '') }
|
|
44
44
|
`:`;
|
|
45
45
|
`)+R+`return __p
|
|
46
|
-
}`;var V=uu(function(){return ee(d,j+"return "+R).apply(r,f)});if(V.source=R,Un(V))throw V;return V}function am(e){return te(e).toLowerCase()}function cm(e){return te(e).toUpperCase()}function um(e,i,n){if(e=te(e),e&&(n||i===r))return ma(e);if(!e||!(i=Ve(i)))return e;var c=at(e),h=at(i),d=wa(c,h),f=_a(c,h)+1;return kt(c,d,f).join("")}function hm(e,i,n){if(e=te(e),e&&(n||i===r))return e.slice(0,Ea(e)+1);if(!e||!(i=Ve(i)))return e;var c=at(e),h=_a(c,at(i))+1;return kt(c,0,h).join("")}function lm(e,i,n){if(e=te(e),e&&(n||i===r))return e.replace(qs,"");if(!e||!(i=Ve(i)))return e;var c=at(e),h=wa(c,at(i));return kt(c,h).join("")}function pm(e,i){var n=sl,c=nl;if(le(i)){var h="separator"in i?i.separator:h;n="length"in i?H(i.length):n,c="omission"in i?Ve(i.omission):c}e=te(e);var d=e.length;if(fr(e)){var f=at(e);d=f.length}if(n>=d)return e;var y=n-gr(c);if(y<1)return c;var m=f?kt(f,0,y).join(""):e.slice(0,y);if(h===r)return m+c;if(f&&(y+=m.length-y),Mn(h)){if(e.slice(y).search(h)){var P,S=m;for(h.global||(h=en(h.source,te(Lo.exec(h))+"g")),h.lastIndex=0;P=h.exec(S);)var R=P.index;m=m.slice(0,R===r?y:R)}}else if(e.indexOf(Ve(h),y)!=y){var A=m.lastIndexOf(h);A>-1&&(m=m.slice(0,A))}return m+c}function dm(e){return e=te(e),e&&Il.test(e)?e.replace(qo,kp):e}var fm=Er(function(e,i,n){return e+(n?" ":"")+i.toUpperCase()}),zn=hc("toUpperCase");function cu(e,i,n){return e=te(e),i=n?r:i,i===r?jp(e)?Vp(e):Rp(e):e.match(i)||[]}var uu=K(function(e,i){try{return ze(e,r,i)}catch(n){return Un(n)?n:new k(n)}}),gm=It(function(e,i){return Ye(i,function(n){n=yt(n),bt(e,n,jn(e[n],e))}),e});function ym(e){var i=e==null?0:e.length,n=U();return e=i?ue(e,function(c){if(typeof c[1]!="function")throw new Ze(l);return[n(c[0]),c[1]]}):[],K(function(c){for(var h=-1;++h<i;){var d=e[h];if(ze(d[0],this,c))return ze(d[1],this,c)}})}function vm(e){return kd(et(e,O))}function Hn(e){return function(){return e}}function mm(e,i){return e==null||e!==e?i:e}var wm=pc(),_m=pc(!0);function Ue(e){return e}function Vn(e){return za(typeof e=="function"?e:et(e,O))}function bm(e){return Va(et(e,O))}function Em(e,i){return Ba(e,et(i,O))}var Im=K(function(e,i){return function(n){return Yr(n,e,i)}}),Pm=K(function(e,i){return function(n){return Yr(e,n,i)}});function Bn(e,i,n){var c=be(i),h=Ki(i,c);n==null&&!(le(i)&&(h.length||!c.length))&&(n=i,i=e,e=this,h=Ki(i,be(i)));var d=!(le(n)&&"chain"in n)||!!n.chain,f=St(e);return Ye(h,function(y){var m=i[y];e[y]=m,f&&(e.prototype[y]=function(){var P=this.__chain__;if(d||P){var S=e(this.__wrapped__),R=S.__actions__=Fe(this.__actions__);return R.push({func:m,args:arguments,thisArg:e}),S.__chain__=P,S}return m.apply(e,Ft([this.value()],arguments))})}),e}function Sm(){return Ie._===this&&(Ie._=Qp),this}function Kn(){}function Om(e){return e=H(e),K(function(i){return Ka(i,e)})}var Rm=In(ue),Nm=In(da),Cm=In(Ws);function hu(e){return $n(e)?Js(yt(e)):nf(e)}function $m(e){return function(i){return e==null?r:Xt(e,i)}}var Am=fc(),Tm=fc(!0);function Wn(){return[]}function Jn(){return!1}function xm(){return{}}function Dm(){return""}function Fm(){return!0}function jm(e,i){if(e=H(e),e<1||e>xt)return[];var n=dt,c=Oe(e,dt);i=U(i),e-=dt;for(var h=Ys(c,i);++n<e;)i(n);return h}function qm(e){return z(e)?ue(e,yt):Be(e)?[e]:Fe($c(te(e)))}function Um(e){var i=++Jp;return te(e)+i}var Mm=Zi(function(e,i){return e+i},0),Lm=Pn("ceil"),km=Zi(function(e,i){return e/i},1),zm=Pn("floor");function Hm(e){return e&&e.length?Bi(e,Ue,un):r}function Vm(e,i){return e&&e.length?Bi(e,U(i,2),un):r}function Bm(e){return ya(e,Ue)}function Km(e,i){return ya(e,U(i,2))}function Wm(e){return e&&e.length?Bi(e,Ue,dn):r}function Jm(e,i){return e&&e.length?Bi(e,U(i,2),dn):r}var Gm=Zi(function(e,i){return e*i},1),Qm=Pn("round"),Ym=Zi(function(e,i){return e-i},0);function Zm(e){return e&&e.length?Qs(e,Ue):0}function Xm(e,i){return e&&e.length?Qs(e,U(i,2)):0}return p.after=by,p.ary=kc,p.assign=cv,p.assignIn=tu,p.assignInWith=ls,p.assignWith=uv,p.at=hv,p.before=zc,p.bind=jn,p.bindAll=gm,p.bindKey=Hc,p.castArray=xy,p.chain=Uc,p.chunk=zf,p.compact=Hf,p.concat=Vf,p.cond=ym,p.conforms=vm,p.constant=Hn,p.countBy=Zg,p.create=lv,p.curry=Vc,p.curryRight=Bc,p.debounce=Kc,p.defaults=pv,p.defaultsDeep=dv,p.defer=Ey,p.delay=Iy,p.difference=Bf,p.differenceBy=Kf,p.differenceWith=Wf,p.drop=Jf,p.dropRight=Gf,p.dropRightWhile=Qf,p.dropWhile=Yf,p.fill=Zf,p.filter=ey,p.flatMap=iy,p.flatMapDeep=sy,p.flatMapDepth=ny,p.flatten=Dc,p.flattenDeep=Xf,p.flattenDepth=eg,p.flip=Py,p.flow=wm,p.flowRight=_m,p.fromPairs=tg,p.functions=_v,p.functionsIn=bv,p.groupBy=oy,p.initial=ig,p.intersection=sg,p.intersectionBy=ng,p.intersectionWith=og,p.invert=Iv,p.invertBy=Pv,p.invokeMap=cy,p.iteratee=Vn,p.keyBy=uy,p.keys=be,p.keysIn=qe,p.map=ns,p.mapKeys=Ov,p.mapValues=Rv,p.matches=bm,p.matchesProperty=Em,p.memoize=as,p.merge=Nv,p.mergeWith=ru,p.method=Im,p.methodOf=Pm,p.mixin=Bn,p.negate=cs,p.nthArg=Om,p.omit=Cv,p.omitBy=$v,p.once=Sy,p.orderBy=hy,p.over=Rm,p.overArgs=Oy,p.overEvery=Nm,p.overSome=Cm,p.partial=qn,p.partialRight=Wc,p.partition=ly,p.pick=Av,p.pickBy=iu,p.property=hu,p.propertyOf=$m,p.pull=hg,p.pullAll=jc,p.pullAllBy=lg,p.pullAllWith=pg,p.pullAt=dg,p.range=Am,p.rangeRight=Tm,p.rearg=Ry,p.reject=fy,p.remove=fg,p.rest=Ny,p.reverse=Dn,p.sampleSize=yy,p.set=xv,p.setWith=Dv,p.shuffle=vy,p.slice=gg,p.sortBy=_y,p.sortedUniq=Eg,p.sortedUniqBy=Ig,p.split=im,p.spread=Cy,p.tail=Pg,p.take=Sg,p.takeRight=Og,p.takeRightWhile=Rg,p.takeWhile=Ng,p.tap=Hg,p.throttle=$y,p.thru=ss,p.toArray=Zc,p.toPairs=su,p.toPairsIn=nu,p.toPath=qm,p.toPlainObject=eu,p.transform=Fv,p.unary=Ay,p.union=Cg,p.unionBy=$g,p.unionWith=Ag,p.uniq=Tg,p.uniqBy=xg,p.uniqWith=Dg,p.unset=jv,p.unzip=Fn,p.unzipWith=qc,p.update=qv,p.updateWith=Uv,p.values=Sr,p.valuesIn=Mv,p.without=Fg,p.words=cu,p.wrap=Ty,p.xor=jg,p.xorBy=qg,p.xorWith=Ug,p.zip=Mg,p.zipObject=Lg,p.zipObjectDeep=kg,p.zipWith=zg,p.entries=su,p.entriesIn=nu,p.extend=tu,p.extendWith=ls,Bn(p,p),p.add=Mm,p.attempt=uu,p.camelCase=Hv,p.capitalize=ou,p.ceil=Lm,p.clamp=Lv,p.clone=Dy,p.cloneDeep=jy,p.cloneDeepWith=qy,p.cloneWith=Fy,p.conformsTo=Uy,p.deburr=au,p.defaultTo=mm,p.divide=km,p.endsWith=Vv,p.eq=ut,p.escape=Bv,p.escapeRegExp=Kv,p.every=Xg,p.find=ty,p.findIndex=Tc,p.findKey=fv,p.findLast=ry,p.findLastIndex=xc,p.findLastKey=gv,p.floor=zm,p.forEach=Mc,p.forEachRight=Lc,p.forIn=yv,p.forInRight=vv,p.forOwn=mv,p.forOwnRight=wv,p.get=Ln,p.gt=My,p.gte=Ly,p.has=Ev,p.hasIn=kn,p.head=Fc,p.identity=Ue,p.includes=ay,p.indexOf=rg,p.inRange=kv,p.invoke=Sv,p.isArguments=rr,p.isArray=z,p.isArrayBuffer=ky,p.isArrayLike=je,p.isArrayLikeObject=ge,p.isBoolean=zy,p.isBuffer=zt,p.isDate=Hy,p.isElement=Vy,p.isEmpty=By,p.isEqual=Ky,p.isEqualWith=Wy,p.isError=Un,p.isFinite=Jy,p.isFunction=St,p.isInteger=Jc,p.isLength=us,p.isMap=Gc,p.isMatch=Gy,p.isMatchWith=Qy,p.isNaN=Yy,p.isNative=Zy,p.isNil=ev,p.isNull=Xy,p.isNumber=Qc,p.isObject=le,p.isObjectLike=pe,p.isPlainObject=ii,p.isRegExp=Mn,p.isSafeInteger=tv,p.isSet=Yc,p.isString=hs,p.isSymbol=Be,p.isTypedArray=Pr,p.isUndefined=rv,p.isWeakMap=iv,p.isWeakSet=sv,p.join=ag,p.kebabCase=Wv,p.last=rt,p.lastIndexOf=cg,p.lowerCase=Jv,p.lowerFirst=Gv,p.lt=nv,p.lte=ov,p.max=Hm,p.maxBy=Vm,p.mean=Bm,p.meanBy=Km,p.min=Wm,p.minBy=Jm,p.stubArray=Wn,p.stubFalse=Jn,p.stubObject=xm,p.stubString=Dm,p.stubTrue=Fm,p.multiply=Gm,p.nth=ug,p.noConflict=Sm,p.noop=Kn,p.now=os,p.pad=Qv,p.padEnd=Yv,p.padStart=Zv,p.parseInt=Xv,p.random=zv,p.reduce=py,p.reduceRight=dy,p.repeat=em,p.replace=tm,p.result=Tv,p.round=Qm,p.runInContext=v,p.sample=gy,p.size=my,p.snakeCase=rm,p.some=wy,p.sortedIndex=yg,p.sortedIndexBy=vg,p.sortedIndexOf=mg,p.sortedLastIndex=wg,p.sortedLastIndexBy=_g,p.sortedLastIndexOf=bg,p.startCase=sm,p.startsWith=nm,p.subtract=Ym,p.sum=Zm,p.sumBy=Xm,p.template=om,p.times=jm,p.toFinite=Ot,p.toInteger=H,p.toLength=Xc,p.toLower=am,p.toNumber=it,p.toSafeInteger=av,p.toString=te,p.toUpper=cm,p.trim=um,p.trimEnd=hm,p.trimStart=lm,p.truncate=pm,p.unescape=dm,p.uniqueId=Um,p.upperCase=fm,p.upperFirst=zn,p.each=Mc,p.eachRight=Lc,p.first=Fc,Bn(p,function(){var e={};return ft(p,function(i,n){re.call(p.prototype,n)||(e[n]=i)}),e}(),{chain:!1}),p.VERSION=s,Ye(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){p[e].placeholder=p}),Ye(["drop","take"],function(e,i){Q.prototype[e]=function(n){n=n===r?1:_e(H(n),0);var c=this.__filtered__&&!i?new Q(this):this.clone();return c.__filtered__?c.__takeCount__=Oe(n,c.__takeCount__):c.__views__.push({size:Oe(n,dt),type:e+(c.__dir__<0?"Right":"")}),c},Q.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Ye(["filter","map","takeWhile"],function(e,i){var n=i+1,c=n==Do||n==ul;Q.prototype[e]=function(h){var d=this.clone();return d.__iteratees__.push({iteratee:U(h,3),type:n}),d.__filtered__=d.__filtered__||c,d}}),Ye(["head","last"],function(e,i){var n="take"+(i?"Right":"");Q.prototype[e]=function(){return this[n](1).value()[0]}}),Ye(["initial","tail"],function(e,i){var n="drop"+(i?"":"Right");Q.prototype[e]=function(){return this.__filtered__?new Q(this):this[n](1)}}),Q.prototype.compact=function(){return this.filter(Ue)},Q.prototype.find=function(e){return this.filter(e).head()},Q.prototype.findLast=function(e){return this.reverse().find(e)},Q.prototype.invokeMap=K(function(e,i){return typeof e=="function"?new Q(this):this.map(function(n){return Yr(n,e,i)})}),Q.prototype.reject=function(e){return this.filter(cs(U(e)))},Q.prototype.slice=function(e,i){e=H(e);var n=this;return n.__filtered__&&(e>0||i<0)?new Q(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),i!==r&&(i=H(i),n=i<0?n.dropRight(-i):n.take(i-e)),n)},Q.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Q.prototype.toArray=function(){return this.take(dt)},ft(Q.prototype,function(e,i){var n=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),h=p[c?"take"+(i=="last"?"Right":""):i],d=c||/^find/.test(i);h&&(p.prototype[i]=function(){var f=this.__wrapped__,y=c?[1]:arguments,m=f instanceof Q,P=y[0],S=m||z(f),R=function(W){var Y=h.apply(p,Ft([W],y));return c&&A?Y[0]:Y};S&&n&&typeof P=="function"&&P.length!=1&&(m=S=!1);var A=this.__chain__,j=!!this.__actions__.length,M=d&&!A,V=m&&!j;if(!d&&S){f=V?f:new Q(this);var L=e.apply(f,y);return L.__actions__.push({func:ss,args:[R],thisArg:r}),new Xe(L,A)}return M&&V?e.apply(this,y):(L=this.thru(R),M?c?L.value()[0]:L.value():L)})}),Ye(["pop","push","shift","sort","splice","unshift"],function(e){var i=$i[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);p.prototype[e]=function(){var h=arguments;if(c&&!this.__chain__){var d=this.value();return i.apply(z(d)?d:[],h)}return this[n](function(f){return i.apply(z(f)?f:[],h)})}}),ft(Q.prototype,function(e,i){var n=p[i];if(n){var c=n.name+"";re.call(wr,c)||(wr[c]=[]),wr[c].push({name:i,func:n})}}),wr[Yi(r,G).name]=[{name:"wrapper",func:r}],Q.prototype.clone=pd,Q.prototype.reverse=dd,Q.prototype.value=fd,p.prototype.at=Vg,p.prototype.chain=Bg,p.prototype.commit=Kg,p.prototype.next=Wg,p.prototype.plant=Gg,p.prototype.reverse=Qg,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=Yg,p.prototype.first=p.prototype.head,Vr&&(p.prototype[Vr]=Jg),p},yr=Bp();Jt?((Jt.exports=yr)._=yr,Hs._=yr):Ie._=yr}).call(hi)})(_o,_o.exports);var YE=Object.defineProperty,ZE=Object.defineProperties,XE=Object.getOwnPropertyDescriptors,ph=Object.getOwnPropertySymbols,eI=Object.prototype.hasOwnProperty,tI=Object.prototype.propertyIsEnumerable,dh=(o,t,r)=>t in o?YE(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,fs=(o,t)=>{for(var r in t||(t={}))eI.call(t,r)&&dh(o,r,t[r]);if(ph)for(var r of ph(t))tI.call(t,r)&&dh(o,r,t[r]);return o},rI=(o,t)=>ZE(o,XE(t));function Bt(o,t,r){var s;const a=R0(o);return((s=t.rpcMap)==null?void 0:s[a.reference])||`${QE}?chainId=${a.namespace}:${a.reference}&projectId=${r}`}function ur(o){return o.includes(":")?o.split(":")[1]:o}function el(o){return o.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function iI(o,t){const r=Object.keys(t.namespaces).filter(a=>a.includes(o));if(!r.length)return[];const s=[];return r.forEach(a=>{const u=t.namespaces[a].accounts;s.push(...u)}),s}function sI(o={},t={}){const r=fh(o),s=fh(t);return _o.exports.merge(r,s)}function fh(o){var t,r,s,a;const u={};if(!Cr(o))return u;for(const[l,g]of Object.entries(o)){const w=No(l)?[l]:g.chains,b=g.methods||[],C=g.events||[],O=g.rpcMap||{},N=li(l);u[N]=rI(fs(fs({},u[N]),g),{chains:Yn(w,(t=u[N])==null?void 0:t.chains),methods:Yn(b,(r=u[N])==null?void 0:r.methods),events:Yn(C,(s=u[N])==null?void 0:s.events),rpcMap:fs(fs({},O),(a=u[N])==null?void 0:a.rpcMap)})}return u}function nI(o){return o.includes(":")?o.split(":")[2]:o}function oI(o){const t={};for(const[r,s]of Object.entries(o)){const a=s.methods||[],u=s.events||[],l=s.accounts||[],g=No(r)?[r]:s.chains?s.chains:el(s.accounts);t[r]={chains:g,methods:a,events:u,accounts:l}}return t}function so(o){return typeof o=="number"?o:o.includes("0x")?parseInt(o,16):o.includes(":")?Number(o.split(":")[1]):Number(o)}const tl={},he=o=>tl[o],no=(o,t)=>{tl[o]=t};class aI{constructor(t){this.name="polkadot",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=ur(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}}class cI{constructor(t){this.name="eip155",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(parseInt(t),r),this.chainId=parseInt(t),this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,r){const s=r||Bt(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=parseInt(ur(r));t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const t=this.chainId,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}async handleSwitchChain(t){var r,s;let a=t.request.params?(r=t.request.params[0])==null?void 0:r.chainId:"0x0";a=a.startsWith("0x")?a:`0x${a}`;const u=parseInt(a,16);if(this.isChainApproved(u))this.setDefaultChain(`${u}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:a}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${u}`);else throw new Error(`Failed to switch to chain 'eip155:${u}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}}class uI{constructor(t){this.name="solana",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=ur(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}}class hI{constructor(t){this.name="cosmos",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=ur(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}}class lI{constructor(t){this.name="cip34",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{const s=this.getCardanoRPCUrl(r),a=ur(r);t[a]=this.createHttpProvider(a,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}getCardanoRPCUrl(t){const r=this.namespace.rpcMap;if(r)return r[t]}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}}class pI{constructor(t){this.name="elrond",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=ur(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}}class dI{constructor(t){this.name="multiversx",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=ur(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}}class fI{constructor(t){this.name="near",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){if(this.chainId=t,!this.httpProviders[t]){const s=r||Bt(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace);return typeof s>"u"?void 0:new $t(new Kt(s,he("disableProviderPing")))}}var gI=Object.defineProperty,yI=Object.defineProperties,vI=Object.getOwnPropertyDescriptors,gh=Object.getOwnPropertySymbols,mI=Object.prototype.hasOwnProperty,wI=Object.prototype.propertyIsEnumerable,yh=(o,t,r)=>t in o?gI(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,gs=(o,t)=>{for(var r in t||(t={}))mI.call(t,r)&&yh(o,r,t[r]);if(gh)for(var r of gh(t))wI.call(t,r)&&yh(o,r,t[r]);return o},oo=(o,t)=>yI(o,vI(t));class xo{constructor(t){this.events=new Ge.es,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=t,this.logger=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:I.qt(I.k({level:(t==null?void 0:t.logger)||hh})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const r=new xo(t);return await r.initialize(),r}async request(t,r){const[s,a]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(s).request({request:gs({},t),chainId:`${s}:${a}`,topic:this.session.topic})}sendAsync(t,r,s){const a=new Date().getTime();this.request(t,s).then(u=>r(null,I.formatJsonRpcResult(a,u))).catch(u=>r(u,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var t;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(t=this.session)==null?void 0:t.topic,reason:ve("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),await this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}removeListener(t,r){this.events.removeListener(t,r)}off(t,r){this.events.off(t,r)}get isWalletConnect(){return!0}async pair(t){this.shouldAbortPairingAttempt=!1;let r=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(r>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:s,approval:a}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});s&&(this.uri=s,this.events.emit("display_uri",s)),await a().then(u=>{this.session=u,this.namespaces||(this.namespaces=oI(u.namespaces),this.persist("namespaces",this.namespaces))}).catch(u=>{if(u.message!==Zh)throw u;r++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(t,r){try{if(!this.session)return;const[s,a]=this.validateChain(t);this.getProvider(s).setDefaultChain(a,r)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(nr(r)){for(const s of r)t.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const t=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[t]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await jE.init({logger:this.providerOpts.logger||hh,relayUrl:this.providerOpts.relayUrl||WE,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const t=[...new Set(Object.keys(this.session.namespaces).map(r=>li(r)))];no("client",this.client),no("events",this.events),no("disableProviderPing",this.disableProviderPing),t.forEach(r=>{if(!this.session)return;const s=iI(r,this.session),a=el(s),u=sI(this.namespaces,this.optionalNamespaces),l=oo(gs({},u[r]),{accounts:s,chains:a});switch(r){case"eip155":this.rpcProviders[r]=new cI({namespace:l});break;case"solana":this.rpcProviders[r]=new uI({namespace:l});break;case"cosmos":this.rpcProviders[r]=new hI({namespace:l});break;case"polkadot":this.rpcProviders[r]=new aI({namespace:l});break;case"cip34":this.rpcProviders[r]=new lI({namespace:l});break;case"elrond":this.rpcProviders[r]=new pI({namespace:l});break;case"multiversx":this.rpcProviders[r]=new dI({namespace:l});break;case"near":this.rpcProviders[r]=new fI({namespace:l});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{const{params:r}=t,{event:s}=r;if(s.name==="accountsChanged"){const a=s.data;a&&nr(a)&&this.events.emit("accountsChanged",a.map(nI))}else if(s.name==="chainChanged"){const a=r.chainId,u=r.event.data,l=li(a),g=so(a)!==so(u)?`${l}:${so(u)}`:a;this.onChainChanged(g)}else this.events.emit(s.name,s.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:r})=>{var s;const{namespaces:a}=r,u=(s=this.client)==null?void 0:s.session.get(t);this.session=oo(gs({},u),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:r})}),this.client.on("session_delete",async t=>{await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",oo(gs({},ve("USER_DISCONNECTED")),{data:t.topic}))}),this.on(At.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){if(!this.rpcProviders[t])throw new Error(`Provider not found: ${t}`);return this.rpcProviders[t]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var r;this.getProvider(t).updateNamespace((r=this.session)==null?void 0:r.namespaces[t])})}setNamespaces(t){const{namespaces:r,optionalNamespaces:s,sessionProperties:a}=t;r&&Object.keys(r).length&&(this.namespaces=r),s&&Object.keys(s).length&&(this.optionalNamespaces=s),this.sessionProperties=a,this.persist("namespaces",r),this.persist("optionalNamespaces",s)}validateChain(t){const[r,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,s];if(r&&!Object.keys(this.namespaces||{}).map(l=>li(l)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&s)return[r,s];const a=li(Object.keys(this.namespaces)[0]),u=this.rpcProviders[a].getDefaultChain();return[a,u]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}onChainChanged(t,r=!1){var s;if(!this.namespaces)return;const[a,u]=this.validateChain(t);r||this.getProvider(a).setDefaultChain(u),((s=this.namespaces[a])!=null?s:this.namespaces[`${a}:${u}`]).defaultChain=u,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",u)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(t,r){this.client.core.storage.setItem(`${lh}/${t}`,r)}async getFromStore(t){return await this.client.core.storage.getItem(`${lh}/${t}`)}}const _I=xo,bI="wc",EI="ethereum_provider",II=`${bI}@2:${EI}:`,PI="https://rpc.walletconnect.com/v1/",_s=["eth_sendTransaction","personal_sign"],rl=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],bs=["chainChanged","accountsChanged"],il=["chainChanged","accountsChanged","message","disconnect","connect"];var SI=Object.defineProperty,OI=Object.defineProperties,RI=Object.getOwnPropertyDescriptors,vh=Object.getOwnPropertySymbols,NI=Object.prototype.hasOwnProperty,CI=Object.prototype.propertyIsEnumerable,mh=(o,t,r)=>t in o?SI(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,di=(o,t)=>{for(var r in t||(t={}))NI.call(t,r)&&mh(o,r,t[r]);if(vh)for(var r of vh(t))CI.call(t,r)&&mh(o,r,t[r]);return o},wh=(o,t)=>OI(o,RI(t));function Es(o){return Number(o[0].split(":")[1])}function ao(o){return`0x${o.toString(16)}`}function $I(o){const{chains:t,optionalChains:r,methods:s,optionalMethods:a,events:u,optionalEvents:l,rpcMap:g}=o;if(!co(t))throw new Error("Invalid chains");const w={chains:t,methods:s||_s,events:u||bs,rpcMap:di({},t.length?{[Es(t)]:g[Es(t)]}:{})},b=u==null?void 0:u.filter(q=>!bs.includes(q)),C=s==null?void 0:s.filter(q=>!_s.includes(q));if(!r&&!l&&!a&&!(b!=null&&b.length)&&!(C!=null&&C.length))return{required:t.length?w:void 0};const O=(b==null?void 0:b.length)&&(C==null?void 0:C.length)||!r,N={chains:[...new Set(O?w.chains.concat(r||[]):r)],methods:[...new Set(w.methods.concat(a!=null&&a.length?a:rl))],events:[...new Set(w.events.concat(l!=null&&l.length?l:il))],rpcMap:g};return{required:t.length?w:void 0,optional:r.length?N:void 0}}class Os{constructor(){this.events=new Ge.eventsExports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=II,this.on=(t,r)=>(this.events.on(t,r),this),this.once=(t,r)=>(this.events.once(t,r),this),this.removeListener=(t,r)=>(this.events.removeListener(t,r),this),this.off=(t,r)=>(this.events.off(t,r),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const r=new Os;return await r.initialize(t),r}async request(t){return await this.signer.request(t,this.formatChainId(this.chainId))}sendAsync(t,r){this.signer.sendAsync(t,r,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(t);const{required:r,optional:s}=$I(this.rpc);try{const a=await new Promise(async(l,g)=>{var w;this.rpc.showQrModal&&((w=this.modal)==null||w.subscribeModal(b=>{!b.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),g(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(wh(di({namespaces:di({},r&&{[this.namespace]:r})},s&&{optionalNamespaces:{[this.namespace]:s}}),{pairingTopic:t==null?void 0:t.pairingTopic})).then(b=>{l(b)}).catch(b=>{g(new Error(b.message))})});if(!a)return;const u=lw(a.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:u),this.setAccounts(u),this.events.emit("connect",{chainId:ao(this.chainId)})}catch(a){throw this.signer.logger.error(a),a}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",t=>{const{params:r}=t,{event:s}=r;s.name==="accountsChanged"?(this.accounts=this.parseAccounts(s.data),this.events.emit("accountsChanged",this.accounts)):s.name==="chainChanged"?this.setChainId(this.formatChainId(s.data)):this.events.emit(s.name,s.data),this.events.emit("session_event",t)}),this.signer.on("chainChanged",t=>{const r=parseInt(t);this.chainId=r,this.events.emit("chainChanged",ao(this.chainId)),this.persist()}),this.signer.on("session_update",t=>{this.events.emit("session_update",t)}),this.signer.on("session_delete",t=>{this.reset(),this.events.emit("session_delete",t),this.events.emit("disconnect",wh(di({},dw("USER_DISCONNECTED")),{data:t.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",t=>{var r,s;this.rpc.showQrModal&&((r=this.modal)==null||r.closeModal(),(s=this.modal)==null||s.openModal({uri:t})),this.events.emit("display_uri",t)})}switchEthereumChain(t){this.request({method:"wallet_switchEthereumChain",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return typeof t=="string"?t.startsWith(`${this.namespace}:`):!1}formatChainId(t){return`${this.namespace}:${t}`}parseChainId(t){return Number(t.split(":")[1])}setChainIds(t){const r=t.filter(s=>this.isCompatibleChainId(s)).map(s=>this.parseChainId(s));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",ao(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const r=this.parseChainId(t);this.chainId=r,this.switchEthereumChain(r)}}parseAccountId(t){const[r,s,a]=t.split(":");return{chainId:`${r}:${s}`,address:a}}setAccounts(t){this.accounts=t.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(t){var r,s;const a=(r=t==null?void 0:t.chains)!=null?r:[],u=(s=t==null?void 0:t.optionalChains)!=null?s:[],l=a.concat(u);if(!l.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const g=a.length?(t==null?void 0:t.methods)||_s:[],w=a.length?(t==null?void 0:t.events)||bs:[],b=(t==null?void 0:t.optionalMethods)||[],C=(t==null?void 0:t.optionalEvents)||[],O=(t==null?void 0:t.rpcMap)||this.buildRpcMap(l,t.projectId),N=(t==null?void 0:t.qrModalOptions)||void 0;return{chains:a==null?void 0:a.map(q=>this.formatChainId(q)),optionalChains:u.map(q=>this.formatChainId(q)),methods:g,events:w,optionalMethods:b,optionalEvents:C,rpcMap:O,showQrModal:!!(t!=null&&t.showQrModal),qrModalOptions:N,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,r){const s={};return t.forEach(a=>{s[a]=this.getRpcUrl(a,r)}),s}async initialize(t){if(this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?Es(this.rpc.chains):Es(this.rpc.optionalChains),this.signer=await _I.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let r;try{const{WalletConnectModal:s}=await Promise.resolve().then(()=>require("./index-BrZMeh8Y.js")).then(a=>a.index);r=s}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(r)try{this.modal=new r(di({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(s){throw this.signer.logger.error(s),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(t){if(!t)return;const{chains:r,optionalChains:s,rpcMap:a}=t;r&&co(r)&&(this.rpc.chains=r.map(u=>this.formatChainId(u)),r.forEach(u=>{this.rpc.rpcMap[u]=(a==null?void 0:a[u])||this.getRpcUrl(u)})),s&&co(s)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=s==null?void 0:s.map(u=>this.formatChainId(u)),s.forEach(u=>{this.rpc.rpcMap[u]=(a==null?void 0:a[u])||this.getRpcUrl(u)}))}getRpcUrl(t,r){var s;return((s=this.rpc.rpcMap)==null?void 0:s[t])||`${PI}?chainId=eip155:${t}&projectId=${r||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),r=this.session.namespaces[`${this.namespace}:${t}`]?this.session.namespaces[`${this.namespace}:${t}`]:this.session.namespaces[this.namespace];this.setChainIds(t?[this.formatChainId(t)]:r==null?void 0:r.accounts),this.setAccounts(r==null?void 0:r.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(t){return typeof t=="string"||t instanceof String?[this.parseAccount(t)]:t.map(r=>this.parseAccount(r))}}const AI=Os;exports.EthereumProvider=AI;exports.OPTIONAL_EVENTS=il;exports.OPTIONAL_METHODS=rl;exports.REQUIRED_EVENTS=bs;exports.REQUIRED_METHODS=_s;exports.default=Os;
|
|
46
|
+
}`;var V=uu(function(){return ee(d,j+"return "+R).apply(r,f)});if(V.source=R,Un(V))throw V;return V}function am(e){return te(e).toLowerCase()}function cm(e){return te(e).toUpperCase()}function um(e,i,n){if(e=te(e),e&&(n||i===r))return ma(e);if(!e||!(i=Ve(i)))return e;var c=at(e),h=at(i),d=wa(c,h),f=_a(c,h)+1;return kt(c,d,f).join("")}function hm(e,i,n){if(e=te(e),e&&(n||i===r))return e.slice(0,Ea(e)+1);if(!e||!(i=Ve(i)))return e;var c=at(e),h=_a(c,at(i))+1;return kt(c,0,h).join("")}function lm(e,i,n){if(e=te(e),e&&(n||i===r))return e.replace(qs,"");if(!e||!(i=Ve(i)))return e;var c=at(e),h=wa(c,at(i));return kt(c,h).join("")}function pm(e,i){var n=sl,c=nl;if(le(i)){var h="separator"in i?i.separator:h;n="length"in i?H(i.length):n,c="omission"in i?Ve(i.omission):c}e=te(e);var d=e.length;if(fr(e)){var f=at(e);d=f.length}if(n>=d)return e;var y=n-gr(c);if(y<1)return c;var m=f?kt(f,0,y).join(""):e.slice(0,y);if(h===r)return m+c;if(f&&(y+=m.length-y),Mn(h)){if(e.slice(y).search(h)){var P,S=m;for(h.global||(h=en(h.source,te(Lo.exec(h))+"g")),h.lastIndex=0;P=h.exec(S);)var R=P.index;m=m.slice(0,R===r?y:R)}}else if(e.indexOf(Ve(h),y)!=y){var A=m.lastIndexOf(h);A>-1&&(m=m.slice(0,A))}return m+c}function dm(e){return e=te(e),e&&Il.test(e)?e.replace(qo,kp):e}var fm=Er(function(e,i,n){return e+(n?" ":"")+i.toUpperCase()}),zn=hc("toUpperCase");function cu(e,i,n){return e=te(e),i=n?r:i,i===r?jp(e)?Vp(e):Rp(e):e.match(i)||[]}var uu=K(function(e,i){try{return ze(e,r,i)}catch(n){return Un(n)?n:new k(n)}}),gm=It(function(e,i){return Ye(i,function(n){n=yt(n),bt(e,n,jn(e[n],e))}),e});function ym(e){var i=e==null?0:e.length,n=U();return e=i?ue(e,function(c){if(typeof c[1]!="function")throw new Ze(l);return[n(c[0]),c[1]]}):[],K(function(c){for(var h=-1;++h<i;){var d=e[h];if(ze(d[0],this,c))return ze(d[1],this,c)}})}function vm(e){return kd(et(e,O))}function Hn(e){return function(){return e}}function mm(e,i){return e==null||e!==e?i:e}var wm=pc(),_m=pc(!0);function Ue(e){return e}function Vn(e){return za(typeof e=="function"?e:et(e,O))}function bm(e){return Va(et(e,O))}function Em(e,i){return Ba(e,et(i,O))}var Im=K(function(e,i){return function(n){return Yr(n,e,i)}}),Pm=K(function(e,i){return function(n){return Yr(e,n,i)}});function Bn(e,i,n){var c=be(i),h=Ki(i,c);n==null&&!(le(i)&&(h.length||!c.length))&&(n=i,i=e,e=this,h=Ki(i,be(i)));var d=!(le(n)&&"chain"in n)||!!n.chain,f=St(e);return Ye(h,function(y){var m=i[y];e[y]=m,f&&(e.prototype[y]=function(){var P=this.__chain__;if(d||P){var S=e(this.__wrapped__),R=S.__actions__=Fe(this.__actions__);return R.push({func:m,args:arguments,thisArg:e}),S.__chain__=P,S}return m.apply(e,Ft([this.value()],arguments))})}),e}function Sm(){return Ie._===this&&(Ie._=Qp),this}function Kn(){}function Om(e){return e=H(e),K(function(i){return Ka(i,e)})}var Rm=In(ue),Nm=In(da),Cm=In(Ws);function hu(e){return $n(e)?Js(yt(e)):nf(e)}function $m(e){return function(i){return e==null?r:Xt(e,i)}}var Am=fc(),Tm=fc(!0);function Wn(){return[]}function Jn(){return!1}function xm(){return{}}function Dm(){return""}function Fm(){return!0}function jm(e,i){if(e=H(e),e<1||e>xt)return[];var n=dt,c=Oe(e,dt);i=U(i),e-=dt;for(var h=Ys(c,i);++n<e;)i(n);return h}function qm(e){return z(e)?ue(e,yt):Be(e)?[e]:Fe($c(te(e)))}function Um(e){var i=++Jp;return te(e)+i}var Mm=Zi(function(e,i){return e+i},0),Lm=Pn("ceil"),km=Zi(function(e,i){return e/i},1),zm=Pn("floor");function Hm(e){return e&&e.length?Bi(e,Ue,un):r}function Vm(e,i){return e&&e.length?Bi(e,U(i,2),un):r}function Bm(e){return ya(e,Ue)}function Km(e,i){return ya(e,U(i,2))}function Wm(e){return e&&e.length?Bi(e,Ue,dn):r}function Jm(e,i){return e&&e.length?Bi(e,U(i,2),dn):r}var Gm=Zi(function(e,i){return e*i},1),Qm=Pn("round"),Ym=Zi(function(e,i){return e-i},0);function Zm(e){return e&&e.length?Qs(e,Ue):0}function Xm(e,i){return e&&e.length?Qs(e,U(i,2)):0}return p.after=by,p.ary=kc,p.assign=cv,p.assignIn=tu,p.assignInWith=ls,p.assignWith=uv,p.at=hv,p.before=zc,p.bind=jn,p.bindAll=gm,p.bindKey=Hc,p.castArray=xy,p.chain=Uc,p.chunk=zf,p.compact=Hf,p.concat=Vf,p.cond=ym,p.conforms=vm,p.constant=Hn,p.countBy=Zg,p.create=lv,p.curry=Vc,p.curryRight=Bc,p.debounce=Kc,p.defaults=pv,p.defaultsDeep=dv,p.defer=Ey,p.delay=Iy,p.difference=Bf,p.differenceBy=Kf,p.differenceWith=Wf,p.drop=Jf,p.dropRight=Gf,p.dropRightWhile=Qf,p.dropWhile=Yf,p.fill=Zf,p.filter=ey,p.flatMap=iy,p.flatMapDeep=sy,p.flatMapDepth=ny,p.flatten=Dc,p.flattenDeep=Xf,p.flattenDepth=eg,p.flip=Py,p.flow=wm,p.flowRight=_m,p.fromPairs=tg,p.functions=_v,p.functionsIn=bv,p.groupBy=oy,p.initial=ig,p.intersection=sg,p.intersectionBy=ng,p.intersectionWith=og,p.invert=Iv,p.invertBy=Pv,p.invokeMap=cy,p.iteratee=Vn,p.keyBy=uy,p.keys=be,p.keysIn=qe,p.map=ns,p.mapKeys=Ov,p.mapValues=Rv,p.matches=bm,p.matchesProperty=Em,p.memoize=as,p.merge=Nv,p.mergeWith=ru,p.method=Im,p.methodOf=Pm,p.mixin=Bn,p.negate=cs,p.nthArg=Om,p.omit=Cv,p.omitBy=$v,p.once=Sy,p.orderBy=hy,p.over=Rm,p.overArgs=Oy,p.overEvery=Nm,p.overSome=Cm,p.partial=qn,p.partialRight=Wc,p.partition=ly,p.pick=Av,p.pickBy=iu,p.property=hu,p.propertyOf=$m,p.pull=hg,p.pullAll=jc,p.pullAllBy=lg,p.pullAllWith=pg,p.pullAt=dg,p.range=Am,p.rangeRight=Tm,p.rearg=Ry,p.reject=fy,p.remove=fg,p.rest=Ny,p.reverse=Dn,p.sampleSize=yy,p.set=xv,p.setWith=Dv,p.shuffle=vy,p.slice=gg,p.sortBy=_y,p.sortedUniq=Eg,p.sortedUniqBy=Ig,p.split=im,p.spread=Cy,p.tail=Pg,p.take=Sg,p.takeRight=Og,p.takeRightWhile=Rg,p.takeWhile=Ng,p.tap=Hg,p.throttle=$y,p.thru=ss,p.toArray=Zc,p.toPairs=su,p.toPairsIn=nu,p.toPath=qm,p.toPlainObject=eu,p.transform=Fv,p.unary=Ay,p.union=Cg,p.unionBy=$g,p.unionWith=Ag,p.uniq=Tg,p.uniqBy=xg,p.uniqWith=Dg,p.unset=jv,p.unzip=Fn,p.unzipWith=qc,p.update=qv,p.updateWith=Uv,p.values=Sr,p.valuesIn=Mv,p.without=Fg,p.words=cu,p.wrap=Ty,p.xor=jg,p.xorBy=qg,p.xorWith=Ug,p.zip=Mg,p.zipObject=Lg,p.zipObjectDeep=kg,p.zipWith=zg,p.entries=su,p.entriesIn=nu,p.extend=tu,p.extendWith=ls,Bn(p,p),p.add=Mm,p.attempt=uu,p.camelCase=Hv,p.capitalize=ou,p.ceil=Lm,p.clamp=Lv,p.clone=Dy,p.cloneDeep=jy,p.cloneDeepWith=qy,p.cloneWith=Fy,p.conformsTo=Uy,p.deburr=au,p.defaultTo=mm,p.divide=km,p.endsWith=Vv,p.eq=ut,p.escape=Bv,p.escapeRegExp=Kv,p.every=Xg,p.find=ty,p.findIndex=Tc,p.findKey=fv,p.findLast=ry,p.findLastIndex=xc,p.findLastKey=gv,p.floor=zm,p.forEach=Mc,p.forEachRight=Lc,p.forIn=yv,p.forInRight=vv,p.forOwn=mv,p.forOwnRight=wv,p.get=Ln,p.gt=My,p.gte=Ly,p.has=Ev,p.hasIn=kn,p.head=Fc,p.identity=Ue,p.includes=ay,p.indexOf=rg,p.inRange=kv,p.invoke=Sv,p.isArguments=rr,p.isArray=z,p.isArrayBuffer=ky,p.isArrayLike=je,p.isArrayLikeObject=ge,p.isBoolean=zy,p.isBuffer=zt,p.isDate=Hy,p.isElement=Vy,p.isEmpty=By,p.isEqual=Ky,p.isEqualWith=Wy,p.isError=Un,p.isFinite=Jy,p.isFunction=St,p.isInteger=Jc,p.isLength=us,p.isMap=Gc,p.isMatch=Gy,p.isMatchWith=Qy,p.isNaN=Yy,p.isNative=Zy,p.isNil=ev,p.isNull=Xy,p.isNumber=Qc,p.isObject=le,p.isObjectLike=pe,p.isPlainObject=ii,p.isRegExp=Mn,p.isSafeInteger=tv,p.isSet=Yc,p.isString=hs,p.isSymbol=Be,p.isTypedArray=Pr,p.isUndefined=rv,p.isWeakMap=iv,p.isWeakSet=sv,p.join=ag,p.kebabCase=Wv,p.last=rt,p.lastIndexOf=cg,p.lowerCase=Jv,p.lowerFirst=Gv,p.lt=nv,p.lte=ov,p.max=Hm,p.maxBy=Vm,p.mean=Bm,p.meanBy=Km,p.min=Wm,p.minBy=Jm,p.stubArray=Wn,p.stubFalse=Jn,p.stubObject=xm,p.stubString=Dm,p.stubTrue=Fm,p.multiply=Gm,p.nth=ug,p.noConflict=Sm,p.noop=Kn,p.now=os,p.pad=Qv,p.padEnd=Yv,p.padStart=Zv,p.parseInt=Xv,p.random=zv,p.reduce=py,p.reduceRight=dy,p.repeat=em,p.replace=tm,p.result=Tv,p.round=Qm,p.runInContext=v,p.sample=gy,p.size=my,p.snakeCase=rm,p.some=wy,p.sortedIndex=yg,p.sortedIndexBy=vg,p.sortedIndexOf=mg,p.sortedLastIndex=wg,p.sortedLastIndexBy=_g,p.sortedLastIndexOf=bg,p.startCase=sm,p.startsWith=nm,p.subtract=Ym,p.sum=Zm,p.sumBy=Xm,p.template=om,p.times=jm,p.toFinite=Ot,p.toInteger=H,p.toLength=Xc,p.toLower=am,p.toNumber=it,p.toSafeInteger=av,p.toString=te,p.toUpper=cm,p.trim=um,p.trimEnd=hm,p.trimStart=lm,p.truncate=pm,p.unescape=dm,p.uniqueId=Um,p.upperCase=fm,p.upperFirst=zn,p.each=Mc,p.eachRight=Lc,p.first=Fc,Bn(p,function(){var e={};return ft(p,function(i,n){re.call(p.prototype,n)||(e[n]=i)}),e}(),{chain:!1}),p.VERSION=s,Ye(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){p[e].placeholder=p}),Ye(["drop","take"],function(e,i){Q.prototype[e]=function(n){n=n===r?1:_e(H(n),0);var c=this.__filtered__&&!i?new Q(this):this.clone();return c.__filtered__?c.__takeCount__=Oe(n,c.__takeCount__):c.__views__.push({size:Oe(n,dt),type:e+(c.__dir__<0?"Right":"")}),c},Q.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Ye(["filter","map","takeWhile"],function(e,i){var n=i+1,c=n==Do||n==ul;Q.prototype[e]=function(h){var d=this.clone();return d.__iteratees__.push({iteratee:U(h,3),type:n}),d.__filtered__=d.__filtered__||c,d}}),Ye(["head","last"],function(e,i){var n="take"+(i?"Right":"");Q.prototype[e]=function(){return this[n](1).value()[0]}}),Ye(["initial","tail"],function(e,i){var n="drop"+(i?"":"Right");Q.prototype[e]=function(){return this.__filtered__?new Q(this):this[n](1)}}),Q.prototype.compact=function(){return this.filter(Ue)},Q.prototype.find=function(e){return this.filter(e).head()},Q.prototype.findLast=function(e){return this.reverse().find(e)},Q.prototype.invokeMap=K(function(e,i){return typeof e=="function"?new Q(this):this.map(function(n){return Yr(n,e,i)})}),Q.prototype.reject=function(e){return this.filter(cs(U(e)))},Q.prototype.slice=function(e,i){e=H(e);var n=this;return n.__filtered__&&(e>0||i<0)?new Q(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),i!==r&&(i=H(i),n=i<0?n.dropRight(-i):n.take(i-e)),n)},Q.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Q.prototype.toArray=function(){return this.take(dt)},ft(Q.prototype,function(e,i){var n=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),h=p[c?"take"+(i=="last"?"Right":""):i],d=c||/^find/.test(i);h&&(p.prototype[i]=function(){var f=this.__wrapped__,y=c?[1]:arguments,m=f instanceof Q,P=y[0],S=m||z(f),R=function(W){var Y=h.apply(p,Ft([W],y));return c&&A?Y[0]:Y};S&&n&&typeof P=="function"&&P.length!=1&&(m=S=!1);var A=this.__chain__,j=!!this.__actions__.length,M=d&&!A,V=m&&!j;if(!d&&S){f=V?f:new Q(this);var L=e.apply(f,y);return L.__actions__.push({func:ss,args:[R],thisArg:r}),new Xe(L,A)}return M&&V?e.apply(this,y):(L=this.thru(R),M?c?L.value()[0]:L.value():L)})}),Ye(["pop","push","shift","sort","splice","unshift"],function(e){var i=$i[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);p.prototype[e]=function(){var h=arguments;if(c&&!this.__chain__){var d=this.value();return i.apply(z(d)?d:[],h)}return this[n](function(f){return i.apply(z(f)?f:[],h)})}}),ft(Q.prototype,function(e,i){var n=p[i];if(n){var c=n.name+"";re.call(wr,c)||(wr[c]=[]),wr[c].push({name:i,func:n})}}),wr[Yi(r,G).name]=[{name:"wrapper",func:r}],Q.prototype.clone=pd,Q.prototype.reverse=dd,Q.prototype.value=fd,p.prototype.at=Vg,p.prototype.chain=Bg,p.prototype.commit=Kg,p.prototype.next=Wg,p.prototype.plant=Gg,p.prototype.reverse=Qg,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=Yg,p.prototype.first=p.prototype.head,Vr&&(p.prototype[Vr]=Jg),p},yr=Bp();Jt?((Jt.exports=yr)._=yr,Hs._=yr):Ie._=yr}).call(hi)})(_o,_o.exports);var YE=Object.defineProperty,ZE=Object.defineProperties,XE=Object.getOwnPropertyDescriptors,ph=Object.getOwnPropertySymbols,eI=Object.prototype.hasOwnProperty,tI=Object.prototype.propertyIsEnumerable,dh=(o,t,r)=>t in o?YE(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,fs=(o,t)=>{for(var r in t||(t={}))eI.call(t,r)&&dh(o,r,t[r]);if(ph)for(var r of ph(t))tI.call(t,r)&&dh(o,r,t[r]);return o},rI=(o,t)=>ZE(o,XE(t));function Bt(o,t,r){var s;const a=R0(o);return((s=t.rpcMap)==null?void 0:s[a.reference])||`${QE}?chainId=${a.namespace}:${a.reference}&projectId=${r}`}function ur(o){return o.includes(":")?o.split(":")[1]:o}function el(o){return o.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function iI(o,t){const r=Object.keys(t.namespaces).filter(a=>a.includes(o));if(!r.length)return[];const s=[];return r.forEach(a=>{const u=t.namespaces[a].accounts;s.push(...u)}),s}function sI(o={},t={}){const r=fh(o),s=fh(t);return _o.exports.merge(r,s)}function fh(o){var t,r,s,a;const u={};if(!Cr(o))return u;for(const[l,g]of Object.entries(o)){const w=No(l)?[l]:g.chains,b=g.methods||[],C=g.events||[],O=g.rpcMap||{},N=li(l);u[N]=rI(fs(fs({},u[N]),g),{chains:Yn(w,(t=u[N])==null?void 0:t.chains),methods:Yn(b,(r=u[N])==null?void 0:r.methods),events:Yn(C,(s=u[N])==null?void 0:s.events),rpcMap:fs(fs({},O),(a=u[N])==null?void 0:a.rpcMap)})}return u}function nI(o){return o.includes(":")?o.split(":")[2]:o}function oI(o){const t={};for(const[r,s]of Object.entries(o)){const a=s.methods||[],u=s.events||[],l=s.accounts||[],g=No(r)?[r]:s.chains?s.chains:el(s.accounts);t[r]={chains:g,methods:a,events:u,accounts:l}}return t}function so(o){return typeof o=="number"?o:o.includes("0x")?parseInt(o,16):o.includes(":")?Number(o.split(":")[1]):Number(o)}const tl={},he=o=>tl[o],no=(o,t)=>{tl[o]=t};class aI{constructor(t){this.name="polkadot",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=ur(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}}class cI{constructor(t){this.name="eip155",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(parseInt(t),r),this.chainId=parseInt(t),this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,r){const s=r||Bt(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=parseInt(ur(r));t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const t=this.chainId,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}async handleSwitchChain(t){var r,s;let a=t.request.params?(r=t.request.params[0])==null?void 0:r.chainId:"0x0";a=a.startsWith("0x")?a:`0x${a}`;const u=parseInt(a,16);if(this.isChainApproved(u))this.setDefaultChain(`${u}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:a}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${u}`);else throw new Error(`Failed to switch to chain 'eip155:${u}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}}class uI{constructor(t){this.name="solana",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=ur(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}}class hI{constructor(t){this.name="cosmos",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=ur(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}}class lI{constructor(t){this.name="cip34",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{const s=this.getCardanoRPCUrl(r),a=ur(r);t[a]=this.createHttpProvider(a,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}getCardanoRPCUrl(t){const r=this.namespace.rpcMap;if(r)return r[t]}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}}class pI{constructor(t){this.name="elrond",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=ur(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}}class dI{constructor(t){this.name="multiversx",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=ur(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new $t(new Kt(s,he("disableProviderPing")))}}class fI{constructor(t){this.name="near",this.namespace=t.namespace,this.events=he("events"),this.client=he("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){if(this.chainId=t,!this.httpProviders[t]){const s=r||Bt(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(At.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace);return typeof s>"u"?void 0:new $t(new Kt(s,he("disableProviderPing")))}}var gI=Object.defineProperty,yI=Object.defineProperties,vI=Object.getOwnPropertyDescriptors,gh=Object.getOwnPropertySymbols,mI=Object.prototype.hasOwnProperty,wI=Object.prototype.propertyIsEnumerable,yh=(o,t,r)=>t in o?gI(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,gs=(o,t)=>{for(var r in t||(t={}))mI.call(t,r)&&yh(o,r,t[r]);if(gh)for(var r of gh(t))wI.call(t,r)&&yh(o,r,t[r]);return o},oo=(o,t)=>yI(o,vI(t));class xo{constructor(t){this.events=new Ge.es,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=t,this.logger=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:I.qt(I.k({level:(t==null?void 0:t.logger)||hh})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const r=new xo(t);return await r.initialize(),r}async request(t,r){const[s,a]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(s).request({request:gs({},t),chainId:`${s}:${a}`,topic:this.session.topic})}sendAsync(t,r,s){const a=new Date().getTime();this.request(t,s).then(u=>r(null,I.formatJsonRpcResult(a,u))).catch(u=>r(u,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var t;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(t=this.session)==null?void 0:t.topic,reason:ve("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),await this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}removeListener(t,r){this.events.removeListener(t,r)}off(t,r){this.events.off(t,r)}get isWalletConnect(){return!0}async pair(t){this.shouldAbortPairingAttempt=!1;let r=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(r>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:s,approval:a}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});s&&(this.uri=s,this.events.emit("display_uri",s)),await a().then(u=>{this.session=u,this.namespaces||(this.namespaces=oI(u.namespaces),this.persist("namespaces",this.namespaces))}).catch(u=>{if(u.message!==Zh)throw u;r++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(t,r){try{if(!this.session)return;const[s,a]=this.validateChain(t);this.getProvider(s).setDefaultChain(a,r)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(nr(r)){for(const s of r)t.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const t=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[t]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await jE.init({logger:this.providerOpts.logger||hh,relayUrl:this.providerOpts.relayUrl||WE,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const t=[...new Set(Object.keys(this.session.namespaces).map(r=>li(r)))];no("client",this.client),no("events",this.events),no("disableProviderPing",this.disableProviderPing),t.forEach(r=>{if(!this.session)return;const s=iI(r,this.session),a=el(s),u=sI(this.namespaces,this.optionalNamespaces),l=oo(gs({},u[r]),{accounts:s,chains:a});switch(r){case"eip155":this.rpcProviders[r]=new cI({namespace:l});break;case"solana":this.rpcProviders[r]=new uI({namespace:l});break;case"cosmos":this.rpcProviders[r]=new hI({namespace:l});break;case"polkadot":this.rpcProviders[r]=new aI({namespace:l});break;case"cip34":this.rpcProviders[r]=new lI({namespace:l});break;case"elrond":this.rpcProviders[r]=new pI({namespace:l});break;case"multiversx":this.rpcProviders[r]=new dI({namespace:l});break;case"near":this.rpcProviders[r]=new fI({namespace:l});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{const{params:r}=t,{event:s}=r;if(s.name==="accountsChanged"){const a=s.data;a&&nr(a)&&this.events.emit("accountsChanged",a.map(nI))}else if(s.name==="chainChanged"){const a=r.chainId,u=r.event.data,l=li(a),g=so(a)!==so(u)?`${l}:${so(u)}`:a;this.onChainChanged(g)}else this.events.emit(s.name,s.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:r})=>{var s;const{namespaces:a}=r,u=(s=this.client)==null?void 0:s.session.get(t);this.session=oo(gs({},u),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:r})}),this.client.on("session_delete",async t=>{await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",oo(gs({},ve("USER_DISCONNECTED")),{data:t.topic}))}),this.on(At.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){if(!this.rpcProviders[t])throw new Error(`Provider not found: ${t}`);return this.rpcProviders[t]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var r;this.getProvider(t).updateNamespace((r=this.session)==null?void 0:r.namespaces[t])})}setNamespaces(t){const{namespaces:r,optionalNamespaces:s,sessionProperties:a}=t;r&&Object.keys(r).length&&(this.namespaces=r),s&&Object.keys(s).length&&(this.optionalNamespaces=s),this.sessionProperties=a,this.persist("namespaces",r),this.persist("optionalNamespaces",s)}validateChain(t){const[r,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,s];if(r&&!Object.keys(this.namespaces||{}).map(l=>li(l)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&s)return[r,s];const a=li(Object.keys(this.namespaces)[0]),u=this.rpcProviders[a].getDefaultChain();return[a,u]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}onChainChanged(t,r=!1){var s;if(!this.namespaces)return;const[a,u]=this.validateChain(t);r||this.getProvider(a).setDefaultChain(u),((s=this.namespaces[a])!=null?s:this.namespaces[`${a}:${u}`]).defaultChain=u,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",u)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(t,r){this.client.core.storage.setItem(`${lh}/${t}`,r)}async getFromStore(t){return await this.client.core.storage.getItem(`${lh}/${t}`)}}const _I=xo,bI="wc",EI="ethereum_provider",II=`${bI}@2:${EI}:`,PI="https://rpc.walletconnect.com/v1/",_s=["eth_sendTransaction","personal_sign"],rl=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],bs=["chainChanged","accountsChanged"],il=["chainChanged","accountsChanged","message","disconnect","connect"];var SI=Object.defineProperty,OI=Object.defineProperties,RI=Object.getOwnPropertyDescriptors,vh=Object.getOwnPropertySymbols,NI=Object.prototype.hasOwnProperty,CI=Object.prototype.propertyIsEnumerable,mh=(o,t,r)=>t in o?SI(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,di=(o,t)=>{for(var r in t||(t={}))NI.call(t,r)&&mh(o,r,t[r]);if(vh)for(var r of vh(t))CI.call(t,r)&&mh(o,r,t[r]);return o},wh=(o,t)=>OI(o,RI(t));function Es(o){return Number(o[0].split(":")[1])}function ao(o){return`0x${o.toString(16)}`}function $I(o){const{chains:t,optionalChains:r,methods:s,optionalMethods:a,events:u,optionalEvents:l,rpcMap:g}=o;if(!co(t))throw new Error("Invalid chains");const w={chains:t,methods:s||_s,events:u||bs,rpcMap:di({},t.length?{[Es(t)]:g[Es(t)]}:{})},b=u==null?void 0:u.filter(q=>!bs.includes(q)),C=s==null?void 0:s.filter(q=>!_s.includes(q));if(!r&&!l&&!a&&!(b!=null&&b.length)&&!(C!=null&&C.length))return{required:t.length?w:void 0};const O=(b==null?void 0:b.length)&&(C==null?void 0:C.length)||!r,N={chains:[...new Set(O?w.chains.concat(r||[]):r)],methods:[...new Set(w.methods.concat(a!=null&&a.length?a:rl))],events:[...new Set(w.events.concat(l!=null&&l.length?l:il))],rpcMap:g};return{required:t.length?w:void 0,optional:r.length?N:void 0}}class Os{constructor(){this.events=new Ge.eventsExports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=II,this.on=(t,r)=>(this.events.on(t,r),this),this.once=(t,r)=>(this.events.once(t,r),this),this.removeListener=(t,r)=>(this.events.removeListener(t,r),this),this.off=(t,r)=>(this.events.off(t,r),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const r=new Os;return await r.initialize(t),r}async request(t){return await this.signer.request(t,this.formatChainId(this.chainId))}sendAsync(t,r){this.signer.sendAsync(t,r,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(t);const{required:r,optional:s}=$I(this.rpc);try{const a=await new Promise(async(l,g)=>{var w;this.rpc.showQrModal&&((w=this.modal)==null||w.subscribeModal(b=>{!b.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),g(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(wh(di({namespaces:di({},r&&{[this.namespace]:r})},s&&{optionalNamespaces:{[this.namespace]:s}}),{pairingTopic:t==null?void 0:t.pairingTopic})).then(b=>{l(b)}).catch(b=>{g(new Error(b.message))})});if(!a)return;const u=lw(a.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:u),this.setAccounts(u),this.events.emit("connect",{chainId:ao(this.chainId)})}catch(a){throw this.signer.logger.error(a),a}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",t=>{const{params:r}=t,{event:s}=r;s.name==="accountsChanged"?(this.accounts=this.parseAccounts(s.data),this.events.emit("accountsChanged",this.accounts)):s.name==="chainChanged"?this.setChainId(this.formatChainId(s.data)):this.events.emit(s.name,s.data),this.events.emit("session_event",t)}),this.signer.on("chainChanged",t=>{const r=parseInt(t);this.chainId=r,this.events.emit("chainChanged",ao(this.chainId)),this.persist()}),this.signer.on("session_update",t=>{this.events.emit("session_update",t)}),this.signer.on("session_delete",t=>{this.reset(),this.events.emit("session_delete",t),this.events.emit("disconnect",wh(di({},dw("USER_DISCONNECTED")),{data:t.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",t=>{var r,s;this.rpc.showQrModal&&((r=this.modal)==null||r.closeModal(),(s=this.modal)==null||s.openModal({uri:t})),this.events.emit("display_uri",t)})}switchEthereumChain(t){this.request({method:"wallet_switchEthereumChain",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return typeof t=="string"?t.startsWith(`${this.namespace}:`):!1}formatChainId(t){return`${this.namespace}:${t}`}parseChainId(t){return Number(t.split(":")[1])}setChainIds(t){const r=t.filter(s=>this.isCompatibleChainId(s)).map(s=>this.parseChainId(s));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",ao(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const r=this.parseChainId(t);this.chainId=r,this.switchEthereumChain(r)}}parseAccountId(t){const[r,s,a]=t.split(":");return{chainId:`${r}:${s}`,address:a}}setAccounts(t){this.accounts=t.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(t){var r,s;const a=(r=t==null?void 0:t.chains)!=null?r:[],u=(s=t==null?void 0:t.optionalChains)!=null?s:[],l=a.concat(u);if(!l.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const g=a.length?(t==null?void 0:t.methods)||_s:[],w=a.length?(t==null?void 0:t.events)||bs:[],b=(t==null?void 0:t.optionalMethods)||[],C=(t==null?void 0:t.optionalEvents)||[],O=(t==null?void 0:t.rpcMap)||this.buildRpcMap(l,t.projectId),N=(t==null?void 0:t.qrModalOptions)||void 0;return{chains:a==null?void 0:a.map(q=>this.formatChainId(q)),optionalChains:u.map(q=>this.formatChainId(q)),methods:g,events:w,optionalMethods:b,optionalEvents:C,rpcMap:O,showQrModal:!!(t!=null&&t.showQrModal),qrModalOptions:N,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,r){const s={};return t.forEach(a=>{s[a]=this.getRpcUrl(a,r)}),s}async initialize(t){if(this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?Es(this.rpc.chains):Es(this.rpc.optionalChains),this.signer=await _I.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let r;try{const{WalletConnectModal:s}=await Promise.resolve().then(()=>require("./index-hb33T1qT.js")).then(a=>a.index);r=s}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(r)try{this.modal=new r(di({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(s){throw this.signer.logger.error(s),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(t){if(!t)return;const{chains:r,optionalChains:s,rpcMap:a}=t;r&&co(r)&&(this.rpc.chains=r.map(u=>this.formatChainId(u)),r.forEach(u=>{this.rpc.rpcMap[u]=(a==null?void 0:a[u])||this.getRpcUrl(u)})),s&&co(s)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=s==null?void 0:s.map(u=>this.formatChainId(u)),s.forEach(u=>{this.rpc.rpcMap[u]=(a==null?void 0:a[u])||this.getRpcUrl(u)}))}getRpcUrl(t,r){var s;return((s=this.rpc.rpcMap)==null?void 0:s[t])||`${PI}?chainId=eip155:${t}&projectId=${r||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),r=this.session.namespaces[`${this.namespace}:${t}`]?this.session.namespaces[`${this.namespace}:${t}`]:this.session.namespaces[this.namespace];this.setChainIds(t?[this.formatChainId(t)]:r==null?void 0:r.accounts),this.setAccounts(r==null?void 0:r.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(t){return typeof t=="string"||t instanceof String?[this.parseAccount(t)]:t.map(r=>this.parseAccount(r))}}const AI=Os;exports.EthereumProvider=AI;exports.OPTIONAL_EVENTS=il;exports.OPTIONAL_METHODS=rl;exports.REQUIRED_EVENTS=bs;exports.REQUIRED_METHODS=_s;exports.default=Os;
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./index-Dh6mkRtz.js");exports.AutomaticCCTPRoute=t.AutomaticCCTPRoute;exports.AutomaticPorticoRoute=t.AutomaticPorticoRoute;exports.AutomaticTokenBridgeRoute=t.AutomaticTokenBridgeRoute;exports.CCTPRoute=t.CCTPRoute;exports.DEFAULT_ROUTES=t.DEFAULT_ROUTES;exports.MAINNET=t.MAINNET;exports.MayanRoute=t.MayanRoute;exports.MayanRouteMCTP=t.MayanRouteMCTP;exports.MayanRouteSWIFT=t.MayanRouteSWIFT;exports.MayanRouteWH=t.MayanRouteWH;exports.TESTNET=t.TESTNET;exports.TokenBridgeRoute=t.TokenBridgeRoute;exports.buildConfig=t.buildConfig;exports.default=t.WormholeConnect;exports.nttAutomaticRoute=t.nttAutomaticRoute;exports.nttManualRoute=t.nttManualRoute;exports.nttRoutes=t.nttRoutes;exports.wormholeConnectHosted=t.wormholeConnectHosted;
|
package/lib/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dF as o, dH as d, dD as e, dG as s, dz as u, dw as n, dI as R, dK as T, dL as i, dJ as C, dx as M, dE as A, dy as c, dv as m, dB as r, dC as E, dA as y, dM as l } from "./index-
|
|
1
|
+
import { dF as o, dH as d, dD as e, dG as s, dz as u, dw as n, dI as R, dK as T, dL as i, dJ as C, dx as M, dE as A, dy as c, dv as m, dB as r, dC as E, dA as y, dM as l } from "./index-BPD6tZ5I.mjs";
|
|
2
2
|
export {
|
|
3
3
|
o as AutomaticCCTPRoute,
|
|
4
4
|
d as AutomaticPorticoRoute,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a0 as be, dm as ni, dn as oi, dp as ii, dq as ai, dr as fi, ds as ui, dt as ci, du as en, h as ce, a8 as si } from "./index-BPD6tZ5I.mjs";
|
|
2
2
|
var vn = Object.prototype.toString, so = function(e) {
|
|
3
3
|
var r = vn.call(e), n = r === "[object Arguments]";
|
|
4
4
|
return n || (n = r !== "[object Array]" && e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && vn.call(e.callee) === "[object Function]"), n;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const L=require("./index-BxaWYSOO.js");var Sn=Object.prototype.toString,lo=function(e){var r=Sn.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Sn.call(e.callee)==="[object Function]"),n},pr,wn;function ti(){if(wn)return pr;wn=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=lo,i=Object.prototype.propertyIsEnumerable,u=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),v=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],m=function(g){var T=g.constructor;return T&&T.prototype===g},_={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},E=function(){if(typeof window>"u")return!1;for(var g in window)try{if(!_["$"+g]&&e.call(window,g)&&window[g]!==null&&typeof window[g]=="object")try{m(window[g])}catch{return!0}}catch{return!0}return!1}(),$=function(g){if(typeof window>"u"||!E)return m(g);try{return m(g)}catch{return!1}};t=function(T){var k=T!==null&&typeof T=="object",Y=r.call(T)==="[object Function]",te=n(T),K=k&&r.call(T)==="[object String]",P=[];if(!k&&!Y&&!te)throw new TypeError("Object.keys called on a non-object");var S=s&&Y;if(K&&T.length>0&&!e.call(T,0))for(var D=0;D<T.length;++D)P.push(String(D));if(te&&T.length>0)for(var C=0;C<T.length;++C)P.push(String(C));else for(var W in T)!(S&&W==="prototype")&&e.call(T,W)&&P.push(String(W));if(u)for(var M=$(T),X=0;X<v.length;++X)!(M&&v[X]==="constructor")&&e.call(T,v[X])&&P.push(v[X]);return P}}return pr=t,pr}var ri=Array.prototype.slice,ni=lo,On=Object.keys,Pt=On?function(e){return On(e)}:ti(),En=Object.keys;Pt.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(n){return ni(n)?En(ri.call(n)):En(n)})}else Object.keys=Pt;return Object.keys||Pt};var po=Pt,oi=Error,ii=EvalError,ai=RangeError,fi=ReferenceError,yo=SyntaxError,gt=TypeError,ui=URIError,tn=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0},An=typeof Symbol<"u"&&Symbol,ci=tn,si=function(){return typeof An!="function"||typeof Symbol!="function"||typeof An("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ci()},yr={__proto__:null,foo:{}},li=Object,pi=function(){return{__proto__:yr}.foo===yr.foo&&!(yr instanceof li)},yi="Function.prototype.bind called on incompatible ",hi=Object.prototype.toString,di=Math.max,mi="[object Function]",Pn=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var u=0;u<r.length;u+=1)n[u+e.length]=r[u];return n},gi=function(e,r){for(var n=[],i=r,u=0;i<e.length;i+=1,u+=1)n[u]=e[i];return n},vi=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},bi=function(e){var r=this;if(typeof r!="function"||hi.apply(r)!==mi)throw new TypeError(yi+r);for(var n=gi(arguments,1),i,u=function(){if(this instanceof i){var E=r.apply(this,Pn(n,arguments));return Object(E)===E?E:this}return r.apply(e,Pn(n,arguments))},s=di(0,r.length-n.length),v=[],m=0;m<s;m++)v[m]="$"+m;if(i=Function("binder","return function ("+vi(v,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var _=function(){};_.prototype=r.prototype,i.prototype=new _,_.prototype=null}return i},Si=bi,rn=Function.prototype.bind||Si,wi=Function.prototype.call,Oi=Object.prototype.hasOwnProperty,Ei=rn,Ai=Ei.call(wi,Oi),ie,Pi=oi,Ti=ii,Ri=ai,ji=fi,it=yo,ot=gt,Ii=ui,ho=Function,hr=function(t){try{return ho('"use strict"; return ('+t+").constructor;")()}catch{}},Qe=Object.getOwnPropertyDescriptor;if(Qe)try{Qe({},"")}catch{Qe=null}var dr=function(){throw new ot},_i=Qe?function(){try{return arguments.callee,dr}catch{try{return Qe(arguments,"callee").get}catch{return dr}}}():dr,et=si(),$i=pi(),Ae=Object.getPrototypeOf||($i?function(t){return t.__proto__}:null),rt={},Fi=typeof Uint8Array>"u"||!Ae?ie:Ae(Uint8Array),Ye={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?ie:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ie:ArrayBuffer,"%ArrayIteratorPrototype%":et&&Ae?Ae([][Symbol.iterator]()):ie,"%AsyncFromSyncIteratorPrototype%":ie,"%AsyncFunction%":rt,"%AsyncGenerator%":rt,"%AsyncGeneratorFunction%":rt,"%AsyncIteratorPrototype%":rt,"%Atomics%":typeof Atomics>"u"?ie:Atomics,"%BigInt%":typeof BigInt>"u"?ie:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ie:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ie:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ie:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Pi,"%eval%":eval,"%EvalError%":Ti,"%Float32Array%":typeof Float32Array>"u"?ie:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ie:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ie:FinalizationRegistry,"%Function%":ho,"%GeneratorFunction%":rt,"%Int8Array%":typeof Int8Array>"u"?ie:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ie:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ie:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":et&&Ae?Ae(Ae([][Symbol.iterator]())):ie,"%JSON%":typeof JSON=="object"?JSON:ie,"%Map%":typeof Map>"u"?ie:Map,"%MapIteratorPrototype%":typeof Map>"u"||!et||!Ae?ie:Ae(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ie:Promise,"%Proxy%":typeof Proxy>"u"?ie:Proxy,"%RangeError%":Ri,"%ReferenceError%":ji,"%Reflect%":typeof Reflect>"u"?ie:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ie:Set,"%SetIteratorPrototype%":typeof Set>"u"||!et||!Ae?ie:Ae(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ie:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":et&&Ae?Ae(""[Symbol.iterator]()):ie,"%Symbol%":et?Symbol:ie,"%SyntaxError%":it,"%ThrowTypeError%":_i,"%TypedArray%":Fi,"%TypeError%":ot,"%Uint8Array%":typeof Uint8Array>"u"?ie:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ie:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ie:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ie:Uint32Array,"%URIError%":Ii,"%WeakMap%":typeof WeakMap>"u"?ie:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ie:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ie:WeakSet};if(Ae)try{null.error}catch(t){var Ni=Ae(Ae(t));Ye["%Error.prototype%"]=Ni}var qi=function t(e){var r;if(e==="%AsyncFunction%")r=hr("async function () {}");else if(e==="%GeneratorFunction%")r=hr("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=hr("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Ae&&(r=Ae(i.prototype))}return Ye[e]=r,r},Tn={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},vt=rn,Ft=Ai,Di=vt.call(Function.call,Array.prototype.concat),Ci=vt.call(Function.apply,Array.prototype.splice),Rn=vt.call(Function.call,String.prototype.replace),Nt=vt.call(Function.call,String.prototype.slice),Mi=vt.call(Function.call,RegExp.prototype.exec),Bi=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ui=/\\(\\)?/g,xi=function(e){var r=Nt(e,0,1),n=Nt(e,-1);if(r==="%"&&n!=="%")throw new it("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new it("invalid intrinsic syntax, expected opening `%`");var i=[];return Rn(e,Bi,function(u,s,v,m){i[i.length]=v?Rn(m,Ui,"$1"):s||u}),i},Li=function(e,r){var n=e,i;if(Ft(Tn,n)&&(i=Tn[n],n="%"+i[0]+"%"),Ft(Ye,n)){var u=Ye[n];if(u===rt&&(u=qi(n)),typeof u>"u"&&!r)throw new ot("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new it("intrinsic "+e+" does not exist!")},ut=function(e,r){if(typeof e!="string"||e.length===0)throw new ot("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ot('"allowMissing" argument must be a boolean');if(Mi(/^%?[^%]*%?$/,e)===null)throw new it("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=xi(e),i=n.length>0?n[0]:"",u=Li("%"+i+"%",r),s=u.name,v=u.value,m=!1,_=u.alias;_&&(i=_[0],Ci(n,Di([0,1],_)));for(var E=1,$=!0;E<n.length;E+=1){var g=n[E],T=Nt(g,0,1),k=Nt(g,-1);if((T==='"'||T==="'"||T==="`"||k==='"'||k==="'"||k==="`")&&T!==k)throw new it("property names with quotes must have matching quotes");if((g==="constructor"||!$)&&(m=!0),i+="."+g,s="%"+i+"%",Ft(Ye,s))v=Ye[s];else if(v!=null){if(!(g in v)){if(!r)throw new ot("base intrinsic for "+e+" exists, but the property is not available.");return}if(Qe&&E+1>=n.length){var Y=Qe(v,g);$=!!Y,$&&"get"in Y&&!("originalValue"in Y.get)?v=Y.get:v=v[g]}else $=Ft(v,g),v=v[g];$&&!m&&(Ye[s]=v)}}return v},ki=ut,Tt=ki("%Object.defineProperty%",!0)||!1;if(Tt)try{Tt({},"a",{value:1})}catch{Tt=!1}var nn=Tt,Gi=ut,Rt=Gi("%Object.getOwnPropertyDescriptor%",!0);if(Rt)try{Rt([],"length")}catch{Rt=null}var xt=Rt,jn=nn,zi=yo,tt=gt,In=xt,mo=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new tt("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new tt("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new tt("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new tt("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new tt("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new tt("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,m=!!In&&In(e,r);if(jn)jn(e,r,{configurable:s===null&&m?m.configurable:!s,enumerable:i===null&&m?m.enumerable:!i,value:n,writable:u===null&&m?m.writable:!u});else if(v||!i&&!u&&!s)e[r]=n;else throw new zi("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},xr=nn,go=function(){return!!xr};go.hasArrayLengthDefineBug=function(){if(!xr)return null;try{return xr([],"length",{value:1}).length!==1}catch{return!0}};var vo=go,Wi=po,Hi=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Vi=Object.prototype.toString,Ki=Array.prototype.concat,_n=mo,Ji=function(t){return typeof t=="function"&&Vi.call(t)==="[object Function]"},bo=vo(),Xi=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!Ji(n)||!n())return}bo?_n(t,e,r,!0):_n(t,e,r)},So=function(t,e){var r=arguments.length>2?arguments[2]:{},n=Wi(e);Hi&&(n=Ki.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i<n.length;i+=1)Xi(t,n[i],e[n[i]],r[n[i]])};So.supportsDescriptors=!!bo;var bt=So,on={},wo={exports:{}},an={};(function(t){t.fetch=i(L.commonjsGlobal.fetch)&&i(L.commonjsGlobal.ReadableStream),t.writableStream=i(L.commonjsGlobal.WritableStream),t.abortController=i(L.commonjsGlobal.AbortController);var e;function r(){if(e!==void 0)return e;if(L.commonjsGlobal.XMLHttpRequest){e=new L.commonjsGlobal.XMLHttpRequest;try{e.open("GET",L.commonjsGlobal.XDomainRequest?"/":"https://example.com")}catch{e=null}}else e=null;return e}function n(u){var s=r();if(!s)return!1;try{return s.responseType=u,s.responseType===u}catch{}return!1}t.arraybuffer=t.fetch||n("arraybuffer"),t.msstream=!t.fetch&&n("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&n("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||(r()?i(r().overrideMimeType):!1);function i(u){return typeof u=="function"}e=null})(an);var Lt={},Lr={exports:{}};(function(t,e){e=t.exports=L.require_stream_readable(),e.Stream=e,e.Readable=e,e.Writable=L.require_stream_writable(),e.Duplex=L.require_stream_duplex(),e.Transform=L.require_stream_transform(),e.PassThrough=L.require_stream_passthrough(),e.finished=L.requireEndOfStream(),e.pipeline=L.requirePipeline()})(Lr,Lr.exports);var fn=Lr.exports,$n=an,Qi=L.requireInherits_browser(),Oo=fn,wt=Lt.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},un=Lt.IncomingMessage=function(t,e,r,n){var i=this;if(Oo.Readable.call(i),i._mode=r,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",function(){L.dist.process.nextTick(function(){i.emit("close")})}),r==="fetch"){let E=function(){s.read().then(function($){if(!i._destroyed){if(n($.done),$.done){i.push(null);return}i.push(L.dist.Buffer.from($.value)),E()}}).catch(function($){n(!0),i._destroyed||i.emit("error",$)})};if(i._fetchResponse=e,i.url=e.url,i.statusCode=e.status,i.statusMessage=e.statusText,e.headers.forEach(function($,g){i.headers[g.toLowerCase()]=$,i.rawHeaders.push(g,$)}),$n.writableStream){var u=new WritableStream({write:function($){return n(!1),new Promise(function(g,T){i._destroyed?T():i.push(L.dist.Buffer.from($))?g():i._resumeFetch=g})},close:function(){n(!0),i._destroyed||i.push(null)},abort:function($){n(!0),i._destroyed||i.emit("error",$)}});try{e.body.pipeTo(u).catch(function($){n(!0),i._destroyed||i.emit("error",$)});return}catch{}}var s=e.body.getReader();E()}else{i._xhr=t,i._pos=0,i.url=t.responseURL,i.statusCode=t.status,i.statusMessage=t.statusText;var v=t.getAllResponseHeaders().split(/\r?\n/);if(v.forEach(function(E){var $=E.match(/^([^:]+):\s*(.*)/);if($){var g=$[1].toLowerCase();g==="set-cookie"?(i.headers[g]===void 0&&(i.headers[g]=[]),i.headers[g].push($[2])):i.headers[g]!==void 0?i.headers[g]+=", "+$[2]:i.headers[g]=$[2],i.rawHeaders.push($[1],$[2])}}),i._charset="x-user-defined",!$n.overrideMimeType){var m=i.rawHeaders["mime-type"];if(m){var _=m.match(/;\s*charset=([^;])(;|$)/);_&&(i._charset=_[1].toLowerCase())}i._charset||(i._charset="utf-8")}}};Qi(un,Oo.Readable);un.prototype._read=function(){var t=this,e=t._resumeFetch;e&&(t._resumeFetch=null,e())};un.prototype._onXHRProgress=function(t){var e=this,r=e._xhr,n=null;switch(e._mode){case"text":if(n=r.responseText,n.length>e._pos){var i=n.substr(e._pos);if(e._charset==="x-user-defined"){for(var u=L.dist.Buffer.alloc(i.length),s=0;s<i.length;s++)u[s]=i.charCodeAt(s)&255;e.push(u)}else e.push(i,e._charset);e._pos=n.length}break;case"arraybuffer":if(r.readyState!==wt.DONE||!r.response)break;n=r.response,e.push(L.dist.Buffer.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=r.response,r.readyState!==wt.LOADING||!n)break;e.push(L.dist.Buffer.from(new Uint8Array(n)));break;case"ms-stream":if(n=r.response,r.readyState!==wt.LOADING)break;var v=new L.commonjsGlobal.MSStreamReader;v.onprogress=function(){v.result.byteLength>e._pos&&(e.push(L.dist.Buffer.from(new Uint8Array(v.result.slice(e._pos)))),e._pos=v.result.byteLength)},v.onload=function(){t(!0),e.push(null)},v.readAsArrayBuffer(n);break}e._xhr.readyState===wt.DONE&&e._mode!=="ms-stream"&&(t(!0),e.push(null))};var Xe=an,Yi=L.requireInherits_browser(),Eo=Lt,cn=fn,Zi=Eo.IncomingMessage,Fn=Eo.readyStates;function ea(t,e){return Xe.fetch&&e?"fetch":Xe.mozchunkedarraybuffer?"moz-chunked-arraybuffer":Xe.msstream?"ms-stream":Xe.arraybuffer&&t?"arraybuffer":"text"}var Pe=wo.exports=function(t){var e=this;cn.Writable.call(e),e._opts=t,e._body=[],e._headers={},t.auth&&e.setHeader("Authorization","Basic "+L.dist.Buffer.from(t.auth).toString("base64")),Object.keys(t.headers).forEach(function(i){e.setHeader(i,t.headers[i])});var r,n=!0;if(t.mode==="disable-fetch"||"requestTimeout"in t&&!Xe.abortController)n=!1,r=!0;else if(t.mode==="prefer-streaming")r=!1;else if(t.mode==="allow-wrong-content-type")r=!Xe.overrideMimeType;else if(!t.mode||t.mode==="default"||t.mode==="prefer-fast")r=!0;else throw new Error("Invalid value for opts.mode");e._mode=ea(r,n),e._fetchTimer=null,e._socketTimeout=null,e._socketTimer=null,e.on("finish",function(){e._onFinish()})};Yi(Pe,cn.Writable);Pe.prototype.setHeader=function(t,e){var r=this,n=t.toLowerCase();ra.indexOf(n)===-1&&(r._headers[n]={name:t,value:e})};Pe.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null};Pe.prototype.removeHeader=function(t){var e=this;delete e._headers[t.toLowerCase()]};Pe.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts;"timeout"in e&&e.timeout!==0&&t.setTimeout(e.timeout);var r=t._headers,n=null;e.method!=="GET"&&e.method!=="HEAD"&&(n=new Blob(t._body,{type:(r["content-type"]||{}).value||""}));var i=[];if(Object.keys(r).forEach(function(m){var _=r[m].name,E=r[m].value;Array.isArray(E)?E.forEach(function($){i.push([_,$])}):i.push([_,E])}),t._mode==="fetch"){var u=null;if(Xe.abortController){var s=new AbortController;u=s.signal,t._fetchAbortController=s,"requestTimeout"in e&&e.requestTimeout!==0&&(t._fetchTimer=L.commonjsGlobal.setTimeout(function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()},e.requestTimeout))}L.commonjsGlobal.fetch(t._opts.url,{method:t._opts.method,headers:i,body:n||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:u}).then(function(m){t._fetchResponse=m,t._resetTimers(!1),t._connect()},function(m){t._resetTimers(!0),t._destroyed||t.emit("error",m)})}else{var v=t._xhr=new L.commonjsGlobal.XMLHttpRequest;try{v.open(t._opts.method,t._opts.url,!0)}catch(m){L.dist.process.nextTick(function(){t.emit("error",m)});return}"responseType"in v&&(v.responseType=t._mode),"withCredentials"in v&&(v.withCredentials=!!e.withCredentials),t._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(v.timeout=e.requestTimeout,v.ontimeout=function(){t.emit("requestTimeout")}),i.forEach(function(m){v.setRequestHeader(m[0],m[1])}),t._response=null,v.onreadystatechange=function(){switch(v.readyState){case Fn.LOADING:case Fn.DONE:t._onXHRProgress();break}},t._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){t._onXHRProgress()}),v.onerror=function(){t._destroyed||(t._resetTimers(!0),t.emit("error",new Error("XHR error")))};try{v.send(n)}catch(m){L.dist.process.nextTick(function(){t.emit("error",m)});return}}}};function ta(t){try{var e=t.status;return e!==null&&e!==0}catch{return!1}}Pe.prototype._onXHRProgress=function(){var t=this;t._resetTimers(!1),!(!ta(t._xhr)||t._destroyed)&&(t._response||t._connect(),t._response._onXHRProgress(t._resetTimers.bind(t)))};Pe.prototype._connect=function(){var t=this;t._destroyed||(t._response=new Zi(t._xhr,t._fetchResponse,t._mode,t._resetTimers.bind(t)),t._response.on("error",function(e){t.emit("error",e)}),t.emit("response",t._response))};Pe.prototype._write=function(t,e,r){var n=this;n._body.push(t),r()};Pe.prototype._resetTimers=function(t){var e=this;L.commonjsGlobal.clearTimeout(e._socketTimer),e._socketTimer=null,t?(L.commonjsGlobal.clearTimeout(e._fetchTimer),e._fetchTimer=null):e._socketTimeout&&(e._socketTimer=L.commonjsGlobal.setTimeout(function(){e.emit("timeout")},e._socketTimeout))};Pe.prototype.abort=Pe.prototype.destroy=function(t){var e=this;e._destroyed=!0,e._resetTimers(!0),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort(),t&&e.emit("error",t)};Pe.prototype.end=function(t,e,r){var n=this;typeof t=="function"&&(r=t,t=void 0),cn.Writable.prototype.end.call(n,t,e,r)};Pe.prototype.setTimeout=function(t,e){var r=this;e&&r.once("timeout",e),r._socketTimeout=t,r._resetTimers(!1)};Pe.prototype.flushHeaders=function(){};Pe.prototype.setNoDelay=function(){};Pe.prototype.setSocketKeepAlive=function(){};var ra=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],na=wo.exports,oa=aa,ia=Object.prototype.hasOwnProperty;function aa(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var n in r)ia.call(r,n)&&(t[n]=r[n])}return t}var fa={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},kr={exports:{}},qt={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */qt.exports;(function(t,e){(function(r){var n=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,u=typeof L.commonjsGlobal=="object"&&L.commonjsGlobal;(u.global===u||u.window===u||u.self===u)&&(r=u);var s,v=2147483647,m=36,_=1,E=26,$=38,g=700,T=72,k=128,Y="-",te=/^xn--/,K=/[^\x20-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=m-_,C=Math.floor,W=String.fromCharCode,M;function X(d){throw new RangeError(S[d])}function G(d,j){for(var f=d.length,y=[];f--;)y[f]=j(d[f]);return y}function ne(d,j){var f=d.split("@"),y="";f.length>1&&(y=f[0]+"@",d=f[1]),d=d.replace(P,".");var a=d.split("."),c=G(a,j).join(".");return y+c}function fe(d){for(var j=[],f=0,y=d.length,a,c;f<y;)a=d.charCodeAt(f++),a>=55296&&a<=56319&&f<y?(c=d.charCodeAt(f++),(c&64512)==56320?j.push(((a&1023)<<10)+(c&1023)+65536):(j.push(a),f--)):j.push(a);return j}function V(d){return G(d,function(j){var f="";return j>65535&&(j-=65536,f+=W(j>>>10&1023|55296),j=56320|j&1023),f+=W(j),f}).join("")}function re(d){return d-48<10?d-22:d-65<26?d-65:d-97<26?d-97:m}function ue(d,j){return d+22+75*(d<26)-((j!=0)<<5)}function se(d,j,f){var y=0;for(d=f?C(d/g):d>>1,d+=C(d/j);d>D*E>>1;y+=m)d=C(d/D);return C(y+(D+1)*d/(d+$))}function ce(d){var j=[],f=d.length,y,a=0,c=k,l=T,w,b,O,F,x,J,Z,oe,de;for(w=d.lastIndexOf(Y),w<0&&(w=0),b=0;b<w;++b)d.charCodeAt(b)>=128&&X("not-basic"),j.push(d.charCodeAt(b));for(O=w>0?w+1:0;O<f;){for(F=a,x=1,J=m;O>=f&&X("invalid-input"),Z=re(d.charCodeAt(O++)),(Z>=m||Z>C((v-a)/x))&&X("overflow"),a+=Z*x,oe=J<=l?_:J>=l+E?E:J-l,!(Z<oe);J+=m)de=m-oe,x>C(v/de)&&X("overflow"),x*=de;y=j.length+1,l=se(a-F,y,F==0),C(a/y)>v-c&&X("overflow"),c+=C(a/y),a%=y,j.splice(a++,0,c)}return V(j)}function ge(d){var j,f,y,a,c,l,w,b,O,F,x,J=[],Z,oe,de,Ee;for(d=fe(d),Z=d.length,j=k,f=0,c=T,l=0;l<Z;++l)x=d[l],x<128&&J.push(W(x));for(y=a=J.length,a&&J.push(Y);y<Z;){for(w=v,l=0;l<Z;++l)x=d[l],x>=j&&x<w&&(w=x);for(oe=y+1,w-j>C((v-f)/oe)&&X("overflow"),f+=(w-j)*oe,j=w,l=0;l<Z;++l)if(x=d[l],x<j&&++f>v&&X("overflow"),x==j){for(b=f,O=m;F=O<=c?_:O>=c+E?E:O-c,!(b<F);O+=m)Ee=b-F,de=m-F,J.push(W(ue(F+Ee%de,0))),b=C(Ee/de);J.push(W(ue(b,0))),c=se(f,oe,y==a),f=0,++y}++f,++j}return J.join("")}function he(d){return ne(d,function(j){return te.test(j)?ce(j.slice(4).toLowerCase()):j})}function R(d){return ne(d,function(j){return K.test(j)?"xn--"+ge(j):j})}if(s={version:"1.4.1",ucs2:{decode:fe,encode:V},decode:ce,encode:ge,toASCII:R,toUnicode:he},n&&i)if(t.exports==n)i.exports=s;else for(M in s)s.hasOwnProperty(M)&&(n[M]=s[M]);else r.punycode=s})(L.commonjsGlobal)})(qt,qt.exports);var ua=qt.exports,Ao={exports:{}},ca=ut,Nn=mo,sa=vo(),qn=xt,Dn=gt,la=ca("%Math.floor%"),pa=function(e,r){if(typeof e!="function")throw new Dn("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||la(r)!==r)throw new Dn("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,u=!0;if("length"in e&&qn){var s=qn(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(u=!1)}return(i||u||!n)&&(sa?Nn(e,"length",r,!0,!0):Nn(e,"length",r)),e};(function(t){var e=rn,r=ut,n=pa,i=gt,u=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),v=r("%Reflect.apply%",!0)||e.call(s,u),m=nn,_=r("%Math.max%");t.exports=function(g){if(typeof g!="function")throw new i("a function is required");var T=v(e,s,arguments);return n(T,1+_(0,g.length-(arguments.length-1)),!0)};var E=function(){return v(e,u,arguments)};m?m(t.exports,"apply",{value:E}):t.exports.apply=E})(Ao);var kt=Ao.exports,Po=ut,To=kt,ya=To(Po("String.prototype.indexOf")),St=function(e,r){var n=Po(e,!!r);return typeof n=="function"&&ya(e,".prototype.")>-1?To(n):n},sn=typeof Map=="function"&&Map.prototype,mr=Object.getOwnPropertyDescriptor&&sn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Dt=sn&&mr&&typeof mr.get=="function"?mr.get:null,Cn=sn&&Map.prototype.forEach,ln=typeof Set=="function"&&Set.prototype,gr=Object.getOwnPropertyDescriptor&&ln?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ct=ln&&gr&&typeof gr.get=="function"?gr.get:null,Mn=ln&&Set.prototype.forEach,ha=typeof WeakMap=="function"&&WeakMap.prototype,ht=ha?WeakMap.prototype.has:null,da=typeof WeakSet=="function"&&WeakSet.prototype,dt=da?WeakSet.prototype.has:null,ma=typeof WeakRef=="function"&&WeakRef.prototype,Bn=ma?WeakRef.prototype.deref:null,ga=Boolean.prototype.valueOf,va=Object.prototype.toString,ba=Function.prototype.toString,Sa=String.prototype.match,pn=String.prototype.slice,Ge=String.prototype.replace,wa=String.prototype.toUpperCase,Un=String.prototype.toLowerCase,Ro=RegExp.prototype.test,xn=Array.prototype.concat,Ue=Array.prototype.join,Oa=Array.prototype.slice,Ln=Math.floor,Gr=typeof BigInt=="function"?BigInt.prototype.valueOf:null,vr=Object.getOwnPropertySymbols,zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,at=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Te=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===at||!0)?Symbol.toStringTag:null,jo=Object.prototype.propertyIsEnumerable,kn=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Gn(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ro.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Ln(-t):Ln(t);if(n!==t){var i=String(n),u=pn.call(e,i.length+1);return Ge.call(i,r,"$&_")+"."+Ge.call(Ge.call(u,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ge.call(e,r,"$&_")}var Wr=L.require$$2,zn=Wr.custom,Wn=_o(zn)?zn:null,Ea=function t(e,r,n,i){var u=r||{};if(ke(u,"quoteStyle")&&u.quoteStyle!=="single"&&u.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ke(u,"maxStringLength")&&(typeof u.maxStringLength=="number"?u.maxStringLength<0&&u.maxStringLength!==1/0:u.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=ke(u,"customInspect")?u.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ke(u,"indent")&&u.indent!==null&&u.indent!==" "&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ke(u,"numericSeparator")&&typeof u.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Fo(e,u);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var m=String(e);return v?Gn(e,m):m}if(typeof e=="bigint"){var _=String(e)+"n";return v?Gn(e,_):_}var E=typeof u.depth>"u"?5:u.depth;if(typeof n>"u"&&(n=0),n>=E&&E>0&&typeof e=="object")return Hr(e)?"[Array]":"[Object]";var $=La(u,n);if(typeof i>"u")i=[];else if($o(i,e)>=0)return"[Circular]";function g(re,ue,se){if(ue&&(i=Oa.call(i),i.push(ue)),se){var ce={depth:u.depth};return ke(u,"quoteStyle")&&(ce.quoteStyle=u.quoteStyle),t(re,ce,n+1,i)}return t(re,u,n+1,i)}if(typeof e=="function"&&!Hn(e)){var T=Fa(e),k=Ot(e,g);return"[Function"+(T?": "+T:" (anonymous)")+"]"+(k.length>0?" { "+Ue.call(k,", ")+" }":"")}if(_o(e)){var Y=at?Ge.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):zr.call(e);return typeof e=="object"&&!at?yt(Y):Y}if(Ba(e)){for(var te="<"+Un.call(String(e.nodeName)),K=e.attributes||[],P=0;P<K.length;P++)te+=" "+K[P].name+"="+Io(Aa(K[P].value),"double",u);return te+=">",e.childNodes&&e.childNodes.length&&(te+="..."),te+="</"+Un.call(String(e.nodeName))+">",te}if(Hr(e)){if(e.length===0)return"[]";var S=Ot(e,g);return $&&!xa(S)?"["+Vr(S,$)+"]":"[ "+Ue.call(S,", ")+" ]"}if(Ta(e)){var D=Ot(e,g);return!("cause"in Error.prototype)&&"cause"in e&&!jo.call(e,"cause")?"{ ["+String(e)+"] "+Ue.call(xn.call("[cause]: "+g(e.cause),D),", ")+" }":D.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Ue.call(D,", ")+" }"}if(typeof e=="object"&&s){if(Wn&&typeof e[Wn]=="function"&&Wr)return Wr(e,{depth:E-n});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Na(e)){var C=[];return Cn&&Cn.call(e,function(re,ue){C.push(g(ue,e,!0)+" => "+g(re,e))}),Vn("Map",Dt.call(e),C,$)}if(Ca(e)){var W=[];return Mn&&Mn.call(e,function(re){W.push(g(re,e))}),Vn("Set",Ct.call(e),W,$)}if(qa(e))return br("WeakMap");if(Ma(e))return br("WeakSet");if(Da(e))return br("WeakRef");if(ja(e))return yt(g(Number(e)));if(_a(e))return yt(g(Gr.call(e)));if(Ia(e))return yt(ga.call(e));if(Ra(e))return yt(g(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof L.commonjsGlobal<"u"&&e===L.commonjsGlobal)return"{ [object globalThis] }";if(!Pa(e)&&!Hn(e)){var M=Ot(e,g),X=kn?kn(e)===Object.prototype:e instanceof Object||e.constructor===Object,G=e instanceof Object?"":"null prototype",ne=!X&&Te&&Object(e)===e&&Te in e?pn.call(ze(e),8,-1):G?"Object":"",fe=X||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",V=fe+(ne||G?"["+Ue.call(xn.call([],ne||[],G||[]),": ")+"] ":"");return M.length===0?V+"{}":$?V+"{"+Vr(M,$)+"}":V+"{ "+Ue.call(M,", ")+" }"}return String(e)};function Io(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function Aa(t){return Ge.call(String(t),/"/g,""")}function Hr(t){return ze(t)==="[object Array]"&&(!Te||!(typeof t=="object"&&Te in t))}function Pa(t){return ze(t)==="[object Date]"&&(!Te||!(typeof t=="object"&&Te in t))}function Hn(t){return ze(t)==="[object RegExp]"&&(!Te||!(typeof t=="object"&&Te in t))}function Ta(t){return ze(t)==="[object Error]"&&(!Te||!(typeof t=="object"&&Te in t))}function Ra(t){return ze(t)==="[object String]"&&(!Te||!(typeof t=="object"&&Te in t))}function ja(t){return ze(t)==="[object Number]"&&(!Te||!(typeof t=="object"&&Te in t))}function Ia(t){return ze(t)==="[object Boolean]"&&(!Te||!(typeof t=="object"&&Te in t))}function _o(t){if(at)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!zr)return!1;try{return zr.call(t),!0}catch{}return!1}function _a(t){if(!t||typeof t!="object"||!Gr)return!1;try{return Gr.call(t),!0}catch{}return!1}var $a=Object.prototype.hasOwnProperty||function(t){return t in this};function ke(t,e){return $a.call(t,e)}function ze(t){return va.call(t)}function Fa(t){if(t.name)return t.name;var e=Sa.call(ba.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function $o(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Na(t){if(!Dt||!t||typeof t!="object")return!1;try{Dt.call(t);try{Ct.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function qa(t){if(!ht||!t||typeof t!="object")return!1;try{ht.call(t,ht);try{dt.call(t,dt)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function Da(t){if(!Bn||!t||typeof t!="object")return!1;try{return Bn.call(t),!0}catch{}return!1}function Ca(t){if(!Ct||!t||typeof t!="object")return!1;try{Ct.call(t);try{Dt.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function Ma(t){if(!dt||!t||typeof t!="object")return!1;try{dt.call(t,dt);try{ht.call(t,ht)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function Ba(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Fo(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Fo(pn.call(t,0,e.maxStringLength),e)+n}var i=Ge.call(Ge.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ua);return Io(i,"single",e)}function Ua(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+wa.call(e.toString(16))}function yt(t){return"Object("+t+")"}function br(t){return t+" { ? }"}function Vn(t,e,r,n){var i=n?Vr(r,n):Ue.call(r,", ");return t+" ("+e+") {"+i+"}"}function xa(t){for(var e=0;e<t.length;e++)if($o(t[e],`
|
|
1
|
+
"use strict";const L=require("./index-Dh6mkRtz.js");var Sn=Object.prototype.toString,lo=function(e){var r=Sn.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Sn.call(e.callee)==="[object Function]"),n},pr,wn;function ti(){if(wn)return pr;wn=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=lo,i=Object.prototype.propertyIsEnumerable,u=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),v=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],m=function(g){var T=g.constructor;return T&&T.prototype===g},_={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},E=function(){if(typeof window>"u")return!1;for(var g in window)try{if(!_["$"+g]&&e.call(window,g)&&window[g]!==null&&typeof window[g]=="object")try{m(window[g])}catch{return!0}}catch{return!0}return!1}(),$=function(g){if(typeof window>"u"||!E)return m(g);try{return m(g)}catch{return!1}};t=function(T){var k=T!==null&&typeof T=="object",Y=r.call(T)==="[object Function]",te=n(T),K=k&&r.call(T)==="[object String]",P=[];if(!k&&!Y&&!te)throw new TypeError("Object.keys called on a non-object");var S=s&&Y;if(K&&T.length>0&&!e.call(T,0))for(var D=0;D<T.length;++D)P.push(String(D));if(te&&T.length>0)for(var C=0;C<T.length;++C)P.push(String(C));else for(var W in T)!(S&&W==="prototype")&&e.call(T,W)&&P.push(String(W));if(u)for(var M=$(T),X=0;X<v.length;++X)!(M&&v[X]==="constructor")&&e.call(T,v[X])&&P.push(v[X]);return P}}return pr=t,pr}var ri=Array.prototype.slice,ni=lo,On=Object.keys,Pt=On?function(e){return On(e)}:ti(),En=Object.keys;Pt.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(n){return ni(n)?En(ri.call(n)):En(n)})}else Object.keys=Pt;return Object.keys||Pt};var po=Pt,oi=Error,ii=EvalError,ai=RangeError,fi=ReferenceError,yo=SyntaxError,gt=TypeError,ui=URIError,tn=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0},An=typeof Symbol<"u"&&Symbol,ci=tn,si=function(){return typeof An!="function"||typeof Symbol!="function"||typeof An("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ci()},yr={__proto__:null,foo:{}},li=Object,pi=function(){return{__proto__:yr}.foo===yr.foo&&!(yr instanceof li)},yi="Function.prototype.bind called on incompatible ",hi=Object.prototype.toString,di=Math.max,mi="[object Function]",Pn=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var u=0;u<r.length;u+=1)n[u+e.length]=r[u];return n},gi=function(e,r){for(var n=[],i=r,u=0;i<e.length;i+=1,u+=1)n[u]=e[i];return n},vi=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},bi=function(e){var r=this;if(typeof r!="function"||hi.apply(r)!==mi)throw new TypeError(yi+r);for(var n=gi(arguments,1),i,u=function(){if(this instanceof i){var E=r.apply(this,Pn(n,arguments));return Object(E)===E?E:this}return r.apply(e,Pn(n,arguments))},s=di(0,r.length-n.length),v=[],m=0;m<s;m++)v[m]="$"+m;if(i=Function("binder","return function ("+vi(v,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var _=function(){};_.prototype=r.prototype,i.prototype=new _,_.prototype=null}return i},Si=bi,rn=Function.prototype.bind||Si,wi=Function.prototype.call,Oi=Object.prototype.hasOwnProperty,Ei=rn,Ai=Ei.call(wi,Oi),ie,Pi=oi,Ti=ii,Ri=ai,ji=fi,it=yo,ot=gt,Ii=ui,ho=Function,hr=function(t){try{return ho('"use strict"; return ('+t+").constructor;")()}catch{}},Qe=Object.getOwnPropertyDescriptor;if(Qe)try{Qe({},"")}catch{Qe=null}var dr=function(){throw new ot},_i=Qe?function(){try{return arguments.callee,dr}catch{try{return Qe(arguments,"callee").get}catch{return dr}}}():dr,et=si(),$i=pi(),Ae=Object.getPrototypeOf||($i?function(t){return t.__proto__}:null),rt={},Fi=typeof Uint8Array>"u"||!Ae?ie:Ae(Uint8Array),Ye={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?ie:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ie:ArrayBuffer,"%ArrayIteratorPrototype%":et&&Ae?Ae([][Symbol.iterator]()):ie,"%AsyncFromSyncIteratorPrototype%":ie,"%AsyncFunction%":rt,"%AsyncGenerator%":rt,"%AsyncGeneratorFunction%":rt,"%AsyncIteratorPrototype%":rt,"%Atomics%":typeof Atomics>"u"?ie:Atomics,"%BigInt%":typeof BigInt>"u"?ie:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ie:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ie:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ie:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Pi,"%eval%":eval,"%EvalError%":Ti,"%Float32Array%":typeof Float32Array>"u"?ie:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ie:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ie:FinalizationRegistry,"%Function%":ho,"%GeneratorFunction%":rt,"%Int8Array%":typeof Int8Array>"u"?ie:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ie:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ie:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":et&&Ae?Ae(Ae([][Symbol.iterator]())):ie,"%JSON%":typeof JSON=="object"?JSON:ie,"%Map%":typeof Map>"u"?ie:Map,"%MapIteratorPrototype%":typeof Map>"u"||!et||!Ae?ie:Ae(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ie:Promise,"%Proxy%":typeof Proxy>"u"?ie:Proxy,"%RangeError%":Ri,"%ReferenceError%":ji,"%Reflect%":typeof Reflect>"u"?ie:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ie:Set,"%SetIteratorPrototype%":typeof Set>"u"||!et||!Ae?ie:Ae(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ie:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":et&&Ae?Ae(""[Symbol.iterator]()):ie,"%Symbol%":et?Symbol:ie,"%SyntaxError%":it,"%ThrowTypeError%":_i,"%TypedArray%":Fi,"%TypeError%":ot,"%Uint8Array%":typeof Uint8Array>"u"?ie:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ie:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ie:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ie:Uint32Array,"%URIError%":Ii,"%WeakMap%":typeof WeakMap>"u"?ie:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ie:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ie:WeakSet};if(Ae)try{null.error}catch(t){var Ni=Ae(Ae(t));Ye["%Error.prototype%"]=Ni}var qi=function t(e){var r;if(e==="%AsyncFunction%")r=hr("async function () {}");else if(e==="%GeneratorFunction%")r=hr("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=hr("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Ae&&(r=Ae(i.prototype))}return Ye[e]=r,r},Tn={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},vt=rn,Ft=Ai,Di=vt.call(Function.call,Array.prototype.concat),Ci=vt.call(Function.apply,Array.prototype.splice),Rn=vt.call(Function.call,String.prototype.replace),Nt=vt.call(Function.call,String.prototype.slice),Mi=vt.call(Function.call,RegExp.prototype.exec),Bi=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ui=/\\(\\)?/g,xi=function(e){var r=Nt(e,0,1),n=Nt(e,-1);if(r==="%"&&n!=="%")throw new it("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new it("invalid intrinsic syntax, expected opening `%`");var i=[];return Rn(e,Bi,function(u,s,v,m){i[i.length]=v?Rn(m,Ui,"$1"):s||u}),i},Li=function(e,r){var n=e,i;if(Ft(Tn,n)&&(i=Tn[n],n="%"+i[0]+"%"),Ft(Ye,n)){var u=Ye[n];if(u===rt&&(u=qi(n)),typeof u>"u"&&!r)throw new ot("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new it("intrinsic "+e+" does not exist!")},ut=function(e,r){if(typeof e!="string"||e.length===0)throw new ot("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ot('"allowMissing" argument must be a boolean');if(Mi(/^%?[^%]*%?$/,e)===null)throw new it("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=xi(e),i=n.length>0?n[0]:"",u=Li("%"+i+"%",r),s=u.name,v=u.value,m=!1,_=u.alias;_&&(i=_[0],Ci(n,Di([0,1],_)));for(var E=1,$=!0;E<n.length;E+=1){var g=n[E],T=Nt(g,0,1),k=Nt(g,-1);if((T==='"'||T==="'"||T==="`"||k==='"'||k==="'"||k==="`")&&T!==k)throw new it("property names with quotes must have matching quotes");if((g==="constructor"||!$)&&(m=!0),i+="."+g,s="%"+i+"%",Ft(Ye,s))v=Ye[s];else if(v!=null){if(!(g in v)){if(!r)throw new ot("base intrinsic for "+e+" exists, but the property is not available.");return}if(Qe&&E+1>=n.length){var Y=Qe(v,g);$=!!Y,$&&"get"in Y&&!("originalValue"in Y.get)?v=Y.get:v=v[g]}else $=Ft(v,g),v=v[g];$&&!m&&(Ye[s]=v)}}return v},ki=ut,Tt=ki("%Object.defineProperty%",!0)||!1;if(Tt)try{Tt({},"a",{value:1})}catch{Tt=!1}var nn=Tt,Gi=ut,Rt=Gi("%Object.getOwnPropertyDescriptor%",!0);if(Rt)try{Rt([],"length")}catch{Rt=null}var xt=Rt,jn=nn,zi=yo,tt=gt,In=xt,mo=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new tt("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new tt("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new tt("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new tt("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new tt("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new tt("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,m=!!In&&In(e,r);if(jn)jn(e,r,{configurable:s===null&&m?m.configurable:!s,enumerable:i===null&&m?m.enumerable:!i,value:n,writable:u===null&&m?m.writable:!u});else if(v||!i&&!u&&!s)e[r]=n;else throw new zi("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},xr=nn,go=function(){return!!xr};go.hasArrayLengthDefineBug=function(){if(!xr)return null;try{return xr([],"length",{value:1}).length!==1}catch{return!0}};var vo=go,Wi=po,Hi=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Vi=Object.prototype.toString,Ki=Array.prototype.concat,_n=mo,Ji=function(t){return typeof t=="function"&&Vi.call(t)==="[object Function]"},bo=vo(),Xi=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!Ji(n)||!n())return}bo?_n(t,e,r,!0):_n(t,e,r)},So=function(t,e){var r=arguments.length>2?arguments[2]:{},n=Wi(e);Hi&&(n=Ki.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i<n.length;i+=1)Xi(t,n[i],e[n[i]],r[n[i]])};So.supportsDescriptors=!!bo;var bt=So,on={},wo={exports:{}},an={};(function(t){t.fetch=i(L.commonjsGlobal.fetch)&&i(L.commonjsGlobal.ReadableStream),t.writableStream=i(L.commonjsGlobal.WritableStream),t.abortController=i(L.commonjsGlobal.AbortController);var e;function r(){if(e!==void 0)return e;if(L.commonjsGlobal.XMLHttpRequest){e=new L.commonjsGlobal.XMLHttpRequest;try{e.open("GET",L.commonjsGlobal.XDomainRequest?"/":"https://example.com")}catch{e=null}}else e=null;return e}function n(u){var s=r();if(!s)return!1;try{return s.responseType=u,s.responseType===u}catch{}return!1}t.arraybuffer=t.fetch||n("arraybuffer"),t.msstream=!t.fetch&&n("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&n("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||(r()?i(r().overrideMimeType):!1);function i(u){return typeof u=="function"}e=null})(an);var Lt={},Lr={exports:{}};(function(t,e){e=t.exports=L.require_stream_readable(),e.Stream=e,e.Readable=e,e.Writable=L.require_stream_writable(),e.Duplex=L.require_stream_duplex(),e.Transform=L.require_stream_transform(),e.PassThrough=L.require_stream_passthrough(),e.finished=L.requireEndOfStream(),e.pipeline=L.requirePipeline()})(Lr,Lr.exports);var fn=Lr.exports,$n=an,Qi=L.requireInherits_browser(),Oo=fn,wt=Lt.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},un=Lt.IncomingMessage=function(t,e,r,n){var i=this;if(Oo.Readable.call(i),i._mode=r,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",function(){L.dist.process.nextTick(function(){i.emit("close")})}),r==="fetch"){let E=function(){s.read().then(function($){if(!i._destroyed){if(n($.done),$.done){i.push(null);return}i.push(L.dist.Buffer.from($.value)),E()}}).catch(function($){n(!0),i._destroyed||i.emit("error",$)})};if(i._fetchResponse=e,i.url=e.url,i.statusCode=e.status,i.statusMessage=e.statusText,e.headers.forEach(function($,g){i.headers[g.toLowerCase()]=$,i.rawHeaders.push(g,$)}),$n.writableStream){var u=new WritableStream({write:function($){return n(!1),new Promise(function(g,T){i._destroyed?T():i.push(L.dist.Buffer.from($))?g():i._resumeFetch=g})},close:function(){n(!0),i._destroyed||i.push(null)},abort:function($){n(!0),i._destroyed||i.emit("error",$)}});try{e.body.pipeTo(u).catch(function($){n(!0),i._destroyed||i.emit("error",$)});return}catch{}}var s=e.body.getReader();E()}else{i._xhr=t,i._pos=0,i.url=t.responseURL,i.statusCode=t.status,i.statusMessage=t.statusText;var v=t.getAllResponseHeaders().split(/\r?\n/);if(v.forEach(function(E){var $=E.match(/^([^:]+):\s*(.*)/);if($){var g=$[1].toLowerCase();g==="set-cookie"?(i.headers[g]===void 0&&(i.headers[g]=[]),i.headers[g].push($[2])):i.headers[g]!==void 0?i.headers[g]+=", "+$[2]:i.headers[g]=$[2],i.rawHeaders.push($[1],$[2])}}),i._charset="x-user-defined",!$n.overrideMimeType){var m=i.rawHeaders["mime-type"];if(m){var _=m.match(/;\s*charset=([^;])(;|$)/);_&&(i._charset=_[1].toLowerCase())}i._charset||(i._charset="utf-8")}}};Qi(un,Oo.Readable);un.prototype._read=function(){var t=this,e=t._resumeFetch;e&&(t._resumeFetch=null,e())};un.prototype._onXHRProgress=function(t){var e=this,r=e._xhr,n=null;switch(e._mode){case"text":if(n=r.responseText,n.length>e._pos){var i=n.substr(e._pos);if(e._charset==="x-user-defined"){for(var u=L.dist.Buffer.alloc(i.length),s=0;s<i.length;s++)u[s]=i.charCodeAt(s)&255;e.push(u)}else e.push(i,e._charset);e._pos=n.length}break;case"arraybuffer":if(r.readyState!==wt.DONE||!r.response)break;n=r.response,e.push(L.dist.Buffer.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=r.response,r.readyState!==wt.LOADING||!n)break;e.push(L.dist.Buffer.from(new Uint8Array(n)));break;case"ms-stream":if(n=r.response,r.readyState!==wt.LOADING)break;var v=new L.commonjsGlobal.MSStreamReader;v.onprogress=function(){v.result.byteLength>e._pos&&(e.push(L.dist.Buffer.from(new Uint8Array(v.result.slice(e._pos)))),e._pos=v.result.byteLength)},v.onload=function(){t(!0),e.push(null)},v.readAsArrayBuffer(n);break}e._xhr.readyState===wt.DONE&&e._mode!=="ms-stream"&&(t(!0),e.push(null))};var Xe=an,Yi=L.requireInherits_browser(),Eo=Lt,cn=fn,Zi=Eo.IncomingMessage,Fn=Eo.readyStates;function ea(t,e){return Xe.fetch&&e?"fetch":Xe.mozchunkedarraybuffer?"moz-chunked-arraybuffer":Xe.msstream?"ms-stream":Xe.arraybuffer&&t?"arraybuffer":"text"}var Pe=wo.exports=function(t){var e=this;cn.Writable.call(e),e._opts=t,e._body=[],e._headers={},t.auth&&e.setHeader("Authorization","Basic "+L.dist.Buffer.from(t.auth).toString("base64")),Object.keys(t.headers).forEach(function(i){e.setHeader(i,t.headers[i])});var r,n=!0;if(t.mode==="disable-fetch"||"requestTimeout"in t&&!Xe.abortController)n=!1,r=!0;else if(t.mode==="prefer-streaming")r=!1;else if(t.mode==="allow-wrong-content-type")r=!Xe.overrideMimeType;else if(!t.mode||t.mode==="default"||t.mode==="prefer-fast")r=!0;else throw new Error("Invalid value for opts.mode");e._mode=ea(r,n),e._fetchTimer=null,e._socketTimeout=null,e._socketTimer=null,e.on("finish",function(){e._onFinish()})};Yi(Pe,cn.Writable);Pe.prototype.setHeader=function(t,e){var r=this,n=t.toLowerCase();ra.indexOf(n)===-1&&(r._headers[n]={name:t,value:e})};Pe.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null};Pe.prototype.removeHeader=function(t){var e=this;delete e._headers[t.toLowerCase()]};Pe.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts;"timeout"in e&&e.timeout!==0&&t.setTimeout(e.timeout);var r=t._headers,n=null;e.method!=="GET"&&e.method!=="HEAD"&&(n=new Blob(t._body,{type:(r["content-type"]||{}).value||""}));var i=[];if(Object.keys(r).forEach(function(m){var _=r[m].name,E=r[m].value;Array.isArray(E)?E.forEach(function($){i.push([_,$])}):i.push([_,E])}),t._mode==="fetch"){var u=null;if(Xe.abortController){var s=new AbortController;u=s.signal,t._fetchAbortController=s,"requestTimeout"in e&&e.requestTimeout!==0&&(t._fetchTimer=L.commonjsGlobal.setTimeout(function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()},e.requestTimeout))}L.commonjsGlobal.fetch(t._opts.url,{method:t._opts.method,headers:i,body:n||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:u}).then(function(m){t._fetchResponse=m,t._resetTimers(!1),t._connect()},function(m){t._resetTimers(!0),t._destroyed||t.emit("error",m)})}else{var v=t._xhr=new L.commonjsGlobal.XMLHttpRequest;try{v.open(t._opts.method,t._opts.url,!0)}catch(m){L.dist.process.nextTick(function(){t.emit("error",m)});return}"responseType"in v&&(v.responseType=t._mode),"withCredentials"in v&&(v.withCredentials=!!e.withCredentials),t._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(v.timeout=e.requestTimeout,v.ontimeout=function(){t.emit("requestTimeout")}),i.forEach(function(m){v.setRequestHeader(m[0],m[1])}),t._response=null,v.onreadystatechange=function(){switch(v.readyState){case Fn.LOADING:case Fn.DONE:t._onXHRProgress();break}},t._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){t._onXHRProgress()}),v.onerror=function(){t._destroyed||(t._resetTimers(!0),t.emit("error",new Error("XHR error")))};try{v.send(n)}catch(m){L.dist.process.nextTick(function(){t.emit("error",m)});return}}}};function ta(t){try{var e=t.status;return e!==null&&e!==0}catch{return!1}}Pe.prototype._onXHRProgress=function(){var t=this;t._resetTimers(!1),!(!ta(t._xhr)||t._destroyed)&&(t._response||t._connect(),t._response._onXHRProgress(t._resetTimers.bind(t)))};Pe.prototype._connect=function(){var t=this;t._destroyed||(t._response=new Zi(t._xhr,t._fetchResponse,t._mode,t._resetTimers.bind(t)),t._response.on("error",function(e){t.emit("error",e)}),t.emit("response",t._response))};Pe.prototype._write=function(t,e,r){var n=this;n._body.push(t),r()};Pe.prototype._resetTimers=function(t){var e=this;L.commonjsGlobal.clearTimeout(e._socketTimer),e._socketTimer=null,t?(L.commonjsGlobal.clearTimeout(e._fetchTimer),e._fetchTimer=null):e._socketTimeout&&(e._socketTimer=L.commonjsGlobal.setTimeout(function(){e.emit("timeout")},e._socketTimeout))};Pe.prototype.abort=Pe.prototype.destroy=function(t){var e=this;e._destroyed=!0,e._resetTimers(!0),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort(),t&&e.emit("error",t)};Pe.prototype.end=function(t,e,r){var n=this;typeof t=="function"&&(r=t,t=void 0),cn.Writable.prototype.end.call(n,t,e,r)};Pe.prototype.setTimeout=function(t,e){var r=this;e&&r.once("timeout",e),r._socketTimeout=t,r._resetTimers(!1)};Pe.prototype.flushHeaders=function(){};Pe.prototype.setNoDelay=function(){};Pe.prototype.setSocketKeepAlive=function(){};var ra=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],na=wo.exports,oa=aa,ia=Object.prototype.hasOwnProperty;function aa(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var n in r)ia.call(r,n)&&(t[n]=r[n])}return t}var fa={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},kr={exports:{}},qt={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */qt.exports;(function(t,e){(function(r){var n=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,u=typeof L.commonjsGlobal=="object"&&L.commonjsGlobal;(u.global===u||u.window===u||u.self===u)&&(r=u);var s,v=2147483647,m=36,_=1,E=26,$=38,g=700,T=72,k=128,Y="-",te=/^xn--/,K=/[^\x20-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=m-_,C=Math.floor,W=String.fromCharCode,M;function X(d){throw new RangeError(S[d])}function G(d,j){for(var f=d.length,y=[];f--;)y[f]=j(d[f]);return y}function ne(d,j){var f=d.split("@"),y="";f.length>1&&(y=f[0]+"@",d=f[1]),d=d.replace(P,".");var a=d.split("."),c=G(a,j).join(".");return y+c}function fe(d){for(var j=[],f=0,y=d.length,a,c;f<y;)a=d.charCodeAt(f++),a>=55296&&a<=56319&&f<y?(c=d.charCodeAt(f++),(c&64512)==56320?j.push(((a&1023)<<10)+(c&1023)+65536):(j.push(a),f--)):j.push(a);return j}function V(d){return G(d,function(j){var f="";return j>65535&&(j-=65536,f+=W(j>>>10&1023|55296),j=56320|j&1023),f+=W(j),f}).join("")}function re(d){return d-48<10?d-22:d-65<26?d-65:d-97<26?d-97:m}function ue(d,j){return d+22+75*(d<26)-((j!=0)<<5)}function se(d,j,f){var y=0;for(d=f?C(d/g):d>>1,d+=C(d/j);d>D*E>>1;y+=m)d=C(d/D);return C(y+(D+1)*d/(d+$))}function ce(d){var j=[],f=d.length,y,a=0,c=k,l=T,w,b,O,F,x,J,Z,oe,de;for(w=d.lastIndexOf(Y),w<0&&(w=0),b=0;b<w;++b)d.charCodeAt(b)>=128&&X("not-basic"),j.push(d.charCodeAt(b));for(O=w>0?w+1:0;O<f;){for(F=a,x=1,J=m;O>=f&&X("invalid-input"),Z=re(d.charCodeAt(O++)),(Z>=m||Z>C((v-a)/x))&&X("overflow"),a+=Z*x,oe=J<=l?_:J>=l+E?E:J-l,!(Z<oe);J+=m)de=m-oe,x>C(v/de)&&X("overflow"),x*=de;y=j.length+1,l=se(a-F,y,F==0),C(a/y)>v-c&&X("overflow"),c+=C(a/y),a%=y,j.splice(a++,0,c)}return V(j)}function ge(d){var j,f,y,a,c,l,w,b,O,F,x,J=[],Z,oe,de,Ee;for(d=fe(d),Z=d.length,j=k,f=0,c=T,l=0;l<Z;++l)x=d[l],x<128&&J.push(W(x));for(y=a=J.length,a&&J.push(Y);y<Z;){for(w=v,l=0;l<Z;++l)x=d[l],x>=j&&x<w&&(w=x);for(oe=y+1,w-j>C((v-f)/oe)&&X("overflow"),f+=(w-j)*oe,j=w,l=0;l<Z;++l)if(x=d[l],x<j&&++f>v&&X("overflow"),x==j){for(b=f,O=m;F=O<=c?_:O>=c+E?E:O-c,!(b<F);O+=m)Ee=b-F,de=m-F,J.push(W(ue(F+Ee%de,0))),b=C(Ee/de);J.push(W(ue(b,0))),c=se(f,oe,y==a),f=0,++y}++f,++j}return J.join("")}function he(d){return ne(d,function(j){return te.test(j)?ce(j.slice(4).toLowerCase()):j})}function R(d){return ne(d,function(j){return K.test(j)?"xn--"+ge(j):j})}if(s={version:"1.4.1",ucs2:{decode:fe,encode:V},decode:ce,encode:ge,toASCII:R,toUnicode:he},n&&i)if(t.exports==n)i.exports=s;else for(M in s)s.hasOwnProperty(M)&&(n[M]=s[M]);else r.punycode=s})(L.commonjsGlobal)})(qt,qt.exports);var ua=qt.exports,Ao={exports:{}},ca=ut,Nn=mo,sa=vo(),qn=xt,Dn=gt,la=ca("%Math.floor%"),pa=function(e,r){if(typeof e!="function")throw new Dn("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||la(r)!==r)throw new Dn("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,u=!0;if("length"in e&&qn){var s=qn(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(u=!1)}return(i||u||!n)&&(sa?Nn(e,"length",r,!0,!0):Nn(e,"length",r)),e};(function(t){var e=rn,r=ut,n=pa,i=gt,u=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),v=r("%Reflect.apply%",!0)||e.call(s,u),m=nn,_=r("%Math.max%");t.exports=function(g){if(typeof g!="function")throw new i("a function is required");var T=v(e,s,arguments);return n(T,1+_(0,g.length-(arguments.length-1)),!0)};var E=function(){return v(e,u,arguments)};m?m(t.exports,"apply",{value:E}):t.exports.apply=E})(Ao);var kt=Ao.exports,Po=ut,To=kt,ya=To(Po("String.prototype.indexOf")),St=function(e,r){var n=Po(e,!!r);return typeof n=="function"&&ya(e,".prototype.")>-1?To(n):n},sn=typeof Map=="function"&&Map.prototype,mr=Object.getOwnPropertyDescriptor&&sn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Dt=sn&&mr&&typeof mr.get=="function"?mr.get:null,Cn=sn&&Map.prototype.forEach,ln=typeof Set=="function"&&Set.prototype,gr=Object.getOwnPropertyDescriptor&&ln?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ct=ln&&gr&&typeof gr.get=="function"?gr.get:null,Mn=ln&&Set.prototype.forEach,ha=typeof WeakMap=="function"&&WeakMap.prototype,ht=ha?WeakMap.prototype.has:null,da=typeof WeakSet=="function"&&WeakSet.prototype,dt=da?WeakSet.prototype.has:null,ma=typeof WeakRef=="function"&&WeakRef.prototype,Bn=ma?WeakRef.prototype.deref:null,ga=Boolean.prototype.valueOf,va=Object.prototype.toString,ba=Function.prototype.toString,Sa=String.prototype.match,pn=String.prototype.slice,Ge=String.prototype.replace,wa=String.prototype.toUpperCase,Un=String.prototype.toLowerCase,Ro=RegExp.prototype.test,xn=Array.prototype.concat,Ue=Array.prototype.join,Oa=Array.prototype.slice,Ln=Math.floor,Gr=typeof BigInt=="function"?BigInt.prototype.valueOf:null,vr=Object.getOwnPropertySymbols,zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,at=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Te=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===at||!0)?Symbol.toStringTag:null,jo=Object.prototype.propertyIsEnumerable,kn=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Gn(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ro.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Ln(-t):Ln(t);if(n!==t){var i=String(n),u=pn.call(e,i.length+1);return Ge.call(i,r,"$&_")+"."+Ge.call(Ge.call(u,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ge.call(e,r,"$&_")}var Wr=L.require$$2,zn=Wr.custom,Wn=_o(zn)?zn:null,Ea=function t(e,r,n,i){var u=r||{};if(ke(u,"quoteStyle")&&u.quoteStyle!=="single"&&u.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ke(u,"maxStringLength")&&(typeof u.maxStringLength=="number"?u.maxStringLength<0&&u.maxStringLength!==1/0:u.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=ke(u,"customInspect")?u.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ke(u,"indent")&&u.indent!==null&&u.indent!==" "&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ke(u,"numericSeparator")&&typeof u.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Fo(e,u);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var m=String(e);return v?Gn(e,m):m}if(typeof e=="bigint"){var _=String(e)+"n";return v?Gn(e,_):_}var E=typeof u.depth>"u"?5:u.depth;if(typeof n>"u"&&(n=0),n>=E&&E>0&&typeof e=="object")return Hr(e)?"[Array]":"[Object]";var $=La(u,n);if(typeof i>"u")i=[];else if($o(i,e)>=0)return"[Circular]";function g(re,ue,se){if(ue&&(i=Oa.call(i),i.push(ue)),se){var ce={depth:u.depth};return ke(u,"quoteStyle")&&(ce.quoteStyle=u.quoteStyle),t(re,ce,n+1,i)}return t(re,u,n+1,i)}if(typeof e=="function"&&!Hn(e)){var T=Fa(e),k=Ot(e,g);return"[Function"+(T?": "+T:" (anonymous)")+"]"+(k.length>0?" { "+Ue.call(k,", ")+" }":"")}if(_o(e)){var Y=at?Ge.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):zr.call(e);return typeof e=="object"&&!at?yt(Y):Y}if(Ba(e)){for(var te="<"+Un.call(String(e.nodeName)),K=e.attributes||[],P=0;P<K.length;P++)te+=" "+K[P].name+"="+Io(Aa(K[P].value),"double",u);return te+=">",e.childNodes&&e.childNodes.length&&(te+="..."),te+="</"+Un.call(String(e.nodeName))+">",te}if(Hr(e)){if(e.length===0)return"[]";var S=Ot(e,g);return $&&!xa(S)?"["+Vr(S,$)+"]":"[ "+Ue.call(S,", ")+" ]"}if(Ta(e)){var D=Ot(e,g);return!("cause"in Error.prototype)&&"cause"in e&&!jo.call(e,"cause")?"{ ["+String(e)+"] "+Ue.call(xn.call("[cause]: "+g(e.cause),D),", ")+" }":D.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Ue.call(D,", ")+" }"}if(typeof e=="object"&&s){if(Wn&&typeof e[Wn]=="function"&&Wr)return Wr(e,{depth:E-n});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Na(e)){var C=[];return Cn&&Cn.call(e,function(re,ue){C.push(g(ue,e,!0)+" => "+g(re,e))}),Vn("Map",Dt.call(e),C,$)}if(Ca(e)){var W=[];return Mn&&Mn.call(e,function(re){W.push(g(re,e))}),Vn("Set",Ct.call(e),W,$)}if(qa(e))return br("WeakMap");if(Ma(e))return br("WeakSet");if(Da(e))return br("WeakRef");if(ja(e))return yt(g(Number(e)));if(_a(e))return yt(g(Gr.call(e)));if(Ia(e))return yt(ga.call(e));if(Ra(e))return yt(g(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof L.commonjsGlobal<"u"&&e===L.commonjsGlobal)return"{ [object globalThis] }";if(!Pa(e)&&!Hn(e)){var M=Ot(e,g),X=kn?kn(e)===Object.prototype:e instanceof Object||e.constructor===Object,G=e instanceof Object?"":"null prototype",ne=!X&&Te&&Object(e)===e&&Te in e?pn.call(ze(e),8,-1):G?"Object":"",fe=X||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",V=fe+(ne||G?"["+Ue.call(xn.call([],ne||[],G||[]),": ")+"] ":"");return M.length===0?V+"{}":$?V+"{"+Vr(M,$)+"}":V+"{ "+Ue.call(M,", ")+" }"}return String(e)};function Io(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function Aa(t){return Ge.call(String(t),/"/g,""")}function Hr(t){return ze(t)==="[object Array]"&&(!Te||!(typeof t=="object"&&Te in t))}function Pa(t){return ze(t)==="[object Date]"&&(!Te||!(typeof t=="object"&&Te in t))}function Hn(t){return ze(t)==="[object RegExp]"&&(!Te||!(typeof t=="object"&&Te in t))}function Ta(t){return ze(t)==="[object Error]"&&(!Te||!(typeof t=="object"&&Te in t))}function Ra(t){return ze(t)==="[object String]"&&(!Te||!(typeof t=="object"&&Te in t))}function ja(t){return ze(t)==="[object Number]"&&(!Te||!(typeof t=="object"&&Te in t))}function Ia(t){return ze(t)==="[object Boolean]"&&(!Te||!(typeof t=="object"&&Te in t))}function _o(t){if(at)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!zr)return!1;try{return zr.call(t),!0}catch{}return!1}function _a(t){if(!t||typeof t!="object"||!Gr)return!1;try{return Gr.call(t),!0}catch{}return!1}var $a=Object.prototype.hasOwnProperty||function(t){return t in this};function ke(t,e){return $a.call(t,e)}function ze(t){return va.call(t)}function Fa(t){if(t.name)return t.name;var e=Sa.call(ba.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function $o(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Na(t){if(!Dt||!t||typeof t!="object")return!1;try{Dt.call(t);try{Ct.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function qa(t){if(!ht||!t||typeof t!="object")return!1;try{ht.call(t,ht);try{dt.call(t,dt)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function Da(t){if(!Bn||!t||typeof t!="object")return!1;try{return Bn.call(t),!0}catch{}return!1}function Ca(t){if(!Ct||!t||typeof t!="object")return!1;try{Ct.call(t);try{Dt.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function Ma(t){if(!dt||!t||typeof t!="object")return!1;try{dt.call(t,dt);try{ht.call(t,ht)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function Ba(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Fo(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Fo(pn.call(t,0,e.maxStringLength),e)+n}var i=Ge.call(Ge.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ua);return Io(i,"single",e)}function Ua(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+wa.call(e.toString(16))}function yt(t){return"Object("+t+")"}function br(t){return t+" { ? }"}function Vn(t,e,r,n){var i=n?Vr(r,n):Ue.call(r,", ");return t+" ("+e+") {"+i+"}"}function xa(t){for(var e=0;e<t.length;e++)if($o(t[e],`
|
|
2
2
|
`)>=0)return!1;return!0}function La(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=Ue.call(Array(t.indent+1)," ");else return null;return{base:r,prev:Ue.call(Array(e+1),r)}}function Vr(t,e){if(t.length===0)return"";var r=`
|
|
3
3
|
`+e.prev+e.base;return r+Ue.call(t,","+r)+`
|
|
4
4
|
`+e.prev}function Ot(t,e){var r=Hr(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=ke(t,i)?e(t[i],t):""}var u=typeof vr=="function"?vr(t):[],s;if(at){s={};for(var v=0;v<u.length;v++)s["$"+u[v]]=u[v]}for(var m in t)ke(t,m)&&(r&&String(Number(m))===m&&m<t.length||at&&s["$"+m]instanceof Symbol||(Ro.call(/[^\w$]/,m)?n.push(e(m,t)+": "+e(t[m],t)):n.push(m+": "+e(t[m],t))));if(typeof vr=="function")for(var _=0;_<u.length;_++)jo.call(t,u[_])&&n.push("["+e(u[_])+"]: "+e(t[u[_]],t));return n}var No=ut,ct=St,ka=Ea,Ga=gt,Et=No("%WeakMap%",!0),At=No("%Map%",!0),za=ct("WeakMap.prototype.get",!0),Wa=ct("WeakMap.prototype.set",!0),Ha=ct("WeakMap.prototype.has",!0),Va=ct("Map.prototype.get",!0),Ka=ct("Map.prototype.set",!0),Ja=ct("Map.prototype.has",!0),yn=function(t,e){for(var r=t,n;(n=r.next)!==null;r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n},Xa=function(t,e){var r=yn(t,e);return r&&r.value},Qa=function(t,e,r){var n=yn(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},Ya=function(t,e){return!!yn(t,e)},Za=function(){var e,r,n,i={assert:function(u){if(!i.has(u))throw new Ga("Side channel does not contain "+ka(u))},get:function(u){if(Et&&u&&(typeof u=="object"||typeof u=="function")){if(e)return za(e,u)}else if(At){if(r)return Va(r,u)}else if(n)return Xa(n,u)},has:function(u){if(Et&&u&&(typeof u=="object"||typeof u=="function")){if(e)return Ha(e,u)}else if(At){if(r)return Ja(r,u)}else if(n)return Ya(n,u);return!1},set:function(u,s){Et&&u&&(typeof u=="object"||typeof u=="function")?(e||(e=new Et),Wa(e,u,s)):At?(r||(r=new At),Ka(r,u,s)):(n||(n={key:{},next:null}),Qa(n,u,s))}};return i},ef=String.prototype.replace,tf=/%20/g,Sr={RFC1738:"RFC1738",RFC3986:"RFC3986"},hn={default:Sr.RFC3986,formatters:{RFC1738:function(t){return ef.call(t,tf,"+")},RFC3986:function(t){return String(t)}},RFC1738:Sr.RFC1738,RFC3986:Sr.RFC3986},rf=hn,wr=Object.prototype.hasOwnProperty,Je=Array.isArray,Me=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),nf=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(Je(n)){for(var i=[],u=0;u<n.length;++u)typeof n[u]<"u"&&i.push(n[u]);r.obj[r.prop]=i}}},qo=function(e,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},of=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if(Je(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!wr.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object")return[e].concat(r);var i=e;return Je(e)&&!Je(r)&&(i=qo(e,n)),Je(e)&&Je(r)?(r.forEach(function(u,s){if(wr.call(e,s)){var v=e[s];v&&typeof v=="object"&&u&&typeof u=="object"?e[s]=t(v,u,n):e.push(u)}else e[s]=u}),e):Object.keys(r).reduce(function(u,s){var v=r[s];return wr.call(u,s)?u[s]=t(u[s],v,n):u[s]=v,u},i)},af=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},ff=function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Or=1024,uf=function(e,r,n,i,u){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),n==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(T){return"%26%23"+parseInt(T.slice(2),16)+"%3B"});for(var v="",m=0;m<s.length;m+=Or){for(var _=s.length>=Or?s.slice(m,m+Or):s,E=[],$=0;$<_.length;++$){var g=_.charCodeAt($);if(g===45||g===46||g===95||g===126||g>=48&&g<=57||g>=65&&g<=90||g>=97&&g<=122||u===rf.RFC1738&&(g===40||g===41)){E[E.length]=_.charAt($);continue}if(g<128){E[E.length]=Me[g];continue}if(g<2048){E[E.length]=Me[192|g>>6]+Me[128|g&63];continue}if(g<55296||g>=57344){E[E.length]=Me[224|g>>12]+Me[128|g>>6&63]+Me[128|g&63];continue}$+=1,g=65536+((g&1023)<<10|_.charCodeAt($)&1023),E[E.length]=Me[240|g>>18]+Me[128|g>>12&63]+Me[128|g>>6&63]+Me[128|g&63]}v+=E.join("")}return v},cf=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i<r.length;++i)for(var u=r[i],s=u.obj[u.prop],v=Object.keys(s),m=0;m<v.length;++m){var _=v[m],E=s[_];typeof E=="object"&&E!==null&&n.indexOf(E)===-1&&(r.push({obj:s,prop:_}),n.push(E))}return nf(r),e},sf=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},lf=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},pf=function(e,r){return[].concat(e,r)},yf=function(e,r){if(Je(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},Do={arrayToObject:qo,assign:af,combine:pf,compact:cf,decode:ff,encode:uf,isBuffer:lf,isRegExp:sf,maybeMap:yf,merge:of},Co=Za,jt=Do,mt=hn,hf=Object.prototype.hasOwnProperty,Mo={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},Be=Array.isArray,df=Array.prototype.push,Bo=function(t,e){df.apply(t,Be(e)?e:[e])},mf=Date.prototype.toISOString,Kn=mt.default,Oe={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:jt.encode,encodeValuesOnly:!1,format:Kn,formatter:mt.formatters[Kn],indices:!1,serializeDate:function(e){return mf.call(e)},skipNulls:!1,strictNullHandling:!1},gf=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Er={},vf=function t(e,r,n,i,u,s,v,m,_,E,$,g,T,k,Y,te,K,P){for(var S=e,D=P,C=0,W=!1;(D=D.get(Er))!==void 0&&!W;){var M=D.get(e);if(C+=1,typeof M<"u"){if(M===C)throw new RangeError("Cyclic object value");W=!0}typeof D.get(Er)>"u"&&(C=0)}if(typeof E=="function"?S=E(r,S):S instanceof Date?S=T(S):n==="comma"&&Be(S)&&(S=jt.maybeMap(S,function(d){return d instanceof Date?T(d):d})),S===null){if(s)return _&&!te?_(r,Oe.encoder,K,"key",k):r;S=""}if(gf(S)||jt.isBuffer(S)){if(_){var X=te?r:_(r,Oe.encoder,K,"key",k);return[Y(X)+"="+Y(_(S,Oe.encoder,K,"value",k))]}return[Y(r)+"="+Y(String(S))]}var G=[];if(typeof S>"u")return G;var ne;if(n==="comma"&&Be(S))te&&_&&(S=jt.maybeMap(S,_)),ne=[{value:S.length>0?S.join(",")||null:void 0}];else if(Be(E))ne=E;else{var fe=Object.keys(S);ne=$?fe.sort($):fe}var V=m?r.replace(/\./g,"%2E"):r,re=i&&Be(S)&&S.length===1?V+"[]":V;if(u&&Be(S)&&S.length===0)return re+"[]";for(var ue=0;ue<ne.length;++ue){var se=ne[ue],ce=typeof se=="object"&&typeof se.value<"u"?se.value:S[se];if(!(v&&ce===null)){var ge=g&&m?se.replace(/\./g,"%2E"):se,he=Be(S)?typeof n=="function"?n(re,ge):re:re+(g?"."+ge:"["+ge+"]");P.set(e,C);var R=Co();R.set(Er,P),Bo(G,t(ce,he,n,i,u,s,v,m,n==="comma"&&te&&Be(S)?null:_,E,$,g,T,k,Y,te,K,R))}}return G},bf=function(e){if(!e)return Oe;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||Oe.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=mt.default;if(typeof e.format<"u"){if(!hf.call(mt.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=mt.formatters[n],u=Oe.filter;(typeof e.filter=="function"||Be(e.filter))&&(u=e.filter);var s;if(e.arrayFormat in Mo?s=e.arrayFormat:"indices"in e?s=e.indices?"indices":"repeat":s=Oe.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var v=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:Oe.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Oe.addQueryPrefix,allowDots:v,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Oe.allowEmptyArrays,arrayFormat:s,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Oe.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?Oe.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Oe.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:Oe.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:Oe.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Oe.encodeValuesOnly,filter:u,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Oe.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Oe.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Oe.strictNullHandling}},Sf=function(t,e){var r=t,n=bf(e),i,u;typeof n.filter=="function"?(u=n.filter,r=u("",r)):Be(n.filter)&&(u=n.filter,i=u);var s=[];if(typeof r!="object"||r===null)return"";var v=Mo[n.arrayFormat],m=v==="comma"&&n.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var _=Co(),E=0;E<i.length;++E){var $=i[E];n.skipNulls&&r[$]===null||Bo(s,vf(r[$],$,v,m,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,_))}var g=s.join(n.delimiter),T=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?T+="utf8=%26%2310003%3B&":T+="utf8=%E2%9C%93&"),g.length>0?T+g:""},ft=Do,Kr=Object.prototype.hasOwnProperty,wf=Array.isArray,ve={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ft.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Of=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},Uo=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Ef="utf8=%26%2310003%3B",Af="utf8=%E2%9C%93",Pf=function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u=r.parameterLimit===1/0?void 0:r.parameterLimit,s=i.split(r.delimiter,u),v=-1,m,_=r.charset;if(r.charsetSentinel)for(m=0;m<s.length;++m)s[m].indexOf("utf8=")===0&&(s[m]===Af?_="utf-8":s[m]===Ef&&(_="iso-8859-1"),v=m,m=s.length);for(m=0;m<s.length;++m)if(m!==v){var E=s[m],$=E.indexOf("]="),g=$===-1?E.indexOf("="):$+1,T,k;g===-1?(T=r.decoder(E,ve.decoder,_,"key"),k=r.strictNullHandling?null:""):(T=r.decoder(E.slice(0,g),ve.decoder,_,"key"),k=ft.maybeMap(Uo(E.slice(g+1),r),function(te){return r.decoder(te,ve.decoder,_,"value")})),k&&r.interpretNumericEntities&&_==="iso-8859-1"&&(k=Of(k)),E.indexOf("[]=")>-1&&(k=wf(k)?[k]:k);var Y=Kr.call(n,T);Y&&r.duplicates==="combine"?n[T]=ft.combine(n[T],k):(!Y||r.duplicates==="last")&&(n[T]=k)}return n},Tf=function(t,e,r,n){for(var i=n?e:Uo(e,r),u=t.length-1;u>=0;--u){var s,v=t[u];if(v==="[]"&&r.parseArrays)s=r.allowEmptyArrays&&(i===""||r.strictNullHandling&&i===null)?[]:[].concat(i);else{s=r.plainObjects?Object.create(null):{};var m=v.charAt(0)==="["&&v.charAt(v.length-1)==="]"?v.slice(1,-1):v,_=r.decodeDotInKeys?m.replace(/%2E/g,"."):m,E=parseInt(_,10);!r.parseArrays&&_===""?s={0:i}:!isNaN(E)&&v!==_&&String(E)===_&&E>=0&&r.parseArrays&&E<=r.arrayLimit?(s=[],s[E]=i):_!=="__proto__"&&(s[_]=i)}i=s}return i},Rf=function(e,r,n,i){if(e){var u=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,v=/(\[[^[\]]*])/g,m=n.depth>0&&s.exec(u),_=m?u.slice(0,m.index):u,E=[];if(_){if(!n.plainObjects&&Kr.call(Object.prototype,_)&&!n.allowPrototypes)return;E.push(_)}for(var $=0;n.depth>0&&(m=v.exec(u))!==null&&$<n.depth;){if($+=1,!n.plainObjects&&Kr.call(Object.prototype,m[1].slice(1,-1))&&!n.allowPrototypes)return;E.push(m[1])}if(m){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");E.push("["+u.slice(m.index)+"]")}return Tf(E,r,n,i)}},jf=function(e){if(!e)return ve;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof e.charset>"u"?ve.charset:e.charset,n=typeof e.duplicates>"u"?ve.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:ve.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:ve.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:ve.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:ve.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:ve.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:ve.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:ve.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:ve.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:ve.decoder,delimiter:typeof e.delimiter=="string"||ft.isRegExp(e.delimiter)?e.delimiter:ve.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:ve.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:ve.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:ve.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:ve.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:ve.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:ve.strictNullHandling}},If=function(t,e){var r=jf(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?Pf(t,r):t,i=r.plainObjects?Object.create(null):{},u=Object.keys(n),s=0;s<u.length;++s){var v=u[s],m=Rf(v,n[v],r,typeof t=="string");i=ft.merge(i,m,r)}return r.allowSparse===!0?i:ft.compact(i)},_f=Sf,$f=If,Ff=hn,Nf={formats:Ff,parse:$f,stringify:_f};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=ua,n=Nf;function i(h){return h&&typeof h=="object"&&"default"in h?h:{default:h}}var u=i(r),s=i(n),v=u.default;function m(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var _=/^([a-z0-9.+-]+:)/i,E=/:[0-9]*$/,$=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,g=["<",">",'"',"`"," ","\r",`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./index-
|
|
1
|
+
"use strict";const n=require("./index-Dh6mkRtz.js");function L(i,p,f,l){n.hash(i);const y=n.checkOpts({dkLen:32,asyncTick:10},l),{c:b,dkLen:d,asyncTick:t}=y;if(n.number(b),n.number(d),n.number(t),b<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const e=n.toBytes(p),r=n.toBytes(f),s=new Uint8Array(d),k=n.hmac.create(i,e),o=k._cloneInto().update(r);return{c:b,dkLen:d,asyncTick:t,DK:s,PRF:k,PRFSalt:o}}function g(i,p,f,l,y){return i.destroy(),p.destroy(),l&&l.destroy(),y.fill(0),f}function _(i,p,f,l){const{c:y,dkLen:b,DK:d,PRF:t,PRFSalt:e}=L(i,p,f,l);let r;const s=new Uint8Array(4),k=n.createView(s),o=new Uint8Array(t.outputLen);for(let c=1,w=0;w<b;c++,w+=t.outputLen){const u=d.subarray(w,w+t.outputLen);k.setInt32(0,c,!1),(r=e._cloneInto(r)).update(s).digestInto(o),u.set(o.subarray(0,u.length));for(let I=1;I<y;I++){t._cloneInto(r).update(o).digestInto(o);for(let a=0;a<u.length;a++)u[a]^=o[a]}}return g(t,e,d,r,o)}async function h(i,p,f,l){const{c:y,dkLen:b,asyncTick:d,DK:t,PRF:e,PRFSalt:r}=L(i,p,f,l);let s;const k=new Uint8Array(4),o=n.createView(k),c=new Uint8Array(e.outputLen);for(let w=1,u=0;u<b;w++,u+=e.outputLen){const I=t.subarray(u,u+e.outputLen);o.setInt32(0,w,!1),(s=r._cloneInto(s)).update(k).digestInto(c),I.set(c.subarray(0,I.length)),await n.asyncLoop(y-1,d,()=>{e._cloneInto(s).update(c).digestInto(c);for(let a=0;a<I.length;a++)I[a]^=c[a]})}return g(e,r,t,s,c)}const P=Object.freeze(Object.defineProperty({__proto__:null,pbkdf2:_,pbkdf2Async:h},Symbol.toStringTag,{value:"Module"}));exports.pbkdf2=_;exports.pbkdf2$1=P;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ax as g, ay as P, az as A, aA as F, aB as I, aC as L, U as R } from "./index-
|
|
1
|
+
import { ax as g, ay as P, az as A, aA as F, aB as I, aC as L, U as R } from "./index-BPD6tZ5I.mjs";
|
|
2
2
|
function _(u, p, d, i) {
|
|
3
3
|
A(u);
|
|
4
4
|
const f = F({ dkLen: 32, asyncTick: 10 }, i), { c: y, dkLen: l, asyncTick: t } = f;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var S = Object.defineProperty;
|
|
2
2
|
var x = (r, t, e) => t in r ? S(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
3
|
var h = (r, t, e) => x(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { e as _, bb as I,
|
|
4
|
+
import { e as _, bb as I, ad as P, bc as A, bd as M, b7 as y, b8 as R, u as L, ba as b } from "./index-BPD6tZ5I.mjs";
|
|
5
5
|
const F = 0.5, E = 1, T = 1, k = 1e9, B = 5, U = 25e4;
|
|
6
6
|
async function V(r, t, e) {
|
|
7
7
|
const [n, i] = await _.chainFromRpc(r), g = typeof t == "string" ? I.fromSecretKey(P.decode(t)) : t;
|