@ar.io/sdk 2.1.0-alpha.2 → 2.1.0-alpha.3

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.
@@ -135,7 +135,7 @@ use chrome, FireFox or Internet Explorer 11`)}var n=Si(),h=_d(),a=n.Buffer,d=n.k
135
135
  `))},ri.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},ri}var _p,dj,b6,pj,vj,Mp,mj,b7,gj,w7,yj,_7,bj,M7,wj,dn,S7,_j,qi,E7,Mj,ji,A7,Sj,Hr,R7,Ej,oa,x7,Aj,pr,T7,Rj,Ii,qge,xj,k7,w6,Tj,I7,kj,B7,Ij,O7,Bj,P7,Oj,N7,Pj,C7,Nj,L7,D7,Cj,zge,$7,Lj,U7,Dj,q7,$j,j7,Uj,F7,qj,Zge,z7,jj,H7,Fj,K7,zj,Z7,Hj,W7,yf,G7,Kj,Mn,V7,Zj,J7,Wj,Y7,Gj,X7,Vj,NG,Q7,Jj,e9,Yj,t9,Xj,_6,r9,Qj,i9,eF,af,n9,tF,Ao,M6,rF,Ro,iF,a9,nF,o9,aF,s9,oF,f9,sF,u9,fF,Ql,uF,h9,hF,S6,E6,lF,l9,cF,A6,dF,c9,pF,d9,vF,p9,mF,v9,gF,m9,yF,g9,bF,zG,y9,_F,b9,MF,as,w9,SF,Aa,_9,EF,Kr,M9,AF,of,S9,RF,R6,xF,an,x6,TF,Bi,os,kF,Wf,IF,ss,BF,ZG,OF,E9,Fe,GG,PF,A9,ze,ao,NF,Sp,CF,T6,LF,DF,R9,$F,x9,UF,T9,qF,k9,jF,pn,I9,FF,Fi,B9,zF,zi,O9,HF,Zr,P9,KF,sa,N9,ZF,vr,C9,WF,Oi,g6e,GF,L9,Gy,wf,QG,eV,cE,tV,k6,dE,w6e,_6e,e0,rV,M6e,iV,XF,$9,E6e,nV,A6e,Zh,d0,Jp,Oy,_0,vE,M0,T6e,k6e,I6e,U9,QF,B6e,q9,ez,O6e,j9,tz,N6e,rz,XE,I6,mE,$6e,U6e,t0,oV,q6e,F9,sV,fV,j6e,Gh,p0,Yp,Py,S0,yE,E0,H6e,K6e,Z6e,z9,az,W6e,H9,oz,V6e,K9,sz,J6e,hV,lV,Vy,Y6e,X6e,Q6e,eye,py,cV,dV,pV,iye,Z9,vV,nye,aye,uye,mV,bE,wE,Ss,W9,lz,Sn,G9,cz,V9,dz,J9,pz,Y9,vz,bV,X9,mz,Q9,gz,e_,yz,B6,t_,bz,r_,wz,sf,i_,_z,xo,O6,Mz,To,Sz,n_,Ez,a_,Az,o_,Rz,s_,xz,f_,Tz,r0,kz,u_,Iz,P6,N6,Bz,h_,Oz,C6,Pz,l_,Nz,c_,Cz,d_,Lz,p_,Dz,v_,$z,m_,Uz,TV,g_,jz,y_,Fz,us,b_,zz,Ra,w_,Hz,Wr,__,Kz,ff,M_,Zz,L6,Wz,on,D6,Gz,Pi,hs,Vz,Gf,Jz,ls,Yz,BV,Xz,S_,He,PV,Qz,E_,Ke,Cy,uo,kye,id,i0,Iye,eH,Xf,tH,Bye,Oye,$6,Rd,my,NV,CV,Pye,LV,Nye,Cye,rA,A_,Lye,DV,Dye,Ep,Ap,Rp,xp,Tp,kp,iA,vn,$V,xd,Gr,$ye,UV,Uye,qye,jye,qV,Hi,Wye,jV,Gye,Vye,Jye,Qye,Ki,ebe,FV,tbe,rbe,ibe,sbe,ca,fbe,ube,hbe,lbe,cbe,dbe,mr,pbe,zV,vbe,sH,mbe,HV,Ni,_be,Mbe,Sbe,Ebe,Abe,jh,Rbe,KV,nA,xn,cH,ZV,xbe,il,Tbe,kbe,Ibe,WV,d2,Bbe,GV,Obe,A0,VV,Pbe,Nbe,Cbe,JV,Fp,Lbe,_E,ME,Dbe,YV,XV,$be,Ube,SE,QV,pH,eJ,vf,qbe,jbe,Fbe,zbe,vH,gf,Hbe,Ey,R_,rJ,Qp,x_,Kbe,mH,gH,ud,e2,Zbe,T_,Wbe,Ly,iJ,Es,B0,U6,wH,_H,nJ,Gbe,aJ,aA,MH,Zn,oJ,Jbe,sJ,fJ,Ybe,Xbe,q6,uJ,e3e,hJ,Vh,r3e,hd,lJ,Dy,cJ,qu,i3e,b0,zp,n3e,a3e,p2,dJ,o3e,EE,SH,pJ,Hp,s3e,vJ,AE,mJ,Ay,gJ,l3e,c3e,RE,p3e,AH,v3e,yJ,g3e,Ry,k_,oA,ws,v2,$y,y3e,Un,Oa,bd,b3e,w3e,Vr,_3e,so,bJ,TH,M3e,S3e,wJ,mf,E3e,B_,_J,MJ,a0,A3e,Qy,Ci,TE,R3e,wd,SJ,x3e,EJ,T3e,k3e,sn,kE,AJ,I3e,Gu,B3e,RJ,O3e,P3e,N3e,Bo,BH,OH,C3e,Fh,df,xJ,sA,Jh,Fu,PH,L3e,et,TJ,kJ,qn,IJ,O_,D3e,Iy,P_,fA,BJ,OJ,o0,$3e,PJ,NJ,U3e,Na,q3e,LH,j3e,IE,F3e,z3e,H3e,K3e,DH,N_,CJ,LJ,wi,nu,Ms,$H,W3e,G3e,V3e,J3e,Y3e,UH,X3e,F6,t8e,ld,Bh,r8e,qH,L_,i8e,DJ,n8e,Yh,jH,uA,hA,H6,Oo,uf,a8e,o8e,K6,qJ,Uy,PE,s8e,u8e,mi,h8e,l8e,Td,GH,d8e,jJ,ho,p8e,v8e,au,ou,FJ,zJ,Oh,U_,q_,m8e,g8e,y8e,b8e,HJ,w8e,KJ,Qf,Vf,ZJ,md,P8e,kd,N8e,hf,C8e,L8e,D8e,$8e,U8e,q8e,j8e,F8e,WJ,z8e,GJ,VJ,gd,H8e,K8e,j_,Ip,Z8e,W8e,JJ,G8e,YJ,V8e,F_,XJ,QJ,J8e,z_,eY,Y8e,cd,tY,T0,X8e,W6,XH,Bp,QH,rY,iY,t4e,r4e,i4e,n4e,a4e,o4e,s4e,eb,ga,nY,f4e,R0,aY,u4e,oY,f0,a2,G6,h4e,V6,sY,tb,Rn,H_,yd,l4e,fY,c4e,pd,tK,qy,d4e,uY,p4e,Wu,rK,jy,v4e,m4e,lA,J6,NE,g4e,rb,CE,zh,K_,iK,lY,y4e,nK,cY,b4e,u0,aK,Z_,w4e,dY,W_,Y6,_4e,o2,oK,sK,ad,M4e,S4e,ib,E4e,X6,A4e,pY,R4e,x4e,T4e,vd,k4e,fK,uK,hK,I4e,nb,h0,G_,lK,ko,Jn,vY,B4e,Q6,cK,Cr,V_,pK,kr,J_,vK,Nh,mK,Y_,gK,X_,yK,Ch,Q_,wK,eM,tM,_K,rM,MK,Wn,iM,EK,nM,aM,AK,oM,RK,gY,_f,xK,N4e,cA,C4e,L4e,D4e,TK,$4e,U4e,q4e,j4e,bf,Mf,F4e,z4e,H4e,yY,K4e,Z4e,W4e,G4e,V4e,bY,J4e,Y4e,X4e,Q4e,e5e,ey,oo,t5e,r5e,i5e,n5e,sM,ob,wY,LE,Pa,x0,a5e,o5e,Fy,s5e,f5e,h5e,fM,Op,l5e,OK,c5e,d5e,Tn,ty,_Y,zy,NK,p5e,v5e,w0,m5e,MY,Yn,Zu,g5e,y5e,Io,b5e,w5e,DE,SY,EY,DK,M5e,AY,S5e,hM,E5e,$K,UK,lM,A5e,R5e,lf,x5e,T5e,qK,jK,FK,k5e,I5e,B5e,Pp,O5e,y0,Hy,Vp,$E,RY,HK,KK,xY,UE,TY,ni,P5e,N5e,C5e,VK,Yf,Np,ry,iy,JK,ny,YK,ay,cM,XK,QK,dM,eZ,L5e,pM,tZ,yi,l0,rZ,BY,iZ,vM,$e,mM,nZ,U5e,OY,aZ,gM,Ze,yM,oZ,bM,sZ,wM,fZ,_M,uZ,MM,hZ,SM,lZ,EM,cZ,Yi,dZ,AM,pZ,vZ,mZ,RM,gZ,xM,yZ,TM,bZ,kM,wZ,IM,_Z,BM,MZ,OM,SZ,PM,EZ,NM,AZ,CM,RZ,LM,xZ,DM,TZ,$M,kZ,LY,IZ,UM,We,qM,BZ,jM,OZ,oy,PZ,FM,NZ,Lh,CZ,zM,LZ,HM,DZ,KM,$Z,ZM,UZ,WM,qZ,GM,jZ,VM,FZ,JM,zZ,YM,HZ,XM,KZ,QM,ZZ,gs,WZ,swe,eS,GZ,tS,VZ,zY,Cp,JZ,rS,YZ,iS,XZ,En,HY,QZ,nS,Ge,aS,eW,Gn,oS,tW,sS,rW,WY,iW,fS,Ve,uS,nW,hS,aW,lS,oW,Dh,sW,sd,fW,sy,ti,uW,ai,fy,hW,uy,cS,lW,cW,dS,dW,bwe,pS,pW,bi,c0,vW,Lp,mW,YY,gW,vS,Ue,mS,yW,Mwe,XY,bW,gS,Je,yS,wW,bS,_W,wS,MW,_S,SW,MS,EW,SS,AW,ES,RW,Xi,xW,AS,TW,kW,IW,RS,BW,xS,OW,TS,PW,kS,NW,IS,CW,BS,LW,OS,DW,PS,$W,NS,UW,CS,qW,LS,jW,DS,FW,$S,zW,rX,HW,US,Ye,qS,KW,jS,ZW,hy,WW,FS,GW,$h,VW,zS,JW,HS,YW,KS,XW,ZS,QW,WS,eG,GS,tG,VS,rG,JS,iG,YS,nG,XS,aG,QS,oG,ys,sG,Hwe,eE,fG,tE,uG,uX,Dp,hG,rE,lG,iE,cG,An,hX,dG,nE,Xe,aE,pG,Vn,oE,vG,sE,mG,dX,gG,fE,Qe,uE,yG,hE,bG,lE,wG,Uh,_G,fd,MG,ly,ri,SG,wr,r7e,i7e,n7e,a7e,o7e,s7e,f7e,u7e,h7e,l7e,c7e,d7e,p7e,v7e,m7e,g7e,y7e,b7e,w7e,_7e,M7e,S7e,E7e,A7e,R7e,x7e,T7e,k7e,I7e,B7e,O7e,P7e,N7e,C7e,L7e,D7e,$7e,U7e,q7e,j7e,mX=$i(()=>{"use strict";Be();Pe();Oe();ku();Ws();Wg();Zs();qf();Au();Wo();Ko();_p={},dj=!1;b6={},pj=!1,vj=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;Mp={},mj=!1;b7={},gj=!1;w7={},yj=!1;_7={},bj=!1;M7={},wj=!1,dn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;S7={},_j=!1,qi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;E7={},Mj=!1,ji=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;A7={},Sj=!1,Hr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;R7={},Ej=!1,oa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;x7={},Aj=!1,pr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;T7={},Rj=!1,Ii=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;qge={},xj=!1,k7={exports:qge};w6={},Tj=!1;I7={},kj=!1;B7={},Ij=!1;O7={},Bj=!1;P7={},Oj=!1;N7={},Pj=!1;C7={},Nj=!1,L7=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;D7={},Cj=!1,zge=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;$7={},Lj=!1;U7={},Dj=!1;q7={},$j=!1;j7={},Uj=!1;F7={},qj=!1,Zge=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;z7={},jj=!1;H7={},Fj=!1;K7={},zj=!1;Z7={},Hj=!1,W7=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;yf=Wge();yf.Readable;yf.Writable;yf.Duplex;yf.Transform;yf.PassThrough;yf.finished;yf.pipeline;yf.Stream;V8(yf.finished),V8(yf.pipeline);G7={},Kj=!1,Mn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;V7={},Zj=!1;J7={},Wj=!1;Y7={},Gj=!1;X7={},Vj=!1;NG={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}},Q7={},Jj=!1;e9={},Yj=!1;t9={},Xj=!1,_6=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;r9={},Qj=!1;i9={},eF=!1,af=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;n9={},tF=!1,Ao=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;M6={},rF=!1;Ro={},iF=!1;a9={},nF=!1;o9={},aF=!1;s9={},oF=!1;f9={},sF=!1;u9={},fF=!1;Ql={},uF=!1;h9={},hF=!1,S6=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;E6={},lF=!1;l9={},cF=!1;A6={},dF=!1;c9={},pF=!1;d9={},vF=!1;p9={},mF=!1;v9={},gF=!1;m9={},yF=!1;g9={},bF=!1;zG={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},y9={},_F=!1;b9={},MF=!1,as=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;w9={},SF=!1,Aa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;_9={},EF=!1,Kr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;M9={},AF=!1,of=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;S9={},RF=!1;R6={},xF=!1,an=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;x6={},TF=!1,Bi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;os={},kF=!1;Wf={},IF=!1;ss={},BF=!1;ZG={},OF=!1,E9={exports:ZG},Fe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;GG={},PF=!1,A9={exports:GG},ze=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;ao={},NF=!1;Sp={},CF=!1;T6={},LF=!1,DF=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;R9={},$F=!1;x9={},UF=!1;T9={},qF=!1;k9={},jF=!1,pn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;I9={},FF=!1,Fi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;B9={},zF=!1,zi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;O9={},HF=!1,Zr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;P9={},KF=!1,sa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;N9={},ZF=!1,vr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;C9={},WF=!1,Oi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;g6e={},GF=!1,L9={exports:g6e};Gy=Ui.EventEmitter,wf={},QG={};fs("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError),fs("ERR_INVALID_ARG_TYPE",function(e,r,n){let h;var a;let d;return typeof r=="string"&&(a="not ",r.substr(0,a.length)===a)?(h="must not be",r=r.replace(/^not /,"")):h="must be",function(l,v,w){return(w===void 0||w>l.length)&&(w=l.length),l.substring(w-v.length,w)===v}(e," argument")?d=`The ${e} ${h} ${VF(r,"type")}`:d=`The "${e}" ${function(l,v,w){return typeof w!="number"&&(w=0),!(w+v.length>l.length)&&l.indexOf(v,w)!==-1}(e,".")?"property":"argument"} ${h} ${VF(r,"type")}`,d+=`. Received type ${typeof n}`,d},TypeError),fs("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),fs("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),fs("ERR_STREAM_PREMATURE_CLOSE","Premature close"),fs("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),fs("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),fs("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),fs("ERR_STREAM_WRITE_AFTER_END","write after end"),fs("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),fs("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),fs("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),wf.codes=QG;eV=function(){throw new Error("Readable.from is not available in the browser")},cE=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;tV=function(e,r){if(D9("noDeprecation"))return e;var n=!1;return function(){if(!n){if(D9("throwDeprecation"))throw new Error(r);D9("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return e.apply(this||cE,arguments)}};k6=Pr.Buffer,dE=Jt.inspect,w6e=dE&&dE.custom||"inspect",_6e=function(){function e(){(function(h,a){if(!(h instanceof a))throw new TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}var r,n;return r=e,(n=[{key:"push",value:function(h){var a={data:h,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length}},{key:"unshift",value:function(h){var a={data:h,next:this.head};this.length===0&&(this.tail=a),this.head=a,++this.length}},{key:"shift",value:function(){if(this.length!==0){var h=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,h}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(h){if(this.length===0)return"";for(var a=this.head,d=""+a.data;a=a.next;)d+=h+a.data;return d}},{key:"concat",value:function(h){if(this.length===0)return k6.alloc(0);for(var a,d,l,v=k6.allocUnsafe(h>>>0),w=this.head,m=0;w;)a=w.data,d=v,l=m,k6.prototype.copy.call(a,d,l),m+=w.data.length,w=w.next;return v}},{key:"consume",value:function(h,a){var d;return h<this.head.data.length?(d=this.head.data.slice(0,h),this.head.data=this.head.data.slice(h)):d=h===this.head.data.length?this.shift():a?this._getString(h):this._getBuffer(h),d}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(h){var a=this.head,d=1,l=a.data;for(h-=l.length;a=a.next;){var v=a.data,w=h>v.length?v.length:h;if(w===v.length?l+=v:l+=v.slice(0,h),(h-=w)==0){w===v.length?(++d,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=v.slice(w));break}++d}return this.length-=d,l}},{key:"_getBuffer",value:function(h){var a=k6.allocUnsafe(h),d=this.head,l=1;for(d.data.copy(a),h-=d.data.length;d=d.next;){var v=d.data,w=h>v.length?v.length:h;if(v.copy(a,a.length-h,0,w),(h-=w)==0){w===v.length?(++l,d.next?this.head=d.next:this.head=this.tail=null):(this.head=d,d.data=v.slice(w));break}++l}return this.length-=l,a}},{key:w6e,value:function(h,a){return dE(this,function(d){for(var l=1;l<arguments.length;l++){var v=arguments[l]!=null?arguments[l]:{};l%2?JF(Object(v),!0).forEach(function(w){y6e(d,w,v[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(v)):JF(Object(v)).forEach(function(w){Object.defineProperty(d,w,Object.getOwnPropertyDescriptor(v,w))})}return d}({},a,{depth:0,customInspect:!1}))}}])&&b6e(r.prototype,n),e}(),e0=Br;rV={destroy:function(e,r){var n=this,h=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return h||a?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e0.nextTick(pE,this,e)):e0.nextTick(pE,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(d){!r&&d?n._writableState?n._writableState.errorEmitted?e0.nextTick(cy,n):(n._writableState.errorEmitted=!0,e0.nextTick(YF,n,d)):e0.nextTick(YF,n,d):r?(e0.nextTick(cy,n),r(d)):e0.nextTick(cy,n)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,r){var n=e._readableState,h=e._writableState;n&&n.autoDestroy||h&&h.autoDestroy?e.destroy(r):e.emit("error",r)}},M6e=wf.codes.ERR_INVALID_OPT_VALUE,iV={getHighWaterMark:function(e,r,n,h){var a=function(d,l,v){return d.highWaterMark!=null?d.highWaterMark:l?d[v]:null}(r,h,n);if(a!=null){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new M6e(h?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}},XF=wf.codes.ERR_STREAM_PREMATURE_CLOSE;E6e=function e(r,n,h){if(typeof n=="function")return e(r,null,n);n||(n={}),h=function(A){var k=!1;return function(){if(!k){k=!0;for(var I=arguments.length,B=new Array(I),P=0;P<I;P++)B[P]=arguments[P];A.apply(this,B)}}}(h||S6e);var a=n.readable||n.readable!==!1&&r.readable,d=n.writable||n.writable!==!1&&r.writable,l=function(){r.writable||w()},v=r._writableState&&r._writableState.finished,w=function(){d=!1,v=!0,a||h.call(r)},m=r._readableState&&r._readableState.endEmitted,y=function(){a=!1,m=!0,d||h.call(r)},g=function(A){h.call(r,A)},S=function(){var A;return a&&!m?(r._readableState&&r._readableState.ended||(A=new XF),h.call(r,A)):d&&!v?(r._writableState&&r._writableState.ended||(A=new XF),h.call(r,A)):void 0},R=function(){r.req.on("finish",w)};return function(A){return A.setHeader&&typeof A.abort=="function"}(r)?(r.on("complete",w),r.on("abort",S),r.req?R():r.on("request",R)):d&&!r._writableState&&(r.on("end",l),r.on("close",l)),r.on("end",y),r.on("finish",w),n.error!==!1&&r.on("error",g),r.on("close",S),function(){r.removeListener("complete",w),r.removeListener("abort",S),r.removeListener("request",R),r.req&&r.req.removeListener("finish",w),r.removeListener("end",l),r.removeListener("close",l),r.removeListener("finish",w),r.removeListener("end",y),r.removeListener("error",g),r.removeListener("close",S)}},nV=Br;A6e=E6e,Zh=Symbol("lastResolve"),d0=Symbol("lastReject"),Jp=Symbol("error"),Oy=Symbol("ended"),_0=Symbol("lastPromise"),vE=Symbol("handlePromise"),M0=Symbol("stream");T6e=Object.getPrototypeOf(function(){}),k6e=Object.setPrototypeOf((Kh($9={get stream(){return this[M0]},next:function(){var e=this,r=this[Jp];if(r!==null)return Promise.reject(r);if(this[Oy])return Promise.resolve(Qh(void 0,!0));if(this[M0].destroyed)return new Promise(function(d,l){nV.nextTick(function(){e[Jp]?l(e[Jp]):d(Qh(void 0,!0))})});var n,h=this[_0];if(h)n=new Promise(function(d,l){return function(v,w){d.then(function(){if(l[Oy])return v(Qh(void 0,!0)),void 0;l[vE](v,w)},w)}}(h,this));else{var a=this[M0].read();if(a!==null)return Promise.resolve(Qh(a,!1));n=new Promise(this[vE])}return this[_0]=n,n}},Symbol.asyncIterator,function(){return this}),Kh($9,"return",function(){var e=this;return new Promise(function(r,n){e[M0].destroy(null,function(h){if(h)return n(h),void 0;r(Qh(void 0,!0))})})}),$9),T6e),I6e=function(e){var r,n=Object.create(k6e,(Kh(r={},M0,{value:e,writable:!0}),Kh(r,Zh,{value:null,writable:!0}),Kh(r,d0,{value:null,writable:!0}),Kh(r,Jp,{value:null,writable:!0}),Kh(r,Oy,{value:e._readableState.endEmitted,writable:!0}),Kh(r,vE,{value:function(h,a){var d=n[M0].read();d?(n[_0]=null,n[Zh]=null,n[d0]=null,h(Qh(d,!1))):(n[Zh]=h,n[d0]=a)},writable:!0}),r));return n[_0]=null,A6e(e,function(h){if(h&&h.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[d0];return a!==null&&(n[_0]=null,n[Zh]=null,n[d0]=null,a(h)),n[Jp]=h,void 0}var d=n[Zh];d!==null&&(n[_0]=null,n[Zh]=null,n[d0]=null,d(Qh(void 0,!0))),n[Oy]=!0}),e.on("readable",x6e.bind(null,n)),n},U9={},QF=!1,B6e=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;q9={},ez=!1,O6e=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;j9={},tz=!1;N6e=aV(),rz=wf.codes.ERR_STREAM_PREMATURE_CLOSE;XE=function e(r,n,h){if(typeof n=="function")return e(r,null,n);n||(n={}),h=function(A){var k=!1;return function(){if(!k){k=!0;for(var I=arguments.length,B=new Array(I),P=0;P<I;P++)B[P]=arguments[P];A.apply(this,B)}}}(h||C6e);var a=n.readable||n.readable!==!1&&r.readable,d=n.writable||n.writable!==!1&&r.writable,l=function(){r.writable||w()},v=r._writableState&&r._writableState.finished,w=function(){d=!1,v=!0,a||h.call(r)},m=r._readableState&&r._readableState.endEmitted,y=function(){a=!1,m=!0,d||h.call(r)},g=function(A){h.call(r,A)},S=function(){var A;return a&&!m?(r._readableState&&r._readableState.ended||(A=new rz),h.call(r,A)):d&&!v?(r._writableState&&r._writableState.ended||(A=new rz),h.call(r,A)):void 0},R=function(){r.req.on("finish",w)};return function(A){return A.setHeader&&typeof A.abort=="function"}(r)?(r.on("complete",w),r.on("abort",S),r.req?R():r.on("request",R)):d&&!r._writableState&&(r.on("end",l),r.on("close",l)),r.on("end",y),r.on("finish",w),n.error!==!1&&r.on("error",g),r.on("close",S),function(){r.removeListener("complete",w),r.removeListener("abort",S),r.removeListener("request",R),r.req&&r.req.removeListener("finish",w),r.removeListener("end",l),r.removeListener("close",l),r.removeListener("finish",w),r.removeListener("end",y),r.removeListener("error",g),r.removeListener("close",S)}};I6=Pr.Buffer,mE=Jt.inspect,$6e=mE&&mE.custom||"inspect",U6e=function(){function e(){(function(h,a){if(!(h instanceof a))throw new TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}var r,n;return r=e,(n=[{key:"push",value:function(h){var a={data:h,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length}},{key:"unshift",value:function(h){var a={data:h,next:this.head};this.length===0&&(this.tail=a),this.head=a,++this.length}},{key:"shift",value:function(){if(this.length!==0){var h=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,h}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(h){if(this.length===0)return"";for(var a=this.head,d=""+a.data;a=a.next;)d+=h+a.data;return d}},{key:"concat",value:function(h){if(this.length===0)return I6.alloc(0);for(var a,d,l,v=I6.allocUnsafe(h>>>0),w=this.head,m=0;w;)a=w.data,d=v,l=m,I6.prototype.copy.call(a,d,l),m+=w.data.length,w=w.next;return v}},{key:"consume",value:function(h,a){var d;return h<this.head.data.length?(d=this.head.data.slice(0,h),this.head.data=this.head.data.slice(h)):d=h===this.head.data.length?this.shift():a?this._getString(h):this._getBuffer(h),d}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(h){var a=this.head,d=1,l=a.data;for(h-=l.length;a=a.next;){var v=a.data,w=h>v.length?v.length:h;if(w===v.length?l+=v:l+=v.slice(0,h),(h-=w)==0){w===v.length?(++d,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=v.slice(w));break}++d}return this.length-=d,l}},{key:"_getBuffer",value:function(h){var a=I6.allocUnsafe(h),d=this.head,l=1;for(d.data.copy(a),h-=d.data.length;d=d.next;){var v=d.data,w=h>v.length?v.length:h;if(v.copy(a,a.length-h,0,w),(h-=w)==0){w===v.length?(++l,d.next?this.head=d.next:this.head=this.tail=null):(this.head=d,d.data=v.slice(w));break}++l}return this.length-=l,a}},{key:$6e,value:function(h,a){return mE(this,function(d){for(var l=1;l<arguments.length;l++){var v=arguments[l]!=null?arguments[l]:{};l%2?iz(Object(v),!0).forEach(function(w){L6e(d,w,v[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(v)):iz(Object(v)).forEach(function(w){Object.defineProperty(d,w,Object.getOwnPropertyDescriptor(v,w))})}return d}({},a,{depth:0,customInspect:!1}))}}])&&D6e(r.prototype,n),e}(),t0=Br;oV={destroy:function(e,r){var n=this,h=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return h||a?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t0.nextTick(gE,this,e)):t0.nextTick(gE,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(d){!r&&d?n._writableState?n._writableState.errorEmitted?t0.nextTick(dy,n):(n._writableState.errorEmitted=!0,t0.nextTick(nz,n,d)):t0.nextTick(nz,n,d):r?(t0.nextTick(dy,n),r(d)):t0.nextTick(dy,n)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,r){var n=e._readableState,h=e._writableState;n&&n.autoDestroy||h&&h.autoDestroy?e.destroy(r):e.emit("error",r)}},q6e=wf.codes.ERR_INVALID_OPT_VALUE,sV={getHighWaterMark:function(e,r,n,h){var a=function(d,l,v){return d.highWaterMark!=null?d.highWaterMark:l?d[v]:null}(r,h,n);if(a!=null){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new q6e(h?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}},fV=Br;j6e=XE,Gh=Symbol("lastResolve"),p0=Symbol("lastReject"),Yp=Symbol("error"),Py=Symbol("ended"),S0=Symbol("lastPromise"),yE=Symbol("handlePromise"),E0=Symbol("stream");H6e=Object.getPrototypeOf(function(){}),K6e=Object.setPrototypeOf((Wh(F9={get stream(){return this[E0]},next:function(){var e=this,r=this[Yp];if(r!==null)return Promise.reject(r);if(this[Py])return Promise.resolve(el(void 0,!0));if(this[E0].destroyed)return new Promise(function(d,l){fV.nextTick(function(){e[Yp]?l(e[Yp]):d(el(void 0,!0))})});var n,h=this[S0];if(h)n=new Promise(function(d,l){return function(v,w){d.then(function(){if(l[Py])return v(el(void 0,!0)),void 0;l[yE](v,w)},w)}}(h,this));else{var a=this[E0].read();if(a!==null)return Promise.resolve(el(a,!1));n=new Promise(this[yE])}return this[S0]=n,n}},Symbol.asyncIterator,function(){return this}),Wh(F9,"return",function(){var e=this;return new Promise(function(r,n){e[E0].destroy(null,function(h){if(h)return n(h),void 0;r(el(void 0,!0))})})}),F9),H6e),Z6e=function(e){var r,n=Object.create(K6e,(Wh(r={},E0,{value:e,writable:!0}),Wh(r,Gh,{value:null,writable:!0}),Wh(r,p0,{value:null,writable:!0}),Wh(r,Yp,{value:null,writable:!0}),Wh(r,Py,{value:e._readableState.endEmitted,writable:!0}),Wh(r,yE,{value:function(h,a){var d=n[E0].read();d?(n[S0]=null,n[Gh]=null,n[p0]=null,h(el(d,!1))):(n[Gh]=h,n[p0]=a)},writable:!0}),r));return n[S0]=null,j6e(e,function(h){if(h&&h.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[p0];return a!==null&&(n[S0]=null,n[Gh]=null,n[p0]=null,a(h)),n[Yp]=h,void 0}var d=n[Gh];d!==null&&(n[S0]=null,n[Gh]=null,n[p0]=null,d(el(void 0,!0))),n[Py]=!0}),e.on("readable",z6e.bind(null,n)),n},z9={},az=!1,W6e=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;H9={},oz=!1,V6e=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;K9={},sz=!1;J6e=uV(),hV=r2();lV=Ku;Vy=wf.codes,Y6e=Vy.ERR_METHOD_NOT_IMPLEMENTED,X6e=Vy.ERR_MULTIPLE_CALLBACK,Q6e=Vy.ERR_TRANSFORM_ALREADY_TRANSFORMING,eye=Vy.ERR_TRANSFORM_WITH_LENGTH_0,py=hV;jr(Ku,py),Ku.prototype.push=function(e,r){return this._transformState.needTransform=!1,py.prototype.push.call(this,e,r)},Ku.prototype._transform=function(e,r,n){n(new Y6e("_transform()"))},Ku.prototype._write=function(e,r,n){var h=this._transformState;if(h.writecb=n,h.writechunk=e,h.writeencoding=r,!h.transforming){var a=this._readableState;(h.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}},Ku.prototype._read=function(e){var r=this._transformState;r.writechunk===null||r.transforming?r.needTransform=!0:(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform))},Ku.prototype._destroy=function(e,r){py.prototype._destroy.call(this,e,function(n){r(n)})};cV=lV;dV=i2;pV=cV;jr(i2,pV),i2.prototype._transform=function(e,r,n){n(null,e)};iye=dV,vV=wf.codes,nye=vV.ERR_MISSING_ARGS,aye=vV.ERR_STREAM_DESTROYED;uye=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var h,a=fye(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new nye("streams");var d=r.map(function(l,v){var w=v<r.length-1;return oye(l,w,v>0,function(m){h||(h=m),m&&d.forEach(hz),w||(d.forEach(hz),a(h))})});return r.reduce(sye)},bE=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;mV=bs;wE=Ui.EventEmitter;jr(bs,wE),bs.Readable=N6e,bs.Writable=J6e,bs.Duplex=hV,bs.Transform=cV,bs.PassThrough=iye,bs.finished=XE,bs.pipeline=uye,bs.Stream=bs,bs.prototype.pipe=function(e,r){var n=this||bE;function h(y){e.writable&&e.write(y)===!1&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",h),e.on("drain",a),e._isStdio||r&&r.end===!1||(n.on("end",l),n.on("close",v));var d=!1;function l(){d||(d=!0,e.end())}function v(){d||(d=!0,typeof e.destroy=="function"&&e.destroy())}function w(y){if(m(),wE.listenerCount(this||bE,"error")===0)throw y}function m(){n.removeListener("data",h),e.removeListener("drain",a),n.removeListener("end",l),n.removeListener("close",v),n.removeListener("error",w),e.removeListener("error",w),n.removeListener("end",m),n.removeListener("close",m),e.removeListener("close",m)}return n.on("error",w),e.on("error",w),n.on("end",m),n.on("close",m),e.on("close",m),e.emit("pipe",n),e};Ss=mV;Ss.Readable;Ss.Writable;Ss.Duplex;Ss.Transform;Ss.PassThrough;Ss.finished;Ss.pipeline;Ss.Stream;W9={},lz=!1,Sn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;G9={},cz=!1;V9={},dz=!1;J9={},pz=!1;Y9={},vz=!1;bV={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}},X9={},mz=!1;Q9={},gz=!1;e_={},yz=!1,B6=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;t_={},bz=!1;r_={},wz=!1,sf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;i_={},_z=!1,xo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;O6={},Mz=!1;To={},Sz=!1;n_={},Ez=!1;a_={},Az=!1;o_={},Rz=!1;s_={},xz=!1;f_={},Tz=!1;r0={},kz=!1;u_={},Iz=!1,P6=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;N6={},Bz=!1;h_={},Oz=!1;C6={},Pz=!1;l_={},Nz=!1;c_={},Cz=!1;d_={},Lz=!1;p_={},Dz=!1;v_={},$z=!1;m_={},Uz=!1;TV={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},g_={},jz=!1;y_={},Fz=!1,us=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;b_={},zz=!1,Ra=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;w_={},Hz=!1,Wr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;__={},Kz=!1,ff=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;M_={},Zz=!1;L6={},Wz=!1,on=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;D6={},Gz=!1,Pi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;hs={},Vz=!1;Gf={},Jz=!1;ls={},Yz=!1;BV={},Xz=!1,S_={exports:BV},He=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;PV={},Qz=!1,E_={exports:PV},Ke=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;Cy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,uo={},kye=function(e,r){if(e.indexOf)return e.indexOf(r);for(var n=0;n<e.length;n++)if(e[n]===r)return n;return-1},id=function(e){if(Object.keys)return Object.keys(e);var r=[];for(var n in e)r.push(n);return r},i0=function(e,r){if(e.forEach)return e.forEach(r);for(var n=0;n<e.length;n++)r(e[n],n,e)},Iye=function(){try{return Object.defineProperty({},"_",{}),function(e,r,n){Object.defineProperty(e,r,{writable:!0,enumerable:!1,configurable:!0,value:n})}}catch{return function(r,n,h){r[n]=h}}}(),eH=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];vy.prototype={};Xf=uo.Script=function(e){if(!((this||Cy)instanceof Xf))return new Xf(e);(this||Cy).code=e};Xf.prototype.runInContext=function(e){if(!(e instanceof vy))throw new TypeError("needs a 'context' argument.");var r=document.createElement("iframe");r.style||(r.style={}),r.style.display="none",document.body.appendChild(r);var n=r.contentWindow,h=n.eval,a=n.execScript;!h&&a&&(a.call(n,"null"),h=n.eval),i0(id(e),function(v){n[v]=e[v]}),i0(eH,function(v){e[v]&&(n[v]=e[v])});var d=id(n),l=h.call(n,(this||Cy).code);return i0(id(n),function(v){(v in e||kye(d,v)===-1)&&(e[v]=n[v])}),i0(eH,function(v){v in e||Iye(e,v,n[v])}),document.body.removeChild(r),l},Xf.prototype.runInThisContext=function(){return eval((this||Cy).code)},Xf.prototype.runInNewContext=function(e){var r=Xf.createContext(e),n=this.runInContext(r);return e&&i0(id(r),function(h){e[h]=r[h]}),n},i0(id(Xf.prototype),function(e){uo[e]=Xf[e]=function(r){var n=Xf(r);return n[e].apply(n,[].slice.call(arguments,1))}}),uo.isContext=function(e){return e instanceof vy},uo.createScript=function(e){return uo.Script(e)},uo.createContext=Xf.createContext=function(e){var r=new vy;return typeof e=="object"&&i0(id(e),function(n){r[n]=e[n]}),r};uo.Script;uo.createContext;uo.createScript;uo.isContext;uo.runInContext;uo.runInNewContext;uo.runInThisContext;tH=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Bye=Br,Oye=vi.Buffer,$6=tH.crypto||tH.msCrypto,Rd=$6&&$6.getRandomValues?function(e,r){if(e>4294967295)throw new RangeError("requested too many random bytes");var n=Oye.allocUnsafe(e);if(e>0)if(e>65536)for(var h=0;h<e;h+=65536)$6.getRandomValues(n.slice(h,h+65536));else $6.getRandomValues(n);return typeof r=="function"?Bye.nextTick(function(){r(null,n)}):n}:function(){throw new Error(`Secure random number generation is not supported by this browser.
136
136
  Use Chrome, Firefox or Internet Explorer 11`)},my=vi.Buffer,NV=Ss.Transform;jr(qh,NV),qh.prototype._transform=function(e,r,n){var h=null;try{this.update(e,r)}catch(a){h=a}n(h)},qh.prototype._flush=function(e){var r=null;try{this.push(this.digest())}catch(n){r=n}e(r)},qh.prototype.update=function(e,r){if(function(v,w){if(!my.isBuffer(v)&&typeof v!="string")throw new TypeError(w+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");my.isBuffer(e)||(e=my.from(e,r));for(var n=this._block,h=0;this._blockOffset+e.length-h>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)n[a++]=e[h++];this._update(),this._blockOffset=0}for(;h<e.length;)n[this._blockOffset++]=e[h++];for(var d=0,l=8*e.length;l>0;++d)this._length[d]+=l,(l=this._length[d]/4294967296|0)>0&&(this._length[d]-=4294967296*l);return this},qh.prototype._update=function(){throw new Error("_update is not implemented")},qh.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var r=this._digest();e!==void 0&&(r=r.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return r},qh.prototype._digest=function(){throw new Error("_digest is not implemented")};CV=qh,Pye=jr,LV=CV,Nye=vi.Buffer,Cye=new Array(16);Pye(gy,LV),gy.prototype._update=function(){for(var e=Cye,r=0;r<16;++r)e[r]=this._block.readInt32LE(4*r);var n=this._a,h=this._b,a=this._c,d=this._d;n=xa(n,h,a,d,e[0],3614090360,7),d=xa(d,n,h,a,e[1],3905402710,12),a=xa(a,d,n,h,e[2],606105819,17),h=xa(h,a,d,n,e[3],3250441966,22),n=xa(n,h,a,d,e[4],4118548399,7),d=xa(d,n,h,a,e[5],1200080426,12),a=xa(a,d,n,h,e[6],2821735955,17),h=xa(h,a,d,n,e[7],4249261313,22),n=xa(n,h,a,d,e[8],1770035416,7),d=xa(d,n,h,a,e[9],2336552879,12),a=xa(a,d,n,h,e[10],4294925233,17),h=xa(h,a,d,n,e[11],2304563134,22),n=xa(n,h,a,d,e[12],1804603682,7),d=xa(d,n,h,a,e[13],4254626195,12),a=xa(a,d,n,h,e[14],2792965006,17),n=Ta(n,h=xa(h,a,d,n,e[15],1236535329,22),a,d,e[1],4129170786,5),d=Ta(d,n,h,a,e[6],3225465664,9),a=Ta(a,d,n,h,e[11],643717713,14),h=Ta(h,a,d,n,e[0],3921069994,20),n=Ta(n,h,a,d,e[5],3593408605,5),d=Ta(d,n,h,a,e[10],38016083,9),a=Ta(a,d,n,h,e[15],3634488961,14),h=Ta(h,a,d,n,e[4],3889429448,20),n=Ta(n,h,a,d,e[9],568446438,5),d=Ta(d,n,h,a,e[14],3275163606,9),a=Ta(a,d,n,h,e[3],4107603335,14),h=Ta(h,a,d,n,e[8],1163531501,20),n=Ta(n,h,a,d,e[13],2850285829,5),d=Ta(d,n,h,a,e[2],4243563512,9),a=Ta(a,d,n,h,e[7],1735328473,14),n=ka(n,h=Ta(h,a,d,n,e[12],2368359562,20),a,d,e[5],4294588738,4),d=ka(d,n,h,a,e[8],2272392833,11),a=ka(a,d,n,h,e[11],1839030562,16),h=ka(h,a,d,n,e[14],4259657740,23),n=ka(n,h,a,d,e[1],2763975236,4),d=ka(d,n,h,a,e[4],1272893353,11),a=ka(a,d,n,h,e[7],4139469664,16),h=ka(h,a,d,n,e[10],3200236656,23),n=ka(n,h,a,d,e[13],681279174,4),d=ka(d,n,h,a,e[0],3936430074,11),a=ka(a,d,n,h,e[3],3572445317,16),h=ka(h,a,d,n,e[6],76029189,23),n=ka(n,h,a,d,e[9],3654602809,4),d=ka(d,n,h,a,e[12],3873151461,11),a=ka(a,d,n,h,e[15],530742520,16),n=Ia(n,h=ka(h,a,d,n,e[2],3299628645,23),a,d,e[0],4096336452,6),d=Ia(d,n,h,a,e[7],1126891415,10),a=Ia(a,d,n,h,e[14],2878612391,15),h=Ia(h,a,d,n,e[5],4237533241,21),n=Ia(n,h,a,d,e[12],1700485571,6),d=Ia(d,n,h,a,e[3],2399980690,10),a=Ia(a,d,n,h,e[10],4293915773,15),h=Ia(h,a,d,n,e[1],2240044497,21),n=Ia(n,h,a,d,e[8],1873313359,6),d=Ia(d,n,h,a,e[15],4264355552,10),a=Ia(a,d,n,h,e[6],2734768916,15),h=Ia(h,a,d,n,e[13],1309151649,21),n=Ia(n,h,a,d,e[4],4149444226,6),d=Ia(d,n,h,a,e[11],3174756917,10),a=Ia(a,d,n,h,e[2],718787259,15),h=Ia(h,a,d,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+h|0,this._c=this._c+a|0,this._d=this._d+d|0},gy.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Nye.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};rA=gy,A_=Pr.Buffer,Lye=jr,DV=CV,Dye=new Array(16),Ep=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Ap=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Rp=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],xp=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Tp=[0,1518500249,1859775393,2400959708,2840853838],kp=[1352829926,1548603684,1836072691,2053994217,0];Lye(yy,DV),yy.prototype._update=function(){for(var e=Dye,r=0;r<16;++r)e[r]=this._block.readInt32LE(4*r);for(var n=0|this._a,h=0|this._b,a=0|this._c,d=0|this._d,l=0|this._e,v=0|this._a,w=0|this._b,m=0|this._c,y=0|this._d,g=0|this._e,S=0;S<80;S+=1){var R,A;S<16?(R=rH(n,h,a,d,l,e[Ep[S]],Tp[0],Rp[S]),A=oH(v,w,m,y,g,e[Ap[S]],kp[0],xp[S])):S<32?(R=iH(n,h,a,d,l,e[Ep[S]],Tp[1],Rp[S]),A=aH(v,w,m,y,g,e[Ap[S]],kp[1],xp[S])):S<48?(R=nH(n,h,a,d,l,e[Ep[S]],Tp[2],Rp[S]),A=nH(v,w,m,y,g,e[Ap[S]],kp[2],xp[S])):S<64?(R=aH(n,h,a,d,l,e[Ep[S]],Tp[3],Rp[S]),A=iH(v,w,m,y,g,e[Ap[S]],kp[3],xp[S])):(R=oH(n,h,a,d,l,e[Ep[S]],Tp[4],Rp[S]),A=rH(v,w,m,y,g,e[Ap[S]],kp[4],xp[S])),n=l,l=d,d=I0(a,10),a=h,h=R,v=g,g=y,y=I0(m,10),m=w,w=A}var k=this._b+a+y|0;this._b=this._c+d+g|0,this._c=this._d+l+v|0,this._d=this._e+n+w|0,this._e=this._a+h+m|0,this._a=k},yy.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=A_.alloc?A_.alloc(20):new A_(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};iA=yy,vn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,$V=vi.Buffer;by.prototype.update=function(e,r){typeof e=="string"&&(r=r||"utf8",e=$V.from(e,r));for(var n=(this||vn)._block,h=(this||vn)._blockSize,a=e.length,d=(this||vn)._len,l=0;l<a;){for(var v=d%h,w=Math.min(a-l,h-v),m=0;m<w;m++)n[v+m]=e[l+m];l+=w,(d+=w)%h==0&&this._update(n)}return(this||vn)._len+=a,this||vn},by.prototype.digest=function(e){var r=(this||vn)._len%(this||vn)._blockSize;(this||vn)._block[r]=128,(this||vn)._block.fill(0,r+1),r>=(this||vn)._finalSize&&(this._update((this||vn)._block),(this||vn)._block.fill(0));var n=8*(this||vn)._len;if(n<=4294967295)(this||vn)._block.writeUInt32BE(n,(this||vn)._blockSize-4);else{var h=(4294967295&n)>>>0,a=(n-h)/4294967296;(this||vn)._block.writeUInt32BE(a,(this||vn)._blockSize-8),(this||vn)._block.writeUInt32BE(h,(this||vn)._blockSize-4)}this._update((this||vn)._block);var d=this._hash();return e?d.toString(e):d},by.prototype._update=function(){throw new Error("_update must be implemented by subclass")};xd=by,Gr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,$ye=jr,UV=xd,Uye=vi.Buffer,qye=[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],jye=new Array(64);$ye($p,UV),$p.prototype.init=function(){return(this||Gr)._a=1779033703,(this||Gr)._b=3144134277,(this||Gr)._c=1013904242,(this||Gr)._d=2773480762,(this||Gr)._e=1359893119,(this||Gr)._f=2600822924,(this||Gr)._g=528734635,(this||Gr)._h=1541459225,this||Gr},$p.prototype._update=function(e){for(var r,n=(this||Gr)._w,h=0|(this||Gr)._a,a=0|(this||Gr)._b,d=0|(this||Gr)._c,l=0|(this||Gr)._d,v=0|(this||Gr)._e,w=0|(this||Gr)._f,m=0|(this||Gr)._g,y=0|(this||Gr)._h,g=0;g<16;++g)n[g]=e.readInt32BE(4*g);for(;g<64;++g)n[g]=0|(((r=n[g-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)+n[g-7]+Zye(n[g-15])+n[g-16];for(var S=0;S<64;++S){var R=y+Kye(v)+Fye(v,w,m)+qye[S]+n[S]|0,A=Hye(h)+zye(h,a,d)|0;y=m,m=w,w=v,v=l+R|0,l=d,d=a,a=h,h=R+A|0}(this||Gr)._a=h+(this||Gr)._a|0,(this||Gr)._b=a+(this||Gr)._b|0,(this||Gr)._c=d+(this||Gr)._c|0,(this||Gr)._d=l+(this||Gr)._d|0,(this||Gr)._e=v+(this||Gr)._e|0,(this||Gr)._f=w+(this||Gr)._f|0,(this||Gr)._g=m+(this||Gr)._g|0,(this||Gr)._h=y+(this||Gr)._h|0},$p.prototype._hash=function(){var e=Uye.allocUnsafe(32);return e.writeInt32BE((this||Gr)._a,0),e.writeInt32BE((this||Gr)._b,4),e.writeInt32BE((this||Gr)._c,8),e.writeInt32BE((this||Gr)._d,12),e.writeInt32BE((this||Gr)._e,16),e.writeInt32BE((this||Gr)._f,20),e.writeInt32BE((this||Gr)._g,24),e.writeInt32BE((this||Gr)._h,28),e};qV=$p,Hi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Wye=jr,jV=xd,Gye=vi.Buffer,Vye=[1518500249,1859775393,-1894007588,-899497514],Jye=new Array(80);Wye(Up,jV),Up.prototype.init=function(){return(this||Hi)._a=1732584193,(this||Hi)._b=4023233417,(this||Hi)._c=2562383102,(this||Hi)._d=271733878,(this||Hi)._e=3285377520,this||Hi},Up.prototype._update=function(e){for(var r,n=(this||Hi)._w,h=0|(this||Hi)._a,a=0|(this||Hi)._b,d=0|(this||Hi)._c,l=0|(this||Hi)._d,v=0|(this||Hi)._e,w=0;w<16;++w)n[w]=e.readInt32BE(4*w);for(;w<80;++w)n[w]=n[w-3]^n[w-8]^n[w-14]^n[w-16];for(var m=0;m<80;++m){var y=~~(m/20),g=0|((r=h)<<5|r>>>27)+Xye(y,a,d,l)+v+n[m]+Vye[y];v=l,l=d,d=Yye(a),a=h,h=g}(this||Hi)._a=h+(this||Hi)._a|0,(this||Hi)._b=a+(this||Hi)._b|0,(this||Hi)._c=d+(this||Hi)._c|0,(this||Hi)._d=l+(this||Hi)._d|0,(this||Hi)._e=v+(this||Hi)._e|0},Up.prototype._hash=function(){var e=Gye.allocUnsafe(20);return e.writeInt32BE(0|(this||Hi)._a,0),e.writeInt32BE(0|(this||Hi)._b,4),e.writeInt32BE(0|(this||Hi)._c,8),e.writeInt32BE(0|(this||Hi)._d,12),e.writeInt32BE(0|(this||Hi)._e,16),e};Qye=Up,Ki=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,ebe=jr,FV=xd,tbe=vi.Buffer,rbe=[1518500249,1859775393,-1894007588,-899497514],ibe=new Array(80);ebe(qp,FV),qp.prototype.init=function(){return(this||Ki)._a=1732584193,(this||Ki)._b=4023233417,(this||Ki)._c=2562383102,(this||Ki)._d=271733878,(this||Ki)._e=3285377520,this||Ki},qp.prototype._update=function(e){for(var r,n=(this||Ki)._w,h=0|(this||Ki)._a,a=0|(this||Ki)._b,d=0|(this||Ki)._c,l=0|(this||Ki)._d,v=0|(this||Ki)._e,w=0;w<16;++w)n[w]=e.readInt32BE(4*w);for(;w<80;++w)n[w]=(r=n[w-3]^n[w-8]^n[w-14]^n[w-16])<<1|r>>>31;for(var m=0;m<80;++m){var y=~~(m/20),g=nbe(h)+obe(y,a,d,l)+v+n[m]+rbe[y]|0;v=l,l=d,d=abe(a),a=h,h=g}(this||Ki)._a=h+(this||Ki)._a|0,(this||Ki)._b=a+(this||Ki)._b|0,(this||Ki)._c=d+(this||Ki)._c|0,(this||Ki)._d=l+(this||Ki)._d|0,(this||Ki)._e=v+(this||Ki)._e|0},qp.prototype._hash=function(){var e=tbe.allocUnsafe(20);return e.writeInt32BE(0|(this||Ki)._a,0),e.writeInt32BE(0|(this||Ki)._b,4),e.writeInt32BE(0|(this||Ki)._c,8),e.writeInt32BE(0|(this||Ki)._d,12),e.writeInt32BE(0|(this||Ki)._e,16),e};sbe=qp,ca=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,fbe=jr,ube=qV,hbe=xd,lbe=vi.Buffer,cbe=new Array(64);fbe(wy,ube),wy.prototype.init=function(){return(this||ca)._a=3238371032,(this||ca)._b=914150663,(this||ca)._c=812702999,(this||ca)._d=4144912697,(this||ca)._e=4290775857,(this||ca)._f=1750603025,(this||ca)._g=1694076839,(this||ca)._h=3204075428,this||ca},wy.prototype._hash=function(){var e=lbe.allocUnsafe(28);return e.writeInt32BE((this||ca)._a,0),e.writeInt32BE((this||ca)._b,4),e.writeInt32BE((this||ca)._c,8),e.writeInt32BE((this||ca)._d,12),e.writeInt32BE((this||ca)._e,16),e.writeInt32BE((this||ca)._f,20),e.writeInt32BE((this||ca)._g,24),e};dbe=wy,mr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,pbe=jr,zV=xd,vbe=vi.Buffer,sH=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],mbe=new Array(160);pbe(jp,zV),jp.prototype.init=function(){return(this||mr)._ah=1779033703,(this||mr)._bh=3144134277,(this||mr)._ch=1013904242,(this||mr)._dh=2773480762,(this||mr)._eh=1359893119,(this||mr)._fh=2600822924,(this||mr)._gh=528734635,(this||mr)._hh=1541459225,(this||mr)._al=4089235720,(this||mr)._bl=2227873595,(this||mr)._cl=4271175723,(this||mr)._dl=1595750129,(this||mr)._el=2917565137,(this||mr)._fl=725511199,(this||mr)._gl=4215389547,(this||mr)._hl=327033209,this||mr},jp.prototype._update=function(e){for(var r=(this||mr)._w,n=0|(this||mr)._ah,h=0|(this||mr)._bh,a=0|(this||mr)._ch,d=0|(this||mr)._dh,l=0|(this||mr)._eh,v=0|(this||mr)._fh,w=0|(this||mr)._gh,m=0|(this||mr)._hh,y=0|(this||mr)._al,g=0|(this||mr)._bl,S=0|(this||mr)._cl,R=0|(this||mr)._dl,A=0|(this||mr)._el,k=0|(this||mr)._fl,I=0|(this||mr)._gl,B=0|(this||mr)._hl,P=0;P<32;P+=2)r[P]=e.readInt32BE(4*P),r[P+1]=e.readInt32BE(4*P+4);for(;P<160;P+=2){var C=r[P-30],q=r[P-30+1],K=gbe(C,q),V=ybe(q,C),j=bbe(C=r[P-4],q=r[P-4+1]),z=wbe(q,C),Y=r[P-14],E=r[P-14+1],i=r[P-32],s=r[P-32+1],f=V+E|0,c=K+Y+fa(f,V)|0;c=(c=c+j+fa(f=f+z|0,z)|0)+i+fa(f=f+s|0,s)|0,r[P]=c,r[P+1]=f}for(var p=0;p<160;p+=2){c=r[p],f=r[p+1];var _=uH(n,h,a),x=uH(y,g,S),o=hH(n,y),t=hH(y,n),u=lH(l,A),b=lH(A,l),M=sH[p],T=sH[p+1],D=fH(l,v,w),Q=fH(A,k,I),W=B+b|0,X=m+u+fa(W,B)|0;X=(X=(X=X+D+fa(W=W+Q|0,Q)|0)+M+fa(W=W+T|0,T)|0)+c+fa(W=W+f|0,f)|0;var G=t+x|0,J=o+_+fa(G,t)|0;m=w,B=I,w=v,I=k,v=l,k=A,l=d+X+fa(A=R+W|0,R)|0,d=a,R=S,a=h,S=g,h=n,g=y,n=X+J+fa(y=W+G|0,W)|0}(this||mr)._al=(this||mr)._al+y|0,(this||mr)._bl=(this||mr)._bl+g|0,(this||mr)._cl=(this||mr)._cl+S|0,(this||mr)._dl=(this||mr)._dl+R|0,(this||mr)._el=(this||mr)._el+A|0,(this||mr)._fl=(this||mr)._fl+k|0,(this||mr)._gl=(this||mr)._gl+I|0,(this||mr)._hl=(this||mr)._hl+B|0,(this||mr)._ah=(this||mr)._ah+n+fa((this||mr)._al,y)|0,(this||mr)._bh=(this||mr)._bh+h+fa((this||mr)._bl,g)|0,(this||mr)._ch=(this||mr)._ch+a+fa((this||mr)._cl,S)|0,(this||mr)._dh=(this||mr)._dh+d+fa((this||mr)._dl,R)|0,(this||mr)._eh=(this||mr)._eh+l+fa((this||mr)._el,A)|0,(this||mr)._fh=(this||mr)._fh+v+fa((this||mr)._fl,k)|0,(this||mr)._gh=(this||mr)._gh+w+fa((this||mr)._gl,I)|0,(this||mr)._hh=(this||mr)._hh+m+fa((this||mr)._hl,B)|0},jp.prototype._hash=function(){var e=vbe.allocUnsafe(64);function r(n,h,a){e.writeInt32BE(n,a),e.writeInt32BE(h,a+4)}return r((this||mr)._ah,(this||mr)._al,0),r((this||mr)._bh,(this||mr)._bl,8),r((this||mr)._ch,(this||mr)._cl,16),r((this||mr)._dh,(this||mr)._dl,24),r((this||mr)._eh,(this||mr)._el,32),r((this||mr)._fh,(this||mr)._fl,40),r((this||mr)._gh,(this||mr)._gl,48),r((this||mr)._hh,(this||mr)._hl,56),e};HV=jp,Ni=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,_be=jr,Mbe=HV,Sbe=xd,Ebe=vi.Buffer,Abe=new Array(160);_be(_y,Mbe),_y.prototype.init=function(){return(this||Ni)._ah=3418070365,(this||Ni)._bh=1654270250,(this||Ni)._ch=2438529370,(this||Ni)._dh=355462360,(this||Ni)._eh=1731405415,(this||Ni)._fh=2394180231,(this||Ni)._gh=3675008525,(this||Ni)._hh=1203062813,(this||Ni)._al=3238371032,(this||Ni)._bl=914150663,(this||Ni)._cl=812702999,(this||Ni)._dl=4144912697,(this||Ni)._el=4290775857,(this||Ni)._fl=1750603025,(this||Ni)._gl=1694076839,(this||Ni)._hl=3204075428,this||Ni},_y.prototype._hash=function(){var e=Ebe.allocUnsafe(48);function r(n,h,a){e.writeInt32BE(n,a),e.writeInt32BE(h,a+4)}return r((this||Ni)._ah,(this||Ni)._al,0),r((this||Ni)._bh,(this||Ni)._bl,8),r((this||Ni)._ch,(this||Ni)._cl,16),r((this||Ni)._dh,(this||Ni)._dl,24),r((this||Ni)._eh,(this||Ni)._el,32),r((this||Ni)._fh,(this||Ni)._fl,40),e};Rbe=_y,KV={exports:jh={}};(jh=KV.exports=function(e){e=e.toLowerCase();var r=jh[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=Qye,jh.sha1=sbe,jh.sha224=dbe,jh.sha256=qV,jh.sha384=Rbe,jh.sha512=HV;nA=KV.exports,xn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,cH=vi.Buffer,ZV=Ss.Transform,xbe=$n.StringDecoder;jr(cf,ZV),cf.prototype.update=function(e,r,n){typeof e=="string"&&(e=cH.from(e,r));var h=this._update(e);return(this||xn).hashMode?this||xn:(n&&(h=this._toString(h,n)),h)},cf.prototype.setAutoPadding=function(){},cf.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},cf.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},cf.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},cf.prototype._transform=function(e,r,n){var h;try{(this||xn).hashMode?this._update(e):this.push(this._update(e))}catch(a){h=a}finally{n(h)}},cf.prototype._flush=function(e){var r;try{this.push(this.__final())}catch(n){r=n}e(r)},cf.prototype._finalOrDigest=function(e){var r=this.__final()||cH.alloc(0);return e&&(r=this._toString(r,e,!0)),r},cf.prototype._toString=function(e,r,n){if((this||xn)._decoder||((this||xn)._decoder=new xbe(r),(this||xn)._encoding=r),(this||xn)._encoding!==r)throw new Error("can't switch encodings");var h=(this||xn)._decoder.write(e);return n&&(h+=(this||xn)._decoder.end()),h};il=cf,Tbe=rA,kbe=iA,Ibe=nA,WV=il;jr(My,WV),My.prototype._update=function(e){this._hash.update(e)},My.prototype._final=function(){return this._hash.digest()};d2=function(e){return(e=e.toLowerCase())==="md5"?new Tbe:e==="rmd160"||e==="ripemd160"?new kbe:new My(Ibe(e))},Bbe=rA,GV=function(e){return new Bbe().update(e).digest()},Obe=jr,A0=vi.Buffer,VV=il,Pbe=A0.alloc(128);Obe(Sy,VV),Sy.prototype._update=function(e){this._hash.push(e)},Sy.prototype._final=function(){var e=this._alg(A0.concat(this._hash));return this._alg(A0.concat([this._opad,e]))};Nbe=jr,Cbe=Sy,JV=il,Fp=vi.Buffer,Lbe=GV,_E=iA,ME=nA,Dbe=Fp.alloc(128);Nbe(Xp,JV),Xp.prototype._update=function(e){this._hash.update(e)},Xp.prototype._final=function(){var e=this._hash.digest();return(this._alg==="rmd160"?new _E:ME(this._alg)).update(this._opad).update(e).digest()};YV=function(e,r){return(e=e.toLowerCase())==="rmd160"||e==="ripemd160"?new Xp("rmd160",r):e==="md5"?new Cbe(Lbe,r):new Xp(e,r)},XV={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}},$be=Pr.Buffer,Ube=Math.pow(2,30)-1;QV=function(e,r,n,h){if(dH(e,"Password"),dH(r,"Salt"),typeof n!="number")throw new TypeError("Iterations not a number");if(n<0)throw new TypeError("Bad iterations");if(typeof h!="number")throw new TypeError("Key length not a number");if(h<0||h>Ube||h!=h)throw new TypeError("Bad key length")},pH=Br;pH.browser?SE="utf-8":SE=parseInt(pH.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";eJ=SE,vf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,qbe=GV,jbe=iA,Fbe=nA,zbe=QV,vH=eJ,gf=vi.Buffer,Hbe=gf.alloc(128),Ey={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};tJ.prototype.run=function(e,r){return e.copy(r,(this||vf).blocksize),this.hash(r).copy((this||vf).opad,(this||vf).blocksize),this.hash((this||vf).opad)};rJ=function(e,r,n,h,a){zbe(e,r,n,h),gf.isBuffer(e)||(e=gf.from(e,vH)),gf.isBuffer(r)||(r=gf.from(r,vH));var d=new tJ(a=a||"sha1",e,r.length),l=gf.allocUnsafe(h),v=gf.allocUnsafe(r.length+4);r.copy(v,0,0,r.length);for(var w=0,m=Ey[a],y=Math.ceil(h/m),g=1;g<=y;g++){v.writeUInt32BE(g,r.length);for(var S=d.run(v,d.ipad1),R=S,A=1;A<n;A++){R=d.run(R,d.ipad2);for(var k=0;k<m;k++)S[k]^=R[k]}S.copy(l,w),w+=m}return l},Qp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,x_=Br,Kbe=QV,mH=eJ,gH=rJ,ud=vi.Buffer,e2=Qp.crypto&&Qp.crypto.subtle,Zbe={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},T_=[];Wbe=function(e,r,n,h,a,d){typeof a=="function"&&(d=a,a=void 0);var l=Zbe[(a=a||"sha1").toLowerCase()];if(!l||typeof Qp.Promise!="function")return x_.nextTick(function(){var v;try{v=gH(e,r,n,h,a)}catch(w){return d(w)}d(null,v)});if(Kbe(e,r,n,h),typeof d!="function")throw new Error("No callback provided to pbkdf2");ud.isBuffer(e)||(e=ud.from(e,mH)),ud.isBuffer(r)||(r=ud.from(r,mH)),function(v,w){v.then(function(m){x_.nextTick(function(){w(null,m)})},function(m){x_.nextTick(function(){w(m)})})}(function(v){if(Qp.process&&!Qp.process.browser||!e2||!e2.importKey||!e2.deriveBits)return Promise.resolve(!1);if(T_[v]!==void 0)return T_[v];var w=yH(R_=R_||ud.alloc(8),R_,10,128,v).then(function(){return!0}).catch(function(){return!1});return T_[v]=w,w}(l).then(function(v){return v?yH(e,r,n,h,l):gH(e,r,n,h,a)}),d)},Ly={};Ly.pbkdf2=Wbe,Ly.pbkdf2Sync=rJ;iJ=bH,bH.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};Es=iJ,B0={readUInt32BE:function(e,r){return(e[0+r]<<24|e[1+r]<<16|e[2+r]<<8|e[3+r])>>>0},writeUInt32BE:function(e,r,n){e[0+n]=r>>>24,e[1+n]=r>>>16&255,e[2+n]=r>>>8&255,e[3+n]=255&r},ip:function(e,r,n,h){for(var a=0,d=0,l=6;l>=0;l-=2){for(var v=0;v<=24;v+=8)a<<=1,a|=r>>>v+l&1;for(v=0;v<=24;v+=8)a<<=1,a|=e>>>v+l&1}for(l=6;l>=0;l-=2){for(v=1;v<=25;v+=8)d<<=1,d|=r>>>v+l&1;for(v=1;v<=25;v+=8)d<<=1,d|=e>>>v+l&1}n[h+0]=a>>>0,n[h+1]=d>>>0},rip:function(e,r,n,h){for(var a=0,d=0,l=0;l<4;l++)for(var v=24;v>=0;v-=8)a<<=1,a|=r>>>v+l&1,a<<=1,a|=e>>>v+l&1;for(l=4;l<8;l++)for(v=24;v>=0;v-=8)d<<=1,d|=r>>>v+l&1,d<<=1,d|=e>>>v+l&1;n[h+0]=a>>>0,n[h+1]=d>>>0},pc1:function(e,r,n,h){for(var a=0,d=0,l=7;l>=5;l--){for(var v=0;v<=24;v+=8)a<<=1,a|=r>>v+l&1;for(v=0;v<=24;v+=8)a<<=1,a|=e>>v+l&1}for(v=0;v<=24;v+=8)a<<=1,a|=r>>v+l&1;for(l=1;l<=3;l++){for(v=0;v<=24;v+=8)d<<=1,d|=r>>v+l&1;for(v=0;v<=24;v+=8)d<<=1,d|=e>>v+l&1}for(v=0;v<=24;v+=8)d<<=1,d|=e>>v+l&1;n[h+0]=a>>>0,n[h+1]=d>>>0},r28shl:function(e,r){return e<<r&268435455|e>>>28-r}},U6=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];B0.pc2=function(e,r,n,h){for(var a=0,d=0,l=U6.length>>>1,v=0;v<l;v++)a<<=1,a|=e>>>U6[v]&1;for(v=l;v<U6.length;v++)d<<=1,d|=r>>>U6[v]&1;n[h+0]=a>>>0,n[h+1]=d>>>0},B0.expand=function(e,r,n){var h=0,a=0;h=(1&e)<<5|e>>>27;for(var d=23;d>=15;d-=4)h<<=6,h|=e>>>d&63;for(d=11;d>=3;d-=4)a|=e>>>d&63,a<<=6;a|=(31&e)<<1|e>>>31,r[n+0]=h>>>0,r[n+1]=a>>>0};wH=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];B0.substitute=function(e,r){for(var n=0,h=0;h<4;h++)n<<=4,n|=wH[64*h+(e>>>18-6*h&63)];for(h=0;h<4;h++)n<<=4,n|=wH[256+64*h+(r>>>18-6*h&63)];return n>>>0};_H=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];B0.permute=function(e){for(var r=0,n=0;n<_H.length;n++)r<<=1,r|=e>>>_H[n]&1;return r>>>0},B0.padSplit=function(e,r,n){for(var h=e.toString(2);h.length<r;)h="0"+h;for(var a=[],d=0;d<r;d+=n)a.push(h.slice(d,d+n));return a.join(" ")};Gbe=Es;nJ=cs,cs.prototype._init=function(){},cs.prototype.update=function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)},cs.prototype._buffer=function(e,r){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-r),h=0;h<n;h++)this.buffer[this.bufferOff+h]=e[r+h];return this.bufferOff+=n,n},cs.prototype._flushBuffer=function(e,r){return this._update(this.buffer,0,e,r),this.bufferOff=0,this.blockSize},cs.prototype._updateEncrypt=function(e){var r=0,n=0,h=(this.bufferOff+e.length)/this.blockSize|0,a=new Array(h*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(e,r),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(a,n)));for(var d=e.length-(e.length-r)%this.blockSize;r<d;r+=this.blockSize)this._update(e,r,a,n),n+=this.blockSize;for(;r<e.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=e[r];return a},cs.prototype._updateDecrypt=function(e){for(var r=0,n=0,h=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,a=new Array(h*this.blockSize);h>0;h--)r+=this._buffer(e,r),n+=this._flushBuffer(a,n);return r+=this._buffer(e,r),a},cs.prototype.final=function(e){var r,n;return e&&(r=this.update(e)),n=this.type==="encrypt"?this._finalEncrypt():this._finalDecrypt(),r?r.concat(n):n},cs.prototype._pad=function(e,r){if(r===0)return!1;for(;r<e.length;)e[r++]=0;return!0},cs.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},cs.prototype._unpad=function(e){return e},cs.prototype._finalDecrypt=function(){Gbe.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)};aA=nJ,MH=Es,Zn=B0,oJ=aA;jr(iu,oJ),aJ=iu,iu.create=function(e){return new iu(e)};Jbe=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];iu.prototype.deriveKeys=function(e,r){e.keys=new Array(32),MH.equal(r.length,this.blockSize,"Invalid key length");var n=Zn.readUInt32BE(r,0),h=Zn.readUInt32BE(r,4);Zn.pc1(n,h,e.tmp,0),n=e.tmp[0],h=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var d=Jbe[a>>>1];n=Zn.r28shl(n,d),h=Zn.r28shl(h,d),Zn.pc2(n,h,e.keys,a)}},iu.prototype._update=function(e,r,n,h){var a=this._desState,d=Zn.readUInt32BE(e,r),l=Zn.readUInt32BE(e,r+4);Zn.ip(d,l,a.tmp,0),d=a.tmp[0],l=a.tmp[1],this.type==="encrypt"?this._encrypt(a,d,l,a.tmp,0):this._decrypt(a,d,l,a.tmp,0),d=a.tmp[0],l=a.tmp[1],Zn.writeUInt32BE(n,d,h),Zn.writeUInt32BE(n,l,h+4)},iu.prototype._pad=function(e,r){for(var n=e.length-r,h=r;h<e.length;h++)e[h]=n;return!0},iu.prototype._unpad=function(e){for(var r=e[e.length-1],n=e.length-r;n<e.length;n++)MH.equal(e[n],r);return e.slice(0,e.length-r)},iu.prototype._encrypt=function(e,r,n,h,a){for(var d=r,l=n,v=0;v<e.keys.length;v+=2){var w=e.keys[v],m=e.keys[v+1];Zn.expand(l,e.tmp,0),w^=e.tmp[0],m^=e.tmp[1];var y=Zn.substitute(w,m),g=l;l=(d^Zn.permute(y))>>>0,d=g}Zn.rip(l,d,h,a)},iu.prototype._decrypt=function(e,r,n,h,a){for(var d=n,l=r,v=e.keys.length-2;v>=0;v-=2){var w=e.keys[v],m=e.keys[v+1];Zn.expand(d,e.tmp,0),w^=e.tmp[0],m^=e.tmp[1];var y=Zn.substitute(w,m),g=d;d=(l^Zn.permute(y))>>>0,l=g}Zn.rip(d,l,h,a)};sJ=aJ,fJ={},Ybe=Es,Xbe=jr,q6={};fJ.instantiate=function(e){function r(d){e.call(this,d),this._cbcInit()}Xbe(r,e);for(var n=Object.keys(q6),h=0;h<n.length;h++){var a=n[h];r.prototype[a]=q6[a]}return r.create=function(d){return new r(d)},r},q6._cbcInit=function(){var e=new Qbe(this.options.iv);this._cbcState=e},q6._update=function(e,r,n,h){var a=this._cbcState,d=this.constructor.super_.prototype,l=a.iv;if(this.type==="encrypt"){for(var v=0;v<this.blockSize;v++)l[v]^=e[r+v];for(d._update.call(this,l,0,n,h),v=0;v<this.blockSize;v++)l[v]=n[h+v]}else{for(d._update.call(this,e,r,n,h),v=0;v<this.blockSize;v++)n[h+v]^=l[v];for(v=0;v<this.blockSize;v++)l[v]=e[r+v]}};e3e=Es,hJ=aA,Vh=sJ;jr(n0,hJ),uJ=n0,n0.create=function(e){return new n0(e)},n0.prototype._update=function(e,r,n,h){var a=this._edeState;a.ciphers[0]._update(e,r,n,h),a.ciphers[1]._update(n,h,n,h),a.ciphers[2]._update(n,h,n,h)},n0.prototype._pad=Vh.prototype._pad,n0.prototype._unpad=Vh.prototype._unpad;r3e=uJ,hd={};hd.utils=B0,hd.Cipher=aA,hd.DES=sJ,hd.CBC=fJ,hd.EDE=r3e;Dy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,cJ=il,qu=hd,i3e=jr,b0=vi.Buffer,zp={"des-ede3-cbc":qu.CBC.instantiate(qu.EDE),"des-ede3":qu.EDE,"des-ede-cbc":qu.CBC.instantiate(qu.EDE),"des-ede":qu.EDE,"des-cbc":qu.CBC.instantiate(qu.DES),"des-ecb":qu.DES};zp.des=zp["des-cbc"],zp.des3=zp["des-ede3-cbc"],lJ=j6,i3e(j6,cJ),j6.prototype._update=function(e){return b0.from((this||Dy)._des.update(e))},j6.prototype._final=function(){return b0.from((this||Dy)._des.final())};n3e=lJ,a3e=Pr.Buffer,p2=function(e,r){for(var n=Math.min(e.length,r.length),h=new a3e(n),a=0;a<n;++a)h[a]=e[a]^r[a];return h},dJ=function(e){for(var r,n=e.length;n--;){if((r=e.readUInt8(n))!==255){r++,e.writeUInt8(r,n);break}e.writeUInt8(0,n)}},o3e={encrypt:function(e,r){return e._cipher.encryptBlock(r)},decrypt:function(e,r){return e._cipher.decryptBlock(r)}},EE={},SH=p2;EE.encrypt=function(e,r){var n=SH(r,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},EE.decrypt=function(e,r){var n=e._prev;e._prev=r;var h=e._cipher.decryptBlock(r);return SH(h,n)};pJ={},Hp=vi.Buffer,s3e=p2;pJ.encrypt=function(e,r,n){for(var h,a=Hp.allocUnsafe(0);r.length;){if(e._cache.length===0&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=Hp.allocUnsafe(0)),!(e._cache.length<=r.length)){a=Hp.concat([a,EH(e,r,n)]);break}h=e._cache.length,a=Hp.concat([a,EH(e,r.slice(0,h),n)]),r=r.slice(h)}return a};vJ={},AE=vi.Buffer;vJ.encrypt=function(e,r,n){for(var h=r.length,a=AE.allocUnsafe(h),d=-1;++d<h;)a[d]=f3e(e,r[d],n);return a};mJ={},Ay=vi.Buffer;mJ.encrypt=function(e,r,n){for(var h=r.length,a=Ay.allocUnsafe(h),d=-1;++d<h;)a[d]=u3e(e,r[d],n);return a};gJ={},l3e=Pr.Buffer,c3e=p2;gJ.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=l3e.concat([e._cache,d3e(e)]);var n=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),c3e(r,n)};RE={},p3e=p2,AH=vi.Buffer,v3e=dJ;RE.encrypt=function(e,r){var n=Math.ceil(r.length/16),h=e._cache.length;e._cache=AH.concat([e._cache,AH.allocUnsafe(16*n)]);for(var a=0;a<n;a++){var d=m3e(e),l=h+16*a;e._cache.writeUInt32BE(d[0],l+0),e._cache.writeUInt32BE(d[1],l+4),e._cache.writeUInt32BE(d[2],l+8),e._cache.writeUInt32BE(d[3],l+12)}var v=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),p3e(r,v)};yJ={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},g3e={ECB:o3e,CBC:EE,CFB:pJ,CFB8:vJ,CFB1:mJ,OFB:gJ,CTR:RE,GCM:RE},Ry=yJ;for(k_ in Ry)Ry[k_].module=g3e[Ry[k_].mode];oA=Ry,ws=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,v2={},$y=vi.Buffer;y3e=[0,1,2,4,8,16,32,64,128,27,54],Un=function(){for(var e=new Array(256),r=0;r<256;r++)e[r]=r<128?r<<1:r<<1^283;for(var n=[],h=[],a=[[],[],[],[]],d=[[],[],[],[]],l=0,v=0,w=0;w<256;++w){var m=v^v<<1^v<<2^v<<3^v<<4;m=m>>>8^255&m^99,n[l]=m,h[m]=l;var y=e[l],g=e[y],S=e[g],R=257*e[m]^16843008*m;a[0][l]=R<<24|R>>>8,a[1][l]=R<<16|R>>>16,a[2][l]=R<<8|R>>>24,a[3][l]=R,R=16843009*S^65537*g^257*y^16843008*l,d[0][m]=R<<24|R>>>8,d[1][m]=R<<16|R>>>16,d[2][m]=R<<8|R>>>24,d[3][m]=R,l===0?l=v=1:(l=y^e[e[e[S^y]]],v^=e[e[v]])}return{SBOX:n,INV_SBOX:h,SUB_MIX:a,INV_SUB_MIX:d}}();ds.blockSize=16,ds.keySize=32,ds.prototype.blockSize=ds.blockSize,ds.prototype.keySize=ds.keySize,ds.prototype._reset=function(){for(var e=(this||ws)._key,r=e.length,n=r+6,h=4*(n+1),a=[],d=0;d<r;d++)a[d]=e[d];for(d=r;d<h;d++){var l=a[d-1];d%r==0?(l=l<<8|l>>>24,l=Un.SBOX[l>>>24]<<24|Un.SBOX[l>>>16&255]<<16|Un.SBOX[l>>>8&255]<<8|Un.SBOX[255&l],l^=y3e[d/r|0]<<24):r>6&&d%r==4&&(l=Un.SBOX[l>>>24]<<24|Un.SBOX[l>>>16&255]<<16|Un.SBOX[l>>>8&255]<<8|Un.SBOX[255&l]),a[d]=a[d-r]^l}for(var v=[],w=0;w<h;w++){var m=h-w,y=a[m-(w%4?0:4)];v[w]=w<4||m<=4?y:Un.INV_SUB_MIX[0][Un.SBOX[y>>>24]]^Un.INV_SUB_MIX[1][Un.SBOX[y>>>16&255]]^Un.INV_SUB_MIX[2][Un.SBOX[y>>>8&255]]^Un.INV_SUB_MIX[3][Un.SBOX[255&y]]}(this||ws)._nRounds=n,(this||ws)._keySchedule=a,(this||ws)._invKeySchedule=v},ds.prototype.encryptBlockRaw=function(e){return RH(e=xE(e),(this||ws)._keySchedule,Un.SUB_MIX,Un.SBOX,(this||ws)._nRounds)},ds.prototype.encryptBlock=function(e){var r=this.encryptBlockRaw(e),n=$y.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[1],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[3],12),n},ds.prototype.decryptBlock=function(e){var r=(e=xE(e))[1];e[1]=e[3],e[3]=r;var n=RH(e,(this||ws)._invKeySchedule,Un.INV_SUB_MIX,Un.INV_SBOX,(this||ws)._nRounds),h=$y.allocUnsafe(16);return h.writeUInt32BE(n[0],0),h.writeUInt32BE(n[3],4),h.writeUInt32BE(n[2],8),h.writeUInt32BE(n[1],12),h},ds.prototype.scrub=function(){I_((this||ws)._keySchedule),I_((this||ws)._invKeySchedule),I_((this||ws)._key)},v2.AES=ds;Oa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,bd=vi.Buffer,b3e=bd.alloc(16,0);Kp.prototype.ghash=function(e){for(var r=-1;++r<e.length;)(this||Oa).state[r]^=e[r];this._multiply()},Kp.prototype._multiply=function(){for(var e,r,n,h=[(e=(this||Oa).h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],a=[0,0,0,0],d=-1;++d<128;){for((this||Oa).state[~~(d/8)]&1<<7-d%8&&(a[0]^=h[0],a[1]^=h[1],a[2]^=h[2],a[3]^=h[3]),n=(1&h[3])!=0,r=3;r>0;r--)h[r]=h[r]>>>1|(1&h[r-1])<<31;h[0]=h[0]>>>1,n&&(h[0]=h[0]^225<<24)}(this||Oa).state=xH(a)},Kp.prototype.update=function(e){var r;for((this||Oa).cache=bd.concat([(this||Oa).cache,e]);(this||Oa).cache.length>=16;)r=(this||Oa).cache.slice(0,16),(this||Oa).cache=(this||Oa).cache.slice(16),this.ghash(r)},Kp.prototype.final=function(e,r){return(this||Oa).cache.length&&this.ghash(bd.concat([(this||Oa).cache,b3e],16)),this.ghash(xH([0,e,0,r])),(this||Oa).state};w3e=Kp,Vr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,_3e=v2,so=vi.Buffer,bJ=il,TH=w3e,M3e=p2,S3e=dJ;jr(v0,bJ),v0.prototype._update=function(e){if(!(this||Vr)._called&&(this||Vr)._alen){var r=16-(this||Vr)._alen%16;r<16&&(r=so.alloc(r,0),(this||Vr)._ghash.update(r))}(this||Vr)._called=!0;var n=(this||Vr)._mode.encrypt(this||Vr,e);return(this||Vr)._decrypt?(this||Vr)._ghash.update(e):(this||Vr)._ghash.update(n),(this||Vr)._len+=e.length,n},v0.prototype._final=function(){if((this||Vr)._decrypt&&!(this||Vr)._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=M3e((this||Vr)._ghash.final(8*(this||Vr)._alen,8*(this||Vr)._len),(this||Vr)._cipher.encryptBlock((this||Vr)._finID));if((this||Vr)._decrypt&&function(r,n){var h=0;r.length!==n.length&&h++;for(var a=Math.min(r.length,n.length),d=0;d<a;++d)h+=r[d]^n[d];return h}(e,(this||Vr)._authTag))throw new Error("Unsupported state or unable to authenticate data");(this||Vr)._authTag=e,(this||Vr)._cipher.scrub()},v0.prototype.getAuthTag=function(){if((this||Vr)._decrypt||!so.isBuffer((this||Vr)._authTag))throw new Error("Attempting to get auth tag in unsupported state");return(this||Vr)._authTag},v0.prototype.setAuthTag=function(e){if(!(this||Vr)._decrypt)throw new Error("Attempting to set auth tag in unsupported state");(this||Vr)._authTag=e},v0.prototype.setAAD=function(e){if((this||Vr)._called)throw new Error("Attempting to set AAD in unsupported state");(this||Vr)._ghash.update(e),(this||Vr)._alen+=e.length};wJ=v0,mf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,E3e=v2,B_=vi.Buffer,_J=il;jr(xy,_J),xy.prototype._update=function(e){return(this||mf)._mode.encrypt(this||mf,e,(this||mf)._decrypt)},xy.prototype._final=function(){(this||mf)._cipher.scrub()};MJ=xy,a0=vi.Buffer,A3e=rA,Qy=function(e,r,n,h){if(a0.isBuffer(e)||(e=a0.from(e,"binary")),r&&(a0.isBuffer(r)||(r=a0.from(r,"binary")),r.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,d=a0.alloc(a),l=a0.alloc(h||0),v=a0.alloc(0);a>0||h>0;){var w=new A3e;w.update(v),w.update(e),r&&w.update(r),v=w.digest();var m=0;if(a>0){var y=d.length-a;m=Math.min(a,v.length),v.copy(d,y,0,m),a-=m}if(m<v.length&&h>0){var g=l.length-h,S=Math.min(h,v.length-m);v.copy(l,g,m,m+S),h-=S}}return v.fill(0),{key:d,iv:l}},Ci=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,TE={},R3e=wJ,wd=vi.Buffer,SJ=oA,x3e=MJ,EJ=il,T3e=v2,k3e=Qy;jr(Zp,EJ),Zp.prototype._update=function(e){var r,n;(this||Ci)._cache.add(e);for(var h=[];r=(this||Ci)._cache.get((this||Ci)._autopadding);)n=(this||Ci)._mode.decrypt(this||Ci,r),h.push(n);return wd.concat(h)},Zp.prototype._final=function(){var e=(this||Ci)._cache.flush();if((this||Ci)._autopadding)return function(r){var n=r[15];if(n<1||n>16)throw new Error("unable to decrypt data");for(var h=-1;++h<n;)if(r[h+(16-n)]!==n)throw new Error("unable to decrypt data");if(n!==16)return r.slice(0,16-n)}((this||Ci)._mode.decrypt(this||Ci,e));if(e)throw new Error("data not multiple of block length")},Zp.prototype.setAutoPadding=function(e){return(this||Ci)._autopadding=!!e,this||Ci},Ty.prototype.add=function(e){(this||Ci).cache=wd.concat([(this||Ci).cache,e])},Ty.prototype.get=function(e){var r;if(e){if((this||Ci).cache.length>16)return r=(this||Ci).cache.slice(0,16),(this||Ci).cache=(this||Ci).cache.slice(16),r}else if((this||Ci).cache.length>=16)return r=(this||Ci).cache.slice(0,16),(this||Ci).cache=(this||Ci).cache.slice(16),r;return null},Ty.prototype.flush=function(){if((this||Ci).cache.length)return(this||Ci).cache},TE.createDecipher=function(e,r){var n=SJ[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var h=k3e(r,!1,n.key,n.iv);return kH(e,h.key,h.iv)},TE.createDecipheriv=kH;sn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,kE={},AJ=oA,I3e=wJ,Gu=vi.Buffer,B3e=MJ,RJ=il,O3e=v2,P3e=Qy;jr(n2,RJ),n2.prototype._update=function(e){var r,n;(this||sn)._cache.add(e);for(var h=[];r=(this||sn)._cache.get();)n=(this||sn)._mode.encrypt(this||sn,r),h.push(n);return Gu.concat(h)};N3e=Gu.alloc(16,16);n2.prototype._final=function(){var e=(this||sn)._cache.flush();if((this||sn)._autopadding)return e=(this||sn)._mode.encrypt(this||sn,e),(this||sn)._cipher.scrub(),e;if(!e.equals(N3e))throw(this||sn)._cipher.scrub(),new Error("data not multiple of block length")},n2.prototype.setAutoPadding=function(e){return(this||sn)._autopadding=!!e,this||sn},ky.prototype.add=function(e){(this||sn).cache=Gu.concat([(this||sn).cache,e])},ky.prototype.get=function(){if((this||sn).cache.length>15){var e=(this||sn).cache.slice(0,16);return(this||sn).cache=(this||sn).cache.slice(16),e}return null},ky.prototype.flush=function(){for(var e=16-(this||sn).cache.length,r=Gu.allocUnsafe(e),n=-1;++n<e;)r.writeUInt8(e,n);return Gu.concat([(this||sn).cache,r])},kE.createCipheriv=IH,kE.createCipher=function(e,r){var n=AJ[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var h=P3e(r,!1,n.key,n.iv);return IH(e,h.key,h.iv)};Bo={},BH=kE,OH=TE,C3e=yJ;Bo.createCipher=Bo.Cipher=BH.createCipher,Bo.createCipheriv=Bo.Cipheriv=BH.createCipheriv,Bo.createDecipher=Bo.Decipher=OH.createDecipher,Bo.createDecipheriv=Bo.Decipheriv=OH.createDecipheriv,Bo.listCiphers=Bo.getCiphers=function(){return Object.keys(C3e)};Fh={"des-ecb":{key:8,iv:0}};Fh["des-cbc"]=Fh.des={key:8,iv:8},Fh["des-ede3-cbc"]=Fh.des3={key:24,iv:8},Fh["des-ede3"]={key:24,iv:0},Fh["des-ede-cbc"]={key:16,iv:8},Fh["des-ede"]={key:16,iv:0};df={},xJ=n3e,sA=Bo,Jh=oA,Fu=Fh,PH=Qy;df.createCipher=df.Cipher=function(e,r){var n,h;if(e=e.toLowerCase(),Jh[e])n=Jh[e].key,h=Jh[e].iv;else{if(!Fu[e])throw new TypeError("invalid suite type");n=8*Fu[e].key,h=Fu[e].iv}var a=PH(r,!1,n,h);return NH(e,a.key,a.iv)},df.createCipheriv=df.Cipheriv=NH,df.createDecipher=df.Decipher=function(e,r){var n,h;if(e=e.toLowerCase(),Jh[e])n=Jh[e].key,h=Jh[e].iv;else{if(!Fu[e])throw new TypeError("invalid suite type");n=8*Fu[e].key,h=Fu[e].iv}var a=PH(r,!1,n,h);return CH(e,a.key,a.iv)},df.createDecipheriv=df.Decipheriv=CH,df.listCiphers=df.getCiphers=function(){return Object.keys(Fu).concat(sA.getCiphers())};L3e=Object.freeze({}),et=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,TJ={},kJ={exports:TJ};(function(e,r){function n(j,z){if(!j)throw new Error(z||"Assertion failed")}function h(j,z){j.super_=z;var Y=function(){};Y.prototype=z.prototype,j.prototype=new Y,j.prototype.constructor=j}function a(j,z,Y){if(a.isBN(j))return j;(this||et).negative=0,(this||et).words=null,(this||et).length=0,(this||et).red=null,j!==null&&(z!=="le"&&z!=="be"||(Y=z,z=10),this._init(j||0,z||10,Y||"be"))}var d;typeof e=="object"?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{d=L3e.Buffer}catch{}function l(j,z,Y){for(var E=0,i=Math.min(j.length,Y),s=z;s<i;s++){var f=j.charCodeAt(s)-48;E<<=4,E|=f>=49&&f<=54?f-49+10:f>=17&&f<=22?f-17+10:15&f}return E}function v(j,z,Y,E){for(var i=0,s=Math.min(j.length,Y),f=z;f<s;f++){var c=j.charCodeAt(f)-48;i*=E,i+=c>=49?c-49+10:c>=17?c-17+10:c}return i}a.isBN=function(j){return j instanceof a||j!==null&&typeof j=="object"&&j.constructor.wordSize===a.wordSize&&Array.isArray(j.words)},a.max=function(j,z){return j.cmp(z)>0?j:z},a.min=function(j,z){return j.cmp(z)<0?j:z},a.prototype._init=function(j,z,Y){if(typeof j=="number")return this._initNumber(j,z,Y);if(typeof j=="object")return this._initArray(j,z,Y);z==="hex"&&(z=16),n(z===(0|z)&&z>=2&&z<=36);var E=0;(j=j.toString().replace(/\s+/g,""))[0]==="-"&&E++,z===16?this._parseHex(j,E):this._parseBase(j,z,E),j[0]==="-"&&((this||et).negative=1),this.strip(),Y==="le"&&this._initArray(this.toArray(),z,Y)},a.prototype._initNumber=function(j,z,Y){j<0&&((this||et).negative=1,j=-j),j<67108864?((this||et).words=[67108863&j],(this||et).length=1):j<4503599627370496?((this||et).words=[67108863&j,j/67108864&67108863],(this||et).length=2):(n(j<9007199254740992),(this||et).words=[67108863&j,j/67108864&67108863,1],(this||et).length=3),Y==="le"&&this._initArray(this.toArray(),z,Y)},a.prototype._initArray=function(j,z,Y){if(n(typeof j.length=="number"),j.length<=0)return(this||et).words=[0],(this||et).length=1,this||et;(this||et).length=Math.ceil(j.length/3),(this||et).words=new Array((this||et).length);for(var E=0;E<(this||et).length;E++)(this||et).words[E]=0;var i,s,f=0;if(Y==="be")for(E=j.length-1,i=0;E>=0;E-=3)s=j[E]|j[E-1]<<8|j[E-2]<<16,(this||et).words[i]|=s<<f&67108863,(this||et).words[i+1]=s>>>26-f&67108863,(f+=24)>=26&&(f-=26,i++);else if(Y==="le")for(E=0,i=0;E<j.length;E+=3)s=j[E]|j[E+1]<<8|j[E+2]<<16,(this||et).words[i]|=s<<f&67108863,(this||et).words[i+1]=s>>>26-f&67108863,(f+=24)>=26&&(f-=26,i++);return this.strip()},a.prototype._parseHex=function(j,z){(this||et).length=Math.ceil((j.length-z)/6),(this||et).words=new Array((this||et).length);for(var Y=0;Y<(this||et).length;Y++)(this||et).words[Y]=0;var E,i,s=0;for(Y=j.length-6,E=0;Y>=z;Y-=6)i=l(j,Y,Y+6),(this||et).words[E]|=i<<s&67108863,(this||et).words[E+1]|=i>>>26-s&4194303,(s+=24)>=26&&(s-=26,E++);Y+6!==z&&(i=l(j,z,Y+6),(this||et).words[E]|=i<<s&67108863,(this||et).words[E+1]|=i>>>26-s&4194303),this.strip()},a.prototype._parseBase=function(j,z,Y){(this||et).words=[0],(this||et).length=1;for(var E=0,i=1;i<=67108863;i*=z)E++;E--,i=i/z|0;for(var s=j.length-Y,f=s%E,c=Math.min(s,s-f)+Y,p=0,_=Y;_<c;_+=E)p=v(j,_,_+E,z),this.imuln(i),(this||et).words[0]+p<67108864?(this||et).words[0]+=p:this._iaddn(p);if(f!==0){var x=1;for(p=v(j,_,j.length,z),_=0;_<f;_++)x*=z;this.imuln(x),(this||et).words[0]+p<67108864?(this||et).words[0]+=p:this._iaddn(p)}},a.prototype.copy=function(j){j.words=new Array((this||et).length);for(var z=0;z<(this||et).length;z++)j.words[z]=(this||et).words[z];j.length=(this||et).length,j.negative=(this||et).negative,j.red=(this||et).red},a.prototype.clone=function(){var j=new a(null);return this.copy(j),j},a.prototype._expand=function(j){for(;(this||et).length<j;)(this||et).words[(this||et).length++]=0;return this||et},a.prototype.strip=function(){for(;(this||et).length>1&&(this||et).words[(this||et).length-1]===0;)(this||et).length--;return this._normSign()},a.prototype._normSign=function(){return(this||et).length===1&&(this||et).words[0]===0&&((this||et).negative=0),this||et},a.prototype.inspect=function(){return((this||et).red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var w=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],m=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],y=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(j,z,Y){Y.negative=z.negative^j.negative;var E=j.length+z.length|0;Y.length=E,E=E-1|0;var i=0|j.words[0],s=0|z.words[0],f=i*s,c=67108863&f,p=f/67108864|0;Y.words[0]=c;for(var _=1;_<E;_++){for(var x=p>>>26,o=67108863&p,t=Math.min(_,z.length-1),u=Math.max(0,_-j.length+1);u<=t;u++){var b=_-u|0;x+=(f=(i=0|j.words[b])*(s=0|z.words[u])+o)/67108864|0,o=67108863&f}Y.words[_]=0|o,p=0|x}return p!==0?Y.words[_]=0|p:Y.length--,Y.strip()}a.prototype.toString=function(j,z){var Y;if(z=0|z||1,(j=j||10)===16||j==="hex"){Y="";for(var E=0,i=0,s=0;s<(this||et).length;s++){var f=(this||et).words[s],c=(16777215&(f<<E|i)).toString(16);Y=(i=f>>>24-E&16777215)!==0||s!==(this||et).length-1?w[6-c.length]+c+Y:c+Y,(E+=2)>=26&&(E-=26,s--)}for(i!==0&&(Y=i.toString(16)+Y);Y.length%z!=0;)Y="0"+Y;return(this||et).negative!==0&&(Y="-"+Y),Y}if(j===(0|j)&&j>=2&&j<=36){var p=m[j],_=y[j];Y="";var x=this.clone();for(x.negative=0;!x.isZero();){var o=x.modn(_).toString(j);Y=(x=x.idivn(_)).isZero()?o+Y:w[p-o.length]+o+Y}for(this.isZero()&&(Y="0"+Y);Y.length%z!=0;)Y="0"+Y;return(this||et).negative!==0&&(Y="-"+Y),Y}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var j=(this||et).words[0];return(this||et).length===2?j+=67108864*(this||et).words[1]:(this||et).length===3&&(this||et).words[2]===1?j+=4503599627370496+67108864*(this||et).words[1]:(this||et).length>2&&n(!1,"Number can only safely store up to 53 bits"),(this||et).negative!==0?-j:j},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(j,z){return n(d!==void 0),this.toArrayLike(d,j,z)},a.prototype.toArray=function(j,z){return this.toArrayLike(Array,j,z)},a.prototype.toArrayLike=function(j,z,Y){var E=this.byteLength(),i=Y||Math.max(1,E);n(E<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var s,f,c=z==="le",p=new j(i),_=this.clone();if(c){for(f=0;!_.isZero();f++)s=_.andln(255),_.iushrn(8),p[f]=s;for(;f<i;f++)p[f]=0}else{for(f=0;f<i-E;f++)p[f]=0;for(f=0;!_.isZero();f++)s=_.andln(255),_.iushrn(8),p[i-f-1]=s}return p},Math.clz32?a.prototype._countBits=function(j){return 32-Math.clz32(j)}:a.prototype._countBits=function(j){var z=j,Y=0;return z>=4096&&(Y+=13,z>>>=13),z>=64&&(Y+=7,z>>>=7),z>=8&&(Y+=4,z>>>=4),z>=2&&(Y+=2,z>>>=2),Y+z},a.prototype._zeroBits=function(j){if(j===0)return 26;var z=j,Y=0;return!(8191&z)&&(Y+=13,z>>>=13),!(127&z)&&(Y+=7,z>>>=7),!(15&z)&&(Y+=4,z>>>=4),!(3&z)&&(Y+=2,z>>>=2),!(1&z)&&Y++,Y},a.prototype.bitLength=function(){var j=(this||et).words[(this||et).length-1],z=this._countBits(j);return 26*((this||et).length-1)+z},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var j=0,z=0;z<(this||et).length;z++){var Y=this._zeroBits((this||et).words[z]);if(j+=Y,Y!==26)break}return j},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(j){return(this||et).negative!==0?this.abs().inotn(j).iaddn(1):this.clone()},a.prototype.fromTwos=function(j){return this.testn(j-1)?this.notn(j).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return(this||et).negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||((this||et).negative^=1),this||et},a.prototype.iuor=function(j){for(;(this||et).length<j.length;)(this||et).words[(this||et).length++]=0;for(var z=0;z<j.length;z++)(this||et).words[z]=(this||et).words[z]|j.words[z];return this.strip()},a.prototype.ior=function(j){return n(((this||et).negative|j.negative)==0),this.iuor(j)},a.prototype.or=function(j){return(this||et).length>j.length?this.clone().ior(j):j.clone().ior(this||et)},a.prototype.uor=function(j){return(this||et).length>j.length?this.clone().iuor(j):j.clone().iuor(this||et)},a.prototype.iuand=function(j){var z;z=(this||et).length>j.length?j:this||et;for(var Y=0;Y<z.length;Y++)(this||et).words[Y]=(this||et).words[Y]&j.words[Y];return(this||et).length=z.length,this.strip()},a.prototype.iand=function(j){return n(((this||et).negative|j.negative)==0),this.iuand(j)},a.prototype.and=function(j){return(this||et).length>j.length?this.clone().iand(j):j.clone().iand(this||et)},a.prototype.uand=function(j){return(this||et).length>j.length?this.clone().iuand(j):j.clone().iuand(this||et)},a.prototype.iuxor=function(j){var z,Y;(this||et).length>j.length?(z=this||et,Y=j):(z=j,Y=this||et);for(var E=0;E<Y.length;E++)(this||et).words[E]=z.words[E]^Y.words[E];if((this||et)!==z)for(;E<z.length;E++)(this||et).words[E]=z.words[E];return(this||et).length=z.length,this.strip()},a.prototype.ixor=function(j){return n(((this||et).negative|j.negative)==0),this.iuxor(j)},a.prototype.xor=function(j){return(this||et).length>j.length?this.clone().ixor(j):j.clone().ixor(this||et)},a.prototype.uxor=function(j){return(this||et).length>j.length?this.clone().iuxor(j):j.clone().iuxor(this||et)},a.prototype.inotn=function(j){n(typeof j=="number"&&j>=0);var z=0|Math.ceil(j/26),Y=j%26;this._expand(z),Y>0&&z--;for(var E=0;E<z;E++)(this||et).words[E]=67108863&~(this||et).words[E];return Y>0&&((this||et).words[E]=~(this||et).words[E]&67108863>>26-Y),this.strip()},a.prototype.notn=function(j){return this.clone().inotn(j)},a.prototype.setn=function(j,z){n(typeof j=="number"&&j>=0);var Y=j/26|0,E=j%26;return this._expand(Y+1),(this||et).words[Y]=z?(this||et).words[Y]|1<<E:(this||et).words[Y]&~(1<<E),this.strip()},a.prototype.iadd=function(j){var z,Y,E;if((this||et).negative!==0&&j.negative===0)return(this||et).negative=0,z=this.isub(j),(this||et).negative^=1,this._normSign();if((this||et).negative===0&&j.negative!==0)return j.negative=0,z=this.isub(j),j.negative=1,z._normSign();(this||et).length>j.length?(Y=this||et,E=j):(Y=j,E=this||et);for(var i=0,s=0;s<E.length;s++)z=(0|Y.words[s])+(0|E.words[s])+i,(this||et).words[s]=67108863&z,i=z>>>26;for(;i!==0&&s<Y.length;s++)z=(0|Y.words[s])+i,(this||et).words[s]=67108863&z,i=z>>>26;if((this||et).length=Y.length,i!==0)(this||et).words[(this||et).length]=i,(this||et).length++;else if(Y!==(this||et))for(;s<Y.length;s++)(this||et).words[s]=Y.words[s];return this||et},a.prototype.add=function(j){var z;return j.negative!==0&&(this||et).negative===0?(j.negative=0,z=this.sub(j),j.negative^=1,z):j.negative===0&&(this||et).negative!==0?((this||et).negative=0,z=j.sub(this||et),(this||et).negative=1,z):(this||et).length>j.length?this.clone().iadd(j):j.clone().iadd(this||et)},a.prototype.isub=function(j){if(j.negative!==0){j.negative=0;var z=this.iadd(j);return j.negative=1,z._normSign()}if((this||et).negative!==0)return(this||et).negative=0,this.iadd(j),(this||et).negative=1,this._normSign();var Y,E,i=this.cmp(j);if(i===0)return(this||et).negative=0,(this||et).length=1,(this||et).words[0]=0,this||et;i>0?(Y=this||et,E=j):(Y=j,E=this||et);for(var s=0,f=0;f<E.length;f++)s=(z=(0|Y.words[f])-(0|E.words[f])+s)>>26,(this||et).words[f]=67108863&z;for(;s!==0&&f<Y.length;f++)s=(z=(0|Y.words[f])+s)>>26,(this||et).words[f]=67108863&z;if(s===0&&f<Y.length&&Y!==(this||et))for(;f<Y.length;f++)(this||et).words[f]=Y.words[f];return(this||et).length=Math.max((this||et).length,f),Y!==(this||et)&&((this||et).negative=1),this.strip()},a.prototype.sub=function(j){return this.clone().isub(j)};var S=function(j,z,Y){var E,i,s,f=j.words,c=z.words,p=Y.words,_=0,x=0|f[0],o=8191&x,t=x>>>13,u=0|f[1],b=8191&u,M=u>>>13,T=0|f[2],D=8191&T,Q=T>>>13,W=0|f[3],X=8191&W,G=W>>>13,J=0|f[4],ae=8191&J,te=J>>>13,U=0|f[5],Z=8191&U,ie=U>>>13,fe=0|f[6],de=8191&fe,he=fe>>>13,pe=0|f[7],De=8191&pe,Ae=pe>>>13,_e=0|f[8],ut=8191&_e,qe=_e>>>13,ke=0|f[9],mt=8191&ke,ne=ke>>>13,O=0|c[0],N=8191&O,$=O>>>13,ee=0|c[1],re=8191&ee,se=ee>>>13,ce=0|c[2],st=8191&ce,ye=ce>>>13,be=0|c[3],me=8191&be,Te=be>>>13,je=0|c[4],le=8191&je,Ie=je>>>13,Se=0|c[5],Ee=8191&Se,Me=Se>>>13,xe=0|c[6],wt=8191&xe,Ne=xe>>>13,Ce=0|c[7],At=8191&Ce,dt=Ce>>>13,rt=0|c[8],Et=8191&rt,lt=rt>>>13,ot=0|c[9],It=8191&ot,pt=ot>>>13;Y.negative=j.negative^z.negative,Y.length=19;var ft=(_+(E=Math.imul(o,N))|0)+((8191&(i=(i=Math.imul(o,$))+Math.imul(t,N)|0))<<13)|0;_=((s=Math.imul(t,$))+(i>>>13)|0)+(ft>>>26)|0,ft&=67108863,E=Math.imul(b,N),i=(i=Math.imul(b,$))+Math.imul(M,N)|0,s=Math.imul(M,$);var kt=(_+(E=E+Math.imul(o,re)|0)|0)+((8191&(i=(i=i+Math.imul(o,se)|0)+Math.imul(t,re)|0))<<13)|0;_=((s=s+Math.imul(t,se)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,E=Math.imul(D,N),i=(i=Math.imul(D,$))+Math.imul(Q,N)|0,s=Math.imul(Q,$),E=E+Math.imul(b,re)|0,i=(i=i+Math.imul(b,se)|0)+Math.imul(M,re)|0,s=s+Math.imul(M,se)|0;var vt=(_+(E=E+Math.imul(o,st)|0)|0)+((8191&(i=(i=i+Math.imul(o,ye)|0)+Math.imul(t,st)|0))<<13)|0;_=((s=s+Math.imul(t,ye)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,E=Math.imul(X,N),i=(i=Math.imul(X,$))+Math.imul(G,N)|0,s=Math.imul(G,$),E=E+Math.imul(D,re)|0,i=(i=i+Math.imul(D,se)|0)+Math.imul(Q,re)|0,s=s+Math.imul(Q,se)|0,E=E+Math.imul(b,st)|0,i=(i=i+Math.imul(b,ye)|0)+Math.imul(M,st)|0,s=s+Math.imul(M,ye)|0;var at=(_+(E=E+Math.imul(o,me)|0)|0)+((8191&(i=(i=i+Math.imul(o,Te)|0)+Math.imul(t,me)|0))<<13)|0;_=((s=s+Math.imul(t,Te)|0)+(i>>>13)|0)+(at>>>26)|0,at&=67108863,E=Math.imul(ae,N),i=(i=Math.imul(ae,$))+Math.imul(te,N)|0,s=Math.imul(te,$),E=E+Math.imul(X,re)|0,i=(i=i+Math.imul(X,se)|0)+Math.imul(G,re)|0,s=s+Math.imul(G,se)|0,E=E+Math.imul(D,st)|0,i=(i=i+Math.imul(D,ye)|0)+Math.imul(Q,st)|0,s=s+Math.imul(Q,ye)|0,E=E+Math.imul(b,me)|0,i=(i=i+Math.imul(b,Te)|0)+Math.imul(M,me)|0,s=s+Math.imul(M,Te)|0;var Bt=(_+(E=E+Math.imul(o,le)|0)|0)+((8191&(i=(i=i+Math.imul(o,Ie)|0)+Math.imul(t,le)|0))<<13)|0;_=((s=s+Math.imul(t,Ie)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,E=Math.imul(Z,N),i=(i=Math.imul(Z,$))+Math.imul(ie,N)|0,s=Math.imul(ie,$),E=E+Math.imul(ae,re)|0,i=(i=i+Math.imul(ae,se)|0)+Math.imul(te,re)|0,s=s+Math.imul(te,se)|0,E=E+Math.imul(X,st)|0,i=(i=i+Math.imul(X,ye)|0)+Math.imul(G,st)|0,s=s+Math.imul(G,ye)|0,E=E+Math.imul(D,me)|0,i=(i=i+Math.imul(D,Te)|0)+Math.imul(Q,me)|0,s=s+Math.imul(Q,Te)|0,E=E+Math.imul(b,le)|0,i=(i=i+Math.imul(b,Ie)|0)+Math.imul(M,le)|0,s=s+Math.imul(M,Ie)|0;var Wt=(_+(E=E+Math.imul(o,Ee)|0)|0)+((8191&(i=(i=i+Math.imul(o,Me)|0)+Math.imul(t,Ee)|0))<<13)|0;_=((s=s+Math.imul(t,Me)|0)+(i>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,E=Math.imul(de,N),i=(i=Math.imul(de,$))+Math.imul(he,N)|0,s=Math.imul(he,$),E=E+Math.imul(Z,re)|0,i=(i=i+Math.imul(Z,se)|0)+Math.imul(ie,re)|0,s=s+Math.imul(ie,se)|0,E=E+Math.imul(ae,st)|0,i=(i=i+Math.imul(ae,ye)|0)+Math.imul(te,st)|0,s=s+Math.imul(te,ye)|0,E=E+Math.imul(X,me)|0,i=(i=i+Math.imul(X,Te)|0)+Math.imul(G,me)|0,s=s+Math.imul(G,Te)|0,E=E+Math.imul(D,le)|0,i=(i=i+Math.imul(D,Ie)|0)+Math.imul(Q,le)|0,s=s+Math.imul(Q,Ie)|0,E=E+Math.imul(b,Ee)|0,i=(i=i+Math.imul(b,Me)|0)+Math.imul(M,Ee)|0,s=s+Math.imul(M,Me)|0;var Pt=(_+(E=E+Math.imul(o,wt)|0)|0)+((8191&(i=(i=i+Math.imul(o,Ne)|0)+Math.imul(t,wt)|0))<<13)|0;_=((s=s+Math.imul(t,Ne)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,E=Math.imul(De,N),i=(i=Math.imul(De,$))+Math.imul(Ae,N)|0,s=Math.imul(Ae,$),E=E+Math.imul(de,re)|0,i=(i=i+Math.imul(de,se)|0)+Math.imul(he,re)|0,s=s+Math.imul(he,se)|0,E=E+Math.imul(Z,st)|0,i=(i=i+Math.imul(Z,ye)|0)+Math.imul(ie,st)|0,s=s+Math.imul(ie,ye)|0,E=E+Math.imul(ae,me)|0,i=(i=i+Math.imul(ae,Te)|0)+Math.imul(te,me)|0,s=s+Math.imul(te,Te)|0,E=E+Math.imul(X,le)|0,i=(i=i+Math.imul(X,Ie)|0)+Math.imul(G,le)|0,s=s+Math.imul(G,Ie)|0,E=E+Math.imul(D,Ee)|0,i=(i=i+Math.imul(D,Me)|0)+Math.imul(Q,Ee)|0,s=s+Math.imul(Q,Me)|0,E=E+Math.imul(b,wt)|0,i=(i=i+Math.imul(b,Ne)|0)+Math.imul(M,wt)|0,s=s+Math.imul(M,Ne)|0;var Nt=(_+(E=E+Math.imul(o,At)|0)|0)+((8191&(i=(i=i+Math.imul(o,dt)|0)+Math.imul(t,At)|0))<<13)|0;_=((s=s+Math.imul(t,dt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,E=Math.imul(ut,N),i=(i=Math.imul(ut,$))+Math.imul(qe,N)|0,s=Math.imul(qe,$),E=E+Math.imul(De,re)|0,i=(i=i+Math.imul(De,se)|0)+Math.imul(Ae,re)|0,s=s+Math.imul(Ae,se)|0,E=E+Math.imul(de,st)|0,i=(i=i+Math.imul(de,ye)|0)+Math.imul(he,st)|0,s=s+Math.imul(he,ye)|0,E=E+Math.imul(Z,me)|0,i=(i=i+Math.imul(Z,Te)|0)+Math.imul(ie,me)|0,s=s+Math.imul(ie,Te)|0,E=E+Math.imul(ae,le)|0,i=(i=i+Math.imul(ae,Ie)|0)+Math.imul(te,le)|0,s=s+Math.imul(te,Ie)|0,E=E+Math.imul(X,Ee)|0,i=(i=i+Math.imul(X,Me)|0)+Math.imul(G,Ee)|0,s=s+Math.imul(G,Me)|0,E=E+Math.imul(D,wt)|0,i=(i=i+Math.imul(D,Ne)|0)+Math.imul(Q,wt)|0,s=s+Math.imul(Q,Ne)|0,E=E+Math.imul(b,At)|0,i=(i=i+Math.imul(b,dt)|0)+Math.imul(M,At)|0,s=s+Math.imul(M,dt)|0;var cr=(_+(E=E+Math.imul(o,Et)|0)|0)+((8191&(i=(i=i+Math.imul(o,lt)|0)+Math.imul(t,Et)|0))<<13)|0;_=((s=s+Math.imul(t,lt)|0)+(i>>>13)|0)+(cr>>>26)|0,cr&=67108863,E=Math.imul(mt,N),i=(i=Math.imul(mt,$))+Math.imul(ne,N)|0,s=Math.imul(ne,$),E=E+Math.imul(ut,re)|0,i=(i=i+Math.imul(ut,se)|0)+Math.imul(qe,re)|0,s=s+Math.imul(qe,se)|0,E=E+Math.imul(De,st)|0,i=(i=i+Math.imul(De,ye)|0)+Math.imul(Ae,st)|0,s=s+Math.imul(Ae,ye)|0,E=E+Math.imul(de,me)|0,i=(i=i+Math.imul(de,Te)|0)+Math.imul(he,me)|0,s=s+Math.imul(he,Te)|0,E=E+Math.imul(Z,le)|0,i=(i=i+Math.imul(Z,Ie)|0)+Math.imul(ie,le)|0,s=s+Math.imul(ie,Ie)|0,E=E+Math.imul(ae,Ee)|0,i=(i=i+Math.imul(ae,Me)|0)+Math.imul(te,Ee)|0,s=s+Math.imul(te,Me)|0,E=E+Math.imul(X,wt)|0,i=(i=i+Math.imul(X,Ne)|0)+Math.imul(G,wt)|0,s=s+Math.imul(G,Ne)|0,E=E+Math.imul(D,At)|0,i=(i=i+Math.imul(D,dt)|0)+Math.imul(Q,At)|0,s=s+Math.imul(Q,dt)|0,E=E+Math.imul(b,Et)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(M,Et)|0,s=s+Math.imul(M,lt)|0;var qt=(_+(E=E+Math.imul(o,It)|0)|0)+((8191&(i=(i=i+Math.imul(o,pt)|0)+Math.imul(t,It)|0))<<13)|0;_=((s=s+Math.imul(t,pt)|0)+(i>>>13)|0)+(qt>>>26)|0,qt&=67108863,E=Math.imul(mt,re),i=(i=Math.imul(mt,se))+Math.imul(ne,re)|0,s=Math.imul(ne,se),E=E+Math.imul(ut,st)|0,i=(i=i+Math.imul(ut,ye)|0)+Math.imul(qe,st)|0,s=s+Math.imul(qe,ye)|0,E=E+Math.imul(De,me)|0,i=(i=i+Math.imul(De,Te)|0)+Math.imul(Ae,me)|0,s=s+Math.imul(Ae,Te)|0,E=E+Math.imul(de,le)|0,i=(i=i+Math.imul(de,Ie)|0)+Math.imul(he,le)|0,s=s+Math.imul(he,Ie)|0,E=E+Math.imul(Z,Ee)|0,i=(i=i+Math.imul(Z,Me)|0)+Math.imul(ie,Ee)|0,s=s+Math.imul(ie,Me)|0,E=E+Math.imul(ae,wt)|0,i=(i=i+Math.imul(ae,Ne)|0)+Math.imul(te,wt)|0,s=s+Math.imul(te,Ne)|0,E=E+Math.imul(X,At)|0,i=(i=i+Math.imul(X,dt)|0)+Math.imul(G,At)|0,s=s+Math.imul(G,dt)|0,E=E+Math.imul(D,Et)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(Q,Et)|0,s=s+Math.imul(Q,lt)|0;var Dt=(_+(E=E+Math.imul(b,It)|0)|0)+((8191&(i=(i=i+Math.imul(b,pt)|0)+Math.imul(M,It)|0))<<13)|0;_=((s=s+Math.imul(M,pt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,E=Math.imul(mt,st),i=(i=Math.imul(mt,ye))+Math.imul(ne,st)|0,s=Math.imul(ne,ye),E=E+Math.imul(ut,me)|0,i=(i=i+Math.imul(ut,Te)|0)+Math.imul(qe,me)|0,s=s+Math.imul(qe,Te)|0,E=E+Math.imul(De,le)|0,i=(i=i+Math.imul(De,Ie)|0)+Math.imul(Ae,le)|0,s=s+Math.imul(Ae,Ie)|0,E=E+Math.imul(de,Ee)|0,i=(i=i+Math.imul(de,Me)|0)+Math.imul(he,Ee)|0,s=s+Math.imul(he,Me)|0,E=E+Math.imul(Z,wt)|0,i=(i=i+Math.imul(Z,Ne)|0)+Math.imul(ie,wt)|0,s=s+Math.imul(ie,Ne)|0,E=E+Math.imul(ae,At)|0,i=(i=i+Math.imul(ae,dt)|0)+Math.imul(te,At)|0,s=s+Math.imul(te,dt)|0,E=E+Math.imul(X,Et)|0,i=(i=i+Math.imul(X,lt)|0)+Math.imul(G,Et)|0,s=s+Math.imul(G,lt)|0;var rr=(_+(E=E+Math.imul(D,It)|0)|0)+((8191&(i=(i=i+Math.imul(D,pt)|0)+Math.imul(Q,It)|0))<<13)|0;_=((s=s+Math.imul(Q,pt)|0)+(i>>>13)|0)+(rr>>>26)|0,rr&=67108863,E=Math.imul(mt,me),i=(i=Math.imul(mt,Te))+Math.imul(ne,me)|0,s=Math.imul(ne,Te),E=E+Math.imul(ut,le)|0,i=(i=i+Math.imul(ut,Ie)|0)+Math.imul(qe,le)|0,s=s+Math.imul(qe,Ie)|0,E=E+Math.imul(De,Ee)|0,i=(i=i+Math.imul(De,Me)|0)+Math.imul(Ae,Ee)|0,s=s+Math.imul(Ae,Me)|0,E=E+Math.imul(de,wt)|0,i=(i=i+Math.imul(de,Ne)|0)+Math.imul(he,wt)|0,s=s+Math.imul(he,Ne)|0,E=E+Math.imul(Z,At)|0,i=(i=i+Math.imul(Z,dt)|0)+Math.imul(ie,At)|0,s=s+Math.imul(ie,dt)|0,E=E+Math.imul(ae,Et)|0,i=(i=i+Math.imul(ae,lt)|0)+Math.imul(te,Et)|0,s=s+Math.imul(te,lt)|0;var sr=(_+(E=E+Math.imul(X,It)|0)|0)+((8191&(i=(i=i+Math.imul(X,pt)|0)+Math.imul(G,It)|0))<<13)|0;_=((s=s+Math.imul(G,pt)|0)+(i>>>13)|0)+(sr>>>26)|0,sr&=67108863,E=Math.imul(mt,le),i=(i=Math.imul(mt,Ie))+Math.imul(ne,le)|0,s=Math.imul(ne,Ie),E=E+Math.imul(ut,Ee)|0,i=(i=i+Math.imul(ut,Me)|0)+Math.imul(qe,Ee)|0,s=s+Math.imul(qe,Me)|0,E=E+Math.imul(De,wt)|0,i=(i=i+Math.imul(De,Ne)|0)+Math.imul(Ae,wt)|0,s=s+Math.imul(Ae,Ne)|0,E=E+Math.imul(de,At)|0,i=(i=i+Math.imul(de,dt)|0)+Math.imul(he,At)|0,s=s+Math.imul(he,dt)|0,E=E+Math.imul(Z,Et)|0,i=(i=i+Math.imul(Z,lt)|0)+Math.imul(ie,Et)|0,s=s+Math.imul(ie,lt)|0;var ir=(_+(E=E+Math.imul(ae,It)|0)|0)+((8191&(i=(i=i+Math.imul(ae,pt)|0)+Math.imul(te,It)|0))<<13)|0;_=((s=s+Math.imul(te,pt)|0)+(i>>>13)|0)+(ir>>>26)|0,ir&=67108863,E=Math.imul(mt,Ee),i=(i=Math.imul(mt,Me))+Math.imul(ne,Ee)|0,s=Math.imul(ne,Me),E=E+Math.imul(ut,wt)|0,i=(i=i+Math.imul(ut,Ne)|0)+Math.imul(qe,wt)|0,s=s+Math.imul(qe,Ne)|0,E=E+Math.imul(De,At)|0,i=(i=i+Math.imul(De,dt)|0)+Math.imul(Ae,At)|0,s=s+Math.imul(Ae,dt)|0,E=E+Math.imul(de,Et)|0,i=(i=i+Math.imul(de,lt)|0)+Math.imul(he,Et)|0,s=s+Math.imul(he,lt)|0;var hr=(_+(E=E+Math.imul(Z,It)|0)|0)+((8191&(i=(i=i+Math.imul(Z,pt)|0)+Math.imul(ie,It)|0))<<13)|0;_=((s=s+Math.imul(ie,pt)|0)+(i>>>13)|0)+(hr>>>26)|0,hr&=67108863,E=Math.imul(mt,wt),i=(i=Math.imul(mt,Ne))+Math.imul(ne,wt)|0,s=Math.imul(ne,Ne),E=E+Math.imul(ut,At)|0,i=(i=i+Math.imul(ut,dt)|0)+Math.imul(qe,At)|0,s=s+Math.imul(qe,dt)|0,E=E+Math.imul(De,Et)|0,i=(i=i+Math.imul(De,lt)|0)+Math.imul(Ae,Et)|0,s=s+Math.imul(Ae,lt)|0;var nr=(_+(E=E+Math.imul(de,It)|0)|0)+((8191&(i=(i=i+Math.imul(de,pt)|0)+Math.imul(he,It)|0))<<13)|0;_=((s=s+Math.imul(he,pt)|0)+(i>>>13)|0)+(nr>>>26)|0,nr&=67108863,E=Math.imul(mt,At),i=(i=Math.imul(mt,dt))+Math.imul(ne,At)|0,s=Math.imul(ne,dt),E=E+Math.imul(ut,Et)|0,i=(i=i+Math.imul(ut,lt)|0)+Math.imul(qe,Et)|0,s=s+Math.imul(qe,lt)|0;var ur=(_+(E=E+Math.imul(De,It)|0)|0)+((8191&(i=(i=i+Math.imul(De,pt)|0)+Math.imul(Ae,It)|0))<<13)|0;_=((s=s+Math.imul(Ae,pt)|0)+(i>>>13)|0)+(ur>>>26)|0,ur&=67108863,E=Math.imul(mt,Et),i=(i=Math.imul(mt,lt))+Math.imul(ne,Et)|0,s=Math.imul(ne,lt);var it=(_+(E=E+Math.imul(ut,It)|0)|0)+((8191&(i=(i=i+Math.imul(ut,pt)|0)+Math.imul(qe,It)|0))<<13)|0;_=((s=s+Math.imul(qe,pt)|0)+(i>>>13)|0)+(it>>>26)|0,it&=67108863;var we=(_+(E=Math.imul(mt,It))|0)+((8191&(i=(i=Math.imul(mt,pt))+Math.imul(ne,It)|0))<<13)|0;return _=((s=Math.imul(ne,pt))+(i>>>13)|0)+(we>>>26)|0,we&=67108863,p[0]=ft,p[1]=kt,p[2]=vt,p[3]=at,p[4]=Bt,p[5]=Wt,p[6]=Pt,p[7]=Nt,p[8]=cr,p[9]=qt,p[10]=Dt,p[11]=rr,p[12]=sr,p[13]=ir,p[14]=hr,p[15]=nr,p[16]=ur,p[17]=it,p[18]=we,_!==0&&(p[19]=_,Y.length++),Y};function R(j,z,Y){return new A().mulp(j,z,Y)}function A(j,z){(this||et).x=j,(this||et).y=z}Math.imul||(S=g),a.prototype.mulTo=function(j,z){var Y=(this||et).length+j.length;return(this||et).length===10&&j.length===10?S(this||et,j,z):Y<63?g(this||et,j,z):Y<1024?function(E,i,s){s.negative=i.negative^E.negative,s.length=E.length+i.length;for(var f=0,c=0,p=0;p<s.length-1;p++){var _=c;c=0;for(var x=67108863&f,o=Math.min(p,i.length-1),t=Math.max(0,p-E.length+1);t<=o;t++){var u=p-t,b=(0|E.words[u])*(0|i.words[t]),M=67108863&b;x=67108863&(M=M+x|0),c+=(_=(_=_+(b/67108864|0)|0)+(M>>>26)|0)>>>26,_&=67108863}s.words[p]=x,f=_,_=c}return f!==0?s.words[p]=f:s.length--,s.strip()}(this||et,j,z):R(this||et,j,z)},A.prototype.makeRBT=function(j){for(var z=new Array(j),Y=a.prototype._countBits(j)-1,E=0;E<j;E++)z[E]=this.revBin(E,Y,j);return z},A.prototype.revBin=function(j,z,Y){if(j===0||j===Y-1)return j;for(var E=0,i=0;i<z;i++)E|=(1&j)<<z-i-1,j>>=1;return E},A.prototype.permute=function(j,z,Y,E,i,s){for(var f=0;f<s;f++)E[f]=z[j[f]],i[f]=Y[j[f]]},A.prototype.transform=function(j,z,Y,E,i,s){this.permute(s,j,z,Y,E,i);for(var f=1;f<i;f<<=1)for(var c=f<<1,p=Math.cos(2*Math.PI/c),_=Math.sin(2*Math.PI/c),x=0;x<i;x+=c)for(var o=p,t=_,u=0;u<f;u++){var b=Y[x+u],M=E[x+u],T=Y[x+u+f],D=E[x+u+f],Q=o*T-t*D;D=o*D+t*T,T=Q,Y[x+u]=b+T,E[x+u]=M+D,Y[x+u+f]=b-T,E[x+u+f]=M-D,u!==c&&(Q=p*o-_*t,t=p*t+_*o,o=Q)}},A.prototype.guessLen13b=function(j,z){var Y=1|Math.max(z,j),E=1&Y,i=0;for(Y=Y/2|0;Y;Y>>>=1)i++;return 1<<i+1+E},A.prototype.conjugate=function(j,z,Y){if(!(Y<=1))for(var E=0;E<Y/2;E++){var i=j[E];j[E]=j[Y-E-1],j[Y-E-1]=i,i=z[E],z[E]=-z[Y-E-1],z[Y-E-1]=-i}},A.prototype.normalize13b=function(j,z){for(var Y=0,E=0;E<z/2;E++){var i=8192*Math.round(j[2*E+1]/z)+Math.round(j[2*E]/z)+Y;j[E]=67108863&i,Y=i<67108864?0:i/67108864|0}return j},A.prototype.convert13b=function(j,z,Y,E){for(var i=0,s=0;s<z;s++)i+=0|j[s],Y[2*s]=8191&i,i>>>=13,Y[2*s+1]=8191&i,i>>>=13;for(s=2*z;s<E;++s)Y[s]=0;n(i===0),n((-8192&i)==0)},A.prototype.stub=function(j){for(var z=new Array(j),Y=0;Y<j;Y++)z[Y]=0;return z},A.prototype.mulp=function(j,z,Y){var E=2*this.guessLen13b(j.length,z.length),i=this.makeRBT(E),s=this.stub(E),f=new Array(E),c=new Array(E),p=new Array(E),_=new Array(E),x=new Array(E),o=new Array(E),t=Y.words;t.length=E,this.convert13b(j.words,j.length,f,E),this.convert13b(z.words,z.length,_,E),this.transform(f,s,c,p,E,i),this.transform(_,s,x,o,E,i);for(var u=0;u<E;u++){var b=c[u]*x[u]-p[u]*o[u];p[u]=c[u]*o[u]+p[u]*x[u],c[u]=b}return this.conjugate(c,p,E),this.transform(c,p,t,s,E,i),this.conjugate(t,s,E),this.normalize13b(t,E),Y.negative=j.negative^z.negative,Y.length=j.length+z.length,Y.strip()},a.prototype.mul=function(j){var z=new a(null);return z.words=new Array((this||et).length+j.length),this.mulTo(j,z)},a.prototype.mulf=function(j){var z=new a(null);return z.words=new Array((this||et).length+j.length),R(this||et,j,z)},a.prototype.imul=function(j){return this.clone().mulTo(j,this||et)},a.prototype.imuln=function(j){n(typeof j=="number"),n(j<67108864);for(var z=0,Y=0;Y<(this||et).length;Y++){var E=(0|(this||et).words[Y])*j,i=(67108863&E)+(67108863&z);z>>=26,z+=E/67108864|0,z+=i>>>26,(this||et).words[Y]=67108863&i}return z!==0&&((this||et).words[Y]=z,(this||et).length++),this||et},a.prototype.muln=function(j){return this.clone().imuln(j)},a.prototype.sqr=function(){return this.mul(this||et)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(j){var z=function(s){for(var f=new Array(s.bitLength()),c=0;c<f.length;c++){var p=c/26|0,_=c%26;f[c]=(s.words[p]&1<<_)>>>_}return f}(j);if(z.length===0)return new a(1);for(var Y=this||et,E=0;E<z.length&&z[E]===0;E++,Y=Y.sqr());if(++E<z.length)for(var i=Y.sqr();E<z.length;E++,i=i.sqr())z[E]!==0&&(Y=Y.mul(i));return Y},a.prototype.iushln=function(j){n(typeof j=="number"&&j>=0);var z,Y=j%26,E=(j-Y)/26,i=67108863>>>26-Y<<26-Y;if(Y!==0){var s=0;for(z=0;z<(this||et).length;z++){var f=(this||et).words[z]&i,c=(0|(this||et).words[z])-f<<Y;(this||et).words[z]=c|s,s=f>>>26-Y}s&&((this||et).words[z]=s,(this||et).length++)}if(E!==0){for(z=(this||et).length-1;z>=0;z--)(this||et).words[z+E]=(this||et).words[z];for(z=0;z<E;z++)(this||et).words[z]=0;(this||et).length+=E}return this.strip()},a.prototype.ishln=function(j){return n((this||et).negative===0),this.iushln(j)},a.prototype.iushrn=function(j,z,Y){var E;n(typeof j=="number"&&j>=0),E=z?(z-z%26)/26:0;var i=j%26,s=Math.min((j-i)/26,(this||et).length),f=67108863^67108863>>>i<<i,c=Y;if(E-=s,E=Math.max(0,E),c){for(var p=0;p<s;p++)c.words[p]=(this||et).words[p];c.length=s}if(s!==0)if((this||et).length>s)for((this||et).length-=s,p=0;p<(this||et).length;p++)(this||et).words[p]=(this||et).words[p+s];else(this||et).words[0]=0,(this||et).length=1;var _=0;for(p=(this||et).length-1;p>=0&&(_!==0||p>=E);p--){var x=0|(this||et).words[p];(this||et).words[p]=_<<26-i|x>>>i,_=x&f}return c&&_!==0&&(c.words[c.length++]=_),(this||et).length===0&&((this||et).words[0]=0,(this||et).length=1),this.strip()},a.prototype.ishrn=function(j,z,Y){return n((this||et).negative===0),this.iushrn(j,z,Y)},a.prototype.shln=function(j){return this.clone().ishln(j)},a.prototype.ushln=function(j){return this.clone().iushln(j)},a.prototype.shrn=function(j){return this.clone().ishrn(j)},a.prototype.ushrn=function(j){return this.clone().iushrn(j)},a.prototype.testn=function(j){n(typeof j=="number"&&j>=0);var z=j%26,Y=(j-z)/26,E=1<<z;return!((this||et).length<=Y)&&!!((this||et).words[Y]&E)},a.prototype.imaskn=function(j){n(typeof j=="number"&&j>=0);var z=j%26,Y=(j-z)/26;if(n((this||et).negative===0,"imaskn works only with positive numbers"),(this||et).length<=Y)return this||et;if(z!==0&&Y++,(this||et).length=Math.min(Y,(this||et).length),z!==0){var E=67108863^67108863>>>z<<z;(this||et).words[(this||et).length-1]&=E}return this.strip()},a.prototype.maskn=function(j){return this.clone().imaskn(j)},a.prototype.iaddn=function(j){return n(typeof j=="number"),n(j<67108864),j<0?this.isubn(-j):(this||et).negative!==0?(this||et).length===1&&(0|(this||et).words[0])<j?((this||et).words[0]=j-(0|(this||et).words[0]),(this||et).negative=0,this||et):((this||et).negative=0,this.isubn(j),(this||et).negative=1,this||et):this._iaddn(j)},a.prototype._iaddn=function(j){(this||et).words[0]+=j;for(var z=0;z<(this||et).length&&(this||et).words[z]>=67108864;z++)(this||et).words[z]-=67108864,z===(this||et).length-1?(this||et).words[z+1]=1:(this||et).words[z+1]++;return(this||et).length=Math.max((this||et).length,z+1),this||et},a.prototype.isubn=function(j){if(n(typeof j=="number"),n(j<67108864),j<0)return this.iaddn(-j);if((this||et).negative!==0)return(this||et).negative=0,this.iaddn(j),(this||et).negative=1,this||et;if((this||et).words[0]-=j,(this||et).length===1&&(this||et).words[0]<0)(this||et).words[0]=-(this||et).words[0],(this||et).negative=1;else for(var z=0;z<(this||et).length&&(this||et).words[z]<0;z++)(this||et).words[z]+=67108864,(this||et).words[z+1]-=1;return this.strip()},a.prototype.addn=function(j){return this.clone().iaddn(j)},a.prototype.subn=function(j){return this.clone().isubn(j)},a.prototype.iabs=function(){return(this||et).negative=0,this||et},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(j,z,Y){var E,i,s=j.length+Y;this._expand(s);var f=0;for(E=0;E<j.length;E++){i=(0|(this||et).words[E+Y])+f;var c=(0|j.words[E])*z;f=((i-=67108863&c)>>26)-(c/67108864|0),(this||et).words[E+Y]=67108863&i}for(;E<(this||et).length-Y;E++)f=(i=(0|(this||et).words[E+Y])+f)>>26,(this||et).words[E+Y]=67108863&i;if(f===0)return this.strip();for(n(f===-1),f=0,E=0;E<(this||et).length;E++)f=(i=-(0|(this||et).words[E])+f)>>26,(this||et).words[E]=67108863&i;return(this||et).negative=1,this.strip()},a.prototype._wordDiv=function(j,z){var Y=((this||et).length,j.length),E=this.clone(),i=j,s=0|i.words[i.length-1];(Y=26-this._countBits(s))!==0&&(i=i.ushln(Y),E.iushln(Y),s=0|i.words[i.length-1]);var f,c=E.length-i.length;if(z!=="mod"){(f=new a(null)).length=c+1,f.words=new Array(f.length);for(var p=0;p<f.length;p++)f.words[p]=0}var _=E.clone()._ishlnsubmul(i,1,c);_.negative===0&&(E=_,f&&(f.words[c]=1));for(var x=c-1;x>=0;x--){var o=67108864*(0|E.words[i.length+x])+(0|E.words[i.length+x-1]);for(o=Math.min(o/s|0,67108863),E._ishlnsubmul(i,o,x);E.negative!==0;)o--,E.negative=0,E._ishlnsubmul(i,1,x),E.isZero()||(E.negative^=1);f&&(f.words[x]=o)}return f&&f.strip(),E.strip(),z!=="div"&&Y!==0&&E.iushrn(Y),{div:f||null,mod:E}},a.prototype.divmod=function(j,z,Y){return n(!j.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:(this||et).negative!==0&&j.negative===0?(s=this.neg().divmod(j,z),z!=="mod"&&(E=s.div.neg()),z!=="div"&&(i=s.mod.neg(),Y&&i.negative!==0&&i.iadd(j)),{div:E,mod:i}):(this||et).negative===0&&j.negative!==0?(s=this.divmod(j.neg(),z),z!=="mod"&&(E=s.div.neg()),{div:E,mod:s.mod}):(this||et).negative&j.negative?(s=this.neg().divmod(j.neg(),z),z!=="div"&&(i=s.mod.neg(),Y&&i.negative!==0&&i.isub(j)),{div:s.div,mod:i}):j.length>(this||et).length||this.cmp(j)<0?{div:new a(0),mod:this||et}:j.length===1?z==="div"?{div:this.divn(j.words[0]),mod:null}:z==="mod"?{div:null,mod:new a(this.modn(j.words[0]))}:{div:this.divn(j.words[0]),mod:new a(this.modn(j.words[0]))}:this._wordDiv(j,z);var E,i,s},a.prototype.div=function(j){return this.divmod(j,"div",!1).div},a.prototype.mod=function(j){return this.divmod(j,"mod",!1).mod},a.prototype.umod=function(j){return this.divmod(j,"mod",!0).mod},a.prototype.divRound=function(j){var z=this.divmod(j);if(z.mod.isZero())return z.div;var Y=z.div.negative!==0?z.mod.isub(j):z.mod,E=j.ushrn(1),i=j.andln(1),s=Y.cmp(E);return s<0||i===1&&s===0?z.div:z.div.negative!==0?z.div.isubn(1):z.div.iaddn(1)},a.prototype.modn=function(j){n(j<=67108863);for(var z=(1<<26)%j,Y=0,E=(this||et).length-1;E>=0;E--)Y=(z*Y+(0|(this||et).words[E]))%j;return Y},a.prototype.idivn=function(j){n(j<=67108863);for(var z=0,Y=(this||et).length-1;Y>=0;Y--){var E=(0|(this||et).words[Y])+67108864*z;(this||et).words[Y]=E/j|0,z=E%j}return this.strip()},a.prototype.divn=function(j){return this.clone().idivn(j)},a.prototype.egcd=function(j){n(j.negative===0),n(!j.isZero());var z=this||et,Y=j.clone();z=z.negative!==0?z.umod(j):z.clone();for(var E=new a(1),i=new a(0),s=new a(0),f=new a(1),c=0;z.isEven()&&Y.isEven();)z.iushrn(1),Y.iushrn(1),++c;for(var p=Y.clone(),_=z.clone();!z.isZero();){for(var x=0,o=1;!(z.words[0]&o)&&x<26;++x,o<<=1);if(x>0)for(z.iushrn(x);x-- >0;)(E.isOdd()||i.isOdd())&&(E.iadd(p),i.isub(_)),E.iushrn(1),i.iushrn(1);for(var t=0,u=1;!(Y.words[0]&u)&&t<26;++t,u<<=1);if(t>0)for(Y.iushrn(t);t-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(p),f.isub(_)),s.iushrn(1),f.iushrn(1);z.cmp(Y)>=0?(z.isub(Y),E.isub(s),i.isub(f)):(Y.isub(z),s.isub(E),f.isub(i))}return{a:s,b:f,gcd:Y.iushln(c)}},a.prototype._invmp=function(j){n(j.negative===0),n(!j.isZero());var z=this||et,Y=j.clone();z=z.negative!==0?z.umod(j):z.clone();for(var E,i=new a(1),s=new a(0),f=Y.clone();z.cmpn(1)>0&&Y.cmpn(1)>0;){for(var c=0,p=1;!(z.words[0]&p)&&c<26;++c,p<<=1);if(c>0)for(z.iushrn(c);c-- >0;)i.isOdd()&&i.iadd(f),i.iushrn(1);for(var _=0,x=1;!(Y.words[0]&x)&&_<26;++_,x<<=1);if(_>0)for(Y.iushrn(_);_-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);z.cmp(Y)>=0?(z.isub(Y),i.isub(s)):(Y.isub(z),s.isub(i))}return(E=z.cmpn(1)===0?i:s).cmpn(0)<0&&E.iadd(j),E},a.prototype.gcd=function(j){if(this.isZero())return j.abs();if(j.isZero())return this.abs();var z=this.clone(),Y=j.clone();z.negative=0,Y.negative=0;for(var E=0;z.isEven()&&Y.isEven();E++)z.iushrn(1),Y.iushrn(1);for(;;){for(;z.isEven();)z.iushrn(1);for(;Y.isEven();)Y.iushrn(1);var i=z.cmp(Y);if(i<0){var s=z;z=Y,Y=s}else if(i===0||Y.cmpn(1)===0)break;z.isub(Y)}return Y.iushln(E)},a.prototype.invm=function(j){return this.egcd(j).a.umod(j)},a.prototype.isEven=function(){return(1&(this||et).words[0])==0},a.prototype.isOdd=function(){return(1&(this||et).words[0])==1},a.prototype.andln=function(j){return(this||et).words[0]&j},a.prototype.bincn=function(j){n(typeof j=="number");var z=j%26,Y=(j-z)/26,E=1<<z;if((this||et).length<=Y)return this._expand(Y+1),(this||et).words[Y]|=E,this||et;for(var i=E,s=Y;i!==0&&s<(this||et).length;s++){var f=0|(this||et).words[s];i=(f+=i)>>>26,f&=67108863,(this||et).words[s]=f}return i!==0&&((this||et).words[s]=i,(this||et).length++),this||et},a.prototype.isZero=function(){return(this||et).length===1&&(this||et).words[0]===0},a.prototype.cmpn=function(j){var z,Y=j<0;if((this||et).negative!==0&&!Y)return-1;if((this||et).negative===0&&Y)return 1;if(this.strip(),(this||et).length>1)z=1;else{Y&&(j=-j),n(j<=67108863,"Number is too big");var E=0|(this||et).words[0];z=E===j?0:E<j?-1:1}return(this||et).negative!==0?0|-z:z},a.prototype.cmp=function(j){if((this||et).negative!==0&&j.negative===0)return-1;if((this||et).negative===0&&j.negative!==0)return 1;var z=this.ucmp(j);return(this||et).negative!==0?0|-z:z},a.prototype.ucmp=function(j){if((this||et).length>j.length)return 1;if((this||et).length<j.length)return-1;for(var z=0,Y=(this||et).length-1;Y>=0;Y--){var E=0|(this||et).words[Y],i=0|j.words[Y];if(E!==i){E<i?z=-1:E>i&&(z=1);break}}return z},a.prototype.gtn=function(j){return this.cmpn(j)===1},a.prototype.gt=function(j){return this.cmp(j)===1},a.prototype.gten=function(j){return this.cmpn(j)>=0},a.prototype.gte=function(j){return this.cmp(j)>=0},a.prototype.ltn=function(j){return this.cmpn(j)===-1},a.prototype.lt=function(j){return this.cmp(j)===-1},a.prototype.lten=function(j){return this.cmpn(j)<=0},a.prototype.lte=function(j){return this.cmp(j)<=0},a.prototype.eqn=function(j){return this.cmpn(j)===0},a.prototype.eq=function(j){return this.cmp(j)===0},a.red=function(j){return new K(j)},a.prototype.toRed=function(j){return n(!(this||et).red,"Already a number in reduction context"),n((this||et).negative===0,"red works only with positives"),j.convertTo(this||et)._forceRed(j)},a.prototype.fromRed=function(){return n((this||et).red,"fromRed works only with numbers in reduction context"),(this||et).red.convertFrom(this||et)},a.prototype._forceRed=function(j){return(this||et).red=j,this||et},a.prototype.forceRed=function(j){return n(!(this||et).red,"Already a number in reduction context"),this._forceRed(j)},a.prototype.redAdd=function(j){return n((this||et).red,"redAdd works only with red numbers"),(this||et).red.add(this||et,j)},a.prototype.redIAdd=function(j){return n((this||et).red,"redIAdd works only with red numbers"),(this||et).red.iadd(this||et,j)},a.prototype.redSub=function(j){return n((this||et).red,"redSub works only with red numbers"),(this||et).red.sub(this||et,j)},a.prototype.redISub=function(j){return n((this||et).red,"redISub works only with red numbers"),(this||et).red.isub(this||et,j)},a.prototype.redShl=function(j){return n((this||et).red,"redShl works only with red numbers"),(this||et).red.shl(this||et,j)},a.prototype.redMul=function(j){return n((this||et).red,"redMul works only with red numbers"),(this||et).red._verify2(this||et,j),(this||et).red.mul(this||et,j)},a.prototype.redIMul=function(j){return n((this||et).red,"redMul works only with red numbers"),(this||et).red._verify2(this||et,j),(this||et).red.imul(this||et,j)},a.prototype.redSqr=function(){return n((this||et).red,"redSqr works only with red numbers"),(this||et).red._verify1(this||et),(this||et).red.sqr(this||et)},a.prototype.redISqr=function(){return n((this||et).red,"redISqr works only with red numbers"),(this||et).red._verify1(this||et),(this||et).red.isqr(this||et)},a.prototype.redSqrt=function(){return n((this||et).red,"redSqrt works only with red numbers"),(this||et).red._verify1(this||et),(this||et).red.sqrt(this||et)},a.prototype.redInvm=function(){return n((this||et).red,"redInvm works only with red numbers"),(this||et).red._verify1(this||et),(this||et).red.invm(this||et)},a.prototype.redNeg=function(){return n((this||et).red,"redNeg works only with red numbers"),(this||et).red._verify1(this||et),(this||et).red.neg(this||et)},a.prototype.redPow=function(j){return n((this||et).red&&!j.red,"redPow(normalNum)"),(this||et).red._verify1(this||et),(this||et).red.pow(this||et,j)};var k={k256:null,p224:null,p192:null,p25519:null};function I(j,z){(this||et).name=j,(this||et).p=new a(z,16),(this||et).n=(this||et).p.bitLength(),(this||et).k=new a(1).iushln((this||et).n).isub((this||et).p),(this||et).tmp=this._tmp()}function B(){I.call(this||et,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P(){I.call(this||et,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){I.call(this||et,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function q(){I.call(this||et,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function K(j){if(typeof j=="string"){var z=a._prime(j);(this||et).m=z.p,(this||et).prime=z}else n(j.gtn(1),"modulus must be greater than 1"),(this||et).m=j,(this||et).prime=null}function V(j){K.call(this||et,j),(this||et).shift=(this||et).m.bitLength(),(this||et).shift%26!=0&&((this||et).shift+=26-(this||et).shift%26),(this||et).r=new a(1).iushln((this||et).shift),(this||et).r2=this.imod((this||et).r.sqr()),(this||et).rinv=(this||et).r._invmp((this||et).m),(this||et).minv=(this||et).rinv.mul((this||et).r).isubn(1).div((this||et).m),(this||et).minv=(this||et).minv.umod((this||et).r),(this||et).minv=(this||et).r.sub((this||et).minv)}I.prototype._tmp=function(){var j=new a(null);return j.words=new Array(Math.ceil((this||et).n/13)),j},I.prototype.ireduce=function(j){var z,Y=j;do this.split(Y,(this||et).tmp),z=(Y=(Y=this.imulK(Y)).iadd((this||et).tmp)).bitLength();while(z>(this||et).n);var E=z<(this||et).n?-1:Y.ucmp((this||et).p);return E===0?(Y.words[0]=0,Y.length=1):E>0?Y.isub((this||et).p):Y.strip(),Y},I.prototype.split=function(j,z){j.iushrn((this||et).n,0,z)},I.prototype.imulK=function(j){return j.imul((this||et).k)},h(B,I),B.prototype.split=function(j,z){for(var Y=Math.min(j.length,9),E=0;E<Y;E++)z.words[E]=j.words[E];if(z.length=Y,j.length<=9)return j.words[0]=0,j.length=1,void 0;var i=j.words[9];for(z.words[z.length++]=4194303&i,E=10;E<j.length;E++){var s=0|j.words[E];j.words[E-10]=(4194303&s)<<4|i>>>22,i=s}i>>>=22,j.words[E-10]=i,i===0&&j.length>10?j.length-=10:j.length-=9},B.prototype.imulK=function(j){j.words[j.length]=0,j.words[j.length+1]=0,j.length+=2;for(var z=0,Y=0;Y<j.length;Y++){var E=0|j.words[Y];z+=977*E,j.words[Y]=67108863&z,z=64*E+(z/67108864|0)}return j.words[j.length-1]===0&&(j.length--,j.words[j.length-1]===0&&j.length--),j},h(P,I),h(C,I),h(q,I),q.prototype.imulK=function(j){for(var z=0,Y=0;Y<j.length;Y++){var E=19*(0|j.words[Y])+z,i=67108863&E;E>>>=26,j.words[Y]=i,z=E}return z!==0&&(j.words[j.length++]=z),j},a._prime=function(j){if(k[j])return k[j];var z;if(j==="k256")z=new B;else if(j==="p224")z=new P;else if(j==="p192")z=new C;else{if(j!=="p25519")throw new Error("Unknown prime "+j);z=new q}return k[j]=z,z},K.prototype._verify1=function(j){n(j.negative===0,"red works only with positives"),n(j.red,"red works only with red numbers")},K.prototype._verify2=function(j,z){n((j.negative|z.negative)==0,"red works only with positives"),n(j.red&&j.red===z.red,"red works only with red numbers")},K.prototype.imod=function(j){return(this||et).prime?(this||et).prime.ireduce(j)._forceRed(this||et):j.umod((this||et).m)._forceRed(this||et)},K.prototype.neg=function(j){return j.isZero()?j.clone():(this||et).m.sub(j)._forceRed(this||et)},K.prototype.add=function(j,z){this._verify2(j,z);var Y=j.add(z);return Y.cmp((this||et).m)>=0&&Y.isub((this||et).m),Y._forceRed(this||et)},K.prototype.iadd=function(j,z){this._verify2(j,z);var Y=j.iadd(z);return Y.cmp((this||et).m)>=0&&Y.isub((this||et).m),Y},K.prototype.sub=function(j,z){this._verify2(j,z);var Y=j.sub(z);return Y.cmpn(0)<0&&Y.iadd((this||et).m),Y._forceRed(this||et)},K.prototype.isub=function(j,z){this._verify2(j,z);var Y=j.isub(z);return Y.cmpn(0)<0&&Y.iadd((this||et).m),Y},K.prototype.shl=function(j,z){return this._verify1(j),this.imod(j.ushln(z))},K.prototype.imul=function(j,z){return this._verify2(j,z),this.imod(j.imul(z))},K.prototype.mul=function(j,z){return this._verify2(j,z),this.imod(j.mul(z))},K.prototype.isqr=function(j){return this.imul(j,j.clone())},K.prototype.sqr=function(j){return this.mul(j,j)},K.prototype.sqrt=function(j){if(j.isZero())return j.clone();var z=(this||et).m.andln(3);if(n(z%2==1),z===3){var Y=(this||et).m.add(new a(1)).iushrn(2);return this.pow(j,Y)}for(var E=(this||et).m.subn(1),i=0;!E.isZero()&&E.andln(1)===0;)i++,E.iushrn(1);n(!E.isZero());var s=new a(1).toRed(this||et),f=s.redNeg(),c=(this||et).m.subn(1).iushrn(1),p=(this||et).m.bitLength();for(p=new a(2*p*p).toRed(this||et);this.pow(p,c).cmp(f)!==0;)p.redIAdd(f);for(var _=this.pow(p,E),x=this.pow(j,E.addn(1).iushrn(1)),o=this.pow(j,E),t=i;o.cmp(s)!==0;){for(var u=o,b=0;u.cmp(s)!==0;b++)u=u.redSqr();n(b<t);var M=this.pow(_,new a(1).iushln(t-b-1));x=x.redMul(M),_=M.redSqr(),o=o.redMul(_),t=b}return x},K.prototype.invm=function(j){var z=j._invmp((this||et).m);return z.negative!==0?(z.negative=0,this.imod(z).redNeg()):this.imod(z)},K.prototype.pow=function(j,z){if(z.isZero())return new a(1).toRed(this||et);if(z.cmpn(1)===0)return j.clone();var Y=new Array(16);Y[0]=new a(1).toRed(this||et),Y[1]=j;for(var E=2;E<Y.length;E++)Y[E]=this.mul(Y[E-1],j);var i=Y[0],s=0,f=0,c=z.bitLength()%26;for(c===0&&(c=26),E=z.length-1;E>=0;E--){for(var p=z.words[E],_=c-1;_>=0;_--){var x=p>>_&1;i!==Y[0]&&(i=this.sqr(i)),x!==0||s!==0?(s<<=1,s|=x,(++f===4||E===0&&_===0)&&(i=this.mul(i,Y[s]),f=0,s=0)):f=0}c=26}return i},K.prototype.convertTo=function(j){var z=j.umod((this||et).m);return z===j?z.clone():z},K.prototype.convertFrom=function(j){var z=j.clone();return z.red=null,z},a.mont=function(j){return new V(j)},h(V,K),V.prototype.convertTo=function(j){return this.imod(j.ushln((this||et).shift))},V.prototype.convertFrom=function(j){var z=this.imod(j.mul((this||et).rinv));return z.red=null,z},V.prototype.imul=function(j,z){if(j.isZero()||z.isZero())return j.words[0]=0,j.length=1,j;var Y=j.imul(z),E=Y.maskn((this||et).shift).mul((this||et).minv).imaskn((this||et).shift).mul((this||et).m),i=Y.isub(E).iushrn((this||et).shift),s=i;return i.cmp((this||et).m)>=0?s=i.isub((this||et).m):i.cmpn(0)<0&&(s=i.iadd((this||et).m)),s._forceRed(this||et)},V.prototype.mul=function(j,z){if(j.isZero()||z.isZero())return new a(0)._forceRed(this||et);var Y=j.mul(z),E=Y.maskn((this||et).shift).mul((this||et).minv).imaskn((this||et).shift).mul((this||et).m),i=Y.isub(E).iushrn((this||et).shift),s=i;return i.cmp((this||et).m)>=0?s=i.isub((this||et).m):i.cmpn(0)<0&&(s=i.iadd((this||et).m)),s._forceRed(this||et)},V.prototype.invm=function(j){return this.imod(j._invmp((this||et).m).mul((this||et).r2))._forceRed(this||et)}})(kJ,TJ);qn=kJ.exports,D3e=Object.freeze({}),Iy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;if((IJ=function(e){return O_||(O_=new Ih(null)),O_.generate(e)}).Rand=Ih,Ih.prototype.generate=function(e){return this._rand(e)},Ih.prototype._rand=function(e){if((this||Iy).rand.getBytes)return(this||Iy).rand.getBytes(e);for(var r=new Uint8Array(e),n=0;n<r.length;n++)r[n]=(this||Iy).rand.getByte();return r},typeof self=="object")self.crypto&&self.crypto.getRandomValues?Ih.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Ih.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Ih.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(P_=D3e,typeof P_.randomBytes!="function")throw new Error("Not supported");Ih.prototype._rand=function(e){return P_.randomBytes(e)}}catch(e){}fA=IJ,OJ=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,o0=qn,$3e=fA;BJ=s0,s0.create=function(e){return new s0(e)},s0.prototype._randbelow=function(e){var r=e.bitLength(),n=Math.ceil(r/8);do var h=new o0((this||OJ).rand.generate(n));while(h.cmp(e)>=0);return h},s0.prototype._randrange=function(e,r){var n=r.sub(e);return e.add(this._randbelow(n))},s0.prototype.test=function(e,r,n){var h=e.bitLength(),a=o0.mont(e),d=new o0(1).toRed(a);r||(r=Math.max(1,h/48|0));for(var l=e.subn(1),v=0;!l.testn(v);v++);for(var w=e.shrn(v),m=l.toRed(a);r>0;r--){var y=this._randrange(new o0(2),l);n&&n(y);var g=y.toRed(a).redPow(w);if(g.cmp(d)!==0&&g.cmp(m)!==0){for(var S=1;S<v;S++){if((g=g.redSqr()).cmp(d)===0)return!1;if(g.cmp(m)===0)break}if(S===v)return!1}}return!0},s0.prototype.getDivisor=function(e,r){var n=e.bitLength(),h=o0.mont(e),a=new o0(1).toRed(h);r||(r=Math.max(1,n/48|0));for(var d=e.subn(1),l=0;!d.testn(l);l++);for(var v=e.shrn(l),w=d.toRed(h);r>0;r--){var m=this._randrange(new o0(2),d),y=e.gcd(m);if(y.cmpn(1)!==0)return y;var g=m.toRed(h).redPow(v);if(g.cmp(a)!==0&&g.cmp(w)!==0){for(var S=1;S<l;S++){if((g=g.redSqr()).cmp(a)===0)return g.fromRed().subn(1).gcd(e);if(g.cmp(w)===0)break}if(S===l)return(g=g.redSqr()).fromRed().subn(1).gcd(e)}}return!1};PJ=BJ,U3e=Rd;NJ=C_,C_.simpleSieve=BE,C_.fermatTest=OE;Na=qn,q3e=new Na(24),LH=new PJ,j3e=new Na(1),IE=new Na(2),F3e=new Na(5),z3e=(new Na(16),new Na(8),new Na(10)),H3e=new Na(3),K3e=(new Na(7),new Na(11)),DH=new Na(4),N_=(new Na(12),null);LJ=NJ,wi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,nu=Pr.Buffer,Ms=qn,$H=new PJ,W3e=new Ms(24),G3e=new Ms(11),V3e=new Ms(10),J3e=new Ms(3),Y3e=new Ms(7),UH=LJ,X3e=Rd;CJ=ju;F6={};Object.defineProperty(ju.prototype,"verifyError",{enumerable:!0,get:function(){return typeof(this||wi)._primeCode!="number"&&((this||wi)._primeCode=function(e,r){var n=r.toString("hex"),h=[n,e.toString(16)].join("_");if(h in F6)return F6[h];var a,d=0;if(e.isEven()||!UH.simpleSieve||!UH.fermatTest(e)||!$H.test(e))return d+=1,d+=n==="02"||n==="05"?8:4,F6[h]=d,d;switch($H.test(e.shrn(1))||(d+=2),n){case"02":e.mod(W3e).cmp(G3e)&&(d+=8);break;case"05":(a=e.mod(V3e)).cmp(J3e)&&a.cmp(Y3e)&&(d+=8);break;default:d+=4}return F6[h]=d,d}((this||wi).__prime,(this||wi).__gen)),(this||wi)._primeCode}}),ju.prototype.generateKeys=function(){return(this||wi)._priv||((this||wi)._priv=new Ms(X3e((this||wi)._primeLen))),(this||wi)._pub=(this||wi)._gen.toRed((this||wi)._prime).redPow((this||wi)._priv).fromRed(),this.getPublicKey()},ju.prototype.computeSecret=function(e){var r=(e=(e=new Ms(e)).toRed((this||wi)._prime)).redPow((this||wi)._priv).fromRed(),n=new nu(r.toArray()),h=this.getPrime();if(n.length<h.length){var a=new nu(h.length-n.length);a.fill(0),n=nu.concat([a,n])}return n},ju.prototype.getPublicKey=function(e){return z6((this||wi)._pub,e)},ju.prototype.getPrivateKey=function(e){return z6((this||wi)._priv,e)},ju.prototype.getPrime=function(e){return z6((this||wi).__prime,e)},ju.prototype.getGenerator=function(e){return z6((this||wi)._gen,e)},ju.prototype.setGenerator=function(e,r){return r=r||"utf8",nu.isBuffer(e)||(e=new nu(e,r)),(this||wi).__gen=e,(this||wi)._gen=new Ms(e),this||wi};t8e=CJ,ld={},Bh=Pr.Buffer,r8e=LJ,qH={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}},L_=t8e,i8e={binary:!0,hex:!0,base64:!0};ld.DiffieHellmanGroup=ld.createDiffieHellmanGroup=ld.getDiffieHellman=function(e){var r=new Bh(qH[e].prime,"hex"),n=new Bh(qH[e].gen,"hex");return new L_(r,n)},ld.createDiffieHellman=ld.DiffieHellman=function e(r,n,h,a){return Bh.isBuffer(n)||i8e[n]===void 0?e(r,"binary",n,h):(n=n||"binary",a=a||"binary",h=h||new Bh([2]),Bh.isBuffer(h)||(h=new Bh(h,a)),typeof r=="number"?new L_(r8e(r,h),h,!0):(Bh.isBuffer(r)||(r=new Bh(r,n)),new L_(r,h,!0)))};n8e=Pr.Buffer,Yh=qn,jH=Rd;DJ=FH,FH.getr=$J;uA=DJ,hA={},H6=hA;H6.toArray=function(e,r){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e!="string"){for(var h=0;h<e.length;h++)n[h]=0|e[h];return n}if(r==="hex")for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),h=0;h<e.length;h+=2)n.push(parseInt(e[h]+e[h+1],16));else for(h=0;h<e.length;h++){var a=e.charCodeAt(h),d=a>>8,l=255&a;d?n.push(d,l):n.push(l)}return n},H6.zero2=UJ,H6.toHex=zH,H6.encode=function(e,r){return r==="hex"?zH(e):e};Oo={},uf=Oo,a8e=qn,o8e=Es,K6=hA;uf.assert=o8e,uf.toArray=K6.toArray,uf.zero2=K6.zero2,uf.toHex=K6.toHex,uf.encode=K6.encode,uf.getNAF=function(e,r,n){var h=new Array(Math.max(e.bitLength(),n)+1);h.fill(0);for(var a=1<<r+1,d=e.clone(),l=0;l<h.length;l++){var v,w=d.andln(a-1);d.isOdd()?(v=w>(a>>1)-1?(a>>1)-w:w,d.isubn(v)):v=0,h[l]=v,d.iushrn(1)}return h},uf.getJSF=function(e,r){var n=[[],[]];e=e.clone(),r=r.clone();for(var h=0,a=0;e.cmpn(-h)>0||r.cmpn(-a)>0;){var d,l,v,w=e.andln(3)+h&3,m=r.andln(3)+a&3;w===3&&(w=-1),m===3&&(m=-1),(1&w)==0?d=0:d=(v=e.andln(7)+h&7)!==3&&v!==5||m!==2?w:-w,n[0].push(d),(1&m)==0?l=0:l=(v=r.andln(7)+a&7)!==3&&v!==5||w!==2?m:-m,n[1].push(l),2*h===d+1&&(h=1-h),2*a===l+1&&(a=1-a),e.iushrn(1),r.iushrn(1)}return n},uf.cachedProperty=function(e,r,n){var h="_"+r;e.prototype[r]=function(){return this[h]!==void 0?this[h]:this[h]=n.call(this)}},uf.parseBytes=function(e){return typeof e=="string"?uf.toArray(e,"hex"):e},uf.intFromLE=function(e){return new a8e(e,"hex","le")};Uy=qn,PE=Oo,s8e=PE.assert;qJ=By,By.prototype._importDER=function(e,r){e=PE.toArray(e,r);var n=new f8e;if(e[n.place++]!==48||D_(e,n)+n.place!==e.length||e[n.place++]!==2)return!1;var h=D_(e,n),a=e.slice(n.place,h+n.place);if(n.place+=h,e[n.place++]!==2)return!1;var d=D_(e,n);if(e.length!==d+n.place)return!1;var l=e.slice(n.place,d+n.place);return a[0]===0&&128&a[1]&&(a=a.slice(1)),l[0]===0&&128&l[1]&&(l=l.slice(1)),this.r=new Uy(a),this.s=new Uy(l),this.recoveryParam=null,!0},By.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(128&r[0]&&(r=[0].concat(r)),128&n[0]&&(n=[0].concat(n)),r=HH(r),n=HH(n);!(n[0]||128&n[1]);)n=n.slice(1);var h=[2];$_(h,r.length),(h=h.concat(r)).push(2),$_(h,n.length);var a=h.concat(n),d=[48];return $_(d,a.length),d=d.concat(a),PE.encode(d,e)};u8e=qJ,mi={},h8e=Es,l8e=jr;mi.inherits=l8e,mi.toArray=function(e,r){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e=="string")if(r){if(r==="hex")for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a<e.length;a+=2)n.push(parseInt(e[a]+e[a+1],16))}else for(var h=0,a=0;a<e.length;a++){var d=e.charCodeAt(a);d<128?n[h++]=d:d<2048?(n[h++]=d>>6|192,n[h++]=63&d|128):c8e(e,a)?(d=65536+((1023&d)<<10)+(1023&e.charCodeAt(++a)),n[h++]=d>>18|240,n[h++]=d>>12&63|128,n[h++]=d>>6&63|128,n[h++]=63&d|128):(n[h++]=d>>12|224,n[h++]=d>>6&63|128,n[h++]=63&d|128)}else for(a=0;a<e.length;a++)n[a]=0|e[a];return n},mi.toHex=function(e){for(var r="",n=0;n<e.length;n++)r+=ZH(e[n].toString(16));return r},mi.htonl=KH,mi.toHex32=function(e,r){for(var n="",h=0;h<e.length;h++){var a=e[h];r==="little"&&(a=KH(a)),n+=WH(a.toString(16))}return n},mi.zero2=ZH,mi.zero8=WH,mi.join32=function(e,r,n,h){var a=n-r;h8e(a%4==0);for(var d=new Array(a/4),l=0,v=r;l<d.length;l++,v+=4){var w;w=h==="big"?e[v]<<24|e[v+1]<<16|e[v+2]<<8|e[v+3]:e[v+3]<<24|e[v+2]<<16|e[v+1]<<8|e[v],d[l]=w>>>0}return d},mi.split32=function(e,r){for(var n=new Array(4*e.length),h=0,a=0;h<e.length;h++,a+=4){var d=e[h];r==="big"?(n[a]=d>>>24,n[a+1]=d>>>16&255,n[a+2]=d>>>8&255,n[a+3]=255&d):(n[a+3]=d>>>24,n[a+2]=d>>>16&255,n[a+1]=d>>>8&255,n[a]=255&d)}return n},mi.rotr32=function(e,r){return e>>>r|e<<32-r},mi.rotl32=function(e,r){return e<<r|e>>>32-r},mi.sum32=function(e,r){return e+r>>>0},mi.sum32_3=function(e,r,n){return e+r+n>>>0},mi.sum32_4=function(e,r,n,h){return e+r+n+h>>>0},mi.sum32_5=function(e,r,n,h,a){return e+r+n+h+a>>>0},mi.sum64=function(e,r,n,h){var a=e[r],d=h+e[r+1]>>>0,l=(d<h?1:0)+n+a;e[r]=l>>>0,e[r+1]=d},mi.sum64_hi=function(e,r,n,h){return(r+h>>>0<r?1:0)+e+n>>>0},mi.sum64_lo=function(e,r,n,h){return r+h>>>0},mi.sum64_4_hi=function(e,r,n,h,a,d,l,v){var w=0,m=r;return w+=(m=m+h>>>0)<r?1:0,w+=(m=m+d>>>0)<d?1:0,e+n+a+l+(w+=(m=m+v>>>0)<v?1:0)>>>0},mi.sum64_4_lo=function(e,r,n,h,a,d,l,v){return r+h+d+v>>>0},mi.sum64_5_hi=function(e,r,n,h,a,d,l,v,w,m){var y=0,g=r;return y+=(g=g+h>>>0)<r?1:0,y+=(g=g+d>>>0)<d?1:0,y+=(g=g+v>>>0)<v?1:0,e+n+a+l+w+(y+=(g=g+m>>>0)<m?1:0)>>>0},mi.sum64_5_lo=function(e,r,n,h,a,d,l,v,w,m){return r+h+d+v+m>>>0},mi.rotr64_hi=function(e,r,n){return(r<<32-n|e>>>n)>>>0},mi.rotr64_lo=function(e,r,n){return(e<<32-n|r>>>n)>>>0},mi.shr64_hi=function(e,r,n){return e>>>n},mi.shr64_lo=function(e,r,n){return(e<<32-n|r>>>n)>>>0};Td={},GH=mi,d8e=Es;Td.BlockHash=Z6,Z6.prototype.update=function(e,r){if(e=GH.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=GH.join32(e,0,e.length-n,this.endian);for(var h=0;h<e.length;h+=this._delta32)this._update(e,h,h+this._delta32)}return this},Z6.prototype.digest=function(e){return this.update(this._pad()),d8e(this.pending===null),this._digest(e)},Z6.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,n=r-(e+this.padLength)%r,h=new Array(n+this.padLength);h[0]=128;for(var a=1;a<n;a++)h[a]=0;if(e<<=3,this.endian==="big"){for(var d=8;d<this.padLength;d++)h[a++]=0;h[a++]=0,h[a++]=0,h[a++]=0,h[a++]=0,h[a++]=e>>>24&255,h[a++]=e>>>16&255,h[a++]=e>>>8&255,h[a++]=255&e}else for(h[a++]=255&e,h[a++]=e>>>8&255,h[a++]=e>>>16&255,h[a++]=e>>>24&255,h[a++]=0,h[a++]=0,h[a++]=0,h[a++]=0,d=8;d<this.padLength;d++)h[a++]=0;return h};ho=mi,p8e=Td,v8e=Es,au=ho.rotr64_hi,ou=ho.rotr64_lo,FJ=ho.shr64_hi,zJ=ho.shr64_lo,Oh=ho.sum64,U_=ho.sum64_hi,q_=ho.sum64_lo,m8e=ho.sum64_4_hi,g8e=ho.sum64_4_lo,y8e=ho.sum64_5_hi,b8e=ho.sum64_5_lo,HJ=p8e.BlockHash,w8e=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];ho.inherits(pf,HJ),jJ=pf,pf.blockSize=1024,pf.outSize=512,pf.hmacStrength=192,pf.padLength=128,pf.prototype._prepareBlock=function(e,r){for(var n=this.W,h=0;h<32;h++)n[h]=e[r+h];for(;h<n.length;h+=2){var a=B8e(n[h-4],n[h-3]),d=O8e(n[h-4],n[h-3]),l=n[h-14],v=n[h-13],w=k8e(n[h-30],n[h-29]),m=I8e(n[h-30],n[h-29]),y=n[h-32],g=n[h-31];n[h]=m8e(a,d,l,v,w,m,y,g),n[h+1]=g8e(a,d,l,v,w,m,y,g)}},pf.prototype._update=function(e,r){this._prepareBlock(e,r);var n=this.W,h=this.h[0],a=this.h[1],d=this.h[2],l=this.h[3],v=this.h[4],w=this.h[5],m=this.h[6],y=this.h[7],g=this.h[8],S=this.h[9],R=this.h[10],A=this.h[11],k=this.h[12],I=this.h[13],B=this.h[14],P=this.h[15];v8e(this.k.length===n.length);for(var C=0;C<n.length;C+=2){var q=B,K=P,V=x8e(g,S),j=T8e(g,S),z=_8e(g,S,R,A,k),Y=M8e(g,S,R,A,k,I),E=this.k[C],i=this.k[C+1],s=n[C],f=n[C+1],c=y8e(q,K,V,j,z,Y,E,i,s,f),p=b8e(q,K,V,j,z,Y,E,i,s,f);q=A8e(h,a),K=R8e(h,a),V=S8e(h,a,d,l,v),j=E8e(h,a,d,l,v,w);var _=U_(q,K,V,j),x=q_(q,K,V,j);B=k,P=I,k=R,I=A,R=g,A=S,g=U_(m,y,c,p),S=q_(y,y,c,p),m=v,y=w,v=d,w=l,d=h,l=a,h=U_(c,p,_,x),a=q_(c,p,_,x)}Oh(this.h,0,h,a),Oh(this.h,2,d,l),Oh(this.h,4,v,w),Oh(this.h,6,m,y),Oh(this.h,8,g,S),Oh(this.h,10,R,A),Oh(this.h,12,k,I),Oh(this.h,14,B,P)},pf.prototype._digest=function(e){return e==="hex"?ho.toHex32(this.h,"big"):ho.split32(this.h,"big")};KJ=jJ,Qf={},Vf=mi.rotr32;Qf.ft_1=function(e,r,n,h){return e===0?VH(r,n,h):e===1||e===3?YH(r,n,h):e===2?JH(r,n,h):void 0},Qf.ch32=VH,Qf.maj32=JH,Qf.p32=YH,Qf.s0_256=function(e){return Vf(e,2)^Vf(e,13)^Vf(e,22)},Qf.s1_256=function(e){return Vf(e,6)^Vf(e,11)^Vf(e,25)},Qf.g0_256=function(e){return Vf(e,7)^Vf(e,18)^e>>>3},Qf.g1_256=function(e){return Vf(e,17)^Vf(e,19)^e>>>10};md=mi,P8e=Td,kd=Qf,N8e=Es,hf=md.sum32,C8e=md.sum32_4,L8e=md.sum32_5,D8e=kd.ch32,$8e=kd.maj32,U8e=kd.s0_256,q8e=kd.s1_256,j8e=kd.g0_256,F8e=kd.g1_256,WJ=P8e.BlockHash,z8e=[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];md.inherits(eu,WJ),ZJ=eu,eu.blockSize=512,eu.outSize=256,eu.hmacStrength=192,eu.padLength=64,eu.prototype._update=function(e,r){for(var n=this.W,h=0;h<16;h++)n[h]=e[r+h];for(;h<n.length;h++)n[h]=C8e(F8e(n[h-2]),n[h-7],j8e(n[h-15]),n[h-16]);var a=this.h[0],d=this.h[1],l=this.h[2],v=this.h[3],w=this.h[4],m=this.h[5],y=this.h[6],g=this.h[7];for(N8e(this.k.length===n.length),h=0;h<n.length;h++){var S=L8e(g,q8e(w),D8e(w,m,y),this.k[h],n[h]),R=hf(U8e(a),$8e(a,d,l));g=y,y=m,m=w,w=hf(v,S),v=l,l=d,d=a,a=hf(S,R)}this.h[0]=hf(this.h[0],a),this.h[1]=hf(this.h[1],d),this.h[2]=hf(this.h[2],l),this.h[3]=hf(this.h[3],v),this.h[4]=hf(this.h[4],w),this.h[5]=hf(this.h[5],m),this.h[6]=hf(this.h[6],y),this.h[7]=hf(this.h[7],g)},eu.prototype._digest=function(e){return e==="hex"?md.toHex32(this.h,"big"):md.split32(this.h,"big")};GJ=ZJ,gd=mi,H8e=Td,K8e=Qf,j_=gd.rotl32,Ip=gd.sum32,Z8e=gd.sum32_5,W8e=K8e.ft_1,JJ=H8e.BlockHash,G8e=[1518500249,1859775393,2400959708,3395469782];gd.inherits(tu,JJ),VJ=tu,tu.blockSize=512,tu.outSize=160,tu.hmacStrength=80,tu.padLength=64,tu.prototype._update=function(e,r){for(var n=this.W,h=0;h<16;h++)n[h]=e[r+h];for(;h<n.length;h++)n[h]=j_(n[h-3]^n[h-8]^n[h-14]^n[h-16],1);var a=this.h[0],d=this.h[1],l=this.h[2],v=this.h[3],w=this.h[4];for(h=0;h<n.length;h++){var m=~~(h/20),y=Z8e(j_(a,5),W8e(m,d,l,v),w,n[h],G8e[m]);w=v,v=l,l=j_(d,30),d=a,a=y}this.h[0]=Ip(this.h[0],a),this.h[1]=Ip(this.h[1],d),this.h[2]=Ip(this.h[2],l),this.h[3]=Ip(this.h[3],v),this.h[4]=Ip(this.h[4],w)},tu.prototype._digest=function(e){return e==="hex"?gd.toHex32(this.h,"big"):gd.split32(this.h,"big")};V8e=VJ,F_=mi,XJ=GJ;F_.inherits(zu,XJ),YJ=zu,zu.blockSize=512,zu.outSize=224,zu.hmacStrength=192,zu.padLength=64,zu.prototype._digest=function(e){return e==="hex"?F_.toHex32(this.h.slice(0,7),"big"):F_.split32(this.h.slice(0,7),"big")};J8e=YJ,z_=mi,eY=KJ;z_.inherits(Hu,eY),QJ=Hu,Hu.blockSize=1024,Hu.outSize=384,Hu.hmacStrength=192,Hu.padLength=128,Hu.prototype._digest=function(e){return e==="hex"?z_.toHex32(this.h.slice(0,12),"big"):z_.split32(this.h.slice(0,12),"big")};Y8e=QJ,cd={};cd.sha1=V8e,cd.sha224=J8e,cd.sha256=GJ,cd.sha384=Y8e,cd.sha512=KJ;tY={},T0=mi,X8e=Td,W6=T0.rotl32,XH=T0.sum32,Bp=T0.sum32_3,QH=T0.sum32_4,rY=X8e.BlockHash;T0.inherits(ru,rY),tY.ripemd160=ru,ru.blockSize=512,ru.outSize=160,ru.hmacStrength=192,ru.padLength=64,ru.prototype._update=function(e,r){for(var n=this.h[0],h=this.h[1],a=this.h[2],d=this.h[3],l=this.h[4],v=n,w=h,m=a,y=d,g=l,S=0;S<80;S++){var R=XH(W6(QH(n,eK(S,h,a,d),e[t4e[S]+r],Q8e(S)),i4e[S]),l);n=l,l=d,d=W6(a,10),a=h,h=R,R=XH(W6(QH(v,eK(79-S,w,m,y),e[r4e[S]+r],e4e(S)),n4e[S]),g),v=g,g=y,y=W6(m,10),m=w,w=R}R=Bp(this.h[1],a,y),this.h[1]=Bp(this.h[2],d,g),this.h[2]=Bp(this.h[3],l,v),this.h[3]=Bp(this.h[4],n,w),this.h[4]=Bp(this.h[0],h,m),this.h[0]=R},ru.prototype._digest=function(e){return e==="hex"?T0.toHex32(this.h,"little"):T0.split32(this.h,"little")};t4e=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],r4e=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],i4e=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],n4e=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],a4e=mi,o4e=Es;iY=dd,dd.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),o4e(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)},dd.prototype.update=function(e,r){return this.inner.update(e,r),this},dd.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};s4e=iY,eb={},ga=eb;ga.utils=mi,ga.common=Td,ga.sha=cd,ga.ripemd=tY,ga.hmac=s4e,ga.sha1=ga.sha.sha1,ga.sha256=ga.sha.sha256,ga.sha224=ga.sha.sha224,ga.sha384=ga.sha.sha384,ga.sha512=ga.sha.sha512,ga.ripemd160=ga.ripemd.ripemd160;f4e=eb,R0=hA,aY=Es;nY=Xh,Xh.prototype._init=function(e,r,n){var h=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a<this.V.length;a++)this.K[a]=0,this.V[a]=1;this._update(h),this._reseed=1,this.reseedInterval=281474976710656},Xh.prototype._hmac=function(){return new f4e.hmac(this.hash,this.K)},Xh.prototype._update=function(e){var r=this._hmac().update(this.V).update([0]);e&&(r=r.update(e)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},Xh.prototype.reseed=function(e,r,n,h){typeof r!="string"&&(h=n,n=r,r=null),e=R0.toArray(e,r),n=R0.toArray(n,h),aY(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},Xh.prototype.generate=function(e,r,n,h){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(h=n,n=r,r=null),n&&(n=R0.toArray(n,h||"hex"),this._update(n));for(var a=[];a.length<e;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var d=a.slice(0,e);return this._update(n),this._reseed++,R0.encode(d,r)};u4e=nY,f0=qn,a2=Oo,G6=a2.getNAF,h4e=a2.getJSF,V6=a2.assert;oY=Ph,Ph.prototype.point=function(){throw new Error("Not implemented")},Ph.prototype.validate=function(){throw new Error("Not implemented")},Ph.prototype._fixedNafMul=function(e,r){V6(e.precomputed);var n=e._getDoubles(),h=G6(r,1,this._bitLength),a=(1<<n.step+1)-(n.step%2==0?2:1);a/=3;for(var d=[],l=0;l<h.length;l+=n.step){var v=0;for(r=l+n.step-1;r>=l;r--)v=(v<<1)+h[r];d.push(v)}for(var w=this.jpoint(null,null,null),m=this.jpoint(null,null,null),y=a;y>0;y--){for(l=0;l<d.length;l++)(v=d[l])===y?m=m.mixedAdd(n.points[l]):v===-y&&(m=m.mixedAdd(n.points[l].neg()));w=w.add(m)}return w.toP()},Ph.prototype._wnafMul=function(e,r){var n=4,h=e._getNAFPoints(n);n=h.wnd;for(var a=h.points,d=G6(r,n,this._bitLength),l=this.jpoint(null,null,null),v=d.length-1;v>=0;v--){for(r=0;v>=0&&d[v]===0;v--)r++;if(v>=0&&r++,l=l.dblp(r),v<0)break;var w=d[v];V6(w!==0),l=e.type==="affine"?w>0?l.mixedAdd(a[w-1>>1]):l.mixedAdd(a[-w-1>>1].neg()):w>0?l.add(a[w-1>>1]):l.add(a[-w-1>>1].neg())}return e.type==="affine"?l.toP():l},Ph.prototype._wnafMulAdd=function(e,r,n,h,a){for(var d=this._wnafT1,l=this._wnafT2,v=this._wnafT3,w=0,m=0;m<h;m++){var y=(j=r[m])._getNAFPoints(e);d[m]=y.wnd,l[m]=y.points}for(m=h-1;m>=1;m-=2){var g=m-1,S=m;if(d[g]===1&&d[S]===1){var R=[r[g],null,null,r[S]];r[g].y.cmp(r[S].y)===0?(R[1]=r[g].add(r[S]),R[2]=r[g].toJ().mixedAdd(r[S].neg())):r[g].y.cmp(r[S].y.redNeg())===0?(R[1]=r[g].toJ().mixedAdd(r[S]),R[2]=r[g].add(r[S].neg())):(R[1]=r[g].toJ().mixedAdd(r[S]),R[2]=r[g].toJ().mixedAdd(r[S].neg()));var A=[-3,-1,-5,-7,0,7,5,1,3],k=h4e(n[g],n[S]);w=Math.max(k[0].length,w),v[g]=new Array(w),v[S]=new Array(w);for(var I=0;I<w;I++){var B=0|k[0][I],P=0|k[1][I];v[g][I]=A[3*(B+1)+(P+1)],v[S][I]=0,l[g]=R}}else v[g]=G6(n[g],d[g],this._bitLength),v[S]=G6(n[S],d[S],this._bitLength),w=Math.max(v[g].length,w),w=Math.max(v[S].length,w)}var C=this.jpoint(null,null,null),q=this._wnafT4;for(m=w;m>=0;m--){for(var K=0;m>=0;){var V=!0;for(I=0;I<h;I++)q[I]=0|v[I][m],q[I]!==0&&(V=!1);if(!V)break;K++,m--}if(m>=0&&K++,C=C.dblp(K),m<0)break;for(I=0;I<h;I++){var j,z=q[I];z!==0&&(z>0?j=l[I][z-1>>1]:z<0&&(j=l[I][-z-1>>1].neg()),C=j.type==="affine"?C.mixedAdd(j):C.add(j))}}for(m=0;m<h;m++)l[m]=null;return a?C:C.toP()},Ph.BasePoint=ps,ps.prototype.eq=function(){throw new Error("Not implemented")},ps.prototype.validate=function(){return this.curve.validate(this)},Ph.prototype.decodePoint=function(e,r){e=a2.toArray(e,r);var n=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1==2*n)return e[0]===6?V6(e[e.length-1]%2==0):e[0]===7&&V6(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((e[0]===2||e[0]===3)&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),e[0]===3);throw new Error("Unknown point format")},ps.prototype.encodeCompressed=function(e){return this.encode(e,!0)},ps.prototype._encode=function(e){var r=this.curve.p.byteLength(),n=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",r))},ps.prototype.encode=function(e,r){return a2.encode(this._encode(r),e)},ps.prototype.precompute=function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this},ps.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return!!r&&r.points.length>=Math.ceil((e.bitLength()+1)/r.step)},ps.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],h=this,a=0;a<r;a+=e){for(var d=0;d<e;d++)h=h.dbl();n.push(h)}return{step:e,points:n}},ps.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],n=(1<<e)-1,h=n===1?null:this.dbl(),a=1;a<n;a++)r[a]=r[a-1].add(h);return{wnd:e,points:r}},ps.prototype._getBeta=function(){return null},ps.prototype.dblp=function(e){for(var r=this,n=0;n<e;n++)r=r.dbl();return r};tb=oY,Rn=qn,H_=jr,yd=tb,l4e=Oo.assert;H_(vs,yd),sY=vs,vs.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&this.p.modn(3)===1){var r,n;if(e.beta)r=new Rn(e.beta,16).toRed(this.red);else{var h=this._getEndoRoots(this.p);r=(r=h[0].cmp(h[1])<0?h[0]:h[1]).toRed(this.red)}if(e.lambda)n=new Rn(e.lambda,16);else{var a=this._getEndoRoots(this.n);this.g.mul(a[0]).x.cmp(this.g.x.redMul(r))===0?n=a[0]:(n=a[1],l4e(this.g.mul(n).x.cmp(this.g.x.redMul(r))===0))}return{beta:r,lambda:n,basis:e.basis?e.basis.map(function(d){return{a:new Rn(d.a,16),b:new Rn(d.b,16)}}):this._getEndoBasis(n)}}},vs.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:Rn.mont(e),n=new Rn(2).toRed(r).redInvm(),h=n.redNeg(),a=new Rn(3).toRed(r).redNeg().redSqrt().redMul(n);return[h.redAdd(a).fromRed(),h.redSub(a).fromRed()]},vs.prototype._getEndoBasis=function(e){for(var r,n,h,a,d,l,v,w,m,y=this.n.ushrn(Math.floor(this.n.bitLength()/2)),g=e,S=this.n.clone(),R=new Rn(1),A=new Rn(0),k=new Rn(0),I=new Rn(1),B=0;g.cmpn(0)!==0;){var P=S.div(g);w=S.sub(P.mul(g)),m=k.sub(P.mul(R));var C=I.sub(P.mul(A));if(!h&&w.cmp(y)<0)r=v.neg(),n=R,h=w.neg(),a=m;else if(h&&++B==2)break;v=w,S=g,g=w,k=R,R=m,I=A,A=C}d=w.neg(),l=m;var q=h.sqr().add(a.sqr());return d.sqr().add(l.sqr()).cmp(q)>=0&&(d=r,l=n),h.negative&&(h=h.neg(),a=a.neg()),d.negative&&(d=d.neg(),l=l.neg()),[{a:h,b:a},{a:d,b:l}]},vs.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],h=r[1],a=h.b.mul(e).divRound(this.n),d=n.b.neg().mul(e).divRound(this.n),l=a.mul(n.a),v=d.mul(h.a),w=a.mul(n.b),m=d.mul(h.b);return{k1:e.sub(l).sub(v),k2:w.add(m).neg()}},vs.prototype.pointFromX=function(e,r){(e=new Rn(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),h=n.redSqrt();if(h.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var a=h.fromRed().isOdd();return(r&&!a||!r&&a)&&(h=h.redNeg()),this.point(e,h)},vs.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,h=this.a.redMul(r),a=r.redSqr().redMul(r).redIAdd(h).redIAdd(this.b);return n.redSqr().redISub(a).cmpn(0)===0},vs.prototype._endoWnafMulAdd=function(e,r,n){for(var h=this._endoWnafT1,a=this._endoWnafT2,d=0;d<e.length;d++){var l=this._endoSplit(r[d]),v=e[d],w=v._getBeta();l.k1.negative&&(l.k1.ineg(),v=v.neg(!0)),l.k2.negative&&(l.k2.ineg(),w=w.neg(!0)),h[2*d]=v,h[2*d+1]=w,a[2*d]=l.k1,a[2*d+1]=l.k2}for(var m=this._wnafMulAdd(1,h,a,2*d,n),y=0;y<2*d;y++)h[y]=null,a[y]=null;return m},H_(ua,yd.BasePoint),vs.prototype.point=function(e,r,n){return new ua(this,e,r,n)},vs.prototype.pointFromJSON=function(e,r){return ua.fromJSON(this,e,r)},ua.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,h=function(a){return n.point(a.x.redMul(n.endo.beta),a.y)};e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(h)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(h)}}}return r}},ua.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},ua.fromJSON=function(e,r,n){typeof r=="string"&&(r=JSON.parse(r));var h=e.point(r[0],r[1],n);if(!r[2])return h;function a(l){return e.point(l[0],l[1],n)}var d=r[2];return h.precomputed={beta:null,doubles:d.doubles&&{step:d.doubles.step,points:[h].concat(d.doubles.points.map(a))},naf:d.naf&&{wnd:d.naf.wnd,points:[h].concat(d.naf.points.map(a))}},h},ua.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},ua.prototype.isInfinity=function(){return this.inf},ua.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),h=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,h)},ua.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),h=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(h),d=a.redSqr().redISub(this.x.redAdd(this.x)),l=a.redMul(this.x.redSub(d)).redISub(this.y);return this.curve.point(d,l)},ua.prototype.getX=function(){return this.x.fromRed()},ua.prototype.getY=function(){return this.y.fromRed()},ua.prototype.mul=function(e){return e=new Rn(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},ua.prototype.mulAdd=function(e,r,n){var h=[this,r],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(h,a):this.curve._wnafMulAdd(1,h,a,2)},ua.prototype.jmulAdd=function(e,r,n){var h=[this,r],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(h,a,!0):this.curve._wnafMulAdd(1,h,a,2,!0)},ua.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)},ua.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,h=function(a){return a.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(h)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(h)}}}return r},ua.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},H_(ya,yd.BasePoint),vs.prototype.jpoint=function(e,r,n){return new ya(this,e,r,n)},ya.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),h=this.y.redMul(r).redMul(e);return this.curve.point(n,h)},ya.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},ya.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),h=this.x.redMul(r),a=e.x.redMul(n),d=this.y.redMul(r.redMul(e.z)),l=e.y.redMul(n.redMul(this.z)),v=h.redSub(a),w=d.redSub(l);if(v.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var m=v.redSqr(),y=m.redMul(v),g=h.redMul(m),S=w.redSqr().redIAdd(y).redISub(g).redISub(g),R=w.redMul(g.redISub(S)).redISub(d.redMul(y)),A=this.z.redMul(e.z).redMul(v);return this.curve.jpoint(S,R,A)},ya.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,h=e.x.redMul(r),a=this.y,d=e.y.redMul(r).redMul(this.z),l=n.redSub(h),v=a.redSub(d);if(l.cmpn(0)===0)return v.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var w=l.redSqr(),m=w.redMul(l),y=n.redMul(w),g=v.redSqr().redIAdd(m).redISub(y).redISub(y),S=v.redMul(y.redISub(g)).redISub(a.redMul(m)),R=this.z.redMul(l);return this.curve.jpoint(g,S,R)},ya.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var r=this,n=0;n<e;n++)r=r.dbl();return r}var h=this.curve.a,a=this.curve.tinv,d=this.x,l=this.y,v=this.z,w=v.redSqr().redSqr(),m=l.redAdd(l);for(n=0;n<e;n++){var y=d.redSqr(),g=m.redSqr(),S=g.redSqr(),R=y.redAdd(y).redIAdd(y).redIAdd(h.redMul(w)),A=d.redMul(g),k=R.redSqr().redISub(A.redAdd(A)),I=A.redISub(k),B=R.redMul(I);B=B.redIAdd(B).redISub(S);var P=m.redMul(v);n+1<e&&(w=w.redMul(S)),d=k,v=P,m=B}return this.curve.jpoint(d,m.redMul(a),v)},ya.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},ya.prototype._zeroDbl=function(){var e,r,n;if(this.zOne){var h=this.x.redSqr(),a=this.y.redSqr(),d=a.redSqr(),l=this.x.redAdd(a).redSqr().redISub(h).redISub(d);l=l.redIAdd(l);var v=h.redAdd(h).redIAdd(h),w=v.redSqr().redISub(l).redISub(l),m=d.redIAdd(d);m=(m=m.redIAdd(m)).redIAdd(m),e=w,r=v.redMul(l.redISub(w)).redISub(m),n=this.y.redAdd(this.y)}else{var y=this.x.redSqr(),g=this.y.redSqr(),S=g.redSqr(),R=this.x.redAdd(g).redSqr().redISub(y).redISub(S);R=R.redIAdd(R);var A=y.redAdd(y).redIAdd(y),k=A.redSqr(),I=S.redIAdd(S);I=(I=I.redIAdd(I)).redIAdd(I),e=k.redISub(R).redISub(R),r=A.redMul(R.redISub(e)).redISub(I),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,r,n)},ya.prototype._threeDbl=function(){var e,r,n;if(this.zOne){var h=this.x.redSqr(),a=this.y.redSqr(),d=a.redSqr(),l=this.x.redAdd(a).redSqr().redISub(h).redISub(d);l=l.redIAdd(l);var v=h.redAdd(h).redIAdd(h).redIAdd(this.curve.a),w=v.redSqr().redISub(l).redISub(l);e=w;var m=d.redIAdd(d);m=(m=m.redIAdd(m)).redIAdd(m),r=v.redMul(l.redISub(w)).redISub(m),n=this.y.redAdd(this.y)}else{var y=this.z.redSqr(),g=this.y.redSqr(),S=this.x.redMul(g),R=this.x.redSub(y).redMul(this.x.redAdd(y));R=R.redAdd(R).redIAdd(R);var A=S.redIAdd(S),k=(A=A.redIAdd(A)).redAdd(A);e=R.redSqr().redISub(k),n=this.y.redAdd(this.z).redSqr().redISub(g).redISub(y);var I=g.redSqr();I=(I=(I=I.redIAdd(I)).redIAdd(I)).redIAdd(I),r=R.redMul(A.redISub(e)).redISub(I)}return this.curve.jpoint(e,r,n)},ya.prototype._dbl=function(){var e=this.curve.a,r=this.x,n=this.y,h=this.z,a=h.redSqr().redSqr(),d=r.redSqr(),l=n.redSqr(),v=d.redAdd(d).redIAdd(d).redIAdd(e.redMul(a)),w=r.redAdd(r),m=(w=w.redIAdd(w)).redMul(l),y=v.redSqr().redISub(m.redAdd(m)),g=m.redISub(y),S=l.redSqr();S=(S=(S=S.redIAdd(S)).redIAdd(S)).redIAdd(S);var R=v.redMul(g).redISub(S),A=n.redAdd(n).redMul(h);return this.curve.jpoint(y,R,A)},ya.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr(),h=r.redSqr(),a=e.redAdd(e).redIAdd(e),d=a.redSqr(),l=this.x.redAdd(r).redSqr().redISub(e).redISub(h),v=(l=(l=(l=l.redIAdd(l)).redAdd(l).redIAdd(l)).redISub(d)).redSqr(),w=h.redIAdd(h);w=(w=(w=w.redIAdd(w)).redIAdd(w)).redIAdd(w);var m=a.redIAdd(l).redSqr().redISub(d).redISub(v).redISub(w),y=r.redMul(m);y=(y=y.redIAdd(y)).redIAdd(y);var g=this.x.redMul(v).redISub(y);g=(g=g.redIAdd(g)).redIAdd(g);var S=this.y.redMul(m.redMul(w.redISub(m)).redISub(l.redMul(v)));S=(S=(S=S.redIAdd(S)).redIAdd(S)).redIAdd(S);var R=this.z.redAdd(l).redSqr().redISub(n).redISub(v);return this.curve.jpoint(g,S,R)},ya.prototype.mul=function(e,r){return e=new Rn(e,r),this.curve._wnafMul(this,e)},ya.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var r=this.z.redSqr(),n=e.z.redSqr();if(this.x.redMul(n).redISub(e.x.redMul(r)).cmpn(0)!==0)return!1;var h=r.redMul(this.z),a=n.redMul(e.z);return this.y.redMul(a).redISub(e.y.redMul(h)).cmpn(0)===0},ya.prototype.eqXToP=function(e){var r=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(n)===0)return!0;for(var h=e.clone(),a=this.curve.redN.redMul(r);;){if(h.iadd(this.curve.n),h.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(a),this.x.cmp(n)===0)return!0}},ya.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},ya.prototype.isInfinity=function(){return this.z.cmpn(0)===0};c4e=sY,pd=qn,tK=jr,qy=tb,d4e=Oo;tK(nd,qy),fY=nd,nd.prototype.validate=function(e){var r=e.normalize().x,n=r.redSqr(),h=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r);return h.redSqrt().redSqr().cmp(h)===0},tK(ha,qy.BasePoint),nd.prototype.decodePoint=function(e,r){return this.point(d4e.toArray(e,r),1)},nd.prototype.point=function(e,r){return new ha(this,e,r)},nd.prototype.pointFromJSON=function(e){return ha.fromJSON(this,e)},ha.prototype.precompute=function(){},ha.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},ha.fromJSON=function(e,r){return new ha(e,r[0],r[1]||e.one)},ha.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},ha.prototype.isInfinity=function(){return this.z.cmpn(0)===0},ha.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),r=this.x.redSub(this.z).redSqr(),n=e.redSub(r),h=e.redMul(r),a=n.redMul(r.redAdd(this.curve.a24.redMul(n)));return this.curve.point(h,a)},ha.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},ha.prototype.diffAdd=function(e,r){var n=this.x.redAdd(this.z),h=this.x.redSub(this.z),a=e.x.redAdd(e.z),d=e.x.redSub(e.z).redMul(n),l=a.redMul(h),v=r.z.redMul(d.redAdd(l).redSqr()),w=r.x.redMul(d.redISub(l).redSqr());return this.curve.point(v,w)},ha.prototype.mul=function(e){for(var r=e.clone(),n=this,h=this.curve.point(null,null),a=[];r.cmpn(0)!==0;r.iushrn(1))a.push(r.andln(1));for(var d=a.length-1;d>=0;d--)a[d]===0?(n=n.diffAdd(h,this),h=h.dbl()):(h=n.diffAdd(h,this),n=n.dbl());return h},ha.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},ha.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},ha.prototype.eq=function(e){return this.getX().cmp(e.getX())===0},ha.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},ha.prototype.getX=function(){return this.normalize(),this.x.fromRed()};p4e=fY,Wu=qn,rK=jr,jy=tb,v4e=Oo.assert;rK(Jf,jy),uY=Jf,Jf.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},Jf.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},Jf.prototype.jpoint=function(e,r,n,h){return this.point(e,r,n,h)},Jf.prototype.pointFromX=function(e,r){(e=new Wu(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),h=this.c2.redSub(this.a.redMul(n)),a=this.one.redSub(this.c2.redMul(this.d).redMul(n)),d=h.redMul(a.redInvm()),l=d.redSqrt();if(l.redSqr().redSub(d).cmp(this.zero)!==0)throw new Error("invalid point");var v=l.fromRed().isOdd();return(r&&!v||!r&&v)&&(l=l.redNeg()),this.point(e,l)},Jf.prototype.pointFromY=function(e,r){(e=new Wu(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),h=n.redSub(this.c2),a=n.redMul(this.d).redMul(this.c2).redSub(this.a),d=h.redMul(a.redInvm());if(d.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var l=d.redSqrt();if(l.redSqr().redSub(d).cmp(this.zero)!==0)throw new Error("invalid point");return l.fromRed().isOdd()!==r&&(l=l.redNeg()),this.point(l,e)},Jf.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),n=e.y.redSqr(),h=r.redMul(this.a).redAdd(n),a=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return h.cmp(a)===0},rK(un,jy.BasePoint),Jf.prototype.pointFromJSON=function(e){return un.fromJSON(this,e)},Jf.prototype.point=function(e,r,n,h){return new un(this,e,r,n,h)},un.fromJSON=function(e,r){return new un(e,r[0],r[1],r[2])},un.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},un.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},un.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var h=this.curve._mulA(e),a=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),d=h.redAdd(r),l=d.redSub(n),v=h.redSub(r),w=a.redMul(l),m=d.redMul(v),y=a.redMul(v),g=l.redMul(d);return this.curve.point(w,m,g,y)},un.prototype._projDbl=function(){var e,r,n,h=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),d=this.y.redSqr();if(this.curve.twisted){var l=(m=this.curve._mulA(a)).redAdd(d);if(this.zOne)e=h.redSub(a).redSub(d).redMul(l.redSub(this.curve.two)),r=l.redMul(m.redSub(d)),n=l.redSqr().redSub(l).redSub(l);else{var v=this.z.redSqr(),w=l.redSub(v).redISub(v);e=h.redSub(a).redISub(d).redMul(w),r=l.redMul(m.redSub(d)),n=l.redMul(w)}}else{var m=a.redAdd(d);v=this.curve._mulC(this.z).redSqr(),w=m.redSub(v).redSub(v),e=this.curve._mulC(h.redISub(m)).redMul(w),r=this.curve._mulC(m).redMul(a.redISub(d)),n=m.redMul(w)}return this.curve.point(e,r,n)},un.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},un.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),h=this.t.redMul(this.curve.dd).redMul(e.t),a=this.z.redMul(e.z.redAdd(e.z)),d=n.redSub(r),l=a.redSub(h),v=a.redAdd(h),w=n.redAdd(r),m=d.redMul(l),y=v.redMul(w),g=d.redMul(w),S=l.redMul(v);return this.curve.point(m,y,S,g)},un.prototype._projAdd=function(e){var r,n,h=this.z.redMul(e.z),a=h.redSqr(),d=this.x.redMul(e.x),l=this.y.redMul(e.y),v=this.curve.d.redMul(d).redMul(l),w=a.redSub(v),m=a.redAdd(v),y=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(d).redISub(l),g=h.redMul(w).redMul(y);return this.curve.twisted?(r=h.redMul(m).redMul(l.redSub(this.curve._mulA(d))),n=w.redMul(m)):(r=h.redMul(m).redMul(l.redSub(d)),n=this.curve._mulC(w).redMul(m)),this.curve.point(g,r,n)},un.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},un.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},un.prototype.mulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!1)},un.prototype.jmulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!0)},un.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},un.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},un.prototype.getX=function(){return this.normalize(),this.x.fromRed()},un.prototype.getY=function(){return this.normalize(),this.y.fromRed()},un.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0},un.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=e.clone(),h=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(h),this.x.cmp(r)===0)return!0}},un.prototype.toP=un.prototype.normalize,un.prototype.mixedAdd=un.prototype.add;m4e=uY,lA={},J6=lA;J6.base=tb,J6.short=c4e,J6.mont=p4e,J6.edwards=m4e;g4e={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}},rb={},CE=rb,zh=eb,K_=lA,iK=Oo.assert;CE.PresetCurve=hY,Hh("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:zh.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),Hh("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:zh.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),Hh("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:zh.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),Hh("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:zh.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),Hh("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:zh.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),Hh("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:zh.sha256,gRed:!1,g:["9"]}),Hh("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:zh.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{NE=g4e}catch(e){NE=void 0}Hh("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:zh.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",NE]});y4e=qn,nK=Oo.assert;lY=Ba,Ba.fromPublic=function(e,r,n){return r instanceof Ba?r:new Ba(e,{pub:r,pubEnc:n})},Ba.fromPrivate=function(e,r,n){return r instanceof Ba?r:new Ba(e,{priv:r,privEnc:n})},Ba.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},Ba.prototype.getPublic=function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub},Ba.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv},Ba.prototype._importPrivate=function(e,r){this.priv=new y4e(e,r||16),this.priv=this.priv.umod(this.ec.curve.n)},Ba.prototype._importPublic=function(e,r){if(e.x||e.y)return this.ec.curve.type==="mont"?nK(e.x,"Need x coordinate"):this.ec.curve.type!=="short"&&this.ec.curve.type!=="edwards"||nK(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y),void 0;this.pub=this.ec.curve.decodePoint(e,r)},Ba.prototype.derive=function(e){return e.mul(this.priv).getX()},Ba.prototype.sign=function(e,r,n){return this.ec.sign(e,this,r,n)},Ba.prototype.verify=function(e,r){return this.ec.verify(e,r,this)},Ba.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};b4e=lY,u0=qn,aK=u4e,Z_=rb,w4e=fA,dY=Oo.assert,W_=b4e,Y6=u8e;cY=_s,_s.prototype.keyPair=function(e){return new W_(this,e)},_s.prototype.keyFromPrivate=function(e,r){return W_.fromPrivate(this,e,r)},_s.prototype.keyFromPublic=function(e,r){return W_.fromPublic(this,e,r)},_s.prototype.genKeyPair=function(e){e||(e={});for(var r=new aK({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||w4e(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),h=this.n.sub(new u0(2));;){var a=new u0(r.generate(n));if(!(a.cmp(h)>0))return a.iaddn(1),this.keyFromPrivate(a)}},_s.prototype._truncateToN=function(e,r){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e},_s.prototype.sign=function(e,r,n,h){typeof n=="object"&&(h=n,n=null),h||(h={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new u0(e,16));for(var a=this.n.byteLength(),d=r.getPrivate().toArray("be",a),l=e.toArray("be",a),v=new aK({hash:this.hash,entropy:d,nonce:l,pers:h.pers,persEnc:h.persEnc||"utf8"}),w=this.n.sub(new u0(1)),m=0;;m++){var y=h.k?h.k(m):new u0(v.generate(this.n.byteLength()));if(!((y=this._truncateToN(y,!0)).cmpn(1)<=0||y.cmp(w)>=0)){var g=this.g.mul(y);if(!g.isInfinity()){var S=g.getX(),R=S.umod(this.n);if(R.cmpn(0)!==0){var A=y.invm(this.n).mul(R.mul(r.getPrivate()).iadd(e));if((A=A.umod(this.n)).cmpn(0)!==0){var k=(g.getY().isOdd()?1:0)|(S.cmp(R)!==0?2:0);return h.canonical&&A.cmp(this.nh)>0&&(A=this.n.sub(A),k^=1),new Y6({r:R,s:A,recoveryParam:k})}}}}}},_s.prototype.verify=function(e,r,n,h){e=this._truncateToN(new u0(e,16)),n=this.keyFromPublic(n,h);var a=(r=new Y6(r,"hex")).r,d=r.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||d.cmpn(1)<0||d.cmp(this.n)>=0)return!1;var l,v=d.invm(this.n),w=v.mul(e).umod(this.n),m=v.mul(a).umod(this.n);return this.curve._maxwellTrick?!(l=this.g.jmulAdd(w,n.getPublic(),m)).isInfinity()&&l.eqXToP(a):!(l=this.g.mulAdd(w,n.getPublic(),m)).isInfinity()&&l.getX().umod(this.n).cmp(a)===0},_s.prototype.recoverPubKey=function(e,r,n,h){dY((3&n)===n,"The recovery param is more than two bits"),r=new Y6(r,h);var a=this.n,d=new u0(e),l=r.r,v=r.s,w=1&n,m=n>>1;if(l.cmp(this.curve.p.umod(this.curve.n))>=0&&m)throw new Error("Unable to find sencond key candinate");l=m?this.curve.pointFromX(l.add(this.curve.n),w):this.curve.pointFromX(l,w);var y=r.r.invm(a),g=a.sub(d).mul(y).umod(a),S=v.mul(y).umod(a);return this.g.mulAdd(g,l,S)},_s.prototype.getKeyRecoveryParam=function(e,r,n,h){if((r=new Y6(r,h)).recoveryParam!==null)return r.recoveryParam;for(var a=0;a<4;a++){var d;try{d=this.recoverPubKey(e,r,a)}catch{continue}if(d.eq(n))return a}throw new Error("Unable to find valid recovery factor")};_4e=cY,o2=Oo,oK=o2.assert,sK=o2.parseBytes,ad=o2.cachedProperty;la.fromPublic=function(e,r){return r instanceof la?r:new la(e,{pub:r})},la.fromSecret=function(e,r){return r instanceof la?r:new la(e,{secret:r})},la.prototype.secret=function(){return this._secret},ad(la,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),ad(la,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),ad(la,"privBytes",function(){var e=this.eddsa,r=this.hash(),n=e.encodingLength-1,h=r.slice(0,e.encodingLength);return h[0]&=248,h[n]&=127,h[n]|=64,h}),ad(la,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),ad(la,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),ad(la,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),la.prototype.sign=function(e){return oK(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},la.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)},la.prototype.getSecret=function(e){return oK(this._secret,"KeyPair is public only"),o2.encode(this.secret(),e)},la.prototype.getPublic=function(e){return o2.encode(this.pubBytes(),e)};M4e=la,S4e=qn,ib=Oo,E4e=ib.assert,X6=ib.cachedProperty,A4e=ib.parseBytes;X6(m0,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),X6(m0,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),X6(m0,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),X6(m0,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),m0.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},m0.prototype.toHex=function(){return ib.encode(this.toBytes(),"hex").toUpperCase()};R4e=m0,x4e=eb,T4e=rb,vd=Oo,k4e=vd.assert,fK=vd.parseBytes,uK=M4e,hK=R4e;pY=fo,fo.prototype.sign=function(e,r){e=fK(e);var n=this.keyFromSecret(r),h=this.hashInt(n.messagePrefix(),e),a=this.g.mul(h),d=this.encodePoint(a),l=this.hashInt(d,n.pubBytes(),e).mul(n.priv()),v=h.add(l).umod(this.curve.n);return this.makeSignature({R:a,S:v,Rencoded:d})},fo.prototype.verify=function(e,r,n){e=fK(e),r=this.makeSignature(r);var h=this.keyFromPublic(n),a=this.hashInt(r.Rencoded(),h.pubBytes(),e),d=this.g.mul(r.S());return r.R().add(h.pub().mul(a)).eq(d)},fo.prototype.hashInt=function(){for(var e=this.hash(),r=0;r<arguments.length;r++)e.update(arguments[r]);return vd.intFromLE(e.digest()).umod(this.curve.n)},fo.prototype.keyFromPublic=function(e){return uK.fromPublic(this,e)},fo.prototype.keyFromSecret=function(e){return uK.fromSecret(this,e)},fo.prototype.makeSignature=function(e){return e instanceof hK?e:new hK(this,e)},fo.prototype.encodePoint=function(e){var r=e.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=e.getX().isOdd()?128:0,r},fo.prototype.decodePoint=function(e){var r=(e=vd.parseBytes(e)).length-1,n=e.slice(0,r).concat(-129&e[r]),h=(128&e[r])!=0,a=vd.intFromLE(n);return this.curve.pointFromY(a,h)},fo.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},fo.prototype.decodeInt=function(e){return vd.intFromLE(e)},fo.prototype.isPoint=function(e){return e instanceof this.pointClass};I4e=pY,nb={},h0=nb;h0.version=["elliptic","6.5.2","EC cryptography","lib/elliptic.js",["lib"],{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},{type:"git",url:"git@github.com:indutny/elliptic"},["EC","Elliptic","curve","Cryptography"],"Fedor Indutny <fedor@indutny.com>","MIT",{url:"https://github.com/indutny/elliptic/issues"},"https://github.com/indutny/elliptic",{brfs:"^1.4.3",coveralls:"^3.0.8",grunt:"^1.0.4","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.2",jscs:"^3.0.7",jshint:"^2.10.3",mocha:"^6.2.2"},{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}][1],h0.utils=Oo,h0.rand=fA,h0.curve=lA,h0.curves=rb,h0.ec=_4e,h0.eddsa=I4e;G_={},lK=!1,ko=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Jn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,vY={},B4e=jr;vY.Reporter=ms,ms.prototype.isError=function(e){return e instanceof od},ms.prototype.save=function(){var e=(this||Jn)._reporterState;return{obj:e.obj,pathLen:e.path.length}},ms.prototype.restore=function(e){var r=(this||Jn)._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)},ms.prototype.enterKey=function(e){return(this||Jn)._reporterState.path.push(e)},ms.prototype.exitKey=function(e){var r=(this||Jn)._reporterState;r.path=r.path.slice(0,e-1)},ms.prototype.leaveKey=function(e,r,n){var h=(this||Jn)._reporterState;this.exitKey(e),h.obj!==null&&(h.obj[r]=n)},ms.prototype.path=function(){return(this||Jn)._reporterState.path.join("/")},ms.prototype.enterObject=function(){var e=(this||Jn)._reporterState,r=e.obj;return e.obj={},r},ms.prototype.leaveObject=function(e){var r=(this||Jn)._reporterState,n=r.obj;return r.obj=e,n},ms.prototype.error=function(e){var r,n=(this||Jn)._reporterState,h=e instanceof od;if(r=h?e:new od(n.path.map(function(a){return"["+JSON.stringify(a)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw r;return h||n.errors.push(r),r},ms.prototype.wrapResult=function(e){var r=(this||Jn)._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e},B4e(od,Error),od.prototype.rethrow=function(e){if((this||Jn).message=e+" at: "+((this||Jn).path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this||Jn,od),!(this||Jn).stack)try{throw new Error((this||Jn).message)}catch(r){(this||Jn).stack=r.stack}return this||Jn};Q6={},cK=!1,Cr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;V_={},pK=!1,kr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,J_={},vK=!1;Nh={},mK=!1,Y_={},gK=!1;X_={},yK=!1,Ch=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;Q_={},wK=!1,eM=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,tM={},_K=!1;rM={},MK=!1,Wn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;iM={},EK=!1,nM=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,aM={},AK=!1;oM={},RK=!1;gY=ab(),_f=gY,xK=_f.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),N4e=_f.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),cA=_f.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),C4e=_f.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(cA),this.key("subjectPublicKey").bitstr())}),L4e=_f.define("RelativeDistinguishedName",function(){this.setof(N4e)}),D4e=_f.define("RDNSequence",function(){this.seqof(L4e)}),TK=_f.define("Name",function(){this.choice({rdnSequence:this.use(D4e)})}),$4e=_f.define("Validity",function(){this.seq().obj(this.key("notBefore").use(xK),this.key("notAfter").use(xK))}),U4e=_f.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),q4e=_f.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(cA),this.key("issuer").use(TK),this.key("validity").use($4e),this.key("subject").use(TK),this.key("subjectPublicKeyInfo").use(C4e),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(U4e).optional())}),j4e=_f.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(q4e),this.key("signatureAlgorithm").use(cA),this.key("signatureValue").bitstr())}),bf={},Mf=gY;bf.certificate=j4e;F4e=Mf.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});bf.RSAPrivateKey=F4e;z4e=Mf.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});bf.RSAPublicKey=z4e;H4e=Mf.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(yY),this.key("subjectPublicKey").bitstr())});bf.PublicKey=H4e;yY=Mf.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),K4e=Mf.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(yY),this.key("subjectPrivateKey").octstr())});bf.PrivateKey=K4e;Z4e=Mf.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});bf.EncryptedPrivateKey=Z4e;W4e=Mf.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});bf.DSAPrivateKey=W4e,bf.DSAparam=Mf.define("DSAparam",function(){this.int()});G4e=Mf.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(V4e),this.key("publicKey").optional().explicit(1).bitstr())});bf.ECPrivateKey=G4e;V4e=Mf.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});bf.signature=Mf.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())});J4e=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,Y4e=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,X4e=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,Q4e=Qy,e5e=Bo,ey=vi.Buffer,oo=bf,t5e={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"},r5e=function(e,r){var n,h=e.toString(),a=h.match(J4e);if(a){var d="aes"+a[1],l=ey.from(a[2],"hex"),v=ey.from(a[3].replace(/[\r\n]/g,""),"base64"),w=Q4e(r,l.slice(0,8),parseInt(a[1],10)).key,m=[],y=e5e.createDecipheriv(d,w,l);m.push(y.update(v)),m.push(y.final()),n=ey.concat(m)}else{var g=h.match(X4e);n=new ey(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:h.match(Y4e)[1],data:n}},i5e=Bo,n5e=Ly,sM=vi.Buffer;bY=kK,kK.signature=oo.signature;ob=bY,wY={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"},LE={},Pa=Pr.Buffer,x0=YV,a5e=uA,o5e=nb.ec,Fy=qn,s5e=ob,f5e=wY;(LE=function(e,r,n,h,a){var d=s5e(r);if(d.curve){if(h!=="ecdsa"&&h!=="ecdsa/rsa")throw new Error("wrong private key type");return function(m,y){var g=f5e[y.curve.join(".")];if(!g)throw new Error("unknown curve "+y.curve.join("."));var S=new o5e(g).keyFromPrivate(y.privateKey).sign(m);return new Pa(S.toDER())}(e,d)}if(d.type==="dsa"){if(h!=="dsa")throw new Error("wrong private key type");return function(m,y,g){for(var S,R=y.params.priv_key,A=y.params.p,k=y.params.q,I=y.params.g,B=new Fy(0),P=dA(m,k).mod(k),C=!1,q=IK(R,k,m,g);C===!1;)S=BK(k,q,g),B=u5e(I,S,A,k),(C=S.invm(k).imul(P.add(R.mul(B))).mod(k)).cmpn(0)===0&&(C=!1,B=new Fy(0));return function(K,V){K=K.toArray(),V=V.toArray(),128&K[0]&&(K=[0].concat(K)),128&V[0]&&(V=[0].concat(V));var j=[48,K.length+V.length+4,2,K.length];return j=j.concat(K,[2,V.length],V),new Pa(j)}(B,C)}(e,d,n)}if(h!=="rsa"&&h!=="ecdsa/rsa")throw new Error("wrong private key type");e=Pa.concat([a,e]);for(var l=d.modulus.byteLength(),v=[0,1];e.length+v.length+1<l;)v.push(255);v.push(0);for(var w=-1;++w<e.length;)v.push(e[w]);return a5e(v,d)}).getKey=IK,LE.makeKey=BK;h5e=LE,fM=Pr.Buffer,Op=qn,l5e=nb.ec,OK=ob,c5e=wY;d5e=function(e,r,n,h,a){var d=OK(n);if(d.type==="ec"){if(h!=="ecdsa"&&h!=="ecdsa/rsa")throw new Error("wrong public key type");return function(S,R,A){var k=c5e[A.data.algorithm.curve.join(".")];if(!k)throw new Error("unknown curve "+A.data.algorithm.curve.join("."));var I=new l5e(k),B=A.data.subjectPrivateKey.data;return I.verify(R,S,B)}(e,r,d)}if(d.type==="dsa"){if(h!=="dsa")throw new Error("wrong public key type");return function(S,R,A){var k=A.data.p,I=A.data.q,B=A.data.g,P=A.data.pub_key,C=OK.signature.decode(S,"der"),q=C.s,K=C.r;PK(q,I),PK(K,I);var V=Op.mont(k),j=q.invm(I);return B.toRed(V).redPow(new Op(R).mul(j).mod(I)).fromRed().mul(P.toRed(V).redPow(K.mul(j).mod(I)).fromRed()).mod(k).mod(I).cmp(K)===0}(e,r,d)}if(h!=="rsa"&&h!=="ecdsa/rsa")throw new Error("wrong public key type");r=fM.concat([a,r]);for(var l=d.modulus.byteLength(),v=[1],w=0;r.length+v.length+2<l;)v.push(255),w++;v.push(0);for(var m=-1;++m<r.length;)v.push(r[m]);v=new fM(v);var y=Op.mont(d.modulus);e=(e=new Op(e).toRed(y)).redPow(new Op(d.publicExponent)),e=new fM(e.fromRed().toArray());var g=w<8?1:0;for(l=Math.min(e.length,v.length),e.length!==v.length&&(g=1),m=-1;++m<l;)g|=e[m]^v[m];return g===0},Tn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,ty=Pr.Buffer,_Y=d2,zy=Ss,NK=jr,p5e=h5e,v5e=d5e,w0=XV;Object.keys(w0).forEach(function(e){w0[e].id=new ty(w0[e].id,"hex"),w0[e.toLowerCase()]=w0[e]}),NK(Wp,zy.Writable),Wp.prototype._write=function(e,r,n){(this||Tn)._hash.update(e),n()},Wp.prototype.update=function(e,r){return typeof e=="string"&&(e=new ty(e,r)),(this||Tn)._hash.update(e),this||Tn},Wp.prototype.sign=function(e,r){this.end();var n=(this||Tn)._hash.digest(),h=p5e(n,e,(this||Tn)._hashType,(this||Tn)._signType,(this||Tn)._tag);return r?h.toString(r):h},NK(Gp,zy.Writable),Gp.prototype._write=function(e,r,n){(this||Tn)._hash.update(e),n()},Gp.prototype.update=function(e,r){return typeof e=="string"&&(e=new ty(e,r)),(this||Tn)._hash.update(e),this||Tn},Gp.prototype.verify=function(e,r,n){typeof r=="string"&&(r=new ty(r,n)),this.end();var h=(this||Tn)._hash.digest();return v5e(r,h,e,(this||Tn)._signType,(this||Tn)._tag)};m5e={Sign:CK,Verify:LK,createSign:CK,createVerify:LK},Yn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Zu=Pr.Buffer,g5e=nb,y5e=qn;MY=function(e){return new g0(e)};Io={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};Io.p224=Io.secp224r1,Io.p256=Io.secp256r1=Io.prime256v1,Io.p192=Io.secp192r1=Io.prime192v1,Io.p384=Io.secp384r1,Io.p521=Io.secp521r1,g0.prototype.generateKeys=function(e,r){return(this||Yn).keys=(this||Yn).curve.genKeyPair(),this.getPublicKey(e,r)},g0.prototype.computeSecret=function(e,r,n){return r=r||"utf8",Zu.isBuffer(e)||(e=new Zu(e,r)),uM((this||Yn).curve.keyFromPublic(e).getPublic().mul((this||Yn).keys.getPrivate()).getX(),n,(this||Yn).curveType.byteLength)},g0.prototype.getPublicKey=function(e,r){var n=(this||Yn).keys.getPublic(r==="compressed",!0);return r==="hybrid"&&(n[n.length-1]%2?n[0]=7:n[0]=6),uM(n,e)},g0.prototype.getPrivateKey=function(e){return uM((this||Yn).keys.getPrivate(),e)},g0.prototype.setPublicKey=function(e,r){return r=r||"utf8",Zu.isBuffer(e)||(e=new Zu(e,r)),(this||Yn).keys._importPublic(e),this||Yn},g0.prototype.setPrivateKey=function(e,r){r=r||"utf8",Zu.isBuffer(e)||(e=new Zu(e,r));var n=new y5e(e);return n=n.toString(16),(this||Yn).keys=(this||Yn).curve.genKeyPair(),(this||Yn).keys._importPrivate(n),this||Yn};b5e=MY,w5e=d2,DE=vi.Buffer;SY=function(e,r){for(var n,h=DE.alloc(0),a=0;h.length<r;)n=_5e(a++),h=DE.concat([h,w5e("sha1").update(e).update(n).digest()]);return h.slice(0,r)},EY=function(e,r){for(var n=e.length,h=-1;++h<n;)e[h]^=r[h];return e},DK=qn,M5e=vi.Buffer,AY=function(e,r){return M5e.from(e.toRed(DK.mont(r.modulus)).redPow(new DK(r.publicExponent)).fromRed().toArray())},S5e=ob,hM=Rd,E5e=d2,$K=SY,UK=EY,lM=qn,A5e=AY,R5e=uA,lf=vi.Buffer,x5e=function(e,r,n){var h;h=e.padding?e.padding:n?1:4;var a,d=S5e(e);if(h===4)a=function(l,v){var w=l.modulus.byteLength(),m=v.length,y=E5e("sha1").update(lf.alloc(0)).digest(),g=y.length,S=2*g;if(m>w-S-2)throw new Error("message too long");var R=lf.alloc(w-m-S-2),A=w-g-1,k=hM(g),I=UK(lf.concat([y,R,lf.alloc(1,1),v],A),$K(k,A)),B=UK(k,$K(I,g));return new lM(lf.concat([lf.alloc(1),B,I],w))}(d,r);else if(h===1)a=function(l,v,w){var m,y=v.length,g=l.modulus.byteLength();if(y>g-11)throw new Error("message too long");return m=w?lf.alloc(g-y-3,255):function(S){for(var R,A=lf.allocUnsafe(S),k=0,I=hM(2*S),B=0;k<S;)B===I.length&&(I=hM(2*S),B=0),(R=I[B++])&&(A[k++]=R);return A}(g-y-3),new lM(lf.concat([lf.from([0,w?1:2]),m,lf.alloc(1),v],g))}(d,r,n);else{if(h!==3)throw new Error("unknown padding");if((a=new lM(r)).cmp(d.modulus)>=0)throw new Error("data too long for modulus")}return n?R5e(a,d):A5e(a,d)},T5e=ob,qK=SY,jK=EY,FK=qn,k5e=uA,I5e=d2,B5e=AY,Pp=vi.Buffer,O5e=function(e,r,n){var h;h=e.padding?e.padding:n?1:4;var a,d=T5e(e),l=d.modulus.byteLength();if(r.length>l||new FK(r).cmp(d.modulus)>=0)throw new Error("decryption error");a=n?B5e(new FK(r),d):k5e(r,d);var v=Pp.alloc(l-a.length);if(a=Pp.concat([v,a],l),h===4)return function(w,m){var y=w.modulus.byteLength(),g=I5e("sha1").update(Pp.alloc(0)).digest(),S=g.length;if(m[0]!==0)throw new Error("decryption error");var R=m.slice(1,S+1),A=m.slice(S+1),k=jK(R,qK(A,S)),I=jK(A,qK(k,y-S-1));if(function(P,C){P=Pp.from(P),C=Pp.from(C);var q=0,K=P.length;P.length!==C.length&&(q++,K=Math.min(P.length,C.length));for(var V=-1;++V<K;)q+=P[V]^C[V];return q}(g,I.slice(0,S)))throw new Error("decryption error");for(var B=S;I[B]===0;)B++;if(I[B++]!==1)throw new Error("decryption error");return I.slice(B)}(d,a);if(h===1)return function(w,m,y){for(var g=m.slice(0,2),S=2,R=0;m[S++]!==0;)if(S>=m.length){R++;break}var A=m.slice(2,S-1);if((g.toString("hex")!=="0002"&&!y||g.toString("hex")!=="0001"&&y)&&R++,A.length<8&&R++,R)throw new Error("decryption error");return m.slice(S)}(0,a,n);if(h===3)return a;throw new Error("unknown padding")},y0={};y0.publicEncrypt=x5e,y0.privateDecrypt=O5e,y0.privateEncrypt=function(e,r){return y0.publicEncrypt(e,r,!0)},y0.publicDecrypt=function(e,r){return y0.privateDecrypt(e,r,!0)};Hy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Vp={},$E=Br;RY=vi,HK=Rd,KK=RY.Buffer,xY=RY.kMaxLength,UE=Hy.crypto||Hy.msCrypto,TY=Math.pow(2,32)-1;UE&&UE.getRandomValues||!$E.browser?(Vp.randomFill=function(e,r,n,h){if(!(KK.isBuffer(e)||e instanceof Hy.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof r=="function")h=r,r=0,n=e.length;else if(typeof n=="function")h=n,n=e.length-r;else if(typeof h!="function")throw new TypeError('"cb" argument must be a function');return ZK(r,e.length),WK(n,r,e.length),GK(e,r,n,h)},Vp.randomFillSync=function(e,r,n){if(r===void 0&&(r=0),!(KK.isBuffer(e)||e instanceof Hy.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return ZK(r,e.length),n===void 0&&(n=e.length-r),WK(n,r,e.length),GK(e,r,n)}):(Vp.randomFill=zK,Vp.randomFillSync=zK);ni={};ni.randomBytes=ni.rng=ni.pseudoRandomBytes=ni.prng=Rd,ni.createHash=ni.Hash=d2,ni.createHmac=ni.Hmac=YV;P5e=XV,N5e=Object.keys(P5e),C5e=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(N5e);ni.getHashes=function(){return C5e};VK=Ly;ni.pbkdf2=VK.pbkdf2,ni.pbkdf2Sync=VK.pbkdf2Sync;Yf=df;ni.Cipher=Yf.Cipher,ni.createCipher=Yf.createCipher,ni.Cipheriv=Yf.Cipheriv,ni.createCipheriv=Yf.createCipheriv,ni.Decipher=Yf.Decipher,ni.createDecipher=Yf.createDecipher,ni.Decipheriv=Yf.Decipheriv,ni.createDecipheriv=Yf.createDecipheriv,ni.getCiphers=Yf.getCiphers,ni.listCiphers=Yf.listCiphers;Np=ld;ni.DiffieHellmanGroup=Np.DiffieHellmanGroup,ni.createDiffieHellmanGroup=Np.createDiffieHellmanGroup,ni.getDiffieHellman=Np.getDiffieHellman,ni.createDiffieHellman=Np.createDiffieHellman,ni.DiffieHellman=Np.DiffieHellman;ry=m5e;ni.createSign=ry.createSign,ni.Sign=ry.Sign,ni.createVerify=ry.createVerify,ni.Verify=ry.Verify,ni.createECDH=b5e;iy=y0;ni.publicEncrypt=iy.publicEncrypt,ni.privateEncrypt=iy.privateEncrypt,ni.publicDecrypt=iy.publicDecrypt,ni.privateDecrypt=iy.privateDecrypt;JK=Vp;ni.randomFill=JK.randomFill,ni.randomFillSync=JK.randomFillSync,ni.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
137
137
  `))},ni.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6};ny={},YK=!1,ay=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;cM={},XK=!1,QK=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;dM={},eZ=!1;L5e={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}},pM={},tZ=!1,yi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;l0={},rZ=!1;BY={},iZ=!1,vM={exports:BY},$e=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;mM={},nZ=!1;U5e={_args:[["elliptic@6.5.4","C:\\Users\\guybe\\Projects\\rollup-plugin-jspm"]],_from:"elliptic@6.5.4",_id:"elliptic@6.5.4",_inBundle:!1,_integrity:"sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",_location:"/@jspm/core/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@6.5.4",name:"elliptic",escapedName:"elliptic",rawSpec:"6.5.4",saveSpec:null,fetchSpec:"6.5.4"},_requiredBy:["/@jspm/core/browserify-sign","/@jspm/core/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",_spec:"6.5.4",_where:"C:\\Users\\guybe\\Projects\\rollup-plugin-jspm",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},description:"EC cryptography",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.5.4"},OY={},aZ=!1,gM={exports:OY},Ze=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;yM={},oZ=!1;bM={},sZ=!1;wM={},fZ=!1;_M={},uZ=!1;MM={},hZ=!1;SM={},lZ=!1;EM={},cZ=!1;Yi={},dZ=!1;AM={},pZ=!1;vZ={},mZ=!1;RM={},gZ=!1;xM={},yZ=!1;TM={},bZ=!1;kM={},wZ=!1;IM={},_Z=!1;BM={},MZ=!1;OM={},SZ=!1;PM={},EZ=!1;NM={},AZ=!1;CM={},RZ=!1;LM={},xZ=!1;DM={},TZ=!1;$M={},kZ=!1;LY={},IZ=!1,UM={exports:LY},We=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;qM={},BZ=!1;jM={},OZ=!1;oy={},PZ=!1;FM={},NZ=!1;Lh={},CZ=!1;zM={},LZ=!1;HM={},DZ=!1;KM={},$Z=!1;ZM={},UZ=!1;WM={},qZ=!1;GM={},jZ=!1;VM={},FZ=!1;JM={},zZ=!1;YM={},HZ=!1;XM={},KZ=!1;QM={},ZZ=!1;gs={},WZ=!1;swe={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"},eS={},GZ=!1;tS={},VZ=!1;zY={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"},Cp={},JZ=!1;rS={},YZ=!1;iS={},XZ=!1,En=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;HY={},QZ=!1,nS={exports:HY},Ge=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;aS={},eW=!1,Gn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;oS={},tW=!1;sS={},rW=!1;WY={},iW=!1,fS={exports:WY},Ve=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;uS={},nW=!1;hS={},aW=!1;lS={},oW=!1;Dh={},sW=!1;sd={},fW=!1,sy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;ti={},uW=!1;ai=ywe();ai.Cipher;ai.Cipheriv;ai.Decipher;ai.Decipheriv;ai.DiffieHellman;ai.DiffieHellmanGroup;ai.Hash;ai.Hmac;ai.Sign;ai.Verify;ai.constants;ai.createCipher;ai.createCipheriv;ai.createCredentials;ai.createDecipher;ai.createDecipheriv;ai.createDiffieHellman;ai.createDiffieHellmanGroup;ai.createECDH;ai.createHash;ai.createHmac;ai.createSign;ai.createVerify;ai.getCiphers;ai.getDiffieHellman;ai.getHashes;ai.listCiphers;ai.pbkdf2;ai.pbkdf2Sync;ai.privateDecrypt;ai.privateEncrypt;ai.prng;ai.pseudoRandomBytes;ai.publicDecrypt;ai.publicEncrypt;ai.randomBytes;ai.randomFill;ai.randomFillSync;ai.rng;fy={},hW=!1,uy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;cS={},lW=!1,cW=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;dS={},dW=!1;bwe={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}},pS={},pW=!1,bi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;c0={},vW=!1;Lp={},mW=!1;YY={},gW=!1,vS={exports:YY},Ue=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;mS={},yW=!1;Mwe={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}},XY={},bW=!1,gS={exports:XY},Je=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;yS={},wW=!1;bS={},_W=!1;wS={},MW=!1;_S={},SW=!1;MS={},EW=!1;SS={},AW=!1;ES={},RW=!1;Xi={},xW=!1;AS={},TW=!1;kW={},IW=!1;RS={},BW=!1;xS={},OW=!1;TS={},PW=!1;kS={},NW=!1;IS={},CW=!1;BS={},LW=!1;OS={},DW=!1;PS={},$W=!1;NS={},UW=!1;CS={},qW=!1;LS={},jW=!1;DS={},FW=!1;$S={},zW=!1;rX={},HW=!1,US={exports:rX},Ye=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;qS={},KW=!1;jS={},ZW=!1;hy={},WW=!1;FS={},GW=!1;$h={},VW=!1;zS={},JW=!1;HS={},YW=!1;KS={},XW=!1;ZS={},QW=!1;WS={},eG=!1;GS={},tG=!1;VS={},rG=!1;JS={},iG=!1;YS={},nG=!1;XS={},aG=!1;QS={},oG=!1;ys={},sG=!1;Hwe={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"},eE={},fG=!1;tE={},uG=!1;uX={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"},Dp={},hG=!1;rE={},lG=!1;iE={},cG=!1,An=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;hX={},dG=!1,nE={exports:hX},Xe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;aE={},pG=!1,Vn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;oE={},vG=!1;sE={},mG=!1;dX={},gG=!1,fE={exports:dX},Qe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;uE={},yG=!1;hE={},bG=!1;lE={},wG=!1;Uh={},_G=!1;fd={},MG=!1,ly=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;ri={},SG=!1;wr=t7e();wr.randomBytes;wr.rng;wr.pseudoRandomBytes;wr.prng;wr.createHash;wr.Hash;wr.createHmac;wr.Hmac;wr.getHashes;wr.pbkdf2;wr.pbkdf2Sync;wr.Cipher;wr.createCipher;wr.Cipheriv;wr.createCipheriv;wr.Decipher;wr.createDecipher;wr.Decipheriv;wr.createDecipheriv;wr.getCiphers;wr.listCiphers;wr.DiffieHellmanGroup;wr.createDiffieHellmanGroup;wr.getDiffieHellman;wr.createDiffieHellman;wr.DiffieHellman;wr.createSign;wr.Sign;wr.createVerify;wr.Verify;wr.createECDH;wr.publicEncrypt;wr.privateEncrypt;wr.publicDecrypt;wr.privateDecrypt;wr.randomFill;wr.randomFillSync;wr.createCredentials;wr.constants;wr.webcrypto=globalThis.crypto;r7e=wr.Cipher,i7e=wr.Cipheriv,n7e=wr.Decipher,a7e=wr.Decipheriv,o7e=wr.DiffieHellman,s7e=wr.DiffieHellmanGroup,f7e=wr.Hash,u7e=wr.Hmac,h7e=wr.Sign,l7e=wr.Verify,c7e=wr.constants,d7e=wr.createCipher,p7e=wr.createCipheriv,v7e=wr.createCredentials,m7e=wr.createDecipher,g7e=wr.createDecipheriv,y7e=wr.createDiffieHellman,b7e=wr.createDiffieHellmanGroup,w7e=wr.createECDH,_7e=wr.createHash,M7e=wr.createHmac,S7e=wr.createSign,E7e=wr.createVerify,A7e=wr.getCiphers,R7e=wr.getDiffieHellman,x7e=wr.getHashes,T7e=wr.listCiphers,k7e=wr.pbkdf2,I7e=wr.pbkdf2Sync,B7e=wr.privateDecrypt,O7e=wr.privateEncrypt,P7e=wr.prng,N7e=wr.pseudoRandomBytes,C7e=wr.publicDecrypt,L7e=wr.publicEncrypt,D7e=wr.randomBytes,$7e=wr.randomFill,U7e=wr.randomFillSync,q7e=wr.rng,j7e=wr.webcrypto});var yX=Ht(Yu=>{"use strict";Be();Pe();Oe();var F7e=Yu&&Yu.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),z7e=Yu&&Yu.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),H7e=Yu&&Yu.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&F7e(r,e,n);return z7e(r,e),r};Object.defineProperty(Yu,"__esModule",{value:!0});var gX=cj(),xs=H7e((mX(),Ri(vX))),DA=class{keyLength=4096;publicExponent=65537;hashAlgorithm="sha256";encryptionAlgorithm="aes-256-cbc";generateJWK(){if(typeof xs.generateKeyPair!="function")throw new Error("Keypair generation not supported in this version of Node, only supported in versions 10+");return new Promise((r,n)=>{xs.generateKeyPair("rsa",{modulusLength:this.keyLength,publicExponent:this.publicExponent,privateKeyEncoding:{type:"pkcs1",format:"pem"},publicKeyEncoding:{type:"pkcs1",format:"pem"}},(h,a,d)=>{h&&n(h),r(this.pemToJWK(d))})})}sign(r,n,{saltLength:h}={}){return new Promise((a,d)=>{a(xs.createSign(this.hashAlgorithm).update(n).sign({key:this.jwkToPem(r),padding:xs.constants.RSA_PKCS1_PSS_PADDING,saltLength:h}))})}verify(r,n,h){return new Promise((a,d)=>{let l={kty:"RSA",e:"AQAB",n:r},v=this.jwkToPem(l);a(xs.createVerify(this.hashAlgorithm).update(n).verify({key:v,padding:xs.constants.RSA_PKCS1_PSS_PADDING},h))})}hash(r,n="SHA-256"){if(typeof r=="string")throw new TypeError("Data must be a Uint8Array");return new Promise((h,a)=>{h(xs.createHash(this.parseHashAlgorithm(n)).update(r).digest())})}async encrypt(r,n,h){let a=xs.pbkdf2Sync(n,h=h||"salt",1e5,32,this.hashAlgorithm),d=xs.randomBytes(16),l=xs.createCipheriv(this.encryptionAlgorithm,a,d);return St.concat([d,l.update(r),l.final()])}async decrypt(r,n,h){try{let a=xs.pbkdf2Sync(n,h=h||"salt",1e5,32,this.hashAlgorithm),d=r.slice(0,16),l=r.slice(16),v=xs.createDecipheriv(this.encryptionAlgorithm,a,d);return St.concat([v.update(l),v.final()])}catch{throw new Error("Failed to decrypt")}}jwkToPem(r){return(0,gX.jwkTopem)(r)}pemToJWK(r){return(0,gX.pemTojwk)(r)}parseHashAlgorithm(r){switch(r){case"SHA-256":return"sha256";case"SHA-384":return"sha384";default:throw new Error(`Algorithm not supported: ${r}`)}}};Yu.default=DA});var bX=Ht(UA=>{"use strict";Be();Pe();Oe();Object.defineProperty(UA,"__esModule",{value:!0});var $A=class{api;constructor(r){this.api=r}getInfo(){return this.api.get("info").then(r=>r.data)}getPeers(){return this.api.get("peers").then(r=>r.data)}};UA.default=$A});var g2=Ht(m2=>{"use strict";Be();Pe();Oe();Object.defineProperty(m2,"__esModule",{value:!0});m2.getError=void 0;var qA=class extends Error{type;response;constructor(r,n={}){n.message?super(n.message):super(),this.type=r,this.response=n.response}getType(){return this.type}};m2.default=qA;function K7e(e){let r=e.data;if(typeof e.data=="string")try{r=JSON.parse(e.data)}catch{}if(e.data instanceof ArrayBuffer||e.data instanceof Uint8Array)try{r=JSON.parse(r.toString())}catch{}return r?r.error||r:e.statusText||"unknown"}m2.getError=K7e});var MX=Ht(db=>{"use strict";Be();Pe();Oe();db.byteLength=W7e;db.toByteArray=V7e;db.fromByteArray=X7e;var uu=[],Ts=[],Z7e=typeof Uint8Array<"u"?Uint8Array:Array,jA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(O0=0,wX=jA.length;O0<wX;++O0)uu[O0]=jA[O0],Ts[jA.charCodeAt(O0)]=O0;var O0,wX;Ts[45]=62;Ts[95]=63;function _X(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=r);var h=n===r?0:4-n%4;return[n,h]}function W7e(e){var r=_X(e),n=r[0],h=r[1];return(n+h)*3/4-h}function G7e(e,r,n){return(r+n)*3/4-n}function V7e(e){var r,n=_X(e),h=n[0],a=n[1],d=new Z7e(G7e(e,h,a)),l=0,v=a>0?h-4:h,w;for(w=0;w<v;w+=4)r=Ts[e.charCodeAt(w)]<<18|Ts[e.charCodeAt(w+1)]<<12|Ts[e.charCodeAt(w+2)]<<6|Ts[e.charCodeAt(w+3)],d[l++]=r>>16&255,d[l++]=r>>8&255,d[l++]=r&255;return a===2&&(r=Ts[e.charCodeAt(w)]<<2|Ts[e.charCodeAt(w+1)]>>4,d[l++]=r&255),a===1&&(r=Ts[e.charCodeAt(w)]<<10|Ts[e.charCodeAt(w+1)]<<4|Ts[e.charCodeAt(w+2)]>>2,d[l++]=r>>8&255,d[l++]=r&255),d}function J7e(e){return uu[e>>18&63]+uu[e>>12&63]+uu[e>>6&63]+uu[e&63]}function Y7e(e,r,n){for(var h,a=[],d=r;d<n;d+=3)h=(e[d]<<16&16711680)+(e[d+1]<<8&65280)+(e[d+2]&255),a.push(J7e(h));return a.join("")}function X7e(e){for(var r,n=e.length,h=n%3,a=[],d=16383,l=0,v=n-h;l<v;l+=d)a.push(Y7e(e,l,l+d>v?v:l+d));return h===1?(r=e[n-1],a.push(uu[r>>2]+uu[r<<4&63]+"==")):h===2&&(r=(e[n-2]<<8)+e[n-1],a.push(uu[r>>10]+uu[r>>4&63]+uu[r<<2&63]+"=")),a.join("")}});var Xu=Ht(Qi=>{"use strict";Be();Pe();Oe();var Q7e=Qi&&Qi.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),e9e=Qi&&Qi.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),t9e=Qi&&Qi.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Q7e(r,e,n);return e9e(r,e),r};Object.defineProperty(Qi,"__esModule",{value:!0});Qi.b64UrlDecode=Qi.b64UrlEncode=Qi.bufferTob64Url=Qi.bufferTob64=Qi.b64UrlToBuffer=Qi.stringToB64Url=Qi.stringToBuffer=Qi.bufferToString=Qi.b64UrlToString=Qi.concatBuffers=void 0;var SX=t9e(MX());function r9e(e){let r=0;for(let a=0;a<e.length;a++)r+=e[a].byteLength;let n=new Uint8Array(r),h=0;n.set(new Uint8Array(e[0]),h),h+=e[0].byteLength;for(let a=1;a<e.length;a++)n.set(new Uint8Array(e[a]),h),h+=e[a].byteLength;return n}Qi.concatBuffers=r9e;function i9e(e){let r=RX(e);return EX(r)}Qi.b64UrlToString=i9e;function EX(e){return new TextDecoder("utf-8",{fatal:!0}).decode(e)}Qi.bufferToString=EX;function AX(e){return new TextEncoder().encode(e)}Qi.stringToBuffer=AX;function n9e(e){return TX(AX(e))}Qi.stringToB64Url=n9e;function RX(e){return new Uint8Array(SX.toByteArray(IX(e)))}Qi.b64UrlToBuffer=RX;function xX(e){return SX.fromByteArray(new Uint8Array(e))}Qi.bufferTob64=xX;function TX(e){return kX(xX(e))}Qi.bufferTob64Url=TX;function kX(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}Qi.b64UrlEncode=kX;function IX(e){e=e.replace(/\-/g,"+").replace(/\_/g,"/");let r;return e.length%4==0?r=0:r=4-e.length%4,e.concat("=".repeat(r))}Qi.b64UrlDecode=IX});var PX=Ht(y2=>{"use strict";Be();Pe();Oe();var a9e=y2&&y2.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(y2,"__esModule",{value:!0});var Po=a9e(pb());async function BX(e){if(Array.isArray(e)){let h=Po.default.utils.concatBuffers([Po.default.utils.stringToBuffer("list"),Po.default.utils.stringToBuffer(e.length.toString())]);return await OX(e,await Po.default.crypto.hash(h,"SHA-384"))}let r=Po.default.utils.concatBuffers([Po.default.utils.stringToBuffer("blob"),Po.default.utils.stringToBuffer(e.byteLength.toString())]),n=Po.default.utils.concatBuffers([await Po.default.crypto.hash(r,"SHA-384"),await Po.default.crypto.hash(e,"SHA-384")]);return await Po.default.crypto.hash(n,"SHA-384")}y2.default=BX;async function OX(e,r){if(e.length<1)return r;let n=Po.default.utils.concatBuffers([r,await BX(e[0])]),h=await Po.default.crypto.hash(n,"SHA-384");return await OX(e.slice(1),h)}});var WA=Ht(oi=>{"use strict";Be();Pe();Oe();var o9e=oi&&oi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oi,"__esModule",{value:!0});oi.debug=oi.validatePath=oi.arrayCompare=oi.bufferToInt=oi.intToBuffer=oi.arrayFlatten=oi.generateProofs=oi.buildLayers=oi.generateTransactionChunks=oi.generateTree=oi.computeRootHash=oi.generateLeaves=oi.chunkData=oi.MIN_CHUNK_SIZE=oi.MAX_CHUNK_SIZE=void 0;var vb=o9e(pb()),NX=Xu();oi.MAX_CHUNK_SIZE=256*1024;oi.MIN_CHUNK_SIZE=32*1024;var w2=32,Id=32;async function zA(e){let r=[],n=e,h=0;for(;n.byteLength>=oi.MAX_CHUNK_SIZE;){let a=oi.MAX_CHUNK_SIZE,d=n.byteLength-oi.MAX_CHUNK_SIZE;d>0&&d<oi.MIN_CHUNK_SIZE&&(a=Math.ceil(n.byteLength/2));let l=n.slice(0,a),v=await vb.default.crypto.hash(l);h+=l.byteLength,r.push({dataHash:v,minByteRange:h-l.byteLength,maxByteRange:h}),n=n.slice(a)}return r.push({dataHash:await vb.default.crypto.hash(n),minByteRange:h,maxByteRange:h+n.byteLength}),r}oi.chunkData=zA;async function HA(e){return Promise.all(e.map(async({dataHash:r,minByteRange:n,maxByteRange:h})=>({type:"leaf",id:await da(await Promise.all([da(r),da(_2(h))])),dataHash:r,minByteRange:n,maxByteRange:h})))}oi.generateLeaves=HA;async function s9e(e){return(await CX(e)).id}oi.computeRootHash=s9e;async function CX(e){return await mb(await HA(await zA(e)))}oi.generateTree=CX;async function f9e(e){let r=await zA(e),n=await HA(r),h=await mb(n),a=await LX(h),d=r.slice(-1)[0];return d.maxByteRange-d.minByteRange===0&&(r.splice(r.length-1,1),a.splice(a.length-1,1)),{data_root:h.id,chunks:r,proofs:a}}oi.generateTransactionChunks=f9e;async function mb(e,r=0){if(e.length<2)return e[0];let n=[];for(let h=0;h<e.length;h+=2)n.push(await u9e(e[h],e[h+1]));return mb(n,r+1)}oi.buildLayers=mb;function LX(e){let r=FA(e);return Array.isArray(r)?KA(r):[r]}oi.generateProofs=LX;function FA(e,r=new Uint8Array,n=0){if(e.type=="leaf")return{offset:e.maxByteRange-1,proof:(0,NX.concatBuffers)([r,e.dataHash,_2(e.maxByteRange)])};if(e.type=="branch"){let h=(0,NX.concatBuffers)([r,e.leftChild.id,e.rightChild.id,_2(e.byteRange)]);return[FA(e.leftChild,h,n+1),FA(e.rightChild,h,n+1)]}throw new Error("Unexpected node type")}function KA(e){let r=[];return e.forEach(n=>{Array.isArray(n)?r.push(...KA(n)):r.push(n)}),r}oi.arrayFlatten=KA;async function u9e(e,r){return r?{type:"branch",id:await da([await da(e.id),await da(r.id),await da(_2(e.maxByteRange))]),byteRange:e.maxByteRange,maxByteRange:r.maxByteRange,leftChild:e,rightChild:r}:e}async function da(e){return Array.isArray(e)&&(e=vb.default.utils.concatBuffers(e)),new Uint8Array(await vb.default.crypto.hash(e))}function _2(e){let r=new Uint8Array(w2);for(var n=r.length-1;n>=0;n--){var h=e%256;r[n]=h,e=(e-h)/256}return r}oi.intToBuffer=_2;function ZA(e){let r=0;for(var n=0;n<e.length;n++)r*=256,r+=e[n];return r}oi.bufferToInt=ZA;var h9e=(e,r)=>e.every((n,h)=>r[h]===n);oi.arrayCompare=h9e;async function b2(e,r,n,h,a){if(h<=0)return!1;if(r>=h)return b2(e,0,h-1,h,a);if(r<0)return b2(e,0,0,h,a);if(a.length==Id+w2){let g=a.slice(0,Id),S=a.slice(g.length,g.length+w2),R=await da([await da(g),await da(S)]);return(0,oi.arrayCompare)(e,R)?{offset:h-1,leftBound:n,rightBound:h,chunkSize:h-n}:!1}let d=a.slice(0,Id),l=a.slice(d.length,d.length+Id),v=a.slice(d.length+l.length,d.length+l.length+w2),w=ZA(v),m=a.slice(d.length+l.length+v.length),y=await da([await da(d),await da(l),await da(v)]);return(0,oi.arrayCompare)(e,y)?r<w?await b2(d,r,n,Math.min(h,w),m):await b2(l,r,Math.max(n,w),h,m):!1}oi.validatePath=b2;async function DX(e,r=""){if(e.byteLength<1)return r;let n=e.slice(0,Id),h=e.slice(n.length,n.length+Id),a=e.slice(n.length+h.length,n.length+h.length+w2),d=ZA(a),l=e.slice(n.length+h.length+a.length),v=await da([await da(n),await da(h),await da(a)]),w=`${r}
138
- ${JSON.stringify(St.from(n))},${JSON.stringify(St.from(h))},${d} => ${JSON.stringify(v)}`;return DX(l,w)}oi.debug=DX});var yb=Ht(No=>{"use strict";Be();Pe();Oe();var l9e=No&&No.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),c9e=No&&No.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),d9e=No&&No.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&l9e(r,e,n);return c9e(r,e),r},p9e=No&&No.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(No,"__esModule",{value:!0});No.Tag=void 0;var Xn=d9e(Xu()),v9e=p9e(PX()),m9e=WA(),gb=class{get(r,n){if(!Object.getOwnPropertyNames(this).includes(r))throw new Error(`Field "${r}" is not a property of the Arweave Transaction class.`);if(this[r]instanceof Uint8Array)return n&&n.decode&&n.string?Xn.bufferToString(this[r]):n&&n.decode&&!n.string?this[r]:Xn.bufferTob64Url(this[r]);if(this[r]instanceof Array){if(n?.decode!==void 0||n?.string!==void 0)throw r==="tags"&&console.warn(`Did you mean to use 'transaction["tags"]' ?`),new Error("Cannot decode or stringify an array.");return this[r]}return n&&n.decode==!0?n&&n.string?Xn.b64UrlToString(this[r]):Xn.b64UrlToBuffer(this[r]):this[r]}},M2=class extends gb{name;value;constructor(r,n,h=!1){super(),this.name=r,this.value=n}};No.Tag=M2;var GA=class extends gb{format=2;id="";last_tx="";owner="";tags=[];target="";quantity="0";data_size="0";data=new Uint8Array;data_root="";reward="0";signature="";chunks;constructor(r={}){super(),Object.assign(this,r),typeof this.data=="string"&&(this.data=Xn.b64UrlToBuffer(this.data)),r.tags&&(this.tags=r.tags.map(n=>new M2(n.name,n.value)))}addTag(r,n){this.tags.push(new M2(Xn.stringToB64Url(r),Xn.stringToB64Url(n)))}toJSON(){return{format:this.format,id:this.id,last_tx:this.last_tx,owner:this.owner,tags:this.tags,target:this.target,quantity:this.quantity,data:Xn.bufferTob64Url(this.data),data_size:this.data_size,data_root:this.data_root,data_tree:this.data_tree,reward:this.reward,signature:this.signature}}setOwner(r){this.owner=r}setSignature({id:r,owner:n,reward:h,tags:a,signature:d}){this.id=r,this.owner=n,h&&(this.reward=h),a&&(this.tags=a),this.signature=d}async prepareChunks(r){!this.chunks&&r.byteLength>0&&(this.chunks=await(0,m9e.generateTransactionChunks)(r),this.data_root=Xn.bufferTob64Url(this.chunks.data_root)),!this.chunks&&r.byteLength===0&&(this.chunks={chunks:[],data_root:new Uint8Array,proofs:[]},this.data_root="")}getChunk(r,n){if(!this.chunks)throw new Error("Chunks have not been prepared");let h=this.chunks.proofs[r],a=this.chunks.chunks[r];return{data_root:this.data_root,data_size:this.data_size,data_path:Xn.bufferTob64Url(h.proof),offset:h.offset.toString(),chunk:Xn.bufferTob64Url(n.slice(a.minByteRange,a.maxByteRange))}}async getSignatureData(){switch(this.format){case 1:let r=this.tags.reduce((h,a)=>Xn.concatBuffers([h,a.get("name",{decode:!0,string:!1}),a.get("value",{decode:!0,string:!1})]),new Uint8Array);return Xn.concatBuffers([this.get("owner",{decode:!0,string:!1}),this.get("target",{decode:!0,string:!1}),this.get("data",{decode:!0,string:!1}),Xn.stringToBuffer(this.quantity),Xn.stringToBuffer(this.reward),this.get("last_tx",{decode:!0,string:!1}),r]);case 2:this.data_root||await this.prepareChunks(this.data);let n=this.tags.map(h=>[h.get("name",{decode:!0,string:!1}),h.get("value",{decode:!0,string:!1})]);return await(0,v9e.default)([Xn.stringToBuffer(this.format.toString()),this.get("owner",{decode:!0,string:!1}),this.get("target",{decode:!0,string:!1}),Xn.stringToBuffer(this.quantity),Xn.stringToBuffer(this.reward),this.get("last_tx",{decode:!0,string:!1}),n,Xn.stringToBuffer(this.data_size),this.get("data_root",{decode:!0,string:!1})]);default:throw new Error(`Unexpected transaction format: ${this.format}`)}}};No.default=GA});var jX=Ht(ks=>{"use strict";Be();Pe();Oe();var g9e=ks&&ks.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),y9e=ks&&ks.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),b9e=ks&&ks.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&g9e(r,e,n);return y9e(r,e),r},w9e=ks&&ks.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ks,"__esModule",{value:!0});ks.TransactionUploader=void 0;var $X=w9e(yb()),_9e=b9e(Xu()),VA=g2(),M9e=WA(),UX=1,S9e=["invalid_json","chunk_too_big","data_path_too_big","offset_too_big","data_size_too_big","chunk_proof_ratio_not_attractive","invalid_proof"],qX=1e3*40,JA=class e{api;chunkIndex=0;txPosted=!1;transaction;lastRequestTimeEnd=0;totalErrors=0;data;lastResponseStatus=0;lastResponseError="";get isComplete(){return this.txPosted&&this.chunkIndex===this.transaction.chunks.chunks.length}get totalChunks(){return this.transaction.chunks.chunks.length}get uploadedChunks(){return this.chunkIndex}get pctComplete(){return Math.trunc(this.uploadedChunks/this.totalChunks*100)}constructor(r,n){if(this.api=r,!n.id)throw new Error("Transaction is not signed");if(!n.chunks)throw new Error("Transaction chunks not prepared");this.data=n.data,this.transaction=new $X.default(Object.assign({},n,{data:new Uint8Array(0)}))}async uploadChunk(r){if(this.isComplete)throw new Error("Upload is already complete");if(this.lastResponseError!==""?this.totalErrors++:this.totalErrors=0,this.totalErrors===100)throw new Error(`Unable to complete upload: ${this.lastResponseStatus}: ${this.lastResponseError}`);let n=this.lastResponseError===""?0:Math.max(this.lastRequestTimeEnd+qX-Date.now(),qX);if(n>0&&(n=n-n*Math.random()*.3,await new Promise(l=>setTimeout(l,n))),this.lastResponseError="",!this.txPosted){await this.postTransaction();return}r&&(this.chunkIndex=r);let h=this.transaction.getChunk(r||this.chunkIndex,this.data);if(!await(0,M9e.validatePath)(this.transaction.chunks.data_root,parseInt(h.offset),0,parseInt(h.data_size),_9e.b64UrlToBuffer(h.data_path)))throw new Error(`Unable to validate chunk ${this.chunkIndex}`);let d=await this.api.post("chunk",this.transaction.getChunk(this.chunkIndex,this.data)).catch(l=>(console.error(l.message),{status:-1,data:{error:l.message}}));if(this.lastRequestTimeEnd=Date.now(),this.lastResponseStatus=d.status,this.lastResponseStatus==200)this.chunkIndex++;else if(this.lastResponseError=(0,VA.getError)(d),S9e.includes(this.lastResponseError))throw new Error(`Fatal error uploading chunk ${this.chunkIndex}: ${this.lastResponseError}`)}static async fromSerialized(r,n,h){if(!n||typeof n.chunkIndex!="number"||typeof n.transaction!="object")throw new Error("Serialized object does not match expected format.");var a=new $X.default(n.transaction);a.chunks||await a.prepareChunks(h);let d=new e(r,a);if(d.chunkIndex=n.chunkIndex,d.lastRequestTimeEnd=n.lastRequestTimeEnd,d.lastResponseError=n.lastResponseError,d.lastResponseStatus=n.lastResponseStatus,d.txPosted=n.txPosted,d.data=h,d.transaction.data_root!==n.transaction.data_root)throw new Error("Data mismatch: Uploader doesn't match provided data.");return d}static async fromTransactionId(r,n){let h=await r.get(`tx/${n}`);if(h.status!==200)throw new Error(`Tx ${n} not found: ${h.status}`);let a=h.data;return a.data=new Uint8Array(0),{txPosted:!0,chunkIndex:0,lastResponseError:"",lastRequestTimeEnd:0,lastResponseStatus:0,transaction:a}}toJSON(){return{chunkIndex:this.chunkIndex,transaction:this.transaction,lastRequestTimeEnd:this.lastRequestTimeEnd,lastResponseStatus:this.lastResponseStatus,lastResponseError:this.lastResponseError,txPosted:this.txPosted}}async postTransaction(){if(this.totalChunks<=UX){this.transaction.data=this.data;let h=await this.api.post("tx",this.transaction).catch(a=>(console.error(a),{status:-1,data:{error:a.message}}));if(this.lastRequestTimeEnd=Date.now(),this.lastResponseStatus=h.status,this.transaction.data=new Uint8Array(0),h.status>=200&&h.status<300){this.txPosted=!0,this.chunkIndex=UX;return}throw this.lastResponseError=(0,VA.getError)(h),new Error(`Unable to upload transaction: ${h.status}, ${this.lastResponseError}`)}let n=await this.api.post("tx",this.transaction);if(this.lastRequestTimeEnd=Date.now(),this.lastResponseStatus=n.status,!(n.status>=200&&n.status<300))throw this.lastResponseError=(0,VA.getError)(n),new Error(`Unable to upload transaction: ${n.status}, ${this.lastResponseError}`);this.txPosted=!0}};ks.TransactionUploader=JA});var bb=Ht((oKe,FX)=>{"use strict";Be();Pe();Oe();FX.exports={}});var HX=Ht(Sf=>{"use strict";Be();Pe();Oe();var E9e=Sf&&Sf.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),A9e=Sf&&Sf.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),R9e=Sf&&Sf.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&E9e(r,e,n);return A9e(r,e),r},zX=Sf&&Sf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sf,"__esModule",{value:!0});var YA=zX(g2()),Qu=zX(yb()),S2=R9e(Xu()),XA=jX();bb();var QA=class{api;crypto;chunks;constructor(r,n,h){this.api=r,this.crypto=n,this.chunks=h}async getTransactionAnchor(){let r=await this.api.get("tx_anchor");if(!r.data.match(/^[a-z0-9_-]{43,}/i)||!r.ok)throw new Error(`Could not getTransactionAnchor. Received: ${r.data}. Status: ${r.status}, ${r.statusText}`);return r.data}async getPrice(r,n){let h=n?`price/${r}/${n}`:`price/${r}`,a=await this.api.get(h);if(!/^\d+$/.test(a.data)||!a.ok)throw new Error(`Could not getPrice. Received: ${a.data}. Status: ${a.status}, ${a.statusText}`);return a.data}async get(r){let n=await this.api.get(`tx/${r}`);if(n.status==200){let h=parseInt(n.data.data_size);if(n.data.format>=2&&h>0&&h<=1024*1024*12){let a=await this.getData(r);return new Qu.default({...n.data,data:a})}return new Qu.default({...n.data,format:n.data.format||1})}throw n.status==404?new YA.default("TX_NOT_FOUND"):n.status==410?new YA.default("TX_FAILED"):new YA.default("TX_INVALID")}fromRaw(r){return new Qu.default(r)}async search(r,n){return this.api.post("arql",{op:"equals",expr1:r,expr2:n}).then(h=>h.data?h.data:[])}getStatus(r){return this.api.get(`tx/${r}/status`).then(n=>n.status==200?{status:200,confirmed:n.data}:{status:n.status,confirmed:null})}async getData(r,n){let h;try{h=await this.chunks.downloadChunkedData(r)}catch(a){console.error(`Error while trying to download chunked data for ${r}`),console.error(a)}if(!h){console.warn(`Falling back to gateway cache for ${r}`);try{let{data:a,ok:d,status:l,statusText:v}=await this.api.get(`/${r}`,{responseType:"arraybuffer"});if(!d)throw new Error("Bad http status code",{cause:{status:l,statusText:v}});h=a}catch(a){console.error(`Error while trying to download contiguous data from gateway cache for ${r}`),console.error(a)}}if(!h)throw new Error(`${r} data was not found!`);return n&&n.decode&&!n.string?h:n&&n.decode&&n.string?S2.bufferToString(h):S2.bufferTob64Url(h)}async sign(r,n,h){let d=typeof n=="object"&&(v=>{let w=!0;return["n","e","d","p","q","dp","dq","qi"].map(m=>!(m in v)&&(w=!1)),w})(n),l=typeof arweaveWallet=="object";if(!d&&!l)throw new Error("No valid JWK or external wallet found to sign transaction.");if(d){r.setOwner(n.n);let v=await r.getSignatureData(),w=await this.crypto.sign(n,v,h),m=await this.crypto.hash(w);r.setSignature({id:S2.bufferTob64Url(m),owner:n.n,signature:S2.bufferTob64Url(w)})}else if(l){try{(await arweaveWallet.getPermissions()).includes("SIGN_TRANSACTION")||await arweaveWallet.connect(["SIGN_TRANSACTION"])}catch{}let v=await arweaveWallet.sign(r,h);r.setSignature({id:v.id,owner:v.owner,reward:v.reward,tags:v.tags,signature:v.signature})}else throw new Error("An error occurred while signing. Check wallet is valid")}async verify(r){let n=await r.getSignatureData(),h=r.get("signature",{decode:!0,string:!1}),a=S2.bufferTob64Url(await this.crypto.hash(h));if(r.id!==a)throw new Error("Invalid transaction signature or ID! The transaction ID doesn't match the expected SHA-256 hash of the signature.");return this.crypto.verify(r.owner,n,h)}async post(r){if(typeof r=="string"?r=new Qu.default(JSON.parse(r)):typeof r.readInt32BE=="function"?r=new Qu.default(JSON.parse(r.toString())):typeof r=="object"&&!(r instanceof Qu.default)&&(r=new Qu.default(r)),!(r instanceof Qu.default))throw new Error("Must be Transaction object");r.chunks||await r.prepareChunks(r.data);let n=await this.getUploader(r,r.data);try{for(;!n.isComplete;)await n.uploadChunk()}catch(h){if(n.lastResponseStatus>0)return{status:n.lastResponseStatus,statusText:n.lastResponseError,data:{error:n.lastResponseError}};throw h}return{status:200,statusText:"OK",data:{}}}async getUploader(r,n){let h;if(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),r instanceof Qu.default){if(n||(n=r.data),!(n instanceof Uint8Array))throw new Error("Data format is invalid");r.chunks||await r.prepareChunks(n),h=new XA.TransactionUploader(this.api,r),(!h.data||h.data.length===0)&&(h.data=n)}else{if(typeof r=="string"&&(r=await XA.TransactionUploader.fromTransactionId(this.api,r)),!n||!(n instanceof Uint8Array))throw new Error("Must provide data when resuming upload");h=await XA.TransactionUploader.fromSerialized(this.api,r,n)}return h}async*upload(r,n){let h=await this.getUploader(r,n);for(;!h.isComplete;)await h.uploadChunk(),yield h;return h}};Sf.default=QA});var ZX=Ht(eh=>{"use strict";Be();Pe();Oe();var x9e=eh&&eh.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),T9e=eh&&eh.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),k9e=eh&&eh.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&x9e(r,e,n);return T9e(r,e),r};Object.defineProperty(eh,"__esModule",{value:!0});var KX=k9e(Xu());bb();var eR=class{api;crypto;constructor(r,n){this.api=r,this.crypto=n}getBalance(r){return this.api.get(`wallet/${r}/balance`).then(n=>n.data)}getLastTransactionID(r){return this.api.get(`wallet/${r}/last_tx`).then(n=>n.data)}generate(){return this.crypto.generateJWK()}async jwkToAddress(r){return!r||r==="use_wallet"?this.getAddress():this.getAddress(r)}async getAddress(r){if(!r||r==="use_wallet"){try{await arweaveWallet.connect(["ACCESS_ADDRESS"])}catch{}return arweaveWallet.getActiveAddress()}else return this.ownerToAddress(r.n)}async ownerToAddress(r){return KX.bufferTob64Url(await this.crypto.hash(KX.b64UrlToBuffer(r)))}};eh.default=eR});var GX=Ht(Ef=>{"use strict";Be();Pe();Oe();var I9e=Ef&&Ef.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),B9e=Ef&&Ef.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),O9e=Ef&&Ef.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&I9e(r,e,n);return B9e(r,e),r};Object.defineProperty(Ef,"__esModule",{value:!0});Ef.SiloResource=void 0;var WX=O9e(Xu()),tR=class{api;crypto;transactions;constructor(r,n,h){this.api=r,this.crypto=n,this.transactions=h}async get(r){if(!r)throw new Error("No Silo URI specified");let n=await this.parseUri(r),h=await this.transactions.search("Silo-Name",n.getAccessKey());if(h.length==0)throw new Error(`No data could be found for the Silo URI: ${r}`);let a=await this.transactions.get(h[0]);if(!a)throw new Error(`No data could be found for the Silo URI: ${r}`);let d=a.get("data",{decode:!0,string:!1});return this.crypto.decrypt(d,n.getEncryptionKey())}async readTransactionData(r,n){if(!n)throw new Error("No Silo URI specified");let h=await this.parseUri(n),a=r.get("data",{decode:!0,string:!1});return this.crypto.decrypt(a,h.getEncryptionKey())}async parseUri(r){let n=r.match(/^([a-z0-9-_]+)\.([0-9]+)/i);if(!n)throw new Error("Invalid Silo name, must be a name in the format of [a-z0-9]+.[0-9]+, e.g. 'bubble.7'");let h=n[1],a=Math.pow(2,parseInt(n[2])),d=await this.hash(WX.stringToBuffer(h),a),l=WX.bufferTob64(d.slice(0,15)),v=await this.hash(d.slice(16,31),1);return new wb(r,l,v)}async hash(r,n){let h=await this.crypto.hash(r);for(let a=0;a<n-1;a++)h=await this.crypto.hash(h);return h}};Ef.default=tR;var wb=class{uri;accessKey;encryptionKey;constructor(r,n,h){this.uri=r,this.accessKey=n,this.encryptionKey=h}getUri(){return this.uri}getAccessKey(){return this.accessKey}getEncryptionKey(){return this.encryptionKey}};Ef.SiloResource=wb});var JX=Ht(th=>{"use strict";Be();Pe();Oe();var P9e=th&&th.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),N9e=th&&th.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),C9e=th&&th.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&P9e(r,e,n);return N9e(r,e),r};Object.defineProperty(th,"__esModule",{value:!0});var VX=g2(),L9e=C9e(Xu()),rR=class{api;constructor(r){this.api=r}async getTransactionOffset(r){let n=await this.api.get(`tx/${r}/offset`);if(n.status===200)return n.data;throw new Error(`Unable to get transaction offset: ${(0,VX.getError)(n)}`)}async getChunk(r){let n=await this.api.get(`chunk/${r}`);if(n.status===200)return n.data;throw new Error(`Unable to get chunk: ${(0,VX.getError)(n)}`)}async getChunkData(r){let n=await this.getChunk(r);return L9e.b64UrlToBuffer(n.chunk)}firstChunkOffset(r){return parseInt(r.offset)-parseInt(r.size)+1}async downloadChunkedData(r){let n=await this.getTransactionOffset(r),h=parseInt(n.size),d=parseInt(n.offset)-h+1,l=new Uint8Array(h),v=0;for(;v<h;){this.api.config.logging&&console.log(`[chunk] ${v}/${h}`);let w;try{w=await this.getChunkData(d+v)}catch{console.error(`[chunk] Failed to fetch chunk at offset ${d+v}`),console.error("[chunk] This could indicate that the chunk wasn't uploaded or hasn't yet seeded properly to a particular gateway/node")}if(w)l.set(w,v),v+=w.length;else throw new Error(`Couldn't complete data download at ${v}/${h}`)}return l}};th.default=rR});var XX=Ht(E2=>{"use strict";Be();Pe();Oe();var D9e=E2&&E2.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(E2,"__esModule",{value:!0});var YX=D9e(g2());bb();var iR=class e{api;network;static HASH_ENDPOINT="block/hash/";static HEIGHT_ENDPOINT="block/height/";constructor(r,n){this.api=r,this.network=n}async get(r){let n=await this.api.get(`${e.HASH_ENDPOINT}${r}`);if(n.status===200)return n.data;throw n.status===404?new YX.default("BLOCK_NOT_FOUND"):new Error(`Error while loading block data: ${n}`)}async getByHeight(r){let n=await this.api.get(`${e.HEIGHT_ENDPOINT}${r}`);if(n.status===200)return n.data;throw n.status===404?new YX.default("BLOCK_NOT_FOUND"):new Error(`Error while loading block data: ${n}`)}async getCurrent(){let{current:r}=await this.network.getInfo();return await this.get(r)}};E2.default=iR});var pb=Ht(Af=>{"use strict";Be();Pe();Oe();var $9e=Af&&Af.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),U9e=Af&&Af.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),q9e=Af&&Af.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&$9e(r,e,n);return U9e(r,e),r},hu=Af&&Af.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Af,"__esModule",{value:!0});var j9e=hu(Mq()),F9e=hu(Sq()),z9e=hu(yX()),H9e=hu(bX()),K9e=hu(HX()),Z9e=hu(ZX()),QX=hu(yb()),A2=q9e(Xu()),W9e=hu(GX()),G9e=hu(JX()),V9e=hu(XX()),nR=class e{api;wallets;transactions;network;blocks;ar;silo;chunks;static init;static crypto=new z9e.default;static utils=A2;constructor(r){this.api=new F9e.default(r),this.wallets=new Z9e.default(this.api,e.crypto),this.chunks=new G9e.default(this.api),this.transactions=new K9e.default(this.api,e.crypto,this.chunks),this.silo=new W9e.default(this.api,this.crypto,this.transactions),this.network=new H9e.default(this.api),this.blocks=new V9e.default(this.api,this.network),this.ar=new j9e.default}get crypto(){return e.crypto}get utils(){return e.utils}getConfig(){return{api:this.api.getConfig(),crypto:null}}async createTransaction(r,n){let h={};if(Object.assign(h,r),!r.data&&!(r.target&&r.quantity))throw new Error("A new Arweave transaction must have a 'data' value, or 'target' and 'quantity' values.");if(r.owner==null&&n&&n!=="use_wallet"&&(h.owner=n.n),r.last_tx==null&&(h.last_tx=await this.transactions.getTransactionAnchor()),typeof r.data=="string"&&(r.data=A2.stringToBuffer(r.data)),r.data instanceof ArrayBuffer&&(r.data=new Uint8Array(r.data)),r.data&&!(r.data instanceof Uint8Array))throw new Error("Expected data to be a string, Uint8Array or ArrayBuffer");if(r.reward==null){let d=r.data?r.data.byteLength:0;h.reward=await this.transactions.getPrice(d,h.target)}h.data_root="",h.data_size=r.data?r.data.byteLength.toString():"0",h.data=r.data||new Uint8Array(0);let a=new QX.default(h);return await a.getSignatureData(),a}async createSiloTransaction(r,n,h){let a={};if(Object.assign(a,r),!r.data)throw new Error("Silo transactions must have a 'data' value");if(!h)throw new Error("No Silo URI specified.");if(r.target||r.quantity)throw new Error("Silo transactions can only be used for storing data, sending AR to other wallets isn't supported.");if(r.owner==null){if(!n||!n.n)throw new Error("A new Arweave transaction must either have an 'owner' attribute, or you must provide the jwk parameter.");a.owner=n.n}r.last_tx==null&&(a.last_tx=await this.transactions.getTransactionAnchor());let d=await this.silo.parseUri(h);if(typeof r.data=="string"){let v=await this.crypto.encrypt(A2.stringToBuffer(r.data),d.getEncryptionKey());a.reward=await this.transactions.getPrice(v.byteLength),a.data=A2.bufferTob64Url(v)}if(r.data instanceof Uint8Array){let v=await this.crypto.encrypt(r.data,d.getEncryptionKey());a.reward=await this.transactions.getPrice(v.byteLength),a.data=A2.bufferTob64Url(v)}let l=new QX.default(a);return l.addTag("Silo-Name",d.getAccessKey()),l.addTag("Silo-Version","0.1.0"),l}arql(r){return this.api.post("/arql",r).then(n=>n.data||[])}};Af.default=nR});var tQ=Ht((oR,eQ)=>{"use strict";Be();Pe();Oe();var J9e=oR&&oR.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},aR=J9e(pb());aR.default.init=function(e={}){return new aR.default(e)};eQ.exports=aR.default});var xte=Ht((LQe,Rte)=>{"use strict";Be();Pe();Oe();var ATe=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);Rte.exports=e=>!ATe.has(e&&e.code)});var Lte=Ht((pet,Tx)=>{"use strict";Be();Pe();Oe();var LTe=Object.prototype.hasOwnProperty,Wa="~";function cv(){}Object.create&&(cv.prototype=Object.create(null),new cv().__proto__||(Wa=!1));function DTe(e,r,n){this.fn=e,this.context=r,this.once=n||!1}function Cte(e,r,n,h,a){if(typeof n!="function")throw new TypeError("The listener must be a function");var d=new DTe(n,h||e,a),l=Wa?Wa+r:r;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],d]:e._events[l].push(d):(e._events[l]=d,e._eventsCount++),e}function m3(e,r){--e._eventsCount===0?e._events=new cv:delete e._events[r]}function Ca(){this._events=new cv,this._eventsCount=0}Ca.prototype.eventNames=function(){var r=[],n,h;if(this._eventsCount===0)return r;for(h in n=this._events)LTe.call(n,h)&&r.push(Wa?h.slice(1):h);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n)):r};Ca.prototype.listeners=function(r){var n=Wa?Wa+r:r,h=this._events[n];if(!h)return[];if(h.fn)return[h.fn];for(var a=0,d=h.length,l=new Array(d);a<d;a++)l[a]=h[a].fn;return l};Ca.prototype.listenerCount=function(r){var n=Wa?Wa+r:r,h=this._events[n];return h?h.fn?1:h.length:0};Ca.prototype.emit=function(r,n,h,a,d,l){var v=Wa?Wa+r:r;if(!this._events[v])return!1;var w=this._events[v],m=arguments.length,y,g;if(w.fn){switch(w.once&&this.removeListener(r,w.fn,void 0,!0),m){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,n),!0;case 3:return w.fn.call(w.context,n,h),!0;case 4:return w.fn.call(w.context,n,h,a),!0;case 5:return w.fn.call(w.context,n,h,a,d),!0;case 6:return w.fn.call(w.context,n,h,a,d,l),!0}for(g=1,y=new Array(m-1);g<m;g++)y[g-1]=arguments[g];w.fn.apply(w.context,y)}else{var S=w.length,R;for(g=0;g<S;g++)switch(w[g].once&&this.removeListener(r,w[g].fn,void 0,!0),m){case 1:w[g].fn.call(w[g].context);break;case 2:w[g].fn.call(w[g].context,n);break;case 3:w[g].fn.call(w[g].context,n,h);break;case 4:w[g].fn.call(w[g].context,n,h,a);break;default:if(!y)for(R=1,y=new Array(m-1);R<m;R++)y[R-1]=arguments[R];w[g].fn.apply(w[g].context,y)}}return!0};Ca.prototype.on=function(r,n,h){return Cte(this,r,n,h,!1)};Ca.prototype.once=function(r,n,h){return Cte(this,r,n,h,!0)};Ca.prototype.removeListener=function(r,n,h,a){var d=Wa?Wa+r:r;if(!this._events[d])return this;if(!n)return m3(this,d),this;var l=this._events[d];if(l.fn)l.fn===n&&(!a||l.once)&&(!h||l.context===h)&&m3(this,d);else{for(var v=0,w=[],m=l.length;v<m;v++)(l[v].fn!==n||a&&!l[v].once||h&&l[v].context!==h)&&w.push(l[v]);w.length?this._events[d]=w.length===1?w[0]:w:m3(this,d)}return this};Ca.prototype.removeAllListeners=function(r){var n;return r?(n=Wa?Wa+r:r,this._events[n]&&m3(this,n)):(this._events=new cv,this._eventsCount=0),this};Ca.prototype.off=Ca.prototype.removeListener;Ca.prototype.addListener=Ca.prototype.on;Ca.prefixed=Wa;Ca.EventEmitter=Ca;typeof Tx<"u"&&(Tx.exports=Ca)});Be();Pe();Oe();var qte=hc(O8(),1);Be();Pe();Oe();Be();Pe();Oe();var die=["gateway","gateways","prescribedObservers","record","auction","balance","epoch","priceForInteraction"],pie=["delegateStake","decreaseDelegateStake","joinNetwork","increaseOperatorStake","decreaseOperatorStake","updateGatewaySettings","saveObservations","extendRecord","buyRecord","increaseUndernameCount","transfer"],oke=[...die,...pie],ske={GATEWAY:"gateway",GATEWAYS:"gateways",PRESCRIBED_OBSERVERS:"prescribedObservers",DELEGATE_STAKE:"delegateStake",DECREASE_DELEGATE_STAKE:"decreaseDelegateStake",JOIN_NETWORK:"joinNetwork",INCREASE_OPERATOR_STAKE:"increaseOperatorStake",DECREASE_OPERATOR_STAKE:"decreaseOperatorStake",UPDATE_GATEWAY_SETTINGS:"updateGatewaySettings",SAVE_OBSERVATIONS:"saveObservations",EXTEND_RECORD:"extendRecord",INCREASE_UNDERNAME_COUNT:"increaseUndernameCount",RECORD:"record",AUCTION:"auction",TRANSFER:"transfer",BALANCE:"balance",PRICE_FOR_INTERACTION:"priceForInteraction",EPOCH:"epoch",BUY_RECORD:"buyRecord"},vie=(n=>(n.IO="IO",n.MIO="mIO",n))(vie||{}),fke={TRANSFER:"transfer",SET_CONTROLLER:"setController",REMOVE_CONTROLLER:"removeController",SET_NAME:"setName",SET_TICKER:"setTicker",SET_RECORD:"setRecord",REMOVE_RECORD:"removeRecord",BALANCE:"balance",EVOLVE:"evolve"};Be();Pe();Oe();Be();Pe();Oe();Be();Pe();Oe();var nB=new RegExp("^[a-zA-Z0-9_-]{43}$"),mke=new RegExp("^(?:(?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{1,63}$"),gke=new RegExp("^[0-9]{12},[0-9]{13},[a-fA-F0-9]{64}$"),yke=gt.env.ARNS_REGISTRY_TX??"bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U",bke="_NctcA2sRy1-J4OmIQZbYFPM17piNcbdBPH2ncX2RL8",mie="GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6GcRGrHc",wke=mie,yl="agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA",P8=1e6,aB="cbn0KKrBZH7hdNkNokuXLtGryrWM--PjSTBqIzw9Kkk",N8="Flwio4Lr08g6s6uim6lEJNnVGD9ylvz0_aafvpiL8FI",oB="_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA";var C8=class e{constructor(r){this.positiveFiniteInteger=r;if(!Number.isFinite(this.positiveFiniteInteger)||!Number.isInteger(this.positiveFiniteInteger)||this.positiveFiniteInteger<0)throw new Error(`Number must be a non-negative integer value! ${r}`)}[Symbol.toPrimitive](r){return r==="string"&&this.toString(),this.positiveFiniteInteger}plus(r){return new e(this.positiveFiniteInteger+r.positiveFiniteInteger)}minus(r){return new e(this.positiveFiniteInteger-r.positiveFiniteInteger)}isGreaterThan(r){return this.positiveFiniteInteger>r.positiveFiniteInteger}isGreaterThanOrEqualTo(r){return this.positiveFiniteInteger>=r.positiveFiniteInteger}isLessThan(r){return this.positiveFiniteInteger<r.positiveFiniteInteger}isLessThanOrEqualTo(r){return this.positiveFiniteInteger<=r.positiveFiniteInteger}toString(){return`${this.positiveFiniteInteger}`}valueOf(){return this.positiveFiniteInteger}toJSON(){return this.positiveFiniteInteger}equals(r){return this.positiveFiniteInteger===r.positiveFiniteInteger}},L8=class{value;constructor(r){if(!Number.isFinite(r)||r<0)throw new Error("IOToken must be a non-negative finite number");this.value=+r.toFixed(6)}valueOf(){return this.value}toMIO(){return new D8(Math.floor(this.value*P8))}toString(){return`${this.value}`}},D8=class e extends C8{constructor(r){super(r)}multiply(r){let n=Math.floor(this.valueOf()*r.valueOf());return new e(n)}divide(r){if(r.valueOf()===0)throw new Error("Cannot divide by zero");let n=Math.floor(this.valueOf()/r.valueOf());return new e(n)}plus(r){let n=super.plus(r);return new e(n.valueOf())}minus(r){let n=super.minus(r);return new e(n.valueOf())}toIO(){return new L8(this.valueOf()/P8)}};Be();Pe();Oe();Be();Pe();Oe();var sB=e=>nB.test(e);function Bke(e){return e!==void 0&&!isNaN(parseInt(e.toString()))}function dc(e){return"process"in e}function pc(e){return"processId"in e&&typeof e.processId=="string"&&sB(e.processId)===!0}function Dke(e){return e.type==="lease"&&e.endTimestamp!==void 0}Be();Pe();Oe();Be();Pe();Oe();var zs=class extends Error{constructor(r){super(r),this.name=this.constructor.name}},fB=class extends zs{},uB=class extends zs{},hB=class extends zs{constructor(r,n){super(`Failed request: ${r}: ${n}`)}},lB=class extends zs{},mm=class extends zs{},cB=class extends zs{constructor(){super("Invalid signer. Please provide a valid signer to interact with the contract.")}},yh=class extends zs{constructor(){super("Invalid contract configuration")}},dB=class extends zs{constructor(){super("Invalid process configuration")}},pB=class extends zs{};Be();Pe();Oe();var rf=hc(bq(),1);Be();Pe();Oe();var Gc="2.1.0-alpha.1";var Du=class e{logger;silent=!1;static default=new e;constructor({level:r="info"}={}){r==="none"&&(this.silent=!0),typeof window<"u"?this.logger=console:this.logger=(0,rf.createLogger)({level:r,silent:this.silent,defaultMeta:{name:"ar-io-sdk",version:Gc},format:rf.format.combine(rf.format.timestamp(),rf.format.json()),transports:[new rf.transports.Console({format:rf.format.combine(rf.format.timestamp(),rf.format.json())})]})}info(r,...n){this.silent||this.logger.info(r,...n)}warn(r,...n){this.silent||this.logger.warn(r,...n)}error(r,...n){this.silent||this.logger.error(r,...n)}debug(r,...n){this.silent||this.logger.debug(r,...n)}setLogLevel(r){this.silent=r==="none","silent"in this.logger&&(this.logger.silent=r==="none"),"level"in this.logger&&(this.logger.level=r)}};Be();Pe();Oe();var wp=class{static init({signer:r,...n}){if(dc(n)||pc(n))return r?new Qw({signer:r,...n}):new h6(n);throw new yh}},h6=class{process;constructor(r){if(dc(r))this.process=r.process;else if(pc(r))this.process=new So({processId:r.processId});else throw new yh}async getState(){let r=[{name:"Action",value:"State"}];return await this.process.read({tags:r})}async getInfo(){let r=[{name:"Action",value:"Info"}];return await this.process.read({tags:r})}async getRecord({undername:r}){let n=[{name:"Sub-Domain",value:r},{name:"Action",value:"Record"}];return await this.process.read({tags:n})}async getRecords(){let r=[{name:"Action",value:"Records"}];return await this.process.read({tags:r})}async getOwner(){return(await this.getInfo()).Owner}async getControllers(){let r=[{name:"Action",value:"Controllers"}];return await this.process.read({tags:r})}async getName(){return(await this.getInfo()).Name}async getTicker(){return(await this.getInfo()).Ticker}async getBalances(){let r=[{name:"Action",value:"Balances"}];return await this.process.read({tags:r})}async getBalance({address:r}){let n=[{name:"Action",value:"Balance"},{name:"Recipient",value:r}];return await this.process.read({tags:n})}},Qw=class extends h6{signer;constructor({signer:r,...n}){super(n),this.signer=r}async transfer({target:r}){let n=[{name:"Action",value:"Transfer"},{name:"Recipient",value:r}];return this.process.send({tags:n,data:{},signer:this.signer})}async addController({controller:r}){let n=[{name:"Action",value:"Add-Controller"},{name:"Controller",value:r}];return this.process.send({tags:n,data:{},signer:this.signer})}async removeController({controller:r}){let n=[{name:"Action",value:"Remove-Controller"},{name:"Controller",value:r}];return this.process.send({tags:n,data:{},signer:this.signer})}async setRecord({undername:r,transactionId:n,ttlSeconds:h}){return this.process.send({tags:[{name:"Action",value:"Set-Record"},{name:"Sub-Domain",value:r},{name:"Transaction-Id",value:n},{name:"TTL-Seconds",value:h.toString()}],data:{transactionId:n,ttlSeconds:h},signer:this.signer})}async removeRecord({undername:r}){return this.process.send({tags:[{name:"Action",value:"Remove-Record"},{name:"Sub-Domain",value:r}],data:{undername:r},signer:this.signer})}async setTicker({ticker:r}){return this.process.send({tags:[{name:"Action",value:"Set-Ticker"},{name:"Ticker",value:r}],data:{ticker:r},signer:this.signer})}async setName({name:r}){return this.process.send({tags:[{name:"Action",value:"Set-Name"},{name:"Name",value:r}],data:{name:r},signer:this.signer})}};Be();Pe();Oe();Be();Pe();Oe();var rQ=hc(tQ(),1),R2=rQ.default.init({host:"arweave.net",port:443,protocol:"https"});Be();Pe();Oe();Be();Pe();Oe();var Y9e=Object.create,BR=Object.defineProperty,X9e=Object.getOwnPropertyDescriptor,RQ=Object.getOwnPropertyNames,Q9e=Object.getPrototypeOf,e_e=Object.prototype.hasOwnProperty,Co=(e,r)=>function(){return r||(0,e[RQ(e)[0]])((r={exports:{}}).exports,r),r.exports},xQ=(e,r)=>{for(var n in r)BR(e,n,{get:r[n],enumerable:!0})},t_e=(e,r,n,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of RQ(r))!e_e.call(e,a)&&a!==n&&BR(e,a,{get:()=>r[a],enumerable:!(h=X9e(r,a))||h.enumerable});return e},OR=(e,r,n)=>(n=e!=null?Y9e(Q9e(e)):{},t_e(r||!e||!e.__esModule?BR(n,"default",{value:e,enumerable:!0}):n,e)),r_e=Co({"node_modules/obliterator/iterator.js"(e,r){function n(h){if(typeof h!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=h}typeof Symbol<"u"&&(n.prototype[Symbol.iterator]=function(){return this}),n.of=function(){var h=arguments,a=h.length,d=0;return new n(function(){return d>=a?{done:!0}:{done:!1,value:h[d++]}})},n.empty=function(){var h=new n(function(){return{done:!0}});return h},n.fromSequence=function(h){var a=0,d=h.length;return new n(function(){return a>=d?{done:!0}:{done:!1,value:h[a++]}})},n.is=function(h){return h instanceof n?!0:typeof h=="object"&&h!==null&&typeof h.next=="function"},r.exports=n}}),i_e=Co({"node_modules/obliterator/support.js"(e){e.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",e.SYMBOL_SUPPORT=typeof Symbol<"u"}}),PR=Co({"node_modules/obliterator/foreach.js"(e,r){var n=i_e(),h=n.ARRAY_BUFFER_SUPPORT,a=n.SYMBOL_SUPPORT;r.exports=function(l,v){var w,m,y,g,S;if(!l)throw new Error("obliterator/forEach: invalid iterable.");if(typeof v!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(l)||h&&ArrayBuffer.isView(l)||typeof l=="string"||l.toString()==="[object Arguments]"){for(y=0,g=l.length;y<g;y++)v(l[y],y);return}if(typeof l.forEach=="function"){l.forEach(v);return}if(a&&Symbol.iterator in l&&typeof l.next!="function"&&(l=l[Symbol.iterator]()),typeof l.next=="function"){for(w=l,y=0;S=w.next(),S.done!==!0;)v(S.value,y),y++;return}for(m in l)l.hasOwnProperty(m)&&v(l[m],m)}}}),NR=Co({"node_modules/mnemonist/utils/typed-arrays.js"(e){var r=Math.pow(2,8)-1,n=Math.pow(2,16)-1,h=Math.pow(2,32)-1,a=Math.pow(2,7)-1,d=Math.pow(2,15)-1,l=Math.pow(2,31)-1;e.getPointerArray=function(w){var m=w-1;if(m<=r)return Uint8Array;if(m<=n)return Uint16Array;if(m<=h)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},e.getSignedPointerArray=function(w){var m=w-1;return m<=a?Int8Array:m<=d?Int16Array:m<=l?Int32Array:Float64Array},e.getNumberType=function(w){return w===(w|0)?Math.sign(w)===-1?w<=127&&w>=-128?Int8Array:w<=32767&&w>=-32768?Int16Array:Int32Array:w<=255?Uint8Array:w<=65535?Uint16Array:Uint32Array:Float64Array};var v={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(w,m){var y=null,g=0,S,R,A,k,I;for(k=0,I=w.length;k<I;k++)A=m?m(w[k]):w[k],R=e.getNumberType(A),S=v[R.name],S>g&&(g=S,y=R);return y},e.isTypedArray=function(w){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(w)},e.concat=function(){var w=0,m,y,g;for(m=0,g=arguments.length;m<g;m++)w+=arguments[m].length;var S=new arguments[0].constructor(w);for(m=0,y=0;m<g;m++)S.set(arguments[m],y),y+=arguments[m].length;return S},e.indices=function(w){for(var m=e.getPointerArray(w),y=new m(w),g=0;g<w;g++)y[g]=g;return y}}}),TQ=Co({"node_modules/mnemonist/utils/iterables.js"(e){var r=PR(),n=NR();function h(v){return Array.isArray(v)||n.isTypedArray(v)}function a(v){if(typeof v.length=="number")return v.length;if(typeof v.size=="number")return v.size}function d(v){var w=a(v),m=typeof w=="number"?new Array(w):[],y=0;return r(v,function(g){m[y++]=g}),m}function l(v){var w=a(v),m=typeof w=="number"?n.getPointerArray(w):Array,y=typeof w=="number"?new Array(w):[],g=typeof w=="number"?new m(w):[],S=0;return r(v,function(R){y[S]=R,g[S]=S++}),[y,g]}e.isArrayLike=h,e.guessLength=a,e.toArray=d,e.toArrayWithIndices=l}}),n_e=Co({"node_modules/mnemonist/lru-cache.js"(e,r){var n=r_e(),h=PR(),a=NR(),d=TQ();function l(v,w,m){if(arguments.length<2&&(m=v,v=null,w=null),this.capacity=m,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-cache: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-cache: capacity should be a finite positive integer.");var y=a.getPointerArray(m);this.forward=new y(m),this.backward=new y(m),this.K=typeof v=="function"?new v(m):new Array(m),this.V=typeof w=="function"?new w(m):new Array(m),this.size=0,this.head=0,this.tail=0,this.items={}}l.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},l.prototype.splayOnTop=function(v){var w=this.head;if(this.head===v)return this;var m=this.backward[v],y=this.forward[v];return this.tail===v?this.tail=m:this.backward[y]=m,this.forward[m]=y,this.backward[w]=v,this.head=v,this.forward[v]=w,this},l.prototype.set=function(v,w){var m=this.items[v];if(typeof m<"u"){this.splayOnTop(m),this.V[m]=w;return}this.size<this.capacity?m=this.size++:(m=this.tail,this.tail=this.backward[m],delete this.items[this.K[m]]),this.items[v]=m,this.K[m]=v,this.V[m]=w,this.forward[m]=this.head,this.backward[this.head]=m,this.head=m},l.prototype.setpop=function(v,w){var m=null,y=null,g=this.items[v];return typeof g<"u"?(this.splayOnTop(g),m=this.V[g],this.V[g]=w,{evicted:!1,key:v,value:m}):(this.size<this.capacity?g=this.size++:(g=this.tail,this.tail=this.backward[g],m=this.V[g],y=this.K[g],delete this.items[y]),this.items[v]=g,this.K[g]=v,this.V[g]=w,this.forward[g]=this.head,this.backward[this.head]=g,this.head=g,y?{evicted:!0,key:y,value:m}:null)},l.prototype.has=function(v){return v in this.items},l.prototype.get=function(v){var w=this.items[v];if(!(typeof w>"u"))return this.splayOnTop(w),this.V[w]},l.prototype.peek=function(v){var w=this.items[v];if(!(typeof w>"u"))return this.V[w]},l.prototype.forEach=function(v,w){w=arguments.length>1?w:this;for(var m=0,y=this.size,g=this.head,S=this.K,R=this.V,A=this.forward;m<y;)v.call(w,R[g],S[g],this),g=A[g],m++},l.prototype.keys=function(){var v=0,w=this.size,m=this.head,y=this.K,g=this.forward;return new n(function(){if(v>=w)return{done:!0};var S=y[m];return v++,v<w&&(m=g[m]),{done:!1,value:S}})},l.prototype.values=function(){var v=0,w=this.size,m=this.head,y=this.V,g=this.forward;return new n(function(){if(v>=w)return{done:!0};var S=y[m];return v++,v<w&&(m=g[m]),{done:!1,value:S}})},l.prototype.entries=function(){var v=0,w=this.size,m=this.head,y=this.K,g=this.V,S=this.forward;return new n(function(){if(v>=w)return{done:!0};var R=y[m],A=g[m];return v++,v<w&&(m=S[m]),{done:!1,value:[R,A]}})},typeof Symbol<"u"&&(l.prototype[Symbol.iterator]=l.prototype.entries),l.prototype.inspect=function(){for(var v=new Map,w=this.entries(),m;m=w.next(),!m.done;)v.set(m.value[0],m.value[1]);return Object.defineProperty(v,"constructor",{value:l,enumerable:!1}),v},typeof Symbol<"u"&&(l.prototype[Symbol.for("nodejs.util.inspect.custom")]=l.prototype.inspect),l.from=function(v,w,m,y){if(arguments.length<2){if(y=d.guessLength(v),typeof y!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(y=w,w=null,m=null);var g=new l(w,m,y);return h(v,function(S,R){g.set(R,S)}),g},r.exports=l}}),a_e=Co({"node_modules/mnemonist/lru-map.js"(e,r){var n=n_e(),h=PR(),a=NR(),d=TQ();function l(v,w,m){if(arguments.length<2&&(m=v,v=null,w=null),this.capacity=m,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-map: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-map: capacity should be a finite positive integer.");var y=a.getPointerArray(m);this.forward=new y(m),this.backward=new y(m),this.K=typeof v=="function"?new v(m):new Array(m),this.V=typeof w=="function"?new w(m):new Array(m),this.size=0,this.head=0,this.tail=0,this.items=new Map}l.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},l.prototype.set=function(v,w){var m=this.items.get(v);if(typeof m<"u"){this.splayOnTop(m),this.V[m]=w;return}this.size<this.capacity?m=this.size++:(m=this.tail,this.tail=this.backward[m],this.items.delete(this.K[m])),this.items.set(v,m),this.K[m]=v,this.V[m]=w,this.forward[m]=this.head,this.backward[this.head]=m,this.head=m},l.prototype.setpop=function(v,w){var m=null,y=null,g=this.items.get(v);return typeof g<"u"?(this.splayOnTop(g),m=this.V[g],this.V[g]=w,{evicted:!1,key:v,value:m}):(this.size<this.capacity?g=this.size++:(g=this.tail,this.tail=this.backward[g],m=this.V[g],y=this.K[g],this.items.delete(y)),this.items.set(v,g),this.K[g]=v,this.V[g]=w,this.forward[g]=this.head,this.backward[this.head]=g,this.head=g,y?{evicted:!0,key:y,value:m}:null)},l.prototype.has=function(v){return this.items.has(v)},l.prototype.get=function(v){var w=this.items.get(v);if(!(typeof w>"u"))return this.splayOnTop(w),this.V[w]},l.prototype.peek=function(v){var w=this.items.get(v);if(!(typeof w>"u"))return this.V[w]},l.prototype.splayOnTop=n.prototype.splayOnTop,l.prototype.forEach=n.prototype.forEach,l.prototype.keys=n.prototype.keys,l.prototype.values=n.prototype.values,l.prototype.entries=n.prototype.entries,typeof Symbol<"u"&&(l.prototype[Symbol.iterator]=l.prototype.entries),l.prototype.inspect=n.prototype.inspect,l.from=function(v,w,m,y){if(arguments.length<2){if(y=d.guessLength(v),typeof y!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(y=w,w=null,m=null);var g=new l(w,m,y);return h(v,function(S,R){g.set(R,S)}),g},r.exports=l}}),o_e=Co({"node_modules/ms/index.js"(e,r){var n=1e3,h=n*60,a=h*60,d=a*24,l=d*7,v=d*365.25;r.exports=function(S,R){R=R||{};var A=typeof S;if(A==="string"&&S.length>0)return w(S);if(A==="number"&&isFinite(S))return R.long?y(S):m(S);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(S))};function w(S){if(S=String(S),!(S.length>100)){var R=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(S);if(R){var A=parseFloat(R[1]),k=(R[2]||"ms").toLowerCase();switch(k){case"years":case"year":case"yrs":case"yr":case"y":return A*v;case"weeks":case"week":case"w":return A*l;case"days":case"day":case"d":return A*d;case"hours":case"hour":case"hrs":case"hr":case"h":return A*a;case"minutes":case"minute":case"mins":case"min":case"m":return A*h;case"seconds":case"second":case"secs":case"sec":case"s":return A*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return A;default:return}}}}function m(S){var R=Math.abs(S);return R>=d?Math.round(S/d)+"d":R>=a?Math.round(S/a)+"h":R>=h?Math.round(S/h)+"m":R>=n?Math.round(S/n)+"s":S+"ms"}function y(S){var R=Math.abs(S);return R>=d?g(S,R,d,"day"):R>=a?g(S,R,a,"hour"):R>=h?g(S,R,h,"minute"):R>=n?g(S,R,n,"second"):S+" ms"}function g(S,R,A,k){var I=R>=A*1.5;return Math.round(S/A)+" "+k+(I?"s":"")}}}),s_e=Co({"node_modules/debug/src/common.js"(e,r){function n(h){d.debug=d,d.default=d,d.coerce=g,d.disable=w,d.enable=v,d.enabled=m,d.humanize=o_e(),d.destroy=S,Object.keys(h).forEach(R=>{d[R]=h[R]}),d.names=[],d.skips=[],d.formatters={};function a(R){let A=0;for(let k=0;k<R.length;k++)A=(A<<5)-A+R.charCodeAt(k),A|=0;return d.colors[Math.abs(A)%d.colors.length]}d.selectColor=a;function d(R){let A,k=null,I,B;function P(...C){if(!P.enabled)return;let q=P,K=Number(new Date),V=K-(A||K);q.diff=V,q.prev=A,q.curr=K,A=K,C[0]=d.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let j=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(Y,E)=>{if(Y==="%%")return"%";j++;let i=d.formatters[E];if(typeof i=="function"){let s=C[j];Y=i.call(q,s),C.splice(j,1),j--}return Y}),d.formatArgs.call(q,C),(q.log||d.log).apply(q,C)}return P.namespace=R,P.useColors=d.useColors(),P.color=d.selectColor(R),P.extend=l,P.destroy=d.destroy,Object.defineProperty(P,"enabled",{enumerable:!0,configurable:!1,get:()=>k!==null?k:(I!==d.namespaces&&(I=d.namespaces,B=d.enabled(R)),B),set:C=>{k=C}}),typeof d.init=="function"&&d.init(P),P}function l(R,A){let k=d(this.namespace+(typeof A>"u"?":":A)+R);return k.log=this.log,k}function v(R){d.save(R),d.namespaces=R,d.names=[],d.skips=[];let A,k=(typeof R=="string"?R:"").split(/[\s,]+/),I=k.length;for(A=0;A<I;A++)k[A]&&(R=k[A].replace(/\*/g,".*?"),R[0]==="-"?d.skips.push(new RegExp("^"+R.slice(1)+"$")):d.names.push(new RegExp("^"+R+"$")))}function w(){let R=[...d.names.map(y),...d.skips.map(y).map(A=>"-"+A)].join(",");return d.enable(""),R}function m(R){if(R[R.length-1]==="*")return!0;let A,k;for(A=0,k=d.skips.length;A<k;A++)if(d.skips[A].test(R))return!1;for(A=0,k=d.names.length;A<k;A++)if(d.names[A].test(R))return!0;return!1}function y(R){return R.toString().substring(2,R.toString().length-2).replace(/\.\*\?$/,"*")}function g(R){return R instanceof Error?R.stack||R.message:R}function S(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return d.enable(d.load()),d}r.exports=n}}),f_e=Co({"node_modules/debug/src/browser.js"(e,r){e.formatArgs=h,e.save=a,e.load=d,e.useColors=n,e.storage=l(),e.destroy=(()=>{let w=!1;return()=>{w||(w=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function h(w){if(w[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+w[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),!this.useColors)return;let m="color: "+this.color;w.splice(1,0,m,"color: inherit");let y=0,g=0;w[0].replace(/%[a-zA-Z%]/g,S=>{S!=="%%"&&(y++,S==="%c"&&(g=y))}),w.splice(g,0,m)}e.log=console.debug||console.log||(()=>{});function a(w){try{w?e.storage.setItem("debug",w):e.storage.removeItem("debug")}catch{}}function d(){let w;try{w=e.storage.getItem("debug")}catch{}return!w&&typeof gt<"u"&&"env"in gt&&(w=gt.env.DEBUG),w}function l(){try{return localStorage}catch{}}r.exports=s_e()(e);var{formatters:v}=r.exports;v.j=function(w){try{return JSON.stringify(w)}catch(m){return"[UnexpectedJSONParseError]: "+m.message}}}}),u_e=Co({"node_modules/base64-js/index.js"(e){"use strict";e.byteLength=w,e.toByteArray=y,e.fromByteArray=R;var r=[],n=[],h=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(d=0,l=a.length;d<l;++d)r[d]=a[d],n[a.charCodeAt(d)]=d;var d,l;n[45]=62,n[95]=63;function v(A){var k=A.length;if(k%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var I=A.indexOf("=");I===-1&&(I=k);var B=I===k?0:4-I%4;return[I,B]}function w(A){var k=v(A),I=k[0],B=k[1];return(I+B)*3/4-B}function m(A,k,I){return(k+I)*3/4-I}function y(A){var k,I=v(A),B=I[0],P=I[1],C=new h(m(A,B,P)),q=0,K=P>0?B-4:B,V;for(V=0;V<K;V+=4)k=n[A.charCodeAt(V)]<<18|n[A.charCodeAt(V+1)]<<12|n[A.charCodeAt(V+2)]<<6|n[A.charCodeAt(V+3)],C[q++]=k>>16&255,C[q++]=k>>8&255,C[q++]=k&255;return P===2&&(k=n[A.charCodeAt(V)]<<2|n[A.charCodeAt(V+1)]>>4,C[q++]=k&255),P===1&&(k=n[A.charCodeAt(V)]<<10|n[A.charCodeAt(V+1)]<<4|n[A.charCodeAt(V+2)]>>2,C[q++]=k>>8&255,C[q++]=k&255),C}function g(A){return r[A>>18&63]+r[A>>12&63]+r[A>>6&63]+r[A&63]}function S(A,k,I){for(var B,P=[],C=k;C<I;C+=3)B=(A[C]<<16&16711680)+(A[C+1]<<8&65280)+(A[C+2]&255),P.push(g(B));return P.join("")}function R(A){for(var k,I=A.length,B=I%3,P=[],C=16383,q=0,K=I-B;q<K;q+=C)P.push(S(A,q,q+C>K?K:q+C));return B===1?(k=A[I-1],P.push(r[k>>2]+r[k<<4&63]+"==")):B===2&&(k=(A[I-2]<<8)+A[I-1],P.push(r[k>>10]+r[k>>4&63]+r[k<<2&63]+"=")),P.join("")}}}),h_e=Co({"node_modules/ieee754/index.js"(e){e.read=function(r,n,h,a,d){var l,v,w=d*8-a-1,m=(1<<w)-1,y=m>>1,g=-7,S=h?d-1:0,R=h?-1:1,A=r[n+S];for(S+=R,l=A&(1<<-g)-1,A>>=-g,g+=w;g>0;l=l*256+r[n+S],S+=R,g-=8);for(v=l&(1<<-g)-1,l>>=-g,g+=a;g>0;v=v*256+r[n+S],S+=R,g-=8);if(l===0)l=1-y;else{if(l===m)return v?NaN:(A?-1:1)*(1/0);v=v+Math.pow(2,a),l=l-y}return(A?-1:1)*v*Math.pow(2,l-a)},e.write=function(r,n,h,a,d,l){var v,w,m,y=l*8-d-1,g=(1<<y)-1,S=g>>1,R=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=a?0:l-1,k=a?1:-1,I=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(w=isNaN(n)?1:0,v=g):(v=Math.floor(Math.log(n)/Math.LN2),n*(m=Math.pow(2,-v))<1&&(v--,m*=2),v+S>=1?n+=R/m:n+=R*Math.pow(2,1-S),n*m>=2&&(v++,m/=2),v+S>=g?(w=0,v=g):v+S>=1?(w=(n*m-1)*Math.pow(2,d),v=v+S):(w=n*Math.pow(2,S-1)*Math.pow(2,d),v=0));d>=8;r[h+A]=w&255,A+=k,w/=256,d-=8);for(v=v<<d|w,y+=d;y>0;r[h+A]=v&255,A+=k,v/=256,y-=8);r[h+A-k]|=I*128}}}),l_e=Co({"node_modules/buffer/index.js"(e){"use strict";var r=u_e(),n=h_e(),h=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=v,e.SlowBuffer=P,e.INSPECT_MAX_BYTES=50;var a=2147483647;e.kMaxLength=a,v.TYPED_ARRAY_SUPPORT=d(),!v.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function d(){try{let O=new Uint8Array(1),N={foo:function(){return 42}};return Object.setPrototypeOf(N,Uint8Array.prototype),Object.setPrototypeOf(O,N),O.foo()===42}catch{return!1}}Object.defineProperty(v.prototype,"parent",{enumerable:!0,get:function(){if(v.isBuffer(this))return this.buffer}}),Object.defineProperty(v.prototype,"offset",{enumerable:!0,get:function(){if(v.isBuffer(this))return this.byteOffset}});function l(O){if(O>a)throw new RangeError('The value "'+O+'" is invalid for option "size"');let N=new Uint8Array(O);return Object.setPrototypeOf(N,v.prototype),N}function v(O,N,$){if(typeof O=="number"){if(typeof N=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(O)}return w(O,N,$)}v.poolSize=8192;function w(O,N,$){if(typeof O=="string")return S(O,N);if(ArrayBuffer.isView(O))return A(O);if(O==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O);if(ut(O,ArrayBuffer)||O&&ut(O.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ut(O,SharedArrayBuffer)||O&&ut(O.buffer,SharedArrayBuffer)))return k(O,N,$);if(typeof O=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let ee=O.valueOf&&O.valueOf();if(ee!=null&&ee!==O)return v.from(ee,N,$);let re=I(O);if(re)return re;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof O[Symbol.toPrimitive]=="function")return v.from(O[Symbol.toPrimitive]("string"),N,$);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O)}v.from=function(O,N,$){return w(O,N,$)},Object.setPrototypeOf(v.prototype,Uint8Array.prototype),Object.setPrototypeOf(v,Uint8Array);function m(O){if(typeof O!="number")throw new TypeError('"size" argument must be of type number');if(O<0)throw new RangeError('The value "'+O+'" is invalid for option "size"')}function y(O,N,$){return m(O),O<=0?l(O):N!==void 0?typeof $=="string"?l(O).fill(N,$):l(O).fill(N):l(O)}v.alloc=function(O,N,$){return y(O,N,$)};function g(O){return m(O),l(O<0?0:B(O)|0)}v.allocUnsafe=function(O){return g(O)},v.allocUnsafeSlow=function(O){return g(O)};function S(O,N){if((typeof N!="string"||N==="")&&(N="utf8"),!v.isEncoding(N))throw new TypeError("Unknown encoding: "+N);let $=C(O,N)|0,ee=l($),re=ee.write(O,N);return re!==$&&(ee=ee.slice(0,re)),ee}function R(O){let N=O.length<0?0:B(O.length)|0,$=l(N);for(let ee=0;ee<N;ee+=1)$[ee]=O[ee]&255;return $}function A(O){if(ut(O,Uint8Array)){let N=new Uint8Array(O);return k(N.buffer,N.byteOffset,N.byteLength)}return R(O)}function k(O,N,$){if(N<0||O.byteLength<N)throw new RangeError('"offset" is outside of buffer bounds');if(O.byteLength<N+($||0))throw new RangeError('"length" is outside of buffer bounds');let ee;return N===void 0&&$===void 0?ee=new Uint8Array(O):$===void 0?ee=new Uint8Array(O,N):ee=new Uint8Array(O,N,$),Object.setPrototypeOf(ee,v.prototype),ee}function I(O){if(v.isBuffer(O)){let N=B(O.length)|0,$=l(N);return $.length===0||O.copy($,0,0,N),$}if(O.length!==void 0)return typeof O.length!="number"||qe(O.length)?l(0):R(O);if(O.type==="Buffer"&&Array.isArray(O.data))return R(O.data)}function B(O){if(O>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return O|0}function P(O){return+O!=O&&(O=0),v.alloc(+O)}v.isBuffer=function(N){return N!=null&&N._isBuffer===!0&&N!==v.prototype},v.compare=function(N,$){if(ut(N,Uint8Array)&&(N=v.from(N,N.offset,N.byteLength)),ut($,Uint8Array)&&($=v.from($,$.offset,$.byteLength)),!v.isBuffer(N)||!v.isBuffer($))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(N===$)return 0;let ee=N.length,re=$.length;for(let se=0,ce=Math.min(ee,re);se<ce;++se)if(N[se]!==$[se]){ee=N[se],re=$[se];break}return ee<re?-1:re<ee?1:0},v.isEncoding=function(N){switch(String(N).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},v.concat=function(N,$){if(!Array.isArray(N))throw new TypeError('"list" argument must be an Array of Buffers');if(N.length===0)return v.alloc(0);let ee;if($===void 0)for($=0,ee=0;ee<N.length;++ee)$+=N[ee].length;let re=v.allocUnsafe($),se=0;for(ee=0;ee<N.length;++ee){let ce=N[ee];if(ut(ce,Uint8Array))se+ce.length>re.length?(v.isBuffer(ce)||(ce=v.from(ce)),ce.copy(re,se)):Uint8Array.prototype.set.call(re,ce,se);else if(v.isBuffer(ce))ce.copy(re,se);else throw new TypeError('"list" argument must be an Array of Buffers');se+=ce.length}return re};function C(O,N){if(v.isBuffer(O))return O.length;if(ArrayBuffer.isView(O)||ut(O,ArrayBuffer))return O.byteLength;if(typeof O!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof O);let $=O.length,ee=arguments.length>2&&arguments[2]===!0;if(!ee&&$===0)return 0;let re=!1;for(;;)switch(N){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":return he(O).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $*2;case"hex":return $>>>1;case"base64":return Ae(O).length;default:if(re)return ee?-1:he(O).length;N=(""+N).toLowerCase(),re=!0}}v.byteLength=C;function q(O,N,$){let ee=!1;if((N===void 0||N<0)&&(N=0),N>this.length||(($===void 0||$>this.length)&&($=this.length),$<=0)||($>>>=0,N>>>=0,$<=N))return"";for(O||(O="utf8");;)switch(O){case"hex":return t(this,N,$);case"utf8":case"utf-8":return c(this,N,$);case"ascii":return x(this,N,$);case"latin1":case"binary":return o(this,N,$);case"base64":return f(this,N,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u(this,N,$);default:if(ee)throw new TypeError("Unknown encoding: "+O);O=(O+"").toLowerCase(),ee=!0}}v.prototype._isBuffer=!0;function K(O,N,$){let ee=O[N];O[N]=O[$],O[$]=ee}v.prototype.swap16=function(){let N=this.length;if(N%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let $=0;$<N;$+=2)K(this,$,$+1);return this},v.prototype.swap32=function(){let N=this.length;if(N%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let $=0;$<N;$+=4)K(this,$,$+3),K(this,$+1,$+2);return this},v.prototype.swap64=function(){let N=this.length;if(N%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let $=0;$<N;$+=8)K(this,$,$+7),K(this,$+1,$+6),K(this,$+2,$+5),K(this,$+3,$+4);return this},v.prototype.toString=function(){let N=this.length;return N===0?"":arguments.length===0?c(this,0,N):q.apply(this,arguments)},v.prototype.toLocaleString=v.prototype.toString,v.prototype.equals=function(N){if(!v.isBuffer(N))throw new TypeError("Argument must be a Buffer");return this===N?!0:v.compare(this,N)===0},v.prototype.inspect=function(){let N="",$=e.INSPECT_MAX_BYTES;return N=this.toString("hex",0,$).replace(/(.{2})/g,"$1 ").trim(),this.length>$&&(N+=" ... "),"<Buffer "+N+">"},h&&(v.prototype[h]=v.prototype.inspect),v.prototype.compare=function(N,$,ee,re,se){if(ut(N,Uint8Array)&&(N=v.from(N,N.offset,N.byteLength)),!v.isBuffer(N))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof N);if($===void 0&&($=0),ee===void 0&&(ee=N?N.length:0),re===void 0&&(re=0),se===void 0&&(se=this.length),$<0||ee>N.length||re<0||se>this.length)throw new RangeError("out of range index");if(re>=se&&$>=ee)return 0;if(re>=se)return-1;if($>=ee)return 1;if($>>>=0,ee>>>=0,re>>>=0,se>>>=0,this===N)return 0;let ce=se-re,st=ee-$,ye=Math.min(ce,st),be=this.slice(re,se),me=N.slice($,ee);for(let Te=0;Te<ye;++Te)if(be[Te]!==me[Te]){ce=be[Te],st=me[Te];break}return ce<st?-1:st<ce?1:0};function V(O,N,$,ee,re){if(O.length===0)return-1;if(typeof $=="string"?(ee=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,qe($)&&($=re?0:O.length-1),$<0&&($=O.length+$),$>=O.length){if(re)return-1;$=O.length-1}else if($<0)if(re)$=0;else return-1;if(typeof N=="string"&&(N=v.from(N,ee)),v.isBuffer(N))return N.length===0?-1:j(O,N,$,ee,re);if(typeof N=="number")return N=N&255,typeof Uint8Array.prototype.indexOf=="function"?re?Uint8Array.prototype.indexOf.call(O,N,$):Uint8Array.prototype.lastIndexOf.call(O,N,$):j(O,[N],$,ee,re);throw new TypeError("val must be string, number or Buffer")}function j(O,N,$,ee,re){let se=1,ce=O.length,st=N.length;if(ee!==void 0&&(ee=String(ee).toLowerCase(),ee==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(O.length<2||N.length<2)return-1;se=2,ce/=2,st/=2,$/=2}function ye(me,Te){return se===1?me[Te]:me.readUInt16BE(Te*se)}let be;if(re){let me=-1;for(be=$;be<ce;be++)if(ye(O,be)===ye(N,me===-1?0:be-me)){if(me===-1&&(me=be),be-me+1===st)return me*se}else me!==-1&&(be-=be-me),me=-1}else for($+st>ce&&($=ce-st),be=$;be>=0;be--){let me=!0;for(let Te=0;Te<st;Te++)if(ye(O,be+Te)!==ye(N,Te)){me=!1;break}if(me)return be}return-1}v.prototype.includes=function(N,$,ee){return this.indexOf(N,$,ee)!==-1},v.prototype.indexOf=function(N,$,ee){return V(this,N,$,ee,!0)},v.prototype.lastIndexOf=function(N,$,ee){return V(this,N,$,ee,!1)};function z(O,N,$,ee){$=Number($)||0;let re=O.length-$;ee?(ee=Number(ee),ee>re&&(ee=re)):ee=re;let se=N.length;ee>se/2&&(ee=se/2);let ce;for(ce=0;ce<ee;++ce){let st=parseInt(N.substr(ce*2,2),16);if(qe(st))return ce;O[$+ce]=st}return ce}function Y(O,N,$,ee){return _e(he(N,O.length-$),O,$,ee)}function E(O,N,$,ee){return _e(pe(N),O,$,ee)}function i(O,N,$,ee){return _e(Ae(N),O,$,ee)}function s(O,N,$,ee){return _e(De(N,O.length-$),O,$,ee)}v.prototype.write=function(N,$,ee,re){if($===void 0)re="utf8",ee=this.length,$=0;else if(ee===void 0&&typeof $=="string")re=$,ee=this.length,$=0;else if(isFinite($))$=$>>>0,isFinite(ee)?(ee=ee>>>0,re===void 0&&(re="utf8")):(re=ee,ee=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let se=this.length-$;if((ee===void 0||ee>se)&&(ee=se),N.length>0&&(ee<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");let ce=!1;for(;;)switch(re){case"hex":return z(this,N,$,ee);case"utf8":case"utf-8":return Y(this,N,$,ee);case"ascii":case"latin1":case"binary":return E(this,N,$,ee);case"base64":return i(this,N,$,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s(this,N,$,ee);default:if(ce)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),ce=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function f(O,N,$){return N===0&&$===O.length?r.fromByteArray(O):r.fromByteArray(O.slice(N,$))}function c(O,N,$){$=Math.min(O.length,$);let ee=[],re=N;for(;re<$;){let se=O[re],ce=null,st=se>239?4:se>223?3:se>191?2:1;if(re+st<=$){let ye,be,me,Te;switch(st){case 1:se<128&&(ce=se);break;case 2:ye=O[re+1],(ye&192)===128&&(Te=(se&31)<<6|ye&63,Te>127&&(ce=Te));break;case 3:ye=O[re+1],be=O[re+2],(ye&192)===128&&(be&192)===128&&(Te=(se&15)<<12|(ye&63)<<6|be&63,Te>2047&&(Te<55296||Te>57343)&&(ce=Te));break;case 4:ye=O[re+1],be=O[re+2],me=O[re+3],(ye&192)===128&&(be&192)===128&&(me&192)===128&&(Te=(se&15)<<18|(ye&63)<<12|(be&63)<<6|me&63,Te>65535&&Te<1114112&&(ce=Te))}}ce===null?(ce=65533,st=1):ce>65535&&(ce-=65536,ee.push(ce>>>10&1023|55296),ce=56320|ce&1023),ee.push(ce),re+=st}return _(ee)}var p=4096;function _(O){let N=O.length;if(N<=p)return String.fromCharCode.apply(String,O);let $="",ee=0;for(;ee<N;)$+=String.fromCharCode.apply(String,O.slice(ee,ee+=p));return $}function x(O,N,$){let ee="";$=Math.min(O.length,$);for(let re=N;re<$;++re)ee+=String.fromCharCode(O[re]&127);return ee}function o(O,N,$){let ee="";$=Math.min(O.length,$);for(let re=N;re<$;++re)ee+=String.fromCharCode(O[re]);return ee}function t(O,N,$){let ee=O.length;(!N||N<0)&&(N=0),(!$||$<0||$>ee)&&($=ee);let re="";for(let se=N;se<$;++se)re+=ke[O[se]];return re}function u(O,N,$){let ee=O.slice(N,$),re="";for(let se=0;se<ee.length-1;se+=2)re+=String.fromCharCode(ee[se]+ee[se+1]*256);return re}v.prototype.slice=function(N,$){let ee=this.length;N=~~N,$=$===void 0?ee:~~$,N<0?(N+=ee,N<0&&(N=0)):N>ee&&(N=ee),$<0?($+=ee,$<0&&($=0)):$>ee&&($=ee),$<N&&($=N);let re=this.subarray(N,$);return Object.setPrototypeOf(re,v.prototype),re};function b(O,N,$){if(O%1!==0||O<0)throw new RangeError("offset is not uint");if(O+N>$)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUintLE=v.prototype.readUIntLE=function(N,$,ee){N=N>>>0,$=$>>>0,ee||b(N,$,this.length);let re=this[N],se=1,ce=0;for(;++ce<$&&(se*=256);)re+=this[N+ce]*se;return re},v.prototype.readUintBE=v.prototype.readUIntBE=function(N,$,ee){N=N>>>0,$=$>>>0,ee||b(N,$,this.length);let re=this[N+--$],se=1;for(;$>0&&(se*=256);)re+=this[N+--$]*se;return re},v.prototype.readUint8=v.prototype.readUInt8=function(N,$){return N=N>>>0,$||b(N,1,this.length),this[N]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(N,$){return N=N>>>0,$||b(N,2,this.length),this[N]|this[N+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(N,$){return N=N>>>0,$||b(N,2,this.length),this[N]<<8|this[N+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(N,$){return N=N>>>0,$||b(N,4,this.length),(this[N]|this[N+1]<<8|this[N+2]<<16)+this[N+3]*16777216},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(N,$){return N=N>>>0,$||b(N,4,this.length),this[N]*16777216+(this[N+1]<<16|this[N+2]<<8|this[N+3])},v.prototype.readBigUInt64LE=mt(function(N){N=N>>>0,Z(N,"offset");let $=this[N],ee=this[N+7];($===void 0||ee===void 0)&&ie(N,this.length-8);let re=$+this[++N]*2**8+this[++N]*2**16+this[++N]*2**24,se=this[++N]+this[++N]*2**8+this[++N]*2**16+ee*2**24;return BigInt(re)+(BigInt(se)<<BigInt(32))}),v.prototype.readBigUInt64BE=mt(function(N){N=N>>>0,Z(N,"offset");let $=this[N],ee=this[N+7];($===void 0||ee===void 0)&&ie(N,this.length-8);let re=$*2**24+this[++N]*2**16+this[++N]*2**8+this[++N],se=this[++N]*2**24+this[++N]*2**16+this[++N]*2**8+ee;return(BigInt(re)<<BigInt(32))+BigInt(se)}),v.prototype.readIntLE=function(N,$,ee){N=N>>>0,$=$>>>0,ee||b(N,$,this.length);let re=this[N],se=1,ce=0;for(;++ce<$&&(se*=256);)re+=this[N+ce]*se;return se*=128,re>=se&&(re-=Math.pow(2,8*$)),re},v.prototype.readIntBE=function(N,$,ee){N=N>>>0,$=$>>>0,ee||b(N,$,this.length);let re=$,se=1,ce=this[N+--re];for(;re>0&&(se*=256);)ce+=this[N+--re]*se;return se*=128,ce>=se&&(ce-=Math.pow(2,8*$)),ce},v.prototype.readInt8=function(N,$){return N=N>>>0,$||b(N,1,this.length),this[N]&128?(255-this[N]+1)*-1:this[N]},v.prototype.readInt16LE=function(N,$){N=N>>>0,$||b(N,2,this.length);let ee=this[N]|this[N+1]<<8;return ee&32768?ee|4294901760:ee},v.prototype.readInt16BE=function(N,$){N=N>>>0,$||b(N,2,this.length);let ee=this[N+1]|this[N]<<8;return ee&32768?ee|4294901760:ee},v.prototype.readInt32LE=function(N,$){return N=N>>>0,$||b(N,4,this.length),this[N]|this[N+1]<<8|this[N+2]<<16|this[N+3]<<24},v.prototype.readInt32BE=function(N,$){return N=N>>>0,$||b(N,4,this.length),this[N]<<24|this[N+1]<<16|this[N+2]<<8|this[N+3]},v.prototype.readBigInt64LE=mt(function(N){N=N>>>0,Z(N,"offset");let $=this[N],ee=this[N+7];($===void 0||ee===void 0)&&ie(N,this.length-8);let re=this[N+4]+this[N+5]*2**8+this[N+6]*2**16+(ee<<24);return(BigInt(re)<<BigInt(32))+BigInt($+this[++N]*2**8+this[++N]*2**16+this[++N]*2**24)}),v.prototype.readBigInt64BE=mt(function(N){N=N>>>0,Z(N,"offset");let $=this[N],ee=this[N+7];($===void 0||ee===void 0)&&ie(N,this.length-8);let re=($<<24)+this[++N]*2**16+this[++N]*2**8+this[++N];return(BigInt(re)<<BigInt(32))+BigInt(this[++N]*2**24+this[++N]*2**16+this[++N]*2**8+ee)}),v.prototype.readFloatLE=function(N,$){return N=N>>>0,$||b(N,4,this.length),n.read(this,N,!0,23,4)},v.prototype.readFloatBE=function(N,$){return N=N>>>0,$||b(N,4,this.length),n.read(this,N,!1,23,4)},v.prototype.readDoubleLE=function(N,$){return N=N>>>0,$||b(N,8,this.length),n.read(this,N,!0,52,8)},v.prototype.readDoubleBE=function(N,$){return N=N>>>0,$||b(N,8,this.length),n.read(this,N,!1,52,8)};function M(O,N,$,ee,re,se){if(!v.isBuffer(O))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>re||N<se)throw new RangeError('"value" argument is out of bounds');if($+ee>O.length)throw new RangeError("Index out of range")}v.prototype.writeUintLE=v.prototype.writeUIntLE=function(N,$,ee,re){if(N=+N,$=$>>>0,ee=ee>>>0,!re){let st=Math.pow(2,8*ee)-1;M(this,N,$,ee,st,0)}let se=1,ce=0;for(this[$]=N&255;++ce<ee&&(se*=256);)this[$+ce]=N/se&255;return $+ee},v.prototype.writeUintBE=v.prototype.writeUIntBE=function(N,$,ee,re){if(N=+N,$=$>>>0,ee=ee>>>0,!re){let st=Math.pow(2,8*ee)-1;M(this,N,$,ee,st,0)}let se=ee-1,ce=1;for(this[$+se]=N&255;--se>=0&&(ce*=256);)this[$+se]=N/ce&255;return $+ee},v.prototype.writeUint8=v.prototype.writeUInt8=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,1,255,0),this[$]=N&255,$+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,2,65535,0),this[$]=N&255,this[$+1]=N>>>8,$+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,2,65535,0),this[$]=N>>>8,this[$+1]=N&255,$+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,4,4294967295,0),this[$+3]=N>>>24,this[$+2]=N>>>16,this[$+1]=N>>>8,this[$]=N&255,$+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,4,4294967295,0),this[$]=N>>>24,this[$+1]=N>>>16,this[$+2]=N>>>8,this[$+3]=N&255,$+4};function T(O,N,$,ee,re){U(N,ee,re,O,$,7);let se=Number(N&BigInt(4294967295));O[$++]=se,se=se>>8,O[$++]=se,se=se>>8,O[$++]=se,se=se>>8,O[$++]=se;let ce=Number(N>>BigInt(32)&BigInt(4294967295));return O[$++]=ce,ce=ce>>8,O[$++]=ce,ce=ce>>8,O[$++]=ce,ce=ce>>8,O[$++]=ce,$}function D(O,N,$,ee,re){U(N,ee,re,O,$,7);let se=Number(N&BigInt(4294967295));O[$+7]=se,se=se>>8,O[$+6]=se,se=se>>8,O[$+5]=se,se=se>>8,O[$+4]=se;let ce=Number(N>>BigInt(32)&BigInt(4294967295));return O[$+3]=ce,ce=ce>>8,O[$+2]=ce,ce=ce>>8,O[$+1]=ce,ce=ce>>8,O[$]=ce,$+8}v.prototype.writeBigUInt64LE=mt(function(N,$=0){return T(this,N,$,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeBigUInt64BE=mt(function(N,$=0){return D(this,N,$,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeIntLE=function(N,$,ee,re){if(N=+N,$=$>>>0,!re){let ye=Math.pow(2,8*ee-1);M(this,N,$,ee,ye-1,-ye)}let se=0,ce=1,st=0;for(this[$]=N&255;++se<ee&&(ce*=256);)N<0&&st===0&&this[$+se-1]!==0&&(st=1),this[$+se]=(N/ce>>0)-st&255;return $+ee},v.prototype.writeIntBE=function(N,$,ee,re){if(N=+N,$=$>>>0,!re){let ye=Math.pow(2,8*ee-1);M(this,N,$,ee,ye-1,-ye)}let se=ee-1,ce=1,st=0;for(this[$+se]=N&255;--se>=0&&(ce*=256);)N<0&&st===0&&this[$+se+1]!==0&&(st=1),this[$+se]=(N/ce>>0)-st&255;return $+ee},v.prototype.writeInt8=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,1,127,-128),N<0&&(N=255+N+1),this[$]=N&255,$+1},v.prototype.writeInt16LE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,2,32767,-32768),this[$]=N&255,this[$+1]=N>>>8,$+2},v.prototype.writeInt16BE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,2,32767,-32768),this[$]=N>>>8,this[$+1]=N&255,$+2},v.prototype.writeInt32LE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,4,2147483647,-2147483648),this[$]=N&255,this[$+1]=N>>>8,this[$+2]=N>>>16,this[$+3]=N>>>24,$+4},v.prototype.writeInt32BE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,4,2147483647,-2147483648),N<0&&(N=4294967295+N+1),this[$]=N>>>24,this[$+1]=N>>>16,this[$+2]=N>>>8,this[$+3]=N&255,$+4},v.prototype.writeBigInt64LE=mt(function(N,$=0){return T(this,N,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),v.prototype.writeBigInt64BE=mt(function(N,$=0){return D(this,N,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Q(O,N,$,ee,re,se){if($+ee>O.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function W(O,N,$,ee,re){return N=+N,$=$>>>0,re||Q(O,N,$,4,34028234663852886e22,-34028234663852886e22),n.write(O,N,$,ee,23,4),$+4}v.prototype.writeFloatLE=function(N,$,ee){return W(this,N,$,!0,ee)},v.prototype.writeFloatBE=function(N,$,ee){return W(this,N,$,!1,ee)};function X(O,N,$,ee,re){return N=+N,$=$>>>0,re||Q(O,N,$,8,17976931348623157e292,-17976931348623157e292),n.write(O,N,$,ee,52,8),$+8}v.prototype.writeDoubleLE=function(N,$,ee){return X(this,N,$,!0,ee)},v.prototype.writeDoubleBE=function(N,$,ee){return X(this,N,$,!1,ee)},v.prototype.copy=function(N,$,ee,re){if(!v.isBuffer(N))throw new TypeError("argument should be a Buffer");if(ee||(ee=0),!re&&re!==0&&(re=this.length),$>=N.length&&($=N.length),$||($=0),re>0&&re<ee&&(re=ee),re===ee||N.length===0||this.length===0)return 0;if($<0)throw new RangeError("targetStart out of bounds");if(ee<0||ee>=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),N.length-$<re-ee&&(re=N.length-$+ee);let se=re-ee;return this===N&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin($,ee,re):Uint8Array.prototype.set.call(N,this.subarray(ee,re),$),se},v.prototype.fill=function(N,$,ee,re){if(typeof N=="string"){if(typeof $=="string"?(re=$,$=0,ee=this.length):typeof ee=="string"&&(re=ee,ee=this.length),re!==void 0&&typeof re!="string")throw new TypeError("encoding must be a string");if(typeof re=="string"&&!v.isEncoding(re))throw new TypeError("Unknown encoding: "+re);if(N.length===1){let ce=N.charCodeAt(0);(re==="utf8"&&ce<128||re==="latin1")&&(N=ce)}}else typeof N=="number"?N=N&255:typeof N=="boolean"&&(N=Number(N));if($<0||this.length<$||this.length<ee)throw new RangeError("Out of range index");if(ee<=$)return this;$=$>>>0,ee=ee===void 0?this.length:ee>>>0,N||(N=0);let se;if(typeof N=="number")for(se=$;se<ee;++se)this[se]=N;else{let ce=v.isBuffer(N)?N:v.from(N,re),st=ce.length;if(st===0)throw new TypeError('The value "'+N+'" is invalid for argument "value"');for(se=0;se<ee-$;++se)this[se+$]=ce[se%st]}return this};var G={};function J(O,N,$){G[O]=class extends ${constructor(){super(),Object.defineProperty(this,"message",{value:N.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${O}]`,this.stack,delete this.name}get code(){return O}set code(re){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:re,writable:!0})}toString(){return`${this.name} [${O}]: ${this.message}`}}}J("ERR_BUFFER_OUT_OF_BOUNDS",function(O){return O?`${O} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),J("ERR_INVALID_ARG_TYPE",function(O,N){return`The "${O}" argument must be of type number. Received type ${typeof N}`},TypeError),J("ERR_OUT_OF_RANGE",function(O,N,$){let ee=`The value of "${O}" is out of range.`,re=$;return Number.isInteger($)&&Math.abs($)>2**32?re=ae(String($)):typeof $=="bigint"&&(re=String($),($>BigInt(2)**BigInt(32)||$<-(BigInt(2)**BigInt(32)))&&(re=ae(re)),re+="n"),ee+=` It must be ${N}. Received ${re}`,ee},RangeError);function ae(O){let N="",$=O.length,ee=O[0]==="-"?1:0;for(;$>=ee+4;$-=3)N=`_${O.slice($-3,$)}${N}`;return`${O.slice(0,$)}${N}`}function te(O,N,$){Z(N,"offset"),(O[N]===void 0||O[N+$]===void 0)&&ie(N,O.length-($+1))}function U(O,N,$,ee,re,se){if(O>$||O<N){let ce=typeof N=="bigint"?"n":"",st;throw se>3?N===0||N===BigInt(0)?st=`>= 0${ce} and < 2${ce} ** ${(se+1)*8}${ce}`:st=`>= -(2${ce} ** ${(se+1)*8-1}${ce}) and < 2 ** ${(se+1)*8-1}${ce}`:st=`>= ${N}${ce} and <= ${$}${ce}`,new G.ERR_OUT_OF_RANGE("value",st,O)}te(ee,re,se)}function Z(O,N){if(typeof O!="number")throw new G.ERR_INVALID_ARG_TYPE(N,"number",O)}function ie(O,N,$){throw Math.floor(O)!==O?(Z(O,$),new G.ERR_OUT_OF_RANGE($||"offset","an integer",O)):N<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE($||"offset",`>= ${$?1:0} and <= ${N}`,O)}var fe=/[^+/0-9A-Za-z-_]/g;function de(O){if(O=O.split("=")[0],O=O.trim().replace(fe,""),O.length<2)return"";for(;O.length%4!==0;)O=O+"=";return O}function he(O,N){N=N||1/0;let $,ee=O.length,re=null,se=[];for(let ce=0;ce<ee;++ce){if($=O.charCodeAt(ce),$>55295&&$<57344){if(!re){if($>56319){(N-=3)>-1&&se.push(239,191,189);continue}else if(ce+1===ee){(N-=3)>-1&&se.push(239,191,189);continue}re=$;continue}if($<56320){(N-=3)>-1&&se.push(239,191,189),re=$;continue}$=(re-55296<<10|$-56320)+65536}else re&&(N-=3)>-1&&se.push(239,191,189);if(re=null,$<128){if((N-=1)<0)break;se.push($)}else if($<2048){if((N-=2)<0)break;se.push($>>6|192,$&63|128)}else if($<65536){if((N-=3)<0)break;se.push($>>12|224,$>>6&63|128,$&63|128)}else if($<1114112){if((N-=4)<0)break;se.push($>>18|240,$>>12&63|128,$>>6&63|128,$&63|128)}else throw new Error("Invalid code point")}return se}function pe(O){let N=[];for(let $=0;$<O.length;++$)N.push(O.charCodeAt($)&255);return N}function De(O,N){let $,ee,re,se=[];for(let ce=0;ce<O.length&&!((N-=2)<0);++ce)$=O.charCodeAt(ce),ee=$>>8,re=$%256,se.push(re),se.push(ee);return se}function Ae(O){return r.toByteArray(de(O))}function _e(O,N,$,ee){let re;for(re=0;re<ee&&!(re+$>=N.length||re>=O.length);++re)N[re+$]=O[re];return re}function ut(O,N){return O instanceof N||O!=null&&O.constructor!=null&&O.constructor.name!=null&&O.constructor.name===N.name}function qe(O){return O!==O}var ke=function(){let O="0123456789abcdef",N=new Array(256);for(let $=0;$<16;++$){let ee=$*16;for(let re=0;re<16;++re)N[ee+re]=O[$]+O[re]}return N}();function mt(O){return typeof BigInt>"u"?ne:O}function ne(){throw new Error("BigInt not supported")}}});function ln(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Ka(e){return function r(n){return arguments.length===0||ln(n)?r:e.apply(this,arguments)}}function Pn(e){return function r(n,h){switch(arguments.length){case 0:return r;case 1:return ln(n)?r:Ka(function(a){return e(n,a)});default:return ln(n)&&ln(h)?r:ln(n)?Ka(function(a){return e(a,h)}):ln(h)?Ka(function(a){return e(n,a)}):e(n,h)}}}function Fb(e,r){switch(e){case 0:return function(){return r.apply(this,arguments)};case 1:return function(n){return r.apply(this,arguments)};case 2:return function(n,h){return r.apply(this,arguments)};case 3:return function(n,h,a){return r.apply(this,arguments)};case 4:return function(n,h,a,d){return r.apply(this,arguments)};case 5:return function(n,h,a,d,l){return r.apply(this,arguments)};case 6:return function(n,h,a,d,l,v){return r.apply(this,arguments)};case 7:return function(n,h,a,d,l,v,w){return r.apply(this,arguments)};case 8:return function(n,h,a,d,l,v,w,m){return r.apply(this,arguments)};case 9:return function(n,h,a,d,l,v,w,m,y){return r.apply(this,arguments)};case 10:return function(n,h,a,d,l,v,w,m,y,g){return r.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function kQ(e,r,n){return function(){for(var h=[],a=0,d=e,l=0,v=!1;l<r.length||a<arguments.length;){var w;l<r.length&&(!ln(r[l])||a>=arguments.length)?w=r[l]:(w=arguments[a],a+=1),h[l]=w,ln(w)?v=!0:d-=1,l+=1}return!v&&d<=0?n.apply(this,h):Fb(Math.max(0,d),kQ(e,h,n))}}var c_e=Pn(function(e,r){return e===1?Ka(r):Fb(e,kQ(e,[],r))}),IQ=c_e;function CR(e){return function r(n,h,a){switch(arguments.length){case 0:return r;case 1:return ln(n)?r:Pn(function(d,l){return e(n,d,l)});case 2:return ln(n)&&ln(h)?r:ln(n)?Pn(function(d,l){return e(d,h,l)}):ln(h)?Pn(function(d,l){return e(n,d,l)}):Ka(function(d){return e(n,h,d)});default:return ln(n)&&ln(h)&&ln(a)?r:ln(n)&&ln(h)?Pn(function(d,l){return e(d,l,a)}):ln(n)&&ln(a)?Pn(function(d,l){return e(d,h,l)}):ln(h)&&ln(a)?Pn(function(d,l){return e(n,d,l)}):ln(n)?Ka(function(d){return e(d,h,a)}):ln(h)?Ka(function(d){return e(n,d,a)}):ln(a)?Ka(function(d){return e(n,h,d)}):e(n,h,a)}}}var LR=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function d_e(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function DR(e,r,n){return function(){if(arguments.length===0)return n();var h=arguments[arguments.length-1];if(!LR(h)){for(var a=0;a<e.length;){if(typeof h[e[a]]=="function")return h[e[a]].apply(h,Array.prototype.slice.call(arguments,0,-1));a+=1}if(d_e(h)){var d=r.apply(null,Array.prototype.slice.call(arguments,0,-1));return d(h)}}return n.apply(this,arguments)}}function p_e(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}var C2={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};function iQ(e){for(var r=[],n;!(n=e.next()).done;)r.push(n.value);return r}function nQ(e,r,n){for(var h=0,a=n.length;h<a;){if(e(r,n[h]))return!0;h+=1}return!1}function v_e(e){var r=String(e).match(/^function (\w*)/);return r==null?"":r[1]}function Rb(e,r){return Object.prototype.hasOwnProperty.call(r,e)}function m_e(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}var sR=typeof Object.is=="function"?Object.is:m_e,aQ=Object.prototype.toString,g_e=function(){return aQ.call(arguments)==="[object Arguments]"?function(e){return aQ.call(e)==="[object Arguments]"}:function(e){return Rb("callee",e)}}(),y_e=g_e,b_e=!{toString:null}.propertyIsEnumerable("toString"),oQ=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],sQ=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),w_e=function(e,r){for(var n=0;n<e.length;){if(e[n]===r)return!0;n+=1}return!1},__e=Ka(typeof Object.keys=="function"&&!sQ?function(e){return Object(e)!==e?[]:Object.keys(e)}:function(e){if(Object(e)!==e)return[];var r,n,h=[],a=sQ&&y_e(e);for(r in e)Rb(r,e)&&(!a||r!=="length")&&(h[h.length]=r);if(b_e)for(n=oQ.length-1;n>=0;)r=oQ[n],Rb(r,e)&&!w_e(h,r)&&(h[h.length]=r),n-=1;return h}),Ld=__e,M_e=Ka(function(e){return e===null?"Null":e===void 0?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}),fQ=M_e;function uQ(e,r,n,h){var a=iQ(e),d=iQ(r);function l(v,w){return $R(v,w,n.slice(),h.slice())}return!nQ(function(v,w){return!nQ(l,w,v)},d,a)}function $R(e,r,n,h){if(sR(e,r))return!0;var a=fQ(e);if(a!==fQ(r))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof r["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](r)&&typeof r["fantasy-land/equals"]=="function"&&r["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof r.equals=="function")return typeof e.equals=="function"&&e.equals(r)&&typeof r.equals=="function"&&r.equals(e);switch(a){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&v_e(e.constructor)==="Promise")return e===r;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof r&&sR(e.valueOf(),r.valueOf())))return!1;break;case"Date":if(!sR(e.valueOf(),r.valueOf()))return!1;break;case"Error":return e.name===r.name&&e.message===r.message;case"RegExp":if(!(e.source===r.source&&e.global===r.global&&e.ignoreCase===r.ignoreCase&&e.multiline===r.multiline&&e.sticky===r.sticky&&e.unicode===r.unicode))return!1;break}for(var d=n.length-1;d>=0;){if(n[d]===e)return h[d]===r;d-=1}switch(a){case"Map":return e.size!==r.size?!1:uQ(e.entries(),r.entries(),n.concat([e]),h.concat([r]));case"Set":return e.size!==r.size?!1:uQ(e.values(),r.values(),n.concat([e]),h.concat([r]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=Ld(e);if(l.length!==Ld(r).length)return!1;var v=n.concat([e]),w=h.concat([r]);for(d=l.length-1;d>=0;){var m=l[d];if(!(Rb(m,r)&&$R(r[m],e[m],v,w)))return!1;d-=1}return!0}var S_e=Pn(function(e,r){return $R(e,r,[],[])}),BQ=S_e;function E_e(e,r,n){var h,a;if(typeof e.indexOf=="function")switch(typeof r){case"number":if(r===0){for(h=1/r;n<e.length;){if(a=e[n],a===0&&1/a===h)return n;n+=1}return-1}else if(r!==r){for(;n<e.length;){if(a=e[n],typeof a=="number"&&a!==a)return n;n+=1}return-1}return e.indexOf(r,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(r,n);case"object":if(r===null)return e.indexOf(r,n)}for(;n<e.length;){if(BQ(e[n],r))return n;n+=1}return-1}function A_e(e,r){return E_e(r,e,0)>=0}function P2(e,r){for(var n=0,h=r.length,a=Array(h);n<h;)a[n]=e(r[n]),n+=1;return a}function fR(e){var r=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+r.replace(/"/g,'\\"')+'"'}var x2=function(e){return(e<10?"0":"")+e},R_e=typeof Date.prototype.toISOString=="function"?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+x2(e.getUTCMonth()+1)+"-"+x2(e.getUTCDate())+"T"+x2(e.getUTCHours())+":"+x2(e.getUTCMinutes())+":"+x2(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"},x_e=R_e;function T_e(e){return function(){return!e.apply(this,arguments)}}function OQ(e,r,n){for(var h=0,a=n.length;h<a;)r=e(r,n[h]),h+=1;return r}function k_e(e,r){for(var n=0,h=r.length,a=[];n<h;)e(r[n])&&(a[a.length]=r[n]),n+=1;return a}function I_e(e){return Object.prototype.toString.call(e)==="[object Object]"}var B_e=function(){function e(r,n){this.xf=n,this.f=r}return e.prototype["@@transducer/init"]=C2.init,e.prototype["@@transducer/result"]=C2.result,e.prototype["@@transducer/step"]=function(r,n){return this.f(n)?this.xf["@@transducer/step"](r,n):r},e}();function O_e(e){return function(r){return new B_e(e,r)}}var P_e=Pn(DR(["fantasy-land/filter","filter"],O_e,function(e,r){return I_e(r)?OQ(function(n,h){return e(r[h])&&(n[h]=r[h]),n},{},Ld(r)):k_e(e,r)})),N_e=P_e,C_e=Pn(function(e,r){return N_e(T_e(e),r)}),L_e=C_e;function PQ(e,r){var n=function(d){var l=r.concat([e]);return A_e(d,l)?"<Circular>":PQ(d,l)},h=function(d,l){return P2(function(v){return fR(v)+": "+n(d[v])},l.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+P2(n,e).join(", ")+"))";case"[object Array]":return"["+P2(n,e).concat(h(e,L_e(function(d){return/^\d+$/.test(d)},Ld(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):fR(x_e(e)))+")";case"[object Map]":return"new Map("+n(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+n(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+n(Array.from(e).sort())+")";case"[object String]":return typeof e=="object"?"new String("+n(e.valueOf())+")":fR(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var a=e.toString();if(a!=="[object Object]")return a}return"{"+h(e,Ld(e)).join(", ")+"}"}}var D_e=Ka(function(e){return PQ(e,[])}),hQ=D_e,$_e=Pn(function(e,r){if(e===r)return r;function n(v,w){if(v>w!=w>v)return w>v?w:v}var h=n(e,r);if(h!==void 0)return h;var a=n(typeof e,typeof r);if(a!==void 0)return a===typeof e?e:r;var d=hQ(e),l=n(d,hQ(r));return l!==void 0&&l===d?e:r}),U_e=$_e,q_e=function(){function e(r,n){this.xf=n,this.f=r}return e.prototype["@@transducer/init"]=C2.init,e.prototype["@@transducer/result"]=C2.result,e.prototype["@@transducer/step"]=function(r,n){return this.xf["@@transducer/step"](r,this.f(n))},e}(),j_e=function(e){return function(r){return new q_e(e,r)}},F_e=j_e,z_e=Pn(DR(["fantasy-land/map","map"],F_e,function(e,r){switch(Object.prototype.toString.call(r)){case"[object Function]":return IQ(r.length,function(){return e.call(this,r.apply(this,arguments))});case"[object Object]":return OQ(function(n,h){return n[h]=e(r[h]),n},{},Ld(r));default:return P2(e,r)}})),H_e=z_e,NQ=Number.isInteger||function(e){return e<<0===e};function CQ(e){return Object.prototype.toString.call(e)==="[object String]"}var K_e=Pn(function(e,r){var n=e<0?r.length+e:e;return CQ(r)?r.charAt(n):r[n]}),LQ=K_e,Z_e=Pn(function(e,r){if(r!=null)return NQ(e)?LQ(e,r):r[e]}),zb=Z_e,W_e=Pn(function(e,r){return H_e(zb(e),r)}),G_e=W_e,V_e=Ka(function(e){return LR(e)?!0:!e||typeof e!="object"||CQ(e)?!1:e.length===0?!0:e.length>0?e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1):!1}),J_e=V_e,lQ=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function Y_e(e,r,n){return function(h,a,d){if(J_e(d))return e(h,a,d);if(d==null)return a;if(typeof d["fantasy-land/reduce"]=="function")return r(h,a,d,"fantasy-land/reduce");if(d[lQ]!=null)return n(h,a,d[lQ]());if(typeof d.next=="function")return n(h,a,d);if(typeof d.reduce=="function")return r(h,a,d,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function X_e(e,r,n){for(var h=0,a=n.length;h<a;){if(r=e["@@transducer/step"](r,n[h]),r&&r["@@transducer/reduced"]){r=r["@@transducer/value"];break}h+=1}return e["@@transducer/result"](r)}var Q_e=Pn(function(e,r){return Fb(e.length,function(){return e.apply(r,arguments)})}),eMe=Q_e;function tMe(e,r,n){for(var h=n.next();!h.done;){if(r=e["@@transducer/step"](r,h.value),r&&r["@@transducer/reduced"]){r=r["@@transducer/value"];break}h=n.next()}return e["@@transducer/result"](r)}function rMe(e,r,n,h){return e["@@transducer/result"](n[h](eMe(e["@@transducer/step"],e),r))}var iMe=Y_e(X_e,rMe,tMe),nMe=iMe,aMe=function(){function e(r){this.f=r}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(r){return r},e.prototype["@@transducer/step"]=function(r,n){return this.f(r,n)},e}();function oMe(e){return new aMe(e)}var sMe=CR(function(e,r,n){return nMe(typeof e=="function"?oMe(e):e,r,n)}),DQ=sMe;function fMe(e,r){return function(){return r.call(this,e.apply(this,arguments))}}function $Q(e,r){return function(){var n=arguments.length;if(n===0)return r();var h=arguments[n-1];return LR(h)||typeof h[e]!="function"?r.apply(this,arguments):h[e].apply(h,Array.prototype.slice.call(arguments,0,n-1))}}var uMe=CR($Q("slice",function(e,r,n){return Array.prototype.slice.call(n,e,r)})),hMe=uMe,lMe=Ka($Q("tail",hMe(1,1/0))),cMe=lMe;function UQ(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return Fb(arguments[0].length,DQ(fMe,arguments[0],cMe(arguments)))}var dMe=Pn(function(e,r){return IQ(DQ(U_e,0,G_e("length",r)),function(){var n=arguments,h=this;return e.apply(h,P2(function(a){return a.apply(h,n)},r))})}),pMe=dMe,vMe=Pn(function(e,r){return r==null||r!==r?e:r}),vR=vMe,mMe=function(){function e(r,n){this.xf=n,this.f=r,this.found=!1}return e.prototype["@@transducer/init"]=C2.init,e.prototype["@@transducer/result"]=function(r){return this.found||(r=this.xf["@@transducer/step"](r,void 0)),this.xf["@@transducer/result"](r)},e.prototype["@@transducer/step"]=function(r,n){return this.f(n)&&(this.found=!0,r=p_e(this.xf["@@transducer/step"](r,n))),r},e}();function gMe(e){return function(r){return new mMe(e,r)}}var yMe=Pn(DR(["find"],gMe,function(e,r){for(var n=0,h=r.length;n<h;){if(e(r[n]))return r[n];n+=1}})),bMe=yMe,wMe=Ka(function(e){return pMe(function(){return Array.prototype.slice.call(arguments,0)},e)}),_Me=wMe,MMe=Pn(function(e,r){return e.map(function(n){for(var h=r,a=0,d;a<n.length;){if(h==null)return;d=n[a],h=NQ(d)?LQ(d,h):h[d],a+=1}return h})}),SMe=MMe,EMe=Pn(function(e,r){return SMe([e],r)[0]}),qQ=EMe,AMe=CR(function(e,r,n){return BQ(e,zb(r,n))}),RMe=AMe,xb=class extends Error{name="InvalidSchedulerLocation"},xMe=class extends Error{name="SchedulerTagNotFound"},TMe=class extends Error{name="TransactionNotFound"},kMe="Url",IMe="Time-To-Live",BMe="Scheduler",mR=e=>UQ(vR([]),bMe(RMe(e,"name")),vR({}),zb("value")),jQ=e=>UQ(r=>{if(!r)throw new TMe(e);return r},zb("tags"),vR([]));function FQ({fetch:e,GRAPHQL_URL:r}){return async({query:n,variables:h})=>e(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n,variables:h})}).then(a=>a.json())}function OMe({fetch:e,GRAPHQL_URL:r}){let n=FQ({fetch:e,GRAPHQL_URL:r}),h=zQ({fetch:e,GRAPHQL_URL:r}),a=`
138
+ ${JSON.stringify(St.from(n))},${JSON.stringify(St.from(h))},${d} => ${JSON.stringify(v)}`;return DX(l,w)}oi.debug=DX});var yb=Ht(No=>{"use strict";Be();Pe();Oe();var l9e=No&&No.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),c9e=No&&No.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),d9e=No&&No.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&l9e(r,e,n);return c9e(r,e),r},p9e=No&&No.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(No,"__esModule",{value:!0});No.Tag=void 0;var Xn=d9e(Xu()),v9e=p9e(PX()),m9e=WA(),gb=class{get(r,n){if(!Object.getOwnPropertyNames(this).includes(r))throw new Error(`Field "${r}" is not a property of the Arweave Transaction class.`);if(this[r]instanceof Uint8Array)return n&&n.decode&&n.string?Xn.bufferToString(this[r]):n&&n.decode&&!n.string?this[r]:Xn.bufferTob64Url(this[r]);if(this[r]instanceof Array){if(n?.decode!==void 0||n?.string!==void 0)throw r==="tags"&&console.warn(`Did you mean to use 'transaction["tags"]' ?`),new Error("Cannot decode or stringify an array.");return this[r]}return n&&n.decode==!0?n&&n.string?Xn.b64UrlToString(this[r]):Xn.b64UrlToBuffer(this[r]):this[r]}},M2=class extends gb{name;value;constructor(r,n,h=!1){super(),this.name=r,this.value=n}};No.Tag=M2;var GA=class extends gb{format=2;id="";last_tx="";owner="";tags=[];target="";quantity="0";data_size="0";data=new Uint8Array;data_root="";reward="0";signature="";chunks;constructor(r={}){super(),Object.assign(this,r),typeof this.data=="string"&&(this.data=Xn.b64UrlToBuffer(this.data)),r.tags&&(this.tags=r.tags.map(n=>new M2(n.name,n.value)))}addTag(r,n){this.tags.push(new M2(Xn.stringToB64Url(r),Xn.stringToB64Url(n)))}toJSON(){return{format:this.format,id:this.id,last_tx:this.last_tx,owner:this.owner,tags:this.tags,target:this.target,quantity:this.quantity,data:Xn.bufferTob64Url(this.data),data_size:this.data_size,data_root:this.data_root,data_tree:this.data_tree,reward:this.reward,signature:this.signature}}setOwner(r){this.owner=r}setSignature({id:r,owner:n,reward:h,tags:a,signature:d}){this.id=r,this.owner=n,h&&(this.reward=h),a&&(this.tags=a),this.signature=d}async prepareChunks(r){!this.chunks&&r.byteLength>0&&(this.chunks=await(0,m9e.generateTransactionChunks)(r),this.data_root=Xn.bufferTob64Url(this.chunks.data_root)),!this.chunks&&r.byteLength===0&&(this.chunks={chunks:[],data_root:new Uint8Array,proofs:[]},this.data_root="")}getChunk(r,n){if(!this.chunks)throw new Error("Chunks have not been prepared");let h=this.chunks.proofs[r],a=this.chunks.chunks[r];return{data_root:this.data_root,data_size:this.data_size,data_path:Xn.bufferTob64Url(h.proof),offset:h.offset.toString(),chunk:Xn.bufferTob64Url(n.slice(a.minByteRange,a.maxByteRange))}}async getSignatureData(){switch(this.format){case 1:let r=this.tags.reduce((h,a)=>Xn.concatBuffers([h,a.get("name",{decode:!0,string:!1}),a.get("value",{decode:!0,string:!1})]),new Uint8Array);return Xn.concatBuffers([this.get("owner",{decode:!0,string:!1}),this.get("target",{decode:!0,string:!1}),this.get("data",{decode:!0,string:!1}),Xn.stringToBuffer(this.quantity),Xn.stringToBuffer(this.reward),this.get("last_tx",{decode:!0,string:!1}),r]);case 2:this.data_root||await this.prepareChunks(this.data);let n=this.tags.map(h=>[h.get("name",{decode:!0,string:!1}),h.get("value",{decode:!0,string:!1})]);return await(0,v9e.default)([Xn.stringToBuffer(this.format.toString()),this.get("owner",{decode:!0,string:!1}),this.get("target",{decode:!0,string:!1}),Xn.stringToBuffer(this.quantity),Xn.stringToBuffer(this.reward),this.get("last_tx",{decode:!0,string:!1}),n,Xn.stringToBuffer(this.data_size),this.get("data_root",{decode:!0,string:!1})]);default:throw new Error(`Unexpected transaction format: ${this.format}`)}}};No.default=GA});var jX=Ht(ks=>{"use strict";Be();Pe();Oe();var g9e=ks&&ks.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),y9e=ks&&ks.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),b9e=ks&&ks.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&g9e(r,e,n);return y9e(r,e),r},w9e=ks&&ks.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ks,"__esModule",{value:!0});ks.TransactionUploader=void 0;var $X=w9e(yb()),_9e=b9e(Xu()),VA=g2(),M9e=WA(),UX=1,S9e=["invalid_json","chunk_too_big","data_path_too_big","offset_too_big","data_size_too_big","chunk_proof_ratio_not_attractive","invalid_proof"],qX=1e3*40,JA=class e{api;chunkIndex=0;txPosted=!1;transaction;lastRequestTimeEnd=0;totalErrors=0;data;lastResponseStatus=0;lastResponseError="";get isComplete(){return this.txPosted&&this.chunkIndex===this.transaction.chunks.chunks.length}get totalChunks(){return this.transaction.chunks.chunks.length}get uploadedChunks(){return this.chunkIndex}get pctComplete(){return Math.trunc(this.uploadedChunks/this.totalChunks*100)}constructor(r,n){if(this.api=r,!n.id)throw new Error("Transaction is not signed");if(!n.chunks)throw new Error("Transaction chunks not prepared");this.data=n.data,this.transaction=new $X.default(Object.assign({},n,{data:new Uint8Array(0)}))}async uploadChunk(r){if(this.isComplete)throw new Error("Upload is already complete");if(this.lastResponseError!==""?this.totalErrors++:this.totalErrors=0,this.totalErrors===100)throw new Error(`Unable to complete upload: ${this.lastResponseStatus}: ${this.lastResponseError}`);let n=this.lastResponseError===""?0:Math.max(this.lastRequestTimeEnd+qX-Date.now(),qX);if(n>0&&(n=n-n*Math.random()*.3,await new Promise(l=>setTimeout(l,n))),this.lastResponseError="",!this.txPosted){await this.postTransaction();return}r&&(this.chunkIndex=r);let h=this.transaction.getChunk(r||this.chunkIndex,this.data);if(!await(0,M9e.validatePath)(this.transaction.chunks.data_root,parseInt(h.offset),0,parseInt(h.data_size),_9e.b64UrlToBuffer(h.data_path)))throw new Error(`Unable to validate chunk ${this.chunkIndex}`);let d=await this.api.post("chunk",this.transaction.getChunk(this.chunkIndex,this.data)).catch(l=>(console.error(l.message),{status:-1,data:{error:l.message}}));if(this.lastRequestTimeEnd=Date.now(),this.lastResponseStatus=d.status,this.lastResponseStatus==200)this.chunkIndex++;else if(this.lastResponseError=(0,VA.getError)(d),S9e.includes(this.lastResponseError))throw new Error(`Fatal error uploading chunk ${this.chunkIndex}: ${this.lastResponseError}`)}static async fromSerialized(r,n,h){if(!n||typeof n.chunkIndex!="number"||typeof n.transaction!="object")throw new Error("Serialized object does not match expected format.");var a=new $X.default(n.transaction);a.chunks||await a.prepareChunks(h);let d=new e(r,a);if(d.chunkIndex=n.chunkIndex,d.lastRequestTimeEnd=n.lastRequestTimeEnd,d.lastResponseError=n.lastResponseError,d.lastResponseStatus=n.lastResponseStatus,d.txPosted=n.txPosted,d.data=h,d.transaction.data_root!==n.transaction.data_root)throw new Error("Data mismatch: Uploader doesn't match provided data.");return d}static async fromTransactionId(r,n){let h=await r.get(`tx/${n}`);if(h.status!==200)throw new Error(`Tx ${n} not found: ${h.status}`);let a=h.data;return a.data=new Uint8Array(0),{txPosted:!0,chunkIndex:0,lastResponseError:"",lastRequestTimeEnd:0,lastResponseStatus:0,transaction:a}}toJSON(){return{chunkIndex:this.chunkIndex,transaction:this.transaction,lastRequestTimeEnd:this.lastRequestTimeEnd,lastResponseStatus:this.lastResponseStatus,lastResponseError:this.lastResponseError,txPosted:this.txPosted}}async postTransaction(){if(this.totalChunks<=UX){this.transaction.data=this.data;let h=await this.api.post("tx",this.transaction).catch(a=>(console.error(a),{status:-1,data:{error:a.message}}));if(this.lastRequestTimeEnd=Date.now(),this.lastResponseStatus=h.status,this.transaction.data=new Uint8Array(0),h.status>=200&&h.status<300){this.txPosted=!0,this.chunkIndex=UX;return}throw this.lastResponseError=(0,VA.getError)(h),new Error(`Unable to upload transaction: ${h.status}, ${this.lastResponseError}`)}let n=await this.api.post("tx",this.transaction);if(this.lastRequestTimeEnd=Date.now(),this.lastResponseStatus=n.status,!(n.status>=200&&n.status<300))throw this.lastResponseError=(0,VA.getError)(n),new Error(`Unable to upload transaction: ${n.status}, ${this.lastResponseError}`);this.txPosted=!0}};ks.TransactionUploader=JA});var bb=Ht((oKe,FX)=>{"use strict";Be();Pe();Oe();FX.exports={}});var HX=Ht(Sf=>{"use strict";Be();Pe();Oe();var E9e=Sf&&Sf.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),A9e=Sf&&Sf.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),R9e=Sf&&Sf.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&E9e(r,e,n);return A9e(r,e),r},zX=Sf&&Sf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sf,"__esModule",{value:!0});var YA=zX(g2()),Qu=zX(yb()),S2=R9e(Xu()),XA=jX();bb();var QA=class{api;crypto;chunks;constructor(r,n,h){this.api=r,this.crypto=n,this.chunks=h}async getTransactionAnchor(){let r=await this.api.get("tx_anchor");if(!r.data.match(/^[a-z0-9_-]{43,}/i)||!r.ok)throw new Error(`Could not getTransactionAnchor. Received: ${r.data}. Status: ${r.status}, ${r.statusText}`);return r.data}async getPrice(r,n){let h=n?`price/${r}/${n}`:`price/${r}`,a=await this.api.get(h);if(!/^\d+$/.test(a.data)||!a.ok)throw new Error(`Could not getPrice. Received: ${a.data}. Status: ${a.status}, ${a.statusText}`);return a.data}async get(r){let n=await this.api.get(`tx/${r}`);if(n.status==200){let h=parseInt(n.data.data_size);if(n.data.format>=2&&h>0&&h<=1024*1024*12){let a=await this.getData(r);return new Qu.default({...n.data,data:a})}return new Qu.default({...n.data,format:n.data.format||1})}throw n.status==404?new YA.default("TX_NOT_FOUND"):n.status==410?new YA.default("TX_FAILED"):new YA.default("TX_INVALID")}fromRaw(r){return new Qu.default(r)}async search(r,n){return this.api.post("arql",{op:"equals",expr1:r,expr2:n}).then(h=>h.data?h.data:[])}getStatus(r){return this.api.get(`tx/${r}/status`).then(n=>n.status==200?{status:200,confirmed:n.data}:{status:n.status,confirmed:null})}async getData(r,n){let h;try{h=await this.chunks.downloadChunkedData(r)}catch(a){console.error(`Error while trying to download chunked data for ${r}`),console.error(a)}if(!h){console.warn(`Falling back to gateway cache for ${r}`);try{let{data:a,ok:d,status:l,statusText:v}=await this.api.get(`/${r}`,{responseType:"arraybuffer"});if(!d)throw new Error("Bad http status code",{cause:{status:l,statusText:v}});h=a}catch(a){console.error(`Error while trying to download contiguous data from gateway cache for ${r}`),console.error(a)}}if(!h)throw new Error(`${r} data was not found!`);return n&&n.decode&&!n.string?h:n&&n.decode&&n.string?S2.bufferToString(h):S2.bufferTob64Url(h)}async sign(r,n,h){let d=typeof n=="object"&&(v=>{let w=!0;return["n","e","d","p","q","dp","dq","qi"].map(m=>!(m in v)&&(w=!1)),w})(n),l=typeof arweaveWallet=="object";if(!d&&!l)throw new Error("No valid JWK or external wallet found to sign transaction.");if(d){r.setOwner(n.n);let v=await r.getSignatureData(),w=await this.crypto.sign(n,v,h),m=await this.crypto.hash(w);r.setSignature({id:S2.bufferTob64Url(m),owner:n.n,signature:S2.bufferTob64Url(w)})}else if(l){try{(await arweaveWallet.getPermissions()).includes("SIGN_TRANSACTION")||await arweaveWallet.connect(["SIGN_TRANSACTION"])}catch{}let v=await arweaveWallet.sign(r,h);r.setSignature({id:v.id,owner:v.owner,reward:v.reward,tags:v.tags,signature:v.signature})}else throw new Error("An error occurred while signing. Check wallet is valid")}async verify(r){let n=await r.getSignatureData(),h=r.get("signature",{decode:!0,string:!1}),a=S2.bufferTob64Url(await this.crypto.hash(h));if(r.id!==a)throw new Error("Invalid transaction signature or ID! The transaction ID doesn't match the expected SHA-256 hash of the signature.");return this.crypto.verify(r.owner,n,h)}async post(r){if(typeof r=="string"?r=new Qu.default(JSON.parse(r)):typeof r.readInt32BE=="function"?r=new Qu.default(JSON.parse(r.toString())):typeof r=="object"&&!(r instanceof Qu.default)&&(r=new Qu.default(r)),!(r instanceof Qu.default))throw new Error("Must be Transaction object");r.chunks||await r.prepareChunks(r.data);let n=await this.getUploader(r,r.data);try{for(;!n.isComplete;)await n.uploadChunk()}catch(h){if(n.lastResponseStatus>0)return{status:n.lastResponseStatus,statusText:n.lastResponseError,data:{error:n.lastResponseError}};throw h}return{status:200,statusText:"OK",data:{}}}async getUploader(r,n){let h;if(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),r instanceof Qu.default){if(n||(n=r.data),!(n instanceof Uint8Array))throw new Error("Data format is invalid");r.chunks||await r.prepareChunks(n),h=new XA.TransactionUploader(this.api,r),(!h.data||h.data.length===0)&&(h.data=n)}else{if(typeof r=="string"&&(r=await XA.TransactionUploader.fromTransactionId(this.api,r)),!n||!(n instanceof Uint8Array))throw new Error("Must provide data when resuming upload");h=await XA.TransactionUploader.fromSerialized(this.api,r,n)}return h}async*upload(r,n){let h=await this.getUploader(r,n);for(;!h.isComplete;)await h.uploadChunk(),yield h;return h}};Sf.default=QA});var ZX=Ht(eh=>{"use strict";Be();Pe();Oe();var x9e=eh&&eh.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),T9e=eh&&eh.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),k9e=eh&&eh.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&x9e(r,e,n);return T9e(r,e),r};Object.defineProperty(eh,"__esModule",{value:!0});var KX=k9e(Xu());bb();var eR=class{api;crypto;constructor(r,n){this.api=r,this.crypto=n}getBalance(r){return this.api.get(`wallet/${r}/balance`).then(n=>n.data)}getLastTransactionID(r){return this.api.get(`wallet/${r}/last_tx`).then(n=>n.data)}generate(){return this.crypto.generateJWK()}async jwkToAddress(r){return!r||r==="use_wallet"?this.getAddress():this.getAddress(r)}async getAddress(r){if(!r||r==="use_wallet"){try{await arweaveWallet.connect(["ACCESS_ADDRESS"])}catch{}return arweaveWallet.getActiveAddress()}else return this.ownerToAddress(r.n)}async ownerToAddress(r){return KX.bufferTob64Url(await this.crypto.hash(KX.b64UrlToBuffer(r)))}};eh.default=eR});var GX=Ht(Ef=>{"use strict";Be();Pe();Oe();var I9e=Ef&&Ef.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),B9e=Ef&&Ef.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),O9e=Ef&&Ef.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&I9e(r,e,n);return B9e(r,e),r};Object.defineProperty(Ef,"__esModule",{value:!0});Ef.SiloResource=void 0;var WX=O9e(Xu()),tR=class{api;crypto;transactions;constructor(r,n,h){this.api=r,this.crypto=n,this.transactions=h}async get(r){if(!r)throw new Error("No Silo URI specified");let n=await this.parseUri(r),h=await this.transactions.search("Silo-Name",n.getAccessKey());if(h.length==0)throw new Error(`No data could be found for the Silo URI: ${r}`);let a=await this.transactions.get(h[0]);if(!a)throw new Error(`No data could be found for the Silo URI: ${r}`);let d=a.get("data",{decode:!0,string:!1});return this.crypto.decrypt(d,n.getEncryptionKey())}async readTransactionData(r,n){if(!n)throw new Error("No Silo URI specified");let h=await this.parseUri(n),a=r.get("data",{decode:!0,string:!1});return this.crypto.decrypt(a,h.getEncryptionKey())}async parseUri(r){let n=r.match(/^([a-z0-9-_]+)\.([0-9]+)/i);if(!n)throw new Error("Invalid Silo name, must be a name in the format of [a-z0-9]+.[0-9]+, e.g. 'bubble.7'");let h=n[1],a=Math.pow(2,parseInt(n[2])),d=await this.hash(WX.stringToBuffer(h),a),l=WX.bufferTob64(d.slice(0,15)),v=await this.hash(d.slice(16,31),1);return new wb(r,l,v)}async hash(r,n){let h=await this.crypto.hash(r);for(let a=0;a<n-1;a++)h=await this.crypto.hash(h);return h}};Ef.default=tR;var wb=class{uri;accessKey;encryptionKey;constructor(r,n,h){this.uri=r,this.accessKey=n,this.encryptionKey=h}getUri(){return this.uri}getAccessKey(){return this.accessKey}getEncryptionKey(){return this.encryptionKey}};Ef.SiloResource=wb});var JX=Ht(th=>{"use strict";Be();Pe();Oe();var P9e=th&&th.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),N9e=th&&th.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),C9e=th&&th.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&P9e(r,e,n);return N9e(r,e),r};Object.defineProperty(th,"__esModule",{value:!0});var VX=g2(),L9e=C9e(Xu()),rR=class{api;constructor(r){this.api=r}async getTransactionOffset(r){let n=await this.api.get(`tx/${r}/offset`);if(n.status===200)return n.data;throw new Error(`Unable to get transaction offset: ${(0,VX.getError)(n)}`)}async getChunk(r){let n=await this.api.get(`chunk/${r}`);if(n.status===200)return n.data;throw new Error(`Unable to get chunk: ${(0,VX.getError)(n)}`)}async getChunkData(r){let n=await this.getChunk(r);return L9e.b64UrlToBuffer(n.chunk)}firstChunkOffset(r){return parseInt(r.offset)-parseInt(r.size)+1}async downloadChunkedData(r){let n=await this.getTransactionOffset(r),h=parseInt(n.size),d=parseInt(n.offset)-h+1,l=new Uint8Array(h),v=0;for(;v<h;){this.api.config.logging&&console.log(`[chunk] ${v}/${h}`);let w;try{w=await this.getChunkData(d+v)}catch{console.error(`[chunk] Failed to fetch chunk at offset ${d+v}`),console.error("[chunk] This could indicate that the chunk wasn't uploaded or hasn't yet seeded properly to a particular gateway/node")}if(w)l.set(w,v),v+=w.length;else throw new Error(`Couldn't complete data download at ${v}/${h}`)}return l}};th.default=rR});var XX=Ht(E2=>{"use strict";Be();Pe();Oe();var D9e=E2&&E2.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(E2,"__esModule",{value:!0});var YX=D9e(g2());bb();var iR=class e{api;network;static HASH_ENDPOINT="block/hash/";static HEIGHT_ENDPOINT="block/height/";constructor(r,n){this.api=r,this.network=n}async get(r){let n=await this.api.get(`${e.HASH_ENDPOINT}${r}`);if(n.status===200)return n.data;throw n.status===404?new YX.default("BLOCK_NOT_FOUND"):new Error(`Error while loading block data: ${n}`)}async getByHeight(r){let n=await this.api.get(`${e.HEIGHT_ENDPOINT}${r}`);if(n.status===200)return n.data;throw n.status===404?new YX.default("BLOCK_NOT_FOUND"):new Error(`Error while loading block data: ${n}`)}async getCurrent(){let{current:r}=await this.network.getInfo();return await this.get(r)}};E2.default=iR});var pb=Ht(Af=>{"use strict";Be();Pe();Oe();var $9e=Af&&Af.__createBinding||(Object.create?function(e,r,n,h){h===void 0&&(h=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(e,h,a)}:function(e,r,n,h){h===void 0&&(h=n),e[h]=r[n]}),U9e=Af&&Af.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),q9e=Af&&Af.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&$9e(r,e,n);return U9e(r,e),r},hu=Af&&Af.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Af,"__esModule",{value:!0});var j9e=hu(Mq()),F9e=hu(Sq()),z9e=hu(yX()),H9e=hu(bX()),K9e=hu(HX()),Z9e=hu(ZX()),QX=hu(yb()),A2=q9e(Xu()),W9e=hu(GX()),G9e=hu(JX()),V9e=hu(XX()),nR=class e{api;wallets;transactions;network;blocks;ar;silo;chunks;static init;static crypto=new z9e.default;static utils=A2;constructor(r){this.api=new F9e.default(r),this.wallets=new Z9e.default(this.api,e.crypto),this.chunks=new G9e.default(this.api),this.transactions=new K9e.default(this.api,e.crypto,this.chunks),this.silo=new W9e.default(this.api,this.crypto,this.transactions),this.network=new H9e.default(this.api),this.blocks=new V9e.default(this.api,this.network),this.ar=new j9e.default}get crypto(){return e.crypto}get utils(){return e.utils}getConfig(){return{api:this.api.getConfig(),crypto:null}}async createTransaction(r,n){let h={};if(Object.assign(h,r),!r.data&&!(r.target&&r.quantity))throw new Error("A new Arweave transaction must have a 'data' value, or 'target' and 'quantity' values.");if(r.owner==null&&n&&n!=="use_wallet"&&(h.owner=n.n),r.last_tx==null&&(h.last_tx=await this.transactions.getTransactionAnchor()),typeof r.data=="string"&&(r.data=A2.stringToBuffer(r.data)),r.data instanceof ArrayBuffer&&(r.data=new Uint8Array(r.data)),r.data&&!(r.data instanceof Uint8Array))throw new Error("Expected data to be a string, Uint8Array or ArrayBuffer");if(r.reward==null){let d=r.data?r.data.byteLength:0;h.reward=await this.transactions.getPrice(d,h.target)}h.data_root="",h.data_size=r.data?r.data.byteLength.toString():"0",h.data=r.data||new Uint8Array(0);let a=new QX.default(h);return await a.getSignatureData(),a}async createSiloTransaction(r,n,h){let a={};if(Object.assign(a,r),!r.data)throw new Error("Silo transactions must have a 'data' value");if(!h)throw new Error("No Silo URI specified.");if(r.target||r.quantity)throw new Error("Silo transactions can only be used for storing data, sending AR to other wallets isn't supported.");if(r.owner==null){if(!n||!n.n)throw new Error("A new Arweave transaction must either have an 'owner' attribute, or you must provide the jwk parameter.");a.owner=n.n}r.last_tx==null&&(a.last_tx=await this.transactions.getTransactionAnchor());let d=await this.silo.parseUri(h);if(typeof r.data=="string"){let v=await this.crypto.encrypt(A2.stringToBuffer(r.data),d.getEncryptionKey());a.reward=await this.transactions.getPrice(v.byteLength),a.data=A2.bufferTob64Url(v)}if(r.data instanceof Uint8Array){let v=await this.crypto.encrypt(r.data,d.getEncryptionKey());a.reward=await this.transactions.getPrice(v.byteLength),a.data=A2.bufferTob64Url(v)}let l=new QX.default(a);return l.addTag("Silo-Name",d.getAccessKey()),l.addTag("Silo-Version","0.1.0"),l}arql(r){return this.api.post("/arql",r).then(n=>n.data||[])}};Af.default=nR});var tQ=Ht((oR,eQ)=>{"use strict";Be();Pe();Oe();var J9e=oR&&oR.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},aR=J9e(pb());aR.default.init=function(e={}){return new aR.default(e)};eQ.exports=aR.default});var xte=Ht((LQe,Rte)=>{"use strict";Be();Pe();Oe();var ATe=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);Rte.exports=e=>!ATe.has(e&&e.code)});var Lte=Ht((pet,Tx)=>{"use strict";Be();Pe();Oe();var LTe=Object.prototype.hasOwnProperty,Wa="~";function cv(){}Object.create&&(cv.prototype=Object.create(null),new cv().__proto__||(Wa=!1));function DTe(e,r,n){this.fn=e,this.context=r,this.once=n||!1}function Cte(e,r,n,h,a){if(typeof n!="function")throw new TypeError("The listener must be a function");var d=new DTe(n,h||e,a),l=Wa?Wa+r:r;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],d]:e._events[l].push(d):(e._events[l]=d,e._eventsCount++),e}function m3(e,r){--e._eventsCount===0?e._events=new cv:delete e._events[r]}function Ca(){this._events=new cv,this._eventsCount=0}Ca.prototype.eventNames=function(){var r=[],n,h;if(this._eventsCount===0)return r;for(h in n=this._events)LTe.call(n,h)&&r.push(Wa?h.slice(1):h);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n)):r};Ca.prototype.listeners=function(r){var n=Wa?Wa+r:r,h=this._events[n];if(!h)return[];if(h.fn)return[h.fn];for(var a=0,d=h.length,l=new Array(d);a<d;a++)l[a]=h[a].fn;return l};Ca.prototype.listenerCount=function(r){var n=Wa?Wa+r:r,h=this._events[n];return h?h.fn?1:h.length:0};Ca.prototype.emit=function(r,n,h,a,d,l){var v=Wa?Wa+r:r;if(!this._events[v])return!1;var w=this._events[v],m=arguments.length,y,g;if(w.fn){switch(w.once&&this.removeListener(r,w.fn,void 0,!0),m){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,n),!0;case 3:return w.fn.call(w.context,n,h),!0;case 4:return w.fn.call(w.context,n,h,a),!0;case 5:return w.fn.call(w.context,n,h,a,d),!0;case 6:return w.fn.call(w.context,n,h,a,d,l),!0}for(g=1,y=new Array(m-1);g<m;g++)y[g-1]=arguments[g];w.fn.apply(w.context,y)}else{var S=w.length,R;for(g=0;g<S;g++)switch(w[g].once&&this.removeListener(r,w[g].fn,void 0,!0),m){case 1:w[g].fn.call(w[g].context);break;case 2:w[g].fn.call(w[g].context,n);break;case 3:w[g].fn.call(w[g].context,n,h);break;case 4:w[g].fn.call(w[g].context,n,h,a);break;default:if(!y)for(R=1,y=new Array(m-1);R<m;R++)y[R-1]=arguments[R];w[g].fn.apply(w[g].context,y)}}return!0};Ca.prototype.on=function(r,n,h){return Cte(this,r,n,h,!1)};Ca.prototype.once=function(r,n,h){return Cte(this,r,n,h,!0)};Ca.prototype.removeListener=function(r,n,h,a){var d=Wa?Wa+r:r;if(!this._events[d])return this;if(!n)return m3(this,d),this;var l=this._events[d];if(l.fn)l.fn===n&&(!a||l.once)&&(!h||l.context===h)&&m3(this,d);else{for(var v=0,w=[],m=l.length;v<m;v++)(l[v].fn!==n||a&&!l[v].once||h&&l[v].context!==h)&&w.push(l[v]);w.length?this._events[d]=w.length===1?w[0]:w:m3(this,d)}return this};Ca.prototype.removeAllListeners=function(r){var n;return r?(n=Wa?Wa+r:r,this._events[n]&&m3(this,n)):(this._events=new cv,this._eventsCount=0),this};Ca.prototype.off=Ca.prototype.removeListener;Ca.prototype.addListener=Ca.prototype.on;Ca.prefixed=Wa;Ca.EventEmitter=Ca;typeof Tx<"u"&&(Tx.exports=Ca)});Be();Pe();Oe();var qte=hc(O8(),1);Be();Pe();Oe();Be();Pe();Oe();var die=["gateway","gateways","prescribedObservers","record","auction","balance","epoch","priceForInteraction"],pie=["delegateStake","decreaseDelegateStake","joinNetwork","increaseOperatorStake","decreaseOperatorStake","updateGatewaySettings","saveObservations","extendRecord","buyRecord","increaseUndernameCount","transfer"],oke=[...die,...pie],ske={GATEWAY:"gateway",GATEWAYS:"gateways",PRESCRIBED_OBSERVERS:"prescribedObservers",DELEGATE_STAKE:"delegateStake",DECREASE_DELEGATE_STAKE:"decreaseDelegateStake",JOIN_NETWORK:"joinNetwork",INCREASE_OPERATOR_STAKE:"increaseOperatorStake",DECREASE_OPERATOR_STAKE:"decreaseOperatorStake",UPDATE_GATEWAY_SETTINGS:"updateGatewaySettings",SAVE_OBSERVATIONS:"saveObservations",EXTEND_RECORD:"extendRecord",INCREASE_UNDERNAME_COUNT:"increaseUndernameCount",RECORD:"record",AUCTION:"auction",TRANSFER:"transfer",BALANCE:"balance",PRICE_FOR_INTERACTION:"priceForInteraction",EPOCH:"epoch",BUY_RECORD:"buyRecord"},vie=(n=>(n.IO="IO",n.MIO="mIO",n))(vie||{}),fke={TRANSFER:"transfer",SET_CONTROLLER:"setController",REMOVE_CONTROLLER:"removeController",SET_NAME:"setName",SET_TICKER:"setTicker",SET_RECORD:"setRecord",REMOVE_RECORD:"removeRecord",BALANCE:"balance",EVOLVE:"evolve"};Be();Pe();Oe();Be();Pe();Oe();Be();Pe();Oe();var nB=new RegExp("^[a-zA-Z0-9_-]{43}$"),mke=new RegExp("^(?:(?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{1,63}$"),gke=new RegExp("^[0-9]{12},[0-9]{13},[a-fA-F0-9]{64}$"),yke=gt.env.ARNS_REGISTRY_TX??"bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U",bke="_NctcA2sRy1-J4OmIQZbYFPM17piNcbdBPH2ncX2RL8",mie="GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6GcRGrHc",wke=mie,yl="agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA",P8=1e6,aB="cbn0KKrBZH7hdNkNokuXLtGryrWM--PjSTBqIzw9Kkk",N8="Flwio4Lr08g6s6uim6lEJNnVGD9ylvz0_aafvpiL8FI",oB="_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA";var C8=class e{constructor(r){this.positiveFiniteInteger=r;if(!Number.isFinite(this.positiveFiniteInteger)||!Number.isInteger(this.positiveFiniteInteger)||this.positiveFiniteInteger<0)throw new Error(`Number must be a non-negative integer value! ${r}`)}[Symbol.toPrimitive](r){return r==="string"&&this.toString(),this.positiveFiniteInteger}plus(r){return new e(this.positiveFiniteInteger+r.positiveFiniteInteger)}minus(r){return new e(this.positiveFiniteInteger-r.positiveFiniteInteger)}isGreaterThan(r){return this.positiveFiniteInteger>r.positiveFiniteInteger}isGreaterThanOrEqualTo(r){return this.positiveFiniteInteger>=r.positiveFiniteInteger}isLessThan(r){return this.positiveFiniteInteger<r.positiveFiniteInteger}isLessThanOrEqualTo(r){return this.positiveFiniteInteger<=r.positiveFiniteInteger}toString(){return`${this.positiveFiniteInteger}`}valueOf(){return this.positiveFiniteInteger}toJSON(){return this.positiveFiniteInteger}equals(r){return this.positiveFiniteInteger===r.positiveFiniteInteger}},L8=class{value;constructor(r){if(!Number.isFinite(r)||r<0)throw new Error("IOToken must be a non-negative finite number");this.value=+r.toFixed(6)}valueOf(){return this.value}toMIO(){return new D8(Math.floor(this.value*P8))}toString(){return`${this.value}`}},D8=class e extends C8{constructor(r){super(r)}multiply(r){let n=Math.floor(this.valueOf()*r.valueOf());return new e(n)}divide(r){if(r.valueOf()===0)throw new Error("Cannot divide by zero");let n=Math.floor(this.valueOf()/r.valueOf());return new e(n)}plus(r){let n=super.plus(r);return new e(n.valueOf())}minus(r){let n=super.minus(r);return new e(n.valueOf())}toIO(){return new L8(this.valueOf()/P8)}};Be();Pe();Oe();Be();Pe();Oe();var sB=e=>nB.test(e);function Bke(e){return e!==void 0&&!isNaN(parseInt(e.toString()))}function dc(e){return"process"in e}function pc(e){return"processId"in e&&typeof e.processId=="string"&&sB(e.processId)===!0}function Dke(e){return e.type==="lease"&&e.endTimestamp!==void 0}Be();Pe();Oe();Be();Pe();Oe();var zs=class extends Error{constructor(r){super(r),this.name=this.constructor.name}},fB=class extends zs{},uB=class extends zs{},hB=class extends zs{constructor(r,n){super(`Failed request: ${r}: ${n}`)}},lB=class extends zs{},mm=class extends zs{},cB=class extends zs{constructor(){super("Invalid signer. Please provide a valid signer to interact with the contract.")}},yh=class extends zs{constructor(){super("Invalid contract configuration")}},dB=class extends zs{constructor(){super("Invalid process configuration")}},pB=class extends zs{};Be();Pe();Oe();var rf=hc(bq(),1);Be();Pe();Oe();var Gc="2.1.0-alpha.2";var Du=class e{logger;silent=!1;static default=new e;constructor({level:r="info"}={}){r==="none"&&(this.silent=!0),typeof window<"u"?this.logger=console:this.logger=(0,rf.createLogger)({level:r,silent:this.silent,defaultMeta:{name:"ar-io-sdk",version:Gc},format:rf.format.combine(rf.format.timestamp(),rf.format.json()),transports:[new rf.transports.Console({format:rf.format.combine(rf.format.timestamp(),rf.format.json())})]})}info(r,...n){this.silent||this.logger.info(r,...n)}warn(r,...n){this.silent||this.logger.warn(r,...n)}error(r,...n){this.silent||this.logger.error(r,...n)}debug(r,...n){this.silent||this.logger.debug(r,...n)}setLogLevel(r){this.silent=r==="none","silent"in this.logger&&(this.logger.silent=r==="none"),"level"in this.logger&&(this.logger.level=r)}};Be();Pe();Oe();var wp=class{static init({signer:r,...n}){if(dc(n)||pc(n))return r?new Qw({signer:r,...n}):new h6(n);throw new yh}},h6=class{process;constructor(r){if(dc(r))this.process=r.process;else if(pc(r))this.process=new So({processId:r.processId});else throw new yh}async getState(){let r=[{name:"Action",value:"State"}];return await this.process.read({tags:r})}async getInfo(){let r=[{name:"Action",value:"Info"}];return await this.process.read({tags:r})}async getRecord({undername:r}){let n=[{name:"Sub-Domain",value:r},{name:"Action",value:"Record"}];return await this.process.read({tags:n})}async getRecords(){let r=[{name:"Action",value:"Records"}];return await this.process.read({tags:r})}async getOwner(){return(await this.getInfo()).Owner}async getControllers(){let r=[{name:"Action",value:"Controllers"}];return await this.process.read({tags:r})}async getName(){return(await this.getInfo()).Name}async getTicker(){return(await this.getInfo()).Ticker}async getBalances(){let r=[{name:"Action",value:"Balances"}];return await this.process.read({tags:r})}async getBalance({address:r}){let n=[{name:"Action",value:"Balance"},{name:"Recipient",value:r}];return await this.process.read({tags:n})}},Qw=class extends h6{signer;constructor({signer:r,...n}){super(n),this.signer=r}async transfer({target:r}){let n=[{name:"Action",value:"Transfer"},{name:"Recipient",value:r}];return this.process.send({tags:n,data:{},signer:this.signer})}async addController({controller:r}){let n=[{name:"Action",value:"Add-Controller"},{name:"Controller",value:r}];return this.process.send({tags:n,data:{},signer:this.signer})}async removeController({controller:r}){let n=[{name:"Action",value:"Remove-Controller"},{name:"Controller",value:r}];return this.process.send({tags:n,data:{},signer:this.signer})}async setRecord({undername:r,transactionId:n,ttlSeconds:h}){return this.process.send({tags:[{name:"Action",value:"Set-Record"},{name:"Sub-Domain",value:r},{name:"Transaction-Id",value:n},{name:"TTL-Seconds",value:h.toString()}],data:{transactionId:n,ttlSeconds:h},signer:this.signer})}async removeRecord({undername:r}){return this.process.send({tags:[{name:"Action",value:"Remove-Record"},{name:"Sub-Domain",value:r}],data:{undername:r},signer:this.signer})}async setTicker({ticker:r}){return this.process.send({tags:[{name:"Action",value:"Set-Ticker"},{name:"Ticker",value:r}],data:{ticker:r},signer:this.signer})}async setName({name:r}){return this.process.send({tags:[{name:"Action",value:"Set-Name"},{name:"Name",value:r}],data:{name:r},signer:this.signer})}};Be();Pe();Oe();Be();Pe();Oe();var rQ=hc(tQ(),1),R2=rQ.default.init({host:"arweave.net",port:443,protocol:"https"});Be();Pe();Oe();Be();Pe();Oe();var Y9e=Object.create,BR=Object.defineProperty,X9e=Object.getOwnPropertyDescriptor,RQ=Object.getOwnPropertyNames,Q9e=Object.getPrototypeOf,e_e=Object.prototype.hasOwnProperty,Co=(e,r)=>function(){return r||(0,e[RQ(e)[0]])((r={exports:{}}).exports,r),r.exports},xQ=(e,r)=>{for(var n in r)BR(e,n,{get:r[n],enumerable:!0})},t_e=(e,r,n,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of RQ(r))!e_e.call(e,a)&&a!==n&&BR(e,a,{get:()=>r[a],enumerable:!(h=X9e(r,a))||h.enumerable});return e},OR=(e,r,n)=>(n=e!=null?Y9e(Q9e(e)):{},t_e(r||!e||!e.__esModule?BR(n,"default",{value:e,enumerable:!0}):n,e)),r_e=Co({"node_modules/obliterator/iterator.js"(e,r){function n(h){if(typeof h!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=h}typeof Symbol<"u"&&(n.prototype[Symbol.iterator]=function(){return this}),n.of=function(){var h=arguments,a=h.length,d=0;return new n(function(){return d>=a?{done:!0}:{done:!1,value:h[d++]}})},n.empty=function(){var h=new n(function(){return{done:!0}});return h},n.fromSequence=function(h){var a=0,d=h.length;return new n(function(){return a>=d?{done:!0}:{done:!1,value:h[a++]}})},n.is=function(h){return h instanceof n?!0:typeof h=="object"&&h!==null&&typeof h.next=="function"},r.exports=n}}),i_e=Co({"node_modules/obliterator/support.js"(e){e.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",e.SYMBOL_SUPPORT=typeof Symbol<"u"}}),PR=Co({"node_modules/obliterator/foreach.js"(e,r){var n=i_e(),h=n.ARRAY_BUFFER_SUPPORT,a=n.SYMBOL_SUPPORT;r.exports=function(l,v){var w,m,y,g,S;if(!l)throw new Error("obliterator/forEach: invalid iterable.");if(typeof v!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(l)||h&&ArrayBuffer.isView(l)||typeof l=="string"||l.toString()==="[object Arguments]"){for(y=0,g=l.length;y<g;y++)v(l[y],y);return}if(typeof l.forEach=="function"){l.forEach(v);return}if(a&&Symbol.iterator in l&&typeof l.next!="function"&&(l=l[Symbol.iterator]()),typeof l.next=="function"){for(w=l,y=0;S=w.next(),S.done!==!0;)v(S.value,y),y++;return}for(m in l)l.hasOwnProperty(m)&&v(l[m],m)}}}),NR=Co({"node_modules/mnemonist/utils/typed-arrays.js"(e){var r=Math.pow(2,8)-1,n=Math.pow(2,16)-1,h=Math.pow(2,32)-1,a=Math.pow(2,7)-1,d=Math.pow(2,15)-1,l=Math.pow(2,31)-1;e.getPointerArray=function(w){var m=w-1;if(m<=r)return Uint8Array;if(m<=n)return Uint16Array;if(m<=h)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},e.getSignedPointerArray=function(w){var m=w-1;return m<=a?Int8Array:m<=d?Int16Array:m<=l?Int32Array:Float64Array},e.getNumberType=function(w){return w===(w|0)?Math.sign(w)===-1?w<=127&&w>=-128?Int8Array:w<=32767&&w>=-32768?Int16Array:Int32Array:w<=255?Uint8Array:w<=65535?Uint16Array:Uint32Array:Float64Array};var v={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(w,m){var y=null,g=0,S,R,A,k,I;for(k=0,I=w.length;k<I;k++)A=m?m(w[k]):w[k],R=e.getNumberType(A),S=v[R.name],S>g&&(g=S,y=R);return y},e.isTypedArray=function(w){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(w)},e.concat=function(){var w=0,m,y,g;for(m=0,g=arguments.length;m<g;m++)w+=arguments[m].length;var S=new arguments[0].constructor(w);for(m=0,y=0;m<g;m++)S.set(arguments[m],y),y+=arguments[m].length;return S},e.indices=function(w){for(var m=e.getPointerArray(w),y=new m(w),g=0;g<w;g++)y[g]=g;return y}}}),TQ=Co({"node_modules/mnemonist/utils/iterables.js"(e){var r=PR(),n=NR();function h(v){return Array.isArray(v)||n.isTypedArray(v)}function a(v){if(typeof v.length=="number")return v.length;if(typeof v.size=="number")return v.size}function d(v){var w=a(v),m=typeof w=="number"?new Array(w):[],y=0;return r(v,function(g){m[y++]=g}),m}function l(v){var w=a(v),m=typeof w=="number"?n.getPointerArray(w):Array,y=typeof w=="number"?new Array(w):[],g=typeof w=="number"?new m(w):[],S=0;return r(v,function(R){y[S]=R,g[S]=S++}),[y,g]}e.isArrayLike=h,e.guessLength=a,e.toArray=d,e.toArrayWithIndices=l}}),n_e=Co({"node_modules/mnemonist/lru-cache.js"(e,r){var n=r_e(),h=PR(),a=NR(),d=TQ();function l(v,w,m){if(arguments.length<2&&(m=v,v=null,w=null),this.capacity=m,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-cache: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-cache: capacity should be a finite positive integer.");var y=a.getPointerArray(m);this.forward=new y(m),this.backward=new y(m),this.K=typeof v=="function"?new v(m):new Array(m),this.V=typeof w=="function"?new w(m):new Array(m),this.size=0,this.head=0,this.tail=0,this.items={}}l.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},l.prototype.splayOnTop=function(v){var w=this.head;if(this.head===v)return this;var m=this.backward[v],y=this.forward[v];return this.tail===v?this.tail=m:this.backward[y]=m,this.forward[m]=y,this.backward[w]=v,this.head=v,this.forward[v]=w,this},l.prototype.set=function(v,w){var m=this.items[v];if(typeof m<"u"){this.splayOnTop(m),this.V[m]=w;return}this.size<this.capacity?m=this.size++:(m=this.tail,this.tail=this.backward[m],delete this.items[this.K[m]]),this.items[v]=m,this.K[m]=v,this.V[m]=w,this.forward[m]=this.head,this.backward[this.head]=m,this.head=m},l.prototype.setpop=function(v,w){var m=null,y=null,g=this.items[v];return typeof g<"u"?(this.splayOnTop(g),m=this.V[g],this.V[g]=w,{evicted:!1,key:v,value:m}):(this.size<this.capacity?g=this.size++:(g=this.tail,this.tail=this.backward[g],m=this.V[g],y=this.K[g],delete this.items[y]),this.items[v]=g,this.K[g]=v,this.V[g]=w,this.forward[g]=this.head,this.backward[this.head]=g,this.head=g,y?{evicted:!0,key:y,value:m}:null)},l.prototype.has=function(v){return v in this.items},l.prototype.get=function(v){var w=this.items[v];if(!(typeof w>"u"))return this.splayOnTop(w),this.V[w]},l.prototype.peek=function(v){var w=this.items[v];if(!(typeof w>"u"))return this.V[w]},l.prototype.forEach=function(v,w){w=arguments.length>1?w:this;for(var m=0,y=this.size,g=this.head,S=this.K,R=this.V,A=this.forward;m<y;)v.call(w,R[g],S[g],this),g=A[g],m++},l.prototype.keys=function(){var v=0,w=this.size,m=this.head,y=this.K,g=this.forward;return new n(function(){if(v>=w)return{done:!0};var S=y[m];return v++,v<w&&(m=g[m]),{done:!1,value:S}})},l.prototype.values=function(){var v=0,w=this.size,m=this.head,y=this.V,g=this.forward;return new n(function(){if(v>=w)return{done:!0};var S=y[m];return v++,v<w&&(m=g[m]),{done:!1,value:S}})},l.prototype.entries=function(){var v=0,w=this.size,m=this.head,y=this.K,g=this.V,S=this.forward;return new n(function(){if(v>=w)return{done:!0};var R=y[m],A=g[m];return v++,v<w&&(m=S[m]),{done:!1,value:[R,A]}})},typeof Symbol<"u"&&(l.prototype[Symbol.iterator]=l.prototype.entries),l.prototype.inspect=function(){for(var v=new Map,w=this.entries(),m;m=w.next(),!m.done;)v.set(m.value[0],m.value[1]);return Object.defineProperty(v,"constructor",{value:l,enumerable:!1}),v},typeof Symbol<"u"&&(l.prototype[Symbol.for("nodejs.util.inspect.custom")]=l.prototype.inspect),l.from=function(v,w,m,y){if(arguments.length<2){if(y=d.guessLength(v),typeof y!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(y=w,w=null,m=null);var g=new l(w,m,y);return h(v,function(S,R){g.set(R,S)}),g},r.exports=l}}),a_e=Co({"node_modules/mnemonist/lru-map.js"(e,r){var n=n_e(),h=PR(),a=NR(),d=TQ();function l(v,w,m){if(arguments.length<2&&(m=v,v=null,w=null),this.capacity=m,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-map: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-map: capacity should be a finite positive integer.");var y=a.getPointerArray(m);this.forward=new y(m),this.backward=new y(m),this.K=typeof v=="function"?new v(m):new Array(m),this.V=typeof w=="function"?new w(m):new Array(m),this.size=0,this.head=0,this.tail=0,this.items=new Map}l.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},l.prototype.set=function(v,w){var m=this.items.get(v);if(typeof m<"u"){this.splayOnTop(m),this.V[m]=w;return}this.size<this.capacity?m=this.size++:(m=this.tail,this.tail=this.backward[m],this.items.delete(this.K[m])),this.items.set(v,m),this.K[m]=v,this.V[m]=w,this.forward[m]=this.head,this.backward[this.head]=m,this.head=m},l.prototype.setpop=function(v,w){var m=null,y=null,g=this.items.get(v);return typeof g<"u"?(this.splayOnTop(g),m=this.V[g],this.V[g]=w,{evicted:!1,key:v,value:m}):(this.size<this.capacity?g=this.size++:(g=this.tail,this.tail=this.backward[g],m=this.V[g],y=this.K[g],this.items.delete(y)),this.items.set(v,g),this.K[g]=v,this.V[g]=w,this.forward[g]=this.head,this.backward[this.head]=g,this.head=g,y?{evicted:!0,key:y,value:m}:null)},l.prototype.has=function(v){return this.items.has(v)},l.prototype.get=function(v){var w=this.items.get(v);if(!(typeof w>"u"))return this.splayOnTop(w),this.V[w]},l.prototype.peek=function(v){var w=this.items.get(v);if(!(typeof w>"u"))return this.V[w]},l.prototype.splayOnTop=n.prototype.splayOnTop,l.prototype.forEach=n.prototype.forEach,l.prototype.keys=n.prototype.keys,l.prototype.values=n.prototype.values,l.prototype.entries=n.prototype.entries,typeof Symbol<"u"&&(l.prototype[Symbol.iterator]=l.prototype.entries),l.prototype.inspect=n.prototype.inspect,l.from=function(v,w,m,y){if(arguments.length<2){if(y=d.guessLength(v),typeof y!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(y=w,w=null,m=null);var g=new l(w,m,y);return h(v,function(S,R){g.set(R,S)}),g},r.exports=l}}),o_e=Co({"node_modules/ms/index.js"(e,r){var n=1e3,h=n*60,a=h*60,d=a*24,l=d*7,v=d*365.25;r.exports=function(S,R){R=R||{};var A=typeof S;if(A==="string"&&S.length>0)return w(S);if(A==="number"&&isFinite(S))return R.long?y(S):m(S);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(S))};function w(S){if(S=String(S),!(S.length>100)){var R=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(S);if(R){var A=parseFloat(R[1]),k=(R[2]||"ms").toLowerCase();switch(k){case"years":case"year":case"yrs":case"yr":case"y":return A*v;case"weeks":case"week":case"w":return A*l;case"days":case"day":case"d":return A*d;case"hours":case"hour":case"hrs":case"hr":case"h":return A*a;case"minutes":case"minute":case"mins":case"min":case"m":return A*h;case"seconds":case"second":case"secs":case"sec":case"s":return A*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return A;default:return}}}}function m(S){var R=Math.abs(S);return R>=d?Math.round(S/d)+"d":R>=a?Math.round(S/a)+"h":R>=h?Math.round(S/h)+"m":R>=n?Math.round(S/n)+"s":S+"ms"}function y(S){var R=Math.abs(S);return R>=d?g(S,R,d,"day"):R>=a?g(S,R,a,"hour"):R>=h?g(S,R,h,"minute"):R>=n?g(S,R,n,"second"):S+" ms"}function g(S,R,A,k){var I=R>=A*1.5;return Math.round(S/A)+" "+k+(I?"s":"")}}}),s_e=Co({"node_modules/debug/src/common.js"(e,r){function n(h){d.debug=d,d.default=d,d.coerce=g,d.disable=w,d.enable=v,d.enabled=m,d.humanize=o_e(),d.destroy=S,Object.keys(h).forEach(R=>{d[R]=h[R]}),d.names=[],d.skips=[],d.formatters={};function a(R){let A=0;for(let k=0;k<R.length;k++)A=(A<<5)-A+R.charCodeAt(k),A|=0;return d.colors[Math.abs(A)%d.colors.length]}d.selectColor=a;function d(R){let A,k=null,I,B;function P(...C){if(!P.enabled)return;let q=P,K=Number(new Date),V=K-(A||K);q.diff=V,q.prev=A,q.curr=K,A=K,C[0]=d.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let j=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(Y,E)=>{if(Y==="%%")return"%";j++;let i=d.formatters[E];if(typeof i=="function"){let s=C[j];Y=i.call(q,s),C.splice(j,1),j--}return Y}),d.formatArgs.call(q,C),(q.log||d.log).apply(q,C)}return P.namespace=R,P.useColors=d.useColors(),P.color=d.selectColor(R),P.extend=l,P.destroy=d.destroy,Object.defineProperty(P,"enabled",{enumerable:!0,configurable:!1,get:()=>k!==null?k:(I!==d.namespaces&&(I=d.namespaces,B=d.enabled(R)),B),set:C=>{k=C}}),typeof d.init=="function"&&d.init(P),P}function l(R,A){let k=d(this.namespace+(typeof A>"u"?":":A)+R);return k.log=this.log,k}function v(R){d.save(R),d.namespaces=R,d.names=[],d.skips=[];let A,k=(typeof R=="string"?R:"").split(/[\s,]+/),I=k.length;for(A=0;A<I;A++)k[A]&&(R=k[A].replace(/\*/g,".*?"),R[0]==="-"?d.skips.push(new RegExp("^"+R.slice(1)+"$")):d.names.push(new RegExp("^"+R+"$")))}function w(){let R=[...d.names.map(y),...d.skips.map(y).map(A=>"-"+A)].join(",");return d.enable(""),R}function m(R){if(R[R.length-1]==="*")return!0;let A,k;for(A=0,k=d.skips.length;A<k;A++)if(d.skips[A].test(R))return!1;for(A=0,k=d.names.length;A<k;A++)if(d.names[A].test(R))return!0;return!1}function y(R){return R.toString().substring(2,R.toString().length-2).replace(/\.\*\?$/,"*")}function g(R){return R instanceof Error?R.stack||R.message:R}function S(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return d.enable(d.load()),d}r.exports=n}}),f_e=Co({"node_modules/debug/src/browser.js"(e,r){e.formatArgs=h,e.save=a,e.load=d,e.useColors=n,e.storage=l(),e.destroy=(()=>{let w=!1;return()=>{w||(w=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function h(w){if(w[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+w[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),!this.useColors)return;let m="color: "+this.color;w.splice(1,0,m,"color: inherit");let y=0,g=0;w[0].replace(/%[a-zA-Z%]/g,S=>{S!=="%%"&&(y++,S==="%c"&&(g=y))}),w.splice(g,0,m)}e.log=console.debug||console.log||(()=>{});function a(w){try{w?e.storage.setItem("debug",w):e.storage.removeItem("debug")}catch{}}function d(){let w;try{w=e.storage.getItem("debug")}catch{}return!w&&typeof gt<"u"&&"env"in gt&&(w=gt.env.DEBUG),w}function l(){try{return localStorage}catch{}}r.exports=s_e()(e);var{formatters:v}=r.exports;v.j=function(w){try{return JSON.stringify(w)}catch(m){return"[UnexpectedJSONParseError]: "+m.message}}}}),u_e=Co({"node_modules/base64-js/index.js"(e){"use strict";e.byteLength=w,e.toByteArray=y,e.fromByteArray=R;var r=[],n=[],h=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(d=0,l=a.length;d<l;++d)r[d]=a[d],n[a.charCodeAt(d)]=d;var d,l;n[45]=62,n[95]=63;function v(A){var k=A.length;if(k%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var I=A.indexOf("=");I===-1&&(I=k);var B=I===k?0:4-I%4;return[I,B]}function w(A){var k=v(A),I=k[0],B=k[1];return(I+B)*3/4-B}function m(A,k,I){return(k+I)*3/4-I}function y(A){var k,I=v(A),B=I[0],P=I[1],C=new h(m(A,B,P)),q=0,K=P>0?B-4:B,V;for(V=0;V<K;V+=4)k=n[A.charCodeAt(V)]<<18|n[A.charCodeAt(V+1)]<<12|n[A.charCodeAt(V+2)]<<6|n[A.charCodeAt(V+3)],C[q++]=k>>16&255,C[q++]=k>>8&255,C[q++]=k&255;return P===2&&(k=n[A.charCodeAt(V)]<<2|n[A.charCodeAt(V+1)]>>4,C[q++]=k&255),P===1&&(k=n[A.charCodeAt(V)]<<10|n[A.charCodeAt(V+1)]<<4|n[A.charCodeAt(V+2)]>>2,C[q++]=k>>8&255,C[q++]=k&255),C}function g(A){return r[A>>18&63]+r[A>>12&63]+r[A>>6&63]+r[A&63]}function S(A,k,I){for(var B,P=[],C=k;C<I;C+=3)B=(A[C]<<16&16711680)+(A[C+1]<<8&65280)+(A[C+2]&255),P.push(g(B));return P.join("")}function R(A){for(var k,I=A.length,B=I%3,P=[],C=16383,q=0,K=I-B;q<K;q+=C)P.push(S(A,q,q+C>K?K:q+C));return B===1?(k=A[I-1],P.push(r[k>>2]+r[k<<4&63]+"==")):B===2&&(k=(A[I-2]<<8)+A[I-1],P.push(r[k>>10]+r[k>>4&63]+r[k<<2&63]+"=")),P.join("")}}}),h_e=Co({"node_modules/ieee754/index.js"(e){e.read=function(r,n,h,a,d){var l,v,w=d*8-a-1,m=(1<<w)-1,y=m>>1,g=-7,S=h?d-1:0,R=h?-1:1,A=r[n+S];for(S+=R,l=A&(1<<-g)-1,A>>=-g,g+=w;g>0;l=l*256+r[n+S],S+=R,g-=8);for(v=l&(1<<-g)-1,l>>=-g,g+=a;g>0;v=v*256+r[n+S],S+=R,g-=8);if(l===0)l=1-y;else{if(l===m)return v?NaN:(A?-1:1)*(1/0);v=v+Math.pow(2,a),l=l-y}return(A?-1:1)*v*Math.pow(2,l-a)},e.write=function(r,n,h,a,d,l){var v,w,m,y=l*8-d-1,g=(1<<y)-1,S=g>>1,R=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=a?0:l-1,k=a?1:-1,I=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(w=isNaN(n)?1:0,v=g):(v=Math.floor(Math.log(n)/Math.LN2),n*(m=Math.pow(2,-v))<1&&(v--,m*=2),v+S>=1?n+=R/m:n+=R*Math.pow(2,1-S),n*m>=2&&(v++,m/=2),v+S>=g?(w=0,v=g):v+S>=1?(w=(n*m-1)*Math.pow(2,d),v=v+S):(w=n*Math.pow(2,S-1)*Math.pow(2,d),v=0));d>=8;r[h+A]=w&255,A+=k,w/=256,d-=8);for(v=v<<d|w,y+=d;y>0;r[h+A]=v&255,A+=k,v/=256,y-=8);r[h+A-k]|=I*128}}}),l_e=Co({"node_modules/buffer/index.js"(e){"use strict";var r=u_e(),n=h_e(),h=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=v,e.SlowBuffer=P,e.INSPECT_MAX_BYTES=50;var a=2147483647;e.kMaxLength=a,v.TYPED_ARRAY_SUPPORT=d(),!v.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function d(){try{let O=new Uint8Array(1),N={foo:function(){return 42}};return Object.setPrototypeOf(N,Uint8Array.prototype),Object.setPrototypeOf(O,N),O.foo()===42}catch{return!1}}Object.defineProperty(v.prototype,"parent",{enumerable:!0,get:function(){if(v.isBuffer(this))return this.buffer}}),Object.defineProperty(v.prototype,"offset",{enumerable:!0,get:function(){if(v.isBuffer(this))return this.byteOffset}});function l(O){if(O>a)throw new RangeError('The value "'+O+'" is invalid for option "size"');let N=new Uint8Array(O);return Object.setPrototypeOf(N,v.prototype),N}function v(O,N,$){if(typeof O=="number"){if(typeof N=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(O)}return w(O,N,$)}v.poolSize=8192;function w(O,N,$){if(typeof O=="string")return S(O,N);if(ArrayBuffer.isView(O))return A(O);if(O==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O);if(ut(O,ArrayBuffer)||O&&ut(O.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ut(O,SharedArrayBuffer)||O&&ut(O.buffer,SharedArrayBuffer)))return k(O,N,$);if(typeof O=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let ee=O.valueOf&&O.valueOf();if(ee!=null&&ee!==O)return v.from(ee,N,$);let re=I(O);if(re)return re;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof O[Symbol.toPrimitive]=="function")return v.from(O[Symbol.toPrimitive]("string"),N,$);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O)}v.from=function(O,N,$){return w(O,N,$)},Object.setPrototypeOf(v.prototype,Uint8Array.prototype),Object.setPrototypeOf(v,Uint8Array);function m(O){if(typeof O!="number")throw new TypeError('"size" argument must be of type number');if(O<0)throw new RangeError('The value "'+O+'" is invalid for option "size"')}function y(O,N,$){return m(O),O<=0?l(O):N!==void 0?typeof $=="string"?l(O).fill(N,$):l(O).fill(N):l(O)}v.alloc=function(O,N,$){return y(O,N,$)};function g(O){return m(O),l(O<0?0:B(O)|0)}v.allocUnsafe=function(O){return g(O)},v.allocUnsafeSlow=function(O){return g(O)};function S(O,N){if((typeof N!="string"||N==="")&&(N="utf8"),!v.isEncoding(N))throw new TypeError("Unknown encoding: "+N);let $=C(O,N)|0,ee=l($),re=ee.write(O,N);return re!==$&&(ee=ee.slice(0,re)),ee}function R(O){let N=O.length<0?0:B(O.length)|0,$=l(N);for(let ee=0;ee<N;ee+=1)$[ee]=O[ee]&255;return $}function A(O){if(ut(O,Uint8Array)){let N=new Uint8Array(O);return k(N.buffer,N.byteOffset,N.byteLength)}return R(O)}function k(O,N,$){if(N<0||O.byteLength<N)throw new RangeError('"offset" is outside of buffer bounds');if(O.byteLength<N+($||0))throw new RangeError('"length" is outside of buffer bounds');let ee;return N===void 0&&$===void 0?ee=new Uint8Array(O):$===void 0?ee=new Uint8Array(O,N):ee=new Uint8Array(O,N,$),Object.setPrototypeOf(ee,v.prototype),ee}function I(O){if(v.isBuffer(O)){let N=B(O.length)|0,$=l(N);return $.length===0||O.copy($,0,0,N),$}if(O.length!==void 0)return typeof O.length!="number"||qe(O.length)?l(0):R(O);if(O.type==="Buffer"&&Array.isArray(O.data))return R(O.data)}function B(O){if(O>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return O|0}function P(O){return+O!=O&&(O=0),v.alloc(+O)}v.isBuffer=function(N){return N!=null&&N._isBuffer===!0&&N!==v.prototype},v.compare=function(N,$){if(ut(N,Uint8Array)&&(N=v.from(N,N.offset,N.byteLength)),ut($,Uint8Array)&&($=v.from($,$.offset,$.byteLength)),!v.isBuffer(N)||!v.isBuffer($))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(N===$)return 0;let ee=N.length,re=$.length;for(let se=0,ce=Math.min(ee,re);se<ce;++se)if(N[se]!==$[se]){ee=N[se],re=$[se];break}return ee<re?-1:re<ee?1:0},v.isEncoding=function(N){switch(String(N).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},v.concat=function(N,$){if(!Array.isArray(N))throw new TypeError('"list" argument must be an Array of Buffers');if(N.length===0)return v.alloc(0);let ee;if($===void 0)for($=0,ee=0;ee<N.length;++ee)$+=N[ee].length;let re=v.allocUnsafe($),se=0;for(ee=0;ee<N.length;++ee){let ce=N[ee];if(ut(ce,Uint8Array))se+ce.length>re.length?(v.isBuffer(ce)||(ce=v.from(ce)),ce.copy(re,se)):Uint8Array.prototype.set.call(re,ce,se);else if(v.isBuffer(ce))ce.copy(re,se);else throw new TypeError('"list" argument must be an Array of Buffers');se+=ce.length}return re};function C(O,N){if(v.isBuffer(O))return O.length;if(ArrayBuffer.isView(O)||ut(O,ArrayBuffer))return O.byteLength;if(typeof O!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof O);let $=O.length,ee=arguments.length>2&&arguments[2]===!0;if(!ee&&$===0)return 0;let re=!1;for(;;)switch(N){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":return he(O).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $*2;case"hex":return $>>>1;case"base64":return Ae(O).length;default:if(re)return ee?-1:he(O).length;N=(""+N).toLowerCase(),re=!0}}v.byteLength=C;function q(O,N,$){let ee=!1;if((N===void 0||N<0)&&(N=0),N>this.length||(($===void 0||$>this.length)&&($=this.length),$<=0)||($>>>=0,N>>>=0,$<=N))return"";for(O||(O="utf8");;)switch(O){case"hex":return t(this,N,$);case"utf8":case"utf-8":return c(this,N,$);case"ascii":return x(this,N,$);case"latin1":case"binary":return o(this,N,$);case"base64":return f(this,N,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u(this,N,$);default:if(ee)throw new TypeError("Unknown encoding: "+O);O=(O+"").toLowerCase(),ee=!0}}v.prototype._isBuffer=!0;function K(O,N,$){let ee=O[N];O[N]=O[$],O[$]=ee}v.prototype.swap16=function(){let N=this.length;if(N%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let $=0;$<N;$+=2)K(this,$,$+1);return this},v.prototype.swap32=function(){let N=this.length;if(N%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let $=0;$<N;$+=4)K(this,$,$+3),K(this,$+1,$+2);return this},v.prototype.swap64=function(){let N=this.length;if(N%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let $=0;$<N;$+=8)K(this,$,$+7),K(this,$+1,$+6),K(this,$+2,$+5),K(this,$+3,$+4);return this},v.prototype.toString=function(){let N=this.length;return N===0?"":arguments.length===0?c(this,0,N):q.apply(this,arguments)},v.prototype.toLocaleString=v.prototype.toString,v.prototype.equals=function(N){if(!v.isBuffer(N))throw new TypeError("Argument must be a Buffer");return this===N?!0:v.compare(this,N)===0},v.prototype.inspect=function(){let N="",$=e.INSPECT_MAX_BYTES;return N=this.toString("hex",0,$).replace(/(.{2})/g,"$1 ").trim(),this.length>$&&(N+=" ... "),"<Buffer "+N+">"},h&&(v.prototype[h]=v.prototype.inspect),v.prototype.compare=function(N,$,ee,re,se){if(ut(N,Uint8Array)&&(N=v.from(N,N.offset,N.byteLength)),!v.isBuffer(N))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof N);if($===void 0&&($=0),ee===void 0&&(ee=N?N.length:0),re===void 0&&(re=0),se===void 0&&(se=this.length),$<0||ee>N.length||re<0||se>this.length)throw new RangeError("out of range index");if(re>=se&&$>=ee)return 0;if(re>=se)return-1;if($>=ee)return 1;if($>>>=0,ee>>>=0,re>>>=0,se>>>=0,this===N)return 0;let ce=se-re,st=ee-$,ye=Math.min(ce,st),be=this.slice(re,se),me=N.slice($,ee);for(let Te=0;Te<ye;++Te)if(be[Te]!==me[Te]){ce=be[Te],st=me[Te];break}return ce<st?-1:st<ce?1:0};function V(O,N,$,ee,re){if(O.length===0)return-1;if(typeof $=="string"?(ee=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,qe($)&&($=re?0:O.length-1),$<0&&($=O.length+$),$>=O.length){if(re)return-1;$=O.length-1}else if($<0)if(re)$=0;else return-1;if(typeof N=="string"&&(N=v.from(N,ee)),v.isBuffer(N))return N.length===0?-1:j(O,N,$,ee,re);if(typeof N=="number")return N=N&255,typeof Uint8Array.prototype.indexOf=="function"?re?Uint8Array.prototype.indexOf.call(O,N,$):Uint8Array.prototype.lastIndexOf.call(O,N,$):j(O,[N],$,ee,re);throw new TypeError("val must be string, number or Buffer")}function j(O,N,$,ee,re){let se=1,ce=O.length,st=N.length;if(ee!==void 0&&(ee=String(ee).toLowerCase(),ee==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(O.length<2||N.length<2)return-1;se=2,ce/=2,st/=2,$/=2}function ye(me,Te){return se===1?me[Te]:me.readUInt16BE(Te*se)}let be;if(re){let me=-1;for(be=$;be<ce;be++)if(ye(O,be)===ye(N,me===-1?0:be-me)){if(me===-1&&(me=be),be-me+1===st)return me*se}else me!==-1&&(be-=be-me),me=-1}else for($+st>ce&&($=ce-st),be=$;be>=0;be--){let me=!0;for(let Te=0;Te<st;Te++)if(ye(O,be+Te)!==ye(N,Te)){me=!1;break}if(me)return be}return-1}v.prototype.includes=function(N,$,ee){return this.indexOf(N,$,ee)!==-1},v.prototype.indexOf=function(N,$,ee){return V(this,N,$,ee,!0)},v.prototype.lastIndexOf=function(N,$,ee){return V(this,N,$,ee,!1)};function z(O,N,$,ee){$=Number($)||0;let re=O.length-$;ee?(ee=Number(ee),ee>re&&(ee=re)):ee=re;let se=N.length;ee>se/2&&(ee=se/2);let ce;for(ce=0;ce<ee;++ce){let st=parseInt(N.substr(ce*2,2),16);if(qe(st))return ce;O[$+ce]=st}return ce}function Y(O,N,$,ee){return _e(he(N,O.length-$),O,$,ee)}function E(O,N,$,ee){return _e(pe(N),O,$,ee)}function i(O,N,$,ee){return _e(Ae(N),O,$,ee)}function s(O,N,$,ee){return _e(De(N,O.length-$),O,$,ee)}v.prototype.write=function(N,$,ee,re){if($===void 0)re="utf8",ee=this.length,$=0;else if(ee===void 0&&typeof $=="string")re=$,ee=this.length,$=0;else if(isFinite($))$=$>>>0,isFinite(ee)?(ee=ee>>>0,re===void 0&&(re="utf8")):(re=ee,ee=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let se=this.length-$;if((ee===void 0||ee>se)&&(ee=se),N.length>0&&(ee<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");let ce=!1;for(;;)switch(re){case"hex":return z(this,N,$,ee);case"utf8":case"utf-8":return Y(this,N,$,ee);case"ascii":case"latin1":case"binary":return E(this,N,$,ee);case"base64":return i(this,N,$,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s(this,N,$,ee);default:if(ce)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),ce=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function f(O,N,$){return N===0&&$===O.length?r.fromByteArray(O):r.fromByteArray(O.slice(N,$))}function c(O,N,$){$=Math.min(O.length,$);let ee=[],re=N;for(;re<$;){let se=O[re],ce=null,st=se>239?4:se>223?3:se>191?2:1;if(re+st<=$){let ye,be,me,Te;switch(st){case 1:se<128&&(ce=se);break;case 2:ye=O[re+1],(ye&192)===128&&(Te=(se&31)<<6|ye&63,Te>127&&(ce=Te));break;case 3:ye=O[re+1],be=O[re+2],(ye&192)===128&&(be&192)===128&&(Te=(se&15)<<12|(ye&63)<<6|be&63,Te>2047&&(Te<55296||Te>57343)&&(ce=Te));break;case 4:ye=O[re+1],be=O[re+2],me=O[re+3],(ye&192)===128&&(be&192)===128&&(me&192)===128&&(Te=(se&15)<<18|(ye&63)<<12|(be&63)<<6|me&63,Te>65535&&Te<1114112&&(ce=Te))}}ce===null?(ce=65533,st=1):ce>65535&&(ce-=65536,ee.push(ce>>>10&1023|55296),ce=56320|ce&1023),ee.push(ce),re+=st}return _(ee)}var p=4096;function _(O){let N=O.length;if(N<=p)return String.fromCharCode.apply(String,O);let $="",ee=0;for(;ee<N;)$+=String.fromCharCode.apply(String,O.slice(ee,ee+=p));return $}function x(O,N,$){let ee="";$=Math.min(O.length,$);for(let re=N;re<$;++re)ee+=String.fromCharCode(O[re]&127);return ee}function o(O,N,$){let ee="";$=Math.min(O.length,$);for(let re=N;re<$;++re)ee+=String.fromCharCode(O[re]);return ee}function t(O,N,$){let ee=O.length;(!N||N<0)&&(N=0),(!$||$<0||$>ee)&&($=ee);let re="";for(let se=N;se<$;++se)re+=ke[O[se]];return re}function u(O,N,$){let ee=O.slice(N,$),re="";for(let se=0;se<ee.length-1;se+=2)re+=String.fromCharCode(ee[se]+ee[se+1]*256);return re}v.prototype.slice=function(N,$){let ee=this.length;N=~~N,$=$===void 0?ee:~~$,N<0?(N+=ee,N<0&&(N=0)):N>ee&&(N=ee),$<0?($+=ee,$<0&&($=0)):$>ee&&($=ee),$<N&&($=N);let re=this.subarray(N,$);return Object.setPrototypeOf(re,v.prototype),re};function b(O,N,$){if(O%1!==0||O<0)throw new RangeError("offset is not uint");if(O+N>$)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUintLE=v.prototype.readUIntLE=function(N,$,ee){N=N>>>0,$=$>>>0,ee||b(N,$,this.length);let re=this[N],se=1,ce=0;for(;++ce<$&&(se*=256);)re+=this[N+ce]*se;return re},v.prototype.readUintBE=v.prototype.readUIntBE=function(N,$,ee){N=N>>>0,$=$>>>0,ee||b(N,$,this.length);let re=this[N+--$],se=1;for(;$>0&&(se*=256);)re+=this[N+--$]*se;return re},v.prototype.readUint8=v.prototype.readUInt8=function(N,$){return N=N>>>0,$||b(N,1,this.length),this[N]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(N,$){return N=N>>>0,$||b(N,2,this.length),this[N]|this[N+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(N,$){return N=N>>>0,$||b(N,2,this.length),this[N]<<8|this[N+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(N,$){return N=N>>>0,$||b(N,4,this.length),(this[N]|this[N+1]<<8|this[N+2]<<16)+this[N+3]*16777216},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(N,$){return N=N>>>0,$||b(N,4,this.length),this[N]*16777216+(this[N+1]<<16|this[N+2]<<8|this[N+3])},v.prototype.readBigUInt64LE=mt(function(N){N=N>>>0,Z(N,"offset");let $=this[N],ee=this[N+7];($===void 0||ee===void 0)&&ie(N,this.length-8);let re=$+this[++N]*2**8+this[++N]*2**16+this[++N]*2**24,se=this[++N]+this[++N]*2**8+this[++N]*2**16+ee*2**24;return BigInt(re)+(BigInt(se)<<BigInt(32))}),v.prototype.readBigUInt64BE=mt(function(N){N=N>>>0,Z(N,"offset");let $=this[N],ee=this[N+7];($===void 0||ee===void 0)&&ie(N,this.length-8);let re=$*2**24+this[++N]*2**16+this[++N]*2**8+this[++N],se=this[++N]*2**24+this[++N]*2**16+this[++N]*2**8+ee;return(BigInt(re)<<BigInt(32))+BigInt(se)}),v.prototype.readIntLE=function(N,$,ee){N=N>>>0,$=$>>>0,ee||b(N,$,this.length);let re=this[N],se=1,ce=0;for(;++ce<$&&(se*=256);)re+=this[N+ce]*se;return se*=128,re>=se&&(re-=Math.pow(2,8*$)),re},v.prototype.readIntBE=function(N,$,ee){N=N>>>0,$=$>>>0,ee||b(N,$,this.length);let re=$,se=1,ce=this[N+--re];for(;re>0&&(se*=256);)ce+=this[N+--re]*se;return se*=128,ce>=se&&(ce-=Math.pow(2,8*$)),ce},v.prototype.readInt8=function(N,$){return N=N>>>0,$||b(N,1,this.length),this[N]&128?(255-this[N]+1)*-1:this[N]},v.prototype.readInt16LE=function(N,$){N=N>>>0,$||b(N,2,this.length);let ee=this[N]|this[N+1]<<8;return ee&32768?ee|4294901760:ee},v.prototype.readInt16BE=function(N,$){N=N>>>0,$||b(N,2,this.length);let ee=this[N+1]|this[N]<<8;return ee&32768?ee|4294901760:ee},v.prototype.readInt32LE=function(N,$){return N=N>>>0,$||b(N,4,this.length),this[N]|this[N+1]<<8|this[N+2]<<16|this[N+3]<<24},v.prototype.readInt32BE=function(N,$){return N=N>>>0,$||b(N,4,this.length),this[N]<<24|this[N+1]<<16|this[N+2]<<8|this[N+3]},v.prototype.readBigInt64LE=mt(function(N){N=N>>>0,Z(N,"offset");let $=this[N],ee=this[N+7];($===void 0||ee===void 0)&&ie(N,this.length-8);let re=this[N+4]+this[N+5]*2**8+this[N+6]*2**16+(ee<<24);return(BigInt(re)<<BigInt(32))+BigInt($+this[++N]*2**8+this[++N]*2**16+this[++N]*2**24)}),v.prototype.readBigInt64BE=mt(function(N){N=N>>>0,Z(N,"offset");let $=this[N],ee=this[N+7];($===void 0||ee===void 0)&&ie(N,this.length-8);let re=($<<24)+this[++N]*2**16+this[++N]*2**8+this[++N];return(BigInt(re)<<BigInt(32))+BigInt(this[++N]*2**24+this[++N]*2**16+this[++N]*2**8+ee)}),v.prototype.readFloatLE=function(N,$){return N=N>>>0,$||b(N,4,this.length),n.read(this,N,!0,23,4)},v.prototype.readFloatBE=function(N,$){return N=N>>>0,$||b(N,4,this.length),n.read(this,N,!1,23,4)},v.prototype.readDoubleLE=function(N,$){return N=N>>>0,$||b(N,8,this.length),n.read(this,N,!0,52,8)},v.prototype.readDoubleBE=function(N,$){return N=N>>>0,$||b(N,8,this.length),n.read(this,N,!1,52,8)};function M(O,N,$,ee,re,se){if(!v.isBuffer(O))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>re||N<se)throw new RangeError('"value" argument is out of bounds');if($+ee>O.length)throw new RangeError("Index out of range")}v.prototype.writeUintLE=v.prototype.writeUIntLE=function(N,$,ee,re){if(N=+N,$=$>>>0,ee=ee>>>0,!re){let st=Math.pow(2,8*ee)-1;M(this,N,$,ee,st,0)}let se=1,ce=0;for(this[$]=N&255;++ce<ee&&(se*=256);)this[$+ce]=N/se&255;return $+ee},v.prototype.writeUintBE=v.prototype.writeUIntBE=function(N,$,ee,re){if(N=+N,$=$>>>0,ee=ee>>>0,!re){let st=Math.pow(2,8*ee)-1;M(this,N,$,ee,st,0)}let se=ee-1,ce=1;for(this[$+se]=N&255;--se>=0&&(ce*=256);)this[$+se]=N/ce&255;return $+ee},v.prototype.writeUint8=v.prototype.writeUInt8=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,1,255,0),this[$]=N&255,$+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,2,65535,0),this[$]=N&255,this[$+1]=N>>>8,$+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,2,65535,0),this[$]=N>>>8,this[$+1]=N&255,$+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,4,4294967295,0),this[$+3]=N>>>24,this[$+2]=N>>>16,this[$+1]=N>>>8,this[$]=N&255,$+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,4,4294967295,0),this[$]=N>>>24,this[$+1]=N>>>16,this[$+2]=N>>>8,this[$+3]=N&255,$+4};function T(O,N,$,ee,re){U(N,ee,re,O,$,7);let se=Number(N&BigInt(4294967295));O[$++]=se,se=se>>8,O[$++]=se,se=se>>8,O[$++]=se,se=se>>8,O[$++]=se;let ce=Number(N>>BigInt(32)&BigInt(4294967295));return O[$++]=ce,ce=ce>>8,O[$++]=ce,ce=ce>>8,O[$++]=ce,ce=ce>>8,O[$++]=ce,$}function D(O,N,$,ee,re){U(N,ee,re,O,$,7);let se=Number(N&BigInt(4294967295));O[$+7]=se,se=se>>8,O[$+6]=se,se=se>>8,O[$+5]=se,se=se>>8,O[$+4]=se;let ce=Number(N>>BigInt(32)&BigInt(4294967295));return O[$+3]=ce,ce=ce>>8,O[$+2]=ce,ce=ce>>8,O[$+1]=ce,ce=ce>>8,O[$]=ce,$+8}v.prototype.writeBigUInt64LE=mt(function(N,$=0){return T(this,N,$,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeBigUInt64BE=mt(function(N,$=0){return D(this,N,$,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeIntLE=function(N,$,ee,re){if(N=+N,$=$>>>0,!re){let ye=Math.pow(2,8*ee-1);M(this,N,$,ee,ye-1,-ye)}let se=0,ce=1,st=0;for(this[$]=N&255;++se<ee&&(ce*=256);)N<0&&st===0&&this[$+se-1]!==0&&(st=1),this[$+se]=(N/ce>>0)-st&255;return $+ee},v.prototype.writeIntBE=function(N,$,ee,re){if(N=+N,$=$>>>0,!re){let ye=Math.pow(2,8*ee-1);M(this,N,$,ee,ye-1,-ye)}let se=ee-1,ce=1,st=0;for(this[$+se]=N&255;--se>=0&&(ce*=256);)N<0&&st===0&&this[$+se+1]!==0&&(st=1),this[$+se]=(N/ce>>0)-st&255;return $+ee},v.prototype.writeInt8=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,1,127,-128),N<0&&(N=255+N+1),this[$]=N&255,$+1},v.prototype.writeInt16LE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,2,32767,-32768),this[$]=N&255,this[$+1]=N>>>8,$+2},v.prototype.writeInt16BE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,2,32767,-32768),this[$]=N>>>8,this[$+1]=N&255,$+2},v.prototype.writeInt32LE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,4,2147483647,-2147483648),this[$]=N&255,this[$+1]=N>>>8,this[$+2]=N>>>16,this[$+3]=N>>>24,$+4},v.prototype.writeInt32BE=function(N,$,ee){return N=+N,$=$>>>0,ee||M(this,N,$,4,2147483647,-2147483648),N<0&&(N=4294967295+N+1),this[$]=N>>>24,this[$+1]=N>>>16,this[$+2]=N>>>8,this[$+3]=N&255,$+4},v.prototype.writeBigInt64LE=mt(function(N,$=0){return T(this,N,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),v.prototype.writeBigInt64BE=mt(function(N,$=0){return D(this,N,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Q(O,N,$,ee,re,se){if($+ee>O.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function W(O,N,$,ee,re){return N=+N,$=$>>>0,re||Q(O,N,$,4,34028234663852886e22,-34028234663852886e22),n.write(O,N,$,ee,23,4),$+4}v.prototype.writeFloatLE=function(N,$,ee){return W(this,N,$,!0,ee)},v.prototype.writeFloatBE=function(N,$,ee){return W(this,N,$,!1,ee)};function X(O,N,$,ee,re){return N=+N,$=$>>>0,re||Q(O,N,$,8,17976931348623157e292,-17976931348623157e292),n.write(O,N,$,ee,52,8),$+8}v.prototype.writeDoubleLE=function(N,$,ee){return X(this,N,$,!0,ee)},v.prototype.writeDoubleBE=function(N,$,ee){return X(this,N,$,!1,ee)},v.prototype.copy=function(N,$,ee,re){if(!v.isBuffer(N))throw new TypeError("argument should be a Buffer");if(ee||(ee=0),!re&&re!==0&&(re=this.length),$>=N.length&&($=N.length),$||($=0),re>0&&re<ee&&(re=ee),re===ee||N.length===0||this.length===0)return 0;if($<0)throw new RangeError("targetStart out of bounds");if(ee<0||ee>=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),N.length-$<re-ee&&(re=N.length-$+ee);let se=re-ee;return this===N&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin($,ee,re):Uint8Array.prototype.set.call(N,this.subarray(ee,re),$),se},v.prototype.fill=function(N,$,ee,re){if(typeof N=="string"){if(typeof $=="string"?(re=$,$=0,ee=this.length):typeof ee=="string"&&(re=ee,ee=this.length),re!==void 0&&typeof re!="string")throw new TypeError("encoding must be a string");if(typeof re=="string"&&!v.isEncoding(re))throw new TypeError("Unknown encoding: "+re);if(N.length===1){let ce=N.charCodeAt(0);(re==="utf8"&&ce<128||re==="latin1")&&(N=ce)}}else typeof N=="number"?N=N&255:typeof N=="boolean"&&(N=Number(N));if($<0||this.length<$||this.length<ee)throw new RangeError("Out of range index");if(ee<=$)return this;$=$>>>0,ee=ee===void 0?this.length:ee>>>0,N||(N=0);let se;if(typeof N=="number")for(se=$;se<ee;++se)this[se]=N;else{let ce=v.isBuffer(N)?N:v.from(N,re),st=ce.length;if(st===0)throw new TypeError('The value "'+N+'" is invalid for argument "value"');for(se=0;se<ee-$;++se)this[se+$]=ce[se%st]}return this};var G={};function J(O,N,$){G[O]=class extends ${constructor(){super(),Object.defineProperty(this,"message",{value:N.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${O}]`,this.stack,delete this.name}get code(){return O}set code(re){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:re,writable:!0})}toString(){return`${this.name} [${O}]: ${this.message}`}}}J("ERR_BUFFER_OUT_OF_BOUNDS",function(O){return O?`${O} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),J("ERR_INVALID_ARG_TYPE",function(O,N){return`The "${O}" argument must be of type number. Received type ${typeof N}`},TypeError),J("ERR_OUT_OF_RANGE",function(O,N,$){let ee=`The value of "${O}" is out of range.`,re=$;return Number.isInteger($)&&Math.abs($)>2**32?re=ae(String($)):typeof $=="bigint"&&(re=String($),($>BigInt(2)**BigInt(32)||$<-(BigInt(2)**BigInt(32)))&&(re=ae(re)),re+="n"),ee+=` It must be ${N}. Received ${re}`,ee},RangeError);function ae(O){let N="",$=O.length,ee=O[0]==="-"?1:0;for(;$>=ee+4;$-=3)N=`_${O.slice($-3,$)}${N}`;return`${O.slice(0,$)}${N}`}function te(O,N,$){Z(N,"offset"),(O[N]===void 0||O[N+$]===void 0)&&ie(N,O.length-($+1))}function U(O,N,$,ee,re,se){if(O>$||O<N){let ce=typeof N=="bigint"?"n":"",st;throw se>3?N===0||N===BigInt(0)?st=`>= 0${ce} and < 2${ce} ** ${(se+1)*8}${ce}`:st=`>= -(2${ce} ** ${(se+1)*8-1}${ce}) and < 2 ** ${(se+1)*8-1}${ce}`:st=`>= ${N}${ce} and <= ${$}${ce}`,new G.ERR_OUT_OF_RANGE("value",st,O)}te(ee,re,se)}function Z(O,N){if(typeof O!="number")throw new G.ERR_INVALID_ARG_TYPE(N,"number",O)}function ie(O,N,$){throw Math.floor(O)!==O?(Z(O,$),new G.ERR_OUT_OF_RANGE($||"offset","an integer",O)):N<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE($||"offset",`>= ${$?1:0} and <= ${N}`,O)}var fe=/[^+/0-9A-Za-z-_]/g;function de(O){if(O=O.split("=")[0],O=O.trim().replace(fe,""),O.length<2)return"";for(;O.length%4!==0;)O=O+"=";return O}function he(O,N){N=N||1/0;let $,ee=O.length,re=null,se=[];for(let ce=0;ce<ee;++ce){if($=O.charCodeAt(ce),$>55295&&$<57344){if(!re){if($>56319){(N-=3)>-1&&se.push(239,191,189);continue}else if(ce+1===ee){(N-=3)>-1&&se.push(239,191,189);continue}re=$;continue}if($<56320){(N-=3)>-1&&se.push(239,191,189),re=$;continue}$=(re-55296<<10|$-56320)+65536}else re&&(N-=3)>-1&&se.push(239,191,189);if(re=null,$<128){if((N-=1)<0)break;se.push($)}else if($<2048){if((N-=2)<0)break;se.push($>>6|192,$&63|128)}else if($<65536){if((N-=3)<0)break;se.push($>>12|224,$>>6&63|128,$&63|128)}else if($<1114112){if((N-=4)<0)break;se.push($>>18|240,$>>12&63|128,$>>6&63|128,$&63|128)}else throw new Error("Invalid code point")}return se}function pe(O){let N=[];for(let $=0;$<O.length;++$)N.push(O.charCodeAt($)&255);return N}function De(O,N){let $,ee,re,se=[];for(let ce=0;ce<O.length&&!((N-=2)<0);++ce)$=O.charCodeAt(ce),ee=$>>8,re=$%256,se.push(re),se.push(ee);return se}function Ae(O){return r.toByteArray(de(O))}function _e(O,N,$,ee){let re;for(re=0;re<ee&&!(re+$>=N.length||re>=O.length);++re)N[re+$]=O[re];return re}function ut(O,N){return O instanceof N||O!=null&&O.constructor!=null&&O.constructor.name!=null&&O.constructor.name===N.name}function qe(O){return O!==O}var ke=function(){let O="0123456789abcdef",N=new Array(256);for(let $=0;$<16;++$){let ee=$*16;for(let re=0;re<16;++re)N[ee+re]=O[$]+O[re]}return N}();function mt(O){return typeof BigInt>"u"?ne:O}function ne(){throw new Error("BigInt not supported")}}});function ln(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Ka(e){return function r(n){return arguments.length===0||ln(n)?r:e.apply(this,arguments)}}function Pn(e){return function r(n,h){switch(arguments.length){case 0:return r;case 1:return ln(n)?r:Ka(function(a){return e(n,a)});default:return ln(n)&&ln(h)?r:ln(n)?Ka(function(a){return e(a,h)}):ln(h)?Ka(function(a){return e(n,a)}):e(n,h)}}}function Fb(e,r){switch(e){case 0:return function(){return r.apply(this,arguments)};case 1:return function(n){return r.apply(this,arguments)};case 2:return function(n,h){return r.apply(this,arguments)};case 3:return function(n,h,a){return r.apply(this,arguments)};case 4:return function(n,h,a,d){return r.apply(this,arguments)};case 5:return function(n,h,a,d,l){return r.apply(this,arguments)};case 6:return function(n,h,a,d,l,v){return r.apply(this,arguments)};case 7:return function(n,h,a,d,l,v,w){return r.apply(this,arguments)};case 8:return function(n,h,a,d,l,v,w,m){return r.apply(this,arguments)};case 9:return function(n,h,a,d,l,v,w,m,y){return r.apply(this,arguments)};case 10:return function(n,h,a,d,l,v,w,m,y,g){return r.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function kQ(e,r,n){return function(){for(var h=[],a=0,d=e,l=0,v=!1;l<r.length||a<arguments.length;){var w;l<r.length&&(!ln(r[l])||a>=arguments.length)?w=r[l]:(w=arguments[a],a+=1),h[l]=w,ln(w)?v=!0:d-=1,l+=1}return!v&&d<=0?n.apply(this,h):Fb(Math.max(0,d),kQ(e,h,n))}}var c_e=Pn(function(e,r){return e===1?Ka(r):Fb(e,kQ(e,[],r))}),IQ=c_e;function CR(e){return function r(n,h,a){switch(arguments.length){case 0:return r;case 1:return ln(n)?r:Pn(function(d,l){return e(n,d,l)});case 2:return ln(n)&&ln(h)?r:ln(n)?Pn(function(d,l){return e(d,h,l)}):ln(h)?Pn(function(d,l){return e(n,d,l)}):Ka(function(d){return e(n,h,d)});default:return ln(n)&&ln(h)&&ln(a)?r:ln(n)&&ln(h)?Pn(function(d,l){return e(d,l,a)}):ln(n)&&ln(a)?Pn(function(d,l){return e(d,h,l)}):ln(h)&&ln(a)?Pn(function(d,l){return e(n,d,l)}):ln(n)?Ka(function(d){return e(d,h,a)}):ln(h)?Ka(function(d){return e(n,d,a)}):ln(a)?Ka(function(d){return e(n,h,d)}):e(n,h,a)}}}var LR=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function d_e(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function DR(e,r,n){return function(){if(arguments.length===0)return n();var h=arguments[arguments.length-1];if(!LR(h)){for(var a=0;a<e.length;){if(typeof h[e[a]]=="function")return h[e[a]].apply(h,Array.prototype.slice.call(arguments,0,-1));a+=1}if(d_e(h)){var d=r.apply(null,Array.prototype.slice.call(arguments,0,-1));return d(h)}}return n.apply(this,arguments)}}function p_e(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}var C2={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};function iQ(e){for(var r=[],n;!(n=e.next()).done;)r.push(n.value);return r}function nQ(e,r,n){for(var h=0,a=n.length;h<a;){if(e(r,n[h]))return!0;h+=1}return!1}function v_e(e){var r=String(e).match(/^function (\w*)/);return r==null?"":r[1]}function Rb(e,r){return Object.prototype.hasOwnProperty.call(r,e)}function m_e(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}var sR=typeof Object.is=="function"?Object.is:m_e,aQ=Object.prototype.toString,g_e=function(){return aQ.call(arguments)==="[object Arguments]"?function(e){return aQ.call(e)==="[object Arguments]"}:function(e){return Rb("callee",e)}}(),y_e=g_e,b_e=!{toString:null}.propertyIsEnumerable("toString"),oQ=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],sQ=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),w_e=function(e,r){for(var n=0;n<e.length;){if(e[n]===r)return!0;n+=1}return!1},__e=Ka(typeof Object.keys=="function"&&!sQ?function(e){return Object(e)!==e?[]:Object.keys(e)}:function(e){if(Object(e)!==e)return[];var r,n,h=[],a=sQ&&y_e(e);for(r in e)Rb(r,e)&&(!a||r!=="length")&&(h[h.length]=r);if(b_e)for(n=oQ.length-1;n>=0;)r=oQ[n],Rb(r,e)&&!w_e(h,r)&&(h[h.length]=r),n-=1;return h}),Ld=__e,M_e=Ka(function(e){return e===null?"Null":e===void 0?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}),fQ=M_e;function uQ(e,r,n,h){var a=iQ(e),d=iQ(r);function l(v,w){return $R(v,w,n.slice(),h.slice())}return!nQ(function(v,w){return!nQ(l,w,v)},d,a)}function $R(e,r,n,h){if(sR(e,r))return!0;var a=fQ(e);if(a!==fQ(r))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof r["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](r)&&typeof r["fantasy-land/equals"]=="function"&&r["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof r.equals=="function")return typeof e.equals=="function"&&e.equals(r)&&typeof r.equals=="function"&&r.equals(e);switch(a){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&v_e(e.constructor)==="Promise")return e===r;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof r&&sR(e.valueOf(),r.valueOf())))return!1;break;case"Date":if(!sR(e.valueOf(),r.valueOf()))return!1;break;case"Error":return e.name===r.name&&e.message===r.message;case"RegExp":if(!(e.source===r.source&&e.global===r.global&&e.ignoreCase===r.ignoreCase&&e.multiline===r.multiline&&e.sticky===r.sticky&&e.unicode===r.unicode))return!1;break}for(var d=n.length-1;d>=0;){if(n[d]===e)return h[d]===r;d-=1}switch(a){case"Map":return e.size!==r.size?!1:uQ(e.entries(),r.entries(),n.concat([e]),h.concat([r]));case"Set":return e.size!==r.size?!1:uQ(e.values(),r.values(),n.concat([e]),h.concat([r]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=Ld(e);if(l.length!==Ld(r).length)return!1;var v=n.concat([e]),w=h.concat([r]);for(d=l.length-1;d>=0;){var m=l[d];if(!(Rb(m,r)&&$R(r[m],e[m],v,w)))return!1;d-=1}return!0}var S_e=Pn(function(e,r){return $R(e,r,[],[])}),BQ=S_e;function E_e(e,r,n){var h,a;if(typeof e.indexOf=="function")switch(typeof r){case"number":if(r===0){for(h=1/r;n<e.length;){if(a=e[n],a===0&&1/a===h)return n;n+=1}return-1}else if(r!==r){for(;n<e.length;){if(a=e[n],typeof a=="number"&&a!==a)return n;n+=1}return-1}return e.indexOf(r,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(r,n);case"object":if(r===null)return e.indexOf(r,n)}for(;n<e.length;){if(BQ(e[n],r))return n;n+=1}return-1}function A_e(e,r){return E_e(r,e,0)>=0}function P2(e,r){for(var n=0,h=r.length,a=Array(h);n<h;)a[n]=e(r[n]),n+=1;return a}function fR(e){var r=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+r.replace(/"/g,'\\"')+'"'}var x2=function(e){return(e<10?"0":"")+e},R_e=typeof Date.prototype.toISOString=="function"?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+x2(e.getUTCMonth()+1)+"-"+x2(e.getUTCDate())+"T"+x2(e.getUTCHours())+":"+x2(e.getUTCMinutes())+":"+x2(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"},x_e=R_e;function T_e(e){return function(){return!e.apply(this,arguments)}}function OQ(e,r,n){for(var h=0,a=n.length;h<a;)r=e(r,n[h]),h+=1;return r}function k_e(e,r){for(var n=0,h=r.length,a=[];n<h;)e(r[n])&&(a[a.length]=r[n]),n+=1;return a}function I_e(e){return Object.prototype.toString.call(e)==="[object Object]"}var B_e=function(){function e(r,n){this.xf=n,this.f=r}return e.prototype["@@transducer/init"]=C2.init,e.prototype["@@transducer/result"]=C2.result,e.prototype["@@transducer/step"]=function(r,n){return this.f(n)?this.xf["@@transducer/step"](r,n):r},e}();function O_e(e){return function(r){return new B_e(e,r)}}var P_e=Pn(DR(["fantasy-land/filter","filter"],O_e,function(e,r){return I_e(r)?OQ(function(n,h){return e(r[h])&&(n[h]=r[h]),n},{},Ld(r)):k_e(e,r)})),N_e=P_e,C_e=Pn(function(e,r){return N_e(T_e(e),r)}),L_e=C_e;function PQ(e,r){var n=function(d){var l=r.concat([e]);return A_e(d,l)?"<Circular>":PQ(d,l)},h=function(d,l){return P2(function(v){return fR(v)+": "+n(d[v])},l.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+P2(n,e).join(", ")+"))";case"[object Array]":return"["+P2(n,e).concat(h(e,L_e(function(d){return/^\d+$/.test(d)},Ld(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):fR(x_e(e)))+")";case"[object Map]":return"new Map("+n(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+n(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+n(Array.from(e).sort())+")";case"[object String]":return typeof e=="object"?"new String("+n(e.valueOf())+")":fR(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var a=e.toString();if(a!=="[object Object]")return a}return"{"+h(e,Ld(e)).join(", ")+"}"}}var D_e=Ka(function(e){return PQ(e,[])}),hQ=D_e,$_e=Pn(function(e,r){if(e===r)return r;function n(v,w){if(v>w!=w>v)return w>v?w:v}var h=n(e,r);if(h!==void 0)return h;var a=n(typeof e,typeof r);if(a!==void 0)return a===typeof e?e:r;var d=hQ(e),l=n(d,hQ(r));return l!==void 0&&l===d?e:r}),U_e=$_e,q_e=function(){function e(r,n){this.xf=n,this.f=r}return e.prototype["@@transducer/init"]=C2.init,e.prototype["@@transducer/result"]=C2.result,e.prototype["@@transducer/step"]=function(r,n){return this.xf["@@transducer/step"](r,this.f(n))},e}(),j_e=function(e){return function(r){return new q_e(e,r)}},F_e=j_e,z_e=Pn(DR(["fantasy-land/map","map"],F_e,function(e,r){switch(Object.prototype.toString.call(r)){case"[object Function]":return IQ(r.length,function(){return e.call(this,r.apply(this,arguments))});case"[object Object]":return OQ(function(n,h){return n[h]=e(r[h]),n},{},Ld(r));default:return P2(e,r)}})),H_e=z_e,NQ=Number.isInteger||function(e){return e<<0===e};function CQ(e){return Object.prototype.toString.call(e)==="[object String]"}var K_e=Pn(function(e,r){var n=e<0?r.length+e:e;return CQ(r)?r.charAt(n):r[n]}),LQ=K_e,Z_e=Pn(function(e,r){if(r!=null)return NQ(e)?LQ(e,r):r[e]}),zb=Z_e,W_e=Pn(function(e,r){return H_e(zb(e),r)}),G_e=W_e,V_e=Ka(function(e){return LR(e)?!0:!e||typeof e!="object"||CQ(e)?!1:e.length===0?!0:e.length>0?e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1):!1}),J_e=V_e,lQ=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function Y_e(e,r,n){return function(h,a,d){if(J_e(d))return e(h,a,d);if(d==null)return a;if(typeof d["fantasy-land/reduce"]=="function")return r(h,a,d,"fantasy-land/reduce");if(d[lQ]!=null)return n(h,a,d[lQ]());if(typeof d.next=="function")return n(h,a,d);if(typeof d.reduce=="function")return r(h,a,d,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function X_e(e,r,n){for(var h=0,a=n.length;h<a;){if(r=e["@@transducer/step"](r,n[h]),r&&r["@@transducer/reduced"]){r=r["@@transducer/value"];break}h+=1}return e["@@transducer/result"](r)}var Q_e=Pn(function(e,r){return Fb(e.length,function(){return e.apply(r,arguments)})}),eMe=Q_e;function tMe(e,r,n){for(var h=n.next();!h.done;){if(r=e["@@transducer/step"](r,h.value),r&&r["@@transducer/reduced"]){r=r["@@transducer/value"];break}h=n.next()}return e["@@transducer/result"](r)}function rMe(e,r,n,h){return e["@@transducer/result"](n[h](eMe(e["@@transducer/step"],e),r))}var iMe=Y_e(X_e,rMe,tMe),nMe=iMe,aMe=function(){function e(r){this.f=r}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(r){return r},e.prototype["@@transducer/step"]=function(r,n){return this.f(r,n)},e}();function oMe(e){return new aMe(e)}var sMe=CR(function(e,r,n){return nMe(typeof e=="function"?oMe(e):e,r,n)}),DQ=sMe;function fMe(e,r){return function(){return r.call(this,e.apply(this,arguments))}}function $Q(e,r){return function(){var n=arguments.length;if(n===0)return r();var h=arguments[n-1];return LR(h)||typeof h[e]!="function"?r.apply(this,arguments):h[e].apply(h,Array.prototype.slice.call(arguments,0,n-1))}}var uMe=CR($Q("slice",function(e,r,n){return Array.prototype.slice.call(n,e,r)})),hMe=uMe,lMe=Ka($Q("tail",hMe(1,1/0))),cMe=lMe;function UQ(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return Fb(arguments[0].length,DQ(fMe,arguments[0],cMe(arguments)))}var dMe=Pn(function(e,r){return IQ(DQ(U_e,0,G_e("length",r)),function(){var n=arguments,h=this;return e.apply(h,P2(function(a){return a.apply(h,n)},r))})}),pMe=dMe,vMe=Pn(function(e,r){return r==null||r!==r?e:r}),vR=vMe,mMe=function(){function e(r,n){this.xf=n,this.f=r,this.found=!1}return e.prototype["@@transducer/init"]=C2.init,e.prototype["@@transducer/result"]=function(r){return this.found||(r=this.xf["@@transducer/step"](r,void 0)),this.xf["@@transducer/result"](r)},e.prototype["@@transducer/step"]=function(r,n){return this.f(n)&&(this.found=!0,r=p_e(this.xf["@@transducer/step"](r,n))),r},e}();function gMe(e){return function(r){return new mMe(e,r)}}var yMe=Pn(DR(["find"],gMe,function(e,r){for(var n=0,h=r.length;n<h;){if(e(r[n]))return r[n];n+=1}})),bMe=yMe,wMe=Ka(function(e){return pMe(function(){return Array.prototype.slice.call(arguments,0)},e)}),_Me=wMe,MMe=Pn(function(e,r){return e.map(function(n){for(var h=r,a=0,d;a<n.length;){if(h==null)return;d=n[a],h=NQ(d)?LQ(d,h):h[d],a+=1}return h})}),SMe=MMe,EMe=Pn(function(e,r){return SMe([e],r)[0]}),qQ=EMe,AMe=CR(function(e,r,n){return BQ(e,zb(r,n))}),RMe=AMe,xb=class extends Error{name="InvalidSchedulerLocation"},xMe=class extends Error{name="SchedulerTagNotFound"},TMe=class extends Error{name="TransactionNotFound"},kMe="Url",IMe="Time-To-Live",BMe="Scheduler",mR=e=>UQ(vR([]),bMe(RMe(e,"name")),vR({}),zb("value")),jQ=e=>UQ(r=>{if(!r)throw new TMe(e);return r},zb("tags"),vR([]));function FQ({fetch:e,GRAPHQL_URL:r}){return async({query:n,variables:h})=>e(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n,variables:h})}).then(a=>a.json())}function OMe({fetch:e,GRAPHQL_URL:r}){let n=FQ({fetch:e,GRAPHQL_URL:r}),h=zQ({fetch:e,GRAPHQL_URL:r}),a=`
139
139
  query GetTransactions ($transactionIds: [ID!]!) {
140
140
  transactions(ids: $transactionIds) {
141
141
  edges {
@@ -195,7 +195,7 @@ ${JSON.stringify(St.from(n))},${JSON.stringify(St.from(h))},${d} => ${JSON.strin
195
195
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...n){let h=new this(r);return n.forEach(a=>h.set(a)),h}static accessor(r){let h=(this[fte]=this[fte]={accessors:{}}).accessors,a=this.prototype;function d(l){let v=ov(l);h[v]||(dTe(a,l),h[v]=!0)}return Kt.isArray(r)?r.forEach(d):d(r),this}};Yd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Kt.reduceDescriptors(Yd.prototype,({value:e},r)=>{let n=r[0].toUpperCase()+r.slice(1);return{get:()=>e,set(h){this[n]=h}}});Kt.freezeMethods(Yd);var Qn=Yd;function sv(e,r){let n=this||Jd,h=r||n,a=Qn.from(h.headers),d=h.data;return Kt.forEach(e,function(v){d=v.call(n,d,a.normalize(),r?r.status:void 0)}),a.normalize(),d}Be();Pe();Oe();function fv(e){return!!(e&&e.__CANCEL__)}Be();Pe();Oe();function ute(e,r,n){Lr.call(this,e??"canceled",Lr.ERR_CANCELED,r,n),this.name="CanceledError"}Kt.inherits(ute,Lr,{__CANCEL__:!0});var pu=ute;Be();Pe();Oe();Be();Pe();Oe();Be();Pe();Oe();function uv(e,r,n){let h=n.config.validateStatus;!n.status||!h||h(n.status)?e(n):r(new Lr("Request failed with status code "+n.status,[Lr.ERR_BAD_REQUEST,Lr.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}Be();Pe();Oe();function dx(e){let r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}Be();Pe();Oe();Be();Pe();Oe();function pTe(e,r){e=e||10;let n=new Array(e),h=new Array(e),a=0,d=0,l;return r=r!==void 0?r:1e3,function(w){let m=Date.now(),y=h[d];l||(l=m),n[a]=w,h[a]=m;let g=d,S=0;for(;g!==a;)S+=n[g++],g=g%e;if(a=(a+1)%e,a===d&&(d=(d+1)%e),m-l<r)return;let R=y&&m-y;return R?Math.round(S*1e3/R):void 0}}var hte=pTe;Be();Pe();Oe();function vTe(e,r){let n=0,h=1e3/r,a=null;return function(){let l=this===!0,v=Date.now();if(l||v-n>h)return a&&(clearTimeout(a),a=null),n=v,e.apply(null,arguments);a||(a=setTimeout(()=>(a=null,n=Date.now(),e.apply(null,arguments)),h-(v-n)))}}var lte=vTe;var Xd=(e,r,n=3)=>{let h=0,a=hte(50,250);return lte(d=>{let l=d.loaded,v=d.lengthComputable?d.total:void 0,w=l-h,m=a(w),y=l<=v;h=l;let g={loaded:l,total:v,progress:v?l/v:void 0,bytes:w,rate:m||void 0,estimated:m&&v&&y?(v-l)/m:void 0,event:d,lengthComputable:v!=null};g[r?"download":"upload"]=!0,e(g)},n)};Be();Pe();Oe();Be();Pe();Oe();var cte=pa.hasStandardBrowserEnv?function(){let r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),h;function a(d){let l=d;return r&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return h=a(window.location.href),function(l){let v=Kt.isString(l)?a(l):l;return v.protocol===h.protocol&&v.host===h.host}}():function(){return function(){return!0}}();Be();Pe();Oe();var dte=pa.hasStandardBrowserEnv?{write(e,r,n,h,a,d){let l=[e+"="+encodeURIComponent(r)];Kt.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),Kt.isString(h)&&l.push("path="+h),Kt.isString(a)&&l.push("domain="+a),d===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){let r=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};Be();Pe();Oe();Be();Pe();Oe();function px(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}Be();Pe();Oe();function vx(e,r){return r?e.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):e}function hv(e,r){return e&&!px(r)?vx(e,r):r}Be();Pe();Oe();var pte=e=>e instanceof Qn?{...e}:e;function If(e,r){r=r||{};let n={};function h(m,y,g){return Kt.isPlainObject(m)&&Kt.isPlainObject(y)?Kt.merge.call({caseless:g},m,y):Kt.isPlainObject(y)?Kt.merge({},y):Kt.isArray(y)?y.slice():y}function a(m,y,g){if(Kt.isUndefined(y)){if(!Kt.isUndefined(m))return h(void 0,m,g)}else return h(m,y,g)}function d(m,y){if(!Kt.isUndefined(y))return h(void 0,y)}function l(m,y){if(Kt.isUndefined(y)){if(!Kt.isUndefined(m))return h(void 0,m)}else return h(void 0,y)}function v(m,y,g){if(g in r)return h(m,y);if(g in e)return h(void 0,m)}let w={url:d,method:d,data:d,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:v,headers:(m,y)=>a(pte(m),pte(y),!0)};return Kt.forEach(Object.keys(Object.assign({},e,r)),function(y){let g=w[y]||a,S=g(e[y],r[y],y);Kt.isUndefined(S)&&g!==v||(n[y]=S)}),n}var s3=e=>{let r=If({},e),{data:n,withXSRFToken:h,xsrfHeaderName:a,xsrfCookieName:d,headers:l,auth:v}=r;r.headers=l=Qn.from(l),r.url=av(hv(r.baseURL,r.url),e.params,e.paramsSerializer),v&&l.set("Authorization","Basic "+btoa((v.username||"")+":"+(v.password?unescape(encodeURIComponent(v.password)):"")));let w;if(Kt.isFormData(n)){if(pa.hasStandardBrowserEnv||pa.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((w=l.getContentType())!==!1){let[m,...y]=w?w.split(";").map(g=>g.trim()).filter(Boolean):[];l.setContentType([m||"multipart/form-data",...y].join("; "))}}if(pa.hasStandardBrowserEnv&&(h&&Kt.isFunction(h)&&(h=h(r)),h||h!==!1&&cte(r.url))){let m=a&&d&&dte.read(d);m&&l.set(a,m)}return r};var mTe=typeof XMLHttpRequest<"u",vte=mTe&&function(e){return new Promise(function(n,h){let a=s3(e),d=a.data,l=Qn.from(a.headers).normalize(),{responseType:v}=a,w;function m(){a.cancelToken&&a.cancelToken.unsubscribe(w),a.signal&&a.signal.removeEventListener("abort",w)}let y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function g(){if(!y)return;let R=Qn.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),k={data:!v||v==="text"||v==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:R,config:e,request:y};uv(function(B){n(B),m()},function(B){h(B),m()},k),y=null}"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(g)},y.onabort=function(){y&&(h(new Lr("Request aborted",Lr.ECONNABORTED,a,y)),y=null)},y.onerror=function(){h(new Lr("Network Error",Lr.ERR_NETWORK,a,y)),y=null},y.ontimeout=function(){let A=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",k=a.transitional||n3;a.timeoutErrorMessage&&(A=a.timeoutErrorMessage),h(new Lr(A,k.clarifyTimeoutError?Lr.ETIMEDOUT:Lr.ECONNABORTED,a,y)),y=null},d===void 0&&l.setContentType(null),"setRequestHeader"in y&&Kt.forEach(l.toJSON(),function(A,k){y.setRequestHeader(k,A)}),Kt.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),v&&v!=="json"&&(y.responseType=a.responseType),typeof a.onDownloadProgress=="function"&&y.addEventListener("progress",Xd(a.onDownloadProgress,!0)),typeof a.onUploadProgress=="function"&&y.upload&&y.upload.addEventListener("progress",Xd(a.onUploadProgress)),(a.cancelToken||a.signal)&&(w=R=>{y&&(h(!R||R.type?new pu(null,e,y):R),y.abort(),y=null)},a.cancelToken&&a.cancelToken.subscribe(w),a.signal&&(a.signal.aborted?w():a.signal.addEventListener("abort",w)));let S=dx(a.url);if(S&&pa.protocols.indexOf(S)===-1){h(new Lr("Unsupported protocol "+S+":",Lr.ERR_BAD_REQUEST,e));return}y.send(d||null)})};Be();Pe();Oe();Be();Pe();Oe();var gTe=(e,r)=>{let n=new AbortController,h,a=function(w){if(!h){h=!0,l();let m=w instanceof Error?w:this.reason;n.abort(m instanceof Lr?m:new pu(m instanceof Error?m.message:m))}},d=r&&setTimeout(()=>{a(new Lr(`timeout ${r} of ms exceeded`,Lr.ETIMEDOUT))},r),l=()=>{e&&(d&&clearTimeout(d),d=null,e.forEach(w=>{w&&(w.removeEventListener?w.removeEventListener("abort",a):w.unsubscribe(a))}),e=null)};e.forEach(w=>w&&w.addEventListener&&w.addEventListener("abort",a));let{signal:v}=n;return v.unsubscribe=l,[v,()=>{d&&clearTimeout(d),d=null}]},mte=gTe;Be();Pe();Oe();var yTe=function*(e,r){let n=e.byteLength;if(!r||n<r){yield e;return}let h=0,a;for(;h<n;)a=h+r,yield e.slice(h,a),h=a},bTe=async function*(e,r,n){for await(let h of e)yield*yTe(ArrayBuffer.isView(h)?h:await n(String(h)),r)},mx=(e,r,n,h,a)=>{let d=bTe(e,r,a),l=0;return new ReadableStream({type:"bytes",async pull(v){let{done:w,value:m}=await d.next();if(w){v.close(),h();return}let y=m.byteLength;n&&n(l+=y),v.enqueue(new Uint8Array(m))},cancel(v){return h(v),d.return()}},{highWaterMark:2})};var gte=(e,r)=>{let n=e!=null;return h=>setTimeout(()=>r({lengthComputable:n,total:e,loaded:h}))},u3=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",bte=u3&&typeof ReadableStream=="function",gx=u3&&(typeof TextEncoder=="function"?(e=>r=>e.encode(r))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wTe=bte&&(()=>{let e=!1,r=new Request(pa.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!r})(),yte=64*1024,yx=bte&&!!(()=>{try{return Kt.isReadableStream(new Response("").body)}catch{}})(),f3={stream:yx&&(e=>e.body)};u3&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(r=>{!f3[r]&&(f3[r]=Kt.isFunction(e[r])?n=>n[r]():(n,h)=>{throw new Lr(`Response type '${r}' is not supported`,Lr.ERR_NOT_SUPPORT,h)})})})(new Response);var _Te=async e=>{if(e==null)return 0;if(Kt.isBlob(e))return e.size;if(Kt.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(Kt.isArrayBufferView(e))return e.byteLength;if(Kt.isURLSearchParams(e)&&(e=e+""),Kt.isString(e))return(await gx(e)).byteLength},MTe=async(e,r)=>{let n=Kt.toFiniteNumber(e.getContentLength());return n??_Te(r)},wte=u3&&(async e=>{let{url:r,method:n,data:h,signal:a,cancelToken:d,timeout:l,onDownloadProgress:v,onUploadProgress:w,responseType:m,headers:y,withCredentials:g="same-origin",fetchOptions:S}=s3(e);m=m?(m+"").toLowerCase():"text";let[R,A]=a||d||l?mte([a,d],l):[],k,I,B=()=>{!k&&setTimeout(()=>{R&&R.unsubscribe()}),k=!0},P;try{if(w&&wTe&&n!=="get"&&n!=="head"&&(P=await MTe(y,h))!==0){let V=new Request(r,{method:"POST",body:h,duplex:"half"}),j;Kt.isFormData(h)&&(j=V.headers.get("content-type"))&&y.setContentType(j),V.body&&(h=mx(V.body,yte,gte(P,Xd(w)),null,gx))}Kt.isString(g)||(g=g?"cors":"omit"),I=new Request(r,{...S,signal:R,method:n.toUpperCase(),headers:y.normalize().toJSON(),body:h,duplex:"half",withCredentials:g});let C=await fetch(I),q=yx&&(m==="stream"||m==="response");if(yx&&(v||q)){let V={};["status","statusText","headers"].forEach(z=>{V[z]=C[z]});let j=Kt.toFiniteNumber(C.headers.get("content-length"));C=new Response(mx(C.body,yte,v&&gte(j,Xd(v,!0)),q&&B,gx),V)}m=m||"text";let K=await f3[Kt.findKey(f3,m)||"text"](C,e);return!q&&B(),A&&A(),await new Promise((V,j)=>{uv(V,j,{data:K,headers:Qn.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:I})})}catch(C){throw B(),C&&C.name==="TypeError"&&/fetch/i.test(C.message)?Object.assign(new Lr("Network Error",Lr.ERR_NETWORK,e,I),{cause:C.cause||C}):Lr.from(C,C&&C.code,e,I)}});var bx={http:r3,xhr:vte,fetch:wte};Kt.forEach(bx,(e,r)=>{if(e){try{Object.defineProperty(e,"name",{value:r})}catch{}Object.defineProperty(e,"adapterName",{value:r})}});var _te=e=>`- ${e}`,STe=e=>Kt.isFunction(e)||e===null||e===!1,h3={getAdapter:e=>{e=Kt.isArray(e)?e:[e];let{length:r}=e,n,h,a={};for(let d=0;d<r;d++){n=e[d];let l;if(h=n,!STe(n)&&(h=bx[(l=String(n)).toLowerCase()],h===void 0))throw new Lr(`Unknown adapter '${l}'`);if(h)break;a[l||"#"+d]=h}if(!h){let d=Object.entries(a).map(([v,w])=>`adapter ${v} `+(w===!1?"is not supported by the environment":"is not available in the build")),l=r?d.length>1?`since :
196
196
  `+d.map(_te).join(`
197
197
  `):" "+_te(d[0]):"as no adapter specified";throw new Lr("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return h},adapters:bx};function wx(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pu(null,e)}function l3(e){return wx(e),e.headers=Qn.from(e.headers),e.data=sv.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),h3.getAdapter(e.adapter||Jd.adapter)(e).then(function(h){return wx(e),h.data=sv.call(e,e.transformResponse,h),h.headers=Qn.from(h.headers),h},function(h){return fv(h)||(wx(e),h&&h.response&&(h.response.data=sv.call(e,e.transformResponse,h.response),h.response.headers=Qn.from(h.response.headers))),Promise.reject(h)})}Be();Pe();Oe();Be();Pe();Oe();var c3="1.7.2";var _x={};["object","boolean","number","function","string","symbol"].forEach((e,r)=>{_x[e]=function(h){return typeof h===e||"a"+(r<1?"n ":" ")+e}});var Mte={};_x.transitional=function(r,n,h){function a(d,l){return"[Axios v"+c3+"] Transitional option '"+d+"'"+l+(h?". "+h:"")}return(d,l,v)=>{if(r===!1)throw new Lr(a(l," has been removed"+(n?" in "+n:"")),Lr.ERR_DEPRECATED);return n&&!Mte[l]&&(Mte[l]=!0,console.warn(a(l," has been deprecated since v"+n+" and will be removed in the near future"))),r?r(d,l,v):!0}};function ETe(e,r,n){if(typeof e!="object")throw new Lr("options must be an object",Lr.ERR_BAD_OPTION_VALUE);let h=Object.keys(e),a=h.length;for(;a-- >0;){let d=h[a],l=r[d];if(l){let v=e[d],w=v===void 0||l(v,d,e);if(w!==!0)throw new Lr("option "+d+" must be "+w,Lr.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Lr("Unknown option "+d,Lr.ERR_BAD_OPTION)}}var d3={assertOptions:ETe,validators:_x};var hl=d3.validators,Qd=class{constructor(r){this.defaults=r,this.interceptors={request:new sx,response:new sx}}async request(r,n){try{return await this._request(r,n)}catch(h){if(h instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;let d=a.stack?a.stack.replace(/^.+\n/,""):"";try{h.stack?d&&!String(h.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(h.stack+=`
198
- `+d):h.stack=d}catch{}}throw h}}_request(r,n){typeof r=="string"?(n=n||{},n.url=r):n=r||{},n=If(this.defaults,n);let{transitional:h,paramsSerializer:a,headers:d}=n;h!==void 0&&d3.assertOptions(h,{silentJSONParsing:hl.transitional(hl.boolean),forcedJSONParsing:hl.transitional(hl.boolean),clarifyTimeoutError:hl.transitional(hl.boolean)},!1),a!=null&&(Kt.isFunction(a)?n.paramsSerializer={serialize:a}:d3.assertOptions(a,{encode:hl.function,serialize:hl.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=d&&Kt.merge(d.common,d[n.method]);d&&Kt.forEach(["delete","get","head","post","put","patch","common"],A=>{delete d[A]}),n.headers=Qn.concat(l,d);let v=[],w=!0;this.interceptors.request.forEach(function(k){typeof k.runWhen=="function"&&k.runWhen(n)===!1||(w=w&&k.synchronous,v.unshift(k.fulfilled,k.rejected))});let m=[];this.interceptors.response.forEach(function(k){m.push(k.fulfilled,k.rejected)});let y,g=0,S;if(!w){let A=[l3.bind(this),void 0];for(A.unshift.apply(A,v),A.push.apply(A,m),S=A.length,y=Promise.resolve(n);g<S;)y=y.then(A[g++],A[g++]);return y}S=v.length;let R=n;for(g=0;g<S;){let A=v[g++],k=v[g++];try{R=A(R)}catch(I){k.call(this,I);break}}try{y=l3.call(this,R)}catch(A){return Promise.reject(A)}for(g=0,S=m.length;g<S;)y=y.then(m[g++],m[g++]);return y}getUri(r){r=If(this.defaults,r);let n=hv(r.baseURL,r.url);return av(n,r.params,r.paramsSerializer)}};Kt.forEach(["delete","get","head","options"],function(r){Qd.prototype[r]=function(n,h){return this.request(If(h||{},{method:r,url:n,data:(h||{}).data}))}});Kt.forEach(["post","put","patch"],function(r){function n(h){return function(d,l,v){return this.request(If(v||{},{method:r,headers:h?{"Content-Type":"multipart/form-data"}:{},url:d,data:l}))}}Qd.prototype[r]=n(),Qd.prototype[r+"Form"]=n(!0)});var lv=Qd;Be();Pe();Oe();var Mx=class e{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(d){n=d});let h=this;this.promise.then(a=>{if(!h._listeners)return;let d=h._listeners.length;for(;d-- >0;)h._listeners[d](a);h._listeners=null}),this.promise.then=a=>{let d,l=new Promise(v=>{h.subscribe(v),d=v}).then(a);return l.cancel=function(){h.unsubscribe(d)},l},r(function(d,l,v){h.reason||(h.reason=new pu(d,l,v),n(h.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;let n=this._listeners.indexOf(r);n!==-1&&this._listeners.splice(n,1)}static source(){let r;return{token:new e(function(a){r=a}),cancel:r}}},Ste=Mx;Be();Pe();Oe();function Sx(e){return function(n){return e.apply(null,n)}}Be();Pe();Oe();function Ex(e){return Kt.isObject(e)&&e.isAxiosError===!0}Be();Pe();Oe();var Ax={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ax).forEach(([e,r])=>{Ax[r]=e});var Ete=Ax;function Ate(e){let r=new lv(e),n=rv(lv.prototype.request,r);return Kt.extend(n,lv.prototype,r,{allOwnKeys:!0}),Kt.extend(n,r,null,{allOwnKeys:!0}),n.create=function(a){return Ate(If(e,a))},n}var Fn=Ate(Jd);Fn.Axios=lv;Fn.CanceledError=pu;Fn.CancelToken=Ste;Fn.isCancel=fv;Fn.VERSION=c3;Fn.toFormData=ul;Fn.AxiosError=Lr;Fn.Cancel=Fn.CanceledError;Fn.all=function(r){return Promise.all(r)};Fn.spread=Sx;Fn.isAxiosError=Ex;Fn.mergeConfig=If;Fn.AxiosHeaders=Qn;Fn.formToJSON=e=>a3(Kt.isHTMLForm(e)?new FormData(e):e);Fn.getAdapter=h3.getAdapter;Fn.HttpStatusCode=Ete;Fn.default=Fn;var p3=Fn;var{Axios:mQe,AxiosError:gQe,CanceledError:yQe,isCancel:bQe,CancelToken:wQe,VERSION:_Qe,all:MQe,Cancel:SQe,isAxiosError:EQe,spread:AQe,toFormData:RQe,AxiosHeaders:xQe,HttpStatusCode:TQe,formToJSON:kQe,getAdapter:IQe,mergeConfig:BQe}=p3;Be();Pe();Oe();var kte=hc(xte(),1),Rx="axios-retry";function Ite(e){let r=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||r.includes(e.code)?!1:(0,kte.default)(e)}var Bte=["get","head","options"],RTe=Bte.concat(["put","delete"]);function xx(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function xTe(e){return e.config?.method?xx(e)&&Bte.indexOf(e.config.method)!==-1:!1}function Ote(e){return e.config?.method?xx(e)&&RTe.indexOf(e.config.method)!==-1:!1}function Pte(e){return Ite(e)||Ote(e)}function Nte(e=void 0){let r=e?.response?.headers["retry-after"];if(!r)return 0;let n=(Number(r)||0)*1e3;return n===0&&(n=(new Date(r).valueOf()||0)-Date.now()),Math.max(0,n)}function TTe(e=0,r=void 0){return Math.max(0,Nte(r))}function kTe(e=0,r=void 0,n=100){let h=2**e*n,a=Math.max(h,Nte(r)),d=a*.2*Math.random();return a+d}var ITe={retries:3,retryCondition:Pte,retryDelay:TTe,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function BTe(e,r){return{...ITe,...r,...e[Rx]}}function Tte(e,r){let n=BTe(e,r||{});return n.retryCount=n.retryCount||0,n.lastRequestTime=n.lastRequestTime||Date.now(),e[Rx]=n,n}function OTe(e,r){e.defaults.agent===r.agent&&delete r.agent,e.defaults.httpAgent===r.httpAgent&&delete r.httpAgent,e.defaults.httpsAgent===r.httpsAgent&&delete r.httpsAgent}async function PTe(e,r){let{retries:n,retryCondition:h}=e,a=(e.retryCount||0)<n&&h(r);if(typeof a=="object")try{return await a!==!1}catch{return!1}return a}async function NTe(e,r,n,h){r.retryCount+=1;let{retryDelay:a,shouldResetTimeout:d,onRetry:l}=r,v=a(r.retryCount,n);if(OTe(e,h),!d&&h.timeout&&r.lastRequestTime){let w=Date.now()-r.lastRequestTime,m=h.timeout-w-v;if(m<=0)return Promise.reject(n);h.timeout=m}return h.transformRequest=[w=>w],await l(r.retryCount,n,h),new Promise(w=>{setTimeout(()=>w(e(h)),v)})}async function CTe(e,r){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(r,e.retryCount)}var z0=(e,r)=>{let n=e.interceptors.request.use(a=>(Tte(a,r),a[Rx]?.validateResponse&&(a.validateStatus=()=>!1),a)),h=e.interceptors.response.use(null,async a=>{let{config:d}=a;if(!d)return Promise.reject(a);let l=Tte(d,r);return a.response&&l.validateResponse?.(a.response)?a.response:await PTe(l,a)?NTe(e,l,a,d):(await CTe(l,a),Promise.reject(a))});return{requestInterceptorId:n,responseInterceptorId:h}};z0.isNetworkError=Ite;z0.isSafeRequestError=xTe;z0.isIdempotentRequestError=Ote;z0.isNetworkOrIdempotentRequestError=Pte;z0.exponentialDelay=kTe;z0.isRetryableError=xx;var v3=z0;var XQe=({axiosConfig:e={},logger:r=Du.default,retryConfig:n={retries:5,retryDelay:v3.exponentialDelay,retryCondition:h=>v3.isRetryableError(h),onRetry(h,a,d){r.error(`Retrying request ${d.url} attempt ${h}`,a)}}}={})=>{let h=p3.create({...e,maxRedirects:0,headers:{...e.headers,"x-source-version":`${Gc}`,"x-source-identifier":"ar-io-sdk"},validateStatus:()=>!0});return v3(h,n),h};Be();Pe();Oe();async function set({signer:e,module:r=aB,luaCodeTxId:n=N8,ao:h=Zd(),scheduler:a=oB,state:d,stateContractTxId:l}){let v=await R2.transactions.getData(n,{decode:!0,string:!0}),w=await h.spawn({module:r,scheduler:a,signer:await So.createAoSigner(e)}),m=new So({processId:w,ao:h});return await m.send({tags:[{name:"Action",value:"Eval"},{name:"App-Name",value:"ArNS-ANT"},{name:"Source-Code-TX-ID",value:n}],data:v,signer:e}),d&&await m.send({tags:[{name:"Action",value:"Initialize-State"},...l!==void 0?[{name:"State-Contract-TX-ID",value:l}]:[]],data:JSON.stringify(d),signer:e}),w}async function fet({signer:e,processId:r,luaCodeTxId:n=N8,ao:h=Zd()}){let a=new So({processId:r,ao:h}),d=await R2.transactions.getData(n,{decode:!0,string:!0}),{id:l}=await a.send({tags:[{name:"Action",value:"Eval"},{name:"App-Name",value:"ArNS-ANT"},{name:"Source-Code-TX-ID",value:n}],data:d,signer:e});return l}Be();Pe();Oe();Be();Pe();Oe();var kx=hc(Lte(),1);Be();Pe();Oe();var $Te=Object.defineProperty,UTe=(e,r,n)=>r in e?$Te(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,dv=(e,r,n)=>(UTe(e,typeof r!="symbol"?r+"":r,n),n),Ix=class{constructor(r){dv(this,"value"),dv(this,"next"),this.value=r}},Bx=class{constructor(){dv(this,"head"),dv(this,"tail"),dv(this,"_size",0),this.clear()}clear(){this.head=void 0,this.tail=void 0,this._size=0}push(r){let n=new Ix(r);return this.head&&this.tail?(this.tail.next=n,this.tail=n):(this.head=n,this.tail=n),this._size++,this._size}pop(){if(!this.head)return;let r=this.head;return this.head=this.head.next,this._size--,r.value}get size(){return this._size}*[Symbol.iterator](){let r=this.head;for(;r;)yield r.value,r=r.next}};function Ox(e){if(!((Number.isInteger(e)||e===1/0)&&e>0))throw new TypeError("Expected `concurrency` to be a number greater than 1");let r=new Bx,n=0,h=()=>{n--,r.size>0&&r.pop()()},a=async(v,w,m)=>{n++;let y=(async()=>v(...m))();w(y);try{await y}catch{}h()},d=(v,w,m)=>{r.push(a.bind(null,v,w,m)),(async()=>(await Promise.resolve(),n<e&&r.size>0&&r.pop()()))()},l=(v,...w)=>new Promise(m=>{d(v,m,w)});return Object.defineProperties(l,{activeCount:{get:()=>n},pendingCount:{get:()=>r.size},clearQueue:{value:()=>{r.clear()}}}),l}var Net=async({address:e,contract:r=Wd.init({processId:yl})})=>{let n=Ox(50),h=await Ute({contract:r}),a=Object.values(h).filter(l=>l.processId!==void 0).map(l=>l.processId),d=await Promise.all(a.map(async l=>n(async()=>{let v=wp.init({processId:l}),{Owner:w,Controllers:m}=await v.getState();if(w===e||m.includes(e))return l})));return d.length===0?[]:[...new Set(d)]};function Dte(e,r){return new Promise((n,h)=>{let a=setTimeout(()=>{h(new Error("Timeout"))},e);r.then(d=>{clearTimeout(a),n(d)}).catch(d=>{clearTimeout(a),h(d)})})}var $te=class extends kx.default{contract;timeoutMs;throttle;logger;constructor({contract:r=Wd.init({processId:yl}),timeoutMs:n=6e4,concurrency:h=30,logger:a=Du.default}={}){super(),this.contract=r,this.timeoutMs=n,this.throttle=Ox(h),this.logger=a}async fetchProcessesOwnedByWallet({address:r}){let n={};await Dte(this.timeoutMs,Ute({contract:this.contract,emitter:this})).catch(a=>(this.emit("error",`Error getting ArNS records: ${a}`),this.logger.error("Error getting ArNS records",{message:a?.message,stack:a?.stack}),{})).then(a=>{a&&Object.entries(a).forEach(([d,l])=>{l.processId!==void 0&&(n[l.processId]===void 0&&(n[l.processId]={state:void 0,names:{}}),n[l.processId].names[d]=l)})});let h=Object.keys(n).length;this.emit("progress",0,h),await Promise.all(Object.keys(n).map(async(a,d)=>this.throttle(async()=>{if(n[a].state!==void 0){this.emit("progress",d+1,h);return}let l=wp.init({processId:a}),v=await Dte(this.timeoutMs,l.getState()).catch(w=>{this.emit("error",`Error getting state for process ${a}: ${w}`)});(v?.Owner===r||v?.Controllers.includes(r))&&(n[a].state=v,this.emit("process",a,n[a])),this.emit("progress",d+1,h)}))),this.emit("end",n)}},Ute=async({contract:e=Wd.init({processId:yl}),emitter:r,logger:n=Du.default})=>{let h,a=Date.now(),d={};do{let l=await e.getArNSRecords({cursor:h}).catch(v=>{n?.error("Error getting ArNS records",{message:v?.message,stack:v?.stack}),r?.emit("arns:error",`Error getting ArNS records: ${v}`)});if(!l)return{};l.items.forEach(v=>{let{name:w,...m}=v;d[w]=m}),n.debug("Fetched page of ArNS records",{totalRecordCount:l.totalItems,fetchedRecordCount:Object.keys(d).length,cursor:l.nextCursor}),r?.emit("arns:pageLoaded",{totalRecordCount:l.totalItems,fetchedRecordCount:Object.keys(d).length,records:l.items,cursor:l.nextCursor}),h=l.nextCursor}while(h!==void 0);return r?.emit("arns:end",d),n.debug("Fetched all ArNS records",{totalRecordCount:Object.keys(d).length,durationMs:Date.now()-a}),d};var export_ArconnectSigner=qte.ArconnectSigner;var export_ArweaveSigner=qte.ArweaveSigner;export{wp as ANT,fke as ANT_CONTRACT_FUNCTIONS,N8 as ANT_LUA_ID,So as AOProcess,aB as AOS_MODULE_ID,bke as ARNS_DEVNET_REGISTRY_TX,yke as ARNS_TESTNET_REGISTRY_TX,nB as ARWEAVE_TX_REGEX,ske as AR_IO_CONTRACT_FUNCTIONS,pB as AbortError,h6 as AoANTReadable,Qw as AoANTWriteable,$te as ArNSEventEmitter,export_ArconnectSigner as ArconnectSigner,export_ArweaveSigner as ArweaveSigner,uB as BadRequest,zs as BaseError,oB as DEFAULT_SCHEDULER_ID,vie as DENOMINATIONS,mke as FQDN_REGEX,hB as FailedRequestError,Wd as IO,Yb as IOReadable,L8 as IOToken,tx as IOWriteable,mie as IO_DEVNET_PROCESS_ID,yl as IO_TESTNET_PROCESS_ID,yh as InvalidContractConfigurationError,dB as InvalidProcessConfigurationError,cB as InvalidSignerError,Du as Logger,P8 as MIO_PER_IO,fB as NotFound,gke as SORT_KEY_REGEX,lB as UnknownError,mm as WriteInteractionError,XQe as createAxiosInstance,fet as evolveANT,Ute as fetchAllArNSRecords,Net as getANTProcessesOwnedByWallet,oke as ioContractInteractions,die as ioContractReadInteractions,pie as ioContractWriteInteractions,wke as ioDevnetProcessId,Bke as isBlockHeight,Dke as isLeasedArNSRecord,dc as isProcessConfiguration,pc as isProcessIdConfiguration,D8 as mIOToken,ex as safeDecode,set as spawnANT,sB as validateArweaveId};
198
+ `+d):h.stack=d}catch{}}throw h}}_request(r,n){typeof r=="string"?(n=n||{},n.url=r):n=r||{},n=If(this.defaults,n);let{transitional:h,paramsSerializer:a,headers:d}=n;h!==void 0&&d3.assertOptions(h,{silentJSONParsing:hl.transitional(hl.boolean),forcedJSONParsing:hl.transitional(hl.boolean),clarifyTimeoutError:hl.transitional(hl.boolean)},!1),a!=null&&(Kt.isFunction(a)?n.paramsSerializer={serialize:a}:d3.assertOptions(a,{encode:hl.function,serialize:hl.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=d&&Kt.merge(d.common,d[n.method]);d&&Kt.forEach(["delete","get","head","post","put","patch","common"],A=>{delete d[A]}),n.headers=Qn.concat(l,d);let v=[],w=!0;this.interceptors.request.forEach(function(k){typeof k.runWhen=="function"&&k.runWhen(n)===!1||(w=w&&k.synchronous,v.unshift(k.fulfilled,k.rejected))});let m=[];this.interceptors.response.forEach(function(k){m.push(k.fulfilled,k.rejected)});let y,g=0,S;if(!w){let A=[l3.bind(this),void 0];for(A.unshift.apply(A,v),A.push.apply(A,m),S=A.length,y=Promise.resolve(n);g<S;)y=y.then(A[g++],A[g++]);return y}S=v.length;let R=n;for(g=0;g<S;){let A=v[g++],k=v[g++];try{R=A(R)}catch(I){k.call(this,I);break}}try{y=l3.call(this,R)}catch(A){return Promise.reject(A)}for(g=0,S=m.length;g<S;)y=y.then(m[g++],m[g++]);return y}getUri(r){r=If(this.defaults,r);let n=hv(r.baseURL,r.url);return av(n,r.params,r.paramsSerializer)}};Kt.forEach(["delete","get","head","options"],function(r){Qd.prototype[r]=function(n,h){return this.request(If(h||{},{method:r,url:n,data:(h||{}).data}))}});Kt.forEach(["post","put","patch"],function(r){function n(h){return function(d,l,v){return this.request(If(v||{},{method:r,headers:h?{"Content-Type":"multipart/form-data"}:{},url:d,data:l}))}}Qd.prototype[r]=n(),Qd.prototype[r+"Form"]=n(!0)});var lv=Qd;Be();Pe();Oe();var Mx=class e{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(d){n=d});let h=this;this.promise.then(a=>{if(!h._listeners)return;let d=h._listeners.length;for(;d-- >0;)h._listeners[d](a);h._listeners=null}),this.promise.then=a=>{let d,l=new Promise(v=>{h.subscribe(v),d=v}).then(a);return l.cancel=function(){h.unsubscribe(d)},l},r(function(d,l,v){h.reason||(h.reason=new pu(d,l,v),n(h.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;let n=this._listeners.indexOf(r);n!==-1&&this._listeners.splice(n,1)}static source(){let r;return{token:new e(function(a){r=a}),cancel:r}}},Ste=Mx;Be();Pe();Oe();function Sx(e){return function(n){return e.apply(null,n)}}Be();Pe();Oe();function Ex(e){return Kt.isObject(e)&&e.isAxiosError===!0}Be();Pe();Oe();var Ax={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ax).forEach(([e,r])=>{Ax[r]=e});var Ete=Ax;function Ate(e){let r=new lv(e),n=rv(lv.prototype.request,r);return Kt.extend(n,lv.prototype,r,{allOwnKeys:!0}),Kt.extend(n,r,null,{allOwnKeys:!0}),n.create=function(a){return Ate(If(e,a))},n}var Fn=Ate(Jd);Fn.Axios=lv;Fn.CanceledError=pu;Fn.CancelToken=Ste;Fn.isCancel=fv;Fn.VERSION=c3;Fn.toFormData=ul;Fn.AxiosError=Lr;Fn.Cancel=Fn.CanceledError;Fn.all=function(r){return Promise.all(r)};Fn.spread=Sx;Fn.isAxiosError=Ex;Fn.mergeConfig=If;Fn.AxiosHeaders=Qn;Fn.formToJSON=e=>a3(Kt.isHTMLForm(e)?new FormData(e):e);Fn.getAdapter=h3.getAdapter;Fn.HttpStatusCode=Ete;Fn.default=Fn;var p3=Fn;var{Axios:mQe,AxiosError:gQe,CanceledError:yQe,isCancel:bQe,CancelToken:wQe,VERSION:_Qe,all:MQe,Cancel:SQe,isAxiosError:EQe,spread:AQe,toFormData:RQe,AxiosHeaders:xQe,HttpStatusCode:TQe,formToJSON:kQe,getAdapter:IQe,mergeConfig:BQe}=p3;Be();Pe();Oe();var kte=hc(xte(),1),Rx="axios-retry";function Ite(e){let r=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||r.includes(e.code)?!1:(0,kte.default)(e)}var Bte=["get","head","options"],RTe=Bte.concat(["put","delete"]);function xx(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function xTe(e){return e.config?.method?xx(e)&&Bte.indexOf(e.config.method)!==-1:!1}function Ote(e){return e.config?.method?xx(e)&&RTe.indexOf(e.config.method)!==-1:!1}function Pte(e){return Ite(e)||Ote(e)}function Nte(e=void 0){let r=e?.response?.headers["retry-after"];if(!r)return 0;let n=(Number(r)||0)*1e3;return n===0&&(n=(new Date(r).valueOf()||0)-Date.now()),Math.max(0,n)}function TTe(e=0,r=void 0){return Math.max(0,Nte(r))}function kTe(e=0,r=void 0,n=100){let h=2**e*n,a=Math.max(h,Nte(r)),d=a*.2*Math.random();return a+d}var ITe={retries:3,retryCondition:Pte,retryDelay:TTe,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function BTe(e,r){return{...ITe,...r,...e[Rx]}}function Tte(e,r){let n=BTe(e,r||{});return n.retryCount=n.retryCount||0,n.lastRequestTime=n.lastRequestTime||Date.now(),e[Rx]=n,n}function OTe(e,r){e.defaults.agent===r.agent&&delete r.agent,e.defaults.httpAgent===r.httpAgent&&delete r.httpAgent,e.defaults.httpsAgent===r.httpsAgent&&delete r.httpsAgent}async function PTe(e,r){let{retries:n,retryCondition:h}=e,a=(e.retryCount||0)<n&&h(r);if(typeof a=="object")try{return await a!==!1}catch{return!1}return a}async function NTe(e,r,n,h){r.retryCount+=1;let{retryDelay:a,shouldResetTimeout:d,onRetry:l}=r,v=a(r.retryCount,n);if(OTe(e,h),!d&&h.timeout&&r.lastRequestTime){let w=Date.now()-r.lastRequestTime,m=h.timeout-w-v;if(m<=0)return Promise.reject(n);h.timeout=m}return h.transformRequest=[w=>w],await l(r.retryCount,n,h),new Promise(w=>{setTimeout(()=>w(e(h)),v)})}async function CTe(e,r){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(r,e.retryCount)}var z0=(e,r)=>{let n=e.interceptors.request.use(a=>(Tte(a,r),a[Rx]?.validateResponse&&(a.validateStatus=()=>!1),a)),h=e.interceptors.response.use(null,async a=>{let{config:d}=a;if(!d)return Promise.reject(a);let l=Tte(d,r);return a.response&&l.validateResponse?.(a.response)?a.response:await PTe(l,a)?NTe(e,l,a,d):(await CTe(l,a),Promise.reject(a))});return{requestInterceptorId:n,responseInterceptorId:h}};z0.isNetworkError=Ite;z0.isSafeRequestError=xTe;z0.isIdempotentRequestError=Ote;z0.isNetworkOrIdempotentRequestError=Pte;z0.exponentialDelay=kTe;z0.isRetryableError=xx;var v3=z0;var XQe=({axiosConfig:e={},logger:r=Du.default,retryConfig:n={retries:5,retryDelay:v3.exponentialDelay,retryCondition:h=>v3.isRetryableError(h),onRetry(h,a,d){r.error(`Retrying request ${d.url} attempt ${h}`,a)}}}={})=>{let h=p3.create({...e,maxRedirects:0,headers:{...e.headers,"x-source-version":`${Gc}`,"x-source-identifier":"ar-io-sdk"},validateStatus:()=>!0});return v3(h,n),h};Be();Pe();Oe();async function set({signer:e,module:r=aB,luaCodeTxId:n=N8,ao:h=Zd(),scheduler:a=oB,state:d,stateContractTxId:l}){let v=await R2.transactions.getData(n,{decode:!0,string:!0}),w=await h.spawn({module:r,scheduler:a,signer:await So.createAoSigner(e)}),m=new So({processId:w,ao:h});return await m.send({tags:[{name:"Action",value:"Eval"},{name:"App-Name",value:"ArNS-ANT"},{name:"Source-Code-TX-ID",value:n}],data:v,signer:e}),d&&await m.send({tags:[{name:"Action",value:"Initialize-State"},...l!==void 0?[{name:"State-Contract-TX-ID",value:l}]:[]],data:JSON.stringify(d),signer:e}),w}async function fet({signer:e,processId:r,luaCodeTxId:n=N8,ao:h=Zd()}){let a=new So({processId:r,ao:h}),d=await R2.transactions.getData(n,{decode:!0,string:!0}),{id:l}=await a.send({tags:[{name:"Action",value:"Eval"},{name:"App-Name",value:"ArNS-ANT"},{name:"Source-Code-TX-ID",value:n}],data:d,signer:e});return l}Be();Pe();Oe();Be();Pe();Oe();var kx=hc(Lte(),1);Be();Pe();Oe();var $Te=Object.defineProperty,UTe=(e,r,n)=>r in e?$Te(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,dv=(e,r,n)=>(UTe(e,typeof r!="symbol"?r+"":r,n),n),Ix=class{constructor(r){dv(this,"value"),dv(this,"next"),this.value=r}},Bx=class{constructor(){dv(this,"head"),dv(this,"tail"),dv(this,"_size",0),this.clear()}clear(){this.head=void 0,this.tail=void 0,this._size=0}push(r){let n=new Ix(r);return this.head&&this.tail?(this.tail.next=n,this.tail=n):(this.head=n,this.tail=n),this._size++,this._size}pop(){if(!this.head)return;let r=this.head;return this.head=this.head.next,this._size--,r.value}get size(){return this._size}*[Symbol.iterator](){let r=this.head;for(;r;)yield r.value,r=r.next}};function Ox(e){if(!((Number.isInteger(e)||e===1/0)&&e>0))throw new TypeError("Expected `concurrency` to be a number greater than 1");let r=new Bx,n=0,h=()=>{n--,r.size>0&&r.pop()()},a=async(v,w,m)=>{n++;let y=(async()=>v(...m))();w(y);try{await y}catch{}h()},d=(v,w,m)=>{r.push(a.bind(null,v,w,m)),(async()=>(await Promise.resolve(),n<e&&r.size>0&&r.pop()()))()},l=(v,...w)=>new Promise(m=>{d(v,m,w)});return Object.defineProperties(l,{activeCount:{get:()=>n},pendingCount:{get:()=>r.size},clearQueue:{value:()=>{r.clear()}}}),l}var Net=async({address:e,contract:r=Wd.init({processId:yl})})=>{let n=Ox(50),h=await Ute({contract:r}),a=Object.values(h).filter(l=>l.processId!==void 0).map(l=>l.processId),d=await Promise.all(a.map(async l=>n(async()=>{let v=wp.init({processId:l}),{Owner:w,Controllers:m}=await v.getState();if(w===e||m.includes(e))return l})));return d.length===0?[]:[...new Set(d)]};function Dte(e,r){return new Promise((n,h)=>{let a=setTimeout(()=>{h(new Error("Timeout"))},e);r.then(d=>{clearTimeout(a),n(d)}).catch(d=>{clearTimeout(a),h(d)})})}var $te=class extends kx.default{contract;timeoutMs;throttle;logger;constructor({contract:r=Wd.init({processId:yl}),timeoutMs:n=6e4,concurrency:h=30,logger:a=Du.default}={}){super(),this.contract=r,this.timeoutMs=n,this.throttle=Ox(h),this.logger=a}async fetchProcessesOwnedByWallet({address:r,pageSize:n}){let h={};await Dte(this.timeoutMs,Ute({contract:this.contract,emitter:this,pageSize:n})).catch(d=>(this.emit("error",`Error getting ArNS records: ${d}`),this.logger.error("Error getting ArNS records",{message:d?.message,stack:d?.stack}),{})).then(d=>{d&&Object.entries(d).forEach(([l,v])=>{v.processId!==void 0&&(h[v.processId]===void 0&&(h[v.processId]={state:void 0,names:{}}),h[v.processId].names[l]=v)})});let a=Object.keys(h).length;this.emit("progress",0,a),await Promise.all(Object.keys(h).map(async(d,l)=>this.throttle(async()=>{if(h[d].state!==void 0){this.emit("progress",l+1,a);return}let v=wp.init({processId:d}),w=await Dte(this.timeoutMs,v.getState()).catch(m=>{this.emit("error",`Error getting state for process ${d}: ${m}`)});(w?.Owner===r||w?.Controllers.includes(r))&&(h[d].state=w,this.emit("process",d,h[d])),this.emit("progress",l+1,a)}))),this.emit("end",h)}},Ute=async({contract:e=Wd.init({processId:yl}),emitter:r,logger:n=Du.default,pageSize:h=5e4})=>{let a,d=Date.now(),l={};do{let v=await e.getArNSRecords({cursor:a,limit:h}).catch(w=>{n?.error("Error getting ArNS records",{message:w?.message,stack:w?.stack}),r?.emit("arns:error",`Error getting ArNS records: ${w}`)});if(!v)return{};v.items.forEach(w=>{let{name:m,...y}=w;l[m]=y}),n.debug("Fetched page of ArNS records",{totalRecordCount:v.totalItems,fetchedRecordCount:Object.keys(l).length,cursor:v.nextCursor}),r?.emit("arns:pageLoaded",{totalRecordCount:v.totalItems,fetchedRecordCount:Object.keys(l).length,records:v.items,cursor:v.nextCursor}),a=v.nextCursor}while(a!==void 0);return r?.emit("arns:end",l),n.debug("Fetched all ArNS records",{totalRecordCount:Object.keys(l).length,durationMs:Date.now()-d}),l};var export_ArconnectSigner=qte.ArconnectSigner;var export_ArweaveSigner=qte.ArweaveSigner;export{wp as ANT,fke as ANT_CONTRACT_FUNCTIONS,N8 as ANT_LUA_ID,So as AOProcess,aB as AOS_MODULE_ID,bke as ARNS_DEVNET_REGISTRY_TX,yke as ARNS_TESTNET_REGISTRY_TX,nB as ARWEAVE_TX_REGEX,ske as AR_IO_CONTRACT_FUNCTIONS,pB as AbortError,h6 as AoANTReadable,Qw as AoANTWriteable,$te as ArNSEventEmitter,export_ArconnectSigner as ArconnectSigner,export_ArweaveSigner as ArweaveSigner,uB as BadRequest,zs as BaseError,oB as DEFAULT_SCHEDULER_ID,vie as DENOMINATIONS,mke as FQDN_REGEX,hB as FailedRequestError,Wd as IO,Yb as IOReadable,L8 as IOToken,tx as IOWriteable,mie as IO_DEVNET_PROCESS_ID,yl as IO_TESTNET_PROCESS_ID,yh as InvalidContractConfigurationError,dB as InvalidProcessConfigurationError,cB as InvalidSignerError,Du as Logger,P8 as MIO_PER_IO,fB as NotFound,gke as SORT_KEY_REGEX,lB as UnknownError,mm as WriteInteractionError,XQe as createAxiosInstance,fet as evolveANT,Ute as fetchAllArNSRecords,Net as getANTProcessesOwnedByWallet,oke as ioContractInteractions,die as ioContractReadInteractions,pie as ioContractWriteInteractions,wke as ioDevnetProcessId,Bke as isBlockHeight,Dke as isLeasedArNSRecord,dc as isProcessConfiguration,pc as isProcessIdConfiguration,D8 as mIOToken,ex as safeDecode,set as spawnANT,sB as validateArweaveId};
199
199
  /*! Bundled license information:
200
200
 
201
201
  @jspm/core/nodelibs/browser/buffer.js: