@dcl/blog-site 0.1.2-22200898455.commit-be7c830 → 0.1.2
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/assets/{add-CONdz2L0.js → add-CyVnKjs7.js} +1 -1
- package/assets/{all-wallets-BqzhB1kH.js → all-wallets-CG777VR6.js} +1 -1
- package/assets/{app-store-CG7fZeTB.js → app-store-CyKybWLW.js} +1 -1
- package/assets/{apple-qYUKb-fL.js → apple-BLNXiKyR.js} +1 -1
- package/assets/{arrow-bottom-circle-wze6Ib1X.js → arrow-bottom-circle-u-wMwhnf.js} +1 -1
- package/assets/{arrow-bottom-SgoHwiLt.js → arrow-bottom-qde4rzT6.js} +1 -1
- package/assets/{arrow-left-Bc9t_8h8.js → arrow-left-DfxhJBdw.js} +1 -1
- package/assets/{arrow-right-DQoklnFO.js → arrow-right-Cb7w__hM.js} +1 -1
- package/assets/{arrow-top-CtzlGQJY.js → arrow-top-BeK_c3eg.js} +1 -1
- package/assets/auto-track-BdKMoPcs.js +1 -0
- package/assets/{bank-DNHWU_Jg.js → bank-HqtNO_bB.js} +1 -1
- package/assets/{basic-PxGakulR.js → basic-BNAPw1FU.js} +1 -1
- package/assets/{browser-BNy_mm43.js → browser-DIokFqEe.js} +1 -1
- package/assets/{card-g11mKc-V.js → card-DjOl3skX.js} +1 -1
- package/assets/{ccip-CdVPatLX.js → ccip-DqBdUu6i.js} +1 -1
- package/assets/{checkmark-DhBzwQ6t.js → checkmark-CWKlssVu.js} +1 -1
- package/assets/{checkmark-bold-svBeKBAh.js → checkmark-bold-Cj3u8wQw.js} +1 -1
- package/assets/{chevron-bottom-DAKGIwRE.js → chevron-bottom-D9yVYRKT.js} +1 -1
- package/assets/{chevron-left-pJoxer2X.js → chevron-left-DqBwyuOT.js} +1 -1
- package/assets/{chevron-right-BZQxa3gA.js → chevron-right-CKqSAH_x.js} +1 -1
- package/assets/{chevron-top-B1p3XmfH.js → chevron-top-DFQOHzSJ.js} +1 -1
- package/assets/{chrome-store-eRhpzwit.js → chrome-store-wJopyOxA.js} +1 -1
- package/assets/{clock-BAS4ouqS.js → clock-9KCU5m2q.js} +1 -1
- package/assets/{close-BAQozjiM.js → close-CAlya4Yr.js} +1 -1
- package/assets/{coinPlaceholder-BXdMDAlW.js → coinPlaceholder-D-_nqm5Y.js} +1 -1
- package/assets/{compass-DEaXwX19.js → compass-Cc9q07ac.js} +1 -1
- package/assets/{copy-D5b4R0M8.js → copy-D0kVMzUr.js} +1 -1
- package/assets/{core-Chr5umbM.js → core-o6E0YR6k.js} +4 -4
- package/assets/{cursor-CToeUN6u.js → cursor-8Q7GmcGD.js} +1 -1
- package/assets/{cursor-transparent-akq7d1Vw.js → cursor-transparent-CURyD4kY.js} +1 -1
- package/assets/{desktop-DGBZdcEp.js → desktop-DogYiFjA.js} +1 -1
- package/assets/{disconnect-CmKUkObt.js → disconnect-CfgkM-B7.js} +1 -1
- package/assets/{discord-AGPJXkYv.js → discord-CqpA_3K8.js} +1 -1
- package/assets/{etherscan-BCzO-bJK.js → etherscan-BnynTX8C.js} +1 -1
- package/assets/{exclamation-triangle-Dsv91uqg.js → exclamation-triangle-DNM8zLTG.js} +1 -1
- package/assets/{extension-DptuMijD.js → extension-BWNgZYd9.js} +1 -1
- package/assets/{external-link-BtrWPfav.js → external-link-Dz6LJ8_-.js} +1 -1
- package/assets/{facebook-BM1mR9Hc.js → facebook-B4NhgA3g.js} +1 -1
- package/assets/{farcaster-BnAwNR4c.js → farcaster-x-xnP4zp.js} +1 -1
- package/assets/{filters-DnAaDMtu.js → filters-BCP3KZSL.js} +1 -1
- package/assets/{github-BiifJsd8.js → github-Bv7KrAHw.js} +1 -1
- package/assets/{google-CsZwT3WU.js → google-CRoKw5G5.js} +1 -1
- package/assets/{help-circle-B8Z8NC0j.js → help-circle-JerI1UQH.js} +1 -1
- package/assets/{id-DBfaQRNy.js → id-DNx9O1ig.js} +1 -1
- package/assets/{image-BaZrELj9.js → image-B5lk579u.js} +1 -1
- package/assets/index-B4WTLPXJ.js +1 -0
- package/assets/{index-3zjttLF9.js → index-BSNxc2aY.js} +3 -3
- package/assets/index-C2CVTEjl.js +1 -0
- package/assets/index-C6-wFTel.js +1 -0
- package/assets/{index-fyJdZPtk.js → index-CTkJr32f.js} +1 -1
- package/assets/index-CXSCOxLa.js +1 -0
- package/assets/index-D1_e83sD.js +2 -0
- package/assets/index-D6ZMQedT.js +1 -0
- package/assets/index-FMsmThma.js +2 -0
- package/assets/{index-nDqVr4pH.js → index-I3pSy4Zy.js} +6 -6
- package/assets/{index-ch5fmFOv.js → index-m9AvnFPE.js} +124 -124
- package/assets/{index.es-Cl1t_1D0.js → index.es-ZeQVkZNG.js} +4 -4
- package/assets/index.umd-Du5YokXV.js +1 -0
- package/assets/{info-Bbb90kQC.js → info-DJJNUdKr.js} +1 -1
- package/assets/{info-circle-DC62YK7p.js → info-circle-D3lYH_jg.js} +1 -1
- package/assets/inherits_browser-BlmhoU4v.js +1 -0
- package/assets/is-plan-event-enabled-DS1Agtkw.js +1 -0
- package/assets/{lightbulb-D3KvOoms.js → lightbulb-lHrmWgEw.js} +1 -1
- package/assets/localBatchGatewayRequest-D3hqEo4H.js +1 -0
- package/assets/{mail-CgVPzJWi.js → mail-Dv_rw0qa.js} +1 -1
- package/assets/{mobile-DkODDOLr.js → mobile-CGf02IdD.js} +1 -1
- package/assets/{more-Vzh2YixA.js → more-DbI559Pm.js} +1 -1
- package/assets/{network-placeholder-CxREg9uT.js → network-placeholder-B53tzK5r.js} +1 -1
- package/assets/{nftPlaceholder-D6oHDmUM.js → nftPlaceholder-GEOyPEQA.js} +1 -1
- package/assets/{off-D7hAfKPw.js → off-C_yJUsh4.js} +1 -1
- package/assets/{play-store-ymeOX5eL.js → play-store-BJLp1IWs.js} +1 -1
- package/assets/{plus-BSW9Aosf.js → plus-D6nAtT6O.js} +1 -1
- package/assets/{qr-code-Cl8NBuwd.js → qr-code-lrgu_byx.js} +1 -1
- package/assets/{recycle-horizontal-DCp7d4ol.js → recycle-horizontal-CNYe9bbF.js} +1 -1
- package/assets/{refresh-CgZM0T20.js → refresh-ChVzXve8.js} +1 -1
- package/assets/{reown-logo-C4l2_-Rn.js → reown-logo-BvBUEEeQ.js} +1 -1
- package/assets/{search-BFwbgBO3.js → search-DQr5xz8G.js} +1 -1
- package/assets/{secp256k1-ceIhvGka.js → secp256k1-B5bjmlpC.js} +1 -1
- package/assets/{secp256k1-DoSvwiWn.js → secp256k1-DL-MVpVU.js} +1 -1
- package/assets/{send-Bw5bc-ux.js → send-BRFJj9vU.js} +1 -1
- package/assets/{swapHorizontal-DjoIz7Pz.js → swapHorizontal-4OcpYjBP.js} +1 -1
- package/assets/{swapHorizontalBold-7d-pvfYM.js → swapHorizontalBold-BIfY-n1S.js} +1 -1
- package/assets/{swapHorizontalMedium-BS3q74Ag.js → swapHorizontalMedium-D-xOF1-1.js} +1 -1
- package/assets/{swapHorizontalRoundedBold-7x4y8KAj.js → swapHorizontalRoundedBold-CWefS__1.js} +1 -1
- package/assets/{swapVertical-C-I-lOO2.js → swapVertical-10MLOLxY.js} +1 -1
- package/assets/{telegram-NT_2PwmR.js → telegram-CpUsTmvb.js} +1 -1
- package/assets/{three-dots-B9XoXaah.js → three-dots-BbzO9tlr.js} +1 -1
- package/assets/{twitch-DwklO_-v.js → twitch-DElwGcJp.js} +1 -1
- package/assets/{twitterIcon-D01VF8Iy.js → twitterIcon-CGBR8jTt.js} +1 -1
- package/assets/{verify-filled-BxWo9YFB.js → verify-filled-DkOi1MVN.js} +1 -1
- package/assets/{verify-D15WpctO.js → verify-nSw_mp2u.js} +1 -1
- package/assets/{w3m-modal-CGtztDSc.js → w3m-modal-o69qIUHV.js} +1 -1
- package/assets/{wallet-JyXNRnFs.js → wallet-CU5Un-2k.js} +1 -1
- package/assets/{wallet-placeholder-CSmHe_ZB.js → wallet-placeholder-IZIR9OIq.js} +1 -1
- package/assets/{walletconnect-B5GjgoQW.js → walletconnect-BqPmquZK.js} +1 -1
- package/assets/{warning-circle-BmgJOTmJ.js → warning-circle-BbDzrW_O.js} +1 -1
- package/assets/{x-D1Sk_2KN.js → x-Bc8cF9wJ.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/localBatchGatewayRequest-o8j0FHDn.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{B as ls,_ as Z,h as oa,y as ml}from"./hooks.module-Dz_XB4AG.js";import{h as we,b as Lo,d as ze,e as Be,B as R,H as Mo,f as zr,i as er,t as Ro,j as Do,k as yl,l as Jt,m as oi,n as bl,o as gl,p as wl,q as vl,r as Ve,s as Me,u as Dt,v as ca,w as jt,x as ua,y as jn,z as Un,A as xl,C as El,D as kl,E as Te,F as vr,G as yt,I as Sl,J as da,K as jo,L as Uo,M as Al,N as la,O as fa,P as pa,Q as Il,R as Pl,S as Qt,T as K,U as bt,V as _l,W as $o,X as Tl,Y as Ol,Z as Cl,$ as Bl,a0 as Nl,a1 as Ll,a2 as Ge,a3 as Tt,a4 as Ml,a5 as rn,a6 as Ne,a7 as En,a8 as Fo,a9 as Rl,aa as ci,ab as Dl,ac as M,ad as J,ae as jl,af as ve,_ as Ul,ag as se,ah as Tn,ai as tr,aj as j,ak as xe,al as $l,am as Fl,an as ae,ao as Go,ap as ha,aq as Gl,ar as ui,as as Hl,at as zl,au as Ho,av as ql,aw as fs,ax as Pt,ay as He,az as xr,aA as ma,aB as zo,aC as Er,aD as nr,aE as ya,aF as Wl,aG as On,aH as kr,aI as di,aJ as Vl,aK as ye,aL as qo,aM as ba,aN as Wo,aO as li,aP as nt,aQ as Vo,aR as Kl,aS as qt,aT as fi,aU as pi,aV as Zl,aW as Ko,aX as hi,aY as mi,aZ as Yl,a_ as Jl,a$ as yi,b0 as Sr,b1 as Ql,b2 as Xl,b3 as rr,b4 as ef,b5 as Ot,b6 as Zo,b7 as pe,b8 as sr,b9 as tf,ba as Yo,bb as Jo,bc as Qo,bd as nf,be as rf,bf as Le,bg as Xo,bh as ec,bi as sf,bj as af,bk as of,bl as cf,bm as ps,bn as uf,bo as ga,bp as tc,bq as df,br as hs,bs as nc,bt as wa,bu as lf,bv as ff,bw as pf,bx as rc,by as hf,bz as mf,bA as yf,bB as bf,bC as gf,bD as va,bE as wf,bF as xa,bG as vf,a as xf}from"./index-ch5fmFOv.js";import{i as sn,l as bi,d as sc}from"./localBatchGatewayRequest-o8j0FHDn.js";import{c as Ef,g as kf,d as Sf,s as Af}from"./index-nibyPLVP.js";const ic={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function gi(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?we(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?we(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?ic[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=If(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}function If(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function ac(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:gi(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}function qe(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const oc={"0x0":"reverted","0x1":"success"};function wi(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>qe(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?we(e.transactionIndex):null,status:e.status?oc[e.status]:null,type:e.type?ic[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}function Pf(e,t="hex"){const n=cc(e),r=Lo(new Uint8Array(n.length));return n.encode(r),t==="hex"?ze(r.bytes):r.bytes}function cc(e){return Array.isArray(e)?_f(e.map(t=>cc(t))):Tf(e)}function _f(e){const t=e.reduce((s,i)=>s+i.length,0),n=uc(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:i}of e)i(s)}}}function Tf(e){const t=typeof e=="string"?Be(e):e,n=uc(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function uc(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new R("Length is too large.")}function dc(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(i=>Be(i)):e.blobs,s=[];for(const i of r)s.push(Uint8Array.from(t.blobToKzgCommitment(i)));return n==="bytes"?s:s.map(i=>ze(i))}function lc(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(a=>Be(a)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(a=>Be(a)):e.commitments,i=[];for(let a=0;a<r.length;a++){const o=r[a],c=s[a];i.push(Uint8Array.from(t.computeBlobKzgProof(o,c)))}return n==="bytes"?i:i.map(a=>ze(a))}function Of(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),i=BigInt(4294967295),a=Number(n>>s&i),o=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,a,r),e.setUint32(t+u,o,r)}function Cf(e,t,n){return e&t^~e&n}function Bf(e,t,n){return e&t^e&n^t&n}let fc=class extends Mo{constructor(t,n,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(t),this.view=zr(this.buffer)}update(t){er(this),t=Ro(t),Do(t);const{view:n,buffer:r,blockLen:s}=this,i=t.length;for(let a=0;a<i;){const o=Math.min(s-this.pos,i-a);if(o===s){const c=zr(t);for(;s<=i-a;a+=s)this.process(c,a);continue}r.set(t.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){er(this),yl(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:i}=this;let{pos:a}=this;n[a++]=128,Jt(this.buffer.subarray(a)),this.padOffset>s-a&&(this.process(r,0),a=0);for(let l=a;l<s;l++)n[l]=0;Of(r,s-8,BigInt(this.length*8),i),this.process(r,0);const o=zr(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<u;l++)o.setUint32(4*l,d[l],i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:s,finished:i,destroyed:a,pos:o}=this;return t.destroyed=a,t.finished=i,t.length=s,t.pos=o,s%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}};const it=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ce=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),ue=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Nf=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),at=new Uint32Array(64);let Lf=class extends fc{constructor(t=32){super(64,t,8,!1),this.A=it[0]|0,this.B=it[1]|0,this.C=it[2]|0,this.D=it[3]|0,this.E=it[4]|0,this.F=it[5]|0,this.G=it[6]|0,this.H=it[7]|0}get(){const{A:t,B:n,C:r,D:s,E:i,F:a,G:o,H:c}=this;return[t,n,r,s,i,a,o,c]}set(t,n,r,s,i,a,o,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=c|0}process(t,n){for(let l=0;l<16;l++,n+=4)at[l]=t.getUint32(n,!1);for(let l=16;l<64;l++){const f=at[l-15],p=at[l-2],m=Me(f,7)^Me(f,18)^f>>>3,h=Me(p,17)^Me(p,19)^p>>>10;at[l]=h+at[l-7]+m+at[l-16]|0}let{A:r,B:s,C:i,D:a,E:o,F:c,G:u,H:d}=this;for(let l=0;l<64;l++){const f=Me(o,6)^Me(o,11)^Me(o,25),p=d+f+Cf(o,c,u)+Nf[l]+at[l]|0,h=(Me(r,2)^Me(r,13)^Me(r,22))+Bf(r,s,i)|0;d=u,u=c,c=o,o=a+p|0,a=i,i=s,s=r,r=p+h|0}r=r+this.A|0,s=s+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,c=c+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(r,s,i,a,o,c,u,d)}roundClean(){Jt(at)}destroy(){this.set(0,0,0,0,0,0,0,0),Jt(this.buffer)}};const pc=El(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Mf=pc[0],Rf=pc[1],ot=new Uint32Array(80),ct=new Uint32Array(80);class hc extends fc{constructor(t=64){super(128,t,16,!1),this.Ah=ue[0]|0,this.Al=ue[1]|0,this.Bh=ue[2]|0,this.Bl=ue[3]|0,this.Ch=ue[4]|0,this.Cl=ue[5]|0,this.Dh=ue[6]|0,this.Dl=ue[7]|0,this.Eh=ue[8]|0,this.El=ue[9]|0,this.Fh=ue[10]|0,this.Fl=ue[11]|0,this.Gh=ue[12]|0,this.Gl=ue[13]|0,this.Hh=ue[14]|0,this.Hl=ue[15]|0}get(){const{Ah:t,Al:n,Bh:r,Bl:s,Ch:i,Cl:a,Dh:o,Dl:c,Eh:u,El:d,Fh:l,Fl:f,Gh:p,Gl:m,Hh:h,Hl:b}=this;return[t,n,r,s,i,a,o,c,u,d,l,f,p,m,h,b]}set(t,n,r,s,i,a,o,c,u,d,l,f,p,m,h,b){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=s|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=c|0,this.Eh=u|0,this.El=d|0,this.Fh=l|0,this.Fl=f|0,this.Gh=p|0,this.Gl=m|0,this.Hh=h|0,this.Hl=b|0}process(t,n){for(let g=0;g<16;g++,n+=4)ot[g]=t.getUint32(n),ct[g]=t.getUint32(n+=4);for(let g=16;g<80;g++){const y=ot[g-15]|0,k=ct[g-15]|0,T=Dt(y,k,1)^Dt(y,k,8)^ca(y,k,7),x=jt(y,k,1)^jt(y,k,8)^ua(y,k,7),A=ot[g-2]|0,_=ct[g-2]|0,D=Dt(A,_,19)^jn(A,_,61)^ca(A,_,6),O=jt(A,_,19)^Un(A,_,61)^ua(A,_,6),v=bl(x,O,ct[g-7],ct[g-16]),I=gl(v,T,D,ot[g-7],ot[g-16]);ot[g]=I|0,ct[g]=v|0}let{Ah:r,Al:s,Bh:i,Bl:a,Ch:o,Cl:c,Dh:u,Dl:d,Eh:l,El:f,Fh:p,Fl:m,Gh:h,Gl:b,Hh:w,Hl:S}=this;for(let g=0;g<80;g++){const y=Dt(l,f,14)^Dt(l,f,18)^jn(l,f,41),k=jt(l,f,14)^jt(l,f,18)^Un(l,f,41),T=l&p^~l&h,x=f&m^~f&b,A=wl(S,k,x,Rf[g],ct[g]),_=vl(A,w,y,T,Mf[g],ot[g]),D=A|0,O=Dt(r,s,28)^jn(r,s,34)^jn(r,s,39),v=jt(r,s,28)^Un(r,s,34)^Un(r,s,39),I=r&i^r&o^i&o,$=s&a^s&c^a&c;w=h|0,S=b|0,h=p|0,b=m|0,p=l|0,m=f|0,{h:l,l:f}=Ve(u|0,d|0,_|0,D|0),u=o|0,d=c|0,o=i|0,c=a|0,i=r|0,a=s|0;const E=kl(D,v,$);r=xl(E,_,O,I),s=E|0}({h:r,l:s}=Ve(this.Ah|0,this.Al|0,r|0,s|0)),{h:i,l:a}=Ve(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:c}=Ve(this.Ch|0,this.Cl|0,o|0,c|0),{h:u,l:d}=Ve(this.Dh|0,this.Dl|0,u|0,d|0),{h:l,l:f}=Ve(this.Eh|0,this.El|0,l|0,f|0),{h:p,l:m}=Ve(this.Fh|0,this.Fl|0,p|0,m|0),{h,l:b}=Ve(this.Gh|0,this.Gl|0,h|0,b|0),{h:w,l:S}=Ve(this.Hh|0,this.Hl|0,w|0,S|0),this.set(r,s,i,a,o,c,u,d,l,f,p,m,h,b,w,S)}roundClean(){Jt(ot,ct)}destroy(){Jt(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class Df extends hc{constructor(){super(48),this.Ah=ce[0]|0,this.Al=ce[1]|0,this.Bh=ce[2]|0,this.Bl=ce[3]|0,this.Ch=ce[4]|0,this.Cl=ce[5]|0,this.Dh=ce[6]|0,this.Dl=ce[7]|0,this.Eh=ce[8]|0,this.El=ce[9]|0,this.Fh=ce[10]|0,this.Fl=ce[11]|0,this.Gh=ce[12]|0,this.Gl=ce[13]|0,this.Hh=ce[14]|0,this.Hl=ce[15]|0}}const vi=oi(()=>new Lf),jf=oi(()=>new hc),Uf=oi(()=>new Df),$f=vi;function Ff(e,t){return $f(Te(e,{strict:!1})?vr(e):e)}function Gf(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),s=Ff(t);return s.set([n],0),r==="bytes"?s:ze(s)}function Hf(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const i of t)s.push(Gf({commitment:i,to:r,version:n}));return s}const Ea=6,mc=32,xi=4096,yc=mc*xi,ka=yc*Ea-1-1*xi*Ea;class zf extends R{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class qf extends R{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}function Wf(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Be(e.data):e.data,r=yt(n);if(!r)throw new qf;if(r>ka)throw new zf({maxSize:ka,size:r});const s=[];let i=!0,a=0;for(;i;){const o=Lo(new Uint8Array(yc));let c=0;for(;c<xi;){const u=n.slice(a,a+(mc-1));if(o.pushByte(0),o.pushBytes(u),u.length<31){o.pushByte(128),i=!1;break}c++,a+=31}s.push(o)}return t==="bytes"?s.map(o=>o.bytes):s.map(o=>ze(o.bytes))}function Vf(e){const{data:t,kzg:n,to:r}=e,s=e.blobs??Wf({data:t,to:r}),i=e.commitments??dc({blobs:s,kzg:n,to:r}),a=e.proofs??lc({blobs:s,commitments:i,kzg:n,to:r}),o=[];for(let c=0;c<s.length;c++)o.push({blob:s[c],commitment:i[c],proof:a[c]});return o}function Kf(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new Sl({transaction:e})}class Ar extends R{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
1
|
+
import{B as ls,_ as Z,h as oa,y as ml}from"./hooks.module-Dz_XB4AG.js";import{j as we,k as Lo,l as ze,m as Be,B as R,H as Mo,n as zr,o as er,t as Ro,p as Do,q as yl,r as Jt,s as oi,u as bl,v as gl,w as wl,x as vl,y as Ve,z as Me,A as Dt,C as ca,D as jt,E as ua,F as jn,G as Un,I as xl,J as El,K as kl,L as Te,M as vr,N as yt,O as Sl,P as da,Q as jo,R as Uo,S as Al,T as la,U as fa,V as pa,W as Il,X as Pl,Y as Qt,Z as K,$ as bt,a0 as _l,a1 as $o,a2 as Tl,a3 as Ol,a4 as Cl,a5 as Bl,a6 as Nl,a7 as Ll,a8 as Ge,a9 as Tt,aa as Ml,ab as rn,ac as Ne,ad as En,ae as Fo,af as Rl,ag as ci,ah as Dl,ai as M,aj as J,ak as jl,al as ve,g as Ul,am as se,an as Tn,ao as tr,ap as j,aq as xe,ar as $l,as as Fl,at as ae,au as Go,av as ha,aw as Gl,ax as ui,ay as Hl,az as zl,aA as Ho,aB as ql,aC as fs,aD as Pt,aE as He,aF as xr,aG as ma,aH as zo,aI as Er,aJ as nr,aK as ya,aL as Wl,aM as On,aN as kr,aO as di,aP as Vl,aQ as ye,aR as qo,aS as ba,aT as Wo,aU as li,aV as nt,aW as Vo,aX as Kl,aY as qt,aZ as fi,a_ as pi,a$ as Zl,b0 as Ko,b1 as hi,b2 as mi,b3 as Yl,b4 as Jl,b5 as yi,b6 as Sr,b7 as Ql,b8 as Xl,b9 as rr,ba as ef,bb as Ot,bc as Zo,bd as pe,be as sr,bf as tf,bg as Yo,bh as Jo,bi as Qo,bj as nf,bk as rf,bl as Le,bm as Xo,bn as ec,bo as sf,bp as af,bq as of,br as cf,bs as ps,bt as uf,bu as ga,bv as tc,bw as df,bx as hs,by as nc,bz as wa,bA as lf,bB as ff,bC as pf,bD as rc,bE as hf,bF as mf,bG as yf,bH as bf,bI as gf,bJ as va,bK as wf,bL as xa,bM as vf,i as xf}from"./index-m9AvnFPE.js";import{i as sn,l as bi,d as sc}from"./localBatchGatewayRequest-D3hqEo4H.js";import{c as Ef,g as kf,d as Sf,s as Af}from"./index-nibyPLVP.js";const ic={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function gi(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?we(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?we(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?ic[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=If(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}function If(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function ac(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:gi(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}function qe(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const oc={"0x0":"reverted","0x1":"success"};function wi(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>qe(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?we(e.transactionIndex):null,status:e.status?oc[e.status]:null,type:e.type?ic[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}function Pf(e,t="hex"){const n=cc(e),r=Lo(new Uint8Array(n.length));return n.encode(r),t==="hex"?ze(r.bytes):r.bytes}function cc(e){return Array.isArray(e)?_f(e.map(t=>cc(t))):Tf(e)}function _f(e){const t=e.reduce((s,i)=>s+i.length,0),n=uc(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:i}of e)i(s)}}}function Tf(e){const t=typeof e=="string"?Be(e):e,n=uc(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function uc(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new R("Length is too large.")}function dc(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(i=>Be(i)):e.blobs,s=[];for(const i of r)s.push(Uint8Array.from(t.blobToKzgCommitment(i)));return n==="bytes"?s:s.map(i=>ze(i))}function lc(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(a=>Be(a)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(a=>Be(a)):e.commitments,i=[];for(let a=0;a<r.length;a++){const o=r[a],c=s[a];i.push(Uint8Array.from(t.computeBlobKzgProof(o,c)))}return n==="bytes"?i:i.map(a=>ze(a))}function Of(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),i=BigInt(4294967295),a=Number(n>>s&i),o=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,a,r),e.setUint32(t+u,o,r)}function Cf(e,t,n){return e&t^~e&n}function Bf(e,t,n){return e&t^e&n^t&n}let fc=class extends Mo{constructor(t,n,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(t),this.view=zr(this.buffer)}update(t){er(this),t=Ro(t),Do(t);const{view:n,buffer:r,blockLen:s}=this,i=t.length;for(let a=0;a<i;){const o=Math.min(s-this.pos,i-a);if(o===s){const c=zr(t);for(;s<=i-a;a+=s)this.process(c,a);continue}r.set(t.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){er(this),yl(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:i}=this;let{pos:a}=this;n[a++]=128,Jt(this.buffer.subarray(a)),this.padOffset>s-a&&(this.process(r,0),a=0);for(let l=a;l<s;l++)n[l]=0;Of(r,s-8,BigInt(this.length*8),i),this.process(r,0);const o=zr(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<u;l++)o.setUint32(4*l,d[l],i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:s,finished:i,destroyed:a,pos:o}=this;return t.destroyed=a,t.finished=i,t.length=s,t.pos=o,s%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}};const it=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ce=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),ue=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Nf=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),at=new Uint32Array(64);let Lf=class extends fc{constructor(t=32){super(64,t,8,!1),this.A=it[0]|0,this.B=it[1]|0,this.C=it[2]|0,this.D=it[3]|0,this.E=it[4]|0,this.F=it[5]|0,this.G=it[6]|0,this.H=it[7]|0}get(){const{A:t,B:n,C:r,D:s,E:i,F:a,G:o,H:c}=this;return[t,n,r,s,i,a,o,c]}set(t,n,r,s,i,a,o,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=c|0}process(t,n){for(let l=0;l<16;l++,n+=4)at[l]=t.getUint32(n,!1);for(let l=16;l<64;l++){const f=at[l-15],p=at[l-2],m=Me(f,7)^Me(f,18)^f>>>3,h=Me(p,17)^Me(p,19)^p>>>10;at[l]=h+at[l-7]+m+at[l-16]|0}let{A:r,B:s,C:i,D:a,E:o,F:c,G:u,H:d}=this;for(let l=0;l<64;l++){const f=Me(o,6)^Me(o,11)^Me(o,25),p=d+f+Cf(o,c,u)+Nf[l]+at[l]|0,h=(Me(r,2)^Me(r,13)^Me(r,22))+Bf(r,s,i)|0;d=u,u=c,c=o,o=a+p|0,a=i,i=s,s=r,r=p+h|0}r=r+this.A|0,s=s+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,c=c+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(r,s,i,a,o,c,u,d)}roundClean(){Jt(at)}destroy(){this.set(0,0,0,0,0,0,0,0),Jt(this.buffer)}};const pc=El(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Mf=pc[0],Rf=pc[1],ot=new Uint32Array(80),ct=new Uint32Array(80);class hc extends fc{constructor(t=64){super(128,t,16,!1),this.Ah=ue[0]|0,this.Al=ue[1]|0,this.Bh=ue[2]|0,this.Bl=ue[3]|0,this.Ch=ue[4]|0,this.Cl=ue[5]|0,this.Dh=ue[6]|0,this.Dl=ue[7]|0,this.Eh=ue[8]|0,this.El=ue[9]|0,this.Fh=ue[10]|0,this.Fl=ue[11]|0,this.Gh=ue[12]|0,this.Gl=ue[13]|0,this.Hh=ue[14]|0,this.Hl=ue[15]|0}get(){const{Ah:t,Al:n,Bh:r,Bl:s,Ch:i,Cl:a,Dh:o,Dl:c,Eh:u,El:d,Fh:l,Fl:f,Gh:p,Gl:m,Hh:h,Hl:b}=this;return[t,n,r,s,i,a,o,c,u,d,l,f,p,m,h,b]}set(t,n,r,s,i,a,o,c,u,d,l,f,p,m,h,b){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=s|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=c|0,this.Eh=u|0,this.El=d|0,this.Fh=l|0,this.Fl=f|0,this.Gh=p|0,this.Gl=m|0,this.Hh=h|0,this.Hl=b|0}process(t,n){for(let g=0;g<16;g++,n+=4)ot[g]=t.getUint32(n),ct[g]=t.getUint32(n+=4);for(let g=16;g<80;g++){const y=ot[g-15]|0,k=ct[g-15]|0,T=Dt(y,k,1)^Dt(y,k,8)^ca(y,k,7),x=jt(y,k,1)^jt(y,k,8)^ua(y,k,7),A=ot[g-2]|0,_=ct[g-2]|0,D=Dt(A,_,19)^jn(A,_,61)^ca(A,_,6),O=jt(A,_,19)^Un(A,_,61)^ua(A,_,6),v=bl(x,O,ct[g-7],ct[g-16]),I=gl(v,T,D,ot[g-7],ot[g-16]);ot[g]=I|0,ct[g]=v|0}let{Ah:r,Al:s,Bh:i,Bl:a,Ch:o,Cl:c,Dh:u,Dl:d,Eh:l,El:f,Fh:p,Fl:m,Gh:h,Gl:b,Hh:w,Hl:S}=this;for(let g=0;g<80;g++){const y=Dt(l,f,14)^Dt(l,f,18)^jn(l,f,41),k=jt(l,f,14)^jt(l,f,18)^Un(l,f,41),T=l&p^~l&h,x=f&m^~f&b,A=wl(S,k,x,Rf[g],ct[g]),_=vl(A,w,y,T,Mf[g],ot[g]),D=A|0,O=Dt(r,s,28)^jn(r,s,34)^jn(r,s,39),v=jt(r,s,28)^Un(r,s,34)^Un(r,s,39),I=r&i^r&o^i&o,$=s&a^s&c^a&c;w=h|0,S=b|0,h=p|0,b=m|0,p=l|0,m=f|0,{h:l,l:f}=Ve(u|0,d|0,_|0,D|0),u=o|0,d=c|0,o=i|0,c=a|0,i=r|0,a=s|0;const E=kl(D,v,$);r=xl(E,_,O,I),s=E|0}({h:r,l:s}=Ve(this.Ah|0,this.Al|0,r|0,s|0)),{h:i,l:a}=Ve(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:c}=Ve(this.Ch|0,this.Cl|0,o|0,c|0),{h:u,l:d}=Ve(this.Dh|0,this.Dl|0,u|0,d|0),{h:l,l:f}=Ve(this.Eh|0,this.El|0,l|0,f|0),{h:p,l:m}=Ve(this.Fh|0,this.Fl|0,p|0,m|0),{h,l:b}=Ve(this.Gh|0,this.Gl|0,h|0,b|0),{h:w,l:S}=Ve(this.Hh|0,this.Hl|0,w|0,S|0),this.set(r,s,i,a,o,c,u,d,l,f,p,m,h,b,w,S)}roundClean(){Jt(ot,ct)}destroy(){Jt(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class Df extends hc{constructor(){super(48),this.Ah=ce[0]|0,this.Al=ce[1]|0,this.Bh=ce[2]|0,this.Bl=ce[3]|0,this.Ch=ce[4]|0,this.Cl=ce[5]|0,this.Dh=ce[6]|0,this.Dl=ce[7]|0,this.Eh=ce[8]|0,this.El=ce[9]|0,this.Fh=ce[10]|0,this.Fl=ce[11]|0,this.Gh=ce[12]|0,this.Gl=ce[13]|0,this.Hh=ce[14]|0,this.Hl=ce[15]|0}}const vi=oi(()=>new Lf),jf=oi(()=>new hc),Uf=oi(()=>new Df),$f=vi;function Ff(e,t){return $f(Te(e,{strict:!1})?vr(e):e)}function Gf(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),s=Ff(t);return s.set([n],0),r==="bytes"?s:ze(s)}function Hf(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const i of t)s.push(Gf({commitment:i,to:r,version:n}));return s}const Ea=6,mc=32,xi=4096,yc=mc*xi,ka=yc*Ea-1-1*xi*Ea;class zf extends R{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class qf extends R{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}function Wf(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Be(e.data):e.data,r=yt(n);if(!r)throw new qf;if(r>ka)throw new zf({maxSize:ka,size:r});const s=[];let i=!0,a=0;for(;i;){const o=Lo(new Uint8Array(yc));let c=0;for(;c<xi;){const u=n.slice(a,a+(mc-1));if(o.pushByte(0),o.pushBytes(u),u.length<31){o.pushByte(128),i=!1;break}c++,a+=31}s.push(o)}return t==="bytes"?s.map(o=>o.bytes):s.map(o=>ze(o.bytes))}function Vf(e){const{data:t,kzg:n,to:r}=e,s=e.blobs??Wf({data:t,to:r}),i=e.commitments??dc({blobs:s,kzg:n,to:r}),a=e.proofs??lc({blobs:s,commitments:i,kzg:n,to:r}),o=[];for(let c=0;c<s.length;c++)o.push({blob:s[c],commitment:i[c],proof:a[c]});return o}function Kf(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new Sl({transaction:e})}class Ar extends R{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
2
2
|
`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}function Sa(e){let t;if(typeof e=="string")t=da(e);else{const n=jo(e),r=e.length;for(let s=0;s<r;s++){const i=e[s];if(!Uo(i)){t=da(i,n);break}}}if(!t)throw new Al({signature:e});return t}function Aa(e){const t=[];if(typeof e=="string"){const n=la(e),r=n.length;for(let s=0;s<r;s++)t.push(fa(n[s],{modifiers:pa}))}else{const n=jo(e),r=e.length;for(let s=0;s<r;s++){const i=e[s];if(Uo(i))continue;const a=la(i),o=a.length;for(let c=0;c<o;c++)t.push(fa(a[c],{modifiers:pa,structs:n}))}}if(t.length===0)throw new Il({params:e});return t}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ei=BigInt(0),ms=BigInt(1);function Cn(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ki(e){if(!Cn(e))throw new Error("Uint8Array expected")}function kn(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function $n(e){const t=e.toString(16);return t.length&1?"0"+t:t}function bc(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Ei:BigInt("0x"+e)}const gc=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Zf=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Sn(e){if(ki(e),gc)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=Zf[e[n]];return t}const Ke={_0:48,_9:57,A:65,F:70,a:97,f:102};function Ia(e){if(e>=Ke._0&&e<=Ke._9)return e-Ke._0;if(e>=Ke.A&&e<=Ke.F)return e-(Ke.A-10);if(e>=Ke.a&&e<=Ke.f)return e-(Ke.a-10)}function ir(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(gc)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let s=0,i=0;s<n;s++,i+=2){const a=Ia(e.charCodeAt(i)),o=Ia(e.charCodeAt(i+1));if(a===void 0||o===void 0){const c=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}r[s]=a*16+o}return r}function _t(e){return bc(Sn(e))}function wc(e){return ki(e),bc(Sn(Uint8Array.from(e).reverse()))}function Bn(e,t){return ir(e.toString(16).padStart(t*2,"0"))}function vc(e,t){return Bn(e,t).reverse()}function Se(e,t,n){let r;if(typeof t=="string")try{r=ir(t)}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else if(Cn(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const s=r.length;if(typeof n=="number"&&s!==n)throw new Error(e+" of length "+n+" expected, got "+s);return r}function ar(...e){let t=0;for(let r=0;r<e.length;r++){const s=e[r];ki(s),t+=s.length}const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const i=e[r];n.set(i,s),s+=i.length}return n}const qr=e=>typeof e=="bigint"&&Ei<=e;function Si(e,t,n){return qr(e)&&qr(t)&&qr(n)&&t<=e&&e<n}function Wt(e,t,n,r){if(!Si(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function Yf(e){let t;for(t=0;e>Ei;e>>=ms,t+=1);return t}const Ir=e=>(ms<<BigInt(e))-ms,Wr=e=>new Uint8Array(e),Pa=e=>Uint8Array.from(e);function Jf(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=Wr(e),s=Wr(e),i=0;const a=()=>{r.fill(1),s.fill(0),i=0},o=(...l)=>n(s,r,...l),c=(l=Wr(0))=>{s=o(Pa([0]),l),r=o(),l.length!==0&&(s=o(Pa([1]),l),r=o())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let l=0;const f=[];for(;l<t;){r=o();const p=r.slice();f.push(p),l+=r.length}return ar(...f)};return(l,f)=>{a(),c(l);let p;for(;!(p=f(u()));)c();return a(),p}}const Qf={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Cn(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function Pr(e,t,n={}){const r=(s,i,a)=>{const o=Qf[i];if(typeof o!="function")throw new Error("invalid validator function");const c=e[s];if(!(a&&c===void 0)&&!o(c,e))throw new Error("param "+String(s)+" is invalid. Expected "+i+", got "+c)};for(const[s,i]of Object.entries(t))r(s,i,!1);for(const[s,i]of Object.entries(n))r(s,i,!0);return e}function _a(e){const t=new WeakMap;return(n,...r)=>{const s=t.get(n);if(s!==void 0)return s;const i=e(n,...r);return t.set(n,i),i}}function Nn(e,t){if(Gt(e)>t)throw new fp({givenSize:Gt(e),maxSize:t})}const Ze={zero:48,nine:57,A:65,F:70,a:97,f:102};function Ta(e){if(e>=Ze.zero&&e<=Ze.nine)return e-Ze.zero;if(e>=Ze.A&&e<=Ze.F)return e-(Ze.A-10);if(e>=Ze.a&&e<=Ze.f)return e-(Ze.a-10)}function Xf(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new pp({size:e.length,targetSize:r,type:"Bytes"});const s=new Uint8Array(r);for(let i=0;i<r;i++){const a=n==="right";s[a?i:r-i-1]=e[a?i:e.length-i-1]}return s}function xc(e,t={}){const{dir:n="left"}=t;let r=e,s=0;for(let i=0;i<r.length-1&&r[n==="left"?i:r.length-i-1].toString()==="0";i++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r}const ep=new TextDecoder,tp=new TextEncoder;function np(e){return e instanceof Uint8Array?e:typeof e=="string"?Ec(e):rp(e)}function rp(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function Ec(e,t={}){const{size:n}=t;let r=e;n&&(Pl(e,n),r=Qt(e,n));let s=r.slice(2);s.length%2&&(s=`0${s}`);const i=s.length/2,a=new Uint8Array(i);for(let o=0,c=0;o<i;o++){const u=Ta(s.charCodeAt(c++)),d=Ta(s.charCodeAt(c++));if(u===void 0||d===void 0)throw new K(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);a[o]=u<<4|d}return a}function sp(e,t={}){const{size:n}=t,r=tp.encode(e);return typeof n=="number"?(Nn(r,n),ip(r,n)):r}function ip(e,t){return Xf(e,{dir:"right",size:t})}function Gt(e){return e.length}function ap(e,t,n,r={}){return e.slice(t,n)}function op(e,t={}){const{size:n}=t;typeof n<"u"&&Nn(e,n);const r=bt(e,t);return _l(r,t)}function cp(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(Nn(r,n),r=kc(r)),r.length>1||r[0]>1)throw new lp(r);return!!r[0]}function rt(e,t={}){const{size:n}=t;typeof n<"u"&&Nn(e,n);const r=bt(e,t);return $o(r,t)}function up(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(Nn(r,n),r=dp(r)),ep.decode(r)}function kc(e){return xc(e,{dir:"left"})}function dp(e){return xc(e,{dir:"right"})}class lp extends K{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}let fp=class extends K{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},pp=class extends K{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};function Sc(e,t={}){const{as:n=typeof e=="string"?"Hex":"Bytes"}=t,r=Tl(np(e));return n==="Bytes"?r:bt(r)}const hp={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new bp({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new yp({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Oa({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Oa({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function mp(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(hp);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}class Oa extends K{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class yp extends K{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class bp extends K{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}class gp extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const wp={checksum:new gp(8192)},Vr=wp.checksum,vp=/^0x[a-fA-F0-9]{40}$/;function _r(e,t={}){const{strict:n=!0}=t;if(!vp.test(e))throw new Ca({address:e,cause:new xp});if(n){if(e.toLowerCase()===e)return;if(Ac(e)!==e)throw new Ca({address:e,cause:new Ep})}}function Ac(e){if(Vr.has(e))return Vr.get(e);_r(e,{strict:!1});const t=e.substring(2).toLowerCase(),n=Sc(sp(t),{as:"Bytes"}),r=t.split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&r[i]&&(r[i]=r[i].toUpperCase()),(n[i>>1]&15)>=8&&r[i+1]&&(r[i+1]=r[i+1].toUpperCase());const s=`0x${r.join("")}`;return Vr.set(e,s),s}function ys(e,t={}){const{strict:n=!0}=t??{};try{return _r(e,{strict:n}),!0}catch{return!1}}class Ca extends K{constructor({address:t,cause:n}){super(`Address "${t}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class xp extends K{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class Ep extends K{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const me=BigInt(0),le=BigInt(1),At=BigInt(2),kp=BigInt(3),Ic=BigInt(4),Pc=BigInt(5),_c=BigInt(8);function he(e,t){const n=e%t;return n>=me?n:t+n}function Ee(e,t,n){let r=e;for(;t-- >me;)r*=r,r%=n;return r}function bs(e,t){if(e===me)throw new Error("invert: expected non-zero number");if(t<=me)throw new Error("invert: expected positive modulus, got "+t);let n=he(e,t),r=t,s=me,i=le;for(;n!==me;){const o=r/n,c=r%n,u=s-i*o;r=n,n=c,s=i,i=u}if(r!==le)throw new Error("invert: does not exist");return he(s,t)}function Tc(e,t){const n=(e.ORDER+le)/Ic,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw new Error("Cannot find square root");return r}function Sp(e,t){const n=(e.ORDER-Pc)/_c,r=e.mul(t,At),s=e.pow(r,n),i=e.mul(t,s),a=e.mul(e.mul(i,At),s),o=e.mul(i,e.sub(a,e.ONE));if(!e.eql(e.sqr(o),t))throw new Error("Cannot find square root");return o}function Ap(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-le,n=0;for(;t%At===me;)t/=At,n++;let r=At;const s=an(e);for(;Ba(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Tc;let i=s.pow(r,t);const a=(t+le)/At;return function(c,u){if(c.is0(u))return u;if(Ba(c,u)!==1)throw new Error("Cannot find square root");let d=n,l=c.mul(c.ONE,i),f=c.pow(u,t),p=c.pow(u,a);for(;!c.eql(f,c.ONE);){if(c.is0(f))return c.ZERO;let m=1,h=c.sqr(f);for(;!c.eql(h,c.ONE);)if(m++,h=c.sqr(h),m===d)throw new Error("Cannot find square root");const b=le<<BigInt(d-m-1),w=c.pow(l,b);d=m,l=c.sqr(w),f=c.mul(f,l),p=c.mul(p,w)}return p}}function Ip(e){return e%Ic===kp?Tc:e%_c===Pc?Sp:Ap(e)}const Pp=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function _p(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=Pp.reduce((r,s)=>(r[s]="function",r),t);return Pr(e,n)}function Tp(e,t,n){if(n<me)throw new Error("invalid exponent, negatives unsupported");if(n===me)return e.ONE;if(n===le)return t;let r=e.ONE,s=t;for(;n>me;)n&le&&(r=e.mul(r,s)),s=e.sqr(s),n>>=le;return r}function Oc(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),s=t.reduce((a,o,c)=>e.is0(o)?a:(r[c]=a,e.mul(a,o)),e.ONE),i=e.inv(s);return t.reduceRight((a,o,c)=>e.is0(o)?a:(r[c]=e.mul(a,r[c]),e.mul(a,o)),i),r}function Ba(e,t){const n=(e.ORDER-le)/At,r=e.pow(t,n),s=e.eql(r,e.ONE),i=e.eql(r,e.ZERO),a=e.eql(r,e.neg(e.ONE));if(!s&&!i&&!a)throw new Error("invalid Legendre symbol result");return s?1:i?0:-1}function Cc(e,t){t!==void 0&&Ol(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function an(e,t,n=!1,r={}){if(e<=me)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:s,nByteLength:i}=Cc(e,t);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let a;const o=Object.freeze({ORDER:e,isLE:n,BITS:s,BYTES:i,MASK:Ir(s),ZERO:me,ONE:le,create:c=>he(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return me<=c&&c<e},is0:c=>c===me,isOdd:c=>(c&le)===le,neg:c=>he(-c,e),eql:(c,u)=>c===u,sqr:c=>he(c*c,e),add:(c,u)=>he(c+u,e),sub:(c,u)=>he(c-u,e),mul:(c,u)=>he(c*u,e),pow:(c,u)=>Tp(o,c,u),div:(c,u)=>he(c*bs(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>bs(c,e),sqrt:r.sqrt||(c=>(a||(a=Ip(e)),a(o,c))),toBytes:c=>n?vc(c,i):Bn(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return n?wc(c):_t(c)},invertBatch:c=>Oc(o,c),cmov:(c,u,d)=>d?u:c});return Object.freeze(o)}function Bc(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Nc(e){const t=Bc(e);return t+Math.ceil(t/2)}function Op(e,t,n=!1){const r=e.length,s=Bc(t),i=Nc(t);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const a=n?wc(e):_t(e),o=he(a,t-le)+le;return n?vc(o,s):Bn(o,s)}class Lc extends Mo{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Cl(t);const r=Ro(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,i=new Uint8Array(s);i.set(r.length>s?t.create().update(r).digest():r);for(let a=0;a<i.length;a++)i[a]^=54;this.iHash.update(i),this.oHash=t.create();for(let a=0;a<i.length;a++)i[a]^=106;this.oHash.update(i),Jt(i)}update(t){return er(this),this.iHash.update(t),this}digestInto(t){er(this),Do(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:s,destroyed:i,blockLen:a,outputLen:o}=this;return t=t,t.finished=s,t.destroyed=i,t.blockLen=a,t.outputLen=o,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Mc=(e,t,n)=>new Lc(e,t).update(n).digest();Mc.create=(e,t)=>new Lc(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Na=BigInt(0),gs=BigInt(1);function Kr(e,t){const n=t.negate();return e?n:t}function Rc(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Zr(e,t){Rc(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),s=2**e,i=Ir(e),a=BigInt(e);return{windows:n,windowSize:r,mask:i,maxNumber:s,shiftBy:a}}function La(e,t,n){const{windowSize:r,mask:s,maxNumber:i,shiftBy:a}=n;let o=Number(e&s),c=e>>a;o>r&&(o-=i,c+=gs);const u=t*r,d=u+Math.abs(o)-1,l=o===0,f=o<0,p=t%2!==0;return{nextN:c,offset:d,isZero:l,isNeg:f,isNegF:p,offsetF:u}}function Cp(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function Bp(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,r)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+r)})}const Yr=new WeakMap,Dc=new WeakMap;function Jr(e){return Dc.get(e)||1}function Np(e,t){return{constTimeNegate:Kr,hasPrecomputes(n){return Jr(n)!==1},unsafeLadder(n,r,s=e.ZERO){let i=n;for(;r>Na;)r&gs&&(s=s.add(i)),i=i.double(),r>>=gs;return s},precomputeWindow(n,r){const{windows:s,windowSize:i}=Zr(r,t),a=[];let o=n,c=o;for(let u=0;u<s;u++){c=o,a.push(c);for(let d=1;d<i;d++)c=c.add(o),a.push(c);o=c.double()}return a},wNAF(n,r,s){let i=e.ZERO,a=e.BASE;const o=Zr(n,t);for(let c=0;c<o.windows;c++){const{nextN:u,offset:d,isZero:l,isNeg:f,isNegF:p,offsetF:m}=La(s,c,o);s=u,l?a=a.add(Kr(p,r[m])):i=i.add(Kr(f,r[d]))}return{p:i,f:a}},wNAFUnsafe(n,r,s,i=e.ZERO){const a=Zr(n,t);for(let o=0;o<a.windows&&s!==Na;o++){const{nextN:c,offset:u,isZero:d,isNeg:l}=La(s,o,a);if(s=c,!d){const f=r[u];i=i.add(l?f.negate():f)}}return i},getPrecomputes(n,r,s){let i=Yr.get(r);return i||(i=this.precomputeWindow(r,n),n!==1&&Yr.set(r,s(i))),i},wNAFCached(n,r,s){const i=Jr(n);return this.wNAF(i,this.getPrecomputes(i,n,s),r)},wNAFCachedUnsafe(n,r,s,i){const a=Jr(n);return a===1?this.unsafeLadder(n,r,i):this.wNAFUnsafe(a,this.getPrecomputes(a,n,s),r,i)},setWindowSize(n,r){Rc(r,t),Dc.set(n,r),Yr.delete(n)}}}function Lp(e,t,n,r){Cp(n,e),Bp(r,t);const s=n.length,i=r.length;if(s!==i)throw new Error("arrays of points and scalars must have equal length");const a=e.ZERO,o=Yf(BigInt(s));let c=1;o>12?c=o-3:o>4?c=o-2:o>0&&(c=2);const u=Ir(c),d=new Array(Number(u)+1).fill(a),l=Math.floor((t.BITS-1)/c)*c;let f=a;for(let p=l;p>=0;p-=c){d.fill(a);for(let h=0;h<i;h++){const b=r[h],w=Number(b>>BigInt(p)&u);d[w]=d[w].add(n[h])}let m=a;for(let h=d.length-1,b=a;h>0;h--)b=b.add(d[h]),m=m.add(b);if(f=f.add(m),p!==0)for(let h=0;h<c;h++)f=f.double()}return f}function jc(e){return _p(e.Fp),Pr(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Cc(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ma(e){e.lowS!==void 0&&kn("lowS",e.lowS),e.prehash!==void 0&&kn("prehash",e.prehash)}function Mp(e){const t=jc(e);Pr(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:r,a:s}=t;if(n){if(!r.eql(s,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class Rp extends Error{constructor(t=""){super(t)}}const Qe={Err:Rp,_tlv:{encode:(e,t)=>{const{Err:n}=Qe;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,s=$n(r);if(s.length/2&128)throw new n("tlv.encode: long form length too big");const i=r>127?$n(s.length/2|128):"";return $n(e)+i+s+t},decode(e,t){const{Err:n}=Qe;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const s=t[r++],i=!!(s&128);let a=0;if(!i)a=s;else{const c=s&127;if(!c)throw new n("tlv.decode(long): indefinite length not supported");if(c>4)throw new n("tlv.decode(long): byte length is too big");const u=t.subarray(r,r+c);if(u.length!==c)throw new n("tlv.decode: length bytes not complete");if(u[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const d of u)a=a<<8|d;if(r+=c,a<128)throw new n("tlv.decode(long): not minimal encoding")}const o=t.subarray(r,r+a);if(o.length!==a)throw new n("tlv.decode: wrong value length");return{v:o,l:t.subarray(r+a)}}},_int:{encode(e){const{Err:t}=Qe;if(e<tt)throw new t("integer: negative integers are not allowed");let n=$n(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=Qe;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return _t(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=Qe,s=Se("signature",e),{v:i,l:a}=r.decode(48,s);if(a.length)throw new t("invalid signature: left bytes after parsing");const{v:o,l:c}=r.decode(2,i),{v:u,l:d}=r.decode(2,c);if(d.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(o),s:n.decode(u)}},hexFromSig(e){const{_tlv:t,_int:n}=Qe,r=t.encode(2,n.encode(e.r)),s=t.encode(2,n.encode(e.s)),i=r+s;return t.encode(48,i)}};function Qr(e,t){return Sn(Bn(e,t))}const tt=BigInt(0),ne=BigInt(1);BigInt(2);const Xr=BigInt(3),Dp=BigInt(4);function jp(e){const t=Mp(e),{Fp:n}=t,r=an(t.n,t.nBitLength),s=t.toBytes||((g,y,k)=>{const T=y.toAffine();return ar(Uint8Array.from([4]),n.toBytes(T.x),n.toBytes(T.y))}),i=t.fromBytes||(g=>{const y=g.subarray(1),k=n.fromBytes(y.subarray(0,n.BYTES)),T=n.fromBytes(y.subarray(n.BYTES,2*n.BYTES));return{x:k,y:T}});function a(g){const{a:y,b:k}=t,T=n.sqr(g),x=n.mul(T,g);return n.add(n.add(x,n.mul(g,y)),k)}function o(g,y){const k=n.sqr(y),T=a(g);return n.eql(k,T)}if(!o(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=n.mul(n.pow(t.a,Xr),Dp),u=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(c,u)))throw new Error("bad curve params: a or b");function d(g){return Si(g,ne,t.n)}function l(g){const{allowedPrivateKeyLengths:y,nByteLength:k,wrapPrivateKey:T,n:x}=t;if(y&&typeof g!="bigint"){if(Cn(g)&&(g=Sn(g)),typeof g!="string"||!y.includes(g.length))throw new Error("invalid private key");g=g.padStart(k*2,"0")}let A;try{A=typeof g=="bigint"?g:_t(Se("private key",g,k))}catch{throw new Error("invalid private key, expected hex or "+k+" bytes, got "+typeof g)}return T&&(A=he(A,x)),Wt("private key",A,ne,x),A}function f(g){if(!(g instanceof h))throw new Error("ProjectivePoint expected")}const p=_a((g,y)=>{const{px:k,py:T,pz:x}=g;if(n.eql(x,n.ONE))return{x:k,y:T};const A=g.is0();y==null&&(y=A?n.ONE:n.inv(x));const _=n.mul(k,y),D=n.mul(T,y),O=n.mul(x,y);if(A)return{x:n.ZERO,y:n.ZERO};if(!n.eql(O,n.ONE))throw new Error("invZ was invalid");return{x:_,y:D}}),m=_a(g=>{if(g.is0()){if(t.allowInfinityPoint&&!n.is0(g.py))return;throw new Error("bad point: ZERO")}const{x:y,y:k}=g.toAffine();if(!n.isValid(y)||!n.isValid(k))throw new Error("bad point: x or y not FE");if(!o(y,k))throw new Error("bad point: equation left != right");if(!g.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class h{constructor(y,k,T){if(y==null||!n.isValid(y))throw new Error("x required");if(k==null||!n.isValid(k)||n.is0(k))throw new Error("y required");if(T==null||!n.isValid(T))throw new Error("z required");this.px=y,this.py=k,this.pz=T,Object.freeze(this)}static fromAffine(y){const{x:k,y:T}=y||{};if(!y||!n.isValid(k)||!n.isValid(T))throw new Error("invalid affine point");if(y instanceof h)throw new Error("projective point not allowed");const x=A=>n.eql(A,n.ZERO);return x(k)&&x(T)?h.ZERO:new h(k,T,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(y){const k=Oc(n,y.map(T=>T.pz));return y.map((T,x)=>T.toAffine(k[x])).map(h.fromAffine)}static fromHex(y){const k=h.fromAffine(i(Se("pointHex",y)));return k.assertValidity(),k}static fromPrivateKey(y){return h.BASE.multiply(l(y))}static msm(y,k){return Lp(h,r,y,k)}_setWindowSize(y){S.setWindowSize(this,y)}assertValidity(){m(this)}hasEvenY(){const{y}=this.toAffine();if(n.isOdd)return!n.isOdd(y);throw new Error("Field doesn't support isOdd")}equals(y){f(y);const{px:k,py:T,pz:x}=this,{px:A,py:_,pz:D}=y,O=n.eql(n.mul(k,D),n.mul(A,x)),v=n.eql(n.mul(T,D),n.mul(_,x));return O&&v}negate(){return new h(this.px,n.neg(this.py),this.pz)}double(){const{a:y,b:k}=t,T=n.mul(k,Xr),{px:x,py:A,pz:_}=this;let D=n.ZERO,O=n.ZERO,v=n.ZERO,I=n.mul(x,x),$=n.mul(A,A),E=n.mul(_,_),P=n.mul(x,A);return P=n.add(P,P),v=n.mul(x,_),v=n.add(v,v),D=n.mul(y,v),O=n.mul(T,E),O=n.add(D,O),D=n.sub($,O),O=n.add($,O),O=n.mul(D,O),D=n.mul(P,D),v=n.mul(T,v),E=n.mul(y,E),P=n.sub(I,E),P=n.mul(y,P),P=n.add(P,v),v=n.add(I,I),I=n.add(v,I),I=n.add(I,E),I=n.mul(I,P),O=n.add(O,I),E=n.mul(A,_),E=n.add(E,E),I=n.mul(E,P),D=n.sub(D,I),v=n.mul(E,$),v=n.add(v,v),v=n.add(v,v),new h(D,O,v)}add(y){f(y);const{px:k,py:T,pz:x}=this,{px:A,py:_,pz:D}=y;let O=n.ZERO,v=n.ZERO,I=n.ZERO;const $=t.a,E=n.mul(t.b,Xr);let P=n.mul(k,A),N=n.mul(T,_),B=n.mul(x,D),U=n.add(k,T),F=n.add(A,_);U=n.mul(U,F),F=n.add(P,N),U=n.sub(U,F),F=n.add(k,x);let V=n.add(A,D);return F=n.mul(F,V),V=n.add(P,B),F=n.sub(F,V),V=n.add(T,x),O=n.add(_,D),V=n.mul(V,O),O=n.add(N,B),V=n.sub(V,O),I=n.mul($,F),O=n.mul(E,B),I=n.add(O,I),O=n.sub(N,I),I=n.add(N,I),v=n.mul(O,I),N=n.add(P,P),N=n.add(N,P),B=n.mul($,B),F=n.mul(E,F),N=n.add(N,B),B=n.sub(P,B),B=n.mul($,B),F=n.add(F,B),P=n.mul(N,F),v=n.add(v,P),P=n.mul(V,F),O=n.mul(U,O),O=n.sub(O,P),P=n.mul(U,N),I=n.mul(V,I),I=n.add(I,P),new h(O,v,I)}subtract(y){return this.add(y.negate())}is0(){return this.equals(h.ZERO)}wNAF(y){return S.wNAFCached(this,y,h.normalizeZ)}multiplyUnsafe(y){const{endo:k,n:T}=t;Wt("scalar",y,tt,T);const x=h.ZERO;if(y===tt)return x;if(this.is0()||y===ne)return this;if(!k||S.hasPrecomputes(this))return S.wNAFCachedUnsafe(this,y,h.normalizeZ);let{k1neg:A,k1:_,k2neg:D,k2:O}=k.splitScalar(y),v=x,I=x,$=this;for(;_>tt||O>tt;)_&ne&&(v=v.add($)),O&ne&&(I=I.add($)),$=$.double(),_>>=ne,O>>=ne;return A&&(v=v.negate()),D&&(I=I.negate()),I=new h(n.mul(I.px,k.beta),I.py,I.pz),v.add(I)}multiply(y){const{endo:k,n:T}=t;Wt("scalar",y,ne,T);let x,A;if(k){const{k1neg:_,k1:D,k2neg:O,k2:v}=k.splitScalar(y);let{p:I,f:$}=this.wNAF(D),{p:E,f:P}=this.wNAF(v);I=S.constTimeNegate(_,I),E=S.constTimeNegate(O,E),E=new h(n.mul(E.px,k.beta),E.py,E.pz),x=I.add(E),A=$.add(P)}else{const{p:_,f:D}=this.wNAF(y);x=_,A=D}return h.normalizeZ([x,A])[0]}multiplyAndAddUnsafe(y,k,T){const x=h.BASE,A=(D,O)=>O===tt||O===ne||!D.equals(x)?D.multiplyUnsafe(O):D.multiply(O),_=A(this,k).add(A(y,T));return _.is0()?void 0:_}toAffine(y){return p(this,y)}isTorsionFree(){const{h:y,isTorsionFree:k}=t;if(y===ne)return!0;if(k)return k(h,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:y,clearCofactor:k}=t;return y===ne?this:k?k(h,this):this.multiplyUnsafe(t.h)}toRawBytes(y=!0){return kn("isCompressed",y),this.assertValidity(),s(h,this,y)}toHex(y=!0){return kn("isCompressed",y),Sn(this.toRawBytes(y))}}h.BASE=new h(t.Gx,t.Gy,n.ONE),h.ZERO=new h(n.ZERO,n.ONE,n.ZERO);const{endo:b,nBitLength:w}=t,S=Np(h,b?Math.ceil(w/2):w);return{CURVE:t,ProjectivePoint:h,normPrivateKeyToScalar:l,weierstrassEquation:a,isWithinCurveOrder:d}}function Up(e){const t=jc(e);return Pr(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function $p(e){const t=Up(e),{Fp:n,n:r,nByteLength:s,nBitLength:i}=t,a=n.BYTES+1,o=2*n.BYTES+1;function c(E){return he(E,r)}function u(E){return bs(E,r)}const{ProjectivePoint:d,normPrivateKeyToScalar:l,weierstrassEquation:f,isWithinCurveOrder:p}=jp({...t,toBytes(E,P,N){const B=P.toAffine(),U=n.toBytes(B.x),F=ar;return kn("isCompressed",N),N?F(Uint8Array.from([P.hasEvenY()?2:3]),U):F(Uint8Array.from([4]),U,n.toBytes(B.y))},fromBytes(E){const P=E.length,N=E[0],B=E.subarray(1);if(P===a&&(N===2||N===3)){const U=_t(B);if(!Si(U,ne,n.ORDER))throw new Error("Point is not on curve");const F=f(U);let V;try{V=n.sqrt(F)}catch(fe){const oe=fe instanceof Error?": "+fe.message:"";throw new Error("Point is not on curve"+oe)}const te=(V&ne)===ne;return(N&1)===1!==te&&(V=n.neg(V)),{x:U,y:V}}else if(P===o&&N===4){const U=n.fromBytes(B.subarray(0,n.BYTES)),F=n.fromBytes(B.subarray(n.BYTES,2*n.BYTES));return{x:U,y:F}}else{const U=a,F=o;throw new Error("invalid Point, expected length of "+U+", or uncompressed "+F+", got "+P)}}});function m(E){const P=r>>ne;return E>P}function h(E){return m(E)?c(-E):E}const b=(E,P,N)=>_t(E.slice(P,N));class w{constructor(P,N,B){Wt("r",P,ne,r),Wt("s",N,ne,r),this.r=P,this.s=N,B!=null&&(this.recovery=B),Object.freeze(this)}static fromCompact(P){const N=s;return P=Se("compactSignature",P,N*2),new w(b(P,0,N),b(P,N,2*N))}static fromDER(P){const{r:N,s:B}=Qe.toSig(Se("DER",P));return new w(N,B)}assertValidity(){}addRecoveryBit(P){return new w(this.r,this.s,P)}recoverPublicKey(P){const{r:N,s:B,recovery:U}=this,F=x(Se("msgHash",P));if(U==null||![0,1,2,3].includes(U))throw new Error("recovery id invalid");const V=U===2||U===3?N+t.n:N;if(V>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const te=U&1?"03":"02",Ie=d.fromHex(te+Qr(V,n.BYTES)),fe=u(V),oe=c(-F*fe),Lt=c(B*fe),st=d.BASE.multiplyAndAddUnsafe(Ie,oe,Lt);if(!st)throw new Error("point at infinify");return st.assertValidity(),st}hasHighS(){return m(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return ir(this.toDERHex())}toDERHex(){return Qe.hexFromSig(this)}toCompactRawBytes(){return ir(this.toCompactHex())}toCompactHex(){const P=s;return Qr(this.r,P)+Qr(this.s,P)}}const S={isValidPrivateKey(E){try{return l(E),!0}catch{return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{const E=Nc(t.n);return Op(t.randomBytes(E),t.n)},precompute(E=8,P=d.BASE){return P._setWindowSize(E),P.multiply(BigInt(3)),P}};function g(E,P=!0){return d.fromPrivateKey(E).toRawBytes(P)}function y(E){if(typeof E=="bigint")return!1;if(E instanceof d)return!0;const N=Se("key",E).length,B=n.BYTES,U=B+1,F=2*B+1;if(!(t.allowedPrivateKeyLengths||s===U))return N===U||N===F}function k(E,P,N=!0){if(y(E)===!0)throw new Error("first arg must be private key");if(y(P)===!1)throw new Error("second arg must be public key");return d.fromHex(P).multiply(l(E)).toRawBytes(N)}const T=t.bits2int||function(E){if(E.length>8192)throw new Error("input is too large");const P=_t(E),N=E.length*8-i;return N>0?P>>BigInt(N):P},x=t.bits2int_modN||function(E){return c(T(E))},A=Ir(i);function _(E){return Wt("num < 2^"+i,E,tt,A),Bn(E,s)}function D(E,P,N=O){if(["recovered","canonical"].some(vt=>vt in N))throw new Error("sign() legacy options not supported");const{hash:B,randomBytes:U}=t;let{lowS:F,prehash:V,extraEntropy:te}=N;F==null&&(F=!0),E=Se("msgHash",E),Ma(N),V&&(E=Se("prehashed msgHash",B(E)));const Ie=x(E),fe=l(P),oe=[_(fe),_(Ie)];if(te!=null&&te!==!1){const vt=te===!0?U(n.BYTES):te;oe.push(Se("extraEntropy",vt))}const Lt=ar(...oe),st=Ie;function Gr(vt){const Mt=T(vt);if(!p(Mt))return;const Hr=u(Mt),un=d.BASE.multiply(Mt).toAffine(),xt=c(un.x);if(xt===tt)return;const dn=c(Hr*c(st+xt*fe));if(dn===tt)return;let ln=(un.x===xt?0:2)|Number(un.y&ne),Rt=dn;return F&&m(dn)&&(Rt=h(dn),ln^=1),new w(xt,Rt,ln)}return{seed:Lt,k2sig:Gr}}const O={lowS:t.lowS,prehash:!1},v={lowS:t.lowS,prehash:!1};function I(E,P,N=O){const{seed:B,k2sig:U}=D(E,P,N),F=t;return Jf(F.hash.outputLen,F.nByteLength,F.hmac)(B,U)}d.BASE._setWindowSize(8);function $(E,P,N,B=v){var ln;const U=E;P=Se("msgHash",P),N=Se("publicKey",N);const{lowS:F,prehash:V,format:te}=B;if(Ma(B),"strict"in B)throw new Error("options.strict was renamed to lowS");if(te!==void 0&&te!=="compact"&&te!=="der")throw new Error("format must be compact or der");const Ie=typeof U=="string"||Cn(U),fe=!Ie&&!te&&typeof U=="object"&&U!==null&&typeof U.r=="bigint"&&typeof U.s=="bigint";if(!Ie&&!fe)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let oe,Lt;try{if(fe&&(oe=new w(U.r,U.s)),Ie){try{te!=="compact"&&(oe=w.fromDER(U))}catch(Rt){if(!(Rt instanceof Qe.Err))throw Rt}!oe&&te!=="der"&&(oe=w.fromCompact(U))}Lt=d.fromHex(N)}catch{return!1}if(!oe||F&&oe.hasHighS())return!1;V&&(P=t.hash(P));const{r:st,s:Gr}=oe,vt=x(P),Mt=u(Gr),Hr=c(vt*Mt),un=c(st*Mt),xt=(ln=d.BASE.multiplyAndAddUnsafe(Lt,Hr,un))==null?void 0:ln.toAffine();return xt?c(xt.x)===st:!1}return{CURVE:t,getPublicKey:g,getSharedSecret:k,sign:I,verify:$,ProjectivePoint:d,Signature:w,utils:S}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Fp(e){return{hash:e,hmac:(t,...n)=>Mc(e,t,Bl(...n)),randomBytes:Nl}}function Tr(e,t){const n=r=>$p({...e,...Fp(r)});return{...n(t),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Uc=an(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff")),Gp=Uc.create(BigInt("-3")),Hp=BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),zp=Tr({a:Gp,b:Hp,Fp:Uc,n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),h:BigInt(1),lowS:!1},vi),$c=an(BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff")),qp=$c.create(BigInt("-3")),Wp=BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef");Tr({a:qp,b:Wp,Fp:$c,n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),h:BigInt(1),lowS:!1},Uf);const Fc=an(BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")),Vp=Fc.create(BigInt("-3")),Kp=BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00");Tr({a:Vp,b:Kp,Fp:Fc,n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"),h:BigInt(1),lowS:!1,allowedPrivateKeyLengths:[130,131,132]},jf);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ra=zp;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Gc=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Da=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Zp=BigInt(0),Yp=BigInt(1),ws=BigInt(2),ja=(e,t)=>(e+t/ws)/t;function Jp(e){const t=Gc,n=BigInt(3),r=BigInt(6),s=BigInt(11),i=BigInt(22),a=BigInt(23),o=BigInt(44),c=BigInt(88),u=e*e*e%t,d=u*u*e%t,l=Ee(d,n,t)*d%t,f=Ee(l,n,t)*d%t,p=Ee(f,ws,t)*u%t,m=Ee(p,s,t)*p%t,h=Ee(m,i,t)*m%t,b=Ee(h,o,t)*h%t,w=Ee(b,c,t)*b%t,S=Ee(w,o,t)*h%t,g=Ee(S,n,t)*d%t,y=Ee(g,a,t)*m%t,k=Ee(y,r,t)*u%t,T=Ee(k,ws,t);if(!vs.eql(vs.sqr(T),e))throw new Error("Cannot find square root");return T}const vs=an(Gc,void 0,void 0,{sqrt:Jp}),Ai=Tr({a:Zp,b:BigInt(7),Fp:vs,n:Da,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Da,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Yp*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,a=BigInt("0x100000000000000000000000000000000"),o=ja(i*e,t),c=ja(-r*e,t);let u=he(e-o*n-c*s,t),d=he(-o*r-c*i,t);const l=u>a,f=d>a;if(l&&(u=t-u),f&&(d=t-d),u>a||d>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:u,k2neg:f,k2:d}}}},vi),Qp=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:Ai},Symbol.toStringTag,{value:"Module"})),Xp=/^(.*)\[([0-9]*)\]$/,eh=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Hc=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Ua=2n**256n-1n;function zc(e,t={}){const{recovered:n}=t;if(typeof e.r>"u")throw new es({signature:e});if(typeof e.s>"u")throw new es({signature:e});if(n&&typeof e.yParity>"u")throw new es({signature:e});if(e.r<0n||e.r>Ua)throw new oh({value:e.r});if(e.s<0n||e.s>Ua)throw new ch({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Pi({value:e.yParity})}function th(e){return qc(bt(e))}function qc(e){if(e.length!==130&&e.length!==132)throw new ah({signature:e});const t=BigInt(Ge(e,0,32)),n=BigInt(Ge(e,32,64)),r=(()=>{const s=+`0x${e.slice(130)}`;if(!Number.isNaN(s))try{return Ii(s)}catch{throw new Pi({value:s})}})();return typeof r>"u"?{r:t,s:n}:{r:t,s:n,yParity:r}}function nh(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return rh(e)}function rh(e){const t=typeof e=="string"?qc(e):e instanceof Uint8Array?th(e):typeof e.r=="string"?ih(e):e.v?sh(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return zc(t),t}function sh(e){return{r:e.r,s:e.s,yParity:Ii(e.v)}}function ih(e){const t=(()=>{const n=e.v?Number(e.v):void 0;let r=e.yParity?Number(e.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=Ii(n)),typeof r!="number")throw new Pi({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function Ii(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new uh({value:e})}let ah=class extends K{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${Tt(Ml(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}},es=class extends K{constructor({signature:t}){super(`Signature \`${Ll(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}},oh=class extends K{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}},ch=class extends K{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}},Pi=class extends K{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}},uh=class extends K{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}};function Vt(e,t,n){const{checksumAddress:r,staticPosition:s}=n,i=Oi(t.type);if(i){const[a,o]=i;return lh(e,{...t,type:o},{checksumAddress:r,length:a,staticPosition:s})}if(t.type==="tuple")return mh(e,t,{checksumAddress:r,staticPosition:s});if(t.type==="address")return dh(e,{checksum:r});if(t.type==="bool")return fh(e);if(t.type.startsWith("bytes"))return ph(e,t,{staticPosition:s});if(t.type.startsWith("uint")||t.type.startsWith("int"))return hh(e,t);if(t.type==="string")return yh(e,{staticPosition:s});throw new Bi(t.type)}const $a=32,xs=32;function dh(e,t={}){const{checksum:n=!1}=t,r=e.readBytes(32);return[(i=>n?Ac(i):i)(bt(ap(r,-20))),32]}function lh(e,t,n){const{checksumAddress:r,length:s,staticPosition:i}=n;if(!s){const c=rt(e.readBytes(xs)),u=i+c,d=u+$a;e.setPosition(u);const l=rt(e.readBytes($a)),f=An(t);let p=0;const m=[];for(let h=0;h<l;++h){e.setPosition(d+(f?h*32:p));const[b,w]=Vt(e,t,{checksumAddress:r,staticPosition:d});p+=w,m.push(b)}return e.setPosition(i+32),[m,32]}if(An(t)){const c=rt(e.readBytes(xs)),u=i+c,d=[];for(let l=0;l<s;++l){e.setPosition(u+l*32);const[f]=Vt(e,t,{checksumAddress:r,staticPosition:u});d.push(f)}return e.setPosition(i+32),[d,32]}let a=0;const o=[];for(let c=0;c<s;++c){const[u,d]=Vt(e,t,{checksumAddress:r,staticPosition:i+a});a+=d,o.push(u)}return[o,a]}function fh(e){return[cp(e.readBytes(32),{size:32}),32]}function ph(e,t,{staticPosition:n}){const[r,s]=t.type.split("bytes");if(!s){const a=rt(e.readBytes(32));e.setPosition(n+a);const o=rt(e.readBytes(32));if(o===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(o);return e.setPosition(n+32),[bt(c),32]}return[bt(e.readBytes(Number.parseInt(s,10),32)),32]}function hh(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[r>48?op(s,{signed:n}):rt(s,{signed:n}),32]}function mh(e,t,n){const{checksumAddress:r,staticPosition:s}=n,i=t.components.length===0||t.components.some(({name:c})=>!c),a=i?[]:{};let o=0;if(An(t)){const c=rt(e.readBytes(xs)),u=s+c;for(let d=0;d<t.components.length;++d){const l=t.components[d];e.setPosition(u+o);const[f,p]=Vt(e,l,{checksumAddress:r,staticPosition:u});o+=p,a[i?d:l==null?void 0:l.name]=f}return e.setPosition(s+32),[a,32]}for(let c=0;c<t.components.length;++c){const u=t.components[c],[d,l]=Vt(e,u,{checksumAddress:r,staticPosition:s});a[i?c:u==null?void 0:u.name]=d,o+=l}return[a,o]}function yh(e,{staticPosition:t}){const n=rt(e.readBytes(32)),r=t+n;e.setPosition(r);const s=rt(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const i=e.readBytes(s,32),a=up(kc(i));return e.setPosition(t+32),[a,32]}function bh({checksumAddress:e,parameters:t,values:n}){const r=[];for(let s=0;s<t.length;s++)r.push(_i({checksumAddress:e,parameter:t[s],value:n[s]}));return r}function _i({checksumAddress:e=!1,parameter:t,value:n}){const r=t,s=Oi(r.type);if(s){const[i,a]=s;return wh(n,{checksumAddress:e,length:i,parameter:{...r,type:a}})}if(r.type==="tuple")return Sh(n,{checksumAddress:e,parameter:r});if(r.type==="address")return gh(n,{checksum:e});if(r.type==="bool")return xh(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const i=r.type.startsWith("int"),[,,a="256"]=Hc.exec(r.type)??[];return Eh(n,{signed:i,size:Number(a)})}if(r.type.startsWith("bytes"))return vh(n,{type:r.type});if(r.type==="string")return kh(n);throw new Bi(r.type)}function Ti(e){let t=0;for(let i=0;i<e.length;i++){const{dynamic:a,encoded:o}=e[i];a?t+=32:t+=Tt(o)}const n=[],r=[];let s=0;for(let i=0;i<e.length;i++){const{dynamic:a,encoded:o}=e[i];a?(n.push(rn(t+s,{size:32})),r.push(o),s+=Tt(o)):n.push(o)}return Ne(...n,...r)}function gh(e,t){const{checksum:n=!1}=t;return _r(e,{strict:n}),{dynamic:!1,encoded:En(e.toLowerCase())}}function wh(e,t){const{checksumAddress:n,length:r,parameter:s}=t,i=r===null;if(!Array.isArray(e))throw new Th(e);if(!i&&e.length!==r)throw new _h({expectedLength:r,givenLength:e.length,type:`${s.type}[${r}]`});let a=!1;const o=[];for(let c=0;c<e.length;c++){const u=_i({checksumAddress:n,parameter:s,value:e[c]});u.dynamic&&(a=!0),o.push(u)}if(i||a){const c=Ti(o);if(i){const u=rn(o.length,{size:32});return{dynamic:!0,encoded:o.length>0?Ne(u,c):u}}if(a)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:Ne(...o.map(({encoded:c})=>c))}}function vh(e,{type:t}){const[,n]=t.split("bytes"),r=Tt(e);if(!n){let s=e;return r%32!==0&&(s=Qt(s,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:Ne(En(rn(r,{size:32})),s)}}if(r!==Number.parseInt(n,10))throw new Vc({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:Qt(e)}}function xh(e){if(typeof e!="boolean")throw new K(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:En(Fo(e))}}function Eh(e,{signed:t,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,s=t?-r-1n:0n;if(e>r||e<s)throw new Rl({max:r.toString(),min:s.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:rn(e,{size:32,signed:t})}}function kh(e){const t=ci(e),n=Math.ceil(Tt(t)/32),r=[];for(let s=0;s<n;s++)r.push(Qt(Ge(t,s*32,(s+1)*32)));return{dynamic:!0,encoded:Ne(Qt(rn(Tt(t),{size:32})),...r)}}function Sh(e,t){const{checksumAddress:n,parameter:r}=t;let s=!1;const i=[];for(let a=0;a<r.components.length;a++){const o=r.components[a],c=Array.isArray(e)?a:o.name,u=_i({checksumAddress:n,parameter:o,value:e[c]});i.push(u),u.dynamic&&(s=!0)}return{dynamic:s,encoded:s?Ti(i):Ne(...i.map(({encoded:a})=>a))}}function Oi(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function An(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(An);const n=Oi(e.type);return!!(n&&An({...e,type:n[1]}))}function Ah(e,t,n={}){const{as:r="Array",checksumAddress:s=!1}=n,i=typeof t=="string"?Ec(t):t,a=mp(i);if(Gt(i)===0&&e.length>0)throw new Ph;if(Gt(i)&&Gt(i)<32)throw new Ih({data:typeof t=="string"?t:bt(t),parameters:e,size:Gt(i)});let o=0;const c=r==="Array"?[]:{};for(let u=0;u<e.length;++u){const d=e[u];a.setPosition(o);const[l,f]=Vt(a,d,{checksumAddress:s,staticPosition:0});o+=f,r==="Array"?c.push(l):c[d.name??u]=l}return c}function Ci(e,t,n){const{checksumAddress:r=!1}={};if(e.length!==t.length)throw new Kc({expectedLength:e.length,givenLength:t.length});const s=bh({checksumAddress:r,parameters:e,values:t}),i=Ti(s);return i.length===0?"0x":i}function Es(e,t){if(e.length!==t.length)throw new Kc({expectedLength:e.length,givenLength:t.length});const n=[];for(let r=0;r<e.length;r++){const s=e[r],i=t[r];n.push(Es.encode(s,i))}return Ne(...n)}(function(e){function t(n,r,s=!1){if(n==="address"){const c=r;return _r(c),En(c.toLowerCase(),s?32:0)}if(n==="string")return ci(r);if(n==="bytes")return r;if(n==="bool")return En(Fo(r),s?32:1);const i=n.match(Hc);if(i){const[c,u,d="256"]=i,l=Number.parseInt(d,10)/8;return rn(r,{size:s?32:l,signed:u==="int"})}const a=n.match(eh);if(a){const[c,u]=a;if(Number.parseInt(u,10)!==(r.length-2)/2)throw new Vc({expectedSize:Number.parseInt(u,10),value:r});return Qt(r,s?32:0)}const o=n.match(Xp);if(o&&Array.isArray(r)){const[c,u]=o,d=[];for(let l=0;l<r.length;l++)d.push(t(u,r[l],!0));return d.length===0?"0x":Ne(...d)}throw new Bi(n)}e.encode=t})(Es||(Es={}));function Wc(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?Aa(e):e}class Ih extends K{constructor({data:t,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${Dl(n)})`,`Data: ${t} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class Ph extends K{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class _h extends K{constructor({expectedLength:t,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${t}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class Vc extends K{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${Tt(n)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Kc extends K{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${n}`].join(`
|
|
3
3
|
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class Th extends K{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class Bi extends K{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function Oh(e,t={}){return typeof e.chainId=="string"?Ch(e):{...e,...t.signature}}function Ch(e){const{address:t,chainId:n,nonce:r}=e,s=nh(e);return{address:t,chainId:Number(n),nonce:BigInt(r),...s}}async function In(e,{address:t,blockNumber:n,blockTag:r="latest"}){const s=n!==void 0?M(n):void 0,i=await e.request({method:"eth_getCode",params:[t,s||r]},{dedupe:!!s});if(i!=="0x")return i}const Zc="0x6492649264926492649264926492649264926492649264926492649264926492";function Bh(e){if(Ge(e,-32)!==Zc)throw new Mh(e)}function Nh(e){const{data:t,signature:n,to:r}=e;return Ne(Ci(Wc("address, bytes, bytes"),[r,t,n]),Zc)}function Lh(e){try{return Bh(e),!0}catch{return!1}}let Mh=class extends K{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}};const Rh="0x8010801080108010801080108010801080108010801080108010801080108010",Dh=Wc("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function Yc(e){if(typeof e=="string"){if(Ge(e,-32)!==Rh)throw new $h(e)}else zc(e.authorization)}function jh(e){Yc(e);const t=$o(Ge(e,-64,-32)),n=Ge(e,-t-64,-64),r=Ge(e,0,-t-64),[s,i,a]=Ah(Dh,n);return{authorization:Oh({address:s.delegation,chainId:Number(s.chainId),nonce:s.nonce,yParity:s.yParity,r:s.r,s:s.s}),signature:r,...a&&a!=="0x"?{data:a,to:i}:{}}}function Uh(e){try{return Yc(e),!0}catch{return!1}}class $h extends K{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}function Fh(e){const t=J(`0x${e.substring(4)}`).substring(26);return jl(`0x${t}`)}async function Gh({hash:e,signature:t}){const n=Te(e)?e:ve(e),{secp256k1:r}=await Ul(async()=>{const{secp256k1:a}=await Promise.resolve().then(()=>Qp);return{secp256k1:a}},void 0);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:u,s:d,v:l,yParity:f}=t,p=Number(f??l),m=Fa(p);return new r.Signature(se(u),se(d)).addRecoveryBit(m)}const a=Te(t)?t:ve(t);if(yt(a)!==65)throw new Error("invalid signature length");const o=we(`0x${a.slice(130)}`),c=Fa(o);return r.Signature.fromCompact(a.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function Fa(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Jc({hash:e,signature:t}){return Fh(await Gh({hash:e,signature:t}))}function Hh(e){const{chainId:t,nonce:n,to:r}=e,s=e.contractAddress??e.address,i=J(Tn(["0x05",Pf([t?M(t):"0x",s,n?M(n):"0x"])]));return r==="bytes"?Be(i):i}async function Qc(e){const{authorization:t,signature:n}=e;return Jc({hash:Hh(t),signature:n??t})}async function zh({address:e,authorization:t,signature:n}){return sn(tr(e),await Qc({authorization:t,signature:n}))}function qh({r:e,s:t,to:n="hex",v:r,yParity:s}){const i=(()=>{if(s===0||s===1)return s;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),a=`0x${new Ai.Signature(se(e),se(t)).toCompactHex()}${i===0?"1b":"1c"}`;return n==="hex"?a:Be(a)}async function Or(e,t){var c,u,d,l;const{address:n,chain:r=e.chain,hash:s,erc6492VerifierAddress:i=t.universalSignatureVerifierAddress??((u=(c=r==null?void 0:r.contracts)==null?void 0:c.erc6492Verifier)==null?void 0:u.address),multicallAddress:a=t.multicallAddress??((l=(d=r==null?void 0:r.contracts)==null?void 0:d.multicall3)==null?void 0:l.address)}=t;if(r!=null&&r.verifyHash)return await r.verifyHash(e,t);const o=(()=>{const f=t.signature;return Te(f)?f:typeof f=="object"&&"r"in f&&"s"in f?qh(f):ze(f)})();try{return Uh(o)?await Wh(e,{...t,multicallAddress:a,signature:o}):await Vh(e,{...t,verifierAddress:i,signature:o})}catch(f){try{if(sn(tr(n),await Jc({hash:s,signature:o})))return!0}catch{}if(f instanceof Ct)return!1;throw f}}async function Wh(e,t){var b;const{address:n,blockNumber:r,blockTag:s,hash:i,multicallAddress:a}=t,{authorization:o,data:c,signature:u,to:d}=jh(t.signature);if(await In(e,{address:n,blockNumber:r,blockTag:s})===Tn(["0xef0100",o.address]))return await Kh(e,{address:n,blockNumber:r,blockTag:s,hash:i,signature:u});const f={address:o.address,chainId:Number(o.chainId),nonce:Number(o.nonce),r:M(o.r,{size:32}),s:M(o.s,{size:32}),yParity:o.yParity};if(!await zh({address:n,authorization:f}))throw new Ct;const m=await j(e,xe,"readContract")({...a?{address:a}:{code:$l},authorizationList:[f],abi:Fl,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:!0,target:d??n,callData:c}]:[],{allowFailure:!0,target:n,callData:ae({abi:Go,functionName:"isValidSignature",args:[i,u]})}]]}),h=(b=m[m.length-1])==null?void 0:b.returnData;if(h!=null&&h.startsWith("0x1626ba7e"))return!0;throw new Ct}async function Vh(e,t){const{address:n,factory:r,factoryData:s,hash:i,signature:a,verifierAddress:o,...c}=t,u=await(async()=>!r&&!s||Lh(a)?a:Nh({data:s,signature:a,to:r}))(),d=o?{to:o,data:ae({abi:ha,functionName:"isValidSig",args:[n,i,u]}),...c}:{data:Gl({abi:ha,args:[n,i,u],bytecode:ql}),...c},{data:l}=await j(e,ui,"call")(d).catch(f=>{throw f instanceof Hl?new Ct:f});if(zl(l??"0x0"))return!0;throw new Ct}async function Kh(e,t){const{address:n,blockNumber:r,blockTag:s,hash:i,signature:a}=t;if((await j(e,xe,"readContract")({address:n,abi:Go,args:[i,a],blockNumber:r,blockTag:s,functionName:"isValidSignature"}).catch(c=>{throw c instanceof Ho?new Ct:c})).startsWith("0x1626ba7e"))return!0;throw new Ct}class Ct extends Error{}function Ni(e){var n,r,s,i,a,o;if(!(e instanceof R))return!1;const t=e.walk(c=>c instanceof fs);return t instanceof fs?((n=t.data)==null?void 0:n.errorName)==="HttpError"||((r=t.data)==null?void 0:r.errorName)==="ResolverError"||((s=t.data)==null?void 0:s.errorName)==="ResolverNotContract"||((i=t.data)==null?void 0:i.errorName)==="ResolverNotFound"||((a=t.data)==null?void 0:a.errorName)==="ReverseAddressMismatch"||((o=t.data)==null?void 0:o.errorName)==="UnsupportedResolverProfile":!1}function Xc(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Te(t)?t:null}function ks(e){let t=new Uint8Array(32).fill(0);if(!e)return ze(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const s=Xc(n[r]),i=s?vr(s):J(Pt(n[r]),"bytes");t=J(He([t,i]),"bytes")}return ze(t)}function Zh(e){return`[${e.slice(2)}]`}function Yh(e){const t=new Uint8Array(32).fill(0);return e?Xc(e)||J(Pt(e)):ze(t)}function Li(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const n=new Uint8Array(Pt(t).byteLength+2);let r=0;const s=t.split(".");for(let i=0;i<s.length;i++){let a=Pt(s[i]);a.byteLength>255&&(a=Pt(Zh(Yh(s[i])))),n[r]=a.length,n.set(a,r+1),r+=a.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}async function Jh(e,t){const{blockNumber:n,blockTag:r,coinType:s,name:i,gatewayUrls:a,strict:o}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return xr({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})(),d=c==null?void 0:c.ensTlds;if(d&&!d.some(f=>i.endsWith(f)))return null;const l=s!=null?[ks(i),BigInt(s)]:[ks(i)];try{const f=ae({abi:ma,functionName:"addr",args:l}),p={address:u,abi:zo,functionName:"resolveWithGateways",args:[ve(Li(i)),f,a??[bi]],blockNumber:n,blockTag:r},h=await j(e,xe,"readContract")(p);if(h[0]==="0x")return null;const b=Er({abi:ma,args:l,functionName:"addr",data:h[0]});return b==="0x"||nr(b)==="0x00"?null:b}catch(f){if(o)throw f;if(Ni(f))return null;throw f}}class Qh extends R{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class fn extends R{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class Mi extends R{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class Xh extends R{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const em=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,tm=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,nm=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,rm=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function sm(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const n=t.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=e})}}function Ga(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function eu({uri:e,gatewayUrls:t}){const n=nm.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=Ga(t==null?void 0:t.ipfs,"https://ipfs.io"),s=Ga(t==null?void 0:t.arweave,"https://arweave.net"),i=e.match(em),{protocol:a,subpath:o,target:c,subtarget:u=""}=(i==null?void 0:i.groups)||{},d=a==="ipns:/"||o==="ipns/",l=a==="ipfs:/"||o==="ipfs/"||tm.test(e);if(e.startsWith("http")&&!d&&!l){let p=e;return t!=null&&t.arweave&&(p=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:p,isOnChain:!1,isEncoded:!1}}if((d||l)&&c)return{uri:`${r}/${d?"ipns":"ipfs"}/${c}${u}`,isOnChain:!1,isEncoded:!1};if(a==="ar:/"&&c)return{uri:`${s}/${c}${u||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(rm,"");if(f.startsWith("<svg")&&(f=`data:image/svg+xml;base64,${btoa(f)}`),f.startsWith("data:")||f.startsWith("{"))return{uri:f,isOnChain:!0,isEncoded:!1};throw new Mi({uri:e})}function tu(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new Qh({data:e});return e.image||e.image_url||e.image_data}async function im({gatewayUrls:e,uri:t}){try{const n=await fetch(t).then(s=>s.json());return await Ri({gatewayUrls:e,uri:tu(n)})}catch{throw new Mi({uri:t})}}async function Ri({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=eu({uri:t,gatewayUrls:e});if(r||await sm(n))return n;throw new Mi({uri:t})}function am(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,s]=t.split("/"),[i,a]=n.split(":"),[o,c]=r.split(":");if(!i||i.toLowerCase()!=="eip155")throw new fn({reason:"Only EIP-155 supported"});if(!a)throw new fn({reason:"Chain ID not found"});if(!c)throw new fn({reason:"Contract address not found"});if(!s)throw new fn({reason:"Token ID not found"});if(!o)throw new fn({reason:"ERC namespace not found"});return{chainID:Number.parseInt(a,10),namespace:o.toLowerCase(),contractAddress:c,tokenID:s}}async function om(e,{nft:t}){if(t.namespace==="erc721")return xe(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return xe(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new Xh({namespace:t.namespace})}async function cm(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?um(e,{gatewayUrls:t,record:n}):Ri({uri:n,gatewayUrls:t})}async function um(e,{gatewayUrls:t,record:n}){const r=am(n),s=await om(e,{nft:r}),{uri:i,isOnChain:a,isEncoded:o}=eu({uri:s,gatewayUrls:t});if(a&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){const u=o?atob(i.replace("data:application/json;base64,","")):i,d=JSON.parse(u);return Ri({uri:tu(d),gatewayUrls:t})}let c=r.tokenID;return r.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),im({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,c)})}async function nu(e,t){const{blockNumber:n,blockTag:r,key:s,name:i,gatewayUrls:a,strict:o}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return xr({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})(),d=c==null?void 0:c.ensTlds;if(d&&!d.some(l=>i.endsWith(l)))return null;try{const l={address:u,abi:zo,args:[ve(Li(i)),ae({abi:ya,functionName:"text",args:[ks(i),s]}),a??[bi]],functionName:"resolveWithGateways",blockNumber:n,blockTag:r},p=await j(e,xe,"readContract")(l);if(p[0]==="0x")return null;const m=Er({abi:ya,functionName:"text",data:p[0]});return m===""?null:m}catch(l){if(o)throw l;if(Ni(l))return null;throw l}}async function dm(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:s,gatewayUrls:i,strict:a,universalResolverAddress:o}){const c=await j(e,nu,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:s,universalResolverAddress:o,gatewayUrls:i,strict:a});if(!c)return null;try{return await cm(e,{record:c,gatewayUrls:r})}catch{return null}}async function lm(e,t){const{address:n,blockNumber:r,blockTag:s,coinType:i=60n,gatewayUrls:a,strict:o}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return xr({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})();try{const d={address:u,abi:Wl,args:[n,i,a??[bi]],functionName:"reverseWithGateways",blockNumber:r,blockTag:s},l=j(e,xe,"readContract"),[f]=await l(d);return f||null}catch(d){if(o)throw d;if(Ni(d))return null;throw d}}async function fm(e,t){const{blockNumber:n,blockTag:r,name:s}=t,{chain:i}=e,a=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!i)throw new Error("client chain not configured. universalResolverAddress is required.");return xr({blockNumber:n,chain:i,contract:"ensUniversalResolver"})})(),o=i==null?void 0:i.ensTlds;if(o&&!o.some(u=>s.endsWith(u)))throw new Error(`${s} is not a valid ENS TLD (${o==null?void 0:o.join(", ")}) for chain "${i.name}" (id: ${i.id}).`);const[c]=await j(e,xe,"readContract")({address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[ve(Li(s))],blockNumber:n,blockTag:r});return c}async function ru(e,t){var b,w,S;const{account:n=e.account,blockNumber:r,blockTag:s="latest",blobs:i,data:a,gas:o,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:l,to:f,value:p,...m}=t,h=n?ye(n):void 0;try{On(t);const y=(typeof r=="bigint"?M(r):void 0)||s,k=(S=(w=(b=e.chain)==null?void 0:b.formatters)==null?void 0:w.transactionRequest)==null?void 0:S.format,x=(k||kr)({...di(m,{format:k}),account:h,blobs:i,data:a,gas:o,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:l,to:f,value:p},"createAccessList"),A=await e.request({method:"eth_createAccessList",params:[x,y]});return{accessList:A.accessList,gasUsed:BigInt(A.gasUsed)}}catch(g){throw Vl(g,{...t,account:h,chain:e.chain})}}function Cr(e,{method:t}){var r,s;const n={};return e.transport.type==="fallback"&&((s=(r=e.transport).onResponse)==null||s.call(r,({method:i,response:a,status:o,transport:c})=>{o==="success"&&t===i&&(n[a]=c.request)})),i=>n[i]||e.request}async function pm(e){const t=Cr(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}class hm extends R{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}const Ha="/docs/contract/encodeEventTopics";function Ln(e){var c;const{abi:t,eventName:n,args:r}=e;let s=t[0];if(n){const u=qo({abi:t,name:n});if(!u)throw new ba(n,{docsPath:Ha});s=u}if(s.type!=="event")throw new ba(void 0,{docsPath:Ha});const i=Wo(s),a=li(i);let o=[];if(r&&"inputs"in s){const u=(c=s.inputs)==null?void 0:c.filter(l=>"indexed"in l&&l.indexed),d=Array.isArray(r)?r:Object.values(r).length>0?(u==null?void 0:u.map(l=>r[l.name]))??[]:[];d.length>0&&(o=(u==null?void 0:u.map((l,f)=>Array.isArray(d[f])?d[f].map((p,m)=>za({param:l,value:d[f][m]})):typeof d[f]<"u"&&d[f]!==null?za({param:l,value:d[f]}):null))??[])}return[a,...o]}function za({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return J(vr(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new hm(e.type);return nt([e],[t])}async function su(e,t){const{address:n,abi:r,args:s,eventName:i,fromBlock:a,strict:o,toBlock:c}=t,u=Cr(e,{method:"eth_newFilter"}),d=i?Ln({abi:r,args:s,eventName:i}):void 0,l=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:typeof a=="bigint"?M(a):a,toBlock:typeof c=="bigint"?M(c):c,topics:d}]});return{abi:r,args:s,eventName:i,id:l,request:u(l),strict:!!o,type:"event"}}async function iu(e,{address:t,args:n,event:r,events:s,fromBlock:i,strict:a,toBlock:o}={}){const c=s??(r?[r]:void 0),u=Cr(e,{method:"eth_newFilter"});let d=[];c&&(d=[c.flatMap(p=>Ln({abi:[p],eventName:p.name,args:n}))],r&&(d=d[0]));const l=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof i=="bigint"?M(i):i,toBlock:typeof o=="bigint"?M(o):o,...d.length?{topics:d}:{}}]});return{abi:c,args:n,eventName:r?r.name:void 0,fromBlock:i,id:l,request:u(l),strict:!!a,toBlock:o,type:"event"}}async function au(e){const t=Cr(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}class mm extends R{constructor(t,{account:n,docsPath:r,chain:s,data:i,gas:a,gasPrice:o,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:d,to:l,value:f}){var m;const p=Vo({from:n==null?void 0:n.address,to:l,value:typeof f<"u"&&`${Kl(f)} ${((m=s==null?void 0:s.nativeCurrency)==null?void 0:m.symbol)||"ETH"}`,data:i,gas:a,gasPrice:typeof o<"u"&&`${qt(o)} gwei`,maxFeePerGas:typeof c<"u"&&`${qt(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${qt(u)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",p].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function ym(e,{docsPath:t,...n}){const r=(()=>{const s=fi(e,n);return s instanceof pi?e:s})();return new mm(r,{docsPath:t,...n})}class ou extends R{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Di extends R{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class bm extends R{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${qt(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class cu extends R{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}async function Oe(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:s}={}){var u,d,l;const i=s??!1,a=n!==void 0?M(n):void 0;let o=null;if(t?o=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:!0}):o=await e.request({method:"eth_getBlockByNumber",params:[a||r,i]},{dedupe:!!a}),!o)throw new cu({blockHash:t,blockNumber:n});return(((l=(d=(u=e.chain)==null?void 0:u.formatters)==null?void 0:d.block)==null?void 0:l.format)||ac)(o,"getBlock")}async function ji(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function gm(e,t){return uu(e,t)}async function uu(e,t){var i,a;const{block:n,chain:r=e.chain,request:s}=t||{};try{const o=((i=r==null?void 0:r.fees)==null?void 0:i.maxPriorityFeePerGas)??((a=r==null?void 0:r.fees)==null?void 0:a.defaultPriorityFee);if(typeof o=="function"){const u=n||await j(e,Oe,"getBlock")({}),d=await o({block:u,client:e,request:s});if(d===null)throw new Error;return d}if(typeof o<"u")return o;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return se(c)}catch{const[o,c]=await Promise.all([n?Promise.resolve(n):j(e,Oe,"getBlock")({}),j(e,ji,"getGasPrice")({})]);if(typeof o.baseFeePerGas!="bigint")throw new Di;const u=c-o.baseFeePerGas;return u<0n?0n:u}}async function du(e,t){return Ss(e,t)}async function Ss(e,t){var f,p;const{block:n,chain:r=e.chain,request:s,type:i="eip1559"}=t||{},a=await(async()=>{var m,h;return typeof((m=r==null?void 0:r.fees)==null?void 0:m.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:s}):((h=r==null?void 0:r.fees)==null?void 0:h.baseFeeMultiplier)??1.2})();if(a<1)throw new ou;const c=10**(((f=a.toString().split(".")[1])==null?void 0:f.length)??0),u=m=>m*BigInt(Math.ceil(a*c))/BigInt(c),d=n||await j(e,Oe,"getBlock")({});if(typeof((p=r==null?void 0:r.fees)==null?void 0:p.estimateFeesPerGas)=="function"){const m=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:u,request:s,type:i});if(m!==null)return m}if(i==="eip1559"){if(typeof d.baseFeePerGas!="bigint")throw new Di;const m=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await uu(e,{block:d,chain:r,request:s}),h=u(d.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??h+m,maxPriorityFeePerGas:m}}return{gasPrice:(s==null?void 0:s.gasPrice)??u(await j(e,ji,"getGasPrice")({}))}}async function Ui(e,{address:t,blockTag:n="latest",blockNumber:r}){const s=await e.request({method:"eth_getTransactionCount",params:[t,typeof r=="bigint"?M(r):n]},{dedupe:!!r});return we(s)}function wm(e,{docsPath:t,...n}){const r=(()=>{const s=fi(e,n);return s instanceof pi?e:s})();return new Zl(r,{docsPath:t,...n})}async function on(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return we(t)}async function lu(e,t){var A,_,D,O,v;const{account:n=e.account,accessList:r,authorizationList:s,chain:i=e.chain,blobVersionedHashes:a,blobs:o,data:c,gas:u,gasPrice:d,maxFeePerBlobGas:l,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:m,nonceManager:h,to:b,type:w,value:S,...g}=t,y=await(async()=>{if(!n||!h||typeof m<"u")return m;const I=ye(n),$=i?i.id:await j(e,on,"getChainId")({});return await h.consume({address:I.address,chainId:$,client:e})})();On(t);const k=(_=(A=i==null?void 0:i.formatters)==null?void 0:A.transactionRequest)==null?void 0:_.format,x=(k||kr)({...di(g,{format:k}),account:n?ye(n):void 0,accessList:r,authorizationList:s,blobs:o,blobVersionedHashes:a,data:c,gas:u,gasPrice:d,maxFeePerBlobGas:l,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:y,to:b,type:w,value:S},"fillTransaction");try{const I=await e.request({method:"eth_fillTransaction",params:[x]}),E=(((O=(D=i==null?void 0:i.formatters)==null?void 0:D.transaction)==null?void 0:O.format)||gi)(I.tx);delete E.blockHash,delete E.blockNumber,delete E.r,delete E.s,delete E.transactionIndex,delete E.v,delete E.yParity,E.data=E.input,E.gas&&(E.gas=t.gas??E.gas),E.gasPrice&&(E.gasPrice=t.gasPrice??E.gasPrice),E.maxFeePerBlobGas&&(E.maxFeePerBlobGas=t.maxFeePerBlobGas??E.maxFeePerBlobGas),E.maxFeePerGas&&(E.maxFeePerGas=t.maxFeePerGas??E.maxFeePerGas),E.maxPriorityFeePerGas&&(E.maxPriorityFeePerGas=t.maxPriorityFeePerGas??E.maxPriorityFeePerGas),E.nonce&&(E.nonce=t.nonce??E.nonce);const P=await(async()=>{var F,V;if(typeof((F=i==null?void 0:i.fees)==null?void 0:F.baseFeeMultiplier)=="function"){const te=await j(e,Oe,"getBlock")({});return i.fees.baseFeeMultiplier({block:te,client:e,request:t})}return((V=i==null?void 0:i.fees)==null?void 0:V.baseFeeMultiplier)??1.2})();if(P<1)throw new ou;const B=10**(((v=P.toString().split(".")[1])==null?void 0:v.length)??0),U=F=>F*BigInt(Math.ceil(P*B))/BigInt(B);return E.maxFeePerGas&&!t.maxFeePerGas&&(E.maxFeePerGas=U(E.maxFeePerGas)),E.gasPrice&&!t.gasPrice&&(E.gasPrice=U(E.gasPrice)),{raw:I.raw,transaction:{from:x.from,...E}}}catch(I){throw wm(I,{...t,chain:e.chain})}}const vm=["blobVersionedHashes","chainId","fees","gas","nonce","type"],qa=new Map,ts=new Ko(128);async function fu(e,t){var y,k,T;let n=t;n.account??(n.account=e.account),n.parameters??(n.parameters=vm);const{account:r,chain:s=e.chain,nonceManager:i,parameters:a}=n,o=(()=>{if(typeof(s==null?void 0:s.prepareTransactionRequest)=="function")return{fn:s.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(s==null?void 0:s.prepareTransactionRequest))return{fn:s.prepareTransactionRequest[0],runAt:s.prepareTransactionRequest[1].runAt}})();let c;async function u(){return c||(typeof n.chainId<"u"?n.chainId:s?s.id:(c=await j(e,on,"getChainId")({}),c))}const d=r&&ye(r);let l=n.nonce;if(a.includes("nonce")&&typeof l>"u"&&d&&i){const x=await u();l=await i.consume({address:d.address,chainId:x,client:e})}o!=null&&o.fn&&((y=o.runAt)!=null&&y.includes("beforeFillTransaction"))&&(n=await o.fn({...n,chain:s},{phase:"beforeFillTransaction"}),l??(l=n.nonce));const p=((a.includes("blobVersionedHashes")||a.includes("sidecars"))&&n.kzg&&n.blobs||ts.get(e.uid)===!1||!["fees","gas"].some(A=>a.includes(A))?!1:!!(a.includes("chainId")&&typeof n.chainId!="number"||a.includes("nonce")&&typeof l!="number"||a.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||a.includes("gas")&&typeof n.gas!="bigint"))?await j(e,lu,"fillTransaction")({...n,nonce:l}).then(x=>{const{chainId:A,from:_,gas:D,gasPrice:O,nonce:v,maxFeePerBlobGas:I,maxFeePerGas:$,maxPriorityFeePerGas:E,type:P,...N}=x.transaction;return ts.set(e.uid,!0),{...n,..._?{from:_}:{},...P?{type:P}:{},...typeof A<"u"?{chainId:A}:{},...typeof D<"u"?{gas:D}:{},...typeof O<"u"?{gasPrice:O}:{},...typeof v<"u"?{nonce:v}:{},...typeof I<"u"?{maxFeePerBlobGas:I}:{},...typeof $<"u"?{maxFeePerGas:$}:{},...typeof E<"u"?{maxPriorityFeePerGas:E}:{},..."nonceKey"in N&&typeof N.nonceKey<"u"?{nonceKey:N.nonceKey}:{}}}).catch(x=>{var D;const A=x;return A.name!=="TransactionExecutionError"||((D=A.walk)==null?void 0:D.call(A,O=>{const v=O;return v.name==="MethodNotFoundRpcError"||v.name==="MethodNotSupportedRpcError"}))&&ts.set(e.uid,!1),n}):n;l??(l=p.nonce),n={...p,...d?{from:d==null?void 0:d.address}:{},...l?{nonce:l}:{}};const{blobs:m,gas:h,kzg:b,type:w}=n;o!=null&&o.fn&&((k=o.runAt)!=null&&k.includes("beforeFillParameters"))&&(n=await o.fn({...n,chain:s},{phase:"beforeFillParameters"}));let S;async function g(){return S||(S=await j(e,Oe,"getBlock")({blockTag:"latest"}),S)}if(a.includes("nonce")&&typeof l>"u"&&d&&!i&&(n.nonce=await j(e,Ui,"getTransactionCount")({address:d.address,blockTag:"pending"})),(a.includes("blobVersionedHashes")||a.includes("sidecars"))&&m&&b){const x=dc({blobs:m,kzg:b});if(a.includes("blobVersionedHashes")){const A=Hf({commitments:x,to:"hex"});n.blobVersionedHashes=A}if(a.includes("sidecars")){const A=lc({blobs:m,commitments:x,kzg:b}),_=Vf({blobs:m,commitments:x,proofs:A,to:"hex"});n.sidecars=_}}if(a.includes("chainId")&&(n.chainId=await u()),(a.includes("fees")||a.includes("type"))&&typeof w>"u")try{n.type=Kf(n)}catch{let x=qa.get(e.uid);if(typeof x>"u"){const A=await g();x=typeof(A==null?void 0:A.baseFeePerGas)=="bigint",qa.set(e.uid,x)}n.type=x?"eip1559":"legacy"}if(a.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const x=await g(),{maxFeePerGas:A,maxPriorityFeePerGas:_}=await Ss(e,{block:x,chain:s,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<_)throw new bm({maxPriorityFeePerGas:_});n.maxPriorityFeePerGas=_,n.maxFeePerGas=A}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new Di;if(typeof n.gasPrice>"u"){const x=await g(),{gasPrice:A}=await Ss(e,{block:x,chain:s,request:n,type:"legacy"});n.gasPrice=A}}return a.includes("gas")&&typeof h>"u"&&(n.gas=await j(e,$i,"estimateGas")({...n,account:d,prepare:(d==null?void 0:d.type)==="local"?[]:["blobVersionedHashes"]})),o!=null&&o.fn&&((T=o.runAt)!=null&&T.includes("afterFillParameters"))&&(n=await o.fn({...n,chain:s},{phase:"afterFillParameters"})),On(n),delete n.parameters,n}async function $i(e,t){var a,o,c;const{account:n=e.account,prepare:r=!0}=t,s=n?ye(n):void 0,i=(()=>{if(Array.isArray(r))return r;if((s==null?void 0:s.type)!=="local")return["blobVersionedHashes"]})();try{const u=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Qc({authorization:t.authorizationList[0]}).catch(()=>{throw new R("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:d,authorizationList:l,blobs:f,blobVersionedHashes:p,blockNumber:m,blockTag:h,data:b,gas:w,gasPrice:S,maxFeePerBlobGas:g,maxFeePerGas:y,maxPriorityFeePerGas:k,nonce:T,value:x,stateOverride:A,..._}=r?await fu(e,{...t,parameters:i,to:u}):t;if(w&&t.gas!==w)return w;const O=(typeof m=="bigint"?M(m):void 0)||h,v=hi(A);On(t);const I=(c=(o=(a=e.chain)==null?void 0:a.formatters)==null?void 0:o.transactionRequest)==null?void 0:c.format,E=(I||kr)({...di(_,{format:I}),account:s,accessList:d,authorizationList:l,blobs:f,blobVersionedHashes:p,data:b,gasPrice:S,maxFeePerBlobGas:g,maxFeePerGas:y,maxPriorityFeePerGas:k,nonce:T,to:u,value:x},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:v?[E,O??e.experimental_blockTag??"latest",v]:O?[E,O]:[E]}))}catch(u){throw ym(u,{...t,account:s,chain:e.chain})}}async function xm(e,t){const{abi:n,address:r,args:s,functionName:i,dataSuffix:a,...o}=t,c=ae({abi:n,args:s,functionName:i});try{return await j(e,$i,"estimateGas")({data:`${c}${a?a.replace("0x",""):""}`,to:r,...o})}catch(u){const d=o.account?ye(o.account):void 0;throw mi(u,{abi:n,address:r,args:s,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:d==null?void 0:d.address})}}async function Em(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}const km=new Map,Sm=new Map;function Am(e){const t=(s,i)=>({clear:()=>i.delete(s),get:()=>i.get(s),set:a=>i.set(s,a)}),n=t(e,km),r=t(e,Sm);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function Im(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=Am(t),s=r.response.get();if(s&&n>0&&Date.now()-s.created.getTime()<n)return s.data;let i=r.promise.get();i||(i=e(),r.promise.set(i));try{const a=await i;return r.response.set({created:new Date,data:a}),a}finally{r.promise.clear()}}const Pm=e=>`blockNumber.${e}`;async function Mn(e,{cacheTime:t=e.cacheTime}={}){const n=await Im(()=>e.request({method:"eth_blockNumber"}),{cacheKey:Pm(e.uid),cacheTime:t});return BigInt(n)}async function _m(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const s=n!==void 0?M(n):void 0;let i;return t?i=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):i=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[s||r]},{dedupe:!!s}),we(i)}const Wa="/docs/contract/decodeEventLog";function or(e){const{abi:t,data:n,strict:r,topics:s}=e,i=r??!0,[a,...o]=s;if(!a)throw new Yl({docsPath:Wa});const c=t.find(h=>h.type==="event"&&a===li(Wo(h)));if(!(c&&"name"in c)||c.type!=="event")throw new Jl(a,{docsPath:Wa});const{name:u,inputs:d}=c,l=d==null?void 0:d.some(h=>!("name"in h&&h.name)),f=l?[]:{},p=d.map((h,b)=>[h,b]).filter(([h])=>"indexed"in h&&h.indexed);for(let h=0;h<p.length;h++){const[b,w]=p[h],S=o[h];if(!S)throw new yi({abiItem:c,param:b});f[l?w:b.name||w]=Tm({param:b,value:S})}const m=d.filter(h=>!("indexed"in h&&h.indexed));if(m.length>0){if(n&&n!=="0x")try{const h=Sr(m,n);if(h)if(l)for(let b=0;b<d.length;b++)f[b]=f[b]??h.shift();else for(let b=0;b<m.length;b++)f[m[b].name]=h[b]}catch(h){if(i)throw h instanceof Ql||h instanceof Xl?new rr({abiItem:c,data:n,params:m,size:yt(n)}):h}else if(i)throw new rr({abiItem:c,data:"0x",params:m,size:0})}return{eventName:u,args:Object.values(f).length>0?f:void 0}}function Tm({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Sr([e],t)||[])[0]}function Fi(e){const{abi:t,args:n,logs:r,strict:s=!0}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return r.map(a=>{var d;const o=t.filter(l=>l.type==="event"&&a.topics[0]===li(l));if(o.length===0)return null;let c,u;for(const l of o)try{c=or({...a,abi:[l],strict:!0}),u=l;break}catch{}if(!c&&!s){u=o[0];try{c=or({...a,abi:[u],strict:!1})}catch{const l=(d=u.inputs)==null?void 0:d.some(f=>!("name"in f&&f.name));return{...a,args:l?[]:{},eventName:u.name}}}return!c||!u||i&&!i.includes(c.eventName)||!Om({args:c.args,inputs:u.inputs,matchArgs:n})?null:{...c,...a}}).filter(Boolean)}function Om(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function s(i,a,o){try{return i.type==="address"?sn(a,o):i.type==="string"||i.type==="bytes"?J(vr(a))===o:a===o}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((i,a)=>{if(i==null)return!0;const o=n[a];return o?(Array.isArray(i)?i:[i]).some(u=>s(o,u,t[a])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([i,a])=>{if(a==null)return!0;const o=n.find(u=>u.name===i);return o?(Array.isArray(a)?a:[a]).some(u=>s(o,u,t[i])):!1}):!1}async function Gi(e,{address:t,blockHash:n,fromBlock:r,toBlock:s,event:i,events:a,args:o,strict:c}={}){const u=c??!1,d=a??(i?[i]:void 0);let l=[];d&&(l=[d.flatMap(h=>Ln({abi:[h],eventName:h.name,args:a?void 0:o}))],i&&(l=l[0]));let f;n?f=await e.request({method:"eth_getLogs",params:[{address:t,topics:l,blockHash:n}]}):f=await e.request({method:"eth_getLogs",params:[{address:t,topics:l,fromBlock:typeof r=="bigint"?M(r):r,toBlock:typeof s=="bigint"?M(s):s}]});const p=f.map(m=>qe(m));return d?Fi({abi:d,args:o,logs:p,strict:u}):p}async function pu(e,t){const{abi:n,address:r,args:s,blockHash:i,eventName:a,fromBlock:o,toBlock:c,strict:u}=t,d=a?qo({abi:n,name:a}):void 0,l=d?void 0:n.filter(f=>f.type==="event");return j(e,Gi,"getLogs")({address:r,args:s,blockHash:i,event:d,events:l,fromBlock:o,toBlock:c,strict:u})}class Cm extends R{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function Bm(e,t){const{address:n,factory:r,factoryData:s}=t;try{const[i,a,o,c,u,d,l]=await j(e,xe,"readContract")({abi:Nm,address:n,functionName:"eip712Domain",factory:r,factoryData:s});return{domain:{name:a,version:o,chainId:Number(c),verifyingContract:u,salt:d},extensions:l,fields:i}}catch(i){const a=i;throw a.name==="ContractFunctionExecutionError"&&a.cause.name==="ContractFunctionZeroDataError"?new Cm({address:n}):a}}const Nm=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];function Lm(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(n=>n.map(r=>BigInt(r)))}}async function Mm(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:s}){const i=typeof n=="bigint"?M(n):void 0,a=await e.request({method:"eth_feeHistory",params:[M(t),i||r,s]},{dedupe:!!i});return Lm(a)}async function Br(e,{filter:t}){const n="strict"in t&&t.strict,r=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof r[0]=="string")return r;const s=r.map(i=>qe(i));return!("abi"in t)||!t.abi?s:Fi({abi:t.abi,logs:s,strict:n})}async function Rm(e,{filter:t}){const n=t.strict??!1,s=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(i=>qe(i));return t.abi?Fi({abi:t.abi,logs:s,strict:n}):s}function Dm(e,t){if(e.length!==t.length)throw new ef({expectedLength:e.length,givenLength:t.length});const n=[];for(let r=0;r<e.length;r++){const s=e[r],i=t[r];n.push(hu(s,i))}return Tn(n)}function hu(e,t,n=!1){if(e==="address"){const a=t;if(!Ot(a))throw new Zo({address:a});return pe(a.toLowerCase(),{size:n?32:null})}if(e==="string")return sr(t);if(e==="bytes")return t;if(e==="bool")return pe(tf(t),{size:n?32:1});const r=e.match(Yo);if(r){const[a,o,c="256"]=r,u=Number.parseInt(c,10)/8;return M(t,{size:n?32:u,signed:o==="int"})}const s=e.match(Jo);if(s){const[a,o]=s;if(Number.parseInt(o,10)!==(t.length-2)/2)throw new Qo({expectedSize:Number.parseInt(o,10),givenSize:(t.length-2)/2});return pe(t,{dir:"right",size:n?32:null})}const i=e.match(nf);if(i&&Array.isArray(t)){const[a,o]=i,c=[];for(let u=0;u<t.length;u++)c.push(hu(o,t[u],!0));return c.length===0?"0x":Tn(c)}throw new rf(e)}function jm(e){const{source:t}=e,n=new Map,r=new Ko(8192),s=new Map,i=({address:a,chainId:o})=>`${a}.${o}`;return{async consume({address:a,chainId:o,client:c}){const u=i({address:a,chainId:o}),d=this.get({address:a,chainId:o,client:c});this.increment({address:a,chainId:o});const l=await d;return await t.set({address:a,chainId:o},l),r.set(u,l),l},async increment({address:a,chainId:o}){const c=i({address:a,chainId:o}),u=n.get(c)??0;n.set(c,u+1)},async get({address:a,chainId:o,client:c}){const u=i({address:a,chainId:o});let d=s.get(u);return d||(d=(async()=>{try{const f=await t.get({address:a,chainId:o,client:c}),p=r.get(u)??0;return p>0&&f<=p?p+1:(r.delete(u),f)}finally{this.reset({address:a,chainId:o})}})(),s.set(u,d)),(n.get(u)??0)+await d},reset({address:a,chainId:o}){const c=i({address:a,chainId:o});n.delete(c),s.delete(c)}}}const Um=`Ethereum Signed Message:
|
|
4
4
|
`;function $m(e){const t=typeof e=="string"?sr(e):typeof e.raw=="string"?e.raw:ze(e.raw),n=sr(`${Um}${yt(t)}`);return He([n,t])}function Nr(e,t){return J($m(e),t)}class Fm extends R{constructor({domain:t}){super(`Invalid domain "${Le(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class Gm extends R{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class Hm extends R{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function zm(e){const{domain:t,message:n,primaryType:r,types:s}=e,i=(a,o)=>{for(const c of a){const{name:u,type:d}=c,l=o[u],f=d.match(Yo);if(f&&(typeof l=="number"||typeof l=="bigint")){const[h,b,w]=f;M(l,{signed:b==="int",size:Number.parseInt(w,10)/8})}if(d==="address"&&typeof l=="string"&&!Ot(l))throw new Zo({address:l});const p=d.match(Jo);if(p){const[h,b]=p;if(b&&yt(l)!==Number.parseInt(b,10))throw new Qo({expectedSize:Number.parseInt(b,10),givenSize:yt(l)})}const m=s[d];m&&(Wm(d),i(m,l))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new Fm({domain:t});i(s.EIP712Domain,t)}if(r!=="EIP712Domain")if(s[r])i(s[r],n);else throw new Gm({primaryType:r,types:s})}function qm({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function Wm(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new Hm({type:e})}function Rn(e){const{domain:t={},message:n,primaryType:r}=e,s={EIP712Domain:qm({domain:t}),...e.types};zm({domain:t,message:n,primaryType:r,types:s});const i=["0x1901"];return t&&i.push(Vm({domain:t,types:s})),r!=="EIP712Domain"&&i.push(mu({data:n,primaryType:r,types:s})),J(He(i))}function Vm({domain:e,types:t}){return mu({data:e,primaryType:"EIP712Domain",types:t})}function mu({data:e,primaryType:t,types:n}){const r=yu({data:e,primaryType:t,types:n});return J(r)}function yu({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],s=[Km({primaryType:t,types:n})];for(const i of n[t]){const[a,o]=gu({types:n,name:i.name,type:i.type,value:e[i.name]});r.push(a),s.push(o)}return nt(r,s)}function Km({primaryType:e,types:t}){const n=ve(Zm({primaryType:e,types:t}));return J(n)}function Zm({primaryType:e,types:t}){let n="";const r=bu({primaryType:e,types:t});r.delete(e);const s=[e,...Array.from(r).sort()];for(const i of s)n+=`${i}(${t[i].map(({name:a,type:o})=>`${o} ${a}`).join(",")})`;return n}function bu({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u),s=r==null?void 0:r[0];if(n.has(s)||t[s]===void 0)return n;n.add(s);for(const i of t[s])bu({primaryType:i.type,types:t},n);return n}function gu({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},J(yu({data:r,primaryType:n,types:e}))];if(n==="bytes")return[{type:"bytes32"},J(r)];if(n==="string")return[{type:"bytes32"},J(ve(r))];if(n.lastIndexOf("]")===n.length-1){const s=n.slice(0,n.lastIndexOf("[")),i=r.map(a=>gu({name:t,type:s,types:e,value:a}));return[{type:"bytes32"},J(nt(i.map(([a])=>a),i.map(([,a])=>a)))]}return[{type:n},r]}const Ym="0x6492649264926492649264926492649264926492649264926492649264926492";function ns(e){const{address:t,data:n,signature:r,to:s="hex"}=e,i=Tn([nt([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,n,r]),Ym]);return s==="hex"?i:Be(i)}function Jm(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function Qm(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?we(e.nonce):void 0,storageProof:e.storageProof?Jm(e.storageProof):void 0}}async function Xm(e,{address:t,blockNumber:n,blockTag:r,storageKeys:s}){const i=r??"latest",a=n!==void 0?M(n):void 0,o=await e.request({method:"eth_getProof",params:[t,s,a||i]});return Qm(o)}async function e0(e,{address:t,blockNumber:n,blockTag:r="latest",slot:s}){const i=n!==void 0?M(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,s,i||r]})}async function Hi(e,{blockHash:t,blockNumber:n,blockTag:r,hash:s,index:i,sender:a,nonce:o}){var f,p,m;const c=r||"latest",u=n!==void 0?M(n):void 0;let d=null;if(s?d=await e.request({method:"eth_getTransactionByHash",params:[s]},{dedupe:!0}):t?d=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,M(i)]},{dedupe:!0}):(u||c)&&typeof i=="number"?d=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[u||c,M(i)]},{dedupe:!!u}):a&&typeof o=="number"&&(d=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[a,M(o)]},{dedupe:!0})),!d)throw new Xo({blockHash:t,blockNumber:n,blockTag:c,hash:s,index:i});return(((m=(p=(f=e.chain)==null?void 0:f.formatters)==null?void 0:p.transaction)==null?void 0:m.format)||gi)(d,"getTransaction")}async function t0(e,{hash:t,transactionReceipt:n}){const[r,s]=await Promise.all([j(e,Mn,"getBlockNumber")({}),t?j(e,Hi,"getTransaction")({hash:t}):void 0]),i=(n==null?void 0:n.blockNumber)||(s==null?void 0:s.blockNumber);return i?r-i+1n:0n}async function Qn(e,{hash:t}){var s,i,a;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new ec({hash:t});return(((a=(i=(s=e.chain)==null?void 0:s.formatters)==null?void 0:i.transactionReceipt)==null?void 0:a.format)||wi)(n,"getTransactionReceipt")}async function As(e,t){const{blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",blocks:s,returnFullTransactions:i,traceTransfers:a,validation:o}=t;try{const c=[];for(const f of s){const p=f.blockOverrides?sf(f.blockOverrides):void 0,m=f.calls.map(b=>{const w=b,S=w.account?ye(w.account):void 0,g=w.abi?ae(w):w.data,y={...w,account:S,data:w.dataSuffix?He([g||"0x",w.dataSuffix]):g,from:w.from??(S==null?void 0:S.address)};return On(y),kr(y)}),h=f.stateOverrides?hi(f.stateOverrides):void 0;c.push({blockOverrides:p,calls:m,stateOverrides:h})}const d=(typeof n=="bigint"?M(n):void 0)||r;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:i,traceTransfers:a,validation:o},d]})).map((f,p)=>({...ac(f),calls:f.calls.map((m,h)=>{var D,O;const{abi:b,args:w,functionName:S,to:g}=s[p].calls[h],y=((D=m.error)==null?void 0:D.data)??m.returnData,k=BigInt(m.gasUsed),T=(O=m.logs)==null?void 0:O.map(v=>qe(v)),x=m.status==="0x1"?"success":"failure",A=b&&x==="success"&&y!=="0x"?Er({abi:b,data:y,functionName:S}):null,_=(()=>{var I;if(x==="success")return;let v;if(((I=m.error)==null?void 0:I.data)==="0x"?v=new af:m.error&&(v=new of(m.error)),!!v)return mi(v,{abi:b??[],address:g??"0x",args:w,functionName:S??"<unknown>"})})();return{data:y,gasUsed:k,logs:T,status:x,...x==="success"?{result:A}:{error:_}}})}))}catch(c){const u=c,d=fi(u,{});throw d instanceof pi?u:d}}function Is(e){let t=!0,n="",r=0,s="",i=!1;for(let a=0;a<e.length;a++){const o=e[a];if(["(",")",","].includes(o)&&(t=!0),o==="("&&r++,o===")"&&r--,!!t){if(r===0){if(o===" "&&["event","function","error",""].includes(s))s="";else if(s+=o,o===")"){i=!0;break}continue}if(o===" "){e[a-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}s+=o,n+=o}}if(!i)throw new K("Unable to normalize signature.");return s}function Ps(e,t){const n=typeof e,r=t.type;switch(r){case"address":return ys(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((s,i)=>Ps(Object.values(e)[i],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(s=>Ps(s,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function wu(e,t,n){for(const r in e){const s=e[r],i=t[r];if(s.type==="tuple"&&i.type==="tuple"&&"components"in s&&"components"in i)return wu(s.components,i.components,n[r]);const a=[s.type,i.type];if(a.includes("address")&&a.includes("bytes20")?!0:a.includes("address")&&a.includes("string")?ys(n[r],{strict:!1}):a.includes("address")&&a.includes("bytes")?ys(n[r],{strict:!1}):!1)return a}}function vu(e,t={}){const{prepare:n=!0}=t,r=Array.isArray(e)||typeof e=="string"?Sa(e):e;return{...r,...n?{hash:Ht(r)}:{}}}function Lr(e,t,n){const{args:r=[],prepare:s=!0}=n??{},i=cf(t,{strict:!1}),a=e.filter(u=>i?u.type==="function"||u.type==="error"?xu(u)===Ge(t,0,4):u.type==="event"?Ht(u)===t:!1:"name"in u&&u.name===t);if(a.length===0)throw new cr({name:t});if(a.length===1)return{...a[0],...s?{hash:Ht(a[0])}:{}};let o;for(const u of a){if(!("inputs"in u))continue;if(!r||r.length===0){if(!u.inputs||u.inputs.length===0)return{...u,...s?{hash:Ht(u)}:{}};continue}if(!u.inputs||u.inputs.length===0||u.inputs.length!==r.length)continue;if(r.every((l,f)=>{const p="inputs"in u&&u.inputs[f];return p?Ps(l,p):!1})){if(o&&"inputs"in o&&o.inputs){const l=wu(u.inputs,o.inputs,r);if(l)throw new r0({abiItem:u,type:l[0]},{abiItem:o,type:l[1]})}o=u}}const c=(()=>{if(o)return o;const[u,...d]=a;return{...u,overloads:d}})();if(!c)throw new cr({name:t});return{...c,...s?{hash:Ht(c)}:{}}}function xu(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return Lr(n,r)}return e[0]})();return Ge(Ht(t),0,4)}function n0(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,s]=e;return Lr(r,s)}return e[0]})(),n=typeof t=="string"?t:ps(t);return Is(n)}function Ht(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return Lr(n,r)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:Sc(ci(n0(t)))}class r0 extends K{constructor(t,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${Is(ps(t.abiItem))}\`, and`,`\`${n.type}\` in \`${Is(ps(n.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class cr extends K{constructor({name:t,data:n,type:r="item"}){const s=t?` with name "${t}"`:n?` with data "${n}"`:"";super(`ABI ${r}${s} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function s0(...e){var i;const[t,n]=(()=>{if(Array.isArray(e[0])){const[a,o]=e;return[a0(a),o]}return e})(),{bytecode:r,args:s}=n;return Ne(r,(i=t.inputs)!=null&&i.length&&(s!=null&&s.length)?Ci(t.inputs,s):"0x")}function i0(e){return vu(e)}function a0(e){const t=e.find(n=>n.type==="constructor");if(!t)throw new cr({name:"constructor"});return t}function o0(...e){const[t,n=[]]=(()=>{if(Array.isArray(e[0])){const[u,d,l]=e;return[Va(u,d,{args:l}),l]}const[o,c]=e;return[o,c]})(),{overloads:r}=t,s=r?Va([t,...r],t.name,{args:n}):t,i=c0(s),a=n.length>0?Ci(s.inputs,n):void 0;return a?Ne(i,a):i}function Ut(e,t={}){return vu(e,t)}function Va(e,t,n){const r=Lr(e,t,n);if(r.type!=="function")throw new cr({name:t,type:"function"});return r}function c0(e){return xu(e)}const u0="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Re="0x0000000000000000000000000000000000000000",d0="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function l0(e,t){const{blockNumber:n,blockTag:r,calls:s,stateOverrides:i,traceAssetChanges:a,traceTransfers:o,validation:c}=t,u=t.account?ye(t.account):void 0;if(a&&!u)throw new R("`account` is required when `traceAssetChanges` is true");const d=u?s0(i0("constructor(bytes, bytes)"),{bytecode:uf,args:[d0,o0(Ut("function getBalance(address)"),[u.address])]}):void 0,l=a?await Promise.all(t.calls.map(async B=>{if(!B.data&&!B.abi)return;const{accessList:U}=await ru(e,{account:u.address,...B,data:B.abi?ae(B):B.data});return U.map(({address:F,storageKeys:V})=>V.length>0?F:null)})).then(B=>B.flat().filter(Boolean)):[],f=await As(e,{blockNumber:n,blockTag:r,blocks:[...a?[{calls:[{data:d}],stateOverrides:i},{calls:l.map((B,U)=>({abi:[Ut("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[u.address],to:B,from:Re,nonce:U})),stateOverrides:[{address:Re,nonce:0}]}]:[],{calls:[...s,{}].map(B=>({...B,from:u==null?void 0:u.address})),stateOverrides:i},...a?[{calls:[{data:d}]},{calls:l.map((B,U)=>({abi:[Ut("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[u.address],to:B,from:Re,nonce:U})),stateOverrides:[{address:Re,nonce:0}]},{calls:l.map((B,U)=>({to:B,abi:[Ut("function decimals() returns (uint256)")],functionName:"decimals",from:Re,nonce:U})),stateOverrides:[{address:Re,nonce:0}]},{calls:l.map((B,U)=>({to:B,abi:[Ut("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:Re,nonce:U})),stateOverrides:[{address:Re,nonce:0}]},{calls:l.map((B,U)=>({to:B,abi:[Ut("function symbol() returns (string)")],functionName:"symbol",from:Re,nonce:U})),stateOverrides:[{address:Re,nonce:0}]}]:[]],traceTransfers:o,validation:c}),p=a?f[2]:f[0],[m,h,,b,w,S,g,y]=a?f:[],{calls:k,...T}=p,x=k.slice(0,-1)??[],A=(m==null?void 0:m.calls)??[],_=(h==null?void 0:h.calls)??[],D=[...A,..._].map(B=>B.status==="success"?se(B.data):null),O=(b==null?void 0:b.calls)??[],v=(w==null?void 0:w.calls)??[],I=[...O,...v].map(B=>B.status==="success"?se(B.data):null),$=((S==null?void 0:S.calls)??[]).map(B=>B.status==="success"?B.result:null),E=((y==null?void 0:y.calls)??[]).map(B=>B.status==="success"?B.result:null),P=((g==null?void 0:g.calls)??[]).map(B=>B.status==="success"?B.result:null),N=[];for(const[B,U]of I.entries()){const F=D[B];if(typeof U!="bigint"||typeof F!="bigint")continue;const V=$[B-1],te=E[B-1],Ie=P[B-1],fe=B===0?{address:u0,decimals:18,symbol:"ETH"}:{address:l[B-1],decimals:Ie||V?Number(V??1):void 0,symbol:te??void 0};N.some(oe=>oe.token.address===fe.address)||N.push({token:fe,value:{pre:F,post:U,diff:U-F}})}return{assetChanges:N,block:T,results:x}}async function f0(e,t){const{abi:n,address:r,args:s,dataSuffix:i,functionName:a,...o}=t,c=o.account?ye(o.account):e.account,u=ae({abi:n,args:s,functionName:a});try{const{data:d}=await j(e,ui,"call")({batch:!1,data:`${u}${i?i.replace("0x",""):""}`,to:r,...o,account:c}),l=Er({abi:n,args:s,functionName:a,data:d||"0x"}),f=n.filter(p=>"name"in p&&p.name===t.functionName);return{result:l,request:{abi:f,address:r,args:s,dataSuffix:i,functionName:a,...o,account:c}}}catch(d){throw mi(d,{abi:n,address:r,args:s,docsPath:"/docs/contract/simulateContract",functionName:a,sender:c==null?void 0:c.address})}}async function Mr(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}async function p0(e,{address:t,message:n,factory:r,factoryData:s,signature:i,...a}){const o=Nr(n);return j(e,Or,"verifyHash")({address:t,factory:r,factoryData:s,hash:o,signature:i,...a})}async function h0(e,t){const{address:n,factory:r,factoryData:s,signature:i,message:a,primaryType:o,types:c,domain:u,...d}=t,l=Rn({message:a,primaryType:o,types:c,domain:u});return j(e,Or,"verifyHash")({address:n,factory:r,factoryData:s,hash:l,signature:i,...d})}const rs=new Map,Ka=new Map;let m0=0;function We(e,t,n){const r=++m0,s=()=>rs.get(e)||[],i=()=>{const d=s();rs.set(e,d.filter(l=>l.id!==r))},a=()=>{const d=s();if(!d.some(f=>f.id===r))return;const l=Ka.get(e);if(d.length===1&&l){const f=l();f instanceof Promise&&f.catch(()=>{})}i()},o=s();if(rs.set(e,[...o,{id:r,fns:t}]),o&&o.length>0)return a;const c={};for(const d in t)c[d]=(...l)=>{var p,m;const f=s();if(f.length!==0)for(const h of f)(m=(p=h.fns)[d])==null||m.call(p,...l)};const u=n(c);return typeof u=="function"&&Ka.set(e,u),a}function Nt(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let s=!0;const i=()=>s=!1;return(async()=>{let o;t&&(o=await e({unpoll:i}));const c=await(n==null?void 0:n(o))??r;await ga(c);const u=async()=>{s&&(await e({unpoll:i}),await ga(r),u())};u()})(),i}function Eu(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:s,poll:i,pollingInterval:a=e.pollingInterval}){const o=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let c;return o?(()=>{const l=Le(["watchBlockNumber",e.uid,t,n,a]);return We(l,{onBlockNumber:r,onError:s},f=>Nt(async()=>{var p;try{const m=await j(e,Mn,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(m===c)return;if(m-c>1&&n)for(let h=c+1n;h<m;h++)f.onBlockNumber(h,c),c=h}(c===void 0||m>c)&&(f.onBlockNumber(m,c),c=m)}catch(m){(p=f.onError)==null||p.call(f,m)}},{emitOnBegin:t,interval:a}))})():(()=>{const l=Le(["watchBlockNumber",e.uid,t,n]);return We(l,{onBlockNumber:r,onError:s},f=>{let p=!0,m=()=>p=!1;return(async()=>{try{const h=(()=>{if(e.transport.type==="fallback"){const w=e.transport.transports.find(S=>S.config.type==="webSocket"||S.config.type==="ipc");return w?w.value:e.transport}return e.transport})(),{unsubscribe:b}=await h.subscribe({params:["newHeads"],onData(w){var g;if(!p)return;const S=se((g=w.result)==null?void 0:g.number);f.onBlockNumber(S,c),c=S},onError(w){var S;(S=f.onError)==null||S.call(f,w)}});m=b,p||m()}catch(h){s==null||s(h)}})(),()=>m()})})()}async function y0(e,t){const{checkReplacement:n=!0,confirmations:r=1,hash:s,onReplaced:i,retryCount:a=6,retryDelay:o=({count:k})=>~~(1<<k)*200,timeout:c=18e4}=t,u=Le(["waitForTransactionReceipt",e.uid,s]),d=(()=>{var k;return t.pollingInterval?t.pollingInterval:(k=e.chain)!=null&&k.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let l,f,p,m=!1,h,b;const{promise:w,resolve:S,reject:g}=tc(),y=c?setTimeout(()=>{b==null||b(),h==null||h(),g(new df({hash:s}))},c):void 0;return h=We(u,{onReplaced:i,resolve:S,reject:g},async k=>{if(p=await j(e,Qn,"getTransactionReceipt")({hash:s}).catch(()=>{}),p&&r<=1){clearTimeout(y),k.resolve(p),h==null||h();return}b=j(e,Eu,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:d,async onBlockNumber(T){const x=_=>{clearTimeout(y),b==null||b(),_(),h==null||h()};let A=T;if(!m)try{if(p){if(r>1&&(!p.blockNumber||A-p.blockNumber+1n<r))return;x(()=>k.resolve(p));return}if(n&&!l&&(m=!0,await hs(async()=>{l=await j(e,Hi,"getTransaction")({hash:s}),l.blockNumber&&(A=l.blockNumber)},{delay:o,retryCount:a}),m=!1),p=await j(e,Qn,"getTransactionReceipt")({hash:s}),r>1&&(!p.blockNumber||A-p.blockNumber+1n<r))return;x(()=>k.resolve(p))}catch(_){if(_ instanceof Xo||_ instanceof ec){if(!l){m=!1;return}try{f=l,m=!0;const D=await hs(()=>j(e,Oe,"getBlock")({blockNumber:A,includeTransactions:!0}),{delay:o,retryCount:a,shouldRetry:({error:I})=>I instanceof cu});m=!1;const O=D.transactions.find(({from:I,nonce:$})=>I===f.from&&$===f.nonce);if(!O||(p=await j(e,Qn,"getTransactionReceipt")({hash:O.hash}),r>1&&(!p.blockNumber||A-p.blockNumber+1n<r)))return;let v="replaced";O.to===f.to&&O.value===f.value&&O.input===f.input?v="repriced":O.from===O.to&&O.value===0n&&(v="cancelled"),x(()=>{var I;(I=k.onReplaced)==null||I.call(k,{reason:v,replacedTransaction:f,transaction:O,transactionReceipt:p}),k.resolve(p)})}catch(D){x(()=>k.reject(D))}}else x(()=>k.reject(_))}}})}),w}function b0(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:s,onError:i,includeTransactions:a,poll:o,pollingInterval:c=e.pollingInterval}){const u=typeof o<"u"?o:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),d=a??!1;let l;return u?(()=>{const m=Le(["watchBlocks",e.uid,t,n,r,d,c]);return We(m,{onBlock:s,onError:i},h=>Nt(async()=>{var b;try{const w=await j(e,Oe,"getBlock")({blockTag:t,includeTransactions:d});if(w.number!==null&&(l==null?void 0:l.number)!=null){if(w.number===l.number)return;if(w.number-l.number>1&&n)for(let S=(l==null?void 0:l.number)+1n;S<w.number;S++){const g=await j(e,Oe,"getBlock")({blockNumber:S,includeTransactions:d});h.onBlock(g,l),l=g}}((l==null?void 0:l.number)==null||t==="pending"&&(w==null?void 0:w.number)==null||w.number!==null&&w.number>l.number)&&(h.onBlock(w,l),l=w)}catch(w){(b=h.onError)==null||b.call(h,w)}},{emitOnBegin:r,interval:c}))})():(()=>{let m=!0,h=!0,b=()=>m=!1;return(async()=>{try{r&&j(e,Oe,"getBlock")({blockTag:t,includeTransactions:d}).then(g=>{m&&h&&(s(g,void 0),h=!1)}).catch(i);const w=(()=>{if(e.transport.type==="fallback"){const g=e.transport.transports.find(y=>y.config.type==="webSocket"||y.config.type==="ipc");return g?g.value:e.transport}return e.transport})(),{unsubscribe:S}=await w.subscribe({params:["newHeads"],async onData(g){var k;if(!m)return;const y=await j(e,Oe,"getBlock")({blockNumber:(k=g.result)==null?void 0:k.number,includeTransactions:d}).catch(()=>{});m&&(s(y,l),h=!1,l=y)},onError(g){i==null||i(g)}});b=S,m||b()}catch(w){i==null||i(w)}})(),()=>b()})()}function g0(e,t){const{abi:n,address:r,args:s,batch:i=!0,eventName:a,fromBlock:o,onError:c,onLogs:u,poll:d,pollingInterval:l=e.pollingInterval,strict:f}=t;return(typeof d<"u"?d:typeof o=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{const b=f??!1,w=Le(["watchContractEvent",r,s,i,e.uid,a,l,b,o]);return We(w,{onLogs:u,onError:c},S=>{let g;o!==void 0&&(g=o-1n);let y,k=!1;const T=Nt(async()=>{var x;if(!k){try{y=await j(e,su,"createContractEventFilter")({abi:n,address:r,args:s,eventName:a,strict:b,fromBlock:o})}catch{}k=!0;return}try{let A;if(y)A=await j(e,Br,"getFilterChanges")({filter:y});else{const _=await j(e,Mn,"getBlockNumber")({});g&&g<_?A=await j(e,pu,"getContractEvents")({abi:n,address:r,args:s,eventName:a,fromBlock:g+1n,toBlock:_,strict:b}):A=[],g=_}if(A.length===0)return;if(i)S.onLogs(A);else for(const _ of A)S.onLogs([_])}catch(A){y&&A instanceof nc&&(k=!1),(x=S.onError)==null||x.call(S,A)}},{emitOnBegin:!0,interval:l});return async()=>{y&&await j(e,Mr,"uninstallFilter")({filter:y}),T()}})})():(()=>{const b=f??!1,w=Le(["watchContractEvent",r,s,i,e.uid,a,l,b]);let S=!0,g=()=>S=!1;return We(w,{onLogs:u,onError:c},y=>((async()=>{try{const k=(()=>{if(e.transport.type==="fallback"){const A=e.transport.transports.find(_=>_.config.type==="webSocket"||_.config.type==="ipc");return A?A.value:e.transport}return e.transport})(),T=a?Ln({abi:n,eventName:a,args:s}):[],{unsubscribe:x}=await k.subscribe({params:["logs",{address:r,topics:T}],onData(A){var D;if(!S)return;const _=A.result;try{const{eventName:O,args:v}=or({abi:n,data:_.data,topics:_.topics,strict:f}),I=qe(_,{args:v,eventName:O});y.onLogs([I])}catch(O){let v,I;if(O instanceof rr||O instanceof yi){if(f)return;v=O.abiItem.name,I=(D=O.abiItem.inputs)==null?void 0:D.some(E=>!("name"in E&&E.name))}const $=qe(_,{args:I?[]:{},eventName:v});y.onLogs([$])}},onError(A){var _;(_=y.onError)==null||_.call(y,A)}});g=x,S||g()}catch(k){c==null||c(k)}})(),()=>g()))})()}function w0(e,{address:t,args:n,batch:r=!0,event:s,events:i,fromBlock:a,onError:o,onLogs:c,poll:u,pollingInterval:d=e.pollingInterval,strict:l}){const f=typeof u<"u"?u:typeof a=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),p=l??!1;return f?(()=>{const b=Le(["watchEvent",t,n,r,e.uid,s,d,a]);return We(b,{onLogs:c,onError:o},w=>{let S;a!==void 0&&(S=a-1n);let g,y=!1;const k=Nt(async()=>{var T;if(!y){try{g=await j(e,iu,"createEventFilter")({address:t,args:n,event:s,events:i,strict:p,fromBlock:a})}catch{}y=!0;return}try{let x;if(g)x=await j(e,Br,"getFilterChanges")({filter:g});else{const A=await j(e,Mn,"getBlockNumber")({});S&&S!==A?x=await j(e,Gi,"getLogs")({address:t,args:n,event:s,events:i,fromBlock:S+1n,toBlock:A}):x=[],S=A}if(x.length===0)return;if(r)w.onLogs(x);else for(const A of x)w.onLogs([A])}catch(x){g&&x instanceof nc&&(y=!1),(T=w.onError)==null||T.call(w,x)}},{emitOnBegin:!0,interval:d});return async()=>{g&&await j(e,Mr,"uninstallFilter")({filter:g}),k()}})})():(()=>{let b=!0,w=()=>b=!1;return(async()=>{try{const S=(()=>{if(e.transport.type==="fallback"){const T=e.transport.transports.find(x=>x.config.type==="webSocket"||x.config.type==="ipc");return T?T.value:e.transport}return e.transport})(),g=i??(s?[s]:void 0);let y=[];g&&(y=[g.flatMap(x=>Ln({abi:[x],eventName:x.name,args:n}))],s&&(y=y[0]));const{unsubscribe:k}=await S.subscribe({params:["logs",{address:t,topics:y}],onData(T){var A;if(!b)return;const x=T.result;try{const{eventName:_,args:D}=or({abi:g??[],data:x.data,topics:x.topics,strict:p}),O=qe(x,{args:D,eventName:_});c([O])}catch(_){let D,O;if(_ instanceof rr||_ instanceof yi){if(l)return;D=_.abiItem.name,O=(A=_.abiItem.inputs)==null?void 0:A.some(I=>!("name"in I&&I.name))}const v=qe(x,{args:O?[]:{},eventName:D});c([v])}},onError(T){o==null||o(T)}});w=k,b||w()}catch(S){o==null||o(S)}})(),()=>w()})()}function v0(e,{batch:t=!0,onError:n,onTransactions:r,poll:s,pollingInterval:i=e.pollingInterval}){return(typeof s<"u"?s:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{const u=Le(["watchPendingTransactions",e.uid,t,i]);return We(u,{onTransactions:r,onError:n},d=>{let l;const f=Nt(async()=>{var p;try{if(!l)try{l=await j(e,au,"createPendingTransactionFilter")({});return}catch(h){throw f(),h}const m=await j(e,Br,"getFilterChanges")({filter:l});if(m.length===0)return;if(t)d.onTransactions(m);else for(const h of m)d.onTransactions([h])}catch(m){(p=d.onError)==null||p.call(d,m)}},{emitOnBegin:!0,interval:i});return async()=>{l&&await j(e,Mr,"uninstallFilter")({filter:l}),f()}})})():(()=>{let u=!0,d=()=>u=!1;return(async()=>{try{const{unsubscribe:l}=await e.transport.subscribe({params:["newPendingTransactions"],onData(f){if(!u)return;const p=f.result;r([p])},onError(f){n==null||n(f)}});d=l,u||d()}catch(l){n==null||n(l)}})(),()=>d()})()}async function x0(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const E0="0x5792579257925792579257925792579257925792579257925792579257925792",k0=M(0,{size:32});async function S0(e,t){async function n(d){if(d.endsWith(E0.slice(2))){const f=nr(wa(d,-64,-32)),p=wa(d,0,-64).slice(2).match(/.{1,64}/g),m=await Promise.all(p.map(b=>k0.slice(2)!==b?e.request({method:"eth_getTransactionReceipt",params:[`0x${b}`]},{dedupe:!0}):void 0)),h=m.some(b=>b===null)?100:m.every(b=>(b==null?void 0:b.status)==="0x1")?200:m.every(b=>(b==null?void 0:b.status)==="0x0")?500:600;return{atomic:!1,chainId:we(f),receipts:m.filter(Boolean),status:h,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[d]})}const{atomic:r=!1,chainId:s,receipts:i,version:a="2.0.0",...o}=await n(t.id),[c,u]=(()=>{const d=o.status;return d>=100&&d<200?["pending",d]:d>=200&&d<300?["success",d]:d>=300&&d<700?["failure",d]:d==="CONFIRMED"?["success",200]:d==="PENDING"?["pending",100]:[void 0,d]})();return{...o,atomic:r,chainId:s?we(s):void 0,receipts:(i==null?void 0:i.map(d=>({...d,blockNumber:se(d.blockNumber),gasUsed:se(d.gasUsed),status:oc[d.status]})))??[],statusCode:u,status:c,version:a}}async function A0(e,t){var c;const{account:n=e.account,chainId:r,nonce:s}=t;if(!n)throw new Ar({docsPath:"/docs/eip7702/prepareAuthorization"});const i=ye(n),a=(()=>{if(t.executor)return t.executor==="self"?t.executor:ye(t.executor)})(),o={address:t.contractAddress??t.address,chainId:r,nonce:s};return typeof o.chainId>"u"&&(o.chainId=((c=e.chain)==null?void 0:c.id)??await j(e,on,"getChainId")({})),typeof o.nonce>"u"&&(o.nonce=await j(e,Ui,"getTransactionCount")({address:i.address,blockTag:"pending"}),(a==="self"||a!=null&&a.address&&sn(a.address,i.address))&&(o.nonce+=1)),o}class I0 extends R{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}async function ku(e,t){const{id:n,pollingInterval:r=e.pollingInterval,status:s=({statusCode:h})=>h===200||h>=300,retryCount:i=4,retryDelay:a=({count:h})=>~~(1<<h)*200,timeout:o=6e4,throwOnFailure:c=!1}=t,u=Le(["waitForCallsStatus",e.uid,n]),{promise:d,resolve:l,reject:f}=tc();let p;const m=We(u,{resolve:l,reject:f},h=>{const b=Nt(async()=>{const w=S=>{clearTimeout(p),b(),S(),m()};try{const S=await hs(async()=>{const g=await j(e,S0,"getCallsStatus")({id:n});if(c&&g.status==="failure")throw new I0(g);return g},{retryCount:i,delay:a});if(!s(S))return;w(()=>h.resolve(S))}catch(S){w(()=>h.reject(S))}},{interval:r,emitOnBegin:!0});return b});return p=o?setTimeout(()=>{m(),clearTimeout(p),f(new P0({id:n}))},o):void 0,await d}class P0 extends R{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}async function _0(e,{serializedTransaction:t,throwOnReceiptRevert:n,timeout:r}){var o,c,u;const s=await e.request({method:"eth_sendRawTransactionSync",params:r?[t,M(r)]:[t]},{retryCount:0}),a=(((u=(c=(o=e.chain)==null?void 0:o.formatters)==null?void 0:c.transactionReceipt)==null?void 0:u.format)||wi)(s);if(a.status==="reverted"&&n)throw new lf({receipt:a});return a}function T0(e){var l,f,p;const{scheme:t,statement:n,...r}=((l=e.match(O0))==null?void 0:l.groups)??{},{chainId:s,expirationTime:i,issuedAt:a,notBefore:o,requestId:c,...u}=((f=e.match(C0))==null?void 0:f.groups)??{},d=(p=e.split("Resources:")[1])==null?void 0:p.split(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as k,i as O}from"./index-FMsmThma.js";import"./index-m9AvnFPE.js";import"./inherits_browser-BlmhoU4v.js";function p(a,t){return Object.keys(t).reduce(function(e,i){if(i.startsWith(a)){var r=i.substr(a.length);e[r]=t[i]}return e},{})}function C(a,t){var e=document.createElement("a");e.href=t;var i=e.search.slice(1),r=i.split("&").reduce(function(v,P){var j=P.split("="),b=j[0],S=j[1];return v[b]=k(S),v},{}),s=[],f=r.ajs_uid,m=r.ajs_event,c=r.ajs_aid,n=O(a.options.useQueryString)?a.options.useQueryString:{},u=n.aid,l=u===void 0?/.+/:u,_=n.uid,A=_===void 0?/.+/:_;if(c){var d=Array.isArray(r.ajs_aid)?r.ajs_aid[0]:r.ajs_aid;l.test(d)&&a.setAnonymousId(d)}if(f){var o=Array.isArray(r.ajs_uid)?r.ajs_uid[0]:r.ajs_uid;if(A.test(o)){var g=p("ajs_trait_",r);s.push(a.identify(o,g))}}if(m){var h=Array.isArray(r.ajs_event)?r.ajs_event[0]:r.ajs_event,y=p("ajs_prop_",r);s.push(a.track(h,y))}return Promise.all(s)}export{C as queryString};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__fileDeps=["assets/index.umd-Du5YokXV.js","assets/index-m9AvnFPE.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{d as n,e as o,g as a}from"./index-m9AvnFPE.js";function u(i){return n(this,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:return[4,a(()=>import("./index.umd-Du5YokXV.js").then(r=>r.i),__vite__mapDeps([0,1]))];case 1:return e=t.sent(),i._plugins=e,[2]}})})}export{u as loadLegacyVideoPlugins};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var H={exports:{}};(function(I,P){/*! For license information please see tsub.js.LICENSE.txt */(function(S,E){I.exports=E()})(self,function(){return function(){var S={2870:function(r,t,n){var e=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.Store=t.matches=t.transform=void 0;var i=n(4303);Object.defineProperty(t,"transform",{enumerable:!0,get:function(){return e(i).default}});var o=n(2370);Object.defineProperty(t,"matches",{enumerable:!0,get:function(){return e(o).default}});var f=n(1444);Object.defineProperty(t,"Store",{enumerable:!0,get:function(){return e(f).default}})},2370:function(r,t,n){var e=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});var i=e(n(7843));function o(a,c){if(!Array.isArray(a))return f(a,c)===!0;var l,A,v,g,b=a[0];switch(b){case"!":return!o(a[1],c);case"or":for(var y=1;y<a.length;y++)if(o(a[y],c))return!0;return!1;case"and":for(y=1;y<a.length;y++)if(!o(a[y],c))return!1;return!0;case"=":case"!=":return function(p,h,w,_){switch(u(p)&&(p=o(p,_)),u(h)&&(h=o(h,_)),typeof p=="object"&&typeof h=="object"&&(p=JSON.stringify(p),h=JSON.stringify(h)),w){case"=":return p===h;case"!=":return p!==h;default:throw new Error("Invalid operator in compareItems: ".concat(w))}}(f(a[1],c),f(a[2],c),b,c);case"<=":case"<":case">":case">=":return function(p,h,w,_){if(u(p)&&(p=o(p,_)),u(h)&&(h=o(h,_)),typeof p!="number"||typeof h!="number")return!1;switch(w){case"<=":return p<=h;case">=":return p>=h;case"<":return p<h;case">":return p>h;default:throw new Error("Invalid operator in compareNumbers: ".concat(w))}}(f(a[1],c),f(a[2],c),b,c);case"in":return function(p,h,w){return h.find(function(_){return f(_,w)===p})!==void 0}(f(a[1],c),f(a[2],c),c);case"contains":return v=f(a[1],c),g=f(a[2],c),typeof v=="string"&&typeof g=="string"&&v.indexOf(g)!==-1;case"match":return l=f(a[1],c),A=f(a[2],c),typeof l=="string"&&typeof A=="string"&&function(p,h){var w,_;n:for(;p.length>0;){var j,k;if(j=(w=s(p)).star,k=w.chunk,p=w.pattern,j&&k==="")return!0;var N=d(k,h),U=N.t,M=N.ok,F=N.err;if(F)return!1;if(!M||!(U.length===0||p.length>0)){if(j)for(var T=0;T<h.length;T++){if(U=(_=d(k,h.slice(T+1))).t,M=_.ok,F=_.err,M){if(p.length===0&&U.length>0)continue;h=U;continue n}if(F)return!1}return!1}h=U}return h.length===0}(A,l);case"lowercase":var x=f(a[1],c);return typeof x!="string"?null:x.toLowerCase();case"typeof":return typeof f(a[1],c);case"length":return function(p){return p===null?0:Array.isArray(p)||typeof p=="string"?p.length:NaN}(f(a[1],c));default:throw new Error("FQL IR could not evaluate for token: ".concat(b))}}function f(a,c){return Array.isArray(a)?a:typeof a=="object"?a.value:(0,i.default)(c,a)}function u(a){return!!Array.isArray(a)&&((a[0]==="lowercase"||a[0]==="length"||a[0]==="typeof")&&a.length===2||(a[0]==="contains"||a[0]==="match")&&a.length===3)}function s(a){for(var c={star:!1,chunk:"",pattern:""};a.length>0&&a[0]==="*";)a=a.slice(1),c.star=!0;var l,A=!1;n:for(l=0;l<a.length;l++)switch(a[l]){case"\\":l+1<a.length&&l++;break;case"[":A=!0;break;case"]":A=!1;break;case"*":if(!A)break n}return c.chunk=a.slice(0,l),c.pattern=a.slice(l),c}function d(a,c){for(var l,A,v={t:"",ok:!1,err:!1};a.length>0;){if(c.length===0)return v;switch(a[0]){case"[":var g=c[0];c=c.slice(1);var b=!0;(a=a.slice(1)).length>0&&a[0]==="^"&&(b=!1,a=a.slice(1));for(var y=!1,x=0;;){if(a.length>0&&a[0]==="]"&&x>0){a=a.slice(1);break}var p,h="";if(p=(l=m(a)).char,a=l.newChunk,l.err||(h=p,a[0]==="-"&&(h=(A=m(a.slice(1))).char,a=A.newChunk,A.err)))return v;p<=g&&g<=h&&(y=!0),x++}if(y!==b)return v;break;case"?":c=c.slice(1),a=a.slice(1);break;case"\\":if((a=a.slice(1)).length===0)return v.err=!0,v;default:if(a[0]!==c[0])return v;c=c.slice(1),a=a.slice(1)}}return v.t=c,v.ok=!0,v.err=!1,v}function m(a){var c={char:"",newChunk:"",err:!1};return a.length===0||a[0]==="-"||a[0]==="]"||a[0]==="\\"&&(a=a.slice(1)).length===0?(c.err=!0,c):(c.char=a[0],c.newChunk=a.slice(1),c.newChunk.length===0&&(c.err=!0),c)}t.default=function(a,c){if(!c)throw new Error("No matcher supplied!");switch(c.type){case"all":return!0;case"fql":return function(l,A){if(!l)return!1;try{l=JSON.parse(l)}catch(g){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(l,'": ').concat(g))}var v=o(l,A);return typeof v=="boolean"&&v}(c.ir,a);default:throw new Error("Matcher of type ".concat(c.type," unsupported."))}}},1444:function(r,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(i){this.rules=[],this.rules=i||[]}return e.prototype.getRulesByDestinationName=function(i){for(var o=[],f=0,u=this.rules;f<u.length;f++){var s=u[f];s.destinationName!==i&&s.destinationName!==void 0||o.push(s)}return o},e}();t.default=n},4303:function(r,t,n){var e=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(t,"__esModule",{value:!0});var i=e(n(374)),o=e(n(7843)),f=e(n(5500)),u=n(9014),s=n(4966);function d(v,g){a(v,g.drop,function(b,y){y.forEach(function(x){return delete b[x]})})}function m(v,g){a(v,g.allow,function(b,y){Object.keys(b).forEach(function(x){y.includes(x)||delete b[x]})})}function a(v,g,b){Object.entries(g).forEach(function(y){var x=y[0],p=y[1],h=function(_){typeof _=="object"&&_!==null&&b(_,p)},w=x===""?v:(0,o.default)(v,x);Array.isArray(w)?w.forEach(h):h(w)})}function c(v,g){var b=JSON.parse(JSON.stringify(v));for(var y in g.map)if(g.map.hasOwnProperty(y)){var x=g.map[y],p=y.split("."),h=void 0;if(p.length>1?(p.pop(),h=(0,o.default)(b,p.join("."))):h=v,typeof h=="object"){if(x.copy){var w=(0,o.default)(b,x.copy);w!==void 0&&(0,u.dset)(v,y,w)}else if(x.move){var _=(0,o.default)(b,x.move);_!==void 0&&(0,u.dset)(v,y,_),(0,s.unset)(v,x.move)}else x.hasOwnProperty("set")&&(0,u.dset)(v,y,x.set);if(x.to_string){var j=(0,o.default)(v,y);if(typeof j=="string"||typeof j=="object"&&j!==null)continue;j!==void 0?(0,u.dset)(v,y,JSON.stringify(j)):(0,u.dset)(v,y,"undefined")}}}}function l(v,g){return!(g.sample.percent<=0)&&(g.sample.percent>=1||(g.sample.path?function(y,x){var p=(0,o.default)(y,x.sample.path),h=(0,i.default)(JSON.stringify(p)),w=-64,_=[];A(h.slice(0,8),_);for(var j=0,k=0;k<64&&_[k]!==1;k++)j++;if(j!==0){var N=[];A(h.slice(9,16),N),w-=j,_.splice(0,j),N.splice(64-j),_=_.concat(N)}return _[63]=_[63]===0?1:0,(0,f.default)(parseInt(_.join(""),2),w)<x.sample.percent}(v,g):(b=g.sample.percent,Math.random()<=b)));var b}function A(v,g){for(var b=0;b<8;b++)for(var y=v[b],x=128;x>=1;x/=2)y-x>=0?(y-=x,g.push(1)):g.push(0)}t.default=function(v,g){for(var b=v,y=0,x=g;y<x.length;y++){var p=x[y];switch(p.type){case"drop":return null;case"drop_properties":d(b,p.config);break;case"allow_properties":m(b,p.config);break;case"sample_event":if(l(b,p.config))break;return null;case"map_properties":c(b,p.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(p.type,'" is unsupported.'))}}return b}},4966:function(r,t,n){var e=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(t,"__esModule",{value:!0}),t.unset=void 0;var i=e(n(7843));t.unset=function(o,f){if((0,i.default)(o,f)){for(var u=f.split("."),s=u.pop();u.length&&u[u.length-1].slice(-1)==="\\";)s=u.pop().slice(0,-1)+"."+s;for(;u.length;)o=o[f=u.shift()];return delete o[s]}return!0}},9014:function(r,t){t.dset=function(n,e,i){e.split&&(e=e.split("."));for(var o,f,u=0,s=e.length,d=n;u<s&&(f=e[u++])!=="__proto__"&&f!=="constructor"&&f!=="prototype";)d=d[f]=u===s?i:typeof(o=d[f])==typeof e?o:0*e[u]!=0||~(""+e[u]).indexOf(".")?{}:[]}},3304:function(r){var t=typeof Float64Array=="function"?Float64Array:void 0;r.exports=t},7382:function(r,t,n){var e,i=n(5569),o=n(3304),f=n(8482);e=i()?o:f,r.exports=e},8482:function(r){r.exports=function(){throw new Error("not implemented")}},6322:function(r,t,n){var e,i=n(2508),o=n(5679),f=n(882);e=i()?o:f,r.exports=e},882:function(r){r.exports=function(){throw new Error("not implemented")}},5679:function(r){var t=typeof Uint16Array=="function"?Uint16Array:void 0;r.exports=t},4773:function(r,t,n){var e,i=n(9773),o=n(3004),f=n(3078);e=i()?o:f,r.exports=e},3078:function(r){r.exports=function(){throw new Error("not implemented")}},3004:function(r){var t=typeof Uint32Array=="function"?Uint32Array:void 0;r.exports=t},7980:function(r,t,n){var e,i=n(8114),o=n(6737),f=n(3357);e=i()?o:f,r.exports=e},3357:function(r){r.exports=function(){throw new Error("not implemented")}},6737:function(r){var t=typeof Uint8Array=="function"?Uint8Array:void 0;r.exports=t},2684:function(r){var t=typeof Float64Array=="function"?Float64Array:null;r.exports=t},5569:function(r,t,n){var e=n(3876);r.exports=e},3876:function(r,t,n){var e=n(1448),i=n(2684);r.exports=function(){var o,f;if(typeof i!="function")return!1;try{f=new i([1,3.14,-3.14,NaN]),o=e(f)&&f[0]===1&&f[1]===3.14&&f[2]===-3.14&&f[3]!=f[3]}catch{o=!1}return o}},9048:function(r,t,n){var e=n(3763);r.exports=e},3763:function(r){var t=Object.prototype.hasOwnProperty;r.exports=function(n,e){return n!=null&&t.call(n,e)}},7009:function(r,t,n){var e=n(6784);r.exports=e},6784:function(r){r.exports=function(){return typeof Symbol=="function"&&typeof Symbol("foo")=="symbol"}},3123:function(r,t,n){var e=n(8481);r.exports=e},8481:function(r,t,n){var e=n(7009)();r.exports=function(){return e&&typeof Symbol.toStringTag=="symbol"}},2508:function(r,t,n){var e=n(3403);r.exports=e},3403:function(r,t,n){var e=n(768),i=n(9668),o=n(187);r.exports=function(){var f,u;if(typeof o!="function")return!1;try{u=new o(u=[1,3.14,-3.14,i+1,i+2]),f=e(u)&&u[0]===1&&u[1]===3&&u[2]===i-2&&u[3]===0&&u[4]===1}catch{f=!1}return f}},187:function(r){var t=typeof Uint16Array=="function"?Uint16Array:null;r.exports=t},9773:function(r,t,n){var e=n(2822);r.exports=e},2822:function(r,t,n){var e=n(2744),i=n(3899),o=n(746);r.exports=function(){var f,u;if(typeof o!="function")return!1;try{u=new o(u=[1,3.14,-3.14,i+1,i+2]),f=e(u)&&u[0]===1&&u[1]===3&&u[2]===i-2&&u[3]===0&&u[4]===1}catch{f=!1}return f}},746:function(r){var t=typeof Uint32Array=="function"?Uint32Array:null;r.exports=t},8114:function(r,t,n){var e=n(8066);r.exports=e},8066:function(r,t,n){var e=n(8279),i=n(3443),o=n(2731);r.exports=function(){var f,u;if(typeof o!="function")return!1;try{u=new o(u=[1,3.14,-3.14,i+1,i+2]),f=e(u)&&u[0]===1&&u[1]===3&&u[2]===i-2&&u[3]===0&&u[4]===1}catch{f=!1}return f}},2731:function(r){var t=typeof Uint8Array=="function"?Uint8Array:null;r.exports=t},1448:function(r,t,n){var e=n(1453);r.exports=e},1453:function(r,t,n){var e=n(6208),i=typeof Float64Array=="function";r.exports=function(o){return i&&o instanceof Float64Array||e(o)==="[object Float64Array]"}},9331:function(r,t,n){var e=n(7980),i={uint16:n(6322),uint8:e};r.exports=i},5902:function(r,t,n){var e=n(4106);r.exports=e},4106:function(r,t,n){var e,i,o=n(9331);(i=new o.uint16(1))[0]=4660,e=new o.uint8(i.buffer)[0]===52,r.exports=e},768:function(r,t,n){var e=n(3823);r.exports=e},3823:function(r,t,n){var e=n(6208),i=typeof Uint16Array=="function";r.exports=function(o){return i&&o instanceof Uint16Array||e(o)==="[object Uint16Array]"}},2744:function(r,t,n){var e=n(2326);r.exports=e},2326:function(r,t,n){var e=n(6208),i=typeof Uint32Array=="function";r.exports=function(o){return i&&o instanceof Uint32Array||e(o)==="[object Uint32Array]"}},8279:function(r,t,n){var e=n(208);r.exports=e},208:function(r,t,n){var e=n(6208),i=typeof Uint8Array=="function";r.exports=function(o){return i&&o instanceof Uint8Array||e(o)==="[object Uint8Array]"}},6315:function(r){r.exports=1023},1686:function(r){r.exports=2147483647},3105:function(r){r.exports=2146435072},3449:function(r){r.exports=2147483648},6988:function(r){r.exports=-1023},9777:function(r){r.exports=1023},3690:function(r){r.exports=-1074},2918:function(r,t,n){var e=n(4772).NEGATIVE_INFINITY;r.exports=e},4165:function(r){var t=Number.POSITIVE_INFINITY;r.exports=t},6488:function(r){r.exports=22250738585072014e-324},9668:function(r){r.exports=65535},3899:function(r){r.exports=4294967295},3443:function(r){r.exports=255},7011:function(r,t,n){var e=n(812);r.exports=e},812:function(r,t,n){var e=n(4165),i=n(2918);r.exports=function(o){return o===e||o===i}},1883:function(r,t,n){var e=n(1797);r.exports=e},1797:function(r){r.exports=function(t){return t!=t}},513:function(r,t,n){var e=n(5760);r.exports=e},5760:function(r){r.exports=function(t){return Math.abs(t)}},5848:function(r,t,n){var e=n(677);r.exports=e},677:function(r,t,n){var e=n(3449),i=n(1686),o=n(7838),f=n(1921),u=n(2490),s=[0,0];r.exports=function(d,m){var a,c;return o.assign(d,s,1,0),a=s[0],a&=i,c=f(m),u(a|=c&=e,s[1])}},5500:function(r,t,n){var e=n(8397);r.exports=e},8397:function(r,t,n){var e=n(4165),i=n(2918),o=n(6315),f=n(9777),u=n(6988),s=n(3690),d=n(1883),m=n(7011),a=n(5848),c=n(4948),l=n(8478),A=n(7838),v=n(2490),g=[0,0],b=[0,0];r.exports=function(y,x){var p,h;return y===0||d(y)||m(y)?y:(c(g,y),x+=g[1],(x+=l(y=g[0]))<s?a(0,y):x>f?y<0?i:e:(x<=u?(x+=52,h=2220446049250313e-31):h=1,A(b,y),p=b[0],p&=2148532223,h*v(p|=x+o<<20,b[1])))}},4772:function(r,t,n){var e=n(7548);r.exports=e},7548:function(r){r.exports=Number},8478:function(r,t,n){var e=n(4500);r.exports=e},4500:function(r,t,n){var e=n(1921),i=n(3105),o=n(6315);r.exports=function(f){var u=e(f);return(u=(u&i)>>>20)-o|0}},2490:function(r,t,n){var e=n(9639);r.exports=e},4445:function(r,t,n){var e,i,o;n(5902)===!0?(i=1,o=0):(i=0,o=1),e={HIGH:i,LOW:o},r.exports=e},9639:function(r,t,n){var e=n(4773),i=n(7382),o=n(4445),f=new i(1),u=new e(f.buffer),s=o.HIGH,d=o.LOW;r.exports=function(m,a){return u[s]=m,u[d]=a,f[0]}},5646:function(r,t,n){var e;e=n(5902)===!0?1:0,r.exports=e},1921:function(r,t,n){var e=n(6285);r.exports=e},6285:function(r,t,n){var e=n(4773),i=n(7382),o=n(5646),f=new i(1),u=new e(f.buffer);r.exports=function(s){return f[0]=s,u[o]}},9024:function(r,t,n){var e=n(6488),i=n(7011),o=n(1883),f=n(513);r.exports=function(u,s,d,m){return o(u)||i(u)?(s[m]=u,s[m+d]=0,s):u!==0&&f(u)<e?(s[m]=4503599627370496*u,s[m+d]=-52,s):(s[m]=u,s[m+d]=0,s)}},4948:function(r,t,n){var e=n(7576),i=n(9422);e(i,"assign",n(9024)),r.exports=i},9422:function(r,t,n){var e=n(9024);r.exports=function(i){return e(i,[0,0],1,0)}},5239:function(r,t,n){var e=n(4773),i=n(7382),o=n(5782),f=new i(1),u=new e(f.buffer),s=o.HIGH,d=o.LOW;r.exports=function(m,a,c,l){return f[0]=m,a[l]=u[s],a[l+c]=u[d],a}},7838:function(r,t,n){var e=n(7576),i=n(4010);e(i,"assign",n(5239)),r.exports=i},5782:function(r,t,n){var e,i,o;n(5902)===!0?(i=1,o=0):(i=0,o=1),e={HIGH:i,LOW:o},r.exports=e},4010:function(r,t,n){var e=n(5239);r.exports=function(i){return e(i,[0,0],1,0)}},7576:function(r,t,n){var e=n(7063);r.exports=e},7063:function(r,t,n){var e=n(6691);r.exports=function(i,o,f){e(i,o,{configurable:!1,enumerable:!1,writable:!1,value:f})}},2073:function(r){var t=Object.defineProperty;r.exports=t},1680:function(r){var t=typeof Object.defineProperty=="function"?Object.defineProperty:null;r.exports=t},1471:function(r,t,n){var e=n(1680);r.exports=function(){try{return e({},"x",{}),!0}catch{return!1}}},6691:function(r,t,n){var e,i=n(1471),o=n(2073),f=n(1309);e=i()?o:f,r.exports=e},1309:function(r){var t=Object.prototype,n=t.toString,e=t.__defineGetter__,i=t.__defineSetter__,o=t.__lookupGetter__,f=t.__lookupSetter__;r.exports=function(u,s,d){var m,a,c,l;if(typeof u!="object"||u===null||n.call(u)==="[object Array]")throw new TypeError("invalid argument. First argument must be an object. Value: `"+u+"`.");if(typeof d!="object"||d===null||n.call(d)==="[object Array]")throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+d+"`.");if((a="value"in d)&&(o.call(u,s)||f.call(u,s)?(m=u.__proto__,u.__proto__=t,delete u[s],u[s]=d.value,u.__proto__=m):u[s]=d.value),c="get"in d,l="set"in d,a&&(c||l))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return c&&e&&e.call(u,s,d.get),l&&i&&i.call(u,s,d.set),u}},6208:function(r,t,n){var e,i=n(3123),o=n(7407),f=n(4210);e=i()?f:o,r.exports=e},7407:function(r,t,n){var e=n(173);r.exports=function(i){return e.call(i)}},4210:function(r,t,n){var e=n(9048),i=n(1403),o=n(173);r.exports=function(f){var u,s,d;if(f==null)return o.call(f);s=f[i],u=e(f,i);try{f[i]=void 0}catch{return o.call(f)}return d=o.call(f),u?f[i]=s:delete f[i],d}},173:function(r){var t=Object.prototype.toString;r.exports=t},1403:function(r){var t=typeof Symbol=="function"?Symbol.toStringTag:"";r.exports=t},7843:function(r){r.exports=function(t,n,e,i,o){for(n=n.split?n.split("."):n,i=0;i<n.length;i++)t=t?t[n[i]]:o;return t===o?e:t}},374:function(r,t,n){n.r(t),n.d(t,{default:function(){return o}});for(var e=[],i=0;i<64;)e[i]=0|4294967296*Math.sin(++i%Math.PI);function o(f){var u,s,d,m=[u=1732584193,s=4023233417,~u,~s],a=[],c=unescape(encodeURI(f))+"",l=c.length;for(f=--l/4+2|15,a[--f]=8*l;~l;)a[l>>2]|=c.charCodeAt(l)<<8*l--;for(i=c=0;i<f;i+=16){for(l=m;c<64;l=[d=l[3],u+((d=l[0]+[u&s|~u&d,d&u|~d&s,u^s^d,s^(u|~d)][l=c>>4]+e[c]+~~a[i|15&[c,5*c+1,3*c+5,7*c][l]])<<(l=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*l+c++%4])|d>>>-l),u,s])u=0|l[1],s=l[2];for(c=4;c;)m[--c]+=l[c]}for(f="";c<32;)f+=(m[c>>3]>>4*(1^c++)&15).toString(16);return f}}},E={};function O(r){var t=E[r];if(t!==void 0)return t.exports;var n=E[r]={exports:{}};return S[r].call(n.exports,n,n.exports,O),n.exports}return O.d=function(r,t){for(var n in t)O.o(t,n)&&!O.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},O.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},O.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},O(2870)}()})})(H);var C=H.exports,J=function(I){return function(P){var S=P.payload,E=P.integration,O=P.next,r=new C.Store(I),t=r.getRulesByDestinationName(E);t.forEach(function(n){for(var e=n.matchers,i=n.transformers,o=0;o<e.length;o++)if(C.matches(S.obj,e[o])&&(S.obj=C.transform(S.obj,i[o]),S.obj===null))return O(null)}),O(S)}};export{J as tsubMiddleware};
|