From eb8bc938206916e2e59215455dd4d76893b1acd8 Mon Sep 17 00:00:00 2001 From: Jenkins CI Date: Fri, 16 Feb 2024 17:27:50 +0000 Subject: [PATCH] ec72f7c79076f820938bf6496dffac26504a5365 --- CNAME | 1 + asset-manifest.json | 17 + favicon.png | Bin 0 -> 4236 bytes index.html | 1 + logo512.png | Bin 0 -> 16130 bytes manifest.json | 20 + robots.txt | 3 + static/js/2.0d06edc4.chunk.js | 2 + static/js/2.0d06edc4.chunk.js.LICENSE.txt | 578 ++++++++++++++++++++++ static/js/3.1b4d8c30.chunk.js | 2 + static/js/3.1b4d8c30.chunk.js.LICENSE.txt | 29 ++ static/js/4.afda9aae.chunk.js | 1 + static/js/main.3776ddd3.chunk.js | 1 + static/js/runtime-main.7fbe6f18.js | 1 + 14 files changed, 656 insertions(+) create mode 100644 CNAME create mode 100644 asset-manifest.json create mode 100644 favicon.png create mode 100644 index.html create mode 100644 logo512.png create mode 100644 manifest.json create mode 100644 robots.txt create mode 100644 static/js/2.0d06edc4.chunk.js create mode 100644 static/js/2.0d06edc4.chunk.js.LICENSE.txt create mode 100644 static/js/3.1b4d8c30.chunk.js create mode 100644 static/js/3.1b4d8c30.chunk.js.LICENSE.txt create mode 100644 static/js/4.afda9aae.chunk.js create mode 100644 static/js/main.3776ddd3.chunk.js create mode 100644 static/js/runtime-main.7fbe6f18.js diff --git a/CNAME b/CNAME new file mode 100644 index 000000000..1013752b1 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +example.rarible.org diff --git a/asset-manifest.json b/asset-manifest.json new file mode 100644 index 000000000..dab3c97e6 --- /dev/null +++ b/asset-manifest.json @@ -0,0 +1,17 @@ +{ + "files": { + "main.js": "/static/js/main.3776ddd3.chunk.js", + "runtime-main.js": "/static/js/runtime-main.7fbe6f18.js", + "static/js/2.0d06edc4.chunk.js": "/static/js/2.0d06edc4.chunk.js", + "static/js/3.1b4d8c30.chunk.js": "/static/js/3.1b4d8c30.chunk.js", + "static/js/4.afda9aae.chunk.js": "/static/js/4.afda9aae.chunk.js", + "index.html": "/index.html", + "static/js/2.0d06edc4.chunk.js.LICENSE.txt": "/static/js/2.0d06edc4.chunk.js.LICENSE.txt", + "static/js/3.1b4d8c30.chunk.js.LICENSE.txt": "/static/js/3.1b4d8c30.chunk.js.LICENSE.txt" + }, + "entrypoints": [ + "static/js/runtime-main.7fbe6f18.js", + "static/js/2.0d06edc4.chunk.js", + "static/js/main.3776ddd3.chunk.js" + ] +} \ No newline at end of file diff --git a/favicon.png b/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..8ff911b756c0982429671916ae1a2d72688dcd79 GIT binary patch literal 4236 zcmeHLX*iVc8h>YuJ-a_e7|K#)k4c815k)Fx%Qi(MjU|*!F{Kbf<)36HD#lRRMN{@I zlyzzhCQGxJY?Ey`umAaYuJiqTI3J$te(vSDuIIhq`}ceA`+a!E-daRRP6z-1krOs( z2LOPi?koX5(1QPH)B_5^U>ny^0FY7LS&$PB`+tK*NT`FgB|!YL_ZO(Z{47pc0KnT6 z;mwP@03fb>0&Q_V0>Yy71!b*dlNS1xl4`Cs2#5EWv4&46wvY&nzVp1Tcl-J*>pD9VMHf5yX9<`H)Ev6mwV|Db>w`_*w*WX5 z19r;Pk2s+^KjC{YRl_|K%ZUYXNiMgzJ;U!|Y8=^5WzS80Ie&#~xwchH#! zXzORj5GrwSO$gwv(LIG;a@s2l>^?@>rF7Y2aNb0KR7+MRTv7!vc2?m5XZV4nH@g5E zadE%_2E$83AaE-bU?cH=70gCj5k_U2){J+($sCxSa?$g}tAhoBj_AVR_g85iNp_C)h)$z8nLdqFZ_WNPJZH%D7g&4omh)J&! zm+jGj@2=`_Qjf%wH8?29qMg&ujM3FlU2hod`K@%XvMK9r-K3FdZ@COrD75Fn%4rqP zh&Ks|A79@ao6sN#9uX22^};E3vZFjqE->OVQ24rU_WSy_UM9#JH*O(Mf@g}1RLo60 z#$=Cxcj>9R;e|#g$Krv|)BlLZ;DvM!S~L?6G*&F!YN^XL3FYbv3iQjn%_azRT$B*c zb0&T~m-5BkZ#~Nfp{y?X`Pw?S>T7RFaSsf-{I%690&9weLYEyH(pF}ItbAU;U~^^B zHzr%(NQ&pxkPF{sVGu~rPj-Z4$Uz{HWfWmooEy5>0)-!M@HMz|5R7l+jML}ej3YsJ zd87UCBlG8$^=fdEWku2uXp^~z4?B&*Kj_bqx}@~d4GPstVu;SN((r(Avx0DgDxCDW zHpE~q71U`+DVtX?n9FXXfq(2*PHRX%o)-|PIAgZ)L*L06bZIb@_!T6?G5Ic^>B-=c z%gvHbe*b|i7Y)r684KfQP!lJL9E=hmX3k~4k7P8-unt|=c1a;>xPxC8CiqGXwTYvaE-rK3Z>0ZAdOxEs0EaV}$hom@0c@)LY!K1{g{9cEa z&-O*uGhXCsEcdU}@cO8CJ5!{@=Q66)6pgob|Ck>9#@aJy(GG(}`fzC`U||W(UtYUv zvUxsVo!m*w$gRzrvSZ}-nKPOeqx&egkD~ojJMrB-;y{Bmj6|-;vaGLrf_sU&b40? z7st$0eOmn!eTdc*O2i(v1tI48T^1eYyLJuC+f1dcqj>-aVV{ZceSrrICP%$ljopa@ z`a=(CpY_CGFoc6nj?UCtXn|fz0)3c-)KfoWX0{8Xk2NL#qAiE^Hnn?O>g)U)^Cm0j zC3MWZ5K~u0|6z*aLL{^lx!#5K_e=Mt;WH|?PP7Q?ID$kFyRaVg;Y+p^c-2Z)Y8Kc3 zFNTtErxsYF+U^@z1@nmNgzoZ$4nhULzA_FTym~x6WIOyuX-7t20mLry4PQi3svBxA5xDCmEkCz_>M^_@jPSn&)}VeW6@c4 zQ3w!!*@+(sQ*EatGK|1{`_Y!lj@>ri+H3b10cbdYx_2uOKB*Ax=K<^TkG7*hvuIA=4%JuoF8QZnlZpIvQOM-rTZ|Zkd?v zDl|8`7HSbkUfNwvjb0AX&9AE2r|ltN@^1!YMD?=I>mu0{0+rIQl1Dz6ys)nym8rtM}zK-e`xYd%CmsNDsr)@zZm54DS>^ z{$Or)9uEk%w_jUm&1x#?+R~q5>MVndL6FRRec*uR3@D~f_?~+T;z(Iyj9R~Bp{54! zKZixzBUM#!x7cD({R5D@iZ~W^Q;KSf(=dFx@SPVq97xDD_Y)fH_2Zy+;zMWqggOGv zD*5&GK-|0CsSh4r(RP>dy$*#6Pb{aLQU*B>1IfCrGJ276xCJ~>0XQihzT1z4+~p0P zV)Ndg7Zd;vfWeqn$H)xm|72gV^L+->2U#Mq4|-^pxW$-&P0h24|Fy3qxbp5d(TAqSHL~3skrzf$& z-0P0+sv+G)6c~L&9O+haqEe$G`dXzKB}NZ`iqevU+Engp4nB=qLL9Z@pD^oP4pFZ* z>Z_qhrQR^0NJB~X;c4a38xaI5w{EH_=&BBOF@2GukpOn$3OJ?j^9}juk3L|!&q6UF ztfBjt`nD&AC(33hSAmLJdc^z9$=}RCFY?l}>ek@Zdm`a@E2p3z#8}xs>-2GmzmYBd zBKCkV#=^0AYU<0QrG~%7)>C!{5PEQ|38~;s>D1pvwB}N=^&Az>#L?s||>1fjn8}oOWgNoyBhS6smIwgUgy7l8~ zie+zkzFyt;b-w>-i!3IpDvmDW^>b=K4ksA!sy8!cw!0`|?9ppr#;WnGb4+)P`n>x? zLA$-F1KTIx>qvsL62s&R40wNy#R*=uyg{#ZQ-_Qhy*S>r{zT*ke$TgSX*JG66gG1) zBup+9+x#az$`c*#X#*r*c<=6*UY_O^=y@QA$${3L6SOJy7?x|p456XH(#5jL*mJ@i z6eFrqmj70PftAE85B|U#;{xsBSjUAfF9oW5;(?=S_-m!qN7Iux`AQ3)qwjS2Ky~wd zg9GhRarible SDK Example App
\ No newline at end of file diff --git a/logo512.png b/logo512.png new file mode 100644 index 0000000000000000000000000000000000000000..7b1ea9dfec455d273240f88e87c2a564cbb83d1a GIT binary patch literal 16130 zcmeHtXH-;O((Y-ZfPhNQsYxPPz$Qy>vXV0hO-_&{x=%=+&AH@yURsCstQvuoEmyP7y%ZBH=I^7sazso3u$DSN)e>Q*Nz9)CuH)KYkSK7Sf zdPHO9+P?Q}YTZgMEH80od$FKnK4h;w@ThaoaDl#x+_}AK>&Llm;mMk0^_TMSvKf|y zCYJgD9jkd#A1#-NDmAOY2Zes*l&AaQErj348(rNSTIb#wkNe7sn^s#Dh20Bj*&x5L zsF~C3r)af$i{EF(vetks?3jxTwfsKcohYDWd2;1&U7?+@i*<10=Wg|@XO$X>IvzpW z{0IGJNk+?UP0u31IYV!cA?<LmjMX=l-2%KrK@EP`Pnw2!V z|L$6mRX2@gfS_!ygbPo5AW`PU;r;2%&+jf%SrNOFx2{`_efv~D@Ca6CV4wfktj$)a z`2LS!mc3!Yjmpx6+)Ba5dlqvA&wZV{3&Wa8lU|1~h%w>Hh0a~*br48D8R^YtC+&Ld z5}Pu^0=?8T6wW{~&PQmGbpSkxEv1OR43r*lqIObv;I)*cU!Lp8b>Yd`=Oe}@?XBFes`FLV?_MvjYCPr|@e`8Ts^1f6 z*=jtAA9rsGJv<5@pV<@(lYSwQK~w$1oi~Xs_Z|Fh!B-)VXI+cR7V`2B_OmJlRI2m! z3MOCjWJdPGHgo<*u|H!$hTuFGd6_bDRy~)8c$21xf zu+gg^Rz_;aQcyh=vT3>@Yd+w>a{BZ5EL>&o+lrS{H=EPXIc`4=`WH#`59356jnhpJ#Ukd;buZW|Utg1scIk#QTf0owDw@iq;I+K5 zAV^-vD}Ujps(G89jCZV(2bOS$t1jAL)_P`6L(D0DS|)?OMX2j?O@e_!bzwZ->Dz$v zOdEec)Na1AaV`a8)&m~HQ|1WtfF?syeXSQnGn!w(*QUU?za}%jg@BQP5%&H-)di}= zqZirIU7`>`^Cc{&ees)=z*U33ssYM&E`ITe?&vK1c3tsRQIR=rf+=FnyT3b(t>H8(YL#r3T&OqCsvUC|zIwtibBKo=+`i zP!YCo@gz^U@i%C1#r19-w(zRnTIk=g^LQirOH2e!H+G3AwO=MPGE-Sj+%)%E)!BOLeg7(Z4fFQ6hd-6 z^vKVb16PzL3yN+cy|XsD)Zzv8bc(1Sr8pbAGKGu;2xraIvQ;RUytC0OEPVxw;eQEa zkW7@k4e(WGx&JHs>`D1n?ePRRk7D7kaQ+Hqk~|+8Jpy^DP{+1wc2Vr5hZMzG?iij5 z!tL&{2?aW{$!|P-cQf>|aEHnJF09QHKcim|-SD?w3hh;hY^LK1*VY>-jbkeL;v2N! z(VXyt_iZC@#h^Z~3w&UNfrMS47x=_blStV$aajNKsHA`{ByyByziz zidJp@O7bY=K=a8x6_U3lS9~+;Oh~(jiY#o%^GsTgs~WFWs03t(5VGPw5){hD%8k<__Q?x8$i!K~5w1~%kZ9O8|niSg4k=dv^ zR2*n3Hh*}vU5uosj9o)MHigrGoosg7FY5DE?ts4hvUO>DSYYB}v?RSPgwD*=lhlug zQs_&ujvi5Sr-%>%<72NI_eV|Iq?%@u_wcW5$=O-{tQ*zyRu<=CkXR-Bm;pmd;K|Zr461Kip2mxTerk92&30 zjwn4R{K>GP74^{UlU?LM-9h3r_6+T`s6*(jHa`!TA;)mGd*OF-*;vX3AJd777JJU_5C9jZZ;tM5T1{bY zoTT6GfAw*N@4W80o?@<-x0+%>r065^JPINdEavuna&0H&=`$@IAQ3`Xj$qfi&ldD( ziR&|+-OJW$I+ZFshU2HO<$KB3Q^Ngz5#iUJ+#oKm<(r9ewxGJ?&6q~X3noC4U*EMq z;z#3=D7ulTr&H08DhaVa7IqI8*zc8o3tnCN6UV8NN%^s zzvifaC_oZJ%n=z%DEmT7Si~l+XP$_HnofA)vzhE`8h2GYW34BY4>Yc56Z^i% zeyck4&huweCa$kTHGeGd`cyp!_uae9_~Ics$cA0d4{veTJrMo$%zfA z!toB(=d@WBVZ^R!G zD&dev!httab|{`T7b_Vs_TOgKEgw>vLcE_VURS1;RIIo@+^b}?tYe*;_u|dhdWp|W zp=(pGsv@riGY`A3L*0EwF5@YyCg)bMJb6c7UqyoZmm#baIi>Kib+BW{h(qW#nxfvFtXDM>ekpQF<`lNfn3okLL^zskWr zks#7#pFMbr)KVpRmP_4ol@38eBKe{#mLaGVvdQ4?=vV2bXLlv(ywVCfSPW13<_wm*hAaEP51-0s{7{=t6yi-}*p3CX|@l4?b ztRFRIaP^@dUU#x*G6zA6rc_Hc-a<1oL#Q#bEu(PhJG;CocM&}Wf%*&w?DEfhcQ`#0 z>O2M0Rk)RTtY<%|NqR(D#zdIHA04*mMN(U-xkL3+WiDCQMIY1OQp43F&<#_t=1{-S zN~12H>tlzT@{~-0-8wiyeiIeByYbBd?Oiy|g}>-t7e|l-wSAk6wFqRR2-2 zj8b4HwCi;onJ&NHkB^JAXq|`_B0*0N?Ty!Q*@=D+4fZQ)S?IO69_VT?L}|CYfxIQw zv{6?1rM43bsMx;}H8Erp+Z2CY%9fvE=vG=o;I94I{|nR6e40l_&IO$4KqJH_AiYVj zjKOqdJ1D(`R?wAFqVI>-0R>)~JY(~g{tBV8^oOhBfiI_7^ACF>xqaFzJXDI~l}fY; zY=+Tf8{T>kX8-Jrx#AmNll)qlL!f)c_aOfIwM+*8WD`Bn>dH%&@iaMQZDF-j_&bc z?yfTDMT;puPVBIkZZE(3IVcJv4{X2-rM#)2t8Y-7~+<3BL ze31#E`mv`LBFJn>L{)WV68}|BX0clMi+3JCwhNMHN(puHG@(&R7ftn33jf+0VI1i6 zIC{c!Sl$FrR&pUN+6Ve(%~~$#v5d~#ybO+n@paTkJAxPdIS`p2+7Cpg9zdIf@6Yd0 zeZZ-qZ&kCle+X=hm|nSz83xLDa4Gr5v=SsQwfMnszvd8rwkyKrVk-lnw~?ws<)hBD z5_VsI3Uj#=CT|Y$~;S69944hGeNes7hanol)zjN>@7%`m}f~w0f&{douc-{O6qa5o!wr zo|w;fFR7^xNPXfsG0)F^0WaR(i)vOwjeN(nN&Mt}g$WF5}I?htmt}Ybq@5 z`o<(`46HCqI4{DaPX*0Y9DS81%C#}2j8e>x=$7e6d-L*HQkRgmAH|C%O2&?**|TKN z7G=Cb(uoZiQYYniRoueIfv1%Lk9fq`DDYBDKSt~7Jbw^xNyHjNfoC-QA^KtK!J%FJ z*Q`5t)OeHmXx&LmJU$a9dWzPWl_R>hmW#=_j0(veQi9{BGT7E)60m^r;f zJe0%3yX3r6-|sg^gBashW|Q0ypEhkecb2Vo*zF5`*%5lZqknwjJmd%=J8U(NvZ}6H zK4a*3bB}LNqVm|nENgr8t)Oc|nr=Pf&FC;^GDcpgab9{^o88RS>F= zy?e}^+PBoMeO*s56nODkO(&|gV(`G5^hto`UX8Hs-j_h0vmo}CMp!5^BPSPPNVG6Ws~PprH%}7Blgw;412MXsr35E&7plf6(QA z8zRd1e7A6s=45SKz92WDn(tMEUkSX#1^93&XaNhc`-XQ#^-oG(5uLrHdEOFZ!=W84 zo#bAcJoSYCYIfLnQXiO@LNQ(1IkNwTG(;rd5C2XQ(lJf-k<+{Uv!{)_m5o(tEP7&z z!|DyWuYx9=9AqMjNCiV!<0I|}B$mCX6xNTE<%kJ3ke72gxOMzEOo6-7bTmRBGJ8l{ z-Lx3ilsy%}Nn;l?1$g@L7fF{h#}UQn+P{rWO;&0CM#kWH3l9fHERR@y`pW86pLl8$OB)C$PBZ_qjGcJWl%D`a&y8ThZ^d$B3Wv9m?B z>PK}36V+(YFTNsf%i3uu+^)T?k80LN6f*r_G6{zc4d=Hg(C8ZMF*c6aT1|cxeMk4w zn@Gz4lmE#5yzM8;vI|4ixVI^TWgNzh(X6U9rtF_<$7J!Bhp$bI-+sKoqN=N{@$vi9 z!cZ1s`V+~ztLCx};@Wy}Wk+>2g{4^axTj~wmxu+tJJHege_m8+N ze--LD?=!|VKBFz+7ctX8CU~nW$M?csu&+wKKnbF6tV$B>-S=>C==(S_x@^ox;& zWk!-?^2_ebJrB>pq0uR2@+bkB_e`H4@*&2+$3x_&`vYs}=KT6~gzdPfq}0A;oxK6l z!APb_(e#5dZ$G8Q^{UZ2iyHIIn!^k?*_atEk zYghY1$pr2qB@y>nJRezK!Z7g=L~A!8-MW&0Dm{&xVNbhS&*hjmao;3FE9AQf;i$&z zodzz8Pp~4or@gGhx0uSj>uuL@>2VE`c$%WAZ%1w>r{-_mka+rWG^{Qln?-+;h3vT- z(U~0lRE|5Uh-;_Uj1&MMQBI1Ax^P9szf~{6nq_WCii}#9JZ<#+OLc?mWYkyhU%H!j zBlgiPb*gylr}b2(zCz7E$+K@lc?BLnbb0%>;6qtNd|ee;)kD@p+;878&%d*ChGtTl zz7OcRPre%l{`ULJqkCv^!+6ac{MI8NV?%k^vdCzn51q0 ztNBY72P@wVytr_K*?%w&lg0-`1lSLMfo)U77~i=YI~dnP`iAuf$2cN${uT`*b%6ax zHSU!-#rOA~CN7EFD=Tv5bCL0tsT?VEBck@G9U9CL0}pm-2)w7%AFbC%U+uc~O-(*B z;kr6cmqMgpA|(Y}GAZaVhB54+xk$6RHO5#T|2njX{G71kfy;6+*X(m^%J0FiHk0nK z){xwEZafQdold0aytr)c#2@y8tUnZG>EiU2qtJul^=o&hU1rZ_+{?17C^i_XAR~DY zciZ8omPz3S^>-8RlQHR@Rovv4mi+SoVN9oSc_%c*LRy}R2uCNiATNYokhZ>Ukc%zMj$KZcSUNxw1aL$6*sun;xw?Bx2FS4g#+3xy z*kM6-*54vNE;8)KTDq)?9$pC6n*uilg!q*Mocu)CWrm$R?4$iaw%|16zEv>)9yLT z8uTwUy!FAVyx?7gw}-EnEkfB3;qJrnj}UgYf7kc)^>Y2~j-9O_!WH2Lih6^q3jfoR zs&FmcziVJAaBy<-{H+C&{ZEoUPWFG1^-s28XMVf$kA{Hif5-hN>A(5@TNsqm(vnp2 zu=T~72Un6|$F47F=V9w)C;7W+b5BB4NW{*TU(6mR#(&e+R-7Mp6K2P6CxH;R5fO#i z-V_u42Pn9^w~vjxEdmP#f(tl-IJO8In1ryHIKK!?0>OV%9C4H1M${I@FDiOVR1Exe z%l78Ie}K^Oass2$#`Pbq!a~`BP$ClIw)gCW?fGv>+!W!zDIzS+e@nzhl;6fy$j)Bm zo}IXzt=(@ZJ6lN=4=*Uu>-P+H zVz7fyo8TRf2y{R)6w^rSSjb=g)ok|F{AO{oh6YBYyu&*MI5yj~Mumg#Q~| z|E23cV&Fd#{%>^sKckEIuj>xN9ee}w2QM>*X!AGVMTp>@hN==k0fYikOzn0P;0TeY znu#|6kWgTMAV795EjUQ%1J_a}T*e_HqPfC|`C0-142*E4+xh`ho3nwh84=;zKdi=K zaBXVVjra|Xh)WOguIf_~(we_!ElJ|*q0pHTxje$yVH;bX&lv~X2P2d5kO`n@k z6k%bdnF9 z56>^Kn?6sG?qsFY^0Gx0a5vvVC!I*)GbwTa-}#R@;Q5&t1pL=J%U5zbxqs3n{Kzjb@9P!7!0M+NJU0lRe;M`l}ssP8bxex>y_xluw95drD#{kB2AHsT|R_e9oLjdiiajrn`Apt=NN*rqw>hq^R1$Lx_+f=u4gl_dh zd$?hf4G^4#)f?yQTrdtaUm`)Ld`nFSgJ;guD}YYpp`0KZ25%Ii2O2z8Q4&;}yX=Z= zKt|(X2Pe9C(f`_4=`nsxA093hP4%tWZ-mu>re?A zER^k>Cq=5f=0Ur}`vq15j$7Y4?x6Ni8_V0c@_z5b7324$!ZX z!!1D?T=3+*sV|sN!Q5!BWjXnx*&MqIuDP2f_aUD<>gEqpT^;9eljm@wEa&PkIqCz( zr;sZUQWE5+nH0C-mfhiRAg+!#cmFrS}U zgen92VL#?2(SoQ7+c_K|B4+Jc2hfVL;heHjUgWuQnANL8T%kBa4KKfo)mJ!$&t&O! ze&Jg0x)oqXK%b^Ia>u!TBWGY7y(y7Ym>Otxbze@YGTLYPaYZVo7dj{;2Qd!c(x`PA z67YD1TeC)UVTjVZaSl}AtwWE@FDylItf{1g&zz~)B(qGcLkn|@nma$2Am3nRI z(WOpx9}iR>cpQqEkOqq!)M0>OxNqvIl@w6E{QUw37tj(JmBzECdZJdVGb9k^N@%^r zf3A#5#V(?t2-l_`AtWGO<3-}8Zn$khY94K7Lqc|DI`eS8_cLW>V2t4Th&hNZBus6$ z;+cgksQy9n{Wo&?C|49_(+@D*7`jM+c4*XQ9TCV!&E!0{sPDrEhZ8zLYIJXdq1sE< z`3QE*0^gm6nq@fv`k!Usjl5G!ihcmsxC>~6{zTB~rv5bK$@?O3v#8+twxJMR8wsw- zcE`*jP^d=(wc%a4|p& zEW-T+rj{D~fQ-Q$5dL!VS16X*VAYGR)w7=-W_v_Ph?fJZ@{wQj1X*Y8n9!Ojmwtvw8pIRmZa5uJ~IaHfoaZJc!`n>TA}^!AD~T*4=(Nfb1V-M=f)9vvsgg=_01ORH_%6;KJ~DfP6MX}+gUL^~bHjF@ zq!3#Y>V5zw_&;6X>Iy!%gye2&3B-{f*x&;40c67t0~7ushJ51E~XdL%Q~?hL81Fb6Kl%eV;w8SZ9#xXA2U@RT)*%K;^&>Xr8m zNRa&fjwaZpT@2LNfLdnK;g1IF|x;O0NXO80Y*dl z0bLhr3!nxU04n6u1HV-Q0FvMu0I-4&UkCtP0swii1^)f+6>tJ<;r&lj|DpI_i~L*Y ze~JHTQ|AS(IG$$4QIoHzM`(|H&0S3vcyu)CDZ5FCA)gbcG9MkYJ7Q|YZY;rWEzQuh z(k_69?w1=O4w7o|I7c$@gINzLUb$w|$;w3w59*gadMu}*c8Lp}Kv(Hnd%JdSsryu-&(Ip3?YzOP{8_;G?A0M;ljpM_~^LgiZPb6701p%fPs`u@7qkKf%)OR1XnZmwT$8R+1rSOaMia-g#J=|}!y8%0R z=l-e9lU-Rj#b|rHcl|(c_Y|gR;xLc_dG@9LdMEU|59;FBU4oEFEQQHRJX=ks1t45?3aH9-1M6&<>|SnAGH0Z!fy2BOM*L63I>b3 ztxsz3#!qd(uzln9pAA2xPfMmr*#LlkagH#x>3mpe?r`gsc}U30eSZNw2%u|AbNW0- z#!@un;&3@2BY~bA3z1fY{<>Z8F-DuNFM`AkpA}SJO0`~Dm<*2DWPpqlBow|tPa)Yzf~hDxEyRZkO%?Zc18TUM+%APRuXoZUDO z;4@DFtURZ#Lu^YH3->Z`oQR@%EvSi11@x@<87DeMhi;G~-WB&Z_QL|7y#W&L%XlEL z)8n%drLFcs0qiPw+}mZ2x(~pZ!p>+*7NtI5sUblEfMc53wtA>nvkL^f_TEypuZW~Q zBeuQUR^aE|HL&$tD%Z-A6MNDU_x87aMZVs}GFW%|{fqln>v;8VRT1(0nSl6V@L(dl zo3~UTSZq*hcK?YrC_8NKXCPs_bvXeX%`kJ_eg-lDjgNG63b3}~yIh~&OR>x(;;(p>FOQI$P z=xpKg%Ooh_mT0cGoD}DJwVO1`Znhx-f&)0l!lWo+KiU)%Sz>(cxyuLYaY0Jx?K)&) zL>?H{^;nl{nPs&_W3w1(?YU&7bXcanVCYGEVLIFV42TOit;7UMiAe$ZXPT-P;6V6G zZMR=1^X?>8)7T!f>rRnpQ-DhC5m$TTRY1NgA(30|)WjQiVaJFnOL$fq3+%mEnP(mt z;yr(1wRz_~71rK6-Q1|UPdOizinF%EdfZS)NQ!rkufRMA1E!JfhIH~lU@ zmbCjwio60ID=;UF&rhINE?lGwWXq=~Hn-`9QJL)@Ev{SzbSFPJ2fw>@WBBU1ajoNh ziTK{Rj_uas90vET<%jW-M{}IBnm%8?d(ZbUTi7j<7r@$ei{jW`vyFVbCIGW|bUF3I3IayX{Ssu;ZGquCMdcS-_zOCv7$9|)30DzLZvjgX)2vstNmCbm~ynE7Ek37K~(Vruip-6tcc0NA3_G~O_ z{+FIf)ouJI&`LwEu2W1zvCr;IM7P&YN)c?EaM5H(cYJ{r0I~~nFb}|tz2>it39P0c zFj+}lImcJP9!1)Y4l&p%3wP}xThY-rNl)GDn_Sq#{5r^ex6EG?Q*)5GT(&N?I`uoL z_DF<&9$>C!?ps|+a2UErg~VzNAOAyJJya{gzarK5YSfo=hIr27YB>Y7~-o~ z_%zi%4F5LEAgP4^Wdf|Cdnthf*h-w zVaRvXqm!@_9;N+9mfm$iU7Y@UeS%G!*~?)CGe7#V<_=4@^1xPtTYhJ;qr=s_nb0O2 zdC+QingznlLuIVJ_hr48m6%QJXnyA}qd~2zH=pvtf9J+C4LqRFW8z9D=I~3L;^e*5 zjPL+@uI|(yahP_(mgc>D_p0`%Iq`zq%VRCyoDaBnMoAfOrtliVdt^tr-b*QJ(+j-z4oTbR@Mv`*WB7S1e*jvScOB_JcugRf8od~I0%Y1hIZ z-|BbqHF&eW^k_-qB_?*fe&dp~eQs6rTPM&f@GUGl)xwX*YfAOy^0dQchrYx_G>e5# z>F?ZgDLivqEX^YLyXm9?=!FR^cnAtKT_CAl_G5Ul9g3H_IZ)L|G@wn!z?{=Xhkr?24;8p;d%){ zuL-`KGpWNI4^eV(r0X&%C*jugMsa@MgfWy`I#-(9*D9q7a?^E`q2$5m<%H~XO zH-otMoEDRIG-Ed#U_83Kp=c7WOARUkxuz+l85a7ht|A2$VDv;&oavrxAJMBI#SK!0W+7Xc6{;ASM80Faz<}8%J4!9uW35 zs=iMfH9dg6f!rPvV4()WCWEn8jyEsV1z$QtJd2JX@>&BF0ItX_KqxL0yu@tzFB1Y{ z2Bl(E&JZC9svun)Kog~nTF2}BGCO*K3;6DOqH@5FrDn?p*HI$&)?}_%-={viQB|_Q zde$oqDYUODnIb8>2b{jcb_A#Zok~>36Fy)>srV6Llfh*qKDNTpRfN z0(h+-gCT`n0&8;HDu6V;+)eB>N%`TkGI~HxqxN$y#JZCouI%5yM+bn_u$$=hF%Xt5 z2TpsJ9qx79CPI2}27YA3vF^M9-`&67(Wy=-4-%#3)gFk~i9EUkRuiazzLj|Ro8@Z& zE+*a}EIi^0K*Qbq$sEU8ekKEh1F2~htg+CB!e)bUtaTrs$NQNOBhmK_QG^4$z;*XK zs6p~~BuudY&(u-`y#4nD+=_o{X%olVD?}3R0ssS_ zP_RC772xaU9&TyI0rb&Is3g)aB+MmP98&oCtTb-nJ+Rhh6!G(+S%mmI@Yb8dedLD9 zT4n&KgtG0%Z%>`GykGrhr}@M|e_9asq) zlxI;QKQ0EHje^f*%vn4EtfQFyxdK-T1%^f)L}k=N#zq^&J&c-yd|bIF7nm+)Lfe?93gmnHl+RQ;FtQfL%8qq<9@Z>2&kZt2gI1n zh%@m11&sr^zw8Ti@X&lay*(Nv!czxDL%r!`$uw_%XI!TeB#j%!gI4gSMHV~VL5+|2 z{;2i^esU~~!{?IiM!-55FTKw0*fR@D^L4S>t%7?)0v)NC?PC@mKsv=8WebL--{yD^ zS8%p+%V`s|=ea+LDqx&Vfy$kVZFqH?WvvwcIOzc%u#=f|dI3YWljBS7?v;W*hEKWc&p$e9ox8uX}@1!ikXetV~K4egD2BfXokbpZYcrhCt5--f0L* z2TCV?0HJ??2{T7gWH%m4hy&+PJTeWhAe7TNGk7ZsK!vG!nd*HyB0=`3c50;NrrI@j zkOPS|Jm{~WiKeN9Z=*chE=|DDfpBpNusZ7JfHE52M2Gf06QV(ZerC-@L5+s5o+<^YFwyO7t}2O zIar|bmst3)IxA>xRs_*?+DmP1bIhC}y)P~KECfu4@ ze_VU+Kpj+3YK6NJVE9ONczR3jm1E`s0~w^|x*`}WkKtZQC^}FridJhoT9%u7bC(M& zXqQpqm_0vu^0f(?<)j2~efS1-;D(htW=hbKL3Ed{Oz@yn;B(n_G8{NHn#^ju9&lN( z_-6)IwP~MUG3H0FqgrLqpSl?q;J&HmIdg4B?O?+acFtU4^z!qARE2`8LLaHQkF-!M z+|5F01o)+iD_BL)Ab)7GYH{oJ137|a=p+;!I|RAz3`b3;nrC5lp_woIbLL{O-lq!c>)EKFznA`IyJmh!W4hXxub)W)|@Bl(OFd=2=256)return!1}return!0}function c(t,e){if(e||(e={}),"number"===typeof t){n.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),o(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t)&&(t=t.toHexString()),d(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",t));const i=[];for(let t=0;tc(t))),r=e.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(r);return e.reduce(((t,e)=>(n.set(e,t),t+e.length)),0),o(n)}function f(t){let e=c(t);if(0===e.length)return e;let r=0;for(;re&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),o(r)}function d(t,e){return!("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}const p="0123456789abcdef";function g(t,e){if(e||(e={}),"number"===typeof t){n.checkSafeUint53(t,"invalid hexlify value");let e="";for(;t;)e=p[15&t]+e,t=Math.floor(t/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if("bigint"===typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t))return t.toHexString();if(d(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":n.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(u(t)){let e="0x";for(let r=0;r>4]+p[15&n]}return e}return n.throwArgumentError("invalid hexlify value","value",t)}function m(t){if("string"!==typeof t)t=g(t);else if(!d(t)||t.length%2)return null;return(t.length-2)/2}function y(t,e,r){return"string"!==typeof t?t=g(t):(!d(t)||t.length%2)&&n.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function b(t){let e="0x";return t.forEach((t=>{e+=g(t).substring(2)})),e}function v(t){const e=A(g(t,{hexPad:"left"}));return"0x"===e?"0x0":e}function A(t){"string"!==typeof t&&(t=g(t)),d(t)||n.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&n.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function _(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(t)){let r=c(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=g(r.slice(0,32)),e.s=g(r.slice(32,64))):65===r.length?(e.r=g(r.slice(0,32)),e.s=g(r.slice(32,64)),e.v=r[64]):n.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:n.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=g(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const r=h(c(e._vs),32);e._vs=g(r);const i=r[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=i:e.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;const o=g(r);null==e.s?e.s=o:e.s!==o&&n.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?n.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const r=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&d(e.r)?e.r=w(e.r,32):n.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&d(e.s)?e.s=w(e.s,32):n.throwArgumentError("signature missing or invalid s","signature",t);const r=c(e.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const i=g(r);e._vs&&(d(e._vs)||n.throwArgumentError("signature invalid _vs","signature",t),e._vs=w(e._vs,32)),null==e._vs?e._vs=i:e._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function E(t){return g(l([(t=_(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},function(t,e,r){"use strict";r.d(e,"a",(function(){return g})),r.d(e,"b",(function(){return m})),r.d(e,"c",(function(){return l})),r.d(e,"d",(function(){return y})),r.d(e,"e",(function(){return B})),r.d(e,"f",(function(){return f})),r.d(e,"g",(function(){return b})),r.d(e,"h",(function(){return v})),r.d(e,"i",(function(){return w})),r.d(e,"j",(function(){return _})),r.d(e,"k",(function(){return E})),r.d(e,"l",(function(){return I})),r.d(e,"m",(function(){return S})),r.d(e,"n",(function(){return M})),r.d(e,"o",(function(){return C})),r.d(e,"p",(function(){return k})),r.d(e,"q",(function(){return x}));class n extends TypeError{constructor(t,e){let r;const{message:n,...i}=t,{path:o}=t;super(0===o.length?n:"At path: "+o.join(".")+" -- "+n),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>{var n;return null!=(n=r)?n:r=[t,...e()]}}}function i(t){return"object"===typeof t&&null!=t}function o(t){return"string"===typeof t?JSON.stringify(t):""+t}function a(t,e,r,n){if(!0===t)return;!1===t?t={}:"string"===typeof t&&(t={message:t});const{path:i,branch:a}=e,{type:s}=r,{refinement:u,message:c="Expected a value of type `"+s+"`"+(u?" with refinement `"+u+"`":"")+", but received: `"+o(n)+"`"}=t;return{value:n,type:s,refinement:u,key:i[i.length-1],path:i,branch:a,...t,message:c}}function*s(t,e,r,n){var o;i(o=t)&&"function"===typeof o[Symbol.iterator]||(t=[t]);for(const i of t){const t=a(i,e,r,n);t&&(yield t)}}function u(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){const{path:n=[],branch:o=[t],coerce:a=!1,mask:s=!1}=r,c={path:n,branch:o};if(a&&(t=e.coercer(t,c),s&&"type"!==e.type&&i(e.schema)&&i(t)&&!Array.isArray(t)))for(const r in t)void 0===e.schema[r]&&delete t[r];let l=!0;for(const r of e.validator(t,c))l=!1,yield[r,void 0];for(let[r,f,h]of e.entries(t,c)){const e=u(f,h,{path:void 0===r?n:[...n,r],branch:void 0===r?o:[...o,f],coerce:a,mask:s});for(const n of e)n[0]?(l=!1,yield[n[0],void 0]):a&&(f=n[1],void 0===r?t=f:t instanceof Map?t.set(r,f):t instanceof Set?t.add(f):i(t)&&(t[r]=f))}if(l)for(const r of e.refiner(t,c))l=!1,yield[r,void 0];l&&(yield[void 0,t])}()}class c{constructor(t){const{type:e,schema:r,validator:n,refiner:i,coercer:o=(t=>t),entries:a=function*(){}}=t;this.type=e,this.schema=r,this.entries=a,this.coercer=o,this.validator=n?(t,e)=>s(n(t,e),e,this,t):()=>[],this.refiner=i?(t,e)=>s(i(t,e),e,this,t):()=>[]}assert(t){return l(t,this)}create(t){return f(t,this)}is(t){return h(t,this)}mask(t){return function(t,e){const r=d(t,e,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}(t,this)}validate(t){return d(t,this,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}function l(t,e){const r=d(t,e);if(r[0])throw r[0]}function f(t,e){const r=d(t,e,{coerce:!0});if(r[0])throw r[0];return r[1]}function h(t,e){return!d(t,e)[0]}function d(t,e){const r=u(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),i=function(t){const{done:e,value:r}=t.next();return e?void 0:r}(r);if(i[0]){return[new n(i[0],(function*(){for(const t of r)t[0]&&(yield t[0])})),void 0]}return[void 0,i[1]]}function p(t,e){return new c({type:t,schema:null,validator:e})}function g(){return p("any",(()=>!0))}function m(t){return new c({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||"Expected an array value, but received: "+o(t)})}function y(){return p("boolean",(t=>"boolean"===typeof t))}function b(t){return p("instance",(e=>e instanceof t||"Expected a `"+t.name+"` instance, but received: "+o(e)))}function v(t){const e=o(t),r=typeof t;return new c({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?t:null,validator:r=>r===t||"Expected the literal `"+e+"`, but received: "+o(r)})}function A(){return p("never",(()=>!1))}function w(t){return new c({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})}function _(){return p("number",(t=>"number"===typeof t&&!isNaN(t)||"Expected a number, but received: "+o(t)))}function E(t){return new c({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})}function I(t,e){return new c({type:"record",schema:null,*entries(r){if(i(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator:t=>i(t)||"Expected an object, but received: "+o(t)})}function S(){return p("string",(t=>"string"===typeof t||"Expected a string, but received: "+o(t)))}function M(t){const e=A();return new c({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;iArray.isArray(t)||"Expected an array, but received: "+o(t)})}function C(t){const e=Object.keys(t);return new c({type:"type",schema:t,*entries(r){if(i(r))for(const n of e)yield[n,r[n],t[n]]},validator:t=>i(t)||"Expected an object, but received: "+o(t)})}function k(t){const e=t.map((t=>t.type)).join(" | ");return new c({type:"union",schema:null,validator(r,n){const i=[];for(const e of t){const[...t]=u(r,e,n),[o]=t;if(!o[0])return[];for(const[e]of t)e&&i.push(e)}return["Expected the value to satisfy a union of `"+e+"`, but received: "+o(r),...i]}})}function x(){return p("unknown",(()=>!0))}function B(t,e,r){return new c({...t,coercer:(n,i)=>h(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}},function(t,e,r){"use strict";r.r(e),r.d(e,"Type",(function(){return s})),r.d(e,"identity",(function(){return u})),r.d(e,"getFunctionName",(function(){return c})),r.d(e,"getContextEntry",(function(){return l})),r.d(e,"appendContext",(function(){return f})),r.d(e,"failures",(function(){return h})),r.d(e,"failure",(function(){return d})),r.d(e,"success",(function(){return p})),r.d(e,"NullType",(function(){return m})),r.d(e,"nullType",(function(){return y})),r.d(e,"UndefinedType",(function(){return b})),r.d(e,"VoidType",(function(){return A})),r.d(e,"voidType",(function(){return w})),r.d(e,"UnknownType",(function(){return _})),r.d(e,"unknown",(function(){return E})),r.d(e,"StringType",(function(){return I})),r.d(e,"string",(function(){return S})),r.d(e,"NumberType",(function(){return M})),r.d(e,"number",(function(){return C})),r.d(e,"BigIntType",(function(){return k})),r.d(e,"bigint",(function(){return x})),r.d(e,"BooleanType",(function(){return B})),r.d(e,"boolean",(function(){return O})),r.d(e,"AnyArrayType",(function(){return T})),r.d(e,"UnknownArray",(function(){return R})),r.d(e,"AnyDictionaryType",(function(){return P})),r.d(e,"UnknownRecord",(function(){return N})),r.d(e,"FunctionType",(function(){return j})),r.d(e,"Function",(function(){return D})),r.d(e,"RefinementType",(function(){return L})),r.d(e,"brand",(function(){return F})),r.d(e,"Int",(function(){return U})),r.d(e,"LiteralType",(function(){return Q})),r.d(e,"literal",(function(){return G})),r.d(e,"KeyofType",(function(){return H})),r.d(e,"keyof",(function(){return q})),r.d(e,"RecursiveType",(function(){return K})),r.d(e,"recursion",(function(){return V})),r.d(e,"ArrayType",(function(){return W})),r.d(e,"array",(function(){return J})),r.d(e,"InterfaceType",(function(){return Y})),r.d(e,"type",(function(){return tt})),r.d(e,"PartialType",(function(){return et})),r.d(e,"partial",(function(){return nt})),r.d(e,"DictionaryType",(function(){return it})),r.d(e,"getDomainKeys",(function(){return ot})),r.d(e,"record",(function(){return at})),r.d(e,"UnionType",(function(){return st})),r.d(e,"union",(function(){return ct})),r.d(e,"IntersectionType",(function(){return lt})),r.d(e,"mergeAll",(function(){return ft})),r.d(e,"intersection",(function(){return ht})),r.d(e,"TupleType",(function(){return dt})),r.d(e,"tuple",(function(){return pt})),r.d(e,"ReadonlyType",(function(){return gt})),r.d(e,"readonly",(function(){return mt})),r.d(e,"ReadonlyArrayType",(function(){return yt})),r.d(e,"readonlyArray",(function(){return bt})),r.d(e,"strict",(function(){return vt})),r.d(e,"TaggedUnionType",(function(){return At})),r.d(e,"taggedUnion",(function(){return wt})),r.d(e,"ExactType",(function(){return _t})),r.d(e,"exact",(function(){return St})),r.d(e,"null",(function(){return y})),r.d(e,"undefined",(function(){return v})),r.d(e,"Array",(function(){return R})),r.d(e,"interface",(function(){return tt})),r.d(e,"void",(function(){return w})),r.d(e,"getValidationError",(function(){return Mt})),r.d(e,"getDefaultContext",(function(){return Ct})),r.d(e,"NeverType",(function(){return kt})),r.d(e,"never",(function(){return xt})),r.d(e,"AnyType",(function(){return Bt})),r.d(e,"any",(function(){return Ot})),r.d(e,"Dictionary",(function(){return Tt})),r.d(e,"ObjectType",(function(){return Rt})),r.d(e,"object",(function(){return Pt})),r.d(e,"refinement",(function(){return Nt})),r.d(e,"Integer",(function(){return jt})),r.d(e,"dictionary",(function(){return Dt})),r.d(e,"StrictType",(function(){return Lt})),r.d(e,"clean",(function(){return Ft})),r.d(e,"alias",(function(){return Ut})),r.d(e,"emptyTags",(function(){return Gt})),r.d(e,"getTags",(function(){return Jt})),r.d(e,"getIndex",(function(){return Yt}));var n=r(135),i=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o=function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r"},l=function(t,e){return{key:t,type:e}},f=function(t,e,r,n){for(var i=t.length,o=Array(i+1),a=0;a"),new W(e,(function(e){return R.is(e)&&e.every(t.is)}),(function(e,r){var i=R.validate(e,r);if(Object(n.b)(i))return i;for(var o=i.right,a=o.length,s=o,u=[],c=0;c0?h(u):p(s)}),t.encode===u?u:function(e){return e.map(t.encode)},t)},Y=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,n,i)||this;return a.props=o,a._tag="InterfaceType",a}return i(e,t),e}(s),X=function(t){return Object.keys(t).map((function(e){return e+": "+t[e].name})).join(", ")},Z=function(t){for(var e=0;e0?h(l):p(c)}),Z(i)?u:function(t){for(var e=o({},t),n=0;n"},nt=function(t,e){void 0===e&&(e=rt($(t)));var r=Object.keys(t),i=r.map((function(e){return t[e]})),a=r.length;return new et(e,(function(e){if(N.is(e)){for(var n=0;n0?h(l):p(c)}),Z(i)?u:function(t){for(var e=o({},t),n=0;n0?h(c):p(l||Object.keys(s).length!==o?u:s)}),r.encode===u?u:function(e){for(var n={},i=0;i0?h(a):p(c?o:r)}return zt(e)&&Array.isArray(r)?p(r):d(r,i)}),t.encode===u&&e.encode===u?u:function(r){for(var n={},i=Object.keys(r),o=i.length,a=0;a0){var i=r[0],o=r[1],a=o.length,s=function(t){for(var e=0;e0?h(a):p(ft(e,o))},0===t.length?u:function(e){return ft(e,t.map((function(t){return t.encode(e)})))},t)}var dt=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,n,i)||this;return a.types=o,a._tag="TupleType",a}return i(e,t),e}(s);function pt(t,e){void 0===e&&(e="["+t.map((function(t){return t.name})).join(", ")+"]");var r=t.length;return new dt(e,(function(e){return R.is(e)&&e.length===r&&t.every((function(t,r){return t.is(e[r])}))}),(function(e,i){var o=R.validate(e,i);if(Object(n.b)(o))return o;for(var a=o.right,s=a.length>r?a.slice(0,r):a,u=[],c=0;c0?h(u):p(s)}),Z(t)?u:function(e){return t.map((function(t,r){return t.encode(e[r])}))},t)}var gt=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,n,i)||this;return a.type=o,a._tag="ReadonlyType",a}return i(e,t),e}(s),mt=function(t,e){return void 0===e&&(e="Readonly<"+t.name+">"),new gt(e,t.is,t.validate,t.encode,t)},yt=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,n,i)||this;return a.type=o,a._tag="ReadonlyArrayType",a}return i(e,t),e}(s),bt=function(t,e){void 0===e&&(e="ReadonlyArray<"+t.name+">");var r=J(t);return new yt(e,r.is,r.validate,r.encode,t)},vt=function(t,e){return St(tt(t),e)},At=function(t){function e(e,r,n,i,o,a){var s=t.call(this,e,r,n,i,o)||this;return s.tag=a,s}return i(e,t),e}(st),wt=function(t,e,r){void 0===r&&(r=ut(e));var n=ct(e,r);return n instanceof At?n:(console.warn("[io-ts] Cannot build a tagged union for "+r+", returning a de-optimized union"),new At(r,n.is,n.validate,n.encode,e,t))},_t=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,n,i)||this;return a.type=o,a._tag="ExactType",a}return i(e,t),e}(s),Et=function(t){switch(t._tag){case"RefinementType":case"ReadonlyType":return Et(t.type);case"InterfaceType":case"StrictType":case"PartialType":return t.props;case"IntersectionType":return t.types.reduce((function(t,e){return Object.assign(t,Et(e))}),{})}},It=function(t,e){for(var r=Object.getOwnPropertyNames(t),n=!1,i={},o=0;o"}(t));var r=Et(t);return new _t(e,t.is,(function(e,i){var o=N.validate(e,i);if(Object(n.b)(o))return o;var a=t.validate(e,i);return Object(n.b)(a)?a:Object(n.d)(It(a.right,r))}),(function(e){return t.encode(It(e,r))}),t)},Mt=function(t,e){return{value:t,context:e}},Ct=function(t){return[{key:"",type:t}]},kt=function(t){function e(){var e=t.call(this,"never",(function(t){return!1}),(function(t,e){return d(t,e)}),(function(){throw new Error("cannot encode never")}))||this;return e._tag="NeverType",e}return i(e,t),e}(s),xt=new kt,Bt=function(t){function e(){var e=t.call(this,"any",(function(t){return!0}),p,u)||this;return e._tag="AnyType",e}return i(e,t),e}(s),Ot=new Bt,Tt=N,Rt=function(t){function e(){var e=t.call(this,"object",(function(t){return null!==t&&"object"===typeof t}),(function(t,r){return e.is(t)?p(t):d(t,r)}),u)||this;return e._tag="ObjectType",e}return i(e,t),e}(s),Pt=new Rt;function Nt(t,e,r){return void 0===r&&(r="("+t.name+" | "+c(e)+")"),new L(r,(function(r){return t.is(r)&&e(r)}),(function(r,i){var o=t.validate(r,i);if(Object(n.b)(o))return o;var a=o.right;return e(a)?p(a):d(a,i)}),t.encode,t,e)}var jt=Nt(C,Number.isInteger,"Integer"),Dt=at,Lt=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,n,i)||this;return a.props=o,a._tag="StrictType",a}return i(e,t),e}(s);function Ft(t){return t}function Ut(t){return function(){return t}}var Qt=function(t){return t.length>0},Gt={};function Ht(t,e){for(var r=[],n=0,i=t;n{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var c,l;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(c||(c={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(l||(l={}));const f="0123456789abcdef";class h{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",t),a>o[r]||console.log.apply(console,e)}debug(){for(var t=arguments.length,e=new Array(t),r=0;r{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t>4],r+=f[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(s){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push("code=".concat(e)),n.push("version=".concat(this.version));const o=t;let a="";switch(e){case l.NUMERIC_FAULT:{a="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":a+="-"+e;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case l.CALL_EXCEPTION:case l.INSUFFICIENT_FUNDS:case l.MISSING_NEW:case l.NONCE_EXPIRED:case l.REPLACEMENT_UNDERPRICED:case l.TRANSACTION_REPLACED:case l.UNPREDICTABLE_GAS_LIMIT:a=e}a&&(t+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const s=new Error(t);return s.reason=o,s.code=e,Object.keys(r).forEach((function(t){s[t]=r[t]})),s}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,h.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",h.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",te&&this.throwError("too many arguments"+r,h.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",h.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return s||(s=new h("logger/5.6.0")),s}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!t)return;this.globalLogger().throwError("error censorship permanent",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!t,n=!!e}static setLogLevel(t){const e=o[t.toLowerCase()];null!=e?a=e:h.globalLogger().warn("invalid log level - "+t)}static from(t){return new h(t)}}h.errors=l,h.levels=c},function(t,e,r){"use strict";r.d(e,"d",(function(){return a})),r.d(e,"e",(function(){return s})),r.d(e,"f",(function(){return u})),r.d(e,"b",(function(){return c})),r.d(e,"g",(function(){return l})),r.d(e,"c",(function(){return p})),r.d(e,"a",(function(){return g}));var n=r(5);var i=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const o=new n.b("properties/5.6.0");function a(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function s(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||"object"!==typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function u(t){return i(this,void 0,void 0,(function*(){const e=Object.keys(t).map((e=>{const r=t[e];return Promise.resolve(r).then((t=>({key:e,value:t})))}));return(yield Promise.all(e)).reduce(((t,e)=>(t[e.key]=e.value,t)),{})}))}function c(t,e){t&&"object"===typeof t||o.throwArgumentError("invalid object","object",t),Object.keys(t).forEach((r=>{e[r]||o.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)}))}function l(t){const e={};for(const r in t)e[r]=t[r];return e}const f={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function h(t){if(void 0===t||null===t||f[typeof t])return!0;if(Array.isArray(t)||"object"===typeof t){if(!Object.isFrozen(t))return!1;const r=Object.keys(t);for(let n=0;np(t))));if("object"===typeof t){const e={};for(const r in t){const n=t[r];void 0!==n&&a(e,r,p(n))}return e}return o.throwArgumentError("Cannot deepCopy ".concat(typeof t),"object",t)}function p(t){return d(t)}class g{constructor(t){for(const e in t)this[e]=p(t[e])}}},function(t,e,r){"use strict";(function(t){var n=r(453),i=r(1686),o=r(631);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(n)return Q(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return B(this,e,r);case"utf8":case"utf-8":return M(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"===typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var f=!0,h=0;hi&&(n=i):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function M(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128===(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],a=t[i+2],128===(192&o)&&128===(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(n,i),l=t.slice(e,r),f=0;fi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return A(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function k(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function P(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function N(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,o){return o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,o){return o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||R(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);R(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);R(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function H(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(44))},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(1710).Buffer}catch(S){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var l=["","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"],f=[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],h=[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 d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?g+r:l[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),l=this.clone();if(u){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,g=d>>>13,m=0|a[2],y=8191&m,b=m>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],E=8191&_,I=_>>>13,S=0|a[5],M=8191&S,C=S>>>13,k=0|a[6],x=8191&k,B=k>>>13,O=0|a[7],T=8191&O,R=O>>>13,P=0|a[8],N=8191&P,j=P>>>13,D=0|a[9],L=8191&D,F=D>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,J=0|s[3],Y=8191&J,X=J>>>13,Z=0|s[4],$=8191&Z,tt=Z>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ft=8191<,ht=lt>>>13,dt=0|s[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,Q))|0)+((8191&(i=(i=Math.imul(f,G))+Math.imul(h,Q)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,Q),i=(i=Math.imul(p,G))+Math.imul(g,Q)|0,o=Math.imul(g,G);var yt=(c+(n=n+Math.imul(f,z)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,z)|0))<<13)|0;c=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,G))+Math.imul(b,Q)|0,o=Math.imul(b,G),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,q)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,Q),i=(i=Math.imul(A,G))+Math.imul(w,Q)|0,o=Math.imul(w,G),n=n+Math.imul(y,z)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var vt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,G))+Math.imul(I,Q)|0,o=Math.imul(I,G),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,q)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0;var At=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,Q),i=(i=Math.imul(M,G))+Math.imul(C,Q)|0,o=Math.imul(C,G),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,q)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,G))+Math.imul(B,Q)|0,o=Math.imul(B,G),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var _t=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,Q),i=(i=Math.imul(T,G))+Math.imul(R,Q)|0,o=Math.imul(R,G),n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Et=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var It=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,G))+Math.imul(F,Q)|0,o=Math.imul(F,G),n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(j,z)|0,o=o+Math.imul(j,q)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,ht)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ht)|0;var Ct=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(F,Y)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var kt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(C,ft)|0,o=o+Math.imul(C,ht)|0;var xt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Bt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(N,ft)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,ht))+Math.imul(F,ft)|0,o=Math.imul(F,ht);var Rt=(c+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Pt=(c+(n=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=At,u[5]=wt,u[6]=_t,u[7]=Et,u[8]=It,u[9]=St,u[10]=Mt,u[11]=Ct,u[12]=kt,u[13]=xt,u[14]=Bt,u[15]=Ot,u[16]=Tt,u[17]=Rt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r};function g(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):g(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function I(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new A;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var g=d,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new I(t)},i(I,E),I.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},I.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},I.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},I.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},I.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(79)(t))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.s16=e.s8=e.nu64be=e.u48be=e.u40be=e.u32be=e.u24be=e.u16be=e.nu64=e.u48=e.u40=e.u32=e.u24=e.u16=e.u8=e.offset=e.greedy=e.Constant=e.UTF8=e.CString=e.Blob=e.Boolean=e.BitField=e.BitStructure=e.VariantLayout=e.Union=e.UnionLayoutDiscriminator=e.UnionDiscriminator=e.Structure=e.Sequence=e.DoubleBE=e.Double=e.FloatBE=e.Float=e.NearInt64BE=e.NearInt64=e.NearUInt64BE=e.NearUInt64=e.IntBE=e.Int=e.UIntBE=e.UInt=e.OffsetLayout=e.GreedyCount=e.ExternalLayout=e.bindConstructorLayout=e.nameWithProperty=e.Layout=e.uint8ArrayToBuffer=e.checkUint8Array=void 0,e.constant=e.utf8=e.cstr=e.blob=e.unionLayoutDiscriminator=e.union=e.seq=e.bits=e.struct=e.f64be=e.f64=e.f32be=e.f32=e.ns64be=e.s48be=e.s40be=e.s32be=e.s24be=e.s16be=e.ns64=e.s48=e.s40=e.s32=e.s24=void 0;const n=r(7);function i(t){if(!(t instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}function o(t){return i(t),n.Buffer.from(t.buffer,t.byteOffset,t.length)}e.checkUint8Array=i,e.uint8ArrayToBuffer=o;class a{constructor(t,e){if(!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=e}makeDestinationObject(){return{}}getSpan(t,e){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(t){const e=Object.create(this.constructor.prototype);return Object.assign(e,this),e.property=t,e}fromArray(t){}}function s(t,e){return e.property?t+"["+e.property+"]":t}e.Layout=a,e.nameWithProperty=s,e.bindConstructorLayout=function(t,e){if("function"!==typeof t)throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(t,"layout_"))throw new Error("Class is already bound to a layout");if(!(e&&e instanceof a))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(e,"boundConstructor_"))throw new Error("layout is already bound to a constructor");t.layout_=e,e.boundConstructor_=t,e.makeDestinationObject=()=>new t,Object.defineProperty(t.prototype,"encode",{value(t,r){return e.encode(this,t,r)},writable:!0}),Object.defineProperty(t,"decode",{value:(t,r)=>e.decode(t,r),writable:!0})};class u extends a{isCount(){throw new Error("ExternalLayout is abstract")}}e.ExternalLayout=u;class c extends u{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1?arguments[1]:void 0;if(!Number.isInteger(t)||0>=t)throw new TypeError("elementSpan must be a (positive) integer");super(-1,e),this.elementSpan=t}isCount(){return!0}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(t);const r=t.length-e;return Math.floor(r/this.elementSpan)}encode(t,e,r){return 0}}e.GreedyCount=c;class l extends u{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;if(!(t instanceof a))throw new TypeError("layout must be a Layout");if(!Number.isInteger(e))throw new TypeError("offset must be integer or undefined");super(t.span,r||t.property),this.layout=t,this.offset=e}isCount(){return this.layout instanceof f||this.layout instanceof h}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.layout.decode(t,e+this.offset)}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.layout.encode(t,e,r+this.offset)}}e.OffsetLayout=l;class f extends a{constructor(t,e){if(super(t,e),61&&void 0!==arguments[1]?arguments[1]:0;return o(t).readUIntLE(e,this.span)}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(e).writeUIntLE(t,r,this.span),this.span}}e.UInt=f;class h extends a{constructor(t,e){if(super(t,e),61&&void 0!==arguments[1]?arguments[1]:0;return o(t).readUIntBE(e,this.span)}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(e).writeUIntBE(t,r,this.span),this.span}}e.UIntBE=h;class d extends a{constructor(t,e){if(super(t,e),61&&void 0!==arguments[1]?arguments[1]:0;return o(t).readIntLE(e,this.span)}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(e).writeIntLE(t,r,this.span),this.span}}e.Int=d;class p extends a{constructor(t,e){if(super(t,e),61&&void 0!==arguments[1]?arguments[1]:0;return o(t).readIntBE(e,this.span)}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(e).writeIntBE(t,r,this.span),this.span}}e.IntBE=p;const g=Math.pow(2,32);function m(t){const e=Math.floor(t/g);return{hi32:e,lo32:t-e*g}}function y(t,e){return t*g+e}class b extends a{constructor(t){super(8,t)}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=o(t),n=r.readUInt32LE(e);return y(r.readUInt32LE(e+4),n)}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=m(t),i=o(e);return i.writeUInt32LE(n.lo32,r),i.writeUInt32LE(n.hi32,r+4),8}}e.NearUInt64=b;class v extends a{constructor(t){super(8,t)}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=o(t);return y(r.readUInt32BE(e),r.readUInt32BE(e+4))}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=m(t),i=o(e);return i.writeUInt32BE(n.hi32,r),i.writeUInt32BE(n.lo32,r+4),8}}e.NearUInt64BE=v;class A extends a{constructor(t){super(8,t)}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=o(t),n=r.readUInt32LE(e);return y(r.readInt32LE(e+4),n)}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=m(t),i=o(e);return i.writeUInt32LE(n.lo32,r),i.writeInt32LE(n.hi32,r+4),8}}e.NearInt64=A;class w extends a{constructor(t){super(8,t)}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=o(t);return y(r.readInt32BE(e),r.readUInt32BE(e+4))}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=m(t),i=o(e);return i.writeInt32BE(n.hi32,r),i.writeUInt32BE(n.lo32,r+4),8}}e.NearInt64BE=w;class _ extends a{constructor(t){super(4,t)}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(t).readFloatLE(e)}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(e).writeFloatLE(t,r),4}}e.Float=_;class E extends a{constructor(t){super(4,t)}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(t).readFloatBE(e)}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(e).writeFloatBE(t,r),4}}e.FloatBE=E;class I extends a{constructor(t){super(8,t)}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(t).readDoubleLE(e)}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(e).writeDoubleLE(t,r),8}}e.Double=I;class S extends a{constructor(t){super(8,t)}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(t).readDoubleBE(e)}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(e).writeDoubleBE(t,r),8}}e.DoubleBE=S;class M extends a{constructor(t,e,r){if(!(t instanceof a))throw new TypeError("elementLayout must be a Layout");if(!(e instanceof u&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;!(e instanceof u)&&01&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;let r=0,n=this.count;if(n instanceof u&&(n=n.decode(t,e)),01&&void 0!==arguments[1]?arguments[1]:0;const r=[];let n=0,i=this.count;for(i instanceof u&&(i=i.decode(t,e));n2&&void 0!==arguments[2]?arguments[2]:0;const n=this.elementLayout,i=t.reduce(((t,i)=>t+n.encode(i,e,r+t)),0);return this.count instanceof u&&this.count.encode(t.length,e,r),i}}e.Sequence=M;class C extends a{constructor(t,e,r){if(!Array.isArray(t)||!t.reduce(((t,e)=>t&&e instanceof a),!0))throw new TypeError("fields must be array of Layout instances");"boolean"===typeof e&&void 0===r&&(r=e,e=void 0);for(const o of t)if(0>o.span&&void 0===o.property)throw new Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce(((t,e)=>t+e.getSpan()),0)}catch(i){}super(n,e),this.fields=t,this.decodePrefixes=!!r}getSpan(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce(((r,n)=>{const i=n.getSpan(t,e);return e+=i,r+i}),0)}catch(n){throw new RangeError("indeterminate span")}return r}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(t);const r=this.makeDestinationObject();for(const n of this.fields)if(void 0!==n.property&&(r[n.property]=n.decode(t,e)),e+=n.getSpan(t,e),this.decodePrefixes&&t.length===e)break;return r}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=r;let i=0,o=0;for(const a of this.fields){let n=a.span;if(o=0n&&(n=a.getSpan(e,r)))}i=r,r+=n}return i+o-n}fromArray(t){const e=this.makeDestinationObject();for(const r of this.fields)void 0!==r.property&&0r.span?e=-1:0<=e&&(e+=r.span)}}}e.Structure=C;class k{constructor(t){this.property=t}decode(t,e){throw new Error("UnionDiscriminator is abstract")}encode(t,e,r){throw new Error("UnionDiscriminator is abstract")}}e.UnionDiscriminator=k;class x extends k{constructor(t,e){if(!(t instanceof u&&t.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(e||t.property||"variant"),this.layout=t}decode(t,e){return this.layout.decode(t,e)}encode(t,e,r){return this.layout.encode(t,e,r)}}e.UnionLayoutDiscriminator=x;class B extends a{constructor(t,e,r){let n;if(t instanceof f||t instanceof h)n=new x(new l(t));else if(t instanceof u&&t.isCount())n=new x(t);else{if(!(t instanceof k))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");n=t}if(void 0===e&&(e=null),!(null===e||e instanceof a))throw new TypeError("defaultLayout must be null or a Layout");if(null!==e){if(0>e.span)throw new Error("defaultLayout must have constant span");void 0===e.property&&(e=e.replicate("content"))}let i=-1;e&&(i=e.span,0<=i&&(t instanceof f||t instanceof h)&&(i+=n.layout.span)),super(i,r),this.discriminator=n,this.usesPrefixDiscriminator=t instanceof f||t instanceof h,this.defaultLayout=e,this.registry={};let o=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(t){return o(t)},this.configGetSourceVariant=function(t){o=t.bind(this)}}getSpan(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;const r=this.getVariant(t,e);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(t,e)}defaultGetSourceVariant(t){if(Object.prototype.hasOwnProperty.call(t,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(t,this.defaultLayout.property))return;const e=this.registry[t[this.discriminator.property]];if(e&&(!e.layout||e.property&&Object.prototype.hasOwnProperty.call(t,e.property)))return e}else for(const e in this.registry){const r=this.registry[e];if(r.property&&Object.prototype.hasOwnProperty.call(t,r.property))return r}throw new Error("unable to infer src variant")}decode(t){let e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.discriminator,i=n.decode(t,r),o=this.registry[i];if(void 0===o){const o=this.defaultLayout;let a=0;this.usesPrefixDiscriminator&&(a=n.layout.span),e=this.makeDestinationObject(),e[n.property]=i,e[o.property]=o.decode(t,r+a)}else e=o.decode(t,r);return e}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=this.getSourceVariant(t);if(void 0===n){const n=this.discriminator,i=this.defaultLayout;let o=0;return this.usesPrefixDiscriminator&&(o=n.layout.span),n.encode(t[n.property],e,r),o+i.encode(t[i.property],e,r+o)}return n.encode(t,e,r)}addVariant(t,e,r){const n=new O(this,t,e,r);return this.registry[t]=n,n}getVariant(t){let e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e=t instanceof Uint8Array?this.discriminator.decode(t,r):t,this.registry[e]}}e.Union=B;class O extends a{constructor(t,e,r,n){if(!(t instanceof B))throw new TypeError("union must be a Union");if(!Number.isInteger(e)||0>e)throw new TypeError("variant must be a (non-negative) integer");if("string"===typeof r&&void 0===n&&(n=r,r=null),r){if(!(r instanceof a))throw new TypeError("layout must be a Layout");if(null!==t.defaultLayout&&0<=r.span&&r.span>t.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!==typeof n)throw new TypeError("variant must have a String property")}let i=t.span;0>t.span&&(i=r?r.span:0,0<=i&&t.usesPrefixDiscriminator&&(i+=t.discriminator.layout.span)),super(i,n),this.union=t,this.variant=e,this.layout=r||null}getSpan(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;let r=0;this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span);let n=0;return this.layout&&(n=this.layout.getSpan(t,e+r)),r+n}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.makeDestinationObject();if(this!==this.union.getVariant(t,e))throw new Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(t,e+n):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(t,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,e,r);let i=n;if(this.layout&&(this.layout.encode(t[this.property],e,r+n),i+=this.layout.getSpan(e,r+n),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}}function T(t){return 0>t&&(t+=4294967296),t}e.VariantLayout=O;class R extends a{constructor(t,e,r){if(!(t instanceof f||t instanceof h))throw new TypeError("word must be a UInt or UIntBE layout");if("string"===typeof e&&void 0===r&&(r=e,e=!1),41&&void 0!==arguments[1]?arguments[1]:0;const r=this.makeDestinationObject(),n=this.word.decode(t,e);this._packedSetValue(n);for(const i of this.fields)void 0!==i.property&&(r[i.property]=i.decode(t));return r}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=this.word.decode(e,r);this._packedSetValue(n);for(const i of this.fields)if(void 0!==i.property){const e=t[i.property];void 0!==e&&i.encode(e)}return this.word.encode(this._packedGetValue(),e,r)}addField(t,e){const r=new P(this,t,e);return this.fields.push(r),r}addBoolean(t){const e=new N(this,t);return this.fields.push(e),e}fieldFor(t){if("string"!==typeof t)throw new TypeError("property must be string");for(const e of this.fields)if(e.property===t)return e}}e.BitStructure=R;class P{constructor(t,e,r){if(!(t instanceof R))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(e)||0>=e)throw new TypeError("bits must be positive integer");const n=8*t.span,i=t.fields.reduce(((t,e)=>t+e.bits),0);if(e+i>n)throw new Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=e,this.valueMask=(1<>>this.start}encode(t){if("number"!==typeof t||!Number.isInteger(t)||t!==T(t&this.valueMask))throw new TypeError(s("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const e=this.container._packedGetValue(),r=T(t<r&&(r=this.length.decode(t,e)),r}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.span;return 0>r&&(r=this.length.decode(t,e)),o(t).slice(e,e+r)}encode(t,e,r){let n=this.length;if(this.length instanceof u&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw new TypeError(s("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(r+n>e.length)throw new RangeError("encoding overruns Uint8Array");const i=o(t);return o(e).write(i.toString("hex"),r,n,"hex"),this.length instanceof u&&this.length.encode(n,e,r),n}}e.Blob=j;class D extends a{constructor(t){super(-1,t)}getSpan(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(t);let r=e;for(;r1&&void 0!==arguments[1]?arguments[1]:0;const r=this.getSpan(t,e);return o(t).slice(e,e+r-1).toString("utf-8")}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;"string"!==typeof t&&(t=String(t));const i=n.Buffer.from(t,"utf8"),a=i.length;if(r+a>e.length)throw new RangeError("encoding overruns Buffer");const s=o(e);return i.copy(s,r),s[r+a]=0,a+1}}e.CString=D;class L extends a{constructor(t,e){if("string"===typeof t&&void 0===e&&(e=t,t=void 0),void 0===t)t=-1;else if(!Number.isInteger(t))throw new TypeError("maxSpan must be an integer");super(-1,e),this.maxSpan=t}getSpan(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i(t),t.length-e}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.getSpan(t,e);if(0<=this.maxSpan&&this.maxSpan2&&void 0!==arguments[2]?arguments[2]:0;"string"!==typeof t&&(t=String(t));const i=n.Buffer.from(t,"utf8"),a=i.length;if(0<=this.maxSpan&&this.maxSpane.length)throw new RangeError("encoding overruns Buffer");return i.copy(o(e),r),a}}e.UTF8=L;class F extends a{constructor(t,e){super(0,e),this.value=t}decode(t,e){return this.value}encode(t,e,r){return 0}}e.Constant=F,e.greedy=(t,e)=>new c(t,e),e.offset=(t,e,r)=>new l(t,e,r),e.u8=t=>new f(1,t),e.u16=t=>new f(2,t),e.u24=t=>new f(3,t),e.u32=t=>new f(4,t),e.u40=t=>new f(5,t),e.u48=t=>new f(6,t),e.nu64=t=>new b(t),e.u16be=t=>new h(2,t),e.u24be=t=>new h(3,t),e.u32be=t=>new h(4,t),e.u40be=t=>new h(5,t),e.u48be=t=>new h(6,t),e.nu64be=t=>new v(t),e.s8=t=>new d(1,t),e.s16=t=>new d(2,t),e.s24=t=>new d(3,t),e.s32=t=>new d(4,t),e.s40=t=>new d(5,t),e.s48=t=>new d(6,t),e.ns64=t=>new A(t),e.s16be=t=>new p(2,t),e.s24be=t=>new p(3,t),e.s32be=t=>new p(4,t),e.s40be=t=>new p(5,t),e.s48be=t=>new p(6,t),e.ns64be=t=>new w(t),e.f32=t=>new _(t),e.f32be=t=>new E(t),e.f64=t=>new I(t),e.f64be=t=>new S(t),e.struct=(t,e,r)=>new C(t,e,r),e.bits=(t,e,r)=>new R(t,e,r),e.seq=(t,e,r)=>new M(t,e,r),e.union=(t,e,r)=>new B(t,e,r),e.unionLayoutDiscriminator=(t,e)=>new x(t,e),e.blob=(t,e)=>new j(t,e),e.cstr=t=>new D(t),e.utf8=(t,e)=>new L(t,e),e.constant=(t,e)=>new F(t,e)},function(t,e,r){"use strict";function n(){return n=Object.assign||function(t){for(var e=1;e=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a}function u(t,e){return function(r,n){e(r,n,t)}}function c(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function f(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(r=i[t](e)).value instanceof v?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(n){l(o[0][3],n)}var r}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:v(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function _(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=p(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,i,(e=t[r](e)).done,e.value)}))}}}function E(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var I=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function S(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&h(e,t,r);return I(e,t),e}function M(t){return t&&t.__esModule?t:{default:t}}function C(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function k(t,e,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(t,r):i?i.value=r:e.set(t,r),r}function x(t,e){if(null===e||"object"!==typeof e&&"function"!==typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"===typeof t?e===t:t.has(e)}},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return w})),r.d(e,"b",(function(){return ve})),r.d(e,"c",(function(){return S})),r.d(e,"d",(function(){return dt})),r.d(e,"e",(function(){return st})),r.d(e,"f",(function(){return ut})),r.d(e,"g",(function(){return N})),r.d(e,"h",(function(){return D})),r.d(e,"i",(function(){return T})),r.d(e,"j",(function(){return L})),r.d(e,"k",(function(){return j})),r.d(e,"l",(function(){return gt})),r.d(e,"m",(function(){return ft})),r.d(e,"n",(function(){return nt})),r.d(e,"o",(function(){return lt})),r.d(e,"p",(function(){return Bt})),r.d(e,"q",(function(){return B})),r.d(e,"r",(function(){return O})),r.d(e,"s",(function(){return b})),r.d(e,"t",(function(){return et})),r.d(e,"u",(function(){return Dt})),r.d(e,"v",(function(){return At})),r.d(e,"w",(function(){return vt})),r.d(e,"x",(function(){return Tt})),r.d(e,"y",(function(){return Lt})),r.d(e,"z",(function(){return yt})),r.d(e,"A",(function(){return R})),r.d(e,"B",(function(){return P})),r.d(e,"C",(function(){return $})),r.d(e,"D",(function(){return Rt})),r.d(e,"E",(function(){return de})),r.d(e,"F",(function(){return pt})),r.d(e,"G",(function(){return X})),r.d(e,"H",(function(){return me})),r.d(e,"I",(function(){return Vt})),r.d(e,"J",(function(){return Z})),r.d(e,"K",(function(){return zt})),r.d(e,"L",(function(){return Wt})),r.d(e,"M",(function(){return Q})),r.d(e,"N",(function(){return Qt})),r.d(e,"O",(function(){return Ft})),r.d(e,"P",(function(){return Jt})),r.d(e,"Q",(function(){return ae})),r.d(e,"R",(function(){return ce})),r.d(e,"S",(function(){return ie})),r.d(e,"T",(function(){return ee})),r.d(e,"U",(function(){return le})),r.d(e,"V",(function(){return he})),r.d(e,"W",(function(){return fe})),r.d(e,"X",(function(){return Ut})),r.d(e,"Y",(function(){return oe})),r.d(e,"Z",(function(){return re})),r.d(e,"ab",(function(){return ne})),r.d(e,"bb",(function(){return se})),r.d(e,"cb",(function(){return ge})),r.d(e,"db",(function(){return te})),r.d(e,"eb",(function(){return ue})),r.d(e,"fb",(function(){return Gt})),r.d(e,"gb",(function(){return Kt})),r.d(e,"hb",(function(){return ot})),r.d(e,"ib",(function(){return mt})),r.d(e,"jb",(function(){return at})),r.d(e,"kb",(function(){return y})),r.d(e,"lb",(function(){return ht})),r.d(e,"mb",(function(){return Pt})),r.d(e,"nb",(function(){return kt})),r.d(e,"ob",(function(){return ye})),r.d(e,"pb",(function(){return F})),r.d(e,"qb",(function(){return U}));var i=r(525),o=r(747),a=r(979),s=r(399),u=r(526),c=r(71),l=r(750),f=r(53),h=r(247),d=r(748),p=r(319),g=r(749);const m=":";function y(t){const[e,r]=t.split(m);return{namespace:e,reference:r}}function b(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];return Object.keys(t).forEach((n=>{if(e.length&&!e.includes(n))return;const i=t[n];r.push(...i.accounts)})),r}function v(t,e){return t.includes(":")?[t]:e.chains||[]}const A="base10",w="base16",_="base64pad",E="utf8",I=0,S=1,M=0,C=1,k=12,x=32;function B(){const t=u.generateKeyPair();return{privateKey:Object(c.toString)(t.secretKey,w),publicKey:Object(c.toString)(t.publicKey,w)}}function O(){const t=Object(a.randomBytes)(x);return Object(c.toString)(t,w)}function T(t,e){const r=u.sharedKey(Object(c.fromString)(t,w),Object(c.fromString)(e,w),!0),n=new o.HKDF(s.SHA256,r).expand(x);return Object(c.toString)(n,w)}function R(t){const e=Object(s.hash)(Object(c.fromString)(t,w));return Object(c.toString)(e,w)}function P(t){const e=Object(s.hash)(Object(c.fromString)(t,E));return Object(c.toString)(e,w)}function N(t){return Number(Object(c.toString)(t,A))}function j(t){const e=function(t){return Object(c.fromString)("".concat(t),A)}(typeof t.type<"u"?t.type:I);if(N(e)===S&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?Object(c.fromString)(t.senderPublicKey,w):void 0,n=typeof t.iv<"u"?Object(c.fromString)(t.iv,w):Object(a.randomBytes)(k);return function(t){if(N(t.type)===S){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Object(c.toString)(Object(c.concat)([t.type,t.senderPublicKey,t.iv,t.sealed]),_)}return Object(c.toString)(Object(c.concat)([t.type,t.iv,t.sealed]),_)}({type:e,sealed:new i.ChaCha20Poly1305(Object(c.fromString)(t.symKey,w)).seal(n,Object(c.fromString)(t.message,E)),iv:n,senderPublicKey:r})}function D(t){const e=new i.ChaCha20Poly1305(Object(c.fromString)(t.symKey,w)),{sealed:r,iv:n}=L(t.encoded),o=e.open(n,r);if(null===o)throw new Error("Failed to decrypt");return Object(c.toString)(o,E)}function L(t){const e=Object(c.fromString)(t,_),r=e.slice(M,C),n=C;if(N(r)===S){const t=n+x,i=t+k,o=e.slice(n,t),a=e.slice(t,i);return{type:r,sealed:e.slice(i),iv:a,senderPublicKey:o}}const i=n+k,o=e.slice(n,i);return{type:r,sealed:e.slice(i),iv:o}}function F(t,e){const r=L(t);return U({type:N(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Object(c.toString)(r.senderPublicKey,w):void 0,receiverPublicKey:null===e||void 0===e?void 0:e.receiverPublicKey})}function U(t){const e=(null===t||void 0===t?void 0:t.type)||I;if(e===S){if(typeof(null===t||void 0===t?void 0:t.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(null===t||void 0===t?void 0:t.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:null===t||void 0===t?void 0:t.senderPublicKey,receiverPublicKey:null===t||void 0===t?void 0:t.receiverPublicKey}}function Q(t){return t.type===S&&"string"==typeof t.senderPublicKey&&"string"==typeof t.receiverPublicKey}var G=Object.defineProperty,H=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,K=(t,e,r)=>e in t?G(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,V=(t,e)=>{for(var r in e||(e={}))z.call(e,r)&&K(t,r,e[r]);if(H)for(var r of H(e))q.call(e,r)&&K(t,r,e[r]);return t};const W="ReactNative",J={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Y="js";function X(){return typeof t<"u"&&typeof t.versions<"u"&&typeof t.versions.node<"u"}function Z(){return!Object(h.getDocument)()&&!!Object(h.getNavigator)()&&navigator.product===W}function $(){return!X()&&!!Object(h.getNavigator)()}function tt(){return Z()?J.reactNative:X()?J.node:$()?J.browser:J.unknown}function et(){return Object(d.getWindowMetadata)()||{name:"",description:"",url:"",icons:[""]}}function rt(t,e,r){const i=function(){if(tt()===J.reactNative&&typeof n<"u"&&typeof(null==n?void 0:n.Platform)<"u"){const{OS:t,Version:e}=n.Platform;return[t,e].join("-")}const t=Object(l.a)();if(null===t)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return"browser"===t.type?[e,t.name,t.version].join("-"):[e,t.version].join("-")}(),o=function(){var t;const e=tt();return e===J.browser?[e,(null==(t=Object(h.getLocation)())?void 0:t.host)||"unknown"].join(":"):e}();return[[t,e].join("-"),[Y,r].join("-"),i,o].join("/")}function nt(t){let{protocol:e,version:r,relayUrl:n,sdkVersion:i,auth:o,projectId:a,useOnCloseEvent:s}=t;const u=n.split("?"),c={auth:o,ua:rt(e,r,i),projectId:a,useOnCloseEvent:s||void 0},l=function(t,e){let r=p.parse(t);return r=V(V({},r),e),p.stringify(r)}(u[1]||"",c);return u[0]+"?"+l}function it(t,e){return t.filter((t=>e.includes(t))).length===t.length}function ot(t){return Object.fromEntries(t.entries())}function at(t){return new Map(Object.entries(t))}function st(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.FIVE_MINUTES,e=arguments.length>1?arguments[1]:void 0;const r=Object(f.toMiliseconds)(t||f.FIVE_MINUTES);let n,i,o;return{resolve:t=>{o&&n&&(clearTimeout(o),n(t))},reject:t=>{o&&i&&(clearTimeout(o),i(t))},done:()=>new Promise(((t,a)=>{o=setTimeout((()=>{a(new Error(e))}),r),n=t,i=a}))}}function ut(t,e,r){return new Promise((async(n,i)=>{const o=setTimeout((()=>i(new Error(r))),e);try{n(await t)}catch(a){i(a)}clearTimeout(o)}))}function ct(t,e){if("string"==typeof e&&e.startsWith("".concat(t,":")))return e;if("topic"===t.toLowerCase()){if("string"!=typeof e)throw new Error('Value must be "string" for expirer target type: topic');return"topic:".concat(e)}if("id"===t.toLowerCase()){if("number"!=typeof e)throw new Error('Value must be "number" for expirer target type: id');return"id:".concat(e)}throw new Error("Unknown expirer target type: ".concat(t))}function lt(t){return ct("topic",t)}function ft(t){return ct("id",t)}function ht(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if("topic"===e&&"string"==typeof r)n.topic=r;else{if("id"!==e||!Number.isInteger(Number(r)))throw new Error("Invalid target, expected id:number or topic:string, got ".concat(e,":").concat(r));n.id=Number(r)}return n}function dt(t,e){return Object(f.fromMiliseconds)((e||Date.now())+Object(f.toMiliseconds)(t))}function pt(t){return Date.now()>=Object(f.toMiliseconds)(t)}function gt(t,e){return"".concat(t).concat(e?":".concat(e):"")}function mt(){return[...new Set([...arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]])]}async function yt(t){let{id:e,topic:r,wcDeepLink:i}=t;try{if(!i)return;const t="string"==typeof i?JSON.parse(i):i;let o=null===t||void 0===t?void 0:t.href;if("string"!=typeof o)return;o.endsWith("/")&&(o=o.slice(0,-1));const a="".concat(o,"/wc?requestId=").concat(e,"&sessionTopic=").concat(r),s=tt();s===J.browser?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):s===J.reactNative&&typeof(null==n?void 0:n.Linking)<"u"&&await n.Linking.openURL(a)}catch(o){console.error(o)}}const bt="irn";function vt(t){return(null===t||void 0===t?void 0:t.relay)||{protocol:bt}}function At(t){const e=g.RELAY_JSONRPC[t];if(typeof e>"u")throw new Error("Relay Protocol not supported: ".concat(t));return e}var wt=Object.defineProperty,_t=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,St=(t,e,r)=>e in t?wt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Mt=(t,e)=>{for(var r in e||(e={}))Et.call(e,r)&&St(t,r,e[r]);if(_t)for(var r of _t(e))It.call(e,r)&&St(t,r,e[r]);return t};function Ct(t){const e={},r="relay"+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-");return Object.keys(t).forEach((n=>{if(n.startsWith(r)){const i=n.replace(r,""),o=t[n];e[i]=o}})),e}function kt(t){const e=t.indexOf(":"),r=-1!==t.indexOf("?")?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split("@"),o=typeof r<"u"?t.substring(r):"",a=p.parse(o);return{protocol:n,topic:xt(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:Ct(a)}}function xt(t){return t.startsWith("//")?t.substring(2):t}function Bt(t){return"".concat(t.protocol,":").concat(t.topic,"@").concat(t.version,"?")+p.stringify(Mt({symKey:t.symKey},function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";const r={};return Object.keys(t).forEach((n=>{const i="relay"+e+n;t[n]&&(r[i]=t[n])})),r}(t.relay)))}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function Ot(t){const e=[];return t.forEach((t=>{const[r,n]=t.split(":");e.push("".concat(r,":").concat(n))})),e}function Tt(t,e){const r=ee(t,e);if(r)throw new Error(r.message);const n={};for(const[i,o]of Object.entries(t))n[i]={methods:o.methods,events:o.events,chains:o.accounts.map((t=>"".concat(t.split(":")[0],":").concat(t.split(":")[1])))};return n}function Rt(t){return t.includes(":")}function Pt(t){return Rt(t)?t.split(":")[0]:t}const Nt={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},jt={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Dt(t,e){const{message:r,code:n}=jt[t];return{message:e?"".concat(r," ").concat(e):r,code:n}}function Lt(t,e){const{message:r,code:n}=Nt[t];return{message:e?"".concat(r," ").concat(e):r,code:n}}function Ft(t,e){return!!Array.isArray(t)&&(!(typeof e<"u"&&t.length)||t.every(e))}function Ut(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function Qt(t){return typeof t>"u"}function Gt(t,e){return!(!e||!Qt(t))||"string"==typeof t&&!!t.trim().length}function Ht(t,e){return!(!e||!Qt(t))||"number"==typeof t&&!isNaN(t)}function zt(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let o=!0;return!!it(i,n)&&(n.forEach((e=>{const{accounts:n,methods:i,events:a}=t.namespaces[e],s=Ot(n),u=r[e];(!it(v(e,u),s)||!it(u.methods,i)||!it(u.events,a))&&(o=!1)})),o)}function qt(t){return!(!Gt(t,!1)||!t.includes(":"))&&2===t.split(":").length}function Kt(t){if(Gt(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function Vt(t){var e;return null==(e=null===t||void 0===t?void 0:t.proposer)?void 0:e.publicKey}function Wt(t){return null===t||void 0===t?void 0:t.topic}function Jt(t,e){let r=null;return Gt(null===t||void 0===t?void 0:t.publicKey,!1)||(r=Dt("MISSING_OR_INVALID","".concat(e," controller public key should be a string"))),r}function Yt(t){let e=!0;return Ft(t)?t.length&&(e=t.every((t=>Gt(t,!1)))):e=!1,e}function Xt(t,e,r){let n=null;return Object.entries(t).forEach((t=>{let[i,o]=t;if(n)return;const a=function(t,e,r){let n=null;return Ft(e)&&e.length?e.forEach((t=>{n||qt(t)||(n=Lt("UNSUPPORTED_CHAINS","".concat(r,", chain ").concat(t,' should be a string and conform to "namespace:chainId" format')))})):qt(t)||(n=Lt("UNSUPPORTED_CHAINS","".concat(r,', chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }'))),n}(i,v(i,o),"".concat(e," ").concat(r));a&&(n=a)})),n}function Zt(t,e){let r=null;return Ft(t)?t.forEach((t=>{r||function(t){if(Gt(t,!1)&&t.includes(":")){const e=t.split(":");if(3===e.length){const t=e[0]+":"+e[1];return!!e[2]&&qt(t)}}return!1}(t)||(r=Lt("UNSUPPORTED_ACCOUNTS","".concat(e,", account ").concat(t,' should be a string and conform to "namespace:chainId:address" format')))})):r=Lt("UNSUPPORTED_ACCOUNTS","".concat(e,', accounts should be an array of strings conforming to "namespace:chainId:address" format')),r}function $t(t,e){let r=null;return Object.values(t).forEach((t=>{if(r)return;const n=function(t,e){let r=null;return Yt(null===t||void 0===t?void 0:t.methods)?Yt(null===t||void 0===t?void 0:t.events)||(r=Lt("UNSUPPORTED_EVENTS","".concat(e,", events should be an array of strings or empty array for no events"))):r=Lt("UNSUPPORTED_METHODS","".concat(e,", methods should be an array of strings or empty array for no methods")),r}(t,"".concat(e,", namespace"));n&&(r=n)})),r}function te(t,e,r){let n=null;if(t&&Ut(t)){const i=$t(t,e);i&&(n=i);const o=Xt(t,e,r);o&&(n=o)}else n=Dt("MISSING_OR_INVALID","".concat(e,", ").concat(r," should be an object with data"));return n}function ee(t,e){let r=null;if(t&&Ut(t)){const n=$t(t,e);n&&(r=n);const i=function(t,e){let r=null;return Object.values(t).forEach((t=>{if(r)return;const n=Zt(null===t||void 0===t?void 0:t.accounts,"".concat(e," namespace"));n&&(r=n)})),r}(t,e);i&&(r=i)}else r=Dt("MISSING_OR_INVALID","".concat(e,", namespaces should be an object with data"));return r}function re(t){return Gt(t.protocol,!0)}function ne(t,e){let r=!1;return e&&!t?r=!0:t&&Ft(t)&&t.length&&t.forEach((t=>{r=re(t)})),r}function ie(t){return"number"==typeof t}function oe(t){return typeof t<"u"&&null!==typeof t}function ae(t){return!(!t||"object"!=typeof t||!t.code||!Ht(t.code,!1)||!t.message||!Gt(t.message,!1))}function se(t){return!(Qt(t)||!Gt(t.method,!1))}function ue(t){return!(Qt(t)||Qt(t.result)&&Qt(t.error)||!Ht(t.id,!1)||!Gt(t.jsonrpc,!1))}function ce(t){return!(Qt(t)||!Gt(t.name,!1))}function le(t,e){return!(!qt(e)||!function(t){const e=[];return Object.values(t).forEach((t=>{e.push(...Ot(t.accounts))})),e}(t).includes(e))}function fe(t,e,r){return!!Gt(r,!1)&&function(t,e){const r=[];return Object.values(t).forEach((t=>{Ot(t.accounts).includes(e)&&r.push(...t.methods)})),r}(t,e).includes(r)}function he(t,e,r){return!!Gt(r,!1)&&function(t,e){const r=[];return Object.values(t).forEach((t=>{Ot(t.accounts).includes(e)&&r.push(...t.events)})),r}(t,e).includes(r)}function de(t,e,r){let n=null;const i=function(t){const e={};return Object.keys(t).forEach((r=>{var n;r.includes(":")?e[r]=t[r]:null==(n=t[r].chains)||n.forEach((n=>{e[n]={methods:t[r].methods,events:t[r].events}}))})),e}(t),o=function(t){const e={};return Object.keys(t).forEach((r=>{if(r.includes(":"))e[r]=t[r];else{const n=Ot(t[r].accounts);null===n||void 0===n||n.forEach((n=>{e[n]={accounts:t[r].accounts.filter((t=>t.includes("".concat(n,":")))),methods:t[r].methods,events:t[r].events}}))}})),e}(e),a=Object.keys(i),s=Object.keys(o),u=pe(Object.keys(t)),c=pe(Object.keys(e)),l=u.filter((t=>!c.includes(t)));return l.length&&(n=Dt("NON_CONFORMING_NAMESPACES","".concat(r," namespaces keys don't satisfy requiredNamespaces.\n Required: ").concat(l.toString(),"\n Received: ").concat(Object.keys(e).toString()))),it(a,s)||(n=Dt("NON_CONFORMING_NAMESPACES","".concat(r," namespaces chains don't satisfy required namespaces.\n Required: ").concat(a.toString(),"\n Approved: ").concat(s.toString()))),Object.keys(e).forEach((t=>{if(!t.includes(":")||n)return;const i=Ot(e[t].accounts);i.includes(t)||(n=Dt("NON_CONFORMING_NAMESPACES","".concat(r," namespaces accounts don't satisfy namespace accounts for ").concat(t,"\n Required: ").concat(t,"\n Approved: ").concat(i.toString())))})),a.forEach((t=>{n||(it(i[t].methods,o[t].methods)?it(i[t].events,o[t].events)||(n=Dt("NON_CONFORMING_NAMESPACES","".concat(r," namespaces events don't satisfy namespace events for ").concat(t))):n=Dt("NON_CONFORMING_NAMESPACES","".concat(r," namespaces methods don't satisfy namespace methods for ").concat(t)))})),n}function pe(t){return[...new Set(t.map((t=>t.includes(":")?t.split(":")[0]:t)))]}function ge(t,e){return Ht(t,!1)&&t<=e.max&&t>=e.min}function me(){const t=tt();return new Promise((e=>{switch(t){case J.browser:e(function(){var t;return $()&&(null===(t=navigator)||void 0===t?void 0:t.onLine)}());break;case J.reactNative:e(async function(){if(Z()&&typeof n<"u"&&null!=n&&n.NetInfo){const t=await(null==n?void 0:n.NetInfo.fetch());return null===t||void 0===t?void 0:t.isConnected}return!0}());break;case J.node:default:e(!0)}}))}function ye(t){switch(tt()){case J.browser:!function(t){$()&&(window.addEventListener("online",(()=>t(!0))),window.addEventListener("offline",(()=>t(!1))))}(t);break;case J.reactNative:!function(t){var e;Z()&&typeof n<"u"&&null!=n&&n.NetInfo&&(null===(e=n)||void 0===e||e.NetInfo.addEventListener((e=>t(null===e||void 0===e?void 0:e.isConnected))))}(t);case J.node:}}const be={};class ve{static get(t){return be[t]}static set(t,e){be[t]=e}static delete(t){delete be[t]}}}).call(this,r(57),r(44))},function(t,e,r){"use strict";r.d(e,"h",(function(){return R})),r.d(e,"g",(function(){return P})),r.d(e,"i",(function(){return N})),r.d(e,"b",(function(){return j})),r.d(e,"c",(function(){return D})),r.d(e,"d",(function(){return L})),r.d(e,"f",(function(){return F})),r.d(e,"e",(function(){return U})),r.d(e,"H",(function(){return rt})),r.d(e,"K",(function(){return it})),r.d(e,"J",(function(){return ot})),r.d(e,"a",(function(){return at})),r.d(e,"w",(function(){return ft})),r.d(e,"v",(function(){return pt})),r.d(e,"C",(function(){return gt})),r.d(e,"r",(function(){return d})),r.d(e,"q",(function(){return g})),r.d(e,"D",(function(){return m})),r.d(e,"F",(function(){return y})),r.d(e,"E",(function(){return b})),r.d(e,"l",(function(){return v})),r.d(e,"L",(function(){return _})),r.d(e,"Q",(function(){return I})),r.d(e,"N",(function(){return S})),r.d(e,"z",(function(){return M})),r.d(e,"P",(function(){return C})),r.d(e,"k",(function(){return k})),r.d(e,"R",(function(){return x})),r.d(e,"m",(function(){return B})),r.d(e,"n",(function(){return O})),r.d(e,"u",(function(){return T})),r.d(e,"x",(function(){return i.equalsBytes})),r.d(e,"j",(function(){return ct})),r.d(e,"O",(function(){return lt})),r.d(e,"A",(function(){return St})),r.d(e,"o",(function(){return Mt})),r.d(e,"p",(function(){return Ct})),r.d(e,"t",(function(){return kt})),r.d(e,"s",(function(){return xt})),r.d(e,"G",(function(){return o})),r.d(e,"M",(function(){return a})),r.d(e,"I",(function(){return At})),r.d(e,"y",(function(){return Bt})),r.d(e,"B",(function(){return Ot}));var n=r(202),i=(r(1430),r(301));function o(t){if("string"!==typeof t)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat(typeof t));return"0"===t[0]&&"x"===t[1]}const a=t=>{if("string"!==typeof t)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat(typeof t));return o(t)?t.slice(2):t};function s(t){let e=t;if("string"!==typeof e)throw new Error("[padToEven] value must be type 'string', received ".concat(typeof e));return e.length%2&&(e="0".concat(e)),e}function u(t,e){return!("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&!("undefined"!==typeof e&&e>0&&t.length!==2+2*e)}const c=function(t){if(!(t instanceof Uint8Array)){const e="This method only supports Uint8Array but input was: ".concat(t);throw new Error(e)}},l=function(t){if("string"!==typeof t){const e="This method only supports strings but input was: ".concat(t);throw new Error(e)}},f=BigInt(0),h=(i.bytesToHex,Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")))),d=t=>{let e="0x";if(void 0===t||0===t.length)return e;for(const r of t)e+=h[r];return e},p=[];for(let Tt=0;Tt<=65535;Tt++)p[Tt]=BigInt(Tt);const g=t=>{const e=d(t);return"0x"===e?f:4===e.length?p[t[0]]:6===e.length?p[256*t[0]+t[1]]:BigInt(e)},m=t=>{if("string"!==typeof t)throw new Error("hex argument type ".concat(typeof t," must be of type string"));if(!t.startsWith("0x"))throw new Error("prefixed hex input should start with 0x, got ".concat(t.substring(0,2)));(t=t.slice(2)).length%2!==0&&(t=s(t));const e=t.length/2,r=new Uint8Array(e);for(let n=0;n{if(!Number.isSafeInteger(t)||t<0)throw new Error("Received an invalid integer type: ".concat(t));return"0x".concat(t.toString(16))},b=t=>{const e=y(t);return m(e)},v=t=>S("0x"+s(t.toString(16))),A=t=>new Uint8Array(t),w=(t,e,r)=>r?t.length(c(t),w(t,e,!1)),E=t=>{let e=t[0];for(;t.length>0&&"0"===e.toString();)e=(t=t.slice(1))[0];return t},I=t=>(c(t),E(t)),S=t=>{if(null===t||void 0===t)return new Uint8Array;if(Array.isArray(t)||t instanceof Uint8Array)return Uint8Array.from(t);if("string"===typeof t){if(!u(t))throw new Error("Cannot convert string to Uint8Array. toBytes only supports 0x-prefixed hex strings and this string was given: ".concat(t));return m(t)}if("number"===typeof t)return b(t);if("bigint"===typeof t){if(t{if("0x"===t.slice(0,2))throw new Error("hex string is prefixed with 0x, should be unprefixed");return Object(i.hexToBytes)(s(t))})(e)}if(void 0!==t.toBytes)return t.toBytes();throw new Error("invalid type")},M=t=>BigInt.asIntN(256,g(t)),C=t=>v(BigInt.asUintN(256,t)),k=t=>"string"!==typeof t||o(t)?t:"0x"+t,x=t=>{for(const[e,r]of Object.entries(t))if(void 0!==r&&r.length>0&&0===r[0])throw new Error("".concat(e," cannot have leading zeroes, received: ").concat(d(r)))},B=t=>"0x"+t.toString(16),O=t=>I(v(t)),T=function(){for(var t=arguments.length,e=new Array(t),r=0;rt+e.length),0),i=new Uint8Array(n);for(let o=0,a=0;ot.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return t.slice(e,r)}function G(t){if(0===t[0])throw new Error("invalid RLP: extra zeros");return V(K(t))}function H(t,e){if(t<56)return Uint8Array.from([t+e]);const r=X(t),n=X(e+55+r.length/2);return Uint8Array.from(W(n+r))}function z(t){let e,r,n,i,o;const a=[],s=t[0];if(s<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(s<=183){if(e=s-127,n=128===s?Uint8Array.from([]):Q(t,1,e),2===e&&n[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:n,remainder:t.slice(e)}}if(s<=191){if(r=s-182,t.length-1t.length)throw new Error("invalid RLP: total length is larger than the data");for(i=Q(t,r,n);i.length;)o=z(i),a.push(o.data),i=o.remainder;return{data:a,remainder:t.slice(n)}}}const q=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function K(t){let e="";for(let r=0;rt+e.length),0),i=new Uint8Array(n);for(let o=0,a=0;o=2&&"0"===t[0]&&"x"===t[1]}function $(t){if(t instanceof Uint8Array)return t;if("string"===typeof t)return Z(t)?W((e="string"!==typeof(r=t)?r:Z(r)?r.slice(2):r).length%2?"0".concat(e):e):Y(t);var e,r;if("number"===typeof t||"bigint"===typeof t)return t?W(X(t)):Uint8Array.from([]);if(null===t||void 0===t)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof t)}const tt={encode:function t(e){if(Array.isArray(e)){const r=[];let n=0;for(let i=0;i1&&void 0!==arguments[1]&&arguments[1];if("undefined"===typeof t||null===t||0===t.length)return Uint8Array.from([]);const r=z($(t));if(e)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}};var et=r(158);const rt=function(t){try{l(t)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(t)},nt=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(c(t),e&&64!==t.length&&(t=n.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1)),64!==t.length)throw new Error("Expected pubKey to be of length 64");return Object(et.keccak256)(t).subarray(-20)},it=nt,ot=function(t){return it(function(t){return c(t),n.secp256k1.ProjectivePoint.fromPrivateKey(t).toRawBytes(!1).slice(1)}(t))};new Uint8Array(0);class at{constructor(t){if(20!==t.length)throw new Error("Invalid address length");this.bytes=t}static zero(){return new at(A(20))}static fromString(t){if(!rt(t))throw new Error("Invalid address");return new at(S(t))}static fromPublicKey(t){if(!(t instanceof Uint8Array))throw new Error("Public key should be Uint8Array");const e=nt(t);return new at(e)}static fromPrivateKey(t){if(!(t instanceof Uint8Array))throw new Error("Private key should be Uint8Array");const e=ot(t);return new at(e)}static generate(t,e){if("bigint"!==typeof e)throw new Error("Expected nonce to be a bigint");return new at(function(t,e){return c(t),c(e),g(e)===j?Object(et.keccak256)(tt.encode([t,Uint8Array.from([])])).subarray(-20):Object(et.keccak256)(tt.encode([t,e])).subarray(-20)}(t.bytes,v(e)))}static generate2(t,e,r){if(!(e instanceof Uint8Array))throw new Error("Expected salt to be a Uint8Array");if(!(r instanceof Uint8Array))throw new Error("Expected initCode to be a Uint8Array");return new at(function(t,e,r){if(c(t),c(e),c(r),20!==t.length)throw new Error("Expected from to be of length 20");if(32!==e.length)throw new Error("Expected salt to be of length 32");return Object(et.keccak256)(T(m("0xff"),t,e,Object(et.keccak256)(r))).subarray(-20)}(t.bytes,e,r))}equals(t){return Object(i.equalsBytes)(this.bytes,t.bytes)}isZero(){return this.equals(at.zero())}isPrecompileOrSystemAddress(){const t=g(this.bytes),e=j,r=BigInt("0xffff");return t>=e&&t<=r}toString(){return d(this.bytes)}toBytes(){return new Uint8Array(this.bytes)}}var st,ut,ct;function lt(t,e){if(null===t)return null;if(void 0===t)return;if("string"===typeof t&&!u(t))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(t));if("number"===typeof t&&!Number.isSafeInteger(t))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const r=S(t);switch(e){case ct.Uint8Array:return r;case ct.BigInt:return g(r);case ct.Number:{const t=g(r);if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(t)}case ct.PrefixedHexString:return d(r);default:throw new Error("unknown outputType")}}!function(t){t.String="string",t.Bytes="view",t.Number="number"}(st||(st={})),function(t){t.String="string",t.Bytes="view",t.JSON="json"}(ut||(ut={})),function(t){t[t.Number=0]="Number",t[t.BigInt=1]="BigInt",t[t.Uint8Array=2]="Uint8Array",t[t.PrefixedHexString=3]="PrefixedHexString"}(ct||(ct={}));function ft(t,e,r){const i=n.secp256k1.sign(t,e),o=i.toCompactRawBytes();return{r:o.slice(0,32),s:o.slice(32,64),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*L}}function ht(t,e){return t===j||t===D?t:void 0===e?t-U:t-(e*L+BigInt(35))}function dt(t){return t===j||t===D}const pt=function(t,e,r,i,o){const a=T(_(r,32),_(i,32)),s=ht(e,o);if(!dt(s))throw new Error("Invalid signature v value");return n.secp256k1.Signature.fromCompact(a).addRecoveryBit(Number(s)).recoverPublicKey(t).toRawBytes(!1).slice(1)},gt=function(t){c(t);const e=Object(i.utf8ToBytes)("\x19Ethereum Signed Message:\n".concat(t.length));return Object(et.keccak256)(T(e,t))};var mt=r(61);class yt extends mt.EventEmitter{emit(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{o.call(t,r,(t=>{t?n(t):e()}))}))}catch(i){i}if(n)throw n}(s,u.slice(),o).then(a).catch(a),s.listenerCount(t)>0}once(t,e){const r=this;let n;if("function"!==typeof e)throw new TypeError("listener must be a function");return e.length>=2?function(i,o){r.removeListener(t,n),e(i,o)}:function(i){r.removeListener(t,n),e(i,n)},r.on(t,n),r}first(t,e){var r;let n=null!==this._events[t]&&void 0!==r?r:[];if("function"!==typeof e)throw new TypeError("listener must be a function");return Array.isArray(n)||(this._events[t]=[n]),n.unshift(e),this}before(t,e,r){return this.beforeOrAfter(t,e,r)}after(t,e,r){return this.beforeOrAfter(t,e,r,"after")}beforeOrAfter(t,e,r,n){var i;let o,a,s=null!==this._events[t]&&void 0!==i?i:[];const u="after"===n?1:0;if("function"!==typeof r)throw new TypeError("listener must be a function");if("function"!==typeof e)throw new TypeError("target must be a function");for(Array.isArray(s)||(this._events[t]=[s]),s.length,s.length;o--;)if(s[o]===e){o+u;break}return s.splice(a,0,r),this}on(t,e){return super.on(t,e)}addListener(t,e){return super.addListener(t,e)}prependListener(t,e){return super.prependListener(t,e)}prependOnceListener(t,e){return super.prependOnceListener(t,e)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,e){return super.removeListener(t,e)}eventNames(){return super.eventNames()}listeners(t){return super.listeners(t)}listenerCount(t){return super.listenerCount(t)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(t){return super.setMaxListeners(t)}}var bt=r(1431);function vt(){throw Error("kzg library not loaded")}let At={loadTrustedSetup:vt,blobToKzgCommitment:vt,computeBlobKzgProof:vt,verifyKzgProof:vt,verifyBlobKzgProofBatch:vt};const wt=4096,_t=131072,Et=2*_t-1;function It(t){const e=new Uint8Array(131072);for(let r=0;r{const e=Object(i.utf8ToBytes)(t),r=e.byteLength;if(0===r)throw Error("invalid blob data");if(r>Et)throw Error("blob data is too large");const n=Math.ceil(r/_t),o=function(t,e){const r=new Uint8Array(e*_t).fill(0);return r.set(t),r[t.byteLength]=128,r}(e,n),a=[];for(let i=0;i{const e=[];for(const r of t)e.push(At.blobToKzgCommitment(r));return e},Ct=(t,e)=>t.map(((t,r)=>At.computeBlobKzgProof(t,e[r]))),kt=(t,e)=>{const r=new Uint8Array(32);return r.set([e],0),r.set(Object(bt.sha256)(t).subarray(1),1),r},xt=t=>{const e=[];for(const r of t)e.push(kt(r,1));return e};const Bt=async(t,e)=>{const r=JSON.stringify({method:e.method,params:e.params,jsonrpc:"2.0",id:1}),n=await fetch(t,{headers:{"content-type":"application/json"},method:"POST",body:r});return(await n.json()).result},Ot=t=>{if("string"===typeof t)return t;if("object"===typeof t&&void 0!==t._getConnection)return t._getConnection().url;throw new Error("Must provide valid provider URL or Web3Provider")}},function(t,e,r){var n=e;n.utils=r(292),n.common=r(548),n.sha=r(1715),n.ripemd=r(1041),n.hmac=r(1719),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)};function i(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}},function(t,e,r){"use strict";r.d(e,"i",(function(){return a})),r.d(e,"h",(function(){return u})),r.d(e,"a",(function(){return c})),r.d(e,"b",(function(){return l})),r.d(e,"m",(function(){return f})),r.d(e,"j",(function(){return h})),r.d(e,"g",(function(){return p})),r.d(e,"d",(function(){return g})),r.d(e,"e",(function(){return m})),r.d(e,"c",(function(){return y})),r.d(e,"f",(function(){return b})),r.d(e,"l",(function(){return v})),r.d(e,"k",(function(){return A}));const n=new(r(56).a)("bytes/5.6.1");function i(t){return!!t.toHexString}function o(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function a(t){return h(t)&&!(t.length%2)||u(t)}function s(t){return"number"===typeof t&&t==t&&t%1===0}function u(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"===typeof t)return!1;if(!s(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function c(t,e){if(e||(e={}),"number"===typeof t){n.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),o(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t)&&(t=t.toHexString()),h(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",t));const i=[];for(let t=0;tc(t))),r=e.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(r);return e.reduce(((t,e)=>(n.set(e,t),t+e.length)),0),o(n)}function f(t){let e=c(t);if(0===e.length)return e;let r=0;for(;r>4]+d[15&n]}return e}return n.throwArgumentError("invalid hexlify value","value",t)}function g(t){if("string"!==typeof t)t=p(t);else if(!h(t)||t.length%2)return null;return(t.length-2)/2}function m(t,e,r){return"string"!==typeof t?t=p(t):(!h(t)||t.length%2)&&n.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function y(t){let e="0x";return t.forEach((t=>{e+=p(t).substring(2)})),e}function b(t,e){for("string"!==typeof t?t=p(t):h(t)||n.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&n.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function v(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(t)){let r=c(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=p(r.slice(0,32)),e.s=p(r.slice(32,64))):65===r.length?(e.r=p(r.slice(0,32)),e.s=p(r.slice(32,64)),e.v=r[64]):n.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:n.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=p(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const r=function(t,e){(t=c(t)).length>e&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),o(r)}(c(e._vs),32);e._vs=p(r);const i=r[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=i:e.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;const a=p(r);null==e.s?e.s=a:e.s!==a&&n.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?n.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const r=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&h(e.r)?e.r=b(e.r,32):n.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&h(e.s)?e.s=b(e.s,32):n.throwArgumentError("signature missing or invalid s","signature",t);const r=c(e.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const i=p(r);e._vs&&(h(e._vs)||n.throwArgumentError("signature invalid _vs","signature",t),e._vs=b(e._vs,32)),null==e._vs?e._vs=i:e._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function A(t){return p(l([(t=v(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},function(t,e,r){"use strict";var n,i,o,a,s,u,c,l,f,h;r.d(e,"e",(function(){return o})),r.d(e,"b",(function(){return n})),r.d(e,"g",(function(){return i})),r.d(e,"f",(function(){return s})),r.d(e,"h",(function(){return p})),r.d(e,"d",(function(){return u})),r.d(e,"a",(function(){return c})),r.d(e,"j",(function(){return l})),r.d(e,"k",(function(){return f})),r.d(e,"i",(function(){return h})),r.d(e,"l",(function(){return d})),r.d(e,"c",(function(){return g})),function(t){t.BlockchainRequest="blockchain_request",t.PermissionRequest="permission_request",t.SignPayloadRequest="sign_payload_request",t.OperationRequest="operation_request",t.BroadcastRequest="broadcast_request",t.BlockchainResponse="blockchain_response",t.PermissionResponse="permission_response",t.SignPayloadResponse="sign_payload_response",t.OperationResponse="operation_response",t.BroadcastResponse="broadcast_response",t.Acknowledge="acknowledge",t.Disconnect="disconnect",t.Error="error"}(n||(n={})),function(t){t.SIGN="sign",t.OPERATION_REQUEST="operation_request",t.ENCRYPT="encrypt",t.THRESHOLD="threshold"}(i||(i={})),function(t){t.MAINNET="mainnet",t.DELPHINET="delphinet",t.EDONET="edonet",t.FLORENCENET="florencenet",t.GRANADANET="granadanet",t.HANGZHOUNET="hangzhounet",t.ITHACANET="ithacanet",t.JAKARTANET="jakartanet",t.CUSTOM="custom"}(o||(o={})),function(t){t.ENDORSEMENT="endorsement",t.SEED_NONCE_REVELATION="seed_nonce_revelation",t.DOUBLE_ENDORSEMENT_EVIDENCE="double_endorsement_evidence",t.DOUBLE_BAKING_EVIDENCE="double_baking_evidence",t.ACTIVATE_ACCOUNT="activate_account",t.PROPOSALS="proposals",t.BALLOT="ballot",t.REVEAL="reveal",t.TRANSACTION="transaction",t.ORIGINATION="origination",t.DELEGATION="delegation"}(a||(a={})),function(t){t.WEBSITE="website",t.EXTENSION="extension",t.P2P="p2p"}(s||(s={})),function(t){t.BACKGROUND="toBackground",t.PAGE="toPage",t.EXTENSION="toExtension"}(u||(u={})),function(t){t.BROADCAST_ERROR="BROADCAST_ERROR",t.NETWORK_NOT_SUPPORTED="NETWORK_NOT_SUPPORTED",t.NO_ADDRESS_ERROR="NO_ADDRESS_ERROR",t.NO_PRIVATE_KEY_FOUND_ERROR="NO_PRIVATE_KEY_FOUND_ERROR",t.NOT_GRANTED_ERROR="NOT_GRANTED_ERROR",t.PARAMETERS_INVALID_ERROR="PARAMETERS_INVALID_ERROR",t.TOO_MANY_OPERATIONS="TOO_MANY_OPERATIONS",t.TRANSACTION_INVALID_ERROR="TRANSACTION_INVALID_ERROR",t.SIGNATURE_TYPE_NOT_SUPPORTED="SIGNATURE_TYPE_NOT_SUPPORTED",t.ABORTED_ERROR="ABORTED_ERROR",t.UNKNOWN_ERROR="UNKNOWN_ERROR"}(c||(c={})),function(t){t.NOT_CONNECTED="NOT_CONNECTED",t.CONNECTING="CONNECTING",t.CONNECTED="CONNECTED"}(l||(l={})),function(t){t.CHROME_MESSAGE="chrome_message",t.POST_MESSAGE="post_message",t.LEDGER="ledger",t.P2P="p2p"}(f||(f={}));!function(t){t.TRANSPORT_P2P_PEERS_DAPP="beacon:communication-peers-dapp",t.TRANSPORT_P2P_PEERS_WALLET="beacon:communication-peers-wallet",t.TRANSPORT_POSTMESSAGE_PEERS_DAPP="beacon:postmessage-peers-dapp",t.TRANSPORT_POSTMESSAGE_PEERS_WALLET="beacon:postmessage-peers-wallet",t.ACCOUNTS="beacon:accounts",t.ACTIVE_ACCOUNT="beacon:active-account",t.BEACON_SDK_SECRET_SEED="beacon:sdk-secret-seed",t.APP_METADATA_LIST="beacon:app-metadata-list",t.PERMISSION_LIST="beacon:permissions",t.BEACON_SDK_VERSION="beacon:sdk_version",t.MATRIX_PRESERVED_STATE="beacon:sdk-matrix-preserved-state",t.MATRIX_PEER_ROOM_IDS="beacon:matrix-peer-rooms",t.MATRIX_SELECTED_NODE="beacon:matrix-selected-node",t.MULTI_NODE_SETUP_DONE="beacon:multi-node-setup"}(h||(h={}));const d={[h.TRANSPORT_P2P_PEERS_DAPP]:[],[h.TRANSPORT_P2P_PEERS_WALLET]:[],[h.TRANSPORT_POSTMESSAGE_PEERS_DAPP]:[],[h.TRANSPORT_POSTMESSAGE_PEERS_WALLET]:[],[h.ACCOUNTS]:[],[h.ACTIVE_ACCOUNT]:void 0,[h.BEACON_SDK_SECRET_SEED]:void 0,[h.APP_METADATA_LIST]:[],[h.PERMISSION_LIST]:[],[h.BEACON_SDK_VERSION]:void 0,[h.MATRIX_PRESERVED_STATE]:{},[h.MATRIX_PEER_ROOM_IDS]:{},[h.MATRIX_SELECTED_NODE]:void 0,[h.MULTI_NODE_SETUP_DONE]:void 0};var p,g;!function(t){t.RAW="raw",t.OPERATION="operation",t.MICHELINE="micheline"}(p||(p={})),function(t){t.LIGHT="light",t.DARK="dark"}(g||(g={}))},function(t,e,r){"use strict";r.r(e),function(t){r.d(e,"Account",(function(){return We})),r.d(e,"Authorized",(function(){return mi})),r.d(e,"BLOCKHASH_CACHE_TIMEOUT_MS",(function(){return Ur})),r.d(e,"BPF_LOADER_DEPRECATED_PROGRAM_ID",(function(){return Je})),r.d(e,"BPF_LOADER_PROGRAM_ID",(function(){return Cr})),r.d(e,"BpfLoader",(function(){return kr})),r.d(e,"COMPUTE_BUDGET_INSTRUCTION_LAYOUTS",(function(){return Br})),r.d(e,"ComputeBudgetInstruction",(function(){return xr})),r.d(e,"ComputeBudgetProgram",(function(){return Or})),r.d(e,"Connection",(function(){return fi})),r.d(e,"Ed25519Program",(function(){return pi})),r.d(e,"Enum",(function(){return Fe})),r.d(e,"EpochSchedule",(function(){return Nr})),r.d(e,"FeeCalculatorLayout",(function(){return vr})),r.d(e,"Keypair",(function(){return hi})),r.d(e,"LAMPORTS_PER_SOL",(function(){return Hi})),r.d(e,"Loader",(function(){return Mr})),r.d(e,"Lockup",(function(){return yi})),r.d(e,"MAX_SEED_LENGTH",(function(){return Qe})),r.d(e,"Message",(function(){return er})),r.d(e,"NONCE_ACCOUNT_LENGTH",(function(){return wr})),r.d(e,"NonceAccount",(function(){return _r})),r.d(e,"PublicKey",(function(){return Ge})),r.d(e,"SOLANA_SCHEMA",(function(){return Ue})),r.d(e,"STAKE_CONFIG_ID",(function(){return gi})),r.d(e,"STAKE_INSTRUCTION_LAYOUTS",(function(){return vi})),r.d(e,"SYSTEM_INSTRUCTION_LAYOUTS",(function(){return Ir})),r.d(e,"SYSVAR_CLOCK_PUBKEY",(function(){return ar})),r.d(e,"SYSVAR_EPOCH_SCHEDULE_PUBKEY",(function(){return sr})),r.d(e,"SYSVAR_INSTRUCTIONS_PUBKEY",(function(){return ur})),r.d(e,"SYSVAR_RECENT_BLOCKHASHES_PUBKEY",(function(){return cr})),r.d(e,"SYSVAR_RENT_PUBKEY",(function(){return lr})),r.d(e,"SYSVAR_REWARDS_PUBKEY",(function(){return fr})),r.d(e,"SYSVAR_SLOT_HASHES_PUBKEY",(function(){return hr})),r.d(e,"SYSVAR_SLOT_HISTORY_PUBKEY",(function(){return dr})),r.d(e,"SYSVAR_STAKE_HISTORY_PUBKEY",(function(){return pr})),r.d(e,"Secp256k1Program",(function(){return Si})),r.d(e,"SendTransactionError",(function(){return jr})),r.d(e,"StakeAuthorizationLayout",(function(){return Ai})),r.d(e,"StakeInstruction",(function(){return bi})),r.d(e,"StakeProgram",(function(){return wi})),r.d(e,"Struct",(function(){return Le})),r.d(e,"SystemInstruction",(function(){return Er})),r.d(e,"SystemProgram",(function(){return Sr})),r.d(e,"Transaction",(function(){return or})),r.d(e,"TransactionInstruction",(function(){return ir})),r.d(e,"VALIDATOR_INFO_KEY",(function(){return Mi})),r.d(e,"VOTE_PROGRAM_ID",(function(){return xi})),r.d(e,"ValidatorInfo",(function(){return ki})),r.d(e,"VoteAccount",(function(){return Oi})),r.d(e,"VoteAuthorizationLayout",(function(){return Li})),r.d(e,"VoteInit",(function(){return Ni})),r.d(e,"VoteInstruction",(function(){return ji})),r.d(e,"VoteProgram",(function(){return Fi})),r.d(e,"clusterApiUrl",(function(){return Gi})),r.d(e,"sendAndConfirmRawTransaction",(function(){return Ui})),r.d(e,"sendAndConfirmTransaction",(function(){return gr}));var n=r(117),i=r.n(n),o=r(7),a=r(761),s=r.n(a),u=r(69),c=r.n(u),l=r(224),f=r(9),h=r(2),d=r(1374),p=r(738),g=r.n(p),m=r(183),y=r.n(m),b=r(112),v=r.n(b);const A=t=>o.Buffer.isBuffer(t)?t:t instanceof Uint8Array?o.Buffer.from(t.buffer,t.byteOffset,t.byteLength):o.Buffer.from(t);var w="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{};function _(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var E={},I={},S=M;function M(t,e){if(!t)throw new Error(e||"Assertion failed")}M.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)};var C={exports:{}};"function"===typeof Object.create?C.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:C.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}};var k=S,x=C.exports;function B(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function O(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function T(t){return 1===t.length?"0"+t:t}function R(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}I.inherits=x,I.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"===typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=63&o|128):B(t,i)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i>>0}return o},I.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},I.rotr32=function(t,e){return t>>>e|t<<32-e},I.rotl32=function(t,e){return t<>>32-e},I.sum32=function(t,e){return t+e>>>0},I.sum32_3=function(t,e,r){return t+e+r>>>0},I.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},I.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},I.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,a=(o>>0,t[e+1]=o},I.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},I.sum64_lo=function(t,e,r,n){return e+n>>>0},I.sum64_4_hi=function(t,e,r,n,i,o,a,s){var u=0,c=e;return u+=(c=c+n>>>0)>>0)>>0)>>0},I.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},I.sum64_5_hi=function(t,e,r,n,i,o,a,s,u,c){var l=0,f=e;return l+=(f=f+n>>>0)>>0)>>0)>>0)>>0},I.sum64_5_lo=function(t,e,r,n,i,o,a,s,u,c){return e+n+o+s+c>>>0},I.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},I.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},I.shr64_hi=function(t,e,r){return t>>>r},I.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0};var P={},N=I,j=S;function D(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}P.BlockHash=D,D.prototype.update=function(t,e){if(t=N.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=N.join32(t,0,t.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o>>3},F.g1_256=function(t){return U(t,17)^U(t,19)^t>>>10};var z=I,q=P,K=F,V=z.rotl32,W=z.sum32,J=z.sum32_5,Y=K.ft_1,X=q.BlockHash,Z=[1518500249,1859775393,2400959708,3395469782];function $(){if(!(this instanceof $))return new $;X.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}z.inherits($,X);var tt=$;$.blockSize=512,$.outSize=160,$.hmacStrength=80,$.padLength=64,$.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;nthis.blockSize&&(t=(new this.Hash).update(t).digest()),ve(t.length<=this.blockSize);for(var e=t.length;e{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var xe,Be;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(xe||(xe={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(Be||(Be={}));const Oe="0123456789abcdef";class Te{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==Se[r]&&this.throwArgumentError("invalid log level name","logLevel",t),Me>Se[r]||console.log.apply(console,e)}debug(){for(var t=arguments.length,e=new Array(t),r=0;r{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t>4],r+=Oe[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(a){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push("code=".concat(e)),n.push("version=".concat(this.version));const i=t;let o="";switch(e){case Be.NUMERIC_FAULT:{o="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":o+="-"+e;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break}case Be.CALL_EXCEPTION:case Be.INSUFFICIENT_FUNDS:case Be.MISSING_NEW:case Be.NONCE_EXPIRED:case Be.REPLACEMENT_UNDERPRICED:case Be.TRANSACTION_REPLACED:case Be.UNPREDICTABLE_GAS_LIMIT:o=e}o&&(t+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const a=new Error(t);return a.reason=i,a.code=e,Object.keys(r).forEach((function(t){a[t]=r[t]})),a}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,Te.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){ke&&this.throwError("platform missing String.prototype.normalize",Te.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ke})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,Te.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,Te.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",te&&this.throwError("too many arguments"+r,Te.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",Te.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",Te.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",Te.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return Ce||(Ce=new Te("logger/5.6.0")),Ce}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",Te.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Ee){if(!t)return;this.globalLogger().throwError("error censorship permanent",Te.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Ie=!!t,Ee=!!e}static setLogLevel(t){const e=Se[t.toLowerCase()];null!=e?Me=e:Te.globalLogger().warn("invalid log level - "+t)}static from(t){return new Te(t)}}Te.errors=Be,Te.levels=xe;const Re=new Te("bytes/5.6.0");function Pe(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Pe(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Ne(t){return"number"===typeof t&&t==t&&t%1===0}function je(t,e){if(e||(e={}),"number"===typeof t){Re.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),Pe(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),function(t){return!!t.toHexString}(t)&&(t=t.toHexString()),function(t,e){if("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))return!1;if(e&&t.length!==2+2*e)return!1;return!0}(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0x0"+r.substring(2):"right"===e.hexPad?r+="0":Re.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let t=0;t=256)return!1}return!0}(t)?Pe(new Uint8Array(t)):Re.throwArgumentError("invalid arrayify value","value",t)}function De(t){return"0x"+_e.sha256().update(je(t)).digest("hex")}new Te("sha2/5.6.0");class Le{constructor(t){Object.assign(this,t)}encode(){return o.Buffer.from(Object(l.serialize)(Ue,this))}static decode(t){return Object(l.deserialize)(Ue,this,t)}static decodeUnchecked(t){return Object(l.deserializeUnchecked)(Ue,this,t)}}class Fe extends Le{constructor(t){if(super(t),this.enum="",1!==Object.keys(t).length)throw new Error("Enum can only take single value");Object.keys(t).map((t=>{this.enum=t}))}}const Ue=new Map,Qe=32;class Ge extends Le{constructor(t){if(super({}),this._bn=void 0,function(t){return void 0!==t._bn}(t))this._bn=t._bn;else{if("string"===typeof t){const e=c.a.decode(t);if(32!=e.length)throw new Error("Invalid public key input");this._bn=new s.a(e)}else this._bn=new s.a(t);if(this._bn.byteLength()>32)throw new Error("Invalid public key input")}}equals(t){return this._bn.eq(t._bn)}toBase58(){return c.a.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){return this.toBuffer()}toBuffer(){const t=this._bn.toArrayLike(o.Buffer);if(32===t.length)return t;const e=o.Buffer.alloc(32);return t.copy(e,32-t.length),e}toString(){return this.toBase58()}static async createWithSeed(t,e,r){const n=o.Buffer.concat([t.toBuffer(),o.Buffer.from(e),r.toBuffer()]),i=De(new Uint8Array(n)).slice(2);return new Ge(o.Buffer.from(i,"hex"))}static createProgramAddressSync(t,e){let r=o.Buffer.alloc(0);t.forEach((function(t){if(t.length>Qe)throw new TypeError("Max seed length exceeded");r=o.Buffer.concat([r,A(t)])})),r=o.Buffer.concat([r,e.toBuffer(),o.Buffer.from("ProgramDerivedAddress")]);let n=De(new Uint8Array(r)).slice(2),i=new s.a(n,16).toArray(void 0,32);if(ze(i))throw new Error("Invalid seeds, address must fall off the curve");return new Ge(i)}static async createProgramAddress(t,e){return this.createProgramAddressSync(t,e)}static findProgramAddressSync(t,e){let r,n=255;for(;0!=n;){try{const i=t.concat(o.Buffer.from([n]));r=this.createProgramAddressSync(i,e)}catch(i){if(i instanceof TypeError)throw i;n--;continue}return[r,n]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(t,e){return this.findProgramAddressSync(t,e)}static isOnCurve(t){return 1==ze(new Ge(t).toBytes())}}Ge.default=new Ge("11111111111111111111111111111111"),Ue.set(Ge,{kind:"struct",fields:[["_bn","u256"]]});let He=i.a.lowlevel;function ze(t){var e=[He.gf(),He.gf(),He.gf(),He.gf()],r=He.gf(),n=He.gf(),i=He.gf(),o=He.gf(),a=He.gf(),s=He.gf(),u=He.gf();return He.set25519(e[2],qe),He.unpack25519(e[1],t),He.S(i,e[1]),He.M(o,i,He.D),He.Z(i,i,e[2]),He.A(o,e[2],o),He.S(a,o),He.S(s,a),He.M(u,s,a),He.M(r,u,i),He.M(r,r,o),He.pow2523(r,r),He.M(r,r,i),He.M(r,r,o),He.M(r,r,o),He.M(e[0],r,o),He.S(n,e[0]),He.M(n,n,o),Ve(n,i)&&He.M(e[0],e[0],Ke),He.S(n,e[0]),He.M(n,n,o),Ve(n,i)?0:1}let qe=He.gf([1]),Ke=He.gf([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function Ve(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return He.pack25519(r,t),He.pack25519(n,e),He.crypto_verify_32(r,0,n,0)}class We{constructor(t){this._keypair=void 0,this._keypair=t?i.a.sign.keyPair.fromSecretKey(A(t)):i.a.sign.keyPair()}get publicKey(){return new Ge(this._keypair.publicKey)}get secretKey(){return A(this._keypair.secretKey)}}const Je=new Ge("BPFLoader1111111111111111111111111111111111"),Ye=1232,Xe=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"publicKey";return f.blob(32,t)},Ze=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"string";const e=f.struct([f.u32("length"),f.u32("lengthPadding"),f.blob(f.offset(f.u32(),-8),"chars")],t),r=e.decode.bind(e),n=e.encode.bind(e),i=e;return i.decode=(t,e)=>r(t,e).chars.toString(),i.encode=(t,e,r)=>{const i={chars:o.Buffer.from(t,"utf8")};return n(i,e,r)},i.alloc=t=>f.u32().span+f.u32().span+o.Buffer.from(t,"utf8").length,i};function $e(t){let e=0,r=0;for(;;){let n=t.shift();if(e|=(127&n)<<7*r,r+=1,0===(128&n))break}return e}function tr(t,e){let r=e;for(;;){let e=127&r;if(r>>=7,0==r){t.push(e);break}e|=128,t.push(e)}}class er{constructor(t){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map((t=>new Ge(t))),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach((t=>this.indexToProgramIds.set(t.programIdIndex,this.accountKeys[t.programIdIndex])))}isAccountSigner(t){return t=this.header.numRequiredSignatures&&t!this.isProgramId(e)))}serialize(){const t=this.accountKeys.length;let e=[];tr(e,t);const r=this.instructions.map((t=>{const{accounts:e,programIdIndex:r}=t,n=Array.from(c.a.decode(t.data));let i=[];tr(i,e.length);let a=[];return tr(a,n.length),{programIdIndex:r,keyIndicesCount:o.Buffer.from(i),keyIndices:e,dataLength:o.Buffer.from(a),data:n}}));let n=[];tr(n,r.length);let i=o.Buffer.alloc(Ye);o.Buffer.from(n).copy(i);let a=n.length;r.forEach((t=>{const e=f.struct([f.u8("programIdIndex"),f.blob(t.keyIndicesCount.length,"keyIndicesCount"),f.seq(f.u8("keyIndex"),t.keyIndices.length,"keyIndices"),f.blob(t.dataLength.length,"dataLength"),f.seq(f.u8("userdatum"),t.data.length,"data")]).encode(t,i,a);a+=e})),i=i.slice(0,a);const s=f.struct([f.blob(1,"numRequiredSignatures"),f.blob(1,"numReadonlySignedAccounts"),f.blob(1,"numReadonlyUnsignedAccounts"),f.blob(e.length,"keyCount"),f.seq(Xe("key"),t,"keys"),Xe("recentBlockhash")]),u={numRequiredSignatures:o.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:o.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:o.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:o.Buffer.from(e),keys:this.accountKeys.map((t=>A(t.toBytes()))),recentBlockhash:c.a.decode(this.recentBlockhash)};let l=o.Buffer.alloc(2048);const h=s.encode(u,l);return i.copy(l,h),l.slice(0,h+i.length)}static from(t){let e=[...t];const r=e.shift(),n=e.shift(),i=e.shift(),a=$e(e);let s=[];for(let d=0;d{let{pubkey:e,isSigner:r,isWritable:n}=t;return{pubkey:e.toJSON(),isSigner:r,isWritable:n}})),programId:this.programId.toJSON(),data:[...this.data]}}}class or{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(t){this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.nonceInfo=void 0,this._message=void 0,this._json=void 0,t&&Object.assign(this,t)}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map((t=>t.toJSON())),signers:this.signatures.map((t=>{let{publicKey:e}=t;return e.toJSON()}))}}add(){for(var t=arguments.length,e=new Array(t),r=0;r{"instructions"in t?this.instructions=this.instructions.concat(t.instructions):"data"in t&&"programId"in t&&"keys"in t?this.instructions.push(t):this.instructions.push(new ir(t))})),this}compileMessage(){if(this._message){if(JSON.stringify(this.toJSON())!==JSON.stringify(this._json))throw new Error("Transaction message mutated after being populated from Message");return this._message}const{nonceInfo:t}=this;t&&this.instructions[0]!=t.nonceInstruction&&(this.recentBlockhash=t.nonce,this.instructions.unshift(t.nonceInstruction));const{recentBlockhash:e}=this;if(!e)throw new Error("Transaction recentBlockhash required");let r;if(this.instructions.length<1&&console.warn("No instructions provided"),this.feePayer)r=this.feePayer;else{if(!(this.signatures.length>0&&this.signatures[0].publicKey))throw new Error("Transaction fee payer required");r=this.signatures[0].publicKey}for(let c=0;c{t.keys.forEach((t=>{i.push({...t})}));const e=t.programId.toString();n.includes(e)||n.push(e)})),n.forEach((t=>{i.push({pubkey:new Ge(t),isSigner:!1,isWritable:!1})})),i.sort((function(t,e){const r=t.pubkey.toBase58().localeCompare(e.pubkey.toBase58()),n=t.isSigner===e.isSigner?0:t.isSigner?-1:1,i=t.isWritable===e.isWritable?r:t.isWritable?-1:1;return n||i}));const o=[];i.forEach((t=>{const e=t.pubkey.toString(),r=o.findIndex((t=>t.pubkey.toString()===e));r>-1?o[r].isWritable=o[r].isWritable||t.isWritable:o.push(t)}));const a=o.findIndex((t=>t.pubkey.equals(r)));if(a>-1){const[t]=o.splice(a,1);t.isSigner=!0,t.isWritable=!0,o.unshift(t)}else o.unshift({pubkey:r,isSigner:!0,isWritable:!0});for(const c of this.signatures){const t=o.findIndex((t=>t.pubkey.equals(c.publicKey)));if(!(t>-1))throw new Error("unknown signer: ".concat(c.publicKey.toString()));o[t].isSigner||(o[t].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."))}let s=0,u=0,l=0;const f=[],h=[];o.forEach((t=>{let{pubkey:e,isSigner:r,isWritable:n}=t;r?(f.push(e.toString()),s+=1,n||(u+=1)):(h.push(e.toString()),n||(l+=1))}));const d=f.concat(h),p=this.instructions.map((t=>{const{data:e,programId:r}=t;return{programIdIndex:d.indexOf(r.toString()),accounts:t.keys.map((t=>d.indexOf(t.pubkey.toString()))),data:c.a.encode(e)}}));return p.forEach((t=>{rr(t.programIdIndex>=0),t.accounts.forEach((t=>rr(t>=0)))})),new er({header:{numRequiredSignatures:s,numReadonlySignedAccounts:u,numReadonlyUnsignedAccounts:l},accountKeys:d,recentBlockhash:e,instructions:p})}_compile(){const t=this.compileMessage(),e=t.accountKeys.slice(0,t.header.numRequiredSignatures);if(this.signatures.length===e.length){if(this.signatures.every(((t,r)=>e[r].equals(t.publicKey))))return t}return this.signatures=e.map((t=>({signature:null,publicKey:t}))),t}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(t){return(await t.getFeeForMessage(this.compileMessage())).value}setSigners(){for(var t=arguments.length,e=new Array(t),r=0;r{const e=t.toString();return!n.has(e)&&(n.add(e),!0)})).map((t=>({signature:null,publicKey:t})))}sign(){for(var t=arguments.length,e=new Array(t),r=0;r({signature:null,publicKey:t.publicKey})));const o=this._compile();this._partialSign(o,...i),this._verifySignatures(o.serialize(),!0)}partialSign(){for(var t=arguments.length,e=new Array(t),r=0;r1?r-1:0),o=1;o{const r=i.a.sign.detached(e,t.secretKey);this._addSignature(t.publicKey,A(r))}))}addSignature(t,e){this._compile(),this._addSignature(t,e)}_addSignature(t,e){rr(64===e.length);const r=this.signatures.findIndex((e=>t.equals(e.publicKey)));if(r<0)throw new Error("unknown signer: ".concat(t.toString()));this.signatures[r].signature=o.Buffer.from(e)}verifySignatures(){return this._verifySignatures(this.serializeMessage(),!0)}_verifySignatures(t,e){for(const{signature:r,publicKey:n}of this.signatures)if(null===r){if(e)return!1}else if(!i.a.sign.detached.verify(t,r,n.toBuffer()))return!1;return!0}serialize(t){const{requireAllSignatures:e,verifySignatures:r}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},t),n=this.serializeMessage();if(r&&!this._verifySignatures(n,e))throw new Error("Signature verification failed");return this._serialize(n)}_serialize(t){const{signatures:e}=this,r=[];tr(r,e.length);const n=r.length+64*e.length+t.length,i=o.Buffer.alloc(n);return rr(e.length<256),o.Buffer.from(r).copy(i,0),e.forEach(((t,e)=>{let{signature:n}=t;null!==n&&(rr(64===n.length,"signature has invalid length"),o.Buffer.from(n).copy(i,r.length+64*e))})),t.copy(i,r.length+64*e.length),rr(i.length<=Ye,"Transaction too large: ".concat(i.length," > ").concat(Ye)),i}get keys(){return rr(1===this.instructions.length),this.instructions[0].keys.map((t=>t.pubkey))}get programId(){return rr(1===this.instructions.length),this.instructions[0].programId}get data(){return rr(1===this.instructions.length),this.instructions[0].data}static from(t){let e=[...t];const r=$e(e);let n=[];for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:[];const r=new or;return r.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(r.feePayer=t.accountKeys[0]),e.forEach(((e,n)=>{const i={signature:e==c.a.encode(nr)?null:c.a.decode(e),publicKey:t.accountKeys[n]};r.signatures.push(i)})),t.instructions.forEach((e=>{const n=e.accounts.map((e=>{const n=t.accountKeys[e];return{pubkey:n,isSigner:r.signatures.some((t=>t.publicKey.toString()===n.toString()))||t.isAccountSigner(e),isWritable:t.isAccountWritable(e)}}));r.instructions.push(new ir({keys:n,programId:t.accountKeys[e.programIdIndex],data:c.a.decode(e.data)}))})),r._message=t,r._json=r.toJSON(),r}}const ar=new Ge("SysvarC1ock11111111111111111111111111111111"),sr=new Ge("SysvarEpochSchedu1e111111111111111111111111"),ur=new Ge("Sysvar1nstructions1111111111111111111111111"),cr=new Ge("SysvarRecentB1ockHashes11111111111111111111"),lr=new Ge("SysvarRent111111111111111111111111111111111"),fr=new Ge("SysvarRewards111111111111111111111111111111"),hr=new Ge("SysvarS1otHashes111111111111111111111111111"),dr=new Ge("SysvarS1otHistory11111111111111111111111111"),pr=new Ge("SysvarStakeHistory1111111111111111111111111");async function gr(t,e,r,n){const i=n&&{skipPreflight:n.skipPreflight,preflightCommitment:n.preflightCommitment||n.commitment,maxRetries:n.maxRetries},o=await t.sendTransaction(e,r,i),a=(await t.confirmTransaction(o,n&&n.commitment)).value;if(a.err)throw new Error("Transaction ".concat(o," failed (").concat(JSON.stringify(a),")"));return o}function mr(t){return new Promise((e=>setTimeout(e,t)))}function yr(t,e){const r=t.layout.span>=0?t.layout.span:function(t,e){let r=0;return t.layout.fields.forEach((t=>{t.span>=0?r+=t.span:"function"===typeof t.alloc&&(r+=t.alloc(e[t.property]))})),r}(t,e),n=o.Buffer.alloc(r),i=Object.assign({instruction:t.index},e);return t.layout.encode(i,n),n}function br(t,e){let r;try{r=t.layout.decode(e)}catch(n){throw new Error("invalid instruction; "+n)}if(r.instruction!==t.index)throw new Error("invalid instruction; instruction index mismatch ".concat(r.instruction," != ").concat(t.index));return r}const vr=f.nu64("lamportsPerSignature"),Ar=f.struct([f.u32("version"),f.u32("state"),Xe("authorizedPubkey"),Xe("nonce"),f.struct([vr],"feeCalculator")]),wr=Ar.span;class _r{constructor(t){this.authorizedPubkey=void 0,this.nonce=void 0,this.feeCalculator=void 0,this.authorizedPubkey=t.authorizedPubkey,this.nonce=t.nonce,this.feeCalculator=t.feeCalculator}static fromAccountData(t){const e=Ar.decode(A(t),0);return new _r({authorizedPubkey:new Ge(e.authorizedPubkey),nonce:new Ge(e.nonce).toString(),feeCalculator:e.feeCalculator})}}class Er{constructor(){}static decodeInstructionType(t){this.checkProgramId(t.programId);const e=f.u32("instruction").decode(t.data);let r;for(const[n,i]of Object.entries(Ir))if(i.index==e){r=n;break}if(!r)throw new Error("Instruction type incorrect; not a SystemInstruction");return r}static decodeCreateAccount(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,2);const{lamports:e,space:r,programId:n}=br(Ir.Create,t.data);return{fromPubkey:t.keys[0].pubkey,newAccountPubkey:t.keys[1].pubkey,lamports:e,space:r,programId:new Ge(n)}}static decodeTransfer(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,2);const{lamports:e}=br(Ir.Transfer,t.data);return{fromPubkey:t.keys[0].pubkey,toPubkey:t.keys[1].pubkey,lamports:e}}static decodeTransferWithSeed(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3);const{lamports:e,seed:r,programId:n}=br(Ir.TransferWithSeed,t.data);return{fromPubkey:t.keys[0].pubkey,basePubkey:t.keys[1].pubkey,toPubkey:t.keys[2].pubkey,lamports:e,seed:r,programId:new Ge(n)}}static decodeAllocate(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,1);const{space:e}=br(Ir.Allocate,t.data);return{accountPubkey:t.keys[0].pubkey,space:e}}static decodeAllocateWithSeed(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,1);const{base:e,seed:r,space:n,programId:i}=br(Ir.AllocateWithSeed,t.data);return{accountPubkey:t.keys[0].pubkey,basePubkey:new Ge(e),seed:r,space:n,programId:new Ge(i)}}static decodeAssign(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,1);const{programId:e}=br(Ir.Assign,t.data);return{accountPubkey:t.keys[0].pubkey,programId:new Ge(e)}}static decodeAssignWithSeed(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,1);const{base:e,seed:r,programId:n}=br(Ir.AssignWithSeed,t.data);return{accountPubkey:t.keys[0].pubkey,basePubkey:new Ge(e),seed:r,programId:new Ge(n)}}static decodeCreateWithSeed(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,2);const{base:e,seed:r,lamports:n,space:i,programId:o}=br(Ir.CreateWithSeed,t.data);return{fromPubkey:t.keys[0].pubkey,newAccountPubkey:t.keys[1].pubkey,basePubkey:new Ge(e),seed:r,lamports:n,space:i,programId:new Ge(o)}}static decodeNonceInitialize(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3);const{authorized:e}=br(Ir.InitializeNonceAccount,t.data);return{noncePubkey:t.keys[0].pubkey,authorizedPubkey:new Ge(e)}}static decodeNonceAdvance(t){return this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3),br(Ir.AdvanceNonceAccount,t.data),{noncePubkey:t.keys[0].pubkey,authorizedPubkey:t.keys[2].pubkey}}static decodeNonceWithdraw(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,5);const{lamports:e}=br(Ir.WithdrawNonceAccount,t.data);return{noncePubkey:t.keys[0].pubkey,toPubkey:t.keys[1].pubkey,authorizedPubkey:t.keys[4].pubkey,lamports:e}}static decodeNonceAuthorize(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,2);const{authorized:e}=br(Ir.AuthorizeNonceAccount,t.data);return{noncePubkey:t.keys[0].pubkey,authorizedPubkey:t.keys[1].pubkey,newAuthorizedPubkey:new Ge(e)}}static checkProgramId(t){if(!t.equals(Sr.programId))throw new Error("invalid instruction; programId is not SystemProgram")}static checkKeyLength(t,e){if(t.length0?o:1,space:i.length,programId:n}));null!==s&&await gr(t,s,[e,r],{commitment:"confirmed"})}const a=f.struct([f.u32("instruction"),f.u32("offset"),f.u32("bytesLength"),f.u32("bytesLengthPadding"),f.seq(f.u8("byte"),f.offset(f.u32(),-8),"bytes")]),s=Mr.chunkSize;let u=0,c=i,l=[];for(;c.length>0;){const i=c.slice(0,s),f=o.Buffer.alloc(s+16);a.encode({instruction:0,offset:u,bytes:i,bytesLength:0,bytesLengthPadding:0},f);const h=(new or).add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0}],programId:n,data:f});if(l.push(gr(t,h,[e,r],{commitment:"confirmed"})),t._rpcEndpoint.includes("solana.com")){const t=4;await mr(1e3/t)}u+=s,c=c.slice(s)}await Promise.all(l);{const i=f.struct([f.u32("instruction")]),a=o.Buffer.alloc(i.span);i.encode({instruction:1},a);const s=(new or).add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0},{pubkey:lr,isSigner:!1,isWritable:!1}],programId:n,data:a});await gr(t,s,[e,r],{commitment:"confirmed"})}return!0}}Mr.chunkSize=932;const Cr=new Ge("BPFLoader2111111111111111111111111111111111");class kr{static getMinNumSignatures(t){return Mr.getMinNumSignatures(t)}static load(t,e,r,n,i){return Mr.load(t,e,r,i,n)}}class xr{constructor(){}static decodeInstructionType(t){this.checkProgramId(t.programId);const e=f.u8("instruction").decode(t.data);let r;for(const[n,i]of Object.entries(Br))if(i.index==e){r=n;break}if(!r)throw new Error("Instruction type incorrect; not a ComputeBudgetInstruction");return r}static decodeRequestUnits(t){this.checkProgramId(t.programId);const{units:e,additionalFee:r}=br(Br.RequestUnits,t.data);return{units:e,additionalFee:r}}static decodeRequestHeapFrame(t){this.checkProgramId(t.programId);const{bytes:e}=br(Br.RequestHeapFrame,t.data);return{bytes:e}}static checkProgramId(t){if(!t.equals(Or.programId))throw new Error("invalid instruction; programId is not ComputeBudgetProgram")}}const Br=Object.freeze({RequestUnits:{index:0,layout:f.struct([f.u8("instruction"),f.u32("units"),f.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:f.struct([f.u8("instruction"),f.u32("bytes")])}});class Or{constructor(){}static requestUnits(t){const e=yr(Br.RequestUnits,t);return new ir({keys:[],programId:this.programId,data:e})}static requestHeapFrame(t){const e=yr(Br.RequestHeapFrame,t);return new ir({keys:[],programId:this.programId,data:e})}}Or.programId=new Ge("ComputeBudget111111111111111111111111111111");var Tr={exports:{}};!function(t,e){var r="undefined"!==typeof self?self:w,n=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(r.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(t){return t&&n.indexOf(Object.prototype.toString.call(t))>-1};function o(t){if("string"!==typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!==typeof t&&(t=String(t)),t}function s(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r.iterable&&(e[Symbol.iterator]=function(){return e}),e}function u(t){this.map={},t instanceof u?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function l(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function f(t){var e=new FileReader,r=l(e);return e.readAsArrayBuffer(t),r}function h(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function d(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"===typeof t?this._bodyText=t:r.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:r.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():r.arrayBuffer&&r.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=h(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||i(t))?this._bodyArrayBuffer=h(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"===typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(f)}),this.text=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=l(e);return e.readAsText(t),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function m(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function y(t){var e=new u;return t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new u(e.headers),this.url=e.url||"",this._initBody(t)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},d.call(g.prototype),d.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var v=[301,302,303,307,308];b.redirect=function(t,e){if(-1===v.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(w){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function A(t,n){return new Promise((function(i,o){var a=new g(t,n);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var t={status:s.status,statusText:s.statusText,headers:y(s.getAllResponseHeaders()||"")};t.url="responseURL"in s?s.responseURL:t.headers.get("X-Request-URL");var e="response"in s?s.response:s.responseText;i(new b(e,t))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&r.blob&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send("undefined"===typeof a._bodyInit?null:a._bodyInit)}))}A.polyfill=!0,t.fetch||(t.fetch=A,t.Headers=u,t.Request=g,t.Response=b),e.Headers=u,e.Request=g,e.Response=b,e.fetch=A,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e}(Tr,Tr.exports);var Rr=_(Tr.exports);function Pr(t){let e=0;for(;t>1;)t/=2,e++;return e}class Nr{constructor(t,e,r,n,i){this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=t,this.leaderScheduleSlotOffset=e,this.warmup=r,this.firstNormalEpoch=n,this.firstNormalSlot=i}getEpoch(t){return this.getEpochAndSlotIndex(t)[0]}getEpochAndSlotIndex(t){if(t>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,1+(e|=e>>32)))-Pr(32)-1;return[r,t-(this.getSlotsInEpoch(r)-32)]}{const e=t-this.firstNormalSlot,r=Math.floor(e/this.slotsPerEpoch);return[this.firstNormalEpoch+r,e%this.slotsPerEpoch]}var e}getFirstSlotInEpoch(t){return t<=this.firstNormalEpoch?32*(Math.pow(2,t)-1):(t-this.firstNormalEpoch)*this.slotsPerEpoch+this.firstNormalSlot}getLastSlotInEpoch(t){return this.getFirstSlotInEpoch(t)+this.getSlotsInEpoch(t)-1}getSlotsInEpoch(t){return tnew Ge(t))),Lr=Object(h.n)([Object(h.m)(),Object(h.h)("base64")]),Fr=Object(h.e)(Object(h.g)(o.Buffer),Lr,(t=>o.Buffer.from(t[0],"base64"))),Ur=3e4;function Qr(t){return Object(h.p)([Object(h.o)({jsonrpc:Object(h.h)("2.0"),id:Object(h.m)(),result:t}),Object(h.o)({jsonrpc:Object(h.h)("2.0"),id:Object(h.m)(),error:Object(h.o)({code:Object(h.q)(),message:Object(h.m)(),data:Object(h.k)(Object(h.a)())})})])}const Gr=Qr(Object(h.q)());function Hr(t){return Object(h.e)(Qr(t),Gr,(e=>"error"in e?e:{...e,result:Object(h.f)(e.result,t)}))}function zr(t){return Hr(Object(h.o)({context:Object(h.o)({slot:Object(h.j)()}),value:t}))}function qr(t){return Object(h.o)({context:Object(h.o)({slot:Object(h.j)()}),value:t})}const Kr=Object(h.o)({foundation:Object(h.j)(),foundationTerm:Object(h.j)(),initial:Object(h.j)(),taper:Object(h.j)(),terminal:Object(h.j)()}),Vr=Hr(Object(h.b)(Object(h.i)(Object(h.o)({epoch:Object(h.j)(),effectiveSlot:Object(h.j)(),amount:Object(h.j)(),postBalance:Object(h.j)()})))),Wr=Object(h.o)({epoch:Object(h.j)(),slotIndex:Object(h.j)(),slotsInEpoch:Object(h.j)(),absoluteSlot:Object(h.j)(),blockHeight:Object(h.k)(Object(h.j)()),transactionCount:Object(h.k)(Object(h.j)())}),Jr=Object(h.o)({slotsPerEpoch:Object(h.j)(),leaderScheduleSlotOffset:Object(h.j)(),warmup:Object(h.d)(),firstNormalEpoch:Object(h.j)(),firstNormalSlot:Object(h.j)()}),Yr=Object(h.l)(Object(h.m)(),Object(h.b)(Object(h.j)())),Xr=Object(h.i)(Object(h.p)([Object(h.o)({}),Object(h.m)()])),Zr=Object(h.o)({err:Xr}),$r=Object(h.h)("receivedSignature"),tn=Object(h.o)({"solana-core":Object(h.m)(),"feature-set":Object(h.k)(Object(h.j)())}),en=zr(Object(h.o)({err:Object(h.i)(Object(h.p)([Object(h.o)({}),Object(h.m)()])),logs:Object(h.i)(Object(h.b)(Object(h.m)())),accounts:Object(h.k)(Object(h.i)(Object(h.b)(Object(h.i)(Object(h.o)({executable:Object(h.d)(),owner:Object(h.m)(),lamports:Object(h.j)(),data:Object(h.b)(Object(h.m)()),rentEpoch:Object(h.k)(Object(h.j)())}))))),unitsConsumed:Object(h.k)(Object(h.j)())})),rn=zr(Object(h.o)({byIdentity:Object(h.l)(Object(h.m)(),Object(h.b)(Object(h.j)())),range:Object(h.o)({firstSlot:Object(h.j)(),lastSlot:Object(h.j)()})}));const nn=Hr(Kr),on=Hr(Wr),an=Hr(Jr),sn=Hr(Yr),un=Hr(Object(h.j)()),cn=zr(Object(h.o)({total:Object(h.j)(),circulating:Object(h.j)(),nonCirculating:Object(h.j)(),nonCirculatingAccounts:Object(h.b)(Dr)})),ln=Object(h.o)({amount:Object(h.m)(),uiAmount:Object(h.i)(Object(h.j)()),decimals:Object(h.j)(),uiAmountString:Object(h.k)(Object(h.m)())}),fn=zr(Object(h.b)(Object(h.o)({address:Dr,amount:Object(h.m)(),uiAmount:Object(h.i)(Object(h.j)()),decimals:Object(h.j)(),uiAmountString:Object(h.k)(Object(h.m)())}))),hn=zr(Object(h.b)(Object(h.o)({pubkey:Dr,account:Object(h.o)({executable:Object(h.d)(),owner:Dr,lamports:Object(h.j)(),data:Fr,rentEpoch:Object(h.j)()})}))),dn=Object(h.o)({program:Object(h.m)(),parsed:Object(h.q)(),space:Object(h.j)()}),pn=zr(Object(h.b)(Object(h.o)({pubkey:Dr,account:Object(h.o)({executable:Object(h.d)(),owner:Dr,lamports:Object(h.j)(),data:dn,rentEpoch:Object(h.j)()})}))),gn=zr(Object(h.b)(Object(h.o)({lamports:Object(h.j)(),address:Dr}))),mn=Object(h.o)({executable:Object(h.d)(),owner:Dr,lamports:Object(h.j)(),data:Fr,rentEpoch:Object(h.j)()}),yn=Object(h.o)({pubkey:Dr,account:mn}),bn=Object(h.e)(Object(h.p)([Object(h.g)(o.Buffer),dn]),Object(h.p)([Lr,dn]),(t=>Array.isArray(t)?Object(h.f)(t,Fr):t)),vn=Object(h.o)({executable:Object(h.d)(),owner:Dr,lamports:Object(h.j)(),data:bn,rentEpoch:Object(h.j)()}),An=Object(h.o)({pubkey:Dr,account:vn}),wn=Object(h.o)({state:Object(h.p)([Object(h.h)("active"),Object(h.h)("inactive"),Object(h.h)("activating"),Object(h.h)("deactivating")]),active:Object(h.j)(),inactive:Object(h.j)()}),_n=Hr(Object(h.b)(Object(h.o)({signature:Object(h.m)(),slot:Object(h.j)(),err:Xr,memo:Object(h.i)(Object(h.m)()),blockTime:Object(h.k)(Object(h.i)(Object(h.j)()))}))),En=Hr(Object(h.b)(Object(h.o)({signature:Object(h.m)(),slot:Object(h.j)(),err:Xr,memo:Object(h.i)(Object(h.m)()),blockTime:Object(h.k)(Object(h.i)(Object(h.j)()))}))),In=Object(h.o)({subscription:Object(h.j)(),result:qr(mn)}),Sn=Object(h.o)({pubkey:Dr,account:mn}),Mn=Object(h.o)({subscription:Object(h.j)(),result:qr(Sn)}),Cn=Object(h.o)({parent:Object(h.j)(),slot:Object(h.j)(),root:Object(h.j)()}),kn=Object(h.o)({subscription:Object(h.j)(),result:Cn}),xn=Object(h.p)([Object(h.o)({type:Object(h.p)([Object(h.h)("firstShredReceived"),Object(h.h)("completed"),Object(h.h)("optimisticConfirmation"),Object(h.h)("root")]),slot:Object(h.j)(),timestamp:Object(h.j)()}),Object(h.o)({type:Object(h.h)("createdBank"),parent:Object(h.j)(),slot:Object(h.j)(),timestamp:Object(h.j)()}),Object(h.o)({type:Object(h.h)("frozen"),slot:Object(h.j)(),timestamp:Object(h.j)(),stats:Object(h.o)({numTransactionEntries:Object(h.j)(),numSuccessfulTransactions:Object(h.j)(),numFailedTransactions:Object(h.j)(),maxTransactionsPerEntry:Object(h.j)()})}),Object(h.o)({type:Object(h.h)("dead"),slot:Object(h.j)(),timestamp:Object(h.j)(),err:Object(h.m)()})]),Bn=Object(h.o)({subscription:Object(h.j)(),result:xn}),On=Object(h.o)({subscription:Object(h.j)(),result:qr(Object(h.p)([Zr,$r]))}),Tn=Object(h.o)({subscription:Object(h.j)(),result:Object(h.j)()}),Rn=Object(h.o)({pubkey:Object(h.m)(),gossip:Object(h.i)(Object(h.m)()),tpu:Object(h.i)(Object(h.m)()),rpc:Object(h.i)(Object(h.m)()),version:Object(h.i)(Object(h.m)())}),Pn=Object(h.o)({votePubkey:Object(h.m)(),nodePubkey:Object(h.m)(),activatedStake:Object(h.j)(),epochVoteAccount:Object(h.d)(),epochCredits:Object(h.b)(Object(h.n)([Object(h.j)(),Object(h.j)(),Object(h.j)()])),commission:Object(h.j)(),lastVote:Object(h.j)(),rootSlot:Object(h.i)(Object(h.j)())}),Nn=Hr(Object(h.o)({current:Object(h.b)(Pn),delinquent:Object(h.b)(Pn)})),jn=Object(h.p)([Object(h.h)("processed"),Object(h.h)("confirmed"),Object(h.h)("finalized")]),Dn=Object(h.o)({slot:Object(h.j)(),confirmations:Object(h.i)(Object(h.j)()),err:Xr,confirmationStatus:Object(h.k)(jn)}),Ln=zr(Object(h.b)(Object(h.i)(Dn))),Fn=Hr(Object(h.j)()),Un=Object(h.o)({signatures:Object(h.b)(Object(h.m)()),message:Object(h.o)({accountKeys:Object(h.b)(Object(h.m)()),header:Object(h.o)({numRequiredSignatures:Object(h.j)(),numReadonlySignedAccounts:Object(h.j)(),numReadonlyUnsignedAccounts:Object(h.j)()}),instructions:Object(h.b)(Object(h.o)({accounts:Object(h.b)(Object(h.j)()),data:Object(h.m)(),programIdIndex:Object(h.j)()})),recentBlockhash:Object(h.m)()})}),Qn=Object(h.o)({parsed:Object(h.q)(),program:Object(h.m)(),programId:Dr}),Gn=Object(h.o)({accounts:Object(h.b)(Dr),data:Object(h.m)(),programId:Dr}),Hn=Object(h.p)([Gn,Qn]),zn=Object(h.p)([Object(h.o)({parsed:Object(h.q)(),program:Object(h.m)(),programId:Object(h.m)()}),Object(h.o)({accounts:Object(h.b)(Object(h.m)()),data:Object(h.m)(),programId:Object(h.m)()})]),qn=Object(h.e)(Hn,zn,(t=>"accounts"in t?Object(h.f)(t,Gn):Object(h.f)(t,Qn))),Kn=Object(h.o)({signatures:Object(h.b)(Object(h.m)()),message:Object(h.o)({accountKeys:Object(h.b)(Object(h.o)({pubkey:Dr,signer:Object(h.d)(),writable:Object(h.d)()})),instructions:Object(h.b)(qn),recentBlockhash:Object(h.m)()})}),Vn=Object(h.o)({accountIndex:Object(h.j)(),mint:Object(h.m)(),owner:Object(h.k)(Object(h.m)()),uiTokenAmount:ln}),Wn=Object(h.o)({err:Xr,fee:Object(h.j)(),innerInstructions:Object(h.k)(Object(h.i)(Object(h.b)(Object(h.o)({index:Object(h.j)(),instructions:Object(h.b)(Object(h.o)({accounts:Object(h.b)(Object(h.j)()),data:Object(h.m)(),programIdIndex:Object(h.j)()}))})))),preBalances:Object(h.b)(Object(h.j)()),postBalances:Object(h.b)(Object(h.j)()),logMessages:Object(h.k)(Object(h.i)(Object(h.b)(Object(h.m)()))),preTokenBalances:Object(h.k)(Object(h.i)(Object(h.b)(Vn))),postTokenBalances:Object(h.k)(Object(h.i)(Object(h.b)(Vn)))}),Jn=Object(h.o)({err:Xr,fee:Object(h.j)(),innerInstructions:Object(h.k)(Object(h.i)(Object(h.b)(Object(h.o)({index:Object(h.j)(),instructions:Object(h.b)(qn)})))),preBalances:Object(h.b)(Object(h.j)()),postBalances:Object(h.b)(Object(h.j)()),logMessages:Object(h.k)(Object(h.i)(Object(h.b)(Object(h.m)()))),preTokenBalances:Object(h.k)(Object(h.i)(Object(h.b)(Vn))),postTokenBalances:Object(h.k)(Object(h.i)(Object(h.b)(Vn)))}),Yn=Hr(Object(h.i)(Object(h.o)({blockhash:Object(h.m)(),previousBlockhash:Object(h.m)(),parentSlot:Object(h.j)(),transactions:Object(h.b)(Object(h.o)({transaction:Un,meta:Object(h.i)(Wn)})),rewards:Object(h.k)(Object(h.b)(Object(h.o)({pubkey:Object(h.m)(),lamports:Object(h.j)(),postBalance:Object(h.i)(Object(h.j)()),rewardType:Object(h.i)(Object(h.m)())}))),blockTime:Object(h.i)(Object(h.j)()),blockHeight:Object(h.i)(Object(h.j)())}))),Xn=Hr(Object(h.i)(Object(h.o)({blockhash:Object(h.m)(),previousBlockhash:Object(h.m)(),parentSlot:Object(h.j)(),transactions:Object(h.b)(Object(h.o)({transaction:Un,meta:Object(h.i)(Wn)})),rewards:Object(h.k)(Object(h.b)(Object(h.o)({pubkey:Object(h.m)(),lamports:Object(h.j)(),postBalance:Object(h.i)(Object(h.j)()),rewardType:Object(h.i)(Object(h.m)())}))),blockTime:Object(h.i)(Object(h.j)())}))),Zn=Hr(Object(h.i)(Object(h.o)({blockhash:Object(h.m)(),previousBlockhash:Object(h.m)(),parentSlot:Object(h.j)(),signatures:Object(h.b)(Object(h.m)()),blockTime:Object(h.i)(Object(h.j)())}))),$n=Hr(Object(h.i)(Object(h.o)({slot:Object(h.j)(),meta:Wn,blockTime:Object(h.k)(Object(h.i)(Object(h.j)())),transaction:Un}))),ti=Hr(Object(h.i)(Object(h.o)({slot:Object(h.j)(),transaction:Kn,meta:Object(h.i)(Jn),blockTime:Object(h.k)(Object(h.i)(Object(h.j)()))}))),ei=zr(Object(h.o)({blockhash:Object(h.m)(),feeCalculator:Object(h.o)({lamportsPerSignature:Object(h.j)()})})),ri=zr(Object(h.o)({blockhash:Object(h.m)(),lastValidBlockHeight:Object(h.j)()})),ni=Object(h.o)({slot:Object(h.j)(),numTransactions:Object(h.j)(),numSlots:Object(h.j)(),samplePeriodSecs:Object(h.j)()}),ii=Hr(Object(h.b)(ni)),oi=zr(Object(h.i)(Object(h.o)({feeCalculator:Object(h.o)({lamportsPerSignature:Object(h.j)()})}))),ai=Hr(Object(h.m)()),si=Hr(Object(h.m)()),ui=Object(h.o)({err:Xr,logs:Object(h.b)(Object(h.m)()),signature:Object(h.m)()}),ci=Object(h.o)({result:qr(ui),subscription:Object(h.j)()});function li(t,e){return"Ignored unsubscribe request because an active subscription "+"with id `".concat(t,"` for '").concat(e,"' events could not be found.")}class fi{constructor(t,e){this._commitment=void 0,this._confirmTransactionInitialTimeout=void 0,this._rpcEndpoint=void 0,this._rpcWsEndpoint=void 0,this._rpcClient=void 0,this._rpcRequest=void 0,this._rpcBatchRequest=void 0,this._rpcWebSocket=void 0,this._rpcWebSocketConnected=!1,this._rpcWebSocketHeartbeat=null,this._rpcWebSocketIdleTimeout=null,this._disableBlockhashCaching=!1,this._pollingBlockhash=!1,this._blockhashInfo={recentBlockhash:null,lastFetch:0,transactionSignatures:[],simulatedSignatures:[]},this._accountChangeSubscriptionCounter=0,this._accountChangeSubscriptions={},this._programAccountChangeSubscriptionCounter=0,this._programAccountChangeSubscriptions={},this._rootSubscriptionCounter=0,this._rootSubscriptions={},this._signatureSubscriptionCounter=0,this._signatureSubscriptions={},this._slotSubscriptionCounter=0,this._slotSubscriptions={},this._logsSubscriptionCounter=0,this._logsSubscriptions={},this._slotUpdateSubscriptionCounter=0,this._slotUpdateSubscriptions={};let r=new URL(t);r.protocol;let n,i,o,a,s;var u;e&&"string"===typeof e?this._commitment=e:e&&(this._commitment=e.commitment,this._confirmTransactionInitialTimeout=e.confirmTransactionInitialTimeout,n=e.wsEndpoint,i=e.httpHeaders,o=e.fetch,a=e.fetchMiddleware,s=e.disableRetryOnRateLimit),this._rpcEndpoint=t,this._rpcWsEndpoint=n||function(t){let e=new URL(t);const r="https:"===e.protocol;return e.protocol=r?"wss:":"ws:",e.host="",""!==e.port&&(e.port=String(Number(e.port)+1)),e.toString()}(t),this._rpcClient=function(t,e,r,n,i,o){const a=n||Rr;let s;return i&&(s=async(t,e)=>{const r=await new Promise(((r,n)=>{try{i(t,e,((t,e)=>r([t,e])))}catch(o){n(o)}}));return await a(...r)}),new g.a((async(e,n)=>{const i={method:"POST",body:e,agent:void 0,headers:Object.assign({"Content-Type":"application/json"},r||{})};try{let e,r=5,u=500;for(;e=s?await s(t,i):await a(t,i),429===e.status&&!0!==o&&(r-=1,0!==r);)console.log("Server responded with ".concat(e.status," ").concat(e.statusText,". Retrying after ").concat(u,"ms delay...")),await mr(u),u*=2;const c=await e.text();e.ok?n(null,c):n(new Error("".concat(e.status," ").concat(e.statusText,": ").concat(c)))}catch(u){u instanceof Error&&n(u)}}),{})}(r.toString(),0,i,o,a,s),this._rpcRequest=(u=this._rpcClient,(t,e)=>new Promise(((r,n)=>{u.request(t,e,((t,e)=>{t?n(t):r(e)}))}))),this._rpcBatchRequest=function(t){return e=>new Promise(((r,n)=>{0===e.length&&r([]);const i=e.map((e=>t.request(e.methodName,e.args)));t.request(i,((t,e)=>{t?n(t):r(e)}))}))}(this._rpcClient),this._rpcWebSocket=new d.Client(this._rpcWsEndpoint,{autoconnect:!1,max_reconnects:1/0}),this._rpcWebSocket.on("open",this._wsOnOpen.bind(this)),this._rpcWebSocket.on("error",this._wsOnError.bind(this)),this._rpcWebSocket.on("close",this._wsOnClose.bind(this)),this._rpcWebSocket.on("accountNotification",this._wsOnAccountNotification.bind(this)),this._rpcWebSocket.on("programNotification",this._wsOnProgramAccountNotification.bind(this)),this._rpcWebSocket.on("slotNotification",this._wsOnSlotNotification.bind(this)),this._rpcWebSocket.on("slotsUpdatesNotification",this._wsOnSlotUpdatesNotification.bind(this)),this._rpcWebSocket.on("signatureNotification",this._wsOnSignatureNotification.bind(this)),this._rpcWebSocket.on("rootNotification",this._wsOnRootNotification.bind(this)),this._rpcWebSocket.on("logsNotification",this._wsOnLogsNotification.bind(this))}get commitment(){return this._commitment}get rpcEndpoint(){return this._rpcEndpoint}async getBalanceAndContext(t,e){const r=this._buildArgs([t.toBase58()],e),n=await this._rpcRequest("getBalance",r),i=Object(h.f)(n,zr(Object(h.j)()));if("error"in i)throw new Error("failed to get balance for "+t.toBase58()+": "+i.error.message);return i.result}async getBalance(t,e){return await this.getBalanceAndContext(t,e).then((t=>t.value)).catch((e=>{throw new Error("failed to get balance of account "+t.toBase58()+": "+e)}))}async getBlockTime(t){const e=await this._rpcRequest("getBlockTime",[t]),r=Object(h.f)(e,Hr(Object(h.i)(Object(h.j)())));if("error"in r)throw new Error("failed to get block time for slot "+t+": "+r.error.message);return r.result}async getMinimumLedgerSlot(){const t=await this._rpcRequest("minimumLedgerSlot",[]),e=Object(h.f)(t,Hr(Object(h.j)()));if("error"in e)throw new Error("failed to get minimum ledger slot: "+e.error.message);return e.result}async getFirstAvailableBlock(){const t=await this._rpcRequest("getFirstAvailableBlock",[]),e=Object(h.f)(t,un);if("error"in e)throw new Error("failed to get first available block: "+e.error.message);return e.result}async getSupply(t){let e={};e="string"===typeof t?{commitment:t}:t?{...t,commitment:t&&t.commitment||this.commitment}:{commitment:this.commitment};const r=await this._rpcRequest("getSupply",[e]),n=Object(h.f)(r,cn);if("error"in n)throw new Error("failed to get supply: "+n.error.message);return n.result}async getTokenSupply(t,e){const r=this._buildArgs([t.toBase58()],e),n=await this._rpcRequest("getTokenSupply",r),i=Object(h.f)(n,zr(ln));if("error"in i)throw new Error("failed to get token supply: "+i.error.message);return i.result}async getTokenAccountBalance(t,e){const r=this._buildArgs([t.toBase58()],e),n=await this._rpcRequest("getTokenAccountBalance",r),i=Object(h.f)(n,zr(ln));if("error"in i)throw new Error("failed to get token account balance: "+i.error.message);return i.result}async getTokenAccountsByOwner(t,e,r){let n=[t.toBase58()];"mint"in e?n.push({mint:e.mint.toBase58()}):n.push({programId:e.programId.toBase58()});const i=this._buildArgs(n,r,"base64"),o=await this._rpcRequest("getTokenAccountsByOwner",i),a=Object(h.f)(o,hn);if("error"in a)throw new Error("failed to get token accounts owned by account "+t.toBase58()+": "+a.error.message);return a.result}async getParsedTokenAccountsByOwner(t,e,r){let n=[t.toBase58()];"mint"in e?n.push({mint:e.mint.toBase58()}):n.push({programId:e.programId.toBase58()});const i=this._buildArgs(n,r,"jsonParsed"),o=await this._rpcRequest("getTokenAccountsByOwner",i),a=Object(h.f)(o,pn);if("error"in a)throw new Error("failed to get token accounts owned by account "+t.toBase58()+": "+a.error.message);return a.result}async getLargestAccounts(t){const e={...t,commitment:t&&t.commitment||this.commitment},r=e.filter||e.commitment?[e]:[],n=await this._rpcRequest("getLargestAccounts",r),i=Object(h.f)(n,gn);if("error"in i)throw new Error("failed to get largest accounts: "+i.error.message);return i.result}async getTokenLargestAccounts(t,e){const r=this._buildArgs([t.toBase58()],e),n=await this._rpcRequest("getTokenLargestAccounts",r),i=Object(h.f)(n,fn);if("error"in i)throw new Error("failed to get token largest accounts: "+i.error.message);return i.result}async getAccountInfoAndContext(t,e){const r=this._buildArgs([t.toBase58()],e,"base64"),n=await this._rpcRequest("getAccountInfo",r),i=Object(h.f)(n,zr(Object(h.i)(mn)));if("error"in i)throw new Error("failed to get info about account "+t.toBase58()+": "+i.error.message);return i.result}async getParsedAccountInfo(t,e){const r=this._buildArgs([t.toBase58()],e,"jsonParsed"),n=await this._rpcRequest("getAccountInfo",r),i=Object(h.f)(n,zr(Object(h.i)(vn)));if("error"in i)throw new Error("failed to get info about account "+t.toBase58()+": "+i.error.message);return i.result}async getAccountInfo(t,e){try{return(await this.getAccountInfoAndContext(t,e)).value}catch(r){throw new Error("failed to get info about account "+t.toBase58()+": "+r)}}async getMultipleAccountsInfoAndContext(t,e){const r=t.map((t=>t.toBase58())),n=this._buildArgs([r],e,"base64"),i=await this._rpcRequest("getMultipleAccounts",n),o=Object(h.f)(i,zr(Object(h.b)(Object(h.i)(mn))));if("error"in o)throw new Error("failed to get info for accounts "+r+": "+o.error.message);return o.result}async getMultipleAccountsInfo(t,e){return(await this.getMultipleAccountsInfoAndContext(t,e)).value}async getStakeActivation(t,e,r){const n=this._buildArgs([t.toBase58()],e,void 0,void 0!==r?{epoch:r}:void 0),i=await this._rpcRequest("getStakeActivation",n),o=Object(h.f)(i,Hr(wn));if("error"in o)throw new Error("failed to get Stake Activation ".concat(t.toBase58(),": ").concat(o.error.message));return o.result}async getProgramAccounts(t,e){const r={};let n,i;e&&("string"===typeof e?n=e:(n=e.commitment,i=e.encoding,e.dataSlice&&(r.dataSlice=e.dataSlice),e.filters&&(r.filters=e.filters)));const o=this._buildArgs([t.toBase58()],n,i||"base64",r),a=await this._rpcRequest("getProgramAccounts",o),s=Object(h.f)(a,Hr(Object(h.b)(yn)));if("error"in s)throw new Error("failed to get accounts owned by program "+t.toBase58()+": "+s.error.message);return s.result}async getParsedProgramAccounts(t,e){const r={};let n;e&&("string"===typeof e?n=e:(n=e.commitment,e.filters&&(r.filters=e.filters)));const i=this._buildArgs([t.toBase58()],n,"jsonParsed",r),o=await this._rpcRequest("getProgramAccounts",i),a=Object(h.f)(o,Hr(Object(h.b)(An)));if("error"in a)throw new Error("failed to get accounts owned by program "+t.toBase58()+": "+a.error.message);return a.result}async confirmTransaction(t,e){let r;try{r=c.a.decode(t)}catch(l){throw new Error("signature must be base58 encoded: "+t)}rr(64===r.length,"signature has invalid length");const n=Date.now(),i=e||this.commitment;let o,a=null;const s=new Promise(((e,r)=>{try{o=this.onSignature(t,((t,r)=>{o=void 0,a={context:r,value:t},e(null)}),i)}catch(l){r(l)}}));let u=this._confirmTransactionInitialTimeout||6e4;switch(i){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":u=this._confirmTransactionInitialTimeout||3e4}try{await function(t,e){let r;const n=new Promise((t=>{r=setTimeout((()=>t(null)),e)}));return Promise.race([t,n]).then((t=>(clearTimeout(r),t)))}(s,u)}finally{o&&this.removeSignatureListener(o)}if(null===a){const e=(Date.now()-n)/1e3;throw new Error("Transaction was not confirmed in ".concat(e.toFixed(2)," seconds. It is unknown if it succeeded or failed. Check signature ").concat(t," using the Solana Explorer or CLI tools."))}return a}async getClusterNodes(){const t=await this._rpcRequest("getClusterNodes",[]),e=Object(h.f)(t,Hr(Object(h.b)(Rn)));if("error"in e)throw new Error("failed to get cluster nodes: "+e.error.message);return e.result}async getVoteAccounts(t){const e=this._buildArgs([],t),r=await this._rpcRequest("getVoteAccounts",e),n=Object(h.f)(r,Nn);if("error"in n)throw new Error("failed to get vote accounts: "+n.error.message);return n.result}async getSlot(t){const e=this._buildArgs([],t),r=await this._rpcRequest("getSlot",e),n=Object(h.f)(r,Hr(Object(h.j)()));if("error"in n)throw new Error("failed to get slot: "+n.error.message);return n.result}async getSlotLeader(t){const e=this._buildArgs([],t),r=await this._rpcRequest("getSlotLeader",e),n=Object(h.f)(r,Hr(Object(h.m)()));if("error"in n)throw new Error("failed to get slot leader: "+n.error.message);return n.result}async getSlotLeaders(t,e){const r=[t,e],n=await this._rpcRequest("getSlotLeaders",r),i=Object(h.f)(n,Hr(Object(h.b)(Dr)));if("error"in i)throw new Error("failed to get slot leaders: "+i.error.message);return i.result}async getSignatureStatus(t,e){const{context:r,value:n}=await this.getSignatureStatuses([t],e);rr(1===n.length);return{context:r,value:n[0]}}async getSignatureStatuses(t,e){const r=[t];e&&r.push(e);const n=await this._rpcRequest("getSignatureStatuses",r),i=Object(h.f)(n,Ln);if("error"in i)throw new Error("failed to get signature status: "+i.error.message);return i.result}async getTransactionCount(t){const e=this._buildArgs([],t),r=await this._rpcRequest("getTransactionCount",e),n=Object(h.f)(r,Hr(Object(h.j)()));if("error"in n)throw new Error("failed to get transaction count: "+n.error.message);return n.result}async getTotalSupply(t){return(await this.getSupply({commitment:t,excludeNonCirculatingAccountsList:!0})).value.total}async getInflationGovernor(t){const e=this._buildArgs([],t),r=await this._rpcRequest("getInflationGovernor",e),n=Object(h.f)(r,nn);if("error"in n)throw new Error("failed to get inflation: "+n.error.message);return n.result}async getInflationReward(t,e,r){const n=this._buildArgs([t.map((t=>t.toBase58()))],r,void 0,{epoch:e}),i=await this._rpcRequest("getInflationReward",n),o=Object(h.f)(i,Vr);if("error"in o)throw new Error("failed to get inflation reward: "+o.error.message);return o.result}async getEpochInfo(t){const e=this._buildArgs([],t),r=await this._rpcRequest("getEpochInfo",e),n=Object(h.f)(r,on);if("error"in n)throw new Error("failed to get epoch info: "+n.error.message);return n.result}async getEpochSchedule(){const t=await this._rpcRequest("getEpochSchedule",[]),e=Object(h.f)(t,an);if("error"in e)throw new Error("failed to get epoch schedule: "+e.error.message);const r=e.result;return new Nr(r.slotsPerEpoch,r.leaderScheduleSlotOffset,r.warmup,r.firstNormalEpoch,r.firstNormalSlot)}async getLeaderSchedule(){const t=await this._rpcRequest("getLeaderSchedule",[]),e=Object(h.f)(t,sn);if("error"in e)throw new Error("failed to get leader schedule: "+e.error.message);return e.result}async getMinimumBalanceForRentExemption(t,e){const r=this._buildArgs([t],e),n=await this._rpcRequest("getMinimumBalanceForRentExemption",r),i=Object(h.f)(n,Fn);return"error"in i?(console.warn("Unable to fetch minimum balance for rent exemption"),0):i.result}async getRecentBlockhashAndContext(t){const e=this._buildArgs([],t),r=await this._rpcRequest("getRecentBlockhash",e),n=Object(h.f)(r,ei);if("error"in n)throw new Error("failed to get recent blockhash: "+n.error.message);return n.result}async getRecentPerformanceSamples(t){const e=this._buildArgs(t?[t]:[]),r=await this._rpcRequest("getRecentPerformanceSamples",e),n=Object(h.f)(r,ii);if("error"in n)throw new Error("failed to get recent performance samples: "+n.error.message);return n.result}async getFeeCalculatorForBlockhash(t,e){const r=this._buildArgs([t],e),n=await this._rpcRequest("getFeeCalculatorForBlockhash",r),i=Object(h.f)(n,oi);if("error"in i)throw new Error("failed to get fee calculator: "+i.error.message);const{context:o,value:a}=i.result;return{context:o,value:null!==a?a.feeCalculator:null}}async getFeeForMessage(t,e){const r=t.serialize().toString("base64"),n=this._buildArgs([r],e),i=await this._rpcRequest("getFeeForMessage",n),o=Object(h.f)(i,zr(Object(h.i)(Object(h.j)())));if("error"in o)throw new Error("failed to get slot: "+o.error.message);if(null===o.result)throw new Error("invalid blockhash");return o.result}async getRecentBlockhash(t){try{return(await this.getRecentBlockhashAndContext(t)).value}catch(e){throw new Error("failed to get recent blockhash: "+e)}}async getLatestBlockhash(t){try{return(await this.getLatestBlockhashAndContext(t)).value}catch(e){throw new Error("failed to get recent blockhash: "+e)}}async getLatestBlockhashAndContext(t){const e=this._buildArgs([],t),r=await this._rpcRequest("getLatestBlockhash",e),n=Object(h.f)(r,ri);if("error"in n)throw new Error("failed to get latest blockhash: "+n.error.message);return n.result}async getVersion(){const t=await this._rpcRequest("getVersion",[]),e=Object(h.f)(t,Hr(tn));if("error"in e)throw new Error("failed to get version: "+e.error.message);return e.result}async getGenesisHash(){const t=await this._rpcRequest("getGenesisHash",[]),e=Object(h.f)(t,Hr(Object(h.m)()));if("error"in e)throw new Error("failed to get genesis hash: "+e.error.message);return e.result}async getBlock(t,e){const r=this._buildArgsAtLeastConfirmed([t],e&&e.commitment),n=await this._rpcRequest("getBlock",r),i=Object(h.f)(n,Yn);if("error"in i)throw new Error("failed to get confirmed block: "+i.error.message);const o=i.result;return o?{...o,transactions:o.transactions.map((t=>{let{transaction:e,meta:r}=t;const n=new er(e.message);return{meta:r,transaction:{...e,message:n}}}))}:o}async getBlockHeight(t){const e=this._buildArgs([],t),r=await this._rpcRequest("getBlockHeight",e),n=Object(h.f)(r,Hr(Object(h.j)()));if("error"in n)throw new Error("failed to get block height information: "+n.error.message);return n.result}async getBlockProduction(t){let e,r;if("string"===typeof t)r=t;else if(t){const{commitment:n,...i}=t;r=n,e=i}const n=this._buildArgs([],r,"base64",e),i=await this._rpcRequest("getBlockProduction",n),o=Object(h.f)(i,rn);if("error"in o)throw new Error("failed to get block production information: "+o.error.message);return o.result}async getTransaction(t,e){const r=this._buildArgsAtLeastConfirmed([t],e&&e.commitment),n=await this._rpcRequest("getTransaction",r),i=Object(h.f)(n,$n);if("error"in i)throw new Error("failed to get transaction: "+i.error.message);const o=i.result;return o?{...o,transaction:{...o.transaction,message:new er(o.transaction.message)}}:o}async getParsedTransaction(t,e){const r=this._buildArgsAtLeastConfirmed([t],e,"jsonParsed"),n=await this._rpcRequest("getTransaction",r),i=Object(h.f)(n,ti);if("error"in i)throw new Error("failed to get transaction: "+i.error.message);return i.result}async getParsedTransactions(t,e){const r=t.map((t=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([t],e,"jsonParsed")})));return(await this._rpcBatchRequest(r)).map((t=>{const e=Object(h.f)(t,ti);if("error"in e)throw new Error("failed to get transactions: "+e.error.message);return e.result}))}async getTransactions(t,e){const r=t.map((t=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([t],e)})));return(await this._rpcBatchRequest(r)).map((t=>{const e=Object(h.f)(t,$n);if("error"in e)throw new Error("failed to get transactions: "+e.error.message);return e.result}))}async getConfirmedBlock(t,e){const r=this._buildArgsAtLeastConfirmed([t],e),n=await this._rpcRequest("getConfirmedBlock",r),i=Object(h.f)(n,Xn);if("error"in i)throw new Error("failed to get confirmed block: "+i.error.message);const o=i.result;if(!o)throw new Error("Confirmed block "+t+" not found");const a={...o,transactions:o.transactions.map((t=>{let{transaction:e,meta:r}=t;const n=new er(e.message);return{meta:r,transaction:{...e,message:n}}}))};return{...a,transactions:a.transactions.map((t=>{let{transaction:e,meta:r}=t;return{meta:r,transaction:or.populate(e.message,e.signatures)}}))}}async getBlocks(t,e,r){const n=this._buildArgsAtLeastConfirmed(void 0!==e?[t,e]:[t],r),i=await this._rpcRequest("getBlocks",n),o=Object(h.f)(i,Hr(Object(h.b)(Object(h.j)())));if("error"in o)throw new Error("failed to get blocks: "+o.error.message);return o.result}async getBlockSignatures(t,e){const r=this._buildArgsAtLeastConfirmed([t],e,void 0,{transactionDetails:"signatures",rewards:!1}),n=await this._rpcRequest("getBlock",r),i=Object(h.f)(n,Zn);if("error"in i)throw new Error("failed to get block: "+i.error.message);const o=i.result;if(!o)throw new Error("Block "+t+" not found");return o}async getConfirmedBlockSignatures(t,e){const r=this._buildArgsAtLeastConfirmed([t],e,void 0,{transactionDetails:"signatures",rewards:!1}),n=await this._rpcRequest("getConfirmedBlock",r),i=Object(h.f)(n,Zn);if("error"in i)throw new Error("failed to get confirmed block: "+i.error.message);const o=i.result;if(!o)throw new Error("Confirmed block "+t+" not found");return o}async getConfirmedTransaction(t,e){const r=this._buildArgsAtLeastConfirmed([t],e),n=await this._rpcRequest("getConfirmedTransaction",r),i=Object(h.f)(n,$n);if("error"in i)throw new Error("failed to get transaction: "+i.error.message);const o=i.result;if(!o)return o;const a=new er(o.transaction.message),s=o.transaction.signatures;return{...o,transaction:or.populate(a,s)}}async getParsedConfirmedTransaction(t,e){const r=this._buildArgsAtLeastConfirmed([t],e,"jsonParsed"),n=await this._rpcRequest("getConfirmedTransaction",r),i=Object(h.f)(n,ti);if("error"in i)throw new Error("failed to get confirmed transaction: "+i.error.message);return i.result}async getParsedConfirmedTransactions(t,e){const r=t.map((t=>({methodName:"getConfirmedTransaction",args:this._buildArgsAtLeastConfirmed([t],e,"jsonParsed")})));return(await this._rpcBatchRequest(r)).map((t=>{const e=Object(h.f)(t,ti);if("error"in e)throw new Error("failed to get confirmed transactions: "+e.error.message);return e.result}))}async getConfirmedSignaturesForAddress(t,e,r){let n={},i=await this.getFirstAvailableBlock();for(;!("until"in n)&&!(--e<=0||e0&&(n.until=t.signatures[t.signatures.length-1].toString())}catch(a){if(a instanceof Error&&a.message.includes("skipped"))continue;throw a}let o=await this.getSlot("finalized");for(;!("before"in n)&&!(++r>o);)try{const t=await this.getConfirmedBlockSignatures(r);t.signatures.length>0&&(n.before=t.signatures[t.signatures.length-1].toString())}catch(a){if(a instanceof Error&&a.message.includes("skipped"))continue;throw a}return(await this.getConfirmedSignaturesForAddress2(t,n)).map((t=>t.signature))}async getConfirmedSignaturesForAddress2(t,e,r){const n=this._buildArgsAtLeastConfirmed([t.toBase58()],r,void 0,e),i=await this._rpcRequest("getConfirmedSignaturesForAddress2",n),o=Object(h.f)(i,_n);if("error"in o)throw new Error("failed to get confirmed signatures for address: "+o.error.message);return o.result}async getSignaturesForAddress(t,e,r){const n=this._buildArgsAtLeastConfirmed([t.toBase58()],r,void 0,e),i=await this._rpcRequest("getSignaturesForAddress",n),o=Object(h.f)(i,En);if("error"in o)throw new Error("failed to get signatures for address: "+o.error.message);return o.result}async getNonceAndContext(t,e){const{context:r,value:n}=await this.getAccountInfoAndContext(t,e);let i=null;return null!==n&&(i=_r.fromAccountData(n.data)),{context:r,value:i}}async getNonce(t,e){return await this.getNonceAndContext(t,e).then((t=>t.value)).catch((e=>{throw new Error("failed to get nonce for account "+t.toBase58()+": "+e)}))}async requestAirdrop(t,e){const r=await this._rpcRequest("requestAirdrop",[t.toBase58(),e]),n=Object(h.f)(r,ai);if("error"in n)throw new Error("airdrop to "+t.toBase58()+" failed: "+n.error.message);return n.result}async _recentBlockhash(t){if(!t){for(;this._pollingBlockhash;)await mr(100);const t=Date.now()-this._blockhashInfo.lastFetch>=Ur;if(null!==this._blockhashInfo.recentBlockhash&&!t)return this._blockhashInfo.recentBlockhash}return await this._pollNewBlockhash()}async _pollNewBlockhash(){this._pollingBlockhash=!0;try{const t=Date.now();for(let e=0;e<50;e++){const{blockhash:t}=await this.getRecentBlockhash("finalized");if(this._blockhashInfo.recentBlockhash!=t)return this._blockhashInfo={recentBlockhash:t,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]},t;await mr(200)}throw new Error("Unable to obtain a new blockhash after ".concat(Date.now()-t,"ms"))}finally{this._pollingBlockhash=!1}}async simulateTransaction(t,e,r){let n;if(t instanceof or){let e=t;n=new or({recentBlockhash:e.recentBlockhash,nonceInfo:e.nonceInfo,feePayer:e.feePayer,signatures:[...e.signatures]}),n.instructions=t.instructions}else n=or.populate(t),n._message=n._json=void 0;if(n.nonceInfo&&e)n.sign(...e);else{let t=this._disableBlockhashCaching;for(;n.recentBlockhash=await this._recentBlockhash(t),e;){if(n.sign(...e),!n.signature)throw new Error("!signature");const r=n.signature.toString("base64");if(!this._blockhashInfo.simulatedSignatures.includes(r)&&!this._blockhashInfo.transactionSignatures.includes(r)){this._blockhashInfo.simulatedSignatures.push(r);break}t=!0}}const i=n._compile(),o=i.serialize(),a=n._serialize(o).toString("base64"),s={encoding:"base64",commitment:this.commitment};if(r){const t=(Array.isArray(r)?r:i.nonProgramIds()).map((t=>t.toBase58()));s.accounts={encoding:"base64",addresses:t}}e&&(s.sigVerify=!0);const u=[a,s],c=await this._rpcRequest("simulateTransaction",u),l=Object(h.f)(c,en);if("error"in l){let t;if("data"in l.error&&(t=l.error.data.logs,t&&Array.isArray(t))){const e="\n ",r=e+t.join(e);console.error(l.error.message,r)}throw new jr("failed to simulate transaction: "+l.error.message,t)}return l.result}async sendTransaction(t,e,r){if(t.nonceInfo)t.sign(...e);else{let r=this._disableBlockhashCaching;for(;;){if(t.recentBlockhash=await this._recentBlockhash(r),t.sign(...e),!t.signature)throw new Error("!signature");const n=t.signature.toString("base64");if(!this._blockhashInfo.transactionSignatures.includes(n)){this._blockhashInfo.transactionSignatures.push(n);break}r=!0}}const n=t.serialize();return await this.sendRawTransaction(n,r)}async sendRawTransaction(t,e){const r=A(t).toString("base64");return await this.sendEncodedTransaction(r,e)}async sendEncodedTransaction(t,e){const r={encoding:"base64"},n=e&&e.skipPreflight,i=e&&e.preflightCommitment||this.commitment;e&&e.maxRetries&&(r.maxRetries=e.maxRetries),n&&(r.skipPreflight=n),i&&(r.preflightCommitment=i);const o=[t,r],a=await this._rpcRequest("sendTransaction",o),s=Object(h.f)(a,si);if("error"in s){let t;throw"data"in s.error&&(t=s.error.data.logs),new jr("failed to send transaction: "+s.error.message,t)}return s.result}_wsOnOpen(){this._rpcWebSocketConnected=!0,this._rpcWebSocketHeartbeat=setInterval((()=>{this._rpcWebSocket.notify("ping").catch((()=>{}))}),5e3),this._updateSubscriptions()}_wsOnError(t){console.error("ws error:",t.message)}_wsOnClose(t){this._rpcWebSocketHeartbeat&&(clearInterval(this._rpcWebSocketHeartbeat),this._rpcWebSocketHeartbeat=null),1e3!==t?this._resetSubscriptions():this._updateSubscriptions()}async _subscribe(t,e,r){if(null==t.subscriptionId){t.subscriptionId="subscribing";try{const n=await this._rpcWebSocket.call(e,r);"number"===typeof n&&"subscribing"===t.subscriptionId&&(t.subscriptionId=n)}catch(n){"subscribing"===t.subscriptionId&&(t.subscriptionId=null),n instanceof Error&&console.error("".concat(e," error for argument"),r,n.message)}}}async _unsubscribe(t,e){const r=t.subscriptionId;if(null!=r&&"string"!=typeof r){const t=r;try{await this._rpcWebSocket.call(e,[t])}catch(n){n instanceof Error&&console.error("".concat(e," error:"),n.message)}}}_resetSubscriptions(){Object.values(this._accountChangeSubscriptions).forEach((t=>t.subscriptionId=null)),Object.values(this._logsSubscriptions).forEach((t=>t.subscriptionId=null)),Object.values(this._programAccountChangeSubscriptions).forEach((t=>t.subscriptionId=null)),Object.values(this._rootSubscriptions).forEach((t=>t.subscriptionId=null)),Object.values(this._signatureSubscriptions).forEach((t=>t.subscriptionId=null)),Object.values(this._slotSubscriptions).forEach((t=>t.subscriptionId=null)),Object.values(this._slotUpdateSubscriptions).forEach((t=>t.subscriptionId=null))}_updateSubscriptions(){const t=Object.keys(this._accountChangeSubscriptions).map(Number),e=Object.keys(this._programAccountChangeSubscriptions).map(Number),r=Object.keys(this._slotSubscriptions).map(Number),n=Object.keys(this._slotUpdateSubscriptions).map(Number),i=Object.keys(this._signatureSubscriptions).map(Number),o=Object.keys(this._rootSubscriptions).map(Number),a=Object.keys(this._logsSubscriptions).map(Number);if(0!==t.length||0!==e.length||0!==r.length||0!==n.length||0!==i.length||0!==o.length||0!==a.length)if(null!==this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketConnected=!0),this._rpcWebSocketConnected){for(let e of t){const t=this._accountChangeSubscriptions[e];this._subscribe(t,"accountSubscribe",this._buildArgs([t.publicKey],t.commitment,"base64"))}for(let t of e){const e=this._programAccountChangeSubscriptions[t];this._subscribe(e,"programSubscribe",this._buildArgs([e.programId],e.commitment,"base64",{filters:e.filters}))}for(let t of r){const e=this._slotSubscriptions[t];this._subscribe(e,"slotSubscribe",[])}for(let t of n){const e=this._slotUpdateSubscriptions[t];this._subscribe(e,"slotsUpdatesSubscribe",[])}for(let t of i){const e=this._signatureSubscriptions[t],r=[e.signature];e.options&&r.push(e.options),this._subscribe(e,"signatureSubscribe",r)}for(let t of o){const e=this._rootSubscriptions[t];this._subscribe(e,"rootSubscribe",[])}for(let t of a){const e=this._logsSubscriptions[t];let r;r="object"===typeof e.filter?{mentions:[e.filter.toString()]}:e.filter,this._subscribe(e,"logsSubscribe",this._buildArgs([r],e.commitment))}}else this._rpcWebSocket.connect();else this._rpcWebSocketConnected&&(this._rpcWebSocketConnected=!1,this._rpcWebSocketIdleTimeout=setTimeout((()=>{this._rpcWebSocketIdleTimeout=null;try{this._rpcWebSocket.close()}catch(t){t instanceof Error&&console.log("Error when closing socket connection: ".concat(t.message))}}),500))}_wsOnAccountNotification(t){const e=Object(h.f)(t,In);for(const r of Object.values(this._accountChangeSubscriptions))if(r.subscriptionId===e.subscription)return void r.callback(e.result.value,e.result.context)}onAccountChange(t,e,r){const n=++this._accountChangeSubscriptionCounter;return this._accountChangeSubscriptions[n]={publicKey:t.toBase58(),callback:e,commitment:r,subscriptionId:null},this._updateSubscriptions(),n}async removeAccountChangeListener(t){if(this._accountChangeSubscriptions[t]){const e=this._accountChangeSubscriptions[t];delete this._accountChangeSubscriptions[t],await this._unsubscribe(e,"accountUnsubscribe"),this._updateSubscriptions()}else console.warn(li(t,"account change"))}_wsOnProgramAccountNotification(t){const e=Object(h.f)(t,Mn);for(const r of Object.values(this._programAccountChangeSubscriptions))if(r.subscriptionId===e.subscription){const{value:t,context:n}=e.result;return void r.callback({accountId:t.pubkey,accountInfo:t.account},n)}}onProgramAccountChange(t,e,r,n){const i=++this._programAccountChangeSubscriptionCounter;return this._programAccountChangeSubscriptions[i]={programId:t.toBase58(),callback:e,commitment:r,subscriptionId:null,filters:n},this._updateSubscriptions(),i}async removeProgramAccountChangeListener(t){if(this._programAccountChangeSubscriptions[t]){const e=this._programAccountChangeSubscriptions[t];delete this._programAccountChangeSubscriptions[t],await this._unsubscribe(e,"programUnsubscribe"),this._updateSubscriptions()}else console.warn(li(t,"program account change"))}onLogs(t,e,r){const n=++this._logsSubscriptionCounter;return this._logsSubscriptions[n]={filter:t,callback:e,commitment:r,subscriptionId:null},this._updateSubscriptions(),n}async removeOnLogsListener(t){if(this._logsSubscriptions[t]){const e=this._logsSubscriptions[t];delete this._logsSubscriptions[t],await this._unsubscribe(e,"logsUnsubscribe"),this._updateSubscriptions()}else console.warn(li(t,"logs"))}_wsOnLogsNotification(t){const e=Object(h.f)(t,ci),r=Object.keys(this._logsSubscriptions).map(Number);for(let n of r){const t=this._logsSubscriptions[n];if(t.subscriptionId===e.subscription)return void t.callback(e.result.value,e.result.context)}}_wsOnSlotNotification(t){const e=Object(h.f)(t,kn);for(const r of Object.values(this._slotSubscriptions))if(r.subscriptionId===e.subscription)return void r.callback(e.result)}onSlotChange(t){const e=++this._slotSubscriptionCounter;return this._slotSubscriptions[e]={callback:t,subscriptionId:null},this._updateSubscriptions(),e}async removeSlotChangeListener(t){if(this._slotSubscriptions[t]){const e=this._slotSubscriptions[t];delete this._slotSubscriptions[t],await this._unsubscribe(e,"slotUnsubscribe"),this._updateSubscriptions()}else console.warn(li(t,"slot change"))}_wsOnSlotUpdatesNotification(t){const e=Object(h.f)(t,Bn);for(const r of Object.values(this._slotUpdateSubscriptions))if(r.subscriptionId===e.subscription)return void r.callback(e.result)}onSlotUpdate(t){const e=++this._slotUpdateSubscriptionCounter;return this._slotUpdateSubscriptions[e]={callback:t,subscriptionId:null},this._updateSubscriptions(),e}async removeSlotUpdateListener(t){if(this._slotUpdateSubscriptions[t]){const e=this._slotUpdateSubscriptions[t];delete this._slotUpdateSubscriptions[t],await this._unsubscribe(e,"slotsUpdatesUnsubscribe"),this._updateSubscriptions()}else console.warn(li(t,"slot update"))}_buildArgs(t,e,r,n){const i=e||this._commitment;if(i||r||n){let e={};r&&(e.encoding=r),i&&(e.commitment=i),n&&(e=Object.assign(e,n)),t.push(e)}return t}_buildArgsAtLeastConfirmed(t,e,r,n){const i=e||this._commitment;if(i&&!["confirmed","finalized"].includes(i))throw new Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`");return this._buildArgs(t,e,r,n)}_wsOnSignatureNotification(t){const e=Object(h.f)(t,On);for(const[r,n]of Object.entries(this._signatureSubscriptions))if(n.subscriptionId===e.subscription)return void("receivedSignature"===e.result.value?n.callback({type:"received"},e.result.context):(delete this._signatureSubscriptions[Number(r)],this._updateSubscriptions(),n.callback({type:"status",result:e.result.value},e.result.context)))}onSignature(t,e,r){const n=++this._signatureSubscriptionCounter;return this._signatureSubscriptions[n]={signature:t,callback:(t,r)=>{"status"===t.type&&e(t.result,r)},options:{commitment:r},subscriptionId:null},this._updateSubscriptions(),n}onSignatureWithOptions(t,e,r){const n=++this._signatureSubscriptionCounter;return this._signatureSubscriptions[n]={signature:t,callback:e,options:r,subscriptionId:null},this._updateSubscriptions(),n}async removeSignatureListener(t){if(this._signatureSubscriptions[t]){const e=this._signatureSubscriptions[t];delete this._signatureSubscriptions[t],await this._unsubscribe(e,"signatureUnsubscribe"),this._updateSubscriptions()}else console.warn(li(t,"signature result"))}_wsOnRootNotification(t){const e=Object(h.f)(t,Tn);for(const r of Object.values(this._rootSubscriptions))if(r.subscriptionId===e.subscription)return void r.callback(e.result)}onRootChange(t){const e=++this._rootSubscriptionCounter;return this._rootSubscriptions[e]={callback:t,subscriptionId:null},this._updateSubscriptions(),e}async removeRootChangeListener(t){if(this._rootSubscriptions[t]){const e=this._rootSubscriptions[t];delete this._rootSubscriptions[t],await this._unsubscribe(e,"rootUnsubscribe"),this._updateSubscriptions()}else console.warn(li(t,"root change"))}}class hi{constructor(t){this._keypair=void 0,this._keypair=t||i.a.sign.keyPair()}static generate(){return new hi(i.a.sign.keyPair())}static fromSecretKey(t,e){const r=i.a.sign.keyPair.fromSecretKey(t);if(!e||!e.skipValidation){const t=(new TextEncoder).encode("@solana/web3.js-validation-v1"),e=i.a.sign.detached(t,r.secretKey);if(!i.a.sign.detached.verify(t,e,r.publicKey))throw new Error("provided secretKey is invalid")}return new hi(r)}static fromSeed(t){return new hi(i.a.sign.keyPair.fromSeed(t))}get publicKey(){return new Ge(this._keypair.publicKey)}get secretKey(){return this._keypair.secretKey}}const di=f.struct([f.u8("numSignatures"),f.u8("padding"),f.u16("signatureOffset"),f.u16("signatureInstructionIndex"),f.u16("publicKeyOffset"),f.u16("publicKeyInstructionIndex"),f.u16("messageDataOffset"),f.u16("messageDataSize"),f.u16("messageInstructionIndex")]);class pi{constructor(){}static createInstructionWithPublicKey(t){const{publicKey:e,message:r,signature:n,instructionIndex:i}=t;rr(32===e.length,"Public Key must be ".concat(32," bytes but received ").concat(e.length," bytes")),rr(64===n.length,"Signature must be ".concat(64," bytes but received ").concat(n.length," bytes"));const a=di.span,s=a+e.length,u=s+n.length,c=o.Buffer.alloc(u+r.length),l=null==i?65535:i;return di.encode({numSignatures:1,padding:0,signatureOffset:s,signatureInstructionIndex:l,publicKeyOffset:a,publicKeyInstructionIndex:l,messageDataOffset:u,messageDataSize:r.length,messageInstructionIndex:l},c),c.fill(e,a),c.fill(n,s),c.fill(r,u),new ir({keys:[],programId:pi.programId,data:c})}static createInstructionWithPrivateKey(t){const{privateKey:e,message:r,instructionIndex:n}=t;rr(64===e.length,"Private key must be ".concat(64," bytes but received ").concat(e.length," bytes"));try{const t=hi.fromSecretKey(e),o=t.publicKey.toBytes(),a=i.a.sign.detached(r,t.secretKey);return this.createInstructionWithPublicKey({publicKey:o,message:r,signature:a,instructionIndex:n})}catch(o){throw new Error("Error creating instruction; ".concat(o))}}}pi.programId=new Ge("Ed25519SigVerify111111111111111111111111111");const gi=new Ge("StakeConfig11111111111111111111111111111111");class mi{constructor(t,e){this.staker=void 0,this.withdrawer=void 0,this.staker=t,this.withdrawer=e}}class yi{constructor(t,e,r){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=e,this.custodian=r}}yi.default=new yi(0,0,Ge.default);class bi{constructor(){}static decodeInstructionType(t){this.checkProgramId(t.programId);const e=f.u32("instruction").decode(t.data);let r;for(const[n,i]of Object.entries(vi))if(i.index==e){r=n;break}if(!r)throw new Error("Instruction type incorrect; not a StakeInstruction");return r}static decodeInitialize(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,2);const{authorized:e,lockup:r}=br(vi.Initialize,t.data);return{stakePubkey:t.keys[0].pubkey,authorized:new mi(new Ge(e.staker),new Ge(e.withdrawer)),lockup:new yi(r.unixTimestamp,r.epoch,new Ge(r.custodian))}}static decodeDelegate(t){return this.checkProgramId(t.programId),this.checkKeyLength(t.keys,6),br(vi.Delegate,t.data),{stakePubkey:t.keys[0].pubkey,votePubkey:t.keys[1].pubkey,authorizedPubkey:t.keys[5].pubkey}}static decodeAuthorize(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3);const{newAuthorized:e,stakeAuthorizationType:r}=br(vi.Authorize,t.data),n={stakePubkey:t.keys[0].pubkey,authorizedPubkey:t.keys[2].pubkey,newAuthorizedPubkey:new Ge(e),stakeAuthorizationType:{index:r}};return t.keys.length>3&&(n.custodianPubkey=t.keys[3].pubkey),n}static decodeAuthorizeWithSeed(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,2);const{newAuthorized:e,stakeAuthorizationType:r,authoritySeed:n,authorityOwner:i}=br(vi.AuthorizeWithSeed,t.data),o={stakePubkey:t.keys[0].pubkey,authorityBase:t.keys[1].pubkey,authoritySeed:n,authorityOwner:new Ge(i),newAuthorizedPubkey:new Ge(e),stakeAuthorizationType:{index:r}};return t.keys.length>3&&(o.custodianPubkey=t.keys[3].pubkey),o}static decodeSplit(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3);const{lamports:e}=br(vi.Split,t.data);return{stakePubkey:t.keys[0].pubkey,splitStakePubkey:t.keys[1].pubkey,authorizedPubkey:t.keys[2].pubkey,lamports:e}}static decodeMerge(t){return this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3),br(vi.Merge,t.data),{stakePubkey:t.keys[0].pubkey,sourceStakePubKey:t.keys[1].pubkey,authorizedPubkey:t.keys[4].pubkey}}static decodeWithdraw(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,5);const{lamports:e}=br(vi.Withdraw,t.data),r={stakePubkey:t.keys[0].pubkey,toPubkey:t.keys[1].pubkey,authorizedPubkey:t.keys[4].pubkey,lamports:e};return t.keys.length>5&&(r.custodianPubkey=t.keys[5].pubkey),r}static decodeDeactivate(t){return this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3),br(vi.Deactivate,t.data),{stakePubkey:t.keys[0].pubkey,authorizedPubkey:t.keys[2].pubkey}}static checkProgramId(t){if(!t.equals(wi.programId))throw new Error("invalid instruction; programId is not StakeProgram")}static checkKeyLength(t,e){if(t.length0&&void 0!==arguments[0]?arguments[0]:"authorized";return f.struct([Xe("staker"),Xe("withdrawer")],t)}(),function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lockup";return f.struct([f.ns64("unixTimestamp"),f.ns64("epoch"),Xe("custodian")],t)}()])},Authorize:{index:1,layout:f.struct([f.u32("instruction"),Xe("newAuthorized"),f.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:f.struct([f.u32("instruction")])},Split:{index:3,layout:f.struct([f.u32("instruction"),f.ns64("lamports")])},Withdraw:{index:4,layout:f.struct([f.u32("instruction"),f.ns64("lamports")])},Deactivate:{index:5,layout:f.struct([f.u32("instruction")])},Merge:{index:7,layout:f.struct([f.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:f.struct([f.u32("instruction"),Xe("newAuthorized"),f.u32("stakeAuthorizationType"),Ze("authoritySeed"),Xe("authorityOwner")])}}),Ai=Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class wi{constructor(){}static initialize(t){const{stakePubkey:e,authorized:r,lockup:n}=t,i=n||yi.default,o=yr(vi.Initialize,{authorized:{staker:A(r.staker.toBuffer()),withdrawer:A(r.withdrawer.toBuffer())},lockup:{unixTimestamp:i.unixTimestamp,epoch:i.epoch,custodian:A(i.custodian.toBuffer())}}),a={keys:[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:lr,isSigner:!1,isWritable:!1}],programId:this.programId,data:o};return new ir(a)}static createAccountWithSeed(t){const e=new or;e.add(Sr.createAccountWithSeed({fromPubkey:t.fromPubkey,newAccountPubkey:t.stakePubkey,basePubkey:t.basePubkey,seed:t.seed,lamports:t.lamports,space:this.space,programId:this.programId}));const{stakePubkey:r,authorized:n,lockup:i}=t;return e.add(this.initialize({stakePubkey:r,authorized:n,lockup:i}))}static createAccount(t){const e=new or;e.add(Sr.createAccount({fromPubkey:t.fromPubkey,newAccountPubkey:t.stakePubkey,lamports:t.lamports,space:this.space,programId:this.programId}));const{stakePubkey:r,authorized:n,lockup:i}=t;return e.add(this.initialize({stakePubkey:r,authorized:n,lockup:i}))}static delegate(t){const{stakePubkey:e,authorizedPubkey:r,votePubkey:n}=t,i=yr(vi.Delegate);return(new or).add({keys:[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:ar,isSigner:!1,isWritable:!1},{pubkey:pr,isSigner:!1,isWritable:!1},{pubkey:gi,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static authorize(t){const{stakePubkey:e,authorizedPubkey:r,newAuthorizedPubkey:n,stakeAuthorizationType:i,custodianPubkey:o}=t,a=yr(vi.Authorize,{newAuthorized:A(n.toBuffer()),stakeAuthorizationType:i.index}),s=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:ar,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&s.push({pubkey:o,isSigner:!1,isWritable:!1}),(new or).add({keys:s,programId:this.programId,data:a})}static authorizeWithSeed(t){const{stakePubkey:e,authorityBase:r,authoritySeed:n,authorityOwner:i,newAuthorizedPubkey:o,stakeAuthorizationType:a,custodianPubkey:s}=t,u=yr(vi.AuthorizeWithSeed,{newAuthorized:A(o.toBuffer()),stakeAuthorizationType:a.index,authoritySeed:n,authorityOwner:A(i.toBuffer())}),c=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:ar,isSigner:!1,isWritable:!1}];return s&&c.push({pubkey:s,isSigner:!1,isWritable:!1}),(new or).add({keys:c,programId:this.programId,data:u})}static splitInstruction(t){const{stakePubkey:e,authorizedPubkey:r,splitStakePubkey:n,lamports:i}=t,o=yr(vi.Split,{lamports:i});return new ir({keys:[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static split(t){const e=new or;return e.add(Sr.createAccount({fromPubkey:t.authorizedPubkey,newAccountPubkey:t.splitStakePubkey,lamports:0,space:this.space,programId:this.programId})),e.add(this.splitInstruction(t))}static splitWithSeed(t){const{stakePubkey:e,authorizedPubkey:r,splitStakePubkey:n,basePubkey:i,seed:o,lamports:a}=t,s=new or;return s.add(Sr.allocate({accountPubkey:n,basePubkey:i,seed:o,space:this.space,programId:this.programId})),s.add(this.splitInstruction({stakePubkey:e,authorizedPubkey:r,splitStakePubkey:n,lamports:a}))}static merge(t){const{stakePubkey:e,sourceStakePubKey:r,authorizedPubkey:n}=t,i=yr(vi.Merge);return(new or).add({keys:[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:ar,isSigner:!1,isWritable:!1},{pubkey:pr,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static withdraw(t){const{stakePubkey:e,authorizedPubkey:r,toPubkey:n,lamports:i,custodianPubkey:o}=t,a=yr(vi.Withdraw,{lamports:i}),s=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:ar,isSigner:!1,isWritable:!1},{pubkey:pr,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&s.push({pubkey:o,isSigner:!1,isWritable:!1}),(new or).add({keys:s,programId:this.programId,data:a})}static deactivate(t){const{stakePubkey:e,authorizedPubkey:r}=t,n=yr(vi.Deactivate);return(new or).add({keys:[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:ar,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:n})}}wi.programId=new Ge("Stake11111111111111111111111111111111111111"),wi.space=200;const{publicKeyCreate:_i,ecdsaSign:Ei}=y.a,Ii=f.struct([f.u8("numSignatures"),f.u16("signatureOffset"),f.u8("signatureInstructionIndex"),f.u16("ethAddressOffset"),f.u8("ethAddressInstructionIndex"),f.u16("messageDataOffset"),f.u16("messageDataSize"),f.u8("messageInstructionIndex"),f.blob(20,"ethAddress"),f.blob(64,"signature"),f.u8("recoveryId")]);class Si{constructor(){}static publicKeyToEthAddress(t){rr(64===t.length,"Public key must be ".concat(64," bytes but received ").concat(t.length," bytes"));try{return o.Buffer.from(v.a.keccak_256.update(A(t)).digest()).slice(-20)}catch(e){throw new Error("Error constructing Ethereum address: ".concat(e))}}static createInstructionWithPublicKey(t){const{publicKey:e,message:r,signature:n,recoveryId:i,instructionIndex:o}=t;return Si.createInstructionWithEthAddress({ethAddress:Si.publicKeyToEthAddress(e),message:r,signature:n,recoveryId:i,instructionIndex:o})}static createInstructionWithEthAddress(t){const{ethAddress:e,message:r,signature:n,recoveryId:i,instructionIndex:a=0}=t;let s;s="string"===typeof e?e.startsWith("0x")?o.Buffer.from(e.substr(2),"hex"):o.Buffer.from(e,"hex"):e,rr(20===s.length,"Address must be ".concat(20," bytes but received ").concat(s.length," bytes"));const u=12+s.length,c=u+n.length+1,l=o.Buffer.alloc(Ii.span+r.length);return Ii.encode({numSignatures:1,signatureOffset:u,signatureInstructionIndex:a,ethAddressOffset:12,ethAddressInstructionIndex:a,messageDataOffset:c,messageDataSize:r.length,messageInstructionIndex:a,signature:A(n),ethAddress:A(s),recoveryId:i},l),l.fill(A(r),Ii.span),new ir({keys:[],programId:Si.programId,data:l})}static createInstructionWithPrivateKey(t){const{privateKey:e,message:r,instructionIndex:n}=t;rr(32===e.length,"Private key must be ".concat(32," bytes but received ").concat(e.length," bytes"));try{const t=A(e),i=_i(t,!1).slice(1),a=o.Buffer.from(v.a.keccak_256.update(A(r)).digest()),{signature:s,recid:u}=Ei(a,t);return this.createInstructionWithPublicKey({publicKey:i,message:r,signature:s,recoveryId:u,instructionIndex:n})}catch(i){throw new Error("Error creating instruction; ".concat(i))}}}Si.programId=new Ge("KeccakSecp256k11111111111111111111111111111");const Mi=new Ge("Va1idator1nfo111111111111111111111111111111"),Ci=Object(h.o)({name:Object(h.m)(),website:Object(h.k)(Object(h.m)()),details:Object(h.k)(Object(h.m)()),keybaseUsername:Object(h.k)(Object(h.m)())});class ki{constructor(t,e){this.key=void 0,this.info=void 0,this.key=t,this.info=e}static fromConfigData(t){let e=[...t];if(2!==$e(e))return null;const r=[];for(let n=0;n<2;n++){const t=new Ge(e.slice(0,32));e=e.slice(32);const n=1===e.slice(0,1)[0];e=e.slice(1),r.push({publicKey:t,isSigner:n})}if(r[0].publicKey.equals(Mi)&&r[1].isSigner){const t=Ze().decode(o.Buffer.from(e)),n=JSON.parse(t);return Object(h.c)(n,Ci),new ki(r[1].publicKey,n)}return null}}const xi=new Ge("Vote111111111111111111111111111111111111111"),Bi=f.struct([Xe("nodePubkey"),Xe("authorizedWithdrawer"),f.u8("commission"),f.nu64(),f.seq(f.struct([f.nu64("slot"),f.u32("confirmationCount")]),f.offset(f.u32(),-8),"votes"),f.u8("rootSlotValid"),f.nu64("rootSlot"),f.nu64(),f.seq(f.struct([f.nu64("epoch"),Xe("authorizedVoter")]),f.offset(f.u32(),-8),"authorizedVoters"),f.struct([f.seq(f.struct([Xe("authorizedPubkey"),f.nu64("epochOfLastAuthorizedSwitch"),f.nu64("targetEpoch")]),32,"buf"),f.nu64("idx"),f.u8("isEmpty")],"priorVoters"),f.nu64(),f.seq(f.struct([f.nu64("epoch"),f.nu64("credits"),f.nu64("prevCredits")]),f.offset(f.u32(),-8),"epochCredits"),f.struct([f.nu64("slot"),f.nu64("timestamp")],"lastTimestamp")]);class Oi{constructor(t){this.nodePubkey=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.rootSlot=void 0,this.votes=void 0,this.authorizedVoters=void 0,this.priorVoters=void 0,this.epochCredits=void 0,this.lastTimestamp=void 0,this.nodePubkey=t.nodePubkey,this.authorizedWithdrawer=t.authorizedWithdrawer,this.commission=t.commission,this.rootSlot=t.rootSlot,this.votes=t.votes,this.authorizedVoters=t.authorizedVoters,this.priorVoters=t.priorVoters,this.epochCredits=t.epochCredits,this.lastTimestamp=t.lastTimestamp}static fromAccountData(t){const e=Bi.decode(A(t),4);let r=e.rootSlot;return e.rootSlotValid||(r=null),new Oi({nodePubkey:new Ge(e.nodePubkey),authorizedWithdrawer:new Ge(e.authorizedWithdrawer),commission:e.commission,votes:e.votes,rootSlot:r,authorizedVoters:e.authorizedVoters.map(Ti),priorVoters:Pi(e.priorVoters),epochCredits:e.epochCredits,lastTimestamp:e.lastTimestamp})}}function Ti(t){let{authorizedVoter:e,epoch:r}=t;return{epoch:r,authorizedVoter:new Ge(e)}}function Ri(t){let{authorizedPubkey:e,epochOfLastAuthorizedSwitch:r,targetEpoch:n}=t;return{authorizedPubkey:new Ge(e),epochOfLastAuthorizedSwitch:r,targetEpoch:n}}function Pi(t){let{buf:e,idx:r,isEmpty:n}=t;return n?[]:[...e.slice(r+1).map(Ri),...e.slice(0,r).map(Ri)]}class Ni{constructor(t,e,r,n){this.nodePubkey=void 0,this.authorizedVoter=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.nodePubkey=t,this.authorizedVoter=e,this.authorizedWithdrawer=r,this.commission=n}}class ji{constructor(){}static decodeInstructionType(t){this.checkProgramId(t.programId);const e=f.u32("instruction").decode(t.data);let r;for(const[n,i]of Object.entries(Di))if(i.index==e){r=n;break}if(!r)throw new Error("Instruction type incorrect; not a VoteInstruction");return r}static decodeInitializeAccount(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,4);const{voteInit:e}=br(Di.InitializeAccount,t.data);return{votePubkey:t.keys[0].pubkey,nodePubkey:t.keys[3].pubkey,voteInit:new Ni(new Ge(e.nodePubkey),new Ge(e.authorizedVoter),new Ge(e.authorizedWithdrawer),e.commission)}}static decodeAuthorize(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3);const{newAuthorized:e,voteAuthorizationType:r}=br(Di.Authorize,t.data);return{votePubkey:t.keys[0].pubkey,authorizedPubkey:t.keys[2].pubkey,newAuthorizedPubkey:new Ge(e),voteAuthorizationType:{index:r}}}static decodeWithdraw(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3);const{lamports:e}=br(Di.Withdraw,t.data);return{votePubkey:t.keys[0].pubkey,authorizedWithdrawerPubkey:t.keys[2].pubkey,lamports:e,toPubkey:t.keys[1].pubkey}}static checkProgramId(t){if(!t.equals(Fi.programId))throw new Error("invalid instruction; programId is not VoteProgram")}static checkKeyLength(t,e){if(t.length0&&void 0!==arguments[0]?arguments[0]:"voteInit";return f.struct([Xe("nodePubkey"),Xe("authorizedVoter"),Xe("authorizedWithdrawer"),f.u8("commission")],t)}()])},Authorize:{index:1,layout:f.struct([f.u32("instruction"),Xe("newAuthorized"),f.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:f.struct([f.u32("instruction"),f.ns64("lamports")])}}),Li=Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class Fi{constructor(){}static initializeAccount(t){const{votePubkey:e,nodePubkey:r,voteInit:n}=t,i=yr(Di.InitializeAccount,{voteInit:{nodePubkey:A(n.nodePubkey.toBuffer()),authorizedVoter:A(n.authorizedVoter.toBuffer()),authorizedWithdrawer:A(n.authorizedWithdrawer.toBuffer()),commission:n.commission}}),o={keys:[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:lr,isSigner:!1,isWritable:!1},{pubkey:ar,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i};return new ir(o)}static createAccount(t){const e=new or;return e.add(Sr.createAccount({fromPubkey:t.fromPubkey,newAccountPubkey:t.votePubkey,lamports:t.lamports,space:this.space,programId:this.programId})),e.add(this.initializeAccount({votePubkey:t.votePubkey,nodePubkey:t.voteInit.nodePubkey,voteInit:t.voteInit}))}static authorize(t){const{votePubkey:e,authorizedPubkey:r,newAuthorizedPubkey:n,voteAuthorizationType:i}=t,o=yr(Di.Authorize,{newAuthorized:A(n.toBuffer()),voteAuthorizationType:i.index}),a=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:ar,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return(new or).add({keys:a,programId:this.programId,data:o})}static withdraw(t){const{votePubkey:e,authorizedWithdrawerPubkey:r,lamports:n,toPubkey:i}=t,o=yr(Di.Withdraw,{lamports:n}),a=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return(new or).add({keys:a,programId:this.programId,data:o})}}async function Ui(t,e,r){const n=r&&{skipPreflight:r.skipPreflight,preflightCommitment:r.preflightCommitment||r.commitment},i=await t.sendRawTransaction(e,n),o=(await t.confirmTransaction(i,r&&r.commitment)).value;if(o.err)throw new Error("Raw transaction ".concat(i," failed (").concat(JSON.stringify(o),")"));return i}Fi.programId=new Ge("Vote111111111111111111111111111111111111111"),Fi.space=3731;const Qi={http:{devnet:"http://api.devnet.solana.com",testnet:"http://api.testnet.solana.com","mainnet-beta":"http://api.mainnet-beta.solana.com/"},https:{devnet:"https://api.devnet.solana.com",testnet:"https://api.testnet.solana.com","mainnet-beta":"https://api.mainnet-beta.solana.com/"}};function Gi(t,e){const r=!1===e?"http":"https";if(!t)return Qi[r].devnet;const n=Qi[r][t];if(!n)throw new Error("Unknown ".concat(r," cluster: ").concat(t));return n}const Hi=1e9}.call(this,r(44))},function(t,e,r){"use strict";r.d(e,"a",(function(){return E})),r.d(e,"b",(function(){return m})),r.d(e,"c",(function(){return y})),r.d(e,"d",(function(){return g})),r.d(e,"e",(function(){return b})),r.d(e,"f",(function(){return w})),r.d(e,"g",(function(){return _})),r.d(e,"h",(function(){return h})),r.d(e,"i",(function(){return n})),r.d(e,"j",(function(){return M})),r.d(e,"k",(function(){return z})),r.d(e,"l",(function(){return H})),r.d(e,"m",(function(){return q})),r.d(e,"n",(function(){return Y})),r.d(e,"o",(function(){return G})),r.d(e,"p",(function(){return V})),r.d(e,"q",(function(){return W})),r.d(e,"r",(function(){return K})),r.d(e,"s",(function(){return c})),r.d(e,"t",(function(){return l})),r.d(e,"u",(function(){return P})),r.d(e,"v",(function(){return Q})),r.d(e,"w",(function(){return N})),r.d(e,"x",(function(){return j})),r.d(e,"y",(function(){return D})),r.d(e,"z",(function(){return U})),r.d(e,"A",(function(){return F})),r.d(e,"B",(function(){return L}));var n,i=r(7),o=(r(522),r(968),r(504)),a=r.n(o),s=r(124),u=r.n(s);r(141),r(1418);!function(t){t.TZ1="tz1",t.TZ2="tz2",t.TZ3="tz3",t.TZ4="tz4",t.KT="KT",t.KT1="KT1",t.EDSK2="edsk2",t.SPSK="spsk",t.P2SK="p2sk",t.EDPK="edpk",t.SPPK="sppk",t.P2PK="p2pk",t.EDESK="edesk",t.SPESK="spesk",t.P2ESK="p2esk",t.EDSK="edsk",t.EDSIG="edsig",t.SPSIG="spsig",t.P2SIG="p2sig",t.SIG="sig",t.NET="Net",t.NCE="nce",t.B="B",t.O="o",t.LO="Lo",t.LLO="LLo",t.P="P",t.CO="Co",t.ID="id",t.EXPR="expr",t.TZ="TZ",t.VH="vh",t.TXR1="txr1",t.TXI="txi",t.TXM="txm",t.TXC="txc",t.TXMR="txmr",t.TXRL="txM",t.TXW="txw"}(n||(n={}));const c={[n.TZ1]:new Uint8Array([6,161,159]),[n.TZ2]:new Uint8Array([6,161,161]),[n.TZ3]:new Uint8Array([6,161,164]),[n.TZ4]:new Uint8Array([6,161,166]),[n.KT]:new Uint8Array([2,90,121]),[n.KT1]:new Uint8Array([2,90,121]),[n.EDSK]:new Uint8Array([43,246,78,7]),[n.EDSK2]:new Uint8Array([13,15,58,7]),[n.SPSK]:new Uint8Array([17,162,224,201]),[n.P2SK]:new Uint8Array([16,81,238,189]),[n.EDPK]:new Uint8Array([13,15,37,217]),[n.SPPK]:new Uint8Array([3,254,226,86]),[n.P2PK]:new Uint8Array([3,178,139,127]),[n.EDESK]:new Uint8Array([7,90,60,179,41]),[n.SPESK]:new Uint8Array([9,237,241,174,150]),[n.P2ESK]:new Uint8Array([9,48,57,115,171]),[n.EDSIG]:new Uint8Array([9,245,205,134,18]),[n.SPSIG]:new Uint8Array([13,115,101,19,63]),[n.P2SIG]:new Uint8Array([54,240,44,52]),[n.SIG]:new Uint8Array([4,130,43]),[n.NET]:new Uint8Array([87,82,0]),[n.NCE]:new Uint8Array([69,220,169]),[n.B]:new Uint8Array([1,52]),[n.O]:new Uint8Array([5,116]),[n.LO]:new Uint8Array([133,233]),[n.LLO]:new Uint8Array([29,159,109]),[n.P]:new Uint8Array([2,170]),[n.CO]:new Uint8Array([79,179]),[n.ID]:new Uint8Array([153,103]),[n.EXPR]:new Uint8Array([13,44,64,27]),[n.TZ]:new Uint8Array([2,90,121]),[n.VH]:new Uint8Array([1,106,242]),[n.TXR1]:new Uint8Array([1,128,120,31]),[n.TXI]:new Uint8Array([79,148,196]),[n.TXM]:new Uint8Array([79,149,30]),[n.TXC]:new Uint8Array([79,148,17]),[n.TXMR]:new Uint8Array([18,7,206,87]),[n.TXRL]:new Uint8Array([79,146,82]),[n.TXW]:new Uint8Array([79,150,72])},l={[n.TZ1]:20,[n.TZ2]:20,[n.TZ3]:20,[n.TZ4]:20,[n.KT]:20,[n.KT1]:20,[n.EDPK]:32,[n.SPPK]:33,[n.P2PK]:33,[n.EDSIG]:64,[n.SPSIG]:64,[n.P2SIG]:64,[n.SIG]:64,[n.NET]:4,[n.B]:32,[n.P]:32,[n.O]:32,[n.VH]:32,[n.TXR1]:20,[n.TXI]:32,[n.TXM]:32,[n.TXC]:32,[n.TXMR]:32,[n.TXRL]:32,[n.TXW]:32};class f extends Error{constructor(t,e){super("The key ".concat(t," is invalid. ").concat(e)),this.key=t,this.errorDetail=e,this.name="InvalidKeyError"}}class h extends Error{constructor(t,e){super("The public key '".concat(t,"' is invalid. ").concat(e)),this.publicKey=t,this.name="InvalidPublicKeyError"}}class d extends Error{constructor(t,e){super("The signature '".concat(t,"' is invalid (").concat(e,")")),this.signature=t,this.name="InvalidSignatureError"}}class p extends Error{constructor(t,e){super("The message '".concat(t,"' is invalid. ").concat(e)),this.msg=t,this.errorDetail=e,this.name="InvalidMessageError"}}class g extends Error{constructor(t){super("The contract address '".concat(t,"' is invalid")),this.contractAddress=t,this.name="InvalidContractAddressError"}}class m extends Error{constructor(t){super("The address '".concat(t,"' is invalid")),this.address=t,this.name="InvalidAddressError"}}class y extends Error{constructor(t){super("The chain id '".concat(t,"' is invalid")),this.chainId=t,this.name="InvalidChainIdError"}}class b extends Error{constructor(t){super("The public key hash '".concat(t,"' is invalid")),this.keyHash=t,this.name="InvalidKeyHashError"}}class v extends Error{constructor(t){super("The block hash '".concat(t,"' is invalid")),this.blockHash=t,this.name="InvalidBlockHashError"}}class A extends Error{constructor(t){super("The protocol hash '".concat(t,"' is invalid")),this.protocolHash=t,this.name="InvalidProtocolHashError"}}class w extends Error{constructor(t){super("The operation hash '".concat(t,"' is invalid")),this.operationHash=t,this.name="InvalidOperationHashError"}}class _ extends Error{constructor(t){super("The operation kind '".concat(t,"' is unsupported")),this.operationKind=t,this.name="InvalidOperationKindError"}}class E extends Error{constructor(t){super(t),this.message=t,this.name="DeprecationError"}}class I extends Error{constructor(t){super(t),this.message=t,this.name="ProhibitedActionError"}}class S extends Error{constructor(t,e){super("Unable to convert ".concat(t," to a ").concat(e)),this.value=t,this.desiredType=e,this.name="ValueConversionError"}}var M;function C(t,e){const r=new RegExp("^(".concat(e.join("|"),")")).exec(t);if(!r||0===r.length)return M.NO_PREFIX_MATCHED;const n=r[0];if(!function(t){return"string"===typeof t&&t in c}(n))return M.NO_PREFIX_MATCHED;const i=/^(KT1\w{33})(%(.*))?/.exec(t);i&&(t=i[1]);let o=u.a.decodeUnsafe(t);return o?(o=o.slice(c[n].length),o.length!==l[n]?M.INVALID_LENGTH:M.VALID):M.INVALID_CHECKSUM}!function(t){t[t.NO_PREFIX_MATCHED=0]="NO_PREFIX_MATCHED",t[t.INVALID_CHECKSUM=1]="INVALID_CHECKSUM",t[t.INVALID_LENGTH=2]="INVALID_LENGTH",t[t.VALID=3]="VALID"}(M||(M={}));const k=[n.TZ1,n.TZ2,n.TZ3,n.TZ4],x=[n.KT1,n.TXR1],B=[n.EDSIG,n.P2SIG,n.SPSIG,n.SIG],O=[n.EDPK,n.SPPK,n.P2PK],T=[n.O],R=(n.P,[n.B]);function P(t){return C(t,[...k,...x])}function N(t){return C(t,[n.NET])}function j(t){return C(t,x)}function D(t){return C(t,k)}function L(t){return C(t,B)}function F(t){return C(t,O)}function U(t){return C(t,T)}function Q(t){return C(t,R)}function G(t){return H(a.a.blake2b(J(t),void 0,32),c.expr)}function H(t,e){const r="string"===typeof t?Uint8Array.from(i.Buffer.from(t,"hex")):t,n=new Uint8Array(e.length+r.length);return n.set(e),n.set(r,e.length),u.a.encode(i.Buffer.from(n.buffer))}const z=(t,e)=>u.a.decode(t).slice(e.length);function q(t){const e=u.a.decode(t),r={[c.tz1.toString()]:"0000",[c.tz2.toString()]:"0001",[c.tz3.toString()]:"0002"}[new Uint8Array(e.slice(0,3)).toString()];if(r){return r+Y(e.slice(3))}return"01"+Y(e.slice(3,42))+"00"}function K(t){if("00"===t.substring(0,2)){const e={"0000":c.tz1,"0001":c.tz2,"0002":c.tz3};return H(t.substring(4),e[t.substring(0,4)])}return H(t.substring(2,42),c.KT)}function V(t){if("0"===t[0]){const e={"00":new Uint8Array([13,15,37,217]),"01":new Uint8Array([3,254,226,86]),"02":new Uint8Array([3,178,139,127])};return H(t.substring(2),e[t.substring(0,2)])}}function W(t){if("0"===t[0]){const e={"00":new Uint8Array([6,161,159]),"01":new Uint8Array([6,161,161]),"02":new Uint8Array([6,161,164])};return H(t.substring(2),e[t.substring(0,2)])}}const J=t=>{const e=t.match(/[\da-f]{2}/gi);if(e)return new Uint8Array(e.map((t=>parseInt(t,16))));throw new S(t,"Uint8Array")},Y=t=>{const e=new Uint8Array(t),r=[];return e.forEach((t=>{const e=t.toString(16),n="00".concat(e).slice(-2);r.push(n)})),r.join("")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11);(0,n.__exportStar)(r(1761),e),(0,n.__exportStar)(r(1762),e),(0,n.__exportStar)(r(634),e),(0,n.__exportStar)(r(294),e),(0,n.__exportStar)(r(1763),e),(0,n.__exportStar)(r(942),e),(0,n.__exportStar)(r(1764),e),(0,n.__exportStar)(r(1765),e),(0,n.__exportStar)(r(1766),e),(0,n.__exportStar)(r(1767),e),(0,n.__exportStar)(r(1768),e),(0,n.__exportStar)(r(1769),e),(0,n.__exportStar)(r(1770),e),(0,n.__exportStar)(r(1771),e),(0,n.__exportStar)(r(1772),e),(0,n.__exportStar)(r(1773),e)},function(t,e,r){"use strict";r.d(e,"i",(function(){return a})),r.d(e,"h",(function(){return u})),r.d(e,"a",(function(){return c})),r.d(e,"b",(function(){return l})),r.d(e,"l",(function(){return f})),r.d(e,"j",(function(){return h})),r.d(e,"g",(function(){return p})),r.d(e,"d",(function(){return g})),r.d(e,"e",(function(){return m})),r.d(e,"c",(function(){return y})),r.d(e,"f",(function(){return b})),r.d(e,"k",(function(){return v}));const n=new(r(78).a)("bytes/5.6.1");function i(t){return!!t.toHexString}function o(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function a(t){return h(t)&&!(t.length%2)||u(t)}function s(t){return"number"===typeof t&&t==t&&t%1===0}function u(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"===typeof t)return!1;if(!s(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function c(t,e){if(e||(e={}),"number"===typeof t){n.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),o(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t)&&(t=t.toHexString()),h(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",t));const i=[];for(let t=0;tc(t))),r=e.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(r);return e.reduce(((t,e)=>(n.set(e,t),t+e.length)),0),o(n)}function f(t){let e=c(t);if(0===e.length)return e;let r=0;for(;r>4]+d[15&n]}return e}return n.throwArgumentError("invalid hexlify value","value",t)}function g(t){if("string"!==typeof t)t=p(t);else if(!h(t)||t.length%2)return null;return(t.length-2)/2}function m(t,e,r){return"string"!==typeof t?t=p(t):(!h(t)||t.length%2)&&n.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function y(t){let e="0x";return t.forEach((t=>{e+=p(t).substring(2)})),e}function b(t,e){for("string"!==typeof t?t=p(t):h(t)||n.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&n.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function v(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(t)){let r=c(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=p(r.slice(0,32)),e.s=p(r.slice(32,64))):65===r.length?(e.r=p(r.slice(0,32)),e.s=p(r.slice(32,64)),e.v=r[64]):n.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:n.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=p(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const r=function(t,e){(t=c(t)).length>e&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),o(r)}(c(e._vs),32);e._vs=p(r);const i=r[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=i:e.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;const a=p(r);null==e.s?e.s=a:e.s!==a&&n.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?n.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const r=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&h(e.r)?e.r=b(e.r,32):n.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&h(e.s)?e.s=b(e.s,32):n.throwArgumentError("signature missing or invalid s","signature",t);const r=c(e.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const i=p(r);e._vs&&(h(e._vs)||n.throwArgumentError("signature invalid _vs","signature",t),e._vs=b(e._vs,32)),null==e._vs?e._vs=i:e._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}},function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"c",(function(){return a}));var n=r(539),i=r(390);const o=t=>Object(n.b)(t)&&"classes"!==t,a=n.b,s=Object(n.a)({defaultTheme:i.a,rootShouldForwardProp:o});e.a=s},function(t,e,r){"use strict";r.r(e),r.d(e,"OPENLOGIN_NETWORK",(function(){return u.i})),r.d(e,"ADAPTER_CATEGORY",(function(){return O})),r.d(e,"ADAPTER_EVENTS",(function(){return R})),r.d(e,"ADAPTER_NAMES",(function(){return x})),r.d(e,"ADAPTER_NAMESPACES",(function(){return m})),r.d(e,"ADAPTER_STATUS",(function(){return T})),r.d(e,"BaseAdapter",(function(){return P})),r.d(e,"BaseNetworkSwitch",(function(){return N})),r.d(e,"CHAIN_NAMESPACES",(function(){return g})),r.d(e,"EVM_ADAPTERS",(function(){return C})),r.d(e,"MULTI_CHAIN_ADAPTERS",(function(){return S})),r.d(e,"PROVIDER_EVENTS",(function(){return K})),r.d(e,"SOLANA_ADAPTERS",(function(){return M})),r.d(e,"WALLET_ADAPTERS",(function(){return k})),r.d(e,"WEB3AUTH_NETWORK",(function(){return B})),r.d(e,"WalletInitializationError",(function(){return w})),r.d(e,"WalletLoginError",(function(){return _})),r.d(e,"WalletOperationsError",(function(){return E})),r.d(e,"WalletProviderError",(function(){return I})),r.d(e,"Web3AuthError",(function(){return A})),r.d(e,"authServer",(function(){return j})),r.d(e,"checkIfTokenIsExpired",(function(){return U})),r.d(e,"clearToken",(function(){return q})),r.d(e,"getChainConfig",(function(){return v})),r.d(e,"getEvmChainConfig",(function(){return y})),r.d(e,"getSavedToken",(function(){return H})),r.d(e,"getSolanaChainConfig",(function(){return b})),r.d(e,"isHexStrict",(function(){return F})),r.d(e,"log",(function(){return D})),r.d(e,"saveToken",(function(){return z})),r.d(e,"signChallenge",(function(){return Q})),r.d(e,"storageAvailable",(function(){return L})),r.d(e,"verifySignedChallenge",(function(){return G}));var n=r(25),i=r.n(n),o=r(27),a=r.n(o),s=r(75),u=r(77),c=r(744),l=r(95);class f extends Error{}function h(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(t){return decodeURIComponent(atob(t).replace(/(.)/g,((t,e)=>{let r=e.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(e)}catch(r){return atob(e)}}f.prototype.name="InvalidTokenError";var d=r(92),p=r.n(d);const g={EIP155:"eip155",SOLANA:"solana",OTHER:"other"},m={EIP155:"eip155",SOLANA:"solana",XRPL:"xrpl",MULTICHAIN:"multichain"},y=t=>{const e=g.EIP155;return 1===t?{chainNamespace:e,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/eth",displayName:"Ethereum Mainnet",blockExplorer:"https://etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:5===t?{chainNamespace:e,chainId:"0x5",rpcTarget:"https://rpc.ankr.com/eth_goerli",displayName:"Goerli Testnet",blockExplorer:"https://goerli.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:11155111===t?{chainNamespace:e,chainId:"0xaa36a7",rpcTarget:"https://rpc.ankr.com/eth_sepolia",displayName:"Sepolia Testnet",blockExplorer:"https://sepolia.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:137===t?{chainNamespace:e,chainId:"0x89",rpcTarget:"https://rpc.ankr.com/polygon",displayName:"Polygon Mainnet",blockExplorer:"https://polygonscan.com",ticker:"MATIC",tickerName:"Polygon"}:80001===t?{chainNamespace:e,chainId:"0x13881",rpcTarget:"https://rpc.ankr.com/polygon_mumbai",displayName:"Polygon Mumbai Testnet",blockExplorer:"https://mumbai.polygonscan.com/",ticker:"MATIC",tickerName:"Polygon",decimals:18}:56===t?{chainNamespace:e,chainId:"0x38",rpcTarget:"https://rpc.ankr.com/bsc",displayName:"Binance SmartChain Mainnet",blockExplorer:"https://bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:97===t?{chainNamespace:e,chainId:"0x61",rpcTarget:"https://rpc.ankr.com/bsc_testnet_chapel",displayName:"Binance SmartChain Testnet",blockExplorer:"https://testnet.bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:25===t?{chainNamespace:e,chainId:"0x19",rpcTarget:"https://rpc.cronos.org",displayName:"Cronos Mainnet",blockExplorer:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos"}:338===t?{chainNamespace:e,chainId:"0x152",rpcTarget:"https://rpc-t3.cronos.org/",displayName:"Cronos Testnet",blockExplorer:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos",decimals:18}:8217===t?{chainNamespace:e,chainId:"0x2019",rpcTarget:"https://public-node-api.klaytnapi.com/v1/cypress",displayName:"Klaytn Mainnet",blockExplorer:"https://scope.klaytn.com",ticker:"KLAY",tickerName:"Klaytn",decimals:18}:null},b=t=>{const e=g.SOLANA;return 1===t?{chainNamespace:e,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/solana",displayName:"Solana Mainnet",blockExplorer:"https://explorer.solana.com",ticker:"SOL",tickerName:"Solana",decimals:9}:2===t?{chainNamespace:e,chainId:"0x2",rpcTarget:"https://api.testnet.solana.com",displayName:"Solana Testnet",blockExplorer:"https://explorer.solana.com?cluster=testnet",ticker:"SOL",tickerName:"Solana",decimals:9}:3===t?{chainNamespace:e,chainId:"0x3",rpcTarget:"https://api.devnet.solana.com",displayName:"Solana Devnet",blockExplorer:"https://explorer.solana.com?cluster=devnet",ticker:"SOL",tickerName:"Solana",decimals:9}:null},v=(t,e)=>{if(t===g.OTHER)return null;const r=e?"number"===typeof e?e:parseInt(e,16):(t=>{if(t===g.EIP155)return 1;if(t===g.SOLANA)return 1;throw new Error("Chain namespace ".concat(t," is not supported"))})(t);return t===g.EIP155?y(r):t===g.SOLANA?b(r):null};class A extends c.a{constructor(t,e){super(e),i()(this,"code",void 0),i()(this,"message",void 0),this.code=t,this.message=e||"",Object.defineProperty(this,"name",{value:"Web3AuthError"})}toJSON(){return{name:this.name,code:this.code,message:this.message}}toString(){return JSON.stringify(this.toJSON())}}class w extends A{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"WalletInitializationError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new w(t,"".concat(w.messages[t],", ").concat(e))}static notFound(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return w.fromCode(5001,t)}static notInstalled(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return w.fromCode(5002,t)}static notReady(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return w.fromCode(5003,t)}static windowBlocked(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return w.fromCode(5004,t)}static windowClosed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return w.fromCode(5005,t)}static incompatibleChainNameSpace(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return w.fromCode(5006,t)}static duplicateAdapterError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return w.fromCode(5007,t)}static invalidProviderConfigError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return w.fromCode(5008,t)}static providerNotReadyError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return w.fromCode(5009,t)}static rpcConnectionError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return w.fromCode(5010,t)}static invalidParams(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return w.fromCode(5011,t)}static invalidNetwork(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return w.fromCode(5013,t)}}i()(w,"messages",{5e3:"Custom",5001:"Wallet is not found",5002:"Wallet is not installed",5003:"Wallet is not ready yet",5004:"Wallet window is blocked",5005:"Wallet window has been closed by the user",5006:"Incompatible chain namespace provided",5007:"Adapter has already been included",5008:"Invalid provider Config",5009:"Provider is not ready yet",5010:"Failed to connect with rpc url",5011:"Invalid params passed in",5013:"Invalid network provided"});class _ extends A{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"WalletLoginError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new _(t,"".concat(_.messages[t],". ").concat(e))}static connectionError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _.fromCode(5111,t)}static disconnectionError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _.fromCode(5112,t)}static notConnectedError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _.fromCode(5113,t)}static popupClosed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _.fromCode(5114,t)}static mfaEnabled(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _.fromCode(5115,t)}static chainConfigNotAdded(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _.fromCode(5116,t)}static unsupportedOperation(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _.fromCode(5117,t)}static coreKitKeyNotFound(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _.fromCode(5118,t)}static userNotLoggedIn(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _.fromCode(5119,t)}}i()(_,"messages",{5e3:"Custom",5111:"Failed to connect with wallet",5112:"Failed to disconnect from wallet",5113:"Wallet is not connected",5114:"Wallet popup has been closed by the user",5115:"User has already enabled mfa, please use the @web3auth/web3auth-web sdk for login with mfa",5116:"Chain config has not been added. Please add the chain config before calling switchChain",5117:"Unsupported operation",5118:"useCoreKitKey flag is enabled but coreKitKey is not available",5119:"User not logged in."});class E extends A{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"WalletOperationsError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new E(t,"".concat(E.messages[t],", ").concat(e))}static chainIDNotAllowed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return E.fromCode(5201,t)}static operationNotAllowed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return E.fromCode(5202,t)}static chainNamespaceNotAllowed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return E.fromCode(5203,t)}}i()(E,"messages",{5e3:"Custom",5201:"Provided chainId is not allowed",5202:"This operation is not allowed"});class I extends A{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"WalletProviderError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new E(t,"".concat(I.messages[t],", ").concat(e))}static invalidRequestArgs(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return E.fromCode(5301,t)}static invalidRequestMethod(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return E.fromCode(5302,t)}static invalidRequestParams(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return E.fromCode(5303,t)}}i()(I,"messages",{5e3:"Custom",5301:"Expected a single, non-array, object argument.",5302:"'args.method' must be a non-empty string.",5303:"'args.params' must be an object or array if provided."});const S={OPENLOGIN:"openlogin",WALLET_CONNECT_V2:"wallet-connect-v2"},M=a()({TORUS_SOLANA:"torus-solana",PHANTOM:"phantom",SOLFLARE:"solflare",SLOPE:"slope"},S),C=a()({TORUS_EVM:"torus-evm",METAMASK:"metamask",COINBASE:"coinbase"},S),k=a()(a()({},C),M),x={[S.OPENLOGIN]:"OpenLogin",[S.WALLET_CONNECT_V2]:"Wallet Connect v2",[M.TORUS_SOLANA]:"Torus",[M.PHANTOM]:"Phantom",[M.SOLFLARE]:"Solflare",[M.SLOPE]:"Slope",[C.TORUS_EVM]:"Torus",[C.METAMASK]:"Metamask",[C.COINBASE]:"Coinbase"},B=u.i,O={EXTERNAL:"external",IN_APP:"in_app"},T={NOT_READY:"not_ready",READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"},R=a()(a()({},T),{},{ADAPTER_DATA_UPDATED:"adapter_data_updated",CACHE_CLEAR:"cache_clear"});class P extends s.b{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),i()(this,"adapterData",{}),i()(this,"sessionTime",86400),i()(this,"clientId",void 0),i()(this,"web3AuthNetwork",u.i.MAINNET),i()(this,"rehydrated",!1),i()(this,"chainConfig",null),i()(this,"knownChainConfigs",{}),i()(this,"adapterNamespace",void 0),i()(this,"currentChainNamespace",void 0),i()(this,"type",void 0),i()(this,"name",void 0),i()(this,"status",void 0),this.setAdapterSettings(t)}get chainConfigProxy(){return this.chainConfig?a()({},this.chainConfig):null}get connnected(){return this.status===T.CONNECTED}setAdapterSettings(t){if(this.status===T.READY)return;null!==t&&void 0!==t&&t.sessionTime&&(this.sessionTime=t.sessionTime),null!==t&&void 0!==t&&t.clientId&&(this.clientId=t.clientId),null!==t&&void 0!==t&&t.web3AuthNetwork&&(this.web3AuthNetwork=t.web3AuthNetwork);const e=t.chainConfig;if(e){if(!e.chainNamespace)throw w.notReady("ChainNamespace is required while setting chainConfig");this.currentChainNamespace=e.chainNamespace;const t=v(e.chainNamespace,e.chainId),r=a()(a()({},t||{}),e);this.chainConfig=r,this.addChainConfig(r)}}checkConnectionRequirements(){if(this.name!==k.WALLET_CONNECT_V2||this.status!==T.CONNECTING){if(this.status===T.CONNECTING)throw w.notReady("Already connecting");if(this.status===T.CONNECTED)throw _.connectionError("Already connected");if(this.status!==T.READY)throw _.connectionError("Wallet adapter is not ready yet, Please wait for init function to resolve before calling connect/connectTo function")}}checkInitializationRequirements(){if(!this.clientId)throw w.invalidParams("Please initialize Web3Auth with a valid clientId in constructor");if(!this.chainConfig)throw w.invalidParams("rpcTarget is required in chainConfig");if(!this.chainConfig.rpcTarget&&this.chainConfig.chainNamespace!==g.OTHER)throw w.invalidParams("rpcTarget is required in chainConfig");if(!this.chainConfig.chainId&&this.chainConfig.chainNamespace!==g.OTHER)throw w.invalidParams("chainID is required in chainConfig");if(this.status!==T.NOT_READY){if(this.status===T.CONNECTED)throw w.notReady("Already connected");if(this.status===T.READY)throw w.notReady("Adapter is already initialized")}}checkDisconnectionRequirements(){if(this.status!==T.CONNECTED)throw _.disconnectionError("Not connected with wallet")}checkAddChainRequirements(t){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])&&!this.provider)throw _.notConnectedError("Not connected with wallet.");if(this.currentChainNamespace!==t.chainNamespace)throw E.chainNamespaceNotAllowed("This adapter doesn't support this chainNamespace")}checkSwitchChainRequirements(t){let{chainId:e}=t;if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])&&!this.provider)throw _.notConnectedError("Not connected with wallet.");if(!this.knownChainConfigs[e])throw _.chainConfigNotAdded("Invalid chainId")}updateAdapterData(t){this.adapterData=t,this.emit(R.ADAPTER_DATA_UPDATED,{adapterName:this.name,data:t})}addChainConfig(t){const e=this.knownChainConfigs[t.chainId];this.knownChainConfigs[t.chainId]=a()(a()({},e||{}),t)}getChainConfig(t){return this.knownChainConfigs[t]||null}}class N{}const j="https://authjs.web3auth.io";var D=p.a.getLogger("web3auth-logger");function L(t){let e,r=!1,n=0;try{e=window[t],r=!0,n=e.length;const i="__storage_test__";return e.setItem(i,i),e.removeItem(i),!0}catch(i){const t=i;return!(!t||22!==t.code&&1014!==t.code&&"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||!r||0===n)}}const F=t=>("string"===typeof t||"number"===typeof t)&&/^(-)?0x[0-9a-f]*$/i.test(t),U=t=>{const e=function(t,e){if("string"!==typeof t)throw new f("Invalid token specified: must be a string");e||(e={});const r=!0===e.header?0:1,n=t.split(".")[r];if("string"!==typeof n)throw new f("Invalid token specified: missing part #".concat(r+1));let i;try{i=h(n)}catch(o){throw new f("Invalid token specified: invalid base64 for part #".concat(r+1," (").concat(o.message,")"))}try{return JSON.parse(i)}catch(o){throw new f("Invalid token specified: invalid json for part #".concat(r+1," (").concat(o.message,")"))}}(t);return!e.exp||e.exp{const r={payload:t,header:{t:"solana"===e?"sip99":"eip191"},network:"solana"===e?"solana":"ethereum"},n=await Object(l.c)("".concat(j,"/siww/get"),r);if(!n.success)throw new Error("Failed to authenticate user, Please reach out to Web3Auth Support team");return n.challenge},G=async(t,e,r,n,i,o,a)=>{const s={signature:{s:e,t:"solana"===t?"sip99":"eip191"},message:r,issuer:n,audience:"undefined"!==typeof window.location?window.location.hostname:"com://reactnative",timeout:i},u=await Object(l.c)("".concat(j,"/siww/verify"),s,{headers:{client_id:o,wallet_provider:n,web3auth_network:a}});if(!u.success)throw D.error("Failed to authenticate user, ,message verification failed",u.error),new Error("Failed to authenticate user, ,message verification failed");return u.token},H=(t,e)=>L("localStorage")?localStorage.getItem("".concat(t.toLowerCase(),"_").concat(e)):null,z=(t,e,r)=>L("localStorage")?localStorage.setItem("".concat(t.toLowerCase(),"_").concat(e),r):null,q=(t,e)=>L("localStorage")?localStorage.removeItem("".concat(t.toLowerCase(),"_").concat(e)):null,K={INITIALIZED:"initialized",ERRORED:"errored"}},function(t,e,r){var n=r(2623)();t.exports=n;try{regeneratorRuntime=n}catch(i){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";function n(t){var e,r,i="";if("string"===typeof t||"number"===typeof t)i+=t;else if("object"===typeof t)if(Array.isArray(t))for(e=0;e=0||(i[r]=t[r]);return i}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(268),e),i(r(1529),e),i(r(1540),e)},function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return m})),r.d(e,"c",(function(){return y})),r.d(e,"d",(function(){return l})),r.d(e,"e",(function(){return b})),r.d(e,"f",(function(){return v})),r.d(e,"g",(function(){return T})),r.d(e,"h",(function(){return f})),r.d(e,"i",(function(){return p})),r.d(e,"j",(function(){return A})),r.d(e,"k",(function(){return w})),r.d(e,"l",(function(){return h})),r.d(e,"m",(function(){return g})),r.d(e,"n",(function(){return _})),r.d(e,"o",(function(){return I})),r.d(e,"p",(function(){return S})),r.d(e,"q",(function(){return M})),r.d(e,"r",(function(){return C})),r.d(e,"s",(function(){return R})),r.d(e,"t",(function(){return k})),r.d(e,"u",(function(){return N})),r.d(e,"v",(function(){return P})),r.d(e,"w",(function(){return x})),r.d(e,"x",(function(){return B})),r.d(e,"y",(function(){return O}));class n extends TypeError{constructor(t,e){let r;const{message:n,explanation:i,...o}=t,{path:a}=t,s=0===a.length?n:"At path: ".concat(a.join(".")," -- ").concat(n);super(null!==i&&void 0!==i?i:s),null!=i&&(this.cause=s),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var n;return null!==(n=r)&&void 0!==n?n:r=[t,...e()]}}}function i(t){return"object"===typeof t&&null!=t}function o(t){return"symbol"===typeof t?t.toString():"string"===typeof t?JSON.stringify(t):"".concat(t)}function a(t,e,r,n){if(!0===t)return;!1===t?t={}:"string"===typeof t&&(t={message:t});const{path:i,branch:a}=e,{type:s}=r,{refinement:u,message:c="Expected a value of type `".concat(s,"`").concat(u?" with refinement `".concat(u,"`"):"",", but received: `").concat(o(n),"`")}=t;return{value:n,type:s,refinement:u,key:i[i.length-1],path:i,branch:a,...t,message:c}}function*s(t,e,r,n){var o;i(o=t)&&"function"===typeof o[Symbol.iterator]||(t=[t]);for(const i of t){const t=a(i,e,r,n);t&&(yield t)}}function u(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){const{path:n=[],branch:o=[t],coerce:a=!1,mask:s=!1}=r,c={path:n,branch:o};if(a&&(t=e.coercer(t,c),s&&"type"!==e.type&&i(e.schema)&&i(t)&&!Array.isArray(t)))for(const r in t)void 0===e.schema[r]&&delete t[r];let l="valid";for(const i of e.validator(t,c))i.explanation=r.message,l="not_valid",yield[i,void 0];for(let[f,h,d]of e.entries(t,c)){const e=u(h,d,{path:void 0===f?n:[...n,f],branch:void 0===f?o:[...o,h],coerce:a,mask:s,message:r.message});for(const r of e)r[0]?(l=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):a&&(h=r[1],void 0===f?t=h:t instanceof Map?t.set(f,h):t instanceof Set?t.add(h):i(t)&&(void 0!==h||f in t)&&(t[f]=h))}if("not_valid"!==l)for(const i of e.refiner(t,c))i.explanation=r.message,l="not_refined",yield[i,void 0];"valid"===l&&(yield[void 0,t])}()}class c{constructor(t){const{type:e,schema:r,validator:n,refiner:i,coercer:o=(t=>t),entries:a=function*(){}}=t;this.type=e,this.schema=r,this.entries=a,this.coercer=o,this.validator=n?(t,e)=>s(n(t,e),e,this,t):()=>[],this.refiner=i?(t,e)=>s(i(t,e),e,this,t):()=>[]}assert(t,e){return l(t,this,e)}create(t,e){return f(t,this,e)}is(t){return h(t,this)}mask(t,e){return function(t,e,r){const n=d(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}(t,this,e)}validate(t){return d(t,this,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}function l(t,e,r){const n=d(t,e,{message:r});if(n[0])throw n[0]}function f(t,e,r){const n=d(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function h(t,e){return!d(t,e)[0]}function d(t,e){const r=u(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),i=function(t){const{done:e,value:r}=t.next();return e?void 0:r}(r);if(i[0]){return[new n(i[0],(function*(){for(const t of r)t[0]&&(yield t[0])})),void 0]}return[void 0,i[1]]}function p(t,e){return new c({type:t,schema:null,validator:e})}function g(t){let e;return new c({type:"lazy",schema:null,*entries(r,n){var i;null!==(i=e)&&void 0!==i||(e=t()),yield*e.entries(r,n)},validator(r,n){var i;return null!==(i=e)&&void 0!==i||(e=t()),e.validator(r,n)},coercer(r,n){var i;return null!==(i=e)&&void 0!==i||(e=t()),e.coercer(r,n)},refiner(r,n){var i;return null!==(i=e)&&void 0!==i||(e=t()),e.refiner(r,n)}})}function m(){return p("any",(()=>!0))}function y(t){return new c({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||"Expected an array value, but received: ".concat(o(t))})}function b(){return p("bigint",(t=>"bigint"===typeof t))}function v(){return p("boolean",(t=>"boolean"===typeof t))}function A(t){return p("instance",(e=>e instanceof t||"Expected a `".concat(t.name,"` instance, but received: ").concat(o(e))))}function w(){return p("integer",(t=>"number"===typeof t&&!isNaN(t)&&Number.isInteger(t)||"Expected an integer, but received: ".concat(o(t))))}function _(t){const e=o(t),r=typeof t;return new c({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?t:null,validator:r=>r===t||"Expected the literal `".concat(e,"`, but received: ").concat(o(r))})}function E(){return p("never",(()=>!1))}function I(t){return new c({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})}function S(){return p("number",(t=>"number"===typeof t&&!isNaN(t)||"Expected a number, but received: ".concat(o(t))))}function M(t){const e=t?Object.keys(t):[],r=E();return new c({type:"object",schema:t||null,*entries(n){if(t&&i(n)){const i=new Set(Object.keys(n));for(const r of e)i.delete(r),yield[r,n[r],t[r]];for(const t of i)yield[t,n[t],r]}},validator:t=>i(t)||"Expected an object, but received: ".concat(o(t)),coercer:t=>i(t)?{...t}:t})}function C(t){return new c({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})}function k(t,e){return new c({type:"record",schema:null,*entries(r){if(i(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator:t=>i(t)||"Expected an object, but received: ".concat(o(t))})}function x(){return p("string",(t=>"string"===typeof t||"Expected a string, but received: ".concat(o(t))))}function B(t){const e=t.map((t=>t.type)).join(" | ");return new c({type:"union",schema:null,coercer(e){for(const r of t){const[t,n]=r.validate(e,{coerce:!0});if(!t)return n}return e},validator(r,n){const i=[];for(const e of t){const[...t]=u(r,e,n),[o]=t;if(!o[0])return[];for(const[e]of t)e&&i.push(e)}return["Expected the value to satisfy a union of `".concat(e,"`, but received: ").concat(o(r)),...i]}})}function O(){return p("unknown",(()=>!0))}function T(t,e,r){return new c({...t,coercer:(n,i)=>h(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}function R(t,e){return N(t,"pattern",(r=>e.test(r)||"Expected a ".concat(t.type," matching `/").concat(e.source,'/` but received "').concat(r,'"')))}function P(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const n="Expected a ".concat(t.type),i=e===r?"of `".concat(e,"`"):"between `".concat(e,"` and `").concat(r,"`");return N(t,"size",(t=>{if("number"===typeof t||t instanceof Date)return e<=t&&t<=r||"".concat(n," ").concat(i," but received `").concat(t,"`");if(t instanceof Map||t instanceof Set){const{size:o}=t;return e<=o&&o<=r||"".concat(n," with a size ").concat(i," but received one with a size of `").concat(o,"`")}{const{length:o}=t;return e<=o&&o<=r||"".concat(n," with a length ").concat(i," but received one with a length of `").concat(o,"`")}}))}function N(t,e,r){return new c({...t,*refiner(n,i){yield*t.refiner(n,i);const o=s(r(n,i),i,t,n);for(const t of o)yield{...t,refinement:e}}})}},function(t,e,r){t.exports=r(1684)()},,function(t,e,r){"use strict";function n(){return n=Object.assign||function(t){for(var e=1;e>6|192,e[r++]=63&i|128):55296===(64512&i)&&n+1>18|240,e[r++]=i>>12&63|128,e[r++]=i>>6&63|128,e[r++]=63&i|128):(e[r++]=i>>12|224,e[r++]=i>>6&63|128,e[r++]=63&i|128)}return e},o={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let i=0;i>2,l=(3&e)<<4|a>>4;let f=(15&a)<<2|u>>6,h=63&u;s||(h=64,o||(f=64)),n.push(r[c],r[l],r[f],r[h])}return n.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(i(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){const e=[];let r=0,n=0;for(;r191&&i<224){const o=t[r++];e[n++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536;e[n++]=String.fromCharCode(55296+(o>>10)),e[n++]=String.fromCharCode(56320+(1023&o))}else{const o=t[r++],a=t[r++];e[n++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&a)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const r=e?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let i=0;i>4;if(n.push(c),64!==s){const t=o<<4&240|s>>2;if(n.push(t),64!==u){const t=s<<6&192|u;n.push(t)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class a extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const s=function(t){return function(t){const e=i(t);return o.encodeByteArray(e,!0)}(t).replace(/\./g,"")},u=function(t){try{return o.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};const c=()=>function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof t)return t;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,l=()=>{try{return c()||(()=>{if("undefined"===typeof n)return;const t=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TESTNETS_API_KEY:"2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5",REACT_APP_PROD_API_KEY:"666ad781-aa60-4000-9e3e-cf5ae2d41bd3",REACT_APP_WALLET_CONNECT_V2_PROJECT_ID:"27c21e9982ee7b6e3f22764ab806719b"}).__FIREBASE_DEFAULTS__;return t?JSON.parse(t):void 0})()||(()=>{if("undefined"===typeof document)return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(r){return}const e=t&&u(t[1]);return e&&JSON.parse(e)})()}catch(t){return void console.info("Unable to get __FIREBASE_DEFAULTS__ due to: ".concat(t))}},f=t=>{var e,r;return null===(r=null===(e=l())||void 0===e?void 0:e.emulatorHosts)||void 0===r?void 0:r[t]},h=()=>{var t;return null===(t=l())||void 0===t?void 0:t.config},d=t=>{var e;return null===(e=l())||void 0===e?void 0:e["_".concat(t)]};class p{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}wrapCallback(t){return(e,r)=>{e?this.reject(e):this.resolve(r),"function"===typeof t&&(this.promise.catch((()=>{})),1===t.length?t(e):t(e,r))}}}function g(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function m(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(g())}function y(){const t="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof t&&void 0!==t.id}function b(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function v(){const t=g();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function A(){try{return"object"===typeof indexedDB}catch(t){return!1}}function w(){return new Promise(((t,e)=>{try{let r=!0;const n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),r||self.indexedDB.deleteDatabase(n),t(!0)},i.onupgradeneeded=()=>{r=!1},i.onerror=()=>{var t;e((null===(t=i.error)||void 0===t?void 0:t.message)||"")}}catch(r){e(r)}}))}class _ extends Error{constructor(t,e,r){super(e),this.code=t,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,_.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,E.prototype.create)}}class E{constructor(t,e,r){this.service=t,this.serviceName=e,this.errors=r}create(t){const e=(arguments.length<=1?void 0:arguments[1])||{},r="".concat(this.service,"/").concat(t),n=this.errors[t],i=n?function(t,e){return t.replace(I,((t,r)=>{const n=e[r];return null!=n?String(n):"<".concat(r,"?>")}))}(n,e):"Error",o="".concat(this.serviceName,": ").concat(i," (").concat(r,").");return new _(r,o,e)}}const I=/\{\$([^}]+)}/g;function S(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function M(t,e){if(t===e)return!0;const r=Object.keys(t),n=Object.keys(e);for(const i of r){if(!n.includes(i))return!1;const r=t[i],o=e[i];if(C(r)&&C(o)){if(!M(r,o))return!1}else if(r!==o)return!1}for(const i of n)if(!r.includes(i))return!1;return!0}function C(t){return null!==t&&"object"===typeof t}function k(t){const e=[];for(const[r,n]of Object.entries(t))Array.isArray(n)?n.forEach((t=>{e.push(encodeURIComponent(r)+"="+encodeURIComponent(t))})):e.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return e.length?"&"+e.join("&"):""}function x(t){const e={};return t.replace(/^\?/,"").split("&").forEach((t=>{if(t){const[r,n]=t.split("=");e[decodeURIComponent(r)]=decodeURIComponent(n)}})),e}function B(t){const e=t.indexOf("?");if(!e)return"";const r=t.indexOf("#",e);return t.substring(e,r>0?r:void 0)}function O(t,e){const r=new T(t,e);return r.subscribe.bind(r)}class T{constructor(t,e){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then((()=>{t(this)})).catch((t=>{this.error(t)}))}next(t){this.forEachObserver((e=>{e.next(t)}))}error(t){this.forEachObserver((e=>{e.error(t)})),this.close(t)}complete(){this.forEachObserver((t=>{t.complete()})),this.close()}subscribe(t,e,r){let n;if(void 0===t&&void 0===e&&void 0===r)throw new Error("Missing Observer.");n=function(t,e){if("object"!==typeof t||null===t)return!1;for(const r of e)if(r in t&&"function"===typeof t[r])return!0;return!1}(t,["next","error","complete"])?t:{next:t,error:e,complete:r},void 0===n.next&&(n.next=R),void 0===n.error&&(n.error=R),void 0===n.complete&&(n.complete=R);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?n.error(this.finalError):n.complete()}catch(t){}})),this.observers.push(n),i}unsubscribeOne(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let e=0;e{if(void 0!==this.observers&&void 0!==this.observers[t])try{e(this.observers[t])}catch(r){"undefined"!==typeof console&&console.error&&console.error(r)}}))}close(t){this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then((()=>{this.observers=void 0,this.onNoObservers=void 0})))}}function R(){}function P(t){return t&&t._delegate?t._delegate:t}}).call(this,r(44),r(57))},function(t,e,r){"use strict";r.d(e,"a",(function(){return l}));var n=r(15),i=r(283),o=r(518),a=r(94),s=r(442),u=r(203),c=r(356),l=function(t){function e(r,n,i){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=o.a;break;case 1:if(!r){a.destination=o.a;break}if("object"===typeof r){r instanceof e?(a.syncErrorThrowable=r.syncErrorThrowable,a.destination=r,r.add(a)):(a.syncErrorThrowable=!0,a.destination=new f(a,r));break}default:a.syncErrorThrowable=!0,a.destination=new f(a,r,n,i)}return a}return n.a(e,t),e.prototype[s.a]=function(){return this},e.create=function(t,r,n){var i=new e(t,r,n);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(a.a),f=function(t){function e(e,r,n,a){var s,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return Object(i.a)(r)?s=r:r&&(s=r.next,n=r.error,a=r.complete,r!==o.a&&(c=Object.create(r),Object(i.a)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=s,u._error=n,u._complete=a,u}return n.a(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,r=u.a.useDeprecatedSynchronousErrorHandling;if(this._error)r&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)r?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(c.a)(t),this.unsubscribe();else{if(this.unsubscribe(),r)throw t;Object(c.a)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};u.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(r){if(this.unsubscribe(),u.a.useDeprecatedSynchronousErrorHandling)throw r;Object(c.a)(r)}},e.prototype.__tryOrSetError=function(t,e,r){if(!u.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,r)}catch(n){return u.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=n,t.syncErrorThrown=!0,!0):(Object(c.a)(n),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l)},function(t,e,r){"use strict";var n=r(981);e.a=n.a},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(1469),i=r(390);function o(t){let{props:e,name:r}=t;return Object(n.a)({props:e,name:r,defaultTheme:i.a})}},function(t,e,r){"use strict";r.d(e,"a",(function(){return p})),r.d(e,"b",(function(){return m})),r.d(e,"c",(function(){return y})),r.d(e,"d",(function(){return g})),r.d(e,"e",(function(){return h})),r.d(e,"f",(function(){return l})),r.d(e,"g",(function(){return f})),r.d(e,"h",(function(){return d}));var n,i,o,a,s,u,c,l=((o=l||{}).MissingApiKey="MISSING_API_KEY",o.ModalNotReady="MODAL_NOT_READY",o.MalformedResponse="MALFORMED_RESPONSE",o.InvalidArgument="INVALID_ARGUMENT",o.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",o.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",o),f=((i=f||{}).SyncWeb3Method="SYNC_WEB3_METHOD",i.DuplicateIframe="DUPLICATE_IFRAME",i.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",i.DeprecationNotice="DEPRECATION_NOTICE",i),h=((n=h||{})[n.ParseError=-32700]="ParseError",n[n.InvalidRequest=-32600]="InvalidRequest",n[n.MethodNotFound=-32601]="MethodNotFound",n[n.InvalidParams=-32602]="InvalidParams",n[n.InternalError=-32603]="InternalError",n[n.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",n[n.MagicLinkExpired=-10001]="MagicLinkExpired",n[n.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",n[n.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",n[n.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",n[n.UpdateEmailFailed=-10004]="UpdateEmailFailed",n[n.UserRequestEditEmail=-10005]="UserRequestEditEmail",n[n.InactiveRecipient=-10010]="InactiveRecipient",n[n.AccessDeniedToUser=-10011]="AccessDeniedToUser",n[n.RedirectLoginComplete=-10015]="RedirectLoginComplete",n),d=((u=d||{}).MetaMask="metamask",u.CoinbaseWallet="coinbase_wallet",u),p=((s=p||{}).WalletSelected="wallet_selected",s.WalletConnected="wallet_connected",s.WalletRejected="wallet_rejected",s),g=((a=g||{}).LoginWithSms="magic_auth_login_with_sms",a.LoginWithEmailOTP="magic_auth_login_with_email_otp",a.LoginWithMagicLink="magic_auth_login_with_magic_link",a.LoginWithCredential="magic_auth_login_with_credential",a.SetAuthorizationToken="magic_auth_set_authorization_token",a.GetIdToken="magic_auth_get_id_token",a.GenerateIdToken="magic_auth_generate_id_token",a.GetMetadata="magic_auth_get_metadata",a.IsLoggedIn="magic_is_logged_in",a.Logout="magic_auth_logout",a.UpdateEmail="magic_auth_update_email",a.UserSettings="magic_auth_settings",a.UserSettingsTestMode="magic_auth_settings_testing_mode",a.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",a.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",a.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",a.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",a.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",a.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",a.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",a.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",a.LogoutTestMode="magic_auth_logout_testing_mode",a.UpdateEmailTestMode="magic_auth_update_email_testing_mode",a.IntermediaryEvent="magic_intermediary_event",a.RequestAccounts="eth_requestAccounts",a.GetInfo="magic_get_info",a.ShowUI="magic_wallet",a.NFTPurchase="magic_nft_purchase",a.NFTCheckout="magic_nft_checkout",a.RequestUserInfoWithUI="mc_request_user_info",a.Disconnect="mc_disconnect",a.UpdatePhoneNumber="magic_auth_update_phone_number",a.UpdatePhoneNumberTestMode="magic_auth_update_phone_number_testing_mode",a.RecoverAccount="magic_auth_recover_account",a.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",a.MagicBoxHeartBeat="magic_box_heart_beat",a.AutoConnect="mc_auto_connect",a.Login="mc_login",a.EncryptV1="magic_auth_encrypt_v1",a.DecryptV1="magic_auth_decrypt_v1",a.ShowNFTs="magic_show_nfts",a.ShowOnRamp="magic_show_fiat_onramp",a.ShowSendTokensUI="magic_show_send_tokens_ui",a.ShowAddress="magic_show_address",a.ShowBalances="magic_show_balances",a),m=(t=>(t.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",t.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",t.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",t.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",t.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",t.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",t))(m||{}),y=((c=y||{}).MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",c),b=(t=>(t.MFA="mfa",t.Recovery="recovery",t))(b||{}),v=(t=>(t.Harmony="HARMONY",t))(v||{}),A=(t=>(t.PhoneNumber="phone_number",t))(A||{})},function(t,e,r){var n;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,c="[BigNumber Error] ",l=c+"Number primitive has more than 15 significant digits: ",f=1e14,h=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,m=1e9;function y(t){var e=0|t;return t>0||t===e?e:e-1}function b(t){for(var e,r,n=1,i=t.length,o=t[0]+"";nc^r?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;ao[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function A(t,e,r,n){if(tr||t!==u(t))throw Error(c+(n||"Argument")+("number"==typeof t?tr?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function w(t){var e=t.c.length-1;return y(t.e/h)==e&&t.c[e]%2!=0}function _(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function E(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else eB?y.c=y.e=null:t.e=10;f/=10,c++);return void(c>B?y.c=y.e=null:(y.e=c,y.c=[t]))}m=String(t)}else{if(!a.test(m=String(t)))return i(y,m,p);y.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(c=m.indexOf("."))>-1&&(m=m.replace(".","")),(f=m.search(/e/i))>0?(c<0&&(c=f),c+=+m.slice(f+1),m=m.substring(0,f)):c<0&&(c=m.length)}else{if(A(e,2,N.length,"Base"),10==e&&j)return Q(y=new D(t),S+y.e+1,M);if(m=String(t),p="number"==typeof t){if(0*t!=0)return i(y,m,p,e);if(y.s=1/t<0?(m=m.slice(1),-1):1,D.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(l+t)}else y.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(r=N.slice(0,e),c=f=0,g=m.length;fc){c=g;continue}}else if(!s&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){s=!0,f=-1,c=0;continue}return i(y,String(t),p,e)}p=!1,(c=(m=n(m,e,10,y.s)).indexOf("."))>-1?m=m.replace(".",""):c=m.length}for(f=0;48===m.charCodeAt(f);f++);for(g=m.length;48===m.charCodeAt(--g););if(m=m.slice(f,++g)){if(g-=f,p&&D.DEBUG&&g>15&&(t>d||t!==u(t)))throw Error(l+y.s*t);if((c=c-f-1)>B)y.c=y.e=null;else if(c=k)?_(u,a):E(u,a,"0");else if(o=(t=Q(new D(t),e,r)).e,s=(u=b(t.c)).length,1==n||2==n&&(e<=o||o<=C)){for(;ss){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-s)>0)for(o+1==s&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function F(t,e){for(var r,n=1,i=new D(t[0]);n=10;i/=10,n++);return(r=n+r*h-1)>B?t.c=t.e=null:r=10;c/=10,i++);if((o=e-i)<0)o+=h,a=e,g=(l=m[d=0])/y[i-a-1]%10|0;else if((d=s((o+1)/h))>=m.length){if(!n)break t;for(;m.length<=d;m.push(0));l=g=0,i=1,a=(o%=h)-h+1}else{for(l=c=m[d],i=1;c>=10;c/=10,i++);g=(a=(o%=h)-h+i)<0?0:l/y[i-a-1]%10|0}if(n=n||e<0||null!=m[d+1]||(a<0?l:l%y[i-a-1]),n=r<4?(g||n)&&(0==r||r==(t.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(o>0?a>0?l/y[i-a]:0:m[d-1])%10&1||r==(t.s<0?8:7)),e<1||!m[0])return m.length=0,n?(e-=t.e+1,m[0]=y[(h-e%h)%h],t.e=-e||0):m[0]=t.e=0,t;if(0==o?(m.length=d,c=1,d--):(m.length=d+1,c=y[h-o],m[d]=a>0?u(l/y[i-a]%y[a])*c:0),n)for(;;){if(0==d){for(o=1,a=m[0];a>=10;a/=10,o++);for(a=m[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(t.e++,m[0]==f&&(m[0]=1));break}if(m[d]+=c,m[d]!=f)break;m[d--]=0,c=1}for(o=m.length;0===m[--o];m.pop());}t.e>B?t.c=t.e=null:t.e=k?_(e,r):E(e,r,"0"),t.s<0?"-"+e:e)}return D.clone=t,D.ROUND_UP=0,D.ROUND_DOWN=1,D.ROUND_CEIL=2,D.ROUND_FLOOR=3,D.ROUND_HALF_UP=4,D.ROUND_HALF_DOWN=5,D.ROUND_HALF_EVEN=6,D.ROUND_HALF_CEIL=7,D.ROUND_HALF_FLOOR=8,D.EUCLID=9,D.config=D.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(c+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(A(r=t[e],0,m,e),S=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(A(r=t[e],0,8,e),M=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(A(r[0],-m,0,e),A(r[1],0,m,e),C=r[0],k=r[1]):(A(r,-m,m,e),C=-(k=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)A(r[0],-m,-1,e),A(r[1],1,m,e),x=r[0],B=r[1];else{if(A(r,-m,m,e),!r)throw Error(c+e+" cannot be zero: "+r);x=-(B=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(c+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw O=!r,Error(c+"crypto unavailable");O=r}else O=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(A(r=t[e],0,9,e),T=r),t.hasOwnProperty(e="POW_PRECISION")&&(A(r=t[e],0,m,e),R=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(c+e+" not an object: "+r);P=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(c+e+" invalid: "+r);j="0123456789"==r.slice(0,10),N=r}}return{DECIMAL_PLACES:S,ROUNDING_MODE:M,EXPONENTIAL_AT:[C,k],RANGE:[x,B],CRYPTO:O,MODULO_MODE:T,POW_PRECISION:R,FORMAT:P,ALPHABET:N}},D.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!D.DEBUG)return!0;var e,r,n=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-m&&i<=m&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%h)<1&&(e+=h),String(n[0]).length==e){for(e=0;e=f||r!==u(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+t)},D.maximum=D.max=function(){return F(arguments,o.lt)},D.minimum=D.min=function(){return F(arguments,o.gt)},D.random=function(){var t=9007199254740992,e=Math.random()*t&2097151?function(){return u(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,n,i,o,a,l=0,f=[],d=new D(I);if(null==t?t=S:A(t,0,m),o=s(t/h),O)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(o*=2));l>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),r[l]=n[0],r[l+1]=n[1]):(f.push(a%1e14),l+=2);l=o/2}else{if(!crypto.randomBytes)throw O=!1,Error(c+"crypto unavailable");for(r=crypto.randomBytes(o*=7);l=9e15?crypto.randomBytes(7).copy(r,l):(f.push(a%1e14),l+=7);l=o/7}if(!O)for(;l=10;a/=10,l++);lr-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(n,i,o,a,s){var u,c,l,f,h,d,p,g,m=n.indexOf("."),y=S,v=M;for(m>=0&&(f=R,R=0,n=n.replace(".",""),d=(g=new D(i)).pow(n.length-m),R=f,g.c=e(E(b(d.c),d.e,"0"),10,o,t),g.e=g.c.length),l=f=(p=e(n,i,o,s?(u=N,t):(u=t,N))).length;0==p[--f];p.pop());if(!p[0])return u.charAt(0);if(m<0?--l:(d.c=p,d.e=l,d.s=a,p=(d=r(d,g,y,v,o)).c,h=d.r,l=d.e),m=p[c=l+y+1],f=o/2,h=h||c<0||null!=p[c+1],h=v<4?(null!=m||h)&&(0==v||v==(d.s<0?3:2)):m>f||m==f&&(4==v||h||6==v&&1&p[c-1]||v==(d.s<0?8:7)),c<1||!p[0])n=h?E(u.charAt(1),-y,u.charAt(0)):u.charAt(0);else{if(p.length=c,h)for(--o;++p[--c]>o;)p[c]=0,c||(++l,p=[1].concat(p));for(f=p.length;!p[--f];);for(m=0,n="";m<=f;n+=u.charAt(p[m++]));n=E(n,l,u.charAt(0))}return n}}(),r=function(){function t(t,e,r){var n,i,o,a,s=0,u=t.length,c=e%g,l=e/g|0;for(t=t.slice();u--;)s=((i=c*(o=t[u]%g)+(n=l*o+(a=t[u]/g|0)*c)%g*g+s)/r|0)+(n/g|0)+l*a,t[u]=i%r;return s&&(t=[s].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]1;t.splice(0,1));}return function(n,i,o,a,s){var c,l,d,p,g,m,b,v,A,w,_,E,I,S,M,C,k,x=n.s==i.s?1:-1,B=n.c,O=i.c;if(!B||!B[0]||!O||!O[0])return new D(n.s&&i.s&&(B?!O||B[0]!=O[0]:O)?B&&0==B[0]||!O?0*x:x/0:NaN);for(A=(v=new D(x)).c=[],x=o+(l=n.e-i.e)+1,s||(s=f,l=y(n.e/h)-y(i.e/h),x=x/h|0),d=0;O[d]==(B[d]||0);d++);if(O[d]>(B[d]||0)&&l--,x<0)A.push(1),p=!0;else{for(S=B.length,C=O.length,d=0,x+=2,(g=u(s/(O[0]+1)))>1&&(O=t(O,g,s),B=t(B,g,s),C=O.length,S=B.length),I=C,_=(w=B.slice(0,C)).length;_=s/2&&M++;do{if(g=0,(c=e(O,w,C,_))<0){if(E=w[0],C!=_&&(E=E*s+(w[1]||0)),(g=u(E/M))>1)for(g>=s&&(g=s-1),b=(m=t(O,g,s)).length,_=w.length;1==e(m,w,b,_);)g--,r(m,C=10;x/=10,d++);Q(v,o+(v.e=d+l*h-1)+1,a,p)}else v.e=l,v.r=+p;return v}}(),i=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,r=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,u){var l,f=s?a:a.replace(i,"");if(n.test(f))o.s=isNaN(f)?null:f<0?-1:1;else{if(!s&&(f=f.replace(t,(function(t,e,r){return l="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=l?t:e})),u&&(l=u,f=f.replace(e,"$1").replace(r,"0.$1")),a!=f))return new D(f,l);if(D.DEBUG)throw Error(c+"Not a"+(u?" base "+u:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),o.absoluteValue=o.abs=function(){var t=new D(this);return t.s<0&&(t.s=1),t},o.comparedTo=function(t,e){return v(this,new D(t,e))},o.decimalPlaces=o.dp=function(t,e){var r,n,i,o=this;if(null!=t)return A(t,0,m),null==e?e=M:A(e,0,8),Q(new D(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=((i=r.length-1)-y(this.e/h))*h,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},o.dividedBy=o.div=function(t,e){return r(this,new D(t,e),S,M)},o.dividedToIntegerBy=o.idiv=function(t,e){return r(this,new D(t,e),0,1)},o.exponentiatedBy=o.pow=function(t,e){var r,n,i,o,a,l,f,d,p=this;if((t=new D(t)).c&&!t.isInteger())throw Error(c+"Exponent not an integer: "+G(t));if(null!=e&&(e=new D(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return d=new D(Math.pow(+G(p),a?2-w(t):+G(t))),e?d.mod(e):d;if(l=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new D(NaN);(n=!l&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&w(t)?-0:0,p.e>-1&&(o=1/o),new D(l?1/o:o);R&&(o=s(R/h+2))}for(a?(r=new D(.5),l&&(t.s=1),f=w(t)):f=(i=Math.abs(+G(t)))%2,d=new D(I);;){if(f){if(!(d=d.times(p)).c)break;o?d.c.length>o&&(d.c.length=o):n&&(d=d.mod(e))}if(i){if(0===(i=u(i/2)))break;f=i%2}else if(Q(t=t.times(r),t.e+1,1),t.e>14)f=w(t);else{if(0===(i=+G(t)))break;f=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(e))}return n?d:(l&&(d=I.div(d)),e?d.mod(e):o?Q(d,R,M,undefined):d)},o.integerValue=function(t){var e=new D(this);return null==t?t=M:A(t,0,8),Q(e,e.e+1,t)},o.isEqualTo=o.eq=function(t,e){return 0===v(this,new D(t,e))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(t,e){return v(this,new D(t,e))>0},o.isGreaterThanOrEqualTo=o.gte=function(t,e){return 1===(e=v(this,new D(t,e)))||0===e},o.isInteger=function(){return!!this.c&&y(this.e/h)>this.c.length-2},o.isLessThan=o.lt=function(t,e){return v(this,new D(t,e))<0},o.isLessThanOrEqualTo=o.lte=function(t,e){return-1===(e=v(this,new D(t,e)))||0===e},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(t,e){var r,n,i,o,a=this,s=a.s;if(e=(t=new D(t,e)).s,!s||!e)return new D(NaN);if(s!=e)return t.s=-e,a.plus(t);var u=a.e/h,c=t.e/h,l=a.c,d=t.c;if(!u||!c){if(!l||!d)return l?(t.s=-e,t):new D(d?a:NaN);if(!l[0]||!d[0])return d[0]?(t.s=-e,t):new D(l[0]?a:3==M?-0:0)}if(u=y(u),c=y(c),l=l.slice(),s=u-c){for((o=s<0)?(s=-s,i=l):(c=u,i=d),i.reverse(),e=s;e--;i.push(0));i.reverse()}else for(n=(o=(s=l.length)<(e=d.length))?s:e,s=e=0;e0)for(;e--;l[r++]=0);for(e=f-1;n>s;){if(l[--n]=0;){for(r=0,p=E[i]%A,m=E[i]/A|0,o=i+(a=u);o>i;)r=((c=p*(c=_[--a]%A)+(s=m*c+(l=_[a]/A|0)*p)%A*A+b[o]+r)/v|0)+(s/A|0)+m*l,b[o--]=c%v;b[o]=r}return r?++n:b.splice(0,1),U(t,b,n)},o.negated=function(){var t=new D(this);return t.s=-t.s||null,t},o.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new D(t,e)).s,!i||!e)return new D(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/h,a=t.e/h,s=n.c,u=t.c;if(!o||!a){if(!s||!u)return new D(i/0);if(!s[0]||!u[0])return u[0]?t:new D(s[0]?n:0*i)}if(o=y(o),a=y(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=u):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(e=u.length)<0&&(r=u,u=s,s=r,e=i),i=0;e;)i=(s[--e]=s[e]+u[e]+i)/f|0,s[e]=f===s[e]?0:s[e]%f;return i&&(s=[i].concat(s),++a),U(t,s,a)},o.precision=o.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return A(t,1,m),null==e?e=M:A(e,0,8),Q(new D(o),t,e);if(!(r=o.c))return null;if(n=(i=r.length-1)*h+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},o.shiftedBy=function(t){return A(t,-9007199254740991,d),this.times("1e"+t)},o.squareRoot=o.sqrt=function(){var t,e,n,i,o,a=this,s=a.c,u=a.s,c=a.e,l=S+4,f=new D("0.5");if(1!==u||!s||!s[0])return new D(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+G(a)))||u==1/0?(((e=b(s)).length+c)%2==0&&(e+="0"),u=Math.sqrt(+e),c=y((c+1)/2)-(c<0||c%2),n=new D(e=u==1/0?"5e"+c:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+c)):n=new D(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(o=n,n=f.times(o.plus(r(a,o,l,1))),b(o.c).slice(0,u)===(e=b(n.c)).slice(0,u)){if(n.e0&&g>0){for(o=g%s||s,f=p.substr(0,o);o0&&(f+=l+p.slice(o)),d&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},o.toFraction=function(t){var e,n,i,o,a,s,u,l,f,d,g,m,y=this,v=y.c;if(null!=t&&(!(u=new D(t)).isInteger()&&(u.c||1!==u.s)||u.lt(I)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+G(u));if(!v)return new D(y);for(e=new D(I),f=n=new D(I),i=l=new D(I),m=b(v),a=e.e=m.length-y.e-1,e.c[0]=p[(s=a%h)<0?h+s:s],t=!t||u.comparedTo(e)>0?a>0?e:f:u,s=B,B=1/0,u=new D(m),l.c[0]=0;d=r(u,e,0,1),1!=(o=n.plus(d.times(i))).comparedTo(t);)n=i,i=o,f=l.plus(d.times(o=f)),l=o,e=u.minus(d.times(o=e)),u=o;return o=r(t.minus(n),i,0,1),l=l.plus(o.times(f)),n=n.plus(o.times(i)),l.s=f.s=y.s,g=r(f,i,a*=2,M).minus(y).abs().comparedTo(r(l,n,a,M).minus(y).abs())<1?[f,i]:[l,n],B=s,g},o.toNumber=function(){return+G(this)},o.toPrecision=function(t,e){return null!=t&&A(t,1,m),L(this,t,e,2)},o.toString=function(t){var e,r=this,i=r.s,o=r.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=C||o>=k?_(b(r.c),o):E(b(r.c),o,"0"):10===t&&j?e=E(b((r=Q(new D(r),S+o+1,M)).c),r.e,"0"):(A(t,2,N.length,"Base"),e=n(E(b(r.c),o,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},o.valueOf=o.toJSON=function(){return G(this)},o._isBigNumber=!0,null!=e&&D.set(e),D}(),o.default=o.BigNumber=o,void 0===(n=function(){return o}.call(e,r,e,t))||(t.exports=n)}()},,function(t,e,r){"use strict";r.d(e,"a",(function(){return s})),r.d(e,"b",(function(){return u})),r.d(e,"c",(function(){return c}));var n=r(15),i=r(35),o=r(51),a=r(354),s=function(t){function e(e){var r=t.call(this)||this;return r.parent=e,r}return n.a(e,t),e.prototype._next=function(t){this.parent.notifyNext(t)},e.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},e}(i.a),u=(i.a,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.a(e,t),e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.destination.complete()},e}(i.a));i.a;function c(t,e){if(!e.closed){if(t instanceof o.a)return t.subscribe(e);var r;try{r=Object(a.a)(t)(e)}catch(n){e.error(n)}return r}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return b})),r.d(e,"b",(function(){return v})),r.d(e,"c",(function(){return p})),r.d(e,"d",(function(){return m})),r.d(e,"e",(function(){return y})),r.d(e,"f",(function(){return g})),r.d(e,"g",(function(){return h})),r.d(e,"h",(function(){return A})),r.d(e,"i",(function(){return l})),r.d(e,"j",(function(){return f})),r.d(e,"k",(function(){return d}));var n,i,o,a,s,u,c,l=((o=l||{}).MissingApiKey="MISSING_API_KEY",o.ModalNotReady="MODAL_NOT_READY",o.MalformedResponse="MALFORMED_RESPONSE",o.InvalidArgument="INVALID_ARGUMENT",o.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",o.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",o),f=((i=f||{}).SyncWeb3Method="SYNC_WEB3_METHOD",i.DuplicateIframe="DUPLICATE_IFRAME",i.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",i.DeprecationNotice="DEPRECATION_NOTICE",i),h=((n=h||{})[n.ParseError=-32700]="ParseError",n[n.InvalidRequest=-32600]="InvalidRequest",n[n.MethodNotFound=-32601]="MethodNotFound",n[n.InvalidParams=-32602]="InvalidParams",n[n.InternalError=-32603]="InternalError",n[n.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",n[n.MagicLinkExpired=-10001]="MagicLinkExpired",n[n.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",n[n.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",n[n.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",n[n.UpdateEmailFailed=-10004]="UpdateEmailFailed",n[n.UserRequestEditEmail=-10005]="UserRequestEditEmail",n[n.InactiveRecipient=-10010]="InactiveRecipient",n[n.AccessDeniedToUser=-10011]="AccessDeniedToUser",n[n.RedirectLoginComplete=-10015]="RedirectLoginComplete",n),d=((u=d||{}).MetaMask="metamask",u.CoinbaseWallet="coinbase_wallet",u),p=((s=p||{}).WalletSelected="wallet_selected",s.WalletConnected="wallet_connected",s.WalletRejected="wallet_rejected",s),g=((a=g||{}).LoginWithSms="magic_auth_login_with_sms",a.LoginWithEmailOTP="magic_auth_login_with_email_otp",a.LoginWithMagicLink="magic_auth_login_with_magic_link",a.LoginWithCredential="magic_auth_login_with_credential",a.SetAuthorizationToken="magic_auth_set_authorization_token",a.GetIdToken="magic_auth_get_id_token",a.GenerateIdToken="magic_auth_generate_id_token",a.GetMetadata="magic_auth_get_metadata",a.IsLoggedIn="magic_is_logged_in",a.Logout="magic_auth_logout",a.UpdateEmail="magic_auth_update_email",a.UserSettings="magic_auth_settings",a.UserSettingsTestMode="magic_auth_settings_testing_mode",a.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",a.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",a.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",a.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",a.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",a.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",a.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",a.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",a.LogoutTestMode="magic_auth_logout_testing_mode",a.UpdateEmailTestMode="magic_auth_update_email_testing_mode",a.IntermediaryEvent="magic_intermediary_event",a.RequestAccounts="eth_requestAccounts",a.GetInfo="magic_get_info",a.ShowUI="magic_wallet",a.NFTPurchase="magic_nft_purchase",a.NFTCheckout="magic_nft_checkout",a.RequestUserInfoWithUI="mc_request_user_info",a.Disconnect="mc_disconnect",a.UpdatePhoneNumber="magic_auth_update_phone_number",a.UpdatePhoneNumberTestMode="magic_auth_update_phone_number_testing_mode",a.RecoverAccount="magic_auth_recover_account",a.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",a.MagicBoxHeartBeat="magic_box_heart_beat",a.AutoConnect="mc_auto_connect",a.Login="mc_login",a.EncryptV1="magic_auth_encrypt_v1",a.DecryptV1="magic_auth_decrypt_v1",a),m=(t=>(t.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",t.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",t.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",t.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",t.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",t.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",t))(m||{}),y=((c=y||{}).MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",c),b=(t=>(t.MFA="mfa",t.Recovery="recovery",t))(b||{}),v=(t=>(t.Harmony="HARMONY",t))(v||{}),A=(t=>(t.PhoneNumber="phone_number",t))(A||{})},function(t,e,r){var n=r(2644)();t.exports=n;try{regeneratorRuntime=n}catch(i){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}t.exports=r},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";r.d(e,"g",(function(){return _})),r.d(e,"d",(function(){return E})),r.d(e,"a",(function(){return H})),r.d(e,"e",(function(){return I})),r.d(e,"l",(function(){return S})),r.d(e,"m",(function(){return M})),r.d(e,"n",(function(){return C})),r.d(e,"o",(function(){return k})),r.d(e,"p",(function(){return x})),r.d(e,"t",(function(){return B})),r.d(e,"u",(function(){return O})),r.d(e,"s",(function(){return V})),r.d(e,"w",(function(){return T})),r.d(e,"v",(function(){return N})),r.d(e,"k",(function(){return K.a})),r.d(e,"h",(function(){return W.a})),r.d(e,"f",(function(){return D})),r.d(e,"i",(function(){return F})),r.d(e,"q",(function(){return q})),r.d(e,"b",(function(){return G})),r.d(e,"c",(function(){return o.a})),r.d(e,"y",(function(){return y.a})),r.d(e,"x",(function(){return h.a})),r.d(e,"z",(function(){return s})),r.d(e,"r",(function(){return U.a})),r.d(e,"j",(function(){return v}));var n=r(54),i=r(17),o=r(305);const a=[t=>{}];let s={postMessage:(t,e)=>{console.log("GOT MOCK POST MESSAGE",t),a.forEach((e=>{e({data:t})}))},addEventListener:(t,e)=>{a.push(e)},removeEventListener:(t,e)=>{a.splice(a.indexOf((t=>t===e)),1)},location:{origin:"*"}};try{"undefined"!==typeof window&&(s=window)}catch(J){console.log("not defined: ".concat(J))}var u=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class c{constructor(t){if(this._beaconId=new n.a,this._keyPair=new n.a,!t.name)throw new Error("Name not set");if(!t.storage)throw new Error("Storage not set");this.name=t.name,this.iconUrl=t.iconUrl,this.appUrl=t.appUrl,this.storage=t.storage,s.beaconCreatedClientInstance?console.warn("[BEACON] It looks like you created multiple Beacon SDK Client instances. This can lead to problems. Only create one instance and re-use it everywhere."):s.beaconCreatedClientInstance=!0,this.initSDK().catch(console.error)}get beaconId(){return this._beaconId.promise}get keyPair(){return this._keyPair.promise}destroy(){return u(this,void 0,void 0,(function*(){yield this.removeBeaconEntriesFromStorage(),s.beaconCreatedClientInstance=!1}))}initSDK(){return u(this,void 0,void 0,(function*(){return this.storage.set(i.i.BEACON_SDK_VERSION,o.b).catch(console.error),this.loadOrCreateBeaconSecret().catch(console.error),this.keyPair.then((t=>{this._beaconId.resolve(Object(n.m)(t.publicKey))}))}))}removeBeaconEntriesFromStorage(){return u(this,void 0,void 0,(function*(){const t=Object.values(i.i);yield Promise.all(t.map((t=>this.storage.delete(t))))}))}loadOrCreateBeaconSecret(){return u(this,void 0,void 0,(function*(){const t=yield this.storage.get(i.i.BEACON_SDK_SECRET_SEED);if(t&&"string"===typeof t)this._keyPair.resolve(yield Object(n.h)(t));else{const t=yield Object(n.e)();yield this.storage.set(i.i.BEACON_SDK_SECRET_SEED,t),this._keyPair.resolve(yield Object(n.h)(t))}}))}}var l=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class f{constructor(t,e){this.storage=t,this.storageKey=e}getAll(){return l(this,void 0,void 0,(function*(){return this.storage.get(this.storageKey)}))}getOne(t){return l(this,void 0,void 0,(function*(){return(yield this.storage.get(this.storageKey)).find(t)}))}addOne(t,e){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return l(this,void 0,void 0,(function*(){const n=yield this.storage.get(this.storageKey);if(n.some(e)){if(r)for(let r=0;r!t(e)));return this.storage.set(this.storageKey,e)}))}removeAll(){return l(this,void 0,void 0,(function*(){return this.storage.delete(this.storageKey)}))}}var h=r(721),d=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class p{static hasPermission(t,e,r){return d(this,void 0,void 0,(function*(){switch(t.type){case i.b.PermissionRequest:case i.b.BroadcastRequest:return!0;case i.b.OperationRequest:{const r=yield Object(h.a)(t.sourceAddress,t.network),n=yield e(r);return!!n&&n.scopes.includes(i.g.OPERATION_REQUEST)}case i.b.SignPayloadRequest:{const e=(yield r()).filter((e=>e.address===t.sourceAddress));return 0!==e.length&&e.some((t=>t.scopes.includes(i.g.SIGN)))}default:throw new Error("Message not handled")}}))}}var g=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class m{constructor(t){this.storageManager=new f(t,i.i.ACCOUNTS)}getAccounts(){return g(this,void 0,void 0,(function*(){return this.storageManager.getAll()}))}getAccount(t){return g(this,void 0,void 0,(function*(){return this.storageManager.getOne((e=>e.accountIdentifier===t))}))}addAccount(t){return g(this,void 0,void 0,(function*(){return this.storageManager.addOne(t,(e=>e.accountIdentifier===t.accountIdentifier))}))}removeAccount(t){return g(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>e.accountIdentifier===t))}))}removeAccounts(t){return g(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>t.includes(e.accountIdentifier)))}))}removeAllAccounts(){return g(this,void 0,void 0,(function*(){return this.storageManager.removeAll()}))}hasPermission(t){return g(this,void 0,void 0,(function*(){return p.hasPermission(t,this.getAccount.bind(this),this.getAccounts.bind(this))}))}}var y=r(598);let b=!!s.beaconSdkDebugEnabled;b&&console.log("[BEACON]: Debug mode is ON (turned on either by the developer or a browser extension)");class v{constructor(t){this.name=t}debug(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n2&&void 0!==arguments[2]?arguments[2]:[];if(!b)return;let n="[BEACON] ".concat((new Date).toISOString()," [").concat(this.name,"](").concat(e,")"),i=r;switch(r[0]&&"string"===typeof r[0]&&(n+=" ".concat(r[0]),i=r.slice(1)),t){case"error":console.group(n),console.error(...i);break;case"warn":console.group(n),console.warn(...i);break;case"debug":console.groupCollapsed(n),console.debug(...i);break;default:console.group(n),console.log(...i)}console.groupEnd()}}var A=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const w=new v("Client");class _ extends c{constructor(t){var e;super(t),this.rateLimit=2,this.rateLimitWindowInSeconds=5,this.requestCounter=[],this._transport=new n.a,this.accountManager=new m(t.storage),this.matrixNodes=null!==(e=t.matrixNodes)&&void 0!==e?e:[],this.handleResponse=(t,e)=>{throw new Error("not overwritten".concat(JSON.stringify(t)," - ").concat(JSON.stringify(e)))}}get transport(){return this._transport.promise}get connectionStatus(){var t,e;return null!==(e=null===(t=this._transport.promiseResult)||void 0===t?void 0:t.connectionStatus)&&void 0!==e?e:i.j.NOT_CONNECTED}get ready(){return this.transport.then((()=>{}))}getAccounts(){return A(this,void 0,void 0,(function*(){return this.accountManager.getAccounts()}))}getAccount(t){return A(this,void 0,void 0,(function*(){return this.accountManager.getAccount(t)}))}removeAccount(t){return A(this,void 0,void 0,(function*(){return this.accountManager.removeAccount(t)}))}removeAllAccounts(){return A(this,void 0,void 0,(function*(){return this.accountManager.removeAllAccounts()}))}addRequestAndCheckIfRateLimited(){return A(this,void 0,void 0,(function*(){const t=(new Date).getTime();return this.requestCounter=this.requestCounter.filter((e=>e+1e3*this.rateLimitWindowInSeconds>t)),this.requestCounter.push(t),this.requestCounter.length>this.rateLimit}))}init(t){return A(this,void 0,void 0,(function*(){return this._transport.status===n.b.RESOLVED?(yield this.transport).type:(yield this.setTransport(t),t.type)}))}getOwnAppMetadata(){return A(this,void 0,void 0,(function*(){return{senderId:yield Object(y.a)(yield this.beaconId),name:this.name,icon:this.iconUrl}}))}getPeers(){return A(this,void 0,void 0,(function*(){return(yield this.transport).getPeers()}))}addPeer(t){return A(this,void 0,void 0,(function*(){return(yield this.transport).addPeer(t)}))}destroy(){const t=Object.create(null,{destroy:{get:()=>super.destroy}});return A(this,void 0,void 0,(function*(){this._transport.status===n.b.RESOLVED&&(yield(yield this.transport).disconnect()),yield t.destroy.call(this)}))}setTransport(t){return A(this,void 0,void 0,(function*(){t?this._transport.isSettled()?this._transport=n.a.resolve(t):this._transport.resolve(t):this._transport.isSettled()&&(this._transport=new n.a)}))}addListener(t){return A(this,void 0,void 0,(function*(){t.addListener(((t,e)=>A(this,void 0,void 0,(function*(){if("string"===typeof t){const r=yield(new U.a).deserialize(t);this.handleResponse(r,e)}})))).catch((t=>w.error("addListener",t)))}))}sendDisconnectToPeer(t,e){return A(this,void 0,void 0,(function*(){const r={id:yield Object(n.e)(),version:o.a,senderId:yield Object(y.a)(yield this.beaconId),type:i.b.Disconnect},a=yield(new U.a).serialize(r),s=null!==e&&void 0!==e?e:yield this.transport;yield s.send(a,t)}))}}class E{constructor(t,e){this.name="BeaconError",this.title="Error",this.message="[".concat(t,"]:").concat(e),this.description=e}get fullDescription(){return{description:this.description}}static getError(t,e){switch(t){case i.a.BROADCAST_ERROR:return new I;case i.a.NETWORK_NOT_SUPPORTED:return new S;case i.a.NO_ADDRESS_ERROR:return new M;case i.a.NO_PRIVATE_KEY_FOUND_ERROR:return new C;case i.a.NOT_GRANTED_ERROR:return new k;case i.a.PARAMETERS_INVALID_ERROR:return new x;case i.a.TOO_MANY_OPERATIONS:return new B;case i.a.TRANSACTION_INVALID_ERROR:return new O(e);case i.a.SIGNATURE_TYPE_NOT_SUPPORTED:return new V;case i.a.ABORTED_ERROR:return new H;case i.a.UNKNOWN_ERROR:return new T}}}class I extends E{constructor(){super(i.a.BROADCAST_ERROR,"The transaction could not be broadcast to the network. Please try again."),this.name="BroadcastBeaconError",this.title="Broadcast Error"}}class S extends E{constructor(){super(i.a.NETWORK_NOT_SUPPORTED,"The wallet does not support this network. Please select another one."),this.name="NetworkNotSupportedBeaconError",this.title="Network Error"}}class M extends E{constructor(){super(i.a.NO_ADDRESS_ERROR,"The wallet does not have an account set up. Please make sure to set up your wallet and try again."),this.name="NoAddressBeaconError",this.title="No Address"}}class C extends E{constructor(){super(i.a.NO_PRIVATE_KEY_FOUND_ERROR,"The account you are trying to interact with is not available. Please make sure to add the account to your wallet and try again."),this.name="NoPrivateKeyBeaconError",this.title="Account Not Found"}}class k extends E{constructor(){super(i.a.NOT_GRANTED_ERROR,"You do not have the necessary permissions to perform this action. Please initiate another permission request and give the necessary permissions."),this.name="NotGrantedBeaconError",this.title="Permission Not Granted"}}class x extends E{constructor(){super(i.a.PARAMETERS_INVALID_ERROR,"Some of the parameters you provided are invalid and the request could not be completed. Please check your inputs and try again."),this.name="ParametersInvalidBeaconError",this.title="Parameters Invalid"}}class B extends E{constructor(){super(i.a.TOO_MANY_OPERATIONS,"The request contains too many transactions. Please include fewer operations and try again."),this.name="TooManyOperationsBeaconError",this.title="Too Many Operations"}}class O extends E{constructor(t){super(i.a.TRANSACTION_INVALID_ERROR,"The transaction is invalid and the node did not accept it."),this.data=t,this.name="TransactionInvalidBeaconError",this.title="Transaction Invalid",this.data=t}get fullDescription(){return{description:this.description,data:JSON.stringify(this.data,void 0,2)}}}class T extends E{constructor(){super(i.a.UNKNOWN_ERROR,"An unknown error occured. Please try again or report it to a developer."),this.name="UnknownBeaconError",this.title="Error"}}var R=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const P=new v("Transport");class N{constructor(t,e,r){this.type=i.k.POST_MESSAGE,this._isConnected=i.j.NOT_CONNECTED,this.listeners=[],this.name=t,this.client=e,this.peerManager=r}get connectionStatus(){return this._isConnected}static isAvailable(){return R(this,void 0,void 0,(function*(){return Promise.resolve(!1)}))}connect(){return R(this,void 0,void 0,(function*(){P.log("connect"),this._isConnected=i.j.CONNECTED}))}disconnect(){return R(this,void 0,void 0,(function*(){P.log("disconnect"),this._isConnected=i.j.NOT_CONNECTED}))}send(t,e){return R(this,void 0,void 0,(function*(){if(e)return this.client.sendMessage(t,e);{const e=(yield this.getPeers()).map((e=>this.client.sendMessage(t,e)));return(yield Promise.all(e))[0]}}))}addListener(t){return R(this,void 0,void 0,(function*(){P.debug("addListener",t),this.listeners.push(t)}))}removeListener(t){return R(this,void 0,void 0,(function*(){P.log("removeListener"),this.listeners=this.listeners.filter((e=>e!==t))}))}getPeers(){return R(this,void 0,void 0,(function*(){return this.peerManager.getPeers()}))}addPeer(t){return R(this,void 0,void 0,(function*(){P.log("addPeer","adding peer",t),yield this.peerManager.addPeer(t),yield this.listen(t.publicKey)}))}removePeer(t){return R(this,void 0,void 0,(function*(){P.log("removePeer","removing peer",t),yield this.peerManager.removePeer(t.publicKey),this.client&&(yield this.client.unsubscribeFromEncryptedMessage(t.publicKey))}))}removeAllPeers(){return R(this,void 0,void 0,(function*(){P.log("removeAllPeers"),yield this.peerManager.removeAllPeers(),this.client&&(yield this.client.unsubscribeFromEncryptedMessages())}))}notifyListeners(t,e){return R(this,void 0,void 0,(function*(){0===this.listeners.length?P.warn("notifyListeners","0 listeners notified!",this):P.log("notifyListeners","Notifying ".concat(this.listeners.length," listeners"),this),this.listeners.forEach((r=>{r(t,e)}))}))}}var j=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class D{static isSupported(){return j(this,void 0,void 0,(function*(){return"undefined"!==typeof window&&"undefined"!==typeof chrome&&Boolean(chrome)&&Boolean(chrome.runtime)&&Boolean(chrome.runtime.id)}))}get(t){return j(this,void 0,void 0,(function*(){return new Promise((e=>{chrome.storage.local.get(null,(r=>{r[t]?e(r[t]):"object"===typeof i.l[t]?e(JSON.parse(JSON.stringify(i.l[t]))):e(i.l[t])}))}))}))}set(t,e){return j(this,void 0,void 0,(function*(){return new Promise((r=>{chrome.storage.local.set({[t]:e},(()=>{r()}))}))}))}delete(t){return j(this,void 0,void 0,(function*(){return new Promise((e=>{chrome.storage.local.set({[t]:void 0},(()=>{e()}))}))}))}}var L=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class F{constructor(t){this.prefix=t}static isSupported(){return L(this,void 0,void 0,(function*(){return Promise.resolve(Boolean("undefined"!==typeof window)&&Boolean(window.localStorage))}))}get(t){return L(this,void 0,void 0,(function*(){const e=localStorage.getItem(this.getPrefixedKey(t));if(!e)return"object"===typeof i.l[t]?JSON.parse(JSON.stringify(i.l[t])):i.l[t];try{return JSON.parse(e)}catch(r){return e}}))}set(t,e){return L(this,void 0,void 0,(function*(){return"string"===typeof e?localStorage.setItem(this.getPrefixedKey(t),e):localStorage.setItem(this.getPrefixedKey(t),JSON.stringify(e))}))}delete(t){return L(this,void 0,void 0,(function*(){return Promise.resolve(localStorage.removeItem(this.getPrefixedKey(t)))}))}getPrefixedKey(t){return this.prefix?"".concat(this.prefix,"-").concat(t):t}}new v("STORAGE");var U=r(1247),Q=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class G{constructor(t){this.storageManager=new f(t,i.i.APP_METADATA_LIST)}getAppMetadataList(){return Q(this,void 0,void 0,(function*(){return this.storageManager.getAll()}))}getAppMetadata(t){return Q(this,void 0,void 0,(function*(){return this.storageManager.getOne((e=>e.senderId===t))}))}addAppMetadata(t){return Q(this,void 0,void 0,(function*(){return this.storageManager.addOne(t,(e=>e.senderId===t.senderId))}))}removeAppMetadata(t){return Q(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>e.senderId===t))}))}removeAppMetadatas(t){return Q(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>t.includes(e.senderId)))}))}removeAllAppMetadata(){return Q(this,void 0,void 0,(function*(){return this.storageManager.removeAll()}))}}class H extends E{constructor(){super(i.a.ABORTED_ERROR,"The action was aborted by the user."),this.name="UnknownBeaconError",this.title="Aborted"}}var z=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class q{constructor(t,e){this.storageManager=new f(t,e)}hasPeer(t){return z(this,void 0,void 0,(function*(){return!!(yield this.getPeer(t))}))}getPeers(){return z(this,void 0,void 0,(function*(){return this.storageManager.getAll()}))}getPeer(t){return z(this,void 0,void 0,(function*(){return this.storageManager.getOne((e=>e.publicKey===t))}))}addPeer(t){return z(this,void 0,void 0,(function*(){return this.storageManager.addOne(t,(e=>e.publicKey===t.publicKey))}))}removePeer(t){return z(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>e.publicKey===t))}))}removePeers(t){return z(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>t.includes(e.publicKey)))}))}removeAllPeers(){return z(this,void 0,void 0,(function*(){return this.storageManager.removeAll()}))}}var K=r(1248);class V extends E{constructor(){super(i.a.SIGNATURE_TYPE_NOT_SUPPORTED,"The wallet is not able to sign payloads of this type."),this.name="SignatureTypeNotSupportedBeaconError",this.title="Signature Type Not Supported"}}var W=r(722)},,function(t,e,r){"use strict";(function(e){var n=r(625);function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!v(t[s=l[c]],e[s],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function A(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(r){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _(t,e,r,n){var i;if("function"!==typeof e)throw new TypeError('"block" argument must be a function');"string"===typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(r){e=r}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&y(i,r,"Missing expected exception"+n);var o="string"===typeof n,s=!t&&i&&!r;if((!t&&a.isError(i)&&o&&w(i,r)||s)&&y(i,r,"Got unwanted exception"+n),t&&i&&r&&!w(i,r)||!t&&i)throw i}h.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return g(m(t.actual),128)+" "+t.operator+" "+g(m(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},a.inherits(h.AssertionError,Error),h.fail=y,h.ok=b,h.equal=function(t,e,r){t!=e&&y(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&y(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){v(t,e,!1)||y(t,e,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,r){v(t,e,!0)||y(t,e,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){v(t,e,!1)&&y(t,e,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){v(e,r,!0)&&y(e,r,n,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,r){t!==e&&y(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&y(t,e,r,"!==",h.notStrictEqual)},h.throws=function(t,e,r){_(!0,t,e,r)},h.doesNotThrow=function(t,e,r){_(!1,t,e,r)},h.ifError=function(t){if(t)throw t},h.strict=n((function t(e,r){e||y(e,!0,r,"==",t)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var E=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,r(44))},function(t,e,r){"use strict";r.d(e,"b",(function(){return o}));var n=r(981),i=r(153);function o(t,e){if(!e||"string"!==typeof e)return null;if(t&&t.vars){const r="vars.".concat(e).split(".").reduce(((t,e)=>t&&t[e]?t[e]:null),t);if(null!=r)return r}return e.split(".").reduce(((t,e)=>t&&null!=t[e]?t[e]:null),t)}function a(t,e,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r;return n="function"===typeof t?t(r):Array.isArray(t)?t[r]||i:o(t,r)||i,e&&(n=e(n)),n}e.a=function(t){const{prop:e,cssProperty:r=t.prop,themeKey:s,transform:u}=t,c=t=>{if(null==t[e])return null;const c=t[e],l=o(t.theme,s)||{};return Object(i.b)(t,c,(t=>{let i=a(l,u,t);return t===i&&"string"===typeof t&&(i=a(l,u,"".concat(e).concat("default"===t?"":Object(n.a)(t)),t)),!1===r?i:{[r]:i}}))};return c.propTypes={},c.filterProps=[e],c}},function(t,e){function r(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void r(c)}s.done?e(u):Promise.resolve(u).then(n,i)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,u,"next",t)}function u(t){r(a,i,o,s,u,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";r.d(e,"a",(function(){return l}));var n=r(510),i=r(35),o=r(442),a=r(518);var s=r(258),u=r(435),c=r(203),l=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,s=function(t,e,r){if(t){if(t instanceof i.a)return t;if(t[o.a])return t[o.a]()}return t||e||r?new i.a(t,e,r):new i.a(a.a)}(t,e,r);if(n?s.add(n.call(s,this.source)):s.add(this.source||c.a.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),c.a.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){c.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),Object(n.a)(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=f(e))((function(e,n){var i;i=r.subscribe((function(e){try{t(e)}catch(r){n(r),i&&i.unsubscribe()}}),n,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[s.a]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e=256)return!1}return!0}function c(t,e){if(e||(e={}),"number"===typeof t){n.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),o(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t)&&(t=t.toHexString()),h(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",t));const i=[];for(let t=0;tc(t))),r=e.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(r);return e.reduce(((t,e)=>(n.set(e,t),t+e.length)),0),o(n)}function f(t){let e=c(t);if(0===e.length)return e;let r=0;for(;r>4]+d[15&n]}return e}return n.throwArgumentError("invalid hexlify value","value",t)}function g(t){if("string"!==typeof t)t=p(t);else if(!h(t)||t.length%2)return null;return(t.length-2)/2}function m(t,e,r){return"string"!==typeof t?t=p(t):(!h(t)||t.length%2)&&n.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function y(t){let e="0x";return t.forEach((t=>{e+=p(t).substring(2)})),e}function b(t,e){for("string"!==typeof t?t=p(t):h(t)||n.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&n.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(693);n.__exportStar(r(2905),e),n.__exportStar(r(2910),e),n.__exportStar(r(2911),e),n.__exportStar(r(1294),e)},function(t,e,r){"use strict";function n(t){return Object.keys(t)}var i;r.d(e,"i",(function(){return n})),r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return i})),r.d(e,"h",(function(){return s.e})),r.d(e,"m",(function(){return s.i})),r.d(e,"f",(function(){return s.c})),r.d(e,"c",(function(){return s.a})),r.d(e,"d",(function(){return s.b})),r.d(e,"g",(function(){return s.d})),r.d(e,"l",(function(){return s.h})),r.d(e,"j",(function(){return s.f})),r.d(e,"k",(function(){return s.g})),r.d(e,"e",(function(){return u.a})),function(t){t.PENDING="pending",t.RESOLVED="resolved",t.REJECTED="rejected"}(i||(i={}));const o=()=>{throw new Error("ExposedPromise not initialized yet.")};class a{constructor(){this._resolve=o,this._reject=o,this._status=i.PENDING,this._promise=new Promise(((t,e)=>{this._resolve=e=>{this.isSettled()||(this._promiseResult=e,t(e),this._status=i.RESOLVED)},this._reject=t=>{this.isSettled()||(this._promiseError=t,e(t),this._status=i.REJECTED)}}))}get promise(){return this._promise}get resolve(){return this._resolve}get reject(){return this._reject}get status(){return this._status}get promiseResult(){return this._promiseResult}get promiseError(){return this._promiseError}static resolve(t){const e=new a;return e.resolve(t),e}static reject(t){const e=new a;return e.reject(t),e}isPending(){return this.status===i.PENDING}isResolved(){return this.status===i.RESOLVED}isRejected(){return this.status===i.REJECTED}isSettled(){return this.isResolved()||this.isRejected()}}var s=r(297),u=r(1246)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"b",(function(){return a})),r.d(e,"g",(function(){return s})),r.d(e,"d",(function(){return u})),r.d(e,"f",(function(){return c})),r.d(e,"e",(function(){return l}));var n=r(48);const i="@metaplex-foundation/beet",o="len",a="Beet<{innner}>";function s(t){return Object.keys(t).includes("byteSize")}function u(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"".concat(t," should have been a fixed beet");Object(n.strict)(s(t),e)}function c(t){return"function"===typeof t.toFixedFromData&&"function"===typeof t.toFixedFromValue}function l(t){const e=Object.keys(t);return e.includes("length")&&e.includes("elementByteSize")&&e.includes("lenPrefixByteSize")}},function(t,e,r){"use strict";r.d(e,"a",(function(){return h}));let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let a=o.default,s=null;const u=function(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var c,l;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(c||(c={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(l||(l={}));const f="0123456789abcdef";class h{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",t),a>o[r]||console.log.apply(console,e)}debug(){for(var t=arguments.length,e=new Array(t),r=0;r{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t>4],r+=f[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(s){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push("code=".concat(e)),n.push("version=".concat(this.version));const o=t;let a="";switch(e){case l.NUMERIC_FAULT:{a="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":a+="-"+e;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case l.CALL_EXCEPTION:case l.INSUFFICIENT_FUNDS:case l.MISSING_NEW:case l.NONCE_EXPIRED:case l.REPLACEMENT_UNDERPRICED:case l.TRANSACTION_REPLACED:case l.UNPREDICTABLE_GAS_LIMIT:a=e}a&&(t+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const s=new Error(t);return s.reason=o,s.code=e,Object.keys(r).forEach((function(t){s[t]=r[t]})),s}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,h.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",h.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",te&&this.throwError("too many arguments"+r,h.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",h.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return s||(s=new h("logger/5.6.0")),s}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!t)return;this.globalLogger().throwError("error censorship permanent",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!t,n=!!e}static setLogLevel(t){const e=o[t.toLowerCase()];null!=e?a=e:h.globalLogger().warn("invalid log level - "+t)}static from(t){return new h(t)}}h.errors=l,h.levels=c},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"===typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"===typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var t=s(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var r=1;r=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(k){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var h=["","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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],l=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(t);r=(f=f.idivn(l)).isZero()?g+r:h[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,g=d>>>13,m=0|a[2],y=8191&m,b=m>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],E=8191&_,I=_>>>13,S=0|a[5],M=8191&S,C=S>>>13,k=0|a[6],x=8191&k,B=k>>>13,O=0|a[7],T=8191&O,R=O>>>13,P=0|a[8],N=8191&P,j=P>>>13,D=0|a[9],L=8191&D,F=D>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,J=0|s[3],Y=8191&J,X=J>>>13,Z=0|s[4],$=8191&Z,tt=Z>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ft=8191<,ht=lt>>>13,dt=0|s[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,Q))|0)+((8191&(i=(i=Math.imul(f,G))+Math.imul(h,Q)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,Q),i=(i=Math.imul(p,G))+Math.imul(g,Q)|0,o=Math.imul(g,G);var yt=(c+(n=n+Math.imul(f,z)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,z)|0))<<13)|0;c=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,G))+Math.imul(b,Q)|0,o=Math.imul(b,G),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,q)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,Q),i=(i=Math.imul(A,G))+Math.imul(w,Q)|0,o=Math.imul(w,G),n=n+Math.imul(y,z)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var vt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,G))+Math.imul(I,Q)|0,o=Math.imul(I,G),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,q)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0;var At=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,Q),i=(i=Math.imul(M,G))+Math.imul(C,Q)|0,o=Math.imul(C,G),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,q)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,G))+Math.imul(B,Q)|0,o=Math.imul(B,G),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var _t=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,Q),i=(i=Math.imul(T,G))+Math.imul(R,Q)|0,o=Math.imul(R,G),n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Et=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var It=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,G))+Math.imul(F,Q)|0,o=Math.imul(F,G),n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(j,z)|0,o=o+Math.imul(j,q)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,ht)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ht)|0;var Ct=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(F,Y)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var kt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(C,ft)|0,o=o+Math.imul(C,ht)|0;var xt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Bt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(N,ft)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,ht))+Math.imul(F,ft)|0,o=Math.imul(F,ht);var Rt=(c+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Pt=(c+(n=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=At,u[5]=wt,u[6]=_t,u[7]=Et,u[8]=It,u[9]=St,u[10]=Mt,u[11]=Ct,u[12]=kt,u[13]=xt,u[14]=Bt,u[15]=Ot,u[16]=Tt,u[17]=Rt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?g(this,t,e):r<1024?y(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new E;else if("p192"===t)e=new I;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return A[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var g=d,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,M),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(79)(t))},function(t,e,r){"use strict";(function(t){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=n(r(1166)),o=n(r(2387)),a="hex",s="utf8",u="0";function c(t){return new Uint8Array(t)}function l(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=t.toString(a);return e?L(r):r}function f(t){return t.toString(s)}function h(t){return t.readUIntBE(0,t.length)}function d(t){return o.default(t)}function p(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return l(d(t),e)}function g(t){return f(d(t))}function m(t){return h(d(t))}function y(t){return Array.from(t).map(E).join("")}function b(e){return t.from(D(e),a)}function v(t){return c(b(t))}function A(t){return y(v(t))}function w(e){return t.from(e,s)}function _(t){return c(w(t))}function E(t){return N((t>>>0).toString(2))}function I(t){return d(S(t))}function S(t){return new Uint8Array(R(t).map((t=>parseInt(t,2))))}function M(t,e){return p(S(t),e)}function C(t){return!("string"!==typeof t||!new RegExp(/^[01]+$/).test(t))&&t.length%8===0}function k(t,e){return!("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}function x(e){return t.isBuffer(e)}function B(t){return i.default.strict(t)&&!x(t)}function O(t){return!B(t)&&!x(t)&&"undefined"!==typeof t.byteLength}function T(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const r=t%e;return r?(t-r)/e*e+e:t}function R(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const r=N(t).match(new RegExp(".{".concat(e,"}"),"gi"));return Array.from(r||[])}function P(t){return R(t).map(F).join("")}function N(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u;return j(t,T(t.length,e),r)}function j(t,e){return U(t,e,!0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:u)}function D(t){return t.replace(/^0x/,"")}function L(t){return t.startsWith("0x")?t:"0x".concat(t)}function F(t){return t.split("").reverse().join("")}function U(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:u;const i=e-t.length;let o=t;if(i>0){const e=n.repeat(i);o=r?e+t:t+e}return o}e.bufferToArray=c,e.bufferToHex=l,e.bufferToUtf8=f,e.bufferToNumber=h,e.bufferToBinary=function(t){return y(c(t))},e.arrayToBuffer=d,e.arrayToHex=p,e.arrayToUtf8=g,e.arrayToNumber=m,e.arrayToBinary=y,e.hexToBuffer=b,e.hexToArray=v,e.hexToUtf8=function(t){return f(b(t))},e.hexToNumber=function(t){return m(v(t))},e.hexToBinary=A,e.utf8ToBuffer=w,e.utf8ToArray=_,e.utf8ToHex=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return l(w(t),e)},e.utf8ToNumber=function(t){const e=parseInt(t,10);return function(t,e){if(!t)throw new Error(e)}(!function(t){return"undefined"===typeof t}(e),"Number can only safely store up to 53 bits"),e},e.utf8ToBinary=function(t){return y(_(t))},e.numberToBuffer=function(t){return I(E(t))},e.numberToArray=function(t){return S(E(t))},e.numberToHex=function(t,e){return M(E(t),e)},e.numberToUtf8=function(t){return"".concat(t)},e.numberToBinary=E,e.binaryToBuffer=I,e.binaryToArray=S,e.binaryToHex=M,e.binaryToUtf8=function(t){return g(S(t))},e.binaryToNumber=function(t){return m(S(t))},e.isBinaryString=C,e.isHexString=k,e.isBuffer=x,e.isTypedArray=B,e.isArrayBuffer=O,e.getType=function(t){return x(t)?"buffer":B(t)?"typed-array":O(t)?"array-buffer":Array.isArray(t)?"array":typeof t},e.getEncoding=function(t){return C(t)?"binary":k(t)?a:s},e.concatBuffers=function(){for(var e=arguments.length,r=new Array(e),n=0;nt=t.concat(Array.from(e)))),new Uint8Array([...t])},e.trimLeft=function(t,e){const r=t.length-e;return r>0&&(t=t.slice(r)),t},e.trimRight=function(t,e){return t.slice(0,e)},e.calcByteLength=T,e.splitBytes=R,e.swapBytes=P,e.swapHex=function(t){return M(P(A(t)))},e.sanitizeBytes=N,e.padLeft=j,e.padRight=function(t,e){return U(t,e,!1,arguments.length>2&&void 0!==arguments[2]?arguments[2]:u)},e.removeHexPrefix=D,e.addHexPrefix=L,e.sanitizeHex=function(t){return(t=N(t=D(t),2))&&(t=L(t)),t},e.removeHexLeadingZeros=function(t){const e=t.startsWith("0x");return t=(t=D(t)).startsWith(u)?t.substring(1):t,e?L(t):t}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";var n,i="object"===typeof Reflect?Reflect:null,o=i&&"function"===typeof i.apply?i.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};n=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!==t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"===typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}y(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"===typeof t.on&&y(t,"error",e,r)}(t,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(t){if("function"!==typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function f(t,e,r,n){var i,o,a,s;if(c(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"===typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[t];if(void 0===u)return!1;if("function"===typeof u)o(u,this,e);else{var c=u.length,l=m(u,c);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){var n=r(2647)();t.exports=n;try{regeneratorRuntime=n}catch(i){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return Mt})),r.d(e,"b",(function(){return j}));var n=r(4),i=t=>"checkbox"===t.type,o=t=>t instanceof Date,a=t=>null==t;const s=t=>"object"===typeof t;var u=t=>!a(t)&&!Array.isArray(t)&&s(t)&&!o(t),c=t=>u(t)&&t.target?i(t.target)?t.target.checked:t.target.value:t,l=(t,e)=>[...t].some((t=>(t=>t.substring(0,t.search(/.\d/))||t)(e)===t)),f=t=>t.filter(Boolean),h=t=>void 0===t,d=(t,e,r)=>{if(!e||!u(t))return r;const n=f(e.split(/[,[\].]+?/)).reduce(((t,e)=>a(t)?t:t[e]),t);return h(n)||n===t?h(t[e])?r:t[e]:n};const p={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},g={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},m="max",y="min",b="maxLength",v="minLength",A="pattern",w="required",_="validate";var E=(t,e)=>{const r=Object.assign({},t);return delete r[e],r};const I=n.createContext(null),S=()=>n.useContext(I);var M=function(t,e,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const i={};for(const o in t)Object.defineProperty(i,o,{get:()=>{const i=o;return e[i]!==g.all&&(e[i]=!n||g.all),r&&(r[i]=!0),t[i]}});return i},C=t=>u(t)&&!Object.keys(t).length,k=(t,e,r)=>{const n=E(t,"name");return C(n)||Object.keys(n).length>=Object.keys(e).length||Object.keys(n).find((t=>e[t]===(!r||g.all)))},x=t=>Array.isArray(t)?t:[t],B=(t,e,r)=>r&&e?t===e:!t||!e||t===e||x(t).some((t=>t&&(t.startsWith(e)||e.startsWith(t))));function O(t){const e=n.useRef(t);e.current=t,n.useEffect((()=>{const r=!t.disabled&&e.current.subject.subscribe({next:e.current.callback});return()=>(t=>{t&&t.unsubscribe()})(r)}),[t.disabled])}var T=t=>"string"===typeof t,R=(t,e,r,n)=>{const i=Array.isArray(t);return T(t)?(n&&e.watch.add(t),d(r,t)):i?t.map((t=>(n&&e.watch.add(t),d(r,t)))):(n&&(e.watchAll=!0),r)},P=t=>"function"===typeof t,N=t=>{for(const e in t)if(P(t[e]))return!0;return!1};function j(t){const e=S(),{control:r=e.control,name:i,defaultValue:o,disabled:a,exact:s}=t||{},c=n.useRef(i);c.current=i;const l=n.useCallback((t=>{if(B(c.current,t.name,s)){const e=R(c.current,r._names,t.values||r._formValues);d(h(c.current)||u(e)&&!N(e)?Object.assign({},e):Array.isArray(e)?[...e]:h(e)?o:e)}}),[r,s,o]);O({disabled:a,subject:r._subjects.watch,callback:l});const[f,d]=n.useState(h(o)?r._getWatch(i):o);return n.useEffect((()=>{r._removeUnmounted()})),f}var D=(t,e,r,n,i)=>e?Object.assign(Object.assign({},r[t]),{types:Object.assign(Object.assign({},r[t]&&r[t].types?r[t].types:{}),{[n]:i||!0})}):{},L=t=>/^\w*$/.test(t),F=t=>f(t.replace(/["|']|\]/g,"").split(/\.|\[/));function U(t,e,r){let n=-1;const i=L(e)?[e]:F(e),o=i.length,a=o-1;for(;++n{for(const n of r||Object.keys(t)){const r=d(t,n);if(r){const t=r._f,n=E(r,"_f");if(t&&e(t.name)){if(t.ref.focus&&h(t.ref.focus()))break;if(t.refs){t.refs[0].focus();break}}else u(n)&&Q(n,e)}}};var G=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some((e=>t.startsWith(e)&&/^\.\w+/.test(t.slice(e.length)))));function H(t){let e;const r=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else{if(!r&&!u(t))return t;e=r?[]:{};for(const r in t){if(P(t[r])){e=t;break}e[r]=H(t[r])}}return e}function z(){let t=[];return{get observers(){return t},next:e=>{for(const r of t)r.next(e)},subscribe:e=>(t.push(e),{unsubscribe:()=>{t=t.filter((t=>t!==e))}}),unsubscribe:()=>{t=[]}}}var q=t=>a(t)||!s(t);function K(t,e){if(q(t)||q(e))return t===e;if(o(t)&&o(e))return t.getTime()===e.getTime();const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const i of r){const r=t[i];if(!n.includes(i))return!1;if("ref"!==i){const t=e[i];if(o(r)&&o(t)||u(r)&&u(t)||Array.isArray(r)&&Array.isArray(t)?!K(r,t):r!==t)return!1}}return!0}var V=t=>({isOnSubmit:!t||t===g.onSubmit,isOnBlur:t===g.onBlur,isOnChange:t===g.onChange,isOnAll:t===g.all,isOnTouch:t===g.onTouched}),W=t=>"boolean"===typeof t,J=t=>"file"===t.type,Y=t=>t instanceof HTMLElement,X=t=>"select-multiple"===t.type,Z=t=>"radio"===t.type,$=t=>Z(t)||i(t),tt="undefined"!==typeof window&&"undefined"!==typeof window.HTMLElement&&"undefined"!==typeof document,et=t=>Y(t)&&t.isConnected;function rt(t,e){const r=L(e)?[e]:F(e),n=1==r.length?t:function(t,e){const r=e.slice(0,-1).length;let n=0;for(;n0&&(o=t);++n!h(t))).length)&&(o?delete o[r]:delete t[r]),o=e}}return t}function nt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Array.isArray(t);if(u(t)||r)for(const n in t)Array.isArray(t[n])||u(t[n])&&!N(t[n])?(e[n]=Array.isArray(t[n])?[]:{},nt(t[n],e[n])):a(t[n])||(e[n]=!0);return e}function it(t,e,r){const n=Array.isArray(t);if(u(t)||n)for(const i in t)Array.isArray(t[i])||u(t[i])&&!N(t[i])?h(e)||q(r[i])?r[i]=Array.isArray(t[i])?nt(t[i],[]):Object.assign({},nt(t[i])):it(t[i],a(e)?{}:e[i],r[i]):r[i]=!K(t[i],e[i]);return r}var ot=(t,e)=>it(t,e,nt(e));const at={value:!1,isValid:!1},st={value:!0,isValid:!0};var ut=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter((t=>t&&t.checked&&!t.disabled)).map((t=>t.value));return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!h(t[0].attributes.value)?h(t[0].value)||""===t[0].value?st:{value:t[0].value,isValid:!0}:st:at}return at},ct=(t,e)=>{let{valueAsNumber:r,valueAsDate:n,setValueAs:i}=e;return h(t)?t:r?""===t?NaN:+t:n&&T(t)?new Date(t):i?i(t):t};const lt={isValid:!1,value:null};var ft=t=>Array.isArray(t)?t.reduce(((t,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:t),lt):lt;function ht(t){const e=t.ref;if(!(t.refs?t.refs.every((t=>t.disabled)):e.disabled))return J(e)?e.files:Z(e)?ft(t.refs).value:X(e)?[...e.selectedOptions].map((t=>{let{value:e}=t;return e})):i(e)?ut(t.refs).value:ct(h(e.value)?t.ref.value:e.value,t)}var dt=(t,e,r,n)=>{const i={};for(const o of t){const t=d(e,o);t&&U(i,o,t._f)}return{criteriaMode:r,names:[...t],fields:i,shouldUseNativeValidation:n}},pt=t=>t instanceof RegExp,gt=t=>h(t)?void 0:pt(t)?t.source:u(t)?pt(t.value)?t.value.source:t.value:t,mt=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function yt(t,e,r){const n=d(t,r);if(n||L(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const n=i.join("."),o=d(e,n),a=d(t,n);if(o&&!Array.isArray(o)&&r!==n)return{name:r};if(a&&a.type)return{name:n,error:a};i.pop()}return{name:r}}var bt=(t,e,r,n,i)=>!i.isOnAll&&(!r&&i.isOnTouch?!(e||t):(r?n.isOnBlur:i.isOnBlur)?!t:!(r?n.isOnChange:i.isOnChange)||t),vt=(t,e)=>!f(d(t,e)).length&&rt(t,e),At=t=>T(t)||n.isValidElement(t);function wt(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"validate";if(At(t)||Array.isArray(t)&&t.every(At)||W(t)&&!t)return{type:r,message:At(t)?t:"",ref:e}}var _t=t=>u(t)&&!pt(t)?t:{value:t,message:""},Et=async(t,e,r,n)=>{const{ref:o,refs:s,required:c,maxLength:l,minLength:f,min:h,max:d,pattern:p,validate:g,name:E,valueAsNumber:I,mount:S,disabled:M}=t._f;if(!S||M)return{};const k=s?s[0]:o,x=t=>{n&&k.reportValidity&&(k.setCustomValidity(W(t)?"":t||" "),k.reportValidity())},B={},O=Z(o),R=i(o),N=O||R,j=(I||J(o))&&!o.value||""===e||Array.isArray(e)&&!e.length,L=D.bind(null,E,r,B),F=function(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:v;const a=t?e:r;B[E]=Object.assign({type:t?n:i,message:a,ref:o},L(t?n:i,a))};if(c&&(!N&&(j||a(e))||W(e)&&!e||R&&!ut(s).isValid||O&&!ft(s).isValid)){const{value:t,message:e}=At(c)?{value:!!c,message:c}:_t(c);if(t&&(B[E]=Object.assign({type:w,message:e,ref:k},L(w,e)),!r))return x(e),B}if(!j&&(!a(h)||!a(d))){let t,n;const i=_t(d),s=_t(h);if(isNaN(e)){const r=o.valueAsDate||new Date(e);T(i.value)&&(t=r>new Date(i.value)),T(s.value)&&(n=ri.value),a(s.value)||(n=rt.value,o=!a(n.value)&&e.length0&&void 0!==arguments[0]?arguments[0]:{},r=Object.assign(Object.assign({},It),e),n={isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}},s={},u=r.defaultValues||{},m=r.shouldUnregister?{}:H(u),y={action:!1,mount:!1,watch:!1},b={mount:new Set,unMount:new Set,array:new Set,watch:new Set},v=0,A={};const w={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},_={watch:z(),array:z(),state:z()},I=V(r.mode),S=V(r.reValidateMode),M=r.criteriaMode===g.all,k=async t=>{let e=!1;return w.isValid&&(e=r.resolver?C((await D()).errors):await L(s,!0),t||e===n.isValid||(n.isValid=e,_.state.next({isValid:e}))),e},B=(t,e)=>(U(n.errors,t,e),_.state.next({errors:n.errors})),O=(t,e,r,n)=>{const i=d(s,t);if(i){const o=d(m,t,h(r)?d(u,t):r);h(o)||n&&n.defaultChecked||e?U(m,t,e?o:ht(i._f)):nt(t,o),y.mount&&k()}},N=(t,e,r,i,o)=>{let a=!1;const s={name:t},c=d(n.touchedFields,t);if(w.isDirty){const t=n.isDirty;n.isDirty=s.isDirty=F(),a=t!==s.isDirty}if(w.dirtyFields&&(!r||i)){const r=d(n.dirtyFields,t);K(d(u,t),e)?rt(n.dirtyFields,t):U(n.dirtyFields,t,!0),s.dirtyFields=n.dirtyFields,a=a||r!==d(n.dirtyFields,t)}return r&&!c&&(U(n.touchedFields,t,r),s.touchedFields=n.touchedFields,a=a||w.touchedFields&&c!==r),a&&o&&_.state.next(s),a?s:{}},j=async(r,i,o,a,s)=>{const u=d(n.errors,i),c=w.isValid&&n.isValid!==o;var l,f;if(e.delayError&&a?(t=t||(l=B,f=e.delayError,function(){for(var t=arguments.length,e=new Array(t),r=0;rl(...e)),f)}),t(i,a)):(clearTimeout(v),a?U(n.errors,i,a):rt(n.errors,i)),((a?!K(u,a):u)||!C(s)||c)&&!r){const t=Object.assign(Object.assign(Object.assign({},s),c?{isValid:o}:{}),{errors:n.errors,name:i});n=Object.assign(Object.assign({},n),t),_.state.next(t)}A[i]--,w.isValidating&&!Object.values(A).some((t=>t))&&(_.state.next({isValidating:!1}),A={})},D=async t=>r.resolver?await r.resolver(Object.assign({},m),r.context,dt(t||b.mount,s,r.criteriaMode,r.shouldUseNativeValidation)):{},L=async function(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{valid:!0};for(const o in t){const a=t[o];if(a){const t=a._f,o=E(a,"_f");if(t){const o=await Et(a,d(m,t.name),M,r.shouldUseNativeValidation);if(o[t.name]&&(i.valid=!1,e))break;e||(o[t.name]?U(n.errors,t.name,o[t.name]):rt(n.errors,t.name))}o&&await L(o,e,i)}}return i.valid},F=(t,e)=>(t&&e&&U(m,t,e),!K(lt(),u)),Z=(t,e,r)=>{const n=Object.assign({},y.mount?m:h(e)?u:T(t)?{[t]:e}:e);return R(t,b,n,r)},nt=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=d(s,t);let o=e;if(n){const r=n._f;r&&(!r.disabled&&U(m,t,ct(e,r)),o=tt&&Y(r.ref)&&a(e)?"":e,X(r.ref)?[...r.ref.options].forEach((t=>t.selected=o.includes(t.value))):r.refs?i(r.ref)?r.refs.length>1?r.refs.forEach((t=>!t.disabled&&(t.checked=Array.isArray(o)?!!o.find((e=>e===t.value)):o===t.value))):r.refs[0]&&(r.refs[0].checked=!!o):r.refs.forEach((t=>t.checked=t.value===o)):J(r.ref)?r.ref.value="":(r.ref.value=o,r.ref.type||_.watch.next({name:t})))}(r.shouldDirty||r.shouldTouch)&&N(t,o,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&ut(t)},it=(t,e,r)=>{for(const n in e){const i=e[n],a="".concat(t,".").concat(n),u=d(s,a);!b.array.has(t)&&q(i)&&(!u||u._f)||o(i)?nt(a,i,r):it(a,i,r)}},at=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=d(s,t),o=b.array.has(t),c=H(e);U(m,t,c),o?(_.array.next({name:t,values:m}),(w.isDirty||w.dirtyFields)&&r.shouldDirty&&(n.dirtyFields=ot(u,m),_.state.next({name:t,dirtyFields:n.dirtyFields,isDirty:F(t,c)}))):!i||i._f||a(c)?nt(t,c,r):it(t,c,r),G(t,b)&&_.state.next({}),_.watch.next({name:t})},st=async t=>{const e=t.target;let i=e.name;const o=d(s,i);if(o){let a,u;const l=e.type?ht(o._f):c(t),f=t.type===p.BLUR||t.type===p.FOCUS_OUT,h=!mt(o._f)&&!r.resolver&&!d(n.errors,i)&&!o._f.deps||bt(f,d(n.touchedFields,i),n.isSubmitted,S,I),g=G(i,b,f);U(m,i,l),f?o._f.onBlur&&o._f.onBlur(t):o._f.onChange&&o._f.onChange(t);const y=N(i,l,f,!1),v=!C(y)||g;if(!f&&_.watch.next({name:i,type:t.type}),h)return v&&_.state.next(Object.assign({name:i},g?{}:y));if(!f&&g&&_.state.next({}),A[i]=(A[i],1),_.state.next({isValidating:!0}),r.resolver){const{errors:t}=await D([i]),e=yt(n.errors,s,i),r=yt(t,s,e.name||i);a=r.error,i=r.name,u=C(t)}else a=(await Et(o,d(m,i),M,r.shouldUseNativeValidation))[i],u=await k(!0);o._f.deps&&ut(o._f.deps),j(!1,i,u,a,y)}},ut=async function(t){let e,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=x(t);if(_.state.next({isValidating:!0}),r.resolver){const r=await(async t=>{const{errors:e}=await D();if(t)for(const r of t){const t=d(e,r);t?U(n.errors,r,t):rt(n.errors,r)}else n.errors=e;return e})(h(t)?t:a);e=C(r),i=t?!a.some((t=>d(r,t))):e}else t?(i=(await Promise.all(a.map((async t=>{const e=d(s,t);return await L(e&&e._f?{[t]:e}:e)})))).every(Boolean),(i||n.isValid)&&k()):i=e=await L(s);return _.state.next(Object.assign(Object.assign(Object.assign({},!T(t)||w.isValid&&e!==n.isValid?{}:{name:t}),r.resolver?{isValid:e}:{}),{errors:n.errors,isValidating:!1})),o.shouldFocus&&!i&&Q(s,(t=>d(n.errors,t)),t?a:b.mount),i},lt=t=>{const e=Object.assign(Object.assign({},u),y.mount?m:{});return h(t)?e:T(t)?d(e,t):t.map((t=>d(e,t)))},ft=(t,e)=>({invalid:!!d((e||n).errors,t),isDirty:!!d((e||n).dirtyFields,t),isTouched:!!d((e||n).touchedFields,t),error:d((e||n).errors,t)}),pt=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(const i of t?x(t):b.mount)b.mount.delete(i),b.array.delete(i),d(s,i)&&(e.keepValue||(rt(s,i),rt(m,i)),!e.keepError&&rt(n.errors,i),!e.keepDirty&&rt(n.dirtyFields,i),!e.keepTouched&&rt(n.touchedFields,i),!r.shouldUnregister&&!e.keepDefaultValue&&rt(u,i));_.watch.next({}),_.state.next(Object.assign(Object.assign({},n),e.keepDirty?{isDirty:F()}:{})),!e.keepIsValid&&k()},At=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=d(s,t);const i=W(e.disabled);return U(s,t,{_f:Object.assign(Object.assign(Object.assign({},n&&n._f?n._f:{ref:{name:t}}),{name:t,mount:!0}),e)}),b.mount.add(t),n?i&&U(m,t,e.disabled?void 0:d(m,t,ht(n._f))):O(t,!0,e.value),Object.assign(Object.assign(Object.assign({},i?{disabled:e.disabled}:{}),r.shouldUseNativeValidation?{required:!!e.required,min:gt(e.min),max:gt(e.max),minLength:gt(e.minLength),maxLength:gt(e.maxLength),pattern:gt(e.pattern)}:{}),{name:t,onChange:st,onBlur:st,ref:i=>{if(i){At(t,e),n=d(s,t);const r=h(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,o=$(r),a=n._f.refs||[];if(o?a.find((t=>t===r)):r===n._f.ref)return;U(s,t,{_f:Object.assign(Object.assign({},n._f),o?{refs:[...a.filter(et),r],ref:{type:r.type,name:t}}:{ref:r})}),O(t,!1,void 0,r)}else n=d(s,t,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||e.shouldUnregister)&&(!l(b.array,t)||!y.action)&&b.unMount.add(t)}})};return{control:{register:At,unregister:pt,getFieldState:ft,_executeSchema:D,_getWatch:Z,_getDirty:F,_updateValid:k,_removeUnmounted:()=>{for(const t of b.unMount){const e=d(s,t);e&&(e._f.refs?e._f.refs.every((t=>!et(t))):!et(e._f.ref))&&pt(t)}b.unMount=new Set},_updateFieldArray:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(i&&r){if(y.action=!0,a&&Array.isArray(d(s,t))){const e=r(d(s,t),i.argA,i.argB);o&&U(s,t,e)}if(w.errors&&a&&Array.isArray(d(n.errors,t))){const e=r(d(n.errors,t),i.argA,i.argB);o&&U(n.errors,t,e),vt(n.errors,t)}if(w.touchedFields&&a&&Array.isArray(d(n.touchedFields,t))){const e=r(d(n.touchedFields,t),i.argA,i.argB);o&&U(n.touchedFields,t,e)}w.dirtyFields&&(n.dirtyFields=ot(u,m)),_.state.next({isDirty:F(t,e),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else U(m,t,e)},_getFieldArray:t=>f(d(y.mount?m:u,t,e.shouldUnregister?d(u,t,[]):[])),_subjects:_,_proxyFormState:w,get _fields(){return s},get _formValues(){return m},get _stateFlags(){return y},set _stateFlags(t){y=t},get _defaultValues(){return u},get _names(){return b},set _names(t){b=t},get _formState(){return n},set _formState(t){n=t},get _options(){return r},set _options(t){r=Object.assign(Object.assign({},r),t)}},trigger:ut,register:At,handleSubmit:(t,e)=>async i=>{i&&(i.preventDefault&&i.preventDefault(),i.persist&&i.persist());let o=!0,a=H(m);_.state.next({isSubmitting:!0});try{if(r.resolver){const{errors:t,values:e}=await D();n.errors=t,a=e}else await L(s);C(n.errors)&&Object.keys(n.errors).every((t=>d(a,t)))?(_.state.next({errors:{},isSubmitting:!0}),await t(a,i)):(e&&await e(Object.assign({},n.errors),i),r.shouldFocusError&&Q(s,(t=>d(n.errors,t)),b.mount))}catch(u){throw o=!1,u}finally{n.isSubmitted=!0,_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:C(n.errors)&&o,submitCount:n.submitCount+1,errors:n.errors})}},watch:(t,e)=>P(t)?_.watch.subscribe({next:r=>t(Z(void 0,e),r)}):Z(t,e,!0),setValue:at,getValues:lt,reset:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=t||u,o=H(i),a=t&&!C(t)?o:u;if(r.keepDefaultValues||(u=i),!r.keepValues){if(tt&&h(t))for(const t of b.mount){const e=d(s,t);if(e&&e._f){const t=Array.isArray(e._f.refs)?e._f.refs[0]:e._f.ref;try{Y(t)&&t.closest("form").reset();break}catch(c){}}}m=e.shouldUnregister?r.keepDefaultValues?H(u):{}:o,s={},_.array.next({values:a}),_.watch.next({values:a})}b={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!w.isValid||!!r.keepIsValid,y.watch=!!e.shouldUnregister,_.state.next({submitCount:r.keepSubmitCount?n.submitCount:0,isDirty:r.keepDirty?n.isDirty:!!r.keepDefaultValues&&!K(t,u),isSubmitted:!!r.keepIsSubmitted&&n.isSubmitted,dirtyFields:r.keepDirty?n.dirtyFields:r.keepDefaultValues&&t?Object.entries(t).reduce(((t,e)=>{let[r,n]=e;return Object.assign(Object.assign({},t),{[r]:n!==d(u,r)})}),{}):{},touchedFields:r.keepTouched?n.touchedFields:{},errors:r.keepErrors?n.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},resetField:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d(s,t)&&(h(e.defaultValue)?at(t,d(u,t)):(at(t,e.defaultValue),U(u,t,e.defaultValue)),e.keepTouched||rt(n.touchedFields,t),e.keepDirty||(rt(n.dirtyFields,t),n.isDirty=e.defaultValue?F(t,d(u,t)):F()),e.keepError||(rt(n.errors,t),w.isValid&&k()),_.state.next(Object.assign({},n)))},clearErrors:t=>{t?x(t).forEach((t=>rt(n.errors,t))):n.errors={},_.state.next({errors:n.errors})},unregister:pt,setError:(t,e,r)=>{const i=(d(s,t,{_f:{}})._f||{}).ref;U(n.errors,t,Object.assign(Object.assign({},e),{ref:i})),_.state.next({name:t,errors:n.errors,isValid:!1}),r&&r.shouldFocus&&i&&i.focus&&i.focus()},setFocus:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=d(s,t)._f,n=r.refs?r.refs[0]:r.ref;e.shouldSelect?n.select():n.focus()},getFieldState:ft}}function Mt(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=n.useRef(),[r,i]=n.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}});e.current?e.current.control._options=t:e.current=Object.assign(Object.assign({},St(t)),{formState:r});const o=e.current.control,a=n.useCallback((t=>{k(t,o._proxyFormState,!0)&&(o._formState=Object.assign(Object.assign({},o._formState),t),i(Object.assign({},o._formState)))}),[o]);return O({subject:o._subjects.state,callback:a}),n.useEffect((()=>{o._stateFlags.mount||(o._proxyFormState.isValid&&o._updateValid(),o._stateFlags.mount=!0),o._stateFlags.watch&&(o._stateFlags.watch=!1,o._subjects.state.next({})),o._removeUnmounted()})),e.current.formState=M(r,o._proxyFormState),e.current}},,function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorCodes=e.providerErrors=e.rpcErrors=e.getMessageFromCode=e.serializeError=e.serializeCause=e.EthereumProviderError=e.JsonRpcError=void 0;var n=r(1273);Object.defineProperty(e,"JsonRpcError",{enumerable:!0,get:function(){return n.JsonRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});var i=r(891);Object.defineProperty(e,"serializeCause",{enumerable:!0,get:function(){return i.serializeCause}}),Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});var o=r(2807);Object.defineProperty(e,"rpcErrors",{enumerable:!0,get:function(){return o.rpcErrors}}),Object.defineProperty(e,"providerErrors",{enumerable:!0,get:function(){return o.providerErrors}});var a=r(892);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})},function(t,e,r){var n,i,o;!function(a){var s="object"==typeof a.sodium&&"function"==typeof a.sodium.onload?a.sodium.onload:null;i=[e,r(2617)],n=function(t,e){"use strict";var r,n=e.ready.then((function(){function n(){if(0!==r._sodium_init())throw new Error("libsodium was not correctly initialized.");for(var e=["crypto_aead_chacha20poly1305_decrypt","crypto_aead_chacha20poly1305_decrypt_detached","crypto_aead_chacha20poly1305_encrypt","crypto_aead_chacha20poly1305_encrypt_detached","crypto_aead_chacha20poly1305_ietf_decrypt","crypto_aead_chacha20poly1305_ietf_decrypt_detached","crypto_aead_chacha20poly1305_ietf_encrypt","crypto_aead_chacha20poly1305_ietf_encrypt_detached","crypto_aead_chacha20poly1305_ietf_keygen","crypto_aead_chacha20poly1305_keygen","crypto_aead_xchacha20poly1305_ietf_decrypt","crypto_aead_xchacha20poly1305_ietf_decrypt_detached","crypto_aead_xchacha20poly1305_ietf_encrypt","crypto_aead_xchacha20poly1305_ietf_encrypt_detached","crypto_aead_xchacha20poly1305_ietf_keygen","crypto_auth","crypto_auth_hmacsha256","crypto_auth_hmacsha256_keygen","crypto_auth_hmacsha256_verify","crypto_auth_hmacsha512","crypto_auth_hmacsha512_keygen","crypto_auth_hmacsha512_verify","crypto_auth_keygen","crypto_auth_verify","crypto_box_beforenm","crypto_box_curve25519xchacha20poly1305_keypair","crypto_box_curve25519xchacha20poly1305_seal","crypto_box_curve25519xchacha20poly1305_seal_open","crypto_box_detached","crypto_box_easy","crypto_box_easy_afternm","crypto_box_keypair","crypto_box_open_detached","crypto_box_open_easy","crypto_box_open_easy_afternm","crypto_box_seal","crypto_box_seal_open","crypto_box_seed_keypair","crypto_core_ristretto255_add","crypto_core_ristretto255_from_hash","crypto_core_ristretto255_is_valid_point","crypto_core_ristretto255_random","crypto_core_ristretto255_scalar_add","crypto_core_ristretto255_scalar_complement","crypto_core_ristretto255_scalar_invert","crypto_core_ristretto255_scalar_mul","crypto_core_ristretto255_scalar_negate","crypto_core_ristretto255_scalar_random","crypto_core_ristretto255_scalar_reduce","crypto_core_ristretto255_scalar_sub","crypto_core_ristretto255_sub","crypto_generichash","crypto_generichash_blake2b_salt_personal","crypto_generichash_final","crypto_generichash_init","crypto_generichash_keygen","crypto_generichash_update","crypto_hash","crypto_hash_sha256","crypto_hash_sha256_final","crypto_hash_sha256_init","crypto_hash_sha256_update","crypto_hash_sha512","crypto_hash_sha512_final","crypto_hash_sha512_init","crypto_hash_sha512_update","crypto_kdf_derive_from_key","crypto_kdf_keygen","crypto_kx_client_session_keys","crypto_kx_keypair","crypto_kx_seed_keypair","crypto_kx_server_session_keys","crypto_onetimeauth","crypto_onetimeauth_final","crypto_onetimeauth_init","crypto_onetimeauth_keygen","crypto_onetimeauth_update","crypto_onetimeauth_verify","crypto_pwhash","crypto_pwhash_scryptsalsa208sha256","crypto_pwhash_scryptsalsa208sha256_ll","crypto_pwhash_scryptsalsa208sha256_str","crypto_pwhash_scryptsalsa208sha256_str_verify","crypto_pwhash_str","crypto_pwhash_str_needs_rehash","crypto_pwhash_str_verify","crypto_scalarmult","crypto_scalarmult_base","crypto_scalarmult_ristretto255","crypto_scalarmult_ristretto255_base","crypto_secretbox_detached","crypto_secretbox_easy","crypto_secretbox_keygen","crypto_secretbox_open_detached","crypto_secretbox_open_easy","crypto_secretstream_xchacha20poly1305_init_pull","crypto_secretstream_xchacha20poly1305_init_push","crypto_secretstream_xchacha20poly1305_keygen","crypto_secretstream_xchacha20poly1305_pull","crypto_secretstream_xchacha20poly1305_push","crypto_secretstream_xchacha20poly1305_rekey","crypto_shorthash","crypto_shorthash_keygen","crypto_shorthash_siphashx24","crypto_sign","crypto_sign_detached","crypto_sign_ed25519_pk_to_curve25519","crypto_sign_ed25519_sk_to_curve25519","crypto_sign_ed25519_sk_to_pk","crypto_sign_ed25519_sk_to_seed","crypto_sign_final_create","crypto_sign_final_verify","crypto_sign_init","crypto_sign_keypair","crypto_sign_open","crypto_sign_seed_keypair","crypto_sign_update","crypto_sign_verify_detached","crypto_stream_chacha20","crypto_stream_chacha20_ietf_xor","crypto_stream_chacha20_ietf_xor_ic","crypto_stream_chacha20_keygen","crypto_stream_chacha20_xor","crypto_stream_chacha20_xor_ic","crypto_stream_keygen","crypto_stream_xchacha20_keygen","crypto_stream_xchacha20_xor","crypto_stream_xchacha20_xor_ic","randombytes_buf","randombytes_buf_deterministic","randombytes_close","randombytes_random","randombytes_set_implementation","randombytes_stir","randombytes_uniform","sodium_version_string"],n=[w,_,E,I,S,M,C,k,x,B,O,T,R,P,N,j,D,L,F,U,Q,G,H,z,q,K,V,W,J,Y,X,Z,$,tt,et,rt,nt,it,ot,at,st,ut,ct,lt,ft,ht,dt,pt,gt,mt,yt,bt,vt,At,wt,_t,Et,It,St,Mt,Ct,kt,xt,Bt,Ot,Tt,Rt,Pt,Nt,jt,Dt,Lt,Ft,Ut,Qt,Gt,Ht,zt,qt,Kt,Vt,Wt,Jt,Yt,Xt,Zt,$t,te,ee,re,ne,ie,oe,ae,se,ue,ce,le,fe,he,de,pe,ge,me,ye,be,ve,Ae,we,_e,Ee,Ie,Se,Me,Ce,ke,xe,Be,Oe,Te,Re,Pe,Ne,je,De,Le,Fe,Ue,Qe,Ge,He,ze,qe,Ke,Ve,We],i=0;i=240?(c=4,s=!0):l>=224?(c=3,s=!0):l>=192?(c=2,s=!0):l<128&&(c=1,s=!0)}while(!s);for(var f=c-(a.length-u),h=0;h>8&-39)<<8|87+(e=t[o]>>>4)+(e-10>>8&-39),i+=String.fromCharCode(255&n)+String.fromCharCode(n>>>8);return i}var s={ORIGINAL:1,ORIGINAL_NO_PADDING:3,URLSAFE:5,URLSAFE_NO_PADDING:7};function u(t){if(null==t)return s.URLSAFE_NO_PADDING;if(t!==s.ORIGINAL&&t!==s.ORIGINAL_NO_PADDING&&t!==s.URLSAFE&&t!=s.URLSAFE_NO_PADDING)throw new Error("unsupported base64 variant");return t}function c(t,e){e=u(e),t=A(i,t,"input");var n,i=[],a=0|Math.floor(t.length/3),s=t.length-3*a,c=4*a+(0!==s?0==(2&e)?4:2+(s>>>1):0),l=new d(c+1),f=p(t);return i.push(f),i.push(l.address),0===r._sodium_bin2base64(l.address,l.length,f,t.length,e)&&y(i,"conversion failed"),l.length=c,n=o(l.to_Uint8Array()),m(i),n}function l(t,e){var r=e||"uint8array";if(!f(r))throw new Error(r+" output format is not available");if(t instanceof d){if("uint8array"===r)return t.to_Uint8Array();if("text"===r)return o(t.to_Uint8Array());if("hex"===r)return a(t.to_Uint8Array());if("base64"===r)return c(t.to_Uint8Array(),s.URLSAFE_NO_PADDING);throw new Error('What is output format "'+r+'"?')}if("object"==typeof t){for(var n=Object.keys(t),i={},u=0;u>>24>>>8,u,f);var _=l(y,a);return m(s),_}function Pt(t){var e=[];h(t);var n=new d(0|r._crypto_kdf_keybytes()),i=n.address;e.push(i),r._crypto_kdf_keygen(i);var o=l(n,t);return m(e),o}function Nt(t,e,n,i){var o=[];h(i),t=A(o,t,"clientPublicKey");var a,s=0|r._crypto_kx_publickeybytes();t.length!==s&&b(o,"invalid clientPublicKey length"),a=p(t),o.push(a),e=A(o,e,"clientSecretKey");var u,c=0|r._crypto_kx_secretkeybytes();e.length!==c&&b(o,"invalid clientSecretKey length"),u=p(e),o.push(u),n=A(o,n,"serverPublicKey");var f,g=0|r._crypto_kx_publickeybytes();n.length!==g&&b(o,"invalid serverPublicKey length"),f=p(n),o.push(f);var v=new d(0|r._crypto_kx_sessionkeybytes()),w=v.address;o.push(w);var _=new d(0|r._crypto_kx_sessionkeybytes()),E=_.address;if(o.push(E),0==(0|r._crypto_kx_client_session_keys(w,E,a,u,f))){var I=l({sharedRx:v,sharedTx:_},i);return m(o),I}y(o,"invalid usage")}function jt(t){var e=[];h(t);var n=new d(0|r._crypto_kx_publickeybytes()),i=n.address;e.push(i);var o=new d(0|r._crypto_kx_secretkeybytes()),a=o.address;if(e.push(a),0==(0|r._crypto_kx_keypair(i,a))){var s={publicKey:l(n,t),privateKey:l(o,t),keyType:"x25519"};return m(e),s}y(e,"internal error")}function Dt(t,e){var n=[];h(e),t=A(n,t,"seed");var i,o=0|r._crypto_kx_seedbytes();t.length!==o&&b(n,"invalid seed length"),i=p(t),n.push(i);var a=new d(0|r._crypto_kx_publickeybytes()),s=a.address;n.push(s);var u=new d(0|r._crypto_kx_secretkeybytes()),c=u.address;if(n.push(c),0==(0|r._crypto_kx_seed_keypair(s,c,i))){var f={publicKey:l(a,e),privateKey:l(u,e),keyType:"x25519"};return m(n),f}y(n,"internal error")}function Lt(t,e,n,i){var o=[];h(i),t=A(o,t,"serverPublicKey");var a,s=0|r._crypto_kx_publickeybytes();t.length!==s&&b(o,"invalid serverPublicKey length"),a=p(t),o.push(a),e=A(o,e,"serverSecretKey");var u,c=0|r._crypto_kx_secretkeybytes();e.length!==c&&b(o,"invalid serverSecretKey length"),u=p(e),o.push(u),n=A(o,n,"clientPublicKey");var f,g=0|r._crypto_kx_publickeybytes();n.length!==g&&b(o,"invalid clientPublicKey length"),f=p(n),o.push(f);var v=new d(0|r._crypto_kx_sessionkeybytes()),w=v.address;o.push(w);var _=new d(0|r._crypto_kx_sessionkeybytes()),E=_.address;if(o.push(E),0==(0|r._crypto_kx_server_session_keys(w,E,a,u,f))){var I=l({sharedRx:v,sharedTx:_},i);return m(o),I}y(o,"invalid usage")}function Ft(t,e,n){var i=[];h(n);var o=p(t=A(i,t,"message")),a=t.length;i.push(o),e=A(i,e,"key");var s,u=0|r._crypto_onetimeauth_keybytes();e.length!==u&&b(i,"invalid key length"),s=p(e),i.push(s);var c=new d(0|r._crypto_onetimeauth_bytes()),f=c.address;if(i.push(f),0==(0|r._crypto_onetimeauth(f,o,a,0,s))){var g=l(c,n);return m(i),g}y(i,"invalid usage")}function Ut(t,e){var n=[];h(e),v(n,t,"state_address");var i=new d(0|r._crypto_onetimeauth_bytes()),o=i.address;if(n.push(o),0==(0|r._crypto_onetimeauth_final(t,o))){var a=(r._free(t),l(i,e));return m(n),a}y(n,"invalid usage")}function Qt(t,e){var n=[];h(e);var i=null;null!=t&&(i=p(t=A(n,t,"key")),t.length,n.push(i));var o=new d(144).address;if(0==(0|r._crypto_onetimeauth_init(o,i))){var a=o;return m(n),a}y(n,"invalid usage")}function Gt(t){var e=[];h(t);var n=new d(0|r._crypto_onetimeauth_keybytes()),i=n.address;e.push(i),r._crypto_onetimeauth_keygen(i);var o=l(n,t);return m(e),o}function Ht(t,e,n){var i=[];h(n),v(i,t,"state_address");var o=p(e=A(i,e,"message_chunk")),a=e.length;i.push(o),0!=(0|r._crypto_onetimeauth_update(t,o,a))&&y(i,"invalid usage"),m(i)}function zt(t,e,n){var i=[];t=A(i,t,"hash");var o,a=0|r._crypto_onetimeauth_bytes();t.length!==a&&b(i,"invalid hash length"),o=p(t),i.push(o);var s=p(e=A(i,e,"message")),u=e.length;i.push(s),n=A(i,n,"key");var c,l=0|r._crypto_onetimeauth_keybytes();n.length!==l&&b(i,"invalid key length"),c=p(n),i.push(c);var f=0==(0|r._crypto_onetimeauth_verify(o,s,u,0,c));return m(i),f}function qt(t,e,n,i,o,a,s){var u=[];h(s),v(u,t,"keyLength"),("number"!=typeof t||(0|t)!==t||t<0)&&b(u,"keyLength must be an unsigned integer");var c=p(e=A(u,e,"password")),f=e.length;u.push(c),n=A(u,n,"salt");var g,w=0|r._crypto_pwhash_saltbytes();n.length!==w&&b(u,"invalid salt length"),g=p(n),u.push(g),v(u,i,"opsLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&b(u,"opsLimit must be an unsigned integer"),v(u,o,"memLimit"),("number"!=typeof o||(0|o)!==o||o<0)&&b(u,"memLimit must be an unsigned integer"),v(u,a,"algorithm"),("number"!=typeof a||(0|a)!==a||a<0)&&b(u,"algorithm must be an unsigned integer");var _=new d(0|t),E=_.address;if(u.push(E),0==(0|r._crypto_pwhash(E,t,0,c,f,0,g,i,0,o,a))){var I=l(_,s);return m(u),I}y(u,"invalid usage")}function Kt(t,e,n,i,o,a){var s=[];h(a),v(s,t,"keyLength"),("number"!=typeof t||(0|t)!==t||t<0)&&b(s,"keyLength must be an unsigned integer");var u=p(e=A(s,e,"password")),c=e.length;s.push(u),n=A(s,n,"salt");var f,g=0|r._crypto_pwhash_scryptsalsa208sha256_saltbytes();n.length!==g&&b(s,"invalid salt length"),f=p(n),s.push(f),v(s,i,"opsLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&b(s,"opsLimit must be an unsigned integer"),v(s,o,"memLimit"),("number"!=typeof o||(0|o)!==o||o<0)&&b(s,"memLimit must be an unsigned integer");var w=new d(0|t),_=w.address;if(s.push(_),0==(0|r._crypto_pwhash_scryptsalsa208sha256(_,t,0,u,c,0,f,i,0,o))){var E=l(w,a);return m(s),E}y(s,"invalid usage")}function Vt(t,e,n,i,o,a,s){var u=[];h(s);var c=p(t=A(u,t,"password")),f=t.length;u.push(c);var g=p(e=A(u,e,"salt")),w=e.length;u.push(g),v(u,n,"opsLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(u,"opsLimit must be an unsigned integer"),v(u,i,"r"),("number"!=typeof i||(0|i)!==i||i<0)&&b(u,"r must be an unsigned integer"),v(u,o,"p"),("number"!=typeof o||(0|o)!==o||o<0)&&b(u,"p must be an unsigned integer"),v(u,a,"keyLength"),("number"!=typeof a||(0|a)!==a||a<0)&&b(u,"keyLength must be an unsigned integer");var _=new d(0|a),E=_.address;if(u.push(E),0==(0|r._crypto_pwhash_scryptsalsa208sha256_ll(c,f,g,w,n,0,i,o,E,a))){var I=l(_,s);return m(u),I}y(u,"invalid usage")}function Wt(t,e,n,i){var o=[];h(i);var a=p(t=A(o,t,"password")),s=t.length;o.push(a),v(o,e,"opsLimit"),("number"!=typeof e||(0|e)!==e||e<0)&&b(o,"opsLimit must be an unsigned integer"),v(o,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(o,"memLimit must be an unsigned integer");var u=new d(0|r._crypto_pwhash_scryptsalsa208sha256_strbytes()).address;if(o.push(u),0==(0|r._crypto_pwhash_scryptsalsa208sha256_str(u,a,s,0,e,0,n))){var c=r.UTF8ToString(u);return m(o),c}y(o,"invalid usage")}function Jt(t,e,n){var o=[];h(n),"string"!=typeof t&&b(o,"hashed_password must be a string"),t=i(t+"\0"),null!=s&&t.length-1!==s&&b(o,"invalid hashed_password length");var a=p(t),s=t.length-1;o.push(a);var u=p(e=A(o,e,"password")),c=e.length;o.push(u);var l=0==(0|r._crypto_pwhash_scryptsalsa208sha256_str_verify(a,u,c,0));return m(o),l}function Yt(t,e,n,i){var o=[];h(i);var a=p(t=A(o,t,"password")),s=t.length;o.push(a),v(o,e,"opsLimit"),("number"!=typeof e||(0|e)!==e||e<0)&&b(o,"opsLimit must be an unsigned integer"),v(o,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(o,"memLimit must be an unsigned integer");var u=new d(0|r._crypto_pwhash_strbytes()).address;if(o.push(u),0==(0|r._crypto_pwhash_str(u,a,s,0,e,0,n))){var c=r.UTF8ToString(u);return m(o),c}y(o,"invalid usage")}function Xt(t,e,n,o){var a=[];h(o),"string"!=typeof t&&b(a,"hashed_password must be a string"),t=i(t+"\0"),null!=u&&t.length-1!==u&&b(a,"invalid hashed_password length");var s=p(t),u=t.length-1;a.push(s),v(a,e,"opsLimit"),("number"!=typeof e||(0|e)!==e||e<0)&&b(a,"opsLimit must be an unsigned integer"),v(a,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(a,"memLimit must be an unsigned integer");var c=0!=(0|r._crypto_pwhash_str_needs_rehash(s,e,0,n));return m(a),c}function Zt(t,e,n){var o=[];h(n),"string"!=typeof t&&b(o,"hashed_password must be a string"),t=i(t+"\0"),null!=s&&t.length-1!==s&&b(o,"invalid hashed_password length");var a=p(t),s=t.length-1;o.push(a);var u=p(e=A(o,e,"password")),c=e.length;o.push(u);var l=0==(0|r._crypto_pwhash_str_verify(a,u,c,0));return m(o),l}function $t(t,e,n){var i=[];h(n),t=A(i,t,"privateKey");var o,a=0|r._crypto_scalarmult_scalarbytes();t.length!==a&&b(i,"invalid privateKey length"),o=p(t),i.push(o),e=A(i,e,"publicKey");var s,u=0|r._crypto_scalarmult_scalarbytes();e.length!==u&&b(i,"invalid publicKey length"),s=p(e),i.push(s);var c=new d(0|r._crypto_scalarmult_bytes()),f=c.address;if(i.push(f),0==(0|r._crypto_scalarmult(f,o,s))){var g=l(c,n);return m(i),g}y(i,"weak public key")}function te(t,e){var n=[];h(e),t=A(n,t,"privateKey");var i,o=0|r._crypto_scalarmult_scalarbytes();t.length!==o&&b(n,"invalid privateKey length"),i=p(t),n.push(i);var a=new d(0|r._crypto_scalarmult_scalarbytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_base(s,i))){var u=l(a,e);return m(n),u}y(n,"insecure scalar")}function ee(t,e,n){var i=[];h(n),t=A(i,t,"scalar");var o,a=0|r._crypto_scalarmult_ristretto255_scalarbytes();t.length!==a&&b(i,"invalid scalar length"),o=p(t),i.push(o),e=A(i,e,"privateKey");var s,u=0|r._crypto_scalarmult_ristretto255_bytes();e.length!==u&&b(i,"invalid privateKey length"),s=p(e),i.push(s);var c=new d(0|r._crypto_scalarmult_ristretto255_bytes()),f=c.address;if(i.push(f),0==(0|r._crypto_scalarmult_ristretto255(f,o,s))){var g=l(c,n);return m(i),g}y(i,"input is zero element")}function re(t,e){var n=[];h(e);var i=p(t=A(n,t,"scalar"));t.length,n.push(i);var o=new d(0|r._crypto_core_ristretto255_bytes()),a=o.address;if(n.push(a),0==(0|r._crypto_scalarmult_ristretto255_base(a,i))){var s=l(o,e);return m(n),s}y(n,"scalar is 0")}function ne(t,e,n,i){var o=[];h(i);var a=p(t=A(o,t,"message")),s=t.length;o.push(a),e=A(o,e,"nonce");var u,c=0|r._crypto_secretbox_noncebytes();e.length!==c&&b(o,"invalid nonce length"),u=p(e),o.push(u),n=A(o,n,"key");var f,g=0|r._crypto_secretbox_keybytes();n.length!==g&&b(o,"invalid key length"),f=p(n),o.push(f);var v=new d(0|s),w=v.address;o.push(w);var _=new d(0|r._crypto_secretbox_macbytes()),E=_.address;if(o.push(E),0==(0|r._crypto_secretbox_detached(w,E,a,s,0,u,f))){var I=l({mac:_,cipher:v},i);return m(o),I}y(o,"invalid usage")}function ie(t,e,n,i){var o=[];h(i);var a=p(t=A(o,t,"message")),s=t.length;o.push(a),e=A(o,e,"nonce");var u,c=0|r._crypto_secretbox_noncebytes();e.length!==c&&b(o,"invalid nonce length"),u=p(e),o.push(u),n=A(o,n,"key");var f,g=0|r._crypto_secretbox_keybytes();n.length!==g&&b(o,"invalid key length"),f=p(n),o.push(f);var v=new d(s+r._crypto_secretbox_macbytes()|0),w=v.address;if(o.push(w),0==(0|r._crypto_secretbox_easy(w,a,s,0,u,f))){var _=l(v,i);return m(o),_}y(o,"invalid usage")}function oe(t){var e=[];h(t);var n=new d(0|r._crypto_secretbox_keybytes()),i=n.address;e.push(i),r._crypto_secretbox_keygen(i);var o=l(n,t);return m(e),o}function ae(t,e,n,i,o){var a=[];h(o);var s=p(t=A(a,t,"ciphertext")),u=t.length;a.push(s),e=A(a,e,"mac");var c,f=0|r._crypto_secretbox_macbytes();e.length!==f&&b(a,"invalid mac length"),c=p(e),a.push(c),n=A(a,n,"nonce");var g,v=0|r._crypto_secretbox_noncebytes();n.length!==v&&b(a,"invalid nonce length"),g=p(n),a.push(g),i=A(a,i,"key");var w,_=0|r._crypto_secretbox_keybytes();i.length!==_&&b(a,"invalid key length"),w=p(i),a.push(w);var E=new d(0|u),I=E.address;if(a.push(I),0==(0|r._crypto_secretbox_open_detached(I,s,c,u,0,g,w))){var S=l(E,o);return m(a),S}y(a,"wrong secret key for the given ciphertext")}function se(t,e,n,i){var o=[];h(i),t=A(o,t,"ciphertext");var a,s=r._crypto_secretbox_macbytes(),u=t.length;u>>0;return m([]),e}function qe(t,e){var n=[];h(e);for(var i=r._malloc(24),o=0;o<6;o++)r.setValue(i+4*o,r.Runtime.addFunction(t[["implementation_name","random","stir","uniform","buf","close"][o]]),"i32");0!=(0|r._randombytes_set_implementation(i))&&y(n,"unsupported implementation"),m(n)}function Ke(t){h(t),r._randombytes_stir()}function Ve(t,e){var n=[];h(e),v(n,t,"upper_bound"),("number"!=typeof t||(0|t)!==t||t<0)&&b(n,"upper_bound must be an unsigned integer");var i=r._randombytes_uniform(t)>>>0;return m(n),i}function We(){var t=r._sodium_version_string(),e=r.UTF8ToString(t);return m([]),e}return d.prototype.to_Uint8Array=function(){var t=new Uint8Array(this.length);return t.set(r.HEAPU8.subarray(this.address,this.address+this.length)),t},t.add=function(t,e){if(!(t instanceof Uint8Array&&e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can added");var r=t.length,n=0,i=0;if(e.length!=t.length)throw new TypeError("Arguments must have the same length");for(i=0;i>=8,n+=t[i]+e[i],t[i]=255&n},t.base64_variants=s,t.compare=function(t,e){if(!(t instanceof Uint8Array&&e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be compared");if(t.length!==e.length)throw new TypeError("Only instances of identical length can be compared");for(var r=0,n=1,i=t.length;i-- >0;)r|=e[i]-t[i]>>8&n,n&=(e[i]^t[i])-1>>8;return r+r+n-1},t.from_base64=function(t,e){e=u(e);var n,i=[],o=new d(3*(t=A(i,t,"input")).length/4),a=p(t),s=g(4),c=g(4);return i.push(a),i.push(o.address),i.push(o.result_bin_len_p),i.push(o.b64_end_p),0!==r._sodium_base642bin(o.address,o.length,a,t.length,0,s,c,e)&&y(i,"invalid input"),r.getValue(c,"i32")-a!==t.length&&y(i,"incomplete input"),o.length=r.getValue(s,"i32"),n=o.to_Uint8Array(),m(i),n},t.from_hex=function(t){var e,n=[],i=new d((t=A(n,t,"input")).length/2),o=p(t),a=g(4);return n.push(o),n.push(i.address),n.push(i.hex_end_p),0!==r._sodium_hex2bin(i.address,i.length,o,t.length,0,0,a)&&y(n,"invalid input"),r.getValue(a,"i32")-o!==t.length&&y(n,"incomplete input"),e=i.to_Uint8Array(),m(n),e},t.from_string=i,t.increment=function(t){if(!(t instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be incremented");for(var e=256,r=0,n=t.length;r>=8,e+=t[r],t[r]=255&e},t.is_zero=function(t){if(!(t instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be checked");for(var e=0,r=0,n=t.length;r 0");var n,i=[],o=g(4),a=1,s=0,u=0|t.length,c=new d(u+e);i.push(o),i.push(c.address);for(var l=c.address,f=c.address+u+e;l>>48|u>>>32|u>>>16|u))-1>>16);return 0!==r._sodium_pad(o,c.address,t.length,e,c.length)&&y(i,"internal error"),c.length=r.getValue(o,"i32"),n=c.to_Uint8Array(),m(i),n},t.unpad=function(t,e){if(!(t instanceof Uint8Array))throw new TypeError("buffer must be a Uint8Array");if((e|=0)<=0)throw new Error("block size must be > 0");var n=[],i=p(t),o=g(4);return n.push(i),n.push(o),0!==r._sodium_unpad(o,i,t.length,e)&&y(n,"unsupported/invalid padding"),t=(t=new Uint8Array(t)).subarray(0,r.getValue(o,"i32")),m(n),t},t.ready=n,t.symbols=function(){return Object.keys(t).sort()},t.to_base64=c,t.to_hex=a,t.to_string=o,t},void 0!==(o="function"===typeof n?n.apply(e,i):n)&&(t.exports=o),s&&a.sodium.ready.then((function(){s(a.sodium)}))}(this)},function(t,e,r){var n,i,o;!function(a){var s="object"==typeof a.sodium&&"function"==typeof a.sodium.onload?a.sodium.onload:null;i=[e,r(2704)],n=function(t,e){"use strict";var r,n=e.ready.then((function(){function n(){if(0!==r._sodium_init())throw new Error("libsodium was not correctly initialized.");for(var e=["crypto_aead_chacha20poly1305_decrypt","crypto_aead_chacha20poly1305_decrypt_detached","crypto_aead_chacha20poly1305_encrypt","crypto_aead_chacha20poly1305_encrypt_detached","crypto_aead_chacha20poly1305_ietf_decrypt","crypto_aead_chacha20poly1305_ietf_decrypt_detached","crypto_aead_chacha20poly1305_ietf_encrypt","crypto_aead_chacha20poly1305_ietf_encrypt_detached","crypto_aead_chacha20poly1305_ietf_keygen","crypto_aead_chacha20poly1305_keygen","crypto_aead_xchacha20poly1305_ietf_decrypt","crypto_aead_xchacha20poly1305_ietf_decrypt_detached","crypto_aead_xchacha20poly1305_ietf_encrypt","crypto_aead_xchacha20poly1305_ietf_encrypt_detached","crypto_aead_xchacha20poly1305_ietf_keygen","crypto_auth","crypto_auth_hmacsha256","crypto_auth_hmacsha256_keygen","crypto_auth_hmacsha256_verify","crypto_auth_hmacsha512","crypto_auth_hmacsha512_keygen","crypto_auth_hmacsha512_verify","crypto_auth_keygen","crypto_auth_verify","crypto_box_beforenm","crypto_box_curve25519xchacha20poly1305_keypair","crypto_box_curve25519xchacha20poly1305_seal","crypto_box_curve25519xchacha20poly1305_seal_open","crypto_box_detached","crypto_box_easy","crypto_box_easy_afternm","crypto_box_keypair","crypto_box_open_detached","crypto_box_open_easy","crypto_box_open_easy_afternm","crypto_box_seal","crypto_box_seal_open","crypto_box_seed_keypair","crypto_core_ed25519_add","crypto_core_ed25519_from_hash","crypto_core_ed25519_from_uniform","crypto_core_ed25519_is_valid_point","crypto_core_ed25519_random","crypto_core_ed25519_scalar_add","crypto_core_ed25519_scalar_complement","crypto_core_ed25519_scalar_invert","crypto_core_ed25519_scalar_mul","crypto_core_ed25519_scalar_negate","crypto_core_ed25519_scalar_random","crypto_core_ed25519_scalar_reduce","crypto_core_ed25519_scalar_sub","crypto_core_ed25519_sub","crypto_core_ristretto255_add","crypto_core_ristretto255_from_hash","crypto_core_ristretto255_is_valid_point","crypto_core_ristretto255_random","crypto_core_ristretto255_scalar_add","crypto_core_ristretto255_scalar_complement","crypto_core_ristretto255_scalar_invert","crypto_core_ristretto255_scalar_mul","crypto_core_ristretto255_scalar_negate","crypto_core_ristretto255_scalar_random","crypto_core_ristretto255_scalar_reduce","crypto_core_ristretto255_scalar_sub","crypto_core_ristretto255_sub","crypto_generichash","crypto_generichash_blake2b_salt_personal","crypto_generichash_final","crypto_generichash_init","crypto_generichash_keygen","crypto_generichash_update","crypto_hash","crypto_hash_sha256","crypto_hash_sha256_final","crypto_hash_sha256_init","crypto_hash_sha256_update","crypto_hash_sha512","crypto_hash_sha512_final","crypto_hash_sha512_init","crypto_hash_sha512_update","crypto_kdf_derive_from_key","crypto_kdf_keygen","crypto_kx_client_session_keys","crypto_kx_keypair","crypto_kx_seed_keypair","crypto_kx_server_session_keys","crypto_onetimeauth","crypto_onetimeauth_final","crypto_onetimeauth_init","crypto_onetimeauth_keygen","crypto_onetimeauth_update","crypto_onetimeauth_verify","crypto_pwhash","crypto_pwhash_scryptsalsa208sha256","crypto_pwhash_scryptsalsa208sha256_ll","crypto_pwhash_scryptsalsa208sha256_str","crypto_pwhash_scryptsalsa208sha256_str_verify","crypto_pwhash_str","crypto_pwhash_str_needs_rehash","crypto_pwhash_str_verify","crypto_scalarmult","crypto_scalarmult_base","crypto_scalarmult_ed25519","crypto_scalarmult_ed25519_base","crypto_scalarmult_ed25519_base_noclamp","crypto_scalarmult_ed25519_noclamp","crypto_scalarmult_ristretto255","crypto_scalarmult_ristretto255_base","crypto_secretbox_detached","crypto_secretbox_easy","crypto_secretbox_keygen","crypto_secretbox_open_detached","crypto_secretbox_open_easy","crypto_secretstream_xchacha20poly1305_init_pull","crypto_secretstream_xchacha20poly1305_init_push","crypto_secretstream_xchacha20poly1305_keygen","crypto_secretstream_xchacha20poly1305_pull","crypto_secretstream_xchacha20poly1305_push","crypto_secretstream_xchacha20poly1305_rekey","crypto_shorthash","crypto_shorthash_keygen","crypto_shorthash_siphashx24","crypto_sign","crypto_sign_detached","crypto_sign_ed25519_pk_to_curve25519","crypto_sign_ed25519_sk_to_curve25519","crypto_sign_ed25519_sk_to_pk","crypto_sign_ed25519_sk_to_seed","crypto_sign_final_create","crypto_sign_final_verify","crypto_sign_init","crypto_sign_keypair","crypto_sign_open","crypto_sign_seed_keypair","crypto_sign_update","crypto_sign_verify_detached","crypto_stream_chacha20","crypto_stream_chacha20_ietf_xor","crypto_stream_chacha20_ietf_xor_ic","crypto_stream_chacha20_keygen","crypto_stream_chacha20_xor","crypto_stream_chacha20_xor_ic","crypto_stream_keygen","crypto_stream_xchacha20_keygen","crypto_stream_xchacha20_xor","crypto_stream_xchacha20_xor_ic","randombytes_buf","randombytes_buf_deterministic","randombytes_close","randombytes_random","randombytes_set_implementation","randombytes_stir","randombytes_uniform","sodium_version_string"],n=[w,_,E,I,S,M,C,k,x,B,O,T,R,P,N,j,D,L,F,U,Q,G,H,z,q,K,V,W,J,Y,X,Z,$,tt,et,rt,nt,it,ot,at,st,ut,ct,lt,ft,ht,dt,pt,gt,mt,yt,bt,vt,At,wt,_t,Et,It,St,Mt,Ct,kt,xt,Bt,Ot,Tt,Rt,Pt,Nt,jt,Dt,Lt,Ft,Ut,Qt,Gt,Ht,zt,qt,Kt,Vt,Wt,Jt,Yt,Xt,Zt,$t,te,ee,re,ne,ie,oe,ae,se,ue,ce,le,fe,he,de,pe,ge,me,ye,be,ve,Ae,we,_e,Ee,Ie,Se,Me,Ce,ke,xe,Be,Oe,Te,Re,Pe,Ne,je,De,Le,Fe,Ue,Qe,Ge,He,ze,qe,Ke,Ve,We,Je,Ye,Xe,Ze,$e,tr,er,rr,nr,ir,or,ar,sr,ur,cr,lr,fr,hr],i=0;i=240?(l=4,u=!0):f>=224?(l=3,u=!0):f>=192?(l=2,u=!0):f<128&&(l=1,u=!0)}while(!u);for(var h=l-(s.length-c),d=0;d>8&-39)<<8|87+(e=t[o]>>>4)+(e-10>>8&-39),i+=String.fromCharCode(255&n)+String.fromCharCode(n>>>8);return i}var s={ORIGINAL:1,ORIGINAL_NO_PADDING:3,URLSAFE:5,URLSAFE_NO_PADDING:7};function u(t){if(null==t)return s.URLSAFE_NO_PADDING;if(t!==s.ORIGINAL&&t!==s.ORIGINAL_NO_PADDING&&t!==s.URLSAFE&&t!=s.URLSAFE_NO_PADDING)throw new Error("unsupported base64 variant");return t}function c(t,e){e=u(e),t=A(i,t,"input");var n,i=[],a=0|Math.floor(t.length/3),s=t.length-3*a,c=4*a+(0!==s?0==(2&e)?4:2+(s>>>1):0),l=new d(c+1),f=p(t);return i.push(f),i.push(l.address),0===r._sodium_bin2base64(l.address,l.length,f,t.length,e)&&y(i,"conversion failed"),l.length=c,n=o(l.to_Uint8Array()),m(i),n}function l(t,e){var r=e||"uint8array";if(!f(r))throw new Error(r+" output format is not available");if(t instanceof d){if("uint8array"===r)return t.to_Uint8Array();if("text"===r)return o(t.to_Uint8Array());if("hex"===r)return a(t.to_Uint8Array());if("base64"===r)return c(t.to_Uint8Array(),s.URLSAFE_NO_PADDING);throw new Error('What is output format "'+r+'"?')}if("object"==typeof t){for(var n=Object.keys(t),i={},u=0;u>>24>>>8,u,f);var _=l(y,a);return m(s),_}function Wt(t){var e=[];h(t);var n=new d(0|r._crypto_kdf_keybytes()),i=n.address;e.push(i),r._crypto_kdf_keygen(i);var o=l(n,t);return m(e),o}function Jt(t,e,n,i){var o=[];h(i),t=A(o,t,"clientPublicKey");var a,s=0|r._crypto_kx_publickeybytes();t.length!==s&&b(o,"invalid clientPublicKey length"),a=p(t),o.push(a),e=A(o,e,"clientSecretKey");var u,c=0|r._crypto_kx_secretkeybytes();e.length!==c&&b(o,"invalid clientSecretKey length"),u=p(e),o.push(u),n=A(o,n,"serverPublicKey");var f,g=0|r._crypto_kx_publickeybytes();n.length!==g&&b(o,"invalid serverPublicKey length"),f=p(n),o.push(f);var v=new d(0|r._crypto_kx_sessionkeybytes()),w=v.address;o.push(w);var _=new d(0|r._crypto_kx_sessionkeybytes()),E=_.address;if(o.push(E),0==(0|r._crypto_kx_client_session_keys(w,E,a,u,f))){var I=l({sharedRx:v,sharedTx:_},i);return m(o),I}y(o,"invalid usage")}function Yt(t){var e=[];h(t);var n=new d(0|r._crypto_kx_publickeybytes()),i=n.address;e.push(i);var o=new d(0|r._crypto_kx_secretkeybytes()),a=o.address;if(e.push(a),0==(0|r._crypto_kx_keypair(i,a))){var s={publicKey:l(n,t),privateKey:l(o,t),keyType:"x25519"};return m(e),s}y(e,"internal error")}function Xt(t,e){var n=[];h(e),t=A(n,t,"seed");var i,o=0|r._crypto_kx_seedbytes();t.length!==o&&b(n,"invalid seed length"),i=p(t),n.push(i);var a=new d(0|r._crypto_kx_publickeybytes()),s=a.address;n.push(s);var u=new d(0|r._crypto_kx_secretkeybytes()),c=u.address;if(n.push(c),0==(0|r._crypto_kx_seed_keypair(s,c,i))){var f={publicKey:l(a,e),privateKey:l(u,e),keyType:"x25519"};return m(n),f}y(n,"internal error")}function Zt(t,e,n,i){var o=[];h(i),t=A(o,t,"serverPublicKey");var a,s=0|r._crypto_kx_publickeybytes();t.length!==s&&b(o,"invalid serverPublicKey length"),a=p(t),o.push(a),e=A(o,e,"serverSecretKey");var u,c=0|r._crypto_kx_secretkeybytes();e.length!==c&&b(o,"invalid serverSecretKey length"),u=p(e),o.push(u),n=A(o,n,"clientPublicKey");var f,g=0|r._crypto_kx_publickeybytes();n.length!==g&&b(o,"invalid clientPublicKey length"),f=p(n),o.push(f);var v=new d(0|r._crypto_kx_sessionkeybytes()),w=v.address;o.push(w);var _=new d(0|r._crypto_kx_sessionkeybytes()),E=_.address;if(o.push(E),0==(0|r._crypto_kx_server_session_keys(w,E,a,u,f))){var I=l({sharedRx:v,sharedTx:_},i);return m(o),I}y(o,"invalid usage")}function $t(t,e,n){var i=[];h(n);var o=p(t=A(i,t,"message")),a=t.length;i.push(o),e=A(i,e,"key");var s,u=0|r._crypto_onetimeauth_keybytes();e.length!==u&&b(i,"invalid key length"),s=p(e),i.push(s);var c=new d(0|r._crypto_onetimeauth_bytes()),f=c.address;if(i.push(f),0==(0|r._crypto_onetimeauth(f,o,a,0,s))){var g=l(c,n);return m(i),g}y(i,"invalid usage")}function te(t,e){var n=[];h(e),v(n,t,"state_address");var i=new d(0|r._crypto_onetimeauth_bytes()),o=i.address;if(n.push(o),0==(0|r._crypto_onetimeauth_final(t,o))){var a=(r._free(t),l(i,e));return m(n),a}y(n,"invalid usage")}function ee(t,e){var n=[];h(e);var i=null;null!=t&&(i=p(t=A(n,t,"key")),t.length,n.push(i));var o=new d(144).address;if(0==(0|r._crypto_onetimeauth_init(o,i))){var a=o;return m(n),a}y(n,"invalid usage")}function re(t){var e=[];h(t);var n=new d(0|r._crypto_onetimeauth_keybytes()),i=n.address;e.push(i),r._crypto_onetimeauth_keygen(i);var o=l(n,t);return m(e),o}function ne(t,e,n){var i=[];h(n),v(i,t,"state_address");var o=p(e=A(i,e,"message_chunk")),a=e.length;i.push(o),0!=(0|r._crypto_onetimeauth_update(t,o,a))&&y(i,"invalid usage"),m(i)}function ie(t,e,n){var i=[];t=A(i,t,"hash");var o,a=0|r._crypto_onetimeauth_bytes();t.length!==a&&b(i,"invalid hash length"),o=p(t),i.push(o);var s=p(e=A(i,e,"message")),u=e.length;i.push(s),n=A(i,n,"key");var c,l=0|r._crypto_onetimeauth_keybytes();n.length!==l&&b(i,"invalid key length"),c=p(n),i.push(c);var f=0==(0|r._crypto_onetimeauth_verify(o,s,u,0,c));return m(i),f}function oe(t,e,n,i,o,a,s){var u=[];h(s),v(u,t,"keyLength"),("number"!=typeof t||(0|t)!==t||t<0)&&b(u,"keyLength must be an unsigned integer");var c=p(e=A(u,e,"password")),f=e.length;u.push(c),n=A(u,n,"salt");var g,w=0|r._crypto_pwhash_saltbytes();n.length!==w&&b(u,"invalid salt length"),g=p(n),u.push(g),v(u,i,"opsLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&b(u,"opsLimit must be an unsigned integer"),v(u,o,"memLimit"),("number"!=typeof o||(0|o)!==o||o<0)&&b(u,"memLimit must be an unsigned integer"),v(u,a,"algorithm"),("number"!=typeof a||(0|a)!==a||a<0)&&b(u,"algorithm must be an unsigned integer");var _=new d(0|t),E=_.address;if(u.push(E),0==(0|r._crypto_pwhash(E,t,0,c,f,0,g,i,0,o,a))){var I=l(_,s);return m(u),I}y(u,"invalid usage")}function ae(t,e,n,i,o,a){var s=[];h(a),v(s,t,"keyLength"),("number"!=typeof t||(0|t)!==t||t<0)&&b(s,"keyLength must be an unsigned integer");var u=p(e=A(s,e,"password")),c=e.length;s.push(u),n=A(s,n,"salt");var f,g=0|r._crypto_pwhash_scryptsalsa208sha256_saltbytes();n.length!==g&&b(s,"invalid salt length"),f=p(n),s.push(f),v(s,i,"opsLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&b(s,"opsLimit must be an unsigned integer"),v(s,o,"memLimit"),("number"!=typeof o||(0|o)!==o||o<0)&&b(s,"memLimit must be an unsigned integer");var w=new d(0|t),_=w.address;if(s.push(_),0==(0|r._crypto_pwhash_scryptsalsa208sha256(_,t,0,u,c,0,f,i,0,o))){var E=l(w,a);return m(s),E}y(s,"invalid usage")}function se(t,e,n,i,o,a,s){var u=[];h(s);var c=p(t=A(u,t,"password")),f=t.length;u.push(c);var g=p(e=A(u,e,"salt")),w=e.length;u.push(g),v(u,n,"opsLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(u,"opsLimit must be an unsigned integer"),v(u,i,"r"),("number"!=typeof i||(0|i)!==i||i<0)&&b(u,"r must be an unsigned integer"),v(u,o,"p"),("number"!=typeof o||(0|o)!==o||o<0)&&b(u,"p must be an unsigned integer"),v(u,a,"keyLength"),("number"!=typeof a||(0|a)!==a||a<0)&&b(u,"keyLength must be an unsigned integer");var _=new d(0|a),E=_.address;if(u.push(E),0==(0|r._crypto_pwhash_scryptsalsa208sha256_ll(c,f,g,w,n,0,i,o,E,a))){var I=l(_,s);return m(u),I}y(u,"invalid usage")}function ue(t,e,n,i){var o=[];h(i);var a=p(t=A(o,t,"password")),s=t.length;o.push(a),v(o,e,"opsLimit"),("number"!=typeof e||(0|e)!==e||e<0)&&b(o,"opsLimit must be an unsigned integer"),v(o,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(o,"memLimit must be an unsigned integer");var u=new d(0|r._crypto_pwhash_scryptsalsa208sha256_strbytes()).address;if(o.push(u),0==(0|r._crypto_pwhash_scryptsalsa208sha256_str(u,a,s,0,e,0,n))){var c=r.UTF8ToString(u);return m(o),c}y(o,"invalid usage")}function ce(t,e,n){var o=[];h(n),"string"!=typeof t&&b(o,"hashed_password must be a string"),t=i(t+"\0"),null!=s&&t.length-1!==s&&b(o,"invalid hashed_password length");var a=p(t),s=t.length-1;o.push(a);var u=p(e=A(o,e,"password")),c=e.length;o.push(u);var l=0==(0|r._crypto_pwhash_scryptsalsa208sha256_str_verify(a,u,c,0));return m(o),l}function le(t,e,n,i){var o=[];h(i);var a=p(t=A(o,t,"password")),s=t.length;o.push(a),v(o,e,"opsLimit"),("number"!=typeof e||(0|e)!==e||e<0)&&b(o,"opsLimit must be an unsigned integer"),v(o,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(o,"memLimit must be an unsigned integer");var u=new d(0|r._crypto_pwhash_strbytes()).address;if(o.push(u),0==(0|r._crypto_pwhash_str(u,a,s,0,e,0,n))){var c=r.UTF8ToString(u);return m(o),c}y(o,"invalid usage")}function fe(t,e,n,o){var a=[];h(o),"string"!=typeof t&&b(a,"hashed_password must be a string"),t=i(t+"\0"),null!=u&&t.length-1!==u&&b(a,"invalid hashed_password length");var s=p(t),u=t.length-1;a.push(s),v(a,e,"opsLimit"),("number"!=typeof e||(0|e)!==e||e<0)&&b(a,"opsLimit must be an unsigned integer"),v(a,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(a,"memLimit must be an unsigned integer");var c=0!=(0|r._crypto_pwhash_str_needs_rehash(s,e,0,n));return m(a),c}function he(t,e,n){var o=[];h(n),"string"!=typeof t&&b(o,"hashed_password must be a string"),t=i(t+"\0"),null!=s&&t.length-1!==s&&b(o,"invalid hashed_password length");var a=p(t),s=t.length-1;o.push(a);var u=p(e=A(o,e,"password")),c=e.length;o.push(u);var l=0==(0|r._crypto_pwhash_str_verify(a,u,c,0));return m(o),l}function de(t,e,n){var i=[];h(n),t=A(i,t,"privateKey");var o,a=0|r._crypto_scalarmult_scalarbytes();t.length!==a&&b(i,"invalid privateKey length"),o=p(t),i.push(o),e=A(i,e,"publicKey");var s,u=0|r._crypto_scalarmult_bytes();e.length!==u&&b(i,"invalid publicKey length"),s=p(e),i.push(s);var c=new d(0|r._crypto_scalarmult_bytes()),f=c.address;if(i.push(f),0==(0|r._crypto_scalarmult(f,o,s))){var g=l(c,n);return m(i),g}y(i,"weak public key")}function pe(t,e){var n=[];h(e),t=A(n,t,"privateKey");var i,o=0|r._crypto_scalarmult_scalarbytes();t.length!==o&&b(n,"invalid privateKey length"),i=p(t),n.push(i);var a=new d(0|r._crypto_scalarmult_bytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_base(s,i))){var u=l(a,e);return m(n),u}y(n,"unknown error")}function ge(t,e,n){var i=[];h(n),t=A(i,t,"n");var o,a=0|r._crypto_scalarmult_ed25519_scalarbytes();t.length!==a&&b(i,"invalid n length"),o=p(t),i.push(o),e=A(i,e,"p");var s,u=0|r._crypto_scalarmult_ed25519_bytes();e.length!==u&&b(i,"invalid p length"),s=p(e),i.push(s);var c=new d(0|r._crypto_scalarmult_ed25519_bytes()),f=c.address;if(i.push(f),0==(0|r._crypto_scalarmult_ed25519(f,o,s))){var g=l(c,n);return m(i),g}y(i,"invalid point or scalar is 0")}function me(t,e){var n=[];h(e),t=A(n,t,"scalar");var i,o=0|r._crypto_scalarmult_ed25519_scalarbytes();t.length!==o&&b(n,"invalid scalar length"),i=p(t),n.push(i);var a=new d(0|r._crypto_scalarmult_ed25519_bytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_ed25519_base(s,i))){var u=l(a,e);return m(n),u}y(n,"scalar is 0")}function ye(t,e){var n=[];h(e),t=A(n,t,"scalar");var i,o=0|r._crypto_scalarmult_ed25519_scalarbytes();t.length!==o&&b(n,"invalid scalar length"),i=p(t),n.push(i);var a=new d(0|r._crypto_scalarmult_ed25519_bytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_ed25519_base_noclamp(s,i))){var u=l(a,e);return m(n),u}y(n,"scalar is 0")}function be(t,e,n){var i=[];h(n),t=A(i,t,"n");var o,a=0|r._crypto_scalarmult_ed25519_scalarbytes();t.length!==a&&b(i,"invalid n length"),o=p(t),i.push(o),e=A(i,e,"p");var s,u=0|r._crypto_scalarmult_ed25519_bytes();e.length!==u&&b(i,"invalid p length"),s=p(e),i.push(s);var c=new d(0|r._crypto_scalarmult_ed25519_bytes()),f=c.address;if(i.push(f),0==(0|r._crypto_scalarmult_ed25519_noclamp(f,o,s))){var g=l(c,n);return m(i),g}y(i,"invalid point or scalar is 0")}function ve(t,e,n){var i=[];h(n),t=A(i,t,"scalar");var o,a=0|r._crypto_scalarmult_ristretto255_scalarbytes();t.length!==a&&b(i,"invalid scalar length"),o=p(t),i.push(o),e=A(i,e,"element");var s,u=0|r._crypto_scalarmult_ristretto255_bytes();e.length!==u&&b(i,"invalid element length"),s=p(e),i.push(s);var c=new d(0|r._crypto_scalarmult_ristretto255_bytes()),f=c.address;if(i.push(f),0==(0|r._crypto_scalarmult_ristretto255(f,o,s))){var g=l(c,n);return m(i),g}y(i,"result is identity element")}function Ae(t,e){var n=[];h(e),t=A(n,t,"scalar");var i,o=0|r._crypto_core_ristretto255_scalarbytes();t.length!==o&&b(n,"invalid scalar length"),i=p(t),n.push(i);var a=new d(0|r._crypto_core_ristretto255_bytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_ristretto255_base(s,i))){var u=l(a,e);return m(n),u}y(n,"scalar is 0")}function we(t,e,n,i){var o=[];h(i);var a=p(t=A(o,t,"message")),s=t.length;o.push(a),e=A(o,e,"nonce");var u,c=0|r._crypto_secretbox_noncebytes();e.length!==c&&b(o,"invalid nonce length"),u=p(e),o.push(u),n=A(o,n,"key");var f,g=0|r._crypto_secretbox_keybytes();n.length!==g&&b(o,"invalid key length"),f=p(n),o.push(f);var v=new d(0|s),w=v.address;o.push(w);var _=new d(0|r._crypto_secretbox_macbytes()),E=_.address;if(o.push(E),0==(0|r._crypto_secretbox_detached(w,E,a,s,0,u,f))){var I=l({mac:_,cipher:v},i);return m(o),I}y(o,"invalid usage")}function _e(t,e,n,i){var o=[];h(i);var a=p(t=A(o,t,"message")),s=t.length;o.push(a),e=A(o,e,"nonce");var u,c=0|r._crypto_secretbox_noncebytes();e.length!==c&&b(o,"invalid nonce length"),u=p(e),o.push(u),n=A(o,n,"key");var f,g=0|r._crypto_secretbox_keybytes();n.length!==g&&b(o,"invalid key length"),f=p(n),o.push(f);var v=new d(s+r._crypto_secretbox_macbytes()|0),w=v.address;if(o.push(w),0==(0|r._crypto_secretbox_easy(w,a,s,0,u,f))){var _=l(v,i);return m(o),_}y(o,"invalid usage")}function Ee(t){var e=[];h(t);var n=new d(0|r._crypto_secretbox_keybytes()),i=n.address;e.push(i),r._crypto_secretbox_keygen(i);var o=l(n,t);return m(e),o}function Ie(t,e,n,i,o){var a=[];h(o);var s=p(t=A(a,t,"ciphertext")),u=t.length;a.push(s),e=A(a,e,"mac");var c,f=0|r._crypto_secretbox_macbytes();e.length!==f&&b(a,"invalid mac length"),c=p(e),a.push(c),n=A(a,n,"nonce");var g,v=0|r._crypto_secretbox_noncebytes();n.length!==v&&b(a,"invalid nonce length"),g=p(n),a.push(g),i=A(a,i,"key");var w,_=0|r._crypto_secretbox_keybytes();i.length!==_&&b(a,"invalid key length"),w=p(i),a.push(w);var E=new d(0|u),I=E.address;if(a.push(I),0==(0|r._crypto_secretbox_open_detached(I,s,c,u,0,g,w))){var S=l(E,o);return m(a),S}y(a,"wrong secret key for the given ciphertext")}function Se(t,e,n,i){var o=[];h(i),t=A(o,t,"ciphertext");var a,s=r._crypto_secretbox_macbytes(),u=t.length;u>>0;return m([]),e}function cr(t,e){var n=[];h(e);for(var i=r._malloc(24),o=0;o<6;o++)r.setValue(i+4*o,r.Runtime.addFunction(t[["implementation_name","random","stir","uniform","buf","close"][o]]),"i32");0!=(0|r._randombytes_set_implementation(i))&&y(n,"unsupported implementation"),m(n)}function lr(t){h(t),r._randombytes_stir()}function fr(t,e){var n=[];h(e),v(n,t,"upper_bound"),("number"!=typeof t||(0|t)!==t||t<0)&&b(n,"upper_bound must be an unsigned integer");var i=r._randombytes_uniform(t)>>>0;return m(n),i}function hr(){var t=r._sodium_version_string(),e=r.UTF8ToString(t);return m([]),e}return d.prototype.to_Uint8Array=function(){var t=new Uint8Array(this.length);return t.set(r.HEAPU8.subarray(this.address,this.address+this.length)),t},t.add=function(t,e){if(!(t instanceof Uint8Array&&e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can added");var r=t.length,n=0,i=0;if(e.length!=t.length)throw new TypeError("Arguments must have the same length");for(i=0;i>=8,n+=t[i]+e[i],t[i]=255&n},t.base64_variants=s,t.compare=function(t,e){if(!(t instanceof Uint8Array&&e instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be compared");if(t.length!==e.length)throw new TypeError("Only instances of identical length can be compared");for(var r=0,n=1,i=t.length;i-- >0;)r|=e[i]-t[i]>>8&n,n&=(e[i]^t[i])-1>>8;return r+r+n-1},t.from_base64=function(t,e){e=u(e);var n,i=[],o=new d(3*(t=A(i,t,"input")).length/4),a=p(t),s=g(4),c=g(4);return i.push(a),i.push(o.address),i.push(o.result_bin_len_p),i.push(o.b64_end_p),0!==r._sodium_base642bin(o.address,o.length,a,t.length,0,s,c,e)&&y(i,"invalid input"),r.getValue(c,"i32")-a!==t.length&&y(i,"incomplete input"),o.length=r.getValue(s,"i32"),n=o.to_Uint8Array(),m(i),n},t.from_hex=function(t){var e,n=[],i=new d((t=A(n,t,"input")).length/2),o=p(t),a=g(4);return n.push(o),n.push(i.address),n.push(i.hex_end_p),0!==r._sodium_hex2bin(i.address,i.length,o,t.length,0,0,a)&&y(n,"invalid input"),r.getValue(a,"i32")-o!==t.length&&y(n,"incomplete input"),e=i.to_Uint8Array(),m(n),e},t.from_string=i,t.increment=function(t){if(!(t instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be incremented");for(var e=256,r=0,n=t.length;r>=8,e+=t[r],t[r]=255&e},t.is_zero=function(t){if(!(t instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be checked");for(var e=0,r=0,n=t.length;r 0");var n,i=[],o=g(4),a=1,s=0,u=0|t.length,c=new d(u+e);i.push(o),i.push(c.address);for(var l=c.address,f=c.address+u+e;l>>48|u>>>32|u>>>16|u))-1>>16);return 0!==r._sodium_pad(o,c.address,t.length,e,c.length)&&y(i,"internal error"),c.length=r.getValue(o,"i32"),n=c.to_Uint8Array(),m(i),n},t.unpad=function(t,e){if(!(t instanceof Uint8Array))throw new TypeError("buffer must be a Uint8Array");if((e|=0)<=0)throw new Error("block size must be > 0");var n=[],i=p(t),o=g(4);return n.push(i),n.push(o),0!==r._sodium_unpad(o,i,t.length,e)&&y(n,"unsupported/invalid padding"),t=(t=new Uint8Array(t)).subarray(0,r.getValue(o,"i32")),m(n),t},t.ready=n,t.symbols=function(){return Object.keys(t).sort()},t.to_base64=c,t.to_hex=a,t.to_string=o,t},void 0!==(o="function"===typeof n?n.apply(e,i):n)&&(t.exports=o),s&&a.sodium.ready.then((function(){s(a.sodium)}))}(this)},function(t,e,r){"use strict";r(178);var n=r(447);r.d(e,"parseConnectionError",(function(){return n.d}));var i=r(1316);r.o(i,"IJsonRpcProvider")&&r.d(e,"IJsonRpcProvider",(function(){return i.IJsonRpcProvider})),r.o(i,"formatJsonRpcError")&&r.d(e,"formatJsonRpcError",(function(){return i.formatJsonRpcError})),r.o(i,"formatJsonRpcRequest")&&r.d(e,"formatJsonRpcRequest",(function(){return i.formatJsonRpcRequest})),r.o(i,"formatJsonRpcResult")&&r.d(e,"formatJsonRpcResult",(function(){return i.formatJsonRpcResult})),r.o(i,"getBigIntRpcId")&&r.d(e,"getBigIntRpcId",(function(){return i.getBigIntRpcId})),r.o(i,"isHttpUrl")&&r.d(e,"isHttpUrl",(function(){return i.isHttpUrl})),r.o(i,"isJsonRpcError")&&r.d(e,"isJsonRpcError",(function(){return i.isJsonRpcError})),r.o(i,"isJsonRpcRequest")&&r.d(e,"isJsonRpcRequest",(function(){return i.isJsonRpcRequest})),r.o(i,"isJsonRpcResponse")&&r.d(e,"isJsonRpcResponse",(function(){return i.isJsonRpcResponse})),r.o(i,"isJsonRpcResult")&&r.d(e,"isJsonRpcResult",(function(){return i.isJsonRpcResult})),r.o(i,"isLocalhostUrl")&&r.d(e,"isLocalhostUrl",(function(){return i.isLocalhostUrl})),r.o(i,"isReactNative")&&r.d(e,"isReactNative",(function(){return i.isReactNative})),r.o(i,"isWsUrl")&&r.d(e,"isWsUrl",(function(){return i.isWsUrl})),r.o(i,"payloadId")&&r.d(e,"payloadId",(function(){return i.payloadId}));var o=r(1317);r.d(e,"formatJsonRpcError",(function(){return o.a})),r.d(e,"formatJsonRpcRequest",(function(){return o.b})),r.d(e,"formatJsonRpcResult",(function(){return o.c})),r.d(e,"getBigIntRpcId",(function(){return o.d})),r.d(e,"payloadId",(function(){return o.e}));r(1318);var a=r(1347);r.d(e,"IJsonRpcProvider",(function(){return a.a}));var s=r(1319);r.d(e,"isHttpUrl",(function(){return s.a})),r.d(e,"isLocalhostUrl",(function(){return s.b})),r.d(e,"isWsUrl",(function(){return s.c}));var u=r(1320);r.d(e,"isJsonRpcError",(function(){return u.a})),r.d(e,"isJsonRpcRequest",(function(){return u.b})),r.d(e,"isJsonRpcResponse",(function(){return u.c})),r.d(e,"isJsonRpcResult",(function(){return u.d}))},function(t,e,r){var n=r(2175);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,e,r){"use strict";r.d(e,"i",(function(){return a})),r.d(e,"h",(function(){return u})),r.d(e,"a",(function(){return c})),r.d(e,"b",(function(){return l})),r.d(e,"k",(function(){return f})),r.d(e,"j",(function(){return h})),r.d(e,"g",(function(){return p})),r.d(e,"d",(function(){return g})),r.d(e,"e",(function(){return m})),r.d(e,"c",(function(){return y})),r.d(e,"f",(function(){return b}));const n=new(r(120).a)("bytes/5.6.1");function i(t){return!!t.toHexString}function o(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function a(t){return h(t)&&!(t.length%2)||u(t)}function s(t){return"number"===typeof t&&t==t&&t%1===0}function u(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"===typeof t)return!1;if(!s(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function c(t,e){if(e||(e={}),"number"===typeof t){n.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),o(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),i(t)&&(t=t.toHexString()),h(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",t));const i=[];for(let t=0;tc(t))),r=e.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(r);return e.reduce(((t,e)=>(n.set(e,t),t+e.length)),0),o(n)}function f(t){let e=c(t);if(0===e.length)return e;let r=0;for(;r>4]+d[15&n]}return e}return n.throwArgumentError("invalid hexlify value","value",t)}function g(t){if("string"!==typeof t)t=p(t);else if(!h(t)||t.length%2)return null;return(t.length-2)/2}function m(t,e,r){return"string"!==typeof t?t=p(t):(!h(t)||t.length%2)&&n.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function y(t){let e="0x";return t.forEach((t=>{e+=p(t).substring(2)})),e}function b(t,e){for("string"!==typeof t?t=p(t):h(t)||n.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&n.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2886),i=r(955),o=r(2887),a=r(361),s=r(400),u=r(2904);e.compare=n.compare,e.concat=i.concat,e.equals=o.equals,e.fromString=a.fromString,e.toString=s.toString,e.xor=u.xor},function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"d",(function(){return a})),r.d(e,"f",(function(){return u})),r.d(e,"e",(function(){return c})),r.d(e,"h",(function(){return l})),r.d(e,"i",(function(){return f})),r.d(e,"j",(function(){return h})),r.d(e,"g",(function(){return p})),r.d(e,"k",(function(){return m}));var n={prefix:"fas",iconName:"angle-left",icon:[256,512,[8249],"f104","M192 448c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l137.4 137.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448z"]},i={prefix:"fas",iconName:"check",icon:[448,512,[10004,10003],"f00c","M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z"]},o={prefix:"fas",iconName:"check-double",icon:[448,512,[],"f560","M182.6 246.6C170.1 259.1 149.9 259.1 137.4 246.6L57.37 166.6C44.88 154.1 44.88 133.9 57.37 121.4C69.87 108.9 90.13 108.9 102.6 121.4L159.1 178.7L297.4 41.37C309.9 28.88 330.1 28.88 342.6 41.37C355.1 53.87 355.1 74.13 342.6 86.63L182.6 246.6zM182.6 470.6C170.1 483.1 149.9 483.1 137.4 470.6L9.372 342.6C-3.124 330.1-3.124 309.9 9.372 297.4C21.87 284.9 42.13 284.9 54.63 297.4L159.1 402.7L393.4 169.4C405.9 156.9 426.1 156.9 438.6 169.4C451.1 181.9 451.1 202.1 438.6 214.6L182.6 470.6z"]},a={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"]},s={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM232 152C232 138.8 242.8 128 256 128s24 10.75 24 24v128c0 13.25-10.75 24-24 24S232 293.3 232 280V152zM256 400c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 385.9 273.4 400 256 400z"]},u=s,c={prefix:"fas",iconName:"copy",icon:[512,512,[],"f0c5","M384 96L384 0h-112c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48H464c26.51 0 48-21.49 48-48V128h-95.1C398.4 128 384 113.6 384 96zM416 0v96h96L416 0zM192 352V128h-144c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h192c26.51 0 48-21.49 48-48L288 416h-32C220.7 416 192 387.3 192 352z"]},l={prefix:"fas",iconName:"file-signature",icon:[576,512,[],"f573","M292.7 342.3C289.7 345.3 288 349.4 288 353.7V416h62.34c4.264 0 8.35-1.703 11.35-4.727l156.9-158l-67.88-67.88L292.7 342.3zM568.5 167.4L536.6 135.5c-9.875-10-26-10-36 0l-27.25 27.25l67.88 67.88l27.25-27.25C578.5 193.4 578.5 177.3 568.5 167.4zM256 0v128h128L256 0zM256 448c-16.07-.2852-30.62-9.359-37.88-23.88c-2.875-5.875-8-6.5-10.12-6.5s-7.25 .625-10 6.125l-7.749 15.38C187.6 444.6 181.1 448 176 448H174.9c-6.5-.5-12-4.75-14-11L144 386.6L133.4 418.5C127.5 436.1 111 448 92.45 448H80C71.13 448 64 440.9 64 432S71.13 416 80 416h12.4c4.875 0 9.102-3.125 10.6-7.625l18.25-54.63C124.5 343.9 133.6 337.3 144 337.3s19.5 6.625 22.75 16.5l13.88 41.63c19.75-16.25 54.13-9.75 66 14.12C248.5 413.2 252.2 415.6 256 415.9V347c0-8.523 3.402-16.7 9.451-22.71L384 206.5V160H256c-17.67 0-32-14.33-32-32L224 0H48C21.49 0 0 21.49 0 48v416C0 490.5 21.49 512 48 512h288c26.51 0 48-21.49 48-48V448H256z"]},f={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M172.5 131.1C228.1 75.51 320.5 75.51 376.1 131.1C426.1 181.1 433.5 260.8 392.4 318.3L391.3 319.9C381 334.2 361 337.6 346.7 327.3C332.3 317 328.9 297 339.2 282.7L340.3 281.1C363.2 249 359.6 205.1 331.7 177.2C300.3 145.8 249.2 145.8 217.7 177.2L105.5 289.5C73.99 320.1 73.99 372 105.5 403.5C133.3 431.4 177.3 435 209.3 412.1L210.9 410.1C225.3 400.7 245.3 404 255.5 418.4C265.8 432.8 262.5 452.8 248.1 463.1L246.5 464.2C188.1 505.3 110.2 498.7 60.21 448.8C3.741 392.3 3.741 300.7 60.21 244.3L172.5 131.1zM467.5 380C411 436.5 319.5 436.5 263 380C213 330 206.5 251.2 247.6 193.7L248.7 192.1C258.1 177.8 278.1 174.4 293.3 184.7C307.7 194.1 311.1 214.1 300.8 229.3L299.7 230.9C276.8 262.1 280.4 306.9 308.3 334.8C339.7 366.2 390.8 366.2 422.3 334.8L534.5 222.5C566 191 566 139.1 534.5 108.5C506.7 80.63 462.7 76.99 430.7 99.9L429.1 101C414.7 111.3 394.7 107.1 384.5 93.58C374.2 79.2 377.5 59.21 391.9 48.94L393.5 47.82C451 6.731 529.8 13.25 579.8 63.24C636.3 119.7 636.3 211.3 579.8 267.7L467.5 380z"]},h={prefix:"fas",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127","M185.7 120.3C242.5 75.82 324.7 79.73 376.1 131.1C420.1 175.1 430.9 239.6 406.7 293.5L438.6 318.4L534.5 222.5C566 191 566 139.1 534.5 108.5C506.7 80.63 462.7 76.1 430.7 99.9L429.1 101C414.7 111.3 394.7 107.1 384.5 93.58C374.2 79.2 377.5 59.21 391.9 48.94L393.5 47.82C451 6.732 529.8 13.25 579.8 63.24C636.3 119.7 636.3 211.3 579.8 267.7L489.3 358.2L630.8 469.1C641.2 477.3 643.1 492.4 634.9 502.8C626.7 513.2 611.6 515.1 601.2 506.9L9.196 42.89C-1.236 34.71-3.065 19.63 5.112 9.196C13.29-1.236 28.37-3.065 38.81 5.112L185.7 120.3zM238.1 161.1L353.4 251.7C359.3 225.5 351.7 197.2 331.7 177.2C306.6 152.1 269.1 147 238.1 161.1V161.1zM263 380C233.1 350.1 218.7 309.8 220.9 270L406.6 416.4C357.4 431 301.9 418.9 263 380V380zM116.6 187.9L167.2 227.8L105.5 289.5C73.99 320.1 73.99 372 105.5 403.5C133.3 431.4 177.3 435 209.3 412.1L210.9 410.1C225.3 400.7 245.3 404 255.5 418.4C265.8 432.8 262.5 452.8 248.1 463.1L246.5 464.2C188.1 505.3 110.2 498.7 60.21 448.8C3.741 392.3 3.741 300.7 60.21 244.3L116.6 187.9z"]},d={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z"]},p=d,g={prefix:"fas",iconName:"xmark",icon:[320,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"]},m=g},function(t,e,r){var n=r(162);function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}t.exports=function(t){for(var e=1;e{throw n}))}}class p extends a.EventEmitter{emit(t){let e="error"===t;const r=this._events;if(void 0!==r)e=e&&void 0===r.error;else if(!e)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o0&&([t]=i),t instanceof Error)throw t;const e=new Error("Unhandled error.".concat(t?" (".concat(t.message,")"):""));throw e.context=t,e}const a=r[t];if(void 0===a)return!1;if("function"===typeof a)d(a,this,i);else{const t=a.length,e=function(t){const e=t.length,r=new Array(e);for(let n=0;n{const o=t[e.method];return void 0===o?n():"function"===typeof o?o(e,r,n,i):(r.result=o,i())}}function y(t){return async(e,r,n,i)=>{let o;const a=new Promise((t=>{o=t}));let s=null,u=!1;const c=async()=>{u=!0,n((t=>{s=t,o()})),await a};try{await t(e,r,c),u?(await a,s(null)):i(null)}catch(l){const t=l;s?s(t):i(t)}}}class b extends p{constructor(){super(),i()(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(t,e,r){const n=[];let i=null,o=!1;for(const a of r)if([i,o]=await b._runMiddleware(t,e,a,n),o)break;return[i,o,n.reverse()]}static _runMiddleware(t,e,r,n){return new Promise((i=>{const o=t=>{const r=t||e.error;r&&(e.error=Object(f.serializeError)(r)),i([r,!0])},a=t=>{e.error?o(e.error):(t&&("function"!==typeof t&&o(new g({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),n.push(t)),i([null,!1]))};try{r(t,e,a,o)}catch(s){o(s)}}))}static async _runReturnHandlers(t){for(const e of t)await new Promise(((t,r)=>{e((e=>e?r(e):t()))}))}static _checkForCompletion(t,e,r){if(!("result"in e)&&!("error"in e))throw new g({code:-32603,message:"Response has no error or result for request"});if(!r)throw new g({code:-32603,message:"Nothing ended request"})}push(t){this._middleware.push(t)}handle(t,e){if(e&&"function"!==typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}asMiddleware(){return async(t,e,r,n)=>{try{const[i,o,a]=await b._runAllMiddleware(t,e,this._middleware);return o?(await b._runReturnHandlers(a),n(i)):r((async t=>{try{await b._runReturnHandlers(a)}catch(e){return t(e)}return t()}))}catch(i){return n(i)}}}async _handleBatch(t,e){try{const r=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,r):r}catch(r){if(e)return e(r);throw r}}_promiseHandle(t){return new Promise((e=>{this._handle(t,((t,r)=>{e(r)}))}))}async _handle(t,e){if(!t||Array.isArray(t)||"object"!==typeof t){const t=new g({code:-32603,message:"request must be plain object"});return e(t,{id:void 0,jsonrpc:"2.0",error:t})}if("string"!==typeof t.method){const r=new g({code:-32603,message:"method must be string"});return e(r,{id:t.id,jsonrpc:"2.0",error:r})}const r=l()({},t),n={id:r.id,jsonrpc:r.jsonrpc};let i=null;try{await this._processRequest(r,n)}catch(o){i=o}return i&&(delete n.result,n.error||(n.error=Object(f.serializeError)(i))),e(i,n)}async _processRequest(t,e){const[r,n,i]=await b._runAllMiddleware(t,e,this._middleware);if(b._checkForCompletion(t,e,n),await b._runReturnHandlers(i),r)throw r}}function v(t){const e=new b;return t.forEach((t=>e.push(t))),e.asMiddleware()}function A(t){const e=new p;return e.sendAsync=async e=>{const r=await t.handle(e);if(r.error){var n,i;const t=Object(f.serializeError)(r.error,{fallbackError:{message:(null===(n=r.error)||void 0===n?void 0:n.message)||r.error.toString(),code:(null===(i=r.error)||void 0===i?void 0:i.code)||-32603}});throw f.rpcErrors.internal(t)}return r.result},e.send=(e,r)=>{if("function"!==typeof r)throw new Error('Must provide callback to "send" method.');t.handle(e,r)},t.on&&t.on("notification",(t=>{e.emit("data",null,t)})),e.request=async t=>{const r=l()(l()({},t),{},{id:Math.random().toString(36).slice(2),jsonrpc:"2.0"});return await e.sendAsync(r)},e}class w extends o.Duplex{constructor(t){let{parent:e,name:r}=t;super({objectMode:!0}),i()(this,"_parent",void 0),i()(this,"_name",void 0),this._parent=e,this._name=r}_read(){}_write(t,e,r){this._parent.push({name:this._name,data:t}),r()}}Symbol("IGNORE_SUBSTREAM");class _ extends o.Duplex{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(l()(l()({},t),{},{objectMode:!0})),i()(this,"_substreams",void 0),i()(this,"getStream",void 0),this._substreams={}}createStream(t){if(!t)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[t])throw new Error('ObjectMultiplex - Substream for name "'.concat(t,'" already exists'));const e=new w({parent:this,name:t});return this._substreams[t]=e,function(t,e){const r=once__WEBPACK_IMPORTED_MODULE_7___default()(e);end_of_stream__WEBPACK_IMPORTED_MODULE_6___default()(t,{readable:!1},r),end_of_stream__WEBPACK_IMPORTED_MODULE_6___default()(t,{writable:!1},r)}(this,(t=>e.destroy(t||void 0))),e}ignoreStream(t){if(!t)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[t])throw new Error('ObjectMultiplex - Substream for name "'.concat(t,'" already exists'));this._substreams[t]=IGNORE_SUBSTREAM}_read(){}_write(t,e,r){const{name:n,data:i}=t;if(!n)return window.console.warn('ObjectMultiplex - malformed chunk without name "'.concat(t,'"')),r();const o=this._substreams[n];return o?(o!==IGNORE_SUBSTREAM&&o.push(i),r()):(window.console.warn('ObjectMultiplex - orphaned data for stream "'.concat(n,'"')),r())}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return h}));let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let a=o.default,s=null;const u=function(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var c,l;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(c||(c={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(l||(l={}));const f="0123456789abcdef";class h{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",t),a>o[r]||console.log.apply(console,e)}debug(){for(var t=arguments.length,e=new Array(t),r=0;r{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t>4],r+=f[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(s){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push("code=".concat(e)),n.push("version=".concat(this.version));const o=t;let a="";switch(e){case l.NUMERIC_FAULT:{a="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":a+="-"+e;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case l.CALL_EXCEPTION:case l.INSUFFICIENT_FUNDS:case l.MISSING_NEW:case l.NONCE_EXPIRED:case l.REPLACEMENT_UNDERPRICED:case l.TRANSACTION_REPLACED:case l.UNPREDICTABLE_GAS_LIMIT:a=e}a&&(t+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const s=new Error(t);return s.reason=o,s.code=e,Object.keys(r).forEach((function(t){s[t]=r[t]})),s}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,h.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",h.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",te&&this.throwError("too many arguments"+r,h.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",h.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return s||(s=new h("logger/5.6.0")),s}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!t)return;this.globalLogger().throwError("error censorship permanent",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!t,n=!!e}static setLogLevel(t){const e=o[t.toLowerCase()];null!=e?a=e:h.globalLogger().warn("invalid log level - "+t)}static from(t){return new h(t)}}h.errors=l,h.levels=c},function(t,e,r){"use strict";r.d(e,"l",(function(){return c})),r.d(e,"m",(function(){return l})),r.d(e,"a",(function(){return M})),r.d(e,"b",(function(){return b})),r.d(e,"c",(function(){return C})),r.d(e,"d",(function(){return E})),r.d(e,"e",(function(){return x})),r.d(e,"f",(function(){return I})),r.d(e,"g",(function(){return y})),r.d(e,"h",(function(){return S})),r.d(e,"i",(function(){return w})),r.d(e,"j",(function(){return _})),r.d(e,"k",(function(){return k})),r.d(e,"n",(function(){return A})),r.d(e,"o",(function(){return p})),r.d(e,"p",(function(){return f})),r.d(e,"q",(function(){return g})),r.d(e,"r",(function(){return d})),r.d(e,"s",(function(){return h})),r.d(e,"t",(function(){return m})),r.d(e,"u",(function(){return v}));var n=r(25),i=r.n(n),o=r(743),a=r.n(o),s=r(27),u=r.n(s);const c={MAINNET:"mainnet",TESTNET:"testnet",CYAN:"cyan",AQUA:"aqua",CELESTE:"celeste"},l={SAPPHIRE_DEVNET:"sapphire_devnet",SAPPHIRE_MAINNET:"sapphire_mainnet"},f=(c.MAINNET,c.TESTNET,c.CYAN,c.AQUA,c.CELESTE,c.CELESTE,c.AQUA,l.SAPPHIRE_MAINNET,c.CELESTE,l.SAPPHIRE_MAINNET,c.CYAN,l.SAPPHIRE_MAINNET,c.MAINNET,l.SAPPHIRE_MAINNET,c.TESTNET,l.SAPPHIRE_DEVNET,c.MAINNET,c.TESTNET,c.CYAN,c.AQUA,c.CELESTE,l.SAPPHIRE_MAINNET,l.SAPPHIRE_DEVNET,c.MAINNET,c.TESTNET,c.CYAN,c.AQUA,c.CELESTE,c.MAINNET,c.TESTNET,c.CYAN,c.AQUA,c.CELESTE,a.a);function h(t){return f.encode(t)}function d(t){return f.decode(t)}function p(t){return JSON.parse(f.decode(t))}function g(t){return f.encode(JSON.stringify(t))}function m(t){let e,r=!1,n=0;try{e=window[t],r=!0,n=e.length;const i="__storage_test__";return e.setItem(i,i),e.removeItem(i),!0}catch(i){const t=i;return t&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&r&&0!==n}}class y{constructor(){i()(this,"store",{})}getItem(t){return this.store[t]||null}setItem(t,e){this.store[t]=e}}class b{constructor(t,e){i()(this,"storage",void 0),i()(this,"_storeKey",void 0),this.storage=e,this._storeKey=t;try{e.getItem(t)||this.resetStore()}catch(r){}}static getInstance(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(!this.instance){let r;r="local"===e&&m("localStorage")?window.localStorage:"session"===e&&m("sessionStorage")?window.sessionStorage:new y,this.instance=new this(t,r)}return this.instance}toJSON(){return this.storage.getItem(this._storeKey)}resetStore(){const t=this.getStore();return this.storage.setItem(this._storeKey,JSON.stringify({})),t}getStore(){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")}get(t){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")[t]}set(t,e){const r=JSON.parse(this.storage.getItem(this._storeKey)||"{}");r[t]=e,this.storage.setItem(this._storeKey,JSON.stringify(r))}}i()(b,"instance",void 0);const v="openlogin_store",A={POPUP:"popup",REDIRECT:"redirect"},w=u()(u()({},l),c),_={SECP256K1:"secp256k1",ED25519:"ed25519"},E={GOOGLE:"google",FACEBOOK:"facebook",REDDIT:"reddit",DISCORD:"discord",TWITCH:"twitch",APPLE:"apple",LINE:"line",GITHUB:"github",KAKAO:"kakao",LINKEDIN:"linkedin",TWITTER:"twitter",WEIBO:"weibo",WECHAT:"wechat",EMAIL_PASSWORDLESS:"email_passwordless",SMS_PASSWORDLESS:"sms_passwordless",WEBAUTHN:"webauthn",JWT:"jwt"},I={DEFAULT:"default",OPTIONAL:"optional",MANDATORY:"mandatory",NONE:"none"},S={LOGIN:"login",ENABLE_MFA:"enable_mfa",MODIFY_MFA:"modify_mfa"},M={PRODUCTION:"production",DEVELOPMENT:"development",STAGING:"staging",TESTING:"testing"},C={en:"en",ja:"ja",ko:"ko",de:"de",zh:"zh",es:"es",fr:"fr",pt:"pt",nl:"nl"},k={light:"light",dark:"dark",auto:"auto"},x={DEVICE:"deviceShareFactor",BACKUP_SHARE:"backUpShareFactor",SOCIAL_BACKUP:"socialBackupFactor",PASSWORD:"passwordFactor"}},function(t,e,r){"use strict";r.d(e,"a",(function(){return h}));let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let a=o.default,s=null;const u=function(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var c,l;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(c||(c={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(l||(l={}));const f="0123456789abcdef";class h{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",t),a>o[r]||console.log.apply(console,e)}debug(){for(var t=arguments.length,e=new Array(t),r=0;r{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t>4],r+=f[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(s){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push("code=".concat(e)),n.push("version=".concat(this.version));const o=t;let a="";switch(e){case l.NUMERIC_FAULT:{a="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":a+="-"+e;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case l.CALL_EXCEPTION:case l.INSUFFICIENT_FUNDS:case l.MISSING_NEW:case l.NONCE_EXPIRED:case l.REPLACEMENT_UNDERPRICED:case l.TRANSACTION_REPLACED:case l.UNPREDICTABLE_GAS_LIMIT:a=e}a&&(t+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const s=new Error(t);return s.reason=o,s.code=e,Object.keys(r).forEach((function(t){s[t]=r[t]})),s}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,h.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",h.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",te&&this.throwError("too many arguments"+r,h.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",h.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return s||(s=new h("logger/5.6.0")),s}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!t)return;this.globalLogger().throwError("error censorship permanent",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!t,n=!!e}static setLogLevel(t){const e=o[t.toLowerCase()];null!=e?a=e:h.globalLogger().warn("invalid log level - "+t)}static from(t){return new h(t)}}h.errors=l,h.levels=c},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return b})),r.d(e,"b",(function(){return _})),r.d(e,"c",(function(){return v})),r.d(e,"d",(function(){return A})),r.d(e,"e",(function(){return w})),r.d(e,"f",(function(){return M})),r.d(e,"g",(function(){return B})),r.d(e,"h",(function(){return k})),r.d(e,"i",(function(){return x}));var n=r(951),i=r.n(n),o=r(962),a=r.n(o),s=r(963),u=r.n(s),c=r(608),l=r.n(c),f=r(392),h=r.n(f),d=r(363),p=r.n(d),g=r(1401),m=r.n(g),y=function(){var t,e=[];return{deliver:function(r){return l()(p.a.mark((function n(){return p.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:e.push(r),t&&(t(e.shift()),t=void 0);case 2:case"end":return n.stop()}}),n)})))()},receive:function(){return new Promise((function(r){var n=e.shift();if(n)return r(n);t=r}))}}},b="INIT",v="SUBSCRIBE",A="UNSUBSCRIBE",w="UPDATED",_="SNAPSHOT",E="TERMINATE",I="object"===("undefined"===typeof self?"undefined":h()(self))&&self.self===self&&self||"object"===("undefined"===typeof t?"undefined":h()(t))&&t.global===t&&t||"object"===("undefined"===typeof window?"undefined":h()(window))&&window.window===window&&window;I.FCL_REGISTRY=null==I.FCL_REGISTRY?{}:I.FCL_REGISTRY;var S=0,M=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(i,o){var a=n.expectReply||!1,s=null!=n.timeout?n.timeout:5e3;a&&s&&setTimeout((function(){return o(new Error("Timeout: ".concat(s,"ms passed without a response.")))}),s);var u={to:t,from:n.from,tag:e,data:r,timeout:s,reply:i,reject:o};try{I.FCL_REGISTRY[t]&&I.FCL_REGISTRY[t].mailbox.deliver(u),a||i(!0)}catch(c){console.error("FCL.Actor -- Could Not Deliver Message",u,I.FCL_REGISTRY[t],c)}}))},C=function(t){delete I.FCL_REGISTRY[t]},k=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==e&&(e=++S),null!=I.FCL_REGISTRY[e])return e;I.FCL_REGISTRY[e]={addr:e,mailbox:y(),subs:new Set,kvs:{},error:null};var r={self:function(){return e},receive:function(){return I.FCL_REGISTRY[e].mailbox.receive()},send:function(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return i.from=e,M(t,r,n,i)},sendSelf:function(t,r,n){I.FCL_REGISTRY[e]&&M(e,t,r,n)},broadcast:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.from=e;var i,o=u()(I.FCL_REGISTRY[e].subs);try{for(o.s();!(i=o.n()).done;){var a=i.value;M(a,t,r,n)}}catch(s){o.e(s)}finally{o.f()}},subscribe:function(t){return null!=t&&I.FCL_REGISTRY[e].subs.add(t)},unsubscribe:function(t){return null!=t&&I.FCL_REGISTRY[e].subs.delete(t)},subscriberCount:function(){return I.FCL_REGISTRY[e].subs.size},hasSubs:function(){return!!I.FCL_REGISTRY[e].subs.size},put:function(t,r){null!=t&&(I.FCL_REGISTRY[e].kvs[t]=r)},get:function(t,r){var n=I.FCL_REGISTRY[e].kvs[t];return null==n?r:n},delete:function(t){delete I.FCL_REGISTRY[e].kvs[t]},update:function(t,r){null!=t&&(I.FCL_REGISTRY[e].kvs[t]=r(I.FCL_REGISTRY[e].kvs[t]))},keys:function(){return Object.keys(I.FCL_REGISTRY[e].kvs)},all:function(){return I.FCL_REGISTRY[e].kvs},where:function(t){return Object.keys(I.FCL_REGISTRY[e].kvs).reduce((function(r,n){return t.test(n)?a()(a()({},r),{},i()({},n,I.FCL_REGISTRY[e].kvs[n])):r}),{})},merge:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(t).forEach((function(r){return I.FCL_REGISTRY[e].kvs[r]=t[r]}))},fatalError:function(t){I.FCL_REGISTRY[e].error=t;var r,n=u()(I.FCL_REGISTRY[e].subs);try{for(n.s();!(r=n.n()).done;){var i=r.value;M(i,w)}}catch(o){n.e(o)}finally{n.f()}}};return"object"===h()(t)&&(t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var e=l()(p.a.mark((function e(r){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==typeof t[b]){e.next=3;break}return e.next=3,t[b](r);case 3:return e.next=6,r.receive();case 6:if(n=e.sent,e.prev=7,"EXIT"!==n.tag){e.next=13;break}if("function"!==typeof t[E]){e.next=12;break}return e.next=12,t[E](r,n,n.data||{});case 12:return e.abrupt("break",25);case 13:return e.next=15,t[n.tag](r,n,n.data||{});case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(7),console.error("".concat(r.self()," Error"),n,e.t0);case 20:return e.prev=20,e.abrupt("continue",3);case 23:e.next=3;break;case 25:case"end":return e.stop()}}),e,null,[[7,17,20,23]])})));return function(t){return e.apply(this,arguments)}}()}(t)),m()(l()(p.a.mark((function n(){return p.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t(r);case 2:C(e);case 3:case"end":return n.stop()}}),n)})))),e};function x(t,e,r){e(t);var n="@EXIT",i=k(function(){var e=l()(p.a.mark((function e(i){var o,a;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.send(t,v);case 1:return e.next=4,i.receive();case 4:if(o=e.sent,a=I.FCL_REGISTRY[t].error,o.tag!==n){e.next=9;break}return i.send(t,A),e.abrupt("return");case 9:if(!a){e.next=13;break}return r(null,a),i.send(t,A),e.abrupt("return");case 13:r(o.data,null),e.next=1;break;case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());return function(){return M(i,n)}}function B(t,e){return e(t),M(t,_,null,{expectReply:!0,timeout:0})}}).call(this,r(44))},function(t,e,r){var n=r(7),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,r){if("number"===typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!==typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"===typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";function n(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return a})),r.d(e,"d",(function(){return s})),r.d(e,"c",(function(){return u}));var n=r(30);function i(t,e){return function(t){var e,r;return Boolean("string"===typeof(null===t||void 0===t||null===(e=t.prototype)||void 0===e||null===(r=e.constructor)||void 0===r?void 0:r.name))}(t)?new t({message:e}):t({message:e})}class o extends Error{constructor(t){var e,r,n;super(t.message),n="ERR_ASSERTION",(r="code")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}}function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Assertion failed.";if(!t){if(e instanceof Error)throw e;throw i(arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,e)}}function s(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Assertion failed",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o;try{Object(n.d)(t,e)}catch(s){throw i(a,"".concat(r,": ").concat(function(t){const e=function(t){return"object"===typeof t&&null!==t&&"message"in t}(t)?t.message:String(t);return e.endsWith(".")?e.slice(0,-1):e}(s),"."))}}function u(t){throw new Error("Invalid branch reached. Should be detected during compilation.")}},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2469).Buffer}catch(k){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(k){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var h=["","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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],l=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(t);r=(f=f.idivn(l)).isZero()?g+r:h[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,g=d>>>13,m=0|a[2],y=8191&m,b=m>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],E=8191&_,I=_>>>13,S=0|a[5],M=8191&S,C=S>>>13,k=0|a[6],x=8191&k,B=k>>>13,O=0|a[7],T=8191&O,R=O>>>13,P=0|a[8],N=8191&P,j=P>>>13,D=0|a[9],L=8191&D,F=D>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,J=0|s[3],Y=8191&J,X=J>>>13,Z=0|s[4],$=8191&Z,tt=Z>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ft=8191<,ht=lt>>>13,dt=0|s[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,Q))|0)+((8191&(i=(i=Math.imul(f,G))+Math.imul(h,Q)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,Q),i=(i=Math.imul(p,G))+Math.imul(g,Q)|0,o=Math.imul(g,G);var yt=(c+(n=n+Math.imul(f,z)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,z)|0))<<13)|0;c=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,G))+Math.imul(b,Q)|0,o=Math.imul(b,G),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,q)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,Q),i=(i=Math.imul(A,G))+Math.imul(w,Q)|0,o=Math.imul(w,G),n=n+Math.imul(y,z)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var vt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,G))+Math.imul(I,Q)|0,o=Math.imul(I,G),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,q)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0;var At=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,Q),i=(i=Math.imul(M,G))+Math.imul(C,Q)|0,o=Math.imul(C,G),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,q)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,G))+Math.imul(B,Q)|0,o=Math.imul(B,G),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var _t=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,Q),i=(i=Math.imul(T,G))+Math.imul(R,Q)|0,o=Math.imul(R,G),n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Et=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var It=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,G))+Math.imul(F,Q)|0,o=Math.imul(F,G),n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(j,z)|0,o=o+Math.imul(j,q)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,ht)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ht)|0;var Ct=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(F,Y)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var kt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(C,ft)|0,o=o+Math.imul(C,ht)|0;var xt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Bt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(N,ft)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,ht))+Math.imul(F,ft)|0,o=Math.imul(F,ht);var Rt=(c+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Pt=(c+(n=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=At,u[5]=wt,u[6]=_t,u[7]=Et,u[8]=It,u[9]=St,u[10]=Mt,u[11]=Ct,u[12]=kt,u[13]=xt,u[14]=Bt,u[15]=Ot,u[16]=Tt,u[17]=Rt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?g(this,t,e):r<1024?y(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new E;else if("p192"===t)e=new I;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return A[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var g=d,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,M),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(79)(t))},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2470).Buffer}catch(k){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(k){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var h=["","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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],l=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(t);r=(f=f.idivn(l)).isZero()?g+r:h[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,g=d>>>13,m=0|a[2],y=8191&m,b=m>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],E=8191&_,I=_>>>13,S=0|a[5],M=8191&S,C=S>>>13,k=0|a[6],x=8191&k,B=k>>>13,O=0|a[7],T=8191&O,R=O>>>13,P=0|a[8],N=8191&P,j=P>>>13,D=0|a[9],L=8191&D,F=D>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,J=0|s[3],Y=8191&J,X=J>>>13,Z=0|s[4],$=8191&Z,tt=Z>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ft=8191<,ht=lt>>>13,dt=0|s[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,Q))|0)+((8191&(i=(i=Math.imul(f,G))+Math.imul(h,Q)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,Q),i=(i=Math.imul(p,G))+Math.imul(g,Q)|0,o=Math.imul(g,G);var yt=(c+(n=n+Math.imul(f,z)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,z)|0))<<13)|0;c=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,G))+Math.imul(b,Q)|0,o=Math.imul(b,G),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,q)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,Q),i=(i=Math.imul(A,G))+Math.imul(w,Q)|0,o=Math.imul(w,G),n=n+Math.imul(y,z)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var vt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,G))+Math.imul(I,Q)|0,o=Math.imul(I,G),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,q)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0;var At=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,Q),i=(i=Math.imul(M,G))+Math.imul(C,Q)|0,o=Math.imul(C,G),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,q)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,G))+Math.imul(B,Q)|0,o=Math.imul(B,G),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var _t=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,Q),i=(i=Math.imul(T,G))+Math.imul(R,Q)|0,o=Math.imul(R,G),n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Et=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var It=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,G))+Math.imul(F,Q)|0,o=Math.imul(F,G),n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(j,z)|0,o=o+Math.imul(j,q)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,ht)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ht)|0;var Ct=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(F,Y)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var kt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(C,ft)|0,o=o+Math.imul(C,ht)|0;var xt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Bt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(N,ft)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,ht))+Math.imul(F,ft)|0,o=Math.imul(F,ht);var Rt=(c+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Pt=(c+(n=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=At,u[5]=wt,u[6]=_t,u[7]=Et,u[8]=It,u[9]=St,u[10]=Mt,u[11]=Ct,u[12]=kt,u[13]=xt,u[14]=Bt,u[15]=Ot,u[16]=Tt,u[17]=Rt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?g(this,t,e):r<1024?y(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new E;else if("p192"===t)e=new I;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return A[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var g=d,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,M),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(79)(t))},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2471).Buffer}catch(k){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(k){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var h=["","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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],l=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(t);r=(f=f.idivn(l)).isZero()?g+r:h[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,g=d>>>13,m=0|a[2],y=8191&m,b=m>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],E=8191&_,I=_>>>13,S=0|a[5],M=8191&S,C=S>>>13,k=0|a[6],x=8191&k,B=k>>>13,O=0|a[7],T=8191&O,R=O>>>13,P=0|a[8],N=8191&P,j=P>>>13,D=0|a[9],L=8191&D,F=D>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,J=0|s[3],Y=8191&J,X=J>>>13,Z=0|s[4],$=8191&Z,tt=Z>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ft=8191<,ht=lt>>>13,dt=0|s[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,Q))|0)+((8191&(i=(i=Math.imul(f,G))+Math.imul(h,Q)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,Q),i=(i=Math.imul(p,G))+Math.imul(g,Q)|0,o=Math.imul(g,G);var yt=(c+(n=n+Math.imul(f,z)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,z)|0))<<13)|0;c=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,G))+Math.imul(b,Q)|0,o=Math.imul(b,G),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,q)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,Q),i=(i=Math.imul(A,G))+Math.imul(w,Q)|0,o=Math.imul(w,G),n=n+Math.imul(y,z)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var vt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,G))+Math.imul(I,Q)|0,o=Math.imul(I,G),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,q)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0;var At=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,Q),i=(i=Math.imul(M,G))+Math.imul(C,Q)|0,o=Math.imul(C,G),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,q)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,G))+Math.imul(B,Q)|0,o=Math.imul(B,G),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var _t=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,Q),i=(i=Math.imul(T,G))+Math.imul(R,Q)|0,o=Math.imul(R,G),n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Et=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var It=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,G))+Math.imul(F,Q)|0,o=Math.imul(F,G),n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(j,z)|0,o=o+Math.imul(j,q)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,ht)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ht)|0;var Ct=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(F,Y)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var kt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(C,ft)|0,o=o+Math.imul(C,ht)|0;var xt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Bt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(N,ft)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,ht))+Math.imul(F,ft)|0,o=Math.imul(F,ht);var Rt=(c+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Pt=(c+(n=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=At,u[5]=wt,u[6]=_t,u[7]=Et,u[8]=It,u[9]=St,u[10]=Mt,u[11]=Ct,u[12]=kt,u[13]=xt,u[14]=Bt,u[15]=Ot,u[16]=Tt,u[17]=Rt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?g(this,t,e):r<1024?y(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new E;else if("p192"===t)e=new I;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return A[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var g=d,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,M),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(79)(t))},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2475).Buffer}catch(k){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(k){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var h=["","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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],l=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(t);r=(f=f.idivn(l)).isZero()?g+r:h[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,g=d>>>13,m=0|a[2],y=8191&m,b=m>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],E=8191&_,I=_>>>13,S=0|a[5],M=8191&S,C=S>>>13,k=0|a[6],x=8191&k,B=k>>>13,O=0|a[7],T=8191&O,R=O>>>13,P=0|a[8],N=8191&P,j=P>>>13,D=0|a[9],L=8191&D,F=D>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,J=0|s[3],Y=8191&J,X=J>>>13,Z=0|s[4],$=8191&Z,tt=Z>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ft=8191<,ht=lt>>>13,dt=0|s[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,Q))|0)+((8191&(i=(i=Math.imul(f,G))+Math.imul(h,Q)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,Q),i=(i=Math.imul(p,G))+Math.imul(g,Q)|0,o=Math.imul(g,G);var yt=(c+(n=n+Math.imul(f,z)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,z)|0))<<13)|0;c=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,G))+Math.imul(b,Q)|0,o=Math.imul(b,G),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,q)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,Q),i=(i=Math.imul(A,G))+Math.imul(w,Q)|0,o=Math.imul(w,G),n=n+Math.imul(y,z)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var vt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,G))+Math.imul(I,Q)|0,o=Math.imul(I,G),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,q)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0;var At=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,Q),i=(i=Math.imul(M,G))+Math.imul(C,Q)|0,o=Math.imul(C,G),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,q)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,G))+Math.imul(B,Q)|0,o=Math.imul(B,G),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var _t=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,Q),i=(i=Math.imul(T,G))+Math.imul(R,Q)|0,o=Math.imul(R,G),n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Et=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var It=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,G))+Math.imul(F,Q)|0,o=Math.imul(F,G),n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(j,z)|0,o=o+Math.imul(j,q)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,ht)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ht)|0;var Ct=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(F,Y)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var kt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(C,ft)|0,o=o+Math.imul(C,ht)|0;var xt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Bt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(N,ft)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,ht))+Math.imul(F,ft)|0,o=Math.imul(F,ht);var Rt=(c+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Pt=(c+(n=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=At,u[5]=wt,u[6]=_t,u[7]=Et,u[8]=It,u[9]=St,u[10]=Mt,u[11]=Ct,u[12]=kt,u[13]=xt,u[14]=Bt,u[15]=Ot,u[16]=Tt,u[17]=Rt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?g(this,t,e):r<1024?y(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new E;else if("p192"===t)e=new I;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return A[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var g=d,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,M),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(79)(t))},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2476).Buffer}catch(k){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(k){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var h=["","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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],l=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(t);r=(f=f.idivn(l)).isZero()?g+r:h[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,g=d>>>13,m=0|a[2],y=8191&m,b=m>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],E=8191&_,I=_>>>13,S=0|a[5],M=8191&S,C=S>>>13,k=0|a[6],x=8191&k,B=k>>>13,O=0|a[7],T=8191&O,R=O>>>13,P=0|a[8],N=8191&P,j=P>>>13,D=0|a[9],L=8191&D,F=D>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,J=0|s[3],Y=8191&J,X=J>>>13,Z=0|s[4],$=8191&Z,tt=Z>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ft=8191<,ht=lt>>>13,dt=0|s[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,Q))|0)+((8191&(i=(i=Math.imul(f,G))+Math.imul(h,Q)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,Q),i=(i=Math.imul(p,G))+Math.imul(g,Q)|0,o=Math.imul(g,G);var yt=(c+(n=n+Math.imul(f,z)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,z)|0))<<13)|0;c=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,G))+Math.imul(b,Q)|0,o=Math.imul(b,G),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,q)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,Q),i=(i=Math.imul(A,G))+Math.imul(w,Q)|0,o=Math.imul(w,G),n=n+Math.imul(y,z)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var vt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,G))+Math.imul(I,Q)|0,o=Math.imul(I,G),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,q)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0;var At=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,Q),i=(i=Math.imul(M,G))+Math.imul(C,Q)|0,o=Math.imul(C,G),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,q)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,G))+Math.imul(B,Q)|0,o=Math.imul(B,G),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var _t=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,Q),i=(i=Math.imul(T,G))+Math.imul(R,Q)|0,o=Math.imul(R,G),n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Et=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var It=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,G))+Math.imul(F,Q)|0,o=Math.imul(F,G),n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(j,z)|0,o=o+Math.imul(j,q)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,ht)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ht)|0;var Ct=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(F,Y)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var kt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(C,ft)|0,o=o+Math.imul(C,ht)|0;var xt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Bt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(N,ft)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,ht))+Math.imul(F,ft)|0,o=Math.imul(F,ht);var Rt=(c+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Pt=(c+(n=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=At,u[5]=wt,u[6]=_t,u[7]=Et,u[8]=It,u[9]=St,u[10]=Mt,u[11]=Ct,u[12]=kt,u[13]=xt,u[14]=Bt,u[15]=Ot,u[16]=Tt,u[17]=Rt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?g(this,t,e):r<1024?y(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new E;else if("p192"===t)e=new I;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return A[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var g=d,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,M),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(79)(t))},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2479).Buffer}catch(k){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(k){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var h=["","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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],l=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(t);r=(f=f.idivn(l)).isZero()?g+r:h[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,g=d>>>13,m=0|a[2],y=8191&m,b=m>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],E=8191&_,I=_>>>13,S=0|a[5],M=8191&S,C=S>>>13,k=0|a[6],x=8191&k,B=k>>>13,O=0|a[7],T=8191&O,R=O>>>13,P=0|a[8],N=8191&P,j=P>>>13,D=0|a[9],L=8191&D,F=D>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,J=0|s[3],Y=8191&J,X=J>>>13,Z=0|s[4],$=8191&Z,tt=Z>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ft=8191<,ht=lt>>>13,dt=0|s[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,Q))|0)+((8191&(i=(i=Math.imul(f,G))+Math.imul(h,Q)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,Q),i=(i=Math.imul(p,G))+Math.imul(g,Q)|0,o=Math.imul(g,G);var yt=(c+(n=n+Math.imul(f,z)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,z)|0))<<13)|0;c=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,G))+Math.imul(b,Q)|0,o=Math.imul(b,G),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,q)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,Q),i=(i=Math.imul(A,G))+Math.imul(w,Q)|0,o=Math.imul(w,G),n=n+Math.imul(y,z)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var vt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,G))+Math.imul(I,Q)|0,o=Math.imul(I,G),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,q)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0;var At=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,Q),i=(i=Math.imul(M,G))+Math.imul(C,Q)|0,o=Math.imul(C,G),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,q)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,G))+Math.imul(B,Q)|0,o=Math.imul(B,G),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var _t=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,Q),i=(i=Math.imul(T,G))+Math.imul(R,Q)|0,o=Math.imul(R,G),n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Et=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var It=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,G))+Math.imul(F,Q)|0,o=Math.imul(F,G),n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(j,z)|0,o=o+Math.imul(j,q)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,ht)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ht)|0;var Ct=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(F,Y)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var kt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(C,ft)|0,o=o+Math.imul(C,ht)|0;var xt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Bt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(N,ft)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,ht))+Math.imul(F,ft)|0,o=Math.imul(F,ht);var Rt=(c+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Pt=(c+(n=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=At,u[5]=wt,u[6]=_t,u[7]=Et,u[8]=It,u[9]=St,u[10]=Mt,u[11]=Ct,u[12]=kt,u[13]=xt,u[14]=Bt,u[15]=Ot,u[16]=Tt,u[17]=Rt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?g(this,t,e):r<1024?y(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new E;else if("p192"===t)e=new I;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return A[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var g=d,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,M),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(79)(t))},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2480).Buffer}catch(k){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(k){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var h=["","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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],l=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(t);r=(f=f.idivn(l)).isZero()?g+r:h[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,g=d>>>13,m=0|a[2],y=8191&m,b=m>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],E=8191&_,I=_>>>13,S=0|a[5],M=8191&S,C=S>>>13,k=0|a[6],x=8191&k,B=k>>>13,O=0|a[7],T=8191&O,R=O>>>13,P=0|a[8],N=8191&P,j=P>>>13,D=0|a[9],L=8191&D,F=D>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,J=0|s[3],Y=8191&J,X=J>>>13,Z=0|s[4],$=8191&Z,tt=Z>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ft=8191<,ht=lt>>>13,dt=0|s[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,Q))|0)+((8191&(i=(i=Math.imul(f,G))+Math.imul(h,Q)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,Q),i=(i=Math.imul(p,G))+Math.imul(g,Q)|0,o=Math.imul(g,G);var yt=(c+(n=n+Math.imul(f,z)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,z)|0))<<13)|0;c=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,G))+Math.imul(b,Q)|0,o=Math.imul(b,G),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,q)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,Q),i=(i=Math.imul(A,G))+Math.imul(w,Q)|0,o=Math.imul(w,G),n=n+Math.imul(y,z)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var vt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,G))+Math.imul(I,Q)|0,o=Math.imul(I,G),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,q)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0;var At=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,Q),i=(i=Math.imul(M,G))+Math.imul(C,Q)|0,o=Math.imul(C,G),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,q)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,G))+Math.imul(B,Q)|0,o=Math.imul(B,G),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var _t=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,Q),i=(i=Math.imul(T,G))+Math.imul(R,Q)|0,o=Math.imul(R,G),n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Et=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var It=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,G))+Math.imul(F,Q)|0,o=Math.imul(F,G),n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(j,z)|0,o=o+Math.imul(j,q)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,ht)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ht)|0;var Ct=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(F,Y)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var kt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(C,ft)|0,o=o+Math.imul(C,ht)|0;var xt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Bt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(N,ft)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,ht))+Math.imul(F,ft)|0,o=Math.imul(F,ht);var Rt=(c+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Pt=(c+(n=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=At,u[5]=wt,u[6]=_t,u[7]=Et,u[8]=It,u[9]=St,u[10]=Mt,u[11]=Ct,u[12]=kt,u[13]=xt,u[14]=Bt,u[15]=Ot,u[16]=Tt,u[17]=Rt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?g(this,t,e):r<1024?y(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new E;else if("p192"===t)e=new I;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return A[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var g=d,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,M),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(79)(t))},function(t,e){function r(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void r(c)}s.done?e(u):Promise.resolve(u).then(n,i)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,u,"next",t)}function u(t){r(a,i,o,s,u,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n,i;!function(o,a){"use strict";n=function(){var t=function(){},e="undefined",r=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function i(t,e){var r=t[e];if("function"===typeof r.bind)return r.bind(t);try{return Function.prototype.bind.call(r,t)}catch(n){return function(){return Function.prototype.apply.apply(r,[t,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(n){return"debug"===n&&(n="log"),typeof console!==e&&("trace"===n&&r?o:void 0!==console[n]?i(console,n):void 0!==console.log?i(console,"log"):t)}function s(e,r){for(var i=0;i=0&&r<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(o=r,!1!==n&&l(r),s.call(a,r,t),typeof console===e&&r1&&void 0!==arguments[1]?arguments[1]:0;const r=new a.default(this.blob.decode(t,e),10,"le");return this.signed?r.fromTwos(8*this.span).clone():r}encode(e,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.signed&&(e=e.toTwos(8*this.span)),this.blob.encode(e.toArrayLike(t,"le",this.span),r,n)}}function c(t){return new u(8,!1,t)}e.u64=c,e.i64=function(t){return new u(8,!0,t)},e.u128=function(t){return new u(16,!1,t)},e.i128=function(t){return new u(16,!0,t)};class l extends i.Layout{constructor(t,e,r,n){super(t.span,n),this.layout=t,this.decoder=e,this.encoder=r}decode(t,e){return this.decoder(this.layout.decode(t,e))}encode(t,e,r){return this.layout.encode(this.encoder(t),e,r)}getSpan(t,e){return this.layout.getSpan(t,e)}}e.publicKey=function(t){return new l(i.blob(32),(t=>new o.PublicKey(t)),(t=>t.toBuffer()),t)};class f extends i.Layout{constructor(t,e){super(-1,e),this.layout=t,this.discriminator=i.u8()}encode(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null===t||void 0===t?this.discriminator.encode(0,e,r):(this.discriminator.encode(1,e,r),this.layout.encode(t,e,r+1)+1)}decode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.discriminator.decode(t,e);if(0===r)return null;if(1===r)return this.layout.decode(t,e+1);throw new Error("Invalid option "+this.property)}getSpan(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.discriminator.decode(t,e);if(0===r)return 1;if(1===r)return this.layout.getSpan(t,e+1)+1;throw new Error("Invalid option "+this.property)}}function h(t){if(0===t)return!1;if(1===t)return!0;throw new Error("Invalid bool: "+t)}function d(t){return t?1:0}function p(t){const e=i.u32("length"),r=i.struct([e,i.blob(i.offset(e,-e.span),"data")]);return new l(r,(t=>{let{data:e}=t;return e}),(t=>({data:t})),t)}e.option=function(t,e){return new f(t,e)},e.bool=function(t){return new l(i.u8(),h,d,t)},e.vec=function(t,e){const r=i.u32("length"),n=i.struct([r,i.seq(t,i.offset(r,-r.span),"values")]);return new l(n,(t=>{let{values:e}=t;return e}),(t=>({values:t})),e)},e.tagged=function(t,e,r){const n=i.struct([c("tag"),e.replicate("data")]);return new l(n,(function(e){let{tag:r,data:n}=e;if(!r.eq(t))throw new Error("Invalid tag, expected: "+t.toString("hex")+", got: "+r.toString("hex"));return n}),(e=>({tag:t,data:e})),r)},e.vecU8=p,e.str=function(e){return new l(p(),(t=>t.toString("utf-8")),(e=>t.from(e,"utf-8")),e)},e.rustEnum=function(t,e,r){const n=i.union(null!==r&&void 0!==r?r:i.u8(),e);return t.forEach(((t,e)=>n.addVariant(e,t,t.property))),n},e.array=function(t,e,r){const n=i.struct([i.seq(t,e,"values")]);return new l(n,(t=>{let{values:e}=t;return e}),(t=>({values:t})),r)};class g extends i.Layout{constructor(t,e,r){super(t.span+e.span,r),this.keyLayout=t,this.valueLayout=e}decode(t,e){e=e||0;return[this.keyLayout.decode(t,e),this.valueLayout.decode(t,e+this.keyLayout.getSpan(t,e))]}encode(t,e,r){r=r||0;const n=this.keyLayout.encode(t[0],e,r);return n+this.valueLayout.encode(t[1],e,r+n)}getSpan(t,e){return this.keyLayout.getSpan(t,e)+this.valueLayout.getSpan(t,e)}}e.map=function(t,e,r){const n=i.u32("length"),o=i.struct([n,i.seq(new g(t,e),i.offset(n,-n.span),"values")]);return new l(o,(t=>{let{values:e}=t;return new Map(e)}),(t=>({values:Array.from(t.entries())})),r)}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(116),i=r(509),o=r(283),a=r(443),s=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var r=this,s=r._parentOrParents,c=r._ctorUnsubscribe,l=r._unsubscribe,f=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,s instanceof t)s.remove(this);else if(null!==s)for(var h=0;h1&&void 0!==arguments[1]?arguments[1]:{};const r={mode:"cors",headers:{}};(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).useAPIKey&&(r.headers=i()(i()({},r.headers),b()));const n=a()(r,e,{method:"GET"}),o=await y(t,n);if(o.ok){const t=o.headers.get("content-type");return null!==t&&void 0!==t&&t.includes("application/json")?o.json():o.text()}throw v(o),o},w=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o={mode:"cors",headers:{"Content-Type":"application/json; charset=utf-8"}};n.useAPIKey&&(o.headers=i()(i()({},o.headers),b()));const s=a()(o,r,{method:"POST"});return n.isUrlEncodedData?(s.body=e,"application/json; charset=utf-8"===s.headers["Content-Type"]&&delete s.headers["Content-Type"]):s.body=JSON.stringify(e),((t,e)=>{const r=new Promise(((e,r)=>{const n=setTimeout((()=>{clearTimeout(n),r(new Error("Timed out in ".concat(t,"ms")))}),t)}));return Promise.race([e,r])})(n.timeout||6e4,y(t,s).then((t=>{if(n.logTracingHeader&&function(t){u.info("Request tracing with traceID=".concat(t.headers.get("x-web3-correlation-id")))}(t),t.ok){const e=t.headers.get("content-type");return null!==e&&void 0!==e&&e.includes("application/json")?t.json():t.text()}throw v(t),t})))},_=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o={mode:"cors",headers:{"Content-Type":"application/json; charset=utf-8"}};n.useAPIKey&&(o.headers=i()(i()({},o.headers),b()));const s=a()(o,r,{method:"PATCH"});n.isUrlEncodedData?(s.body=e,"application/json; charset=utf-8"===s.headers["Content-Type"]&&delete s.headers["Content-Type"]):s.body=JSON.stringify(e);const u=await y(t,s);if(u.ok){const t=u.headers.get("content-type");return null!==t&&void 0!==t&&t.includes("application/json")?u.json():u.text()}throw v(u),u},E=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o={mode:"cors",headers:{"Content-Type":"application/json; charset=utf-8"}};n.useAPIKey&&(o.headers=i()(i()({},o.headers),b()));const s=a()(o,r,{method:"PUT"});n.isUrlEncodedData?(s.body=e,"application/json; charset=utf-8"===s.headers["Content-Type"]&&delete s.headers["Content-Type"]):s.body=JSON.stringify(e);const u=await y(t,s);if(u.ok){const t=u.headers.get("content-type");return null!==t&&void 0!==t&&t.includes("application/json")?u.json():u.text()}throw v(u),u},I=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o={mode:"cors",headers:{"Content-Type":"application/json; charset=utf-8"}};n.useAPIKey&&(o.headers=i()(i()({},o.headers),b()));const s=a()(o,r,{method:"DELETE"});n.isUrlEncodedData?(s.body=e,"application/json; charset=utf-8"===s.headers["Content-Type"]&&delete s.headers["Content-Type"]):s.body=JSON.stringify(e);const u=await y(t,s);if(u.ok){const t=u.headers.get("content-type");return null!==t&&void 0!==t&&t.includes("application/json")?u.json():u.text()}throw v(u),u}},function(t,e,r){"use strict";r.d(e,"b",(function(){return l})),r.d(e,"a",(function(){return f}));var n=r(1371),i=r.n(n),o=r(452);var a=r(3469);function s(t){return e=Object(a.a)(t),"0x"+i.a.keccak_256(Object(o.a)(e));var e}var u=r(395);new u.a("properties/5.6.0");function c(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}const l=new u.a("wordlists/5.4.0");class f{constructor(t){l.checkAbstract(new.target,f),c(this,"locale",t)}split(t){return t.toLowerCase().split(/ +/g)}join(t){return t.join(" ")}static check(t){const e=[];for(let r=0;r<2048;r++){const n=t.getWord(r);if(r!==t.getWordIndex(n))return"0x";e.push(n)}return s(e.join("\n")+"\n")}static register(t,e){e||(e=t.locale)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return P})),r.d(e,"b",(function(){return N})),r.d(e,"c",(function(){return j})),r.d(e,"d",(function(){return C})),r.d(e,"e",(function(){return x})),r.d(e,"f",(function(){return B})),r.d(e,"g",(function(){return O})),r.d(e,"h",(function(){return T}));var n=r(159),i=r(4);const o=Object(i.createContext)(null);const a=Object(i.createContext)(null);const s=Object(i.createContext)({outlet:null,matches:[]});function u(t,e){if(!t)throw new Error(e)}function c(t,e,r){void 0===r&&(r="/");let i=_(("string"===typeof e?Object(n.f)(e):e).pathname||"/",r);if(null==i)return null;let o=l(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){let r=t.length===e.length&&t.slice(0,-1).every(((t,r)=>t===e[r]));return r?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(o);let a=null;for(let n=0;null==a&&n{let o={relativePath:t.path||"",caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};o.relativePath.startsWith("/")&&(o.relativePath.startsWith(n)||u(!1),o.relativePath=o.relativePath.slice(n.length));let a=E([n,o.relativePath]),s=r.concat(o);t.children&&t.children.length>0&&(!0===t.index&&u(!1),l(t.children,e,s,a)),(null!=t.path||t.index)&&e.push({path:a,score:b(a,t.index),routesMeta:s})})),e}const f=/^:\w+$/,h=3,d=2,p=1,g=10,m=-2,y=t=>"*"===t;function b(t,e){let r=t.split("/"),n=r.length;return r.some(y)&&(n+=m),e&&(n+=d),r.filter((t=>!y(t))).reduce(((t,e)=>t+(f.test(e)?h:""===e?p:g)),n)}function v(t,e){let{routesMeta:r}=t,n={},i="/",o=[];for(let a=0;a(n.push(e),"([^\\/]+)")));t.endsWith("*")?(n.push("*"),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):i+=r?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)";let o=new RegExp(i,e?void 0:"i");return[o,n]}(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce(((t,e,r)=>{if("*"===e){let t=s[r]||"";a=o.slice(0,o.length-t.length).replace(/(.)\/+$/,"$1")}return t[e]=function(t,e){try{return decodeURIComponent(t)}catch(r){return t}}(s[r]||""),t}),{}),pathname:o,pathnameBase:a,pattern:t}}function w(t,e,r){let i,o="string"===typeof t?Object(n.f)(t):t,a=""===t||""===o.pathname?"/":o.pathname;if(null==a)i=r;else{let t=e.length-1;if(a.startsWith("..")){let e=a.split("/");for(;".."===e[0];)e.shift(),t-=1;o.pathname=e.join("/")}i=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:r,search:i="",hash:o=""}="string"===typeof t?Object(n.f)(t):t,a=r?r.startsWith("/")?r:function(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?r.length>1&&r.pop():"."!==t&&r.push(t)})),r.length>1?r.join("/"):"/"}(r,e):e;return{pathname:a,search:S(i),hash:M(o)}}(o,i);return a&&"/"!==a&&a.endsWith("/")&&!s.pathname.endsWith("/")&&(s.pathname+="/"),s}function _(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=t.charAt(e.length);return r&&"/"!==r?null:t.slice(e.length)||"/"}const E=t=>t.join("/").replace(/\/\/+/g,"/"),I=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),S=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",M=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";function C(t){k()||u(!1);let{basename:e,navigator:r}=Object(i.useContext)(o),{hash:a,pathname:s,search:c}=T(t),l=s;if("/"!==e){let r=function(t){return""===t||""===t.pathname?"/":"string"===typeof t?Object(n.f)(t).pathname:t.pathname}(t),i=null!=r&&r.endsWith("/");l="/"===s?e+(i?"/":""):E([e,s])}return r.createHref({pathname:l,search:c,hash:a})}function k(){return null!=Object(i.useContext)(a)}function x(){return k()||u(!1),Object(i.useContext)(a).location}function B(){k()||u(!1);let{basename:t,navigator:e}=Object(i.useContext)(o),{matches:r}=Object(i.useContext)(s),{pathname:n}=x(),a=JSON.stringify(r.map((t=>t.pathnameBase))),c=Object(i.useRef)(!1);return Object(i.useEffect)((()=>{c.current=!0})),Object(i.useCallback)((function(r,i){if(void 0===i&&(i={}),!c.current)return;if("number"===typeof r)return void e.go(r);let o=w(r,JSON.parse(a),n);"/"!==t&&(o.pathname=E([t,o.pathname])),(i.replace?e.replace:e.push)(o,i.state)}),[t,e,a,n])}function O(){let{matches:t}=Object(i.useContext)(s),e=t[t.length-1];return e?e.params:{}}function T(t){let{matches:e}=Object(i.useContext)(s),{pathname:r}=x(),n=JSON.stringify(e.map((t=>t.pathnameBase)));return Object(i.useMemo)((()=>w(t,JSON.parse(n),r)),[t,n,r])}function R(t,e){return void 0===e&&(e=[]),null==t?null:t.reduceRight(((r,n,o)=>Object(i.createElement)(s.Provider,{children:void 0!==n.route.element?n.route.element:r,value:{outlet:r,matches:e.concat(t.slice(0,o+1))}})),null)}function P(t){u(!1)}function N(t){let{basename:e="/",children:r=null,location:s,navigationType:c=n.a.Pop,navigator:l,static:f=!1}=t;k()&&u(!1);let h=I(e),d=Object(i.useMemo)((()=>({basename:h,navigator:l,static:f})),[h,l,f]);"string"===typeof s&&(s=Object(n.f)(s));let{pathname:p="/",search:g="",hash:m="",state:y=null,key:b="default"}=s,v=Object(i.useMemo)((()=>{let t=_(p,h);return null==t?null:{pathname:t,search:g,hash:m,state:y,key:b}}),[h,p,g,m,y,b]);return null==v?null:Object(i.createElement)(o.Provider,{value:d},Object(i.createElement)(a.Provider,{children:r,value:{location:v,navigationType:c}}))}function j(t){let{children:e,location:r}=t;return function(t,e){k()||u(!1);let{matches:r}=Object(i.useContext)(s),o=r[r.length-1],a=o?o.params:{},l=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let f,h=x();if(e){var d;let t="string"===typeof e?Object(n.f)(e):e;"/"===l||(null==(d=t.pathname)?void 0:d.startsWith(l))||u(!1),f=t}else f=h;let p=f.pathname||"/",g=c(t,{pathname:"/"===l?p:p.slice(l.length)||"/"});return R(g&&g.map((t=>Object.assign({},t,{params:Object.assign({},a,t.params),pathname:E([l,t.pathname]),pathnameBase:"/"===t.pathnameBase?l:E([l,t.pathnameBase])}))),r)}(D(e),r)}function D(t){let e=[];return i.Children.forEach(t,(t=>{if(!Object(i.isValidElement)(t))return;if(t.type===i.Fragment)return void e.push.apply(e,D(t.props.children));t.type!==P&&u(!1);let r={caseSensitive:t.props.caseSensitive,element:t.props.element,index:t.props.index,path:t.props.path};t.props.children&&(r.children=D(t.props.children)),e.push(r)})),e}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));const n=[t=>{}];let i={postMessage:(t,e)=>{console.log("GOT MOCK POST MESSAGE",t),n.forEach((e=>{e({data:t})}))},addEventListener:(t,e)=>{n.push(e)},removeEventListener:(t,e)=>{n.splice(n.indexOf((t=>t===e)),1)},location:{origin:"*"}};try{"undefined"!==typeof window&&(i=window)}catch(o){console.log("not defined: ".concat(o))}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11);(0,n.__exportStar)(r(1073),e),(0,n.__exportStar)(r(1842),e),(0,n.__exportStar)(r(1843),e)},function(t,e,r){"use strict";r.d(e,"h",(function(){return n})),r.d(e,"i",(function(){return i})),r.d(e,"f",(function(){return o})),r.d(e,"g",(function(){return a})),r.d(e,"e",(function(){return s})),r.d(e,"a",(function(){return u})),r.d(e,"b",(function(){return c})),r.d(e,"d",(function(){return l})),r.d(e,"c",(function(){return f})),r.d(e,"l",(function(){return h})),r.d(e,"k",(function(){return d})),r.d(e,"m",(function(){return p})),r.d(e,"n",(function(){return g})),r.d(e,"j",(function(){return m}));const n="EdDSA",i="JWT",o=".",a="base64url",s="utf8",u="utf8",c=":",l="did",f="key",h="base58btc",d="z",p="K36",g=32,m=32},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11);(0,n.__exportStar)(r(147),e),(0,n.__exportStar)(r(1808),e)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const n=r(2990),i=n.__importDefault(r(2991));Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return i.default}}),n.__exportStar(r(1315),e),n.__exportStar(r(2993),e)},function(t,e,r){"use strict";!function(e){function r(t){return parseInt(t)===t}function n(t){if(!r(t.length))return!1;for(var e=0;e255)return!1;return!0}function i(t,e){if(t.buffer&&ArrayBuffer.isView(t)&&"Uint8Array"===t.name)return e&&(t=t.slice?t.slice():Array.prototype.slice.call(t)),t;if(Array.isArray(t)){if(!n(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(r(t.length)&&n(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function o(t){return new Uint8Array(t)}function a(t,e,r,n,i){null==n&&null==i||(t=t.slice?t.slice(n,i):Array.prototype.slice.call(t,n,i)),e.set(t,r)}var s={toBytes:function(t){var e=[],r=0;for(t=encodeURI(t);r191&&n<224?(e.push(String.fromCharCode((31&n)<<6|63&t[r+1])),r+=2):(e.push(String.fromCharCode((15&n)<<12|(63&t[r+1])<<6|63&t[r+2])),r+=3)}return e.join("")}},u=function(){var t="0123456789abcdef";return{toBytes:function(t){for(var e=[],r=0;r>4]+t[15&i])}return r.join("")}}}(),c={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],f=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],h=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],d=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],m=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],y=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],b=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],v=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],A=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],w=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],_=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],E=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],I=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function S(t){for(var e=[],r=0;r>2,this._Ke[r][e%4]=o[e],this._Kd[t-r][e%4]=o[e];for(var a,s=0,u=i;u>16&255]<<24^f[a>>8&255]<<16^f[255&a]<<8^f[a>>24&255]^l[s]<<24,s+=1,8!=i)for(e=1;e>8&255]<<8^f[a>>16&255]<<16^f[a>>24&255]<<24;for(e=i/2+1;e>2,d=u%4,this._Ke[h][d]=o[e],this._Kd[t-h][d]=o[e++],u++}for(var h=1;h>24&255]^_[a>>16&255]^E[a>>8&255]^I[255&a]},M.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,r=[0,0,0,0],n=S(t),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var a=1;a>24&255]^p[n[(i+1)%4]>>16&255]^g[n[(i+2)%4]>>8&255]^m[255&n[(i+3)%4]]^this._Ke[a][i];n=r.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Ke[e][i],u[4*i]=255&(f[n[i]>>24&255]^s>>24),u[4*i+1]=255&(f[n[(i+1)%4]>>16&255]^s>>16),u[4*i+2]=255&(f[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(f[255&n[(i+3)%4]]^s);return u},M.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,r=[0,0,0,0],n=S(t),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var a=1;a>24&255]^b[n[(i+3)%4]>>16&255]^v[n[(i+2)%4]>>8&255]^A[255&n[(i+1)%4]]^this._Kd[a][i];n=r.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Kd[e][i],u[4*i]=255&(h[n[i]>>24&255]^s>>24),u[4*i+1]=255&(h[n[(i+3)%4]>>16&255]^s>>16),u[4*i+2]=255&(h[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(h[255&n[(i+1)%4]]^s);return u};var C=function(t){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new M(t)};C.prototype.encrypt=function(t){if((t=i(t)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=o(t.length),r=o(16),n=0;n=0;--e)this._counter[e]=t%256,t>>=8},O.prototype.setBytes=function(t){if(16!=(t=i(t,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},O.prototype.increment=function(){for(var t=15;t>=0;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var T=function(t,e){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",e instanceof O||(e=new O(e)),this._counter=e,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new M(t)};T.prototype.encrypt=function(t){for(var e=i(t,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=t.length-e,n=0;n>>2]>>>24-o%4*8&255;e[n+o>>>2]|=a<<24-(n+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var r,n=[],i=function(e){var r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n;return i/=4294967296,(i+=.5)*(t.random()>.5?1:-1)}},o=0;o>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new a.init(r,e/2)}},c=s.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new a.init(r,e)}},l=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},f=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r=this._data,n=r.words,i=r.sigBytes,o=this.blockSize,s=i/(4*o),u=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*o,c=t.min(4*u,i);if(u){for(var l=0;l1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n2&&void 0!==arguments[2]?arguments[2]:[];if(!Object(n.a)())return;let i="[BEACON] ".concat((new Date).toISOString()," [").concat(this.name,"](").concat(e,")"),o=r;switch(r[0]&&"string"===typeof r[0]&&(i+=" ".concat(r[0]),o=r.slice(1)),t){case"error":console.group(i),console.error(...o);break;case"warn":console.group(i),console.warn(...o);break;case"debug":console.groupCollapsed(i),console.debug(...o);break;default:console.group(i),console.log(...o)}console.groupEnd()}}},function(t,e,r){"use strict";(function(t){r.d(e,"i",(function(){return a})),r.d(e,"d",(function(){return s})),r.d(e,"e",(function(){return u})),r.d(e,"b",(function(){return c})),r.d(e,"a",(function(){return l})),r.d(e,"h",(function(){return f})),r.d(e,"f",(function(){return h})),r.d(e,"c",(function(){return d})),r.d(e,"g",(function(){return p}));var n=r(124),i=r(66),o=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};function a(e){return t.from(e).toString("hex")}function s(t){return o(this,void 0,void 0,(function*(){return yield i.ready,a(i.crypto_generichash(32,t))}))}function u(t){return o(this,void 0,void 0,(function*(){return yield i.ready,i.crypto_sign_seed_keypair(i.crypto_generichash(32,i.from_string(t)))}))}function c(e,r){return o(this,void 0,void 0,(function*(){yield i.ready;const n=t.from(i.randombytes_buf(i.crypto_secretbox_NONCEBYTES));return a(t.concat([n,t.from(i.crypto_secretbox_easy(t.from(e,"utf8"),n,r))]))}))}function l(e,r){return o(this,void 0,void 0,(function*(){yield i.ready;const n=e.slice(0,i.crypto_secretbox_NONCEBYTES),o=e.slice(i.crypto_secretbox_NONCEBYTES);return t.from(i.crypto_secretbox_open_easy(o,n,r)).toString("utf8")}))}function f(e,r){return o(this,void 0,void 0,(function*(){yield i.ready;const n=i.crypto_sign_ed25519_pk_to_curve25519(t.from(r));return a(i.crypto_box_seal(e,n))}))}function h(e,r,n){return o(this,void 0,void 0,(function*(){yield i.ready;const o=i.crypto_sign_ed25519_sk_to_curve25519(t.from(n)),a=i.crypto_sign_ed25519_pk_to_curve25519(t.from(r)),s=i.crypto_box_seal_open(e,a,o);return t.from(s).toString()}))}function d(e){return o(this,void 0,void 0,(function*(){yield i.ready;const r={edpk:{length:54,prefix:t.from(new Uint8Array([6,161,159]))},sppk:{length:55,prefix:t.from(new Uint8Array([6,161,161]))},p2pk:{length:55,prefix:t.from(new Uint8Array([6,161,164]))}};let o,a;if(64===e.length)o=r.edpk.prefix,a=e;else{const t=Object.entries(r);for(let r=0;r>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function D(t,e,r){j.call(this,t,e,r)}j.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(a);if(null===t)throw new Error(a);if(h&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!h||!ArrayBuffer.isView(t)))throw new Error(a);e=!0}for(var n,i,o=this.blocks,s=this.byteCount,u=t.length,c=this.blockCount,l=0,f=this.s;l>2]|=t[l]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=s){for(this.start=n-s,this.block=o[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(t>>=8),++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},j.prototype.encodeString=function(t){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(a);if(null===t)throw new Error(a);if(h&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!h||!ArrayBuffer.isView(t)))throw new Error(a);e=!0}var n=0,i=t.length;if(e)n=i;else for(var o=0;o=57344?n+=3:(s=65536+((1023&s)<<10|1023&t.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(t),n},j.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e>4&15]+d[15&t]+d[t>>12&15]+d[t>>8&15]+d[t>>20&15]+d[t>>16&15]+d[t>>28&15]+d[t>>24&15];a%e===0&&(L(r),o=0)}return i&&(t=r[o],s+=d[t>>4&15]+d[15&t],i>1&&(s+=d[t>>12&15]+d[t>>8&15]),i>2&&(s+=d[t>>20&15]+d[t>>16&15])),s},j.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;t=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(t);a>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;s%r===0&&L(n)}return o&&(t=s<<2,e=n[a],u[t]=255&e,o>1&&(u[t+1]=e>>8&255),o>2&&(u[t+2]=e>>16&255)),u},D.prototype=new j,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),j.prototype.finalize.call(this)};var L=function(t){var e,r,n,i,o,a,s,u,c,l,f,h,d,p,g,y,b,v,A,w,_,E,I,S,M,C,k,x,B,O,T,R,P,N,j,D,L,F,U,Q,G,H,z,q,K,V,W,J,Y,X,Z,$,tt,et,rt,nt,it,ot,at,st,ut,ct,lt;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],a=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],l=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],e=(h=t[8]^t[18]^t[28]^t[38]^t[48])^(a<<1|s>>>31),r=(d=t[9]^t[19]^t[29]^t[39]^t[49])^(s<<1|a>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=a^(l<<1|f>>>31),r=s^(f<<1|l>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(h<<1|d>>>31),r=c^(d<<1|h>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=l^(i<<1|o>>>31),r=f^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,p=t[0],g=t[1],V=t[11]<<4|t[10]>>>28,W=t[10]<<4|t[11]>>>28,x=t[20]<<3|t[21]>>>29,B=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,z=t[41]<<18|t[40]>>>14,N=t[2]<<1|t[3]>>>31,j=t[3]<<1|t[2]>>>31,y=t[13]<<12|t[12]>>>20,b=t[12]<<12|t[13]>>>20,J=t[22]<<10|t[23]>>>22,Y=t[23]<<10|t[22]>>>22,O=t[33]<<13|t[32]>>>19,T=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,lt=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,D=t[14]<<6|t[15]>>>26,L=t[15]<<6|t[14]>>>26,v=t[25]<<11|t[24]>>>21,A=t[24]<<11|t[25]>>>21,X=t[34]<<15|t[35]>>>17,Z=t[35]<<15|t[34]>>>17,R=t[45]<<29|t[44]>>>3,P=t[44]<<29|t[45]>>>3,S=t[6]<<28|t[7]>>>4,M=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,F=t[26]<<25|t[27]>>>7,U=t[27]<<25|t[26]>>>7,w=t[36]<<21|t[37]>>>11,_=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,q=t[8]<<27|t[9]>>>5,K=t[9]<<27|t[8]>>>5,C=t[18]<<20|t[19]>>>12,k=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,at=t[28]<<7|t[29]>>>25,Q=t[38]<<8|t[39]>>>24,G=t[39]<<8|t[38]>>>24,E=t[48]<<14|t[49]>>>18,I=t[49]<<14|t[48]>>>18,t[0]=p^~y&v,t[1]=g^~b&A,t[10]=S^~C&x,t[11]=M^~k&B,t[20]=N^~D&F,t[21]=j^~L&U,t[30]=q^~V&J,t[31]=K^~W&Y,t[40]=et^~nt&ot,t[41]=rt^~it&at,t[2]=y^~v&w,t[3]=b^~A&_,t[12]=C^~x&O,t[13]=k^~B&T,t[22]=D^~F&Q,t[23]=L^~U&G,t[32]=V^~J&X,t[33]=W^~Y&Z,t[42]=nt^~ot&st,t[43]=it^~at&ut,t[4]=v^~w&E,t[5]=A^~_&I,t[14]=x^~O&R,t[15]=B^~T&P,t[24]=F^~Q&H,t[25]=U^~G&z,t[34]=J^~X&$,t[35]=Y^~Z&tt,t[44]=ot^~st&ct,t[45]=at^~ut<,t[6]=w^~E&p,t[7]=_^~I&g,t[16]=O^~R&S,t[17]=T^~P&M,t[26]=Q^~H&N,t[27]=G^~z&j,t[36]=X^~$&q,t[37]=Z^~tt&K,t[46]=st^~ct&et,t[47]=ut^~lt&rt,t[8]=E^~p&y,t[9]=I^~g&b,t[18]=R^~S&C,t[19]=P^~M&k,t[28]=H^~N&D,t[29]=z^~j&L,t[38]=$^~q&V,t[39]=tt^~K&W,t[48]=ct^~et&nt,t[49]=lt^~rt&it,t[0]^=m[n],t[1]^=m[n+1]};if(l)t.exports=k;else{for(B=0;B{const i=document.createElement(t);return e.length>0&&i.classList.add(...e.filter((t=>!!t)).map((t=>g(t)))),r.forEach((t=>{i.setAttribute(g(t[0]),g(t[1]))})),"object"===typeof n&&Array.isArray(n)?n.filter((t=>!!t)).forEach((t=>{i.appendChild(t)})):"string"===typeof n&&(i.innerText=n),i},h=(t,e,r)=>{const n=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.length>0&&n.classList.add(...t.filter((t=>!!t))),e.forEach((t=>{n.setAttribute(g(t[0]),g(t[1]))})),"object"===typeof r&&Array.isArray(r)&&r.filter((t=>!!t)).forEach((t=>{n.appendChild(t)})),n},d=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","path");return t.forEach((t=>{e.setAttribute(g(t[0]),g(t[1]))})),e},p=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","g");return t.filter((t=>!!t)).forEach((t=>{e.appendChild(t)})),e},g=t=>{const e=document.createElement("div");return e.innerText=t,e.innerHTML},m=t=>{t.innerHTML=""};var y;!function(t){t.LIGHT="light",t.DARK="dark"}(y||(y={}));let b=y.LIGHT;const v=t=>{b=t},A=()=>b;var w=r(98),_=r(200);const E={css:":host {\n --animation-duration: 300ms;\n all: initial;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n.beacon-modal__wrapper {\n position: relative;\n top: 0;\n display: inline-block;\n z-index: 2147483000;\n max-width: 500px;\n width: 80%;\n padding: 24px;\n}\n\n@media (min-height: 700px) {\n .beacon-modal__wrapper {\n top: 50%;\n transform: translateY(-50%);\n }\n}\n\n.theme__light .beacon-modal__base,\n.theme__light .beacon-modal__close__wrapper {\n background: #fff;\n}\n\n.theme__dark .beacon-modal__base,\n.theme__dark .beacon-modal__close__wrapper {\n background: #27334c;\n}\n\n.beacon-modal__base,\n.beacon-modal__close__wrapper {\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1);\n}\n\n.beacon-modal__base {\n margin: 0 auto;\n border-radius: 32px;\n overflow: hidden;\n}\n\n.beacon-modal__header {\n padding: 16px 0;\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n\n.beacon-modal__headerLogo {\n width: 100%;\n max-width: 320px;\n margin: 20px auto;\n height: 100%;\n}\n\na,\nbutton {\n cursor: pointer;\n}\n\n.beacon-modal__close__wrapper {\n position: absolute;\n top: 44px;\n right: 24px;\n z-index: 10000;\n cursor: pointer;\n border-radius: 100%;\n}\n\n.beacon-modal__close__icon {\n width: 16px;\n height: 16px;\n position: relative;\n top: 0;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n margin: 8px;\n}\n\n.beacon-modal__close__line1 {\n position: absolute;\n width: 90%;\n}\n\n.beacon-modal__close__line2 {\n position: absolute;\n width: 90%;\n transform: rotate(90deg);\n}\n\n.theme__light .beacon-modal__close__line2,\n.theme__light .beacon-modal__close__line1 {\n border: 1px solid #000;\n}\n\n.theme__dark .beacon-modal__close__line2,\n.theme__dark .beacon-modal__close__line1 {\n border: 1px solid #fff;\n}\n\n.beacon-alert__base {\n position: fixed;\n overflow-y: scroll;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 2147482999;\n background-color: rgb(17 17 17 / 0.84);\n text-align: center;\n -ms-overflow-style: none;\n scrollbar-width: none;\n font-family: Roboto, Helvetica, sans-serif;\n}\n\n.beacon-alert__base::-webkit-scrollbar {\n display: none;\n}\n\n.beacon-alert__title {\n text-align: center;\n}\n\n.beacon-alert__text,\n.beacon-alert__title {\n margin: 0 auto;\n padding: 0 0 24px;\n}\n\n.margin__bottom {\n margin-bottom: 16px;\n}\n\n.beacon-alert__title {\n font-size: 18px;\n}\n\n.theme__light .beacon-alert__title {\n color: #3b3d40;\n}\n\n.theme__dark .beacon-alert__title,\n.theme__dark .beacon-alert__text {\n color: #7c99d6;\n}\n\n.beacon-alert__text {\n color: #000;\n font-size: 14px;\n}\n\n.beacon-modal__button,\n.beacon-modal__button--outline {\n height: 36px;\n font-size: 14px;\n letter-spacing: 0.84px;\n margin-bottom: 4px;\n margin-inline-end: 2px;\n margin-inline-start: 2px;\n margin-left: 2px;\n margin-right: 2px;\n margin-top: 4px;\n padding-inline-end: 15.4px;\n padding-inline-start: 15.4px;\n padding-left: 15.4px;\n padding-right: 15.4px;\n overflow-wrap: break-word;\n pointer-events: auto;\n text-align: center;\n border-radius: 4px;\n border: 2px solid #3880ff;\n}\n\n.beacon-modal__button {\n background: #3880ff;\n color: #fff;\n}\n\n.beacon-modal__button--outline {\n background: #fff;\n color: #444444;\n border: 1px solid #444444;\n}\n\n.beacon-alert__image {\n width: 200px;\n height: 200px;\n box-sizing: border-box;\n box-shadow: 0 10px 20px 0 rgba(17, 17, 17, 0.12);\n border: 1px solid rgba(17, 17, 17, 0.04);\n border-radius: 16px;\n}\n.connect__btn {\n margin: 24px 0;\n width: 100%;\n}\n\n#beacon-modal__content {\n padding: 24px;\n}\n\n#beacon-switch {\n margin-top: 24px;\n}\n\n#beacon-title {\n margin: 0 0 24px;\n}\n\na {\n text-decoration: none;\n}\n\npre {\n white-space: pre-wrap; /* css-3 */\n white-space: -moz-pre-wrap; /* Mozilla, since 1999 */\n white-space: -pre-wrap; /* Opera 4-6 */\n white-space: -o-pre-wrap; /* Opera 7 */\n word-wrap: break-word; /* Internet Explorer 5.5+ */\n padding: 16px;\n background: #ececec;\n line-height: 1.25rem;\n}\n"},I={css:"#beacon-main-text {\n display: initial;\n}\n.beacon-selection__container {\n padding: 16px 16px 0;\n}\n.beacon-selection__list {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n text-decoration: none;\n padding-bottom: 12px;\n align-items: center;\n}\n.beacon-list__title {\n text-align: left;\n font-size: 12px;\n}\n.beacon-list__wrapper:nth-child(-n + 3) {\n padding: 0 0 1rem;\n}\n.theme__light .beacon-list__title {\n color: #7c828b;\n}\n.theme__dark .beacon-list__title,\n.theme__dark #beacon--disclaimer {\n color: #7c99d6;\n}\n\n.beacon-selection__name {\n font-size: 1rem;\n font-weight: 600;\n text-align: left;\n}\n.theme__light .beacon-selection__name,\n.theme__light .beacon--selection__name__lg {\n color: #3b3d40;\n}\n.theme__dark .beacon-selection__name,\n.theme__dark .beacon--selection__name__lg {\n color: #6183ff;\n}\n.beacon-selection__img {\n width: 48px;\n height: 48px;\n box-shadow: 0 4px 12px 0 rgba(17, 17, 17, 0.24);\n border-radius: 16px;\n background-color: #fff;\n}\n.beacon--selection__name__lg {\n font-size: 1.5rem;\n font-weight: 600;\n text-align: center;\n padding: 1rem 0;\n}\n.beacon--selected__container {\n padding: 2rem 0 0;\n}\n#beacon--qr__copy__container {\n height: 0;\n}\n#beacon--qr__copy {\n display: none;\n position: relative;\n top: -190px;\n left: 138px;\n margin: 0;\n}\n#beacon--qr__container {\n margin-left: auto;\n margin-right: auto;\n}\n#beacon--qr__container:hover #beacon--qr__copy {\n display: block;\n}\n.disabled {\n cursor: initial;\n}\n.disabled span,\n.disabled img {\n opacity: 0.48;\n}\n.disabled p {\n text-align: left;\n margin: 0;\n font-size: 10px;\n font-weight: 300;\n}\n.disabled img {\n -webkit-filter: grayscale(100%);\n -moz-filter: grayscale(100%);\n -ms-filter: grayscale(100%);\n -o-filter: grayscale(100%);\n filter: grayscale(100%);\n filter: gray;\n}\n\n#beacon--disclaimer {\n text-align: left;\n padding-top: 24px;\n font-size: 0.875rem;\n}\n.progress-line,\n.progress-line:before {\n height: 3px;\n width: -webkit-fill-available;\n margin-left: -24px;\n margin-right: -24px;\n}\n.progress-line {\n background-color: #a7c4f7;\n display: -webkit-flex;\n display: flex;\n}\n.progress-line:before {\n background-color: #3880ff;\n content: '';\n -webkit-animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n}\n@-webkit-keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n@keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n"};var S=r(505),M=r(109);const C=(t,e)=>e.test(t.navigator.userAgent),k=t=>((t,e)=>t.matchMedia(e).matches)(t,"(any-pointer:coarse)"),x=t=>C(t,/iPhone|iPod/i)||(t=>!!C(t,/iPad/i)||!(!C(t,/Macintosh/i)||!k(t)))(t),B=t=>C(t,/android|sink/i);var O=r(742);const T=new M.a("QR"),R=(t,e)=>"".concat(t,"?type=tzip10&data=").concat(e);var P=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class N{constructor(t,e){this.storage=t,this.storageKey=e}getAll(){return P(this,void 0,void 0,(function*(){return this.storage.get(this.storageKey)}))}getOne(t){return P(this,void 0,void 0,(function*(){return(yield this.storage.get(this.storageKey)).find(t)}))}addOne(t,e){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return P(this,void 0,void 0,(function*(){const n=yield this.storage.get(this.storageKey);if(n.some(e)){if(r)for(let r=0;r!t(e)));return this.storage.set(this.storageKey,e)}))}removeAll(){return P(this,void 0,void 0,(function*(){return this.storage.delete(this.storageKey)}))}}var j,D,L=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class F{constructor(t,e){this.storageManager=new N(t,e)}hasPeer(t){return L(this,void 0,void 0,(function*(){return!!(yield this.getPeer(t))}))}getPeers(){return L(this,void 0,void 0,(function*(){return this.storageManager.getAll()}))}getPeer(t){return L(this,void 0,void 0,(function*(){return this.storageManager.getOne((e=>e.publicKey===t))}))}addPeer(t){return L(this,void 0,void 0,(function*(){return this.storageManager.addOne(t,(e=>e.publicKey===t.publicKey))}))}removePeer(t){return L(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>e.publicKey===t))}))}removePeers(t){return L(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>t.includes(e.publicKey)))}))}removeAllPeers(){return L(this,void 0,void 0,(function*(){return this.storageManager.removeAll()}))}}!function(t){t.CHROME_MESSAGE="chrome_message",t.POST_MESSAGE="post_message",t.LEDGER="ledger",t.P2P="p2p"}(j||(j={})),function(t){t.NOT_CONNECTED="NOT_CONNECTED",t.CONNECTING="CONNECTING",t.CONNECTED="CONNECTED"}(D||(D={}));var U=r(1398),Q=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const G=new M.a("Transport");class H{constructor(t,e,r){this.type=j.POST_MESSAGE,this._isConnected=D.NOT_CONNECTED,this.listeners=[],this.name=t,this.client=e,this.peerManager=r}get connectionStatus(){return this._isConnected}static isAvailable(){return Q(this,void 0,void 0,(function*(){return Promise.resolve(!1)}))}connect(){return Q(this,void 0,void 0,(function*(){G.log("connect"),this._isConnected=D.CONNECTED}))}disconnect(){return Q(this,void 0,void 0,(function*(){G.log("disconnect"),this._isConnected=D.NOT_CONNECTED}))}send(t,e){return Q(this,void 0,void 0,(function*(){if(e)return this.client.sendMessage(t,e);{const e=(yield this.getPeers()).map((e=>this.client.sendMessage(t,e)));return(yield Promise.all(e))[0]}}))}addListener(t){return Q(this,void 0,void 0,(function*(){G.debug("addListener",t),this.listeners.push(t)}))}removeListener(t){return Q(this,void 0,void 0,(function*(){G.log("removeListener"),this.listeners=this.listeners.filter((e=>e!==t))}))}getPeers(){return Q(this,void 0,void 0,(function*(){return this.peerManager.getPeers()}))}addPeer(t){return Q(this,void 0,void 0,(function*(){G.log("addPeer","adding peer",t),yield this.peerManager.addPeer(t),yield this.listen(t.publicKey)}))}removePeer(t){return Q(this,void 0,void 0,(function*(){G.log("removePeer","removing peer",t),yield this.peerManager.removePeer(t.publicKey),this.client&&(yield this.client.unsubscribeFromEncryptedMessage(t.publicKey))}))}removeAllPeers(){return Q(this,void 0,void 0,(function*(){G.log("removeAllPeers"),yield this.peerManager.removeAllPeers(),this.client&&(yield this.client.unsubscribeFromEncryptedMessages())}))}notifyListeners(t,e){return Q(this,void 0,void 0,(function*(){0===this.listeners.length?G.warn("notifyListeners","0 listeners notified!",this):G.log("notifyListeners","Notifying ".concat(this.listeners.length," listeners"),this),this.listeners.forEach((r=>{r(t,e)}))}))}}var z=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const q=new M.a("PostMessageTransport");let K,V,W=!1;class J extends H{constructor(t,e,r,n){super(t,new U.a(t,e),new F(r,n)),this.type=j.POST_MESSAGE}static isAvailable(){return z(this,void 0,void 0,(function*(){return new Promise((t=>{const e=r=>{const n=r.data;n&&"pong"===n.payload&&(t(!0),w.a.removeEventListener("message",e))};w.a.addEventListener("message",e);const r={target:u.EXTENSION,payload:"ping"};w.a.postMessage(r,w.a.location.origin)}))}))}static getAvailableExtensions(){return z(this,void 0,void 0,(function*(){return K||(V||(V=[],K=new Promise((t=>{J.listenForExtensions(),setTimeout((()=>{t(null!==V&&void 0!==V?V:[])}),1e3)})).finally((()=>{K=void 0})),K))}))}static listenForExtensions(){if(W)return;w.a.addEventListener("message",(t=>{if(t.source!==w.a||t.origin!==w.a.location.origin)return;const e=t.data,r=e.sender;var n;e&&"pong"===e.payload&&r&&(q.log("getAvailableExtensions",'extension "'.concat(r.name,'" is available'),r),n=r,V||(V=[]),V.some((t=>t.id===n.id))||(V.push(n),w.a.postMessage("extensionsUpdated",w.a.location.origin)))}));const t={target:u.EXTENSION,payload:"ping"};w.a.postMessage(t,w.a.location.origin),W=!0}connect(){const t=Object.create(null,{connect:{get:()=>super.connect}});return z(this,void 0,void 0,(function*(){if(q.log("connect"),this._isConnected!==D.NOT_CONNECTED)return;this._isConnected=D.CONNECTING;const e=yield this.getPeers();if(e.length>0){q.log("connect","connecting to ".concat(e.length," peers"));const t=e.map((t=>z(this,void 0,void 0,(function*(){return this.listen(t.publicKey)}))));Promise.all(t).catch((t=>q.error("connect",t)))}yield this.startOpenChannelListener(),yield t.connect.call(this)}))}startOpenChannelListener(){return z(this,void 0,void 0,(function*(){}))}getPairingRequestInfo(){return z(this,void 0,void 0,(function*(){return this.client.getPairingRequestInfo()}))}listen(t){return z(this,void 0,void 0,(function*(){q.log("listen",t),yield this.client.listenForEncryptedMessage(t,((t,e)=>{const r={origin:s.EXTENSION,id:e.id};this.notifyListeners(t,r).catch((t=>{throw t}))})).catch((t=>{throw t}))}))}}const Y=[{key:"spire_chrome",id:"gpfndedineagiepkpinficbcbbgjoenn",name:"Spire",shortName:"Spire",color:"",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAIIElEQVR4Ae3Ba5BeZWEA4Oc9u9kkJGHZkIQkLhQziQmVBpJwOTDg7saKEIQwnYq2/WWnUjuxHTOOgbYq77ZqSVGrtZliae2P/gE74zQIodoZEmwrR6pQlTYJ0DWNuWAChBBIyN7exsGZL2e/3Xy3Xf3RPI+zzvr/LfgFyGMKCMPHX/JT7eec75RUxJD8nAVTKI/JKe1YjquxEsuwCHOPH/phm9ER5yy8fAQv4yCeww/wHezGcBGDqRJMgTymaejD+3AjFhvHC09+SRodtijfaAIH8CgexI4ihiGTLJhEeUzn4Q58CG9Vw7MP/po0OmL5b2xVhx/hPny5iOGoSRJMgjymmfgwNmGeOowOnfD0F5eQRq36yIBs2ix1OoR7saWI4YQWBS3IYwrowxasMLGEo3gK/4UfDXz9d+ce+t79HydZsPp3PrPk1vtfxBK8HatxLoKJ7cQGbC9i0KygSXlM0/EpbESbagl78QAewneLGAZVbMTnvWkT7vUzeUwduBK34b24CEG1YXwOdxcxnNSEoAl5TAvwAPpUS3gS9+CRIoYh43sYN3vTNtxsHHlMHViHu3AVgmqP4f1FDIc1KGhQHtMSPIIVqu3GXXioiGHUxGZhAAu86UUswTETyGPKsB6bsUy1nXhPEcOABgQNyGNagn/BEmXD+BI+WcTwmtquxJPKrsUTashjmo0/we+jXdkA3lXEMKBOQZ3ymBbgcaxQdgQfKGLYqn6bsFnZH+HP1CmP6TZ8BV3KdqKniOGwOrSpQx7TdGzFFcr24sYihsc15hNYqmwU/6BO+3b07+rujd/EOnSqmI813b3xwX07+kfUkKkhjyngU+hVthfvLmL4vsbMwRrVrkCnBhQxPI0b8GNla9Gfx6SWTG192KjsCG4tYtilcZdinmpdWKlBRQy7sB5HlH0UfWrInEEe00xsQZuKYXygiOH7mvOrJtarCUUMT+O3MayiHVvymGY6g8yZfRgrlP1lEcNWzesxsT5NKmL4J2xRdgk2OIPMBPKYunCnst24W/POxWoTW43zNO8TeF7Zx/KYOk0gM7EP4nwVCXcVMbymeavQZWKdWKVJRQzHsAlJxQLcYQKZceQxTcPvKfs2HtKatWrr1ZqteFLZh/KY2o0jM761uFhFwr1FDKNa06O2Pi0oYhjFPUgqlqDXODJj5DE55XZl/4ttWtOFy9V2OeZqzTbsVXa7cWSqteNGZQ8UMQxpzRXoVNscrNGCIoZB/KOydXlMbcbIVFuOxSoSvq51PerXo3VbkVS8BcuNkal2jbKj+K7WBPSq31oErfkPvKrsamNkql2q7HtFDINaMxeXqd9KnK8FRQwn8bSylcbIVFum7L+17irMVr9ZuFLrnlG21BiZ0+QxBSxWNqB1PRrXq3V7lC3OYwpOkykL6FJ2WGsCejVuLYLWHFI2F8FpMtVmKntda+Zjpca9HfO1ZlBZZozM1LsaMzVuJq42xTLVTiibpTU9mterNR3KRo2RKUs4omy+5mVYq3l9yDRvgbKXkZwmc5oihoQDypZo3gW4RPMuwQWad7GyA0UMyWky1Z5T9sual2OG5s1ArnmXKnveGJlqzyhbk8fUoTl9WterCXlM07FK2Q+Mkan2hLJOXKFxbejVuj60adyVOFfZd4yRqbYbB1QE3KJxC7Fc65ZjocatR1CxH7uNkak2jH9W9v48pmkacy06tK4D12pAHlMH3qtsWxHDiDEyYxQxOOWryn4J6zTmnSZPn8bcjIuUfdU4MuN7DHtUBHwsjylTnzZcb/L0oE0d8pgy3ImgYgA7jCMzjiKGIfy1smtxq/osxttMnrdhsfqsx1XK7itiGDaOzMTux0sqAu7JY5qttneg3eRpx3VqyGOagz9HUHEIf2MCmQkUMRzBZmXL0a+2PpNvrdr+FEuV3VvEcNQEMmf2V9il7A/ymNabWDuuM/muR7sJ5DHdhg3KdmKLM8icQRHDCWzAiIp2/H0e02XGdyGWmnxL0W0ceUyr8BW0qxjGhiKGE84gU9t2/IWyLjyUx7RCtR60mXxtuM4YeUwrsBVdyj6H7WrI1FDEkPBxbFd2Eb6Rx3SZsl5T551Ok8e0Ct/Ehcoew91FDGppU4d9O/pHunvjo7gF81R04n3dvXH3vh39uzANmzHX1JiN+zCax3QbvoYLlO3Ee4oYXlWHNnXat6P/9e7e+ChuQZeKmfj17t7YdeTZh38ydOzgnQimxnmzFq/52pqPHrgTn8UsZQO4qYhhvzq1acC+Hf1Hunvjw3g35qnIcI00+puvPPvIDFMnXNjX/1uzFq3pQaZsJ24qYhjQgEyDihgG0IPtxji299/mmGKv7nl8jmqPoaeIYUCDMk0oYjiEm/BZjDgljQw6tvffTbVjP/62NDLoZ4axGeuKGA5rQqZJRQwnsQk3YNcbL/+Pk6/sMdVOvrLHyVf2OGUnbsBdRQwnNSmYBHlMM/d/69Mb9//rZzaNDh3vNIWy9hlHu3s+uXnx9X/4hSKGE1oUTKKLb/ri/ENP/d2GwVf33zF84qVFJlH7jK4XOjq7vyylLccPPXPYJAmmwII1H+x44+Xn140Onbj9jRd33zj8xpEuTWibcd6R6Z0XfaN9ZteDM+Yu23boqb8dNMmCKfSWd/yx0eGT04ZeO3j56wefytPwyV8ZOv7israO2RekkcFFieCUQAptHQdHBl/7ybRz5j0X2qf/cNai1cW02Qv/M2ufMbT/W582VYJfgEXXfCQMHXshS2nET4XQZtqchaMHn/hCctZZZ/08/R8wPGmSSU1PIgAAAABJRU5ErkJggg==",link:"https://spirewallet.com/"},{key:"temple_chrome",id:"ookjlbkiijinhpmnjffcofjonbfbgaoc",name:"Temple Wallet",shortName:"Temple",color:"",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAGbElEQVR4Ae3B32/ddR3H8efr/f1+z2m7dT1n3Vp+De22EsxmxARvCNDGhBvDj3/AaxdMJEpIUAOJxl8IXJnFGyNX3i3BiEG9ELIqZNSLmRBYYD+7CS3tuv5Y23N6es7n87Zd2uULxAXDt2cmnseDjo6Ojo6Ojo6Ojo7/S6Jgje/sGdTdu1+2ewZvwwQSMsAEJjCBBCYwwAQSMoEJDDCBBCYwgQmJN3XLH79JwUSBGt/dO4jzmqrlQ/bQEJhAQgaYwAQmkMAEBphAQiYwgQEmkMAEJjAhsYxU1eArLQpkFKTx5MAg0mskOuTLTVgLFErsBO6lYEZRTN8i0SESgQmfq1M4MUrBUoqS6E2xTgIBc6twWy8bfLkJszWukfgUgZMj1okN6iujQ3vYNAI8R4FSCiLTCaQGoozA51cRmxotwvFLEBxChOAQHYJDiHhwCA7RIUQIDsEBRweqZF/qBxPr7vfLj6Xa+4cWBUkpSOkXU/W1Z28fRzwIgloTmgFKKezuJnn4IAiQQIDENQIkJECsEwgQ+L+WCK9fxCeX0Z29rNsJ3Au8RUFSipTYGOJBNkj4QgMNpEjAQA+YwAQSmMAAE0jIBCYwwAQS2ttD+NM5/PQc3NnLNWIUeIuCGEVKdJxEkBgkgoUGn8uuMvSWiKeukDNCgYwiJTpBYg0SQSL8aoP/RnhtApyPSY98leTRg+Tc71ceSymIUaDSDy/WSTROIkgMVlvQinwW8Z3LhGPv49Mr5OmWHejOXeTsBN1LQYyimY0pMZQIJYKlBp+FBnaAwE/P8xmMUpCUginVceBZJAiR8Oo5MKHUIDVIDUoJ9pUBdFeVLRroQdUu4pk5bHQfG/zSVcKJD1EpgVICpQSVzCmnH1CQlKKZTiA1CLEcT07jy2uQJZAaZAalBB2s4HN1RJU83bUbPzMPDgioduFTy1BOoZxAOXVKdiR78tzvKIhRsOyJM3VCHI/jU/jCKh9jQkN9qDuDpTVYDeTZcBVfWsOnV9ig3hKqdLHJcT+SPXnuNxQoZRuEv33wbVbW9pEZeTZcfZSe7HFCxB18ro56etmi4d0g8LPz6NadbEge+uJL4ZWzx3DmSj+Y+AcFS9kGXS+vvgu8C5G8tRcH52jFx3Fng8/W0R29bNFAD6p0Ec8sYA/sY4P27aqUfj75F7aJ0U7BTxLiVYJDK+IzK3yShqv4uXlyRuLkw8Y2Mdqo9PSFFi1/g1aE4LDYgFqLPBuu4str+MwKm/qBw2wTo91CHCM4tCK0HJ9ZIU8HqyDhZxfIGWWbGO3WiscJEYJDiPjUCnna240qZeK5eXJG2CZGu0U/SStepRUhOD65xCfpYBU/v8B10oh/9IixDYw2K/1ssuXB3/AQ8VbE51dhpUmeHajgy018psamfuAw28C4GVpxjOAQIgTHJ5fI04EqkvDzC+SMsg1SbgL1ZL32tVtAYoN2d5OnPd2oUsbPL8B9t7NpBPgVBTParPG9vU95rfmMbutFBypouAr93XyMQPsrxAsL5Iz49KNGwYw2ajw1+BSpvUBm+EyNG9GBCiw38cs1rhH9wGEKZrTJ2vdv/bIye0FZgjLDZ2vciPZXQODnF7hOjFIwo11SO02W1MkMsgTmV7kR9XejvjJ+YZGcEQpmtEnppx82yOwEpQQyw+stWAvciPZXiBOL4GwZ8cuPGQVKaadSMob4OhJEJ/z+DHSlKDPoLZE8cAd0p2zRUAXeuQyzNRjsYV0/cBh4m4IYbaTMjitLkMBPzRLfu4KfmiVOLEK9hV+pk6ehPpCIE4vkjFIgo51SGwfq8Z/T+GKDa7pTbKgP3PGZGnnq70Z9ZfzCIteJEQqU0EY/+fNceOb2cNpn66+T6FUSe9UO7XkQKBMc1gI2XAUJJJDwj1bwS4sk990BEkgDP3r67hd//Pz7TgFS2qz80uIxctbu4RFC/Abu+HyAWgt2ZmzRUB/x1Cx+pY729rCuH3QYeJsCGDdbM4zRjNCM0Az41DJ5+kIfSPjEIjmjFCTlZmvG47iDA9EJf72ITk5DapAIMoNEhPEpfLoGBkg9FCTlZmvFkx79Ku67fHIZ5huQGaSGMoMdGSTCP1omzNbAdBT4JQUxbrLSc1MtmuENv7QEM3U+pRGgGdl0FHiifPSKU5CU/wE+ufI8l2t/JzH+I2eW6L8t/3rO6ejo6Ojo6Ojo6Ojo+Jz+DTK0Yr9D+W0JAAAAAElFTkSuQmCC",link:"https://templewallet.com/"}],X=[{key:"galleon_desktop",name:"Galleon",shortName:"Galleon",color:"",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAN6ElEQVR4Ad3BC3SW9X3A8e/v/7yX3IAQCLdwhyCKGlARRBRorbdZaWu1lx27Xlydp+txW1vtXLs2nh0723o6e13VdhU7dahzFdGCchOEAAICohAScg/kfnnzXvI+z/P/7U0lPVlGIIE31O3zEYaZqoI2OerlTLfqzzJGJnmJ7rxAOJiFVZP0bTJkJKJOoEGUanGkFMdvhxGICMNNSDNVhY62IBnBpSpcD+5SVRagZINyRiIKUilGSnDZJMZ5lYycWhFhOAhpoloBfv6Vat0vqdXbUB1DOohYEXbiOE+JJJ/GjO0QEdJFOEdquyQRdz8WDsj9av1FDCeRTjHBXx1vbPnhpIJd9SJ3cK6Es6SqqI0tU899BOtfzvkkEhcn9KgY7yFxciOcA+EsWK87Dxv7kfr2TkD4UxFTK478tQRG/U5EOBvCEKgqfjK2QrR7FaqT+YAQE3wiltR7c0aMijFEDoOkWoF6oW/gJ54EcvkgUXtZKCC3fLf4W+uKH3yonSFwGAS11vG73V9i7TcBwweR6gTr+5/+bvHfbC5+8JF6BsnhDDQRDagXexrkc3zACeSgwU8X33//tuLvPVzNIDichlrfqO3+jar/Gf7vCKsjnywu/vbrxQ8+VM8ZOAxAVfGT7Q+j/j0MM5vsRpwAaRS2vr+y+MFvvVD84PfaOQ3DAGyy689F9RsMIzfSRndLA1UvPkW6CYy3rn0x2R3P4jQMp6Be9wVY95cMM7ezDT/RRe3a1cSO15B26hcFSD6qqgzE0I/aSMB6sadAszlPrO9R/uSPGQ5qvbvUi6xkAIZ+1NevonYh51nr/t207HmT4aC+9zP14yM4BUMf6sfHqe99hz+R8qd+hnoeaadaoL77gOpq+jOcpKokE7EHUB3FeeDFuvBiXfQVb6in9vfPMxzUevdGI9dNoh/DSWqTEwKOfJnzpOLZx/DicfqrfvEp3K5O0k41MyvD+bqq0pehl9/1V6hmch50lr1L/WsvcSpeLErVC79hOKj1v4StG0UfhhS10YBauYvzQK1P6eM/BFUGUv/6SySajpN2qiPVjvgsfRhS1Pc+jGoB50Ht2tVEq49xOup5VD73a4aD+v6dqkovo6rg2ds4DxJNJ6h6/jcMRuO214nVVZN2yiKiHZM5ydDUKCp6M+fB0V//CD/ZzWCoKlX/+STpp0aN3sRJhrwRc1AKGGZNJZtofXsnQ9G0YyPxEzWknWNWqCo9jNrkYlCGkxfrouzJnzBUqkrNmv8g3VTtYminhwEpYphVPPsYyfZWzkbD1nW4kQ7SS6fjB3JJMVh7AcOo8+gh6l9fw9myrsuJTWtJK1VRnzmkGIWpDBP1fUof/yGoci6Ob3wZVEknC1NJMaDjGSY1Lz9DtKaCcxVvqKf93X2kk7H+eFIMMJJhEG+oo+qFVaTL8U1rSSdfdQQpBtUQw+DoE49g3STp0rxrK148Sro4jgmRYgBLmjW88Xva3tlLOlk3SVPJJtJGxJJiEBMjjdxIO+VP/Zzh0LjtddLFT7oxUgxoK2lUvupnuF2dDIf29/aT7GglHZxQqJUUA1LHIFlrUQbWdmA3Ddte438TQAABBBAQ+hAGRZWW3dtIB1XqSQkI5phil3AG1lruL/457ZEY//T3dzE+P4/+wmPGMf87P+Z/EFKEPxAQThIwoRA9ir79I1BlMMKjx3LuBEHKSQlgvEP4nFYy6fL14l+wbssuetz02fv4yuc/zp133EAoGKCXk5FFtPYYg9Xd2kCPcN54BkVh5OyLOGdCVIKRSlICSOgtSDKQxuZ27v2HR9l76Ci9ovEE3//FM6x6fh1f/PTNfPKjy8jOyiQ0egxNJZtpKtnCcJj9hXsxwSBDYa3ltS17eOfdMv72nk9hjCFlHzLBJyUgSd2pjrioBuln85v7eOCfH6elrZNTOdHUykM/+S3/8thzXL98ITcsX8hVf/lNUEvTzq2k0+zP30vB9R9nMKxV9h8qY/2W3bz82nYaW9rpUd/QwsP/eA/BYHibiNAjQDQRkVGh7ar+Mk5qaGrl+z99hpc37GAwYt3d/Ne6bfxu3TYcY5hXOJWrE1nMz4iRDi9E80luOMYFFauZUjCO/DG55ORk4WDw1CcSidLY0k5VbQOHj1ax/1AZXfEE/b28sYSW9ghfu/v29ZwkpNhE+9+p+o80NrXx62de4ZkXXyfhuvQwIiiKtSACRgQFVJXTcUS5e0wr8zPjnItn23PZGMmhPxFSBFRRhkJa4k2HJ9ZVH3NJCZCy6ulnV+8+WPf998pqnDmzp3PNVQvooVZRAd9TMsLg++C6EAg6gI+Ig7VKIGA4VlVHWUUNyvt8FX7Zksfn89qYGkpyNkrcsTiXXc0NpIhQXllLWUUNiKBKijJUin2+rvqYy0kBepi5tT4n1o8ckXPTpq07sYAqgyICapUZUydx3bLFiCrGMRyrqqO0vIpfteQhDJ1y0pad/IEqs2ZM5vrlV4EqIhBLJDlaXkV9YzOO46CqnEnCDf4bfQgnTbtk5U3BUPIV0kGVGVMLuGDWNKwq8USCnXvfIel6pI0qmeEQhbOmM3H8GHzf8j5FRFCrBEMhPN9HfZduV/HV7nzj1R2LKys300s4KTD/MpnmjNsryHzOgghY35I/ZjSTC8YzJncUoVCIZLKb7KxsFl5xCQcOHKa5rR0siAHHOPjWJxwOknQ9GpvbqKiqIxKNImI4WyKCquK7HggEwyFCJkA4y3xiz8YXX6QPoY+pl3/01hDe7xgEVSU/L5eLLyok6Bh6iDE0t7RRU3eC5tZOPM8lEAzSQ1XpTwQEwfU8Ao7D+Pw8ZkwrYGRODmotCBw6coza442ICOfG7Kn0Wei9vVbpI0AfsUT1S8HgxI3iyIc4BccYFi6Yx6gR2YDQ3NLG9p37SHo+p+IEAqgqA1EFRXEcBwVONLVyoqmVXgJ87o5b6IrGiMYSHK2opryiBkQYIk3GE1/z3t2g9CP0M6Xo2gvDgex9QJgeqswtnMGMKZPwrWXX3ndoj3QhAoKgpKiipN81VxbR1NbJ4aMVqCqFM6cyZ8YURAxbS/bSGY0xGKr+qvLwlL9gx6/oT+jv9tuZVRa7LxDg4aWLFpCdmUEymcQ4BmsVARQLOCjvM6KoVUSEHj5wtKySmvoGEGGoFLhpxVW8d7SSqtrj9DU2L5eii+bQnXQZNSKbg++VU11/nIEI1HZ1ZRcdP/J8K6cgnMLd93zFXLH42nVHSyuv64onKK+qpbyiBjEGVeVMHCMUzpzOtMnjQZWE67HzrYMkkknOJOA4rLxxGZve3ENrewd9BRyHlTcu5/mXNyACqHLpRYVcueASXt24jboTTfTj+9Z+pGLfuk0MQBjAvKU35yei/i4xZjrnKBwKseSKS8nMCHO4rJJj1XWcSu7IHK67djFr1m2h23XpS4DbbrmONes20+169LrmyiKq6hoZm5dLwYSxbN25j/bOLnq4ycR9Eqn4QWVlJQMRTmPCrI9cnJMbeAMYTTqoMrdwJrOnFVBaUU3psWp6zZ09nakFE1i/pYT+FFh54wq2vLmTjkiMXpdfOpdorJvDZRX0EOCaxZeRGQ6xedvbj3eM9b5c+8oaTsfhNLrajjVOnFH4hu9zBxAmRQRUwXoWtRaL4DgGYRBEaG5tp7SimrGjc7l64Xyam9tZumgB8XiCHXsO0J8RuO3mFWx+8y06IlF6zb+oEAEOHi6nr6ra4zQ2Na1+4tEHvvjIfd9QzkAYhE996atXjcoZvTZgzGirihEwThAERC1J1wUMxoAxhtb2CAcOHSHpeigDK5iQzyf+7MOsWr2GjkiU/jJCIT56wzJe3bCNrlicXpfOLSQUNLx18Aj9+RL87fjM6BdKtm7wGARhkBbfcvvFTfWda0TMdE5DVckbNZKii+cQCgYQMZRVVFNWWYuI0CM7K4PlS66gsamV3fsPAUJ/UyaO4/KiC1mzfiu+tfS6/JILAGXPwVL6s+r+oK3KfrOtZaNlkIQhmHHhsnwysp52DNcxWKoUzpzKzOlTCAUcfN+SSCTZsmMPvlr6U4VrFy3A8z127DlIX1cvLKKto4t3S8vpJxpL2rtDGa3/Xrl7N0MhDFHBkmtNOJH5dSPmQSDMIMyYMomL5syksyvKm7vexqpyKuPGjmbpwgVs27WPxpY2eglw04eXcuhIOVW1x+lL0d3GDd159MBLRzgLwtm4/XYmVMcvzEqYn5qA+yFOIRQMsGRhEVkZGVTU1PFeaQWIcCrhYJAVS6+kIxJh++4DiPBHeaNGsGLpItZv3k4kGuOPNNDRnbTFMXPiJy0H9nicJeEc5M6YQzB/zq0jfa9YkPkoFM0rZNL4fJKux/bd+4l3dzOQjFCIa6+6DBQ273iLpOvxR6osvryIzIwQm7a/RR/xOP5j3SbwUPPuVxo5R0IaBJYslWmJSTd+8uZFX92xd//19Q1NDgNRZea0ycydPZ3uZJI3Svbheh59TRw3lsWXXULJ3gMcb2zhfVLneYEnWqIj/jWyIHmC554jHYR0Gnkr4yc0TM4MmDska9StjsoSgaAIzJs7m4IJ+QhCeVUtpeVVIEJf2VkZLF+ykKamVnbtP0RKXbdNvOIkEi90BXI2NB98zSPNhGGSPXEiubnTRnzuMx9bNH3yxCtWPbN2XkNL50zEFACjQTMBA7jhcCiy8sblDR0dsepX168/4pnAft/rLIn62aXthzcr/1/kXng15OQzadZCcifPkbyCQpORP5fr77qLd8rKgHmcb/8N3VaULP16cD8AAAAASUVORK5CYII=",deepLink:"galleon://"},{key:"umami_desktop",name:"Umami",shortName:"Umami",color:"",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAANSklEQVR4Ae3BC1RVZaLA8f+39z4HgQXiJBmgLWpEHRXFQhHMiJGsMTR5zJjL8Iosb2KOaRpZ4gulScXedWOIAequtGmC1mAjjSmWYyRpoGiTiEp6xgxWJ5QAOY/9XbhLW3DcoFQ+6/fjF7/4eRN0k5TSExgLhAD9AA+urCbgOFAB7BBCNNINgoskpQwBFgFxgDtXp2agAMgUQlRwEQQXIKXsCawHkgClsrKSwsJCSktLqampobGxESklV4IQAk9PTwIDAwkPDyc2Npbg4GBa6UAusFAIcYouCLogpRwIFAFBu3fvJjU1lZKSEtooioKfnx9eXl4IIbgSpJQ0NDTw1Vdfoes6baKioli7di2hoaG0OgRMFEIcpBOCTkgpBwIfSin7rFq1ivT0dHRdJyYmhuTkZKKiovD29uZqcPr0aUpKSsjJyWHTpk0oisKyZctYunQpQoivgTuFEFUYEBiQUvYEPpVSBs2aNYucnByCgoLIy8sjIiKCq9nHH3/MjBkzOHToEMnJyWRnZyOEOASMFEKcwoWCsfVA0KpVq8jJyWHMmDGUlZURERHB1S4iIoKysjLGjBlDTk4Oq1atolUQsB4DCi6klCFA0u7du0lPTycoKIhNmzbh4+PDtcLHx4dNmzYRFBREeno6u3fvplWSlDIEFxrnWwQoqamp6LpOXl4ePj4+uNKrPkP/9J/Ib2tR+g9Hvfe/kKe/wfF6BkhJByYz6p1xKIPDwHYGe/YS0HXOIxSUXwejjn8QVA2kxP7nJ8F2BkNCIHrdiDJyPMqA22jPx8eHvLw87rjjDlJTU9m2bZsCLAIepB2NdqSUnkBcZWUlJSUlTJw4kYiICDqwncH+0qM4PyrkHOfWtxCBQ1AG3Y785iv08u24cn6wEXP6X1EGhyF6B+DYsA4jzg/A+VEBpvkvIfrcjHbfTOx56ei7P6BTbz+POnYypj8+C+YenBMREUFMTAxFRUVUVlYSHBwcJ6X0FEI0cpZCR2MB98LCQtokJyfjyrE5D+dHhXQgdeyvPAYOO6Y5mQjPnpzHYcP+9Ezkfw6jTXkUbfJsOqP/+1Na5v8Wx9+zEH63YE57A/O6f6COmQSaCSPOHe9if3EBrpKTk2lTWFhIK3dgLO0odBRCq9LSUhRFISoqClfqyPFgMuNKHvsCx4ZMhG8A2py1GJGnrdhWPICsPY42Yzna7+fTqeZGHH9ZQcu8u3DueBfl18MwPZaFW045ptlrUEKjwcOL9pw73kWv+oz2oqKiUBSF0tJSzgqhHY2O+tGqpqYGPz8/vL296cBhR/jfinZ/Co6/PY8rR+HLKCGRqGMmIf/9KY5Nr+FK1lmwpcVjXvkW2rTHEb39sWcvAYcdI/I/h7GvT8Hxv39CvScRNTIe9d7pqPdOB92JtFSjWw4h6yxw2oowmWnP29sbPz8/jh49yln9aEejIw9aNTY24uXlhStHfjrq5Dlof5iP8+Mi5IkjdKDr2J+ZgzmzGC1pObrlEHrFh7iStcexPXE/piX5qPckIvoNwL4+BfnNV3RGfn0Mx+sZON74E8qAESghd6EMDkPcOgT15oF0xcvLi8bGRs7yoB0FA1JKhBC4kk3fYc9aDOYemOY9B4qKK/ltLfanZ4LDjjk1G+XWoRiR9XXYlsThLHkbZXAY5ue2ot5xPxckdfSDe3C8tR7b8j/QkjiElsQh2B4dj23lVPQDn+BKCIGUEiMK3aSX/RNnydsog0ai/f4RjOiHKrA/MwfcPDAt34DoNwBDtjPYn5+H/cUFCM2EadGrmNNeR/jdQnfIBiv6kUr08u04S/5Kdyj8APbsJciTNWhTHkUJHoMR565i7C8vRHj/CvOqvyECB9MZ59aNtDzyW/TPtqGE3o3bi9sx/fdTiBv86DYp6Q6FH6KpAXvmbHA6MC16FeHbFyPObW9hf2khwvtXuGUUoAwJpzOy9ji29GnYn5qBPPkl6oQk3LI+wTT/RZRBoVwqCj+QXr0X+6tPIHr2xrwkHzy8MOLcuhF7ZgqYe2BesRE1eipdcZa9T8u8KOzPzkVaqlHvSsD8dBFur+xEe/AJlEEjQdXonKA7NDqh6zrnUVTac27dgOgXhDY5BfPjr2FbnQh2G66cHxch67/G9HgOprnPoAy8HXt2GtjOYEh34vzwHZwfvoMyZDRq9FTUsN+hJcyDhHnQ3IheXYF+ZD/ScghZZ0HW10HjacTNA3Gl6zqd0ehEfX09rsSNfXHleH01orc/6h33Y1r4P9jXPQROB670z8uwLfodptQ/o949DeU3o7A/90f06r10RT/wCfqBT7CbUlGGjUEdEYUyZDTK4NEowWO4GPX19ZhMJoxodKK2tpa6ujp8fX05R42IwbEhE3Qn39N17M/NQ3h4oY6eAItexb4+BRx2XMk6C7YnJqM9+DjapNmY17yHY1M2jo3rofk7umRvQd+zDX3PNv6fmztKv4EI/1sRvv7Q0xfR60bUsZNpr66ujtraWgICAjCi0AkpJcXFxbQnAvqjTU7hPA4btqdnopeXoIbfh/nJfOjhgSGHDUfeKmxpsciTR9Hun43by/9CvXsaqBoXraUZvboC50cFON55CcdfliOPHsBVcXExUko6o9CFrKwsXGmJT6JNfQxMbnRga8H21Aycpf9AuS0K8+oChG8AndE/L6Nl/jgcbzyFcPfE9HAmbi99hBo9FUxmusXkhjb1MbTEJ3GVlZVFVzS6sHPnTgoKCoiLi+N7QqBNeRT13uno5R8iv/0akHzvzHe0UfoPx+3lf+Hc/QGy9hhISWf0w/tQhkYg/G7BNPcZtAefQN+1GdnUQNcEoteNKCPuQvTsjauCggJ27txJVzQuYPbs2dx2220EBgbSnujZG/WueLpk7oEaEUN3CR9f1Hum82PU1NQwe/ZsLkThAurq6oiOjqa6upprRXV1NdHR0dTV1XFOjx49MKJwEQ4fPszIkSPJzc1F13WuVrquk5uby6hRozh8+DDtBQQEYETjItXX1zNz5kzWrFlDUlIS48aNY8CAAXh5eSGE4EqQUtLQ0EBVVRVbt24lNzeXgwcPYuT222/HiEY3HTx4kMWLF3O5nDhxAqvVytChQ/kxYmJiMKLwMzBo0CAiIyMxovAzsHr1ahRFwYjCdW7KlCnEx8fz+eefY0ThOjZ69GhycnI4deoUKSkpGNG4Tt13331s2LABk8lEfHw8R44cwYjGdcbX15f09HQeeughmpqaiI+P5/3336d///4Y0bgO3HDDDYwePZrY2FgeeOABPD09qaioIDExkf3799Omb9++GNG4AqKjo0lJSSEkJAR3d3e60qdPH3x9fTlx4gRGPD098fb25pyqqioyMzPJzc3F4XBwTmhoKEY0LiMhBC+88AJz586lzZdffonVaqUrVquVzkgpsVgsWCwWysvL2bJlC7t27UJKiauJEydiROMyWrBgAXPnzmXPnj0kJSVRWVnJ5TB06FDGjh2LEY3LxN3dnbS0NE6ePMn48eOxWq1cLhkZGQghMKJwmYSFhdGrVy9yc3OxWq34+/uzb98+9u3bh7+/P5dKYmIikyZNYu/evRhRuEz69OlDm5qaGtpER0cTHBxMcHAw0dHRXAqRkZFkZWVhtVqZM2cORjQuE4vFQptBgwbRpqioiM2bN9OmqKiIn1pCQgL5+fkIIUhISODYsWMY0TAghOCnVlZWxsmTJ0lKSuLZZ5/l+PHjTJgwgZ9aQEAAGRkZTJ8+nYaGBhISEigpKaFfv34Y0eioiVaenp781Ox2O4sXLyYvL4/t27fz8MMPs2XLFpxOJz+GEIK+ffsSFhZGXFwccXFxuLm5sWvXLqZPn05VVRVtPDw8OKuJdjQ6Ok6rwMBAvvjiC35q+fn53HTTTWRkZLB582ZaWlpobm7mx/Dw8MBsNnPOvn37WLduHW+++Sa6rnNOYGAgZ1loR6OjClqFh4dTXFzMpbBmzRree+89Zs2axYgRI3B3d6crw4cPx+FwcODAAVxJKWlubsZisVBeXs6WLVvYu3cvRsLDwzmrgnY0OtoBNMfGxrovX76cS2X//v088sgjXIwTJ05gtVoZOXIkP0ZsbCytmoEdtKPQjhCiESgIDg4mKiqK60VkZCTDhg2j1btCiO9oR+F8mYC+du1aVFXlWqeqKmvXrqWVBDJxoeBCCFEB5IaGhrJs2TKudWlpaYwaNYpW+UKIz3ChYGwhcGjp0qUkJydzrUpKSmLZsmW0OgwswICCASHEKWCiEOLr7OxsVq5ciaqqXCtUVWX58uW89tprKIpSC8QIIeoxoNKJlStXfrNixYoiIcQ9kZGRN0yYMIHq6mpqamq4nBYuXEhzczOvvPIKFyMyMpKNGzcybdo0hBCHgfFCiC/ohOACpJQ9gfVAEqBUVlZSWFhIaWkpR48epampCSkll8qePXuor69n3LhxuBJC4OHhQWBgIOHh4cTGxjJs2DBaSSAfWCCEqKcLgoskpRwBLAJiAXeuTs3Au0CmEOIzLoKgm6SUnsCdwHCgH+DBldUEWIAKYIcQ4jt+8YtfXKz/A/OhBgM5KLZoAAAAAElFTkSuQmCC",deepLink:"umami://"}],Z=[{key:"kukai_web",name:"Kukai Wallet",shortName:"Kukai",color:"",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAHNklEQVR4Ae3BbWyUhQEA4Ofevg0f7d0RsAllEJSpQVy1K3SQIQro2HRoVIymS/Zj6w8xfk6NWzRzoJkO48d0MUaTZv6yMRFNxM2EIX4wIthSUJERgrCmjHZWCXdXapsWbgk/iLbvlXuPsgHjeZx11ln/1xJiaGjMV+NazMU0lDs1DKADm7GmuSnRqUgJRWhozF+AR7EMoVPbIFbjoeamxOeOI+E4Ghrzy/EMxjq99OGe5qbEi0ZQZgQNjfk/4HGETj8hltbUrRi3fevKdQooU0BDY345Hnf6u6ymbkXX9q0rt4gQiNDQmL8Azzhz/LGhMf9dEQLRHsVYZ46x+L0IgSEaGvPVWObMs6yhMV9tiNBw1yJ0EiQSVJ1D9WQmTmDsGEf19XPgIJ1ddH9JPu9kCHEtXvINoeHmGkXl5cyppb6Oiy8iWWlE2Rw7dtLSRus2BgaMprl4yTeEhptmFIwfz9VXsWQxyUpFSyWZV8+8enI9rF3P2+vo7TUaphkiNFy5IowZwyWzSCbZ287edsdcMZ+Gm0glnZBkJcuu40eLeOU1PtjomPOmM+Ncsjk+/Yy+fsUoN0SoBOfP4L7bSacds6mFtev56Y+ZXWtUpZIs/wX13+cva/nJlfxgtmMyGZ56nt17xBaKacwY7ruddNq3zKtnXr2TanYts2sNk05z3+3c8yD9/WIJxXTJLNJpJ+RQL51dZHOOSiWpnkzFeCVLp7lkFi1bxRKKadw4Jen+inc30NrGvv0iTZ3CnDoWLaBqktjGjRNbKKb2DrH0HOLV13lvA4ePGNG+/ezbz5q/snABt9xIZYWitXeILRBTewd/36QoO3fxwMO88z6Hjyja4SO88z4PPMzOXYqycTPtHWILlODFP/PxdiPa8jGPPc3BjJIdzPDY02z52Ii2fcoLTUoSKMHhw3T8S0E7d/HsCwwOOmGDgzz7Ajt3KWjffo4cUZJACcrLWThfpJ5DPPcig4NGzeAgz71IzyGRLv8h5eVKEijBnFoqK0V69XUOZhQlnSKVVJSDGV59XaRUkjm1ShIqQX2dSN1f8d4GI0qnuGEp8+pJJR2VzbGphTfeIpNV0HsbuO4aqiYZpr6OD1vEFogpkeB7s0R6dwOHjyjo/BmsWsmSxaSSjkklWbKYVSs5f4aCDh/h3Q0iXXwRiYTYAjFVnUNlhUitbQpKp7j/TlJJBaWS3H8n6ZSCWttESlZSdY7YAjFVTxbpUC/79ivohqWkko4rleSGpQrat59DvSJVTxZbIKaJE0Tq7DKiefWKNq/eiDq7RJo4QWyBmMaOESmbU1AqSSqpaKkkqaSCsjmRxo4RW+C/IJFwygrE1NcvUiqpoEyWbE7RsjmyOQWlkiL19YstENOBgyJVTzaiTS2KtqnFiKoni3TgoNgCMXV2iVQxnqlTFPTGW2Rzjiub4423FDR1ChXjRersElsgpu4v6Tkk0pw6BWWyPPknsjkFZbI8+ScyWQXNqRMp10P3l2ILxJTPs32HSIsWUBYoaPcefv071q4nm3NMNsfa9fxmBbv3KKgsYNECkT77B/m82EIlaGljXr1hqiaxcAHvvK+gTJaXX+HlV0glHZXNKcrCBVRNEqmlTUkCJWjdRk+PSLfcyIS0omRzZHOKMiHNLTeKlM3Ruk1JAiUYGOC9jSJVVnDXrYShUROG3HUrlRUifbCRgQElCZSgLGDqFAXNvJC7byMMnbAw5O7bmHmhgqZ+hyBQkkAJljdSW2NEsy/lwXuZkFayCWkevJfZlxpRbQ23NSpJIKbp05g/V1FmXsgTj3DlFZQFilYWcOUVPPEIMy9UlPlzmT5NbKGYpk8TS2UFjT/numt4dwOtbezbL9LUKcypY9ECqiaJbfo02jvEEorp66+VpGoSN1/PzddzqJfOLrI5R6WSVE+mYrwT8vXXYgvF9MkOMhnSaSWrGM/5M4yqTIZPdogtEFN/P089TybjWz7awiNPsGWbk2bLNh55go+2+JZMhqeep79fbKES7N7Drx6k5mJSSfb8k73tjtq5i8vn87ObSCWNimyOV17jg42O2rmL86Yz41yyOT79jL5+JQkNN6AIff20tIn0wUZat3L1VSxZTLJSSXI9rF3P2+vo7fUte9vZ2y6uAUOEhuswCnp7Wf0mb77NnFrq65g1k1TSiLI5duykpY3WbQwMGE0dhggNtxm/NEoGBviwhQ9bSCSoOofqyUycwNgxjurr58BBOrvo/pJ83smy2RCh4dbgeYRGWT7PF9180e1/YRBrDBEYorkp0YnVzjyrm5sSnYYIRPst+pw5+vCQCGUibN+68kBN3YqvsNSZ4Y7mpsTfRChTwPatK1tr6laMw2VOb6uamxKrFFBmBNu3rlxXU7fi37gKodNLH+5obkqsMoKEIjQ05i/Ao1iG0KltEKvxUHNT4nPHkRBDQ2O+GtdiLqah3KlhAB3YjDXNTYlOZ5111llF+A8aUDCF69BprwAAAABJRU5ErkJggg==",links:{mainnet:"https://wallet.kukai.app",delphinet:"https://testnet.kukai.app",edonet:"https://edonet.kukai.app",florencenet:"https://florencenet.kukai.app",granadanet:"https://granadanet.kukai.app",hangzhounet:"https://hangzhounet.kukai.app",ithacanet:"https://ithacanet.kukai.app"}}],$=[{key:"airgap_ios",name:"AirGap Wallet",shortName:"AirGap",color:"rgb(4, 235, 204)",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAALT0lEQVR4AeXBCXiU9Z3A8e/vfd+5kskBARYIkAsCSIRyRe5AKbhQ8CqWemGpVnF1qVKPrdoSrSiW6qq0lhZXu7UrskVQSq0VpAIGwxGgHAE5RBMIgUAyk8xkMjOZ+e/zZh9cauXNTMjx7MPnI0qpRkC4PCkDEEDj8hTVuMxpXOY02om3xsfix1/jlumP4qmu48saAiHumv1TFj/2Kp7qOtqLQRsLhxp549U/8x8vvY2vth7TkUNljBwziAsdO3KCnUWl7Cwq5U+rP+KO+ddx8x3TsNtttCWDNhKNRPnjW5tZ9twqTp88xxcUIMKXiQZKKUQEf12AlxatYOVr73PPgzcyY9Z4NE2jLeiFhYULAaGVNDZGWLdqM4/8y0usXbkJf12A84J9u1Je+M/MnjSCPrqdC3Xt1okrhmRz5FA5NWdrMfnrAnz4l538Ze3HJKUkkNOvF5qm0YqUQSs5frSCdX/YxDsrN1F91ssXFARzu1L5/dFUT87FyoRvDGP85KGsX1fM8hfXcPRgGSLC58dO8eP5L/PiohVc952JzLxxAr0zu9MaDFpIKcXBfcfZvH4XG9/bzpHSMkSELyjwj8rgzK0j8YzNBEVMRISpM0czZcYoPtq4h9d/vY4dRQcQEc6eruGVF9ew/IXVDLwyi0nTRjLhG8Ppf0UGCC1iEKNoNMqxwyfYs/0TSj4uZXvRAWrO1SIimEQEUyTZSc2MQZyd9TUCmZ1AAYq4iQjjJw9l/OShfHr4BKt+/wHvrt5CrcePiHBo/2cc2v8ZL//sv+nSLZWR4/IYPmogw/IHkNm3JyJCLAya8Unp57z09Bvs3naIQH0QEeE8EcEUdTuondiXmin98Y7JQmlCE8VXqo1GiEd2bi8efvJ2Fvz4Vor+uof164rZtL4Ef10AEeFclZf31hTx3poilFIkJrkYmj+Aex+ezYC8TKwYWAjUB5k3+ym8NT5MIkITpQjmdKVubBbe8dnUDeuNEmK2xF9JgT2JBNGIh2HTKZg6nIKpw4k0RigpPsiWD3ax9cO/8enhk4gIIkK9r4GijXv4W8lh3i1eijspgYsxsFBSXIq3xocp3D0ZX34GvhG9qR2VQaiLG5SiJf4a9pF5di/9dCeCYBLAEP5BZzGY60pjhiOVC+mGTv64PPLH5fHDhXCmsprizfvYufUAO7aWcrriHD5vPTu3ljLx6hFcjIGFqsoazit7Yhq1I3rzBaW4FFXRCFVRP7FYHfSwPLkPd7q6cjHdunfmmm8XcM23C9j5cSl33fhTTGcqa7CiYcHr8XFeJMVJRyr0nSJWKalulKJJrdeHFQ0Lfl8DTaKKcKcEOtKpaJhGFLHo3CWZaDSKyVdbjxUNC746PyZRikiKk46Ub0vAQIhFUkoiIjTx+xuwomGhIRDCpOwGEYdBR+mmGSxLyiBWdrsNh9OOKRgIYcXAQsAfxKQS7CACKOI1yeZmiiOZJNFpic6aznR7KqmaTjwS3S481XUE6huwYmAhEGjA1JhoB6WIR4JovJmSxUxHKh0h0e3CU11HQ0MIKxoWQsFGTMppgFLE49dJfZjpSKWj2OwGpnAwjBUNC4H6BkzKaQNFzHJ0O7e40uhIDocdUyAQxIqGBb+/AVPEZSMeo2xuhI6V6HZiqvc3YEXDQjAQwhR12vj/xuGyYwo2hLGiYaEhEMQUddmIR3HYh6JjOZ0OTIH6IFY0LAQCQUxRp0E8jkVC/FfgHB0pIdGJKRBowIqGhXCoEZOyG8Tr7roy3gnW0FHsdgNTONSIFQMLkcYoJmVoxKteRbnO8ykFNjdTHckki855OvBdVxdcotFWdEPHFI1EsWJgQSmFKaoLLbUp7GNT2MeFbnd25p6EbrQlTdcwKYUlDQsiNNGiitY00HDR1qLRKCYRLGlY0G06JglFaE1/CnqI0rYawxFMuk3HioEFl8tBqCGMVh+iNW0J+7nec5Q7XF1wi8bFuEVnmC0BAyFefl8AU0KCEysGFpJT3XhrfOjeBlrb2qCXtUEvzemr23krNYfBRgLx8Hp8mJJTErGiYaFzWjIme5UPhA5xNBLiW55jNKKIR1VlDaa0rilY0bDQPb0LJvsJD4LQUY5GQuwO1xMrpRQV5VWYuqd3wYqGhcycHjQJNeIo99CRFLE7WX6GQH0DpozsHljRsNA/L5MmIiTuq6CjZOt2htkSiNW+kqNomoYpd1AGVjQsfG1Ef5RSmJJ2lNERsjQ7q1NyMBBitWPrAUxKKYaMyMWKgYXUzknkXpHBkYNlJG8+iqirUUJcrrYnMceZRrKmc56GIPwfAYR/lCQ6I+2J2BBiFY0qNm/YhanfwD506pyMFYNmFEwdzpGDZeg1AZI/Po53TBaxusOVxvLkTIT2U7xlL+fOeBGBgqnDaY5GM6bfMA6lFKZuK3aBEBMBFrnTEdrXG6/8GRFQSjH9hnE0R6MZmTk9GTF2ECZ30XHce08RC7do/JNmoz3tLTlM0cY9mEaMHURW33SaoxGDO+dfj1IKBHr9fCOxqFNRDjU20G4UPPfE64gISinu+sENxEIjBleNy2NUwWBMrv2n6LLuALG4p/Zz/CpKe/jjqs3s23UU0+iJgxk5dhCxMIjRQ0/MYfaUR4g0Run5/Id4x+cQTnFi5cOwj4Fn9/MtZydSRScWugiDDRffdKSgI8TCU13H80++jkk3NB4snEOsDGKU3a8Xc+6ZyWtL30H3Buiz6H2OLbkWlMJKeTTMC/VniFe+4eLdTrmkaQbNWfSjV/DW+DDddvcMsvv1IlYacZj3wCyy+/fClLzhMF3X7KWtbG8McG9tGc1Zs2IjG9Ztw5TVL515P5xFPDTiYLMbLH55PnaHDQTSn91A4qEztJXVwRrqVZSLKd37Kc8+/ltEBJvD4JmX/xW73UY8NOLUt39vHnv2TpRSSChC9v1vYT/toy2EUdSpCF+lsuIc989dQigYRinFj57+HrkDM4iXRgvMnDWB2+bNwGRU+ek3byW26npaW2/NTjfNxpdVn/Uy76anOHvag+mmO6dx3exJtIRGCz3w+C1MuXYUJntZDbnfW4HjVB2tRYBnk9IR/l5FeRVzry+k7Fglpq9PH8mDC+fQUhotJCI8/eJ9TJgyDJO9vIb+t/2O5F0niJ0CFKAAhQAacKXhZFVKNjc507jQjq0HuHXGY5Qfr8Q0umAwz/xyPpomtJTBJdANneeWL+DR+b9g/dpi9JoAOXe9SdXtV1ExbyxRm8ZXydBsrEjNZoiRgPC/BLCJAILO3wuFwvzq53/gd8vWoaIKU8HVw/nZsvux2QwuhcEl0g2dxb+cT1bfdJb/+2qUUnT97TZSNnzCyYe+jmd8DijFhZ5ypzPa5iYWWz7YzZKF/8mJz07TRGDuvddw78PfQdOES2XQCkSEeQtmkT92ED954FdUlFVhP+Eha/5q/CN6c+q+8dQN6QmKJr10O83Zt/sIv1i8ku0f7UdEMHVPT6Pw+Xnkj82jteiFhYULAaEV9OjVlRtunkxjJMKB3ceIKoX9VC2d395L8p4Kwj2SCaan8l1nGpm6g69SUnyQpx55haVPr6CivAoRQdc1bvn+NJb8ZgGZOT1pRcqglTlddn7w6M1cf9Mknn/y92x6vwQRIXH75+Rs+4zAlT2xLVsAmUlc6PSpczx89wvsLTmCiCAiKKUYN3koC35yK1l902kLBm2kT1YPXnjtIXZvP8TSZ95k9/ZDiAiu/adwVHghsxcXqjx5jn27jiIiKKUYPDyX+/5tNiPHDKItGbSxofkDeHVNIds+2s+rS9/G6/HRf1AmX9ZvQG/652XidruYe9+1jJk4hPZg0E6uGpfHVePyuJgEt4sV7z1De9O4zGlc5gxAAVEuT+p/ABopEAN9AKm/AAAAAElFTkSuQmCC",universalLink:"https://wallet.airgap.it",deepLink:"airgap-wallet://"},{key:"naan_ios",name:"Naan Wallet",shortName:"Naan",color:"rgb(129, 100, 100)",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAZfElEQVR4Ad3Be5BeZ33Y8e/veZ5zznvd+0VaaVfWfSVLtiUbY4PBBsaUy0CCE0JDadopCdBJ2iQ0w0ynSSedyaQzzaTJtJlJ/oBShoRJS2nTlNImxNg4gSBsLNuydZdWu5J2tau9vfvezznP8yuvPLJLhtYr22khn4/8yscarpnG0mitStluiBYsJndS8GUsDRmoWsltJB2vSCYikZOO74gJGVEwIlJGoiAejw9G0IjUd6XolSiyaAyZ74giCJkJmsWCxuCcqjGqKmLwqM8QzVSjrrVOjQhWYiWFPFc6BpxxKsYjJqgYi+0mGvwGIQkaJMJqot0cjeNMS5GobadstFAvJbxLteva6tsBDVZL1XGNRdWVvJWosyJ5XhdfNQwSiwYrmW8QF61keZCcTDyR5KISdz1YFQTJrGAUcagR1oYNy3uQ9Z2xWZnE1Cdy0xhT3xwRbQ4IaT/4kiU4UAMYBIPQExACSEBsRjBNpVDLKa6JGbgurrQYU5lHhufQgUtWRy8E37+ekStO9LtE8SqpR1wQsJrnuUqwGseWTrtOREIICWnS0aTVpVhflzjpx+WtZVkLHcn7DP2dWJJiJKHUFtOxmDQzrWIQkyLQhciKqhHj1ajMH4rszNuU2ftDWLgDOlsEhO+yhhuU71I2wwAGFMhjoAzpGGygLIIBw8tU8UL5qpitz2J2HAvhtsfVbzuptqPGBBUfyL2RzJlQ7AqmXNZ2pyUmcwxKzHoJ1jttKu0Wbt2komVhsB3LUB5LppkQCmKDiisUJc86YiIrGlKh2xzAPfX3nXvm70J9F98lwv8PFppTRs5PoeffZwTUVi8qd/2+Zvd8TszAauLikGapwUVK16uLihqHNqVugjhYL2Xa7Hix9x38eVeQRExuxcuGaDkRUSvWOOlKR8RYwQWH/OXHnP3i50Vm3gXpID9ghHRQmHvQmqf/HiKp2sln1IvmWYq1ESY2SEFIsxa5dwiO3Cv2wYO/FEU4CT6VXIxEhViMFfHWS+pVMCtbhD/4A+GZj4Iv8gPPF+DiO5TTDwRue8yHcoPIY50B4+mmHXwOTmJciDHGODGSSqVUoiAFcZmVXHNJQ26cub7XyGe/Clffwg8bXXiTMZ/5qomX9ucGyTQVmxlxGkmxkGBCWwTERFEqSbGAEKRbSqRl2uKDiNX6DpHP/jE0Jvmh1dpm5LP/1bCy2wcnbRckK1YkUielUh+FomBsFNGVVDpRapzPxKgTtFkVPvcFaG/lh157i+H3vwD1PpMjziOduGtatMVbFSOFSEBE8kysqFhjxPLlX4fVg/yNsbbfyh//KyQXa1UIuSCIOCNONWCMiBgkhFQMFx+Ekx/hr0EpVkZKnoFSoBwHYqv05EFopkKtbbneNDS6htednv7bmNP/KWP/o8aAESNiFae5kUxUjLOEFBeFP/k1EYTXgQDjfZ7psZSdQzlDJY8Rvq+gioiAQq1jmFmNOLMUcaXmUOV1of7Pfi3P9z1hIpMFCRJlRu3bjn4qMV6NEETsifcbOf4xXiMjcGA85T0HW9y/o0NORkeFgQRE4GrLsjZ+gOt5QjWrMev7aN/xdhZDhXh9nv4CbO3zHNqaMj2WogrXmw5VXhORzojYgbOiW05GwWO8weV0RFB8biWKjn2C12jHYM7b97YZKXsutyNmd9zHnqOHERGe+6M/QlD2PPIeqtUSqvDof/4T3vTuBymVCtRLjmfOn+N2U6cYGXqGSoGH97d5w1SXxy8UOXc94rUwfOsTWTjyJZWAulQc4kUtAkt7hWv38ipFVnloT5s7J1JCUE7LBHsfeQ+VSpGe4ANh6iBH7t6PtQZQLp+b5fCb7qZUKhDSBtUdQ+w9vI/nvvU0924H4WUDxcCPHmpyeiniq2dKdHLh1RCuHxUWDoiZOGmswbjcYiQRZ0+/FxBehb5C4MNHG9w1keK9crayjzsfeYRKpUhPSOucPD3DXUf3Ya0BFN9Zop5njG8dADJMlAEZW+67nYnJbZxd5fuaHsv4yD11hsueV0ki98J7rcQkPhIDiYRgQWce4FUYLnk+fLTBWMXjg3KmtIcj734TRjaADmiTuSvzTG4fxNk6mtdAN5idX2fXbSOEdIV0Yx4IvMiz9wMPk/dtpdYJ9NQ7Oaq8ZLAY+PCRBhN9Oa+Ghpm35sFIFgwmSzwqLWdk4Si3aKAY+Im7mlSTgA/Ko9cKTAz3I5KTNWqktUVW11a4+uwM5SgAns7qEqo5Z791Gt1oYSIHQVk9eY50owGqiEk5+uPvZXFkmp4vLTX4xMUVvrlQ56ZCpPzYnU3Gq55bJbJ0REwzyeNMDHgxcm0X5APcgsQpjxxuUkkCPV++CNsiZeJN9wOOqFImb7X56pePs3OkgisN0BOVivzZZ/6Y5PoipS3bQCqYyJHW6pz+91+ktbiM73S5fvwZ9j74VmbbCWvtjM/vGeDHGh3SPHBTwSkfONykEgdujS8Ll6eRIMZ5h2X5MLfo4X1thsuenr+4ooyXChz40feBCEiJkOV8/avPsa1TY2DvHsABRRC41nbsPbSHFyXU5xZ49rc/Q2nLKMngALY4zvgbpimVEkr3P8w+tQwuNPjHxvBfZtb4rUtrNLs5PdUk8N6DLYxwS0SvHbZeMCE4VBenuQX7xzIOjKf0zG5A3Q6w7859lCe28iJDbXmd1fWMidE+Slu2cINEXHj0W+jqOuP3voGe9tIi/bunuOuffIzb3v8wttAPdifY3YDjO8sZXyj0ccfcBt9R5R9MlvmiBkqx46apwZwj27rcCtWlg0ENJs0zUV3ewyZFVnnbnjY9rTRwKt7JgSHLtoce5KaNi6c4/vwieyqw6wM/So+GQP3SOdaLgxy8707EWsBQHBvDxIOM3fshbDIJlAADMgxmhPv27eXJkHFxaIChZsb+uQ1+I4r4zVNLzK93yHyg5807O5RjZfNWd3fTTOz9Rz5ZjM3jPy/S3sIm3DOZsm80o+d4e4i9D9zPvgfvB7Hc1LU5Fy5ucPTuaQqDgyCCiJD0x5w4s8K9D91LUh4CuwPIgYC4YcQOg+kHIkBAClTLFT75lh9heeYiP1V1/POJAlN9CXOdnN+9vM7PtboMNDPu7k9wBmZWIzYnaObv+7SLTBCR+nY2wRq4e3uXnit10Klpdu+eAATsTtAGhEVmLtTYtXs7/XumwAwDBQgLQIF2SygWE9AuEMBsgTAPYQ3MVsACyssSen7hPR8mdGb40qd/j1+sKKVWxtpIkf5mRrko5D5weCLlL2cLtDPhlYi0txqXOxO7ZgXSPjZhz3BGJQn0rAzsZmxsgBcpICD9BE24PLfC1I4xXmRBymDGaLXBZi3ai4tAgLDIDWYrkIHWAEVDG/V1NO9w0+joVsa3T/O5sTGWp/rY4ZWP1lI+UYh4uL9AElliqxwYT9mcvBhH3X4j1AeAiE2YHk/puVpX0uooleU5XqItemYudeiPQOo1btAaN0gfy6s5w31F2svL3KBNCEuAAbMNiOgJ7Q2az38NcY7vIUOsA4dfqPN7oxU+v7XML+/o4/NXa9w0PZaxSUZCbdiEkA6xCdbAjsGcno3KBGZjjUK1yku0Rk+7sUF+fZG4WuUG7YJu0NNNqxT6qnRWV3mJ1iAsARakBAimOELljr8FOP6qr3zoUzz2s7/A9Y6llXrwgScqMTdt7cspRspmCO0BY0yjj00YLXsSp/To8HY6iwv0793DS7QJ2sWnDXyzQWd5hZeE64CnUCghxrF25Ro3qW9AuARhnpvEOJAC3ysHXWN0ZIDhsWkm3/k+HrUxX1/u8pZmRlClxwhM9OVshtCpmuBDiU0Yq3p6luoZwxNbac9fRYzhe+gKPmuTtzvE/X28zENYZGxsBOscC0s11HtAERMAD2EWXz9L6Db5/jyE6+DnQOtsHR9C+7ZzZGuVT06PYkS4aazq2RwtGkQSNmGg6Omp5Y5yKaGybYK4r4+XaJvglzHGI9Zg4piXhA6EJZK4DbbIyJvfglgLuoHvNNi4OMflP30CW6hjYsv3l4CUQdtofoFkoMjOvTv59kwXVb7HYDGwGSI+MYJ1bEI5VnokijHGEPX1oSHwooD6BkKDEHJsqUxrYYGbVFtAG/x5kvIg/eUC8/MrIBVsoZ/lZ09Rn5tHyYCM/yMziu/Wqc9eIWQ1hu+4nZ2HDnJ8xaHKS0qxshkhdKxRhM2IjNIjqhgjDB85ihgBrZG3ryHWICIYA6NHj9K3axeQ4tuLiFFelLLztiK15VUW5pZQNSBltr/9rez5ifciUuL/Lka5jdn/8ThiDC6B2971TqYOHOSkjqO8KLbKZhgTYwRhU4QbXN7B+wBBAQEEV0hYfvYUs195jJC2KESOer0FCLYQUTt/idr5S8x+5TEKSZOkuoXRcsSJ5y7SEw/dRTx4F5hBkBLgQRtA4K9ypTFu//jPYhOHiRTjYOK+e7nrkQ9wymxDlU1TVYwS2Iw0F3rGyobFxVXSTsoN0oeGmOXjL9CcX8RFgdHhPi7PLQERSD/liW089Wv/lsLQAEjO9NEjXDy1QNxqcvnyEmgdZBTMJGAhrKD5BfCnQFt8D3GI2wlEgAetYZMOLhLu/JH3c9pM0M3ZpKDGSMjZhGZq6CnGhu7KIs4I7XaXnrztGZzezdg9d7D70E6uXV+n2+ygqoAFIu755X/E0OH9IP0ICW94/09y+TvPszq7wOrKMoRlXiIxIinoBvjnydYv8bIMsRakyMs8i8f+HPEph97/Pk6mQ2xOITci2mUTVluGmzonvs1wIszNLtITVScYv/8BBg/soVweotPoMlYwnDt3lR5X2Un/vjcSlctABBJRLpe448d/ho0TJ7j4/AWajQXQNW6QhKzZYO3MBdZOncHEV0HbgII/Tb5xjNXnj5Oub/DtX/0tVJXxew9j4xZxLLzjI+9GEuEVCV2jSItNWGpYbhofjLj27HN0mh1ukCLY27HFKZA+Jg+8mYXT52iuNfA+AApmF9g7wU4BBvCMb9vC9oc/TNTY4NSJGdrNqxCWgISoMsn814+R1hvYuAS6yA1mJ65UpjK1lSuPfZO+XVO0FpZ4kQGEoaEqD77/Tl6JYJoGqnU2YaVpaWdCz0S/49qZM5TjiNXVOmgbsGB2gtnO6Pg4zbzIiEk5c3oOtAHkIEUgAQL4GfBn2blvC9UDDzFYLXPy2QvUNxbAzwLC/p/6EKNHDoEUQVMISyAVcIeJ+yZoLVynvbRMeWIcpAoyCFh64sTySpS+dQNujU0ICjOrETcNlpX8haeZv3wdtA14XqItjr7vPl74b/+d0O7SaLQgrPKyAORovgr+LLt2D2GruykXi8ycnuPKlXnA44qjmHgIMNygNdAVICZrDHDwp3+SI7/0cfJ2B4i46blnZvjT//g0ryRovOqC9q0ZyAHHKzi1GHFwPKVn//YK37m6xOCWNdI0Iy7UQIZ4UUalBGMPvRF78RRng3L03hJoFaQICD6tYyMDePDnmNyym5XyEebOPU1nvcHxa2sMlSwDsWLjhOLYGLaQoH4ZsULUvw18HXQDVyzRbLZ5/vhZXjg2w6VzGzhjeQVZO+9bd3lIGrFEDcgGeAWXViNqbUN/MZBEhmrVsXWwzPlzVzh4ewK2HzCErIXQ5q4H7+Bbf/oCkwMVZmYW2LnTgp0EBBuXqJ19jrXT55l690NktROMbXmQkZGHOXPqSUJ6meXUsdCo07k2T3txger4GJVtE/Tv3kWeWzqtBldm50nnZyltLHD7WMxjswM4Y3ll8QYhaZg82KBamWcTgsKTlxNu2lFssZ4qWatLlnUhLNFjIkdr4RrNK/P0s0G706WxusHGxgb4K4CCDFCfvcrKc6cJWU5hpATawBjDgQOjHJqusGNvBRtqDO6fIh4YoO/QNL4Yc+35F8i6TbqdDrevPMU7h1Z54LaE00tF0lzYDNX+OaNGnVELDM7A2kE24bmFhLsnuwwWA30Fy5Uzx9n50MOcPjnL4TsdaAGIMUmJZ/7lv+HOX/woV+odhsuDnD15iTvv3k/ELKCMv/FuRo4cxJUGgRLoOkgfmAmSwVXikJL3C0k1x2bXOXRkKy8rgpQ4sTLLaOM8rUx46nLC5g1cEmsxzhRVZPQ8m+QDPHq2iPKiXWaZufMzJCIsL29AuA5hCVcosvuD76G8dSvTB3dzbXWDqa3DHH/qDHmeAUrUN05heAxw3KAd0DpQALsfkZi80eLb/+K3KY4N015a4WWBnsn73sxiC75+vkgnFzZNhs85Z9WI7aKMnuYWzKxGPHs1oacQGQozT1GIHbMXrpJlOaBE1WHG7z0KJgEKHLlnP3NLGZPjgxx/8gz1RhvUgvQBMS8J1wEPUgU7RfW2Sfp3TTF4YA/FsRGQEkgVpEzPwGCVk34HL1yLuTXjp6woxpucYLac4BY9dr7AwoalZ0clcP3YY2wbG+DpJ8/ifQAixA4hpkyPiHDPvXew0u6nv1zi0unLfOOLX2H+L77B2slTvCyHcJ2etJZTnhjnvl//FNWpCSABikAMCD0hKKfmuii3RsOW57zmah+8+1MFQqlm+ObHISRsUlDhwkrEnpGMYqSMRCnnLsyzbd80585fpXP6BP3bt2Gc42UpY1unCW6A9fUVqiP9rHaFuROnmf/qnxCL0rh8hcrkGIjDFkcwrgmk2DgGHEhMjyrMzi7yh595nLXLdUSEzUuWg3/Pr2sguDiLNHVJFsL400auPsQtaKaG//BMhQ/e1WS45DlcrHH+G1+hdOB+asURvv67n2PX7gmG77yD6tQU4EFrjI6OUMkmaDKLv2awt+9nbXWK2a4jSSLWTs5io6tYm5DEEDQn7bao11dYurpEtbuGWV/hiWeVTh4hItyaiackSnziRe3Db/ilAiZDdX1cmH0btyj1wumlmPGqZ6AYGIo9ZmmG9VZG9dBR1rxj7vEnMGvLiDEUBktg+okqfZRKNcbGKwwmGVP7d5CZBBPHoErIA51Wi4vPvkB44Rj+4mkGF89w0F7HbDT4sxcSmqnj1Tn6GTE7noqNUfvAG34hCT6X3JeXnHnqZwDhFuVBOLUY0zPRn1OMhDFpoAsX6KY5fmI3jdIwXZuQq6dcApEU8ECGKxVwUYmhoUFGRvsZHRtgdGwAayA5/yT7yl1GikI5thy/mvDlkyXameHVEd/17/skEm14k6nTPAf1KoxeUt3+dZErb+NVCArfmClw7nrE2/e2mRzIGSlbRlgmtJa5cs3TvjrEeSlzrGuQSh/FaoVCKSaODWkGeZoyFAcKeRvWl6g2rrGjKPRcq1seO1fkSs3xWiiTXxMduCoh16CKM7lVNV6c8Rrkgd+x/OHbeA2WGpY/PF5hx2DOvVMddgzmGIGpfgvUgBrE3NBdD3SuB1TBWaEUG4wIN2lRuFJzPHU54fxyhCqvWeCB3zE2qISA8bG6NIrUWFX1OeT7Hjdu4hvC/Jt5jWbXHLNrFfqLgf2jGTuHM7ZWPZFVbkqcIXGG/13mhaWGZWbVcXYpYqVleb0o254I+d4/x+WaR0atWHWxQ0UjNZojUeS9ffc/Jf93XwN1vA5qbcO35xK+PZfgDAwUPQPFQDlWIqv0ZF5opcJ6x7DeNmReeP1JFty7/llB4mAwmmNVrcdJJ+CjoMbEiE8Q3XYiyBv/tei3PsXrLA+w3LQsNy3/r6m86TeN3/a8CZHiRH0IaluRGu2gVq1aE2kWcjSLlPDO30B2PMrfGJNfE33Hb4pPtJvngFHrUc1EjbiCOhWVbqreoFnuFV/MNPydj8L40/yQU8aeCeGDH8VHmVev3gY13UxtEMXkatLcabPZIojRKN1QrNU8dDTvROvB//QjysQ3+CGluuWY6scf8d2+tSzLVcVolDU0F9V2u0EnL6i9f/oTzpiEPG2KjRPEe2IMkYswlLvK9JfEtEswfzdg+OEQxNzxGfUf/LjTaj0S1OBVQlutLWq3mxE01jxLsXcf/Dnri4aiTyiQgYoaY8RaIdWAaOKtmX5Mza7HNVzdJ9Lczg8w1dFnxT3yCRPe+mkJSRYQtRLUaa4iRk3mVUxJu7HXXLtq7zryD61FiSNDKY3IrRfvIRglOKcGwYqgoXI14+gXVLc/oXhrZG07hAI/EEwz6K7/qfLwr3h9169aHZ2JcBrEahBFQ1tDMEowWgixdqJMWzbTTHN1cZqDFV0vQh5HmLxA0EwrxknikW7iCZmi0kGsDSa77Zve7/qmtxpF9spRYf6NhJmjyOLtUJ8ETfjrlUH5KrrlpMrkMyKTxzK//Um8a1sXwAbNQ6oSvJpiokkH9a6krbyr3id0krbWXa5R6snzgGvHQRPvJaqjjSoUxRB1E9qdDkkxIU0NNvKI6SNkKcZ3lDiIkyS1ZvpYnh865vO2GOvF2k5RdWWb92s7nDYmRGrjSmcU1x5CW/3QrYKWoFmEPAZ13CA5uBTKHZAmxHWkVCMU1yQUl4X+axnleTGDl0WGrvhQauKtii1q5FKiONc0bWOCaG4SIh+r913NWmhANUu7hBChcVdrLle3kdOWTH3JqxsobdN6tkLa6Uo1Q9MiqDqpypCa3FPqNggVq92QiwYrVkviQ1vFBokDquolt5mKtSKm1Ay+cC5w27mcgCMT5wwSRWR5JkE9AhgDISggCKCioAbVgAgY47DGachyvCpeHCpWjaYYa9RaJZcM52ONg9GuCSBGNU1ArHoJWiBWWp48LmspGtQNU6dJW5NGpq0oI6r0acVV9X8BXChrJiNQKxUAAAAASUVORK5CYII=",universalLink:"https://naanwallet.com",deepLink:"naan://"},{key:"autonomy-app",name:"Autonomy",shortName:"Autonomy",color:"",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAIPElEQVR4AeXBe2yNdwPA8e/vdw5VdGmxJsV0SiKaLC5L3GLuySLZTObSLKOtS8XQHdritNWn+lTbHWXVRlyaoUhZOtFISJhLJAhxi6nJrOJadVDM5XC0nOd9+4dkked3ejunXu/5fITxXwQwSYCTBDhJgJMEOEmAkwQ4SYCTBDgrrejWrVtUVVVRzzAMDMPgXd26daNnz560FiutpLa2lhkzZvDq1StiY2ORUmJm1apVlJSUEBoaSmuw0kqKiopITU3lt99+48svvyQyMhIzgwcPJicnh/z8fFqDpBXcu3ePiooKxo0bh6Zp6LqOymeffUZdXR1//fUXrUHSCrKzs9E0jXrdunUjKiqKY8eOoZKRkUF2djatQeJn58+f56OPPqJXr168lZyczJo1a/B4PJjp3LkzQ4cOZe/evfibxI8Mw+Cnn34iNTWVf2vXrh3fffcdmzdvRmXu3Lls3ryZ2tpa/EniR2VlZYwfP56QkBDeNXnyZA4ePMiTJ08wY7VamT9/PoWFhfiTxE9evnxJWVkZcXFxqKSlpZGbm4vK2LFj+fPPP3E6nfiLxE/y8/NJTk5GSolKv379ePnyJX///Tcqmqah6zr+IvGD27dvc/v2bYYNG0ZDMjIyyM7ORiUqKopOnTpx9uxZ/EHiB7quo2kajfHxxx8zcOBADhw4gIrdbsfhcGAYBr4m8bETJ07Qo0cPPvnkExprwYIFbNy4kbq6Osx07NiRCRMmsGPHDnxN4kMej4eff/6ZlJQUmqJNmzYkJCSwbt06VKZNm0Z5eTkulwtfkvhQSUkJMTExBAcH01Tjx4/nzJkz1NTUYEYIwZIlS3A4HPiSxEeePn3K/v37mTJlCiqHDx+muLgYlYyMDLKzs1EZNGgQDx484Pr16/iKxEfy8vJITU1FCIGZuro65s+fT1JSElVVVZjp06cPQUFBXLx4ERVN08jKysJXJD5w9epVnj17xoABA1BZu3YtV65cweVysXTpUlTS0tLIzc1FJSIigujoaI4cOYIvSHxA13U0TUPlwYMH6LrOWzt37uTEiROYCQ0NZcyYMezevRsVm83G2rVref36NS0laaGDBw/Sr18/wsPDUcnIyOCff/7hLcMwsNlseDwezMyaNYvS0lLcbjdmgoKCiI+Pp7i4mJaStMDr169Zv349iYmJqFy4cIFffvmFd507d44tW7ZgxmKx8OOPP1JQUIDKhAkTOH78OI8ePaIlJC2wYcMGZs6cSdu2bVFZtGgRb968wUxaWhpPnjzBzMiRI6msrKS6uhqVZcuWsWLFClpC0kwPHz7k5MmTfPXVV6js2rWLo0ePonL//n10XUdF0zR0XUclOjoaKSWXLl2iuSTNtGLFCpYtW4aK2+1m8eLFeNOhQwfu3r3LlStXMPPpp58SHh7O6dOnUUlPTycnJ4fmkjTDpUuXsFgs9O3bF5XVq1dz48YNvLHb7RQVFaHrOipLly5l5cqVGIaBmbCwMEaNGkV5eTnNIWmGnJwc0tPTUblz5w55eXl4ExkZSXJyMl26dGHIkCHs27cPMx06dGDixImUlpaiMnv2bLZv347b7aapJE20Z88eRowYQVhYGCp2ux2Xy4U3DoeD4OBg6v3www9s2rSJ2tpazHz//ffs2bMHl8uFGYvFgs1mo6CggKaSNMGrV6/YunUrc+bMQeXUqVOUlpbizfDhw5k6dSpvWa1W5s2bR1FREWaEECxevBiHw4HKyJEjqayspLq6mqaQNEFhYSGJiYlYLBbMGIaBzWbDMAxUpJSsWbMGIQT/Nm7cOCoqKnA6nZgZNGgQ9+/f58aNG6hkZmaSlZVFU0gayel0cvnyZUaPHo3Ktm3bOH36NN7ExcXx+eefYyYzMxNd11HJzMwkKysLlcjISCIiIjh16hSNZaWRdF0nMzMTlefPn5OWloY3UkrGjBnDoUOHqOfxeHjL4/FQ7+bNm5SUlBAeHk49j8fDWx6Ph0ePHnHs2DG++OILzCxZsoTY2FjKysqQUtIQK41w9uxZOnXqRM+ePVHJzc2luroabxISEqjndDoRQiCEoJ4QAiEE9WJjYxFC8Pz5c4QQCCGoJ4RACEFcXBx9+vRBpX379kyePJlt27YRHx9PQ6w0wDAMHA4HW7ZsQeXatWsUFBTgTVRUFIWFhQQFBeFvMTExxMTEMGnSJEJCQvBG0oCdO3fy9ddf07FjR1RSUlJwu914k5+fT1BQEK1BCIHdbicvL4+GSLx48eIFu3fvZvr06agcOXKE8vJyvBk1ahTffvstrWngwIE8ffqUq1ev4o3Ei5UrV5KSkoIQAjNv3rxh4cKFeGOxWCgoKOB90DQNXdfxRqJw8+ZN7t69y5AhQ1ApLi6moqICb2bNmkX//v15H8LDw+nfvz+///47KlYUdF1H13VUHj9+jKZpeBMSEkJ6ejput5v3JSEhgWnTpjF69GjatGnDu6yY8Hg8OJ1Ounbtisry5cupqanBm2fPnhEZGcn7FhYWhsvlIjQ0lHdJTEgpiY+PZ+PGjZi5fPky69ev50Nht9sJDQ3FjERhypQpnDx5kqqqKt6VlJREXV0dH4Lu3buTmJiIisSLvLw8UlNT+be9e/dy4MABPhTLly8nODgYFYkXXbt2ZcSIEfz666/Uq62tJSkpiQ9FdHQ08fHxeCNpwOzZsykvL6empoaioiIqKyv5UOTm5mKxWPDGSgOEEOTk5LBgwQL279/Ph2LYsGF88803NMRKI/Tu3ZuhQ4fyxx9/EBERwf86IQSrVq2iMaw0ks1mw2az8f9GEuAkAU4S4CQBThLgJAFOEuAkAe4/IW7lge8FkmkAAAAASUVORK5CYII=",universalLink:"https://au.bitmark.com/apps/tezos",deepLink:"autonomy-tezos://"}];var tt=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const et=new S.a,rt=["ookjlbkiijinhpmnjffcofjonbfbgaoc","gpfndedineagiepkpinficbcbbgjoenn"];var nt,it;!function(t){t[t.DESKTOP=0]="DESKTOP",t[t.IOS=1]="IOS",t[t.ANDROID=2]="ANDROID"}(nt||(nt={})),function(t){t.IOS="ios",t.ANDROID="android",t.EXTENSION="extension",t.DESKTOP="desktop",t.WEB="web"}(it||(it={}));class ot{static getPlatfrom(){return tt(this,void 0,void 0,(function*(){return B(window)?nt.ANDROID:x(window)?nt.IOS:nt.DESKTOP}))}static getPairingInfo(t,e,r,n){return tt(this,void 0,void 0,(function*(){const i=null!==n&&void 0!==n?n:yield ot.getPlatfrom(),o=t.p2pSyncCode,a=t.postmessageSyncCode,s=t.preferredNetwork;switch(i){case nt.DESKTOP:return ot.getDesktopPairingAlert(o,e,a,r,s);case nt.IOS:return ot.getIOSPairingAlert(o,e,s);case nt.ANDROID:return ot.getAndroidPairingAlert(o,e,s);default:throw new Error("platform unknown")}}))}static getDesktopPairingAlert(t,e,r,n,i){return tt(this,void 0,void 0,(function*(){const o=yield J.getAvailableExtensions();return o.forEach((t=>{const e=rt.indexOf(t.id);e>=0&&rt.splice(e,1)})),{walletLists:[{title:"Browser Extensions",type:it.EXTENSION,wallets:[...o.map((t=>{var n,i,o,a,s;const c=Y.find((e=>e.id===t.id));return{key:null!==(n=null===c||void 0===c?void 0:c.key)&&void 0!==n?n:t.id,name:null!==(i=t.name)&&void 0!==i?i:null===c||void 0===c?void 0:c.name,logo:null!==(o=t.iconUrl)&&void 0!==o?o:null===c||void 0===c?void 0:c.logo,shortName:null!==(a=t.shortName)&&void 0!==a?a:null===c||void 0===c?void 0:c.shortName,color:null!==(s=t.color)&&void 0!==s?s:null===c||void 0===c?void 0:c.color,enabled:!0,clickHandler(){return tt(this,void 0,void 0,(function*(){if(r){const e=yield et.serialize(yield r()),n={target:u.EXTENSION,payload:e,targetId:t.id};w.a.postMessage(n,w.a.location.origin)}e(it.EXTENSION,this)}))}}})),...Y.filter((t=>rt.some((e=>e===t.id)))).map((t=>({key:t.key,name:t.name,shortName:t.shortName,color:t.color,logo:t.logo,enabled:!1,clickHandler:()=>{}})))].sort(((t,e)=>t.key.localeCompare(e.key)))},{title:"Desktop & Web Wallets",type:it.DESKTOP,wallets:[...X.map((r=>({key:r.key,name:r.name,shortName:r.shortName,color:r.color,logo:r.logo,enabled:!0,clickHandler(){return tt(this,void 0,void 0,(function*(){const n=yield et.serialize(yield t()),i=R(r.deepLink,n);window.open(i,"_blank"),e(it.DESKTOP,this,!0)}))}}))),...yield ot.getWebList(t,e,i)].sort(((t,e)=>t.key.localeCompare(e.key)))},{title:"Mobile Wallets",type:it.IOS,wallets:[...$.map((r=>({key:r.key,name:r.name,shortName:r.shortName,color:r.color,logo:r.logo,enabled:!0,clickHandler(){return tt(this,void 0,void 0,(function*(){const r=yield et.serialize(yield t());n(r),e(it.IOS,this,!0)}))}})))].sort(((t,e)=>t.key.localeCompare(e.key)))}],buttons:[]}}))}static getIOSPairingAlert(t,e,r){return tt(this,void 0,void 0,(function*(){return{walletLists:[{title:"Mobile Wallets",type:it.IOS,wallets:$.map((r=>({key:r.key,name:r.name,shortName:r.shortName,color:r.color,logo:r.logo,enabled:!0,clickHandler(){var n;return tt(this,void 0,void 0,(function*(){const i=yield et.serialize(yield t()),o=R(null!==(n=r.deepLink)&&void 0!==n?n:r.universalLink,i),a=document.createElement("a");a.setAttribute("href",o),a.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0})),e(it.IOS,this,!0)}))}}))).sort(((t,e)=>t.key.localeCompare(e.key)))},{title:"Web Wallets",type:it.WEB,wallets:[...yield ot.getWebList(t,e,r)].sort(((t,e)=>t.key.localeCompare(e.key)))}],buttons:[]}}))}static getAndroidPairingAlert(t,e,r){return tt(this,void 0,void 0,(function*(){return{walletLists:[{title:"Web Wallets",type:it.WEB,wallets:[...yield ot.getWebList(t,e,r)].sort(((t,e)=>t.key.localeCompare(e.key)))}],buttons:[{title:"Mobile Wallets",text:"Connect Wallet",clickHandler:()=>tt(this,void 0,void 0,(function*(){const r=yield et.serialize(yield t()),n=R("tezos://",r);window.open(n,"_blank"),e(it.ANDROID)}))}]}}))}static getWebList(t,e,r){return tt(this,void 0,void 0,(function*(){return Z.map((n=>({key:n.key,name:n.name,shortName:n.shortName,color:n.color,logo:n.logo,enabled:!0,clickHandler(){const i=window.open("","_blank");t().then((t=>et.serialize(t))).then((t=>{var a;const s=R(null!==(a=n.links[r])&&void 0!==a?a:n.links[o.MAINNET],t);i?i.location.href=s:window.open(s,"_blank"),e(it.WEB,this,!0)})).catch((t=>{console.error(t)}))}}))).sort(((t,e)=>t.key.localeCompare(e.key)))}))}}var at=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const st=new M.a("Alert"),ut=new S.a,ct=(t,e,r)=>at(void 0,void 0,void 0,(function*(){const n=()=>at(void 0,void 0,void 0,(function*(){return ot.getPairingInfo(r,((t,e,r)=>at(void 0,void 0,void 0,(function*(){r||(yield yt())}))),(()=>at(void 0,void 0,void 0,(function*(){k()}))))})),i=yield n(),o=e.getElementById("pairing-container");if(!o)throw new Error("container not found");const a=document.createElement("span");o.appendChild(a),i.buttons.forEach((t=>at(void 0,void 0,void 0,(function*(){const r=yield Object(_.a)(),n=f("div",["beacon-list__title"],[],t.title),i=f("button",["beacon-modal__button","connect__btn"],[],t.text),o=document.createElement("a");o.id="button_".concat(r),o.appendChild(n),o.appendChild(i),a.appendChild(o);const s=e.getElementById(o.id);s&&s.addEventListener("click",(()=>at(void 0,void 0,void 0,(function*(){t.clickHandler()}))))}))));const s=document.createElement("span");o.appendChild(s);const u=t=>{m(s),t.forEach((t=>{const r=document.createElement("div");r.classList.add("beacon-list__wrapper"),s.appendChild(r),r.appendChild(f("div",["beacon-list__title"],[],t.title));const n=document.createElement("span");r.appendChild(n),t.wallets.forEach((r=>at(void 0,void 0,void 0,(function*(){((t,r,n)=>{const i="Open in ".concat(n.name),o=n.key,a=n.logo?f("div",[],[],[f("img",["beacon-selection__img"],[["src",n.logo]],"")]):h(["beacon-selection__img","svg-inline--fa","fa-wallet","fa-w-16"],[["aria-hidden","true"],["focusable","false"],["data-prefix","fas"],["data-icon","wallet"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 512 512"],["style","enable-background:new 0 0 512 512;"],["xml:space","preserve"]],[d([["d","M376.2,181H152.9c-5.2,0-9.4-4.2-9.4-9.4s4.2-9.4,9.4-9.4h225c5.2,0,9.4-4.2,9.4-9.4c0-15.5-12.6-28.1-28.1-28.1H143.5c-20.7,0-37.5,16.8-37.5,37.5v187.5c0,20.7,16.8,37.5,37.5,37.5h232.7c16.4,0,29.8-12.6,29.8-28.1v-150C406,193.6,392.7,181,376.2,181z M349.8,302.9c-10.4,0-18.8-8.4-18.8-18.8s8.4-18.8,18.8-18.8s18.8,8.4,18.8,18.8S360.1,302.9,349.8,302.9z"]])]),s=f("div",["beacon-selection__name"],[],[f("span",[],[],n.name),n.enabled?void 0:f("p",[],[],"Not installed")]),u=f("a",["beacon-selection__list",n.enabled?"":"disabled"],[["tabindex","0"],["id","wallet_".concat(o)],["alt",i],["target","_blank"]],[s,a]),c=document.createElement("span");c.appendChild(u),t.appendChild(c);const l=e.getElementById("wallet_".concat(o)),p=t=>at(void 0,void 0,void 0,(function*(){if(t&&"Enter"!==t.key)return;n.clickHandler();const i=e.getElementById("beacon-modal__content");i&&r!==it.EXTENSION&&r!==it.IOS&&(m(i),i.appendChild(f("p",["beacon-alert__title"],[],"Establishing Connection..")),i.appendChild(f("div",["progress-line"],[["id","beacon-toast-loader"]],"")),i.appendChild(f("div",["beacon--selected__container"],[],[...n.logo?[f("img",["beacon-selection__img"],[["src",n.logo]],""),f("img",["beacon--selection__name__lg"],[],n.name)]:[]])))}));l&&(l.addEventListener("click",(()=>p())),l.addEventListener("keydown",p))})(n,t.type,r)}))))}))};u(i.walletLists);const c=t=>at(void 0,void 0,void 0,(function*(){if("extensionsUpdated"===t.data){const t=yield n();u(t.walletLists)}}));let l;l=e=>{e.data==="closeAlert-".concat(t)&&(w.a.removeEventListener("message",c),w.a.removeEventListener("message",l))},w.a.addEventListener("message",c),w.a.addEventListener("message",l);const p=e.getElementById("beacon--qr__container"),g=e.getElementById("beacon--qr__copy"),y=e.getElementById("beacon-title"),b=B(window)?"android":x(window)?"ios":"desktop",v=e.getElementById("beacon-main-text"),A=e.getElementById("pairing-container"),E=e.getElementById("beacon--switch__container"),I=()=>at(void 0,void 0,void 0,(function*(){const t=r?yield ut.serialize(yield r.p2pSyncCode()):"";navigator.clipboard.writeText(t).then((()=>{g&&(g.innerText="Copied"),st.log("Copying to clipboard was successful!")}),(t=>{st.error("Could not copy text to clipboard: ",t)}))}));let S=!1;const M=t=>at(void 0,void 0,void 0,(function*(){const n=e.getElementById("beacon-switch");if(n&&(n.innerText="none"===t?"Pair wallet on same device":"Pair wallet on another device"),v&&A&&E&&g&&p&&y)switch(v.style.display="none",y.style.textAlign="center",A.style.display="none",E.style.display="initial",t){case"ios":case"android":A.style.display="initial";break;case"desktop":A.style.display="initial",y.style.textAlign="left",v.style.display="none",E.style.display="initial";break;default:if(!S){const t=yield ut.serialize(yield r.p2pSyncCode()),e=((t,e)=>{const r=O(0,"L");t.length>500&&T.warn("getQrData",'The size of the payload in the QR code is quite long and some devices might not be able to scan it anymore. To reduce the QR size, try using a shorter "name", "appUrl" and "iconUrl"');try{if(r.addData(t),r.make(),"svg"===e)return r.createSvgTag();if("ascii"===e){const t=r.getModuleCount(),e="\x1b[40m \x1b[0m",n="\x1b[47m \x1b[0m",i=new Array(t+3).join(n),o=new Array(t+3).join(e);let a="";a+="".concat(o,"\n"),a+="".concat(i,"\n");for(let s=0;s{M(C?"none":b),C=!C};k();{const t=e.getElementById("beacon-switch");t&&t.addEventListener("click",k)}})),lt=(t,e,r,n)=>f("div",["beacon-alert__base","animated","fadeIn"],[["id","beacon-alert-modal-".concat(t)]],[f("div",["beacon-modal__wrapper"],[],[f("div",["beacon-modal__header"],[],[h([],[["xmlns","http://www.w3.org/2000/svg"],["id","Guides"],["x","0"],["y","0"],["version","1.1"],["viewBox","0 0 179.2 43"],["xml:space","preserve"],["width","140"],["height","40"]],[f("style",[],[],".st0 {\n fill: #3880ff;\n }\n .st1 {\n fill: #fff;\n }"),d([["d","M45 19v.9c0 .3-.2 7.5-3.4 13.2-3.3 5.6-9.4 9.3-9.7 9.5l-.8.4-1.3-.8-7.6-4.4c-.5-.3-.9-.6-1.4-.9-.4-.3-.7-.5-1.1-.8-.8-.7-1.5-1.4-2.1-2.2-.9-1.1-1.6-2.4-2.1-3.7-.9-2.3-1.3-4.8-1.2-7.5.8-.4 1.6-.6 2.4-.6h.6c-.2 2.4.1 4.6.8 6.6 1 2.8 2.9 5.1 5.5 6.6l7.4 4.3c.2-.1.4-.2.6-.4 1.9-1.3 5.3-4.1 7.3-7.6 2.2-3.9 2.8-8.9 3-10.8L38.8 19c.3-1 .4-2.1.5-3.2L45 19z"],["class","st0"]]),d([["d","M36.3 4.1v10.3c0 .5 0 1.1-.1 1.6s-.1.9-.2 1.3c-.2 1-.5 2-.9 3-.5 1.3-1.3 2.6-2.2 3.7-1.5 1.9-3.5 3.6-5.9 4.8-.9-.6-1.6-1.3-2-2.4 2.1-1 3.9-2.3 5.2-4 1.9-2.3 3-5.1 3-8.1V5.9l-.6-.3c-2-1-6.1-2.6-10.1-2.6-4.5 0-9.1 2-10.9 2.9v3.6c-1 .3-2 .7-3 1.1V4.1l.8-.4C9.7 3.5 16 0 22.5 0s12.8 3.5 13.1 3.6l.7.5z"],["class","st0"]]),d([["d","M10.5 16.5l-7.4 4.3v.7c.2 2.1.9 6.5 2.9 10 2.2 3.9 6.2 6.9 7.9 8l3.1-1.8c.8.7 1.6 1.4 2.5 2L13.8 43l-.8-.5c-.3-.2-6.4-3.9-9.7-9.5C.1 27.4 0 20.2 0 19.9V19l1.3-.8L9 13.9c.5-.3.9-.5 1.4-.7.4-.2.8-.4 1.3-.5 1-.4 2-.6 3-.7 1.4-.2 2.9-.2 4.3 0 2.4.3 4.8 1.2 7.1 2.7 0 1-.4 2-1 2.9-1.9-1.3-4-2.2-6-2.5-3.1-.6-6-.1-8.6 1.4z"],["class","st0"]]),p([d([["d","M73.9 23c.9 1 1.3 2.3 1.3 3.7 0 1.9-.6 3.4-1.9 4.5-1.3 1.1-3.1 1.7-5.5 1.7h-8.6v-23h8.4c2.3 0 4.1.5 5.3 1.5 1.2 1 1.8 2.4 1.8 4.2 0 1.5-.4 2.7-1.2 3.6-.8.9-1.8 1.5-3.1 1.8 1.5.3 2.6 1 3.5 2zm-11.7-3h5c1.5 0 2.6-.3 3.4-1 .8-.7 1.2-1.6 1.2-2.8 0-1.2-.4-2.1-1.1-2.8-.8-.7-1.9-1-3.5-1h-4.8V20zm8.7 9.4c.9-.7 1.3-1.7 1.3-3s-.4-2.3-1.3-3c-.9-.7-2.1-1.1-3.7-1.1h-5v8.2h5c1.6-.1 2.8-.4 3.7-1.1zM95.3 24.6H81c.1 2.1.6 3.6 1.7 4.6s2.4 1.5 4 1.5c1.4 0 2.6-.4 3.6-1.1 1-.7 1.6-1.7 1.8-2.9h3.2c-.2 1.2-.7 2.4-1.5 3.3-.8 1-1.7 1.7-2.9 2.3-1.2.5-2.6.8-4.1.8-1.7 0-3.2-.4-4.6-1.1-1.3-.7-2.4-1.8-3.1-3.2-.8-1.4-1.1-3-1.1-4.9 0-1.9.4-3.5 1.1-4.9.8-1.4 1.8-2.5 3.1-3.2 1.3-.7 2.9-1.1 4.6-1.1 1.7 0 3.3.4 4.6 1.1 1.3.7 2.3 1.7 3 3 .7 1.2 1 2.6 1 4.1.1.7 0 1.2-.1 1.7zm-3.5-4.8c-.5-.9-1.2-1.6-2.1-2-.9-.4-1.8-.7-2.8-.7-1.6 0-3 .5-4.1 1.5-1.1 1-1.7 2.5-1.8 4.5h11.5c0-1.3-.2-2.4-.7-3.3zM111.2 16c1.2.9 2.1 2 2.5 3.5V15h3v18h-3v-4.6c-.5 1.5-1.3 2.6-2.5 3.5-1.2.9-2.7 1.3-4.4 1.3-1.6 0-3-.4-4.3-1.1-1.2-.7-2.2-1.8-2.9-3.2-.7-1.4-1.1-3-1.1-4.9 0-1.9.4-3.5 1.1-4.9.7-1.4 1.7-2.5 2.9-3.2 1.2-.7 2.7-1.1 4.3-1.1 1.7-.1 3.1.4 4.4 1.2zm-8 3.1c-1.1 1.2-1.7 2.8-1.7 4.8 0 2.1.5 3.7 1.7 4.8 1.1 1.2 2.6 1.8 4.4 1.8 1.2 0 2.2-.3 3.2-.8.9-.5 1.7-1.3 2.2-2.3.5-1 .8-2.1.8-3.5 0-1.3-.3-2.5-.8-3.5s-1.2-1.8-2.2-2.3c-.9-.5-2-.8-3.2-.8-1.9.1-3.3.7-4.4 1.8zM135 16.6c1.5 1.2 2.4 2.9 2.8 4.9h-3.1c-.2-1.3-.8-2.3-1.8-3-1-.7-2.2-1.1-3.6-1.1-1 0-2 .2-2.9.7-.9.5-1.6 1.2-2.1 2.2-.5 1-.8 2.2-.8 3.7s.3 2.7.8 3.7 1.2 1.7 2.1 2.2c.9.5 1.8.7 2.9.7 1.4 0 2.6-.4 3.6-1.1 1-.7 1.6-1.8 1.8-3h3.1c-.3 2.1-1.3 3.7-2.8 4.9-1.5 1.2-3.4 1.8-5.7 1.8-1.7 0-3.2-.4-4.6-1.1-1.3-.7-2.4-1.8-3.1-3.2-.8-1.4-1.1-3-1.1-4.9 0-1.9.4-3.5 1.1-4.9.8-1.4 1.8-2.5 3.1-3.2 1.3-.7 2.9-1.1 4.6-1.1 2.3-.1 4.2.6 5.7 1.8zM154.5 15.9c1.4.7 2.4 1.8 3.2 3.2.8 1.4 1.2 3 1.2 4.9 0 1.9-.4 3.5-1.2 4.9-.8 1.4-1.8 2.4-3.2 3.2-1.4.7-2.9 1.1-4.6 1.1-1.7 0-3.3-.4-4.6-1.1-1.4-.7-2.4-1.8-3.2-3.2-.8-1.4-1.2-3-1.2-4.9 0-1.9.4-3.5 1.2-4.9.8-1.4 1.9-2.5 3.2-3.2 1.4-.7 2.9-1.1 4.6-1.1 1.7-.1 3.2.3 4.6 1.1zm-7.6 2.2c-.9.5-1.6 1.2-2.2 2.2-.6 1-.8 2.2-.8 3.7 0 1.4.3 2.7.8 3.6.6 1 1.3 1.7 2.2 2.2.9.5 1.9.7 3 .7s2.1-.2 3-.7c.9-.5 1.6-1.2 2.2-2.2.6-1 .8-2.2.8-3.6 0-1.5-.3-2.7-.8-3.7-.6-1-1.3-1.7-2.2-2.2-.9-.5-1.9-.7-3-.7s-2.1.2-3 .7zM177.3 16.7c1.3 1.3 1.9 3.3 1.9 5.8v10.4h-3V22.8c0-1.8-.5-3.2-1.4-4.1-.9-1-2.2-1.4-3.7-1.4-1.6 0-2.9.5-3.9 1.6s-1.5 2.6-1.5 4.6V33h-3V15h3v4.3c.5-1.5 1.3-2.6 2.4-3.4 1.2-.8 2.5-1.2 4-1.2 2.2 0 3.9.6 5.2 2z"],["class","st1"]])])]),f("div",["beacon-modal__close__wrapper"],[["id","beacon-alert-".concat(t,"-close")]],[f("div",["beacon-modal__close__icon"],[],[f("div",["beacon-modal__close__line1"],[],[]),f("div",["beacon-modal__close__line2"],[],[])])])]),f("div",["beacon-modal__base"],[],[f("div",[],[["id","beacon-modal__content"]],[f("div",[],[],[f("p",["beacon-alert__title"],[],e),...n,f("div",["beacon-action__container"],[],r)])])])])]);var ft=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};let ht,dt;"undefined"!==typeof window&&"undefined"!==typeof window.document&&(dt=window.document);const pt={},gt=(t,e,r,n,i)=>{const o=r,a=n.map(((e,r)=>f("button",["beacon-modal__button".concat("outline"===e.style?"--outline":"")],[["id","beacon-alert-".concat(t,"-").concat(r)]],e.text)));let s=E.css;i&&(s+=I.css);const u=f("span",[],[],o),c=i?((t,e,r,n)=>lt(t,e,r,[f("span",[],[["id","pairing-container"]],""),f("div",["beacon-alert__text"],[["id","beacon-main-text"]],[f("p",["beacon-list__title"],[["id","beacon-title"]],[document.createTextNode("Scan QR code with a Beacon-compatible wallet.\xa0"),f("a",[],[["href","https://docs.walletbeacon.io/supported-wallets"],["target","_blank"]],"Learn more"),...n])]),f("div",[],[["id","beacon--switch__container"]],[f("button",["beacon-modal__button--outline"],[["id","beacon-switch"]],"")]),f("div",[],[["id","beacon--disclaimer"]],"")]))(t,[u],a,[e]):((t,e,r,n)=>lt(t,e,r,[f("div",["beacon-alert__text"],[["id","beacon-main-text"]],n)]))(t,[u],a,[e]);return{style:s,html:c}},mt=t=>(w.a.postMessage("closeAlert-".concat(t)),new Promise((e=>{var r;const n=dt.getElementById("beacon-alert-wrapper-".concat(t));if(!n)return e();const i=null===(r=n.shadowRoot)||void 0===r?void 0:r.getElementById("beacon-alert-modal-".concat(t));if(i){const r=300,o=pt[t];o&&(clearTimeout(o),pt[t]=void 0),i.className=i.className.replace("fadeIn","fadeOut"),window.setTimeout((()=>{const t=n.parentNode;t&&t.removeChild(n),ht&&ht.focus(),e()}),r)}else e()}))),yt=()=>ft(void 0,void 0,void 0,(function*(){return new Promise((t=>ft(void 0,void 0,void 0,(function*(){const e=dt.querySelectorAll('[id^="beacon-alert-wrapper-"]');if(e.length>0){const r=[];e.forEach((t=>ft(void 0,void 0,void 0,(function*(){r.push(t.id.split("-")[3])})))),yield Promise.all(r.map(mt)),t()}else t()}))))})),bt=t=>ft(void 0,void 0,void 0,(function*(){var e,r;const n=t.body,i=t.data,o=t.title,a=t.timer,s=t.pairingPayload,u=t.disclaimerText,c=t.closeButtonCallback;yield yt();const l=(yield Object(_.a)()).split("-").join(""),h=dt.createElement("div");h.setAttribute("id","beacon-alert-wrapper-".concat(l));const d=h.attachShadow({mode:"open"}),p=dt.createElement("div");p.setAttribute("tabindex","0"),d.appendChild(p);const g=[...null!==(r=null===(e=t.buttons)||void 0===e?void 0:e.map((t=>{var e,r;return{text:t.text,actionCallback:null!==(e=t.actionCallback)&&void 0!==e?e:()=>Promise.resolve(),style:null!==(r=t.style)&&void 0!==r?r:"outline"}})))&&void 0!==r?r:[]];let m=s?"string"===typeof n?f("div",[],[["id","beacon--qr__container"]],[f("div",[],[["id","beacon--qr__copy__container"]],[f("button",["beacon-modal__button--outline"],[["id","beacon--qr__copy"]],"Copy")])]):f("span",[],[],""):f("span",[],[],null!==n&&void 0!==n?n:"");i&&(m=f("span",[],[],[m,f("pre",[],[["style","text-align: left"]],i)]));const{style:y,html:b}=gt(l,m,o,g,!!(null===s||void 0===s?void 0:s.p2pSyncCode));p.appendChild(b);const v=dt.createElement("style");v.textContent=y,d.appendChild(v),a&&(pt[l]=window.setTimeout((()=>ft(void 0,void 0,void 0,(function*(){yield mt(l)}))),a)),dt.body.prepend(h);const w=d.getElementById("beacon-alert-".concat(l,"-close")),E=()=>ft(void 0,void 0,void 0,(function*(){c&&c(),yield mt(l)}));if(u){const t=d.getElementById("beacon--disclaimer");t&&(t.innerText=u)}const I=A(),S=d.getElementById("beacon-alert-modal-".concat(l));S&&(S.classList.add("theme__".concat(I)),S.addEventListener("click",E));const M=d.querySelectorAll(".beacon-modal__wrapper");return M.length>0&&M[0].addEventListener("click",(t=>{t.stopPropagation()})),ht=dt.activeElement,p.focus(),g.forEach(((t,e)=>{const r=d.getElementById("beacon-alert-".concat(l,"-").concat(e));r&&r.addEventListener("click",(()=>ft(void 0,void 0,void 0,(function*(){yield mt(l),t.actionCallback&&(yield t.actionCallback())}))))})),w&&w.addEventListener("click",(()=>ft(void 0,void 0,void 0,(function*(){yield E()})))),window.addEventListener("keydown",(t=>ft(void 0,void 0,void 0,(function*(){"Escape"===t.key&&(yield E())})))),s&&(yield ct(l,d,s)),l})),vt={css:":host {\n --animation-duration: 300ms;\n all: initial;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n.beacon-toast__base {\n position: fixed;\n top: 16px;\n right: 16px;\n z-index: 2147483000;\n margin: 0 auto;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1);\n flex-direction: column;\n}\n@media (max-width: 576px) {\n .beacon-toast__base {\n top: 8px;\n right: 8px;\n left: 8px;\n }\n .beacon-toast__wallet__outer {\n flex-wrap: wrap;\n }\n .beacon-toast__wallet__link {\n display: flex;\n margin-left: 12px !important;\n }\n}\n\n.theme__light.beacon-toast__base {\n background: #fff;\n}\n\n.theme__dark.beacon-toast__base {\n background: #27334c;\n}\n\n.theme__dark p {\n color: #6183ff;\n}\n\na {\n text-decoration: none;\n color: #3880ff;\n}\n\na svg {\n width: 12px;\n margin-left: 2px;\n}\n\na:visited {\n color: #3880ff;\n}\n\nhr {\n height: 1px;\n color: rgba(0, 0, 0, 0.12);\n background-color: rgba(0, 0, 0, 0.12);\n border: none;\n width: 100%;\n margin: 0;\n display: none;\n}\n\n.show {\n display: block !important;\n}\n\n.hide {\n display: none !important;\n}\n\n#beacon-toast-list {\n display: none;\n}\n\n.beacon-toast__upside_down {\n transform: rotate(180deg);\n}\n\n.beacon-toast__content {\n justify-content: space-between;\n min-height: 56px;\n height: 0;\n}\n\n.beacon-toast__action__item,\n.beacon-toast__powered a,\n.beacon-toast__wallet__container,\n#beacon-text,\n.beacon-toast__action__item p,\n.beacon-toast__wallet__outer {\n align-items: center;\n}\n\n.beacon-toast__content,\n.beacon-toast__base,\n.beacon-toast__action__item,\n.beacon-toast__powered a,\n#beacon-text,\n.beacon-toast__wallet__container,\n.beacon-toast__wallet__outer {\n display: flex;\n}\n\n.beacon-toast__content,\n.beacon-toast__action__item,\n.beacon-toast__powered a {\n padding: 0 16px;\n font-family: Roboto, Helvetica, sans-serif;\n}\n\n#beacon-text strong {\n display: contents;\n}\n.beacon-toast__wallet__link {\n margin-left: 8px;\n}\n.beacon-toast__wallet__link svg {\n margin-left: 4px;\n}\n.beacon-toast__powered a {\n margin: 4px 0 12px;\n font-size: 12px;\n opacity: 0.64;\n}\n\n.beacon-toast__powered svg {\n width: 20px;\n height: 20px;\n margin: 0 2px 0 4px;\n}\n\n.beacon-toast__action__item {\n font-size: 14px;\n max-width: 40ch;\n}\n\n.beacon-toast__action__item p {\n margin-right: 8px;\n}\n\n.beacon-toast__action__item__subtitle,\n.beacon-toast__powered a {\n min-width: 88px;\n color: rgba(0, 0, 0, 0.54);\n}\n\n.theme__dark .beacon-toast__powered a {\n color: #7c99d6;\n}\n\n.beacon-toast__content__img {\n width: 24px;\n height: 24px;\n margin-right: 4px;\n image-rendering: -moz-crisp-edges; /* Firefox */\n image-rendering: -o-crisp-edges; /* Opera */\n image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming) */\n image-rendering: crisp-edges;\n -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */\n}\n\n.beacon-toast__more {\n width: 14px;\n transition: transform 0.5s;\n}\n\na,\n.beacon-toast__more {\n cursor: pointer;\n}\n\na:hover {\n opacity: 0.64;\n}\n\n.theme__dark .beacon-toast__more {\n color: #7c99d6;\n}\n\n.beacon-toast__more--action {\n margin: 8px 0;\n}\n\n#beacon-text {\n padding-right: 24px;\n}\n\n#beacon-text-content {\n display: flex;\n align-items: center;\n}\n\n.progress-line,\n.progress-line:before {\n height: 3px;\n width: 100%;\n margin: 0;\n}\n.progress-line {\n background-color: #a7c4f7;\n display: -webkit-flex;\n display: flex;\n}\n.progress-line:before {\n background-color: #3880ff;\n content: '';\n -webkit-animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n}\n@-webkit-keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n@keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n"};var At=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};let wt;"undefined"!==typeof window&&"undefined"!==typeof window.document&&(wt=window.document);let _t,Et,It;const St=t=>{for(;t.firstChild;)t.removeChild(t.firstChild)},Mt=t=>{var e,r;const n=null===(e=null===It||void 0===It?void 0:It.walletInfo)||void 0===e?void 0:e.icon,i=null===(r=null===It||void 0===It?void 0:It.walletInfo)||void 0===r?void 0:r.name;let o;const a=f("strong",[],[],null!==i&&void 0!==i?i:"Wallet");o=n?f("span",["beacon-toast__wallet__container"],[],[f("img",["beacon-toast__content__img"],[["src",n]],""),a]):a;const s=t.split("{{wallet}}");if(1===s.length)return[f("span",[],[],t)];{const t=[];for(let e=0;e{const e=t.body,r=Mt(e),n=(t=>f("div",["beacon-toast__base","animated","fadeIn"],[["id","beacon-toast"]],[f("div",["beacon-toast__content"],[],[f("span",[],[["id","beacon-text"]],[f("p",[],[["id","beacon-text-content"]],t),f("a",["beacon-toast__wallet__link"],[["id","beacon-open-wallet"]],[f("span",[],[],"Open"),h(["svg-inline--fa","fa-external-link-alt","fa-w-16"],[["aria-hidden","true"],["focusable","false"],["data-prefix","fas"],["data-icon","external-link-alt"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 512 512"]],[d([["fill","currentColor"],["d","M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"]])])])]),h(["beacon-toast__more","svg-inline--fa","fa-angle-down","fa-w-10"],[["id","beacon-toast-button-expand"],["aria-hidden","true"],["focusable","false"],["data-prefix","fas"],["data-icon","angle-down"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 320 512"]],[d([["fill","currentColor"],["d","M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z"]])]),h(["beacon-toast__more","svg-inline--fa","fa-times","fa-w-10"],[["id","beacon-toast-button-close"],["aria-hidden","true"],["focusable","false"],["data-prefix","fal"],["data-icon","times"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 320 512"]],[d([["fill","currentColor"],["d","M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z"]])])]),f("div",["progress-line"],[["id","beacon-toast-loader"]],""),f("hr",["hide"],[["id","beacon-toast-loader-placeholder"]],""),f("div",["beacon-toast__more--action"],[["id","beacon-toast-list"]],"")]))([f("span",["beacon-toast__wallet__outer"],[],r)]);return{style:vt.css,html:n}},kt=()=>new Promise((t=>{var e;It=void 0;const r=wt.getElementById("beacon-toast-wrapper");if(!r)return t();const n=null===(e=r.shadowRoot)||void 0===e?void 0:e.getElementById("beacon-toast");if(n){const e=300;_t&&(clearTimeout(_t),_t=void 0),n.className=n.className.replace("fadeIn","fadeOut"),window.setTimeout((()=>{const e=r.parentNode;e&&e.removeChild(r),t()}),e)}else t()})),xt=(t,e,r)=>{const n=t.getElementById(e);return n&&n.addEventListener("click",(()=>At(void 0,void 0,void 0,(function*(){yield r(n)})))),n},Bt=(t,e)=>{const r=t.getElementById(e);r&&(r.classList.remove("hide"),r.classList.add("show"))},Ot=(t,e)=>{const r=t.getElementById(e);r&&(r.classList.add("hide"),r.classList.remove("show"))},Tt=t=>{Bt(t,"beacon-toast-button-close"),Ot(t,"beacon-toast-button-expand")},Rt=t=>{const e=t.getElementById("beacon-toast-button-expand"),r=t.getElementById("beacon-toast-list");e&&r&&(e.classList.remove("beacon-toast__upside_down"),r.classList.add("hide"),r.classList.remove("show"))},Pt=t=>{const e=t.getElementById("beacon-toast-button-expand"),r=t.getElementById("beacon-toast-list");e&&r&&(e.classList.add("beacon-toast__upside_down"),r.classList.remove("hide"),r.classList.add("show"))},Nt=t=>{const e=t.getElementById("beacon-toast-button-expand"),r=t.getElementById("beacon-toast-list");e&&r&&(e.classList.contains("beacon-toast__upside_down")?Rt(t):Pt(t))},jt=(t,e,r)=>At(void 0,void 0,void 0,(function*(){const n=e.actions;if(n&&n.length>0){const e=n.map((t=>At(void 0,void 0,void 0,(function*(){return e=t,At(void 0,void 0,void 0,(function*(){const{text:t,isBold:r,actionText:n,actionLogo:i,actionCallback:o}=e,a=yield Object(_.a)(),s=wt.createElement("div");s.classList.add("beacon-toast__action__item"),St(s);const u=t=>f("strong",[],[],t);if(o){t.length>0&&s.appendChild(f("p",[],[],t));const e=f("span",[],[],[f("span",[],[],n),i&&"external"===i?h(["svg-inline--fa","fa-external-link-alt","fa-w-16"],[["aria-hidden","true"],["focusable","false"],["data-prefix","fas"],["data-icon","external-link-alt"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 512 512"]],[d([["fill","currentColor"],["d","M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"]])]):void 0]);s.appendChild(f("p",[],[],[f("a",[],[["id",a]],[r?u([e]):e])]))}else if(n){t.length>0&&s.appendChild(f("p",["beacon-toast__action__item__subtitle"],[],t));const e=f("span",[],[],n);s.appendChild(f("p",[],[],[r?u([e]):e]))}else{const e=f("p",[],[],t);s.appendChild(r?u([e]):e)}return o&&s.addEventListener("click",o),s}));var e}))));(yield Promise.all(e)).forEach((t=>r.appendChild(t)));const i=wt.createElement("small");i.classList.add("beacon-toast__powered"),i.appendChild(f("a",[],[["href","https://walletbeacon.io"],["target","_blank"]],[document.createTextNode("powered by"),h([],[["id","f63e95a9-fd19-4487-bc1a-09eb2f066704"],["data-name","Guides"],["xmlns","http://www.w3.org/2000/svg"],["width","65"],["height","65"],["viewBox","0 0 65 65"]],[f("title",[],[],"beacon_logo"),d([["fill","currentColor"],["d","M59.66,29.52v1.06c0,.37-.18,9.07-4.11,15.88S44.16,57.75,43.84,57.93l-.91.54-1.61-.93-9.19-5.3a14.68,14.68,0,0,1-1.63-1.06h0a14.09,14.09,0,0,1-1.29-1,17.63,17.63,0,0,1-2.56-2.7,18.58,18.58,0,0,1-2.56-4.51,21.53,21.53,0,0,1-1.5-9,6.21,6.21,0,0,1,2.93-.73c.25,0,.49,0,.74,0a18.29,18.29,0,0,0,1,7.93,15.06,15.06,0,0,0,6.67,8l8.93,5.16c.2-.13.43-.3.68-.48,2.26-1.6,6.42-4.92,8.86-9.13C55.12,39.94,55.8,34,56,31.57l-3.79-2.19a23,23,0,0,0,.6-3.83Z"]]),d([["fill","currentColor"],["d","M49.22,11.43V23.89c0,.65,0,1.3-.1,1.94v0c-.06.55-.13,1.1-.24,1.63A18,18,0,0,1,47.82,31a19.11,19.11,0,0,1-2.62,4.49,21.37,21.37,0,0,1-7.07,5.8,6.08,6.08,0,0,1-2.42-2.84A18.1,18.1,0,0,0,42,33.7h0a15.12,15.12,0,0,0,3.58-9.81V13.6c-.21-.11-.47-.21-.74-.35-2.52-1.16-7.47-3.1-12.36-3.1-5.42,0-11,2.4-13.08,3.45V18a22.54,22.54,0,0,0-3.63,1.38V11.43l.92-.52c.33-.18,8-4.38,15.79-4.38s15.48,4.2,15.8,4.38Z"]]),d([["fill","currentColor"],["d","M18,26.4,9,31.55q0,.35.06.78a31.63,31.63,0,0,0,3.49,12.28c2.71,4.71,7.55,8.3,9.53,9.64l3.79-2.19a23.33,23.33,0,0,0,3,2.44l-6.88,4-.92-.54c-.31-.18-7.75-4.69-11.68-11.5S5.36,30.92,5.35,30.56V29.49L7,28.55l9.17-5.29c.57-.32,1.14-.61,1.72-.87a13.46,13.46,0,0,1,1.55-.61A17.52,17.52,0,0,1,23,20.91a19.2,19.2,0,0,1,5.19,0,21.49,21.49,0,0,1,8.55,3.24,6.29,6.29,0,0,1-1.25,3.51,17.9,17.9,0,0,0-7.3-3.06A15.14,15.14,0,0,0,18,26.4Z"]])]),document.createTextNode("Beacon")])),r.appendChild(i),(t=>{Bt(t,"beacon-toast-button-expand"),Ot(t,"beacon-toast-button-close")})(t)}else Tt(t),Rt(t)})),Dt=t=>At(void 0,void 0,void 0,(function*(){It=t;const e=t.timer,r=wt.createElement("div");r.setAttribute("id","beacon-toast-wrapper");const n=r.attachShadow({mode:"open"}),i=wt.createElement("div"),{style:o,html:a}=Ct(t);i.appendChild(a);const s=wt.createElement("style");s.textContent=o,n.appendChild(i),n.appendChild(s),e&&(_t=window.setTimeout((()=>At(void 0,void 0,void 0,(function*(){yield kt()}))),e)),wt.body.prepend(r);const u=A(),c=n.getElementById("beacon-toast");c&&c.classList.add("theme__".concat(u));const l=n.getElementById("beacon-toast-list");l&&(yield jt(n,t,l));const f=n.getElementById("beacon-open-wallet");f&&(t.openWalletAction?f.addEventListener("click",(()=>{t.openWalletAction&&t.openWalletAction()})):f.classList.add("hide")),"loading"===It.state&&(Et=window.setTimeout((()=>At(void 0,void 0,void 0,(function*(){const t=n.getElementById("beacon-toast-button-expand");t&&!t.classList.contains("beacon-toast__upside_down")&&Nt(n)}))),5e3)),xt(n,"beacon-toast-button-done",(()=>At(void 0,void 0,void 0,(function*(){yield kt()}))));const h=xt(n,"beacon-toast-button-close",(()=>At(void 0,void 0,void 0,(function*(){yield kt()}))));h&&"loading"===It.state&&h.classList.add("hide"),xt(n,"beacon-toast-button-expand",(()=>At(void 0,void 0,void 0,(function*(){Nt(n)}))))})),Lt=t=>At(void 0,void 0,void 0,(function*(){var e;Et&&clearTimeout(Et);if(wt.getElementById("beacon-toast-wrapper")?t.forceNew?(yield kt(),yield Dt(t)):yield(t=>At(void 0,void 0,void 0,(function*(){It=Object.assign(Object.assign({},It),t);const e=t.timer,r=wt.getElementById("beacon-toast-wrapper");if(!r)return;const n=r.shadowRoot;if(!n)return;const i=n.getElementById("beacon-toast-list");i&&(St(i),yield jt(n,t,i)),"loading"===It.state&&(Et=window.setTimeout((()=>At(void 0,void 0,void 0,(function*(){const t=n.getElementById("beacon-toast-button-expand");t&&!t.classList.contains("beacon-toast__upside_down")&&Nt(n)}))),5e3));const o=n.getElementById("beacon-text-content");o&&(St(o),o.appendChild(f("span",["beacon-toast__wallet__outer"],[],Mt(t.body))));const a=n.getElementById("beacon-open-wallet");a&&(t.openWalletAction?(a.classList.remove("hide"),a.addEventListener("click",(()=>{t.openWalletAction&&t.openWalletAction()}))):a.classList.add("hide")),e&&(_t=window.setTimeout((()=>At(void 0,void 0,void 0,(function*(){yield kt()}))),e));const s=n.getElementById("beacon-toast-button-done");s&&s.addEventListener("click",(()=>At(void 0,void 0,void 0,(function*(){yield kt()}))))})))(t):yield Dt(t),It&&"finished"===It.state){const t=null===(e=wt.getElementById("beacon-toast-wrapper"))||void 0===e?void 0:e.shadowRoot;t&&((t=>{Ot(t,"beacon-toast-loader"),Bt(t,"beacon-toast-loader-placeholder")})(t),Tt(t),Pt(t))}})),Ft=t=>t.length>=12?"".concat(t.substr(0,5),"...").concat(t.substr(-5)):t;var Ut;!function(t){t.BROADCAST_ERROR="BROADCAST_ERROR",t.NETWORK_NOT_SUPPORTED="NETWORK_NOT_SUPPORTED",t.NO_ADDRESS_ERROR="NO_ADDRESS_ERROR",t.NO_PRIVATE_KEY_FOUND_ERROR="NO_PRIVATE_KEY_FOUND_ERROR",t.NOT_GRANTED_ERROR="NOT_GRANTED_ERROR",t.PARAMETERS_INVALID_ERROR="PARAMETERS_INVALID_ERROR",t.TOO_MANY_OPERATIONS="TOO_MANY_OPERATIONS",t.TRANSACTION_INVALID_ERROR="TRANSACTION_INVALID_ERROR",t.SIGNATURE_TYPE_NOT_SUPPORTED="SIGNATURE_TYPE_NOT_SUPPORTED",t.ABORTED_ERROR="ABORTED_ERROR",t.UNKNOWN_ERROR="UNKNOWN_ERROR"}(Ut||(Ut={}));var Qt=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const Gt=new M.a("BeaconEvents"),Ht=5e3;var zt;!function(t){t.PERMISSION_REQUEST_SENT="PERMISSION_REQUEST_SENT",t.PERMISSION_REQUEST_SUCCESS="PERMISSION_REQUEST_SUCCESS",t.PERMISSION_REQUEST_ERROR="PERMISSION_REQUEST_ERROR",t.OPERATION_REQUEST_SENT="OPERATION_REQUEST_SENT",t.OPERATION_REQUEST_SUCCESS="OPERATION_REQUEST_SUCCESS",t.OPERATION_REQUEST_ERROR="OPERATION_REQUEST_ERROR",t.SIGN_REQUEST_SENT="SIGN_REQUEST_SENT",t.SIGN_REQUEST_SUCCESS="SIGN_REQUEST_SUCCESS",t.SIGN_REQUEST_ERROR="SIGN_REQUEST_ERROR",t.BROADCAST_REQUEST_SENT="BROADCAST_REQUEST_SENT",t.BROADCAST_REQUEST_SUCCESS="BROADCAST_REQUEST_SUCCESS",t.BROADCAST_REQUEST_ERROR="BROADCAST_REQUEST_ERROR",t.ACKNOWLEDGE_RECEIVED="ACKNOWLEDGE_RECEIVED",t.LOCAL_RATE_LIMIT_REACHED="LOCAL_RATE_LIMIT_REACHED",t.NO_PERMISSIONS="NO_PERMISSIONS",t.ACTIVE_ACCOUNT_SET="ACTIVE_ACCOUNT_SET",t.ACTIVE_TRANSPORT_SET="ACTIVE_TRANSPORT_SET",t.SHOW_PREPARE="SHOW_PREPARE",t.HIDE_UI="HIDE_UI",t.PAIR_INIT="PAIR_INIT",t.PAIR_SUCCESS="PAIR_SUCCESS",t.CHANNEL_CLOSED="CHANNEL_CLOSED",t.INTERNAL_ERROR="INTERNAL_ERROR",t.UNKNOWN="UNKNOWN"}(zt||(zt={}));const qt=t=>Qt(void 0,void 0,void 0,(function*(){let e;const r=[];if(t.walletInfo.deeplink&&("web"===t.walletInfo.type||"mobile"===t.walletInfo.type&&k(window)||"desktop"===t.walletInfo.type&&!k(window))){const r=t.walletInfo.deeplink;e=()=>Qt(void 0,void 0,void 0,(function*(){const t=document.createElement("a");t.setAttribute("href",r),t.setAttribute("target","_blank"),t.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))}))}r.push({text:"No answer from your wallet received yet. Please make sure the wallet is open.",isBold:!0}),r.push({text:"Did you make a mistake?",actionText:"Cancel Request",actionCallback:()=>Qt(void 0,void 0,void 0,(function*(){yield kt()}))}),r.push({text:"Wallet not receiving request?",actionText:"Reset Connection",actionCallback:()=>Qt(void 0,void 0,void 0,(function*(){yield kt();const e=t.extraInfo.resetCallback;e&&(Gt.log("showSentToast","resetCallback invoked"),yield e())}))}),Lt({body:"Request sent to\xa0 {{wallet}}",walletInfo:t.walletInfo,state:"loading",actions:r,openWalletAction:e}).catch((t=>console.error(t)))})),Kt=(t,e)=>Qt(void 0,void 0,void 0,(function*(){const r=t.errorResponse.errorType?Oe.getError(t.errorResponse.errorType,t.errorResponse.errorData):new Ue,n=[{text:r.title,isBold:!0},{text:r.description}];t.errorResponse.errorType===Ut.TRANSACTION_INVALID_ERROR&&t.errorResponse.errorData&&n.push({text:"",actionText:"Show Details",actionCallback:()=>Qt(void 0,void 0,void 0,(function*(){yield kt(),yield bt({title:r.title,body:r.fullDescription.description,data:r.fullDescription.data,buttons:e})}))}),yield Lt({body:"{{wallet}}\xa0 has returned an error",timer:t.errorResponse.errorType===Ut.ABORTED_ERROR?Ht:void 0,state:"finished",walletInfo:t.walletInfo,actions:n})})),Vt=()=>()=>Qt(void 0,void 0,void 0,(function*(){})),Wt={[zt.PERMISSION_REQUEST_SENT]:qt,[zt.PERMISSION_REQUEST_SUCCESS]:t=>Qt(void 0,void 0,void 0,(function*(){const{output:e}=t;yield Lt({body:"{{wallet}}\xa0 has granted permission",timer:Ht,walletInfo:t.walletInfo,state:"finished",actions:[{text:"Address",actionText:Ft(e.address),isBold:!0},{text:"Network",actionText:"".concat(e.network.type)},{text:"Permissions",actionText:e.scopes.join(", ")}]})})),[zt.PERMISSION_REQUEST_ERROR]:Kt,[zt.OPERATION_REQUEST_SENT]:qt,[zt.OPERATION_REQUEST_SUCCESS]:t=>Qt(void 0,void 0,void 0,(function*(){const{account:e,output:r,blockExplorer:n}=t;yield Lt({body:"{{wallet}}\xa0 successfully submitted operation",timer:Ht,state:"finished",walletInfo:t.walletInfo,actions:[{text:Ft(r.transactionHash),isBold:!0,actionText:"Open Blockexplorer",actionLogo:"external",actionCallback:()=>Qt(void 0,void 0,void 0,(function*(){const t=yield n.getTransactionLink(r.transactionHash,e.network);window.open(t,"_blank"),yield kt()}))}]})})),[zt.OPERATION_REQUEST_ERROR]:Kt,[zt.SIGN_REQUEST_SENT]:qt,[zt.SIGN_REQUEST_SUCCESS]:t=>Qt(void 0,void 0,void 0,(function*(){const e=t.output;yield Lt({body:"{{wallet}}\xa0 successfully signed payload",timer:Ht,state:"finished",walletInfo:t.walletInfo,actions:[{text:"Signature: ".concat(Ft(e.signature)),actionText:"Copy to clipboard",actionCallback:()=>Qt(void 0,void 0,void 0,(function*(){navigator.clipboard.writeText(e.signature).then((()=>{Gt.log("showSignSuccessAlert","Copying to clipboard was successful!")}),(t=>{Gt.error("showSignSuccessAlert","Could not copy text to clipboard: ",t)})),yield kt()}))}]})})),[zt.SIGN_REQUEST_ERROR]:Kt,[zt.BROADCAST_REQUEST_SENT]:qt,[zt.BROADCAST_REQUEST_SUCCESS]:t=>Qt(void 0,void 0,void 0,(function*(){const{network:e,output:r,blockExplorer:n}=t;yield Lt({body:"{{wallet}}\xa0 successfully injected operation",timer:Ht,state:"finished",walletInfo:t.walletInfo,actions:[{text:Ft(r.transactionHash),isBold:!0,actionText:"Open Blockexplorer",actionLogo:"external",actionCallback:()=>Qt(void 0,void 0,void 0,(function*(){const t=yield n.getTransactionLink(r.transactionHash,e);window.open(t,"_blank"),yield kt()}))}]})})),[zt.BROADCAST_REQUEST_ERROR]:Kt,[zt.ACKNOWLEDGE_RECEIVED]:t=>Qt(void 0,void 0,void 0,(function*(){Lt({body:"Awaiting confirmation in\xa0 {{wallet}}",state:"acknowledge",walletInfo:t.walletInfo}).catch((t=>console.error(t)))})),[zt.LOCAL_RATE_LIMIT_REACHED]:()=>Qt(void 0,void 0,void 0,(function*(){bt({title:"Error",body:"Rate limit reached. Please slow down",buttons:[{text:"Done",style:"outline"}],timer:3e3}).catch((t=>console.error(t)))})),[zt.NO_PERMISSIONS]:()=>Qt(void 0,void 0,void 0,(function*(){yield bt({title:"No Permission",body:"Please allow the wallet to handle this type of request."})})),[zt.ACTIVE_ACCOUNT_SET]:Vt(),[zt.ACTIVE_TRANSPORT_SET]:Vt(),[zt.SHOW_PREPARE]:t=>Qt(void 0,void 0,void 0,(function*(){const e=t.walletInfo?"Preparing Request for\xa0 {{wallet}}...":"Preparing Request...";Lt({body:e,state:"prepare",walletInfo:t.walletInfo}).catch((t=>console.error(t)))})),[zt.HIDE_UI]:t=>Qt(void 0,void 0,void 0,(function*(){t?(t.includes("alert")&&yt(),t.includes("toast")&&kt()):kt()})),[zt.PAIR_INIT]:t=>Qt(void 0,void 0,void 0,(function*(){const e={title:"Choose your preferred wallet",body:"

",pairingPayload:{p2pSyncCode:t.p2pPeerInfo,postmessageSyncCode:t.postmessagePeerInfo,preferredNetwork:t.preferredNetwork},closeButtonCallback:t.abortedHandler,disclaimerText:t.disclaimerText};yield bt(e)})),[zt.PAIR_SUCCESS]:()=>Qt(void 0,void 0,void 0,(function*(){yield yt()})),[zt.CHANNEL_CLOSED]:()=>Qt(void 0,void 0,void 0,(function*(){yield bt({title:"Channel closed",body:"Your peer has closed the connection.",buttons:[{text:"Done",style:"outline"}],timer:1500})})),[zt.INTERNAL_ERROR]:t=>Qt(void 0,void 0,void 0,(function*(){var e;const r=[...null!==(e=t.buttons)&&void 0!==e?e:[]];r.push({text:"Done",style:"outline"});const n={title:"Internal Error",body:t.text,buttons:r};yield bt(n)})),[zt.UNKNOWN]:Vt()};class Jt{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;this.callbackMap={[zt.PERMISSION_REQUEST_SENT]:[Wt.PERMISSION_REQUEST_SENT],[zt.PERMISSION_REQUEST_SUCCESS]:[Wt.PERMISSION_REQUEST_SUCCESS],[zt.PERMISSION_REQUEST_ERROR]:[Wt.PERMISSION_REQUEST_ERROR],[zt.OPERATION_REQUEST_SENT]:[Wt.OPERATION_REQUEST_SENT],[zt.OPERATION_REQUEST_SUCCESS]:[Wt.OPERATION_REQUEST_SUCCESS],[zt.OPERATION_REQUEST_ERROR]:[Wt.OPERATION_REQUEST_ERROR],[zt.SIGN_REQUEST_SENT]:[Wt.SIGN_REQUEST_SENT],[zt.SIGN_REQUEST_SUCCESS]:[Wt.SIGN_REQUEST_SUCCESS],[zt.SIGN_REQUEST_ERROR]:[Wt.SIGN_REQUEST_ERROR],[zt.BROADCAST_REQUEST_SENT]:[Wt.BROADCAST_REQUEST_SENT],[zt.BROADCAST_REQUEST_SUCCESS]:[Wt.BROADCAST_REQUEST_SUCCESS],[zt.BROADCAST_REQUEST_ERROR]:[Wt.BROADCAST_REQUEST_ERROR],[zt.ACKNOWLEDGE_RECEIVED]:[Wt.ACKNOWLEDGE_RECEIVED],[zt.LOCAL_RATE_LIMIT_REACHED]:[Wt.LOCAL_RATE_LIMIT_REACHED],[zt.NO_PERMISSIONS]:[Wt.NO_PERMISSIONS],[zt.ACTIVE_ACCOUNT_SET]:[Wt.ACTIVE_ACCOUNT_SET],[zt.ACTIVE_TRANSPORT_SET]:[Wt.ACTIVE_TRANSPORT_SET],[zt.SHOW_PREPARE]:[Wt.SHOW_PREPARE],[zt.HIDE_UI]:[Wt.HIDE_UI],[zt.PAIR_INIT]:[Wt.PAIR_INIT],[zt.PAIR_SUCCESS]:[Wt.PAIR_SUCCESS],[zt.CHANNEL_CLOSED]:[Wt.CHANNEL_CLOSED],[zt.INTERNAL_ERROR]:[Wt.INTERNAL_ERROR],[zt.UNKNOWN]:[Wt.UNKNOWN]},e&&this.setAllHandlers(),this.overrideDefaults(t)}on(t,e){return Qt(this,void 0,void 0,(function*(){const r=this.callbackMap[t]||[];r.push(e),this.callbackMap[t]=r}))}emit(t,e,r){return Qt(this,void 0,void 0,(function*(){const n=this.callbackMap[t];n&&n.length>0&&n.forEach((n=>Qt(this,void 0,void 0,(function*(){try{yield n(e,r)}catch(i){Gt.error("error handling event ".concat(t),i)}}))))}))}overrideDefaults(t){Object.keys(t).forEach((e=>{const r=e,n=t[r];n&&(this.callbackMap[r]=[n.handler])}))}setAllHandlers(t){Object.keys(this.callbackMap).forEach((e=>{const r=e;this.callbackMap[r]=[],t?this.callbackMap[r].push(t):this.callbackMap[r].push((function(){for(var t=arguments.length,r=new Array(t),n=0;n{this._beaconId.resolve(Object(Yt.i)(t.publicKey))}))}))}removeBeaconEntriesFromStorage(){return Zt(this,void 0,void 0,(function*(){const t=Object.values(qe);yield Promise.all(t.map((t=>this.storage.delete(t))))}))}loadOrCreateBeaconSecret(){return Zt(this,void 0,void 0,(function*(){const t=yield this.storage.get(qe.BEACON_SDK_SECRET_SEED);if(t&&"string"===typeof t)this._keyPair.resolve(yield Object(Yt.e)(t));else{const t=yield Object(_.a)();yield this.storage.set(qe.BEACON_SDK_SECRET_SEED,t),this._keyPair.resolve(yield Object(Yt.e)(t))}}))}}var te=r(352),ee=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class re{static hasPermission(t,e,r){return ee(this,void 0,void 0,(function*(){switch(t.type){case n.PermissionRequest:case n.BroadcastRequest:return!0;case n.OperationRequest:{const r=yield Object(te.a)(t.sourceAddress,t.network),n=yield e(r);return!!n&&n.scopes.includes(i.OPERATION_REQUEST)}case n.SignPayloadRequest:{const e=(yield r()).filter((e=>e.address===t.sourceAddress));return 0!==e.length&&e.some((t=>t.scopes.includes(i.SIGN)))}default:throw new Error("Message not handled")}}))}}var ne=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class ie{constructor(t){this.storageManager=new N(t,qe.ACCOUNTS)}getAccounts(){return ne(this,void 0,void 0,(function*(){return this.storageManager.getAll()}))}getAccount(t){return ne(this,void 0,void 0,(function*(){return this.storageManager.getOne((e=>e.accountIdentifier===t))}))}addAccount(t){return ne(this,void 0,void 0,(function*(){return this.storageManager.addOne(t,(e=>e.accountIdentifier===t.accountIdentifier))}))}removeAccount(t){return ne(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>e.accountIdentifier===t))}))}removeAccounts(t){return ne(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>t.includes(e.accountIdentifier)))}))}removeAllAccounts(){return ne(this,void 0,void 0,(function*(){return this.storageManager.removeAll()}))}hasPermission(t){return ne(this,void 0,void 0,(function*(){return re.hasPermission(t,this.getAccount.bind(this),this.getAccounts.bind(this))}))}}var oe=r(213),ae=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const se=new M.a("Client");class ue extends $t{constructor(t){var e,r;super(t),this.rateLimit=2,this.rateLimitWindowInSeconds=5,this.requestCounter=[],this._transport=new l.a,this.events=new Jt(t.eventHandlers,null!==(e=t.disableDefaultEvents)&&void 0!==e&&e),this.accountManager=new ie(t.storage),this.matrixNodes=null!==(r=t.matrixNodes)&&void 0!==r?r:[],this.handleResponse=(t,e)=>{throw new Error("not overwritten".concat(JSON.stringify(t)," - ").concat(JSON.stringify(e)))}}get transport(){return this._transport.promise}get connectionStatus(){var t,e;return null!==(e=null===(t=this._transport.promiseResult)||void 0===t?void 0:t.connectionStatus)&&void 0!==e?e:D.NOT_CONNECTED}get ready(){return this.transport.then((()=>{}))}getAccounts(){return ae(this,void 0,void 0,(function*(){return this.accountManager.getAccounts()}))}getAccount(t){return ae(this,void 0,void 0,(function*(){return this.accountManager.getAccount(t)}))}removeAccount(t){return ae(this,void 0,void 0,(function*(){return this.accountManager.removeAccount(t)}))}removeAllAccounts(){return ae(this,void 0,void 0,(function*(){return this.accountManager.removeAllAccounts()}))}addRequestAndCheckIfRateLimited(){return ae(this,void 0,void 0,(function*(){const t=(new Date).getTime();return this.requestCounter=this.requestCounter.filter((e=>e+1e3*this.rateLimitWindowInSeconds>t)),this.requestCounter.push(t),this.requestCounter.length>this.rateLimit}))}init(t){return ae(this,void 0,void 0,(function*(){return this._transport.status===l.b.RESOLVED?(yield this.transport).type:(yield this.setTransport(t),t.type)}))}getOwnAppMetadata(){return ae(this,void 0,void 0,(function*(){return{senderId:yield Object(oe.a)(yield this.beaconId),name:this.name,icon:this.iconUrl}}))}getPeers(){return ae(this,void 0,void 0,(function*(){return(yield this.transport).getPeers()}))}addPeer(t){return ae(this,void 0,void 0,(function*(){return(yield this.transport).addPeer(t)}))}destroy(){const t=Object.create(null,{destroy:{get:()=>super.destroy}});return ae(this,void 0,void 0,(function*(){this._transport.status===l.b.RESOLVED&&(yield(yield this.transport).disconnect()),yield t.destroy.call(this)}))}setTransport(t){return ae(this,void 0,void 0,(function*(){t?this._transport.isSettled()?this._transport=l.a.resolve(t):this._transport.resolve(t):this._transport.isSettled()&&(this._transport=new l.a),yield this.events.emit(zt.ACTIVE_TRANSPORT_SET,t)}))}addListener(t){return ae(this,void 0,void 0,(function*(){t.addListener(((t,e)=>ae(this,void 0,void 0,(function*(){if("string"===typeof t){const r=yield(new S.a).deserialize(t);this.handleResponse(r,e)}})))).catch((t=>se.error("addListener",t)))}))}sendDisconnectToPeer(t,e){return ae(this,void 0,void 0,(function*(){const r={id:yield Object(_.a)(),version:Xt.a,senderId:yield Object(oe.a)(yield this.beaconId),type:n.Disconnect},i=yield(new S.a).serialize(r),o=null!==e&&void 0!==e?e:yield this.transport;yield o.send(i,t)}))}}var ce=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class le{constructor(t){this.storageManager=new N(t,qe.PERMISSION_LIST)}getPermissions(){return ce(this,void 0,void 0,(function*(){return this.storageManager.getAll()}))}getPermission(t){return ce(this,void 0,void 0,(function*(){return this.storageManager.getOne((e=>e.accountIdentifier===t))}))}addPermission(t){return ce(this,void 0,void 0,(function*(){return this.storageManager.addOne(t,(e=>e.accountIdentifier===t.accountIdentifier))}))}removePermission(t){return ce(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>e.accountIdentifier===t))}))}removePermissions(t){return ce(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>t.includes(e.accountIdentifier)))}))}removeAllPermissions(){return ce(this,void 0,void 0,(function*(){return this.storageManager.removeAll()}))}hasPermission(t){return ce(this,void 0,void 0,(function*(){return re.hasPermission(t,this.getPermission.bind(this),this.getPermissions.bind(this))}))}}var fe=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class he{constructor(t){this.storageManager=new N(t,qe.APP_METADATA_LIST)}getAppMetadataList(){return fe(this,void 0,void 0,(function*(){return this.storageManager.getAll()}))}getAppMetadata(t){return fe(this,void 0,void 0,(function*(){return this.storageManager.getOne((e=>e.senderId===t))}))}addAppMetadata(t){return fe(this,void 0,void 0,(function*(){return this.storageManager.addOne(t,(e=>e.senderId===t.senderId))}))}removeAppMetadata(t){return fe(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>e.senderId===t))}))}removeAppMetadatas(t){return fe(this,void 0,void 0,(function*(){return this.storageManager.remove((e=>t.includes(e.senderId)))}))}removeAllAppMetadata(){return fe(this,void 0,void 0,(function*(){return this.storageManager.removeAll()}))}}var de=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const pe=new M.a("IncomingRequestInterceptor");class ge{static intercept(t){return de(this,void 0,void 0,(function*(){const{message:e,connectionInfo:r,appMetadataManager:i,interceptorCallback:o}=t;switch(e.beaconId&&!e.senderId&&(e.senderId=e.beaconId,delete e.beaconId),e.type){case n.PermissionRequest:e.appMetadata.beaconId&&!e.appMetadata.senderId&&(e.appMetadata.senderId=e.appMetadata.beaconId,delete e.appMetadata.beaconId),yield i.addAppMetadata(e.appMetadata);o(e,r);break;case n.OperationRequest:{const t=yield ge.getAppMetadata(i,e.senderId);o(Object.assign({appMetadata:t},e),r)}break;case n.SignPayloadRequest:{const t=yield ge.getAppMetadata(i,e.senderId);o(Object.assign({appMetadata:t},e),r)}break;case n.BroadcastRequest:{const t=yield ge.getAppMetadata(i,e.senderId);o(Object.assign({appMetadata:t},e),r)}break;default:pe.log("intercept","Message not handled")}}))}static getAppMetadata(t,e){return de(this,void 0,void 0,(function*(){const r=yield t.getAppMetadata(e);if(!r)throw new Error("AppMetadata not found");return r}))}}var me=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const ye=new M.a("OutgoingResponseInterceptor");class be{static intercept(t){return me(this,void 0,void 0,(function*(){const{senderId:e,request:r,message:i,ownAppMetadata:o,permissionManager:a,appMetadataManager:s,interceptorCallback:u}=t,c=t=>{t.beaconId=t.senderId,u(t)};switch(i.type){case n.Error:{const t={type:i.type,version:Xt.a,senderId:e,id:i.id,errorType:i.errorType};if(i.errorType===Ut.TRANSACTION_INVALID_ERROR&&i.errorData){const e=i.errorData;Array.isArray(e)&&e.every((t=>Boolean(t.kind)&&Boolean(t.id)))?t.errorData=i.errorData:ye.warn("ErrorData provided is not in correct format. It needs to be an array of RPC errors. It will not be included in the message sent to the dApp")}c(t);break}case n.Acknowledge:c({type:i.type,version:Xt.a,senderId:e,id:i.id});break;case n.PermissionResponse:{const t=Object.assign({senderId:e,version:Xt.a,appMetadata:o},i),n=t.publicKey||t.pubkey||t.pubKey,u=yield Object(Yt.c)(n),l=yield s.getAppMetadata(r.senderId);if(!l)throw new Error("AppMetadata not found");const f={accountIdentifier:yield Object(te.a)(u,t.network),senderId:r.senderId,appMetadata:l,website:"",address:u,publicKey:n,network:t.network,scopes:t.scopes,connectedAt:(new Date).getTime()};a.addPermission(f).catch(console.error),c(t);break}case n.OperationResponse:c(Object.assign({senderId:e,version:Xt.a},i));break;case n.SignPayloadResponse:c(Object.assign({senderId:e,version:Xt.a},i));break;case n.BroadcastResponse:c(Object.assign({senderId:e,version:Xt.a},i));break;default:ye.log("intercept","Message not handled")}}))}}var ve=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const Ae=new M.a("WalletClient");class we extends ue{constructor(t){super(Object.assign({storage:new Ye},t)),this._isConnected=new l.a,this.pendingRequests=[],this.permissionManager=new le(new Ye),this.appMetadataManager=new he(new Ye)}get isConnected(){return this._isConnected.promise}init(){const t=Object.create(null,{init:{get:()=>super.init}});return ve(this,void 0,void 0,(function*(){const e=yield this.keyPair,r=new cr(this.name,e,this.storage,this.matrixNodes,this.iconUrl,this.appUrl);return t.init.call(this,r)}))}connect(t){return ve(this,void 0,void 0,(function*(){return this.handleResponse=(e,r)=>ve(this,void 0,void 0,(function*(){if(e.type!==n.Disconnect)this.pendingRequests.some((t=>t[0].id===e.id))||(this.pendingRequests.push([e,r]),"1"!==e.version&&(yield this.sendAcknowledgeResponse(e,r)),yield ge.intercept({message:e,connectionInfo:r,appMetadataManager:this.appMetadataManager,interceptorCallback:t}));else{const t=yield this.transport,r=(yield t.getPeers()).find((t=>t.senderId===e.senderId));r&&(yield this.removePeer(r))}})),this._connect()}))}_connect(){return ve(this,void 0,void 0,(function*(){const t=yield this.transport;t.connectionStatus===D.NOT_CONNECTED&&(yield t.connect(),t.addListener(((t,e)=>ve(this,void 0,void 0,(function*(){if("string"===typeof t){const r=yield(new S.a).deserialize(t);this.handleResponse(r,e)}})))).catch((t=>Ae.log("_connect",t))),this._isConnected.resolve(!0))}))}respond(t){return ve(this,void 0,void 0,(function*(){const e=this.pendingRequests.find((e=>e[0].id===t.id));if(!e)throw new Error("No matching request found!");this.pendingRequests=this.pendingRequests.filter((e=>e[0].id!==t.id)),yield be.intercept({senderId:yield Object(oe.a)(yield this.beaconId),request:e[0],message:t,ownAppMetadata:yield this.getOwnAppMetadata(),permissionManager:this.permissionManager,appMetadataManager:this.appMetadataManager,interceptorCallback:t=>ve(this,void 0,void 0,(function*(){yield this.respondToMessage(t,e[1])}))})}))}getAppMetadataList(){return ve(this,void 0,void 0,(function*(){return this.appMetadataManager.getAppMetadataList()}))}getAppMetadata(t){return ve(this,void 0,void 0,(function*(){return this.appMetadataManager.getAppMetadata(t)}))}removeAppMetadata(t){return ve(this,void 0,void 0,(function*(){return this.appMetadataManager.removeAppMetadata(t)}))}removeAllAppMetadata(){return ve(this,void 0,void 0,(function*(){return this.appMetadataManager.removeAllAppMetadata()}))}getPermissions(){return ve(this,void 0,void 0,(function*(){return this.permissionManager.getPermissions()}))}getPermission(t){return ve(this,void 0,void 0,(function*(){return this.permissionManager.getPermission(t)}))}removePermission(t){return ve(this,void 0,void 0,(function*(){return this.permissionManager.removePermission(t)}))}removeAllPermissions(){return ve(this,void 0,void 0,(function*(){return this.permissionManager.removeAllPermissions()}))}addPeer(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return ve(this,void 0,void 0,(function*(){const r=Object.assign(Object.assign({},t),{senderId:yield Object(oe.a)(t.publicKey)});return(yield this.transport).addPeer(r,e)}))}removePeer(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ve(this,void 0,void 0,(function*(){const r=(yield this.transport).removePeer(t);return yield this.removePermissionsForPeers([t]),e&&(yield this.sendDisconnectToPeer(t)),r}))}removeAllPeers(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return ve(this,void 0,void 0,(function*(){const e=yield(yield this.transport).getPeers(),r=(yield this.transport).removeAllPeers();if(yield this.removePermissionsForPeers(e),t){const t=e.map((t=>this.sendDisconnectToPeer(t)));yield Promise.all(t)}return r}))}removePermissionsForPeers(t){return ve(this,void 0,void 0,(function*(){const e=yield this.permissionManager.getPermissions(),r=t.map((t=>t.senderId)),n=e.filter((t=>r.includes(t.appMetadata.senderId))).map((t=>t.accountIdentifier));yield this.permissionManager.removePermissions(n)}))}sendAcknowledgeResponse(t,e){return ve(this,void 0,void 0,(function*(){const r={id:t.id,type:n.Acknowledge};yield be.intercept({senderId:yield Object(oe.a)(yield this.beaconId),request:t,message:r,ownAppMetadata:yield this.getOwnAppMetadata(),permissionManager:this.permissionManager,appMetadataManager:this.appMetadataManager,interceptorCallback:t=>ve(this,void 0,void 0,(function*(){yield this.respondToMessage(t,e)}))})}))}respondToMessage(t,e){return ve(this,void 0,void 0,(function*(){const r=yield(new S.a).serialize(t);if(e){const t=(yield this.getPeers()).find((t=>t.publicKey===e.id));yield(yield this.transport).send(r,t)}else yield(yield this.transport).send(r)}))}}const _e={[n.PermissionRequest]:{sent:zt.PERMISSION_REQUEST_SENT,success:zt.PERMISSION_REQUEST_SUCCESS,error:zt.PERMISSION_REQUEST_ERROR},[n.PermissionResponse]:{sent:zt.UNKNOWN,success:zt.UNKNOWN,error:zt.UNKNOWN},[n.OperationRequest]:{sent:zt.OPERATION_REQUEST_SENT,success:zt.OPERATION_REQUEST_SUCCESS,error:zt.OPERATION_REQUEST_ERROR},[n.OperationResponse]:{sent:zt.UNKNOWN,success:zt.UNKNOWN,error:zt.UNKNOWN},[n.SignPayloadRequest]:{sent:zt.SIGN_REQUEST_SENT,success:zt.SIGN_REQUEST_SUCCESS,error:zt.SIGN_REQUEST_ERROR},[n.SignPayloadResponse]:{sent:zt.UNKNOWN,success:zt.UNKNOWN,error:zt.UNKNOWN},[n.BroadcastRequest]:{sent:zt.BROADCAST_REQUEST_SENT,success:zt.BROADCAST_REQUEST_SUCCESS,error:zt.BROADCAST_REQUEST_ERROR},[n.BroadcastResponse]:{sent:zt.UNKNOWN,success:zt.UNKNOWN,error:zt.UNKNOWN},[n.Acknowledge]:{sent:zt.UNKNOWN,success:zt.UNKNOWN,error:zt.UNKNOWN},[n.Disconnect]:{sent:zt.UNKNOWN,success:zt.UNKNOWN,error:zt.UNKNOWN},[n.Error]:{sent:zt.UNKNOWN,success:zt.UNKNOWN,error:zt.UNKNOWN}};var Ee=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class Ie{constructor(t){this.rpcUrls=t}getLinkForNetwork(t){return Ee(this,void 0,void 0,(function*(){return this.rpcUrls[t.type]}))}}var Se,Me=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class Ce extends Ie{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{[o.MAINNET]:"https://tezblock.io",[o.DELPHINET]:"https://delphinet.tezblock.io",[o.EDONET]:"https://edonet.tezblock.io",[o.FLORENCENET]:"https://florencenet.tezblock.io",[o.GRANADANET]:"https://granadanet.tezblock.io",[o.HANGZHOUNET]:"https://hangzhounet.tezblock.io",[o.ITHACANET]:"https://ithacanet.tezblock.io",[o.CUSTOM]:"https://ithacanet.tezblock.io"};super(t),this.rpcUrls=t}getAddressLink(t,e){return Me(this,void 0,void 0,(function*(){const r=yield this.getLinkForNetwork(e);return"".concat(r,"/account/").concat(t)}))}getTransactionLink(t,e){return Me(this,void 0,void 0,(function*(){const r=yield this.getLinkForNetwork(e);return"".concat(r,"/transaction/").concat(t)}))}}!function(t){t.RAW="raw",t.OPERATION="operation",t.MICHELINE="micheline"}(Se||(Se={}));var ke=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const xe=new M.a("DAppClient");class Be extends ue{constructor(t){var e,r,i;super(Object.assign({storage:t&&t.storage?t.storage:new Ye},t)),this.openRequests=new Map,this._activeAccount=new l.a,this._activePeer=new l.a,this.blockExplorer=null!==(e=t.blockExplorer)&&void 0!==e?e:new Ce,this.preferredNetwork=null!==(r=t.preferredNetwork)&&void 0!==r?r:o.MAINNET,v(null!==(i=t.colorMode)&&void 0!==i?i:y.LIGHT),this.disclaimerText=t.disclaimerText,this.appMetadataManager=new he(this.storage),this.activeAccountLoaded=this.storage.get(qe.ACTIVE_ACCOUNT).then((t=>ke(this,void 0,void 0,(function*(){t?yield this.setActiveAccount(yield this.accountManager.getAccount(t)):yield this.setActiveAccount(void 0)})))).catch((t=>ke(this,void 0,void 0,(function*(){yield this.setActiveAccount(void 0),console.error(t)})))),this.handleResponse=(t,e)=>ke(this,void 0,void 0,(function*(){var r;const i=this.openRequests.get(t.id);if(xe.log("handleResponse","Received message",t,e),i&&t.type===n.Acknowledge)xe.log("acknowledge message received for ".concat(t.id)),console.timeLog(t.id,"acknowledge"),this.events.emit(zt.ACKNOWLEDGE_RECEIVED,{message:t,extraInfo:{},walletInfo:yield this.getWalletInfo()}).catch(console.error);else if(i)t.type===n.PermissionResponse&&t.appMetadata&&(yield this.appMetadataManager.addAppMetadata(t.appMetadata)),console.timeLog(t.id,"response"),console.timeEnd(t.id),t.type===n.Error||t.errorType?i.reject(t):i.resolve({message:t,connectionInfo:e}),this.openRequests.delete(t.id);else if(t.type===n.Disconnect){const n=e.origin===s.P2P?this.p2pTransport:null!==(r=this.postMessageTransport)&&void 0!==r?r:yield this.transport;if(n){const e=(yield n.getPeers()).find((e=>e.senderId===t.senderId));e?(yield n.removePeer(e),yield this.removeAccountsForPeers([e]),yield this.events.emit(zt.CHANNEL_CLOSED)):xe.error("handleDisconnect","cannot find peer for sender ID",t.senderId)}}else xe.error("handleResponse","no request found for id ",t.id)}))}initInternalTransports(){return ke(this,void 0,void 0,(function*(){const t=yield this.keyPair;this.postMessageTransport||this.p2pTransport||(this.postMessageTransport=new sr(this.name,t,this.storage),yield this.addListener(this.postMessageTransport),this.p2pTransport=new ir(this.name,t,this.storage,this.matrixNodes,this.iconUrl,this.appUrl),yield this.addListener(this.p2pTransport))}))}init(t){const e=Object.create(null,{init:{get:()=>super.init}});return ke(this,void 0,void 0,(function*(){if(this._initPromise)return this._initPromise;try{yield this.activeAccountLoaded}catch(r){}return this._initPromise=new Promise((r=>ke(this,void 0,void 0,(function*(){if(t)yield this.addListener(t),r(yield e.init.call(this,t));else if(this._transport.isSettled())yield(yield this.transport).connect(),r(yield e.init.call(this,yield this.transport));else{const t=yield this.getActiveAccount(),n=()=>{this.postMessageTransport&&this.postMessageTransport.stopListeningForNewPeers().catch(console.error),this.p2pTransport&&this.p2pTransport.stopListeningForNewPeers().catch(console.error)};if(yield this.initInternalTransports(),!this.postMessageTransport||!this.p2pTransport)return;if(this.postMessageTransport.connect().then().catch(console.error),t&&t.origin){const n=t.origin.type;n===s.EXTENSION?r(yield e.init.call(this,this.postMessageTransport)):n===s.P2P&&r(yield e.init.call(this,this.p2pTransport))}else{const t=this.p2pTransport,e=this.postMessageTransport;e.listenForNewPeer((t=>{xe.log("init","postmessage transport peer connected",t),this.events.emit(zt.PAIR_SUCCESS,t).catch((t=>console.warn(t))),this.setActivePeer(t).catch(console.error),this.setTransport(this.postMessageTransport).catch(console.error),n(),r(j.POST_MESSAGE)})).catch(console.error),t.listenForNewPeer((t=>{xe.log("init","p2p transport peer connected",t),this.events.emit(zt.PAIR_SUCCESS,t).catch((t=>console.warn(t))),this.setActivePeer(t).catch(console.error),this.setTransport(this.p2pTransport).catch(console.error),n(),r(j.P2P)})).catch(console.error),J.getAvailableExtensions().then((()=>ke(this,void 0,void 0,(function*(){this.events.emit(zt.PAIR_INIT,{p2pPeerInfo:()=>(t.connect().then().catch(console.error),t.getPairingRequestInfo()),postmessagePeerInfo:()=>e.getPairingRequestInfo(),preferredNetwork:this.preferredNetwork,abortedHandler:()=>{this._initPromise=void 0},disclaimerText:this.disclaimerText}).catch((t=>console.warn(t)))})))).catch((t=>{this._initPromise=void 0,console.error(t)}))}}})))),this._initPromise}))}getActiveAccount(){return ke(this,void 0,void 0,(function*(){return this._activeAccount.promise}))}setActiveAccount(t){return ke(this,void 0,void 0,(function*(){if(this._activeAccount.isSettled()?this._activeAccount=l.a.resolve(t):this._activeAccount.resolve(t),t){const e=t.origin.type;yield this.initInternalTransports(),e===s.EXTENSION?yield this.setTransport(this.postMessageTransport):e===s.P2P&&(yield this.setTransport(this.p2pTransport));const r=yield this.getPeer(t);yield this.setActivePeer(r)}else yield this.setActivePeer(void 0),yield this.setTransport(void 0);yield this.storage.set(qe.ACTIVE_ACCOUNT,t?t.accountIdentifier:void 0),yield this.events.emit(zt.ACTIVE_ACCOUNT_SET,t)}))}clearActiveAccount(){return this.setActiveAccount()}setColorMode(t){return ke(this,void 0,void 0,(function*(){return v(t)}))}getColorMode(){return ke(this,void 0,void 0,(function*(){return A()}))}getAppMetadata(){return ke(this,void 0,void 0,(function*(){return this.getOwnAppMetadata()}))}showPrepare(){return ke(this,void 0,void 0,(function*(){const t=yield(()=>ke(this,void 0,void 0,(function*(){try{return yield this.getWalletInfo()}catch(t){return}})))();yield this.events.emit(zt.SHOW_PREPARE,{walletInfo:t})}))}hideUI(t){return ke(this,void 0,void 0,(function*(){yield this.events.emit(zt.HIDE_UI,t)}))}removeAccount(t){const e=Object.create(null,{removeAccount:{get:()=>super.removeAccount}});return ke(this,void 0,void 0,(function*(){const r=e.removeAccount.call(this,t),n=yield this.getActiveAccount();return n&&n.accountIdentifier===t&&(yield this.setActiveAccount(void 0)),r}))}removeAllAccounts(){const t=Object.create(null,{removeAllAccounts:{get:()=>super.removeAllAccounts}});return ke(this,void 0,void 0,(function*(){yield t.removeAllAccounts.call(this),yield this.setActiveAccount(void 0)}))}removePeer(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ke(this,void 0,void 0,(function*(){const r=yield this.transport,n=r.removePeer(t);return yield this.removeAccountsForPeers([t]),e&&(yield this.sendDisconnectToPeer(t,r)),n}))}removeAllPeers(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return ke(this,void 0,void 0,(function*(){const e=yield this.transport,r=yield e.getPeers(),n=e.removeAllPeers();if(yield this.removeAccountsForPeers(r),t){const t=r.map((t=>this.sendDisconnectToPeer(t,e)));yield Promise.all(t)}return n}))}subscribeToEvent(t,e){return ke(this,void 0,void 0,(function*(){yield this.events.on(t,e)}))}checkPermissions(t){return ke(this,void 0,void 0,(function*(){if(t===n.PermissionRequest)return!0;const e=yield this.getActiveAccount();if(!e)throw yield this.sendInternalError("No active account set!");const r=e.scopes;switch(t){case n.OperationRequest:return r.includes(i.OPERATION_REQUEST);case n.SignPayloadRequest:return r.includes(i.SIGN);case n.BroadcastRequest:return!0;default:return!1}}))}requestPermissions(t){return ke(this,void 0,void 0,(function*(){const e={appMetadata:yield this.getOwnAppMetadata(),type:n.PermissionRequest,network:t&&t.network?t.network:{type:o.MAINNET},scopes:t&&t.scopes?t.scopes:[i.OPERATION_REQUEST,i.SIGN]},{message:r,connectionInfo:a}=yield this.makeRequest(e).catch((t=>ke(this,void 0,void 0,(function*(){throw yield this.handleRequestError(e,t)})))),s=r.publicKey||r.pubkey||r.pubKey,u=yield Object(Yt.c)(s),c={accountIdentifier:yield Object(te.a)(u,r.network),senderId:r.senderId,origin:{type:a.origin,id:a.id},address:u,publicKey:s,network:r.network,scopes:r.scopes,threshold:r.threshold,connectedAt:(new Date).getTime()};yield this.accountManager.addAccount(c),yield this.setActiveAccount(c);const l=Object.assign(Object.assign({},r),{address:u,accountInfo:c});return yield this.notifySuccess(e,{account:c,output:l,blockExplorer:this.blockExplorer,connectionContext:a,walletInfo:yield this.getWalletInfo()}),l}))}requestSignPayload(t){return ke(this,void 0,void 0,(function*(){if(!t.payload)throw yield this.sendInternalError("Payload must be provided");const e=yield this.getActiveAccount();if(!e)throw yield this.sendInternalError("No active account!");const r=t.payload;if("string"!==typeof r)throw new Error("Payload must be a string");const i=(()=>{switch(t.signingType){case Se.OPERATION:if(!r.startsWith("03"))throw new Error('When using signing type "OPERATION", the payload must start with prefix "03"');return Se.OPERATION;case Se.MICHELINE:if(!r.startsWith("05"))throw new Error('When using signing type "MICHELINE", the payload must start with prefix "05"');return Se.MICHELINE;case Se.RAW:default:return Se.RAW}})(),o={type:n.SignPayloadRequest,signingType:i,payload:r,sourceAddress:t.sourceAddress||e.address},{message:a,connectionInfo:s}=yield this.makeRequest(o).catch((t=>ke(this,void 0,void 0,(function*(){throw yield this.handleRequestError(o,t)}))));return yield this.notifySuccess(o,{account:e,output:a,connectionContext:s,walletInfo:yield this.getWalletInfo()}),a}))}requestOperation(t){return ke(this,void 0,void 0,(function*(){if(!t.operationDetails)throw yield this.sendInternalError("Operation details must be provided");const e=yield this.getActiveAccount();if(!e)throw yield this.sendInternalError("No active account!");const r={type:n.OperationRequest,network:e.network||{type:o.MAINNET},operationDetails:t.operationDetails,sourceAddress:e.address||""},{message:i,connectionInfo:a}=yield this.makeRequest(r).catch((t=>ke(this,void 0,void 0,(function*(){throw yield this.handleRequestError(r,t)}))));return yield this.notifySuccess(r,{account:e,output:i,blockExplorer:this.blockExplorer,connectionContext:a,walletInfo:yield this.getWalletInfo()}),i}))}requestBroadcast(t){return ke(this,void 0,void 0,(function*(){if(!t.signedTransaction)throw yield this.sendInternalError("Signed transaction must be provided");const e=t.network||{type:o.MAINNET},r={type:n.BroadcastRequest,network:e,signedTransaction:t.signedTransaction},{message:i,connectionInfo:a}=yield this.makeRequest(r).catch((t=>ke(this,void 0,void 0,(function*(){throw yield this.handleRequestError(r,t)}))));return yield this.notifySuccess(r,{network:e,output:i,blockExplorer:this.blockExplorer,connectionContext:a,walletInfo:yield this.getWalletInfo()}),i}))}setActivePeer(t){return ke(this,void 0,void 0,(function*(){this._activePeer.isSettled()?this._activePeer=l.a.resolve(t):this._activePeer.resolve(t),t&&(yield this.initInternalTransports(),"postmessage-pairing-response"===t.type?yield this.setTransport(this.postMessageTransport):"p2p-pairing-response"===t.type&&(yield this.setTransport(this.p2pTransport)))}))}setTransport(t){const e=Object.create(null,{setTransport:{get:()=>super.setTransport}});return ke(this,void 0,void 0,(function*(){return t||(this._initPromise=void 0),e.setTransport.call(this,t)}))}sendInternalError(t){return ke(this,void 0,void 0,(function*(){throw yield this.events.emit(zt.INTERNAL_ERROR,{text:t}),new Error(t)}))}removeAccountsForPeers(t){return ke(this,void 0,void 0,(function*(){const e=yield this.accountManager.getAccounts(),r=t.map((t=>t.senderId)),n=e.filter((t=>r.includes(t.senderId))).map((t=>t.accountIdentifier));yield this.accountManager.removeAccounts(n);const i=yield this.getActiveAccount();i&&n.includes(i.accountIdentifier)&&(yield this.setActiveAccount(void 0))}))}handleRequestError(t,e){return ke(this,void 0,void 0,(function*(){if(xe.error("handleRequestError","error response",e),e.errorType){const r=[];if(e.errorType===Ut.NO_PRIVATE_KEY_FOUND_ERROR){const e=()=>ke(this,void 0,void 0,(function*(){const e=t;let r;if(e.sourceAddress&&e.network){const t=yield Object(te.a)(e.sourceAddress,e.network);r=yield this.getAccount(t),r&&(yield this.removeAccount(r.accountIdentifier))}}));r.push({text:"Remove account",actionCallback:e})}const i=yield this.getPeer(),o=yield this.getActiveAccount();throw t.type===n.PermissionRequest&&void 0===(yield this.getActiveAccount())&&(this._initPromise=void 0,this.postMessageTransport=void 0,this.p2pTransport=void 0,yield this.setTransport(),yield this.setActivePeer()),this.events.emit(_e[t.type].error,{errorResponse:e,walletInfo:yield this.getWalletInfo(i,o)},r).catch((t=>xe.error("handleRequestError",t))),Oe.getError(e.errorType,e.errorData)}throw e}))}notifySuccess(t,e){return ke(this,void 0,void 0,(function*(){this.events.emit(_e[t.type].success,e).catch((t=>console.warn(t)))}))}getWalletInfo(t,e){var r,n;return ke(this,void 0,void 0,(function*(){const i=e||(yield this.getActiveAccount()),o=t||(yield this.getPeer(i));let a;i&&(a=yield this.appMetadataManager.getAppMetadata(i.senderId));const s=o;a||(a={name:s.name,icon:s.icon});const u=(t,e)=>!(!t||!e)&&t.toLowerCase()===e.toLowerCase();let c,l;if($.find((t=>u(t.name,null===a||void 0===a?void 0:a.name)))?(c=$.find((t=>u(t.name,null===a||void 0===a?void 0:a.name))),l="mobile"):Z.find((t=>u(t.name,null===a||void 0===a?void 0:a.name)))?(c=Z.find((t=>u(t.name,null===a||void 0===a?void 0:a.name))),l="web"):X.find((t=>u(t.name,null===a||void 0===a?void 0:a.name)))?(c=X.find((t=>u(t.name,null===a||void 0===a?void 0:a.name))),l="desktop"):Y.find((t=>u(t.name,null===a||void 0===a?void 0:a.name)))&&(c=Y.find((t=>u(t.name,null===a||void 0===a?void 0:a.name))),l="extension"),c){let t;return c.hasOwnProperty("links")?t=c.links[null!==(r=null===i||void 0===i?void 0:i.network.type)&&void 0!==r?r:this.preferredNetwork]:c.hasOwnProperty("deepLink")&&(t=c.deepLink),{name:a.name,icon:null!==(n=a.icon)&&void 0!==n?n:c.logo,deeplink:t,type:l}}return a}))}getPeer(t){var e,r,n,i;return ke(this,void 0,void 0,(function*(){let o;if(t){xe.log("getPeer","We have an account",t);const a=[...null!==(r=yield null===(e=this.postMessageTransport)||void 0===e?void 0:e.getPeers())&&void 0!==r?r:[],...null!==(i=yield null===(n=this.p2pTransport)||void 0===n?void 0:n.getPeers())&&void 0!==i?i:[]];xe.log("getPeer","Found peers",a,t),o=a.find((e=>e.senderId===t.senderId)),o||(o=a.find((e=>e.extensionId===t.origin.id)))}else o=yield this._activePeer.promise,xe.log("getPeer","Active peer",o);if(!o)throw new Error("No matching peer found.");return o}))}makeRequest(t){var e;return ke(this,void 0,void 0,(function*(){const r=yield Object(_.a)();if(console.time(r),xe.log("makeRequest","starting"),yield this.init(),console.timeLog(r,"init done"),xe.log("makeRequest","after init"),yield this.addRequestAndCheckIfRateLimited())throw this.events.emit(zt.LOCAL_RATE_LIMIT_REACHED).catch((t=>console.warn(t))),new Error("rate limit reached");if(!(yield this.checkPermissions(t.type)))throw this.events.emit(zt.NO_PERMISSIONS).catch((t=>console.warn(t))),new Error("No permissions to send this request to wallet!");if(!this.beaconId)throw yield this.sendInternalError("BeaconID not defined");const n=Object.assign({id:r,version:Xt.a,senderId:yield Object(oe.a)(yield this.beaconId)},t),i=new l.a;this.addOpenRequest(n.id,i);const o=yield(new S.a).serialize(n),a=yield this.getActiveAccount(),s=yield this.getPeer(a),u=yield this.getWalletInfo(s,a);xe.log("makeRequest","sending message",n),console.timeLog(r,"sending");try{yield(yield this.transport).send(o,s)}catch(c){throw this.events.emit(zt.INTERNAL_ERROR,{text:"Unable to send message. If this problem persists, please reset the connection and pair your wallet again.",buttons:[{text:"Reset Connection",actionCallback:()=>ke(this,void 0,void 0,(function*(){yield kt(),this.disconnect()}))}]}),console.timeLog(r,"send error"),c}return console.timeLog(r,"sent"),this.events.emit(_e[t.type].sent,{walletInfo:Object.assign(Object.assign({},u),{name:null!==(e=u.name)&&void 0!==e?e:"Wallet"}),extraInfo:{resetCallback:()=>ke(this,void 0,void 0,(function*(){this.disconnect()}))}}).catch((t=>console.warn(t))),i.promise}))}disconnect(){return ke(this,void 0,void 0,(function*(){this.postMessageTransport=void 0,this.p2pTransport=void 0,yield Promise.all([this.clearActiveAccount(),(yield this.transport).disconnect()])}))}addOpenRequest(t,e){xe.log("addOpenRequest",this.name,"adding request ".concat(t," and waiting for answer")),this.openRequests.set(t,e)}}class Oe{constructor(t,e){this.name="BeaconError",this.title="Error",this.message="[".concat(t,"]:").concat(e),this.description=e}get fullDescription(){return{description:this.description}}static getError(t,e){switch(t){case Ut.BROADCAST_ERROR:return new Te;case Ut.NETWORK_NOT_SUPPORTED:return new Re;case Ut.NO_ADDRESS_ERROR:return new Pe;case Ut.NO_PRIVATE_KEY_FOUND_ERROR:return new Ne;case Ut.NOT_GRANTED_ERROR:return new je;case Ut.PARAMETERS_INVALID_ERROR:return new De;case Ut.TOO_MANY_OPERATIONS:return new Le;case Ut.TRANSACTION_INVALID_ERROR:return new Fe(e);case Ut.SIGNATURE_TYPE_NOT_SUPPORTED:return new dr;case Ut.ABORTED_ERROR:return new tr;case Ut.UNKNOWN_ERROR:return new Ue}}}class Te extends Oe{constructor(){super(Ut.BROADCAST_ERROR,"The transaction could not be broadcast to the network. Please try again."),this.name="BroadcastBeaconError",this.title="Broadcast Error"}}class Re extends Oe{constructor(){super(Ut.NETWORK_NOT_SUPPORTED,"The wallet does not support this network. Please select another one."),this.name="NetworkNotSupportedBeaconError",this.title="Network Error"}}class Pe extends Oe{constructor(){super(Ut.NO_ADDRESS_ERROR,"The wallet does not have an account set up. Please make sure to set up your wallet and try again."),this.name="NoAddressBeaconError",this.title="No Address"}}class Ne extends Oe{constructor(){super(Ut.NO_PRIVATE_KEY_FOUND_ERROR,"The account you are trying to interact with is not available. Please make sure to add the account to your wallet and try again."),this.name="NoPrivateKeyBeaconError",this.title="Account Not Found"}}class je extends Oe{constructor(){super(Ut.NOT_GRANTED_ERROR,"You do not have the necessary permissions to perform this action. Please initiate another permission request and give the necessary permissions."),this.name="NotGrantedBeaconError",this.title="Permission Not Granted"}}class De extends Oe{constructor(){super(Ut.PARAMETERS_INVALID_ERROR,"Some of the parameters you provided are invalid and the request could not be completed. Please check your inputs and try again."),this.name="ParametersInvalidBeaconError",this.title="Parameters Invalid"}}class Le extends Oe{constructor(){super(Ut.TOO_MANY_OPERATIONS,"The request contains too many transactions. Please include fewer operations and try again."),this.name="TooManyOperationsBeaconError",this.title="Too Many Operations"}}class Fe extends Oe{constructor(t){super(Ut.TRANSACTION_INVALID_ERROR,"The transaction is invalid and the node did not accept it."),this.data=t,this.name="TransactionInvalidBeaconError",this.title="Transaction Invalid",this.data=t}get fullDescription(){return{description:this.description,data:JSON.stringify(this.data,void 0,2)}}}class Ue extends Oe{constructor(){super(Ut.UNKNOWN_ERROR,"An unknown error occured. Please try again or report it to a developer."),this.name="UnknownBeaconError",this.title="Error"}}var Qe=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const Ge=new M.a("P2PTransport");class He extends H{constructor(t,e,r,n,i,o,a){super(t,new c.a(t,e,1,r,n,o,a),new F(r,i)),this.type=j.P2P}static isAvailable(){return Qe(this,void 0,void 0,(function*(){return Promise.resolve(!0)}))}connect(){const t=Object.create(null,{connect:{get:()=>super.connect}});return Qe(this,void 0,void 0,(function*(){if(this._isConnected!==D.NOT_CONNECTED)return;Ge.log("connect"),this._isConnected=D.CONNECTING,yield this.client.start();const e=yield this.getPeers();if(e.length>0){Ge.log("connect","connecting to ".concat(e.length," peers"));const t=e.map((t=>Qe(this,void 0,void 0,(function*(){return this.listen(t.publicKey)}))));Promise.all(t).catch((t=>Ge.error("connect",t)))}return yield this.startOpenChannelListener(),t.connect.call(this)}))}disconnect(){const t=Object.create(null,{disconnect:{get:()=>super.disconnect}});return Qe(this,void 0,void 0,(function*(){return yield this.client.stop(),t.disconnect.call(this)}))}startOpenChannelListener(){return Qe(this,void 0,void 0,(function*(){}))}getPairingRequestInfo(){return Qe(this,void 0,void 0,(function*(){return this.client.getPairingRequestInfo()}))}listen(t){return Qe(this,void 0,void 0,(function*(){yield this.client.listenForEncryptedMessage(t,(e=>{const r={origin:s.P2P,id:t};this.notifyListeners(e,r).catch((t=>{throw t}))})).catch((t=>{throw t}))}))}}class ze{static isSupported(){return Promise.resolve(!1)}}var qe;!function(t){t.TRANSPORT_P2P_PEERS_DAPP="beacon:communication-peers-dapp",t.TRANSPORT_P2P_PEERS_WALLET="beacon:communication-peers-wallet",t.TRANSPORT_POSTMESSAGE_PEERS_DAPP="beacon:postmessage-peers-dapp",t.TRANSPORT_POSTMESSAGE_PEERS_WALLET="beacon:postmessage-peers-wallet",t.ACCOUNTS="beacon:accounts",t.ACTIVE_ACCOUNT="beacon:active-account",t.BEACON_SDK_SECRET_SEED="beacon:sdk-secret-seed",t.APP_METADATA_LIST="beacon:app-metadata-list",t.PERMISSION_LIST="beacon:permissions",t.BEACON_SDK_VERSION="beacon:sdk_version",t.MATRIX_PRESERVED_STATE="beacon:sdk-matrix-preserved-state",t.MATRIX_PEER_ROOM_IDS="beacon:matrix-peer-rooms",t.MATRIX_SELECTED_NODE="beacon:matrix-selected-node",t.MULTI_NODE_SETUP_DONE="beacon:multi-node-setup"}(qe||(qe={}));const Ke={[qe.TRANSPORT_P2P_PEERS_DAPP]:[],[qe.TRANSPORT_P2P_PEERS_WALLET]:[],[qe.TRANSPORT_POSTMESSAGE_PEERS_DAPP]:[],[qe.TRANSPORT_POSTMESSAGE_PEERS_WALLET]:[],[qe.ACCOUNTS]:[],[qe.ACTIVE_ACCOUNT]:void 0,[qe.BEACON_SDK_SECRET_SEED]:void 0,[qe.APP_METADATA_LIST]:[],[qe.PERMISSION_LIST]:[],[qe.BEACON_SDK_VERSION]:void 0,[qe.MATRIX_PRESERVED_STATE]:{},[qe.MATRIX_PEER_ROOM_IDS]:{},[qe.MATRIX_SELECTED_NODE]:void 0,[qe.MULTI_NODE_SETUP_DONE]:void 0};var Ve=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class We{static isSupported(){return Ve(this,void 0,void 0,(function*(){return"undefined"!==typeof window&&"undefined"!==typeof chrome&&Boolean(chrome)&&Boolean(chrome.runtime)&&Boolean(chrome.runtime.id)}))}get(t){return Ve(this,void 0,void 0,(function*(){return new Promise((e=>{chrome.storage.local.get(null,(r=>{r[t]?e(r[t]):e("object"===typeof Ke[t]?JSON.parse(JSON.stringify(Ke[t])):Ke[t])}))}))}))}set(t,e){return Ve(this,void 0,void 0,(function*(){return new Promise((r=>{chrome.storage.local.set({[t]:e},(()=>{r()}))}))}))}delete(t){return Ve(this,void 0,void 0,(function*(){return new Promise((e=>{chrome.storage.local.set({[t]:void 0},(()=>{e()}))}))}))}}var Je=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class Ye{constructor(t){this.prefix=t}static isSupported(){return Je(this,void 0,void 0,(function*(){return Promise.resolve(Boolean("undefined"!==typeof window)&&Boolean(window.localStorage))}))}get(t){return Je(this,void 0,void 0,(function*(){const e=localStorage.getItem(this.getPrefixedKey(t));if(!e)return"object"===typeof Ke[t]?JSON.parse(JSON.stringify(Ke[t])):Ke[t];try{return JSON.parse(e)}catch(r){return e}}))}set(t,e){return Je(this,void 0,void 0,(function*(){return"string"===typeof e?localStorage.setItem(this.getPrefixedKey(t),e):localStorage.setItem(this.getPrefixedKey(t),JSON.stringify(e))}))}delete(t){return Je(this,void 0,void 0,(function*(){return Promise.resolve(localStorage.removeItem(this.getPrefixedKey(t)))}))}getPrefixedKey(t){return this.prefix?"".concat(this.prefix,"-").concat(t):t}}var Xe=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const Ze=new M.a("STORAGE"),$e=()=>Xe(void 0,void 0,void 0,(function*(){if(yield We.isSupported())return Ze.log("getStorage","USING CHROME STORAGE"),new We;if(yield Ye.isSupported())return Ze.log("getStorage","USING LOCAL STORAGE"),new Ye;throw new Error("no storage type supported")}));class tr extends Oe{constructor(){super(Ut.ABORTED_ERROR,"The action was aborted by the user."),this.name="UnknownBeaconError",this.title="Aborted"}}const er={extension:J.isAvailable(),availableExtensions:J.getAvailableExtensions()};var rr=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const nr=new M.a("DappP2PTransport");class ir extends He{constructor(t,e,r,n,i,o){super(t,e,r,n,qe.TRANSPORT_P2P_PEERS_DAPP,i,o)}startOpenChannelListener(){return rr(this,void 0,void 0,(function*(){return this.client.listenForChannelOpening((t=>rr(this,void 0,void 0,(function*(){nr.log("listenForNewPeer","new publicKey",t.publicKey),yield this.addPeer(t),this._isConnected=D.CONNECTED,this.newPeerListener&&(this.newPeerListener(t),this.newPeerListener=void 0)}))))}))}listenForNewPeer(t){return rr(this,void 0,void 0,(function*(){nr.log("listenForNewPeer"),this.newPeerListener=t}))}stopListeningForNewPeers(){return rr(this,void 0,void 0,(function*(){nr.log("stopListeningForNewPeers"),this.newPeerListener=void 0}))}}var or=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const ar=new M.a("DappPostMessageTransport");class sr extends J{constructor(t,e,r){super(t,e,r,qe.TRANSPORT_POSTMESSAGE_PEERS_DAPP)}startOpenChannelListener(){return or(this,void 0,void 0,(function*(){return this.client.listenForChannelOpening((t=>or(this,void 0,void 0,(function*(){ar.log("connect","received PostMessagePairingResponse",t),yield this.addPeer(t),this._isConnected=D.CONNECTED,this.newPeerListener&&(this.newPeerListener(t),this.newPeerListener=void 0)}))))}))}listenForNewPeer(t){return or(this,void 0,void 0,(function*(){ar.log("listenForNewPeer"),this.newPeerListener=t}))}stopListeningForNewPeers(){return or(this,void 0,void 0,(function*(){ar.log("stopListeningForNewPeers"),this.newPeerListener=void 0}))}}var ur=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};class cr extends He{constructor(t,e,r,n,i,o){super(t,e,r,n,qe.TRANSPORT_P2P_PEERS_WALLET,i,o)}addPeer(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=Object.create(null,{addPeer:{get:()=>super.addPeer}});return ur(this,void 0,void 0,(function*(){yield r.addPeer.call(this,t),e&&(yield this.client.sendPairingResponse(t))}))}}class lr extends J{constructor(t,e,r){super(t,e,r,qe.TRANSPORT_POSTMESSAGE_PEERS_WALLET)}}var fr=r(720),hr=r(587);class dr extends Oe{constructor(){super(Ut.SIGNATURE_TYPE_NOT_SUPPORTED,"The wallet is not able to sign payloads of this type."),this.name="SignatureTypeNotSupportedBeaconError",this.title="Signature Type Not Supported"}}},function(t,e,r){"use strict";r.r(e),function(t){r.d(e,"ASSOCIATED_TOKEN_PROGRAM_ID",(function(){return Vt})),r.d(e,"AccountLayout",(function(){return re})),r.d(e,"MintLayout",(function(){return ee})),r.d(e,"NATIVE_MINT",(function(){return te})),r.d(e,"TOKEN_PROGRAM_ID",(function(){return Kt})),r.d(e,"Token",(function(){return ie})),r.d(e,"u64",(function(){return Xt}));for(var n=r(25),i=r.n(n),o=r(1375),a=r.n(o),s=r(18),u={},c={byteLength:function(t){var e=g(t),r=e[0],n=e[1];return 3*(r+n)/4-n},toByteArray:function(t){var e,r,n=g(t),i=n[0],o=n[1],a=new h(function(t,e,r){return 3*(e+r)/4-r}(0,i,o)),s=0,u=o>0?i-4:i;for(r=0;r>16&255,a[s++]=e>>8&255,a[s++]=255&e;2===o&&(e=f[t.charCodeAt(r)]<<2|f[t.charCodeAt(r+1)]>>4,a[s++]=255&e);1===o&&(e=f[t.charCodeAt(r)]<<10|f[t.charCodeAt(r+1)]<<4|f[t.charCodeAt(r+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e);return a},fromByteArray:function(t){for(var e,r=t.length,n=r%3,i=[],o=16383,a=0,s=r-n;as?s:a+o));1===n?(e=t[r-1],i.push(l[e>>2]+l[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],i.push(l[e>>10]+l[e>>4&63]+l[e<<2&63]+"="));return i.join("")}},l=[],f=[],h="undefined"!==typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0;p<64;++p)l[p]=d[p],f[d.charCodeAt(p)]=p;function g(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function m(t,e,r){for(var n,i,o=[],a=e;a>18&63]+l[i>>12&63]+l[i>>6&63]+l[63&i]);return o.join("")}f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63;var y={read:function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,l=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},write:function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,c-=8);t[r+d-p]|=128*g}};!function(t){const e=c,r=y,n="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},t.INSPECT_MAX_BYTES=50;const i=2147483647;function o(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,a.prototype),e}function a(t,e,r){if("number"===typeof t){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return s(t,e,r)}function s(t,e,r){if("string"===typeof t)return function(t,e){"string"===typeof e&&""!==e||(e="utf8");if(!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|p(t,e);let n=o(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(J(t,Uint8Array)){const e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(J(t,ArrayBuffer)||t&&J(t.buffer,ArrayBuffer))return h(t,e,r);if("undefined"!==typeof SharedArrayBuffer&&(J(t,SharedArrayBuffer)||t&&J(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return a.from(n,e,r);const i=function(t){if(a.isBuffer(t)){const e=0|d(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!==typeof t.length||Y(t.length)?o(0):f(t);if("Buffer"===t.type&&Array.isArray(t.data))return f(t.data)}(t);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!==typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return u(t),o(t<0?0:0|d(t))}function f(t){const e=t.length<0?0:0|d(t.length),r=o(e);for(let n=0;n=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function p(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||J(t,ArrayBuffer))return t.byteLength;if("string"!==typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(i)return n?-1:K(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return B(this,e,r);case"utf8":case"utf-8":return M(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){let o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let n=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=e.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function M(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128===(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128===(192&r)&&128===(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],s=t[i+3],128===(192&r)&&128===(192&n)&&128===(192&s)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(t){const e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(a.isBuffer(e)||(e=a.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!a.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(e+=" ... "),""},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(t,e,r,n,i){if(J(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const u=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r);for(let a=0;a>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return A(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function k(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let o=e;or)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function P(t,e,r,n,i){G(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function N(t,e,r,n,i){G(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,n,i,o){return e=+e,n>>>=0,o||j(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function L(t,e,n,i,o){return e=+e,n>>>=0,o||j(t,0,n,8),r.write(t,e,n,i,52,8),n+8}a.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||T(t,e,this.length);let n=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,r||T(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),this[t]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readBigUInt64LE=Z((function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||T(t,e,this.length);let n=this[t],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||T(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||T(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readBigInt64LE=Z((function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||T(t,4,this.length),r.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||T(t,4,this.length),r.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||T(t,8,this.length),r.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||T(t,8,this.length),r.read(this,t,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){R(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,!n){R(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeBigUInt64LE=Z((function(t){return P(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeBigUInt64BE=Z((function(t){return N(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}let i=0,o=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeBigInt64LE=Z((function(t){return P(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeBigInt64BE=Z((function(t){return N(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(i=e;i=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function G(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(n," and < 2").concat(n," ** ").concat(8*(o+1)).concat(n):">= -(2".concat(n," ** ").concat(8*(o+1)-1).concat(n,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(n):">= ".concat(e).concat(n," and <= ").concat(r).concat(n),new F.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){H(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||z(e,t.length-(r+1))}(n,i,o)}function H(t,e){if("number"!==typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function z(t,e,r){if(Math.floor(t)!==t)throw H(t,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(typeof e)}),TypeError),U("ERR_OUT_OF_RANGE",(function(t,e,r){let n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Q(String(r)):"bigint"===typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Q(i)),i+="n"),n+=" It must be ".concat(e,". Received ").concat(i),n}),RangeError);const q=/[^+/0-9A-Za-z-_]/g;function K(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function V(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function W(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Y(t){return t!==t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Z(t){return"undefined"===typeof BigInt?$:t}function $(){throw new Error("BigInt not supported")}}(u);var b="undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},v="function"===typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t};function A(t,e){var r={seen:[],stylize:_};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),M(e)?r.showHidden=e:e&&function(t,e){if(!e||!O(e))return t;var r=Object.keys(e),n=r.length;for(;n--;)t[r[n]]=e[r[n]]}(r,e),x(r.showHidden)&&(r.showHidden=!1),x(r.depth)&&(r.depth=2),x(r.colors)&&(r.colors=!1),x(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=w),E(r,t,r.depth)}function w(t,e){var r=A.styles[e];return r?"\x1b["+A.colors[r][0]+"m"+t+"\x1b["+A.colors[r][1]+"m":t}function _(t,e){return t}function E(t,e,r){if(t.customInspect&&e&&P(e.inspect)&&e.inspect!==A&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(r,t);return k(n)||(n=E(t,n,r)),n}var i=function(t,e){if(x(e))return t.stylize("undefined","undefined");if(k(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(n=e,"number"===typeof n)return t.stylize(""+e,"number");var n;if(M(e))return t.stylize(""+e,"boolean");if(C(e))return t.stylize("null","null")}(t,e);if(i)return i;var o=Object.keys(e),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),R(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return I(e);if(0===o.length){if(P(e)){var s=e.name?": "+e.name:"";return t.stylize("[Function"+s+"]","special")}if(B(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(T(e))return t.stylize(Date.prototype.toString.call(e),"date");if(R(e))return I(e)}var u,c,l="",f=!1,h=["{","}"];(u=e,Array.isArray(u)&&(f=!0,h=["[","]"]),P(e))&&(l=" [Function"+(e.name?": "+e.name:"")+"]");return B(e)&&(l=" "+RegExp.prototype.toString.call(e)),T(e)&&(l=" "+Date.prototype.toUTCString.call(e)),R(e)&&(l=" "+I(e)),0!==o.length||f&&0!=e.length?r<0?B(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=f?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,l,h)):h[0]+l+h[1]}function I(t){return"["+Error.prototype.toString.call(t)+"]"}function S(t,e,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),D(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=C(r)?E(t,u.value,null):E(t,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function M(t){return"boolean"===typeof t}function C(t){return null===t}function k(t){return"string"===typeof t}function x(t){return void 0===t}function B(t){return O(t)&&"[object RegExp]"===j(t)}function O(t){return"object"===typeof t&&null!==t}function T(t){return O(t)&&"[object Date]"===j(t)}function R(t){return O(t)&&("[object Error]"===j(t)||t instanceof Error)}function P(t){return"function"===typeof t}function N(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t}function j(t){return Object.prototype.toString.call(t)}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function L(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}}function Y(t,e){return"string"===typeof t?t.length=0;s--)if(u[s]!==c[s])return!1;for(s=u.length-1;s>=0;s--)if(!tt(t[a=u[s]],e[a],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function et(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function rt(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(r){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function nt(t,e,r,n){var i;if("function"!==typeof e)throw new TypeError('"block" argument must be a function');"string"===typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(r){e=r}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&Z(i,r,"Missing expected exception"+n);var o="string"===typeof n,a=!t&&i&&!r;if((!t&&R(i)&&o&&rt(i,r)||a)&&Z(i,r,"Got unwanted exception"+n),t&&i&&r&&!rt(i,r)||!t&&i)throw i}K.AssertionError=J,v(J,Error),K.fail=Z,K.ok=$,K.equal=function t(e,r,n){e!=r&&Z(e,r,n,"==",t)},K.notEqual=function t(e,r,n){e==r&&Z(e,r,n,"!=",t)},K.deepEqual=function t(e,r,n){tt(e,r,!1)||Z(e,r,n,"deepEqual",t)},K.deepStrictEqual=function t(e,r,n){tt(e,r,!0)||Z(e,r,n,"deepStrictEqual",t)},K.notDeepEqual=function t(e,r,n){tt(e,r,!1)&&Z(e,r,n,"notDeepEqual",t)},K.notDeepStrictEqual=function t(e,r,n){tt(e,r,!0)&&Z(e,r,n,"notDeepStrictEqual",t)},K.strictEqual=function t(e,r,n){e!==r&&Z(e,r,n,"===",t)},K.notStrictEqual=function t(e,r,n){e===r&&Z(e,r,n,"!==",t)},K.throws=function(t,e,r){nt(!0,t,e,r)},K.doesNotThrow=function(t,e,r){nt(!1,t,e,r)},K.ifError=function(t){if(t)throw t};var it={};class ot{constructor(t,e){if(!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=e}makeDestinationObject(){return{}}decode(t,e){throw new Error("Layout is abstract")}encode(t,e,r){throw new Error("Layout is abstract")}getSpan(t,e){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(t){const e=Object.create(this.constructor.prototype);return Object.assign(e,this),e.property=t,e}fromArray(t){}}function at(t,e){return e.property?t+"["+e.property+"]":t}it.Layout=ot,it.nameWithProperty=at,it.bindConstructorLayout=function(t,e){if("function"!==typeof t)throw new TypeError("Class must be constructor");if(t.hasOwnProperty("layout_"))throw new Error("Class is already bound to a layout");if(!(e&&e instanceof ot))throw new TypeError("layout must be a Layout");if(e.hasOwnProperty("boundConstructor_"))throw new Error("layout is already bound to a constructor");t.layout_=e,e.boundConstructor_=t,e.makeDestinationObject=()=>new t,Object.defineProperty(t.prototype,"encode",{value:function(t,r){return e.encode(this,t,r)},writable:!0}),Object.defineProperty(t,"decode",{value:function(t,r){return e.decode(t,r)},writable:!0})};class st extends ot{isCount(){throw new Error("ExternalLayout is abstract")}}class ut extends st{constructor(t,e){if(void 0===t&&(t=1),!Number.isInteger(t)||0>=t)throw new TypeError("elementSpan must be a (positive) integer");super(-1,e),this.elementSpan=t}isCount(){return!0}decode(t,e){void 0===e&&(e=0);const r=t.length-e;return Math.floor(r/this.elementSpan)}encode(t,e,r){return 0}}class ct extends st{constructor(t,e,r){if(!(t instanceof ot))throw new TypeError("layout must be a Layout");if(void 0===e)e=0;else if(!Number.isInteger(e))throw new TypeError("offset must be integer or undefined");super(t.span,r||t.property),this.layout=t,this.offset=e}isCount(){return this.layout instanceof lt||this.layout instanceof ft}decode(t,e){return void 0===e&&(e=0),this.layout.decode(t,e+this.offset)}encode(t,e,r){return void 0===r&&(r=0),this.layout.encode(t,e,r+this.offset)}}class lt extends ot{constructor(t,e){if(super(t,e),6t+n.encode(i,e,r+t)),0);return this.count instanceof st&&this.count.encode(t.length,e,r),i}}class Mt extends ot{constructor(t,e,r){if(!Array.isArray(t)||!t.reduce(((t,e)=>t&&e instanceof ot),!0))throw new TypeError("fields must be array of Layout instances");"boolean"===typeof e&&void 0===r&&(r=e,e=void 0);for(const o of t)if(0>o.span&&void 0===o.property)throw new Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce(((t,e)=>t+e.getSpan()),0)}catch(i){}super(n,e),this.fields=t,this.decodePrefixes=!!r}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);let r=0;try{r=this.fields.reduce(((r,n)=>{const i=n.getSpan(t,e);return e+=i,r+i}),0)}catch(n){throw new RangeError("indeterminate span")}return r}decode(t,e){void 0===e&&(e=0);const r=this.makeDestinationObject();for(const n of this.fields)if(void 0!==n.property&&(r[n.property]=n.decode(t,e)),e+=n.getSpan(t,e),this.decodePrefixes&&t.length===e)break;return r}encode(t,e,r){void 0===r&&(r=0);const n=r;let i=0,o=0;for(const a of this.fields){let n=a.span;if(o=0n&&(n=a.getSpan(e,r)))}i=r,r+=n}return i+o-n}fromArray(t){const e=this.makeDestinationObject();for(const r of this.fields)void 0!==r.property&&0r.span?e=-1:0<=e&&(e+=r.span)}}}class Ct{constructor(t){this.property=t}decode(){throw new Error("UnionDiscriminator is abstract")}encode(){throw new Error("UnionDiscriminator is abstract")}}class kt extends Ct{constructor(t,e){if(!(t instanceof st&&t.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(e||t.property||"variant"),this.layout=t}decode(t,e){return this.layout.decode(t,e)}encode(t,e,r){return this.layout.encode(t,e,r)}}class xt extends ot{constructor(t,e,r){const n=t instanceof lt||t instanceof ft;if(n)t=new kt(new ct(t));else if(t instanceof st&&t.isCount())t=new kt(t);else if(!(t instanceof Ct))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===e&&(e=null),!(null===e||e instanceof ot))throw new TypeError("defaultLayout must be null or a Layout");if(null!==e){if(0>e.span)throw new Error("defaultLayout must have constant span");void 0===e.property&&(e=e.replicate("content"))}let i=-1;e&&(i=e.span,0<=i&&n&&(i+=t.layout.span)),super(i,r),this.discriminator=t,this.usesPrefixDiscriminator=n,this.defaultLayout=e,this.registry={};let o=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(t){return o(t)},this.configGetSourceVariant=function(t){o=t.bind(this)}}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);const r=this.getVariant(t,e);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(t,e)}defaultGetSourceVariant(t){if(t.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&t.hasOwnProperty(this.defaultLayout.property))return;const e=this.registry[t[this.discriminator.property]];if(e&&(!e.layout||t.hasOwnProperty(e.property)))return e}else for(const e in this.registry){const r=this.registry[e];if(t.hasOwnProperty(r.property))return r}throw new Error("unable to infer src variant")}decode(t,e){let r;void 0===e&&(e=0);const n=this.discriminator,i=n.decode(t,e);let o=this.registry[i];if(void 0===o){let a=0;o=this.defaultLayout,this.usesPrefixDiscriminator&&(a=n.layout.span),r=this.makeDestinationObject(),r[n.property]=i,r[o.property]=this.defaultLayout.decode(t,e+a)}else r=o.decode(t,e);return r}encode(t,e,r){void 0===r&&(r=0);const n=this.getSourceVariant(t);if(void 0===n){const n=this.discriminator,i=this.defaultLayout;let o=0;return this.usesPrefixDiscriminator&&(o=n.layout.span),n.encode(t[n.property],e,r),o+i.encode(t[i.property],e,r+o)}return n.encode(t,e,r)}addVariant(t,e,r){const n=new Bt(this,t,e,r);return this.registry[t]=n,n}getVariant(t,e){let r=t;return u.Buffer.isBuffer(t)&&(void 0===e&&(e=0),r=this.discriminator.decode(t,e)),this.registry[r]}}class Bt extends ot{constructor(t,e,r,n){if(!(t instanceof xt))throw new TypeError("union must be a Union");if(!Number.isInteger(e)||0>e)throw new TypeError("variant must be a (non-negative) integer");if("string"===typeof r&&void 0===n&&(n=r,r=null),r){if(!(r instanceof ot))throw new TypeError("layout must be a Layout");if(null!==t.defaultLayout&&0<=r.span&&r.span>t.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!==typeof n)throw new TypeError("variant must have a String property")}let i=t.span;0>t.span&&(i=r?r.span:0,0<=i&&t.usesPrefixDiscriminator&&(i+=t.discriminator.layout.span)),super(i,n),this.union=t,this.variant=e,this.layout=r||null}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),r+this.layout.getSpan(t,e+r)}decode(t,e){const r=this.makeDestinationObject();if(void 0===e&&(e=0),this!==this.union.getVariant(t,e))throw new Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(t,e+n):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(t,e,r){void 0===r&&(r=0);let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!t.hasOwnProperty(this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,e,r);let i=n;if(this.layout&&(this.layout.encode(t[this.property],e,r+n),i+=this.layout.getSpan(e,r+n),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}}function Ot(t){return 0>t&&(t+=4294967296),t}class Tt extends ot{constructor(t,e,r){if(!(t instanceof lt||t instanceof ft))throw new TypeError("word must be a UInt or UIntBE layout");if("string"===typeof e&&void 0===r&&(r=e,e=void 0),4=e)throw new TypeError("bits must be positive integer");const n=8*t.span,i=t.fields.reduce(((t,e)=>t+e.bits),0);if(e+i>n)throw new Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=e,this.valueMask=(1<>>this.start}encode(t){if(!Number.isInteger(t)||t!==Ot(t&this.valueMask))throw new TypeError(at("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const e=this.container._packedGetValue(),r=Ot(t<r&&(r=this.length.decode(t,e)),r}decode(t,e){void 0===e&&(e=0);let r=this.span;return 0>r&&(r=this.length.decode(t,e)),t.slice(e,e+r)}encode(t,e,r){let n=this.length;if(this.length instanceof st&&(n=t.length),!u.Buffer.isBuffer(t)||n!==t.length)throw new TypeError(at("Blob.encode",this)+" requires (length "+n+") Buffer as src");if(r+n>e.length)throw new RangeError("encoding overruns Buffer");return e.write(t.toString("hex"),r,n,"hex"),this.length instanceof st&&this.length.encode(n,e,r),n}}class jt extends ot{constructor(t){super(-1,t)}getSpan(t,e){if(!u.Buffer.isBuffer(t))throw new TypeError("b must be a Buffer");void 0===e&&(e=0);let r=e;for(;re.length)throw new RangeError("encoding overruns Buffer");return n.copy(e,r),e[r+i]=0,i+1}}class Dt extends ot{constructor(t,e){if("string"===typeof t&&void 0===e&&(e=t,t=void 0),void 0===t)t=-1;else if(!Number.isInteger(t))throw new TypeError("maxSpan must be an integer");super(-1,e),this.maxSpan=t}getSpan(t,e){if(!u.Buffer.isBuffer(t))throw new TypeError("b must be a Buffer");return void 0===e&&(e=0),t.length-e}decode(t,e,r){void 0===e&&(e=0);let n=this.getSpan(t,e);if(0<=this.maxSpan&&this.maxSpane.length)throw new RangeError("encoding overruns Buffer");return n.copy(e,r),i}}class Lt extends ot{constructor(t,e){super(0,e),this.value=t}decode(t,e,r){return this.value}encode(t,e,r){return 0}}it.ExternalLayout=st,it.GreedyCount=ut,it.OffsetLayout=ct,it.UInt=lt,it.UIntBE=ft,it.Int=ht,it.IntBE=dt,it.Float=wt,it.FloatBE=_t,it.Double=Et,it.DoubleBE=It,it.Sequence=St,it.Structure=Mt,it.UnionDiscriminator=Ct,it.UnionLayoutDiscriminator=kt,it.Union=xt,it.VariantLayout=Bt,it.BitStructure=Tt,it.BitField=Rt,it.Boolean=Pt,it.Blob=Nt,it.CString=jt,it.UTF8=Dt,it.Constant=Lt,it.greedy=(t,e)=>new ut(t,e),it.offset=(t,e,r)=>new ct(t,e,r);var Ft=it.u8=t=>new lt(1,t);it.u16=t=>new lt(2,t),it.u24=t=>new lt(3,t);var Ut=it.u32=t=>new lt(4,t);it.u40=t=>new lt(5,t),it.u48=t=>new lt(6,t),it.nu64=t=>new yt(t),it.u16be=t=>new ft(2,t),it.u24be=t=>new ft(3,t),it.u32be=t=>new ft(4,t),it.u40be=t=>new ft(5,t),it.u48be=t=>new ft(6,t),it.nu64be=t=>new bt(t),it.s8=t=>new ht(1,t),it.s16=t=>new ht(2,t),it.s24=t=>new ht(3,t),it.s32=t=>new ht(4,t),it.s40=t=>new ht(5,t),it.s48=t=>new ht(6,t),it.ns64=t=>new vt(t),it.s16be=t=>new dt(2,t),it.s24be=t=>new dt(3,t),it.s32be=t=>new dt(4,t),it.s40be=t=>new dt(5,t),it.s48be=t=>new dt(6,t),it.ns64be=t=>new At(t),it.f32=t=>new wt(t),it.f32be=t=>new _t(t),it.f64=t=>new Et(t),it.f64be=t=>new It(t);var Qt=it.struct=(t,e,r)=>new Mt(t,e,r);it.bits=(t,e,r)=>new Tt(t,e,r),it.seq=(t,e,r)=>new St(t,e,r),it.union=(t,e,r)=>new xt(t,e,r),it.unionLayoutDiscriminator=(t,e)=>new kt(t,e);var Gt=it.blob=(t,e)=>new Nt(t,e);it.cstr=t=>new jt(t),it.utf8=(t,e)=>new Dt(t,e),it.const=(t,e)=>new Lt(t,e);const Ht=function(){return Gt(32,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"publicKey")},zt=function(){return Gt(8,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"uint64")};function qt(t,e,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o"00".concat(t.toString(16)).slice(-2))).join(""),16)}}function Zt(t){return"publicKey"in t}const $t={MintTokens:0,FreezeAccount:1,AccountOwner:2,CloseAccount:3},te=new s.PublicKey("So11111111111111111111111111111111111111112"),ee=Qt([Ut("mintAuthorityOption"),Ht("mintAuthority"),zt("supply"),Ft("decimals"),Ft("isInitialized"),Ut("freezeAuthorityOption"),Ht("freezeAuthority")]),re=Qt([Ht("mint"),Ht("owner"),zt("amount"),Ut("delegateOption"),Ht("delegate"),Ft("state"),Ut("isNativeOption"),zt("isNative"),zt("delegatedAmount"),Ut("closeAuthorityOption"),Ht("closeAuthority")]),ne=Qt([Ft("m"),Ft("n"),Ft("is_initialized"),Ht("signer1"),Ht("signer2"),Ht("signer3"),Ht("signer4"),Ht("signer5"),Ht("signer6"),Ht("signer7"),Ht("signer8"),Ht("signer9"),Ht("signer10"),Ht("signer11")]);class ie{constructor(t,e,r,n){i()(this,"connection",void 0),i()(this,"publicKey",void 0),i()(this,"programId",void 0),i()(this,"associatedProgramId",void 0),i()(this,"payer",void 0),Object.assign(this,{connection:t,publicKey:e,programId:r,payer:n,associatedProgramId:Vt})}static async getMinBalanceRentForExemptMint(t){return await t.getMinimumBalanceForRentExemption(ee.span)}static async getMinBalanceRentForExemptAccount(t){return await t.getMinimumBalanceForRentExemption(re.span)}static async getMinBalanceRentForExemptMultisig(t){return await t.getMinimumBalanceForRentExemption(ne.span)}static async createMint(t,e,r,n,i,o){const a=s.Keypair.generate(),u=new ie(t,a.publicKey,o,e),c=await ie.getMinBalanceRentForExemptMint(t),l=new s.Transaction;return l.add(s.SystemProgram.createAccount({fromPubkey:e.publicKey,newAccountPubkey:a.publicKey,lamports:c,space:ee.span,programId:o})),l.add(ie.createInitMintInstruction(o,a.publicKey,i,r,n)),await qt("createAccount and InitializeMint",t,l,e,a),u}async createAccount(t){const e=await ie.getMinBalanceRentForExemptAccount(this.connection),r=s.Keypair.generate(),n=new s.Transaction;n.add(s.SystemProgram.createAccount({fromPubkey:this.payer.publicKey,newAccountPubkey:r.publicKey,lamports:e,space:re.span,programId:this.programId}));const i=this.publicKey;return n.add(ie.createInitAccountInstruction(this.programId,i,r.publicKey,t)),await qt("createAccount and InitializeAccount",this.connection,n,this.payer,r),r.publicKey}async createAssociatedTokenAccount(t){const e=await ie.getAssociatedTokenAddress(this.associatedProgramId,this.programId,this.publicKey,t);return this.createAssociatedTokenAccountInternal(t,e)}async createAssociatedTokenAccountInternal(t,e){return await qt("CreateAssociatedTokenAccount",this.connection,(new s.Transaction).add(ie.createAssociatedTokenAccountInstruction(this.associatedProgramId,this.programId,this.publicKey,e,t,this.payer.publicKey)),this.payer),e}async getOrCreateAssociatedAccountInfo(t){const e=await ie.getAssociatedTokenAddress(this.associatedProgramId,this.programId,this.publicKey,t);try{return await this.getAccountInfo(e)}catch(r){if(r.message===Wt||r.message===Jt){try{await this.createAssociatedTokenAccountInternal(t,e)}catch(r){}return await this.getAccountInfo(e)}throw r}}static async createWrappedNativeAccount(t,e,r,n,i){const o=await ie.getMinBalanceRentForExemptAccount(t),a=s.Keypair.generate(),u=new s.Transaction;return u.add(s.SystemProgram.createAccount({fromPubkey:n.publicKey,newAccountPubkey:a.publicKey,lamports:o,space:re.span,programId:e})),u.add(s.SystemProgram.transfer({fromPubkey:n.publicKey,toPubkey:a.publicKey,lamports:i})),u.add(ie.createInitAccountInstruction(e,te,a.publicKey,r)),await qt("createAccount, transfer, and initializeAccount",t,u,n,a),a.publicKey}async createMultisig(t,e){const r=s.Keypair.generate(),n=await ie.getMinBalanceRentForExemptMultisig(this.connection),i=new s.Transaction;i.add(s.SystemProgram.createAccount({fromPubkey:this.payer.publicKey,newAccountPubkey:r.publicKey,lamports:n,space:ne.span,programId:this.programId}));let o=[{pubkey:r.publicKey,isSigner:!1,isWritable:!0},{pubkey:s.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];e.forEach((t=>o.push({pubkey:t,isSigner:!1,isWritable:!1})));const a=Qt([Ft("instruction"),Ft("m")]),c=u.Buffer.alloc(a.span);return a.encode({instruction:2,m:t},c),i.add({keys:o,programId:this.programId,data:c}),await qt("createAccount and InitializeMultisig",this.connection,i,this.payer,r),r.publicKey}async getMintInfo(){const t=await this.connection.getAccountInfo(this.publicKey);if(null===t)throw new Error("Failed to find mint account");if(!t.owner.equals(this.programId))throw new Error("Invalid mint owner: ".concat(JSON.stringify(t.owner)));if(t.data.length!=ee.span)throw new Error("Invalid mint size");const e=u.Buffer.from(t.data),r=ee.decode(e);return 0===r.mintAuthorityOption?r.mintAuthority=null:r.mintAuthority=new s.PublicKey(r.mintAuthority),r.supply=Xt.fromBuffer(r.supply),r.isInitialized=0!=r.isInitialized,0===r.freezeAuthorityOption?r.freezeAuthority=null:r.freezeAuthority=new s.PublicKey(r.freezeAuthority),r}async getAccountInfo(t,e){const r=await this.connection.getAccountInfo(t,e);if(null===r)throw new Error(Wt);if(!r.owner.equals(this.programId))throw new Error(Jt);if(r.data.length!=re.span)throw new Error("Invalid account size");const n=u.Buffer.from(r.data),i=re.decode(n);if(i.address=t,i.mint=new s.PublicKey(i.mint),i.owner=new s.PublicKey(i.owner),i.amount=Xt.fromBuffer(i.amount),0===i.delegateOption?(i.delegate=null,i.delegatedAmount=new Xt):(i.delegate=new s.PublicKey(i.delegate),i.delegatedAmount=Xt.fromBuffer(i.delegatedAmount)),i.isInitialized=0!==i.state,i.isFrozen=2===i.state,1===i.isNativeOption?(i.rentExemptReserve=Xt.fromBuffer(i.isNative),i.isNative=!0):(i.rentExemptReserve=null,i.isNative=!1),0===i.closeAuthorityOption?i.closeAuthority=null:i.closeAuthority=new s.PublicKey(i.closeAuthority),!i.mint.equals(this.publicKey))throw new Error("Invalid account mint: ".concat(JSON.stringify(i.mint)," !== ").concat(JSON.stringify(this.publicKey)));return i}async getMultisigInfo(t){const e=await this.connection.getAccountInfo(t);if(null===e)throw new Error("Failed to find multisig");if(!e.owner.equals(this.programId))throw new Error("Invalid multisig owner");if(e.data.length!=ne.span)throw new Error("Invalid multisig size");const r=u.Buffer.from(e.data),n=ne.decode(r);return n.signer1=new s.PublicKey(n.signer1),n.signer2=new s.PublicKey(n.signer2),n.signer3=new s.PublicKey(n.signer3),n.signer4=new s.PublicKey(n.signer4),n.signer5=new s.PublicKey(n.signer5),n.signer6=new s.PublicKey(n.signer6),n.signer7=new s.PublicKey(n.signer7),n.signer8=new s.PublicKey(n.signer8),n.signer9=new s.PublicKey(n.signer9),n.signer10=new s.PublicKey(n.signer10),n.signer11=new s.PublicKey(n.signer11),n}async transfer(t,e,r,n,i){let o,a;return Zt(r)?(o=r.publicKey,a=[r]):(o=r,a=n),await qt("Transfer",this.connection,(new s.Transaction).add(ie.createTransferInstruction(this.programId,t,e,o,n,i)),this.payer,...a)}async approve(t,e,r,n,i){let o,a;Zt(r)?(o=r.publicKey,a=[r]):(o=r,a=n),await qt("Approve",this.connection,(new s.Transaction).add(ie.createApproveInstruction(this.programId,t,e,o,n,i)),this.payer,...a)}async revoke(t,e,r){let n,i;Zt(e)?(n=e.publicKey,i=[e]):(n=e,i=r),await qt("Revoke",this.connection,(new s.Transaction).add(ie.createRevokeInstruction(this.programId,t,n,r)),this.payer,...i)}async setAuthority(t,e,r,n,i){let o,a;Zt(n)?(o=n.publicKey,a=[n]):(o=n,a=i),await qt("SetAuthority",this.connection,(new s.Transaction).add(ie.createSetAuthorityInstruction(this.programId,t,e,r,o,i)),this.payer,...a)}async mintTo(t,e,r,n){let i,o;Zt(e)?(i=e.publicKey,o=[e]):(i=e,o=r),await qt("MintTo",this.connection,(new s.Transaction).add(ie.createMintToInstruction(this.programId,this.publicKey,t,i,r,n)),this.payer,...o)}async burn(t,e,r,n){let i,o;Zt(e)?(i=e.publicKey,o=[e]):(i=e,o=r),await qt("Burn",this.connection,(new s.Transaction).add(ie.createBurnInstruction(this.programId,this.publicKey,t,i,r,n)),this.payer,...o)}async closeAccount(t,e,r,n){let i,o;Zt(r)?(i=r.publicKey,o=[r]):(i=r,o=n),await qt("CloseAccount",this.connection,(new s.Transaction).add(ie.createCloseAccountInstruction(this.programId,t,e,i,n)),this.payer,...o)}async freezeAccount(t,e,r){let n,i;Zt(e)?(n=e.publicKey,i=[e]):(n=e,i=r),await qt("FreezeAccount",this.connection,(new s.Transaction).add(ie.createFreezeAccountInstruction(this.programId,t,this.publicKey,n,r)),this.payer,...i)}async thawAccount(t,e,r){let n,i;Zt(e)?(n=e.publicKey,i=[e]):(n=e,i=r),await qt("ThawAccount",this.connection,(new s.Transaction).add(ie.createThawAccountInstruction(this.programId,t,this.publicKey,n,r)),this.payer,...i)}async transferChecked(t,e,r,n,i,o){let a,u;return Zt(r)?(a=r.publicKey,u=[r]):(a=r,u=n),await qt("TransferChecked",this.connection,(new s.Transaction).add(ie.createTransferCheckedInstruction(this.programId,t,this.publicKey,e,a,n,i,o)),this.payer,...u)}async approveChecked(t,e,r,n,i,o){let a,u;Zt(r)?(a=r.publicKey,u=[r]):(a=r,u=n),await qt("ApproveChecked",this.connection,(new s.Transaction).add(ie.createApproveCheckedInstruction(this.programId,t,this.publicKey,e,a,n,i,o)),this.payer,...u)}async mintToChecked(t,e,r,n,i){let o,a;Zt(e)?(o=e.publicKey,a=[e]):(o=e,a=r),await qt("MintToChecked",this.connection,(new s.Transaction).add(ie.createMintToCheckedInstruction(this.programId,this.publicKey,t,o,r,n,i)),this.payer,...a)}async burnChecked(t,e,r,n,i){let o,a;Zt(e)?(o=e.publicKey,a=[e]):(o=e,a=r),await qt("BurnChecked",this.connection,(new s.Transaction).add(ie.createBurnCheckedInstruction(this.programId,this.publicKey,t,o,r,n,i)),this.payer,...a)}async syncNative(t){await qt("SyncNative",this.connection,(new s.Transaction).add(ie.createSyncNativeInstruction(this.programId,t)),this.payer)}static createInitMintInstruction(t,e,r,n,i){let o=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:s.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];const a=Qt([Ft("instruction"),Ft("decimals"),Ht("mintAuthority"),Ft("option"),Ht("freezeAuthority")]);let c=u.Buffer.alloc(1024);{const t=a.encode({instruction:0,decimals:r,mintAuthority:Yt(n),option:null===i?0:1,freezeAuthority:Yt(i||new s.PublicKey(0))},c);c=c.slice(0,t)}return new s.TransactionInstruction({keys:o,programId:t,data:c})}static createInitAccountInstruction(t,e,r,n){const i=[{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:e,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:s.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}],o=Qt([Ft("instruction")]),a=u.Buffer.alloc(o.span);return o.encode({instruction:1},a),new s.TransactionInstruction({keys:i,programId:t,data:a})}static createTransferInstruction(t,e,r,n,i,o){const a=Qt([Ft("instruction"),zt("amount")]),c=u.Buffer.alloc(a.span);a.encode({instruction:3,amount:new Xt(o).toBuffer()},c);let l=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0}];return 0===i.length?l.push({pubkey:n,isSigner:!0,isWritable:!1}):(l.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>l.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:l,programId:t,data:c})}static createApproveInstruction(t,e,r,n,i,o){const a=Qt([Ft("instruction"),zt("amount")]),c=u.Buffer.alloc(a.span);a.encode({instruction:4,amount:new Xt(o).toBuffer()},c);let l=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1}];return 0===i.length?l.push({pubkey:n,isSigner:!0,isWritable:!1}):(l.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>l.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:l,programId:t,data:c})}static createRevokeInstruction(t,e,r,n){const i=Qt([Ft("instruction")]),o=u.Buffer.alloc(i.span);i.encode({instruction:5},o);let a=[{pubkey:e,isSigner:!1,isWritable:!0}];return 0===n.length?a.push({pubkey:r,isSigner:!0,isWritable:!1}):(a.push({pubkey:r,isSigner:!1,isWritable:!1}),n.forEach((t=>a.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:a,programId:t,data:o})}static createSetAuthorityInstruction(t,e,r,n,i,o){const a=Qt([Ft("instruction"),Ft("authorityType"),Ft("option"),Ht("newAuthority")]);let c=u.Buffer.alloc(1024);{const t=a.encode({instruction:6,authorityType:$t[n],option:null===r?0:1,newAuthority:Yt(r||new s.PublicKey(0))},c);c=c.slice(0,t)}let l=[{pubkey:e,isSigner:!1,isWritable:!0}];return 0===o.length?l.push({pubkey:i,isSigner:!0,isWritable:!1}):(l.push({pubkey:i,isSigner:!1,isWritable:!1}),o.forEach((t=>l.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:l,programId:t,data:c})}static createMintToInstruction(t,e,r,n,i,o){const a=Qt([Ft("instruction"),zt("amount")]),c=u.Buffer.alloc(a.span);a.encode({instruction:7,amount:new Xt(o).toBuffer()},c);let l=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0}];return 0===i.length?l.push({pubkey:n,isSigner:!0,isWritable:!1}):(l.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>l.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:l,programId:t,data:c})}static createBurnInstruction(t,e,r,n,i,o){const a=Qt([Ft("instruction"),zt("amount")]),c=u.Buffer.alloc(a.span);a.encode({instruction:8,amount:new Xt(o).toBuffer()},c);let l=[{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:e,isSigner:!1,isWritable:!0}];return 0===i.length?l.push({pubkey:n,isSigner:!0,isWritable:!1}):(l.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>l.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:l,programId:t,data:c})}static createCloseAccountInstruction(t,e,r,n,i){const o=Qt([Ft("instruction")]),a=u.Buffer.alloc(o.span);o.encode({instruction:9},a);let c=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0}];return 0===i.length?c.push({pubkey:n,isSigner:!0,isWritable:!1}):(c.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>c.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:c,programId:t,data:a})}static createFreezeAccountInstruction(t,e,r,n,i){const o=Qt([Ft("instruction")]),a=u.Buffer.alloc(o.span);o.encode({instruction:10},a);let c=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1}];return 0===i.length?c.push({pubkey:n,isSigner:!0,isWritable:!1}):(c.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>c.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:c,programId:t,data:a})}static createThawAccountInstruction(t,e,r,n,i){const o=Qt([Ft("instruction")]),a=u.Buffer.alloc(o.span);o.encode({instruction:11},a);let c=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1}];return 0===i.length?c.push({pubkey:n,isSigner:!0,isWritable:!1}):(c.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>c.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:c,programId:t,data:a})}static createTransferCheckedInstruction(t,e,r,n,i,o,a,c){const l=Qt([Ft("instruction"),zt("amount"),Ft("decimals")]),f=u.Buffer.alloc(l.span);l.encode({instruction:12,amount:new Xt(a).toBuffer(),decimals:c},f);let h=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!0}];return 0===o.length?h.push({pubkey:i,isSigner:!0,isWritable:!1}):(h.push({pubkey:i,isSigner:!1,isWritable:!1}),o.forEach((t=>h.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:h,programId:t,data:f})}static createApproveCheckedInstruction(t,e,r,n,i,o,a,c){const l=Qt([Ft("instruction"),zt("amount"),Ft("decimals")]),f=u.Buffer.alloc(l.span);l.encode({instruction:13,amount:new Xt(a).toBuffer(),decimals:c},f);let h=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!1}];return 0===o.length?h.push({pubkey:i,isSigner:!0,isWritable:!1}):(h.push({pubkey:i,isSigner:!1,isWritable:!1}),o.forEach((t=>h.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:h,programId:t,data:f})}static createMintToCheckedInstruction(t,e,r,n,i,o,a){const c=Qt([Ft("instruction"),zt("amount"),Ft("decimals")]),l=u.Buffer.alloc(c.span);c.encode({instruction:14,amount:new Xt(o).toBuffer(),decimals:a},l);let f=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0}];return 0===i.length?f.push({pubkey:n,isSigner:!0,isWritable:!1}):(f.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>f.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:f,programId:t,data:l})}static createBurnCheckedInstruction(t,e,r,n,i,o,a){const c=Qt([Ft("instruction"),zt("amount"),Ft("decimals")]),l=u.Buffer.alloc(c.span);c.encode({instruction:15,amount:new Xt(o).toBuffer(),decimals:a},l);let f=[{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:e,isSigner:!1,isWritable:!0}];return 0===i.length?f.push({pubkey:n,isSigner:!0,isWritable:!1}):(f.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>f.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:f,programId:t,data:l})}static createSyncNativeInstruction(t,e){const r=Qt([Ft("instruction")]),n=u.Buffer.alloc(r.span);r.encode({instruction:17},n);let i=[{pubkey:e,isSigner:!1,isWritable:!0}];return new s.TransactionInstruction({keys:i,programId:t,data:n})}static async getAssociatedTokenAddress(t,e,r,n){if(!(arguments.length>4&&void 0!==arguments[4]&&arguments[4])&&!s.PublicKey.isOnCurve(n.toBuffer()))throw new Error("Owner cannot sign: ".concat(n.toString()));return(await s.PublicKey.findProgramAddress([n.toBuffer(),e.toBuffer(),r.toBuffer()],t))[0]}static createAssociatedTokenAccountInstruction(t,e,r,n,i,o){const a=u.Buffer.alloc(0);let c=[{pubkey:o,isSigner:!0,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:s.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:e,isSigner:!1,isWritable:!1},{pubkey:s.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];return new s.TransactionInstruction({keys:c,programId:t,data:a})}}}.call(this,r(44))},function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return o}));var n=r(313),i=new(r(307).a)(n.a),o=i},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n=function(){return Array.isArray||function(t){return t&&"number"===typeof t.length}}()},function(t,e,r){!function(t){"use strict";var e=function(t){var e,r=new Float64Array(16);if(t)for(e=0;e>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function g(t,e,r,n,i){var o,a=0;for(o=0;o>>8)-1}function m(t,e,r,n){return g(t,e,r,n,16)}function y(t,e,r,n){return g(t,e,r,n,32)}function b(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,d=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,p=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,A=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=o,_=a,E=s,I=u,S=c,M=l,C=f,k=h,x=d,B=p,O=g,T=m,R=y,P=b,N=v,j=A,D=0;D<20;D+=2)w^=(i=(R^=(i=(x^=(i=(S^=(i=w+R|0)<<7|i>>>25)+w|0)<<9|i>>>23)+S|0)<<13|i>>>19)+x|0)<<18|i>>>14,M^=(i=(_^=(i=(P^=(i=(B^=(i=M+_|0)<<7|i>>>25)+M|0)<<9|i>>>23)+B|0)<<13|i>>>19)+P|0)<<18|i>>>14,O^=(i=(C^=(i=(E^=(i=(N^=(i=O+C|0)<<7|i>>>25)+O|0)<<9|i>>>23)+N|0)<<13|i>>>19)+E|0)<<18|i>>>14,j^=(i=(T^=(i=(k^=(i=(I^=(i=j+T|0)<<7|i>>>25)+j|0)<<9|i>>>23)+I|0)<<13|i>>>19)+k|0)<<18|i>>>14,w^=(i=(I^=(i=(E^=(i=(_^=(i=w+I|0)<<7|i>>>25)+w|0)<<9|i>>>23)+_|0)<<13|i>>>19)+E|0)<<18|i>>>14,M^=(i=(S^=(i=(k^=(i=(C^=(i=M+S|0)<<7|i>>>25)+M|0)<<9|i>>>23)+C|0)<<13|i>>>19)+k|0)<<18|i>>>14,O^=(i=(B^=(i=(x^=(i=(T^=(i=O+B|0)<<7|i>>>25)+O|0)<<9|i>>>23)+T|0)<<13|i>>>19)+x|0)<<18|i>>>14,j^=(i=(N^=(i=(P^=(i=(R^=(i=j+N|0)<<7|i>>>25)+j|0)<<9|i>>>23)+R|0)<<13|i>>>19)+P|0)<<18|i>>>14;w=w+o|0,_=_+a|0,E=E+s|0,I=I+u|0,S=S+c|0,M=M+l|0,C=C+f|0,k=k+h|0,x=x+d|0,B=B+p|0,O=O+g|0,T=T+m|0,R=R+y|0,P=P+b|0,N=N+v|0,j=j+A|0,t[0]=w>>>0&255,t[1]=w>>>8&255,t[2]=w>>>16&255,t[3]=w>>>24&255,t[4]=_>>>0&255,t[5]=_>>>8&255,t[6]=_>>>16&255,t[7]=_>>>24&255,t[8]=E>>>0&255,t[9]=E>>>8&255,t[10]=E>>>16&255,t[11]=E>>>24&255,t[12]=I>>>0&255,t[13]=I>>>8&255,t[14]=I>>>16&255,t[15]=I>>>24&255,t[16]=S>>>0&255,t[17]=S>>>8&255,t[18]=S>>>16&255,t[19]=S>>>24&255,t[20]=M>>>0&255,t[21]=M>>>8&255,t[22]=M>>>16&255,t[23]=M>>>24&255,t[24]=C>>>0&255,t[25]=C>>>8&255,t[26]=C>>>16&255,t[27]=C>>>24&255,t[28]=k>>>0&255,t[29]=k>>>8&255,t[30]=k>>>16&255,t[31]=k>>>24&255,t[32]=x>>>0&255,t[33]=x>>>8&255,t[34]=x>>>16&255,t[35]=x>>>24&255,t[36]=B>>>0&255,t[37]=B>>>8&255,t[38]=B>>>16&255,t[39]=B>>>24&255,t[40]=O>>>0&255,t[41]=O>>>8&255,t[42]=O>>>16&255,t[43]=O>>>24&255,t[44]=T>>>0&255,t[45]=T>>>8&255,t[46]=T>>>16&255,t[47]=T>>>24&255,t[48]=R>>>0&255,t[49]=R>>>8&255,t[50]=R>>>16&255,t[51]=R>>>24&255,t[52]=P>>>0&255,t[53]=P>>>8&255,t[54]=P>>>16&255,t[55]=P>>>24&255,t[56]=N>>>0&255,t[57]=N>>>8&255,t[58]=N>>>16&255,t[59]=N>>>24&255,t[60]=j>>>0&255,t[61]=j>>>8&255,t[62]=j>>>16&255,t[63]=j>>>24&255}(t,e,r,n)}function v(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,d=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,p=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,A=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)o^=(i=(y^=(i=(d^=(i=(c^=(i=o+y|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,l^=(i=(a^=(i=(b^=(i=(p^=(i=l+a|0)<<7|i>>>25)+l|0)<<9|i>>>23)+p|0)<<13|i>>>19)+b|0)<<18|i>>>14,g^=(i=(f^=(i=(s^=(i=(v^=(i=g+f|0)<<7|i>>>25)+g|0)<<9|i>>>23)+v|0)<<13|i>>>19)+s|0)<<18|i>>>14,A^=(i=(m^=(i=(h^=(i=(u^=(i=A+m|0)<<7|i>>>25)+A|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,o^=(i=(u^=(i=(s^=(i=(a^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+s|0)<<18|i>>>14,l^=(i=(c^=(i=(h^=(i=(f^=(i=l+c|0)<<7|i>>>25)+l|0)<<9|i>>>23)+f|0)<<13|i>>>19)+h|0)<<18|i>>>14,g^=(i=(p^=(i=(d^=(i=(m^=(i=g+p|0)<<7|i>>>25)+g|0)<<9|i>>>23)+m|0)<<13|i>>>19)+d|0)<<18|i>>>14,A^=(i=(v^=(i=(b^=(i=(y^=(i=A+v|0)<<7|i>>>25)+A|0)<<9|i>>>23)+y|0)<<13|i>>>19)+b|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=l>>>0&255,t[5]=l>>>8&255,t[6]=l>>>16&255,t[7]=l>>>24&255,t[8]=g>>>0&255,t[9]=g>>>8&255,t[10]=g>>>16&255,t[11]=g>>>24&255,t[12]=A>>>0&255,t[13]=A>>>8&255,t[14]=A>>>16&255,t[15]=A>>>24&255,t[16]=f>>>0&255,t[17]=f>>>8&255,t[18]=f>>>16&255,t[19]=f>>>24&255,t[20]=h>>>0&255,t[21]=h>>>8&255,t[22]=h>>>16&255,t[23]=h>>>24&255,t[24]=d>>>0&255,t[25]=d>>>8&255,t[26]=d>>>16&255,t[27]=d>>>24&255,t[28]=p>>>0&255,t[29]=p>>>8&255,t[30]=p>>>16&255,t[31]=p>>>24&255}(t,e,r,n)}var A=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(t,e,r,n,i,o,a){var s,u,c=new Uint8Array(16),l=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=o[u];for(;i>=64;){for(b(l,c,a,A),u=0;u<64;u++)t[e+u]=r[n+u]^l[u];for(s=1,u=8;u<16;u++)s=s+(255&c[u])|0,c[u]=255&s,s>>>=8;i-=64,e+=64,n+=64}if(i>0)for(b(l,c,a,A),u=0;u=64;){for(b(u,s,i,A),a=0;a<64;a++)t[e+a]=u[a];for(o=1,a=8;a<16;a++)o=o+(255&s[a])|0,s[a]=255&o,o>>>=8;r-=64,e+=64}if(r>0)for(b(u,s,i,A),a=0;a>>13|r<<3),n=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,a=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|a<<2),s=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(a>>>11|s<<5),u=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(s>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function M(t,e,r,n,i,o){var a=new S(o);return a.update(r,n,i),a.finish(t,e),0}function C(t,e,r,n,i,o){var a=new Uint8Array(16);return M(a,0,r,n,i,o),m(t,e,a,0)}function k(t,e,r,n,i){var o;if(r<32)return-1;for(I(t,0,e,0,r,n,i),M(t,16,t,32,r-32,t),o=0;o<16;o++)t[o]=0;return 0}function x(t,e,r,n,i){var o,a=new Uint8Array(32);if(r<32)return-1;if(E(a,0,32,n,i),0!==C(e,16,e,32,r-32,a))return-1;for(I(t,0,e,0,r,n,i),o=0;o<32;o++)t[o]=0;return 0}function B(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function O(t){var e,r,n=1;for(e=0;e<16;e++)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function T(t,e,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function R(t,r){var n,i,o,a=e(),s=e();for(n=0;n<16;n++)s[n]=r[n];for(O(s),O(s),O(s),i=0;i<2;i++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),o=a[15]>>16&1,a[14]&=65535,T(s,a,1-o)}for(n=0;n<16;n++)t[2*n]=255&s[n],t[2*n+1]=s[n]>>8}function P(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return R(r,t),R(n,e),y(r,0,n,0)}function N(t){var e=new Uint8Array(32);return R(e,t),1&e[0]}function j(t,e){var r;for(r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function D(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]+r[n]}function L(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]-r[n]}function F(t,e,r){var n,i,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,g=0,m=0,y=0,b=0,v=0,A=0,w=0,_=0,E=0,I=0,S=0,M=0,C=0,k=0,x=0,B=0,O=0,T=0,R=0,P=0,N=0,j=r[0],D=r[1],L=r[2],F=r[3],U=r[4],Q=r[5],G=r[6],H=r[7],z=r[8],q=r[9],K=r[10],V=r[11],W=r[12],J=r[13],Y=r[14],X=r[15];o+=(n=e[0])*j,a+=n*D,s+=n*L,u+=n*F,c+=n*U,l+=n*Q,f+=n*G,h+=n*H,d+=n*z,p+=n*q,g+=n*K,m+=n*V,y+=n*W,b+=n*J,v+=n*Y,A+=n*X,a+=(n=e[1])*j,s+=n*D,u+=n*L,c+=n*F,l+=n*U,f+=n*Q,h+=n*G,d+=n*H,p+=n*z,g+=n*q,m+=n*K,y+=n*V,b+=n*W,v+=n*J,A+=n*Y,w+=n*X,s+=(n=e[2])*j,u+=n*D,c+=n*L,l+=n*F,f+=n*U,h+=n*Q,d+=n*G,p+=n*H,g+=n*z,m+=n*q,y+=n*K,b+=n*V,v+=n*W,A+=n*J,w+=n*Y,_+=n*X,u+=(n=e[3])*j,c+=n*D,l+=n*L,f+=n*F,h+=n*U,d+=n*Q,p+=n*G,g+=n*H,m+=n*z,y+=n*q,b+=n*K,v+=n*V,A+=n*W,w+=n*J,_+=n*Y,E+=n*X,c+=(n=e[4])*j,l+=n*D,f+=n*L,h+=n*F,d+=n*U,p+=n*Q,g+=n*G,m+=n*H,y+=n*z,b+=n*q,v+=n*K,A+=n*V,w+=n*W,_+=n*J,E+=n*Y,I+=n*X,l+=(n=e[5])*j,f+=n*D,h+=n*L,d+=n*F,p+=n*U,g+=n*Q,m+=n*G,y+=n*H,b+=n*z,v+=n*q,A+=n*K,w+=n*V,_+=n*W,E+=n*J,I+=n*Y,S+=n*X,f+=(n=e[6])*j,h+=n*D,d+=n*L,p+=n*F,g+=n*U,m+=n*Q,y+=n*G,b+=n*H,v+=n*z,A+=n*q,w+=n*K,_+=n*V,E+=n*W,I+=n*J,S+=n*Y,M+=n*X,h+=(n=e[7])*j,d+=n*D,p+=n*L,g+=n*F,m+=n*U,y+=n*Q,b+=n*G,v+=n*H,A+=n*z,w+=n*q,_+=n*K,E+=n*V,I+=n*W,S+=n*J,M+=n*Y,C+=n*X,d+=(n=e[8])*j,p+=n*D,g+=n*L,m+=n*F,y+=n*U,b+=n*Q,v+=n*G,A+=n*H,w+=n*z,_+=n*q,E+=n*K,I+=n*V,S+=n*W,M+=n*J,C+=n*Y,k+=n*X,p+=(n=e[9])*j,g+=n*D,m+=n*L,y+=n*F,b+=n*U,v+=n*Q,A+=n*G,w+=n*H,_+=n*z,E+=n*q,I+=n*K,S+=n*V,M+=n*W,C+=n*J,k+=n*Y,x+=n*X,g+=(n=e[10])*j,m+=n*D,y+=n*L,b+=n*F,v+=n*U,A+=n*Q,w+=n*G,_+=n*H,E+=n*z,I+=n*q,S+=n*K,M+=n*V,C+=n*W,k+=n*J,x+=n*Y,B+=n*X,m+=(n=e[11])*j,y+=n*D,b+=n*L,v+=n*F,A+=n*U,w+=n*Q,_+=n*G,E+=n*H,I+=n*z,S+=n*q,M+=n*K,C+=n*V,k+=n*W,x+=n*J,B+=n*Y,O+=n*X,y+=(n=e[12])*j,b+=n*D,v+=n*L,A+=n*F,w+=n*U,_+=n*Q,E+=n*G,I+=n*H,S+=n*z,M+=n*q,C+=n*K,k+=n*V,x+=n*W,B+=n*J,O+=n*Y,T+=n*X,b+=(n=e[13])*j,v+=n*D,A+=n*L,w+=n*F,_+=n*U,E+=n*Q,I+=n*G,S+=n*H,M+=n*z,C+=n*q,k+=n*K,x+=n*V,B+=n*W,O+=n*J,T+=n*Y,R+=n*X,v+=(n=e[14])*j,A+=n*D,w+=n*L,_+=n*F,E+=n*U,I+=n*Q,S+=n*G,M+=n*H,C+=n*z,k+=n*q,x+=n*K,B+=n*V,O+=n*W,T+=n*J,R+=n*Y,P+=n*X,A+=(n=e[15])*j,a+=38*(_+=n*L),s+=38*(E+=n*F),u+=38*(I+=n*U),c+=38*(S+=n*Q),l+=38*(M+=n*G),f+=38*(C+=n*H),h+=38*(k+=n*z),d+=38*(x+=n*q),p+=38*(B+=n*K),g+=38*(O+=n*V),m+=38*(T+=n*W),y+=38*(R+=n*J),b+=38*(P+=n*Y),v+=38*(N+=n*X),o=(n=(o+=38*(w+=n*D))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),A=(n=A+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),A=(n=A+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=a,t[2]=s,t[3]=u,t[4]=c,t[5]=l,t[6]=f,t[7]=h,t[8]=d,t[9]=p,t[10]=g,t[11]=m,t[12]=y,t[13]=b,t[14]=v,t[15]=A}function U(t,e){F(t,e,e)}function Q(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)U(i,i),2!==n&&4!==n&&F(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}function G(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)U(i,i),1!==n&&F(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}function H(t,r,n){var i,o,a=new Uint8Array(32),s=new Float64Array(80),c=e(),l=e(),f=e(),h=e(),d=e(),p=e();for(o=0;o<31;o++)a[o]=r[o];for(a[31]=127&r[31]|64,a[0]&=248,j(s,n),o=0;o<16;o++)l[o]=s[o],h[o]=c[o]=f[o]=0;for(c[0]=h[0]=1,o=254;o>=0;--o)T(c,l,i=a[o>>>3]>>>(7&o)&1),T(f,h,i),D(d,c,f),L(c,c,f),D(f,l,h),L(l,l,h),U(h,d),U(p,c),F(c,f,c),F(f,l,d),D(d,c,f),L(c,c,f),U(l,c),L(f,h,p),F(c,f,u),D(c,c,h),F(f,f,c),F(c,h,p),F(h,l,s),U(l,d),T(c,l,i),T(f,h,i);for(o=0;o<16;o++)s[o+16]=c[o],s[o+32]=f[o],s[o+48]=l[o],s[o+64]=h[o];var g=s.subarray(32),m=s.subarray(16);return Q(g,g),F(m,m,g),R(t,m),0}function z(t,e){return H(t,e,o)}function q(t,e){return n(e,32),z(t,e)}function K(t,e,r){var n=new Uint8Array(32);return H(n,r,e),v(t,i,n,A)}S.prototype.blocks=function(t,e,r){for(var n,i,o,a,s,u,c,l,f,h,d,p,g,m,y,b,v,A,w,_=this.fin?0:2048,E=this.h[0],I=this.h[1],S=this.h[2],M=this.h[3],C=this.h[4],k=this.h[5],x=this.h[6],B=this.h[7],O=this.h[8],T=this.h[9],R=this.r[0],P=this.r[1],N=this.r[2],j=this.r[3],D=this.r[4],L=this.r[5],F=this.r[6],U=this.r[7],Q=this.r[8],G=this.r[9];r>=16;)h=f=0,h+=(E+=8191&(n=255&t[e+0]|(255&t[e+1])<<8))*R,h+=(I+=8191&(n>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3))*(5*G),h+=(S+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6))*(5*Q),h+=(M+=8191&(o>>>7|(a=255&t[e+6]|(255&t[e+7])<<8)<<9))*(5*U),f=(h+=(C+=8191&(a>>>4|(s=255&t[e+8]|(255&t[e+9])<<8)<<12))*(5*F))>>>13,h&=8191,h+=(k+=s>>>1&8191)*(5*L),h+=(x+=8191&(s>>>14|(u=255&t[e+10]|(255&t[e+11])<<8)<<2))*(5*D),h+=(B+=8191&(u>>>11|(c=255&t[e+12]|(255&t[e+13])<<8)<<5))*(5*j),h+=(O+=8191&(c>>>8|(l=255&t[e+14]|(255&t[e+15])<<8)<<8))*(5*N),d=f+=(h+=(T+=l>>>5|_)*(5*P))>>>13,d+=E*P,d+=I*R,d+=S*(5*G),d+=M*(5*Q),f=(d+=C*(5*U))>>>13,d&=8191,d+=k*(5*F),d+=x*(5*L),d+=B*(5*D),d+=O*(5*j),f+=(d+=T*(5*N))>>>13,d&=8191,p=f,p+=E*N,p+=I*P,p+=S*R,p+=M*(5*G),f=(p+=C*(5*Q))>>>13,p&=8191,p+=k*(5*U),p+=x*(5*F),p+=B*(5*L),p+=O*(5*D),g=f+=(p+=T*(5*j))>>>13,g+=E*j,g+=I*N,g+=S*P,g+=M*R,f=(g+=C*(5*G))>>>13,g&=8191,g+=k*(5*Q),g+=x*(5*U),g+=B*(5*F),g+=O*(5*L),m=f+=(g+=T*(5*D))>>>13,m+=E*D,m+=I*j,m+=S*N,m+=M*P,f=(m+=C*R)>>>13,m&=8191,m+=k*(5*G),m+=x*(5*Q),m+=B*(5*U),m+=O*(5*F),y=f+=(m+=T*(5*L))>>>13,y+=E*L,y+=I*D,y+=S*j,y+=M*N,f=(y+=C*P)>>>13,y&=8191,y+=k*R,y+=x*(5*G),y+=B*(5*Q),y+=O*(5*U),b=f+=(y+=T*(5*F))>>>13,b+=E*F,b+=I*L,b+=S*D,b+=M*j,f=(b+=C*N)>>>13,b&=8191,b+=k*P,b+=x*R,b+=B*(5*G),b+=O*(5*Q),v=f+=(b+=T*(5*U))>>>13,v+=E*U,v+=I*F,v+=S*L,v+=M*D,f=(v+=C*j)>>>13,v&=8191,v+=k*N,v+=x*P,v+=B*R,v+=O*(5*G),A=f+=(v+=T*(5*Q))>>>13,A+=E*Q,A+=I*U,A+=S*F,A+=M*L,f=(A+=C*D)>>>13,A&=8191,A+=k*j,A+=x*N,A+=B*P,A+=O*R,w=f+=(A+=T*(5*G))>>>13,w+=E*G,w+=I*Q,w+=S*U,w+=M*F,f=(w+=C*L)>>>13,w&=8191,w+=k*D,w+=x*j,w+=B*N,w+=O*P,E=h=8191&(f=(f=((f+=(w+=T*R)>>>13)<<2)+f|0)+(h&=8191)|0),I=d+=f>>>=13,S=p&=8191,M=g&=8191,C=m&=8191,k=y&=8191,x=b&=8191,B=v&=8191,O=A&=8191,T=w&=8191,e+=16,r-=16;this.h[0]=E,this.h[1]=I,this.h[2]=S,this.h[3]=M,this.h[4]=C,this.h[5]=k,this.h[6]=x,this.h[7]=B,this.h[8]=O,this.h[9]=T},S.prototype.finish=function(t,e){var r,n,i,o,a=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this.h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|a[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},S.prototype.update=function(t,e,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n=16&&(i=r-r%16,this.blocks(t,e,i),e+=i,r-=i),r){for(n=0;n=128;){for(_=0;_<16;_++)E=8*_+W,B[_]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],O[_]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(_=0;_<80;_++)if(i=T,o=R,a=P,s=N,u=j,c=D,l=L,F,h=U,d=Q,p=G,g=H,m=z,y=q,b=K,V,M=65535&(S=V),C=S>>>16,k=65535&(I=F),x=I>>>16,M+=65535&(S=(z>>>14|j<<18)^(z>>>18|j<<14)^(j>>>9|z<<23)),C+=S>>>16,k+=65535&(I=(j>>>14|z<<18)^(j>>>18|z<<14)^(z>>>9|j<<23)),x+=I>>>16,M+=65535&(S=z&q^~z&K),C+=S>>>16,k+=65535&(I=j&D^~j&L),x+=I>>>16,I=J[2*_],M+=65535&(S=J[2*_+1]),C+=S>>>16,k+=65535&I,x+=I>>>16,I=B[_%16],C+=(S=O[_%16])>>>16,k+=65535&I,x+=I>>>16,k+=(C+=(M+=65535&S)>>>16)>>>16,M=65535&(S=w=65535&M|C<<16),C=S>>>16,k=65535&(I=A=65535&k|(x+=k>>>16)<<16),x=I>>>16,M+=65535&(S=(U>>>28|T<<4)^(T>>>2|U<<30)^(T>>>7|U<<25)),C+=S>>>16,k+=65535&(I=(T>>>28|U<<4)^(U>>>2|T<<30)^(U>>>7|T<<25)),x+=I>>>16,C+=(S=U&Q^U&G^Q&G)>>>16,k+=65535&(I=T&R^T&P^R&P),x+=I>>>16,f=65535&(k+=(C+=(M+=65535&S)>>>16)>>>16)|(x+=k>>>16)<<16,v=65535&M|C<<16,M=65535&(S=g),C=S>>>16,k=65535&(I=s),x=I>>>16,C+=(S=w)>>>16,k+=65535&(I=A),x+=I>>>16,R=i,P=o,N=a,j=s=65535&(k+=(C+=(M+=65535&S)>>>16)>>>16)|(x+=k>>>16)<<16,D=u,L=c,F=l,T=f,Q=h,G=d,H=p,z=g=65535&M|C<<16,q=m,K=y,V=b,U=v,_%16===15)for(E=0;E<16;E++)I=B[E],M=65535&(S=O[E]),C=S>>>16,k=65535&I,x=I>>>16,I=B[(E+9)%16],M+=65535&(S=O[(E+9)%16]),C+=S>>>16,k+=65535&I,x+=I>>>16,A=B[(E+1)%16],M+=65535&(S=((w=O[(E+1)%16])>>>1|A<<31)^(w>>>8|A<<24)^(w>>>7|A<<25)),C+=S>>>16,k+=65535&(I=(A>>>1|w<<31)^(A>>>8|w<<24)^A>>>7),x+=I>>>16,A=B[(E+14)%16],C+=(S=((w=O[(E+14)%16])>>>19|A<<13)^(A>>>29|w<<3)^(w>>>6|A<<26))>>>16,k+=65535&(I=(A>>>19|w<<13)^(w>>>29|A<<3)^A>>>6),x+=I>>>16,x+=(k+=(C+=(M+=65535&S)>>>16)>>>16)>>>16,B[E]=65535&k|x<<16,O[E]=65535&M|C<<16;M=65535&(S=U),C=S>>>16,k=65535&(I=T),x=I>>>16,I=t[0],C+=(S=e[0])>>>16,k+=65535&I,x+=I>>>16,x+=(k+=(C+=(M+=65535&S)>>>16)>>>16)>>>16,t[0]=T=65535&k|x<<16,e[0]=U=65535&M|C<<16,M=65535&(S=Q),C=S>>>16,k=65535&(I=R),x=I>>>16,I=t[1],C+=(S=e[1])>>>16,k+=65535&I,x+=I>>>16,x+=(k+=(C+=(M+=65535&S)>>>16)>>>16)>>>16,t[1]=R=65535&k|x<<16,e[1]=Q=65535&M|C<<16,M=65535&(S=G),C=S>>>16,k=65535&(I=P),x=I>>>16,I=t[2],C+=(S=e[2])>>>16,k+=65535&I,x+=I>>>16,x+=(k+=(C+=(M+=65535&S)>>>16)>>>16)>>>16,t[2]=P=65535&k|x<<16,e[2]=G=65535&M|C<<16,M=65535&(S=H),C=S>>>16,k=65535&(I=N),x=I>>>16,I=t[3],C+=(S=e[3])>>>16,k+=65535&I,x+=I>>>16,x+=(k+=(C+=(M+=65535&S)>>>16)>>>16)>>>16,t[3]=N=65535&k|x<<16,e[3]=H=65535&M|C<<16,M=65535&(S=z),C=S>>>16,k=65535&(I=j),x=I>>>16,I=t[4],C+=(S=e[4])>>>16,k+=65535&I,x+=I>>>16,x+=(k+=(C+=(M+=65535&S)>>>16)>>>16)>>>16,t[4]=j=65535&k|x<<16,e[4]=z=65535&M|C<<16,M=65535&(S=q),C=S>>>16,k=65535&(I=D),x=I>>>16,I=t[5],C+=(S=e[5])>>>16,k+=65535&I,x+=I>>>16,x+=(k+=(C+=(M+=65535&S)>>>16)>>>16)>>>16,t[5]=D=65535&k|x<<16,e[5]=q=65535&M|C<<16,M=65535&(S=K),C=S>>>16,k=65535&(I=L),x=I>>>16,I=t[6],C+=(S=e[6])>>>16,k+=65535&I,x+=I>>>16,x+=(k+=(C+=(M+=65535&S)>>>16)>>>16)>>>16,t[6]=L=65535&k|x<<16,e[6]=K=65535&M|C<<16,M=65535&(S=V),C=S>>>16,k=65535&(I=F),x=I>>>16,I=t[7],C+=(S=e[7])>>>16,k+=65535&I,x+=I>>>16,x+=(k+=(C+=(M+=65535&S)>>>16)>>>16)>>>16,t[7]=F=65535&k|x<<16,e[7]=V=65535&M|C<<16,W+=128,n-=128}return n}function X(t,e,r){var n,i=new Int32Array(8),o=new Int32Array(8),a=new Uint8Array(256),s=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Y(i,o,e,r),r%=128,n=0;n=0;--i)$(t,e,n=r[i/8|0]>>(7&i)&1),Z(e,t),Z(t,t),$(t,e,n)}function rt(t,r){var n=[e(),e(),e(),e()];B(n[0],f),B(n[1],h),B(n[2],s),F(n[3],f,h),et(t,n,r)}function nt(t,r,i){var o,a=new Uint8Array(64),s=[e(),e(),e(),e()];for(i||n(r,32),X(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,rt(s,a),tt(t,s),o=0;o<32;o++)r[o+32]=t[o];return 0}var it=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ot(t,e){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>4)*it[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*it[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function at(t){var e,r=new Float64Array(64);for(e=0;e<64;e++)r[e]=t[e];for(e=0;e<64;e++)t[e]=0;ot(t,r)}function st(t,r,n,i){var o,a,s=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),f=[e(),e(),e(),e()];X(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64;var h=n+64;for(o=0;o>7&&L(t[0],a,t[0]),F(t[3],t[0],t[1]),0)}(h,i))return-1;for(o=0;o=0},t.sign.keyPair=function(){var t=new Uint8Array(mt),e=new Uint8Array(yt);return nt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(vt(t),t.length!==yt)throw new Error("bad secret key size");for(var e=new Uint8Array(mt),r=0;r0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);0===e.actions.length&&(cancelAnimationFrame(r),e.scheduled=void 0)},e}(g.a),y=r(307),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,i=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++ne.index?1:-1:t.delay>e.delay?1:-1},e}(g.a),E=r(593),I=r(94),S=r(35),M=r(230),C=r(435),k=r(244),x=r(212);function B(t){return!!t&&(t instanceof n.a||"function"===typeof t.lift&&"function"===typeof t.subscribe)}var O=r(281),T=r(302),R=r(261),P=r(443),N=r(708),j=r(138),D=r(510),L=r(116),F=r(142);function U(t,e,r){if(e){if(!Object(F.a)(e))return function(){for(var n=[],i=0;i1?n.next(Array.prototype.slice.call(arguments)):n.next(t)}),n,r)}))}function nt(t,e,r,n,i){var o;if(function(t){return t&&"function"===typeof t.addEventListener&&"function"===typeof t.removeEventListener}(t)){var a=t;t.addEventListener(e,r,i),o=function(){return a.removeEventListener(e,r,i)}}else if(function(t){return t&&"function"===typeof t.on&&"function"===typeof t.off}(t)){var s=t;t.on(e,r),o=function(){return s.off(e,r)}}else if(function(t){return t&&"function"===typeof t.addListener&&"function"===typeof t.removeListener}(t)){var u=t;t.addListener(e,r),o=function(){return u.removeListener(e,r)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var c=0,l=t.length;c{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var c,l;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(c||(c={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(l||(l={}));const f="0123456789abcdef";class h{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",t),a>o[r]||console.log.apply(console,e)}debug(){for(var t=arguments.length,e=new Array(t),r=0;r{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t>4],r+=f[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(s){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push("code=".concat(e)),n.push("version=".concat(this.version));const o=t;let a="";switch(e){case l.NUMERIC_FAULT:{a="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":a+="-"+e;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case l.CALL_EXCEPTION:case l.INSUFFICIENT_FUNDS:case l.MISSING_NEW:case l.NONCE_EXPIRED:case l.REPLACEMENT_UNDERPRICED:case l.TRANSACTION_REPLACED:case l.UNPREDICTABLE_GAS_LIMIT:a=e}a&&(t+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const s=new Error(t);return s.reason=o,s.code=e,Object.keys(r).forEach((function(t){s[t]=r[t]})),s}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,h.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",h.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",te&&this.throwError("too many arguments"+r,h.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",h.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return s||(s=new h("logger/5.6.0")),s}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!t)return;this.globalLogger().throwError("error censorship permanent",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!t,n=!!e}static setLogLevel(t){const e=o[t.toLowerCase()];null!=e?a=e:h.globalLogger().warn("invalid log level - "+t)}static from(t){return new h(t)}}h.errors=l,h.levels=c},function(t,e){function r(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void r(c)}s.done?e(u):Promise.resolve(u).then(n,i)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,u,"next",t)}function u(t){r(a,i,o,s,u,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},,,function(t,e,r){"use strict";var n=r(198),i=r(2174);t.exports=i((function(t){var e=n("sha256").update(t).digest();return n("sha256").update(e).digest()}))},function(t,e,r){"use strict";r.r(e),r.d(e,"render",(function(){return F})),r.d(e,"hydrate",(function(){return U})),r.d(e,"createElement",(function(){return m})),r.d(e,"h",(function(){return m})),r.d(e,"Fragment",(function(){return v})),r.d(e,"createRef",(function(){return b})),r.d(e,"isValidElement",(function(){return a})),r.d(e,"Component",(function(){return A})),r.d(e,"cloneElement",(function(){return Q})),r.d(e,"createContext",(function(){return G})),r.d(e,"toChildArray",(function(){return C})),r.d(e,"options",(function(){return i}));var n,i,o,a,s,u,c,l,f={},h=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(t,e){for(var r in e)t[r]=e[r];return t}function g(t){var e=t.parentNode;e&&e.removeChild(t)}function m(t,e,r){var i,o,a,s={};for(a in e)"key"==a?i=e[a]:"ref"==a?o=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===s[a]&&(s[a]=t.defaultProps[a]);return y(t,s,i,o,null)}function y(t,e,r,n,a){var s={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++o:a};return null==a&&null!=i.vnode&&i.vnode(s),s}function b(){return{current:null}}function v(t){return t.children}function A(t,e){this.props=t,this.context=e}function w(t,e){if(null==e)return t.__?w(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e0?y(g.type,g.props,g.key,null,g.__v):g)){if(g.__=r,g.__b=r.__b+1,null===(p=_[l])||p&&g.key==p.key&&g.type===p.type)_[l]=void 0;else for(d=0;d2&&(s.children=arguments.length>3?n.call(arguments,2):r),y(t.type,s,i||t.key,o||t.ref,null)}function G(t,e){var r={__c:e="__cC"+l++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var r,n;return this.getChildContext||(r=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&r.some(E)},this.sub=function(t){r.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){r.splice(r.indexOf(t),1),e&&e.call(t)}}),t.children}};return r.Provider.__=r.Consumer.contextType=r}n=h.slice,i={__e:function(t,e,r,n){for(var i,o,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(t)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,n||{}),a=i.__d),a)return i.__E=i}catch(e){t=e}throw t}},o=0,a=function(t){return null!=t&&void 0===t.constructor},A.prototype.setState=function(t,e){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof t&&(t=t(p({},r),this.props)),t&&p(r,t),null!=t&&this.__v&&(e&&this.__h.push(e),E(this))},A.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),E(this))},A.prototype.render=v,s=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,I.__r=0,l=0},function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return f}));var n=r(76);const i=new n.a("properties/5.6.0");function o(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function a(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||"object"!==typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}const s={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function u(t){if(void 0===t||null===t||s[typeof t])return!0;if(Array.isArray(t)||"object"===typeof t){if(!Object.isFrozen(t))return!1;const r=Object.keys(t);for(let n=0;nl(t))));if("object"===typeof t){const e={};for(const r in t){const n=t[r];void 0!==n&&o(e,r,l(n))}return e}return i.throwArgumentError("Cannot deepCopy ".concat(typeof t),"object",t)}function l(t){return c(t)}class f{constructor(t){for(const e in t)this[e]=l(t[e])}}},function(t,e,r){"use strict";function n(t){return t}r.d(e,"d",(function(){return n})),r.d(e,"c",(function(){return i})),r.d(e,"e",(function(){return o})),r.d(e,"b",(function(){return a})),r.d(e,"a",(function(){return s}));function i(t,e,r,n,i,o,a,s,u){switch(arguments.length){case 1:return t;case 2:return function(){return e(t.apply(this,arguments))};case 3:return function(){return r(e(t.apply(this,arguments)))};case 4:return function(){return n(r(e(t.apply(this,arguments))))};case 5:return function(){return i(n(r(e(t.apply(this,arguments)))))};case 6:return function(){return o(i(n(r(e(t.apply(this,arguments))))))};case 7:return function(){return a(o(i(n(r(e(t.apply(this,arguments)))))))};case 8:return function(){return s(a(o(i(n(r(e(t.apply(this,arguments))))))))};case 9:return function(){return u(s(a(o(i(n(r(e(t.apply(this,arguments)))))))))}}}function o(t,e,r,n,i,o,a,s,u,c,l,f,h,d,p,g,m,y,b,v){switch(arguments.length){case 1:return t;case 2:return e(t);case 3:return r(e(t));case 4:return n(r(e(t)));case 5:return i(n(r(e(t))));case 6:return o(i(n(r(e(t)))));case 7:return a(o(i(n(r(e(t))))));case 8:return s(a(o(i(n(r(e(t)))))));case 9:return u(s(a(o(i(n(r(e(t))))))));case 10:return c(u(s(a(o(i(n(r(e(t)))))))));case 11:return l(c(u(s(a(o(i(n(r(e(t))))))))));case 12:return f(l(c(u(s(a(o(i(n(r(e(t)))))))))));case 13:return h(f(l(c(u(s(a(o(i(n(r(e(t))))))))))));case 14:return d(h(f(l(c(u(s(a(o(i(n(r(e(t)))))))))))));case 15:return p(d(h(f(l(c(u(s(a(o(i(n(r(e(t))))))))))))));case 16:return g(p(d(h(f(l(c(u(s(a(o(i(n(r(e(t)))))))))))))));case 17:return m(g(p(d(h(f(l(c(u(s(a(o(i(n(r(e(t))))))))))))))));case 18:return y(m(g(p(d(h(f(l(c(u(s(a(o(i(n(r(e(t)))))))))))))))));case 19:return b(y(m(g(p(d(h(f(l(c(u(s(a(o(i(n(r(e(t))))))))))))))))));case 20:return v(b(y(m(g(p(d(h(f(l(c(u(s(a(o(i(n(r(e(t)))))))))))))))))))}}var a=function(t,e,r){var n;return Object.assign({},t,((n={})[e]=r,n))},s=function(t){return function(e){var r;return(r={})[t]=e,r}}},function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(1143),e),i(r(2261),e),i(r(839),e),i(r(2262),e),i(r(2263),e),i(r(2264),e),i(r(2265),e)},function(t,e,r){"use strict";r.r(e),r.d(e,"audit",(function(){return o})),r.d(e,"auditTime",(function(){return l})),r.d(e,"buffer",(function(){return f})),r.d(e,"bufferCount",(function(){return g})),r.d(e,"bufferTime",(function(){return A})),r.d(e,"bufferToggle",(function(){return B})),r.d(e,"bufferWhen",(function(){return R})),r.d(e,"catchError",(function(){return j.a})),r.d(e,"combineAll",(function(){return L})),r.d(e,"combineLatest",(function(){return Q})),r.d(e,"concat",(function(){return H})),r.d(e,"concatAll",(function(){return z.a})),r.d(e,"concatMap",(function(){return q.a})),r.d(e,"concatMapTo",(function(){return K})),r.d(e,"count",(function(){return V})),r.d(e,"debounce",(function(){return Y})),r.d(e,"debounceTime",(function(){return $})),r.d(e,"defaultIfEmpty",(function(){return nt.a})),r.d(e,"delay",(function(){return at})),r.d(e,"delayWhen",(function(){return ft})),r.d(e,"dematerialize",(function(){return mt})),r.d(e,"distinct",(function(){return vt})),r.d(e,"distinctUntilChanged",(function(){return _t.a})),r.d(e,"distinctUntilKeyChanged",(function(){return Et.a})),r.d(e,"elementAt",(function(){return kt})),r.d(e,"endWith",(function(){return Bt})),r.d(e,"every",(function(){return Ot})),r.d(e,"exhaust",(function(){return Pt})),r.d(e,"exhaustMap",(function(){return Lt})),r.d(e,"expand",(function(){return Qt})),r.d(e,"filter",(function(){return St.a})),r.d(e,"finalize",(function(){return zt})),r.d(e,"find",(function(){return Vt})),r.d(e,"findIndex",(function(){return Yt})),r.d(e,"first",(function(){return Xt.a})),r.d(e,"groupBy",(function(){return Zt.b})),r.d(e,"ignoreElements",(function(){return $t})),r.d(e,"isEmpty",(function(){return re})),r.d(e,"last",(function(){return fe})),r.d(e,"map",(function(){return Dt.a})),r.d(e,"mapTo",(function(){return he})),r.d(e,"materialize",(function(){return ge})),r.d(e,"max",(function(){return Ee})),r.d(e,"merge",(function(){return Se})),r.d(e,"mergeAll",(function(){return Me.a})),r.d(e,"mergeMap",(function(){return Ce.b})),r.d(e,"flatMap",(function(){return Ce.a})),r.d(e,"mergeMapTo",(function(){return ke})),r.d(e,"mergeScan",(function(){return xe})),r.d(e,"min",(function(){return Te})),r.d(e,"multicast",(function(){return Re.a})),r.d(e,"observeOn",(function(){return Pe.b})),r.d(e,"onErrorResumeNext",(function(){return Ne})),r.d(e,"pairwise",(function(){return Le})),r.d(e,"partition",(function(){return Ge})),r.d(e,"pluck",(function(){return He.a})),r.d(e,"publish",(function(){return ze.a})),r.d(e,"publishBehavior",(function(){return Ke})),r.d(e,"publishLast",(function(){return We})),r.d(e,"publishReplay",(function(){return Ye})),r.d(e,"race",(function(){return Ze})),r.d(e,"reduce",(function(){return _e})),r.d(e,"repeat",(function(){return $e})),r.d(e,"repeatWhen",(function(){return nr})),r.d(e,"retry",(function(){return ar.a})),r.d(e,"retryWhen",(function(){return sr})),r.d(e,"refCount",(function(){return lr.a})),r.d(e,"sample",(function(){return fr})),r.d(e,"sampleTime",(function(){return pr})),r.d(e,"scan",(function(){return be})),r.d(e,"sequenceEqual",(function(){return br})),r.d(e,"share",(function(){return Er})),r.d(e,"shareReplay",(function(){return Ir.a})),r.d(e,"single",(function(){return Sr})),r.d(e,"skip",(function(){return kr})),r.d(e,"skipLast",(function(){return Or})),r.d(e,"skipUntil",(function(){return Pr})),r.d(e,"skipWhile",(function(){return Dr})),r.d(e,"startWith",(function(){return Ur.a})),r.d(e,"subscribeOn",(function(){return zr})),r.d(e,"switchAll",(function(){return Vr})),r.d(e,"switchMap",(function(){return Kr.a})),r.d(e,"switchMapTo",(function(){return Wr})),r.d(e,"take",(function(){return Ct.a})),r.d(e,"takeLast",(function(){return se})),r.d(e,"takeUntil",(function(){return Jr.a})),r.d(e,"takeWhile",(function(){return Yr.a})),r.d(e,"tap",(function(){return Xr.a})),r.d(e,"throttle",(function(){return $r})),r.d(e,"throttleTime",(function(){return rn})),r.d(e,"throwIfEmpty",(function(){return Mt.a})),r.d(e,"timeInterval",(function(){return un})),r.d(e,"timeout",(function(){return dn})),r.d(e,"timeoutWith",(function(){return fn.a})),r.d(e,"timestamp",(function(){return pn})),r.d(e,"toArray",(function(){return yn})),r.d(e,"window",(function(){return bn})),r.d(e,"windowCount",(function(){return wn})),r.d(e,"windowTime",(function(){return In})),r.d(e,"windowToggle",(function(){return On})),r.d(e,"windowWhen",(function(){return Pn})),r.d(e,"withLatestFrom",(function(){return Dn})),r.d(e,"zip",(function(){return Qn})),r.d(e,"zipAll",(function(){return Gn}));var n=r(15),i=r(41);function o(t){return function(e){return e.lift(new a(t))}}var a=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.durationSelector))},t}(),s=function(t){function e(e,r){var n=t.call(this,e)||this;return n.durationSelector=r,n.hasValue=!1,n}return n.a(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(n){return this.destination.error(n)}var r=Object(i.c)(e,new i.a(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}},e.prototype.clearThrottle=function(){var t=this,e=t.value,r=t.hasValue,n=t.throttled;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),r&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(i.b),u=r(115),c=r(712);function l(t,e){return void 0===e&&(e=u.a),o((function(){return Object(c.a)(t,e)}))}function f(t){return function(e){return e.lift(new h(t))}}var h=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new d(t,this.closingNotifier))},t}(),d=function(t){function e(e,r){var n=t.call(this,e)||this;return n.buffer=[],n.add(Object(i.c)(r,new i.a(n))),n}return n.a(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t)},e}(i.b),p=r(35);function g(t,e){return void 0===e&&(e=null),function(r){return r.lift(new m(t,e))}}var m=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?b:y}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),y=function(t){function e(e,r){var n=t.call(this,e)||this;return n.bufferSize=r,n.buffer=[],n}return n.a(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(p.a),b=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.bufferSize=r,i.startBufferEvery=n,i.buffers=[],i.count=0,i}return n.a(e,t),e.prototype._next=function(t){var e=this,r=e.bufferSize,n=e.startBufferEvery,i=e.buffers,o=e.count;this.count++,o%n===0&&i.push([]);for(var a=i.length;a--;){var s=i[a];s.push(t),s.length===r&&(i.splice(a,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,r=this.destination;e.length>0;){var n=e.shift();n.length>0&&r.next(n)}t.prototype._complete.call(this)},e}(p.a),v=r(142);function A(t){var e=arguments.length,r=u.a;Object(v.a)(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],e--);var n=null;e>=2&&(n=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new w(t,n,i,r))}}var w=function(){function t(t,e,r,n){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=r,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new E(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),_=function(){return function(){this.buffer=[]}}(),E=function(t){function e(e,r,n,i,o){var a=t.call(this,e)||this;a.bufferTimeSpan=r,a.bufferCreationInterval=n,a.maxBufferSize=i,a.scheduler=o,a.contexts=[];var s=a.openContext();if(a.timespanOnly=null==n||n<0,a.timespanOnly){var u={subscriber:a,context:s,bufferTimeSpan:r};a.add(s.closeAction=o.schedule(I,r,u))}else{var c={subscriber:a,context:s},l={bufferTimeSpan:r,bufferCreationInterval:n,subscriber:a,scheduler:o};a.add(s.closeAction=o.schedule(M,r,c)),a.add(o.schedule(S,n,l))}return a}return n.a(e,t),e.prototype._next=function(t){for(var e,r=this.contexts,n=r.length,i=0;i0;){var n=e.shift();r.next(n.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:t,bufferTimeSpan:r};this.add(t.closeAction=this.scheduler.schedule(I,r,n))}},e.prototype.openContext=function(){var t=new _;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(p.a);function I(t){var e=t.subscriber,r=t.context;r&&e.closeContext(r),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function S(t){var e=t.bufferCreationInterval,r=t.bufferTimeSpan,n=t.subscriber,i=t.scheduler,o=n.openContext();n.closed||(n.add(o.closeAction=i.schedule(M,r,{subscriber:n,context:o})),this.schedule(t,e))}function M(t){var e=t.subscriber,r=t.context;e.closeContext(r)}var C=r(94),k=r(201),x=r(225);function B(t,e){return function(r){return r.lift(new O(t,e))}}var O=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new T(t,this.openings,this.closingSelector))},t}(),T=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.closingSelector=n,i.contexts=[],i.add(Object(k.a)(i,r)),i}return n.a(e,t),e.prototype._next=function(t){for(var e=this.contexts,r=e.length,n=0;n0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var r=e.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(r){this._error(r)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var r=t.buffer,n=t.subscription;this.destination.next(r),e.splice(e.indexOf(t),1),this.remove(n),n.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,r=new C.a,n={buffer:[],subscription:r};e.push(n);var i=Object(k.a)(this,t,n);!i||i.closed?this.closeBuffer(n):(i.context=n,this.add(i),r.add(i))},e}(x.a);function R(t){return function(e){return e.lift(new P(t))}}var P=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new N(t,this.closingSelector))},t}(),N=function(t){function e(e,r){var n=t.call(this,e)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return n.a(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{e=(0,this.closingSelector)()}catch(n){return this.error(n)}t=new C.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(i.c)(e,new i.a(this))),this.subscribing=!1},e}(i.b),j=r(1004),D=r(499);function L(t){return function(e){return e.lift(new D.a(t))}}var F=r(116),U=r(150);function Q(){for(var t=[],e=0;e0&&r[0].time-n.now()<=0;)r.shift().notification.observe(i);if(r.length>0){var o=Math.max(0,r[0].time-n.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,r=new ct(e.now()+this.delay,t);this.queue.push(r),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(ot.a.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(ot.a.createComplete()),this.unsubscribe()},e}(p.a),ct=function(){return function(t,e){this.time=t,this.notification=e}}(),lt=r(51);function ft(t,e){return e?function(r){return new pt(r,e).lift(new ht(t))}:function(e){return e.lift(new ht(t))}}var ht=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new dt(t,this.delayDurationSelector))},t}(),dt=function(t){function e(e,r){var n=t.call(this,e)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return n.a(e,t),e.prototype.notifyNext=function(t,e,r,n,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var r=this.delayDurationSelector(t,e);r&&this.tryDelay(r,t)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var r=Object(k.a)(this,t,e);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(x.a),pt=function(t){function e(e,r){var n=t.call(this)||this;return n.source=e,n.subscriptionDelay=r,n}return n.a(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new gt(t,this.source))},e}(lt.a),gt=function(t){function e(e,r){var n=t.call(this)||this;return n.parent=e,n.source=r,n.sourceSubscribed=!1,n}return n.a(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(p.a);function mt(){return function(t){return t.lift(new yt)}}var yt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new bt(t))},t}(),bt=function(t){function e(e){return t.call(this,e)||this}return n.a(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(p.a);function vt(t,e){return function(r){return r.lift(new At(t,e))}}var At=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new wt(t,this.keySelector,this.flushes))},t}(),wt=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.keySelector=r,o.values=new Set,n&&o.add(Object(i.c)(n,new i.a(o))),o}return n.a(e,t),e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(t){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,r=this.destination;try{e=this.keySelector(t)}catch(n){return void r.error(n)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var r=this.values;r.has(t)||(r.add(t),this.destination.next(e))},e}(i.b),_t=r(714),Et=r(1005),It=r(281),St=r(226),Mt=r(385),Ct=r(503);function kt(t,e){if(t<0)throw new It.a;var r=arguments.length>=2;return function(n){return n.pipe(Object(St.a)((function(e,r){return r===t})),Object(Ct.a)(1),r?Object(nt.a)(e):Object(Mt.a)((function(){return new It.a})))}}var xt=r(384);function Bt(){for(var t=[],e=0;e0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(i.b);function zt(t){return function(e){return e.lift(new qt(t))}}var qt=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new Kt(t,this.callback))},t}(),Kt=function(t){function e(e,r){var n=t.call(this,e)||this;return n.add(new C.a(r)),n}return n.a(e,t),e}(p.a);function Vt(t,e){if("function"!==typeof t)throw new TypeError("predicate is not a function");return function(r){return r.lift(new Wt(t,r,!1,e))}}var Wt=function(){function t(t,e,r,n){this.predicate=t,this.source=e,this.yieldIndex=r,this.thisArg=n}return t.prototype.call=function(t,e){return e.subscribe(new Jt(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),Jt=function(t){function e(e,r,n,i,o){var a=t.call(this,e)||this;return a.predicate=r,a.source=n,a.yieldIndex=i,a.thisArg=o,a.index=0,a}return n.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,r=this.thisArg,n=this.index++;try{e.call(r||this,t,n,this.source)&&this.notifyComplete(this.yieldIndex?n:t)}catch(i){this.destination.error(i)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(p.a);function Yt(t,e){return function(r){return r.lift(new Wt(t,r,!0,e))}}var Xt=r(1006),Zt=r(627);function $t(){return function(t){return t.lift(new te)}}var te=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ee(t))},t}(),ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.a(e,t),e.prototype._next=function(t){},e}(p.a);function re(){return function(t){return t.lift(new ne)}}var ne=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ie(t))},t}(),ie=function(t){function e(e){return t.call(this,e)||this}return n.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(p.a),oe=r(302),ae=r(157);function se(t){return function(e){return 0===t?Object(ae.b)():e.lift(new ue(t))}}var ue=function(){function t(t){if(this.total=t,this.total<0)throw new It.a}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.total))},t}(),ce=function(t){function e(e,r){var n=t.call(this,e)||this;return n.total=r,n.ring=new Array,n.count=0,n}return n.a(e,t),e.prototype._next=function(t){var e=this.ring,r=this.total,n=this.count++;e.length0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,i=0;i=2;return function(n){return n.pipe(t?Object(St.a)((function(e,r){return t(e,r,n)})):le.a,se(1),r?Object(nt.a)(e):Object(Mt.a)((function(){return new oe.a})))}}function he(t){return function(e){return e.lift(new de(t))}}var de=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new pe(t,this.value))},t}(),pe=function(t){function e(e,r){var n=t.call(this,e)||this;return n.value=r,n}return n.a(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(p.a);function ge(){return function(t){return t.lift(new me)}}var me=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ye(t))},t}(),ye=function(t){function e(e){return t.call(this,e)||this}return n.a(e,t),e.prototype._next=function(t){this.destination.next(ot.a.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(ot.a.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(ot.a.createComplete()),t.complete()},e}(p.a);function be(t,e){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new ve(t,e,r))}}var ve=function(){function t(t,e,r){void 0===r&&(r=!1),this.accumulator=t,this.seed=e,this.hasSeed=r}return t.prototype.call=function(t,e){return e.subscribe(new Ae(t,this.accumulator,this.seed,this.hasSeed))},t}(),Ae=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o.accumulator=r,o._seed=n,o.hasSeed=i,o.index=0,o}return n.a(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,r=this.index++;try{e=this.accumulator(this.seed,t,r)}catch(n){this.destination.error(n)}this.seed=e,this.destination.next(e)},e}(p.a),we=r(435);function _e(t,e){return arguments.length>=2?function(r){return Object(we.a)(be(t,e),se(1),Object(nt.a)(e))(r)}:function(e){return Object(we.a)(be((function(e,r,n){return t(e,r,n+1)})),se(1))(e)}}function Ee(t){return _e("function"===typeof t?function(e,r){return t(e,r)>0?e:r}:function(t,e){return t>e?t:e})}var Ie=r(710);function Se(){for(var t=[],e=0;e0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(i.b);function Te(t){return _e("function"===typeof t?function(e,r){return t(e,r)<0?e:r}:function(t,e){return t-1&&(this.count=r-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(p.a),rr=r(106);function nr(t){return function(e){return e.lift(new ir(t))}}var ir=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new or(t,this.notifier,e))},t}(),or=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.notifier=r,i.source=n,i.sourceIsBeingSubscribedTo=!0,i}return n.a(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new rr.a;try{e=(0,this.notifier)(this.notifications)}catch(r){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(i.c)(e,new i.a(this))},e}(i.b),ar=r(1009);function sr(t){return function(e){return e.lift(new ur(t,e))}}var ur=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new cr(t,this.notifier,this.source))},t}(),cr=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.notifier=r,i.source=n,i}return n.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var r=this.errors,n=this.retries,o=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new rr.a;try{n=(0,this.notifier)(r)}catch(a){return t.prototype.error.call(this,a)}o=Object(i.c)(n,new i.a(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=o,r.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},e}(i.b),lr=r(496);function fr(t){return function(e){return e.lift(new hr(t))}}var hr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var r=new dr(t),n=e.subscribe(r);return n.add(Object(i.c)(this.notifier,new i.a(r))),n},t}(),dr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return n.a(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(i.b);function pr(t,e){return void 0===e&&(e=u.a),function(r){return r.lift(new gr(t,e))}}var gr=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new mr(t,this.period,this.scheduler))},t}(),mr=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.period=r,i.scheduler=n,i.hasValue=!1,i.add(n.schedule(yr,r,{subscriber:i,period:r})),i}return n.a(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(p.a);function yr(t){var e=t.subscriber,r=t.period;e.notifyNext(),this.schedule(t,r)}function br(t,e){return function(r){return r.lift(new vr(t,e))}}var vr=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Ar(t,this.compareTo,this.comparator))},t}(),Ar=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.compareTo=r,i.comparator=n,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(r.subscribe(new wr(e,i))),i}return n.a(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this,e=t._a,r=t._b,n=t.comparator;e.length>0&&r.length>0;){var i=e.shift(),o=r.shift(),a=!1;try{a=n?n(i,o):i===o}catch(s){this.destination.error(s)}a||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(p.a),wr=function(t){function e(e,r){var n=t.call(this,e)||this;return n.parent=r,n}return n.a(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(p.a);function _r(){return new rr.a}function Er(){return function(t){return Object(lr.a)()(Object(Re.a)(_r)(t))}}var Ir=r(1010);function Sr(t){return function(e){return e.lift(new Mr(t,e))}}var Mr=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Cr(t,this.predicate,this.source))},t}(),Cr=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.predicate=r,i.source=n,i.seenValue=!1,i.index=0,i}return n.a(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(r){this.destination.error(r)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new oe.a)},e}(p.a);function kr(t){return function(e){return e.lift(new xr(t))}}var xr=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Br(t,this.total))},t}(),Br=function(t){function e(e,r){var n=t.call(this,e)||this;return n.total=r,n.count=0,n}return n.a(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(p.a);function Or(t){return function(e){return e.lift(new Tr(t))}}var Tr=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new It.a}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new p.a(t)):e.subscribe(new Rr(t,this._skipCount))},t}(),Rr=function(t){function e(e,r){var n=t.call(this,e)||this;return n._skipCount=r,n._count=0,n._ring=new Array(r),n}return n.a(e,t),e.prototype._next=function(t){var e=this._skipCount,r=this._count++;if(r0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,i=this.windows,o=i.length,a=0;a=0&&s%e===0&&!this.closed&&i.shift().complete(),++this.count%e===0&&!this.closed){var u=new rr.a;i.push(u),r.next(u)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(p.a);function In(t){var e=u.a,r=null,n=Number.POSITIVE_INFINITY;return Object(v.a)(arguments[3])&&(e=arguments[3]),Object(v.a)(arguments[2])?e=arguments[2]:Object(Gr.a)(arguments[2])&&(n=Number(arguments[2])),Object(v.a)(arguments[1])?e=arguments[1]:Object(Gr.a)(arguments[1])&&(r=Number(arguments[1])),function(i){return i.lift(new Sn(t,r,n,e))}}var Sn=function(){function t(t,e,r,n){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=r,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new Cn(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),Mn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return n.a(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(rr.a),Cn=function(t){function e(e,r,n,i,o){var a=t.call(this,e)||this;a.destination=e,a.windowTimeSpan=r,a.windowCreationInterval=n,a.maxWindowSize=i,a.scheduler=o,a.windows=[];var s=a.openWindow();if(null!==n&&n>=0){var u={subscriber:a,window:s,context:null},c={windowTimeSpan:r,windowCreationInterval:n,subscriber:a,scheduler:o};a.add(o.schedule(Bn,r,u)),a.add(o.schedule(xn,n,c))}else{var l={subscriber:a,window:s,windowTimeSpan:r};a.add(o.schedule(kn,r,l))}return a}return n.a(e,t),e.prototype._next=function(t){for(var e=this.windows,r=e.length,n=0;n=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new Mn;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(p.a);function kn(t){var e=t.subscriber,r=t.windowTimeSpan,n=t.window;n&&e.closeWindow(n),t.window=e.openWindow(),this.schedule(t,r)}function xn(t){var e=t.windowTimeSpan,r=t.subscriber,n=t.scheduler,i=t.windowCreationInterval,o=r.openWindow(),a=this,s={action:a,subscription:null},u={subscriber:r,window:o,context:s};s.subscription=n.schedule(Bn,e,u),a.add(s.subscription),a.schedule(t,i)}function Bn(t){var e=t.subscriber,r=t.window,n=t.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),e.closeWindow(r)}function On(t,e){return function(r){return r.lift(new Tn(t,e))}}var Tn=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Rn(t,this.openings,this.closingSelector))},t}(),Rn=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.openings=r,i.closingSelector=n,i.contexts=[],i.add(i.openSubscription=Object(k.a)(i,r,r)),i}return n.a(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var r=e.length,n=0;n0){var i=n.indexOf(r);-1!==i&&n.splice(i,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(r){return void this.destination.error(r)}this.destination.next(e)},e}(x.a),Un=r(502);function Qn(){for(var t=[],e=0;e=0||(i[r]=t[r]);return i}const u=["onClick","reloadDocument","replace","state","target","to"];function c(t){let{basename:e,children:r,window:a}=t,s=Object(n.useRef)();null==s.current&&(s.current=Object(i.b)({window:a}));let u=s.current,[c,l]=Object(n.useState)({action:u.action,location:u.location});return Object(n.useLayoutEffect)((()=>u.listen(l)),[u]),Object(n.createElement)(o.b,{basename:e,children:r,location:c.location,navigationType:c.action,navigator:u})}const l=Object(n.forwardRef)((function(t,e){let{onClick:r,reloadDocument:c,replace:l=!1,state:f,target:h,to:d}=t,p=s(t,u),g=Object(o.d)(d),m=function(t,e){let{target:r,replace:a,state:s}=void 0===e?{}:e,u=Object(o.f)(),c=Object(o.e)(),l=Object(o.h)(t);return Object(n.useCallback)((e=>{if(0===e.button&&(!r||"_self"===r)&&!function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(e)){e.preventDefault();let r=!!a||Object(i.e)(c)===Object(i.e)(l);u(t,{replace:r,state:s})}}),[c,u,l,a,s,r,t])}(d,{replace:l,state:f,target:h});return Object(n.createElement)("a",a({},p,{href:g,onClick:function(t){r&&r(t),t.defaultPrevented||c||m(t)},ref:e,target:h}))}))},function(t,e,r){"use strict";r.d(e,"d",(function(){return c})),r.d(e,"a",(function(){return l})),r.d(e,"c",(function(){return f})),r.d(e,"b",(function(){return h}));var n=r(52),i=r(615),o=r(126),a=r(76),s=r(310);const u=new a.a(s.a);function c(t){const e=[],r=function(t,n){if(Array.isArray(n))for(let o in n){const a=t.slice();a.push(o);try{r(a,n[o])}catch(i){e.push({path:a,error:i})}}};return r([],t),e}class l{constructor(t,e,r,n){this.name=t,this.type=e,this.localName=r,this.dynamic=n}_throwError(t,e){u.throwArgumentError(t,this.localName,e)}}class f{constructor(t){Object(o.b)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return Object(n.c)(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData(Object(n.b)(t._data))}writeBytes(t){let e=Object(n.a)(t);const r=e.length%this.wordSize;return r&&(e=Object(n.b)([e,this._padding.slice(r)])),this._writeData(e)}_getValue(t){let e=Object(n.a)(i.a.from(t));return e.length>this.wordSize&&u.throwError("value out-of-bounds",a.a.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=Object(n.b)([this._padding.slice(e.length%this.wordSize),e])),e}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class h{constructor(t,e,r,i){Object(o.b)(this,"_data",Object(n.a)(t)),Object(o.b)(this,"wordSize",e||32),Object(o.b)(this,"_coerceFunc",r),Object(o.b)(this,"allowLoose",i),this._offset=0}get data(){return Object(n.g)(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):h.coerce(t,e)}_peekBytes(t,e,r){let n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:u.throwError("data out-of-bounds",a.a.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(t){return new h(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return i.a.from(this.readBytes(this.wordSize))}}},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2713).Buffer}catch(k){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(k){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var h=["","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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],l=p[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(t);r=(f=f.idivn(l)).isZero()?g+r:h[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,g=d>>>13,m=0|a[2],y=8191&m,b=m>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],E=8191&_,I=_>>>13,S=0|a[5],M=8191&S,C=S>>>13,k=0|a[6],x=8191&k,B=k>>>13,O=0|a[7],T=8191&O,R=O>>>13,P=0|a[8],N=8191&P,j=P>>>13,D=0|a[9],L=8191&D,F=D>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,J=0|s[3],Y=8191&J,X=J>>>13,Z=0|s[4],$=8191&Z,tt=Z>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ft=8191<,ht=lt>>>13,dt=0|s[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,Q))|0)+((8191&(i=(i=Math.imul(f,G))+Math.imul(h,Q)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,Q),i=(i=Math.imul(p,G))+Math.imul(g,Q)|0,o=Math.imul(g,G);var yt=(c+(n=n+Math.imul(f,z)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,z)|0))<<13)|0;c=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,G))+Math.imul(b,Q)|0,o=Math.imul(b,G),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,q)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,Q),i=(i=Math.imul(A,G))+Math.imul(w,Q)|0,o=Math.imul(w,G),n=n+Math.imul(y,z)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var vt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,G))+Math.imul(I,Q)|0,o=Math.imul(I,G),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,q)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0;var At=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,Q),i=(i=Math.imul(M,G))+Math.imul(C,Q)|0,o=Math.imul(C,G),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,q)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,G))+Math.imul(B,Q)|0,o=Math.imul(B,G),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var _t=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,Q),i=(i=Math.imul(T,G))+Math.imul(R,Q)|0,o=Math.imul(R,G),n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Et=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var It=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,G))+Math.imul(F,Q)|0,o=Math.imul(F,G),n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(j,z)|0,o=o+Math.imul(j,q)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,ht)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ht)|0;var Ct=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(F,Y)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var kt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(C,ft)|0,o=o+Math.imul(C,ht)|0;var xt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Bt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(N,ft)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,ht))+Math.imul(F,ft)|0,o=Math.imul(F,ht);var Rt=(c+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Pt=(c+(n=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=At,u[5]=wt,u[6]=_t,u[7]=Et,u[8]=It,u[9]=St,u[10]=Mt,u[11]=Ct,u[12]=kt,u[13]=xt,u[14]=Bt,u[15]=Ot,u[16]=Tt,u[17]=Rt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?g(this,t,e):r<1024?y(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new E;else if("p192"===t)e=new I;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return A[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var g=d,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,M),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(79)(t))},function(t,e,r){"use strict";(function(t){var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataProgram=void 0;const i=r(18),o=r(128);class a extends o.Program{static findEditionAccount(e,r){return n(this,void 0,void 0,(function*(){return i.PublicKey.findProgramAddress([t.from(a.PREFIX,"utf8"),a.PUBKEY.toBuffer(),e.toBuffer(),t.from(a.EDITION,"utf8"),t.from(r,"utf8")],a.PUBKEY)}))}static findMasterEditionAccount(e){return n(this,void 0,void 0,(function*(){return i.PublicKey.findProgramAddress([t.from(a.PREFIX,"utf8"),a.PUBKEY.toBuffer(),e.toBuffer(),t.from(a.EDITION,"utf8")],a.PUBKEY)}))}static findMetadataAccount(e){return n(this,void 0,void 0,(function*(){return i.PublicKey.findProgramAddress([t.from(a.PREFIX,"utf8"),a.PUBKEY.toBuffer(),e.toBuffer()],a.PUBKEY)}))}static findUseAuthorityAccount(e,r){return n(this,void 0,void 0,(function*(){return i.PublicKey.findProgramAddress([t.from(a.PREFIX,"utf8"),a.PUBKEY.toBuffer(),e.toBuffer(),t.from(a.USER,"utf8"),r.toBuffer()],a.PUBKEY)}))}static findCollectionAuthorityAccount(e,r){return n(this,void 0,void 0,(function*(){return i.PublicKey.findProgramAddress([t.from(a.PREFIX,"utf8"),a.PUBKEY.toBuffer(),e.toBuffer(),t.from(a.COLLECTION_AUTHORITY,"utf8"),r.toBuffer()],a.PUBKEY)}))}static findProgramAsBurnerAccount(){return n(this,void 0,void 0,(function*(){return i.PublicKey.findProgramAddress([t.from(a.PREFIX,"utf8"),a.PUBKEY.toBuffer(),t.from(a.BURN,"utf8")],a.PUBKEY)}))}}e.MetadataProgram=a,a.PREFIX="metadata",a.EDITION="edition",a.USER="user",a.COLLECTION_AUTHORITY="collection_authority",a.BURN="burn",a.PUBKEY=new i.PublicKey(o.config.programs.metadata)}).call(this,r(7).Buffer)},function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"d",(function(){return a})),r.d(e,"a",(function(){return u}));var n=r(127),i=function(t){return"Left"===t._tag},o=function(t){return{_tag:"Left",left:t}},a=function(t){return{_tag:"Right",right:t}};var s=function(t){return function(e){return i(e)?e:t(e.right)}},u=s,c=(n.d,function(t){return function(e){return i(e)?e:a(t(e))}});n.d;n.d},function(t,e,r){var n=r(2752)();t.exports=n;try{regeneratorRuntime=n}catch(i){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},,function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(15),i=r(35);function o(t,e){return function(r){if("function"!==typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new a(t,e))}}var a=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))},t}(),s=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.project=r,i.count=0,i.thisArg=n||i,i}return n.a(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(r){return void this.destination.error(r)}this.destination.next(e)},e}(i.a)},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(10),i=r(4),o=r(1468),a=r(0);function s(t,e){const r=(r,i)=>Object(a.jsx)(o.a,Object(n.a)({"data-testid":"".concat(e,"Icon"),ref:i},r,{children:t}));return r.muiName=o.a.muiName,i.memo(i.forwardRef(r))}},function(t,e,r){"use strict";var n;r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return o})),function(t){t.PENDING="pending",t.RESOLVED="resolved",t.REJECTED="rejected"}(n||(n={}));const i=()=>{throw new Error("ExposedPromise not initialized yet.")};class o{constructor(){this._resolve=i,this._reject=i,this._status=n.PENDING,this._promise=new Promise(((t,e)=>{this._resolve=e=>{this.isSettled()||(this._promiseResult=e,t(e),this._status=n.RESOLVED)},this._reject=t=>{this.isSettled()||(this._promiseError=t,e(t),this._status=n.REJECTED)}}))}get promise(){return this._promise}get resolve(){return this._resolve}get reject(){return this._reject}get status(){return this._status}get promiseResult(){return this._promiseResult}get promiseError(){return this._promiseError}static resolve(t){const e=new o;return e.resolve(t),e}static reject(t){const e=new o;return e.reject(t),e}isPending(){return this.status===n.PENDING}isResolved(){return this.status===n.RESOLVED}isRejected(){return this.status===n.REJECTED}isSettled(){return this.isResolved()||this.isRejected()}}},function(t,e,r){"use strict";var n=e;n.version=r(1709).version,n.utils=r(252),n.rand=r(787),n.curve=r(1038),n.curves=r(788),n.ec=r(1721),n.eddsa=r(1725)},function(t,e,r){"use strict";function n(t){return t&&"function"===typeof t.schedule}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";function n(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(112),i=r.n(n),o=r(1);function a(t){return"0x"+i.a.keccak_256(Object(o.a)(t))}},function(t,e,r){"use strict";r.r(e),function(t,n){r.d(e,"decrypt",(function(){return x})),r.d(e,"derive",(function(){return S})),r.d(e,"derivePadded",(function(){return C})),r.d(e,"deriveUnpadded",(function(){return M})),r.d(e,"encrypt",(function(){return k})),r.d(e,"generatePrivate",(function(){return A})),r.d(e,"getPublic",(function(){return w})),r.d(e,"getPublicCompressed",(function(){return _})),r.d(e,"sign",(function(){return E})),r.d(e,"verify",(function(){return I}));var i=r(240),o=r.n(i),a=r(141);const s=new a.ec("secp256k1"),u=t.crypto||t.msCrypto||{},c=u.subtle||u.webkitSubtle,l=n.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),f=n.alloc(32,0);function h(t,e){if(!t)throw new Error(e||"Assertion failed")}function d(t){return e=t,!(!n.isBuffer(e)||32!==e.length)&&(t.compare(f)>0&&t.compare(l)<0);var e}function p(t){const e=new Uint8Array(t);return"undefined"===typeof u.getRandomValues?n.from(o.a.randomBytes(t)):(u.getRandomValues(e),n.from(e))}async function g(t){if(c){const e=await c.digest("SHA-512",t);return new Uint8Array(e)}const e=o.a.createHash("sha512").update(t).digest();return new Uint8Array(e)}function m(t){return async function(e,r,i){if(c){const o={name:"AES-CBC"},a=await c.importKey("raw",r,o,!1,[t]),s={name:"AES-CBC",iv:e},u=await c[t](s,a,i);return n.from(new Uint8Array(u))}if("encrypt"===t){const t=o.a.createCipheriv("aes-256-cbc",r,e),a=t.update(i),s=t.final();return n.concat([a,s])}if("decrypt"===t){const t=o.a.createDecipheriv("aes-256-cbc",r,e),a=t.update(i),s=t.final();return n.concat([a,s])}throw new Error("Unsupported operation: ".concat(t))}}const y=m("encrypt"),b=m("decrypt");async function v(t,e){if(c){const r={name:"HMAC",hash:{name:"SHA-256"}},i=await c.importKey("raw",new Uint8Array(t),r,!1,["sign","verify"]),o=await c.sign("HMAC",i,e);return n.from(new Uint8Array(o))}const r=o.a.createHmac("sha256",n.from(t));r.update(e);return r.digest()}const A=function(){let t=p(32);for(;!d(t);)t=p(32);return t},w=function(t){return h(32===t.length,"Bad private key"),h(d(t),"Bad private key"),n.from(s.keyFromPrivate(t).getPublic("array"))},_=function(t){h(32===t.length,"Bad private key"),h(d(t),"Bad private key");return n.from(s.keyFromPrivate(t).getPublic(!0,"array"))},E=async function(t,e){return h(32===t.length,"Bad private key"),h(d(t),"Bad private key"),h(e.length>0,"Message should not be empty"),h(e.length<=32,"Message is too long"),n.from(s.sign(e,t,{canonical:!0}).toDER())},I=async function(t,e,r){if(h(65===t.length||33===t.length,"Bad public key"),65===t.length&&h(4===t[0],"Bad public key"),33===t.length&&h(2===t[0]||3===t[0],"Bad public key"),h(e.length>0,"Message should not be empty"),h(e.length<=32,"Message is too long"),s.verify(e,r,t))return null;throw new Error("Bad signature")},S=async function(t,e){h(n.isBuffer(t),"Bad private key"),h(n.isBuffer(e),"Bad public key"),h(32===t.length,"Bad private key"),h(d(t),"Bad private key"),h(65===e.length||33===e.length,"Bad public key"),65===e.length&&h(4===e[0],"Bad public key"),33===e.length&&h(2===e[0]||3===e[0],"Bad public key");const r=s.keyFromPrivate(t),i=s.keyFromPublic(e),o=r.derive(i.getPublic());return n.from(o.toArray())},M=S,C=async function(t,e){h(n.isBuffer(t),"Bad private key"),h(n.isBuffer(e),"Bad public key"),h(32===t.length,"Bad private key"),h(d(t),"Bad private key"),h(65===e.length||33===e.length,"Bad public key"),65===e.length&&h(4===e[0],"Bad public key"),33===e.length&&h(2===e[0]||3===e[0],"Bad public key");const r=s.keyFromPrivate(t),i=s.keyFromPublic(e),o=r.derive(i.getPublic());return n.from(o.toString(16,64),"hex")},k=async function(t,e,r){let i=(r=r||{}).ephemPrivateKey||p(32);for(;!d(i);)i=r.ephemPrivateKey||p(32);const o=w(i),a=await M(i,t),s=await g(a),u=r.iv||p(16),c=s.slice(0,32),l=s.slice(32),f=await y(u,n.from(c),e),h=n.concat([u,o,f]);return{iv:u,ephemPublicKey:o,ciphertext:f,mac:await v(n.from(l),h)}},x=async function(t,e,r){const i=null!==r&&void 0!==r&&r,o=i?C:M,a=await o(t,e.ephemPublicKey),s=await g(a),u=s.slice(0,32),c=s.slice(32),l=n.concat([e.iv,e.ephemPublicKey,e.ciphertext]),f=await async function(t,e,r){return function(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n")}}function d(t){const e=1+t.byteSize,r={write:function(e,r,n){Object(o.d)(t,"coption inner type ".concat(t.description," needs to be fixed before calling write")),Object(i.strict)(null!=n,"coptionSome cannot handle `null` values"),e[r]=c,t.write(e,r+1,n)},read:function(e,r){return Object(o.d)(t,"coption inner type ".concat(t.description," needs to be fixed before calling read")),Object(i.strict)(l(e,r),"coptionSome can only handle `SOME` data"),t.read(e,r+1)},description:"COption<".concat(t.description,">[1 + ").concat(t.byteSize,"]"),byteSize:e,inner:t};return Object(a.c)(r.description),r}function p(t){return{toFixedFromData(e,r){if(l(e,r)){return d(Object(s.a)(t,e,r+1))}return Object(i.strict)(f(e,r),"Expected ".concat(e," to hold a COption")),h(t.description)},toFixedFromValue:e=>null==e?h(t.description):d(Object(s.b)(t,e)),description:"COption<".concat(t.description,">")}}const g={option:{beet:"coption",isFixable:!0,sourcePack:o.a,ts:"COption",arg:o.b,pack:o.a}};var m=r(160),y=r(719);function b(t,e){return e?"".concat(t):t}function v(t){const e=Object.keys(t);return{write(r,n,o){const a="number"===typeof o,s=b(o,a);if(e.includes(s)||i.strict.fail("".concat(o," should be a variant of the provided enum type, i.e. [ ").concat(Object.values(t).join(", ")," ], but isn't")),a)m.p.write(r,n,o);else{const e=t[s];m.p.write(r,n,e)}},read(r,n){const o=m.p.read(r,n),a="number"===typeof o,s=b(o,a);return e.includes(s)||i.strict.fail("".concat(o," should be a of a variant of the provided enum type, i.e. [ ").concat(Object.values(t).join(", ")," ], but isn't")),a?o:t[s]},byteSize:m.p.byteSize,description:"Enum"}}function A(t){return{write:function(e,r,n){m.p.write(e,r,n.kind),t.write(e,r+1,n.data)},read:function(e,r){return{kind:m.p.read(e,r),data:t.read(e,r+1)}},byteSize:1+t.byteSize,description:"DataEnum<".concat(t.description,">")}}const w={fixedScalarEnum:{beet:"fixedScalarEnum",isFixable:!1,sourcePack:o.a,ts:"",arg:o.b,pack:o.a},dataEnum:{beet:"dataEnum",isFixable:!1,sourcePack:o.a,ts:"DataEnum",arg:o.b,pack:o.a}};var _=r(596);class E{constructor(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E.description;if(this.fields=t,this.construct=e,this.description=r,this.byteSize=this.getByteSize(),a.b.enabled){const e=t.map((t=>{let[e,r]=t;return"".concat(e,": ").concat(r.description," ").concat(Object(a.a)(r))})).join("\n ");Object(a.b)("struct ".concat(r," {\n ").concat(e,"\n} ").concat(Object(a.a)(this)))}}read(t,e){const[r]=this.deserialize(t,e);return r}write(t,e,r){const[n,i]=this.serialize(r);n.copy(t,e,0,i)}deserialize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;a.c.enabled&&(Object(a.c)("deserializing [%s] from %d bytes buffer",this.description,t.byteLength),Object(a.c)(t),Object(a.c)(t.toJSON().data));const r=new _.a(t,e),n=r.readStruct(this.fields);return[this.construct(n),r.offset]}serialize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteSize;Object(a.c)("serializing [%s] %o to %d bytes buffer",this.description,t,e);const r=new _.b(e);return r.writeStruct(t,this.fields),[r.buffer,r.offset]}getByteSize(){return this.fields.reduce(((t,e)=>{let[r,n]=e;return t+n.byteSize}),0)}}E.description="BeetStruct";class I extends E{constructor(t){super(t,(t=>t),arguments.length>1&&void 0!==arguments[1]?arguments[1]:I.description)}}I.description="BeetArgsStruct";var S=r(739),M=r.n(S);const{brightBlack:C}=M.a;class k{constructor(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k.description;this.fields=t,this.construct=e,this.description=r;let n=0;if(a.b.enabled){const e=t.map((t=>{let[e,r]=t;return Object(o.g)(r)&&(n+=r.byteSize),"".concat(e,": ").concat(r.description," ").concat(Object(a.a)(r))})).join("\n "),i="> ".concat(n," B");Object(a.b)("struct ".concat(r," {\n ").concat(e,"\n} ").concat(C(i)))}}deserialize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.toFixedFromData(t,e).deserialize(t,e)}serialize(t,e){return this.toFixedFromValue(t).serialize(t,e)}toFixedFromData(t,e){let r=e;const n=new Array(this.fields.length);for(let i=0;it),arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.description)}}x.description="FixableBeetArgsStruct";const B={...n.b,...y.b,...g,...w,...m.i}},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(51),i=r(354),o=r(726);function a(t,e){return e?Object(o.a)(t,e):t instanceof n.a?t:new n.a(Object(i.a)(t))}},function(t,e,r){"use strict";r.d(e,"d",(function(){return d})),r.d(e,"g",(function(){return g})),r.d(e,"e",(function(){return y})),r.d(e,"c",(function(){return b})),r.d(e,"a",(function(){return _})),r.d(e,"f",(function(){return E})),r.d(e,"b",(function(){return S}));var n=r(615),i=r(126),o=r(76),a=r(310);const s=new o.a(a.a),u={};let c={calldata:!0,memory:!0,storage:!0},l={calldata:!0,memory:!0};function f(t,e){if("bytes"===t||"string"===t){if(c[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&l[e])return!0;return(c[e]||"payable"===e)&&s.throwArgumentError("invalid modifier","name",e),!1}function h(t,e){for(let r in e)Object(i.b)(t,r,e[r])}const d=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),p=new RegExp(/^(.*)\[([0-9]*)\]$/);class g{constructor(t,e){t!==u&&s.throwError("use fromString",o.a.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),h(this,e);let r=this.type.match(p);h(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:g.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=d.sighash),d[t]||s.throwArgumentError("invalid format type","format",t),t===d.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==d.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===d.full?", ":",")+")"):e+=this.type,t!==d.sighash&&(!0===this.indexed&&(e+=" indexed"),t===d.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"===typeof t?g.fromString(t,e):g.fromObject(t)}static fromObject(t){return g.isParamType(t)?t:new g(u,{name:t.name||null,type:M(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(g.fromObject):null})}static fromString(t,e){return r=function(t,e){let r=t;function n(e){s.throwArgumentError("unexpected character at position ".concat(e),"param",t)}function i(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},a=o;for(let s=0;sg.fromString(t,e)))}class y{constructor(t,e){t!==u&&s.throwError("use a static from method",o.a.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),h(this,e),this._isFragment=!0,Object.freeze(this)}static from(t){return y.isFragment(t)?t:"string"===typeof t?y.fromString(t):y.fromObject(t)}static fromObject(t){if(y.isFragment(t))return t;switch(t.type){case"function":return E.fromObject(t);case"event":return b.fromObject(t);case"constructor":return _.fromObject(t);case"error":return S.fromObject(t);case"fallback":case"receive":return null}return s.throwArgumentError("invalid fragment object","value",t)}static fromString(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?b.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?E.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?_.fromString(t.trim()):"error"===t.split(" ")[0]?S.fromString(t.substring(5).trim()):s.throwArgumentError("unsupported fragment","value",t)}static isFragment(t){return!(!t||!t._isFragment)}}class b extends y{format(t){if(t||(t=d.sighash),d[t]||s.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",t!==d.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}static from(t){return"string"===typeof t?b.fromString(t):b.fromObject(t)}static fromObject(t){if(b.isEventFragment(t))return t;"event"!==t.type&&s.throwArgumentError("invalid event object","value",t);const e={name:k(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(g.fromObject):[],type:"event"};return new b(u,e)}static fromString(t){let e=t.match(x);e||s.throwArgumentError("invalid event string","value",t);let r=!1;return e[3].split(" ").forEach((t=>{switch(t.trim()){case"anonymous":r=!0;break;case"":break;default:s.warn("unknown modifier: "+t)}})),b.fromObject({name:e[1].trim(),anonymous:r,inputs:m(e[2],!0),type:"event"})}static isEventFragment(t){return t&&t._isFragment&&"event"===t.type}}function v(t,e){e.gas=null;let r=t.split("@");return 1!==r.length?(r.length>2&&s.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||s.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=n.a.from(r[1]),r[0]):t}function A(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function w(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&s.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&s.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||s.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&s.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&s.throwArgumentError("unable to determine stateMutability","value",t),e}class _ extends y{format(t){if(t||(t=d.sighash),d[t]||s.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});t===d.sighash&&s.throwError("cannot format a constructor for sighash",o.a.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let e="constructor("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}static from(t){return"string"===typeof t?_.fromString(t):_.fromObject(t)}static fromObject(t){if(_.isConstructorFragment(t))return t;"constructor"!==t.type&&s.throwArgumentError("invalid constructor object","value",t);let e=w(t);e.constant&&s.throwArgumentError("constructor cannot be constant","value",t);const r={name:null,type:t.type,inputs:t.inputs?t.inputs.map(g.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?n.a.from(t.gas):null};return new _(u,r)}static fromString(t){let e={type:"constructor"},r=(t=v(t,e)).match(x);return r&&"constructor"===r[1].trim()||s.throwArgumentError("invalid constructor string","value",t),e.inputs=m(r[2].trim(),!1),A(r[3].trim(),e),_.fromObject(e)}static isConstructorFragment(t){return t&&t._isFragment&&"constructor"===t.type}}class E extends _{format(t){if(t||(t=d.sighash),d[t]||s.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",t!==d.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((e=>e.format(t))).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}static from(t){return"string"===typeof t?E.fromString(t):E.fromObject(t)}static fromObject(t){if(E.isFunctionFragment(t))return t;"function"!==t.type&&s.throwArgumentError("invalid function object","value",t);let e=w(t);const r={type:t.type,name:k(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(g.fromObject):[],outputs:t.outputs?t.outputs.map(g.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?n.a.from(t.gas):null};return new E(u,r)}static fromString(t){let e={type:"function"},r=(t=v(t,e)).split(" returns ");r.length>2&&s.throwArgumentError("invalid function string","value",t);let n=r[0].match(x);if(n||s.throwArgumentError("invalid function signature","value",t),e.name=n[1].trim(),e.name&&k(e.name),e.inputs=m(n[2],!1),A(n[3].trim(),e),r.length>1){let n=r[1].match(x);""==n[1].trim()&&""==n[3].trim()||s.throwArgumentError("unexpected tokens","value",t),e.outputs=m(n[2],!1)}else e.outputs=[];return E.fromObject(e)}static isFunctionFragment(t){return t&&t._isFragment&&"function"===t.type}}function I(t){const e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||s.throwArgumentError("cannot specify user defined ".concat(e," error"),"fragment",t),t}class S extends y{format(t){if(t||(t=d.sighash),d[t]||s.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="error "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",e.trim()}static from(t){return"string"===typeof t?S.fromString(t):S.fromObject(t)}static fromObject(t){if(S.isErrorFragment(t))return t;"error"!==t.type&&s.throwArgumentError("invalid error object","value",t);const e={type:t.type,name:k(t.name),inputs:t.inputs?t.inputs.map(g.fromObject):[]};return I(new S(u,e))}static fromString(t){let e={type:"error"},r=t.match(x);return r||s.throwArgumentError("invalid error signature","value",t),e.name=r[1].trim(),e.name&&k(e.name),e.inputs=m(r[2],!1),I(S.fromObject(e))}static isErrorFragment(t){return t&&t._isFragment&&"error"===t.type}}function M(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const C=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function k(t){return t&&t.match(C)||s.throwArgumentError('invalid identifier "'.concat(t,'"'),"value",t),t}const x=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return i}));const n="2.3.13",i="2"},function(t,e,r){"use strict";r.d(e,"e",(function(){return n})),r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return a})),r.d(e,"c",(function(){return s})),r.d(e,"d",(function(){return u}));r(33),r(773),r(314);const n={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:t=>"@media (min-width:".concat(n[t],"px)")};function o(t,e,r){const o=t.theme||{};if(Array.isArray(e)){const t=o.breakpoints||i;return e.reduce(((n,i,o)=>(n[t.up(t.keys[o])]=r(e[o]),n)),{})}if("object"===typeof e){const t=o.breakpoints||i;return Object.keys(e).reduce(((i,o)=>{if(-1!==Object.keys(t.values||n).indexOf(o)){i[t.up(o)]=r(e[o],o)}else{const t=o;i[t]=e[t]}return i}),{})}return r(e)}function a(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var e;return(null==t||null==(e=t.keys)?void 0:e.reduce(((e,r)=>(e[t.up(r)]={},e)),{}))||{}}function s(t,e){return t.reduce(((t,e)=>{const r=t[e];return(!r||0===Object.keys(r).length)&&delete t[e],t}),e)}function u(t){let{values:e,breakpoints:r,base:n}=t;const i=n||function(t,e){if("object"!==typeof t)return{};const r={},n=Object.keys(e);return Array.isArray(t)?n.forEach(((e,n)=>{n{null!=t[e]&&(r[e]=!0)})),r}(e,r),o=Object.keys(i);if(0===o.length)return e;let a;return o.reduce(((t,r,n)=>(Array.isArray(e)?(t[r]=null!=e[n]?e[n]:e[a],a=n):(t[r]=null!=e[r]?e[r]:e[a]||e,a=r),t)),{})}},function(t,e){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";const n=r(2384),i=r(2385),o=r(1162),a=r(1163),s=Symbol("encodeFragmentIdentifier");function u(t){if("string"!==typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function c(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function l(t,e){return e.decode?i(t):t}function f(t){return Array.isArray(t)?t.sort():"object"===typeof t?f(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function h(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function d(t){const e=(t=h(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function p(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"===typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function g(t,e){u((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const r=function(t){let e;switch(t.arrayFormat){case"index":return(t,r,n)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return(t,r,n)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};case"colon-list-separator":return(t,r,n)=>{e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};case"comma":case"separator":return(e,r,n)=>{const i="string"===typeof r&&r.includes(t.arrayFormatSeparator),o="string"===typeof r&&!i&&l(r,t).includes(t.arrayFormatSeparator);r=o?l(r,t):r;const a=i||o?r.split(t.arrayFormatSeparator).map((e=>l(e,t))):null===r?r:l(r,t);n[e]=a};case"bracket-separator":return(e,r,n)=>{const i=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!i)return void(n[e]=r?l(r,t):r);const o=null===r?[]:r.split(t.arrayFormatSeparator).map((e=>l(e,t)));void 0!==n[e]?n[e]=[].concat(n[e],o):n[e]=o};default:return(t,e,r)=>{void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e),n=Object.create(null);if("string"!==typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const i of t.split("&")){if(""===i)continue;let[t,a]=o(e.decode?i.replace(/\+/g," "):i,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:l(a,e),r(l(t,e),a,n)}for(const i of Object.keys(n)){const t=n[i];if("object"===typeof t&&null!==t)for(const r of Object.keys(t))t[r]=p(t[r],e);else n[i]=p(t,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce(((t,e)=>{const r=n[e];return Boolean(r)&&"object"===typeof r&&!Array.isArray(r)?t[e]=f(r):t[e]=r,t}),Object.create(null))}e.extract=d,e.parse=g,e.stringify=(t,e)=>{if(!t)return"";u((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const r=r=>{return e.skipNull&&(null===(n=t[r])||void 0===n)||e.skipEmptyString&&""===t[r];var n},n=function(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const i=r.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[c(e,t),"[",i,"]"].join("")]:[...r,[c(e,t),"[",c(i,t),"]=",c(n,t)].join("")]};case"bracket":return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[c(e,t),"[]"].join("")]:[...r,[c(e,t),"[]=",c(n,t)].join("")];case"colon-list-separator":return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[c(e,t),":list="].join("")]:[...r,[c(e,t),":list=",c(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===t.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||t.skipNull&&null===i||t.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[c(r,t),e,c(i,t)].join("")]:[[n,c(i,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,c(e,t)]:[...r,[c(e,t),"=",c(n,t)].join("")]}}(e),i={};for(const a of Object.keys(t))r(a)||(i[a]=t[a]);const o=Object.keys(i);return!1!==e.sort&&o.sort(e.sort),o.map((r=>{const i=t[r];return void 0===i?"":null===i?c(r,e):Array.isArray(i)?0===i.length&&"bracket-separator"===e.arrayFormat?c(r,e)+"[]":i.reduce(n(r),[]).join("&"):c(r,e)+"="+c(i,e)})).filter((t=>t.length>0)).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[r,n]=o(t,"#");return Object.assign({url:r.split("?")[0]||"",query:g(d(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:l(n,e)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0,[s]:!0},r);const n=h(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),a=Object.assign(o,t.query);let u=e.stringify(a,r);u&&(u="?".concat(u));let l=function(t){let e="";const r=t.indexOf("#");return-1!==r&&(e=t.slice(r)),e}(t.url);return t.fragmentIdentifier&&(l="#".concat(r[s]?c(t.fragmentIdentifier,r):t.fragmentIdentifier)),"".concat(n).concat(u).concat(l)},e.pick=(t,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[s]:!1},n);const{url:i,query:o,fragmentIdentifier:u}=e.parseUrl(t,n);return e.stringifyUrl({url:i,query:a(o,r),fragmentIdentifier:u},n)},e.exclude=(t,r,n)=>{const i=Array.isArray(r)?t=>!r.includes(t):(t,e)=>!r(t,e);return e.pick(t,i,n)}},function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.TextApiResponse=e.BlobApiResponse=e.VoidApiResponse=e.JSONApiResponse=e.canConsumeForm=e.mapValues=e.querystring=e.exists=e.Configuration=e.COLLECTION_FORMATS=e.RequiredError=e.BaseAPI=e.BASE_PATH=void 0,e.BASE_PATH="https://ethereum-api.rarible.org".replace(/\/+$/,"");e.BaseAPI=class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new o;this.configuration=t,this.fetchApi=(t,e)=>n(this,void 0,void 0,(function*(){let r,n={url:t,init:e};for(const t of this.middleware)t.pre&&(n=(yield t.pre(Object.assign({fetch:this.fetchApi},n)))||n);try{r=yield this.configuration.fetchApi(n.url,n.init)}catch(i){if(r=yield this.configuration.exceptionHandler(i,n.url,n.init),void 0===r)throw i}for(const o of this.middleware)o.post&&(r=(yield o.post({fetch:this.fetchApi,url:t,init:e,response:r.clone()}))||r);return r})),this.middleware=t.middleware}withMiddleware(){const t=this.clone();return t.middleware=t.middleware.concat(...arguments),t}withPreMiddleware(){for(var t=arguments.length,e=new Array(t),r=0;r({pre:t})));return this.withMiddleware(...n)}withPostMiddleware(){for(var t=arguments.length,e=new Array(t),r=0;r({post:t})));return this.withMiddleware(...n)}request(t){return n(this,void 0,void 0,(function*(){const{url:e,init:r}=this.createFetchParams(t);return this.fetchApi(e,r)}))}createFetchParams(t){let e=this.configuration.basePath+t.path;void 0!==t.query&&0!==Object.keys(t.query).length&&(e+="?"+this.configuration.queryParamsStringify(t.query));const r=t.body instanceof FormData||t.body instanceof URLSearchParams||(n=t.body,"undefined"!==typeof Blob&&n instanceof Blob)?t.body:JSON.stringify(t.body);var n;const i=Object.assign({},this.configuration.headers,t.headers);return{url:e,init:{method:t.method,headers:i,body:r,credentials:this.configuration.credentials}}}clone(){const t=new(0,this.constructor)(this.configuration);return t.middleware=this.middleware.slice(),t}};class i extends Error{constructor(t,e){super(e),this.field=t,this.name="RequiredError"}}e.RequiredError=i,e.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"};class o{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.configuration=t}get basePath(){return null!=this.configuration.basePath?this.configuration.basePath:e.BASE_PATH}get fetchApi(){return this.configuration.fetchApi||window.fetch.bind(window)}get exceptionHandler(){var t;return null!==(t=this.configuration.exceptionHandler)&&void 0!==t?t:()=>{}}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||a}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return"function"===typeof t?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return"function"===typeof t?t:()=>t}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.keys(t).map((r=>{const n=e+(e.length?"[".concat(r,"]"):r),i=t[r];if(i instanceof Array){const t=i.map((t=>encodeURIComponent(String(t)))).join("&".concat(encodeURIComponent(n),"="));return"".concat(encodeURIComponent(n),"=").concat(t)}return i instanceof Object?a(i,n):"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(String(i)))})).filter((t=>t.length>0)).join("&")}e.Configuration=o,e.exists=function(t,e){const r=t[e];return null!==r&&void 0!==r},e.querystring=a,e.mapValues=function(t,e){return Object.keys(t).reduce(((r,n)=>Object.assign(Object.assign({},r),{[n]:e(t[n])})),{})},e.canConsumeForm=function(t){for(const e of t)if("multipart/form-data"===e.contentType)return!0;return!1};e.JSONApiResponse=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t=>t;this.raw=t,this.transformer=e}value(){return n(this,void 0,void 0,(function*(){return this.transformer(yield this.raw.json())}))}};e.VoidApiResponse=class{constructor(t){this.raw=t}value(){return n(this,void 0,void 0,(function*(){}))}};e.BlobApiResponse=class{constructor(t){this.raw=t}value(){return n(this,void 0,void 0,(function*(){return yield this.raw.blob()}))}};e.TextApiResponse=class{constructor(t){this.raw=t}value(){return n(this,void 0,void 0,(function*(){return yield this.raw.text()}))}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return o}));var n=r(51),i=new n.a((function(t){return t.complete()}));function o(t){return t?function(t){return new n.a((function(e){return t.schedule((function(){return e.complete()}))}))}(t):i}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.keccak512=e.keccak384=e.keccak256=e.keccak224=void 0;const n=r(2817),i=r(301);e.keccak224=(0,i.wrapHash)(n.keccak_224),e.keccak256=(()=>{const t=(0,i.wrapHash)(n.keccak_256);return t.create=n.keccak_256.create,t})(),e.keccak384=(0,i.wrapHash)(n.keccak_384),e.keccak512=(0,i.wrapHash)(n.keccak_512)},function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return c})),r.d(e,"c",(function(){return l})),r.d(e,"d",(function(){return f})),r.d(e,"e",(function(){return m})),r.d(e,"f",(function(){return y}));var n,i=r(33);!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(n||(n={}));var o=function(t){return t};var a="beforeunload",s="hashchange",u="popstate";function c(t){void 0===t&&(t={});var e=t.window,r=void 0===e?document.defaultView:e,s=r.history;function c(){var t=r.location,e=t.pathname,n=t.search,i=t.hash,a=s.state||{};return[a.idx,o({pathname:e,search:n,hash:i,state:a.usr||null,key:a.key||"default"})]}var l=null;r.addEventListener(u,(function(){if(l)w.call(l),l=null;else{var t=n.Pop,e=c(),r=e[0],i=e[1];if(w.length){if(null!=r){var o=b-r;o&&(l={action:t,location:i,retry:function(){C(-1*o)}},C(o))}}else M(t)}}));var f=n.Pop,h=c(),b=h[0],v=h[1],A=p(),w=p();function _(t){return"string"===typeof t?t:m(t)}function E(t,e){return void 0===e&&(e=null),o(Object(i.a)({pathname:v.pathname,hash:"",search:""},"string"===typeof t?y(t):t,{state:e,key:g()}))}function I(t,e){return[{usr:t.state,key:t.key,idx:e},_(t)]}function S(t,e,r){return!w.length||(w.call({action:t,location:e,retry:r}),!1)}function M(t){f=t;var e=c();b=e[0],v=e[1],A.call({action:f,location:v})}function C(t){s.go(t)}null==b&&(b=0,s.replaceState(Object(i.a)({},s.state,{idx:b}),""));var k={get action(){return f},get location(){return v},createHref:_,push:function t(e,i){var o=n.Push,a=E(e,i);if(S(o,a,(function(){t(e,i)}))){var u=I(a,b+1),c=u[0],l=u[1];try{s.pushState(c,"",l)}catch(f){r.location.assign(l)}M(o)}},replace:function t(e,r){var i=n.Replace,o=E(e,r);if(S(i,o,(function(){t(e,r)}))){var a=I(o,b),u=a[0],c=a[1];s.replaceState(u,"",c),M(i)}},go:C,back:function(){C(-1)},forward:function(){C(1)},listen:function(t){return A.push(t)},block:function(t){var e=w.push(t);return 1===w.length&&r.addEventListener(a,d),function(){e(),w.length||r.removeEventListener(a,d)}}};return k}function l(t){void 0===t&&(t={});var e=t.window,r=void 0===e?document.defaultView:e,c=r.history;function l(){var t=y(r.location.hash.substr(1)),e=t.pathname,n=void 0===e?"/":e,i=t.search,a=void 0===i?"":i,s=t.hash,u=void 0===s?"":s,l=c.state||{};return[l.idx,o({pathname:n,search:a,hash:u,state:l.usr||null,key:l.key||"default"})]}var f=null;function h(){if(f)E.call(f),f=null;else{var t=n.Pop,e=l(),r=e[0],i=e[1];if(E.length){if(null!=r){var o=A-r;o&&(f={action:t,location:i,retry:function(){x(-1*o)}},x(o))}}else k(t)}}r.addEventListener(u,h),r.addEventListener(s,(function(){m(l()[1])!==m(w)&&h()}));var b=n.Pop,v=l(),A=v[0],w=v[1],_=p(),E=p();function I(t){return function(){var t=document.querySelector("base"),e="";if(t&&t.getAttribute("href")){var n=r.location.href,i=n.indexOf("#");e=-1===i?n:n.slice(0,i)}return e}()+"#"+("string"===typeof t?t:m(t))}function S(t,e){return void 0===e&&(e=null),o(Object(i.a)({pathname:w.pathname,hash:"",search:""},"string"===typeof t?y(t):t,{state:e,key:g()}))}function M(t,e){return[{usr:t.state,key:t.key,idx:e},I(t)]}function C(t,e,r){return!E.length||(E.call({action:t,location:e,retry:r}),!1)}function k(t){b=t;var e=l();A=e[0],w=e[1],_.call({action:b,location:w})}function x(t){c.go(t)}null==A&&(A=0,c.replaceState(Object(i.a)({},c.state,{idx:A}),""));var B={get action(){return b},get location(){return w},createHref:I,push:function t(e,i){var o=n.Push,a=S(e,i);if(C(o,a,(function(){t(e,i)}))){var s=M(a,A+1),u=s[0],l=s[1];try{c.pushState(u,"",l)}catch(f){r.location.assign(l)}k(o)}},replace:function t(e,r){var i=n.Replace,o=S(e,r);if(C(i,o,(function(){t(e,r)}))){var a=M(o,A),s=a[0],u=a[1];c.replaceState(s,"",u),k(i)}},go:x,back:function(){x(-1)},forward:function(){x(1)},listen:function(t){return _.push(t)},block:function(t){var e=E.push(t);return 1===E.length&&r.addEventListener(a,d),function(){e(),E.length||r.removeEventListener(a,d)}}};return B}function f(t){void 0===t&&(t={});var e=t,r=e.initialEntries,a=void 0===r?["/"]:r,s=e.initialIndex,u=a.map((function(t){return o(Object(i.a)({pathname:"/",search:"",hash:"",state:null,key:g()},"string"===typeof t?y(t):t))})),c=h(null==s?u.length-1:s,0,u.length-1),l=n.Pop,f=u[c],d=p(),b=p();function v(t,e){return void 0===e&&(e=null),o(Object(i.a)({pathname:f.pathname,search:"",hash:""},"string"===typeof t?y(t):t,{state:e,key:g()}))}function A(t,e,r){return!b.length||(b.call({action:t,location:e,retry:r}),!1)}function w(t,e){l=t,f=e,d.call({action:l,location:f})}function _(t){var e=h(c+t,0,u.length-1),r=n.Pop,i=u[e];A(r,i,(function(){_(t)}))&&(c=e,w(r,i))}var E={get index(){return c},get action(){return l},get location(){return f},createHref:function(t){return"string"===typeof t?t:m(t)},push:function t(e,r){var i=n.Push,o=v(e,r);A(i,o,(function(){t(e,r)}))&&(c+=1,u.splice(c,u.length,o),w(i,o))},replace:function t(e,r){var i=n.Replace,o=v(e,r);A(i,o,(function(){t(e,r)}))&&(u[c]=o,w(i,o))},go:_,back:function(){_(-1)},forward:function(){_(1)},listen:function(t){return d.push(t)},block:function(t){return b.push(t)}};return E}function h(t,e,r){return Math.min(Math.max(t,e),r)}function d(t){t.preventDefault(),t.returnValue=""}function p(){var t=[];return{get length(){return t.length},push:function(e){return t.push(e),function(){t=t.filter((function(t){return t!==e}))}},call:function(e){t.forEach((function(t){return t&&t(e)}))}}}function g(){return Math.random().toString(36).substr(2,8)}function m(t){var e=t.pathname,r=void 0===e?"/":e,n=t.search,i=void 0===n?"":n,o=t.hash,a=void 0===o?"":o;return i&&"?"!==i&&(r+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(r+="#"===a.charAt(0)?a:"#"+a),r}function y(t){var e={};if(t){var r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));var n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}},function(t,e,r){"use strict";(function(t){r.d(e,"p",(function(){return a})),r.d(e,"k",(function(){return s})),r.d(e,"m",(function(){return u})),r.d(e,"o",(function(){return l})),r.d(e,"j",(function(){return f})),r.d(e,"l",(function(){return h})),r.d(e,"n",(function(){return d})),r.d(e,"h",(function(){return p})),r.d(e,"c",(function(){return g})),r.d(e,"e",(function(){return m})),r.d(e,"g",(function(){return b})),r.d(e,"b",(function(){return v})),r.d(e,"d",(function(){return A})),r.d(e,"f",(function(){return w})),r.d(e,"a",(function(){return _})),r.d(e,"i",(function(){return E}));var n=r(457),i=r.n(n),o=r(55);const a={write:function(t,e,r){t.writeUInt8(r,e)},read:function(t,e){return t.readUInt8(e)},byteSize:1,description:"u8"},s={write:function(t,e,r){t.writeUInt16LE(r,e)},read:function(t,e){return t.readUInt16LE(e)},byteSize:2,description:"u16"},u={write:function(t,e,r){t.writeUInt32LE(r,e)},read:function(t,e){return t.readUInt32LE(e)},byteSize:4,description:"u32"};function c(e,r){return{write:function(e,r,n){const o=(i.a.isBN(n)?n:new i.a(n)).toArray("le",this.byteSize);t.from(o).copy(e,r,0,this.byteSize)},read:function(t,e){const r=t.slice(e,e+this.byteSize);return new i.a(r,"le")},byteSize:e,description:r}}const l=c(8,"u64"),f=c(16,"u128"),h=c(32,"u256"),d=c(64,"u512"),p={write:function(t,e,r){t.writeInt8(r,e)},read:function(t,e){return t.readInt8(e)},byteSize:1,description:"i8"},g={write:function(t,e,r){t.writeInt16LE(r,e)},read:function(t,e){return t.readInt16LE(e)},byteSize:2,description:"i16"},m={write:function(t,e,r){t.writeInt32LE(r,e)},read:function(t,e){return t.readInt32LE(e)},byteSize:4,description:"i32"};function y(e,r){const n=8*e;return{write:function(e,r,o){const a=(i.a.isBN(o)?o:new i.a(o)).toTwos(n).toArray("le",this.byteSize);t.from(a).copy(e,r,0,this.byteSize)},read:function(t,e){const r=t.slice(e,e+this.byteSize);return new i.a(r,"le").fromTwos(n)},byteSize:e,description:r}}const b=y(8,"i64"),v=y(16,"i128"),A=y(32,"i256"),w=y(64,"i512"),_={write:function(t,e,r){const n=r?1:0;a.write(t,e,n)},read:function(t,e){return 1===a.read(t,e)},byteSize:1,description:"bool"},E={u8:{beet:"u8",isFixable:!1,sourcePack:o.a,ts:"number"},u16:{beet:"u16",isFixable:!1,sourcePack:o.a,ts:"number"},u32:{beet:"u32",isFixable:!1,sourcePack:o.a,ts:"number"},i8:{beet:"i8",isFixable:!1,sourcePack:o.a,ts:"number"},i16:{beet:"i16",isFixable:!1,sourcePack:o.a,ts:"number"},i32:{beet:"i32",isFixable:!1,sourcePack:o.a,ts:"number"},bool:{beet:"bool",isFixable:!1,sourcePack:o.a,ts:"boolean"},u64:{beet:"u64",isFixable:!1,sourcePack:o.a,ts:"bignum",pack:o.a},u128:{beet:"u128",isFixable:!1,sourcePack:o.a,ts:"bignum",pack:o.a},u256:{beet:"u256",isFixable:!1,sourcePack:o.a,ts:"bignum",pack:o.a},u512:{beet:"u512",isFixable:!1,sourcePack:o.a,ts:"bignum",pack:o.a},i64:{beet:"i64",isFixable:!1,sourcePack:o.a,ts:"bignum",pack:o.a},i128:{beet:"i128",isFixable:!1,sourcePack:o.a,ts:"bignum",pack:o.a},i256:{beet:"i256",isFixable:!1,sourcePack:o.a,ts:"bignum",pack:o.a},i512:{beet:"i512",isFixable:!1,sourcePack:o.a,ts:"bignum",pack:o.a}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";r.d(e,"b",(function(){return c})),r.d(e,"c",(function(){return l})),r.d(e,"a",(function(){return f}));var n=r(454),i=r.n(n),o=r(739),a=r.n(o),s=r(55);const{brightBlack:u}=a.a,c=(i()("beet:error"),i()("beet:info"),i()("beet:debug")),l=i()("beet:trace");function f(t){let e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Object(s.f)(t))e="? B";else if(Object(s.e)(t)){const n=r?"length":t.length,i=t.lenPrefixByteSize;e=i>0?"".concat(i," + (").concat(t.elementByteSize," * ").concat(n,") B (").concat(t.byteSize," B)"):"(".concat(t.elementByteSize," * ").concat(n,") B (").concat(t.byteSize," B)")}else e="".concat(t.byteSize," B");return u(e)}},function(t,e,r){var n=r(2687);t.exports=function(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";r.r(e),r.d(e,"keccak256",(function(){return a}));var n=r(112),i=r.n(n),o=r(1);function a(t){return"0x"+i.a.keccak_256(Object(o.a)(t))}},function(t,e,r){"use strict";t.exports={ArrayIsArray:t=>Array.isArray(t),ArrayPrototypeIncludes:(t,e)=>t.includes(e),ArrayPrototypeIndexOf:(t,e)=>t.indexOf(e),ArrayPrototypeJoin:(t,e)=>t.join(e),ArrayPrototypeMap:(t,e)=>t.map(e),ArrayPrototypePop:(t,e)=>t.pop(e),ArrayPrototypePush:(t,e)=>t.push(e),ArrayPrototypeSlice:(t,e,r)=>t.slice(e,r),Error:Error,FunctionPrototypeCall(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;iFunction.prototype[Symbol.hasInstance].call(t,e),MathFloor:Math.floor,Number:Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(t,e)=>Object.defineProperties(t,e),ObjectDefineProperty:(t,e,r)=>Object.defineProperty(t,e,r),ObjectGetOwnPropertyDescriptor:(t,e)=>Object.getOwnPropertyDescriptor(t,e),ObjectKeys:t=>Object.keys(t),ObjectSetPrototypeOf:(t,e)=>Object.setPrototypeOf(t,e),Promise:Promise,PromisePrototypeCatch:(t,e)=>t.catch(e),PromisePrototypeThen:(t,e,r)=>t.then(e,r),PromiseReject:t=>Promise.reject(t),ReflectApply:Reflect.apply,RegExpPrototypeTest:(t,e)=>t.test(e),SafeSet:Set,String:String,StringPrototypeSlice:(t,e,r)=>t.slice(e,r),StringPrototypeToLowerCase:t=>t.toLowerCase(),StringPrototypeToUpperCase:t=>t.toUpperCase(),StringPrototypeTrim:t=>t.trim(),Symbol:Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet:(t,e,r)=>t.set(e,r),Uint8Array:Uint8Array}},function(t,e,r){"use strict";(function(e,n){var i=65536,o=4294967295;var a=r(81).Buffer,s=e.crypto||e.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>o)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(t);if(t>0)if(t>i)for(var u=0;uthis.data(t,!0))),type:f.allowNull(u),accessList:f.allowNull(this.accessList.bind(this),null)},t.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:o,address:e,topics:f.arrayOf(o),data:i,logIndex:u,blockHash:o},t.receipt={to:f.allowNull(this.address,null),from:f.allowNull(this.address,null),contractAddress:f.allowNull(e,null),transactionIndex:u,root:f.allowNull(s),gasUsed:r,logsBloom:f.allowNull(i),blockHash:o,transactionHash:o,logs:f.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:f.allowNull(u,null),cumulativeGasUsed:r,effectiveGasPrice:f.allowNull(r),status:f.allowNull(u),type:c},t.block={hash:f.allowNull(o),parentHash:o,number:u,timestamp:u,nonce:f.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:f.allowNull(e),extraData:i,transactions:f.allowNull(f.arrayOf(o)),baseFeePerGas:f.allowNull(r)},t.blockWithTransactions=Object(a.g)(t.block),t.blockWithTransactions.transactions=f.allowNull(f.arrayOf(this.transactionResponse.bind(this))),t.filter={fromBlock:f.allowNull(n,void 0),toBlock:f.allowNull(n,void 0),blockHash:f.allowNull(o,void 0),address:f.allowNull(e,void 0),topics:f.allowNull(this.topics.bind(this),void 0)},t.filterLog={blockNumber:f.allowNull(u),blockHash:f.allowNull(o),transactionIndex:u,removed:f.allowNull(this.boolean.bind(this)),address:e,data:f.allowFalsish(i,"0x"),topics:f.arrayOf(o),transactionHash:o,logIndex:u},t}accessList(t){return Object(s.a)(t||[])}number(t){return"0x"===t?0:i.a.from(t).toNumber()}type(t){return"0x"===t||null==t?0:i.a.from(t).toNumber()}bigNumber(t){return i.a.from(t)}boolean(t){if("boolean"===typeof t)return t;if("string"===typeof t){if("true"===(t=t.toLowerCase()))return!0;if("false"===t)return!1}throw new Error("invalid boolean - "+t)}hex(t,e){return"string"===typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),Object(o.l)(t))?t.toLowerCase():l.throwArgumentError("invalid hash","value",t)}data(t,e){const r=this.hex(t,e);if(r.length%2!==0)throw new Error("invalid data; odd-length - "+t);return r}address(t){return Object(n.a)(t)}callAddress(t){if(!Object(o.l)(t,32))return null;const e=Object(n.a)(Object(o.e)(t,12));return"0x0000000000000000000000000000000000000000"===e?null:e}contractAddress(t){return Object(n.b)(t)}blockTag(t){if(null==t)return"latest";if("earliest"===t)return"0x0";if("latest"===t||"pending"===t)return t;if("number"===typeof t||Object(o.l)(t))return Object(o.g)(t);throw new Error("invalid blockTag")}hash(t,e){const r=this.hex(t,e);return 32!==Object(o.d)(r)?l.throwArgumentError("invalid hash","value",t):r}difficulty(t){if(null==t)return null;const e=i.a.from(t);try{return e.toNumber()}catch(r){}return null}uint256(t){if(!Object(o.l)(t))throw new Error("invalid uint256");return Object(o.h)(t,32)}_block(t,e){null!=t.author&&null==t.miner&&(t.miner=t.author);const r=null!=t._difficulty?t._difficulty:t.difficulty,n=f.check(e,t);return n._difficulty=null==r?null:i.a.from(r),n}block(t){return this._block(t,this.formats.block)}blockWithTransactions(t){return this._block(t,this.formats.blockWithTransactions)}transactionRequest(t){return f.check(this.formats.transactionRequest,t)}transactionResponse(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&i.a.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),1!==t.type&&2!==t.type||null!=t.accessList||(t.accessList=[]);const e=f.check(this.formats.transaction,t);if(null!=t.chainId){let r=t.chainId;Object(o.l)(r)&&(r=i.a.from(r).toNumber()),e.chainId=r}else{let r=t.networkId;null==r&&null==e.v&&(r=t.chainId),Object(o.l)(r)&&(r=i.a.from(r).toNumber()),"number"!==typeof r&&null!=e.v&&(r=(e.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!==typeof r&&(r=0),e.chainId=r}return e.blockHash&&"x"===e.blockHash.replace(/0/g,"")&&(e.blockHash=null),e}transaction(t){return Object(s.b)(t)}receiptLog(t){return f.check(this.formats.receiptLog,t)}receipt(t){const e=f.check(this.formats.receipt,t);if(null!=e.root)if(e.root.length<=4){const t=i.a.from(e.root).toNumber();0===t||1===t?(null!=e.status&&e.status!==t&&l.throwArgumentError("alt-root-status/status mismatch","value",{root:e.root,status:e.status}),e.status=t,delete e.root):l.throwArgumentError("invalid alt-root-status","value.root",e.root)}else 66!==e.root.length&&l.throwArgumentError("invalid root hash","value.root",e.root);return null!=e.status&&(e.byzantium=!0),e}topics(t){return Array.isArray(t)?t.map((t=>this.topics(t))):null!=t?this.hash(t,!0):null}filter(t){return f.check(this.formats.filter,t)}filterLog(t){return f.check(this.formats.filterLog,t)}static check(t,e){const r={};for(const i in t)try{const n=t[i](e[i]);void 0!==n&&(r[i]=n)}catch(n){throw n.checkKey=i,n.checkValue=e[i],n}return r}static allowNull(t,e){return function(r){return null==r?e:t(r)}}static allowFalsish(t,e){return function(r){return r?t(r):e}}static arrayOf(t){return function(e){if(!Array.isArray(e))throw new Error("not an array");const r=[];return e.forEach((function(e){r.push(t(e))})),r}}}function h(t){return t&&"function"===typeof t.isCommunityResource}function d(t){return h(t)&&t.isCommunityResource()}let p=!1;function g(){p||(p=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}},function(t,e,r){"use strict";r.d(e,"b",(function(){return R})),r.d(e,"a",(function(){return P})),r.d(e,"c",(function(){return N}));var n=r(1384),i=r.n(n),o=r(1),a=r(5);var s=i.a.BN;const u=new a.b("bignumber/5.6.2"),c={},l=9007199254740991;let f=!1;class h{constructor(t,e){t!==c&&u.throwError("cannot call constructor directly; use BigNumber.from",a.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return p(g(this).fromTwos(t))}toTwos(t){return p(g(this).toTwos(t))}abs(){return"-"===this._hex[0]?h.from(this._hex.substring(1)):this}add(t){return p(g(this).add(g(t)))}sub(t){return p(g(this).sub(g(t)))}div(t){return h.from(t).isZero()&&m("division-by-zero","div"),p(g(this).div(g(t)))}mul(t){return p(g(this).mul(g(t)))}mod(t){const e=g(t);return e.isNeg()&&m("division-by-zero","mod"),p(g(this).umod(e))}pow(t){const e=g(t);return e.isNeg()&&m("negative-power","pow"),p(g(this).pow(e))}and(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","and"),p(g(this).and(e))}or(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","or"),p(g(this).or(e))}xor(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","xor"),p(g(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&m("negative-width","mask"),p(g(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&m("negative-width","shl"),p(g(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&m("negative-width","shr"),p(g(this).shrn(t))}eq(t){return g(this).eq(g(t))}lt(t){return g(this).lt(g(t))}lte(t){return g(this).lte(g(t))}gt(t){return g(this).gt(g(t))}gte(t){return g(this).gte(g(t))}isNegative(){return"-"===this._hex[0]}isZero(){return g(this).isZero()}toNumber(){try{return g(this).toNumber()}catch(t){m("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return u.throwError("this platform does not support BigInt",a.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?f||(f=!0,u.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?u.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.b.errors.UNEXPECTED_ARGUMENT,{}):u.throwError("BigNumber.toString does not accept parameters",a.b.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof h)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new h(c,d(t)):t.match(/^-?[0-9]+$/)?new h(c,d(new s(t))):u.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&m("underflow","BigNumber.from",t),(t>=l||t<=-l)&&m("overflow","BigNumber.from",t),h.from(String(t));const e=t;if("bigint"===typeof e)return h.from(e.toString());if(Object(o.j)(e))return h.from(Object(o.i)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return h.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&(Object(o.l)(t)||"-"===t[0]&&Object(o.l)(t.substring(1))))return h.from(t)}return u.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function d(t){if("string"!==typeof t)return d(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&u.throwArgumentError("invalid hex","value",t),"0x00"===(t=d(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function p(t){return h.from(d(t))}function g(t){const e=h.from(t).toHexString();return"-"===e[0]?new s("-"+e.substring(3),16):new s(e.substring(2),16)}function m(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),u.throwError(t,a.b.errors.NUMERIC_FAULT,n)}var y=r(112),b=r.n(y);var v,A=r(14),w=r.n(A);!function(t){t.sha256="sha256",t.sha512="sha512"}(v||(v={}));new a.b("sha2/5.6.1");const _=new a.b("strings/5.6.1");var E,I;function S(t,e,r,n,i){if(t===I.BAD_PREFIX||t===I.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6===2;n++)t++;return t}return t===I.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(E||(E={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(I||(I={}));Object.freeze({error:function(t,e,r,n,i){return _.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:S,replace:function(t,e,r,n,i){return t===I.OVERLONG?(n.push(i),0):(n.push(65533),S(t,e,r))}});function M(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E.current;e!=E.current&&(_.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return Object(o.a)(r)}const C=new RegExp("^bytes([0-9]+)$"),k=new RegExp("^(u?int)([0-9]*)$"),x=new RegExp("^(.*)\\[([0-9]*)\\]$"),B="0000000000000000000000000000000000000000000000000000000000000000",O=new a.b("solidity/5.6.1");function T(t,e,r){switch(t){case"address":return r?Object(o.p)(e,32):Object(o.a)(e);case"string":return M(e);case"bytes":return Object(o.a)(e);case"bool":return e=e?"0x01":"0x00",r?Object(o.p)(e,32):Object(o.a)(e)}let n=t.match(k);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||0===i||i>256)&&O.throwArgumentError("invalid number type","type",t),r&&(i=256),e=h.from(e).toTwos(i),Object(o.p)(e,i/8)}if(n=t.match(C),n){const i=parseInt(n[1]);return(String(i)!==n[1]||0===i||i>32)&&O.throwArgumentError("invalid bytes type","type",t),Object(o.a)(e).byteLength!==i&&O.throwArgumentError("invalid value for ".concat(t),"value",e),r?Object(o.a)((e+B).substring(0,66)):e}if(n=t.match(x),n&&Array.isArray(e)){const r=n[1];parseInt(n[2]||String(e.length))!=e.length&&O.throwArgumentError("invalid array length for ".concat(t),"value",e);const i=[];return e.forEach((function(t){i.push(T(r,t,!0))})),Object(o.b)(i)}return O.throwArgumentError("invalid type","type",t)}function R(t,e){t.length!=e.length&&O.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach((function(t,n){r.push(T(t,e[n]))})),Object(o.i)(Object(o.b)(r))}function P(t,e){return r=R(t,e),"0x"+b.a.keccak_256(Object(o.a)(r));var r}function N(t,e){return r=R(t,e),"0x"+w.a.sha256().update(Object(o.a)(r)).digest("hex");var r}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return h})),r.d(e,"b",(function(){return Ht})),r.d(e,"c",(function(){return Gt})),r.d(e,"d",(function(){return qt})),r.d(e,"e",(function(){return zt}));var n,i=r(1419),o=r.n(i),a=r(39),s=r.n(a),u=r(19);class c extends Error{constructor(t){super("The map type '".concat(t,"' is invalid")),this.mapType=t,this.name="InvalidMapTypeError"}}const l=Symbol.for("taquito-michelson-map-type-symbol");class f extends Error{constructor(t,e,r){super("".concat(r," not compliant with underlying michelson type")),this.value=t,this.type=e,this.name="MapTypecheckError"}}class h{constructor(t){this.valueMap=new Map,this.keyMap=new Map,this[n]=!0,t&&this.setType(t)}static isMichelsonMap(t){return t&&!0===t[l]}setType(t){if(!("args"in(e=t))||!Array.isArray(e.args)||2!==e.args.length)throw new c(t.toString());var e;this.keySchema=new Gt(t.args[0]),this.valueSchema=new Gt(t.args[1])}removeType(){this.keySchema=void 0,this.valueSchema=void 0}static fromLiteral(t,e){const r=new h(e);return Object.keys(t).forEach((e=>{r.set(e,t[e])})),r}typecheckKey(t){return!this.keySchema||this.keySchema.Typecheck(t)}typecheckValue(t){return!this.valueSchema||this.valueSchema.Typecheck(t)}assertTypecheckValue(t){if(!this.typecheckValue(t))throw new f(t,this.valueSchema,"value")}assertTypecheckKey(t){if(!this.typecheckKey(t))throw new f(t,this.keySchema,"key")}serializeDeterministically(t){return o()(t)}*keys(){for(const[t]of this.entries())yield t}*values(){for(const[,t]of this.entries())yield t}*entries(){for(const t of this.valueMap.keys())yield[this.keyMap.get(t),this.valueMap.get(t)]}get(t){this.assertTypecheckKey(t);const e=this.serializeDeterministically(t);return this.valueMap.get(e)}set(t,e){this.assertTypecheckKey(t),this.assertTypecheckValue(e);const r=this.serializeDeterministically(t);this.keyMap.set(r,t),this.valueMap.set(r,e)}delete(t){this.assertTypecheckKey(t),this.keyMap.delete(this.serializeDeterministically(t)),this.valueMap.delete(this.serializeDeterministically(t))}has(t){this.assertTypecheckKey(t);const e=this.serializeDeterministically(t);return this.keyMap.has(e)&&this.valueMap.has(e)}clear(){this.keyMap.clear(),this.valueMap.clear()}get size(){return this.keyMap.size}forEach(t){for(const[e,r]of this.entries())t(r,e,this)}}n=l;class d extends Error{constructor(t,e,r){super(),this.value=t,this.token=e,this.name="ValidationError";const n=this.token.annot(),i=n?"[".concat(n,"] "):"";this.message="".concat(i).concat(r)}}class p{constructor(t,e,r){this.val=t,this.idx=e,this.fac=r,this.createToken=this.fac}typeWithoutAnnotations(){const t=e=>e.args?{prim:e.prim,args:e.args.map((e=>t(e)))}:{prim:e.prim};return t(this.val)}annot(){return(Array.isArray(this.val.annots)&&this.val.annots.length>0?this.val.annots[0]:String(this.idx)).replace(/(%|:)(_Liq_entry_)?/,"")}hasAnnotations(){return Array.isArray(this.val.annots)&&this.val.annots.length}get tokenVal(){return this.val}ExtractSignature(){return[[this.ExtractSchema()]]}}class g extends p{compare(t,e){return t===e?0:tthis.KeySchema.compare(t,e))).map((t=>({prim:"Elt",args:[this.KeySchema.EncodeObject(t),this.ValueSchema.EncodeObject(e.get(t))]})))}EncodeObject(t){const e=t,r=this.isValid(e);if(r)throw r;return Array.from(e.keys()).sort(((t,e)=>this.KeySchema.compare(t,e))).map((t=>({prim:"Elt",args:[this.KeySchema.EncodeObject(t),this.ValueSchema.EncodeObject(e.get(t))]})))}Execute(t,e){if(e&&e[y.prim])return e[y.prim](t,this.val);if(Array.isArray(t)){const e=new h(this.val);return t.forEach((t=>{e.set(this.KeySchema.ToKey(t.args[0]),this.ValueSchema.Execute(t.args[1]))})),e}if("int"in t)return t.int;throw new m(t,this,"Big map is expecting either an array (Athens) or an object with an int property (Babylon). Got ".concat(JSON.stringify(t)))}findAndReturnTokens(t,e){return y.prim===t&&e.push(this),this.KeySchema.findAndReturnTokens(t,e),this.ValueSchema.findAndReturnTokens(t,e),e}}y.prim="big_map";class b extends Error{constructor(t){super(t),this.message=t,this.name="OrTokenDecodingError"}}class v extends g{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}Encode(t){const e=t[t.length-1],r=this.createToken(this.val.args[0],this.idx);let n=1;r instanceof v&&(n=Object.keys(r.ExtractSchema()).length);const i=this.createToken(this.val.args[1],this.idx+n);if(String(r.annot())!==String(e)||r instanceof v){if(String(i.annot())!==String(e)||i instanceof v){if(r instanceof v){const e=r.Encode(t);if(e)return{prim:"Left",args:[e]}}if(i instanceof v){const e=i.Encode(t);if(e)return{prim:"Right",args:[e]}}return null}return t.pop(),{prim:"Right",args:[i.Encode(t)]}}return t.pop(),{prim:"Left",args:[r.Encode(t)]}}ExtractSignature(){const t=this.createToken(this.val.args[0],this.idx);let e=1;t instanceof v&&(e=Object.keys(t.ExtractSchema()).length);const r=this.createToken(this.val.args[1],this.idx+e),n=[];if(t instanceof v)n.push(...t.ExtractSignature());else for(const i of t.ExtractSignature())n.push([t.annot(),...i]);if(r instanceof v)n.push(...r.ExtractSignature());else for(const i of r.ExtractSignature())n.push([r.annot(),...i]);return n}EncodeObject(t){const e=Object.keys(t)[0],r=this.createToken(this.val.args[0],this.idx);let n=1;r instanceof v&&(n=Object.keys(r.ExtractSchema()).length);const i=this.createToken(this.val.args[1],this.idx+n);if(String(r.annot())!==String(e)||r instanceof v){if(String(i.annot())!==String(e)||i instanceof v){if(r instanceof v){const e=r.EncodeObject(t);if(e)return{prim:"Left",args:[e]}}if(i instanceof v){const e=i.EncodeObject(t);if(e)return{prim:"Right",args:[e]}}return null}return{prim:"Right",args:[i.EncodeObject(t[e])]}}return{prim:"Left",args:[r.EncodeObject(t[e])]}}Execute(t,e){const r=this.createToken(this.val.args[0],this.idx);let n=1;r instanceof v&&(n=Object.keys(r.ExtractSchema()).length);const i=this.createToken(this.val.args[1],this.idx+n);if("Right"===t.prim)return i instanceof v?i.Execute(t.args[0],e):{[i.annot()]:i.Execute(t.args[0],e)};if("Left"===t.prim)return r instanceof v?r.Execute(t.args[0],e):{[r.annot()]:r.Execute(t.args[0],e)};throw new b("Was expecting Left or Right prim but got: ".concat(t.prim))}traversal(t,e,r){const n=this.createToken(this.val.args[0],this.idx);let i,o=1;n instanceof v&&!n.hasAnnotations()?(i=t(n),o=Object.keys(n.ExtractSchema()).length):i={[n.annot()]:t(n)};const a=this.createToken(this.val.args[1],this.idx+o);let s;s=a instanceof v&&!a.hasAnnotations()?e(a):{[a.annot()]:e(a)};return r(i,s)}ExtractSchema(){return this.traversal((t=>t.ExtractSchema()),(t=>t.ExtractSchema()),((t,e)=>Object.assign(Object.assign({},t),e)))}generateSchema(){return{__michelsonType:v.prim,schema:this.traversal((t=>t instanceof v&&!t.hasAnnotations()?t.generateSchema().schema:t.generateSchema()),(t=>t instanceof v&&!t.hasAnnotations()?t.generateSchema().schema:t.generateSchema()),((t,e)=>Object.assign(Object.assign({},t),e)))}}findToken(t){const e=this.createToken(this.val.args[0],this.idx);let r=1;e instanceof v&&(r=Object.keys(e.ExtractSchema()).length);const n=this.createToken(this.val.args[1],this.idx+r);if(String(e.annot())===String(t)&&!(e instanceof v)&&e instanceof g)return e;if(String(n.annot())===String(t)&&!(n instanceof v)&&n instanceof g)return n;if(e instanceof v){const r=e.findToken(t);if(r)return r}if(n instanceof v){const e=n.findToken(t);if(e)return e}return null}compare(t,e){const r=Object.keys(t)[0];if(r!==Object.keys(e)[0]){return JSON.stringify(this.EncodeObject(t))r.findAndReturnTokens(t,e)),(r=>r.findAndReturnTokens(t,e)),((t,e)=>Object.assign(Object.assign({},t),e))),e}}v.prim="or";class A extends Error{constructor(t){super(t),this.message=t,this.name="TokenArgumentValidationError"}}class w extends Error{constructor(t,e){super("Tokens ".concat(t," and ").concat(e," are not comparable")),this.val1=t,this.val2=e,this.name="TokenComparisonError"}}function _(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E.prim;if(Array.isArray(t))return _({prim:e,args:t},e);if(void 0===t.args)throw new A("Encountered an invalid PairToken with no arguments, a pair must have two or more arguments");return t.args.length>2?[t.args[0],{prim:e,args:t.args.slice(1)}]:[t.args[0],t.args[1]]}class E extends g{constructor(t,e,r){super(Array.isArray(t)?{prim:E.prim,args:t}:t,e,r)}args(){return _(this.val)}tokens(){let t=0;return this.args().map((e=>{const r=this.createToken(e,this.idx+t);return r instanceof E?t+=Object.keys(r.ExtractSchema()).length:t++,r}))}Encode(t){return{prim:"Pair",args:this.tokens().map((e=>e.Encode(t)))}}ExtractSignature(){const t=this.args(),e=this.createToken(t[0],this.idx);let r=1;e instanceof v&&(r=Object.keys(e.ExtractSchema()).length);const n=this.createToken(t[1],this.idx+r),i=[];for(const o of e.ExtractSignature())for(const t of n.ExtractSignature())i.push([...o,...t]);return i}ToBigMapKey(t){return{key:this.EncodeObject(t),type:this.typeWithoutAnnotations()}}ToKey(t){return this.Execute(t)}EncodeObject(t){const[e,r]=this.tokens();let n,i;return n=e instanceof E&&!e.hasAnnotations()?t:t[e.annot()],i=r instanceof E&&!r.hasAnnotations()?t:t[r.annot()],{prim:"Pair",args:[e.EncodeObject(n),r.EncodeObject(i)]}}traversal(t,e){const r=this.args(),n=this.createToken(r[0],this.idx);let i,o=1;n instanceof E&&(o=Object.keys(n.ExtractSchema()).length),i=n instanceof E&&!n.hasAnnotations()?t(n):{[n.annot()]:t(n)};const a=this.createToken(r[1],this.idx+o);let s;s=a instanceof E&&!a.hasAnnotations()?e(a):{[a.annot()]:e(a)};return Object.assign(Object.assign({},i),s)}Execute(t,e){const r=_(t,"Pair");return this.traversal((t=>t.Execute(r[0],e)),(t=>t.Execute(r[1],e)))}ExtractSchema(){return this.traversal((t=>t.ExtractSchema()),(t=>t.ExtractSchema()))}generateSchema(){return{__michelsonType:E.prim,schema:this.traversal((t=>t instanceof E&&!t.hasAnnotations()?t.generateSchema().schema:t.generateSchema()),(t=>t instanceof E&&!t.hasAnnotations()?t.generateSchema().schema:t.generateSchema()))}}compare(t,e){const[r,n]=this.tokens(),i=(t,e)=>t instanceof E&&!t.hasAnnotations()?e:e[t.annot()];if(r instanceof g&&n instanceof g){const o=r.compare(i(r,t),i(r,e));return 0===o?n.compare(i(n,t),i(n,e)):o}throw new w(t,e)}findAndReturnTokens(t,e){return E.prim===t&&e.push(this),this.tokens().map((r=>r.findAndReturnTokens(t,e))),e}}E.prim="pair";class I extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="NatValidationError"}}class S extends g{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}Execute(t){return new s.a(t[Object.keys(t)[0]])}Encode(t){const e=t.pop(),r=this.isValid(e);if(r)throw r;return{int:new s.a(e).toFixed()}}isValid(t){const e=new s.a(t);return e.isNaN()?new I(t,this,"Value is not a number: ".concat(t)):e.isNegative()?new I(t,this,"Value cannot be negative: ".concat(t)):null}EncodeObject(t){const e=this.isValid(t);if(e)throw e;return{int:new s.a(t).toFixed()}}ExtractSchema(){return S.prim}generateSchema(){return{__michelsonType:S.prim,schema:S.prim}}ToBigMapKey(t){return{key:{int:String(t)},type:{prim:S.prim}}}ToKey(t){let{int:e}=t;return new s.a(e)}compare(t,e){const r=Number(t),n=Number(e);return r===n?0:rt.startsWith("tz");return r(t)&&r(e)?super.compare(t,e):r(t)?-1:r(e)?1:super.compare(t,e)}findAndReturnTokens(t,e){return k.prim===t&&e.push(this),e}}k.prim="address";class x extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="MapValidationError"}}class B extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}get ValueSchema(){return this.createToken(this.val.args[1],0)}get KeySchema(){return this.createToken(this.val.args[0],0)}isValid(t){return h.isMichelsonMap(t)?null:new x(t,this,"Value must be a MichelsonMap")}Execute(t,e){const r=new h(this.val);return t.forEach((t=>{r.set(this.KeySchema.ToKey(t.args[0]),this.ValueSchema.Execute(t.args[1],e))})),r}Encode(t){const e=t.pop(),r=this.isValid(e);if(r)throw r;return Array.from(e.keys()).sort(((t,e)=>this.KeySchema.compare(t,e))).map((t=>({prim:"Elt",args:[this.KeySchema.EncodeObject(t),this.ValueSchema.EncodeObject(e.get(t))]})))}EncodeObject(t){const e=t,r=this.isValid(e);if(r)throw r;return Array.from(e.keys()).sort(((t,e)=>this.KeySchema.compare(t,e))).map((t=>({prim:"Elt",args:[this.KeySchema.EncodeObject(t),this.ValueSchema.EncodeObject(e.get(t))]})))}ExtractSchema(){return{map:{key:this.KeySchema.ExtractSchema(),value:this.ValueSchema.ExtractSchema()}}}generateSchema(){return{__michelsonType:B.prim,schema:{key:this.KeySchema.generateSchema(),value:this.ValueSchema.generateSchema()}}}findAndReturnTokens(t,e){return B.prim===t&&e.push(this),this.KeySchema.findAndReturnTokens(t,e),this.ValueSchema.findAndReturnTokens(t,e),e}}B.prim="map";class O extends g{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}Execute(t){return"true"===String(t.prim).toLowerCase()}Encode(t){return{prim:t.pop()?"True":"False"}}EncodeObject(t){return{prim:t?"True":"False"}}ExtractSchema(){return O.prim}generateSchema(){return{__michelsonType:O.prim,schema:O.prim}}ToBigMapKey(t){return{key:this.EncodeObject(t),type:{prim:O.prim}}}ToKey(t){return this.EncodeObject(t)}compare(t,e){return t&&e||!t&&!e?0:t?1:-1}findAndReturnTokens(t,e){return O.prim===t&&e.push(this),e}}O.prim="bool";class T extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="ContractValidationError"}}class R extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}isValid(t){return Object(u.u)(t)!==u.j.VALID?new T(t,this,"Contract address is not valid"):null}Execute(t){return t.string?t.string:Object(u.r)(t.bytes)}Encode(t){const e=t.pop(),r=this.isValid(e);if(r)throw r;return{string:e}}EncodeObject(t){const e=this.isValid(t);if(e)throw e;return{string:t}}ExtractSchema(){return R.prim}generateSchema(){const t=this.createToken(this.val.args[0],0);return{__michelsonType:R.prim,schema:{parameter:t.generateSchema()}}}findAndReturnTokens(t,e){return R.prim===t&&e.push(this),e}}R.prim="contract";class P extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="ListValidationError"}}class N extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}get valueSchema(){return this.createToken(this.val.args[0],this.idx)}isValid(t){return Array.isArray(t)?null:new P(t,this,"Value must be an array")}Encode(t){const e=t.pop(),r=this.isValid(e);if(r)throw r;const n=this.createToken(this.val.args[0],0);return e.reduce(((t,e)=>[...t,n.EncodeObject(e)]),[])}Execute(t,e){const r=this.createToken(this.val.args[0],0),n=this.isValid(t);if(n)throw n;return t.reduce(((t,n)=>[...t,r.Execute(n,e)]),[])}EncodeObject(t){const e=this.createToken(this.val.args[0],0),r=this.isValid(t);if(r)throw r;return t.reduce(((t,r)=>[...t,e.EncodeObject(r)]),[])}ExtractSchema(){return{[N.prim]:this.valueSchema.ExtractSchema()}}generateSchema(){return{__michelsonType:N.prim,schema:this.valueSchema.generateSchema()}}findAndReturnTokens(t,e){return N.prim===t&&e.push(this),this.createToken(this.val.args[0],this.idx).findAndReturnTokens(t,e),e}}N.prim="list";class j extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="MutezValidationError"}}class D extends g{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}Execute(t){return new s.a(t[Object.keys(t)[0]])}ExtractSchema(){return D.prim}generateSchema(){return{__michelsonType:D.prim,schema:D.prim}}isValid(t){return new s.a(t).isNaN()?new j(t,this,"Value is not a number: ".concat(t)):null}Encode(t){const e=t.pop(),r=this.isValid(e);if(r)throw r;return{int:String(e).toString()}}EncodeObject(t){const e=this.isValid(t);if(e)throw e;return{int:String(t).toString()}}ToBigMapKey(t){return{key:{int:String(t)},type:{prim:D.prim}}}ToKey(t){let{int:e}=t;return e}compare(t,e){const r=Number(t),n=Number(e);return r===n?0:rthis.KeySchema.compare(t,e))).reduce(((t,e)=>[...t,this.KeySchema.EncodeObject(e)]),[])}Execute(t,e){return t.reduce(((t,r)=>[...t,this.KeySchema.Execute(r,e)]),[])}EncodeObject(t){const e=this.isValid(t);if(e)throw e;return t.sort(((t,e)=>this.KeySchema.compare(t,e))).reduce(((t,e)=>[...t,this.KeySchema.EncodeObject(e)]),[])}ExtractSchema(){return tt.prim}generateSchema(){return{__michelsonType:tt.prim,schema:this.KeySchema.generateSchema()}}findAndReturnTokens(t,e){return tt.prim===t&&e.push(this),this.KeySchema.findAndReturnTokens(t,e),e}}tt.prim="set";class et extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="ChainIDValidationError"}}class rt extends g{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}isValid(t){return Object(u.w)(t)!==u.j.VALID?new et(t,this,"ChainID is not valid"):null}Execute(t){return t[Object.keys(t)[0]]}ExtractSchema(){return rt.prim}generateSchema(){return{__michelsonType:rt.prim,schema:rt.prim}}Encode(t){const e=t.pop(),r=this.isValid(e);if(r)throw r;return{string:e}}EncodeObject(t){const e=this.isValid(t);if(e)throw e;return{string:t}}ToKey(t){let{string:e}=t;return e}ToBigMapKey(t){return{key:{string:t},type:{prim:rt.prim}}}findAndReturnTokens(t,e){return rt.prim===t&&e.push(this),e}}rt.prim="chain_id";class nt extends Error{constructor(){super("Tickets cannot be sent to the blockchain; they are created on-chain"),this.name="TicketEncodeError"}}const it={prim:"contract"},ot={prim:"int"};class at extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}get valueToken(){return this.createToken(this.val.args[0],this.idx)}Encode(t){throw new nt}EncodeObject(t){throw new nt}Execute(t,e){if(e&&e[at.prim])return e[at.prim](t,this.val);const r=this.createToken(it,this.idx),n=this.valueToken,i=this.createToken(ot,this.idx);return void 0===t.args[2]&&void 0!==t.args[1].args?{ticketer:r.Execute(t.args[0],e),value:n.Execute(t.args[1].args[0],e),amount:i.Execute(t.args[1].args[1],e)}:{ticketer:r.Execute(t.args[0],e),value:n.Execute(t.args[1],e),amount:i.Execute(t.args[2],e)}}ExtractSchema(){return{ticketer:R.prim,value:this.valueToken.ExtractSchema(),amount:H.prim}}generateSchema(){return{__michelsonType:at.prim,schema:{value:this.valueToken.generateSchema(),ticketer:{__michelsonType:R.prim,schema:R.prim},amount:{__michelsonType:H.prim,schema:H.prim}}}}findAndReturnTokens(t,e){return at.prim===t&&e.push(this),this.valueToken.findAndReturnTokens(t,e),e}}at.prim="ticket";class st extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="NeverTokenError"}}class ut extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}Encode(t){const e=t.pop();throw new st(e,this,"Assigning a value to the type never is forbidden.")}EncodeObject(t){throw new st(t,this,"Assigning a value to the type never is forbidden.")}Execute(t){throw new st(t,this,"There is no literal value for the type never.")}ExtractSchema(){return ut.prim}generateSchema(){return{__michelsonType:ut.prim,schema:ut.prim}}findAndReturnTokens(t,e){return ut.prim===t&&e.push(this),e}}ut.prim="never";class ct extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="SaplingStateValidationError"}}class lt extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}isValid(t){return"object"===typeof t&&0===Object.keys(t).length}Execute(t,e){if(e&&e[lt.prim])return e[lt.prim](t,this.val);if("int"in t)return t.int;throw new ct(t,this,"Sapling state is expecting an object with an int property. Got ".concat(JSON.stringify(t)))}Encode(t){const e=t.pop();if(this.isValid(e))return[];throw new ct(e,this,"Invalid sapling_state. Received: ".concat(e," while expecting: {}"))}EncodeObject(t){if(this.isValid(t))return[];throw new ct(t,this,"Invalid sapling_state. Received: ".concat(t," while expecting: {}"))}ExtractSchema(){return{[lt.prim]:{"memo-size":Number(this.val.args[0].int)}}}generateSchema(){return{__michelsonType:lt.prim,schema:{memoSize:this.val.args[0].int}}}findAndReturnTokens(t,e){return lt.prim===t&&e.push(this),e}}lt.prim="sapling_state";class ft extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="SaplingTransactionValidationError"}}class ht extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}Execute(t){throw new ft(t,this,"There is no literal value for the sapling_transaction type.")}validateBytes(t){const e=/^(0x|0X)?([0-9a-fA-F]*$)/.exec(t);if(e&&e[2].length%2===0)return e[2];throw new ft(t,this,"Invalid bytes: ".concat(t))}convertUint8ArrayToHexString(e){return e.constructor===Uint8Array?t.from(e).toString("hex"):e}Encode(t){let e=t.pop();return e=this.validateBytes(this.convertUint8ArrayToHexString(e)),{bytes:String(e).toString()}}EncodeObject(t){return t=this.validateBytes(this.convertUint8ArrayToHexString(t)),{bytes:String(t).toString()}}ExtractSchema(){return{[ht.prim]:{"memo-size":Number(this.val.args[0].int)}}}generateSchema(){return{__michelsonType:ht.prim,schema:{memoSize:this.val.args[0].int}}}findAndReturnTokens(t,e){return ht.prim===t&&e.push(this),e}}ht.prim="sapling_transaction";class dt extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="Bls12381frValidationError"}}class pt extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}isValid(t){return/^[0-9a-fA-F]*$/.test(t)&&t.length%2===0?null:new dt(t,this,"Invalid bytes: ".concat(t))}convertUint8ArrayToHexString(e){return e.constructor===Uint8Array?t.from(e).toString("hex"):e}Encode(t){let e=t.pop();if("number"===typeof e)return{int:e.toString()};{e=this.convertUint8ArrayToHexString(e);const t=this.isValid(e);if(t)throw t;return{bytes:e}}}EncodeObject(t){if("number"===typeof t)return{int:t.toString()};{t=this.convertUint8ArrayToHexString(t);const e=this.isValid(t);if(e)throw e;return{bytes:t}}}Execute(t){return t.bytes}ExtractSchema(){return pt.prim}generateSchema(){return{__michelsonType:pt.prim,schema:pt.prim}}findAndReturnTokens(t,e){return pt.prim===t&&e.push(this),e}}pt.prim="bls12_381_fr";class gt extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="Bls12381g1ValidationError"}}class mt extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}isValid(t){return/^[0-9a-fA-F]*$/.test(t)&&t.length%2===0?null:new gt(t,this,"Invalid bytes: ".concat(t))}convertUint8ArrayToHexString(e){return e.constructor===Uint8Array?t.from(e).toString("hex"):e}Encode(t){let e=t.pop();e=this.convertUint8ArrayToHexString(e);const r=this.isValid(e);if(r)throw r;return{bytes:e}}EncodeObject(t){t=this.convertUint8ArrayToHexString(t);const e=this.isValid(t);if(e)throw e;return{bytes:t}}Execute(t){return t.bytes}ExtractSchema(){return mt.prim}generateSchema(){return{__michelsonType:mt.prim,schema:mt.prim}}findAndReturnTokens(t,e){return mt.prim===t&&e.push(this),e}}mt.prim="bls12_381_g1";class yt extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="Bls12381g2ValidationError"}}class bt extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}isValid(t){return/^[0-9a-fA-F]*$/.test(t)&&t.length%2===0?null:new yt(t,this,"Invalid bytes: ".concat(t))}convertUint8ArrayToHexString(e){return e.constructor===Uint8Array?t.from(e).toString("hex"):e}Encode(t){let e=t.pop();e=this.convertUint8ArrayToHexString(e);const r=this.isValid(e);if(r)throw r;return{bytes:e}}EncodeObject(t){t=this.convertUint8ArrayToHexString(t);const e=this.isValid(t);if(e)throw e;return{bytes:t}}Execute(t){return t.bytes}ExtractSchema(){return bt.prim}generateSchema(){return{__michelsonType:bt.prim,schema:bt.prim}}findAndReturnTokens(t,e){return bt.prim===t&&e.push(this),e}}bt.prim="bls12_381_g2";class vt extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="ChestValidationError"}}class At extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}isValid(t){return/^[0-9a-fA-F]*$/.test(t)&&t.length%2===0?null:new vt(t,this,"Invalid bytes: ".concat(t))}convertUint8ArrayToHexString(e){return e.constructor===Uint8Array?t.from(e).toString("hex"):e}Encode(t){let e=t.pop();e=this.convertUint8ArrayToHexString(e);const r=this.isValid(e);if(r)throw r;return{bytes:e}}EncodeObject(t){t=this.convertUint8ArrayToHexString(t);const e=this.isValid(t);if(e)throw e;return{bytes:t}}Execute(t){return t.bytes}ExtractSchema(){return At.prim}generateSchema(){return{__michelsonType:At.prim,schema:At.prim}}findAndReturnTokens(t,e){return At.prim===t&&e.push(this),e}}At.prim="chest";class wt extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="ChestKeyValidationError"}}class _t extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}isValid(t){return/^[0-9a-fA-F]*$/.test(t)&&t.length%2===0?null:new wt(t,this,"Invalid bytes: ".concat(t))}convertUint8ArrayToHexString(e){return e.constructor===Uint8Array?t.from(e).toString("hex"):e}Encode(t){let e=t.pop();e=this.convertUint8ArrayToHexString(e);const r=this.isValid(e);if(r)throw r;return{bytes:e}}EncodeObject(t){t=this.convertUint8ArrayToHexString(t);const e=this.isValid(t);if(e)throw e;return{bytes:t}}Execute(t){return t.bytes}ExtractSchema(){return _t.prim}generateSchema(){return{__michelsonType:_t.prim,schema:_t.prim}}findAndReturnTokens(t,e){return _t.prim===t&&e.push(this),e}}_t.prim="chest_key";class Et extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="GlobalConstantEncodingError"}}class It extends d{constructor(t,e,r){super(t,e,r),this.value=t,this.token=e,this.name="GlobalConstantDecodingError"}}class St extends p{constructor(t,e,r){super(t,e,r),this.val=t,this.idx=e,this.fac=r}Execute(t,e){if(e&&e[St.prim])return e[St.prim](t,this.val);throw new It(t,this,"Unable to decode a value represented by a global constants. Please provide an expanded script to the Michelson-Encoder or semantics for the decoding. The following global constant hash was encountered: ".concat(this.val.args[0].string,"."))}Encode(t){throw new Et(t,this,"Unable to encode a script containing global constants. Please provide an expanded script to the Michelson-Encoder. The following global constant hash was encountered: ".concat(this.val.args[0].string,"."))}EncodeObject(t){throw new Et(t,this,"Unable to encode a script containing global constants. Please provide an expanded script to the Michelson-Encoder. The following global constant hash was encountered: ".concat(this.val.args[0].string,"."))}ExtractSchema(){return St.prim}generateSchema(){return{__michelsonType:St.prim,schema:{hash:this.val.args[0].string}}}findAndReturnTokens(t,e){return St.prim===t&&e.push(this),e}}St.prim="constant";const Mt=[E,S,M,y,k,B,O,v,R,N,D,F,U,Q,H,z,K,W,Y,X,Z,tt,rt,at,ut,lt,ht,pt,mt,bt,At,_t,St];class Ct extends Error{constructor(t,e){super(t),this.message=t,this.data=e,this.name="Invalid token error"}}function kt(t,e){if(Array.isArray(t))return new E(t,e,kt);const r=Mt.find((e=>e.prim===t.prim));if(!r)throw new Ct("Malformed data expected a value with a valid prim property",t);return new r(t,e,kt)}class xt extends Error{constructor(t,e){super("Unable to encode the parameter of the view: ".concat(t,".")),this.smartContractViewName=t,this.originalError=e,this.name="ViewEncodingError"}}class Bt extends Error{constructor(t){super(t),this.message=t,this.name="InvalidScriptError"}}class Ot extends Error{constructor(t){super("Invalid RPC response passed as argument(s)"),this.script=t,this.name="InvalidRpcResponseError"}}class Tt extends Error{constructor(t,e,r){super("\n ".concat(t,". Error encountered when trying to encode arguments: \n\n [").concat(e,"]\n ")),this.message=t,this.args=e,this.originalError=r,this.name="ParameterEncodingError"}}class Rt extends Error{constructor(t){super(t),this.message=t,this.name="InvalidBigMapSchema"}}class Pt extends Error{constructor(t){super(t),this.message=t,this.name="InvalidBigMapDiff"}}class Nt extends Error{constructor(t,e){super("Unable to encode ".concat(t,". ").concat(e)),this.obj=t,this.details=e,this.name="BigMapEncodingError"}}class jt extends Error{constructor(t,e){super("Unable to encode ".concat(t,". ").concat(e)),this.obj=t,this.details=e,this.name="StorageEncodingError"}}class Dt extends Error{constructor(t){super(t),this.message=t,this.name="MissingArgumentError"}}var Lt;const Ft=Symbol.for("taquito-schema-type-symbol");function Ut(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E.prim;var r,n;return Array.isArray(t)?Ut({prim:e,args:t},e):t.prim===e&&t.args&&t.args.length>2?Object.assign(Object.assign({},t),{args:[null===(r=t.args)||void 0===r?void 0:r[0],{prim:e,args:null===(n=t.args)||void 0===n?void 0:n.slice(1)}]}):t}function Qt(t,e){const r=Ut(t),n=Ut(e);return r.prim===n.prim&&(void 0===r.args&&void 0===n.args||void 0!==r.args&&void 0!==n.args&&r.args.length===n.args.length&&r.args.every(((t,e)=>{var r;return Qt(t,null===(r=n.args)||void 0===r?void 0:r[e])})))&&(void 0===r.annots&&void 0===n.annots||void 0!==r.annots&&void 0!==n.annots&&r.annots.length===n.annots.length&&r.annots.every(((t,e)=>{var r;return t===(null===(r=n.annots)||void 0===r?void 0:r[e])})))}class Gt{constructor(t){if(this.val=t,this[Lt]=!0,this.root=kt(t,0),this.root instanceof y)this.bigMap=this.root;else if(this.isExpressionExtended(t)&&"pair"===t.prim){const e=t.args[0];this.isExpressionExtended(e)&&"big_map"===e.prim&&(this.bigMap=new y(e,0,kt))}}static isSchema(t){return t&&!0===t[Ft]}static fromRPCResponse(t){const e=t&&t.script&&Array.isArray(t.script.code)&&t.script.code.find((t=>"storage"===t.prim));if(!e||!Array.isArray(e.args))throw new Ot(t.script);return new Gt(e.args[0])}isExpressionExtended(t){return"prim"in t&&Array.isArray(t.args)}removeTopLevelAnnotation(t){return(this.root instanceof E||this.root instanceof v)&&this.root.hasAnnotations()&&"object"===typeof t&&1===Object.keys(t).length?t[Object.keys(t)[0]]:t}Execute(t,e){const r=this.root.Execute(t,e);return this.removeTopLevelAnnotation(r)}Typecheck(t){if(this.root instanceof y&&Number.isInteger(Number(t)))return!0;try{return this.root.EncodeObject(t),!0}catch(e){return!1}}ExecuteOnBigMapDiff(t,e){if(!this.bigMap)throw new Rt("Big map schema is undefined");if(!Array.isArray(t))throw new Pt("Big map diff must be an array");const r=t.map((t=>{let{key:e,value:r}=t;return{args:[e,r]}}));return this.bigMap.Execute(r,e)}ExecuteOnBigMapValue(t,e){if(!this.bigMap)throw new Rt("No big map schema");return this.bigMap.ValueSchema.Execute(t,e)}EncodeBigMapKey(t){if(!this.bigMap)throw new Rt("Big map schema is undefined");try{return this.bigMap.KeySchema.ToBigMapKey(t)}catch(e){throw new Nt("big map key",e)}}Encode(t){try{return this.root.EncodeObject(t)}catch(e){if(e instanceof d)throw e;throw new jt("storage object",e)}}ExtractSchema(){return this.removeTopLevelAnnotation(this.root.ExtractSchema())}generateSchema(){return this.removeTopLevelAnnotation(this.root.generateSchema())}ComputeState(t,e){if(!this.bigMap)throw new Rt("Big map schema is undefined");const r=t.reduce(((t,e)=>Object.assign(Object.assign({},t),this.ExecuteOnBigMapDiff(e.contents[0].metadata.operation_result.big_map_diff))),{});return Object.assign(Object.assign({},this.Execute(e)),{[this.bigMap.annot()]:r})}FindFirstInTopLevelPair(t,e){return this.findValue(this.root.val,t,e)}findValue(t,e,r){if(Qt(r,t))return e;if(Array.isArray(t)||"pair"===t.prim){const n=Ut(t),i=Ut(e,"Pair");if(void 0===n.args||void 0===i.args)throw new Dt("Tokens have no arguments");return this.findValue(n.args[0],i.args[0],r)||this.findValue(n.args[1],i.args[1],r)}}findToken(t){return this.root.findAndReturnTokens(t,[])}}Lt=Ft;class Ht{constructor(t){this.root=kt(t,0)}static fromRPCResponse(t){const e=t&&t.script&&Array.isArray(t.script.code)&&t.script.code.find((t=>"parameter"===t.prim));if(!e||!Array.isArray(e.args))throw new Ot(t.script);return new Ht(e.args[0])}get isMultipleEntryPoint(){return this.root instanceof v||this.root instanceof U&&this.root.subToken()instanceof v}get hasAnnotation(){return!this.isMultipleEntryPoint||"0"!==Object.keys(this.ExtractSchema())[0]}Execute(t,e){return this.root.Execute(t,e)}Encode(){for(var t=arguments.length,e=new Array(t),r=0;r"view"===t.prim));return r&&r.forEach((t=>{if(!t.args||4!==t.args.length)throw new Bt("Invalid on-chain view found in the script: ".concat(JSON.stringify(t)));e.push(new zt(t.args))})),e}encodeViewArgs(t){try{return this.rootArgsType.EncodeObject(t)}catch(e){throw new xt(this.viewName,e)}}decodeViewResult(t,e){return this.rootReturnType.Execute(t,e)}extractArgsSchema(){return this.rootArgsType.ExtractSchema()}extractResultSchema(){return this.rootReturnType.ExtractSchema()}}const qt=Symbol()}).call(this,r(7).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return v})),r.d(e,"b",(function(){return y})),r.d(e,"c",(function(){return b})),r.d(e,"d",(function(){return p})),r.d(e,"e",(function(){return d}));var n=r(45),i=r.n(n),o=r(217),a=r.n(o),s=r(444);function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};const r={mode:"cors",headers:{}};(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).useAPIKey&&(r.headers=c(c({},r.headers),g()));const n=a()(r,e,{method:"GET"}),i=await fetch(t,n);if(i.ok)return i.json();throw m(i),i},b=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i={mode:"cors",headers:{"Content-Type":"application/json; charset=utf-8"}};n.useAPIKey&&(i.headers=c(c({},i.headers),g()));const o=a()(i,r,{method:"POST"});return n.isUrlEncodedData?(o.body=e,"application/json; charset=utf-8"===o.headers["Content-Type"]&&delete o.headers["Content-Type"]):o.body=JSON.stringify(e),((t,e)=>{const r=new Promise(((e,r)=>{const n=setTimeout((()=>{clearTimeout(n),r(new Error("Timed out in ".concat(t,"ms")))}),t)}));return Promise.race([e,r])})(n.timeout||6e4,fetch(t,o).then((t=>{if(t.ok)return t.json();throw m(t),t})))},v=(t,e)=>({jsonrpc:"2.0",method:t,id:10,params:e})},function(t,e,r){var n;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,c="[BigNumber Error] ",l=c+"Number primitive has more than 15 significant digits: ",f=1e14,h=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,m=1e9;function y(t){var e=0|t;return t>0||t===e?e:e-1}function b(t){for(var e,r,n=1,i=t.length,o=t[0]+"";nc^r?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;ao[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function A(t,e,r,n){if(tr||t!==u(t))throw Error(c+(n||"Argument")+("number"==typeof t?tr?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function w(t){var e=t.c.length-1;return y(t.e/h)==e&&t.c[e]%2!=0}function _(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function E(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else eB?y.c=y.e=null:t.e=10;f/=10,c++);return void(c>B?y.c=y.e=null:(y.e=c,y.c=[t]))}m=String(t)}else{if(!a.test(m=String(t)))return i(y,m,p);y.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(c=m.indexOf("."))>-1&&(m=m.replace(".","")),(f=m.search(/e/i))>0?(c<0&&(c=f),c+=+m.slice(f+1),m=m.substring(0,f)):c<0&&(c=m.length)}else{if(A(e,2,N.length,"Base"),10==e&&j)return Q(y=new D(t),S+y.e+1,M);if(m=String(t),p="number"==typeof t){if(0*t!=0)return i(y,m,p,e);if(y.s=1/t<0?(m=m.slice(1),-1):1,D.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(l+t)}else y.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(r=N.slice(0,e),c=f=0,g=m.length;fc){c=g;continue}}else if(!s&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){s=!0,f=-1,c=0;continue}return i(y,String(t),p,e)}p=!1,(c=(m=n(m,e,10,y.s)).indexOf("."))>-1?m=m.replace(".",""):c=m.length}for(f=0;48===m.charCodeAt(f);f++);for(g=m.length;48===m.charCodeAt(--g););if(m=m.slice(f,++g)){if(g-=f,p&&D.DEBUG&&g>15&&(t>d||t!==u(t)))throw Error(l+y.s*t);if((c=c-f-1)>B)y.c=y.e=null;else if(c=k)?_(u,a):E(u,a,"0");else if(o=(t=Q(new D(t),e,r)).e,s=(u=b(t.c)).length,1==n||2==n&&(e<=o||o<=C)){for(;ss){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-s)>0)for(o+1==s&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function F(t,e){for(var r,n,i=1,o=new D(t[0]);i=10;i/=10,n++);return(r=n+r*h-1)>B?t.c=t.e=null:r=10;c/=10,i++);if((o=e-i)<0)o+=h,a=e,l=m[d=0],g=u(l/y[i-a-1]%10);else if((d=s((o+1)/h))>=m.length){if(!n)break t;for(;m.length<=d;m.push(0));l=g=0,i=1,a=(o%=h)-h+1}else{for(l=c=m[d],i=1;c>=10;c/=10,i++);g=(a=(o%=h)-h+i)<0?0:u(l/y[i-a-1]%10)}if(n=n||e<0||null!=m[d+1]||(a<0?l:l%y[i-a-1]),n=r<4?(g||n)&&(0==r||r==(t.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(o>0?a>0?l/y[i-a]:0:m[d-1])%10&1||r==(t.s<0?8:7)),e<1||!m[0])return m.length=0,n?(e-=t.e+1,m[0]=y[(h-e%h)%h],t.e=-e||0):m[0]=t.e=0,t;if(0==o?(m.length=d,c=1,d--):(m.length=d+1,c=y[h-o],m[d]=a>0?u(l/y[i-a]%y[a])*c:0),n)for(;;){if(0==d){for(o=1,a=m[0];a>=10;a/=10,o++);for(a=m[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(t.e++,m[0]==f&&(m[0]=1));break}if(m[d]+=c,m[d]!=f)break;m[d--]=0,c=1}for(o=m.length;0===m[--o];m.pop());}t.e>B?t.c=t.e=null:t.e=k?_(e,r):E(e,r,"0"),t.s<0?"-"+e:e)}return D.clone=t,D.ROUND_UP=0,D.ROUND_DOWN=1,D.ROUND_CEIL=2,D.ROUND_FLOOR=3,D.ROUND_HALF_UP=4,D.ROUND_HALF_DOWN=5,D.ROUND_HALF_EVEN=6,D.ROUND_HALF_CEIL=7,D.ROUND_HALF_FLOOR=8,D.EUCLID=9,D.config=D.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(c+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(A(r=t[e],0,m,e),S=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(A(r=t[e],0,8,e),M=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(A(r[0],-m,0,e),A(r[1],0,m,e),C=r[0],k=r[1]):(A(r,-m,m,e),C=-(k=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)A(r[0],-m,-1,e),A(r[1],1,m,e),x=r[0],B=r[1];else{if(A(r,-m,m,e),!r)throw Error(c+e+" cannot be zero: "+r);x=-(B=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(c+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw O=!r,Error(c+"crypto unavailable");O=r}else O=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(A(r=t[e],0,9,e),T=r),t.hasOwnProperty(e="POW_PRECISION")&&(A(r=t[e],0,m,e),R=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(c+e+" not an object: "+r);P=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(c+e+" invalid: "+r);j="0123456789"==r.slice(0,10),N=r}}return{DECIMAL_PLACES:S,ROUNDING_MODE:M,EXPONENTIAL_AT:[C,k],RANGE:[x,B],CRYPTO:O,MODULO_MODE:T,POW_PRECISION:R,FORMAT:P,ALPHABET:N}},D.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!D.DEBUG)return!0;var e,r,n=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-m&&i<=m&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%h)<1&&(e+=h),String(n[0]).length==e){for(e=0;e=f||r!==u(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+t)},D.maximum=D.max=function(){return F(arguments,-1)},D.minimum=D.min=function(){return F(arguments,1)},D.random=function(){var t=9007199254740992,e=Math.random()*t&2097151?function(){return u(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,n,i,o,a,l=0,f=[],d=new D(I);if(null==t?t=S:A(t,0,m),o=s(t/h),O)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(o*=2));l>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),r[l]=n[0],r[l+1]=n[1]):(f.push(a%1e14),l+=2);l=o/2}else{if(!crypto.randomBytes)throw O=!1,Error(c+"crypto unavailable");for(r=crypto.randomBytes(o*=7);l=9e15?crypto.randomBytes(7).copy(r,l):(f.push(a%1e14),l+=7);l=o/7}if(!O)for(;l=10;a/=10,l++);lr-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(n,i,o,a,s){var u,c,l,f,h,d,p,g,m=n.indexOf("."),y=S,v=M;for(m>=0&&(f=R,R=0,n=n.replace(".",""),d=(g=new D(i)).pow(n.length-m),R=f,g.c=e(E(b(d.c),d.e,"0"),10,o,t),g.e=g.c.length),l=f=(p=e(n,i,o,s?(u=N,t):(u=t,N))).length;0==p[--f];p.pop());if(!p[0])return u.charAt(0);if(m<0?--l:(d.c=p,d.e=l,d.s=a,p=(d=r(d,g,y,v,o)).c,h=d.r,l=d.e),m=p[c=l+y+1],f=o/2,h=h||c<0||null!=p[c+1],h=v<4?(null!=m||h)&&(0==v||v==(d.s<0?3:2)):m>f||m==f&&(4==v||h||6==v&&1&p[c-1]||v==(d.s<0?8:7)),c<1||!p[0])n=h?E(u.charAt(1),-y,u.charAt(0)):u.charAt(0);else{if(p.length=c,h)for(--o;++p[--c]>o;)p[c]=0,c||(++l,p=[1].concat(p));for(f=p.length;!p[--f];);for(m=0,n="";m<=f;n+=u.charAt(p[m++]));n=E(n,l,u.charAt(0))}return n}}(),r=function(){function t(t,e,r){var n,i,o,a,s=0,u=t.length,c=e%g,l=e/g|0;for(t=t.slice();u--;)s=((i=c*(o=t[u]%g)+(n=l*o+(a=t[u]/g|0)*c)%g*g+s)/r|0)+(n/g|0)+l*a,t[u]=i%r;return s&&(t=[s].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]1;t.splice(0,1));}return function(n,i,o,a,s){var c,l,d,p,g,m,b,v,A,w,_,E,I,S,M,C,k,x=n.s==i.s?1:-1,B=n.c,O=i.c;if(!B||!B[0]||!O||!O[0])return new D(n.s&&i.s&&(B?!O||B[0]!=O[0]:O)?B&&0==B[0]||!O?0*x:x/0:NaN);for(A=(v=new D(x)).c=[],x=o+(l=n.e-i.e)+1,s||(s=f,l=y(n.e/h)-y(i.e/h),x=x/h|0),d=0;O[d]==(B[d]||0);d++);if(O[d]>(B[d]||0)&&l--,x<0)A.push(1),p=!0;else{for(S=B.length,C=O.length,d=0,x+=2,(g=u(s/(O[0]+1)))>1&&(O=t(O,g,s),B=t(B,g,s),C=O.length,S=B.length),I=C,_=(w=B.slice(0,C)).length;_=s/2&&M++;do{if(g=0,(c=e(O,w,C,_))<0){if(E=w[0],C!=_&&(E=E*s+(w[1]||0)),(g=u(E/M))>1)for(g>=s&&(g=s-1),b=(m=t(O,g,s)).length,_=w.length;1==e(m,w,b,_);)g--,r(m,C=10;x/=10,d++);Q(v,o+(v.e=d+l*h-1)+1,a,p)}else v.e=l,v.r=+p;return v}}(),i=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,r=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,u){var l,f=s?a:a.replace(i,"");if(n.test(f))o.s=isNaN(f)?null:f<0?-1:1;else{if(!s&&(f=f.replace(t,(function(t,e,r){return l="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=l?t:e})),u&&(l=u,f=f.replace(e,"$1").replace(r,"0.$1")),a!=f))return new D(f,l);if(D.DEBUG)throw Error(c+"Not a"+(u?" base "+u:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),o.absoluteValue=o.abs=function(){var t=new D(this);return t.s<0&&(t.s=1),t},o.comparedTo=function(t,e){return v(this,new D(t,e))},o.decimalPlaces=o.dp=function(t,e){var r,n,i,o=this;if(null!=t)return A(t,0,m),null==e?e=M:A(e,0,8),Q(new D(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=((i=r.length-1)-y(this.e/h))*h,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},o.dividedBy=o.div=function(t,e){return r(this,new D(t,e),S,M)},o.dividedToIntegerBy=o.idiv=function(t,e){return r(this,new D(t,e),0,1)},o.exponentiatedBy=o.pow=function(t,e){var r,n,i,o,a,l,f,d,p=this;if((t=new D(t)).c&&!t.isInteger())throw Error(c+"Exponent not an integer: "+G(t));if(null!=e&&(e=new D(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return d=new D(Math.pow(+G(p),a?t.s*(2-w(t)):+G(t))),e?d.mod(e):d;if(l=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new D(NaN);(n=!l&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&w(t)?-0:0,p.e>-1&&(o=1/o),new D(l?1/o:o);R&&(o=s(R/h+2))}for(a?(r=new D(.5),l&&(t.s=1),f=w(t)):f=(i=Math.abs(+G(t)))%2,d=new D(I);;){if(f){if(!(d=d.times(p)).c)break;o?d.c.length>o&&(d.c.length=o):n&&(d=d.mod(e))}if(i){if(0===(i=u(i/2)))break;f=i%2}else if(Q(t=t.times(r),t.e+1,1),t.e>14)f=w(t);else{if(0===(i=+G(t)))break;f=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(e))}return n?d:(l&&(d=I.div(d)),e?d.mod(e):o?Q(d,R,M,undefined):d)},o.integerValue=function(t){var e=new D(this);return null==t?t=M:A(t,0,8),Q(e,e.e+1,t)},o.isEqualTo=o.eq=function(t,e){return 0===v(this,new D(t,e))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(t,e){return v(this,new D(t,e))>0},o.isGreaterThanOrEqualTo=o.gte=function(t,e){return 1===(e=v(this,new D(t,e)))||0===e},o.isInteger=function(){return!!this.c&&y(this.e/h)>this.c.length-2},o.isLessThan=o.lt=function(t,e){return v(this,new D(t,e))<0},o.isLessThanOrEqualTo=o.lte=function(t,e){return-1===(e=v(this,new D(t,e)))||0===e},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(t,e){var r,n,i,o,a=this,s=a.s;if(e=(t=new D(t,e)).s,!s||!e)return new D(NaN);if(s!=e)return t.s=-e,a.plus(t);var u=a.e/h,c=t.e/h,l=a.c,d=t.c;if(!u||!c){if(!l||!d)return l?(t.s=-e,t):new D(d?a:NaN);if(!l[0]||!d[0])return d[0]?(t.s=-e,t):new D(l[0]?a:3==M?-0:0)}if(u=y(u),c=y(c),l=l.slice(),s=u-c){for((o=s<0)?(s=-s,i=l):(c=u,i=d),i.reverse(),e=s;e--;i.push(0));i.reverse()}else for(n=(o=(s=l.length)<(e=d.length))?s:e,s=e=0;e0)for(;e--;l[r++]=0);for(e=f-1;n>s;){if(l[--n]=0;){for(r=0,p=E[i]%A,m=E[i]/A|0,o=i+(a=u);o>i;)r=((c=p*(c=_[--a]%A)+(s=m*c+(l=_[a]/A|0)*p)%A*A+b[o]+r)/v|0)+(s/A|0)+m*l,b[o--]=c%v;b[o]=r}return r?++n:b.splice(0,1),U(t,b,n)},o.negated=function(){var t=new D(this);return t.s=-t.s||null,t},o.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new D(t,e)).s,!i||!e)return new D(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/h,a=t.e/h,s=n.c,u=t.c;if(!o||!a){if(!s||!u)return new D(i/0);if(!s[0]||!u[0])return u[0]?t:new D(s[0]?n:0*i)}if(o=y(o),a=y(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=u):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(e=u.length)<0&&(r=u,u=s,s=r,e=i),i=0;e;)i=(s[--e]=s[e]+u[e]+i)/f|0,s[e]=f===s[e]?0:s[e]%f;return i&&(s=[i].concat(s),++a),U(t,s,a)},o.precision=o.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return A(t,1,m),null==e?e=M:A(e,0,8),Q(new D(o),t,e);if(!(r=o.c))return null;if(n=(i=r.length-1)*h+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},o.shiftedBy=function(t){return A(t,-9007199254740991,d),this.times("1e"+t)},o.squareRoot=o.sqrt=function(){var t,e,n,i,o,a=this,s=a.c,u=a.s,c=a.e,l=S+4,f=new D("0.5");if(1!==u||!s||!s[0])return new D(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+G(a)))||u==1/0?(((e=b(s)).length+c)%2==0&&(e+="0"),u=Math.sqrt(+e),c=y((c+1)/2)-(c<0||c%2),n=new D(e=u==1/0?"5e"+c:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+c)):n=new D(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(o=n,n=f.times(o.plus(r(a,o,l,1))),b(o.c).slice(0,u)===(e=b(n.c)).slice(0,u)){if(n.e0&&g>0){for(o=g%s||s,f=p.substr(0,o);o0&&(f+=l+p.slice(o)),d&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},o.toFraction=function(t){var e,n,i,o,a,s,u,l,f,d,g,m,y=this,v=y.c;if(null!=t&&(!(u=new D(t)).isInteger()&&(u.c||1!==u.s)||u.lt(I)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+G(u));if(!v)return new D(y);for(e=new D(I),f=n=new D(I),i=l=new D(I),m=b(v),a=e.e=m.length-y.e-1,e.c[0]=p[(s=a%h)<0?h+s:s],t=!t||u.comparedTo(e)>0?a>0?e:f:u,s=B,B=1/0,u=new D(m),l.c[0]=0;d=r(u,e,0,1),1!=(o=n.plus(d.times(i))).comparedTo(t);)n=i,i=o,f=l.plus(d.times(o=f)),l=o,e=u.minus(d.times(o=e)),u=o;return o=r(t.minus(n),i,0,1),l=l.plus(o.times(f)),n=n.plus(o.times(i)),l.s=f.s=y.s,g=r(f,i,a*=2,M).minus(y).abs().comparedTo(r(l,n,a,M).minus(y).abs())<1?[f,i]:[l,n],B=s,g},o.toNumber=function(){return+G(this)},o.toPrecision=function(t,e){return null!=t&&A(t,1,m),L(this,t,e,2)},o.toString=function(t){var e,r=this,i=r.s,o=r.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=C||o>=k?_(b(r.c),o):E(b(r.c),o,"0"):10===t&&j?e=E(b((r=Q(new D(r),S+o+1,M)).c),r.e,"0"):(A(t,2,N.length,"Base"),e=n(E(b(r.c),o,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},o.valueOf=o.toJSON=function(){return G(this)},o._isBigNumber=!0,null!=e&&D.set(e),D}(),o.default=o.BigNumber=o,void 0===(n=function(){return o}.call(e,r,e,t))||(t.exports=n)}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.contractAddressHex=e.subscribeForTxResult=e.waitForSeal=e.runTransaction=e.runScript=void 0;var n=r(11),i=r(421),o=r(2552);e.runScript=function(t,e,r){return(0,n.__awaiter)(void 0,void 0,void 0,(function(){var s,u,c;return(0,n.__generator)(this,(function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),s=(0,i.replaceImportAddresses)(e.cadence,r),[4,t.send([t.script(a||(a=(0,n.__makeTemplateObject)(["",""],["",""])),s),e.args])];case 1:return u=l.sent(),[4,t.decode(u)];case 2:return[2,l.sent()];case 3:throw c=l.sent(),new o.FlowRunScriptError({error:c,params:e});case 4:return[2]}}))}))};e.runTransaction=function(t,e,r,a,s){return void 0===s&&(s=999),(0,n.__awaiter)(void 0,void 0,void 0,(function(){var u,c,l;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),u=(0,i.replaceImportAddresses)(r.cadence,e),(c=[t.limit(s)]).push(t.payer(a||t.authz),t.proposer(a||t.authz),t.authorizations([a||t.authz])),r.args&&c.push(r.args),c.push(t.transaction(u)),[4,t.send(c)];case 1:return[2,n.sent().transactionId];case 2:throw l=n.sent(),new o.FlowRunTransactionError({error:l,params:r});case 3:return[2]}}))}))};e.waitForSeal=function(t,e){return(0,n.__awaiter)(void 0,void 0,void 0,(function(){var r,i;return(0,n.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,t.tx(e).onceSealed()];case 1:return r=a.sent(),[2,(0,n.__assign)((0,n.__assign)({},r),{txId:e})];case 2:throw i=a.sent(),new o.FlowSealError({error:i,txId:e});case 3:return[2]}}))}))},e.subscribeForTxResult=function(t,e,r){var i=t.tx(e).subscribe((function(o){r((0,n.__assign)({txId:e},o)),t.tx.isSealed(o)&&i()}))};var a;e.contractAddressHex=function(t,e){return(0,n.__awaiter)(void 0,void 0,void 0,(function(){var r;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:return[4,t.config().get(e)];case 1:return r=n.sent(),[2,t.sansPrefix(r)]}}))}))}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wipe=function(t){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:{};const c=null!==(e=u.paddingRequired)&&void 0!==e&&e,l=null!==(r=u.characterSet)&&void 0!==r?r:"base64";let f,h;return"base64"===l?f=String.raw(n||(n=Object(a.a)(["[A-Za-z0-9+/]"],["[A-Za-z0-9+\\/]"]))):(Object(o.b)("base64url"===l),f=String.raw(i||(i=Object(a.a)(["[-_A-Za-z0-9]"])))),h=c?new RegExp("^(?:".concat(f,"{4})*(?:").concat(f,"{3}=|").concat(f,"{2}==)?$"),"u"):new RegExp("^(?:".concat(f,"{4})*(?:").concat(f,"{2,3}|").concat(f,"{3}=|").concat(f,"{2}==)?$"),"u"),Object(s.s)(t,h)};var c=r(438);const l=RegExp("^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$","u"),f=/^[-a-z0-9]{3,8}$/u,h=/^[-_a-zA-Z0-9]{1,32}$/u,d=RegExp("^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$","u"),p=/^[-.%a-zA-Z0-9]{1,128}$/u,g=Object(s.s)(Object(s.w)(),l),m=Object(s.s)(Object(s.w)(),f),y=Object(s.s)(Object(s.w)(),h),b=Object(s.s)(Object(s.w)(),d),v=Object(s.s)(Object(s.w)(),p);function A(t){return Object(s.l)(t,g)}function w(t){return Object(s.l)(t,m)}function _(t){return Object(s.l)(t,y)}function E(t){return Object(s.l)(t,b)}function I(t){return Object(s.l)(t,v)}function S(t){const e=l.exec(t);if(null===e||void 0===e||!e.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:e.groups.namespace,reference:e.groups.reference}}function M(t){const e=d.exec(t);if(null===e||void 0===e||!e.groups)throw new Error("Invalid CAIP account ID.");return{address:e.groups.accountAddress,chainId:e.groups.chainId,chain:{namespace:e.groups.namespace,reference:e.groups.reference}}}const C=Object(s.v)(u(Object(s.w)(),{paddingRequired:!0}),44,44);var k=r(190);const x=Object(s.x)([Object(s.p)(),Object(s.e)(),Object(s.w)(),k.d]),B=Object(s.g)(Object(s.p)(),x,Number),O=Object(s.g)(Object(s.e)(),x,BigInt),T=(Object(s.x)([k.d,Object(s.j)(Uint8Array)]),Object(s.g)(Object(s.j)(Uint8Array),Object(s.x)([k.d]),c.j)),R=Object(s.g)(k.d,Object(s.j)(Uint8Array),c.d);function P(t){try{const e=Object(s.h)(t,B);return Object(o.b)(Number.isFinite(e),'Expected a number-like value, got "'.concat(t,'".')),e}catch(e){if(e instanceof s.a)throw new Error('Expected a number-like value, got "'.concat(t,'".'));throw e}}function N(t){try{return Object(s.h)(t,O)}catch(e){if(e instanceof s.a)throw new Error('Expected a number-like value, got "'.concat(String(e.value),'".'));throw e}}function j(t){if("string"===typeof t&&"0x"===t.toLowerCase())return new Uint8Array;try{return Object(s.h)(t,T)}catch(e){if(e instanceof s.a)throw new Error('Expected a bytes-like value, got "'.concat(String(e.value),'".'));throw e}}function D(t){if(t instanceof Uint8Array&&0===t.length||"string"===typeof t&&"0x"===t.toLowerCase())return"0x";try{return Object(s.h)(t,R)}catch(e){if(e instanceof s.a)throw new Error('Expected a bytes-like value, got "'.concat(String(e.value),'".'));throw e}}function L(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function F(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,L(t,e,"get"))}function U(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function Q(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,L(t,e,"set"),r),r}var G=new WeakMap;let H=Symbol.iterator;class z{get size(){return F(this,G).size}[H](){return F(this,G)[Symbol.iterator]()}entries(){return F(this,G).entries()}forEach(t,e){return F(this,G).forEach(((r,n,i)=>t.call(e,r,n,this)))}get(t){return F(this,G).get(t)}has(t){return F(this,G).has(t)}keys(){return F(this,G).keys()}values(){return F(this,G).values()}toString(){return"FrozenMap(".concat(this.size,") {").concat(this.size>0?" ".concat([...this.entries()].map((t=>{let[e,r]=t;return"".concat(String(e)," => ").concat(String(r))})).join(", ")," "):"","}")}constructor(t){U(this,G,{writable:!0,value:void 0}),Q(this,G,new Map(t)),Object.freeze(this)}}var q=new WeakMap;let K=Symbol.iterator;class V{get size(){return F(this,q).size}[K](){return F(this,q)[Symbol.iterator]()}entries(){return F(this,q).entries()}forEach(t,e){return F(this,q).forEach(((r,n,i)=>t.call(e,r,n,this)))}has(t){return F(this,q).has(t)}keys(){return F(this,q).keys()}values(){return F(this,q).values()}toString(){return"FrozenSet(".concat(this.size,") {").concat(this.size>0?" ".concat([...this.values()].map((t=>String(t))).join(", ")," "):"","}")}constructor(t){U(this,q,{writable:!0,value:void 0}),Q(this,q,new Set(t)),Object.freeze(this)}}Object.freeze(z),Object.freeze(z.prototype),Object.freeze(V),Object.freeze(V.prototype);const W=Object(s.x)([Object(s.n)(null),Object(s.f)(),Object(s.i)("finite number",(t=>Object(s.l)(t,Object(s.p)())&&Number.isFinite(t))),Object(s.w)(),Object(s.c)(Object(s.m)((()=>W))),Object(s.t)(Object(s.w)(),Object(s.m)((()=>W)))]),J=Object(s.g)(W,Object(s.b)(),(t=>(Object(o.d)(t,W),JSON.parse(JSON.stringify(t,((t,e)=>{if("__proto__"!==t&&"constructor"!==t)return e}))))));function Y(t){try{return X(t),!0}catch{return!1}}function X(t){return Object(s.h)(t,J)}function Z(t){Object(o.d)(t,J,"Invalid JSON value");const e=JSON.stringify(t);return(new TextEncoder).encode(e).byteLength}const $="2.0",tt=Object(s.n)($),et=Object(s.o)(Object(s.x)([Object(s.p)(),Object(s.w)()])),rt=Object(s.q)({code:Object(s.k)(),message:Object(s.w)(),data:Object(s.r)(J),stack:Object(s.r)(Object(s.w)())}),nt=Object(s.x)([Object(s.t)(Object(s.w)(),J),Object(s.c)(J)]),it=Object(s.q)({id:et,jsonrpc:tt,method:Object(s.w)(),params:Object(s.r)(nt)}),ot=Object(s.q)({jsonrpc:tt,method:Object(s.w)(),params:Object(s.r)(nt)});function at(t){return Object(s.l)(t,ot)}function st(t,e){Object(o.d)(t,ot,"Invalid JSON-RPC notification",e)}function ut(t){return Object(s.l)(t,it)}function ct(t,e){Object(o.d)(t,it,"Invalid JSON-RPC request",e)}const lt=Object(s.q)({id:et,jsonrpc:tt,result:Object(s.r)(Object(s.y)()),error:Object(s.r)(rt)}),ft=Object(s.q)({id:et,jsonrpc:tt,result:J}),ht=Object(s.q)({id:et,jsonrpc:tt,error:rt}),dt=Object(s.x)([ft,ht]);function pt(t){return Object(s.l)(t,lt)}function gt(t,e){Object(o.d)(t,lt,"Invalid pending JSON-RPC response",e)}function mt(t){return Object(s.l)(t,dt)}function yt(t,e){Object(o.d)(t,dt,"Invalid JSON-RPC response",e)}function bt(t){return Object(s.l)(t,ft)}function vt(t,e){Object(o.d)(t,ft,"Invalid JSON-RPC success response",e)}function At(t){return Object(s.l)(t,ht)}function wt(t,e){Object(o.d)(t,ht,"Invalid JSON-RPC failure response",e)}function _t(t){return Object(s.l)(t,rt)}function Et(t,e){Object(o.d)(t,rt,"Invalid JSON-RPC error",e)}function It(t){const{permitEmptyString:e,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...t};return t=>Boolean("number"===typeof t&&(r||Number.isInteger(t))||"string"===typeof t&&(e||t.length>0)||n&&null===t)}var St=r(454);const Mt=r.n(St)()("metamask");function Ct(t){return Mt.extend(t)}function kt(t,e){return t.extend(e)}function xt(t){return Array.isArray(t)&&t.length>0}function Bt(t){return null===t||void 0===t}function Ot(t){return Boolean(t)&&"object"===typeof t&&!Array.isArray(t)}const Tt=(t,e)=>Object.hasOwnProperty.call(t,e);function Rt(t){return Object.getOwnPropertyNames(t)}var Pt;!function(t){t[t.Null=4]="Null",t[t.Comma=1]="Comma",t[t.Wrapper=1]="Wrapper",t[t.True=4]="True",t[t.False=5]="False",t[t.Quote=1]="Quote",t[t.Colon=1]="Colon",t[t.Date=24]="Date"}(Pt||(Pt={}));const Nt=/"|\\|\n|\r|\t/gu;function jt(t){if("object"!==typeof t||null===t)return!1;try{let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch(e){return!1}}function Dt(t){return t.charCodeAt(0)<=127}function Lt(t){var e;return t.split("").reduce(((t,e)=>Dt(e)?t+1:t+2),0)+(null!==(e=t.match(Nt))&&void 0!==e?e:[]).length}function Ft(t){return t.toString().length}const Ut=t=>(Object(o.b)("number"===typeof t,"Value must be a number."),Object(o.b)(t>=0,"Value must be a non-negative number."),Object(o.b)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToHex` instead."),Object(k.e)(t.toString(16))),Qt=t=>(Object(o.b)("bigint"===typeof t,"Value must be a bigint."),Object(o.b)(t>=0,"Value must be a non-negative bigint."),Object(k.e)(t.toString(16))),Gt=t=>{Object(k.f)(t);const e=parseInt(t,16);return Object(o.b)(Number.isSafeInteger(e),"Value is not a safe integer. Use `hexToBigInt` instead."),e},Ht=t=>(Object(k.f)(t),BigInt(Object(k.e)(t)));var zt;!function(t){t[t.Millisecond=1]="Millisecond",t[t.Second=1e3]="Second",t[t.Minute=6e4]="Minute",t[t.Hour=36e5]="Hour",t[t.Day=864e5]="Day",t[t.Week=6048e5]="Week",t[t.Year=31536e6]="Year"}(zt||(zt={}));const qt=(t,e)=>{if(!(t=>Number.isInteger(t)&&t>=0)(t))throw new Error('"'.concat(e,'" must be a non-negative integer. Received: "').concat(t,'".'))};function Kt(t,e){return qt(t,"count"),t*e}function Vt(t){return qt(t,"timestamp"),Date.now()-t}var Wt=r(536);const Jt=Object(s.u)(Object(s.w)(),"Version",(t=>null!==Object(Wt.valid)(t)||'Expected SemVer version, got "'.concat(t,'"'))),Yt=Object(s.u)(Object(s.w)(),"Version range",(t=>null!==Object(Wt.validRange)(t)||'Expected SemVer range, got "'.concat(t,'"')));function Xt(t){return Object(s.l)(t,Jt)}function Zt(t){return Object(s.l)(t,Yt)}function $t(t){Object(o.d)(t,Jt)}function te(t){Object(o.d)(t,Yt)}function ee(t,e){return Object(Wt.gt)(t,e)}function re(t,e){return Object(Wt.gtr)(t,e)}function ne(t,e){return Object(Wt.satisfies)(t,e,{includePrerelease:!0})}},function(t,e,r){"use strict";r.r(e),r.d(e,"isBytesLike",(function(){return m})),r.d(e,"isBytes",(function(){return y})),r.d(e,"arrayify",(function(){return b})),r.d(e,"concat",(function(){return v})),r.d(e,"stripZeros",(function(){return A})),r.d(e,"zeroPad",(function(){return w})),r.d(e,"isHexString",(function(){return _})),r.d(e,"hexlify",(function(){return I})),r.d(e,"hexDataLength",(function(){return S})),r.d(e,"hexDataSlice",(function(){return M})),r.d(e,"hexConcat",(function(){return C})),r.d(e,"hexValue",(function(){return k})),r.d(e,"hexStripZeros",(function(){return x})),r.d(e,"hexZeroPad",(function(){return B})),r.d(e,"splitSignature",(function(){return O})),r.d(e,"joinSignature",(function(){return T}));let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let a=o.default,s=null;const u=function(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var c,l;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(c||(c={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(l||(l={}));const f="0123456789abcdef";class h{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",t),a>o[r]||console.log.apply(console,e)}debug(){for(var t=arguments.length,e=new Array(t),r=0;r{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t>4],r+=f[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(s){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push("code=".concat(e)),n.push("version=".concat(this.version));const o=t;let a="";switch(e){case l.NUMERIC_FAULT:{a="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":a+="-"+e;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case l.CALL_EXCEPTION:case l.INSUFFICIENT_FUNDS:case l.MISSING_NEW:case l.NONCE_EXPIRED:case l.REPLACEMENT_UNDERPRICED:case l.TRANSACTION_REPLACED:case l.UNPREDICTABLE_GAS_LIMIT:a=e}a&&(t+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const s=new Error(t);return s.reason=o,s.code=e,Object.keys(r).forEach((function(t){s[t]=r[t]})),s}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,h.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",h.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",te&&this.throwError("too many arguments"+r,h.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",h.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",h.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return s||(s=new h("logger/5.6.0")),s}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!t)return;this.globalLogger().throwError("error censorship permanent",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!t,n=!!e}static setLogLevel(t){const e=o[t.toLowerCase()];null!=e?a=e:h.globalLogger().warn("invalid log level - "+t)}static from(t){return new h(t)}}h.errors=l,h.levels=c;const d=new h("bytes/5.4.0");function p(t){return!!t.toHexString}function g(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return g(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function m(t){return _(t)&&!(t.length%2)||y(t)}function y(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"===typeof t)return!1;if(null==t.length)return!1;for(let e=0;e=256||r%1)return!1}return!0}function b(t,e){if(e||(e={}),"number"===typeof t){d.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),g(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),p(t)&&(t=t.toHexString()),_(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0x0"+r.substring(2):"right"===e.hexPad?r+="0":d.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let t=0;tb(t))),r=e.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(r);return e.reduce(((t,e)=>(n.set(e,t),t+e.length)),0),g(n)}function A(t){let e=b(t);if(0===e.length)return e;let r=0;for(;re&&d.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),g(r)}function _(t,e){return!("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}const E="0123456789abcdef";function I(t,e){if(e||(e={}),"number"===typeof t){d.checkSafeUint53(t,"invalid hexlify value");let e="";for(;t;)e=E[15&t]+e,t=Math.floor(t/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if("bigint"===typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),p(t))return t.toHexString();if(_(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":d.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(y(t)){let e="0x";for(let r=0;r>4]+E[15&n]}return e}return d.throwArgumentError("invalid hexlify value","value",t)}function S(t){if("string"!==typeof t)t=I(t);else if(!_(t)||t.length%2)return null;return(t.length-2)/2}function M(t,e,r){return"string"!==typeof t?t=I(t):(!_(t)||t.length%2)&&d.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function C(t){let e="0x";return t.forEach((t=>{e+=I(t).substring(2)})),e}function k(t){const e=x(I(t,{hexPad:"left"}));return"0x"===e?"0x0":e}function x(t){"string"!==typeof t&&(t=I(t)),_(t)||d.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&d.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function O(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(m(t)){const r=b(t);65!==r.length&&d.throwArgumentError("invalid signature string; must be 65 bytes","signature",t),e.r=I(r.slice(0,32)),e.s=I(r.slice(32,64)),e.v=r[64],e.v<27&&(0===e.v||1===e.v?e.v+=27:d.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=I(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const r=w(b(e._vs),32);e._vs=I(r);const n=r[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=n:e.recoveryParam!==n&&d.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;const i=I(r);null==e.s?e.s=i:e.s!==i&&d.throwArgumentError("signature v mismatch _vs","signature",t)}null==e.recoveryParam?null==e.v?d.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2:null==e.v?e.v=27+e.recoveryParam:e.recoveryParam!==1-e.v%2&&d.throwArgumentError("signature recoveryParam mismatch v","signature",t),null!=e.r&&_(e.r)?e.r=B(e.r,32):d.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&_(e.s)?e.s=B(e.s,32):d.throwArgumentError("signature missing or invalid s","signature",t);const r=b(e.s);r[0]>=128&&d.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=I(r);e._vs&&(_(e._vs)||d.throwArgumentError("signature invalid _vs","signature",t),e._vs=B(e._vs,32)),null==e._vs?e._vs=n:e._vs!==n&&d.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e}function T(t){return I(v([(t=O(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},function(t,e,r){"use strict";r.d(e,"a",(function(){return Ae})),r.d(e,"b",(function(){return we})),r.d(e,"c",(function(){return _e}));var n=r(1),i=r(86),o=r.n(i),a=r(5);var s=o.a.BN;const u=new a.b("bignumber/5.6.2"),c={},l=9007199254740991;let f=!1;class h{constructor(t,e){t!==c&&u.throwError("cannot call constructor directly; use BigNumber.from",a.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return p(g(this).fromTwos(t))}toTwos(t){return p(g(this).toTwos(t))}abs(){return"-"===this._hex[0]?h.from(this._hex.substring(1)):this}add(t){return p(g(this).add(g(t)))}sub(t){return p(g(this).sub(g(t)))}div(t){return h.from(t).isZero()&&m("division-by-zero","div"),p(g(this).div(g(t)))}mul(t){return p(g(this).mul(g(t)))}mod(t){const e=g(t);return e.isNeg()&&m("division-by-zero","mod"),p(g(this).umod(e))}pow(t){const e=g(t);return e.isNeg()&&m("negative-power","pow"),p(g(this).pow(e))}and(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","and"),p(g(this).and(e))}or(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","or"),p(g(this).or(e))}xor(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","xor"),p(g(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&m("negative-width","mask"),p(g(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&m("negative-width","shl"),p(g(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&m("negative-width","shr"),p(g(this).shrn(t))}eq(t){return g(this).eq(g(t))}lt(t){return g(this).lt(g(t))}lte(t){return g(this).lte(g(t))}gt(t){return g(this).gt(g(t))}gte(t){return g(this).gte(g(t))}isNegative(){return"-"===this._hex[0]}isZero(){return g(this).isZero()}toNumber(){try{return g(this).toNumber()}catch(t){m("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return u.throwError("this platform does not support BigInt",a.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?f||(f=!0,u.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?u.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.b.errors.UNEXPECTED_ARGUMENT,{}):u.throwError("BigNumber.toString does not accept parameters",a.b.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof h)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new h(c,d(t)):t.match(/^-?[0-9]+$/)?new h(c,d(new s(t))):u.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&m("underflow","BigNumber.from",t),(t>=l||t<=-l)&&m("overflow","BigNumber.from",t),h.from(String(t));const e=t;if("bigint"===typeof e)return h.from(e.toString());if(Object(n.j)(e))return h.from(Object(n.i)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return h.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&(Object(n.l)(t)||"-"===t[0]&&Object(n.l)(t.substring(1))))return h.from(t)}return u.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function d(t){if("string"!==typeof t)return d(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&u.throwArgumentError("invalid hex","value",t),"0x00"===(t=d(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function p(t){return h.from(d(t))}function g(t){const e=h.from(t).toHexString();return"-"===e[0]?new s("-"+e.substring(3),16):new s(e.substring(2),16)}function m(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),u.throwError(t,a.b.errors.NUMERIC_FAULT,n)}var y=r(6);const b="abi/5.6.4",v=new a.b(b);class A{constructor(t,e,r,n){this.name=t,this.type=e,this.localName=r,this.dynamic=n}_throwError(t,e){v.throwArgumentError(t,this.localName,e)}}class w{constructor(t){Object(y.d)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return Object(n.c)(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData(Object(n.b)(t._data))}writeBytes(t){let e=Object(n.a)(t);const r=e.length%this.wordSize;return r&&(e=Object(n.b)([e,this._padding.slice(r)])),this._writeData(e)}_getValue(t){let e=Object(n.a)(h.from(t));return e.length>this.wordSize&&v.throwError("value out-of-bounds",a.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=Object(n.b)([this._padding.slice(e.length%this.wordSize),e])),e}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class _{constructor(t,e,r,i){Object(y.d)(this,"_data",Object(n.a)(t)),Object(y.d)(this,"wordSize",e||32),Object(y.d)(this,"_coerceFunc",r),Object(y.d)(this,"allowLoose",i),this._offset=0}get data(){return Object(n.i)(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):_.coerce(t,e)}_peekBytes(t,e,r){let n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:v.throwError("data out-of-bounds",a.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(t){return new _(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return h.from(this.readBytes(this.wordSize))}}var E=r(112),I=r.n(E);function S(t){return"0x"+I.a.keccak_256(Object(n.a)(t))}const M=new a.b("rlp/5.6.1");function C(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function k(t){if(Array.isArray(t)){let e=[];if(t.forEach((function(t){e=e.concat(k(t))})),e.length<=55)return e.unshift(192+e.length),e;const r=C(e.length);return r.unshift(247+r.length),r.concat(e)}Object(n.k)(t)||M.throwArgumentError("RLP object must be BytesLike","object",t);const e=Array.prototype.slice.call(Object(n.a)(t));if(1===e.length&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=C(e.length);return r.unshift(183+r.length),r.concat(e)}function x(t){return Object(n.i)(k(t))}const B=new a.b("address/5.6.1");function O(t){Object(n.l)(t,20)||B.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let n=0;n<40;n++)r[n]=e[n].charCodeAt(0);const i=Object(n.a)(S(r));for(let n=0;n<40;n+=2)i[n>>1]>>4>=8&&(e[n]=e[n].toUpperCase()),(15&i[n>>1])>=8&&(e[n+1]=e[n+1].toUpperCase());return"0x"+e.join("")}const T={};for(let Ee=0;Ee<10;Ee++)T[String(Ee)]=String(Ee);for(let Ee=0;Ee<26;Ee++)T[String.fromCharCode(65+Ee)]=String(10+Ee);const R=Math.floor((P=9007199254740991,Math.log10?Math.log10(P):Math.log(P)/Math.LN10));var P;function N(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>T[t])).join("");for(;e.length>=R;){let t=e.substring(0,R);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function j(t){let e=null;if("string"!==typeof t&&B.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=O(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&B.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==N(t)&&B.throwArgumentError("bad icap checksum","address",t),r=t.substring(4),e=new s(r,36).toString(16);e.length<40;)e="0"+e;e=O("0x"+e)}else B.throwArgumentError("invalid address","address",t);var r;return e}function D(t){let e=null;try{e=j(t.from)}catch(i){B.throwArgumentError("missing from address","transaction",t)}const r=Object(n.o)(Object(n.a)(h.from(t.nonce).toHexString()));return j(Object(n.e)(S(x([e,r])),12))}const L=new a.b("strings/5.6.1");var F,U;function Q(t,e,r,n,i){if(t===U.BAD_PREFIX||t===U.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6===2;n++)t++;return t}return t===U.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(F||(F={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(U||(U={}));const G=Object.freeze({error:function(t,e,r,n,i){return L.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:Q,replace:function(t,e,r,n,i){return t===U.OVERLONG?(n.push(i),0):(n.push(65533),Q(t,e,r))}});function H(t,e){null==e&&(e=G.error),t=Object(n.a)(t);const r=[];let i=0;for(;i>7===0){r.push(n);continue}let o=null,a=null;if(192===(224&n))o=1,a=127;else if(224===(240&n))o=2,a=2047;else{if(240!==(248&n)){i+=e(128===(192&n)?U.UNEXPECTED_CONTINUE:U.BAD_PREFIX,i-1,t,r);continue}o=3,a=65535}if(i-1+o>=t.length){i+=e(U.OVERRUN,i-1,t,r);continue}let s=n&(1<<8-o-1)-1;for(let u=0;u1114111?i+=e(U.OUT_OF_RANGE,i-1-o,t,r,s):s>=55296&&s<=57343?i+=e(U.UTF16_SURROGATE,i-1-o,t,r,s):s<=a?i+=e(U.OVERLONG,i-1-o,t,r,s):r.push(s))}return r}function z(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:F.current;e!=F.current&&(L.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return Object(n.a)(r)}function q(t,e){return H(t,e).map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}function K(t){return S(z(t))}class V extends A{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){try{e=j(e)}catch(r){this._throwError(r.message,e)}return t.writeValue(e)}decode(t){return j(Object(n.h)(t.readValue().toHexString(),20))}}class W extends A{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}const J=new a.b(b);function Y(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){let t={};n=e.map((e=>{const n=e.localName;return n||J.throwError("cannot encode object for signature with missing names",a.b.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]&&J.throwError("cannot encode object for signature with duplicate names",a.b.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]=!0,r[n]}))}else J.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&J.throwArgumentError("types/value length mismatch","tuple",r);let i=new w(t.wordSize),o=new w(t.wordSize),s=[];e.forEach(((t,e)=>{let r=n[e];if(t.dynamic){let e=o.length;t.encode(o,r);let n=i.writeUpdatableValue();s.push((t=>{n(t+e)}))}else t.encode(i,r)})),s.forEach((t=>{t(i.length)}));let u=t.appendWriter(i);return u+=t.appendWriter(o),u}function X(t,e){let r=[],n=t.subReader(0);e.forEach((e=>{let i=null;if(e.dynamic){let r=t.readValue(),s=n.subReader(r.toNumber());try{i=e.decode(s)}catch(o){if(o.code===a.b.errors.BUFFER_OVERRUN)throw o;i=o,i.baseType=e.name,i.name=e.localName,i.type=e.type}}else try{i=e.decode(t)}catch(o){if(o.code===a.b.errors.BUFFER_OVERRUN)throw o;i=o,i.baseType=e.name,i.name=e.localName,i.type=e.type}void 0!=i&&r.push(i)}));const i=e.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach(((t,e)=>{let n=t.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[e];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let o=0;o{throw t}})}return Object.freeze(r)}class Z extends A{constructor(t,e,r){super("array",t.type+"["+(e>=0?e:"")+"]",r,-1===e||t.dynamic),this.coder=t,this.length=e}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;rt._data.length&&J.throwError("insufficient data length",a.b.errors.BUFFER_OVERRUN,{length:t._data.length,count:e}));let r=[];for(let n=0;n{t.dynamic&&(r=!0),n.push(t.type)}));super("tuple","tuple("+n.join(",")+")",e,r),this.coders=t}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===e[i]&&("length"===i&&(i="_length"),null==t[i]&&(t[i]=t[n]))})),Object.freeze(t)}encode(t,e){return Y(t,this.coders,e)}decode(t){return t.coerce(this.name,X(t,this.coders))}}const ft=new a.b(b),ht={};let dt={calldata:!0,memory:!0,storage:!0},pt={calldata:!0,memory:!0};function gt(t,e){if("bytes"===t||"string"===t){if(dt[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&pt[e])return!0;return(dt[e]||"payable"===e)&&ft.throwArgumentError("invalid modifier","name",e),!1}function mt(t,e){for(let r in e)Object(y.d)(t,r,e[r])}const yt=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),bt=new RegExp(/^(.*)\[([0-9]*)\]$/);class vt{constructor(t,e){t!==ht&&ft.throwError("use fromString",a.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),mt(this,e);let r=this.type.match(bt);mt(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:vt.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=yt.sighash),yt[t]||ft.throwArgumentError("invalid format type","format",t),t===yt.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==yt.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===yt.full?", ":",")+")"):e+=this.type,t!==yt.sighash&&(!0===this.indexed&&(e+=" indexed"),t===yt.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"===typeof t?vt.fromString(t,e):vt.fromObject(t)}static fromObject(t){return vt.isParamType(t)?t:new vt(ht,{name:t.name||null,type:Bt(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(vt.fromObject):null})}static fromString(t,e){return r=function(t,e){let r=t;function n(e){ft.throwArgumentError("unexpected character at position ".concat(e),"param",t)}function i(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},a=o;for(let s=0;svt.fromString(t,e)))}class wt{constructor(t,e){t!==ht&&ft.throwError("use a static from method",a.b.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),mt(this,e),this._isFragment=!0,Object.freeze(this)}static from(t){return wt.isFragment(t)?t:"string"===typeof t?wt.fromString(t):wt.fromObject(t)}static fromObject(t){if(wt.isFragment(t))return t;switch(t.type){case"function":return Ct.fromObject(t);case"event":return _t.fromObject(t);case"constructor":return Mt.fromObject(t);case"error":return xt.fromObject(t);case"fallback":case"receive":return null}return ft.throwArgumentError("invalid fragment object","value",t)}static fromString(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?_t.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?Ct.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?Mt.fromString(t.trim()):"error"===t.split(" ")[0]?xt.fromString(t.substring(5).trim()):ft.throwArgumentError("unsupported fragment","value",t)}static isFragment(t){return!(!t||!t._isFragment)}}class _t extends wt{format(t){if(t||(t=yt.sighash),yt[t]||ft.throwArgumentError("invalid format type","format",t),t===yt.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==yt.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===yt.full?", ":",")+") ",t!==yt.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}static from(t){return"string"===typeof t?_t.fromString(t):_t.fromObject(t)}static fromObject(t){if(_t.isEventFragment(t))return t;"event"!==t.type&&ft.throwArgumentError("invalid event object","value",t);const e={name:Tt(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(vt.fromObject):[],type:"event"};return new _t(ht,e)}static fromString(t){let e=t.match(Rt);e||ft.throwArgumentError("invalid event string","value",t);let r=!1;return e[3].split(" ").forEach((t=>{switch(t.trim()){case"anonymous":r=!0;break;case"":break;default:ft.warn("unknown modifier: "+t)}})),_t.fromObject({name:e[1].trim(),anonymous:r,inputs:At(e[2],!0),type:"event"})}static isEventFragment(t){return t&&t._isFragment&&"event"===t.type}}function Et(t,e){e.gas=null;let r=t.split("@");return 1!==r.length?(r.length>2&&ft.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||ft.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=h.from(r[1]),r[0]):t}function It(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function St(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&ft.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&ft.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||ft.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&ft.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&ft.throwArgumentError("unable to determine stateMutability","value",t),e}class Mt extends wt{format(t){if(t||(t=yt.sighash),yt[t]||ft.throwArgumentError("invalid format type","format",t),t===yt.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});t===yt.sighash&&ft.throwError("cannot format a constructor for sighash",a.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let e="constructor("+this.inputs.map((e=>e.format(t))).join(t===yt.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}static from(t){return"string"===typeof t?Mt.fromString(t):Mt.fromObject(t)}static fromObject(t){if(Mt.isConstructorFragment(t))return t;"constructor"!==t.type&&ft.throwArgumentError("invalid constructor object","value",t);let e=St(t);e.constant&&ft.throwArgumentError("constructor cannot be constant","value",t);const r={name:null,type:t.type,inputs:t.inputs?t.inputs.map(vt.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?h.from(t.gas):null};return new Mt(ht,r)}static fromString(t){let e={type:"constructor"},r=(t=Et(t,e)).match(Rt);return r&&"constructor"===r[1].trim()||ft.throwArgumentError("invalid constructor string","value",t),e.inputs=At(r[2].trim(),!1),It(r[3].trim(),e),Mt.fromObject(e)}static isConstructorFragment(t){return t&&t._isFragment&&"constructor"===t.type}}class Ct extends Mt{format(t){if(t||(t=yt.sighash),yt[t]||ft.throwArgumentError("invalid format type","format",t),t===yt.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==yt.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===yt.full?", ":",")+") ",t!==yt.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((e=>e.format(t))).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}static from(t){return"string"===typeof t?Ct.fromString(t):Ct.fromObject(t)}static fromObject(t){if(Ct.isFunctionFragment(t))return t;"function"!==t.type&&ft.throwArgumentError("invalid function object","value",t);let e=St(t);const r={type:t.type,name:Tt(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(vt.fromObject):[],outputs:t.outputs?t.outputs.map(vt.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?h.from(t.gas):null};return new Ct(ht,r)}static fromString(t){let e={type:"function"},r=(t=Et(t,e)).split(" returns ");r.length>2&&ft.throwArgumentError("invalid function string","value",t);let n=r[0].match(Rt);if(n||ft.throwArgumentError("invalid function signature","value",t),e.name=n[1].trim(),e.name&&Tt(e.name),e.inputs=At(n[2],!1),It(n[3].trim(),e),r.length>1){let n=r[1].match(Rt);""==n[1].trim()&&""==n[3].trim()||ft.throwArgumentError("unexpected tokens","value",t),e.outputs=At(n[2],!1)}else e.outputs=[];return Ct.fromObject(e)}static isFunctionFragment(t){return t&&t._isFragment&&"function"===t.type}}function kt(t){const e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||ft.throwArgumentError("cannot specify user defined ".concat(e," error"),"fragment",t),t}class xt extends wt{format(t){if(t||(t=yt.sighash),yt[t]||ft.throwArgumentError("invalid format type","format",t),t===yt.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==yt.sighash&&(e+="error "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===yt.full?", ":",")+") ",e.trim()}static from(t){return"string"===typeof t?xt.fromString(t):xt.fromObject(t)}static fromObject(t){if(xt.isErrorFragment(t))return t;"error"!==t.type&&ft.throwArgumentError("invalid error object","value",t);const e={type:t.type,name:Tt(t.name),inputs:t.inputs?t.inputs.map(vt.fromObject):[]};return kt(new xt(ht,e))}static fromString(t){let e={type:"error"},r=t.match(Rt);return r||ft.throwArgumentError("invalid error signature","value",t),e.name=r[1].trim(),e.name&&Tt(e.name),e.inputs=At(r[2],!1),kt(xt.fromObject(e))}static isErrorFragment(t){return t&&t._isFragment&&"error"===t.type}}function Bt(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const Ot=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Tt(t){return t&&t.match(Ot)||ft.throwArgumentError('invalid identifier "'.concat(t,'"'),"value",t),t}const Rt=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const Pt=new a.b(b),Nt=new RegExp(/^bytes([0-9]*)$/),jt=new RegExp(/^(u?int)([0-9]*)$/);const Dt=new class{constructor(t){Object(y.d)(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new V(t.name);case"bool":return new $(t.name);case"string":return new ct(t.name);case"bytes":return new et(t.name);case"array":return new Z(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new lt((t.components||[]).map((t=>this._getCoder(t))),t.name);case"":return new nt(t.name)}let e=t.type.match(jt);if(e){let r=parseInt(e[2]||"256");return(0===r||r>256||r%8!==0)&&Pt.throwArgumentError("invalid "+e[1]+" bit length","param",t),new ut(r/8,"int"===e[1],t.name)}if(e=t.type.match(Nt),e){let r=parseInt(e[1]);return(0===r||r>32)&&Pt.throwArgumentError("invalid bytes length","param",t),new rt(r,t.name)}return Pt.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new _(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new w(this._getWordSize())}getDefaultValue(t){const e=t.map((t=>this._getCoder(vt.from(t))));return new lt(e,"_").defaultValue()}encode(t,e){t.length!==e.length&&Pt.throwError("types/values length mismatch",a.b.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});const r=t.map((t=>this._getCoder(vt.from(t)))),n=new lt(r,"_"),i=this._getWriter();return n.encode(i,e),i.data}decode(t,e,r){const i=t.map((t=>this._getCoder(vt.from(t))));return new lt(i,"_").decode(this._getReader(Object(n.a)(e),r))}},Lt=new a.b(b);class Ft extends y.a{}class Ut extends y.a{}class Qt extends y.a{}class Gt extends y.a{static isIndexed(t){return!(!t||!t._isIndexed)}}const Ht={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function zt(t,e){const r=new Error("deferred error during ABI decoding triggered accessing ".concat(t));return r.error=e,r}class qt{constructor(t){let e=[];e="string"===typeof t?JSON.parse(t):t,Object(y.d)(this,"fragments",e.map((t=>wt.from(t))).filter((t=>null!=t))),Object(y.d)(this,"_abiCoder",Object(y.e)(new.target,"getAbiCoder")()),Object(y.d)(this,"functions",{}),Object(y.d)(this,"errors",{}),Object(y.d)(this,"events",{}),Object(y.d)(this,"structs",{}),this.fragments.forEach((t=>{let e=null;switch(t.type){case"constructor":return this.deploy?void Lt.warn("duplicate definition - constructor"):void Object(y.d)(this,"deploy",t);case"function":e=this.functions;break;case"event":e=this.events;break;case"error":e=this.errors;break;default:return}let r=t.format();e[r]?Lt.warn("duplicate definition - "+r):e[r]=t})),this.deploy||Object(y.d)(this,"deploy",Mt.from({payable:!1,type:"constructor"})),Object(y.d)(this,"_isInterface",!0)}format(t){t||(t=yt.full),t===yt.sighash&&Lt.throwArgumentError("interface does not support formatting sighash","format",t);const e=this.fragments.map((e=>e.format(t)));return t===yt.json?JSON.stringify(e.map((t=>JSON.parse(t)))):e}static getAbiCoder(){return Dt}static getAddress(t){return j(t)}static getSighash(t){return Object(n.e)(K(t.format()),0,4)}static getEventTopic(t){return K(t.format())}getFunction(t){if(Object(n.l)(t)){for(const e in this.functions)if(t===this.getSighash(e))return this.functions[e];Lt.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.functions).filter((t=>t.split("(")[0]===e));return 0===r.length?Lt.throwArgumentError("no matching function","name",e):r.length>1&&Lt.throwArgumentError("multiple matching functions","name",e),this.functions[r[0]]}const e=this.functions[Ct.fromString(t).format()];return e||Lt.throwArgumentError("no matching function","signature",t),e}getEvent(t){if(Object(n.l)(t)){const e=t.toLowerCase();for(const t in this.events)if(e===this.getEventTopic(t))return this.events[t];Lt.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.events).filter((t=>t.split("(")[0]===e));return 0===r.length?Lt.throwArgumentError("no matching event","name",e):r.length>1&&Lt.throwArgumentError("multiple matching events","name",e),this.events[r[0]]}const e=this.events[_t.fromString(t).format()];return e||Lt.throwArgumentError("no matching event","signature",t),e}getError(t){if(Object(n.l)(t)){const e=Object(y.e)(this.constructor,"getSighash");for(const r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}Lt.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.errors).filter((t=>t.split("(")[0]===e));return 0===r.length?Lt.throwArgumentError("no matching error","name",e):r.length>1&&Lt.throwArgumentError("multiple matching errors","name",e),this.errors[r[0]]}const e=this.errors[Ct.fromString(t).format()];return e||Lt.throwArgumentError("no matching error","signature",t),e}getSighash(t){if("string"===typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(r){throw e}}return Object(y.e)(this.constructor,"getSighash")(t)}getEventTopic(t){return"string"===typeof t&&(t=this.getEvent(t)),Object(y.e)(this.constructor,"getEventTopic")(t)}_decodeParams(t,e){return this._abiCoder.decode(t,e)}_encodeParams(t,e){return this._abiCoder.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){"string"===typeof t&&(t=this.getError(t));const r=Object(n.a)(e);return Object(n.i)(r.slice(0,4))!==this.getSighash(t)&&Lt.throwArgumentError("data signature does not match error ".concat(t.name,"."),"data",Object(n.i)(r)),this._decodeParams(t.inputs,r.slice(4))}encodeErrorResult(t,e){return"string"===typeof t&&(t=this.getError(t)),Object(n.i)(Object(n.b)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionData(t,e){"string"===typeof t&&(t=this.getFunction(t));const r=Object(n.a)(e);return Object(n.i)(r.slice(0,4))!==this.getSighash(t)&&Lt.throwArgumentError("data signature does not match function ".concat(t.name,"."),"data",Object(n.i)(r)),this._decodeParams(t.inputs,r.slice(4))}encodeFunctionData(t,e){return"string"===typeof t&&(t=this.getFunction(t)),Object(n.i)(Object(n.b)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionResult(t,e){"string"===typeof t&&(t=this.getFunction(t));let r=Object(n.a)(e),i=null,o="",s=null,u=null,c=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,r)}catch(l){}break;case 4:{const t=Object(n.i)(r.slice(0,4)),e=Ht[t];if(e)s=this._abiCoder.decode(e.inputs,r.slice(4)),u=e.name,c=e.signature,e.reason&&(i=s[0]),"Error"===u?o="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(s[0])):"Panic"===u&&(o="; VM Exception while processing transaction: reverted with panic code ".concat(s[0]));else try{const e=this.getError(t);s=this._abiCoder.decode(e.inputs,r.slice(4)),u=e.name,c=e.format()}catch(l){}break}}return Lt.throwError("call revert exception"+o,a.b.errors.CALL_EXCEPTION,{method:t.format(),data:Object(n.i)(e),errorArgs:s,errorName:u,errorSignature:c,reason:i})}encodeFunctionResult(t,e){return"string"===typeof t&&(t=this.getFunction(t)),Object(n.i)(this._abiCoder.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){"string"===typeof t&&(t=this.getEvent(t)),e.length>t.inputs.length&&Lt.throwError("too many arguments for "+t.format(),a.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e});let r=[];t.anonymous||r.push(this.getEventTopic(t));const i=(t,e)=>"string"===t.type?K(e):"bytes"===t.type?S(Object(n.i)(e)):("bool"===t.type&&"boolean"===typeof e&&(e=e?"0x01":"0x00"),t.type.match(/^u?int/)&&(e=h.from(e).toHexString()),"address"===t.type&&this._abiCoder.encode(["address"],[e]),Object(n.h)(Object(n.i)(e),32));for(e.forEach(((e,n)=>{let o=t.inputs[n];o.indexed?null==e?r.push(null):"array"===o.baseType||"tuple"===o.baseType?Lt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,e):Array.isArray(e)?r.push(e.map((t=>i(o,t)))):r.push(i(o,e)):null!=e&&Lt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,e)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(t,e){"string"===typeof t&&(t=this.getEvent(t));const r=[],n=[],i=[];return t.anonymous||r.push(this.getEventTopic(t)),e.length!==t.inputs.length&&Lt.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach(((t,o)=>{const a=e[o];if(t.indexed)if("string"===t.type)r.push(K(a));else if("bytes"===t.type)r.push(S(a));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([t.type],[a]))}else n.push(t),i.push(a)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(t,e,r){if("string"===typeof t&&(t=this.getEvent(t)),null!=r&&!t.anonymous){let e=this.getEventTopic(t);Object(n.l)(r[0],32)&&r[0].toLowerCase()===e||Lt.throwError("fragment/topic mismatch",a.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:e,value:r[0]}),r=r.slice(1)}let i=[],o=[],s=[];t.inputs.forEach(((t,e)=>{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(i.push(vt.fromObject({type:"bytes32",name:t.name})),s.push(!0)):(i.push(t),s.push(!1)):(o.push(t),s.push(!1))}));let u=null!=r?this._abiCoder.decode(i,Object(n.b)(r)):null,c=this._abiCoder.decode(o,e,!0),l=[],f=0,h=0;t.inputs.forEach(((t,e)=>{if(t.indexed)if(null==u)l[e]=new Gt({_isIndexed:!0,hash:null});else if(s[e])l[e]=new Gt({_isIndexed:!0,hash:u[h++]});else try{l[e]=u[h++]}catch(r){l[e]=r}else try{l[e]=c[f++]}catch(r){l[e]=r}if(t.name&&null==l[t.name]){const r=l[e];r instanceof Error?Object.defineProperty(l,t.name,{enumerable:!0,get:()=>{throw zt("property ".concat(JSON.stringify(t.name)),r)}}):l[t.name]=r}}));for(let n=0;n{throw zt("index ".concat(n),t)}})}return Object.freeze(l)}parseTransaction(t){let e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new Ut({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:h.from(t.value||"0")}):null}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new Ft({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}parseError(t){const e=Object(n.i)(t);let r=this.getError(e.substring(0,10).toLowerCase());return r?new Qt({args:this._abiCoder.decode(r.inputs,"0x"+e.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(t){return!(!t||!t._isInterface)}}var Kt=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const Vt=new a.b("abstract-provider/5.6.1");class Wt extends y.a{static isForkEvent(t){return!(!t||!t._isForkEvent)}}class Jt{constructor(){Vt.checkAbstract(new.target,Jt),Object(y.d)(this,"_isProvider",!0)}getFeeData(){return Kt(this,void 0,void 0,(function*(){const{block:t,gasPrice:e}=yield Object(y.f)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((t=>null))});let r=null,n=null;return t&&t.baseFeePerGas&&(n=h.from("1500000000"),r=t.baseFeePerGas.mul(2).add(n)),{maxFeePerGas:r,maxPriorityFeePerGas:n,gasPrice:e}}))}addListener(t,e){return this.on(t,e)}removeListener(t,e){return this.off(t,e)}static isProvider(t){return!(!t||!t._isProvider)}}var Yt=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const Xt=new a.b("abstract-signer/5.6.2"),Zt=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],$t=[a.b.errors.INSUFFICIENT_FUNDS,a.b.errors.NONCE_EXPIRED,a.b.errors.REPLACEMENT_UNDERPRICED];class te{constructor(){Xt.checkAbstract(new.target,te),Object(y.d)(this,"_isSigner",!0)}getBalance(t){return Yt(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),t)}))}getTransactionCount(t){return Yt(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),t)}))}estimateGas(t){return Yt(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const e=yield Object(y.f)(this.checkTransaction(t));return yield this.provider.estimateGas(e)}))}call(t,e){return Yt(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield Object(y.f)(this.checkTransaction(t));return yield this.provider.call(r,e)}))}sendTransaction(t){return Yt(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const e=yield this.populateTransaction(t),r=yield this.signTransaction(e);return yield this.provider.sendTransaction(r)}))}getChainId(){return Yt(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return Yt(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return Yt(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(t){return Yt(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(t)}))}checkTransaction(t){for(const r in t)-1===Zt.indexOf(r)&&Xt.throwArgumentError("invalid transaction key: "+r,"transaction",t);const e=Object(y.g)(t);return null==e.from?e.from=this.getAddress():e.from=Promise.all([Promise.resolve(e.from),this.getAddress()]).then((e=>(e[0].toLowerCase()!==e[1].toLowerCase()&&Xt.throwArgumentError("from address mismatch","transaction",t),e[0]))),e}populateTransaction(t){return Yt(this,void 0,void 0,(function*(){const e=yield Object(y.f)(this.checkTransaction(t));null!=e.to&&(e.to=Promise.resolve(e.to).then((t=>Yt(this,void 0,void 0,(function*(){if(null==t)return null;const e=yield this.resolveName(t);return null==e&&Xt.throwArgumentError("provided ENS name resolves to null","tx.to",t),e})))),e.to.catch((t=>{})));const r=null!=e.maxFeePerGas||null!=e.maxPriorityFeePerGas;if(null==e.gasPrice||2!==e.type&&!r?0!==e.type&&1!==e.type||!r||Xt.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",t):Xt.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",t),2!==e.type&&null!=e.type||null==e.maxFeePerGas||null==e.maxPriorityFeePerGas)if(0===e.type||1===e.type)null==e.gasPrice&&(e.gasPrice=this.getGasPrice());else{const t=yield this.getFeeData();if(null==e.type)if(null!=t.maxFeePerGas&&null!=t.maxPriorityFeePerGas)if(e.type=2,null!=e.gasPrice){const t=e.gasPrice;delete e.gasPrice,e.maxFeePerGas=t,e.maxPriorityFeePerGas=t}else null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas);else null!=t.gasPrice?(r&&Xt.throwError("network does not support EIP-1559",a.b.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==e.gasPrice&&(e.gasPrice=t.gasPrice),e.type=0):Xt.throwError("failed to get consistent fee data",a.b.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===e.type&&(null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas))}else e.type=2;return null==e.nonce&&(e.nonce=this.getTransactionCount("pending")),null==e.gasLimit&&(e.gasLimit=this.estimateGas(e).catch((t=>{if($t.indexOf(t.code)>=0)throw t;return Xt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",a.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,tx:e})}))),null==e.chainId?e.chainId=this.getChainId():e.chainId=Promise.all([Promise.resolve(e.chainId),this.getChainId()]).then((e=>(0!==e[1]&&e[0]!==e[1]&&Xt.throwArgumentError("chainId address mismatch","transaction",t),e[0]))),yield Object(y.f)(e)}))}_checkProvider(t){this.provider||Xt.throwError("missing provider",a.b.errors.UNSUPPORTED_OPERATION,{operation:t||"_checkProvider"})}static isSigner(t){return!(!t||!t._isSigner)}}class ee extends te{constructor(t,e){super(),Object(y.d)(this,"address",t),Object(y.d)(this,"provider",e||null)}getAddress(){return Promise.resolve(this.address)}_fail(t,e){return Promise.resolve().then((()=>{Xt.throwError(t,a.b.errors.UNSUPPORTED_OPERATION,{operation:e})}))}signMessage(t){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(t){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(t,e,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(t){return new ee(this.address,t)}}r(1383);new a.b("signing-key/5.6.2");const re=new a.b("transactions/5.6.2");var ne;!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(ne||(ne={}));function ie(t,e){return{address:j(t),storageKeys:(e||[]).map(((e,r)=>(32!==Object(n.d)(e)&&re.throwArgumentError("invalid access list storageKey","accessList[".concat(t,":").concat(r,"]"),e),e.toLowerCase())))}}function oe(t){if(Array.isArray(t))return t.map(((t,e)=>Array.isArray(t)?(t.length>2&&re.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(e,"]"),t),ie(t[0],t[1])):ie(t.address,t.storageKeys)));const e=Object.keys(t).map((e=>{const r=t[e].reduce(((t,e)=>(t[e]=!0,t)),{});return ie(e,Object.keys(r).sort())}));return e.sort(((t,e)=>t.address.localeCompare(e.address))),e}var ae=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const se=new a.b("contracts/5.6.2"),ue={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function ce(t,e){return ae(this,void 0,void 0,(function*(){const r=yield e;"string"!==typeof r&&se.throwArgumentError("invalid address or ENS name","name",r);try{return j(r)}catch(i){}t||se.throwError("a provider or signer is needed to resolve ENS names",a.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return null==n&&se.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function le(t,e,r){return ae(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>le(t,Array.isArray(e)?e[n]:e[r.name],r)))):"address"===r.type?yield ce(t,e):"tuple"===r.type?yield le(t,e,r.components):"array"===r.baseType?Array.isArray(e)?yield Promise.all(e.map((e=>le(t,e,r.arrayChildren)))):Promise.reject(se.makeError("invalid value for array",a.b.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e}))}function fe(t,e,r){return ae(this,void 0,void 0,(function*(){let i={};r.length===e.inputs.length+1&&"object"===typeof r[r.length-1]&&(i=Object(y.g)(r.pop())),se.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?i.from?i.from=Object(y.f)({override:ce(t.signer,i.from),signer:t.signer.getAddress()}).then((t=>ae(this,void 0,void 0,(function*(){return j(t.signer)!==t.override&&se.throwError("Contract with a Signer cannot override from",a.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.override})))):i.from=t.signer.getAddress():i.from&&(i.from=ce(t.provider,i.from));const o=yield Object(y.f)({args:le(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:Object(y.f)(i)||{}}),s=t.interface.encodeFunctionData(e,o.args),u={data:s,to:o.address},c=o.overrides;if(null!=c.nonce&&(u.nonce=h.from(c.nonce).toNumber()),null!=c.gasLimit&&(u.gasLimit=h.from(c.gasLimit)),null!=c.gasPrice&&(u.gasPrice=h.from(c.gasPrice)),null!=c.maxFeePerGas&&(u.maxFeePerGas=h.from(c.maxFeePerGas)),null!=c.maxPriorityFeePerGas&&(u.maxPriorityFeePerGas=h.from(c.maxPriorityFeePerGas)),null!=c.from&&(u.from=c.from),null!=c.type&&(u.type=c.type),null!=c.accessList&&(u.accessList=oe(c.accessList)),null==u.gasLimit&&null!=e.gas){let t=21e3;const r=Object(n.a)(s);for(let e=0;enull!=i[t]));return l.length&&se.throwError("cannot override ".concat(l.map((t=>JSON.stringify(t))).join(",")),a.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),u}))}function he(t,e){const r=e.wait.bind(e);e.wait=e=>r(e).then((e=>(e.events=e.logs.map((r=>{let n=Object(y.c)(r),i=null;try{i=t.interface.parseLog(r)}catch(o){}return i&&(n.args=i.args,n.decode=(e,r)=>t.interface.decodeEventLog(i.eventFragment,e,r),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>t.provider,n.getBlock=()=>t.provider.getBlock(e.blockHash),n.getTransaction=()=>t.provider.getTransaction(e.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(e),n})),e)))}function de(t,e,r){const n=t.signer||t.provider;return function(){for(var i=arguments.length,o=new Array(i),s=0;sArray.isArray(t)?t.join("|"):t)).join(":"):""):"*"}class me{constructor(t,e){Object(y.d)(this,"tag",t),Object(y.d)(this,"filter",e),this._listeners=[]}addListener(t,e){this._listeners.push({listener:t,once:e})}removeListener(t){let e=!1;this._listeners=this._listeners.filter((r=>!(!e&&r.listener===t)||(e=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((t=>t.listener))}listenerCount(){return this._listeners.length}run(t){const e=this.listenerCount();return this._listeners=this._listeners.filter((e=>{const r=t.slice();return setTimeout((()=>{e.listener.apply(this,r)}),0),!e.once})),e}prepareEvent(t){}getEmit(t){return[t]}}class ye extends me{constructor(){super("error",null)}}class be extends me{constructor(t,e,r,n){const i={address:t};let o=e.getEventTopic(r);n?(o!==n[0]&&se.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(ge(i),i),Object(y.d)(this,"address",t),Object(y.d)(this,"interface",e),Object(y.d)(this,"fragment",r)}prepareEvent(t){super.prepareEvent(t),t.event=this.fragment.name,t.eventSignature=this.fragment.format(),t.decode=(t,e)=>this.interface.decodeEventLog(this.fragment,t,e);try{t.args=this.interface.decodeEventLog(this.fragment,t.data,t.topics)}catch(e){t.args=null,t.decodeError=e}}getEmit(t){const e=function(t){const e=[],r=function(t,n){if(Array.isArray(n))for(let o in n){const a=t.slice();a.push(o);try{r(a,n[o])}catch(i){e.push({path:a,error:i})}}};return r([],t),e}(t.args);if(e.length)throw e[0].error;const r=(t.args||[]).slice();return r.push(t),r}}class ve extends me{constructor(t,e){super("*",{address:t}),Object(y.d)(this,"address",t),Object(y.d)(this,"interface",e)}prepareEvent(t){super.prepareEvent(t);try{const e=this.interface.parseLog(t);t.event=e.name,t.eventSignature=e.signature,t.decode=(t,r)=>this.interface.decodeEventLog(e.eventFragment,t,r),t.args=e.args}catch(e){}}}class Ae{constructor(t,e,r){var n=this;Object(y.d)(this,"interface",Object(y.e)(new.target,"getInterface")(e)),null==r?(Object(y.d)(this,"provider",null),Object(y.d)(this,"signer",null)):te.isSigner(r)?(Object(y.d)(this,"provider",r.provider||null),Object(y.d)(this,"signer",r)):Jt.isProvider(r)?(Object(y.d)(this,"provider",r),Object(y.d)(this,"signer",null)):se.throwArgumentError("invalid signer or provider","signerOrProvider",r),Object(y.d)(this,"callStatic",{}),Object(y.d)(this,"estimateGas",{}),Object(y.d)(this,"functions",{}),Object(y.d)(this,"populateTransaction",{}),Object(y.d)(this,"filters",{});{const t={};Object.keys(this.interface.events).forEach((e=>{const r=this.interface.events[e];Object(y.d)(this.filters,e,(function(){for(var t=arguments.length,e=new Array(t),i=0;i{const r=t[e];1===r.length?Object(y.d)(this.filters,e,this.filters[r[0]]):se.warn("Duplicate definition of ".concat(e," (").concat(r.join(", "),")"))}))}if(Object(y.d)(this,"_runningEvents",{}),Object(y.d)(this,"_wrappedEmits",{}),null==t&&se.throwArgumentError("invalid contract address or ENS name","addressOrName",t),Object(y.d)(this,"address",t),this.provider)Object(y.d)(this,"resolvedAddress",ce(this.provider,t));else try{Object(y.d)(this,"resolvedAddress",Promise.resolve(j(t)))}catch(s){se.throwError("provider is required to use ENS name as contract address",a.b.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((t=>{}));const i={},o={};Object.keys(this.interface.functions).forEach((t=>{const e=this.interface.functions[t];if(o[t])se.warn("Duplicate ABI entry for ".concat(JSON.stringify(t)));else{o[t]=!0;{const r=e.name;i["%".concat(r)]||(i["%".concat(r)]=[]),i["%".concat(r)].push(t)}null==this[t]&&Object(y.d)(this,t,pe(this,e,!0)),null==this.functions[t]&&Object(y.d)(this.functions,t,pe(this,e,!1)),null==this.callStatic[t]&&Object(y.d)(this.callStatic,t,de(this,e,!0)),null==this.populateTransaction[t]&&Object(y.d)(this.populateTransaction,t,function(t,e){return function(){for(var r=arguments.length,n=new Array(r),i=0;i{const e=i[t];if(e.length>1)return;t=t.substring(1);const r=e[0];try{null==this[t]&&Object(y.d)(this,t,this[r])}catch(n){}null==this.functions[t]&&Object(y.d)(this.functions,t,this.functions[r]),null==this.callStatic[t]&&Object(y.d)(this.callStatic,t,this.callStatic[r]),null==this.populateTransaction[t]&&Object(y.d)(this.populateTransaction,t,this.populateTransaction[r]),null==this.estimateGas[t]&&Object(y.d)(this.estimateGas,t,this.estimateGas[r])}))}static getContractAddress(t){return D(t)}static getInterface(t){return qt.isInterface(t)?t:new qt(t)}deployed(){return this._deployed()}_deployed(t){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,t).then((t=>("0x"===t&&se.throwError("contract not deployed",a.b.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(t){this.signer||se.throwError("sending a transactions require a signer",a.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const e=Object(y.g)(t||{});return["from","to"].forEach((function(t){null!=e[t]&&se.throwError("cannot override "+t,a.b.errors.UNSUPPORTED_OPERATION,{operation:t})})),e.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(e)))}connect(t){"string"===typeof t&&(t=new ee(t,this.provider));const e=new this.constructor(this.address,this.interface,t);return this.deployTransaction&&Object(y.d)(e,"deployTransaction",this.deployTransaction),e}attach(t){return new this.constructor(t,this.interface,this.signer||this.provider)}static isIndexed(t){return Gt.isIndexed(t)}_normalizeRunningEvent(t){return this._runningEvents[t.tag]?this._runningEvents[t.tag]:t}_getRunningEvent(t){if("string"===typeof t){if("error"===t)return this._normalizeRunningEvent(new ye);if("event"===t)return this._normalizeRunningEvent(new me("event",null));if("*"===t)return this._normalizeRunningEvent(new ve(this.address,this.interface));const e=this.interface.getEvent(t);return this._normalizeRunningEvent(new be(this.address,this.interface,e))}if(t.topics&&t.topics.length>0){try{const e=t.topics[0];if("string"!==typeof e)throw new Error("invalid topic");const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new be(this.address,this.interface,r,t.topics))}catch(e){}const r={address:this.address,topics:t.topics};return this._normalizeRunningEvent(new me(ge(r),r))}return this._normalizeRunningEvent(new ve(this.address,this.interface))}_checkRunningEvents(t){if(0===t.listenerCount()){delete this._runningEvents[t.tag];const e=this._wrappedEmits[t.tag];e&&t.filter&&(this.provider.off(t.filter,e),delete this._wrappedEmits[t.tag])}}_wrapEvent(t,e,r){const n=Object(y.c)(e);return n.removeListener=()=>{r&&(t.removeListener(r),this._checkRunningEvents(t))},n.getBlock=()=>this.provider.getBlock(e.blockHash),n.getTransaction=()=>this.provider.getTransaction(e.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(e.transactionHash),t.prepareEvent(n),n}_addEventListener(t,e,r){if(this.provider||se.throwError("events require a provider or a signer with a provider",a.b.errors.UNSUPPORTED_OPERATION,{operation:"once"}),t.addListener(e,r),this._runningEvents[t.tag]=t,!this._wrappedEmits[t.tag]){const r=r=>{let n=this._wrapEvent(t,r,e);if(null==n.decodeError)try{const e=t.getEmit(n);this.emit(t.filter,...e)}catch(i){n.decodeError=i.error}null!=t.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[t.tag]=r,null!=t.filter&&this.provider.on(t.filter,r)}}queryFilter(t,e,r){const i=this._getRunningEvent(t),o=Object(y.g)(i.filter);return"string"===typeof e&&Object(n.l)(e,32)?(null!=r&&se.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),o.blockHash=e):(o.fromBlock=null!=e?e:0,o.toBlock=null!=r?r:"latest"),this.provider.getLogs(o).then((t=>t.map((t=>this._wrapEvent(i,t,null)))))}on(t,e){return this._addEventListener(this._getRunningEvent(t),e,!1),this}once(t,e){return this._addEventListener(this._getRunningEvent(t),e,!0),this}emit(t){if(!this.provider)return!1;const e=this._getRunningEvent(t);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i0;return this._checkRunningEvents(e),o}listenerCount(t){return this.provider?null==t?Object.keys(this._runningEvents).reduce(((t,e)=>t+this._runningEvents[e].listenerCount()),0):this._getRunningEvent(t).listenerCount():0}listeners(t){if(!this.provider)return[];if(null==t){const t=[];for(let e in this._runningEvents)this._runningEvents[e].listeners().forEach((e=>{t.push(e)}));return t}return this._getRunningEvent(t).listeners()}removeAllListeners(t){if(!this.provider)return this;if(null==t){for(const t in this._runningEvents){const e=this._runningEvents[t];e.removeAllListeners(),this._checkRunningEvents(e)}return this}const e=this._getRunningEvent(t);return e.removeAllListeners(),this._checkRunningEvents(e),this}off(t,e){if(!this.provider)return this;const r=this._getRunningEvent(t);return r.removeListener(e),this._checkRunningEvents(r),this}removeListener(t,e){return this.off(t,e)}}class we extends Ae{}class _e{constructor(t,e,r){let i=null;i="string"===typeof e?e:Object(n.j)(e)?Object(n.i)(e):e&&"string"===typeof e.object?e.object:"!","0x"!==i.substring(0,2)&&(i="0x"+i),(!Object(n.l)(i)||i.length%2)&&se.throwArgumentError("invalid bytecode","bytecode",e),r&&!te.isSigner(r)&&se.throwArgumentError("invalid signer","signer",r),Object(y.d)(this,"bytecode",i),Object(y.d)(this,"interface",Object(y.e)(new.target,"getInterface")(t)),Object(y.d)(this,"signer",r||null)}getDeployTransaction(){let t={};for(var e=arguments.length,r=new Array(e),i=0;i{null!=t[e]&&se.throwError("cannot override "+e,a.b.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.value){h.from(t.value).isZero()||this.interface.deploy.payable||se.throwError("non-payable constructor cannot override value",a.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})}return se.checkArgumentCount(r.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=Object(n.i)(Object(n.b)([this.bytecode,this.interface.encodeDeploy(r)])),t}deploy(){for(var t=arguments.length,e=new Array(t),r=0;r{if("string"!==typeof t&&!Array.isArray(t))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);if(t=Array.isArray(t)?t.map((t=>t.trim())).filter((t=>t.length)).join("-"):t.trim(),0===t.length)return"";if(1===t.length)return e.pascalCase?t.toUpperCase():t.toLowerCase();return t!==t.toLowerCase()&&(t=(t=>{let e=!1,r=!1,n=!1;for(let i=0;ie.toUpperCase())).replace(/\d+(\w|$)/g,(t=>t.toUpperCase())),r=t,e.pascalCase?r.charAt(0).toUpperCase()+r.slice(1):r;var r};t.exports=n,t.exports.default=n},function(t,e,r){"use strict";r.d(e,"a",(function(){return h})),r.d(e,"c",(function(){return y})),r.d(e,"b",(function(){return b}));var n=r(84),i=r.n(n),o=r(1),a=r(5);var s=i.a.BN;const u=new a.b("bignumber/5.6.2"),c={},l=9007199254740991;let f=!1;class h{constructor(t,e){t!==c&&u.throwError("cannot call constructor directly; use BigNumber.from",a.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return p(g(this).fromTwos(t))}toTwos(t){return p(g(this).toTwos(t))}abs(){return"-"===this._hex[0]?h.from(this._hex.substring(1)):this}add(t){return p(g(this).add(g(t)))}sub(t){return p(g(this).sub(g(t)))}div(t){return h.from(t).isZero()&&m("division-by-zero","div"),p(g(this).div(g(t)))}mul(t){return p(g(this).mul(g(t)))}mod(t){const e=g(t);return e.isNeg()&&m("division-by-zero","mod"),p(g(this).umod(e))}pow(t){const e=g(t);return e.isNeg()&&m("negative-power","pow"),p(g(this).pow(e))}and(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","and"),p(g(this).and(e))}or(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","or"),p(g(this).or(e))}xor(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","xor"),p(g(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&m("negative-width","mask"),p(g(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&m("negative-width","shl"),p(g(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&m("negative-width","shr"),p(g(this).shrn(t))}eq(t){return g(this).eq(g(t))}lt(t){return g(this).lt(g(t))}lte(t){return g(this).lte(g(t))}gt(t){return g(this).gt(g(t))}gte(t){return g(this).gte(g(t))}isNegative(){return"-"===this._hex[0]}isZero(){return g(this).isZero()}toNumber(){try{return g(this).toNumber()}catch(t){m("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return u.throwError("this platform does not support BigInt",a.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?f||(f=!0,u.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?u.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.b.errors.UNEXPECTED_ARGUMENT,{}):u.throwError("BigNumber.toString does not accept parameters",a.b.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof h)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new h(c,d(t)):t.match(/^-?[0-9]+$/)?new h(c,d(new s(t))):u.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&m("underflow","BigNumber.from",t),(t>=l||t<=-l)&&m("overflow","BigNumber.from",t),h.from(String(t));const e=t;if("bigint"===typeof e)return h.from(e.toString());if(Object(o.j)(e))return h.from(Object(o.i)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return h.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&(Object(o.l)(t)||"-"===t[0]&&Object(o.l)(t.substring(1))))return h.from(t)}return u.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function d(t){if("string"!==typeof t)return d(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&u.throwArgumentError("invalid hex","value",t),"0x00"===(t=d(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function p(t){return h.from(d(t))}function g(t){const e=h.from(t).toHexString();return"-"===e[0]?new s("-"+e.substring(3),16):new s(e.substring(2),16)}function m(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),u.throwError(t,a.b.errors.NUMERIC_FAULT,n)}function y(t){return new s(t,36).toString(16)}function b(t){return new s(t,16).toString(36)}},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e,r){!function(e,n,i){var o;t.exports=(o=r(105),r(417),void(o.lib.Cipher||function(t){var e=o,r=e.lib,n=r.Base,i=r.WordArray,a=r.BufferedBlockAlgorithm,s=e.enc,u=(s.Utf8,s.Base64),c=e.algo.EvpKDF,l=r.Cipher=a.extend({cfg:n.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?v:y}return function(e){return{encrypt:function(r,n,i){return t(n).encrypt(e,r,n,i)},decrypt:function(r,n,i){return t(n).decrypt(e,r,n,i)}}}}()}),f=(r.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),e.mode={}),h=r.BlockCipherMode=n.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),d=f.CBC=function(){var e=h.extend();function r(e,r,n){var i=this._iv;if(i){var o=i;this._iv=t}else o=this._prevBlock;for(var a=0;a>>2];t.sigBytes-=e}},g=(r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:d,padding:p}),reset:function(){l.reset.call(this);var t=this.cfg,e=t.iv,r=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else n=r.createDecryptor,this._minBufferSize=1;this._mode&&this._mode.__creator==n?this._mode.init(this,e&&e.words):(this._mode=n.call(r,this,e&&e.words),this._mode.__creator=n)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else e=this._process(!0),t.unpad(e);return e},blockSize:4}),r.CipherParams=n.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),m=(e.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;if(r)var n=i.create([1398893684,1701076831]).concat(r).concat(e);else n=e;return n.toString(u)},parse:function(t){var e=u.parse(t),r=e.words;if(1398893684==r[0]&&1701076831==r[1]){var n=i.create(r.slice(2,4));r.splice(0,4),e.sigBytes-=16}return g.create({ciphertext:e,salt:n})}},y=r.SerializableCipher=n.extend({cfg:n.extend({format:m}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var i=t.createEncryptor(r,n),o=i.finalize(e),a=i.cfg;return g.create({ciphertext:o,key:r,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,r,n){return n=this.cfg.extend(n),e=this._parse(e,n.format),t.createDecryptor(r,n).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),b=(e.kdf={}).OpenSSL={execute:function(t,e,r,n){n||(n=i.random(8));var o=c.create({keySize:e+r}).compute(t,n),a=i.create(o.words.slice(e),4*r);return o.sigBytes=4*e,g.create({key:o,iv:a,salt:n})}},v=r.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:b}),encrypt:function(t,e,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,t.keySize,t.ivSize);n.iv=i.iv;var o=y.encrypt.call(this,t,e,i.key,n);return o.mixIn(i),o},decrypt:function(t,e,r,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var i=n.kdf.execute(r,t.keySize,t.ivSize,e.salt);return n.iv=i.iv,y.decrypt.call(this,t,e,i.key,n)}})}()))}()},function(t,e,r){t.exports=r(1707)(r(1708))},,function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return Ne})),r.d(e,"b",(function(){return De})),r.d(e,"c",(function(){return Nt})),r.d(e,"d",(function(){return Pt})),r.d(e,"e",(function(){return Ct})),r.d(e,"f",(function(){return he}));var n,i,o=r(38),a=Object.create,s=Object.defineProperty,u=Object.defineProperties,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,m=(t,e,r)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,y=(t,e)=>{for(var r in e||(e={}))p.call(e,r)&&m(t,r,e[r]);if(h)for(var r of h(e))g.call(e,r)&&m(t,r,e[r]);return t},b=(t,e)=>u(t,l(e)),v=(t,e,r)=>new Promise(((n,i)=>{var o=t=>{try{s(r.next(t))}catch(e){i(e)}},a=t=>{try{s(r.throw(t))}catch(e){i(e)}},s=t=>t.done?n(t.value):Promise.resolve(t.value).then(o,a);s((r=r.apply(t,e)).next())})),A=(n=(t,e)=>{var r=Object.prototype.hasOwnProperty,n="~";function i(){}function o(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function a(t,e,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||t,a),u=n?n+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function s(t,e){0===--t._eventsCount?t._events=new i:delete t._events[e]}function u(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),u.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)r.call(t,e)&&i.push(n?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},u.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i(i||n((i={exports:{}}).exports,i),i.exports));var w={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},_="object"==typeof t&&Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TESTNETS_API_KEY:"2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5",REACT_APP_PROD_API_KEY:"666ad781-aa60-4000-9e3e-cf5ae2d41bd3",REACT_APP_WALLET_CONNECT_V2_PROJECT_ID:"27c21e9982ee7b6e3f22764ab806719b"})&&Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TESTNETS_API_KEY:"2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5",REACT_APP_PROD_API_KEY:"666ad781-aa60-4000-9e3e-cf5ae2d41bd3",REACT_APP_WALLET_CONNECT_V2_PROJECT_ID:"27c21e9982ee7b6e3f22764ab806719b"}).NODE_DEBUG&&/\bsemver\b/i.test(Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TESTNETS_API_KEY:"2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5",REACT_APP_PROD_API_KEY:"666ad781-aa60-4000-9e3e-cf5ae2d41bd3",REACT_APP_WALLET_CONNECT_V2_PROJECT_ID:"27c21e9982ee7b6e3f22764ab806719b"}).NODE_DEBUG)?function(){for(var t=arguments.length,e=new Array(t),r=0;r{},E=_,I=function(t){let e={exports:{}};return t(e,e.exports),e.exports}((function(t,e){let{MAX_SAFE_COMPONENT_LENGTH:r}=w,n=(e=t.exports={}).re=[],i=e.src=[],o=e.t={},a=0,s=(t,e,r)=>{let s=a++;E(s,e),o[t]=s,i[s]=e,n[s]=new RegExp(e,r?"g":void 0)};s("NUMERICIDENTIFIER","0|[1-9]\\d*"),s("NUMERICIDENTIFIERLOOSE","[0-9]+"),s("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),s("MAINVERSION","(".concat(i[o.NUMERICIDENTIFIER],")\\.(").concat(i[o.NUMERICIDENTIFIER],")\\.(").concat(i[o.NUMERICIDENTIFIER],")")),s("MAINVERSIONLOOSE","(".concat(i[o.NUMERICIDENTIFIERLOOSE],")\\.(").concat(i[o.NUMERICIDENTIFIERLOOSE],")\\.(").concat(i[o.NUMERICIDENTIFIERLOOSE],")")),s("PRERELEASEIDENTIFIER","(?:".concat(i[o.NUMERICIDENTIFIER],"|").concat(i[o.NONNUMERICIDENTIFIER],")")),s("PRERELEASEIDENTIFIERLOOSE","(?:".concat(i[o.NUMERICIDENTIFIERLOOSE],"|").concat(i[o.NONNUMERICIDENTIFIER],")")),s("PRERELEASE","(?:-(".concat(i[o.PRERELEASEIDENTIFIER],"(?:\\.").concat(i[o.PRERELEASEIDENTIFIER],")*))")),s("PRERELEASELOOSE","(?:-?(".concat(i[o.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(i[o.PRERELEASEIDENTIFIERLOOSE],")*))")),s("BUILDIDENTIFIER","[0-9A-Za-z-]+"),s("BUILD","(?:\\+(".concat(i[o.BUILDIDENTIFIER],"(?:\\.").concat(i[o.BUILDIDENTIFIER],")*))")),s("FULLPLAIN","v?".concat(i[o.MAINVERSION]).concat(i[o.PRERELEASE],"?").concat(i[o.BUILD],"?")),s("FULL","^".concat(i[o.FULLPLAIN],"$")),s("LOOSEPLAIN","[v=\\s]*".concat(i[o.MAINVERSIONLOOSE]).concat(i[o.PRERELEASELOOSE],"?").concat(i[o.BUILD],"?")),s("LOOSE","^".concat(i[o.LOOSEPLAIN],"$")),s("GTLT","((?:<|>)?=?)"),s("XRANGEIDENTIFIERLOOSE","".concat(i[o.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),s("XRANGEIDENTIFIER","".concat(i[o.NUMERICIDENTIFIER],"|x|X|\\*")),s("XRANGEPLAIN","[v=\\s]*(".concat(i[o.XRANGEIDENTIFIER],")(?:\\.(").concat(i[o.XRANGEIDENTIFIER],")(?:\\.(").concat(i[o.XRANGEIDENTIFIER],")(?:").concat(i[o.PRERELEASE],")?").concat(i[o.BUILD],"?)?)?")),s("XRANGEPLAINLOOSE","[v=\\s]*(".concat(i[o.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(i[o.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(i[o.XRANGEIDENTIFIERLOOSE],")(?:").concat(i[o.PRERELEASELOOSE],")?").concat(i[o.BUILD],"?)?)?")),s("XRANGE","^".concat(i[o.GTLT],"\\s*").concat(i[o.XRANGEPLAIN],"$")),s("XRANGELOOSE","^".concat(i[o.GTLT],"\\s*").concat(i[o.XRANGEPLAINLOOSE],"$")),s("COERCE","(^|[^\\d])(\\d{1,".concat(r,"})(?:\\.(\\d{1,").concat(r,"}))?(?:\\.(\\d{1,").concat(r,"}))?(?:$|[^\\d])")),s("COERCERTL",i[o.COERCE],!0),s("LONETILDE","(?:~>?)"),s("TILDETRIM","(\\s*)".concat(i[o.LONETILDE],"\\s+"),!0),e.tildeTrimReplace="$1~",s("TILDE","^".concat(i[o.LONETILDE]).concat(i[o.XRANGEPLAIN],"$")),s("TILDELOOSE","^".concat(i[o.LONETILDE]).concat(i[o.XRANGEPLAINLOOSE],"$")),s("LONECARET","(?:\\^)"),s("CARETTRIM","(\\s*)".concat(i[o.LONECARET],"\\s+"),!0),e.caretTrimReplace="$1^",s("CARET","^".concat(i[o.LONECARET]).concat(i[o.XRANGEPLAIN],"$")),s("CARETLOOSE","^".concat(i[o.LONECARET]).concat(i[o.XRANGEPLAINLOOSE],"$")),s("COMPARATORLOOSE","^".concat(i[o.GTLT],"\\s*(").concat(i[o.LOOSEPLAIN],")$|^$")),s("COMPARATOR","^".concat(i[o.GTLT],"\\s*(").concat(i[o.FULLPLAIN],")$|^$")),s("COMPARATORTRIM","(\\s*)".concat(i[o.GTLT],"\\s*(").concat(i[o.LOOSEPLAIN],"|").concat(i[o.XRANGEPLAIN],")"),!0),e.comparatorTrimReplace="$1$2$3",s("HYPHENRANGE","^\\s*(".concat(i[o.XRANGEPLAIN],")\\s+-\\s+(").concat(i[o.XRANGEPLAIN],")\\s*$")),s("HYPHENRANGELOOSE","^\\s*(".concat(i[o.XRANGEPLAINLOOSE],")\\s+-\\s+(").concat(i[o.XRANGEPLAINLOOSE],")\\s*$")),s("STAR","(<|>)?=?\\s*\\*"),s("GTE0","^\\s*>=\\s*0.0.0\\s*$"),s("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")})),S=/^[0-9]+$/,M=(t,e)=>{let r=S.test(t),n=S.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:tM(e,t)},{MAX_LENGTH:k,MAX_SAFE_INTEGER:x}=w,{re:B,t:O}=I,{compareIdentifiers:T}=C,R=class{constructor(t,e){if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof R){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError("Invalid Version: ".concat(t));if(t.length>k)throw new TypeError("version is longer than ".concat(k," characters"));E("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;let r=t.trim().match(e.loose?B[O.LOOSE]:B[O.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>x||this.major<0)throw new TypeError("Invalid major version");if(this.minor>x||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>x||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){let e=+t;if(e>=0&&e=0;)"number"==typeof this.prerelease[t]&&(this.prerelease[t]++,t=-2);-1===t&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: ".concat(t))}return this.format(),this.raw=this.version,this}},P=(t,e,r)=>new R(t,r).compare(new R(e,r)),N=(t,e,r)=>0===P(t,e,r),j=(t,e,r)=>0!==P(t,e,r),D=(t,e,r)=>P(t,e,r)>0,L=(t,e,r)=>P(t,e,r)>=0,F=(t,e,r)=>P(t,e,r)<0,U=(t,e,r)=>P(t,e,r)<=0,Q=(t,e,r,n)=>{switch(e){case"===":return"object"==typeof t&&(t=t.version),"object"==typeof r&&(r=r.version),t===r;case"!==":return"object"==typeof t&&(t=t.version),"object"==typeof r&&(r=r.version),t!==r;case"":case"=":case"==":return N(t,r,n);case"!=":return j(t,r,n);case">":return D(t,r,n);case">=":return L(t,r,n);case"<":return F(t,r,n);case"<=":return U(t,r,n);default:throw new TypeError("Invalid operator: ".concat(e))}},G=Symbol("SemVer ANY"),H=class{static get ANY(){return G}constructor(t,e){if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof H){if(t.loose===!!e.loose)return t;t=t.value}E("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===G?this.value="":this.value=this.operator+this.semver.version,E("comp",this)}parse(t){let e=this.options.loose?z[q.COMPARATORLOOSE]:z[q.COMPARATOR],r=t.match(e);if(!r)throw new TypeError("Invalid comparator: ".concat(t));this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new R(r[2],this.options.loose):this.semver=G}toString(){return this.value}test(t){if(E("Comparator.test",t,this.options.loose),this.semver===G||t===G)return!0;if("string"==typeof t)try{t=new R(t,this.options)}catch(e){return!1}return Q(t,this.operator,this.semver,this.options)}intersects(t,e){if(!(t instanceof H))throw new TypeError("a Comparator is required");if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),""===this.operator)return""===this.value||new K(t.value,e).test(this.value);if(""===t.operator)return""===t.value||new K(this.value,e).test(t.semver);let r=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),i=this.semver.version===t.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),a=Q(this.semver,"<",t.semver,e)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),s=Q(this.semver,">",t.semver,e)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return r||n||i&&o||a||s}},{re:z,t:q}=I,K=class{constructor(t,e){if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof K)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new K(t.raw,e);if(t instanceof H)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((t=>this.parseRange(t.trim()))).filter((t=>t.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(t));this.format()}format(){return this.range=this.set.map((t=>t.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(t){let{loose:e}=this.options;t=t.trim();let r=e?V[W.HYPHENRANGELOOSE]:V[W.HYPHENRANGE];t=t.replace(r,ct(this.options.includePrerelease)),E("hyphen replace",t),t=t.replace(V[W.COMPARATORTRIM],J),E("comparator trim",t,V[W.COMPARATORTRIM]),t=(t=(t=t.replace(V[W.TILDETRIM],Y)).replace(V[W.CARETTRIM],X)).split(/\s+/).join(" ");let n=e?V[W.COMPARATORLOOSE]:V[W.COMPARATOR];return t.split(" ").map((t=>$(t,this.options))).join(" ").split(/\s+/).map((t=>ut(t,this.options))).filter(this.options.loose?t=>!!t.match(n):()=>!0).map((t=>new H(t,this.options)))}intersects(t,e){if(!(t instanceof K))throw new TypeError("a Range is required");return this.set.some((r=>Z(r,e)&&t.set.some((t=>Z(t,e)&&r.every((r=>t.every((t=>r.intersects(t,e)))))))))}test(t){if(!t)return!1;if("string"==typeof t)try{t=new R(t,this.options)}catch(e){return!1}for(let r=0;r{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every((t=>i.intersects(t,e))),i=n.pop();return r},$=(t,e)=>(E("comp",t,e),t=nt(t,e),E("caret",t),t=et(t,e),E("tildes",t),t=ot(t,e),E("xrange",t),t=st(t,e),E("stars",t),t),tt=t=>!t||"x"===t.toLowerCase()||"*"===t,et=(t,e)=>t.trim().split(/\s+/).map((t=>rt(t,e))).join(" "),rt=(t,e)=>{let r=e.loose?V[W.TILDELOOSE]:V[W.TILDE];return t.replace(r,((e,r,n,i,o)=>{let a;return E("tilde",t,e,r,n,i,o),tt(r)?a="":tt(n)?a=">=".concat(r,".0.0 <").concat(+r+1,".0.0-0"):tt(i)?a=">=".concat(r,".").concat(n,".0 <").concat(r,".").concat(+n+1,".0-0"):o?(E("replaceTilde pr",o),a=">=".concat(r,".").concat(n,".").concat(i,"-").concat(o," <").concat(r,".").concat(+n+1,".0-0")):a=">=".concat(r,".").concat(n,".").concat(i," <").concat(r,".").concat(+n+1,".0-0"),E("tilde return",a),a}))},nt=(t,e)=>t.trim().split(/\s+/).map((t=>it(t,e))).join(" "),it=(t,e)=>{E("caret",t,e);let r=e.loose?V[W.CARETLOOSE]:V[W.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,((e,r,i,o,a)=>{let s;return E("caret",t,e,r,i,o,a),tt(r)?s="":tt(i)?s=">=".concat(r,".0.0").concat(n," <").concat(+r+1,".0.0-0"):tt(o)?s="0"===r?">=".concat(r,".").concat(i,".0").concat(n," <").concat(r,".").concat(+i+1,".0-0"):">=".concat(r,".").concat(i,".0").concat(n," <").concat(+r+1,".0.0-0"):a?(E("replaceCaret pr",a),s="0"===r?"0"===i?">=".concat(r,".").concat(i,".").concat(o,"-").concat(a," <").concat(r,".").concat(i,".").concat(+o+1,"-0"):">=".concat(r,".").concat(i,".").concat(o,"-").concat(a," <").concat(r,".").concat(+i+1,".0-0"):">=".concat(r,".").concat(i,".").concat(o,"-").concat(a," <").concat(+r+1,".0.0-0")):(E("no pr"),s="0"===r?"0"===i?">=".concat(r,".").concat(i,".").concat(o).concat(n," <").concat(r,".").concat(i,".").concat(+o+1,"-0"):">=".concat(r,".").concat(i,".").concat(o).concat(n," <").concat(r,".").concat(+i+1,".0-0"):">=".concat(r,".").concat(i,".").concat(o," <").concat(+r+1,".0.0-0")),E("caret return",s),s}))},ot=(t,e)=>(E("replaceXRanges",t,e),t.split(/\s+/).map((t=>at(t,e))).join(" ")),at=(t,e)=>{t=t.trim();let r=e.loose?V[W.XRANGELOOSE]:V[W.XRANGE];return t.replace(r,((r,n,i,o,a,s)=>{E("xRange",t,r,n,i,o,a,s);let u=tt(i),c=u||tt(o),l=c||tt(a),f=l;return"="===n&&f&&(n=""),s=e.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(c&&(o=0),a=0,">"===n?(n=">=",c?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):"<="===n&&(n="<",c?i=+i+1:o=+o+1),"<"===n&&(s="-0"),r="".concat(n+i,".").concat(o,".").concat(a).concat(s)):c?r=">=".concat(i,".0.0").concat(s," <").concat(+i+1,".0.0-0"):l&&(r=">=".concat(i,".").concat(o,".0").concat(s," <").concat(i,".").concat(+o+1,".0-0")),E("xRange return",r),r}))},st=(t,e)=>(E("replaceStars",t,e),t.trim().replace(V[W.STAR],"")),ut=(t,e)=>(E("replaceGTE0",t,e),t.trim().replace(V[e.includePrerelease?W.GTE0PRE:W.GTE0],"")),ct=t=>(e,r,n,i,o,a,s,u,c,l,f,h,d)=>"".concat(r=tt(n)?"":tt(i)?">=".concat(n,".0.0").concat(t?"-0":""):tt(o)?">=".concat(n,".").concat(i,".0").concat(t?"-0":""):a?">=".concat(r):">=".concat(r).concat(t?"-0":"")," ").concat(u=tt(c)?"":tt(l)?"<".concat(+c+1,".0.0-0"):tt(f)?"<".concat(c,".").concat(+l+1,".0-0"):h?"<=".concat(c,".").concat(l,".").concat(f,"-").concat(h):t?"<".concat(c,".").concat(l,".").concat(+f+1,"-0"):"<=".concat(u)).trim(),lt=(t,e,r)=>{for(let n=0;n0){let n=t[r].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0},ft=(t,e,r)=>{try{e=new K(e,r)}catch(n){return!1}return e.test(t)},{MAX_LENGTH:ht}=w,{re:dt,t:pt}=I,gt=(t,e)=>{if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof R)return t;if("string"!=typeof t||t.length>ht||!(e.loose?dt[pt.LOOSE]:dt[pt.FULL]).test(t))return null;try{return new R(t,e)}catch(r){return null}},{re:mt,t:yt}=I,bt=(t,e)=>{if(t instanceof R)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;let r=null;if((e=e||{}).rtl){let e;for(;(e=mt[yt.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)r&&e.index+e[0].length===r.index+r[0].length||(r=e),mt[yt.COERCERTL].lastIndex=e.index+e[1].length+e[2].length;mt[yt.COERCERTL].lastIndex=-1}else r=t.match(mt[yt.COERCE]);return null===r?null:gt("".concat(r[2],".").concat(r[3]||"0",".").concat(r[4]||"0"),e)};function vt(t){return String.fromCharCode(parseInt(t.slice(1),16))}function At(t){return"%".concat("00".concat(t.charCodeAt(0).toString(16)).slice(-2))}function wt(t){return function(t){return btoa(encodeURIComponent(t).replace(/%[0-9A-F]{2}/g,vt))}(JSON.stringify(t))}function _t(t){return JSON.parse(function(t){return decodeURIComponent(Array.from(atob(t),At).join(""))}(t))}function Et(t){return"undefined"==typeof t}function It(t){return function(t){return null===t}(t)||Et(t)}function St(t){if(!t)return!0;for(let e in t)if(Object.hasOwnProperty.call(t,e))return!1;return!0}var Mt={};function Ct(t,e){return Object.assign(Mt,e),t}var kt={"magic-sdk":"magic-sdk","@magic-sdk/react-native":"magic-sdk-rn","@magic-sdk/react-native-bare":"magic-sdk-rn-bare","@magic-sdk/react-native-expo":"magic-sdk-rn-expo"},xt=class extends Error{constructor(t,e){super("Magic SDK Error: [".concat(t,"] ").concat(e)),this.code=t,this.rawMessage=e,this.__proto__=Error,Object.setPrototypeOf(this,xt.prototype)}},Bt=class extends Error{constructor(t){super(),this.__proto__=Error;let e=Number(null==t?void 0:t.code);this.rawMessage=(null==t?void 0:t.message)||"Internal error",this.code=function(t){return!It(t)&&"number"==typeof t&&Object.values(o.e).includes(t)}(e)?e:o.e.InternalError,this.message="Magic RPC Error: [".concat(this.code,"] ").concat(this.rawMessage),this.data=(null==t?void 0:t.data)||void 0,Object.setPrototypeOf(this,Bt.prototype)}},Ot=class{constructor(t,e){this.code=t,this.rawMessage=e,this.message="Magic SDK Warning: [".concat(t,"] ").concat(e)}log(){console.warn(this.message)}},Tt=class extends Error{constructor(t,e,r,n){super("Magic Extension Error (".concat(t.name,"): [").concat(e,"] ").concat(r)),this.code=e,this.rawMessage=r,this.data=n,this.__proto__=Error,Object.setPrototypeOf(this,Tt.prototype)}},Rt=class{constructor(t,e,r){this.code=e,this.rawMessage=r,this.message="Magic Extension Warning (".concat(t.name,"): [").concat(e,"] ").concat(r)}log(){console.warn(this.message)}};function Pt(){return new xt(o.f.ModalNotReady,"Modal is not ready.")}function Nt(){return new Ot(o.g.DuplicateIframe,"Duplicate iframes found.")}function jt(t){let{method:e,removalVersions:r,useInstead:n}=t,i=r[Mt.sdkName],a=n?" Use `".concat(n,"` instead."):"",s="`".concat(e,"` will be removed from `").concat(Mt.sdkName,"` in version `").concat(i,"`.").concat(a);return new Ot(o.g.DeprecationNotice,s)}var Dt=function*(){let t=0;for(;;)t1&&void 0!==arguments[1]?arguments[1]:[],method:t,jsonrpc:"2.0",id:Lt()})}var Ht=class{constructor(t){t instanceof Ht?(this._jsonrpc=t.payload.jsonrpc,this._id=t.payload.id,this._result=t.payload.result,this._error=t.payload.error):function(t){return!It(t)&&!Et(t.jsonrpc)&&!Et(t.id)&&(!Et(t.result)||!Et(t.error))}(t)?(this._jsonrpc=t.jsonrpc,this._id=t.id,this._result=t.result,this._error=t.error):(this._jsonrpc=t.jsonrpc,this._id=t.id,this._result=void 0,this._error=void 0)}applyError(t){return this._error=t,this}applyResult(t){return this._result=t,this}get hasError(){return"undefined"!=typeof this._error&&null!==this._error}get hasResult(){return"undefined"!=typeof this._result}get payload(){return{jsonrpc:this._jsonrpc,id:this._id,result:this._result,error:this._error}}},zt=((t,e,r)=>(r=null!=t?a(d(t)):{},((t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let i of f(e))!p.call(t,i)&&i!==r&&s(t,i,{get:()=>e[i],enumerable:!(n=c(e,i))||n.enumerable});return t})(!e&&t&&t.__esModule?r:s(r,"default",{value:t,enumerable:!0}),t)))(A()),qt=class extends zt.default{};function Kt(){let t=new qt;return{emitter:t,createChainingEmitterMethod:(e,r)=>function(){for(var n=arguments.length,i=new Array(n),o=0;ofunction(){for(var r=arguments.length,n=new Array(r),i=0;ifunction(){for(var r=arguments.length,n=new Array(r),i=0;iObject.assign(t,{[Vt]:!0,[i]:t[i]||t.then,[o]:t[o]||t.catch,[a]:t[a]||t.finally,then:s(i,t),catch:s(o,t),finally:s(a,t),on:n("on",t),once:n("once",t),addListener:n("addListener",t),off:n("off",t),removeListener:n("removeListener",t),removeAllListeners:n("removeAllListeners",t),emit:r("emit"),eventNames:r("eventNames"),listeners:r("listeners"),listenerCount:r("listenerCount")}),c=u(e.then((t=>(c.emit("done",t),c.emit("settled"),t)),(t=>{throw c.emit("error",t),c.emit("settled"),t})));return c}function Yt(t){return new Promise(((e,r)=>{let n=t(e,r);Promise.resolve(n).catch(r)}))}var Xt=class{constructor(t){this.sdk=t}get overlay(){return this.sdk.overlay}request(t){let e=this.overlay.post(o.c.MAGIC_HANDLE_REQUEST,Qt(t)),r=Jt(((t,r)=>{e.then((e=>{if(n(),e.hasError)r(new Bt(e.payload.error));else{if(!e.hasResult)throw new xt(o.f.MalformedResponse,"Response from the Magic iframe is malformed.");t(e.payload.result)}})).catch((t=>{n(),r(t)}))})),n=this.overlay.on(o.b.MAGIC_HANDLE_EVENT,(e=>{var n;let{response:i}=e.data;if(i.id===t.id&&(null==(n=i.result)?void 0:n.event)){let{event:t,params:e=[]}=i.result;r.emit(t,...e)}}));return r}createIntermediaryEvent(t,e){return r=>{let n=Gt(o.d.IntermediaryEvent,[{payloadId:e,eventType:t,args:r}]);this.request(n)}}};var Zt,$t={"magic-sdk":"v18.0.0","@magic-sdk/react-native":"v14.0.0","@magic-sdk/react-native-bare":"v19.0.0","@magic-sdk/react-native-expo":"v19.0.0"},te=class extends Xt{loginWithMagicLink(t){let e="@magic-sdk/react-native"===Mt.sdkName||"@magic-sdk/react-native-bare"===Mt.sdkName||"@magic-sdk/react-native-expo"===Mt.sdkName;if(e&&function(t,e){let[r]=t.split(".").map(Number);return r>=e}(Mt.version,19))throw new Error("loginWithMagicLink() is deprecated for this package, please utlize a passcode method like loginWithSMS or loginWithEmailOTP instead.");jt({method:"auth.loginWithMagicLink()",removalVersions:$t,useInstead:e?"@magic-ext/auth auth.loginWithEmailOTP()":"@magic-ext/auth auth.loginWithMagicLink()"}).log();let{email:r,showUI:n=!0,redirectURI:i}=t,a=Gt(this.sdk.testMode?o.d.LoginWithMagicLinkTestMode:o.d.LoginWithMagicLink,[{email:r,showUI:n,redirectURI:i}]);return this.request(a)}loginWithSMS(t){jt({method:"auth.loginWithSMS()",removalVersions:$t,useInstead:"@magic-ext/auth auth.loginWithSMS()"}).log();let{phoneNumber:e}=t,r=Gt(this.sdk.testMode?o.d.LoginWithSmsTestMode:o.d.LoginWithSms,[{phoneNumber:e,showUI:!0}]);return this.request(r)}loginWithEmailOTP(t){jt({method:"auth.loginWithEmailOTP()",removalVersions:$t,useInstead:"@magic-ext/auth auth.loginWithEmailOTP()"}).log();let{email:e,showUI:r}=t,n=Gt(this.sdk.testMode?o.d.LoginWithEmailOTPTestMode:o.d.LoginWithEmailOTP,[{email:e,showUI:r}]);if(!r){let t=this.request(n);return t&&(t.on("verify-email-otp",(t=>{this.createIntermediaryEvent("verify-email-otp",n.id)(t)})),t.on("cancel",(()=>{this.createIntermediaryEvent("cancel",n.id)()}))),t}return this.request(n)}loginWithCredential(t){jt({method:"auth.loginWithCredential()",removalVersions:$t,useInstead:"@magic-ext/auth auth.loginWithCredential()"}).log();let e=null!=t?t:"";if(!t&&"web"===Mt.platform){e=window.location.search;let t=window.location.origin+window.location.pathname;window.history.replaceState(null,"",t)}let r=Gt(this.sdk.testMode?o.d.LoginWithCredentialTestMode:o.d.LoginWithCredential,[e]);return this.request(r)}setAuthorizationToken(t){jt({method:"auth.setAuthorizationToken()",removalVersions:$t,useInstead:"@magic-ext/auth auth.setAuthorizationToken()"}).log();let e=Gt(o.d.SetAuthorizationToken,[{jwt:t}]);return this.request(e)}updateEmailWithUI(t){jt({method:"auth.updateEmailWithUI()",removalVersions:$t,useInstead:"@magic-ext/auth auth.updateEmailWithUI()"}).log();let{email:e,showUI:r=!0}=t,n=Gt(this.sdk.testMode?o.d.UpdateEmailTestMode:o.d.UpdateEmail,[{email:e,showUI:r}]);return this.request(n)}updatePhoneNumberWithUI(){jt({method:"auth.updatePhoneNumberWithUI()",removalVersions:$t,useInstead:"@magic-ext/auth auth.updatePhoneNumberWithUI()"}).log();let t=Gt(this.sdk.testMode?o.d.UpdatePhoneNumberTestMode:o.d.UpdatePhoneNumber);return this.request(t)}},ee={};function re(t){var e=this;return function(){for(var r=arguments.length,n=new Array(r),i=0;i{for(var r in e)s(t,r,{get:e[r],enumerable:!0})})(ee,{clear:()=>ae,getItem:()=>ne,iterate:()=>le,key:()=>ue,keys:()=>ce,length:()=>se,removeItem:()=>oe,setItem:()=>ie});var ne=re("getItem"),ie=re("setItem"),oe=re("removeItem"),ae=re("clear"),se=re("length"),ue=re("key"),ce=re("keys"),le=re("iterate"),fe=class extends Xt{constructor(){super(...arguments),this.localForageKey="mc_active_wallet"}getIdToken(t){let e=Gt(this.sdk.testMode?o.d.GetIdTokenTestMode:o.d.GetIdToken,[t]);return this.request(e)}generateIdToken(t){let e=Gt(this.sdk.testMode?o.d.GenerateIdTokenTestMode:o.d.GenerateIdToken,[t]);return this.request(e)}getInfo(){return v(this,null,(function*(){let t=yield ne(this.localForageKey),e=Gt(o.d.GetInfo,[{walletType:t}]);return this.request(e)}))}isLoggedIn(){let t=Gt(this.sdk.testMode?o.d.IsLoggedInTestMode:o.d.IsLoggedIn);return this.request(t)}logout(){oe(this.localForageKey);let t=Gt(this.sdk.testMode?o.d.LogoutTestMode:o.d.Logout);return this.request(t)}requestInfoWithUI(t){let e=Gt(o.d.RequestUserInfoWithUI,t?[t]:[]);return this.request(e)}showSettings(t){let e=Gt(this.sdk.testMode?o.d.UserSettingsTestMode:o.d.UserSettings,[t]);return this.request(e)}recoverAccount(t){let e=Gt(this.sdk.testMode?o.d.RecoverAccountTestMode:o.d.RecoverAccount,[t]);return this.request(e)}getMetadata(){jt({method:"user.getMetadata()",removalVersions:$t,useInstead:"user.getInfo()"}).log();let t=Gt(this.sdk.testMode?o.d.GetMetadataTestMode:o.d.GetMetadata);return this.request(t)}updateEmail(t){jt({method:"user.updateEmail()",removalVersions:$t,useInstead:"auth.updateEmailWithUI()"}).log();let{email:e,showUI:r=!0}=t,n=Gt(this.sdk.testMode?o.d.UpdateEmailTestMode:o.d.UpdateEmail,[{email:e,showUI:r}]);return this.request(n)}updatePhoneNumber(){jt({method:"user.updatePhoneNumber()",removalVersions:$t,useInstead:"auth.updatePhoneNumberWithUI()"}).log();let t=Gt(this.sdk.testMode?o.d.UpdatePhoneNumberTestMode:o.d.UpdatePhoneNumber);return this.request(t)}};function he(t,e){return e?new URL(t,e):new URL(t)}function de(){let t=window.crypto.getRandomValues(new Uint8Array(16));t[6]=15&t[6]|64,t[8]=191&t[8]|128;let e="";return e+=t[0].toString(16),e+=t[1].toString(16),e+=t[2].toString(16),e+=t[3].toString(16),e+="-",e+=t[4].toString(16),e+=t[5].toString(16),e+="-",e+=t[6].toString(16),e+=t[7].toString(16),e+="-",e+=t[8].toString(16),e+=t[9].toString(16),e+="-",e+=t[10].toString(16),e+=t[11].toString(16),e+=t[12].toString(16),e+=t[13].toString(16),e+=t[14].toString(16),e+=t[15].toString(16),e}var pe="STORE_KEY_PRIVATE_KEY",ge="STORE_KEY_PUBLIC_JWK",me="ECDSA",ye="P-256",be={name:me,namedCurve:ye},ve={name:me,namedCurve:ye};function Ae(){return v(this,null,(function*(){let t=yield function(){return v(this,null,(function*(){if(function(){let t="undefined"!=typeof window&&!!window.crypto,e=t&&!!window.crypto.subtle;return t&&e}())return(yield ne(ge))||(yield function(){return v(this,null,(function*(){let t=null,{subtle:e}=window.crypto,r=yield e.generateKey(be,!0,["sign"]),n=yield e.exportKey("jwk",r.privateKey);t=yield e.exportKey("jwk",r.publicKey);let i=yield e.importKey("jwk",n,ve,!1,["sign"]);yield ie(pe,i),yield ie(ge,t)}))}()),ne(ge);console.info("webcrypto is not supported")}))}();if(!t)return void console.info("unable to create public key or webcrypto is unsupported");let{subtle:e}=window.crypto,r=yield ne(pe);if(!r||!e)return void console.info("unable to find private key or webcrypto unsupported");let n={iat:Math.floor((new Date).getTime()/1e3),jti:de()},i={typ:"dpop+jwt",alg:"ES256",jwk:t},o={protected:we(JSON.stringify(i)),claims:we(JSON.stringify(n))},a=function(t){return(new TextEncoder).encode(t)}("".concat(o.protected,".").concat(o.claims)),s={name:me,hash:{name:"SHA-256"}},u=function(t){let e="";return t.forEach((t=>{e+=String.fromCharCode(t)})),_e(e)}(new Uint8Array(yield e.sign(s,r,a)));return"".concat(o.protected,".").concat(o.claims,".").concat(u)}))}function we(t){return _e(function(t){return encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,((t,e)=>String.fromCharCode(parseInt(e,16))))}(t))}function _e(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+/g,"")}var Ee=class extends Xt{constructor(){super(...arguments),this.localForageKey="mc_active_wallet"}connectWithUI(){let t=Jt(((e,r)=>v(this,null,(function*(){try{if(this.isMetaMaskBrowser()&&(yield this.isWalletEnabled(o.h.MetaMask))){let t=yield this.autoConnectIfWalletBrowser(o.h.MetaMask);return void e(t)}if(this.isCoinbaseWalletBrowser()&&(yield this.isWalletEnabled(o.h.CoinbaseWallet))){let t=yield this.autoConnectIfWalletBrowser(o.h.CoinbaseWallet);return void e(t)}let n=this.getUserEnv(),i=Gt(o.d.Login,[n]),a=this.request(i);a.on(o.a.WalletSelected,(t=>this.handleWalletSelected(b(y({},t),{payloadId:i.id})))),a.on("id-token-created",(e=>{t.emit("id-token-created",e)}));let s=yield a;s.error&&r(s),e(s)}catch(n){r(n)}}))));return t}showUI(){return this.request(Gt(o.d.ShowUI))}showAddress(){return this.request(Gt(o.d.ShowAddress))}showSendTokensUI(){return this.request(Gt(o.d.ShowSendTokensUI))}showOnRamp(){return this.request(Gt(o.d.ShowOnRamp))}showNFTs(){return this.request(Gt(o.d.ShowNFTs))}showBalances(){return this.request(Gt(o.d.ShowBalances))}getInfo(){return v(this,null,(function*(){jt({method:"wallet.getInfo()",removalVersions:$t,useInstead:"user.getInfo()"}).log();let t=yield ne(this.localForageKey),e=Gt(o.d.GetInfo,[{walletType:t}]);return this.request(e)}))}disconnect(){jt({method:"wallet.disconnect()",removalVersions:$t,useInstead:"user.logout()"}).log(),oe(this.localForageKey);let t=Gt(o.d.Disconnect);return this.request(t)}requestUserInfoWithUI(t){jt({method:"wallet.requestUserInfoWithUI()",removalVersions:$t,useInstead:"user.requestUserInfoWithUI()"}).log();let e=Gt(o.d.RequestUserInfoWithUI,t?[t]:[]);return this.request(e)}getProvider(){return v(this,null,(function*(){switch(yield ne(this.localForageKey)){case o.h.MetaMask:return this.getMetaMaskProvider();case o.h.CoinbaseWallet:return this.getCoinbaseProvider();default:return this.sdk.rpcProvider}}))}isMetaMaskInstalled(){var t,e,r;return(null==(t=window.ethereum)?void 0:t.isMetaMask)||!(null==(r=null==(e=window.ethereum)?void 0:e.providers)||!r.find((t=>null==t?void 0:t.isMetaMask)))}isMetaMaskBrowser(){return this.isMobile()&&this.isMetaMaskInstalled()}getMetaMaskProvider(){var t,e;return(null==(e=null==(t=window.ethereum)?void 0:t.providers)?void 0:e.find((t=>null==t?void 0:t.isMetaMask)))||window.ethereum}connectToMetaMask(){if(this.isMobile()&&!this.isMetaMaskInstalled()){let t="https://metamask.app.link/dapp/".concat(window.location.href.replace(/(^\w+:|^)\/\//,""));window.location.href=t}return this.getMetaMaskProvider().request({method:"eth_requestAccounts"})}isCoinbaseWalletInstalled(){var t,e,r;return(null==(t=window.ethereum)?void 0:t.isCoinbaseWallet)||!(null==(r=null==(e=window.ethereum)?void 0:e.providers)||!r.find((t=>null==t?void 0:t.isCoinbaseWallet)))}isCoinbaseWalletBrowser(){var t;return!(null==(t=window.ethereum)||!t.isCoinbaseBrowser)}getCoinbaseProvider(){var t,e;return(null==(e=null==(t=window.ethereum)?void 0:t.providers)?void 0:e.find((t=>null==t?void 0:t.isCoinbaseWallet)))||window.ethereum}connectToCoinbaseWallet(){if(this.isMobile()&&!this.isCoinbaseWalletBrowser()){let t="https://go.cb-w.com/dapp?cb_url=".concat(encodeURIComponent(window.location.href));window.location.href=t}return this.getCoinbaseProvider().request({method:"eth_requestAccounts"})}isMobile(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Silk|Opera Mini/i.test(navigator.userAgent)}getUserEnv(){return{env:{isMetaMaskInstalled:this.isMetaMaskInstalled(),isCoinbaseWalletInstalled:this.isCoinbaseWalletInstalled()}}}connectToThirdPartyWallet(t){switch(t){case o.h.MetaMask:return this.connectToMetaMask();case o.h.CoinbaseWallet:return this.connectToCoinbaseWallet();default:throw new Error("Invalid provider: ".concat(t,'. Must be one of "metamask" or "coinbase_wallet".'))}}isWalletEnabled(t){let e=Gt("mc_is_wallet_enabled",[{wallet:t}]);return this.request(e)}handleWalletSelected(t){return v(this,null,(function*(){try{let e=yield this.connectToThirdPartyWallet(t.wallet);yield ie(this.localForageKey,t.wallet),this.createIntermediaryEvent(o.a.WalletConnected,t.payloadId)(e)}catch(e){console.error(e),this.createIntermediaryEvent(o.a.WalletRejected,t.payloadId)()}}))}autoConnectIfWalletBrowser(t){return v(this,null,(function*(){let e;t===o.h.MetaMask&&(e=yield this.getMetaMaskProvider().request({method:"eth_requestAccounts"})),t===o.h.CoinbaseWallet&&(e=yield this.getCoinbaseProvider().request({method:"eth_requestAccounts"})),yield ie(this.localForageKey,t);let r=Gt(o.d.AutoConnect,[{wallet:t,address:e}]);return this.request(r)}))}},{createBoundEmitterMethod:Ie,createChainingEmitterMethod:Se}=Kt(),Me=class extends Xt{constructor(){super(...arguments),this.isMagic=!0,this.on=Se("on",this),this.once=Se("once",this),this.addListener=Se("addListener",this),this.off=Se("off",this),this.removeListener=Se("removeListener",this),this.removeAllListeners=Se("removeAllListeners",this),this.emit=Ie("emit"),this.eventNames=Ie("eventNames"),this.listeners=Ie("listeners"),this.listenerCount=Ie("listenerCount")}sendAsync(t,e){if(!e)throw function(t){return new xt(o.f.InvalidArgument,"Invalid ".concat((t=>{let e=t+1,r=e%10,n=e%100;return"".concat(e,1===r&&11!==n?"st":2===r&&12!==n?"nd":3===r&&13!==n?"rd":"th")})(t.argument)," argument given to `").concat(t.procedure,"`.\n Expected: `").concat(t.expected,"`\n Received: `").concat(t.received,"`"))}({procedure:"Magic.rpcProvider.sendAsync",argument:1,expected:"function",received:null===e?"null":typeof e});if(Array.isArray(t))this.overlay.post(o.c.MAGIC_HANDLE_REQUEST,t.map((t=>{let e=Qt(t);return this.prefixPayloadMethodForTestMode(e),e}))).then((t=>{e(null,t.map((t=>b(y({},t.payload),{error:t.hasError?new Bt(t.payload.error):null}))))}));else{let r=Qt(t);this.prefixPayloadMethodForTestMode(r),this.overlay.post(o.c.MAGIC_HANDLE_REQUEST,r).then((t=>{e(t.hasError?new Bt(t.payload.error):null,t.payload)}))}}send(t,e){if("string"==typeof t){let r=Gt(t,Array.isArray(e)?e:[]);return this.request(r)}if(Array.isArray(t)||e)return void this.sendAsync(t,e);let r=new Ot(o.g.SyncWeb3Method,"Non-async web3 methods are deprecated in web3 > 1.0 and are not supported by the Magic web3 provider. Please use an async method instead.");return r.log(),new Ht(t).applyError({code:-32603,message:r.rawMessage}).payload}enable(){let t=Gt(o.d.Login);return this.request(t)}request(t){return this.prefixPayloadMethodForTestMode(t),super.request(t)}prefixPayloadMethodForTestMode(t){this.sdk.testMode&&(t.method="".concat("testMode/eth/").concat(t.method))}},Ce=["request","overlay","sdk"];function ke(t){let e=Object.getPrototypeOf(t),r=[e];for(;e!==Xt.prototype;)e=Object.getPrototypeOf(e),r.push(e);return r}var xe=class extends Xt{constructor(){super(void 0),this.__sdk_access_field_descriptors__=new Map,this.__is_initialized__=!1,this.utils={createPromiEvent:Jt,isPromiEvent:Wt,encodeJSON:wt,decodeJSON:_t,createJsonRpcRequestPayload:Gt,standardizeJsonRpcRequestPayload:Qt,storage:ee};let t=[this,...ke(this)];Ce.forEach((e=>{let r=t.map((t=>Object.getOwnPropertyDescriptor(t,e))),n=r.findIndex((t=>!!t)),i=n>0,a=r[n];a&&(this.__sdk_access_field_descriptors__.set(e,{descriptor:a,isPrototypeField:i}),Object.defineProperty(this,e,{configurable:!0,get:()=>{throw function(t){return new xt(o.f.ExtensionNotInitialized,"Extensions must be initialized with a Magic SDK instance before `Extension.".concat(t,"` can be accessed. Do not invoke `Extension.").concat(t,"` inside an extension constructor."))}(e)}}))}))}init(t){this.__is_initialized__||(Ce.forEach((t=>{if(this.__sdk_access_field_descriptors__.has(t)){let{descriptor:e,isPrototypeField:r}=this.__sdk_access_field_descriptors__.get(t);r?delete this[t]:Object.defineProperty(this,t,e)}})),this.sdk=t,this.__is_initialized__=!0)}createDeprecationWarning(t){let{method:e,removalVersion:r,useInstead:n}=t,i=n?" Use `".concat(n,"` instead."):"",o="`".concat(e,"` will be removed from this Extension in version `").concat(r,"`.").concat(i);return new Rt(this,"DEPRECATION_NOTICE",o)}createWarning(t,e){return new Rt(this,t,e)}createError(t,e,r){return new Tt(this,t,e,r)}},Be=class extends xe{};Be.Internal=class extends xe{},Be.Anonymous="anonymous extension";var Oe=class extends Xt{purchase(t){let e=Gt(o.d.NFTPurchase,[t]);return this.request(e)}checkout(t){return v(this,null,(function*(){let e=Gt(o.d.NFTCheckout,[t]);return this.request(e)}))}};function Te(t){return!t.compat||null==t.compat[Mt.sdkName]||("string"==typeof t.compat[Mt.sdkName]?ft(bt(Mt.version),t.compat[Mt.sdkName]):!!t.compat[Mt.sdkName])}function Re(t){var e;let r=null!=(e=null==t?void 0:t.extensions)?e:[],n={},i=[];if(Array.isArray(r)?r.forEach((t=>{Te(t)?(t.init(this),(t.name||t.name!==Be.Anonymous)&&(this[t.name]=t),t instanceof Be.Internal&&(St(t.config)||(n[t.name]=t.config))):i.push(t)})):Object.keys(r).forEach((t=>{if(Te(r[t])){r[t].init(this);let e=r[t];this[t]=e,e instanceof Be.Internal&&(St(e.config)||(n[r[t].name]=e.config))}else i.push(r[t])})),i.length)throw function(t){let e="Some extensions are incompatible with `".concat(Mt.sdkName,"@").concat(Mt.version,"`:");return t.filter((t=>"undefined"!=typeof t.compat&&null!==t.compat)).forEach((t=>{let r=t.compat[Mt.sdkName];"string"==typeof r?e+="\n - Extension `".concat(t.name,"` supports version(s) `").concat(r,"`"):r||(e+="\n - Extension `".concat(t.name,"` does not support ").concat(Mt.platform," environments."))})),new xt(o.f.IncompatibleExtensions,e)}(i);return n}var Pe=class{constructor(t,e){var r,n;if(this.apiKey=t,!t)throw new xt(o.f.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.");"react-native"===Mt.platform&&(null==e?void 0:e.endpoint)&&new Ot(o.g.ReactNativeEndpointConfiguration,"CUSTOM DOMAINS ARE NOT SUPPORTED WHEN USING MAGIC SDK WITH REACT NATIVE! The `endpoint` parameter SHOULD NOT be provided. The Magic `')),this.torusAlertContainer=R('
'),this.torusAlertContainer.style.display="none",this.torusAlertContainer.style.setProperty("z-index",this.alertZIndex.toString());const m=window.document.createElement("link");m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("href","".concat(f,"/css/widget.css")),this.styleLink=m;const{defaultLanguage:y=G(),customTranslations:b={}}=this.whiteLabel||{},v=h()(O.translations,b)[y]||O.translations[G()];this.embedTranslations=v.embed;const A=async()=>(await N(),new Promise(((t,e)=>{this.torusIframe.onload=async()=>{this._setupWeb3();const o=this.communicationMux.getStream("init_stream");o.on("data",(r=>{const{name:n,data:i,error:o}=r;"init_complete"===n&&i.success?(this.isInitialized=!0,this._displayIframe(this.isIframeFullScreen),t(void 0)):o&&e(new Error(o))})),o.write({name:"init_stream",data:{enabledVerifiers:r,loginConfig:i,whiteLabel:this.whiteLabel,buttonPosition:this.buttonPosition,torusWidgetVisibility:this.torusWidgetVisibility,apiKey:this.apiKey,skipTKey:u,network:n}})},window.document.head.appendChild(this.styleLink),window.document.body.appendChild(this.torusIframe),window.document.body.appendChild(this.torusAlertContainer)})));if("production"===t&&a.check){const t="".concat(f,"/popup"),e=await fetch(t,{cache:"reload"});if("max-age=3600"!==e.headers.get("Cache-Control"))throw new Error("Unexpected Cache-Control headers, got ".concat(e.headers.get("Cache-Control")));const r=await e.text(),n=X({algorithms:["sha384"]},r);if(j.info(n,"integrity"),n!==a.hash)throw this.clearInit(),new Error("Integrity check failed");await A()}else await A()}login(){let{verifier:t="",login_hint:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isInitialized)throw new Error("Call init() first");return this.requestedVerifier=t,this.loginHint=e,this.ethereum.enable()}logout(){return new Promise(((t,e)=>{if(!this.isLoggedIn)return void e(new Error("User has not logged in yet"));this.communicationMux.getStream("logout").write({name:"logOut"});const r=this.communicationMux.getStream("status");P(r,"data",(r=>{r.loggedIn?e(new Error("Some Error Occured")):(this.isLoggedIn=!1,this.currentVerifier="",this.requestedVerifier="",t())}))}))}async cleanUp(){this.isLoggedIn&&await this.logout(),this.clearInit()}clearInit(){function t(t){return t instanceof Element||t instanceof HTMLDocument}t(this.styleLink)&&window.document.body.contains(this.styleLink)&&(this.styleLink.remove(),this.styleLink=void 0),t(this.torusIframe)&&window.document.body.contains(this.torusIframe)&&(this.torusIframe.remove(),this.torusIframe=void 0),t(this.torusAlertContainer)&&window.document.body.contains(this.torusAlertContainer)&&(this.torusAlert=void 0,this.torusAlertContainer.remove(),this.torusAlertContainer=void 0),this.isInitialized=!1}hideTorusButton(){this.torusWidgetVisibility=!1,this._sendWidgetVisibilityStatus(!1),this._displayIframe()}showTorusButton(){this.torusWidgetVisibility=!0,this._sendWidgetVisibilityStatus(!0),this._displayIframe()}setProvider(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{host:e="mainnet",chainId:r=null,networkName:n=""}=t,o=i()(t,nt);return new Promise(((t,i)=>{const a=this.communicationMux.getStream("provider_change");P(a,"data",(e=>{const{err:r,success:n}=e.data;j.info(e),r?i(r):n?t():i(new Error("some error occured"))}));const s=U();this._handleWindow(s,{target:"_blank",features:q}),a.write({name:"show_provider_change",data:{network:ot({host:e,chainId:r,networkName:n},o),preopenInstanceId:s,override:!1}})}))}showWallet(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.communicationMux.getStream("show_wallet"),n=t?"/".concat(t):"";r.write({name:"show_wallet",data:{path:n}});P(r,"data",(t=>{if("show_wallet_instance"===t.name){const{instanceId:r}=t.data,i=new URL("".concat(this.torusUrl,"/wallet").concat(n));i.searchParams.append("integrity","true"),i.searchParams.append("instanceId",r),Object.keys(e).forEach((t=>{i.searchParams.append(t,e[t])})),this.dappStorageKey&&(i.hash="#dappStorageKey=".concat(this.dappStorageKey));new Z({url:i,features:"directories=0,titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=740,width=1315"}).open()}}))}async getPublicAddress(t){let{verifier:e,verifierId:r,isExtended:n=!1}=t;if(!O.supportedVerifierList.includes(e)||!M[e])throw new Error("Unsupported verifier");const i=await this.nodeDetailManager.getNodeDetails({verifier:e,verifierId:r}),o=i.torusNodeEndpoints,a=i.torusNodePub,s=e,u=M[e];try{const t=await this.torusJs.getUserTypeAndAddress(o,a,{verifier:s,verifierId:r});if("v1"===t.typeOfUser)return n?t:t.address;const e=await this.torusJs.getUserTypeAndAddress(o,a,{verifier:u,verifierId:r},!0);return n?e:e.address}catch(c){if(null!==c&&void 0!==c&&c.message.includes("Verifier + VerifierID has not yet been assigned")){const t=await this.torusJs.getUserTypeAndAddress(o,a,{verifier:u,verifierId:r},!0);return n?t:t.address}throw c}}getUserInfo(t){return new Promise(((e,r)=>{if(this.isLoggedIn){const n=this.communicationMux.getStream("user_info_access");n.write({name:"user_info_access_request"});const i=n=>{const{name:i,data:{approved:o,payload:a,rejected:s,newRequest:u}}=n;if("user_info_access_response"===i)if(o)e(a);else if(s)r(new Error("User rejected the request"));else if(u){const n=this.communicationMux.getStream("user_info");P(n,"data",(t=>{"user_info_response"===t.name&&(t.data.approved?e(t.data.payload):r(new Error("User rejected the request")))}));const i=U();this._handleWindow(i,{target:"_blank",features:q}),n.write({name:"user_info_request",data:{message:t,preopenInstanceId:i}})}};P(n,"data",i)}else r(new Error("User has not logged in yet"))}))}initiateTopup(t,e){return new Promise(((r,n)=>{if(this.isInitialized){const{errors:i,isValid:o}=((t,e)=>{const r={};if(!t)return{errors:r,isValid:!0};if(t&&!L[t])return r.provider="Invalid Provider",{errors:r,isValid:0===Object.keys(r).length};const n=L[t],i=e||{};if(i.fiatValue){const t=+parseFloat(i.fiatValue.toString())||0;tn.maxOrderValue&&n.enforceMax&&(r.fiatValue="Requested amount is higher than supported")}return i.selectedCurrency&&!n.validCurrencies.includes(i.selectedCurrency)&&(r.selectedCurrency="Unsupported currency"),i.selectedCryptoCurrency&&!n.validCryptoCurrencies.includes(i.selectedCryptoCurrency)&&(r.selectedCryptoCurrency="Unsupported cryptoCurrency"),{errors:r,isValid:0===Object.keys(r).length}})(t,e);if(!o)return void n(new Error(JSON.stringify(i)));const a=this.communicationMux.getStream("topup");P(a,"data",(t=>{"topup_response"===t.name&&(t.data.success?r(t.data.success):n(new Error(t.data.error)))}));const s=U();this._handleWindow(s),a.write({name:"topup_request",data:{provider:t,params:e,preopenInstanceId:s}})}else n(new Error("Torus is not initialized yet"))}))}async loginWithPrivateKey(e){const{privateKey:r,userInfo:n}=e;return new Promise(((e,i)=>{if(this.isInitialized){if(32!==t.from(r,"hex").length)return void i(new Error("Invalid private key, Please provide a 32 byte valid secp25k1 private key"));const o=this.communicationMux.getStream("login_with_private_key");P(o,"data",(t=>{"login_with_private_key_response"===t.name&&(t.data.success?e(t.data.success):i(new Error(t.data.error)))})),o.write({name:"login_with_private_key_request",data:{privateKey:r,userInfo:n}})}else i(new Error("Torus is not initialized yet"))}))}async showWalletConnectScanner(){if(!this.useWalletConnect)throw new Error("Set `useWalletConnect` as true in init function options to use wallet connect scanner");return new Promise(((t,e)=>{if(this.isLoggedIn){const r=this.communicationMux.getStream("wallet_connect_stream");P(r,"data",(r=>{"wallet_connect_stream_res"===r.name&&(r.data.success?t(r.data.success):e(new Error(r.data.error)),this._displayIframe())})),r.write({name:"wallet_connect_stream_req"}),this._displayIframe(!0)}else e(new Error("User has not logged in yet"))}))}_handleWindow(t){let{url:e,target:r,features:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){const i=this.communicationMux.getStream("window"),o=new URL(e||"".concat(this.torusUrl,"/redirect?preopenInstanceId=").concat(t));this.dappStorageKey&&(o.hash?o.hash+="&dappStorageKey=".concat(this.dappStorageKey):o.hash="#dappStorageKey=".concat(this.dappStorageKey));const a=new Z({url:o,target:r,features:n});if(a.open(),!a.window)return void this._createPopupBlockAlert(t,o.href);i.write({name:"opened_window",data:{preopenInstanceId:t}});const s=e=>{let{preopenInstanceId:r,close:n}=e;r===t&&n&&(a.close(),i.removeListener("data",s))};i.on("data",s),a.once("close",(()=>{i.write({data:{preopenInstanceId:t,closed:!0}}),i.removeListener("data",s)}))}}_setEmbedWhiteLabel(t){const{theme:e}=this.whiteLabel||{};if(e){const{isDark:r=!1,colors:n={}}=e;r&&t.classList.add("torus-dark"),n.torusBrand1&&t.style.setProperty("--torus-brand-1",n.torusBrand1),n.torusGray2&&t.style.setProperty("--torus-gray-2",n.torusGray2)}}_getLogoUrl(){var t,e;let r="".concat(this.torusUrl,"/images/torus_icon-blue.svg");var n,i;null!==(t=this.whiteLabel)&&void 0!==t&&null!==(e=t.theme)&&void 0!==e&&e.isDark?r=(null===(n=this.whiteLabel)||void 0===n?void 0:n.logoLight)||r:r=(null===(i=this.whiteLabel)||void 0===i?void 0:i.logoDark)||r;return r}_sendWidgetVisibilityStatus(t){this.communicationMux.getStream("torus-widget-visibility").write({data:t})}_displayIframe(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e={};if(t)e.display="block",e.width="100%",e.height="100%",e.top="0px",e.right="0px",e.left="0px",e.bottom="0px";else switch(e.display=this.torusWidgetVisibility?"block":"none",e.height="70px",e.width="70px",this.buttonPosition){case x.TOP_LEFT:e.top="0px",e.left="0px",e.right="auto",e.bottom="auto";break;case x.TOP_RIGHT:e.top="0px",e.right="0px",e.left="auto",e.bottom="auto";break;case x.BOTTOM_RIGHT:e.bottom="0px",e.right="0px",e.top="auto",e.left="auto";break;case x.BOTTOM_LEFT:default:e.bottom="0px",e.left="0px",e.top="auto",e.right="auto"}Object.assign(this.torusIframe.style,e),this.isIframeFullScreen=t}_setupWeb3(){j.info("setupWeb3 running");const t=new c.a({name:"embed_metamask",target:"iframe_metamask",targetWindow:this.torusIframe.contentWindow,targetOrigin:new URL(this.torusUrl).origin}),e=new c.a({name:"embed_comm",target:"iframe_comm",targetWindow:this.torusIframe.contentWindow,targetOrigin:new URL(this.torusUrl).origin}),r=new J(t),n=t=>{const e=r[t];r[t]=function(t){if(t&&"eth_requestAccounts"===t)return r.enable();for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;onew Promise(((t,e)=>{r.sendAsync({jsonrpc:"2.0",id:U(),method:"eth_requestAccounts",params:[]},((r,n)=>{const{result:i}=n||{};if(r)setTimeout((()=>{e(r)}),50);else if(Array.isArray(i)&&i.length>0){const r=()=>{if(""!==this.requestedVerifier&&this.currentVerifier!==this.requestedVerifier){const{requestedVerifier:r}=this;this.logout().then((n=>{this.requestedVerifier=r,this._showLoginPopup(!0,t,e)})).catch((t=>e(t)))}else t(i)};this.isLoggedIn?r():this.isLoginCallback=r}else this._showLoginPopup(!0,t,e)}))})),r.tryPreopenHandle=(t,e)=>{const n=t;if(!Array.isArray(n)&&ut.includes(n.method)){const t=U();this._handleWindow(t,{target:"_blank",features:K}),n.preopenInstanceId=t}r._rpcEngine.handle(n,e)};const i=new Proxy(r,{deleteProperty:()=>!0});this.ethereum=i;const o=Object(c.g)(e);this.communicationMux=o;o.getStream("window").on("data",(t=>{"create_window"===t.name&&this._createPopupBlockAlert(t.data.preopenInstanceId,t.data.url)}));o.getStream("widget").on("data",(t=>{const{data:e}=t;this._displayIframe(e)}));o.getStream("status").on("data",(t=>{t.loggedIn?(this.isLoggedIn=t.loggedIn,this.currentVerifier=t.verifier):this._displayIframe(),this.isLoginCallback&&(this.isLoginCallback(),delete this.isLoginCallback)})),this.provider=i,this.provider.shouldSendMetadata&&rt(this.provider._rpcEngine),r._initializeState(),j.debug("Torus - injected provider")}_showLoginPopup(t,e,r){const n=t=>{const{err:n,selectedAddress:i}=t;n?(j.error(n),r&&r(n)):e&&e([i]),this.isIframeFullScreen&&this._displayIframe()},i=this.communicationMux.getStream("oauth");if(this.requestedVerifier){P(i,"data",n);const e=U();this._handleWindow(e),i.write({name:"oauth",data:{calledFromEmbed:t,verifier:this.requestedVerifier,preopenInstanceId:e,login_hint:this.loginHint}})}else this._displayIframe(!0),P(i,"data",n),i.write({name:"oauth_modal",data:{calledFromEmbed:t}})}_createPopupBlockAlert(t,e){const r=this._getLogoUrl(),n=R('
'+'')+"
"+'

'.concat(this.embedTranslations.actionRequired,"

")+'

'.concat(this.embedTranslations.pendingAction,"

")+"
"),i=R('")),o=R('
');o.appendChild(i),n.appendChild(o);this._setEmbedWhiteLabel(n);T((()=>{this.torusAlertContainer.style.display="block",this.torusAlertContainer.appendChild(n)})),T((()=>{i.addEventListener("click",(()=>{this._handleWindow(t,{url:e,target:"_blank",features:K}),n.remove(),0===this.torusAlertContainer.children.length&&(this.torusAlertContainer.style.display="none")}))}))}}}.call(this,r(7).Buffer)},function(t,e){t.exports=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){const n=r(2708),i=r(2744);t.exports={packageInit:(t,e)=>{if(e=Array.prototype.slice.call(e),!t)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(t,"currentProvider",{get:()=>t._provider,set:e=>t.setProvider(e),enumerable:!0,configurable:!0}),e[0]&&e[0]._requestManager?t._requestManager=e[0]._requestManager:t._requestManager=new n.Manager(e[0],e[1]),t.givenProvider=n.Manager.givenProvider,t.providers=n.Manager.providers,t._provider=t._requestManager.provider,t.setProvider||(t.setProvider=(e,r)=>(t._requestManager.setProvider(e,r),t._provider=t._requestManager.provider,!0)),t.setRequestManager=e=>{t._requestManager=e,t._provider=e.provider},t.BatchRequest=n.BatchManager.bind(null,t._requestManager),t.extend=i(t)},addProviders:t=>{t.givenProvider=n.Manager.givenProvider,t.providers=n.Manager.providers}}},function(t,e,r){"use strict";const{callbackify:n}=r(464);var i=r(257).errors,o=r(1255),a=r(2726),s=r(2727),u=function t(e,r){this.provider=null,this.providers=t.providers,this.setProvider(e,r),this.subscriptions=new Map};u.givenProvider=s,u.providers={WebsocketProvider:r(2728),HttpProvider:r(2734),IpcProvider:r(2742)},u.prototype.setProvider=function(t,e){var r=this;if(t&&"string"===typeof t&&this.providers)if(/^http(s)?:\/\//i.test(t))t=new this.providers.HttpProvider(t);else if(/^ws(s)?:\/\//i.test(t))t=new this.providers.WebsocketProvider(t);else if(t&&"object"===typeof e&&"function"===typeof e.connect)t=new this.providers.IpcProvider(t,e);else if(t)throw new Error("Can't autodetect provider for \""+t+'"');if(this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=t||null,this.provider&&this.provider.on){"function"===typeof t.request?this.provider.on("message",(function(t){if(t&&"eth_subscription"===t.type&&t.data){const e=t.data;e.subscription&&r.subscriptions.has(e.subscription)&&r.subscriptions.get(e.subscription).callback(null,e.result)}})):this.provider.on("data",(function(t,e){(t=t||e).method&&t.params&&t.params.subscription&&r.subscriptions.has(t.params.subscription)&&r.subscriptions.get(t.params.subscription).callback(null,t.params.result)})),this.provider.on("connect",(function(){r.subscriptions.forEach((function(t){t.subscription.resubscribe()}))})),this.provider.on("error",(function(t){r.subscriptions.forEach((function(e){e.callback(t)}))}));const e=function(t){r._isCleanCloseEvent(t)&&!r._isIpcCloseError(t)||(r.subscriptions.forEach((function(e){e.callback(i.ConnectionCloseError(t)),r.subscriptions.delete(e.subscription.id)})),r.provider&&r.provider.emit&&r.provider.emit("error",i.ConnectionCloseError(t))),r.provider&&r.provider.emit&&r.provider.emit("end",t)};this.provider.on("disconnect",e)}},u.prototype.send=function(t,e){if(e=e||function(){},!this.provider)return e(i.InvalidProvider());const{method:r,params:a}=t,s=o.toPayload(r,a),u=this._jsonrpcResultCallback(e,s);if(this.provider.request){n(this.provider.request.bind(this.provider))({method:r,params:a},e)}else if(this.provider.sendAsync)this.provider.sendAsync(s,u);else{if(!this.provider.send)throw new Error("Provider does not have a request or send method to use.");this.provider.send(s,u)}},u.prototype.sendBatch=function(t,e){if(!this.provider)return e(i.InvalidProvider());var r=o.toBatchPayload(t);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,(function(t,r){return t?e(t):Array.isArray(r)?void e(null,r):e(i.InvalidResponse(r))}))},u.prototype.addSubscription=function(t,e){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions.set(t.id,{callback:e,subscription:t})},u.prototype.removeSubscription=function(t,e){if(this.subscriptions.has(t)){var r=this.subscriptions.get(t).subscription.options.type;return this.subscriptions.delete(t),void this.send({method:r+"_unsubscribe",params:[t]},e)}"function"===typeof e&&e(null)},u.prototype.clearSubscriptions=function(t){try{var e=this;return this.subscriptions.size>0&&this.subscriptions.forEach((function(r,n){t&&"syncing"===r.name||e.removeSubscription(n)})),this.provider.reset&&this.provider.reset(),!0}catch(r){throw new Error("Error while clearing subscriptions: ".concat(r))}},u.prototype._isCleanCloseEvent=function(t){return"object"===typeof t&&([1e3].includes(t.code)||!0===t.wasClean)},u.prototype._isIpcCloseError=function(t){return"boolean"===typeof t&&t},u.prototype._jsonrpcResultCallback=function(t,e){return function(r,n){return n&&n.id&&e.id!==n.id?t(new Error("Wrong response id ".concat(n.id," (expected: ").concat(e.id,") in ").concat(JSON.stringify(e)))):r?t(r):n&&n.error?t(i.ErrorResponse(n)):o.isValidResponse(n)?void t(null,n.result):t(i.InvalidResponse(n))}},t.exports={Manager:u,BatchManager:a}},function(t,e,r){"use strict";t.exports={ErrorResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:JSON.stringify(t),r=t.error&&t.error.data?t.error.data:null,n=new Error("Returned error: "+e);return n.data=r,n},InvalidNumberOfParams:function(t,e,r){return new Error('Invalid number of parameters for "'+r+'". Got '+t+" expected "+e+"!")},InvalidConnection:function(t,e){return this.ConnectionError("CONNECTION ERROR: Couldn't connect to node "+t+".",e)},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:"Invalid JSON RPC response: "+JSON.stringify(t);return new Error(e)},ConnectionTimeout:function(t){return new Error("CONNECTION TIMEOUT: timeout of "+t+" ms achived")},ConnectionNotOpenError:function(t){return this.ConnectionError("connection not open on send()",t)},ConnectionCloseError:function(t){return"object"===typeof t&&t.code&&t.reason?this.ConnectionError("CONNECTION ERROR: The connection got closed with the close code `"+t.code+"` and the following reason string `"+t.reason+"`",t):new Error("CONNECTION ERROR: The connection closed unexpectedly")},MaxAttemptsReachedOnReconnectingError:function(){return new Error("Maximum number of reconnect attempts reached!")},PendingRequestsOnReconnectingError:function(){return new Error("CONNECTION ERROR: Provider started to reconnect before the response got received!")},ConnectionError:function(t,e){const r=new Error(t);return e&&(r.code=e.code,r.reason=e.reason),r},RevertInstructionError:function(t,e){var r=new Error("Your request got reverted with the following reason string: "+t);return r.reason=t,r.signature=e,r},TransactionRevertInstructionError:function(t,e,r){var n=new Error("Transaction has been reverted by the EVM:\n"+JSON.stringify(r,null,2));return n.reason=t,n.signature=e,n.receipt=r,n},TransactionError:function(t,e){var r=new Error(t);return r.receipt=e,r},NoContractAddressFoundError:function(t){return this.TransactionError("The transaction receipt didn't contain a contract address.",t)},ContractCodeNotStoredError:function(t){return this.TransactionError("The contract code couldn't be stored, please check your gas limit.",t)},TransactionRevertedWithoutReasonError:function(t){return this.TransactionError("Transaction has been reverted by the EVM:\n"+JSON.stringify(t,null,2),t)},TransactionOutOfGasError:function(t){return this.TransactionError("Transaction ran out of gas. Please provide more gas:\n"+JSON.stringify(t,null,2),t)},ResolverMethodMissingError:function(t,e){return new Error("The resolver at "+t+'does not implement requested method: "'+e+'".')},ContractMissingABIError:function(){return new Error("You must provide the json interface of the contract when instantiating a contract object.")},ContractOnceRequiresCallbackError:function(){return new Error("Once requires a callback as the second parameter.")},ContractEventDoesNotExistError:function(t){return new Error('Event "'+t+"\" doesn't exist in this contract.")},ContractReservedEventError:function(t){return new Error('The event "'+t+"\" is a reserved event name, you can't use it.")},ContractMissingDeployDataError:function(){return new Error('No "data" specified in neither the given options, nor the default options.')},ContractNoAddressDefinedError:function(){return new Error("This contract object doesn't have address set yet, please set an address first.")},ContractNoFromAddressDefinedError:function(){return new Error('No "from" address specified in neither the given options, nor the default options.')}}},function(t,e,r){"use strict";var n=r(189),i=r(2723),o=function(t){return n.toBN(t).toString(10)},a=function(t){if(void 0!==t)return function(t){return"latest"===t||"pending"===t||"earliest"===t}(t)?t:"genesis"===t?"0x0":n.isHexStrict(t)?"string"===typeof t?t.toLowerCase():t:n.numberToHex(t)},s=function(t){if(t.to&&(t.to=l(t.to)),t.data&&t.input)throw new Error('You can\'t have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.');if(!t.data&&t.input&&(t.data=t.input,delete t.input),t.data&&!t.data.startsWith("0x")&&(t.data="0x"+t.data),t.data&&!n.isHex(t.data))throw new Error("The data field must be HEX encoded data.");return(t.gas||t.gasLimit)&&(t.gas=t.gas||t.gasLimit),(t.maxPriorityFeePerGas||t.maxFeePerGas)&&delete t.gasPrice,["gasPrice","gas","value","maxPriorityFeePerGas","maxFeePerGas","nonce"].filter((function(e){return void 0!==t[e]})).forEach((function(e){t[e]=n.numberToHex(t[e])})),t},u=function(t){return null!==t.blockNumber&&(t.blockNumber=n.hexToNumber(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=n.hexToNumber(t.transactionIndex)),t.nonce=n.hexToNumber(t.nonce),t.gas=n.hexToNumber(t.gas),t.gasPrice&&(t.gasPrice=o(t.gasPrice)),t.maxFeePerGas&&(t.maxFeePerGas=o(t.maxFeePerGas)),t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=o(t.maxPriorityFeePerGas)),t.type&&(t.type=n.hexToNumber(t.type)),t.value=o(t.value),t.to&&n.isAddress(t.to)?t.to=n.toChecksumAddress(t.to):t.to=null,t.from&&(t.from=n.toChecksumAddress(t.from)),t},c=function(t){if("string"===typeof t.blockHash&&"string"===typeof t.transactionHash&&"string"===typeof t.logIndex){var e=n.sha3(t.blockHash.replace("0x","")+t.transactionHash.replace("0x","")+t.logIndex.replace("0x",""));t.id="log_"+e.replace("0x","").substr(0,8)}else t.id||(t.id=null);return null!==t.blockNumber&&(t.blockNumber=n.hexToNumber(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=n.hexToNumber(t.transactionIndex)),null!==t.logIndex&&(t.logIndex=n.hexToNumber(t.logIndex)),t.address&&(t.address=n.toChecksumAddress(t.address)),t},l=function(t){var e=new i(t);if(e.isValid()&&e.isDirect())return e.toAddress().toLowerCase();if(n.isAddress(t))return"0x"+t.toLowerCase().replace("0x","");throw new Error("Provided address ".concat(t," is invalid, the capitalization checksum test failed, or it's an indirect IBAN address which can't be converted."))};t.exports={inputDefaultBlockNumberFormatter:function(t){return a(!this||void 0!==t&&null!==t?t:this.defaultBlock)},inputBlockNumberFormatter:a,inputCallFormatter:function(t){var e=(t=s(t)).from||(this?this.defaultAccount:null);return e&&(t.from=l(e)),t},inputTransactionFormatter:function(t){if("number"!==typeof(t=s(t)).from&&(!t.from||"object"!==typeof t.from)){if(t.from=t.from||(this?this.defaultAccount:null),!t.from&&"number"!==typeof t.from)throw new Error('The send transactions "from" field must be defined!');t.from=l(t.from)}return t},inputAddressFormatter:l,inputPostFormatter:function(t){return t.ttl&&(t.ttl=n.numberToHex(t.ttl)),t.workToProve&&(t.workToProve=n.numberToHex(t.workToProve)),t.priority&&(t.priority=n.numberToHex(t.priority)),Array.isArray(t.topics)||(t.topics=t.topics?[t.topics]:[]),t.topics=t.topics.map((function(t){return 0===t.indexOf("0x")?t:n.fromUtf8(t)})),t},inputLogFormatter:function(t){var e=function(t){return null===t||"undefined"===typeof t?null:0===(t=String(t)).indexOf("0x")?t:n.fromUtf8(t)};return void 0===t&&(t={}),void 0===t.fromBlock&&(t={...t,fromBlock:"latest"}),(t.fromBlock||0===t.fromBlock)&&(t.fromBlock=a(t.fromBlock)),(t.toBlock||0===t.toBlock)&&(t.toBlock=a(t.toBlock)),t.topics=t.topics||[],t.topics=t.topics.map((function(t){return Array.isArray(t)?t.map(e):e(t)})),e=null,t.address&&(t.address=Array.isArray(t.address)?t.address.map((function(t){return l(t)})):l(t.address)),t},inputSignFormatter:function(t){return n.isHexStrict(t)?t:n.utf8ToHex(t)},inputStorageKeysFormatter:function(t){return t.map(n.numberToHex)},outputProofFormatter:function(t){return t.address=n.toChecksumAddress(t.address),t.nonce=n.hexToNumberString(t.nonce),t.balance=n.hexToNumberString(t.balance),t},outputBigNumberFormatter:o,outputTransactionFormatter:u,outputTransactionReceiptFormatter:function(t){if("object"!==typeof t)throw new Error("Received receipt is invalid: "+t);return null!==t.blockNumber&&(t.blockNumber=n.hexToNumber(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=n.hexToNumber(t.transactionIndex)),t.cumulativeGasUsed=n.hexToNumber(t.cumulativeGasUsed),t.gasUsed=n.hexToNumber(t.gasUsed),Array.isArray(t.logs)&&(t.logs=t.logs.map(c)),t.effectiveGasPrice&&(t.effectiveGasPrice=n.hexToNumber(t.effectiveGasPrice)),t.contractAddress&&(t.contractAddress=n.toChecksumAddress(t.contractAddress)),"undefined"!==typeof t.status&&null!==t.status&&(t.status=Boolean(parseInt(t.status))),t},outputBlockFormatter:function(t){return t.gasLimit=n.hexToNumber(t.gasLimit),t.gasUsed=n.hexToNumber(t.gasUsed),t.size=n.hexToNumber(t.size),t.timestamp=n.hexToNumber(t.timestamp),null!==t.number&&(t.number=n.hexToNumber(t.number)),t.difficulty&&(t.difficulty=o(t.difficulty)),t.totalDifficulty&&(t.totalDifficulty=o(t.totalDifficulty)),Array.isArray(t.transactions)&&t.transactions.forEach((function(t){if("string"!==typeof t)return u(t)})),t.miner&&(t.miner=n.toChecksumAddress(t.miner)),t.baseFeePerGas&&(t.baseFeePerGas=n.hexToNumber(t.baseFeePerGas)),t},outputLogFormatter:c,outputPostFormatter:function(t){return t.expiry=n.hexToNumber(t.expiry),t.sent=n.hexToNumber(t.sent),t.ttl=n.hexToNumber(t.ttl),t.workProved=n.hexToNumber(t.workProved),t.topics||(t.topics=[]),t.topics=t.topics.map((function(t){return n.toUtf8(t)})),t},outputSyncingFormatter:function(t){return t.startingBlock=n.hexToNumber(t.startingBlock),t.currentBlock=n.hexToNumber(t.currentBlock),t.highestBlock=n.hexToNumber(t.highestBlock),t.knownStates&&(t.knownStates=n.hexToNumber(t.knownStates),t.pulledStates=n.hexToNumber(t.pulledStates)),t}}},,function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,i(r(1251),e),i(r(1252),e),i(r(2719),e),i(r(872),e),i(r(2720),e),i(r(423),e),i(r(2721),e),i(r(343),e),i(r(873),e);var o=r(487);Object.defineProperty(e,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(e,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(e,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(e,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(e,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(e,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),Object.defineProperty(e,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(e,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(e,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return o.isHexString}})},,function(t,e){const r="Impossible case. Please create issue.",n="The tweak was out of range or the resulted private key is invalid",i="The tweak was out of range or equal to zero",o="Unknow error on context randomization",a="Private Key is invalid",s="Public Key could not be parsed",u="Public Key serialization error",c="The sum of the public keys is not valid",l="Signature could not be parsed",f="The nonce generation function failed, or the private key was invalid",h="Public key could not be recover",d="Scalar was invalid (zero or overflow)";function p(t,e){if(!t)throw new Error(e)}function g(t,e,r){if(p(e instanceof Uint8Array,"Expected ".concat(t," to be an Uint8Array")),void 0!==r)if(Array.isArray(r)){const n=r.join(", "),i="Expected ".concat(t," to be an Uint8Array with length [").concat(n,"]");p(r.includes(e.length),i)}else{const n="Expected ".concat(t," to be an Uint8Array with length ").concat(r);p(e.length===r,n)}}function m(t){p("Boolean"===b(t),"Expected compressed to be a Boolean")}function y(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t=>new Uint8Array(t),e=arguments.length>1?arguments[1]:void 0;return"function"===typeof t&&(t=t(e)),g("output",t,e),t}function b(t){return Object.prototype.toString.call(t).slice(8,-1)}t.exports=t=>({contextRandomize(e){if(p(null===e||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==e&&g("seed",e,32),1===t.contextRandomize(e))throw new Error(o)},privateKeyVerify:e=>(g("private key",e,32),0===t.privateKeyVerify(e)),privateKeyNegate(e){switch(g("private key",e,32),t.privateKeyNegate(e)){case 0:return e;case 1:throw new Error(r)}},privateKeyTweakAdd(e,r){switch(g("private key",e,32),g("tweak",r,32),t.privateKeyTweakAdd(e,r)){case 0:return e;case 1:throw new Error(n)}},privateKeyTweakMul(e,r){switch(g("private key",e,32),g("tweak",r,32),t.privateKeyTweakMul(e,r)){case 0:return e;case 1:throw new Error(i)}},publicKeyVerify:e=>(g("public key",e,[33,65]),0===t.publicKeyVerify(e)),publicKeyCreate(e){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(g("private key",e,32),m(r),n=y(n,r?33:65),t.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(a);case 2:throw new Error(u)}},publicKeyConvert(e){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(g("public key",e,[33,65]),m(r),n=y(n,r?33:65),t.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(u)}},publicKeyNegate(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;switch(g("public key",e,[33,65]),m(n),i=y(i,n?33:65),t.publicKeyNegate(i,e)){case 0:return i;case 1:throw new Error(s);case 2:throw new Error(r);case 3:throw new Error(u)}},publicKeyCombine(e){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;p(Array.isArray(e),"Expected public keys to be an Array"),p(e.length>0,"Expected public keys array will have more than zero items");for(const t of e)g("public key",t,[33,65]);switch(m(r),n=y(n,r?33:65),t.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(c);case 3:throw new Error(u)}},publicKeyTweakAdd(e,r){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3?arguments[3]:void 0;switch(g("public key",e,[33,65]),g("tweak",r,32),m(i),o=y(o,i?33:65),t.publicKeyTweakAdd(o,e,r)){case 0:return o;case 1:throw new Error(s);case 2:throw new Error(n)}},publicKeyTweakMul(e,r){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3?arguments[3]:void 0;switch(g("public key",e,[33,65]),g("tweak",r,32),m(n),o=y(o,n?33:65),t.publicKeyTweakMul(o,e,r)){case 0:return o;case 1:throw new Error(s);case 2:throw new Error(i)}},signatureNormalize(e){switch(g("signature",e,64),t.signatureNormalize(e)){case 0:return e;case 1:throw new Error(l)}},signatureExport(e,n){g("signature",e,64);const i={output:n=y(n,72),outputlen:72};switch(t.signatureExport(i,e)){case 0:return n.slice(0,i.outputlen);case 1:throw new Error(l);case 2:throw new Error(r)}},signatureImport(e,n){switch(g("signature",e),n=y(n,64),t.signatureImport(n,e)){case 0:return n;case 1:throw new Error(l);case 2:throw new Error(r)}},ecdsaSign(e,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;g("message",e,32),g("private key",n,32),p("Object"===b(i),"Expected options to be an Object"),void 0!==i.data&&g("options.data",i.data),void 0!==i.noncefn&&p("Function"===b(i.noncefn),"Expected options.noncefn to be a Function"),o=y(o,64);const a={signature:o,recid:null};switch(t.ecdsaSign(a,e,n,i.data,i.noncefn)){case 0:return a;case 1:throw new Error(f);case 2:throw new Error(r)}},ecdsaVerify(e,r,n){switch(g("signature",e,64),g("message",r,32),g("public key",n,[33,65]),t.ecdsaVerify(e,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(l);case 2:throw new Error(s)}},ecdsaRecover(e,n,i){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;switch(g("signature",e,64),p("Number"===b(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),g("message",i,32),m(o),a=y(a,o?33:65),t.ecdsaRecover(a,e,n,i)){case 0:return a;case 1:throw new Error(l);case 2:throw new Error(h);case 3:throw new Error(r)}},ecdh(e,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(g("public key",e,[33,65]),g("private key",r,32),p("Object"===b(n),"Expected options to be an Object"),void 0!==n.data&&g("options.data",n.data),void 0!==n.hashfn?(p("Function"===b(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&g("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&g("options.ybuf",n.ybuf,32),g("output",i)):i=y(i,32),t.ecdh(i,e,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(s);case 2:throw new Error(d)}}})},function(t,e,r){const n=new(0,r(141).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(t){const e=t[0];switch(e){case 2:case 3:return 33!==t.length?null:function(t,e){let r=new o(e);if(r.cmp(i.p)>=0)return null;r=r.toRed(i.red);let a=r.redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===t!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(e,t.subarray(1,33));case 4:case 6:case 7:return 65!==t.length?null:function(t,e,r){let a=new o(e),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===t||7===t)&&s.isOdd()!==(7===t))return null;const u=a.redSqr().redIMul(a);return s.redSqr().redISub(u.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(e,t.subarray(1,33),t.subarray(33,65));default:return null}}function s(t,e){const r=e.encode(null,33===t.length);for(let n=0;n0,privateKeyVerify(t){const e=new o(t);return e.cmp(i.n)<0&&!e.isZero()?0:1},privateKeyNegate(t){const e=new o(t),r=i.n.sub(e).umod(i.n).toArrayLike(Uint8Array,"be",32);return t.set(r),0},privateKeyTweakAdd(t,e){const r=new o(e);if(r.cmp(i.n)>=0)return 1;if(r.iadd(new o(t)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;const n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},privateKeyTweakMul(t,e){let r=new o(e);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(t)),r.cmp(i.n)>=0&&(r=r.umod(i.n));const n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},publicKeyVerify:t=>null===a(t)?1:0,publicKeyCreate(t,e){const r=new o(e);if(r.cmp(i.n)>=0||r.isZero())return 1;return s(t,n.keyFromPrivate(e).getPublic()),0},publicKeyConvert(t,e){const r=a(e);if(null===r)return 1;return s(t,r.getPublic()),0},publicKeyNegate(t,e){const r=a(e);if(null===r)return 1;const n=r.getPublic();return n.y=n.y.redNeg(),s(t,n),0},publicKeyCombine(t,e){const r=new Array(e.length);for(let i=0;i=0)return 2;const u=n.getPublic().add(i.g.mul(r));return u.isInfinity()?2:(s(t,u),0)},publicKeyTweakMul(t,e,r){const n=a(e);if(null===n)return 1;if((r=new o(r)).cmp(i.n)>=0||r.isZero())return 2;return s(t,n.getPublic().mul(r)),0},signatureNormalize(t){const e=new o(t.subarray(0,32)),r=new o(t.subarray(32,64));return e.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&t.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(t,e){const r=e.subarray(0,32),n=e.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;const{output:a}=t;let s=a.subarray(4,37);s[0]=0,s.set(r,1);let u=33,c=0;for(;u>1&&0===s[c]&&!(128&s[c+1]);--u,++c);if(s=s.subarray(c),128&s[0])return 1;if(u>1&&0===s[0]&&!(128&s[1]))return 1;let l=a.subarray(39,72);l[0]=0,l.set(n,1);let f=33,h=0;for(;f>1&&0===l[h]&&!(128&l[h+1]);--f,++h);return l=l.subarray(h),128&l[0]||f>1&&0===l[0]&&!(128&l[1])?1:(t.outputlen=6+u+f,a[0]=48,a[1]=t.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+u]=2,a[5+u]=l.length,a.set(l,6+u),0)},signatureImport(t,e){if(e.length<8)return 1;if(e.length>72)return 1;if(48!==e[0])return 1;if(e[1]!==e.length-2)return 1;if(2!==e[2])return 1;const r=e[3];if(0===r)return 1;if(5+r>=e.length)return 1;if(2!==e[4+r])return 1;const n=e[5+r];if(0===n)return 1;if(6+r+n!==e.length)return 1;if(128&e[4])return 1;if(r>1&&0===e[4]&&!(128&e[5]))return 1;if(128&e[r+6])return 1;if(n>1&&0===e[r+6]&&!(128&e[r+7]))return 1;let a=e.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;let s=e.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");let u=new o(a);u.cmp(i.n)>=0&&(u=new o(0));let c=new o(e.subarray(6+r));return c.cmp(i.n)>=0&&(c=new o(0)),t.set(u.toArrayLike(Uint8Array,"be",32),0),t.set(c.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(t,e,r,a,s){if(s){const t=s;s=n=>{const i=t(e,r,null,a,n);if(!(i instanceof Uint8Array&&32===i.length))throw new Error("This is the way");return new o(i)}}const u=new o(r);if(u.cmp(i.n)>=0||u.isZero())return 1;let c;try{c=n.sign(e,r,{canonical:!0,k:s,pers:a})}catch(l){return 1}return t.signature.set(c.r.toArrayLike(Uint8Array,"be",32),0),t.signature.set(c.s.toArrayLike(Uint8Array,"be",32),32),t.recid=c.recoveryParam,0},ecdsaVerify(t,e,r){const s={r:t.subarray(0,32),s:t.subarray(32,64)},u=new o(s.r),c=new o(s.s);if(u.cmp(i.n)>=0||c.cmp(i.n)>=0)return 1;if(1===c.cmp(n.nh)||u.isZero()||c.isZero())return 3;const l=a(r);if(null===l)return 2;const f=l.getPublic();return n.verify(e,s,f)?0:3},ecdsaRecover(t,e,r,a){const u={r:e.slice(0,32),s:e.slice(32,64)},c=new o(u.r),l=new o(u.s);if(c.cmp(i.n)>=0||l.cmp(i.n)>=0)return 1;if(c.isZero()||l.isZero())return 2;let f;try{f=n.recoverPubKey(a,u,r)}catch(h){return 2}return s(t,f),0},ecdh(t,e,r,s,u,c,l){const f=a(e);if(null===f)return 1;const h=new o(r);if(h.cmp(i.n)>=0||h.isZero())return 2;const d=f.getPublic().mul(h);if(void 0===u){const e=d.encode(null,!0),r=n.hash().update(e).digest();for(let n=0;n<32;++n)t[n]=r[n]}else{c||(c=new Uint8Array(32));const e=d.getX().toArray("be",32);for(let t=0;t<32;++t)c[t]=e[t];l||(l=new Uint8Array(32));const r=d.getY().toArray("be",32);for(let t=0;t<32;++t)l[t]=r[t];const n=u(c,l,s);if(!(n instanceof Uint8Array&&n.length===t.length))return 2;t.set(n)}return 0}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(165);e.getRandomBytes=function(t){return new Promise((function(e,r){n(t,(function(t,n){t?r(t):e(n)}))}))},e.getRandomBytesSync=function(t){return n(t)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2718),i=r(279);e.keccak224=n.createHashFunction((function(){return i("keccak224")})),e.keccak256=n.createHashFunction((function(){return i("keccak256")})),e.keccak384=n.createHashFunction((function(){return i("keccak384")})),e.keccak512=n.createHashFunction((function(){return i("keccak512")}))},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.createHashFunction=function(e){return function(r){var n=e();return n.update(r),t.from(n.digest())}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Address=void 0;var i=n(r(48)),o=r(343),a=r(423),s=r(1252),u=function(){function e(t){(0,i.default)(20===t.length,"Invalid address length"),this.buf=t}return e.zero=function(){return new e((0,a.zeros)(20))},e.fromString=function(t){return(0,i.default)((0,s.isValidAddress)(t),"Invalid address"),new e((0,a.toBuffer)(t))},e.fromPublicKey=function(r){return(0,i.default)(t.isBuffer(r),"Public key should be Buffer"),new e((0,s.pubToAddress)(r))},e.fromPrivateKey=function(r){return(0,i.default)(t.isBuffer(r),"Private key should be Buffer"),new e((0,s.privateToAddress)(r))},e.generate=function(r,n){return(0,i.default)(o.BN.isBN(n)),new e((0,s.generateAddress)(r.buf,n.toArrayLike(t)))},e.generate2=function(r,n,o){return(0,i.default)(t.isBuffer(n)),(0,i.default)(t.isBuffer(o)),new e((0,s.generateAddress2)(r.buf,n,o))},e.prototype.equals=function(t){return this.buf.equals(t.buf)},e.prototype.isZero=function(){return this.equals(e.zero())},e.prototype.isPrecompileOrSystemAddress=function(){var t=new o.BN(this.buf),e=new o.BN(0),r=new o.BN("ffff","hex");return t.gte(e)&&t.lte(r)},e.prototype.toString=function(){return"0x"+this.buf.toString("hex")},e.prototype.toBuffer=function(){return t.from(this.buf)},e}();e.Address=u}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.hashPersonalMessage=e.isValidSignature=e.fromRpcSig=e.toCompactSig=e.toRpcSig=e.ecrecover=e.ecsign=void 0;var n=r(1253),i=r(343),o=r(423),a=r(872),s=r(678),u=r(873);function c(t,e){var r=(0,u.toType)(t,u.TypeOutput.BN);if(!e)return r.subn(27);var n=(0,u.toType)(e,u.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function l(t){var e=new i.BN(t);return e.eqn(0)||e.eqn(1)}e.ecsign=function(e,r,i){var o=(0,n.ecdsaSign)(e,r),a=o.signature,s=o.recid,c=t.from(a.slice(0,32)),l=t.from(a.slice(32,64));if(!i||"number"===typeof i){if(i&&!Number.isSafeInteger(i))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:c,s:l,v:i?s+(2*i+35):s+27}}return{r:c,s:l,v:(0,u.toType)(i,u.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(t)}};e.ecrecover=function(e,r,i,a,s){var u=t.concat([(0,o.setLengthLeft)(i,32),(0,o.setLengthLeft)(a,32)],64),f=c(r,s);if(!l(f))throw new Error("Invalid signature v value");var h=(0,n.ecdsaRecover)(u,f.toNumber(),e);return t.from((0,n.publicKeyConvert)(h,!1).slice(1))};e.toRpcSig=function(e,r,n,i){if(!l(c(e,i)))throw new Error("Invalid signature v value");return(0,o.bufferToHex)(t.concat([(0,o.setLengthLeft)(r,32),(0,o.setLengthLeft)(n,32),(0,o.toBuffer)(e)]))};e.toCompactSig=function(e,r,n,i){if(!l(c(e,i)))throw new Error("Invalid signature v value");var a=(0,u.toType)(e,u.TypeOutput.Number),s=n;return(a>28&&a%2===1||1===a||28===a)&&((s=t.from(n))[0]|=128),(0,o.bufferToHex)(t.concat([(0,o.setLengthLeft)(r,32),(0,o.setLengthLeft)(s,32)]))};e.fromRpcSig=function(t){var e,r,n,i=(0,o.toBuffer)(t);if(i.length>=65)e=i.slice(0,32),r=i.slice(32,64),n=(0,o.bufferToInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");e=i.slice(0,32),r=i.slice(32,64),n=(0,o.bufferToInt)(i.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:e,s:r}};e.isValidSignature=function(t,e,r,n,o){void 0===n&&(n=!0);var a=new i.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new i.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==e.length||32!==r.length)return!1;if(!l(c(t,o)))return!1;var u=new i.BN(e),f=new i.BN(r);return!(u.isZero()||u.gt(s)||f.isZero()||f.gt(s))&&(!n||1!==f.cmp(a))};e.hashPersonalMessage=function(e){(0,s.assertIsBuffer)(e);var r=t.from("\x19Ethereum Signed Message:\n".concat(e.length),"utf-8");return(0,a.keccak)(t.concat([r,e]))}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.defineProperties=void 0;var i=n(r(48)),o=r(487),a=r(343),s=r(423);e.defineProperties=function(e,r,n){if(e.raw=[],e._fields=[],e.toJSON=function(t){if(void 0===t&&(t=!1),t){var r={};return e._fields.forEach((function(t){r[t]="0x".concat(e[t].toString("hex"))})),r}return(0,s.baToJSON)(e.raw)},e.serialize=function(){return a.rlp.encode(e.raw)},r.forEach((function(r,n){function o(){return e.raw[n]}function a(o){"00"!==(o=(0,s.toBuffer)(o)).toString("hex")||r.allowZero||(o=t.allocUnsafe(0)),r.allowLess&&r.length?(o=(0,s.unpadBuffer)(o),(0,i.default)(r.length>=o.length,"The field ".concat(r.name," must not have more ").concat(r.length," bytes"))):r.allowZero&&0===o.length||!r.length||(0,i.default)(r.length===o.length,"The field ".concat(r.name," must have byte length of ").concat(r.length)),e.raw[n]=o}e._fields.push(r.name),Object.defineProperty(e,r.name,{enumerable:!0,configurable:!0,get:o,set:a}),r.default&&(e[r.name]=r.default),r.alias&&Object.defineProperty(e,r.alias,{enumerable:!1,configurable:!0,set:a,get:o})})),n)if("string"===typeof n&&(n=t.from((0,o.stripHexPrefix)(n),"hex")),t.isBuffer(n)&&(n=a.rlp.decode(n)),Array.isArray(n)){if(n.length>e._fields.length)throw new Error("wrong number of fields in data");n.forEach((function(t,r){e[e._fields[r]]=(0,s.toBuffer)(t)}))}else{if("object"!==typeof n)throw new Error("invalid data");var u=Object.keys(n);r.forEach((function(t){-1!==u.indexOf(t.name)&&(e[t.name]=n[t.name]),-1!==u.indexOf(t.alias)&&(e[t.alias]=n[t.alias])}))}}}).call(this,r(7).Buffer)},function(t,e,r){var n=r(871),i=r(1250),o=function(t){var e=typeof t;if("string"===e)return i.isHexStrict(t)?new n(t.replace(/0x/i,""),16):new n(t,10);if("number"===e)return new n(t);if(i.isBigNumber(t))return new n(t.toString(10));if(i.isBN(t))return t;throw new Error(t+" is not a number")},a=function(t,e,r){var a,s;if("bytes"===(t=function(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}(t))){if(e.replace(/^0x/i,"").length%2!==0)throw new Error("Invalid bytes characters "+e.length);return e}if("string"===t)return i.utf8ToHex(e);if("bool"===t)return e?"01":"00";if(t.startsWith("address")){if(a=r?64:40,!i.isAddress(e))throw new Error(e+" is not a valid address, or the checksum is invalid.");return i.leftPad(e.toLowerCase(),a)}if(a=function(t){var e=/^\D+(\d+).*$/.exec(t);return e?parseInt(e[1],10):null}(t),t.startsWith("bytes")){if(!a)throw new Error("bytes[] not yet supported in solidity");if(r&&(a=32),a<1||a>32||a256)throw new Error("Invalid uint"+a+" size");if((s=o(e)).bitLength()>a)throw new Error("Supplied uint exceeds width: "+a+" vs "+s.bitLength());if(s.lt(new n(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return a?i.leftPad(s.toString("hex"),a/8*2):s}if(t.startsWith("int")){if(a%8||a<8||a>256)throw new Error("Invalid int"+a+" size");if((s=o(e)).bitLength()>a)throw new Error("Supplied int exceeds width: "+a+" vs "+s.bitLength());return s.lt(new n(0))?s.toTwos(a).toString("hex"):a?i.leftPad(s.toString("hex"),a/8*2):s}throw new Error("Unsupported or invalid type: "+t)},s=function(t){if(Array.isArray(t))throw new Error("Autodetection of array types is not supported.");var e,r,o="";if(t&&"object"===typeof t&&(t.hasOwnProperty("v")||t.hasOwnProperty("t")||t.hasOwnProperty("value")||t.hasOwnProperty("type"))?(e=t.hasOwnProperty("t")?t.t:t.type,o=t.hasOwnProperty("v")?t.v:t.value):(e=i.toHex(t,!0),o=i.toHex(t),e.startsWith("int")||e.startsWith("uint")||(e="bytes")),!e.startsWith("int")&&!e.startsWith("uint")||"string"!==typeof o||/^(-)?0x/i.test(o)||(o=new n(o)),Array.isArray(o)){if(r=function(t){var e=/^\D+\d*\[(\d+)\]$/.exec(t);return e?parseInt(e[1],10):null}(e),r&&o.length!==r)throw new Error(e+" is not matching the given array "+JSON.stringify(o));r=o.length}return Array.isArray(o)?o.map((function(t){return a(e,t,r).toString("hex").replace("0x","")})).join(""):a(e,o,r).toString("hex").replace("0x","")};t.exports={soliditySha3:function(){var t=Array.prototype.slice.call(arguments).map(s);return i.sha3("0x"+t.join(""))},soliditySha3Raw:function(){return i.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(s).join(""))},encodePacked:function(){return"0x"+Array.prototype.slice.call(arguments).map(s).join("").toLowerCase()}}},function(t,e,r){"use strict";const n=r(189),i=r(2724),o=function(t){const e="A".charCodeAt(0),r="Z".charCodeAt(0);return(t=(t=t.toUpperCase()).substr(4)+t.substr(0,4)).split("").map((function(t){const n=t.charCodeAt(0);return n>=e&&n<=r?n-e+10:t})).join("")},a=function(t){let e,r=t;for(;r.length>2;)e=r.slice(0,9),r=parseInt(e,10)%97+r.slice(e.length);return parseInt(r,10)%97};class s{constructor(t){this._iban=t}static toAddress(t){if(!(t=new s(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()}static toIban(t){return s.fromAddress(t).toString()}static fromAddress(t){if(!n.isAddress(t))throw new Error("Provided address is not a valid address: "+t);t=t.replace("0x","").replace("0X","");const e=function(t,e){let r=t;for(;r.length<2*e;)r="0"+r;return r}(new i(t,16).toString(36),15);return s.fromBban(e.toUpperCase())}static fromBban(t){const e=("0"+(98-a(o("XE00"+t)))).slice(-2);return new s("XE"+e+t)}static createIndirect(t){return s.fromBban("ETH"+t.institution+t.identifier)}static isValid(t){return new s(t).isValid()}isValid(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===a(o(this._iban))}isDirect(){return 34===this._iban.length||35===this._iban.length}isIndirect(){return 20===this._iban.length}checksum(){return this._iban.substr(2,2)}institution(){return this.isIndirect()?this._iban.substr(7,4):""}client(){return this.isIndirect()?this._iban.substr(11):""}toAddress(){if(this.isDirect()){const t=this._iban.substr(4),e=new i(t,36);return n.toChecksumAddress(e.toString(16,20))}return""}toString(){return this._iban}}t.exports=s},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2725).Buffer}catch(S){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var l=["","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"],f=[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],h=[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 d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?g+r:l[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),l=this.clone();if(u){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,g=d>>>13,m=0|a[2],y=8191&m,b=m>>>13,v=0|a[3],A=8191&v,w=v>>>13,_=0|a[4],E=8191&_,I=_>>>13,S=0|a[5],M=8191&S,C=S>>>13,k=0|a[6],x=8191&k,B=k>>>13,O=0|a[7],T=8191&O,R=O>>>13,P=0|a[8],N=8191&P,j=P>>>13,D=0|a[9],L=8191&D,F=D>>>13,U=0|s[0],Q=8191&U,G=U>>>13,H=0|s[1],z=8191&H,q=H>>>13,K=0|s[2],V=8191&K,W=K>>>13,J=0|s[3],Y=8191&J,X=J>>>13,Z=0|s[4],$=8191&Z,tt=Z>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ft=8191<,ht=lt>>>13,dt=0|s[9],pt=8191&dt,gt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,Q))|0)+((8191&(i=(i=Math.imul(f,G))+Math.imul(h,Q)|0))<<13)|0;c=((o=Math.imul(h,G))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,Q),i=(i=Math.imul(p,G))+Math.imul(g,Q)|0,o=Math.imul(g,G);var yt=(c+(n=n+Math.imul(f,z)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,z)|0))<<13)|0;c=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,G))+Math.imul(b,Q)|0,o=Math.imul(b,G),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,q)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,Q),i=(i=Math.imul(A,G))+Math.imul(w,Q)|0,o=Math.imul(w,G),n=n+Math.imul(y,z)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var vt=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,G))+Math.imul(I,Q)|0,o=Math.imul(I,G),n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,q)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0;var At=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,Q),i=(i=Math.imul(M,G))+Math.imul(C,Q)|0,o=Math.imul(C,G),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,q)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,G))+Math.imul(B,Q)|0,o=Math.imul(B,G),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,q)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var _t=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,Q),i=(i=Math.imul(T,G))+Math.imul(R,Q)|0,o=Math.imul(R,G),n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Et=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var It=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,G))+Math.imul(F,Q)|0,o=Math.imul(F,G),n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(j,z)|0,o=o+Math.imul(j,q)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,ht)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(F,z)|0,o=Math.imul(F,q),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var Mt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ht)|0;var Ct=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(F,Y)|0,o=Math.imul(F,X),n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var kt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(C,ft)|0,o=o+Math.imul(C,ht)|0;var xt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Bt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(N,ft)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ht)|0;var Tt=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,ht))+Math.imul(F,ft)|0,o=Math.imul(F,ht);var Rt=(c+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Pt=(c+(n=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=mt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=At,u[5]=wt,u[6]=_t,u[7]=Et,u[8]=It,u[9]=St,u[10]=Mt,u[11]=Ct,u[12]=kt,u[13]=xt,u[14]=Bt,u[15]=Ot,u[16]=Tt,u[17]=Rt,u[18]=Pt,0!==c&&(u[19]=c,r.length++),r};function g(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):g(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function I(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new A;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var g=d,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new I(t)},i(I,E),I.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},I.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},I.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},I.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},I.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(79)(t))},,function(t,e,r){"use strict";var n=r(1255),i=r(257).errors,o=function(t){this.requestManager=t,this.requests=[]};o.prototype.add=function(t){this.requests.push(t)},o.prototype.execute=function(){var t=this.requests,e=this._sortResponses.bind(this);this.requestManager.sendBatch(t,(function(r,o){o=e(o),t.map((function(t,e){return o[e]||{}})).forEach((function(e,o){if(t[o].callback){if(e&&e.error)return t[o].callback(i.ErrorResponse(e));if(!n.isValidResponse(e))return t[o].callback(i.InvalidResponse(e));try{t[o].callback(null,t[o].format?t[o].format(e.result):e.result)}catch(r){t[o].callback(r)}}}))}))},o.prototype._sortResponses=function(t){return(t||[]).sort(((t,e)=>t.id-e.id))},t.exports=o},function(t,e,r){"use strict";var n=null,i="object"===typeof globalThis?globalThis:void 0;if(!i)try{i=Function("return this")()}catch(o){i=self}"undefined"!==typeof i.ethereum?n=i.ethereum:"undefined"!==typeof i.web3&&i.web3.currentProvider&&(i.web3.currentProvider.sendAsync&&(i.web3.currentProvider.send=i.web3.currentProvider.sendAsync,delete i.web3.currentProvider.sendAsync),!i.web3.currentProvider.on&&i.web3.currentProvider.connection&&"ipcProviderWrapper"===i.web3.currentProvider.connection.constructor.name&&(i.web3.currentProvider.on=function(t,e){if("function"!==typeof e)throw new Error("The second parameter callback must be a function.");if("data"===t)this.connection.on("data",(function(t){var r="";t=t.toString();try{r=JSON.parse(t)}catch(o){return e(new Error("Couldn't parse response data"+t))}r.id||-1===r.method.indexOf("_subscription")||e(null,r)}));else this.connection.on(t,e)}),n=i.web3.currentProvider),t.exports=n},function(t,e,r){"use strict";var n=r(874),i=r(2729),o=r(257).errors,a=r(2730).w3cwebsocket,s=function(t,e){n.call(this),e=e||{},this.url=t,this._customTimeout=e.timeout||15e3,this.headers=e.headers||{},this.protocol=e.protocol||void 0,this.reconnectOptions=Object.assign({auto:!1,delay:5e3,maxAttempts:!1,onTimeout:!1},e.reconnect),this.clientConfig=e.clientConfig||void 0,this.requestOptions=e.requestOptions||void 0,this.DATA="data",this.CLOSE="close",this.ERROR="error",this.CONNECT="connect",this.RECONNECT="reconnect",this.connection=null,this.requestQueue=new Map,this.responseQueue=new Map,this.reconnectAttempts=0,this.reconnecting=!1;var r=i.parseURL(t);r.username&&r.password&&(this.headers.authorization="Basic "+i.btoa(r.username+":"+r.password)),r.auth&&(this.headers.authorization="Basic "+i.btoa(r.auth)),Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0}),this.connect()};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype.connect=function(){this.connection=new a(this.url,this.protocol,void 0,this.headers,this.requestOptions,this.clientConfig),this._addSocketListeners()},s.prototype._onMessage=function(t){var e=this;this._parseResponse("string"===typeof t.data?t.data:"").forEach((function(t){if(t.method&&-1!==t.method.indexOf("_subscription"))e.emit(e.DATA,t);else{var r=t.id;Array.isArray(t)&&(r=t[0].id),e.responseQueue.has(r)&&(void 0!==e.responseQueue.get(r).callback&&e.responseQueue.get(r).callback(!1,t),e.responseQueue.delete(r))}}))},s.prototype._onConnect=function(){if(this.emit(this.CONNECT),this.reconnectAttempts=0,this.reconnecting=!1,this.requestQueue.size>0){var t=this;this.requestQueue.forEach((function(e,r){t.send(e.payload,e.callback),t.requestQueue.delete(r)}))}},s.prototype._onClose=function(t){var e=this;!this.reconnectOptions.auto||[1e3,1001].includes(t.code)&&!1!==t.wasClean?(this.emit(this.CLOSE,t),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(o.ConnectionNotOpenError(t)),e.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(o.InvalidConnection("on WS",t)),e.responseQueue.delete(n)})),this._removeSocketListeners(),this.removeAllListeners()):this.reconnect()},s.prototype._addSocketListeners=function(){this.connection.addEventListener("message",this._onMessage.bind(this)),this.connection.addEventListener("open",this._onConnect.bind(this)),this.connection.addEventListener("close",this._onClose.bind(this))},s.prototype._removeSocketListeners=function(){this.connection.removeEventListener("message",this._onMessage),this.connection.removeEventListener("open",this._onConnect),this.connection.removeEventListener("close",this._onClose)},s.prototype._parseResponse=function(t){var e=this,r=[];return t.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(t){e.lastChunk&&(t=e.lastChunk+t);var n=null;try{n=JSON.parse(t)}catch(i){return e.lastChunk=t,clearTimeout(e.lastChunkTimeout),void(e.lastChunkTimeout=setTimeout((function(){e.reconnectOptions.auto&&e.reconnectOptions.onTimeout?e.reconnect():(e.emit(e.ERROR,o.ConnectionTimeout(e._customTimeout)),e.requestQueue.size>0&&e.requestQueue.forEach((function(t,r){t.callback(o.ConnectionTimeout(e._customTimeout)),e.requestQueue.delete(r)})))}),e._customTimeout))}clearTimeout(e.lastChunkTimeout),e.lastChunk=null,n&&r.push(n)})),r},s.prototype.send=function(t,e){var r=t.id,n={payload:t,callback:e};if(Array.isArray(t)&&(r=t[0].id),this.connection.readyState===this.connection.CONNECTING||this.reconnecting)this.requestQueue.set(r,n);else{if(this.connection.readyState!==this.connection.OPEN)return this.requestQueue.delete(r),this.emit(this.ERROR,o.ConnectionNotOpenError()),void n.callback(o.ConnectionNotOpenError());this.responseQueue.set(r,n),this.requestQueue.delete(r);try{this.connection.send(JSON.stringify(n.payload))}catch(i){n.callback(i),this.responseQueue.delete(r)}}},s.prototype.reset=function(){this.responseQueue.clear(),this.requestQueue.clear(),this.removeAllListeners(),this._removeSocketListeners(),this._addSocketListeners()},s.prototype.disconnect=function(t,e){this._removeSocketListeners(),this.connection.close(t||1e3,e)},s.prototype.supportsSubscriptions=function(){return!0},s.prototype.reconnect=function(){var t=this;this.reconnecting=!0,this.responseQueue.size>0&&this.responseQueue.forEach((function(e,r){e.callback(o.PendingRequestsOnReconnectingError()),t.responseQueue.delete(r)})),!this.reconnectOptions.maxAttempts||this.reconnectAttempts0&&this.requestQueue.forEach((function(e,r){e.callback(o.MaxAttemptsReachedOnReconnectingError()),t.requestQueue.delete(r)})))},t.exports=s},function(t,e,r){(function(e,n){var i="[object process]"===Object.prototype.toString.call("undefined"!==typeof e?e:0),o="undefined"!==typeof navigator&&"ReactNative"===navigator.product,a=null,s=null;if(i||o){a=function(t){return n.from(t).toString("base64")};var u=r(336);if(u.URL){var c=u.URL;s=function(t){return new c(t)}}else s=r(336).parse}else a=btoa.bind("object"===typeof globalThis?globalThis:self),s=function(t){return new URL(t)};t.exports={parseURL:s,btoa:a}}).call(this,r(57),r(7).Buffer)},function(t,e,r){var n;if("object"===typeof globalThis)n=globalThis;else try{n=r(2731)}catch(s){}finally{if(n||"undefined"===typeof window||(n=window),!n)throw new Error("Could not determine global this")}var i=n.WebSocket||n.MozWebSocket,o=r(2732);function a(t,e){return e?new i(t,e):new i(t)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(t){Object.defineProperty(a,t,{get:function(){return i[t]}})})),t.exports={w3cwebsocket:i?a:null,version:o}},function(t,e){var r=function(){if("object"===typeof self&&self)return self;if("object"===typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;if("object"===typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return r()}try{return __global__||r()}finally{delete Object.prototype.__global__}}()},function(t,e,r){t.exports=r(2733).version},function(t){t.exports=JSON.parse('{"name":"websocket","description":"Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.","keywords":["websocket","websockets","socket","networking","comet","push","RFC-6455","realtime","server","client"],"author":"Brian McKelvey (https://github.com/theturtle32)","contributors":["I\xf1aki Baz Castillo (http://dev.sipdoc.net)"],"version":"1.0.34","repository":{"type":"git","url":"https://github.com/theturtle32/WebSocket-Node.git"},"homepage":"https://github.com/theturtle32/WebSocket-Node","engines":{"node":">=4.0.0"},"dependencies":{"bufferutil":"^4.0.1","debug":"^2.2.0","es5-ext":"^0.10.50","typedarray-to-buffer":"^3.1.5","utf-8-validate":"^5.0.2","yaeti":"^0.0.6"},"devDependencies":{"buffer-equal":"^1.0.0","gulp":"^4.0.2","gulp-jshint":"^2.0.4","jshint-stylish":"^2.2.1","jshint":"^2.0.0","tape":"^4.9.1"},"config":{"verbose":false},"scripts":{"test":"tape test/unit/*.js","gulp":"gulp"},"main":"index","directories":{"lib":"./lib"},"browser":"lib/browser.js","license":"Apache-2.0"}')},function(t,e,r){var n=r(257).errors,i=r(2735).XMLHttpRequest,o=r(566),a=r(387),s=function(t,e){e=e||{},this.withCredentials=e.withCredentials||!1,this.timeout=e.timeout||0,this.headers=e.headers,this.agent=e.agent,this.connected=!1;const r=!1!==e.keepAlive;this.host=t||"http://localhost:8545",this.agent||("https"===this.host.substring(0,5)?this.httpsAgent=new a.Agent({keepAlive:r}):this.httpAgent=new o.Agent({keepAlive:r}))};s.prototype._prepareRequest=function(){var t;if("undefined"!==typeof XMLHttpRequest)t=new XMLHttpRequest;else{t=new i;var e={httpsAgent:this.httpsAgent,httpAgent:this.httpAgent,baseUrl:this.baseUrl};this.agent&&(e.httpsAgent=this.agent.https,e.httpAgent=this.agent.http,e.baseUrl=this.agent.baseUrl),t.nodejsSet(e)}return t.open("POST",this.host,!0),t.setRequestHeader("Content-Type","application/json"),t.timeout=this.timeout,t.withCredentials=this.withCredentials,this.headers&&this.headers.forEach((function(e){t.setRequestHeader(e.name,e.value)})),t},s.prototype.send=function(t,e){var r=this,i=this._prepareRequest();i.onreadystatechange=function(){if(4===i.readyState&&1!==i.timeout){var t=i.responseText,o=null;try{t=JSON.parse(t)}catch(a){o=n.InvalidResponse(i.responseText)}r.connected=!0,e(o,t)}},i.ontimeout=function(){r.connected=!1,e(n.ConnectionTimeout(this.timeout))};try{i.send(JSON.stringify(t))}catch(o){this.connected=!1,e(n.InvalidConnection(this.host))}},s.prototype.disconnect=function(){},s.prototype.supportsSubscriptions=function(){return!1},t.exports=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(2736));var n=r(875);e.XMLHttpRequestEventTarget=n.XMLHttpRequestEventTarget},function(t,e,r){"use strict";(function(t,n){var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r=0)return this._url=this._parseUrl(e.headers.location),this._method="GET",this._loweredHeaders["content-type"]&&(delete this._headers[this._loweredHeaders["content-type"]],delete this._loweredHeaders["content-type"]),null!=this._headers["Content-Type"]&&delete this._headers["Content-Type"],delete this._headers["Content-Length"],this.upload._reset(),this._finalizeHeaders(),void this._sendHxxpRequest();this._response=e,this._response.on("data",(function(t){return n._onHttpResponseData(e,t)})),this._response.on("end",(function(){return n._onHttpResponseEnd(e)})),this._response.on("close",(function(){return n._onHttpResponseClose(e)})),this.responseUrl=this._url.href.split("#")[0],this.status=e.statusCode,this.statusText=a.STATUS_CODES[this.status],this._parseResponseHeaders(e);var i=this._responseHeaders["content-length"]||"";this._totalBytes=+i,this._lengthComputable=!!i,this._setReadyState(r.HEADERS_RECEIVED)}},r.prototype._onHttpResponseData=function(t,e){this._response===t&&(this._responseParts.push(new n(e)),this._loadedBytes+=e.length,this.readyState!==r.LOADING&&this._setReadyState(r.LOADING),this._dispatchProgress("progress"))},r.prototype._onHttpResponseEnd=function(t){this._response===t&&(this._parseResponse(),this._request=null,this._response=null,this._setReadyState(r.DONE),this._dispatchProgress("load"),this._dispatchProgress("loadend"))},r.prototype._onHttpResponseClose=function(t){if(this._response===t){var e=this._request;this._setError(),e.abort(),this._setReadyState(r.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend")}},r.prototype._onHttpTimeout=function(t){this._request===t&&(this._setError(),t.abort(),this._setReadyState(r.DONE),this._dispatchProgress("timeout"),this._dispatchProgress("loadend"))},r.prototype._onHttpRequestError=function(t,e){this._request===t&&(this._setError(),t.abort(),this._setReadyState(r.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend"))},r.prototype._dispatchProgress=function(t){var e=new r.ProgressEvent(t);e.lengthComputable=this._lengthComputable,e.loaded=this._loadedBytes,e.total=this._totalBytes,this.dispatchEvent(e)},r.prototype._setError=function(){this._request=null,this._response=null,this._responseHeaders=null,this._responseParts=null},r.prototype._parseUrl=function(t,e,r){var n=null==this.nodejsBaseUrl?t:c.resolve(this.nodejsBaseUrl,t),i=c.parse(n,!1,!0);i.hash=null;var o=(i.auth||"").split(":"),a=o[0],s=o[1];return(a||s||e||r)&&(i.auth=(e||a||"")+":"+(r||s||"")),i},r.prototype._parseResponseHeaders=function(t){for(var e in this._responseHeaders={},t.headers){var r=e.toLowerCase();this._privateHeaders[r]||(this._responseHeaders[r]=t.headers[e])}null!=this._mimeOverride&&(this._responseHeaders["content-type"]=this._mimeOverride)},r.prototype._parseResponse=function(){var t=n.concat(this._responseParts);switch(this._responseParts=null,this.responseType){case"json":this.responseText=null;try{this.response=JSON.parse(t.toString("utf-8"))}catch(o){this.response=null}return;case"buffer":return this.responseText=null,void(this.response=t);case"arraybuffer":this.responseText=null;for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),i=0;i0&&(i=r),r=t[n++]);)switch(G++,"\n"===r?(z++,H=0):H++,D){case d:if("{"===r)D=g;else if("["===r)D=y;else if(!K(r))return q("Non-whitespace before {[.");continue;case A:case g:if(K(r))continue;if(D===A)L.push(w);else{if("}"===r){s({}),u(),D=L.pop()||p;continue}L.push(m)}if('"'!==r)return q('Malformed object key should start with " ');D=v;continue;case w:case m:if(K(r))continue;if(":"===r)D===m?(L.push(m),void 0!==o&&(s({}),a(o),o=void 0),Q++):void 0!==o&&(a(o),o=void 0),D=p;else if("}"===r)void 0!==o&&(s(o),u(),o=void 0),u(),Q--,D=L.pop()||p;else{if(","!==r)return q("Bad object");D===m&&L.push(m),void 0!==o&&(s(o),u(),o=void 0),D=A}continue;case y:case p:if(K(r))continue;if(D===y){if(s([]),Q++,D=p,"]"===r){u(),Q--,D=L.pop()||p;continue}L.push(b)}if('"'===r)D=v;else if("{"===r)D=g;else if("["===r)D=y;else if("t"===r)D=_;else if("f"===r)D=S;else if("n"===r)D=x;else if("-"===r)P+=r;else if("0"===r)P+=r,D=20;else{if(-1==="123456789".indexOf(r))return q("Bad value");P+=r,D=20}continue;case b:if(","===r)L.push(b),void 0!==o&&(s(o),u(),o=void 0),D=p;else{if("]"!==r){if(K(r))continue;return q("Bad array")}void 0!==o&&(s(o),u(),o=void 0),u(),Q--,D=L.pop()||p}continue;case v:void 0===o&&(o="");var c=n-1;t:for(;;){for(;U>0;)if(F+=r,r=t.charAt(n++),4===U?(o+=String.fromCharCode(parseInt(F,16)),U=0,c=n-1):U++,!r)break t;if('"'===r&&!N){D=L.pop()||p,o+=t.substring(c,n-1);break}if("\\"===r&&!N&&(N=!0,o+=t.substring(c,n-1),!(r=t.charAt(n++))))break;if(N){if(N=!1,"n"===r?o+="\n":"r"===r?o+="\r":"t"===r?o+="\t":"f"===r?o+="\f":"b"===r?o+="\b":"u"===r?(U=1,F=""):o+=r,r=t.charAt(n++),c=n-1,r)continue;break}f.lastIndex=n;var h=f.exec(t);if(!h){n=t.length+1,o+=t.substring(c,n-1);break}if(n=h.index+1,!(r=t.charAt(h.index))){o+=t.substring(c,n-1);break}}continue;case _:if(!r)continue;if("r"!==r)return q("Invalid true started with t"+r);D=E;continue;case E:if(!r)continue;if("u"!==r)return q("Invalid true started with tr"+r);D=I;continue;case I:if(!r)continue;if("e"!==r)return q("Invalid true started with tru"+r);s(!0),u(),D=L.pop()||p;continue;case S:if(!r)continue;if("a"!==r)return q("Invalid false started with f"+r);D=M;continue;case M:if(!r)continue;if("l"!==r)return q("Invalid false started with fa"+r);D=C;continue;case C:if(!r)continue;if("s"!==r)return q("Invalid false started with fal"+r);D=k;continue;case k:if(!r)continue;if("e"!==r)return q("Invalid false started with fals"+r);s(!1),u(),D=L.pop()||p;continue;case x:if(!r)continue;if("u"!==r)return q("Invalid null started with n"+r);D=B;continue;case B:if(!r)continue;if("l"!==r)return q("Invalid null started with nu"+r);D=O;continue;case O:if(!r)continue;if("l"!==r)return q("Invalid null started with nul"+r);s(null),u(),D=L.pop()||p;continue;case T:if("."!==r)return q("Leading zero not followed by .");P+=r,D=20;continue;case 20:if(-1!=="0123456789".indexOf(r))P+=r;else if("."===r){if(-1!==P.indexOf("."))return q("Invalid number has two dots");P+=r}else if("e"===r||"E"===r){if(-1!==P.indexOf("e")||-1!==P.indexOf("E"))return q("Invalid number has two exponential");P+=r}else if("+"===r||"-"===r){if("e"!==i&&"E"!==i)return q("Invalid symbol in number");P+=r}else P&&(s(parseFloat(P)),u(),P=""),n--,D=L.pop()||p;continue;default:return q("Unknown state: "+D)}G>=R&&function(){var t=0;void 0!==o&&o.length>l&&(q("Max buffer length exceeded: textNode"),t=Math.max(t,o.length)),P.length>l&&(q("Max buffer length exceeded: numberNode"),t=Math.max(t,P.length)),R=l-t+G}()}})),t(n.n).on((function(){if(D===d)return s({}),u(),void(j=!0);D===p&&0===Q||q("Unexpected end"),void 0!==o&&(s(o),u(),o=void 0),j=!0}))}},function(t,e,r){"use strict";r.d(e,"a",(function(){return u})),r.d(e,"b",(function(){return c}));var n=r(19),i=r(3),o=r(2),a=r(20),s=r(0);function u(){return new XMLHttpRequest}function c(t,e,r,u,c,l,f){var h=t(i.m).emit,d=t(i.b).emit,p=0,g=!0;function m(){if("2"===String(e.status)[0]){var t=e.responseText,r=(" "+t.substr(p)).substr(1);r&&h(r),p=Object(o.e)(t)}}function y(e){try{g&&t(i.c).emit(e.status,Object(a.a)(e.getAllResponseHeaders())),g=!1}catch(r){}}t(i.a).on((function(){e.onreadystatechange=null,e.abort()})),"onprogress"in e&&(e.onprogress=m),e.onreadystatechange=function(){switch(e.readyState){case 2:case 3:return y(e);case 4:y(e),"2"===String(e.status)[0]?(m(),t(i.n).emit()):d(Object(i.o)(e.status,e.responseText))}};try{for(var b in e.open(r,u,!0),l)e.setRequestHeader(b,l[b]);Object(n.a)(window.location,Object(n.b)(u))||e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.withCredentials=f,e.send(c)}catch(v){window.setTimeout(Object(s.j)(d,Object(i.o)(void 0,void 0,v)),0)}}},function(t,e,r){"use strict";function n(t,e){function r(e){return String(e.port||{"http:":80,"https:":443}[e.protocol||t.protocol])}return!!(e.protocol&&e.protocol!==t.protocol||e.host&&e.host!==t.host||e.host&&r(e)!==r(t))}function i(t){var e=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(t)||[];return{protocol:e[1]||"",host:e[2]||"",port:e[3]||""}}r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return i}))},function(t,e,r){"use strict";function n(t){var e={};return t&&t.split("\r\n").forEach((function(t){var r=t.indexOf(": ");e[t.substring(0,r)]=t.substring(r+2)})),e}r.d(e,"a",(function(){return n}))}]).default},t.exports=n()},function(t,e,r){"use strict";var n=r(257).formatters,i=r(1256),o=r(189);t.exports=function(t){var e=function(e){var r;return e.property?(t[e.property]||(t[e.property]={}),r=t[e.property]):r=t,e.methods&&e.methods.forEach((function(e){e instanceof i||(e=new i(e)),e.attachToObject(r),e.setRequestManager(t._requestManager)})),t};return e.formatters=n,e.utils=o,e.Method=i,e}},function(t,e,r){"use strict";var n=r(257).errors,i=r(874),o=r(257).formatters;function a(t){return t}function s(t){i.call(this),this.id=null,this.callback=a,this.arguments=null,this.lastBlock=null,this.options={subscription:t.subscription,type:t.type,requestManager:t.requestManager}}s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.prototype._extractCallback=function(t){if("function"===typeof t[t.length-1])return t.pop()},s.prototype._validateArgs=function(t){var e=this.options.subscription;if(e||(e={}),e.params||(e.params=0),t.length!==e.params)throw n.InvalidNumberOfParams(t.length,e.params,e.subscriptionName)},s.prototype._formatInput=function(t){var e=this.options.subscription;return e&&e.inputFormatter?e.inputFormatter.map((function(e,r){return e?e(t[r]):t[r]})):t},s.prototype._formatOutput=function(t){var e=this.options.subscription;return e&&e.outputFormatter&&t?e.outputFormatter(t):t},s.prototype._toPayload=function(t){var e=[];if(this.callback=this._extractCallback(t)||a,this.subscriptionMethod||(this.subscriptionMethod=t.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(t),this._validateArgs(this.arguments),t=[]),e.push(this.subscriptionMethod),e=e.concat(this.arguments),t.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:e}},s.prototype.unsubscribe=function(t){this.options.requestManager.removeSubscription(this.id,t),this.id=null,this.lastBlock=null,this.removeAllListeners()},s.prototype.subscribe=function(){var t=this,e=Array.prototype.slice.call(arguments),r=this._toPayload(e);if(!r)return this;if(!this.options.requestManager.provider)return setTimeout((function(){var e=new Error("No provider set.");t.callback(e,null,t),t.emit("error",e)}),0),this;if(!this.options.requestManager.provider.on)return setTimeout((function(){var e=new Error("The current provider doesn't support subscriptions: "+t.options.requestManager.provider.constructor.name);t.callback(e,null,t),t.emit("error",e)}),0),this;if(this.lastBlock&&this.options.params&&"object"===typeof this.options.params&&(r.params[1]=this.options.params,r.params[1].fromBlock=o.inputBlockNumberFormatter(this.lastBlock+1)),this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&r.params[1]&&"object"===typeof r.params[1]&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)){var n=Object.assign({},r.params[1]);this.options.requestManager.send({method:"eth_getLogs",params:[n]},(function(e,r){e?setTimeout((function(){t.callback(e,null,t),t.emit("error",e)}),0):r.forEach((function(e){var r=t._formatOutput(e);t.callback(null,r,t),t.emit("data",r)}))}))}return"object"===typeof r.params[1]&&delete r.params[1].fromBlock,this.options.requestManager.send(r,(function(e,n){!e&&n?(t.id=n,t.method=r.params[0],t.options.requestManager.addSubscription(t,(function(e,r){e?(t.callback(e,!1,t),t.emit("error",e)):(Array.isArray(r)||(r=[r]),r.forEach((function(e){var r=t._formatOutput(e);if(t.lastBlock=r&&"object"===typeof r?r.blockNumber:null,"function"===typeof t.options.subscription.subscriptionHandler)return t.options.subscription.subscriptionHandler.call(t,r);t.emit("data",r),t.callback(null,r,t)})))})),t.emit("connected",n)):setTimeout((function(){t.callback(e,!1,t),t.emit("error",e)}),0)})),this},s.prototype.resubscribe=function(){this.options.requestManager.removeSubscription(this.id),this.id=null,this.subscribe(this.callback)},t.exports=s},function(t,e,r){var n=r(7).Buffer,i=r(189),o=r(1344).AbiCoder,a=r(1344).ParamType,s=new o((function(t,e){return!t.match(/^u?int/)||Array.isArray(e)||e&&"object"===typeof e&&"BN"===e.constructor.name?e:e.toString()}));function u(){}var c=function(){};c.prototype.encodeFunctionSignature=function(t){return("function"===typeof t||"object"===typeof t&&t)&&(t=i._jsonInterfaceMethodToString(t)),i.sha3(t).slice(0,10)},c.prototype.encodeEventSignature=function(t){return("function"===typeof t||"object"===typeof t&&t)&&(t=i._jsonInterfaceMethodToString(t)),i.sha3(t)},c.prototype.encodeParameter=function(t,e){return this.encodeParameters([t],[e])},c.prototype.encodeParameters=function(t,e){var r=this;return t=r.mapTypes(t),e=e.map((function(e,n){let i=t[n];if("object"===typeof i&&i.type&&(i=i.type),e=r.formatParam(i,e),"string"===typeof i&&i.includes("tuple")){const t=s._getCoder(a.from(i)),n=(t,e)=>{if("array"===t.name)return e.map((e=>n(s._getCoder(a.from(t.type.replace("[]",""))),e)));t.coders.forEach(((t,i)=>{"tuple"===t.name?n(t,e[i]):e[i]=r.formatParam(t.name,e[i])}))};n(t,e)}return e})),s.encode(t,e)},c.prototype.mapTypes=function(t){var e=this,r=[];return t.forEach((function(t){if("object"===typeof t&&"function"===t.type&&(t=Object.assign({},t,{type:"bytes24"})),e.isSimplifiedStructFormat(t)){var n=Object.keys(t)[0];r.push(Object.assign(e.mapStructNameAndType(n),{components:e.mapStructToCoderFormat(t[n])}))}else r.push(t)})),r},c.prototype.isSimplifiedStructFormat=function(t){return"object"===typeof t&&"undefined"===typeof t.components&&"undefined"===typeof t.name},c.prototype.mapStructNameAndType=function(t){var e="tuple";return t.indexOf("[]")>-1&&(e="tuple[]",t=t.slice(0,-2)),{type:e,name:t}},c.prototype.mapStructToCoderFormat=function(t){var e=this,r=[];return Object.keys(t).forEach((function(n){"object"!==typeof t[n]?r.push({name:n,type:t[n]}):r.push(Object.assign(e.mapStructNameAndType(n),{components:e.mapStructToCoderFormat(t[n])}))})),r},c.prototype.formatParam=function(t,e){const r=new RegExp(/^bytes([0-9]*)$/),o=new RegExp(/^bytes([0-9]*)\[\]$/),a=new RegExp(/^(u?int)([0-9]*)$/),s=new RegExp(/^(u?int)([0-9]*)\[\]$/);if(i.isBN(e)||i.isBigNumber(e))return e.toString(10);if(t.match(o)||t.match(s))return e.map((e=>this.formatParam(t.replace("[]",""),e)));let u=t.match(a);if(u){let t=parseInt(u[2]||"256");t/80&&(!e||"0x"===e||"0X"===e))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var n=s.decode(this.mapTypes(t),"0x"+e.replace(/0x/i,""),r),i=new u;return i.__length__=0,t.forEach((function(t,e){var r=n[i.__length__];const o="object"===typeof t&&t.type&&"string"===t.type;r="0x"!==r||o||"string"===typeof t&&"string"===t?r:null,i[e]=r,("function"===typeof t||t&&"object"===typeof t)&&t.name&&(i[t.name]=r),i.__length__++})),i},c.prototype.decodeLog=function(t,e,r){var n=this;r=Array.isArray(r)?r:[r],e=e||"";var i=[],o=[],a=0;t.forEach((function(t,e){t.indexed?(o[e]=["bool","int","uint","address","fixed","ufixed"].find((function(e){return-1!==t.type.indexOf(e)}))?n.decodeParameter(t.type,r[a]):r[a],a++):i[e]=t}));var s=e,c=s?this.decodeParametersWith(i,s,!0):[],l=new u;return l.__length__=0,t.forEach((function(t,e){l[e]="string"===t.type?"":null,"undefined"!==typeof c[e]&&(l[e]=c[e]),"undefined"!==typeof o[e]&&(l[e]=o[e]),t.name&&(l[t.name]=l[e]),l.__length__++})),l};var l=new c;t.exports=l},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var n=r(2748);function i(e,r){return void 0===r&&(r="utf8"),t.isBuffer(e)?a(e.toString("base64")):a(t.from(e,r).toString("base64"))}function o(t){return t=t.toString(),n.default(t).replace(/\-/g,"+").replace(/_/g,"/")}function a(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var s=i;s.encode=i,s.decode=function(e,r){return void 0===r&&(r="utf8"),t.from(o(e),"base64").toString(r)},s.toBase64=o,s.fromBase64=a,s.toBuffer=function(e){return t.from(o(e),"base64")},e.default=s}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var r=e.length,n=r%4;if(!n)return e;var i=r,o=4-n,a=r+o,s=t.alloc(a);for(s.write(e);o--;)s.write("=",i++);return s.toString()}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const n=r(876),i=r(1259),o=r(877);function a(t,e){const[r,o]=u(e);return new n.EthereumRpcError(t,r||i.getMessageFromCode(t),o)}function s(t,e){const[r,o]=u(e);return new n.EthereumProviderError(t,r||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"===typeof t)return[t];if("object"===typeof t&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&"string"!==typeof e)throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}e.ethErrors={rpc:{parse:t=>a(o.errorCodes.rpc.parse,t),invalidRequest:t=>a(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>a(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>a(o.errorCodes.rpc.methodNotFound,t),internal:t=>a(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(e,t)},invalidInput:t=>a(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>a(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>a(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>a(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>a(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>a(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>s(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>s(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>s(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>s(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>s(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:i}=t;if(!r||"string"!==typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(e,r,i)}}}},function(t,e){t.exports=function t(e,r){if(e&&r)return t(e)(r);if("function"!==typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){n[t]=e[t]})),n;function n(){for(var t=new Array(arguments.length),r=0;r=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){e.parse=r(2754),e.stringify=r(2755)},function(t,e){var r,n,i,o,a={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},s=function(t){throw{name:"SyntaxError",message:t,at:r,text:i}},u=function(t){return t&&t!==n&&s("Expected '"+t+"' instead of '"+n+"'"),n=i.charAt(r),r+=1,n},c=function(){var t,e="";for("-"===n&&(e="-",u("-"));n>="0"&&n<="9";)e+=n,u();if("."===n)for(e+=".";u()&&n>="0"&&n<="9";)e+=n;if("e"===n||"E"===n)for(e+=n,u(),"-"!==n&&"+"!==n||(e+=n,u());n>="0"&&n<="9";)e+=n,u();if(t=+e,isFinite(t))return t;s("Bad number")},l=function(){var t,e,r,i="";if('"'===n)for(;u();){if('"'===n)return u(),i;if("\\"===n)if(u(),"u"===n){for(r=0,e=0;e<4&&(t=parseInt(u(),16),isFinite(t));e+=1)r=16*r+t;i+=String.fromCharCode(r)}else{if("string"!==typeof a[n])break;i+=a[n]}else i+=n}s("Bad string")},f=function(){for(;n&&n<=" ";)u()};o=function(){switch(f(),n){case"{":return function(){var t,e={};if("{"===n){if(u("{"),f(),"}"===n)return u("}"),e;for(;n;){if(t=l(),f(),u(":"),Object.hasOwnProperty.call(e,t)&&s('Duplicate key "'+t+'"'),e[t]=o(),f(),"}"===n)return u("}"),e;u(","),f()}}s("Bad object")}();case"[":return function(){var t=[];if("["===n){if(u("["),f(),"]"===n)return u("]"),t;for(;n;){if(t.push(o()),f(),"]"===n)return u("]"),t;u(","),f()}}s("Bad array")}();case'"':return l();case"-":return c();default:return n>="0"&&n<="9"?c():function(){switch(n){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}s("Unexpected '"+n+"'")}()}},t.exports=function(t,e){var a;return i=t,r=0,n=" ",a=o(),f(),n&&s("Syntax error"),"function"===typeof e?function t(r,n){var i,o,a=r[n];if(a&&"object"===typeof a)for(i in a)Object.prototype.hasOwnProperty.call(a,i)&&(void 0!==(o=t(a,i))?a[i]=o:delete a[i]);return e.call(r,n,a)}({"":a},""):a}},function(t,e){var r,n,i,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(t){return o.lastIndex=0,o.test(t)?'"'+t.replace(o,(function(t){var e=a[t];return"string"===typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function u(t,e){var o,a,c,l,f,h=r,d=e[t];switch(d&&"object"===typeof d&&"function"===typeof d.toJSON&&(d=d.toJSON(t)),"function"===typeof i&&(d=i.call(e,t,d)),typeof d){case"string":return s(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(r+=n,f=[],"[object Array]"===Object.prototype.toString.apply(d)){for(l=d.length,o=0;othis.push(t),this.obsStore=t,this.obsStore.subscribe(this.handler)}pipe(t,e){const r=super.pipe(t,e);return t.write(this.obsStore.getState()),r}_write(t,e,r){this.obsStore.putState(t),r()}_read(t){}_destroy(t,e){this.obsStore.unsubscribe(this.handler),super._destroy(t,e)}}e.storeAsStream=function(t){return new i(t)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComposedStore=void 0;const n=r(879);class i extends n.ObservableStore{constructor(t){super({}),this._children=t||{},Object.keys(this._children).forEach((t=>{const e=this._children[t];this._addChild(t,e)}))}_addChild(t,e){const r=e=>{const r=this.getState();r[t]=e,this.putState(r)};e.subscribe(r),r(e.getState())}}e.ComposedStore=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergedStore=void 0;const n=r(879);class i extends n.ObservableStore{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super({}),this._children=t,t.forEach((t=>this._addChild(t))),this._updateWholeState()}_addChild(t){t.subscribe((()=>this._updateWholeState()))}_updateWholeState(){const t=this._children.map((t=>t.getState())),e=Object.assign({},...t);this.putState(e)}}e.MergedStore=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.storeTransformStream=void 0;const n=r(2768);e.storeTransformStream=function(t){return n.obj(((e,r,n)=>{try{return void n(null,t(e))}catch(i){return void n(i)}}))}},function(t,e,r){(function(e){var n=r(2769).Transform,i=r(464).inherits,o=r(659);function a(t){n.call(this,t),this._destroyed=!1}function s(t,e,r){r(null,t)}function u(t){return function(e,r,n){return"function"==typeof e&&(n=r,r=e,e={}),"function"!=typeof r&&(r=s),"function"!=typeof n&&(n=null),t(e,r,n)}}i(a,n),a.prototype.destroy=function(t){if(!this._destroyed){this._destroyed=!0;var r=this;e.nextTick((function(){t&&r.emit("error",t),r.emit("close")}))}},t.exports=u((function(t,e,r){var n=new a(t);return n._transform=e,r&&(n._flush=r),n})),t.exports.ctor=u((function(t,e,r){function n(e){if(!(this instanceof n))return new n(e);this.options=o(t,e),a.call(this,this.options)}return i(n,a),n.prototype._transform=e,r&&(n.prototype._flush=r),n})),t.exports.obj=u((function(t,e,r){var n=new a(o({objectMode:!0,highWaterMark:16},t));return n._transform=e,r&&(n._flush=r),n}))}).call(this,r(57))},function(t,e,r){(e=t.exports=r(1261)).Stream=e,e.Readable=e,e.Writable=r(1264),e.Duplex=r(488),e.Transform=r(1265),e.PassThrough=r(2773)},,function(t,e,r){"use strict";var n=r(880).Buffer,i=r(2772);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,o=n.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=o,i=s,e.copy(r,i),s+=a.data.length,a=a.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},,function(t,e,r){"use strict";t.exports=o;var n=r(1265),i=Object.create(r(209));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(74),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";const n=globalThis.AbortController||r(881).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:a,ERR_OUT_OF_RANGE:s},AbortError:u}=r(222),{validateAbortSignal:c,validateInteger:l,validateObject:f}=r(679),h=r(164).Symbol("kWeak"),{finished:d}=r(378),p=r(1267),{addAbortSignalNoValidate:g}=r(681),{isWritable:m,isNodeStream:y}=r(345),{ArrayPrototypePush:b,MathFloor:v,Number:A,NumberIsNaN:w,Promise:_,PromiseReject:E,PromisePrototypeThen:I,Symbol:S}=r(164),M=S("kEmpty"),C=S("kEof");function k(t,e){if("function"!==typeof t)throw new o("fn",["Function","AsyncFunction"],t);null!=e&&f(e,"options"),null!=(null===e||void 0===e?void 0:e.signal)&&c(e.signal,"options.signal");let r=1;return null!=(null===e||void 0===e?void 0:e.concurrency)&&(r=v(e.concurrency)),l(r,"concurrency",1),async function*(){var i,o;const a=new n,s=this,c=[],l=a.signal,f={signal:l},h=()=>a.abort();let d,p;null!==e&&void 0!==e&&null!==(i=e.signal)&&void 0!==i&&i.aborted&&h(),null===e||void 0===e||null===(o=e.signal)||void 0===o||o.addEventListener("abort",h);let g=!1;function m(){g=!0}!async function(){try{for await(let e of s){var n;if(g)return;if(l.aborted)throw new u;try{e=t(e,f)}catch(o){e=E(o)}e!==M&&("function"===typeof(null===(n=e)||void 0===n?void 0:n.catch)&&e.catch(m),c.push(e),d&&(d(),d=null),!g&&c.length&&c.length>=r&&await new _((t=>{p=t})))}c.push(C)}catch(o){const t=E(o);I(t,void 0,m),c.push(t)}finally{var i;g=!0,d&&(d(),d=null),null===e||void 0===e||null===(i=e.signal)||void 0===i||i.removeEventListener("abort",h)}}();try{for(;;){for(;c.length>0;){const t=await c[0];if(t===C)return;if(l.aborted)throw new u;t!==M&&(yield t),c.shift(),p&&(p(),p=null)}await new _((t=>{d=t}))}}finally{a.abort(),g=!0,p&&(p(),p=null)}}.call(this)}async function x(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;for await(const r of B.call(this,t,e))return!0;return!1}function B(t,e){if("function"!==typeof t)throw new o("fn",["Function","AsyncFunction"],t);return k.call(this,(async function(e,r){return await t(e,r)?e:M}),e)}class O extends a{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function T(t){if(t=A(t),w(t))return 0;if(t<0)throw new s("number",">= 0",t);return t}t.exports.streamReturningOperators={asIndexedPairs:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return null!=t&&f(t,"options"),null!=(null===t||void 0===t?void 0:t.signal)&&c(t.signal,"options.signal"),async function*(){let e=0;for await(const n of this){var r;if(null!==t&&void 0!==t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new u({cause:t.signal.reason});yield[e++,n]}}.call(this)},drop:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return null!=e&&f(e,"options"),null!=(null===e||void 0===e?void 0:e.signal)&&c(e.signal,"options.signal"),t=T(t),async function*(){var r;if(null!==e&&void 0!==e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new u;for await(const i of this){var n;if(null!==e&&void 0!==e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new u;t--<=0&&(yield i)}}.call(this)},filter:B,flatMap:function(t,e){const r=k.call(this,t,e);return async function*(){for await(const t of r)yield*t}.call(this)},map:k,take:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return null!=e&&f(e,"options"),null!=(null===e||void 0===e?void 0:e.signal)&&c(e.signal,"options.signal"),t=T(t),async function*(){var r;if(null!==e&&void 0!==e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new u;for await(const i of this){var n;if(null!==e&&void 0!==e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new u;if(!(t-- >0))return;yield i}}.call(this)},compose:function(t,e){if(null!=e&&f(e,"options"),null!=(null===e||void 0===e?void 0:e.signal)&&c(e.signal,"options.signal"),y(t)&&!m(t))throw new i("stream",t,"must be writable");const r=p(this,t);return null!==e&&void 0!==e&&e.signal&&g(e.signal,r),r}},t.exports.promiseReturningOperators={every:async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if("function"!==typeof t)throw new o("fn",["Function","AsyncFunction"],t);return!await x.call(this,(async function(){return!await t(...arguments)}),e)},forEach:async function(t,e){if("function"!==typeof t)throw new o("fn",["Function","AsyncFunction"],t);for await(const r of k.call(this,(async function(e,r){return await t(e,r),M}),e));},reduce:async function(t,e,r){var i;if("function"!==typeof t)throw new o("reducer",["Function","AsyncFunction"],t);null!=r&&f(r,"options"),null!=(null===r||void 0===r?void 0:r.signal)&&c(r.signal,"options.signal");let a=arguments.length>1;if(null!==r&&void 0!==r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const t=new u(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await d(this.destroy(t)),t}const s=new n,l=s.signal;if(null!==r&&void 0!==r&&r.signal){const t={once:!0,[h]:this};r.signal.addEventListener("abort",(()=>s.abort()),t)}let p=!1;try{for await(const n of this){var g;if(p=!0,null!==r&&void 0!==r&&null!==(g=r.signal)&&void 0!==g&&g.aborted)throw new u;a?e=await t(e,n,{signal:l}):(e=n,a=!0)}if(!p&&!a)throw new O}finally{s.abort()}return e},toArray:async function(t){null!=t&&f(t,"options"),null!=(null===t||void 0===t?void 0:t.signal)&&c(t.signal,"options.signal");const e=[];for await(const n of this){var r;if(null!==t&&void 0!==t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new u(void 0,{cause:t.signal.reason});b(e,n)}return e},some:x,find:async function(t,e){for await(const r of B.call(this,t,e))return r}}},function(t,e,r){"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:a}=r(164),{Buffer:s}=r(7),{inspect:u}=r(344);t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}unshift(t){const e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}shift(){if(0===this.length)return;const t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(0===this.length)return"";let e=this.head,r=""+e.data;for(;null!==(e=e.next);)r+=t+e.data;return r}concat(t){if(0===this.length)return s.alloc(0);const e=s.allocUnsafe(t>>>0);let r=this.head,n=0;for(;r;)o(e,r.data,n),n+=r.data.length,r=r.next;return e}consume(t,e){const r=this.head.data;if(to.length)){t===o.length?(e+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(e+=n(o,0,t),this.head=r,r.data=n(o,t));break}e+=o,t-=o.length,++i}while(null!==(r=r.next));return this.length-=i,e}_getBuffer(t){const e=s.allocUnsafe(t),r=t;let n=this.head,i=0;do{const s=n.data;if(!(t>s.length)){t===s.length?(o(e,s,r-t),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(e,new a(s.buffer,s.byteOffset,t),r-t),this.head=n,n.data=s.slice(t));break}o(e,s,r-t),t-=s.length,++i}while(null!==(n=n.next));return this.length-=i,e}[Symbol.for("nodejs.util.inspect.custom")](t,e){return u(this,{...e,depth:0,customInspect:!1})}}},function(t,e,r){const n=r(57),i=r(7),{isReadable:o,isWritable:a,isIterable:s,isNodeStream:u,isReadableNodeStream:c,isWritableNodeStream:l,isDuplexNodeStream:f}=r(345),h=r(378),{AbortError:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g}}=r(222),{destroyer:m}=r(489),y=r(346),b=r(680),{createDeferredPromise:v}=r(344),A=r(1268),w=globalThis.Blob||i.Blob,_="undefined"!==typeof w?function(t){return t instanceof w}:function(t){return!1},E=globalThis.AbortController||r(881).AbortController,{FunctionPrototypeCall:I}=r(164);class S extends y{constructor(t){super(t),!1===(null===t||void 0===t?void 0:t.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null===t||void 0===t?void 0:t.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function M(t){const e=t.readable&&"function"!==typeof t.readable.read?b.wrap(t.readable):t.readable,r=t.writable;let n,i,s,u,c,l=!!o(e),f=!!a(r);function p(t){const e=u;u=null,e?e(t):t&&c.destroy(t)}return c=new S({readableObjectMode:!(null===e||void 0===e||!e.readableObjectMode),writableObjectMode:!(null===r||void 0===r||!r.writableObjectMode),readable:l,writable:f}),f&&(h(r,(t=>{f=!1,t&&m(e,t),p(t)})),c._write=function(t,e,i){r.write(t,e)?i():n=i},c._final=function(t){r.end(),i=t},r.on("drain",(function(){if(n){const t=n;n=null,t()}})),r.on("finish",(function(){if(i){const t=i;i=null,t()}}))),l&&(h(e,(t=>{l=!1,t&&m(e,t),p(t)})),e.on("readable",(function(){if(s){const t=s;s=null,t()}})),e.on("end",(function(){c.push(null)})),c._read=function(){for(;;){const t=e.read();if(null===t)return void(s=c._read);if(!c.push(t))return}}),c._destroy=function(t,o){t||null===u||(t=new d),s=null,n=null,i=null,null===u?o(t):(u=o,m(r,t),m(e,t))},c}t.exports=function t(e,r){if(f(e))return e;if(c(e))return M({readable:e});if(l(e))return M({writable:e});if(u(e))return M({writable:!1,readable:!1});if("function"===typeof e){const{value:t,write:i,final:o,destroy:a}=function(t){let{promise:e,resolve:r}=v();const i=new E,o=i.signal,a=t(async function*(){for(;;){const t=e;e=null;const{chunk:i,done:a,cb:s}=await t;if(n.nextTick(s),a)return;if(o.aborted)throw new d(void 0,{cause:o.reason});({promise:e,resolve:r}=v()),yield i}}(),{signal:o});return{value:a,write(t,e,n){const i=r;r=null,i({chunk:t,done:!1,cb:n})},final(t){const e=r;r=null,e({done:!0,cb:t})},destroy(t,e){i.abort(),e(t)}}}(e);if(s(t))return A(S,t,{objectMode:!0,write:i,final:o,destroy:a});const u=null===t||void 0===t?void 0:t.then;if("function"===typeof u){let e;const r=I(u,t,(t=>{if(null!=t)throw new g("nully","body",t)}),(t=>{m(e,t)}));return e=new S({objectMode:!0,readable:!1,write:i,final(t){o((async()=>{try{await r,n.nextTick(t,null)}catch(e){n.nextTick(t,e)}}))},destroy:a})}throw new g("Iterable, AsyncIterable or AsyncFunction",r,t)}if(_(e))return t(e.arrayBuffer());if(s(e))return A(S,e,{objectMode:!0,writable:!1});if("object"===typeof(null===e||void 0===e?void 0:e.writable)||"object"===typeof(null===e||void 0===e?void 0:e.readable)){return M({readable:null!==e&&void 0!==e&&e.readable?c(null===e||void 0===e?void 0:e.readable)?null===e||void 0===e?void 0:e.readable:t(e.readable):void 0,writable:null!==e&&void 0!==e&&e.writable?l(null===e||void 0===e?void 0:e.writable)?null===e||void 0===e?void 0:e.writable:t(e.writable):void 0})}const i=null===e||void 0===e?void 0:e.then;if("function"===typeof i){let t;return I(i,e,(e=>{null!=e&&t.push(e),t.push(null)}),(e=>{m(t,e)})),t=new S({objectMode:!0,writable:!1,read(){}})}throw new p(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],e)}},function(t,e,r){"use strict";function n(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("Wrong positive integer: ".concat(t))}function i(t){if("boolean"!==typeof t)throw new Error("Expected boolean, not ".concat(t))}function o(t){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n0&&!r.includes(t.length))throw new Error("Expected Uint8Array of length ".concat(r,", not of length=").concat(t.length))}function a(t){if("function"!==typeof t||"function"!==typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(t.outputLen),n(t.blockLen)}function s(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function u(t,e){o(t);const r=e.outputLen;if(t.length1&&void 0!==arguments[1]&&arguments[1]?{h:Number(t&n),l:Number(t>>i&n)}:{h:0|Number(t>>i&n),l:0|Number(t&n)}}function a(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;iBigInt(t>>>0)<>>0);e.toBig=s;const u=(t,e,r)=>t>>>r;e.shrSH=u;const c=(t,e,r)=>t<<32-r|e>>>r;e.shrSL=c;const l=(t,e,r)=>t>>>r|e<<32-r;e.rotrSH=l;const f=(t,e,r)=>t<<32-r|e>>>r;e.rotrSL=f;const h=(t,e,r)=>t<<64-r|e>>>r-32;e.rotrBH=h;const d=(t,e,r)=>t>>>r-32|e<<64-r;e.rotrBL=d;const p=(t,e)=>e;e.rotr32H=p;const g=(t,e)=>t;e.rotr32L=g;const m=(t,e,r)=>t<>>32-r;e.rotlSH=m;const y=(t,e,r)=>e<>>32-r;e.rotlSL=y;const b=(t,e,r)=>e<>>64-r;e.rotlBH=b;const v=(t,e,r)=>t<>>64-r;function A(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:0|i}}e.rotlBL=v,e.add=A;const w=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0);e.add3L=w;const _=(t,e,r,n)=>e+r+n+(t/2**32|0)|0;e.add3H=_;const E=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0);e.add4L=E;const I=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0;e.add4H=I;const S=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0);e.add5L=S;const M=(t,e,r,n,i,o)=>e+r+n+i+o+(t/2**32|0)|0;e.add5H=M;const C={fromBig:o,split:a,toBig:s,shrSH:u,shrSL:c,rotrSH:l,rotrSL:f,rotrBH:h,rotrBL:d,rotr32H:p,rotr32L:g,rotlSH:m,rotlSL:y,rotlBH:b,rotlBL:v,add:A,add3L:w,add3H:_,add4L:E,add4H:I,add5H:M,add5L:S};e.default=C},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;const n=r(2780),i=t=>t instanceof Uint8Array;e.u8=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));e.createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);if(e.rotr=(t,e)=>t<<32-e|t>>>e,e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!e.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));e.bytesToHex=function(t){if(!i(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r{},e.asyncLoop=async function(t,r,n){let i=Date.now();for(let o=0;o=0&&tt+e.length),0));let o=0;return e.forEach((t=>{if(!i(t))throw new Error("Uint8Array expected");n.set(t,o),o+=t.length})),n};e.Hash=class{clone(){return this._cloneInto()}};const u={}.toString;e.checkOpts=function(t,e){if(void 0!==e&&"[object Object]"!==u.call(e))throw new Error("Options should be object or undefined");return Object.assign(t,e)},e.wrapConstructor=function(t){const e=e=>t().update(s(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e},e.wrapConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(s(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.wrapXOFConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(s(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.randomBytes=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(n.crypto&&"function"===typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.crypto=void 0,e.crypto="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},function(t,e,r){const n=r(490);t.exports=(t,e)=>{const r=n(t,e);return r?r.version:null}},function(t,e,r){const n=r(490);t.exports=(t,e)=>{const r=n(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null}},function(t,e,r){const n=r(211);t.exports=(t,e,r,i,o)=>{"string"===typeof r&&(o=i,i=r,r=void 0);try{return new n(t instanceof n?t.version:t,r).inc(e,i,o).version}catch(a){return null}}},function(t,e,r){const n=r(490);t.exports=(t,e)=>{const r=n(t,null,!0),i=n(e,null,!0),o=r.compare(i);if(0===o)return null;const a=o>0,s=a?r:i,u=a?i:r,c=!!s.prerelease.length;if(!!u.prerelease.length&&!c)return u.patch||u.minor?s.patch?"patch":s.minor?"minor":"major":"major";const l=c?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}},function(t,e,r){const n=r(211);t.exports=(t,e)=>new n(t,e).major},function(t,e,r){const n=r(211);t.exports=(t,e)=>new n(t,e).minor},function(t,e,r){const n=r(211);t.exports=(t,e)=>new n(t,e).patch},function(t,e,r){const n=r(490);t.exports=(t,e)=>{const r=n(t,e);return r&&r.prerelease.length?r.prerelease:null}},function(t,e,r){const n=r(277);t.exports=(t,e,r)=>n(e,t,r)},function(t,e,r){const n=r(277);t.exports=(t,e)=>n(t,e,!0)},function(t,e,r){const n=r(886);t.exports=(t,e)=>t.sort(((t,r)=>n(t,r,e)))},function(t,e,r){const n=r(886);t.exports=(t,e)=>t.sort(((t,r)=>n(r,t,e)))},function(t,e,r){const n=r(211),i=r(490),{safeRe:o,t:a}=r(573);t.exports=(t,e)=>{if(t instanceof n)return t;if("number"===typeof t&&(t=String(t)),"string"!==typeof t)return null;let r=null;if((e=e||{}).rtl){let e;for(;(e=o[a.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)r&&e.index+e[0].length===r.index+r[0].length||(r=e),o[a.COERCERTL].lastIndex=e.index+e[1].length+e[2].length;o[a.COERCERTL].lastIndex=-1}else r=t.match(o[a.COERCE]);return null===r?null:i("".concat(r[2],".").concat(r[3]||"0",".").concat(r[4]||"0"),e)}},function(t,e,r){"use strict";const n=r(2795),i=Symbol("max"),o=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),d=Symbol("updateAgeOnGet"),p=()=>1;const g=(t,e,r)=>{const n=t[h].get(e);if(n){const e=n.value;if(m(t,e)){if(b(t,n),!t[s])return}else r&&(t[d]&&(n.value.now=Date.now()),t[f].unshiftNode(n));return e.value}},m=(t,e)=>{if(!e||!e.maxAge&&!t[u])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[u]&&r>t[u]},y=t=>{if(t[o]>t[i])for(let e=t[f].tail;t[o]>t[i]&&null!==e;){const r=e.prev;b(t,e),e=r}},b=(t,e)=>{if(e){const r=e.value;t[c]&&t[c](r.key,r.value),t[o]-=r.length,t[h].delete(r.key),t[f].removeNode(e)}};class v{constructor(t,e,r,n,i){this.key=t,this.value=e,this.length=r,this.now=n,this.maxAge=i||0}}const A=(t,e,r,n)=>{let i=r.value;m(t,i)&&(b(t,r),t[s]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};t.exports=class{constructor(t){if("number"===typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!==typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[i]=t.max||1/0;const e=t.length||p;if(this[a]="function"!==typeof e?p:e,this[s]=t.stale||!1,t.maxAge&&"number"!==typeof t.maxAge)throw new TypeError("maxAge must be a number");this[u]=t.maxAge||0,this[c]=t.dispose,this[l]=t.noDisposeOnSet||!1,this[d]=t.updateAgeOnGet||!1,this.reset()}set max(t){if("number"!==typeof t||t<0)throw new TypeError("max must be a non-negative number");this[i]=t||1/0,y(this)}get max(){return this[i]}set allowStale(t){this[s]=!!t}get allowStale(){return this[s]}set maxAge(t){if("number"!==typeof t)throw new TypeError("maxAge must be a non-negative number");this[u]=t,y(this)}get maxAge(){return this[u]}set lengthCalculator(t){"function"!==typeof t&&(t=p),t!==this[a]&&(this[a]=t,this[o]=0,this[f].forEach((t=>{t.length=this[a](t.value,t.key),this[o]+=t.length}))),y(this)}get lengthCalculator(){return this[a]}get length(){return this[o]}get itemCount(){return this[f].length}rforEach(t,e){e=e||this;for(let r=this[f].tail;null!==r;){const n=r.prev;A(this,t,r,e),r=n}}forEach(t,e){e=e||this;for(let r=this[f].head;null!==r;){const n=r.next;A(this,t,r,e),r=n}}keys(){return this[f].toArray().map((t=>t.key))}values(){return this[f].toArray().map((t=>t.value))}reset(){this[c]&&this[f]&&this[f].length&&this[f].forEach((t=>this[c](t.key,t.value))),this[h]=new Map,this[f]=new n,this[o]=0}dump(){return this[f].map((t=>!m(this,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[f]}set(t,e,r){if((r=r||this[u])&&"number"!==typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,s=this[a](e,t);if(this[h].has(t)){if(s>this[i])return b(this,this[h].get(t)),!1;const a=this[h].get(t).value;return this[c]&&(this[l]||this[c](t,a.value)),a.now=n,a.maxAge=r,a.value=e,this[o]+=s-a.length,a.length=s,this.get(t),y(this),!0}const d=new v(t,e,s,n,r);return d.length>this[i]?(this[c]&&this[c](t,e),!1):(this[o]+=d.length,this[f].unshift(d),this[h].set(t,this[f].head),y(this),!0)}has(t){if(!this[h].has(t))return!1;const e=this[h].get(t).value;return!m(this,e)}get(t){return g(this,t,!0)}peek(t){return g(this,t,!1)}pop(){const t=this[f].tail;return t?(b(this,t),t.value):null}del(t){b(this,this[h].get(t))}load(t){this.reset();const e=Date.now();for(let r=t.length-1;r>=0;r--){const n=t[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const t=i-e;t>0&&this.set(n.k,n.v,t)}}}prune(){this[h].forEach(((t,e)=>g(this,e,!1)))}}},function(t,e,r){"use strict";function n(t){var e=this;if(e instanceof n||(e=new n),e.tail=null,e.head=null,e.length=0,t&&"function"===typeof t.forEach)t.forEach((function(t){e.push(t)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r1)r=e;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=t(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(t,e){var r,n=this.tail;if(arguments.length>1)r=e;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=t(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;null!==r;e++)t[e]=r.value,r=r.next;return t},n.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;null!==r;e++)t[e]=r.value,r=r.prev;return t},n.prototype.slice=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var r=new n;if(ethis.length&&(e=this.length);for(var i=0,o=this.head;null!==o&&ithis.length&&(e=this.length);for(var i=this.length,o=this.tail;null!==o&&i>e;i--)o=o.prev;for(;null!==o&&i>t;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(t,e){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,n=this.head;null!==n&&rnew n(t,e).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")))},function(t,e,r){const n=r(211),i=r(278);t.exports=(t,e,r)=>{let o=null,a=null,s=null;try{s=new i(e,r)}catch(u){return null}return t.forEach((t=>{s.test(t)&&(o&&-1!==a.compare(t)||(o=t,a=new n(o,r)))})),o}},function(t,e,r){const n=r(211),i=r(278);t.exports=(t,e,r)=>{let o=null,a=null,s=null;try{s=new i(e,r)}catch(u){return null}return t.forEach((t=>{s.test(t)&&(o&&1!==a.compare(t)||(o=t,a=new n(o,r)))})),o}},function(t,e,r){const n=r(211),i=r(278),o=r(684);t.exports=(t,e)=>{t=new i(t,e);let r=new n("0.0.0");if(t.test(r))return r;if(r=new n("0.0.0-0"),t.test(r))return r;r=null;for(let i=0;i{const e=new n(t.semver.version);switch(t.operator){case">":0===e.prerelease.length?e.patch++:e.prerelease.push(0),e.raw=e.format();case"":case">=":a&&!o(e,a)||(a=e);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: ".concat(t.operator))}})),!a||r&&!o(r,a)||(r=a)}return r&&t.test(r)?r:null}},function(t,e,r){const n=r(278);t.exports=(t,e)=>{try{return new n(t,e).range||"*"}catch(r){return null}}},function(t,e,r){const n=r(890);t.exports=(t,e,r)=>n(t,e,">",r)},function(t,e,r){const n=r(890);t.exports=(t,e,r)=>n(t,e,"<",r)},function(t,e,r){const n=r(278);t.exports=(t,e,r)=>(t=new n(t,r),e=new n(e,r),t.intersects(e,r))},function(t,e,r){const n=r(686),i=r(277);t.exports=(t,e,r)=>{const o=[];let a=null,s=null;const u=t.sort(((t,e)=>i(t,e,r)));for(const i of u){n(i,e,r)?(s=i,a||(a=i)):(s&&o.push([a,s]),s=null,a=null)}a&&o.push([a,null]);const c=[];for(const[n,i]of o)n===i?c.push(n):i||n!==u[0]?i?n===u[0]?c.push("<=".concat(i)):c.push("".concat(n," - ").concat(i)):c.push(">=".concat(n)):c.push("*");const l=c.join(" || "),f="string"===typeof e.raw?e.raw:String(e);return l.length=0.0.0-0")],c=[new i(">=0.0.0")],l=(t,e,r)=>{if(t===e)return!0;if(1===t.length&&t[0].semver===o){if(1===e.length&&e[0].semver===o)return!0;t=r.includePrerelease?u:c}if(1===e.length&&e[0].semver===o){if(r.includePrerelease)return!0;e=c}const n=new Set;let i,l,d,p,g,m,y;for(const o of t)">"===o.operator||">="===o.operator?i=f(i,o,r):"<"===o.operator||"<="===o.operator?l=h(l,o,r):n.add(o.semver);if(n.size>1)return null;if(i&&l){if(d=s(i.semver,l.semver,r),d>0)return null;if(0===d&&(">="!==i.operator||"<="!==l.operator))return null}for(const o of n){if(i&&!a(o,String(i),r))return null;if(l&&!a(o,String(l),r))return null;for(const t of e)if(!a(o,String(t),r))return!1;return!0}let b=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,v=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;b&&1===b.prerelease.length&&"<"===l.operator&&0===b.prerelease[0]&&(b=!1);for(const o of e){if(y=y||">"===o.operator||">="===o.operator,m=m||"<"===o.operator||"<="===o.operator,i)if(v&&o.semver.prerelease&&o.semver.prerelease.length&&o.semver.major===v.major&&o.semver.minor===v.minor&&o.semver.patch===v.patch&&(v=!1),">"===o.operator||">="===o.operator){if(p=f(i,o,r),p===o&&p!==i)return!1}else if(">="===i.operator&&!a(i.semver,String(o),r))return!1;if(l)if(b&&o.semver.prerelease&&o.semver.prerelease.length&&o.semver.major===b.major&&o.semver.minor===b.minor&&o.semver.patch===b.patch&&(b=!1),"<"===o.operator||"<="===o.operator){if(g=h(l,o,r),g===o&&g!==l)return!1}else if("<="===l.operator&&!a(l.semver,String(o),r))return!1;if(!o.operator&&(l||i)&&0!==d)return!1}return!(i&&m&&!l&&0!==d)&&(!(l&&y&&!i&&0!==d)&&(!v&&!b))},f=(t,e,r)=>{if(!t)return e;const n=s(t.semver,e.semver,r);return n>0?t:n<0||">"===e.operator&&">="===t.operator?e:t},h=(t,e,r)=>{if(!t)return e;const n=s(t.semver,e.semver,r);return n<0?t:n>0||"<"===e.operator&&"<="===t.operator?e:t};t.exports=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t===e)return!0;t=new n(t,r),e=new n(e,r);let i=!1;t:for(const n of t.set){for(const t of e.set){const e=l(n,t,r);if(i=i||null!==e,e)continue t}if(i)return!1}return!0}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.providerErrors=e.rpcErrors=void 0;const n=r(1273),i=r(892),o=r(891);function a(t,e){const[r,i]=u(e);return new n.JsonRpcError(t,null!==r&&void 0!==r?r:(0,o.getMessageFromCode)(t),i)}function s(t,e){const[r,i]=u(e);return new n.EthereumProviderError(t,null!==r&&void 0!==r?r:(0,o.getMessageFromCode)(t),i)}function u(t){if(t){if("string"===typeof t)return[t];if("object"===typeof t&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&"string"!==typeof e)throw new Error("Must specify string message.");return[null!==e&&void 0!==e?e:void 0,r]}}return[]}e.rpcErrors={parse:t=>a(i.errorCodes.rpc.parse,t),invalidRequest:t=>a(i.errorCodes.rpc.invalidRequest,t),invalidParams:t=>a(i.errorCodes.rpc.invalidParams,t),methodNotFound:t=>a(i.errorCodes.rpc.methodNotFound,t),internal:t=>a(i.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(e,t)},invalidInput:t=>a(i.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>a(i.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>a(i.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>a(i.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>a(i.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>a(i.errorCodes.rpc.limitExceeded,t)},e.providerErrors={userRejectedRequest:t=>s(i.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>s(i.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>s(i.errorCodes.provider.unsupportedMethod,t),disconnected:t=>s(i.errorCodes.provider.disconnected,t),chainDisconnected:t=>s(i.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:i}=t;if(!r||"string"!==typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(e,r,i)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.crypto=void 0,e.crypto="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;const n=r(2810),i=r(574),o=r(687),a=r(1279),s=r(492),u=r(2814),c=r(2815),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h=BigInt(1),d=BigInt(2),p=(t,e)=>(t+e/d)/e;function g(t){const e=l,r=BigInt(3),n=BigInt(6),i=BigInt(11),a=BigInt(22),s=BigInt(23),u=BigInt(44),c=BigInt(88),f=t*t*t%e,h=f*f*t%e,p=(0,o.pow2)(h,r,e)*h%e,g=(0,o.pow2)(p,r,e)*h%e,y=(0,o.pow2)(g,d,e)*f%e,b=(0,o.pow2)(y,i,e)*y%e,v=(0,o.pow2)(b,a,e)*b%e,A=(0,o.pow2)(v,u,e)*v%e,w=(0,o.pow2)(A,c,e)*A%e,_=(0,o.pow2)(w,u,e)*v%e,E=(0,o.pow2)(_,r,e)*h%e,I=(0,o.pow2)(E,s,e)*b%e,S=(0,o.pow2)(I,n,e)*f%e,M=(0,o.pow2)(S,d,e);if(!m.eql(m.sqr(M),t))throw new Error("Cannot find square root");return M}const m=(0,o.Field)(l,void 0,void 0,{sqrt:g});e.secp256k1=(0,c.createCurve)({a:BigInt(0),b:BigInt(7),Fp:m,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-h*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,s=BigInt("0x100000000000000000000000000000000"),u=p(a*t,e),c=p(-n*t,e);let l=(0,o.mod)(t-u*r-c*i,e),d=(0,o.mod)(-u*n-c*a,e);const g=l>s,m=d>s;if(g&&(l=e-l),m&&(d=e-d),l>s||d>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:g,k1:l,k2neg:m,k2:d}}}},n.sha256);const y=BigInt(0),b=t=>"bigint"===typeof t&&y"bigint"===typeof t&&yt.charCodeAt(0))));e=(0,s.concatBytes)(r,r),A[t]=e}for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;ot.toRawBytes(!0).slice(1),E=t=>(0,s.numberToBytesBE)(t,32),I=t=>(0,o.mod)(t,l),S=t=>(0,o.mod)(t,f),M=e.secp256k1.ProjectivePoint,C=(t,e,r)=>M.BASE.multiplyAndAddUnsafe(t,e,r);function k(t){let r=e.secp256k1.utils.normPrivateKeyToScalar(t),n=M.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:S(-r),bytes:_(n)}}function x(t){if(!b(t))throw new Error("bad x: need 0 < x < p");const e=I(t*t);let r=g(I(e*t+BigInt(7)));r%d!==y&&(r=I(-r));const n=new M(t,r,h);return n.assertValidity(),n}function B(){for(var t=arguments.length,e=new Array(t),r=0;r2&&void 0!==arguments[2]?arguments[2]:(0,i.randomBytes)(32);const n=(0,s.ensureBytes)("message",t),{bytes:o,scalar:a}=k(e),u=(0,s.ensureBytes)("auxRand",r,32),c=E(a^(0,s.bytesToNumberBE)(w("BIP0340/aux",u))),l=w("BIP0340/nonce",c,o,n),f=S((0,s.bytesToNumberBE)(l));if(f===y)throw new Error("sign failed: k is zero");const{bytes:h,scalar:d}=k(f),p=B(h,o,n),g=new Uint8Array(64);if(g.set(h,0),g.set(E(S(d+p*a)),32),!R(g,n,o))throw new Error("sign: Invalid signature produced");return g}function R(t,e,r){const n=(0,s.ensureBytes)("signature",t,64),i=(0,s.ensureBytes)("message",e),o=(0,s.ensureBytes)("publicKey",r,32);try{const t=x((0,s.bytesToNumberBE)(o)),e=(0,s.bytesToNumberBE)(n.subarray(0,32));if(!b(e))return!1;const r=(0,s.bytesToNumberBE)(n.subarray(32,64));if(!v(r))return!1;const a=B(E(e),_(t),i),u=C(t,r,S(-a));return!(!u||!u.hasEvenY()||u.toAffine().x!==e)}catch(a){return!1}}e.schnorr={getPublicKey:O,sign:T,verify:R,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:x,pointToBytes:_,numberToBytesBE:s.numberToBytesBE,bytesToNumberBE:s.bytesToNumberBE,taggedHash:w,mod:o.mod}};const P=(()=>(0,u.isogenyMap)(m,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((t=>t.map((t=>BigInt(t)))))))(),N=(()=>(0,a.mapToCurveSimpleSWU)(m,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:m.create(BigInt("-11"))}))(),j=(()=>(0,u.createHasher)(e.secp256k1.ProjectivePoint,(t=>{const{x:e,y:r}=N(m.create(t[0]));return P(e,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:m.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}))();e.hashToCurve=j.hashToCurve,e.encodeToCurve=j.encodeToCurve},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sha224=e.sha256=void 0;const n=r(2811),i=r(574),o=(t,e,r)=>t&e^t&r^e&r,a=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[t,e,r,n,i,o,a,s]}set(t,e,r,n,i,o,a,s){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(t,e){for(let i=0;i<16;i++,e+=4)u[i]=t.getUint32(e,!1);for(let o=16;o<64;o++){const t=u[o-15],e=u[o-2],r=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,n=(0,i.rotr)(e,17)^(0,i.rotr)(e,19)^e>>>10;u[o]=n+u[o-7]+r+u[o-16]|0}let{A:r,B:n,C:s,D:c,E:l,F:f,G:h,H:d}=this;for(let g=0;g<64;g++){const t=d+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&f^~p&h)+a[g]+u[g]|0,e=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,s)|0;d=h,h=f,f=l,l=c+t|0,c=s,s=n,n=r,r=t+e|0}var p;r=r+this.A|0,n=n+this.B|0,s=s+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,h=h+this.G|0,d=d+this.H|0,this.set(r,n,s,c,l,f,h,d)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}e.sha256=(0,i.wrapConstructor)((()=>new c)),e.sha224=(0,i.wrapConstructor)((()=>new l))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHA2=void 0;const n=r(1278),i=r(574);class o extends i.Hash{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.createView)(this.buffer)}update(t){n.default.exists(this);const{view:e,buffer:r,blockLen:o}=this,a=(t=(0,i.toBytes)(t)).length;for(let n=0;no-s&&(this.process(r,0),s=0);for(let n=s;n>i&o),s=Number(r&o),u=n?4:0,c=n?0:4;t.setUint32(e+u,a,n),t.setUint32(e+c,s,n)}(r,o-8,BigInt(8*this.length),a),this.process(r,0);const u=(0,i.createView)(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let n=0;n{const r=e.negate();return t?r:e},n=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:r,unsafeLadder(e,r){let n=t.ZERO,i=e;for(;r>o;)r&a&&(n=n.add(i)),i=i.double(),r>>=a;return n},precomputeWindow(t,e){const{windows:r,windowSize:i}=n(e),o=[];let a=t,s=a;for(let n=0;n>=d,n>u&&(n-=h,o+=a);const s=e,p=e+Math.abs(n)-1,g=t%2!==0,m=n<0;0===n?l=l.add(r(g,i[s])):c=c.add(r(m,i[p]))}return{p:c,f:l}},wNAFCached(t,e,r,n){const i=t._WINDOW_SIZE||1;let o=e.get(t);return o||(o=this.precomputeWindow(t,i),1!==i&&e.set(t,n(o))),this.wNAF(i,o,r)}}},e.validateBasic=function(t){return(0,n.validateField)(t.Fp),(0,i.validateObject)(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createHasher=e.isogenyMap=e.hash_to_field=e.expand_message_xof=e.expand_message_xmd=void 0;const n=r(687),i=r(492);const o=i.bytesToNumberBE;function a(t,e){if(t<0||t>=1<<8*e)throw new Error("bad I2OSP call: value=".concat(t," length=").concat(e));const r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=255&t,t>>>=8;return new Uint8Array(r)}function s(t,e){const r=new Uint8Array(t.length);for(let n=0;n255&&(e=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),e)));const{outputLen:o,blockLen:l}=n,f=Math.ceil(r/o);if(f>255)throw new Error("Invalid xmd length");const h=(0,i.concatBytes)(e,a(e.length,1)),d=a(0,l),p=a(r,2),g=new Array(f),m=n((0,i.concatBytes)(d,t,p,a(0,1),h));g[0]=n((0,i.concatBytes)(m,a(1,1),h));for(let u=1;u<=f;u++){const t=[s(m,g[u-1]),a(u+1,1),h];g[u]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...g).slice(0,r)}function f(t,e,r,n,o){if(u(t),u(e),c(r),e.length>255){const t=Math.ceil(2*n/8);e=o.create({dkLen:t}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(e).digest()}if(r>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(t).update(a(r,2)).update(e).update(a(e.length,1)).digest()}function h(t,e,r){(0,i.validateObject)(r,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:a,k:s,m:h,hash:d,expand:p,DST:g}=r;u(t),c(e);const m=function(t){if(t instanceof Uint8Array)return t;if("string"===typeof t)return(0,i.utf8ToBytes)(t);throw new Error("DST must be Uint8Array or string")}(g),y=a.toString(2).length,b=Math.ceil((y+s)/8),v=e*h*b;let A;if("xmd"===p)A=l(t,m,v,d);else if("xof"===p)A=f(t,m,v,s,d);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');A=t}const w=new Array(e);for(let i=0;iArray.from(t).reverse()));return(e,n)=>{const[i,o,a,s]=r.map((r=>r.reduce(((r,n)=>t.add(t.mul(r,e),n)))));return e=t.div(i,o),n=t.mul(n,t.div(a,s)),{x:e,y:n}}},e.createHasher=function(t,e,r){if("function"!==typeof e)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=h(n,2,{...r,DST:r.DST,...i}),a=t.fromAffine(e(o[0])),s=t.fromAffine(e(o[1])),u=a.add(s).clearCofactor();return u.assertValidity(),u},encodeToCurve(n,i){const o=h(n,1,{...r,DST:r.encodeDST,...i}),a=t.fromAffine(e(o[0])).clearCofactor();return a.assertValidity(),a}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCurve=e.getHash=void 0;const n=r(2816),i=r(574),o=r(1279);function a(t){return{hash:t,hmac:function(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a(0,o.weierstrass)({...t,...a(e)});return Object.freeze({...r(e),create:r})}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const n=r(1278),i=r(574);class o extends i.Hash{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,n.default.hash(t);const r=(0,i.toBytes)(e);if(this.iHash=t.create(),"function"!==typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,a=new Uint8Array(o);a.set(r.length>o?t.create().update(r).digest():r);for(let n=0;nnew o(t,e).update(r).digest(),e.hmac.create=(t,e)=>new o(t,e)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shake256=e.shake128=e.keccak_512=e.keccak_384=e.keccak_256=e.keccak_224=e.sha3_512=e.sha3_384=e.sha3_256=e.sha3_224=e.Keccak=e.keccakP=void 0;const n=r(893),i=r(2818),o=r(491),[a,s,u]=[[],[],[]],c=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(7),d=BigInt(256),p=BigInt(113);for(let E=0,I=l,S=1,M=0;E<24;E++){[S,M]=[M,(2*S+3*M)%5],a.push(2*(5*M+S)),s.push((E+1)*(E+2)/2%64);let t=c;for(let e=0;e<7;e++)I=(I<>h)*p)%d,I&f&&(t^=l<<(l<r>32?i.default.rotlBH(t,e,r):i.default.rotlSH(t,e,r),b=(t,e,r)=>r>32?i.default.rotlBL(t,e,r):i.default.rotlSL(t,e,r);function v(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24;const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let n=0;n<10;n++)r[n]=t[n]^t[n+10]^t[n+20]^t[n+30]^t[n+40];for(let n=0;n<10;n+=2){const e=(n+8)%10,i=(n+2)%10,o=r[i],a=r[i+1],s=y(o,a,1)^r[e],u=b(o,a,1)^r[e+1];for(let r=0;r<50;r+=10)t[n+r]^=s,t[n+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r<24;r++){const n=s[r],o=y(e,i,n),u=b(e,i,n),c=a[r];e=t[c],i=t[c+1],t[c]=o,t[c+1]=u}for(let n=0;n<50;n+=10){for(let e=0;e<10;e++)r[e]=t[n+e];for(let e=0;e<10;e++)t[n+e]^=~r[(e+2)%10]&r[(e+4)%10]}t[0]^=g[n],t[1]^=m[n]}r.fill(0)}e.keccakP=v;class A extends o.Hash{constructor(t,e,r){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,n.default.number(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){n.default.exists(this);const{blockLen:e,state:r}=this,i=(t=(0,o.toBytes)(t)).length;for(let n=0;n=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return n.default.number(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(n.default.output(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new A(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}e.Keccak=A;const w=(t,e,r)=>(0,o.wrapConstructor)((()=>new A(e,t,r)));e.sha3_224=w(6,144,28),e.sha3_256=w(6,136,32),e.sha3_384=w(6,104,48),e.sha3_512=w(6,72,64),e.keccak_224=w(1,144,28),e.keccak_256=w(1,136,32),e.keccak_384=w(1,104,48),e.keccak_512=w(1,72,64);const _=(t,e,r)=>(0,o.wrapXOFConstructorWithOpts)((function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new A(e,t,void 0===n.dkLen?r:n.dkLen,!0)}));e.shake128=_(31,168,16),e.shake256=_(31,136,32)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.add=e.toBig=e.split=e.fromBig=void 0;const n=BigInt(2**32-1),i=BigInt(32);function o(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(t&n),l:Number(t>>i&n)}:{h:0|Number(t>>i&n),l:0|Number(t&n)}}function a(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;iBigInt(t>>>0)<>>0);function s(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:0|i}}e.add=s;const u={fromBig:o,split:a,toBig:e.toBig,shrSH:(t,e,r)=>t>>>r,shrSL:(t,e,r)=>t<<32-r|e>>>r,rotrSH:(t,e,r)=>t>>>r|e<<32-r,rotrSL:(t,e,r)=>t<<32-r|e>>>r,rotrBH:(t,e,r)=>t<<64-r|e>>>r-32,rotrBL:(t,e,r)=>t>>>r-32|e<<64-r,rotr32H:(t,e)=>e,rotr32L:(t,e)=>t,rotlSH:(t,e,r)=>t<>>32-r,rotlSL:(t,e,r)=>e<>>32-r,rotlBH:(t,e,r)=>e<>>64-r,rotlBL:(t,e,r)=>t<>>64-r,add:s,add3L:(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),add3H:(t,e,r,n)=>e+r+n+(t/2**32|0)|0,add4L:(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),add4H:(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,add5H:(t,e,r,n,i,o)=>e+r+n+i+o+(t/2**32|0)|0,add5L:(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0)};e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sha224=e.sha256=void 0;const n=r(2820),i=r(491),o=(t,e,r)=>t&e^t&r^e&r,a=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[t,e,r,n,i,o,a,s]}set(t,e,r,n,i,o,a,s){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(t,e){for(let i=0;i<16;i++,e+=4)u[i]=t.getUint32(e,!1);for(let o=16;o<64;o++){const t=u[o-15],e=u[o-2],r=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,n=(0,i.rotr)(e,17)^(0,i.rotr)(e,19)^e>>>10;u[o]=n+u[o-7]+r+u[o-16]|0}let{A:r,B:n,C:s,D:c,E:l,F:f,G:h,H:d}=this;for(let g=0;g<64;g++){const t=d+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&f^~p&h)+a[g]+u[g]|0,e=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,s)|0;d=h,h=f,f=l,l=c+t|0,c=s,s=n,n=r,r=t+e|0}var p;r=r+this.A|0,n=n+this.B|0,s=s+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,h=h+this.G|0,d=d+this.H|0,this.set(r,n,s,c,l,f,h,d)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}e.sha256=(0,i.wrapConstructor)((()=>new c)),e.sha224=(0,i.wrapConstructor)((()=>new l))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHA2=void 0;const n=r(893),i=r(491);class o extends i.Hash{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.createView)(this.buffer)}update(t){n.default.exists(this);const{view:e,buffer:r,blockLen:o}=this,a=(t=(0,i.toBytes)(t)).length;for(let n=0;no-s&&(this.process(r,0),s=0);for(let n=s;n>i&o),s=Number(r&o),u=n?4:0,c=n?0:4;t.setUint32(e+u,a,n),t.setUint32(e+c,s,n)}(r,o-8,BigInt(8*this.length),a),this.process(r,0);const u=(0,i.createView)(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let n=0;n0||t._addEL.internal.length>0}function h(t,e,r){t._addEL[e].push(r),function(t){if(!t._iL&&f(t)){var e=function(e){t._addEL[e.type].forEach((function(r){var n=1e5,i=r.time-n;(e.time>=i||"server"===t.method.type)&&r.fn(e.data)}))},r=t.method.microSeconds();t._prepP?t._prepP.then((function(){t._iL=!0,t.method.onMessage(t._state,e,r)})):(t._iL=!0,t.method.onMessage(t._state,e,r))}}(t)}function d(t,e,r){t._addEL[e]=t._addEL[e].filter((function(t){return t!==r})),function(t){if(t._iL&&!f(t)){t._iL=!1;var e=t.method.microSeconds();t.method.onMessage(t._state,null,e)}}(t)}e.BroadcastChannel=c,c._pubkey=!0,c.prototype={postMessage:function(t){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(t));return l(this,"message",t)},postInternal:function(t){return l(this,"internal",t)},set onmessage(t){var e={time:this.method.microSeconds(),fn:t};d(this,"message",this._onML),t&&"function"===typeof t?(this._onML=e,h(this,"message",e)):this._onML=null},addEventListener:function(t,e){h(this,t,{time:this.method.microSeconds(),fn:e})},removeEventListener:function(t,e){d(this,t,this._addEL[t].find((function(t){return t.fn===e})))},close:function(){var t=this;if(!this.closed){a.delete(this),this.closed=!0;var e=this._prepP?this._prepP:n.PROMISE_RESOLVED_VOID;return this._onML=null,this._addEL.message=[],e.then((function(){return Promise.all(Array.from(t._uMP))})).then((function(){return Promise.all(t._befC.map((function(t){return t()})))})).then((function(){return t.method.close(t._state)}))}},get type(){return this.method.type},get isClosed(){return this.closed}}},function(t,e,r){"use strict";var n=r(894);Object.defineProperty(e,"__esModule",{value:!0}),e.chooseMethod=function(t){var e=[].concat(t.methods,c).filter(Boolean);if(t.type){if("simulate"===t.type)return u.default;var r=e.find((function(e){return e.type===t.type}));if(r)return r;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter((function(t){return"idb"!==t.type})));var n=e.find((function(e){return e.canBeUsed(t)}));if(n)return n;throw new Error("No useable method found in "+JSON.stringify(c.map((function(t){return t.type}))))};var i=n(r(2824)),o=n(r(2825)),a=n(r(2826)),s=n(r(2827)),u=n(r(2835)),c=[i.default,o.default,a.default,s.default]},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.averageResponseTime=f,e.canBeUsed=l,e.close=s,e.create=a,e.microSeconds=e.default=void 0,e.onMessage=c,e.postMessage=u,e.type=void 0;var n=r(424),i=n.microSeconds;e.microSeconds=i;var o="native";function a(t){var e={messagesCallback:null,bc:new BroadcastChannel(t),subFns:[]};return e.bc.onmessage=function(t){e.messagesCallback&&e.messagesCallback(t.data)},e}function s(t){t.bc.close(),t.subFns=[]}function u(t,e){try{return t.bc.postMessage(e,!1),n.PROMISE_RESOLVED_VOID}catch(r){return Promise.reject(r)}}function c(t,e){t.messagesCallback=e}function l(t){if("undefined"===typeof window)return!1;if(!t.support3PC)return!1;if("function"===typeof BroadcastChannel){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}return!1}function f(){return 150}e.type=o;var h={create:a,close:s,onMessage:c,postMessage:u,canBeUsed:l,type:o,averageResponseTime:f,microSeconds:i};e.default=h},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TRANSACTION_SETTINGS=void 0,e.averageResponseTime=S,e.canBeUsed=I,e.cleanOldMessages=y,e.close=w,e.commitIndexedDBTransaction=f,e.create=b,e.createDatabase=h,e.default=void 0,e.getAllMessages=function(t){var e=t.transaction(u,"readonly",c),r=e.objectStore(u),n=[];return new Promise((function(t){r.openCursor().onsuccess=function(r){var i=r.target.result;i?(n.push(i.value),i.continue()):(f(e),t(n))}}))},e.getIdb=l,e.getMessagesHigherThan=p,e.getOldMessages=m,e.microSeconds=void 0,e.onMessage=E,e.postMessage=_,e.removeMessagesById=g,e.type=void 0,e.writeMessage=d;var n=r(424),i=r(895),o=r(688),a=n.microSeconds;e.microSeconds=a;var s="pubkey.broadcast-channel-0-",u="messages",c={durability:"relaxed"};e.TRANSACTION_SETTINGS=c;function l(){if("undefined"!==typeof indexedDB)return indexedDB;if("undefined"!==typeof window){if("undefined"!==typeof window.mozIndexedDB)return window.mozIndexedDB;if("undefined"!==typeof window.webkitIndexedDB)return window.webkitIndexedDB;if("undefined"!==typeof window.msIndexedDB)return window.msIndexedDB}return!1}function f(t){t.commit&&t.commit()}function h(t){var e=l(),r=s+t,n=e.open(r);return n.onupgradeneeded=function(t){t.target.result.createObjectStore(u,{keyPath:"id",autoIncrement:!0})},new Promise((function(t,e){n.onerror=function(t){return e(t)},n.onsuccess=function(){t(n.result)}}))}function d(t,e,r){var n={uuid:e,time:(new Date).getTime(),data:r},i=t.transaction([u],"readwrite",c);return new Promise((function(t,e){i.oncomplete=function(){return t()},i.onerror=function(t){return e(t)},i.objectStore(u).add(n),f(i)}))}function p(t,e){var r=t.transaction(u,"readonly",c),n=r.objectStore(u),i=[],o=IDBKeyRange.bound(e+1,1/0);if(n.getAll){var a=n.getAll(o);return new Promise((function(t,e){a.onerror=function(t){return e(t)},a.onsuccess=function(e){t(e.target.result)}}))}return new Promise((function(t,a){var s=function(){try{return o=IDBKeyRange.bound(e+1,1/0),n.openCursor(o)}catch(t){return n.openCursor()}}();s.onerror=function(t){return a(t)},s.onsuccess=function(n){var o=n.target.result;o?o.value.idt.lastCursorId&&(t.lastCursorId=e.id),e})).filter((function(e){return function(t,e){return t.uuid!==e.uuid&&!e.eMIs.has(t.id)&&!(t.data.time=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;T(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},r}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void r(c)}s.done?e(u):Promise.resolve(u).then(n,i)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,u,"next",t)}function u(t){r(a,i,o,s,u,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";e.parse=r(2833),e.stringify=r(2834)},function(t,e,r){"use strict";var n,i,o,a={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function s(t){throw{name:"SyntaxError",message:t,at:n,text:o}}function u(t){return t&&t!==i&&s("Expected '"+t+"' instead of '"+i+"'"),i=o.charAt(n),n+=1,i}function c(){var t,e="";for("-"===i&&(e="-",u("-"));i>="0"&&i<="9";)e+=i,u();if("."===i)for(e+=".";u()&&i>="0"&&i<="9";)e+=i;if("e"===i||"E"===i)for(e+=i,u(),"-"!==i&&"+"!==i||(e+=i,u());i>="0"&&i<="9";)e+=i,u();return t=Number(e),isFinite(t)||s("Bad number"),t}function l(){var t,e,r,n="";if('"'===i)for(;u();){if('"'===i)return u(),n;if("\\"===i)if(u(),"u"===i){for(r=0,e=0;e<4&&(t=parseInt(u(),16),isFinite(t));e+=1)r=16*r+t;n+=String.fromCharCode(r)}else{if("string"!==typeof a[i])break;n+=a[i]}else n+=i}s("Bad string")}function f(){for(;i&&i<=" ";)u()}function h(){switch(f(),i){case"{":return function(){var t,e={};if("{"===i){if(u("{"),f(),"}"===i)return u("}"),e;for(;i;){if(t=l(),f(),u(":"),Object.prototype.hasOwnProperty.call(e,t)&&s('Duplicate key "'+t+'"'),e[t]=h(),f(),"}"===i)return u("}"),e;u(","),f()}}s("Bad object")}();case"[":return function(){var t=[];if("["===i){if(u("["),f(),"]"===i)return u("]"),t;for(;i;){if(t.push(h()),f(),"]"===i)return u("]"),t;u(","),f()}}s("Bad array")}();case'"':return l();case"-":return c();default:return i>="0"&&i<="9"?c():function(){switch(i){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null;default:s("Unexpected '"+i+"'")}}()}}t.exports=function(t,e){var r;return o=t,n=0,i=" ",r=h(),f(),i&&s("Syntax error"),"function"===typeof e?function t(r,n){var i,o,a=r[n];if(a&&"object"===typeof a)for(i in h)Object.prototype.hasOwnProperty.call(a,i)&&("undefined"===typeof(o=t(a,i))?delete a[i]:a[i]=o);return e.call(r,n,a)}({"":r},""):r}},function(t,e,r){"use strict";var n,i,o,a=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function u(t){return a.lastIndex=0,a.test(t)?'"'+t.replace(a,(function(t){var e=s[t];return"string"===typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function c(t,e){var r,a,s,l,f,h=n,d=e[t];switch(d&&"object"===typeof d&&"function"===typeof d.toJSON&&(d=d.toJSON(t)),"function"===typeof o&&(d=o.call(e,t,d)),typeof d){case"string":return u(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(n+=i,f=[],"[object Array]"===Object.prototype.toString.apply(d)){for(l=d.length,r=0;rt.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return t.slice(e,r)}function o(t){if(0===t[0])throw new Error("invalid RLP: extra zeros");return f(l(t))}function a(t,e){if(t<56)return Uint8Array.from([t+e]);const r=g(t),n=g(e+55+r.length/2);return Uint8Array.from(h(n+r))}function s(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("undefined"===typeof t||null===t||0===t.length)return Uint8Array.from([]);const r=u(y(t));if(e)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}function u(t){let e,r,n,a,s;const c=[],l=t[0];if(l<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(l<=183){if(e=l-127,n=128===l?Uint8Array.from([]):i(t,1,e),2===e&&n[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:n,remainder:t.slice(e)}}if(l<=191){if(r=l-182,t.length-1t.length)throw new Error("invalid RLP: total length is larger than the data");for(a=i(t,r,n);a.length;)s=u(a),c.push(s.data),a=s.remainder;return{data:c,remainder:t.slice(n)}}}Object.defineProperty(e,"__esModule",{value:!0}),e.RLP=e.utils=e.decode=e.encode=void 0,e.encode=n,e.decode=s;const c=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function l(t){let e="";for(let r=0;rt+e.length),0),i=new Uint8Array(n);for(let o=0,a=0;o=2&&"0"===t[0]&&"x"===t[1]}function y(t){if(t instanceof Uint8Array)return t;if("string"===typeof t)return m(t)?h((e="string"!==typeof(r=t)?r:m(r)?r.slice(2):r).length%2?"0".concat(e):e):p(t);var e,r;if("number"===typeof t||"bigint"===typeof t)return t?h(g(t)):Uint8Array.from([]);if(null===t||void 0===t)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof t)}e.utils={bytesToHex:l,concatBytes:d,hexToBytes:h,utf8ToBytes:p},e.RLP={encode:n,decode:s}},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.Withdrawal=void 0;const n=r(1281),i=r(493),o=r(1282);class a{constructor(t,e,r,n){this.index=t,this.validatorIndex=e,this.address=r,this.amount=n}static fromWithdrawalData(t){const{index:e,validatorIndex:r,address:i,amount:s}=t,u=(0,o.toType)(e,o.TypeOutput.BigInt),c=(0,o.toType)(r,o.TypeOutput.BigInt),l=new n.Address((0,o.toType)(i,o.TypeOutput.Buffer)),f=(0,o.toType)(s,o.TypeOutput.BigInt);return new a(u,c,l,f)}static fromValuesArray(t){if(4!==t.length)throw Error("Invalid withdrawalArray length expected=4 actual=".concat(t.length));const[e,r,n,i]=t;return a.fromWithdrawalData({index:e,validatorIndex:r,address:n,amount:i})}static toBufferArray(e){const{index:r,validatorIndex:i,address:a,amount:s}=e,u=(0,o.toType)(r,o.TypeOutput.BigInt)===BigInt(0)?t.alloc(0):(0,o.toType)(r,o.TypeOutput.Buffer),c=(0,o.toType)(i,o.TypeOutput.BigInt)===BigInt(0)?t.alloc(0):(0,o.toType)(i,o.TypeOutput.Buffer);let l;l=a instanceof n.Address?a.buf:(0,o.toType)(a,o.TypeOutput.Buffer);return[u,c,l,(0,o.toType)(s,o.TypeOutput.BigInt)===BigInt(0)?t.alloc(0):(0,o.toType)(s,o.TypeOutput.Buffer)]}raw(){return a.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,i.bigIntToHex)(this.index),validatorIndex:(0,i.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,i.bigIntToHex)(this.amount)}}}e.Withdrawal=a}).call(this,r(7).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.hashPersonalMessage=e.isValidSignature=e.fromRpcSig=e.toCompactSig=e.toRpcSig=e.ecrecover=e.ecsign=void 0;const n=r(158),i=r(202),o=r(493),a=r(898),s=r(899);function u(t,e){return t===BigInt(0)||t===BigInt(1)?t:void 0===e?t-BigInt(27):t-(e*BigInt(2)+BigInt(35))}function c(t){return t===BigInt(0)||t===BigInt(1)}e.ecsign=function(e,r,n){const o=i.secp256k1.sign(e,r),a=o.toCompactRawBytes();return{r:t.from(a.slice(0,32)),s:t.from(a.slice(32,64)),v:void 0===n?BigInt(o.recovery+27):BigInt(o.recovery+35)+BigInt(n)*BigInt(2)}};e.ecrecover=function(e,r,n,a,s){const l=t.concat([(0,o.setLengthLeft)(n,32),(0,o.setLengthLeft)(a,32)],64),f=u(r,s);if(!c(f))throw new Error("Invalid signature v value");const h=i.secp256k1.Signature.fromCompact(l).addRecoveryBit(Number(f)).recoverPublicKey(e);return t.from(h.toRawBytes(!1).slice(1))};e.toRpcSig=function(e,r,n,i){if(!c(u(e,i)))throw new Error("Invalid signature v value");return(0,o.bufferToHex)(t.concat([(0,o.setLengthLeft)(r,32),(0,o.setLengthLeft)(n,32),(0,o.toBuffer)(e)]))};e.toCompactSig=function(e,r,n,i){if(!c(u(e,i)))throw new Error("Invalid signature v value");let a=n;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(a=t.from(n),a[0]|=128),(0,o.bufferToHex)(t.concat([(0,o.setLengthLeft)(r,32),(0,o.setLengthLeft)(a,32)]))};e.fromRpcSig=function(t){const e=(0,o.toBuffer)(t);let r,n,i;if(e.length>=65)r=e.slice(0,32),n=e.slice(32,64),i=(0,o.bufferToBigInt)(e.slice(64));else{if(64!==e.length)throw new Error("Invalid signature length");r=e.slice(0,32),n=e.slice(32,64),i=BigInt((0,o.bufferToInt)(e.slice(32,33))>>7),n[0]&=127}return i<27&&(i+=BigInt(27)),{v:i,r:r,s:n}};e.isValidSignature=function(t,e,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4?arguments[4]:void 0;if(32!==e.length||32!==r.length)return!1;if(!c(u(t,i)))return!1;const s=(0,o.bufferToBigInt)(e),l=(0,o.bufferToBigInt)(r);return!(s===BigInt(0)||s>=a.SECP256K1_ORDER||l===BigInt(0)||l>=a.SECP256K1_ORDER)&&!(n&&l>=a.SECP256K1_ORDER_DIV_2)};e.hashPersonalMessage=function(e){(0,s.assertIsBuffer)(e);const r=t.from("\x19Ethereum Signed Message:\n".concat(e.length),"utf-8");return t.from((0,n.keccak256)(t.concat([r,e])))}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compactBytesToNibbles=e.bytesToNibbles=e.nibblesToCompactBytes=e.nibblesToBytes=e.hasTerminator=void 0;e.hasTerminator=t=>t.length>0&&16===t[t.length-1];e.nibblesToBytes=(t,e)=>{for(let r=0,n=0;n{let r=0;(0,e.hasTerminator)(t)&&(r=1,t=t.subarray(0,t.length-1));const n=new Uint8Array(t.length/2+1);return n[0]=r<<5,1===(1&t.length)&&(n[0]|=16,n[0]|=t[0],t=t.subarray(1)),(0,e.nibblesToBytes)(t,n.subarray(1)),n};e.bytesToNibbles=t=>{const e=2*t.length+1,r=new Uint8Array(e);for(let n=0;n{if(0===t.length)return t;let r=(0,e.bytesToNibbles)(t);r[0]<2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncEventEmitter=void 0;const n=r(61);class i extends n.EventEmitter{emit(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{o.call(t,r,(t=>{t?n(t):e()}))}))}catch(i){n=i}if(n)throw n}(s,u.slice(),o).then(a).catch(a),s.listenerCount(t)>0}once(t,e){const r=this;let n;if("function"!==typeof e)throw new TypeError("listener must be a function");return n=e.length>=2?function(i,o){r.removeListener(t,n),e(i,o)}:function(i){r.removeListener(t,n),e(i,n)},r.on(t,n),r}first(t,e){var r;let n=null!==(r=this._events[t])&&void 0!==r?r:[];if("function"!==typeof e)throw new TypeError("listener must be a function");return Array.isArray(n)||(this._events[t]=n=[n]),n.unshift(e),this}before(t,e,r){return this.beforeOrAfter(t,e,r)}after(t,e,r){return this.beforeOrAfter(t,e,r,"after")}beforeOrAfter(t,e,r,n){var i;let o,a,s=null!==(i=this._events[t])&&void 0!==i?i:[];const u="after"===n?1:0;if("function"!==typeof r)throw new TypeError("listener must be a function");if("function"!==typeof e)throw new TypeError("target must be a function");for(Array.isArray(s)||(this._events[t]=s=[s]),a=s.length,o=s.length;o--;)if(s[o]===e){a=o+u;break}return s.splice(a,0,r),this}on(t,e){return super.on(t,e)}addListener(t,e){return super.addListener(t,e)}prependListener(t,e){return super.prependListener(t,e)}prependOnceListener(t,e){return super.prependOnceListener(t,e)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,e){return super.removeListener(t,e)}eventNames(){return super.eventNames()}listeners(t){return super.listeners(t)}listenerCount(t){return super.listenerCount(t)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(t){return super.setMaxListeners(t)}}e.AsyncEventEmitter=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lock=void 0;e.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((t=>this.promiseResolverQueue.push(t)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const t=this.promiseResolverQueue.shift();t&&t(!0)}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getProvider=e.fetchFromProvider=void 0;const n=r(2845);e.fetchFromProvider=async(t,e)=>(await(0,n.default)(t,{headers:{"content-type":"application/json"},type:"json",data:{method:e.method,params:e.params,jsonrpc:"2.0",id:1}})).result;e.getProvider=t=>{var e;if("string"===typeof t)return t;if(void 0!==(null===t||void 0===t||null===(e=t.connection)||void 0===e?void 0:e.url))return t.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},function(t,e,r){"use strict";(function(t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidStatusCodeError=e.InvalidCertError=void 0;const i=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class o extends Error{constructor(t,e){super(t),this.fingerprint256=e}}e.InvalidCertError=o;class a extends Error{constructor(t){super("Request Failed. Status Code: ".concat(t)),this.statusCode=t}}function s(t,e){if(!e||"text"===e||"json"===e)try{let n=new TextDecoder("utf8",{fatal:!0}).decode(t);if("text"===e)return n;try{return JSON.parse(n)}catch(r){if("json"===e)throw r;return n}}catch(r){if("text"===e||"json"===e)throw r}return t}e.InvalidStatusCodeError=a;let u={};function c(e,n){let l={...i,...n};const f=r(566),h=r(387),d=r(2846),{promisify:p}=r(464),{resolve:g}=r(336),m=!!/^https/.test(e);let y={method:l.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const b=t=>t.replace(/:| /g,"").toLowerCase();if(l.keepAlive){var v;const t={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},e=[m,m&&(null===(v=l.sslPinnedCertificates)||void 0===v?void 0:v.map((t=>b(t))).sort())].join();y.agent=u[e]||(u[e]=new(m?h:f).Agent(t))}"json"===l.type&&(y.headers["Content-Type"]="application/json"),l.data&&(l.method||(y.method="POST"),y.body="json"===l.type?JSON.stringify(l.data):l.data),y.headers={...y.headers,...l.headers},l.sslAllowSelfSigned&&(y.rejectUnauthorized=!1);return new Promise(((r,n)=>{var i;const u=async t=>{if(t&&"DEPTH_ZERO_SELF_SIGNED_CERT"===t.code)try{await c(e,{...l,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(r){r&&r.fingerprint256&&(t=new o("Self-signed SSL certificate: ".concat(r.fingerprint256),r.fingerprint256))}n(t)},v=(m?h:f).request(e,y,(i=>{i.on("error",u),(async()=>{try{r(await(async r=>{const n=r.statusCode;if(l.redirect&&300<=n&&n<400&&r.headers.location){if(10==l._redirectCount)throw new Error("Request failed. Too much redirects.");return l._redirectCount+=1,await c(g(e,r.headers.location),l)}if(l.expectStatusCode&&n!==l.expectStatusCode)throw r.resume(),new a(n);let i=[];for await(const t of r)i.push(t);let o=t.concat(i);const u=r.headers["content-encoding"];"br"===u&&(o=await p(d.brotliDecompress)(o)),"gzip"!==u&&"deflate"!==u||(o=await p(d.unzip)(o));const f=s(o,l.type);return l.full?{headers:r.headers,status:n,body:f}:f})(i))}catch(o){n(o)}})()}));v.on("error",u);const A=null===(i=l.sslPinnedCertificates)||void 0===i?void 0:i.map((t=>b(t))),w=t=>{var e;const r=b((null===(e=t.getPeerCertificate())||void 0===e?void 0:e.fingerprint256)||"");if((r||!t.isSessionReused())&&!A.includes(r))return v.emit("error",new o("Invalid SSL certificate: ".concat(r," Expected: ").concat(A),r)),v.abort()};l.sslPinnedCertificates&&v.on("socket",(t=>{t.listeners("secureConnect").map((t=>(t.name||"").replace("bound ",""))).includes("mfetchSecureConnect")||t.on("secureConnect",w.bind(null,t))})),l.keepAlive&&v.setNoDelay(!0),y.body&&v.write(y.body),v.end()}))}const l=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map((t=>t.toLowerCase()))),f=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map((t=>t.toLowerCase())));async function h(t,e){let r={...i,...e};const n=new Headers;"json"===r.type&&n.set("Content-Type","application/json");let o=new URL(t);if(o.username){const t=btoa("".concat(o.username,":").concat(o.password));n.set("Authorization","Basic ".concat(t)),o.username="",o.password=""}t=""+o;for(let i in r.headers){const t=i.toLowerCase();(l.has(t)||r.cors&&!f.has(t))&&n.set(i,r.headers[i])}let u={headers:n,redirect:r.redirect?"follow":"manual"};r.referrer||(u.referrerPolicy="no-referrer"),r.cors&&(u.mode="cors"),r.data&&(r.method||(u.method="POST"),u.body="json"===r.type?JSON.stringify(r.data):r.data);const c=await fetch(t,u);if(r.expectStatusCode&&c.status!==r.expectStatusCode)throw new a(c.status);const h=s(new Uint8Array(await c.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(c.headers.entries()),status:c.status,body:h}:h}const d=!!("object"==typeof n&&n.versions&&n.versions.node&&n.versions.v8);e.default=function(t,e){return(d?c:h)(t,e)}}).call(this,r(7).Buffer,r(57))},function(t,e,r){"use strict";(function(t){var n=r(7).Buffer,i=r(793).Transform,o=r(2847),a=r(464),s=r(48).ok,u=r(7).kMaxLength,c="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";o.Z_MIN_WINDOWBITS=8,o.Z_MAX_WINDOWBITS=15,o.Z_DEFAULT_WINDOWBITS=15,o.Z_MIN_CHUNK=64,o.Z_MAX_CHUNK=1/0,o.Z_DEFAULT_CHUNK=16384,o.Z_MIN_MEMLEVEL=1,o.Z_MAX_MEMLEVEL=9,o.Z_DEFAULT_MEMLEVEL=8,o.Z_MIN_LEVEL=-1,o.Z_MAX_LEVEL=9,o.Z_DEFAULT_LEVEL=o.Z_DEFAULT_COMPRESSION;for(var l=Object.keys(o),f=0;f=u?a=new RangeError(c):e=n.concat(i,o),i=[],t.close(),r(a,e)}t.on("error",(function(e){t.removeListener("end",s),t.removeListener("readable",a),r(e)})),t.on("end",s),t.end(e),a()}function b(t,e){if("string"===typeof e&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return t._processChunk(e,r)}function v(t){if(!(this instanceof v))return new v(t);C.call(this,t,o.DEFLATE)}function A(t){if(!(this instanceof A))return new A(t);C.call(this,t,o.INFLATE)}function w(t){if(!(this instanceof w))return new w(t);C.call(this,t,o.GZIP)}function _(t){if(!(this instanceof _))return new _(t);C.call(this,t,o.GUNZIP)}function E(t){if(!(this instanceof E))return new E(t);C.call(this,t,o.DEFLATERAW)}function I(t){if(!(this instanceof I))return new I(t);C.call(this,t,o.INFLATERAW)}function S(t){if(!(this instanceof S))return new S(t);C.call(this,t,o.UNZIP)}function M(t){return t===o.Z_NO_FLUSH||t===o.Z_PARTIAL_FLUSH||t===o.Z_SYNC_FLUSH||t===o.Z_FULL_FLUSH||t===o.Z_FINISH||t===o.Z_BLOCK}function C(t,r){var a=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||e.Z_DEFAULT_CHUNK,i.call(this,t),t.flush&&!M(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!M(t.finishFlush))throw new Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||o.Z_NO_FLUSH,this._finishFlushFlag="undefined"!==typeof t.finishFlush?t.finishFlush:o.Z_FINISH,t.chunkSize&&(t.chunkSizee.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBitse.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.levele.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevele.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=e.Z_FILTERED&&t.strategy!=e.Z_HUFFMAN_ONLY&&t.strategy!=e.Z_RLE&&t.strategy!=e.Z_FIXED&&t.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!n.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(r);var s=this;this._hadError=!1,this._handle.onerror=function(t,r){k(s),s._hadError=!0;var n=new Error(t);n.errno=r,n.code=e.codes[r],s.emit("error",n)};var u=e.Z_DEFAULT_COMPRESSION;"number"===typeof t.level&&(u=t.level);var c=e.Z_DEFAULT_STRATEGY;"number"===typeof t.strategy&&(c=t.strategy),this._handle.init(t.windowBits||e.Z_DEFAULT_WINDOWBITS,u,t.memLevel||e.Z_DEFAULT_MEMLEVEL,c,t.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=c,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!a._handle},configurable:!0,enumerable:!0})}function k(e,r){r&&t.nextTick(r),e._handle&&(e._handle.close(),e._handle=null)}function x(t){t.emit("close")}Object.defineProperty(e,"codes",{enumerable:!0,value:Object.freeze(d),writable:!1}),e.Deflate=v,e.Inflate=A,e.Gzip=w,e.Gunzip=_,e.DeflateRaw=E,e.InflateRaw=I,e.Unzip=S,e.createDeflate=function(t){return new v(t)},e.createInflate=function(t){return new A(t)},e.createDeflateRaw=function(t){return new E(t)},e.createInflateRaw=function(t){return new I(t)},e.createGzip=function(t){return new w(t)},e.createGunzip=function(t){return new _(t)},e.createUnzip=function(t){return new S(t)},e.deflate=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new v(e),t,r)},e.deflateSync=function(t,e){return b(new v(e),t)},e.gzip=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new w(e),t,r)},e.gzipSync=function(t,e){return b(new w(e),t)},e.deflateRaw=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new E(e),t,r)},e.deflateRawSync=function(t,e){return b(new E(e),t)},e.unzip=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new S(e),t,r)},e.unzipSync=function(t,e){return b(new S(e),t)},e.inflate=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new A(e),t,r)},e.inflateSync=function(t,e){return b(new A(e),t)},e.gunzip=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new _(e),t,r)},e.gunzipSync=function(t,e){return b(new _(e),t)},e.inflateRaw=function(t,e,r){return"function"===typeof e&&(r=e,e={}),y(new I(e),t,r)},e.inflateRawSync=function(t,e){return b(new I(e),t)},a.inherits(C,i),C.prototype.params=function(r,n,i){if(re.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+r);if(n!=e.Z_FILTERED&&n!=e.Z_HUFFMAN_ONLY&&n!=e.Z_RLE&&n!=e.Z_FIXED&&n!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==r||this._strategy!==n){var a=this;this.flush(o.Z_SYNC_FLUSH,(function(){s(a._handle,"zlib binding closed"),a._handle.params(r,n),a._hadError||(a._level=r,a._strategy=n,i&&i())}))}else t.nextTick(i)},C.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},C.prototype._flush=function(t){this._transform(n.alloc(0),"",t)},C.prototype.flush=function(e,r){var i=this,a=this._writableState;("function"===typeof e||void 0===e&&!r)&&(r=e,e=o.Z_FULL_FLUSH),a.ended?r&&t.nextTick(r):a.ending?r&&this.once("end",r):a.needDrain?r&&this.once("drain",(function(){return i.flush(e,r)})):(this._flushFlag=e,this.write(n.alloc(0),"",r))},C.prototype.close=function(e){k(this,e),t.nextTick(x,this)},C.prototype._transform=function(t,e,r){var i,a=this._writableState,s=(a.ending||a.ended)&&(!t||a.length===t.length);return null===t||n.isBuffer(t)?this._handle?(s?i=this._finishFlushFlag:(i=this._flushFlag,t.length>=a.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),void this._processChunk(t,i,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},C.prototype._processChunk=function(t,e,r){var i=t&&t.length,o=this._chunkSize-this._offset,a=0,l=this,f="function"===typeof r;if(!f){var h,d=[],p=0;this.on("error",(function(t){h=t})),s(this._handle,"zlib binding closed");do{var g=this._handle.writeSync(e,t,a,i,this._buffer,this._offset,o)}while(!this._hadError&&b(g[0],g[1]));if(this._hadError)throw h;if(p>=u)throw k(this),new RangeError(c);var m=n.concat(d,p);return k(this),m}s(this._handle,"zlib binding closed");var y=this._handle.write(e,t,a,i,this._buffer,this._offset,o);function b(u,c){if(this&&(this.buffer=null,this.callback=null),!l._hadError){var h=o-c;if(s(h>=0,"have should not go down"),h>0){var g=l._buffer.slice(l._offset,l._offset+h);l._offset+=h,f?l.push(g):(d.push(g),p+=g.length)}if((0===c||l._offset>=l._chunkSize)&&(o=l._chunkSize,l._offset=0,l._buffer=n.allocUnsafe(l._chunkSize)),0===c){if(a+=i-u,i=u,!f)return!0;var m=l._handle.write(e,t,a,i,l._buffer,l._offset,l._chunkSize);return m.callback=b,void(m.buffer=t)}if(!f)return!1;r()}}y.buffer=t,y.callback=b},a.inherits(v,C),a.inherits(A,C),a.inherits(w,C),a.inherits(_,C),a.inherits(E,C),a.inherits(I,C),a.inherits(S,C)}).call(this,r(57))},function(t,e,r){"use strict";(function(t,n){var i=r(48),o=r(2848),a=r(2849),s=r(2852),u=r(2855);for(var c in u)e[c]=u[c];e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7;function l(t){if("number"!==typeof t||te.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}l.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,i(this.init_done,"close before init"),i(this.mode<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?a.deflateEnd(this.strm):this.mode!==e.INFLATE&&this.mode!==e.GUNZIP&&this.mode!==e.INFLATERAW&&this.mode!==e.UNZIP||s.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null)},l.prototype.write=function(t,e,r,n,i,o,a){return this._write(!0,t,e,r,n,i,o,a)},l.prototype.writeSync=function(t,e,r,n,i,o,a){return this._write(!1,t,e,r,n,i,o,a)},l.prototype._write=function(r,o,a,s,u,c,l,f){if(i.equal(arguments.length,8),i(this.init_done,"write before init"),i(this.mode!==e.NONE,"already finalized"),i.equal(!1,this.write_in_progress,"write already in progress"),i.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,i.equal(!1,void 0===o,"must provide flush value"),this.write_in_progress=!0,o!==e.Z_NO_FLUSH&&o!==e.Z_PARTIAL_FLUSH&&o!==e.Z_SYNC_FLUSH&&o!==e.Z_FULL_FLUSH&&o!==e.Z_FINISH&&o!==e.Z_BLOCK)throw new Error("Invalid flush value");if(null==a&&(a=t.alloc(0),u=0,s=0),this.strm.avail_in=u,this.strm.input=a,this.strm.next_in=s,this.strm.avail_out=f,this.strm.output=c,this.strm.next_out=l,this.flush=o,!r)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return n.nextTick((function(){h._process(),h._after()})),this},l.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},l.prototype._process=function(){var t=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=a.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(31!==this.strm.input[t]){this.mode=e.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;139===this.strm.input[t]?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},l.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},l.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,e=this.strm.avail_in;this.write_in_progress=!1,this.callback(e,t),this.pending_close&&this.close()}},l.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},l.prototype.init=function(t,r,n,o,a){i(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),i(t>=8&&t<=15,"invalid windowBits"),i(r>=-1&&r<=9,"invalid compression level"),i(n>=1&&n<=9,"invalid memlevel"),i(o===e.Z_FILTERED||o===e.Z_HUFFMAN_ONLY||o===e.Z_RLE||o===e.Z_FIXED||o===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,t,n,o,a),this._setDictionary()},l.prototype.params=function(){throw new Error("deflateParams Not supported")},l.prototype.reset=function(){this._reset(),this._setDictionary()},l.prototype._init=function(t,r,n,i,u){switch(this.level=t,this.windowBits=r,this.memLevel=n,this.strategy=i,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,this.mode!==e.GZIP&&this.mode!==e.GUNZIP||(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),this.mode!==e.DEFLATERAW&&this.mode!==e.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new o,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=a.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=u,this.write_in_progress=!1,this.init_done=!0},l.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=a.deflateSetDictionary(this.strm,this.dictionary)}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},l.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=a.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=l}).call(this,r(7).Buffer,r(57))},function(t,e,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(t,e,r){"use strict";var n,i=r(689),o=r(2850),a=r(1283),s=r(1284),u=r(2851),c=0,l=4,f=0,h=-2,d=-1,p=4,g=2,m=8,y=9,b=286,v=30,A=19,w=2*b+1,_=15,E=3,I=258,S=I+E+1,M=42,C=103,k=113,x=666,B=1,O=2,T=3,R=4;function P(t,e){return t.msg=u[e],e}function N(t){return(t<<1)-(t>4?9:0)}function j(t){for(var e=t.length;--e>=0;)t[e]=0}function D(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function L(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,D(t.strm)}function F(t,e){t.pending_buf[t.pending++]=e}function U(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function Q(t,e,r,n){var o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,i.arraySet(e,t.input,t.next_in,o,r),1===t.state.wrap?t.adler=a(t.adler,e,o,r):2===t.state.wrap&&(t.adler=s(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)}function G(t,e){var r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-S?t.strstart-(t.w_size-S):0,c=t.window,l=t.w_mask,f=t.prev,h=t.strstart+I,d=c[o+a-1],p=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(r=e)+a]===p&&c[r+a-1]===d&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;d=c[o+a-1],p=c[o+a]}}}while((e=f[e&l])>u&&0!==--i);return a<=t.lookahead?a:t.lookahead}function H(t){var e,r,n,o,a,s=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-S)){i.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--r);e=r=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--r);o+=s}if(0===t.strm.avail_in)break;if(r=Q(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=r,t.lookahead+t.insert>=E)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=(t.ins_h<=E&&(t.ins_h=(t.ins_h<=E)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-E),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=E){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=E&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=E-1)),t.prev_length>=E&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-E,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-E),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<15&&(s=2,n-=16),o<1||o>y||r!==m||n<8||n>15||e<0||e>9||a<0||a>p)return P(t,h);8===n&&(n=9);var u=new V;return t.state=u,u.strm=t,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===c)return B;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,L(t,!1),0===t.strm.avail_out))return B;if(t.strstart-t.block_start>=t.w_size-S&&(L(t,!1),0===t.strm.avail_out))return B}return t.insert=0,e===l?(L(t,!0),0===t.strm.avail_out?T:R):(t.strstart>t.block_start&&(L(t,!1),t.strm.avail_out),B)})),new K(4,4,8,4,z),new K(4,5,16,8,z),new K(4,6,32,32,z),new K(4,4,16,16,q),new K(8,16,32,32,q),new K(8,16,128,128,q),new K(8,32,128,256,q),new K(32,128,258,1024,q),new K(32,258,258,4096,q)],e.deflateInit=function(t,e){return Y(t,e,m,15,8,0)},e.deflateInit2=Y,e.deflateReset=J,e.deflateResetKeep=W,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?h:(t.state.gzhead=e,f):h},e.deflate=function(t,e){var r,i,a,u;if(!t||!t.state||e>5||e<0)return t?P(t,h):h;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===x&&e!==l)return P(t,0===t.avail_out?-5:h);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===M)if(2===i.wrap)t.adler=0,F(i,31),F(i,139),F(i,8),i.gzhead?(F(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),F(i,255&i.gzhead.time),F(i,i.gzhead.time>>8&255),F(i,i.gzhead.time>>16&255),F(i,i.gzhead.time>>24&255),F(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),F(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(F(i,255&i.gzhead.extra.length),F(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(F(i,0),F(i,0),F(i,0),F(i,0),F(i,0),F(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),F(i,3),i.status=k);else{var d=m+(i.w_bits-8<<4)<<8;d|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=k,U(i,d),0!==i.strstart&&(U(i,t.adler>>>16),U(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),D(t),a=i.pending,i.pending!==i.pending_buf_size));)F(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),D(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),D(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=C)}else i.status=C;if(i.status===C&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&D(t),i.pending+2<=i.pending_buf_size&&(F(i,255&t.adler),F(i,t.adler>>8&255),t.adler=0,i.status=k)):i.status=k),0!==i.pending){if(D(t),0===t.avail_out)return i.last_flush=-1,f}else if(0===t.avail_in&&N(e)<=N(r)&&e!==l)return P(t,-5);if(i.status===x&&0!==t.avail_in)return P(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==c&&i.status!==x){var p=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===c)return B;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(L(t,!1),0===t.strm.avail_out))return B}return t.insert=0,e===l?(L(t,!0),0===t.strm.avail_out?T:R):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?B:O}(i,e):3===i.strategy?function(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=I){if(H(t),t.lookahead<=I&&e===c)return B;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=E&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=t.strstart+I;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=E?(r=o._tr_tally(t,1,t.match_length-E),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(L(t,!1),0===t.strm.avail_out))return B}return t.insert=0,e===l?(L(t,!0),0===t.strm.avail_out?T:R):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?B:O}(i,e):n[i.level].func(i,e);if(p!==T&&p!==R||(i.status=x),p===B||p===T)return 0===t.avail_out&&(i.last_flush=-1),f;if(p===O&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(j(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),D(t),0===t.avail_out))return i.last_flush=-1,f}return e!==l?f:i.wrap<=0?1:(2===i.wrap?(F(i,255&t.adler),F(i,t.adler>>8&255),F(i,t.adler>>16&255),F(i,t.adler>>24&255),F(i,255&t.total_in),F(i,t.total_in>>8&255),F(i,t.total_in>>16&255),F(i,t.total_in>>24&255)):(U(i,t.adler>>>16),U(i,65535&t.adler)),D(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?f:1)},e.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==M&&69!==e&&73!==e&&91!==e&&e!==C&&e!==k&&e!==x?P(t,h):(t.state=null,e===k?P(t,-3):f):h},e.deflateSetDictionary=function(t,e){var r,n,o,s,u,c,l,d,p=e.length;if(!t||!t.state)return h;if(2===(s=(r=t.state).wrap)||1===s&&r.status!==M||r.lookahead)return h;for(1===s&&(t.adler=a(t.adler,e,p,0)),r.wrap=0,p>=r.w_size&&(0===s&&(j(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,e,p-r.w_size,r.w_size,0),e=d,p=r.w_size),u=t.avail_in,c=t.next_in,l=t.input,t.avail_in=p,t.next_in=0,t.input=e,H(r);r.lookahead>=E;){n=r.strstart,o=r.lookahead-(E-1);do{r.ins_h=(r.ins_h<=0;)t[e]=0}var s=0,u=29,c=256,l=c+1+u,f=30,h=19,d=2*l+1,p=15,g=16,m=7,y=256,b=16,v=17,A=18,w=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],_=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=new Array(2*(l+2));a(S);var M=new Array(2*f);a(M);var C=new Array(512);a(C);var k=new Array(256);a(k);var x=new Array(u);a(x);var B,O,T,R=new Array(f);function P(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function N(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function j(t){return t<256?C[t]:C[256+(t>>>7)]}function D(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function L(t,e,r){t.bi_valid>g-r?(t.bi_buf|=e<>g-t.bi_valid,t.bi_valid+=r-g):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function Q(t,e,r){var n,i,o=new Array(p+1),a=0;for(n=1;n<=p;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=U(o[s]++,s))}}function G(t){var e;for(e=0;e8?D(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function z(t,e,r,n){var i=2*e,o=2*r;return t[i]>1;r>=1;r--)q(t,o,r);i=u;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],q(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,q(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,a,s,u=e.dyn_tree,c=e.max_code,l=e.stat_desc.static_tree,f=e.stat_desc.has_stree,h=e.stat_desc.extra_bits,g=e.stat_desc.extra_base,m=e.stat_desc.max_length,y=0;for(o=0;o<=p;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;rm&&(o=m,y++),u[2*n+1]=o,n>c||(t.bl_count[o]++,a=0,n>=g&&(a=h[n-g]),s=u[2*n],t.opt_len+=s*(o+a),f&&(t.static_len+=s*(l[2*n+1]+a)));if(0!==y){do{for(o=m-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[m]--,y-=2}while(y>0);for(o=m;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>c||(u[2*i+1]!==o&&(t.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(t,e),Q(o,c,t.bl_count)}function W(t,e,r){var n,i,o=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s>=7;n0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return i;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return o;for(e=32;e=3&&0===t.bl_tree[2*I[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),a=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=a&&(a=s)):a=s=r+5,r+4<=a&&-1!==e?X(t,e,r,n):4===t.strategy||s===a?(L(t,2+(n?1:0),3),K(t,S,M)):(L(t,4+(n?1:0),3),function(t,e,r,n){var i;for(L(t,e-257,5),L(t,r-1,5),L(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(k[r]+c+1)]++,t.dyn_dtree[2*j(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){L(t,2,3),F(t,y,S),function(t){16===t.bi_valid?(D(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},function(t,e,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(t,e,r){"use strict";var n=r(689),i=r(1283),o=r(1284),a=r(2853),s=r(2854),u=1,c=2,l=0,f=-2,h=1,d=12,p=30,g=852,m=592;function y(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function b(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=h,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(g),e.distcode=e.distdyn=new n.Buf32(m),e.sane=1,e.back=-1,l):f}function A(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,v(t)):f}function w(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?f:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,A(t))):f}function _(t,e){var r,n;return t?(n=new b,t.state=n,n.window=null,(r=w(t,e))!==l&&(t.state=null),r):f}var E,I,S=!0;function M(t){if(S){var e;for(E=new n.Buf32(512),I=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(u,t.lens,0,288,E,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(c,t.lens,0,32,I,0,t.work,{bits:5}),S=!1}t.lencode=E,t.lenbits=9,t.distcode=I,t.distbits=5}function C(t,e,r,i){var o,a=t.state;return null===a.window&&(a.wsize=1<=a.wsize?(n.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,e,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,G,2,0),_=0,E=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&_)<<8)+(_>>8))%31){t.msg="incorrect header check",r.mode=p;break}if(8!==(15&_)){t.msg="unknown compression method",r.mode=p;break}if(E-=4,D=8+(15&(_>>>=4)),0===r.wbits)r.wbits=D;else if(D>r.wbits){t.msg="invalid window size",r.mode=p;break}r.dmax=1<>8&1),512&r.flags&&(G[0]=255&_,G[1]=_>>>8&255,r.check=o(r.check,G,2,0)),_=0,E=0,r.mode=3;case 3:for(;E<32;){if(0===A)break t;A--,_+=g[b++]<>>8&255,G[2]=_>>>16&255,G[3]=_>>>24&255,r.check=o(r.check,G,4,0)),_=0,E=0,r.mode=4;case 4:for(;E<16;){if(0===A)break t;A--,_+=g[b++]<>8),512&r.flags&&(G[0]=255&_,G[1]=_>>>8&255,r.check=o(r.check,G,2,0)),_=0,E=0,r.mode=5;case 5:if(1024&r.flags){for(;E<16;){if(0===A)break t;A--,_+=g[b++]<>>8&255,r.check=o(r.check,G,2,0)),_=0,E=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((k=r.length)>A&&(k=A),k&&(r.head&&(D=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,g,b,k,D)),512&r.flags&&(r.check=o(r.check,g,k,b)),A-=k,b+=k,r.length-=k),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===A)break t;k=0;do{D=g[b+k++],r.head&&D&&r.length<65536&&(r.head.name+=String.fromCharCode(D))}while(D&&k>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=d;break;case 10:for(;E<32;){if(0===A)break t;A--,_+=g[b++]<>>=7&E,E-=7&E,r.mode=27;break}for(;E<3;){if(0===A)break t;A--,_+=g[b++]<>>=1)){case 0:r.mode=14;break;case 1:if(M(r),r.mode=20,6===e){_>>>=2,E-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=p}_>>>=2,E-=2;break;case 14:for(_>>>=7&E,E-=7&E;E<32;){if(0===A)break t;A--,_+=g[b++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=p;break}if(r.length=65535&_,_=0,E=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(k=r.length){if(k>A&&(k=A),k>w&&(k=w),0===k)break t;n.arraySet(m,g,b,k,v),A-=k,b+=k,w-=k,v+=k,r.length-=k;break}r.mode=d;break;case 17:for(;E<14;){if(0===A)break t;A--,_+=g[b++]<>>=5,E-=5,r.ndist=1+(31&_),_>>>=5,E-=5,r.ncode=4+(15&_),_>>>=4,E-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=p;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,E-=3}for(;r.have<19;)r.lens[H[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,F={bits:r.lenbits},L=s(0,r.lens,0,19,r.lencode,0,r.work,F),r.lenbits=F.bits,L){t.msg="invalid code lengths set",r.mode=p;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,R=65535&Q,!((O=Q>>>24)<=E);){if(0===A)break t;A--,_+=g[b++]<>>=O,E-=O,r.lens[r.have++]=R;else{if(16===R){for(U=O+2;E>>=O,E-=O,0===r.have){t.msg="invalid bit length repeat",r.mode=p;break}D=r.lens[r.have-1],k=3+(3&_),_>>>=2,E-=2}else if(17===R){for(U=O+3;E>>=O)),_>>>=3,E-=3}else{for(U=O+7;E>>=O)),_>>>=7,E-=7}if(r.have+k>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=p;break}for(;k--;)r.lens[r.have++]=D}}if(r.mode===p)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=p;break}if(r.lenbits=9,F={bits:r.lenbits},L=s(u,r.lens,0,r.nlen,r.lencode,0,r.work,F),r.lenbits=F.bits,L){t.msg="invalid literal/lengths set",r.mode=p;break}if(r.distbits=6,r.distcode=r.distdyn,F={bits:r.distbits},L=s(c,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,F),r.distbits=F.bits,L){t.msg="invalid distances set",r.mode=p;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(A>=6&&w>=258){t.next_out=v,t.avail_out=w,t.next_in=b,t.avail_in=A,r.hold=_,r.bits=E,a(t,S),v=t.next_out,m=t.output,w=t.avail_out,b=t.next_in,g=t.input,A=t.avail_in,_=r.hold,E=r.bits,r.mode===d&&(r.back=-1);break}for(r.back=0;T=(Q=r.lencode[_&(1<>>16&255,R=65535&Q,!((O=Q>>>24)<=E);){if(0===A)break t;A--,_+=g[b++]<>P)])>>>16&255,R=65535&Q,!(P+(O=Q>>>24)<=E);){if(0===A)break t;A--,_+=g[b++]<>>=P,E-=P,r.back+=P}if(_>>>=O,E-=O,r.back+=O,r.length=R,0===T){r.mode=26;break}if(32&T){r.back=-1,r.mode=d;break}if(64&T){t.msg="invalid literal/length code",r.mode=p;break}r.extra=15&T,r.mode=22;case 22:if(r.extra){for(U=r.extra;E>>=r.extra,E-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;T=(Q=r.distcode[_&(1<>>16&255,R=65535&Q,!((O=Q>>>24)<=E);){if(0===A)break t;A--,_+=g[b++]<>P)])>>>16&255,R=65535&Q,!(P+(O=Q>>>24)<=E);){if(0===A)break t;A--,_+=g[b++]<>>=P,E-=P,r.back+=P}if(_>>>=O,E-=O,r.back+=O,64&T){t.msg="invalid distance code",r.mode=p;break}r.offset=R,r.extra=15&T,r.mode=24;case 24:if(r.extra){for(U=r.extra;E>>=r.extra,E-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=p;break}r.mode=25;case 25:if(0===w)break t;if(k=S-w,r.offset>k){if((k=r.offset-k)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=p;break}k>r.wnext?(k-=r.wnext,x=r.wsize-k):x=r.wnext-k,k>r.length&&(k=r.length),B=r.window}else B=m,x=v-r.offset,k=r.length;k>w&&(k=w),w-=k,r.length-=k;do{m[v++]=B[x++]}while(--k);0===r.length&&(r.mode=21);break;case 26:if(0===w)break t;m[v++]=r.length,w--,r.mode=21;break;case 27:if(r.wrap){for(;E<32;){if(0===A)break t;A--,_|=g[b++]<>>=A=v>>>24,p-=A,0===(A=v>>>16&255))M[o++]=65535&v;else{if(!(16&A)){if(0===(64&A)){v=g[(65535&v)+(d&(1<>>=A,p-=A),p<15&&(d+=S[n++]<>>=A=v>>>24,p-=A,!(16&(A=v>>>16&255))){if(0===(64&A)){v=m[(65535&v)+(d&(1<u){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=A,p-=A,_>(A=o-a)){if((A=_-A)>l&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(E=0,I=h,0===f){if(E+=c-A,A2;)M[o++]=I[E++],M[o++]=I[E++],M[o++]=I[E++],w-=3;w&&(M[o++]=I[E++],w>1&&(M[o++]=I[E++]))}else{E=o-_;do{M[o++]=M[E++],M[o++]=M[E++],M[o++]=M[E++],w-=3}while(w>2);w&&(M[o++]=M[E++],w>1&&(M[o++]=M[E++]))}break}}break}}while(n>3,d&=(1<<(p-=w<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n=1&&0===j[C];C--);if(k>C&&(k=C),0===C)return l[f++]=20971520,l[f++]=20971520,d.bits=1,0;for(M=1;M0&&(0===t||1!==C))return-1;for(D[1]=0,I=1;I852||2===t&&T>592)return 1;for(;;){A=I-B,h[S]v?(w=L[F+h[S]],_=P[N+h[S]]):(w=96,_=0),p=1<>B)+(g-=p)]=A<<24|w<<16|_|0}while(0!==g);for(p=1<>=1;if(0!==p?(R&=p-1,R+=p):R=0,S++,0===--j[I]){if(I===C)break;I=e[r+h[S]]}if(I>k&&(R&y)!==m){for(0===B&&(B=k),b+=M,O=1<<(x=I-B);x+B852||2===t&&T>592)return 1;l[m=R&y]=k<<24|x<<16|b-f|0}}return 0!==R&&(l[b+R]=I-B<<24|64<<16|0),d.bits=k,0}},function(t,e,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recoverTypedSignature=e.signTypedData=e.typedSignatureHash=e.TypedDataUtils=e.TYPED_MESSAGE_SCHEMA=e.SignTypedDataVersion=void 0;const n=r(897),i=r(2857),o=r(1285),a=r(425),s=r(173),u=r(158),c=r(690);var l;function f(t,e){if(!Object.keys(l).includes(t))throw new Error("Invalid version: '".concat(t,"'"));if(e&&!e.includes(t))throw new Error("SignTypedDataVersion not allowed: '".concat(t,"'. Allowed versions are: ").concat(e.join(", ")))}function h(t,e){(0,s.assert)(null!==e,'Unable to encode value: Invalid number. Expected a valid number value, but received "'.concat(e,'".'));const r=BigInt(e),n=(0,o.getLength)(t),i=BigInt(2)**BigInt(n)-BigInt(1);return(0,s.assert)(r>=-i&&r<=i,'Unable to encode value: Number "'.concat(e,'" is out of range for type "').concat(t,'".')),r}function d(t){let e=BigInt(0);for(let r=0;r=49?n-BigInt(49)+BigInt(10):n>=17?n-BigInt(17)+BigInt(10):n}return(0,a.padStart)((0,s.bigIntToBytes)(e),20)}function p(t,e,r,o,c){if(f(c,[l.V3,l.V4]),void 0!==t[r])return["bytes32",c===l.V4&&null==o?"0x0000000000000000000000000000000000000000000000000000000000000000":(0,n.arrToBufArr)((0,u.keccak256)(g(r,o,t,c)))];if("function"===r)throw new Error('Unsupported or invalid type: "function"');if(void 0===o)throw new Error("missing value for field ".concat(e," of type ").concat(r));if("address"===r){if("number"===typeof o)return["address",(0,a.padStart)((0,s.numberToBytes)(o),20)];if((0,s.isStrictHexString)(o))return["address",(0,s.add0x)(o)];if("string"===typeof o)return["address",d(o).subarray(0,20)]}if("bool"===r)return["bool",Boolean(o)];if("bytes"===r)return"number"===typeof o?o=(0,s.numberToBytes)(o):(0,s.isStrictHexString)(o)||"0x"===o?o=(0,s.hexToBytes)(o):"string"===typeof o&&(o=(0,s.stringToBytes)(o)),["bytes32",(0,n.arrToBufArr)((0,u.keccak256)(o))];if(r.startsWith("bytes")&&"bytes"!==r&&!r.includes("["))return"number"===typeof o?o<0?["bytes32",new Uint8Array(32)]:["bytes32",(0,s.bigIntToBytes)(BigInt(o))]:(0,s.isStrictHexString)(o)?["bytes32",(0,s.hexToBytes)(o)]:["bytes32",o];if(r.startsWith("int")&&!r.includes("[")){const t=h(r,o);return t>=BigInt(0)?["uint256",t]:["int256",t]}if("string"===r)return o="number"===typeof o?(0,s.numberToBytes)(o):(0,s.stringToBytes)(null!==o&&void 0!==o?o:""),["bytes32",(0,n.arrToBufArr)((0,u.keccak256)(o))];if(r.endsWith("]")){if(c===l.V3)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");const a=r.slice(0,r.lastIndexOf("[")),s=o.map((r=>p(t,e,a,r,c)));return["bytes32",(0,n.arrToBufArr)((0,u.keccak256)((0,i.encode)(s.map((t=>{let[e]=t;return e})),s.map((t=>{let[,e]=t;return e})))))]}return[r,o]}function g(t,e,r,o){f(o,[l.V3,l.V4]);const a=["bytes32"],s=[v(t,r)];for(const n of r[t]){if(o===l.V3&&void 0===e[n.name])continue;const[t,i]=p(r,n.name,n.type,e[n.name],o);a.push(t),s.push(i)}return(0,n.arrToBufArr)((0,i.encode)(a,s))}function m(t,e){let r="";const n=y(t,e);n.delete(t);const i=[t,...Array.from(n).sort()];for(const o of i){if(!e[o])throw new Error("No type definition specified: ".concat(o));r+="".concat(o,"(").concat(e[o].map((t=>{let{name:e,type:r}=t;return"".concat(r," ").concat(e)})).join(","),")")}return r}function y(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;if("string"!==typeof t)throw new Error("Invalid findTypeDependencies input ".concat(JSON.stringify(t)));const n=t.match(/^\w*/u);if([t]=n,r.has(t)||void 0===e[t])return r;r.add(t);for(const i of e[t])y(i.type,e,r);return r}function b(t,e,r,i){f(i,[l.V3,l.V4]);const o=g(t,e,r,i),a=(0,u.keccak256)(o);return(0,n.arrToBufArr)(a)}function v(t,e){const r=(0,s.stringToBytes)(m(t,e));return(0,n.arrToBufArr)((0,u.keccak256)(r))}function A(t){const r={};for(const n in e.TYPED_MESSAGE_SCHEMA.properties)t[n]&&(r[n]=t[n]);return"types"in r&&(r.types=Object.assign({EIP712Domain:[]},r.types)),r}function w(t,e){f(e,[l.V3,l.V4]);const r=A(t),{domain:n}=r;return b("EIP712Domain",n,{EIP712Domain:r.types.EIP712Domain},e)}function _(t,e){if((0,o.isArrayType)(t)&&Array.isArray(e)){const[r]=(0,o.getArrayType)(t);return e.map((t=>_(r,t)))}if("address"===t){if("number"===typeof e)return(0,a.padStart)((0,s.numberToBytes)(e),20);if((0,s.isStrictHexString)(e))return(0,a.padStart)((0,s.hexToBytes)(e).subarray(0,20),20);if(e instanceof Uint8Array)return(0,a.padStart)(e.subarray(0,20),20)}if("bool"===t)return Boolean(e);if(t.startsWith("bytes")&&"bytes"!==t){const r=(0,o.getByteLength)(t);if("number"===typeof e)return e<0?new Uint8Array:(0,s.numberToBytes)(e).subarray(0,r);if((0,s.isStrictHexString)(e))return(0,s.hexToBytes)(e).subarray(0,r);if(e instanceof Uint8Array)return e.subarray(0,r)}if(t.startsWith("uint")&&"number"===typeof e)return Math.abs(e);if(t.startsWith("int")&&"number"===typeof e){const r=(0,o.getLength)(t);return BigInt.asIntN(r,BigInt(e))}return e}function E(t,e){return e.map((e=>{if("string"===typeof e||"number"===typeof e||"bigint"===typeof e){const r=h(t,e);if(r>=BigInt(0))return(0,a.padStart)((0,s.bigIntToBytes)(r),32);const n=(0,o.getLength)(t),i=BigInt.asIntN(n,r);return(0,s.signedBigIntToBytes)(i,32)}return e}))}function I(t){const e=new Error("Expect argument to be non-empty array");if("object"!==typeof t||!("length"in t)||!t.length)throw e;const r=t.map((t=>{let{name:e,type:r,value:n}=t;if("address[]"===r)return{name:e,type:"bytes32[]",value:(i=n,i.map((t=>"number"===typeof t?(0,a.padStart)((0,s.numberToBytes)(t),32):(0,s.isStrictHexString)(t)?(0,a.padStart)((0,s.hexToBytes)(t).subarray(0,32),32):t instanceof Uint8Array?(0,a.padStart)(t.subarray(0,32),32):t)))};var i;if(r.startsWith("int")&&(0,o.isArrayType)(r)){const[t,i]=(0,o.getArrayType)(r);return{name:e,type:"bytes32[".concat(null!==i&&void 0!==i?i:"","]"),value:E(t,n)}}return{name:e,type:r,value:_(r,n)}})),l=r.map((t=>"bytes"!==t.type?t.value:(0,c.legacyToBuffer)(t.value))),f=r.map((t=>{if("function"===t.type)throw new Error('Unsupported or invalid type: "function"');return t.type})),h=t.map((t=>{if(!t.name)throw e;return"".concat(t.type," ").concat(t.name)}));return(0,n.arrToBufArr)((0,u.keccak256)((0,i.encodePacked)(["bytes32","bytes32"],[(0,u.keccak256)((0,i.encodePacked)(["string[]"],[h],!0)),(0,u.keccak256)((0,i.encodePacked)(f,l,!0))])))}!function(t){t.V1="V1",t.V3="V3",t.V4="V4"}(l=e.SignTypedDataVersion||(e.SignTypedDataVersion={})),e.TYPED_MESSAGE_SCHEMA={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},e.TypedDataUtils={encodeData:g,encodeType:m,findTypeDependencies:y,hashStruct:b,hashType:v,sanitizeData:A,eip712Hash:function(t,e){f(e,[l.V3,l.V4]);const r=A(t),i=[(0,s.hexToBytes)("1901")];return i.push(w(t,e)),"EIP712Domain"!==r.primaryType&&i.push(b(r.primaryType,r.message,r.types,e)),(0,n.arrToBufArr)((0,u.keccak256)((0,s.concatBytes)(i)))},eip712DomainHash:w},e.typedSignatureHash=function(t){const e=I(t);return(0,s.bytesToHex)(e)},e.signTypedData=function(t){let{privateKey:r,data:i,version:o}=t;if(f(o),(0,c.isNullish)(i))throw new Error("Missing data parameter");if((0,c.isNullish)(r))throw new Error("Missing private key parameter");const a=o===l.V1?I(i):e.TypedDataUtils.eip712Hash(i,o),u=(0,n.ecsign)(a,r);return(0,c.concatSig)((0,n.arrToBufArr)((0,s.bigIntToBytes)(u.v)),u.r,u.s)},e.recoverTypedSignature=function(t){let{data:r,signature:i,version:o}=t;if(f(o),(0,c.isNullish)(r))throw new Error("Missing data parameter");if((0,c.isNullish)(i))throw new Error("Missing signature parameter");const a=o===l.V1?I(r):e.TypedDataUtils.eip712Hash(r,o),u=(0,c.recoverPublicKey)(a,i),h=(0,n.publicToAddress)(u);return(0,s.bytesToHex)(h)}},function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(2858),e),i(r(298),e),i(r(2867),e)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeSingle=e.decode=e.encodePacked=e.encodeSingle=e.encode=void 0;const n=r(173),i=r(298),o=r(900);e.encode=(t,e,r,n)=>{try{return(0,o.pack)({types:t,values:e,packed:r,tight:n})}catch(a){if(a instanceof i.ParserError)throw new i.ParserError("Unable to encode value: ".concat(a.message),a);throw new i.ParserError("An unexpected error occurred: ".concat((0,i.getErrorMessage)(a)),a)}};e.encodeSingle=(t,r)=>(0,e.encode)([t],[r]);e.encodePacked=(t,r,n)=>(0,e.encode)(t,r,!0,n);e.decode=(t,e)=>{const r=(0,n.createBytes)(e);try{return(0,o.unpack)(t,r)}catch(a){if(a instanceof i.ParserError)throw new i.ParserError("Unable to decode value: ".concat(a.message),a);throw new i.ParserError("An unexpected error occurred: ".concat((0,i.getErrorMessage)(a)),a)}};e.decodeSingle=(t,r)=>{const o=(0,e.decode)([t],r);return(0,n.assert)(1===o.length,new i.ParserError("Decoded value array has unexpected length.")),o[0]}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.iterate=void 0;const n=r(173);e.iterate=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32;return function*(){for(let r=0;r{(0,n.assert)(t>=0,"Cannot skip a negative number of bytes."),(0,n.assert)(t%e===0,"Length must be a multiple of the size."),r+=t},o=t.subarray(r);yield{skip:i,value:o}}return{skip:()=>{},value:new Uint8Array}}()}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.address=e.getAddress=void 0;const n=r(173),i=r(298),o=r(425);e.getAddress=t=>{const e=(0,n.createBytes)(t);return(0,n.assert)(e.length<=20,new i.ParserError("Invalid address value. Expected address to be 20 bytes long, but received ".concat(e.length," bytes."))),(0,o.padStart)(e,20)},e.address={isDynamic:!1,isType:t=>"address"===t,getByteLength:()=>32,encode(t){let{buffer:r,value:i,packed:a}=t;const s=(0,e.getAddress)(i);if(a)return(0,n.concatBytes)([r,s]);const u=(0,o.padStart)(s);return(0,n.concatBytes)([r,u])},decode(t){let{value:e}=t;return(0,n.add0x)((0,n.bytesToHex)(e.slice(12,32)))}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.padEnd=e.padStart=e.set=void 0;const n=r(173);e.set=(t,e,r)=>(0,n.concatBytes)([t.subarray(0,r),e,t.subarray(r+e.length)]);e.padStart=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32;const r=new Uint8Array(Math.max(e-t.length,0)).fill(0);return(0,n.concatBytes)([r,t])};e.padEnd=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32;const r=new Uint8Array(Math.max(e-t.length,0)).fill(0);return(0,n.concatBytes)([t,r])}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.array=e.getTupleType=e.getArrayType=e.isArrayType=void 0;const n=r(173),i=r(298),o=r(900),a=r(425),s=r(901),u=r(1286),c=/^(?.*)\[(?\d*?)\]$/u;e.isArrayType=t=>c.test(t);e.getArrayType=t=>{var e;const r=t.match(c);return(0,n.assert)(null===r||void 0===r||null===(e=r.groups)||void 0===e?void 0:e.type,new i.ParserError('Invalid array type. Expected an array type, but received "'.concat(t,'".'))),[r.groups.type,r.groups.length?parseInt(r.groups.length,10):void 0]};e.getTupleType=(t,e)=>"(".concat(new Array(e).fill(t).join(","),")"),e.array={isDynamic(t){const[r,n]=(0,e.getArrayType)(t);return void 0===n||(0,o.isDynamicParser)((0,o.getParser)(r),r)},isType:t=>(0,e.isArrayType)(t),getByteLength(t){(0,n.assert)((0,e.isArrayType)(t),new i.ParserError('Expected an array type, but received "'.concat(t,'".')));const[r,a]=(0,e.getArrayType)(t);return(0,o.isDynamicParser)(this,t)||void 0===a?32:u.tuple.getByteLength((0,e.getTupleType)(r,a))},encode(t){let{type:r,buffer:c,value:l,packed:f,tight:h}=t;const[d,p]=(0,e.getArrayType)(r);if((0,n.assert)(!f||!(0,e.isArrayType)(d),new i.ParserError("Cannot pack nested arrays.")),f&&(0,o.isDynamicParser)((0,o.getParser)(d),d))return(0,o.pack)({types:new Array(l.length).fill(d),values:l,byteArray:c,packed:f,arrayPacked:!0,tight:h});if(p)return(0,n.assert)(p===l.length,new i.ParserError("Array length does not match type length. Expected a length of ".concat(p,", but received ").concat(l.length,"."))),u.tuple.encode({type:(0,e.getTupleType)(d,p),buffer:c,value:l,packed:s.fixedBytes.isType(d)&&h,tight:h});if(f)return(0,o.pack)({types:new Array(l.length).fill(d),values:l,byteArray:c,packed:s.fixedBytes.isType(d)&&h,arrayPacked:!0,tight:h});const g=(0,a.padStart)((0,n.numberToBytes)(l.length));return(0,o.pack)({types:new Array(l.length).fill(d),values:l,byteArray:(0,n.concatBytes)([c,g]),packed:f,tight:h})},decode(t){let{type:r,value:a,...s}=t;const[c,l]=(0,e.getArrayType)(r);if(l){const t=u.tuple.decode({type:(0,e.getTupleType)(c,l),value:a,...s});return(0,n.assert)(t.length===l,new i.ParserError("Array length does not match type length. Expected a length of ".concat(l,", but received ").concat(t.length,"."))),t}const f=(0,n.bytesToNumber)(a.subarray(0,32));return(0,o.unpack)(new Array(f).fill(c),a.subarray(32))}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bool=e.getBooleanValue=void 0;const n=r(173),i=r(1287),o=r(298),a=r(1288),s=(0,i.coerce)((0,i.boolean)(),(0,i.union)([(0,i.literal)("true"),(0,i.literal)("false")]),(t=>"true"===t));e.getBooleanValue=t=>{try{return(0,i.create)(t,s)?BigInt(1):BigInt(0)}catch{throw new o.ParserError('Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "'.concat(t,'".'))}},e.bool={isDynamic:!1,isType:t=>"bool"===t,getByteLength:()=>32,encode(t){let{buffer:r,value:i,packed:o,tight:s}=t;const u=(0,e.getBooleanValue)(i);return o?(0,n.concatBytes)([r,(0,n.bigIntToBytes)(u)]):a.number.encode({type:"uint256",buffer:r,value:u,packed:o,tight:s})},decode:t=>a.number.decode({...t,type:"uint256"})===BigInt(1)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fn=e.getFunction=void 0;const n=r(173),i=r(1287),o=r(298),a=r(901),s=(0,i.coerce)((0,i.object)({address:n.StrictHexStruct,selector:n.StrictHexStruct}),(0,i.union)([n.StrictHexStruct,(0,i.instance)(Uint8Array)]),(t=>{const e=(0,n.createBytes)(t);return(0,n.assert)(24===e.length,new o.ParserError("Invalid Solidity function. Expected function to be 24 bytes long, but received ".concat(e.length," bytes."))),{address:(0,n.bytesToHex)(e.subarray(0,20)),selector:(0,n.bytesToHex)(e.subarray(20,24))}}));e.getFunction=t=>{const e=(0,i.create)(t,s);return(0,n.concatBytes)([(0,n.hexToBytes)(e.address),(0,n.hexToBytes)(e.selector)])},e.fn={isDynamic:!1,isType:t=>"function"===t,getByteLength:()=>32,encode(t){let{buffer:r,value:n,packed:i,tight:o}=t;const s=(0,e.getFunction)(n);return a.fixedBytes.encode({type:"bytes24",buffer:r,value:s,packed:i,tight:o})},decode(t){let{value:e}=t;return{address:(0,n.bytesToHex)(e.slice(0,20)),selector:(0,n.bytesToHex)(e.slice(20,24))}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.string=void 0;const n=r(173),i=r(1289);e.string={isDynamic:!0,isType:t=>"string"===t,getByteLength:()=>32,encode(t){let{buffer:e,value:r,packed:o,tight:a}=t;return i.bytes.encode({type:"bytes",buffer:e,value:(0,n.stringToBytes)(r),packed:o,tight:a})},decode:t=>(0,n.bytesToString)(i.bytes.decode(t))}},function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(2868),e)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,r){"use strict";(function(t){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.getEncryptionPublicKey=e.decryptSafely=e.decrypt=e.encryptSafely=e.encrypt=void 0;const a=o(r(117)),s=o(r(799)),u=r(690);function c(t){let{publicKey:e,data:r,version:n}=t;if((0,u.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,u.isNullish)(r))throw new Error("Missing data parameter");if((0,u.isNullish)(n))throw new Error("Missing version parameter");if("x25519-xsalsa20-poly1305"===n){if("string"!==typeof r)throw new Error("Message data must be given as a string");const t=a.box.keyPair();let n;try{n=s.decodeBase64(e)}catch(i){throw new Error("Bad public key")}const o=s.decodeUTF8(r),u=a.randomBytes(a.box.nonceLength),c=a.box(o,u,n,t.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:s.encodeBase64(u),ephemPublicKey:s.encodeBase64(t.publicKey),ciphertext:s.encodeBase64(c)}}throw new Error("Encryption type/version not supported")}function l(t){let{encryptedData:e,privateKey:r}=t;if((0,u.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,u.isNullish)(r))throw new Error("Missing privateKey parameter");if("x25519-xsalsa20-poly1305"===e.version){const t=f(r),i=a.box.keyPair.fromSecretKey(t).secretKey,o=s.decodeBase64(e.nonce),u=s.decodeBase64(e.ciphertext),c=s.decodeBase64(e.ephemPublicKey),l=a.box.open(u,o,c,i);try{if(!l)throw new Error;const t=s.encodeUTF8(l);if(!t)throw new Error;return t}catch(n){if(n&&"string"===typeof n.message&&n.message.length)throw new Error("Decryption failed: ".concat(n.message));throw new Error("Decryption failed.")}}throw new Error("Encryption type/version not supported.")}function f(e){const r=t.from(e,"hex").toString("base64");return s.decodeBase64(r)}e.encrypt=c,e.encryptSafely=function(e){let{publicKey:r,data:n,version:i}=e;if((0,u.isNullish)(r))throw new Error("Missing publicKey parameter");if((0,u.isNullish)(n))throw new Error("Missing data parameter");if((0,u.isNullish)(i))throw new Error("Missing version parameter");if("object"===typeof n&&n&&"toJSON"in n)throw new Error("Cannot encrypt with toJSON property. Please remove toJSON property");const o={data:n,padding:""},a=t.byteLength(JSON.stringify(o),"utf-8")%2048;let s=0;return a>0&&(s=2048-a-16),o.padding="0".repeat(s),c({publicKey:r,data:JSON.stringify(o),version:i})},e.decrypt=l,e.decryptSafely=function(t){let{encryptedData:e,privateKey:r}=t;if((0,u.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,u.isNullish)(r))throw new Error("Missing privateKey parameter");return JSON.parse(l({encryptedData:e,privateKey:r})).data},e.getEncryptionPublicKey=function(t){const e=f(t),r=a.box.keyPair.fromSecretKey(e).publicKey;return s.encodeBase64(r)}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";var n=r(336),i=r(2871),o=r(426),a=r(902).scan,s=o.ValidatorResult,u=o.ValidatorResultError,c=o.SchemaError,l=o.SchemaContext,f=function t(){this.customFormats=Object.create(t.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(d),this.attributes=Object.create(i.validators)};function h(t){var e="string"===typeof t?t:t.$ref;return"string"==typeof e&&e}f.prototype.customFormats={},f.prototype.schemas=null,f.prototype.types=null,f.prototype.attributes=null,f.prototype.unresolvedRefs=null,f.prototype.addSchema=function(t,e){var r=this;if(!t)return null;var n=a(e||"/",t),i=e||t.$id||t.id;for(var o in n.id)this.schemas[o]=n.id[o];for(var o in n.ref)this.unresolvedRefs.push(o);return this.unresolvedRefs=this.unresolvedRefs.filter((function(t){return"undefined"===typeof r.schemas[t]})),this.schemas[i]},f.prototype.addSubSchemaArray=function(t,e){if(Array.isArray(e))for(var r=0;r",t);var u=o.objectGetPath(r.schemas[s],a.substr(1));if(void 0===u)throw new c("no such schema "+a+" located in <"+s+">",t);return{subschema:u,switchSchema:e}},f.prototype.testType=function(t,e,r,n,i){if(void 0!==i){if(null===i)throw new c('Unexpected null in "type" keyword');if("function"==typeof this.types[i])return this.types[i].call(this,t);if(i&&"object"==typeof i){var o=this.validateSchema(t,i,r,n);return void 0===o||!(o&&o.errors.length)}return!0}};var d=f.prototype.types={};d.string=function(t){return"string"==typeof t},d.number=function(t){return"number"==typeof t&&isFinite(t)},d.integer=function(t){return"number"==typeof t&&t%1===0},d.boolean=function(t){return"boolean"==typeof t},d.array=function(t){return Array.isArray(t)},d.null=function(t){return null===t},d.date=function(t){return t instanceof Date},d.any=function(t){return!0},d.object=function(t){return t&&"object"===typeof t&&!Array.isArray(t)&&!(t instanceof Date)},t.exports=f},function(t,e,r){"use strict";var n=r(426),i=n.ValidatorResult,o=n.SchemaError,a={ignoreProperties:{id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0}},s=a.validators={};function u(t,e,r,n,i){var o=e.throwError,a=e.throwAll;e.throwError=!1,e.throwAll=!1;var s=this.validateSchema(t,i,e,r);return e.throwError=o,e.throwAll=a,!s.valid&&n instanceof Function&&n(s),s.valid}function c(t,e){if(Object.hasOwnProperty.call(t,e))return t[e];if(e in t)for(;t=Object.getPrototypeOf(t);)if(Object.propertyIsEnumerable.call(t,e))return t[e]}function l(t,e,r,n,i,o){if(this.types.object(t)&&(!e.properties||void 0===e.properties[i]))if(!1===e.additionalProperties)o.addError({name:"additionalProperties",argument:i,message:"is not allowed to have the additional property "+JSON.stringify(i)});else{var a=e.additionalProperties||{};"function"==typeof r.preValidateProperty&&r.preValidateProperty(t,i,a,r,n);var s=this.validateSchema(t[i],a,r,n.makeChild(a,i));s.instance!==o.instance[i]&&(o.instance[i]=s.instance),o.importErrors(s)}}s.type=function(t,e,r,n){if(void 0===t)return null;var o=new i(t,e,r,n),a=Array.isArray(e.type)?e.type:[e.type];if(!a.some(this.testType.bind(this,t,e,r,n))){var s=a.map((function(t){if(t){var e=t.$id||t.id;return e?"<"+e+">":t+""}}));o.addError({name:"type",argument:s,message:"is not of a type(s) "+s})}return o},s.anyOf=function(t,e,r,n){if(void 0===t)return null;var a=new i(t,e,r,n),s=new i(t,e,r,n);if(!Array.isArray(e.anyOf))throw new o("anyOf must be an array");if(!e.anyOf.some(u.bind(this,t,r,n,(function(t){s.importErrors(t)})))){var c=e.anyOf.map((function(t,e){var r=t.$id||t.id;return r?"<"+r+">":t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+e+"]"}));r.nestedErrors&&a.importErrors(s),a.addError({name:"anyOf",argument:c,message:"is not any of "+c.join(",")})}return a},s.allOf=function(t,e,r,n){if(void 0===t)return null;if(!Array.isArray(e.allOf))throw new o("allOf must be an array");var a=new i(t,e,r,n),s=this;return e.allOf.forEach((function(e,i){var o=s.validateSchema(t,e,r,n);if(!o.valid){var u=e.$id||e.id||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+i+"]";a.addError({name:"allOf",argument:{id:u,length:o.errors.length,valid:o},message:"does not match allOf schema "+u+" with "+o.errors.length+" error[s]:"}),a.importErrors(o)}})),a},s.oneOf=function(t,e,r,n){if(void 0===t)return null;if(!Array.isArray(e.oneOf))throw new o("oneOf must be an array");var a=new i(t,e,r,n),s=new i(t,e,r,n),c=e.oneOf.filter(u.bind(this,t,r,n,(function(t){s.importErrors(t)}))).length,l=e.oneOf.map((function(t,e){return t.$id||t.id||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+e+"]"}));return 1!==c&&(r.nestedErrors&&a.importErrors(s),a.addError({name:"oneOf",argument:l,message:"is not exactly one from "+l.join(",")})),a},s.if=function(t,e,r,o){if(void 0===t)return null;if(!n.isSchema(e.if))throw new Error('Expected "if" keyword to be a schema');var a,s=u.call(this,t,r,o,null,e.if),c=new i(t,e,r,o);if(s){if(void 0===e.then)return;if(!n.isSchema(e.then))throw new Error('Expected "then" keyword to be a schema');a=this.validateSchema(t,e.then,r,o.makeChild(e.then)),c.importErrors(a)}else{if(void 0===e.else)return;if(!n.isSchema(e.else))throw new Error('Expected "else" keyword to be a schema');a=this.validateSchema(t,e.else,r,o.makeChild(e.else)),c.importErrors(a)}return c},s.propertyNames=function(t,e,r,a){if(this.types.object(t)){var s=new i(t,e,r,a),u=void 0!==e.propertyNames?e.propertyNames:{};if(!n.isSchema(u))throw new o('Expected "propertyNames" to be a schema (object or boolean)');for(var l in t)if(void 0!==c(t,l)){var f=this.validateSchema(l,u,r,a.makeChild(u));s.importErrors(f)}return s}},s.properties=function(t,e,r,n){if(this.types.object(t)){var a=new i(t,e,r,n),s=e.properties||{};for(var u in s){var l=s[u];if(void 0!==l){if(null===l)throw new o('Unexpected null, expected schema in "properties"');"function"==typeof r.preValidateProperty&&r.preValidateProperty(t,u,l,r,n);var f=c(t,u),h=this.validateSchema(f,l,r,n.makeChild(l,u));h.instance!==a.instance[u]&&(a.instance[u]=h.instance),a.importErrors(h)}}return a}},s.patternProperties=function(t,e,r,n){if(this.types.object(t)){var a=new i(t,e,r,n),s=e.patternProperties||{};for(var u in t){var c=!0;for(var f in s){var h=s[f];if(void 0!==h){if(null===h)throw new o('Unexpected null, expected schema in "patternProperties"');try{var d=new RegExp(f,"u")}catch(g){d=new RegExp(f)}if(d.test(u)){c=!1,"function"==typeof r.preValidateProperty&&r.preValidateProperty(t,u,h,r,n);var p=this.validateSchema(t[u],h,r,n.makeChild(h,u));p.instance!==a.instance[u]&&(a.instance[u]=p.instance),a.importErrors(p)}}}c&&l.call(this,t,e,r,n,u,a)}return a}},s.additionalProperties=function(t,e,r,n){if(this.types.object(t)){if(e.patternProperties)return null;var o=new i(t,e,r,n);for(var a in t)l.call(this,t,e,r,n,a,o);return o}},s.minProperties=function(t,e,r,n){if(this.types.object(t)){var o=new i(t,e,r,n);return Object.keys(t).length>=e.minProperties||o.addError({name:"minProperties",argument:e.minProperties,message:"does not meet minimum property length of "+e.minProperties}),o}},s.maxProperties=function(t,e,r,n){if(this.types.object(t)){var o=new i(t,e,r,n);return Object.keys(t).length<=e.maxProperties||o.addError({name:"maxProperties",argument:e.maxProperties,message:"does not meet maximum property length of "+e.maxProperties}),o}},s.items=function(t,e,r,n){var o=this;if(this.types.array(t)&&void 0!==e.items){var a=new i(t,e,r,n);return t.every((function(t,i){if(Array.isArray(e.items))var s=void 0===e.items[i]?e.additionalItems:e.items[i];else s=e.items;if(void 0===s)return!0;if(!1===s)return a.addError({name:"items",message:"additionalItems not permitted"}),!1;var u=o.validateSchema(t,s,r,n.makeChild(s,i));return u.instance!==a.instance[i]&&(a.instance[i]=u.instance),a.importErrors(u),!0})),a}},s.contains=function(t,e,r,o){var a=this;if(this.types.array(t)&&void 0!==e.contains){if(!n.isSchema(e.contains))throw new Error('Expected "contains" keyword to be a schema');var s=new i(t,e,r,o);return!1===t.some((function(t,n){return 0===a.validateSchema(t,e.contains,r,o.makeChild(e.contains,n)).errors.length}))&&s.addError({name:"contains",argument:e.contains,message:"must contain an item matching given schema"}),s}},s.minimum=function(t,e,r,n){if(this.types.number(t)){var o=new i(t,e,r,n);return e.exclusiveMinimum&&!0===e.exclusiveMinimum?t>e.minimum||o.addError({name:"minimum",argument:e.minimum,message:"must be greater than "+e.minimum}):t>=e.minimum||o.addError({name:"minimum",argument:e.minimum,message:"must be greater than or equal to "+e.minimum}),o}},s.maximum=function(t,e,r,n){if(this.types.number(t)){var o=new i(t,e,r,n);return e.exclusiveMaximum&&!0===e.exclusiveMaximum?te.exclusiveMinimum||o.addError({name:"exclusiveMinimum",argument:e.exclusiveMinimum,message:"must be strictly greater than "+e.exclusiveMinimum}),o}},s.exclusiveMaximum=function(t,e,r,n){if("boolean"!==typeof e.exclusiveMaximum&&this.types.number(t)){var o=new i(t,e,r,n);return t=e.minLength||o.addError({name:"minLength",argument:e.minLength,message:"does not meet minimum length of "+e.minLength}),o}},s.maxLength=function(t,e,r,n){if(this.types.string(t)){var o=new i(t,e,r,n),a=t.match(/[\uDC00-\uDFFF]/g);return t.length-(a?a.length:0)<=e.maxLength||o.addError({name:"maxLength",argument:e.maxLength,message:"does not meet maximum length of "+e.maxLength}),o}},s.minItems=function(t,e,r,n){if(this.types.array(t)){var o=new i(t,e,r,n);return t.length>=e.minItems||o.addError({name:"minItems",argument:e.minItems,message:"does not meet minimum length of "+e.minItems}),o}},s.maxItems=function(t,e,r,n){if(this.types.array(t)){var o=new i(t,e,r,n);return t.length<=e.maxItems||o.addError({name:"maxItems",argument:e.maxItems,message:"does not meet maximum length of "+e.maxItems}),o}},s.uniqueItems=function(t,e,r,n){if(!0===e.uniqueItems&&this.types.array(t)){var o=new i(t,e,r,n);return t.every(h)||o.addError({name:"uniqueItems",message:"contains duplicate item"}),o}},s.dependencies=function(t,e,r,n){if(this.types.object(t)){var o=new i(t,e,r,n);for(var a in e.dependencies)if(void 0!==t[a]){var s=e.dependencies[a],u=n.makeChild(s,a);if("string"==typeof s&&(s=[s]),Array.isArray(s))s.forEach((function(e){void 0===t[e]&&o.addError({name:"dependencies",argument:u.propertyPath,message:"property "+e+" not found, required by "+u.propertyPath})}));else{var c=this.validateSchema(t,s,r,u);o.instance!==c.instance&&(o.instance=c.instance),c&&c.errors.length&&(o.addError({name:"dependencies",argument:u.propertyPath,message:"does not meet dependency required by "+u.propertyPath}),o.importErrors(c))}}return o}},s.enum=function(t,e,r,a){if(void 0===t)return null;if(!Array.isArray(e.enum))throw new o("enum expects an array",e);var s=new i(t,e,r,a);return e.enum.some(n.deepCompareStrict.bind(null,t))||s.addError({name:"enum",argument:e.enum,message:"is not one of enum values: "+e.enum.map(String).join(",")}),s},s.const=function(t,e,r,o){if(void 0===t)return null;var a=new i(t,e,r,o);return n.deepCompareStrict(e.const,t)||a.addError({name:"const",argument:e.const,message:"does not exactly match expected constant: "+e.const}),a},s.not=s.disallow=function(t,e,r,n){var o=this;if(void 0===t)return null;var a=new i(t,e,r,n),s=e.not||e.disallow;return s?(Array.isArray(s)||(s=[s]),s.forEach((function(i){if(o.testType(t,e,r,n,i)){var s=i&&(i.$id||i.id)||i;a.addError({name:"not",argument:s,message:"is of prohibited type "+s})}})),a):null},t.exports=a},,function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(342),i=r(172),o=20;function a(t,e,r){for(var i=1634760805,a=857760878,s=2036477234,u=1797285236,c=r[3]<<24|r[2]<<16|r[1]<<8|r[0],l=r[7]<<24|r[6]<<16|r[5]<<8|r[4],f=r[11]<<24|r[10]<<16|r[9]<<8|r[8],h=r[15]<<24|r[14]<<16|r[13]<<8|r[12],d=r[19]<<24|r[18]<<16|r[17]<<8|r[16],p=r[23]<<24|r[22]<<16|r[21]<<8|r[20],g=r[27]<<24|r[26]<<16|r[25]<<8|r[24],m=r[31]<<24|r[30]<<16|r[29]<<8|r[28],y=e[3]<<24|e[2]<<16|e[1]<<8|e[0],b=e[7]<<24|e[6]<<16|e[5]<<8|e[4],v=e[11]<<24|e[10]<<16|e[9]<<8|e[8],A=e[15]<<24|e[14]<<16|e[13]<<8|e[12],w=i,_=a,E=s,I=u,S=c,M=l,C=f,k=h,x=d,B=p,O=g,T=m,R=y,P=b,N=v,j=A,D=0;D>>16|R<<16)|0)>>>20|S<<12,M=(M^=B=B+(P=(P^=_=_+M|0)>>>16|P<<16)|0)>>>20|M<<12,C=(C^=O=O+(N=(N^=E=E+C|0)>>>16|N<<16)|0)>>>20|C<<12,k=(k^=T=T+(j=(j^=I=I+k|0)>>>16|j<<16)|0)>>>20|k<<12,C=(C^=O=O+(N=(N^=E=E+C|0)>>>24|N<<8)|0)>>>25|C<<7,k=(k^=T=T+(j=(j^=I=I+k|0)>>>24|j<<8)|0)>>>25|k<<7,M=(M^=B=B+(P=(P^=_=_+M|0)>>>24|P<<8)|0)>>>25|M<<7,S=(S^=x=x+(R=(R^=w=w+S|0)>>>24|R<<8)|0)>>>25|S<<7,M=(M^=O=O+(j=(j^=w=w+M|0)>>>16|j<<16)|0)>>>20|M<<12,C=(C^=T=T+(R=(R^=_=_+C|0)>>>16|R<<16)|0)>>>20|C<<12,k=(k^=x=x+(P=(P^=E=E+k|0)>>>16|P<<16)|0)>>>20|k<<12,S=(S^=B=B+(N=(N^=I=I+S|0)>>>16|N<<16)|0)>>>20|S<<12,k=(k^=x=x+(P=(P^=E=E+k|0)>>>24|P<<8)|0)>>>25|k<<7,S=(S^=B=B+(N=(N^=I=I+S|0)>>>24|N<<8)|0)>>>25|S<<7,C=(C^=T=T+(R=(R^=_=_+C|0)>>>24|R<<8)|0)>>>25|C<<7,M=(M^=O=O+(j=(j^=w=w+M|0)>>>24|j<<8)|0)>>>25|M<<7;n.writeUint32LE(w+i|0,t,0),n.writeUint32LE(_+a|0,t,4),n.writeUint32LE(E+s|0,t,8),n.writeUint32LE(I+u|0,t,12),n.writeUint32LE(S+c|0,t,16),n.writeUint32LE(M+l|0,t,20),n.writeUint32LE(C+f|0,t,24),n.writeUint32LE(k+h|0,t,28),n.writeUint32LE(x+d|0,t,32),n.writeUint32LE(B+p|0,t,36),n.writeUint32LE(O+g|0,t,40),n.writeUint32LE(T+m|0,t,44),n.writeUint32LE(R+y|0,t,48),n.writeUint32LE(P+b|0,t,52),n.writeUint32LE(N+v|0,t,56),n.writeUint32LE(j+A|0,t,60)}function s(t,e,r,n,o){if(void 0===o&&(o=0),32!==t.length)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}e.streamXOR=s,e.stream=function(t,e,r,n){return void 0===n&&(n=0),i.wipe(r),s(t,e,r,r,n)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(903),i=r(172);e.DIGEST_LENGTH=16;var o=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=t[0]|t[1]<<8;this._r[0]=8191&r;var n=t[2]|t[3]<<8;this._r[1]=8191&(r>>>13|n<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(n>>>10|i<<6);var o=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var a=t[8]|t[9]<<8;this._r[4]=255&(o>>>4|a<<12),this._r[5]=a>>>1&8190;var s=t[10]|t[11]<<8;this._r[6]=8191&(a>>>14|s<<2);var u=t[12]|t[13]<<8;this._r[7]=8065&(s>>>11|u<<5);var c=t[14]|t[15]<<8;this._r[8]=8191&(u>>>8|c<<8),this._r[9]=c>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(t,e,r){for(var n=this._fin?0:2048,i=this._h[0],o=this._h[1],a=this._h[2],s=this._h[3],u=this._h[4],c=this._h[5],l=this._h[6],f=this._h[7],h=this._h[8],d=this._h[9],p=this._r[0],g=this._r[1],m=this._r[2],y=this._r[3],b=this._r[4],v=this._r[5],A=this._r[6],w=this._r[7],_=this._r[8],E=this._r[9];r>=16;){var I=t[e+0]|t[e+1]<<8;i+=8191&I;var S=t[e+2]|t[e+3]<<8;o+=8191&(I>>>13|S<<3);var M=t[e+4]|t[e+5]<<8;a+=8191&(S>>>10|M<<6);var C=t[e+6]|t[e+7]<<8;s+=8191&(M>>>7|C<<9);var k=t[e+8]|t[e+9]<<8;u+=8191&(C>>>4|k<<12),c+=k>>>1&8191;var x=t[e+10]|t[e+11]<<8;l+=8191&(k>>>14|x<<2);var B=t[e+12]|t[e+13]<<8;f+=8191&(x>>>11|B<<5);var O=t[e+14]|t[e+15]<<8,T=0,R=T;R+=i*p,R+=o*(5*E),R+=a*(5*_),R+=s*(5*w),T=(R+=u*(5*A))>>>13,R&=8191,R+=c*(5*v),R+=l*(5*b),R+=f*(5*y),R+=(h+=8191&(B>>>8|O<<8))*(5*m);var P=T+=(R+=(d+=O>>>5|n)*(5*g))>>>13;P+=i*g,P+=o*p,P+=a*(5*E),P+=s*(5*_),T=(P+=u*(5*w))>>>13,P&=8191,P+=c*(5*A),P+=l*(5*v),P+=f*(5*b),P+=h*(5*y),T+=(P+=d*(5*m))>>>13,P&=8191;var N=T;N+=i*m,N+=o*g,N+=a*p,N+=s*(5*E),T=(N+=u*(5*_))>>>13,N&=8191,N+=c*(5*w),N+=l*(5*A),N+=f*(5*v),N+=h*(5*b);var j=T+=(N+=d*(5*y))>>>13;j+=i*y,j+=o*m,j+=a*g,j+=s*p,T=(j+=u*(5*E))>>>13,j&=8191,j+=c*(5*_),j+=l*(5*w),j+=f*(5*A),j+=h*(5*v);var D=T+=(j+=d*(5*b))>>>13;D+=i*b,D+=o*y,D+=a*m,D+=s*g,T=(D+=u*p)>>>13,D&=8191,D+=c*(5*E),D+=l*(5*_),D+=f*(5*w),D+=h*(5*A);var L=T+=(D+=d*(5*v))>>>13;L+=i*v,L+=o*b,L+=a*y,L+=s*m,T=(L+=u*g)>>>13,L&=8191,L+=c*p,L+=l*(5*E),L+=f*(5*_),L+=h*(5*w);var F=T+=(L+=d*(5*A))>>>13;F+=i*A,F+=o*v,F+=a*b,F+=s*y,T=(F+=u*m)>>>13,F&=8191,F+=c*g,F+=l*p,F+=f*(5*E),F+=h*(5*_);var U=T+=(F+=d*(5*w))>>>13;U+=i*w,U+=o*A,U+=a*v,U+=s*b,T=(U+=u*y)>>>13,U&=8191,U+=c*m,U+=l*g,U+=f*p,U+=h*(5*E);var Q=T+=(U+=d*(5*_))>>>13;Q+=i*_,Q+=o*w,Q+=a*A,Q+=s*v,T=(Q+=u*b)>>>13,Q&=8191,Q+=c*y,Q+=l*m,Q+=f*g,Q+=h*p;var G=T+=(Q+=d*(5*E))>>>13;G+=i*E,G+=o*_,G+=a*w,G+=s*A,T=(G+=u*v)>>>13,G&=8191,G+=c*b,G+=l*y,G+=f*m,G+=h*g,i=R=8191&(T=(T=((T+=(G+=d*p)>>>13)<<2)+T|0)+(R&=8191)|0),o=P+=T>>>=13,a=N&=8191,s=j&=8191,u=D&=8191,c=L&=8191,l=F&=8191,f=U&=8191,h=Q&=8191,d=G&=8191,e+=16,r-=16}this._h[0]=i,this._h[1]=o,this._h[2]=a,this._h[3]=s,this._h[4]=u,this._h[5]=c,this._h[6]=l,this._h[7]=f,this._h[8]=h,this._h[9]=d},t.prototype.finish=function(t,e){void 0===e&&(e=0);var r,n,i,o,a=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(r=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=r,r=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*r,r=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=r,r=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=r,a[0]=this._h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this._h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(n=~n,o=0;o<10;o++)this._h[o]=this._h[o]&n|a[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return t[e+0]=this._h[0]>>>0,t[e+1]=this._h[0]>>>8,t[e+2]=this._h[1]>>>0,t[e+3]=this._h[1]>>>8,t[e+4]=this._h[2]>>>0,t[e+5]=this._h[2]>>>8,t[e+6]=this._h[3]>>>0,t[e+7]=this._h[3]>>>8,t[e+8]=this._h[4]>>>0,t[e+9]=this._h[4]>>>8,t[e+10]=this._h[5]>>>0,t[e+11]=this._h[5]>>>8,t[e+12]=this._h[6]>>>0,t[e+13]=this._h[6]>>>8,t[e+14]=this._h[7]>>>0,t[e+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(t){var e,r=0,n=t.length;if(this._leftover){(e=16-this._leftover)>n&&(e=n);for(var i=0;i=16&&(e=n-n%16,this._blocks(t,r,e),r+=e,n-=e),n){for(i=0;ithis.blockSize?this._inner.update(e).finish(r).clean():r.set(e);for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:e.defaultRandomSource).randomBytes(t)}e.defaultRandomSource=new n.SystemRandomSource,e.randomBytes=a,e.randomUint32=function(){const t=a(4,arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.defaultRandomSource),r=(0,i.readUint32LE)(t);return(0,o.wipe)(t),r};const s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function u(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultRandomSource;if(r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");let i="";const u=r.length,c=256-256%u;for(;t>0;){const e=a(Math.ceil(256*t/c),n);for(let n=0;n0;n++){const o=e[n];o1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultRandomSource;return u(Math.ceil(t/(Math.log(r.length)/Math.LN2)),r,n)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SystemRandomSource=void 0;const n=r(2883),i=r(2884);e.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new i.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(t){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(t)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRandomSource=void 0;e.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t="undefined"!==typeof self?self.crypto||self.msCrypto:null;t&&void 0!==t.getRandomValues&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const e=new Uint8Array(t);for(let r=0;re[r])return 1}return t.byteLength>e.byteLength?1:t.byteLengthi.toString(t),decode:t=>i.fromString(t)});e.identity=o},function(t,e,r){"use strict";var n=function(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,a=new Uint8Array(o);t[e];){var l=r[t.charCodeAt(e)];if(255===l)return;for(var f=0,h=o-1;(0!==l||f>>0,a[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,e++}if(" "!==t[e]){for(var d=o-i;d!==o&&0===a[d];)d++;for(var p=new Uint8Array(n+(o-d)),g=n;d!==o;)p[g++]=a[d++];return p}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var a=(o-i)*l+1>>>0,c=new Uint8Array(a);i!==o;){for(var f=e[i],h=0,d=a-1;(0!==f||h>>0,c[d]=f%s>>>0,f=f/s>>>0;if(0!==f)throw new Error("Non-zero carry");n=h,i++}for(var p=a-n;p!==a&&0===c[p];)p++;for(var g=u.repeat(r);p(t[r]=e,t)),[]),a=i.reduce(((t,e,r)=>(t[e.codePointAt(0)]=r,t)),[]);const s=n.from({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(t){return t.reduce(((t,e)=>t+=o[e]),"")},decode:function(t){const e=[];for(const r of t){const t=a[r.codePointAt(0)];if(void 0===t)throw new Error("Non-base256emoji character: ".concat(r));e.push(t)}return new Uint8Array(e)}});e.base256emoji=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(905);const i=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),o=n.from({name:"sha2-256",code:18,encode:i("SHA-256")}),a=n.from({name:"sha2-512",code:19,encode:i("SHA-512")});e.sha256=o,e.sha512=a},function(t,e,r){"use strict";var n=function t(e,r,n){r=r||[];var s=n=n||0;for(;e>=a;)r[n++]=255&e|i,e/=128;for(;e&o;)r[n++]=255&e|i,e>>>=7;return r[n]=0|e,t.bytes=n-s+1,r},i=128,o=-128,a=Math.pow(2,31);var s=function t(e,r){var n,i=0,o=0,a=r=r||0,s=e.length;do{if(a>=s)throw t.bytes=0,new RangeError("Could not decode varint");n=e[a++],i+=o<28?(n&c)<=u);return t.bytes=a-r,i},u=128,c=127;var l=Math.pow(2,7),f=Math.pow(2,14),h=Math.pow(2,21),d=Math.pow(2,28),p=Math.pow(2,35),g=Math.pow(2,42),m=Math.pow(2,49),y=Math.pow(2,56),b=Math.pow(2,63),v={encode:n,decode:s,encodingLength:function(t){return ti.create(0,o(t))};e.identity=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(379);e.code=85,e.decode=t=>n.coerce(t),e.encode=t=>n.coerce(t),e.name="raw"},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=new TextEncoder,i=new TextDecoder;e.code=512,e.decode=t=>JSON.parse(i.decode(t)),e.encode=t=>n.encode(JSON.stringify(t)),e.name="json"},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1293),i=r(692),o=r(379),a=r(905),s=r(576);e.CID=n.CID,e.varint=i,e.bytes=o,e.hasher=a,e.digest=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(904),i=r(691);e.xor=function(t,e){if(t.length!==e.length)throw new Error("Inputs should have the same length");const r=n.allocUnsafe(t.length);for(let n=0;n{setTimeout((()=>{e(!0)}),t)}))}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fromMiliseconds=e.toMiliseconds=void 0;const n=r(1294);e.toMiliseconds=function(t){return t*n.ONE_THOUSAND},e.fromMiliseconds=function(t){return Math.floor(t/n.ONE_THOUSAND)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_THOUSAND=e.ONE_HUNDRED=void 0,e.ONE_HUNDRED=100,e.ONE_THOUSAND=1e3},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=5*e.ONE_MINUTE,e.TEN_MINUTES=10*e.ONE_MINUTE,e.THIRTY_MINUTES=30*e.ONE_MINUTE,e.SIXTY_MINUTES=60*e.ONE_MINUTE,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=3*e.ONE_HOUR,e.SIX_HOURS=6*e.ONE_HOUR,e.TWELVE_HOURS=12*e.ONE_HOUR,e.TWENTY_FOUR_HOURS=24*e.ONE_HOUR,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=3*e.ONE_DAY,e.FIVE_DAYS=5*e.ONE_DAY,e.SEVEN_DAYS=7*e.ONE_DAY,e.THIRTY_DAYS=30*e.ONE_DAY,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=2*e.ONE_WEEK,e.THREE_WEEKS=3*e.ONE_WEEK,e.FOUR_WEEKS=4*e.ONE_WEEK,e.ONE_YEAR=365*e.ONE_DAY},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;class n{constructor(){this.timestamps=new Map}start(t){if(this.timestamps.has(t))throw new Error("Watch already started for label: ".concat(t));this.timestamps.set(t,{started:Date.now()})}stop(t){const e=this.get(t);if("undefined"!==typeof e.elapsed)throw new Error("Watch already stopped for label: ".concat(t));const r=Date.now()-e.started;this.timestamps.set(t,{started:e.started,elapsed:r})}get(t){const e=this.timestamps.get(t);if("undefined"===typeof e)throw new Error("No timestamp found for label: ".concat(t));return e}elapsed(t){const e=this.get(t);return e.elapsed||Date.now()-e.started}}e.Watch=n,e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});r(693).__exportStar(r(2912),e)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWatch=void 0;e.IWatch=class{}},function(t,e,r){"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,(t=>"%".concat(t.charCodeAt(0).toString(16).toUpperCase())))},function(t,e,r){"use strict";var n="%[a-f0-9]{2}",i=new RegExp("("+n+")|([^%]+?)","gi"),o=new RegExp("("+n+")+","gi");function a(t,e){try{return[decodeURIComponent(t.join(""))]}catch(i){}if(1===t.length)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],a(r),a(n))}function s(t){try{return decodeURIComponent(t)}catch(n){for(var e=t.match(i)||[],r=1;ra(o.errorCodes.rpc.parse,t),invalidRequest:t=>a(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>a(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>a(o.errorCodes.rpc.methodNotFound,t),internal:t=>a(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(e,t)},invalidInput:t=>a(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>a(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>a(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>a(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>a(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>a(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>s(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>s(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>s(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>s(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>s(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:i}=t;if(!r||"string"!==typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(e,r,i)}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=void 0,e.EVENTS={REQUEST_CHILD_ETHEREUM_ACCOUNTS_START:"walletlink_sdk.request_child_ethereum_accounts.start",REQUEST_CHILD_ETHEREUM_ACCOUNTS_RESPONSE:"walletlink_sdk.request_child_ethereum_accounts.response",STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkAnalyticsAbstract=void 0;e.WalletLinkAnalyticsAbstract=class{}},function(t,e,r){(function(e){const n=r(1300),i=r(2921),o={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},a={encodeData(t,r,o){let a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const s=["bytes32"],u=[this.hashType(t,o)];if(a){const c=(t,r,s)=>{if(void 0!==o[r])return["bytes32",null==s?"0x0000000000000000000000000000000000000000000000000000000000000000":n.keccak(this.encodeData(r,s,o,a))];if(void 0===s)throw new Error("missing value for field ".concat(t," of type ").concat(r));if("bytes"===r)return["bytes32",n.keccak(s)];if("string"===r)return"string"===typeof s&&(s=e.from(s,"utf8")),["bytes32",n.keccak(s)];if(r.lastIndexOf("]")===r.length-1){const e=r.slice(0,r.lastIndexOf("[")),o=s.map((r=>c(t,e,r)));return["bytes32",n.keccak(i.rawEncode(o.map((t=>{let[e]=t;return e})),o.map((t=>{let[,e]=t;return e}))))]}return[r,s]};for(const e of o[t]){const[t,n]=c(e.name,e.type,r[e.name]);s.push(t),u.push(n)}}else for(const i of o[t]){let t=r[i.name];if(void 0!==t)if("bytes"===i.type)s.push("bytes32"),t=n.keccak(t),u.push(t);else if("string"===i.type)s.push("bytes32"),"string"===typeof t&&(t=e.from(t,"utf8")),t=n.keccak(t),u.push(t);else if(void 0!==o[i.type])s.push("bytes32"),t=n.keccak(this.encodeData(i.type,t,o,a)),u.push(t);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");s.push(i.type),u.push(t)}}return i.rawEncode(s,u)},encodeType(t,e){let r="",n=this.findTypeDependencies(t,e).filter((e=>e!==t));n=[t].concat(n.sort());for(const i of n){if(!e[i])throw new Error("No type definition specified: "+i);r+=i+"("+e[i].map((t=>{let{name:e,type:r}=t;return r+" "+e})).join(",")+")"}return r},findTypeDependencies(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(t=t.match(/^\w*/)[0],r.includes(t)||void 0===e[t])return r;r.push(t);for(const n of e[t])for(const t of this.findTypeDependencies(n.type,e,r))!r.includes(t)&&r.push(t);return r},hashStruct(t,e,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return n.keccak(this.encodeData(t,e,r,i))},hashType(t,e){return n.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const r in o.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=this.sanitizeData(t),o=[e.from("1901","hex")];return o.push(this.hashStruct("EIP712Domain",i.domain,i.types,r)),"EIP712Domain"!==i.primaryType&&o.push(this.hashStruct(i.primaryType,i.message,i.types,r)),n.keccak(e.concat(o))}};t.exports={TYPED_MESSAGE_SCHEMA:o,TypedDataUtils:a,hashForSignTypedDataLegacy:function(t){return function(t){const e=new Error("Expect argument to be non-empty array");if("object"!==typeof t||!t.length)throw e;const r=t.map((function(t){return"bytes"===t.type?n.toBuffer(t.value):t.value})),o=t.map((function(t){return t.type})),a=t.map((function(t){if(!t.name)throw e;return t.type+" "+t.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(t.length).fill("string"),a),i.soliditySHA3(o,r)])}(t.data)},hashForSignTypedData_v3:function(t){return a.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return a.hash(t.data)}}}).call(this,r(7).Buffer)},function(t,e,r){(function(e){const n=r(1300),i=r(694);function o(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}function a(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function s(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function u(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function c(t){var e=typeof t;if("string"===e)return n.isHexString(t)?new i(n.stripHexPrefix(t),16):new i(t,10);if("number"===e)return new i(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function l(t,r){var o,f,h,d;if("address"===t)return l("uint160",c(r));if("bool"===t)return l("uint8",r?1:0);if("string"===t)return l("bytes",new e(r,"utf8"));if(function(t){return t.lastIndexOf("]")===t.length-1}(t)){if("undefined"===typeof r.length)throw new Error("Not an array?");if("dynamic"!==(o=u(t))&&0!==o&&r.length>o)throw new Error("Elements exceed array size: "+o);for(d in h=[],t=t.slice(0,t.lastIndexOf("[")),"string"===typeof r&&(r=JSON.parse(r)),r)h.push(l(t,r[d]));if("dynamic"===o){var p=l("uint256",r.length);h.unshift(p)}return e.concat(h)}if("bytes"===t)return r=new e(r),h=e.concat([l("uint256",r.length),r]),r.length%32!==0&&(h=e.concat([h,n.zeros(32-r.length%32)])),h;if(t.startsWith("bytes")){if((o=a(t))<1||o>32)throw new Error("Invalid bytes width: "+o);return n.setLengthRight(r,32)}if(t.startsWith("uint")){if((o=a(t))%8||o<8||o>256)throw new Error("Invalid uint width: "+o);if((f=c(r)).bitLength()>o)throw new Error("Supplied uint exceeds width: "+o+" vs "+f.bitLength());if(f<0)throw new Error("Supplied uint is negative");return f.toArrayLike(e,"be",32)}if(t.startsWith("int")){if((o=a(t))%8||o<8||o>256)throw new Error("Invalid int width: "+o);if((f=c(r)).bitLength()>o)throw new Error("Supplied int exceeds width: "+o+" vs "+f.bitLength());return f.toTwos(256).toArrayLike(e,"be",32)}if(t.startsWith("ufixed")){if(o=s(t),(f=c(r))<0)throw new Error("Supplied ufixed is negative");return l("uint256",f.mul(new i(2).pow(new i(o[1]))))}if(t.startsWith("fixed"))return o=s(t),l("int256",c(r).mul(new i(2).pow(new i(o[1]))));throw new Error("Unsupported or invalid type: "+t)}function f(t){return"string"===t||"bytes"===t||"dynamic"===u(t)}function h(t,r){if(t.length!==r.length)throw new Error("Number of types are not matching the values");for(var i,s,u=[],l=0;l32)throw new Error("Invalid bytes width: "+i);u.push(n.setLengthRight(h,i))}else if(f.startsWith("uint")){if((i=a(f))%8||i<8||i>256)throw new Error("Invalid uint width: "+i);if((s=c(h)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+s.bitLength());u.push(s.toArrayLike(e,"be",i/8))}else{if(!f.startsWith("int"))throw new Error("Unsupported or invalid type: "+f);if((i=a(f))%8||i<8||i>256)throw new Error("Invalid int width: "+i);if((s=c(h)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+s.bitLength());u.push(s.toTwos(i).toArrayLike(e,"be",i/8))}}return e.concat(u)}t.exports={rawEncode:function(t,r){var n=[],i=[],a=32*t.length;for(var s in t){var u=o(t[s]),c=l(u,r[s]);f(u)?(n.push(l("uint256",a)),i.push(c),a+=c.length):n.push(c)}return e.concat(n.concat(i))},solidityPack:h,soliditySHA3:function(t,e){return n.keccak(h(t,e))}}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filterFromParam=e.FilterPolyfill=void 0;const n=r(914),i=r(427),o={jsonrpc:"2.0",id:0};function a(t){return{fromBlock:u(t.fromBlock),toBlock:u(t.toBlock),addresses:void 0===t.address?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}function s(t){const e={fromBlock:c(t.fromBlock),toBlock:c(t.toBlock),topics:t.topics};return null!==t.addresses&&(e.address=t.addresses),e}function u(t){if(void 0===t||"latest"===t||"pending"===t)return"latest";if("earliest"===t)return(0,n.IntNumber)(0);if((0,i.isHexString)(t))return(0,i.intNumberFromHexString)(t);throw new Error("Invalid block option: ".concat(String(t)))}function c(t){return"latest"===t?t:(0,i.hexStringFromIntNumber)(t)}function l(){return Object.assign(Object.assign({},o),{error:{code:-32e3,message:"filter not found"}})}function f(){return Object.assign(Object.assign({},o),{result:[]})}e.FilterPolyfill=class{constructor(t){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,n.IntNumber)(1),this.provider=t}async newFilter(t){const e=a(t),r=this.makeFilterId(),n=await this.setInitialCursorPosition(r,e.fromBlock);return console.log("Installing new log filter(".concat(r,"):"),e,"initial cursor position:",n),this.logFilters.set(r,e),this.setFilterTimeout(r),(0,i.hexStringFromIntNumber)(r)}async newBlockFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log("Installing new block filter (".concat(t,") with initial cursor position:"),e),this.blockFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}async newPendingTransactionFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log("Installing new block filter (".concat(t,") with initial cursor position:"),e),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}uninstallFilter(t){const e=(0,i.intNumberFromHexString)(t);return console.log("Uninstalling filter (".concat(e,")")),this.deleteFilter(e),!0}getFilterChanges(t){const e=(0,i.intNumberFromHexString)(t);return this.timeouts.has(e)&&this.setFilterTimeout(e),this.logFilters.has(e)?this.getLogFilterChanges(e):this.blockFilters.has(e)?this.getBlockFilterChanges(e):this.pendingTransactionFilters.has(e)?this.getPendingTransactionFilterChanges(e):Promise.resolve(l())}async getFilterLogs(t){const e=(0,i.intNumberFromHexString)(t),r=this.logFilters.get(e);return r?this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[s(r)]})):l()}makeFilterId(){return(0,n.IntNumber)(++this.nextFilterId)}sendAsyncPromise(t){return new Promise(((e,r)=>{this.provider.sendAsync(t,((t,n)=>t?r(t):Array.isArray(n)||null==n?r(new Error("unexpected response received: ".concat(JSON.stringify(n)))):void e(n)))}))}deleteFilter(t){console.log("Deleting filter (".concat(t,")")),this.logFilters.delete(t),this.blockFilters.delete(t),this.pendingTransactionFilters.delete(t),this.cursors.delete(t),this.timeouts.delete(t)}async getLogFilterChanges(t){const e=this.logFilters.get(t),r=this.cursors.get(t);if(!r||!e)return l();const a=await this.getCurrentBlockHeight(),u="latest"===e.toBlock?a:e.toBlock;if(r>a)return f();if(r>e.toBlock)return f();console.log("Fetching logs from ".concat(r," to ").concat(u," for filter ").concat(t));const c=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[s(Object.assign(Object.assign({},e),{fromBlock:r,toBlock:u}))]}));if(Array.isArray(c.result)){const e=c.result.map((t=>(0,i.intNumberFromHexString)(t.blockNumber||"0x0"))),o=Math.max(...e);if(o&&o>r){const e=(0,n.IntNumber)(o+1);console.log("Moving cursor position for filter (".concat(t,") from ").concat(r," to ").concat(e)),this.cursors.set(t,e)}}return c}async getBlockFilterChanges(t){const e=this.cursors.get(t);if(!e)return l();const r=await this.getCurrentBlockHeight();if(e>r)return f();console.log("Fetching blocks from ".concat(e," to ").concat(r," for filter (").concat(t,")"));const a=(await Promise.all((0,i.range)(e,r+1).map((t=>this.getBlockHashByNumber((0,n.IntNumber)(t)))))).filter((t=>!!t)),s=(0,n.IntNumber)(e+a.length);return console.log("Moving cursor position for filter (".concat(t,") from ").concat(e," to ").concat(s)),this.cursors.set(t,s),Object.assign(Object.assign({},o),{result:a})}async getPendingTransactionFilterChanges(t){return Promise.resolve(f())}async setInitialCursorPosition(t,e){const r=await this.getCurrentBlockHeight(),n="number"===typeof e&&e>r?e:r;return this.cursors.set(t,n),n}setFilterTimeout(t){const e=this.timeouts.get(t);e&&window.clearTimeout(e);const r=window.setTimeout((()=>{console.log("Filter (".concat(t,") timed out")),this.deleteFilter(t)}),3e5);this.timeouts.set(t,r)}async getCurrentBlockHeight(){const{result:t}=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(t))}async getBlockHashByNumber(t){const e=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getBlockByNumber",params:[(0,i.hexStringFromIntNumber)(t),!1]}));return e.result&&"string"===typeof e.result.hash?(0,i.ensureHexString)(e.result.hash):null}},e.filterFromParam=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONRPCMethod=void 0,function(t){t.eth_accounts="eth_accounts",t.eth_coinbase="eth_coinbase",t.net_version="net_version",t.eth_chainId="eth_chainId",t.eth_uninstallFilter="eth_uninstallFilter",t.eth_requestAccounts="eth_requestAccounts",t.eth_sign="eth_sign",t.eth_ecRecover="eth_ecRecover",t.personal_sign="personal_sign",t.personal_ecRecover="personal_ecRecover",t.eth_signTransaction="eth_signTransaction",t.eth_sendRawTransaction="eth_sendRawTransaction",t.eth_sendTransaction="eth_sendTransaction",t.eth_signTypedData_v1="eth_signTypedData_v1",t.eth_signTypedData_v2="eth_signTypedData_v2",t.eth_signTypedData_v3="eth_signTypedData_v3",t.eth_signTypedData_v4="eth_signTypedData_v4",t.eth_signTypedData="eth_signTypedData",t.walletlink_arbitrary="walletlink_arbitrary",t.wallet_addEthereumChain="wallet_addEthereumChain",t.wallet_switchEthereumChain="wallet_switchEthereumChain",t.wallet_watchAsset="wallet_watchAsset",t.eth_subscribe="eth_subscribe",t.eth_unsubscribe="eth_unsubscribe",t.eth_newFilter="eth_newFilter",t.eth_newBlockFilter="eth_newBlockFilter",t.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",t.eth_getFilterChanges="eth_getFilterChanges",t.eth_getFilterLogs="eth_getFilterLogs"}(e.JSONRPCMethod||(e.JSONRPCMethod={}))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionManager=void 0;const n=r(2925),i=r(2928),o=()=>{};e.SubscriptionManager=class{constructor(t){const e=new n({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:r,middleware:o}=i({blockTracker:e,provider:t});this.events=r,this.subscriptionMiddleware=o}async handleRequest(t){const e={};return await this.subscriptionMiddleware(t,e,o,o),e}destroy(){this.subscriptionMiddleware.destroy()}}},function(t,e,r){const n=r(1301),i=r(2926);function o(t,e){return new Promise((r=>{const n=setTimeout(r,t);n.unref&&e&&n.unref()}))}t.exports=class extends i{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");const e=t.pollingInterval||2e4,r=t.retryTimeout||e/10,n=void 0===t.keepEventLoopActive||t.keepEventLoopActive,i=t.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:e},t)),this._provider=t.provider,this._pollingInterval=e,this._retryTimeout=r,this._keepEventLoopActive=n,this._setSkipCacheFlag=i}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch((t=>this.emit("error",t)))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await o(this._pollingInterval,!this._keepEventLoopActive)}catch(t){const r=new Error("PollingBlockTracker - encountered an error while attempting to update latest block:\n".concat(t.stack));try{this.emit("error",r)}catch(e){console.error(r)}await o(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0);const e=await n((e=>this._provider.sendAsync(t,e)))();if(e.error)throw new Error("PollingBlockTracker - encountered error fetching block:\n".concat(e.error));return e.result}}},function(t,e,r){r(1302),r(1301);const n=r(2927),i=(t,e)=>t+e,o=["sync","latest"];function a(t){return Number.parseInt(t,16)}t.exports=class extends n{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._blockResetDuration=t.blockResetDuration||2e4,this._blockResetTimeout,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){if(this._currentBlock)return this._currentBlock;return await new Promise((t=>this.once("latest",t)))}removeAllListeners(t){t?super.removeAllListeners(t):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(t,e){o.includes(t)&&this._maybeStart()}_onRemoveListener(t,e){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return o.map((t=>this.listenerCount(t))).reduce(i)}_newPotentialLatest(t){const e=this._currentBlock;e&&a(t)<=a(e)||this._setCurrentBlock(t)}_setCurrentBlock(t){const e=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:e,newBlock:t})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}},function(t,e,r){const n=r(464),i=r(61);var o="object"===typeof Reflect?Reflect:null,a=o&&"function"===typeof o.apply?o.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};function s(){i.call(this)}function u(t,e,r){try{a(t,e,r)}catch(n){setTimeout((()=>{throw n}))}}t.exports=s,n.inherits(s,i),s.prototype.emit=function(t){for(var e=[],r=1;r0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[t];if(void 0===s)return!1;if("function"===typeof s)u(s,this,e);else{var c=s.length,l=function(t,e){for(var r=new Array(e),n=0;n{e.removeListener("sync",o.update)},update:async t=>{let{oldBlock:e,newBlock:i}=t;const o=i,a=u(e);(await c({provider:r,fromBlock:a,toBlock:o})).map(l).forEach((t=>{m(n,t)}))}};return e.on("sync",o.update),o}function g(t){let{subId:e,filter:r}=t;r.on("update",(t=>m(e,t)));return{type:i,destroy:async()=>await h.uninstallFilter(r.idHex)}}})),eth_unsubscribe:o((async function(t,e){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const r=t.params[0],n=f[r];if(!n)return void(e.result=!1);delete f[r],await n.destroy(),e.result=!0}))});return g.destroy=function(){p.removeAllListeners();for(const t in f)f[t].destroy(),delete f[t];d=!0},{events:p,middleware:g};function m(t,e){p.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},function(t,e){t.exports=function(t){return(e,r,n,i)=>{const o=t[e.method];return void 0===o?n():"function"===typeof o?o(e,r,n,i):(r.result=o,i())}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;const n=r(1305);e.createIdRemapMiddleware=function(){return(t,e,r,i)=>{const o=t.id,a=n.getUniqueId();t.id=a,e.id=a,r((r=>{t.id=o,e.id=o,r()}))}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return async(e,r,n,i)=>{let o;const a=new Promise((t=>{o=t}));let s=null,u=!1;const c=async()=>{u=!0,n((t=>{s=t,o()})),await a};try{await t(e,r,c),u?(await a,s(null)):i(null)}catch(l){s?s(l):i(l)}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return(e,r,n,i)=>{const o=t[e.method];return void 0===o?n():"function"===typeof o?o(e,r,n,i):(r.result=o,i())}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const n=r(915);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});const i=r(1307);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=r(2934);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const a=r(916);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const n=r(915),i=r(1307),o=r(916);function a(t,e){const[r,o]=u(e);return new n.EthereumRpcError(t,r||i.getMessageFromCode(t),o)}function s(t,e){const[r,o]=u(e);return new n.EthereumProviderError(t,r||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"===typeof t)return[t];if("object"===typeof t&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&"string"!==typeof e)throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}e.ethErrors={rpc:{parse:t=>a(o.errorCodes.rpc.parse,t),invalidRequest:t=>a(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>a(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>a(o.errorCodes.rpc.methodNotFound,t),internal:t=>a(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(e,t)},invalidInput:t=>a(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>a(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>a(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>a(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>a(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>a(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>s(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>s(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>s(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>s(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>s(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:i}=t;if(!r||"string"!==typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(e,r,i)}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;const n=r(1306);e.mergeMiddleware=function(t){const e=new n.JsonRpcEngine;return t.forEach((t=>e.push(t))),e.asMiddleware()}},function(t,e,r){const n=r(3300).Mutex,{createAsyncMiddleware:i}=r(1304),o=r(1303),a=r(2937),s=r(2940),u=r(2941),{intToHex:c,hexToInt:l}=r(577);function f(t){return h((async function(){const e=await t(...arguments);return c(e.id)}))}function h(t){return i((async(e,r)=>{const n=await t.apply(null,e.params);r.result=n}))}function d(t,e){const r=[];for(let n in t)r.push(t[n]);return r}t.exports=function(t){let{blockTracker:e,provider:r}=t,i=0,p={};const g=new n,m=function(t){let{mutex:e}=t;return t=>async(r,n,i,o)=>{(await e.acquire())(),t(r,n,i,o)}}({mutex:g}),y=o({eth_newFilter:m(f(v)),eth_newBlockFilter:m(f(A)),eth_newPendingTransactionFilter:m(f(w)),eth_uninstallFilter:m(h(I)),eth_getFilterChanges:m(h(_)),eth_getFilterLogs:m(h(E))}),b=async t=>{let{oldBlock:e,newBlock:r}=t;if(0===p.length)return;const n=await g.acquire();try{await Promise.all(d(p).map((async t=>{try{await t.update({oldBlock:e,newBlock:r})}catch(n){console.error(n)}})))}catch(i){console.error(i)}n()};return y.newLogFilter=v,y.newBlockFilter=A,y.newPendingTransactionFilter=w,y.uninstallFilter=I,y.getFilterChanges=_,y.getFilterLogs=E,y.destroy=()=>{!async function(){const t=d(p).length;p={},M({prevFilterCount:t,newFilterCount:0})}()},y;async function v(t){const e=new a({provider:r,params:t});await S(e);return e}async function A(){const t=new s({provider:r});await S(t);return t}async function w(){const t=new u({provider:r});await S(t);return t}async function _(t){const e=l(t),r=p[e];if(!r)throw new Error('No filter for index "'.concat(e,'"'));return r.getChangesAndClear()}async function E(t){const e=l(t),r=p[e];if(!r)throw new Error('No filter for index "'.concat(e,'"'));return"log"===r.type?results=r.getAllResults():results=[],results}async function I(t){const e=l(t),r=p[e],n=Boolean(r);return n&&await async function(t){const e=d(p).length;delete p[t];const r=d(p).length;M({prevFilterCount:e,newFilterCount:r})}(e),n}async function S(t){const r=d(p).length,n=await e.getLatestBlock();await t.initialize({currentBlock:n}),i++,p[i]=t,t.id=i,t.idHex=c(i);return M({prevFilterCount:r,newFilterCount:d(p).length}),i}function M(t){let{prevFilterCount:r,newFilterCount:n}=t;0===r&&n>0?e.on("sync",b):r>0&&0===n&&e.removeListener("sync",b)}}},function(t,e,r){const n=r(1302),i=r(2938),o=r(2939),{bnToHex:a,hexToInt:s,incrementHexInt:u,minBlockRef:c,blockRefIsNumber:l}=r(577);t.exports=class extends o{constructor(t){let{provider:e,params:r}=t;super(),this.type="log",this.ethQuery=new n(e),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},r),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((t=>t.toLowerCase())))}async initialize(t){let{currentBlock:e}=t,r=this.params.fromBlock;["latest","pending"].includes(r)&&(r=e),"earliest"===r&&(r="0x0"),this.params.fromBlock=r;const n=c(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:n}),o=await this._fetchLogs(i);this.addInitialResults(o)}async update(t){let{oldBlock:e,newBlock:r}=t;const n=r;let i;i=e?u(e):r;const o=Object.assign({},this.params,{fromBlock:i,toBlock:n}),a=(await this._fetchLogs(o)).filter((t=>this.matchLog(t)));this.addResults(a)}async _fetchLogs(t){return await i((e=>this.ethQuery.getLogs(t,e)))()}matchLog(t){if(s(this.params.fromBlock)>=s(t.blockNumber))return!1;if(l(this.params.toBlock)&&s(this.params.toBlock)<=s(t.blockNumber))return!1;const e=t.address&&t.address.toLowerCase();if(this.params.address&&e&&!this.params.address.includes(e))return!1;return this.params.topics.every(((e,r)=>{let n=t.topics[r];if(!n)return!1;n=n.toLowerCase();let i=Array.isArray(e)?e:[e];if(i.includes(null))return!0;i=i.map((t=>t.toLowerCase()));return i.includes(n)}))}}},function(t,e,r){"use strict";const n=(t,e,r,n)=>function(){for(var i=arguments.length,o=new Array(i),a=0;a{e.multiArgs?o.push((function(){for(var t=arguments.length,r=new Array(t),n=0;n{t?a(t):i(e)})):o.push(i);const s=this===r?n:this;Reflect.apply(t,s,o)}))},i=new WeakMap;t.exports=(t,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};const r=typeof t;if(null===t||"object"!==r&&"function"!==r)throw new TypeError("Expected `input` to be a `Function` or `Object`, got `".concat(null===t?"null":r,"`"));const o=new WeakMap,a=new Proxy(t,{apply(t,r,i){const s=o.get(t);if(s)return Reflect.apply(s,r,i);const u=e.excludeMain?t:n(t,e,a,t);return o.set(t,u),Reflect.apply(u,r,i)},get(t,r){const s=t[r];if(!((t,r)=>{let n=i.get(t);if(n||(n={},i.set(t,n)),r in n)return n[r];const o=t=>"string"===typeof t||"symbol"===typeof r?r===t:t.test(r),a=Reflect.getOwnPropertyDescriptor(t,r),s=void 0===a||a.writable||a.configurable,u=(e.include?e.include.some(o):!e.exclude.some(o))&&s;return n[r]=u,u})(t,r)||s===Function.prototype[r])return s;const u=o.get(s);if(u)return u;if("function"===typeof s){const r=n(s,e,a,t);return o.set(s,r),r}return s}});return a}},function(t,e,r){const n=r(917);t.exports=class extends n{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(t){this.allResults=this.allResults.concat(t),super.addResults(t)}addInitialResults(t){this.allResults=this.allResults.concat(t),super.addInitialResults(t)}getAllResults(){return this.allResults}}},function(t,e,r){const n=r(917),i=r(918),{incrementHexInt:o}=r(577);t.exports=class extends n{constructor(t){let{provider:e,params:r}=t;super(),this.type="block",this.provider=e}async update(t){let{oldBlock:e,newBlock:r}=t;const n=r,a=o(e),s=(await i({provider:this.provider,fromBlock:a,toBlock:n})).map((t=>t.hash));this.addResults(s)}}},function(t,e,r){const n=r(917),i=r(918),{incrementHexInt:o}=r(577);t.exports=class extends n{constructor(t){let{provider:e}=t;super(),this.type="tx",this.provider=e}async update(t){let{oldBlock:e}=t;const r=e,n=o(e),a=await i({provider:this.provider,fromBlock:n,toBlock:r}),s=[];for(const i of a)s.push(...i.transactions);this.addResults(s)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScopedLocalStorage=void 0;e.ScopedLocalStorage=class{constructor(t){this.scope=t}setItem(t,e){localStorage.setItem(this.scopedKey(t),e)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),e=[];for(let r=0;rlocalStorage.removeItem(t)))}scopedKey(t){return"".concat(this.scope,":").concat(t)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkSdkUI=void 0;const n=r(2944),i=r(2955),o=r(2957),a=r(2959);class s extends a.WalletLinkUI{constructor(t){super(t),this.attached=!1,this.snackbar=new i.Snackbar({darkMode:t.darkMode}),this.linkFlow=new n.LinkFlow({darkMode:t.darkMode,version:t.version,sessionId:t.session.id,sessionSecret:t.session.secret,walletLinkUrl:t.walletLinkUrl,connected$:t.connected$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("WalletLinkUI is already attached");const t=document.documentElement,e=document.createElement("div");e.className="-walletlink-css-reset",t.appendChild(e),this.linkFlow.attach(e),this.snackbar.attach(e),this.attached=!0,(0,o.injectCssReset)()}setConnectDisabled(t){this.linkFlow.setConnectDisabled(t)}addEthereumChain(t){}watchAsset(t){}switchEthereumChain(t){}requestEthereumAccounts(t){this.linkFlow.open({onCancel:t.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(t){}signEthereumTransaction(t){}submitEthereumTransaction(t){}ethereumAddressFromSignedMessage(t){}showConnecting(t){let e;return e=t.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]}:{message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:t.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]},this.snackbar.presentItem(e)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(t){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}e.WalletLinkSdkUI=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkFlow=void 0;const n=r(125),i=r(119),o=r(129),a=r(2945),s=r(2949);e.LinkFlow=class{constructor(t){this.extensionUI$=new i.BehaviorSubject({}),this.subscriptions=new i.Subscription,this.isConnected=!1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=t.darkMode,this.version=t.version,this.sessionId=t.sessionId,this.sessionSecret=t.sessionSecret,this.walletLinkUrl=t.walletLinkUrl,this.isParentConnection=t.isParentConnection,this.connected$=t.connected$,fetch("https://api.wallet.coinbase.com/rpc/v2/getFeatureFlags").then((t=>t.json())).then((t=>{const e=t.result.desktop.extension_ui;"undefined"===typeof e?this.extensionUI$.next({value:!1}):this.extensionUI$.next({value:e})})).catch((t=>{console.error("Couldn't fetch feature flags - ",t),this.extensionUI$.next({value:!1})}))}attach(t){this.root=document.createElement("div"),this.root.className="-walletlink-link-flow-root",t.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe((t=>{this.isConnected!==t&&(this.isConnected=t,this.render())})))}detach(){var t;this.root&&(this.subscriptions.unsubscribe(),(0,n.render)(null,this.root),null===(t=this.root.parentElement)||void 0===t||t.removeChild(this.root))}setConnectDisabled(t){this.connectDisabled=t}open(t){this.isOpen=!0,this.onCancel=t.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){if(!this.root)return;const t=this.extensionUI$.pipe((0,o.first)((t=>void 0!==t.value))).subscribe((t=>{this.root&&(0,n.render)(t.value?(0,n.h)(s.TryExtensionLinkDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,walletLinkUrl:this.walletLinkUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,onCancel:this.onCancel,connectDisabled:this.connectDisabled}):(0,n.h)(a.LinkDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,walletLinkUrl:this.walletLinkUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,onCancel:this.onCancel}),this.root)}));this.subscriptions.add(t)}}},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDialog=void 0;const i=n(r(26)),o=r(125),a=r(695),s=n(r(2946)),u=r(1309),c=r(1310),l=r(1311);e.LinkDialog=t=>{const[e,r]=(0,a.useState)(!t.isOpen),[n,u]=(0,a.useState)(!t.isOpen);return(0,a.useEffect)((()=>{const{isOpen:e}=t,n=[window.setTimeout((()=>{u(!e)}),10)];return e?r(!1):n.push(window.setTimeout((()=>{r(!0)}),360)),()=>{n.forEach(window.clearTimeout)}}),[t.isOpen]),(0,o.h)("div",{class:(0,i.default)("-walletlink-link-dialog-container",t.darkMode&&"-walletlink-link-dialog-container-dark",e&&"-walletlink-link-dialog-container-hidden")},(0,o.h)("style",null,s.default),(0,o.h)("div",{class:(0,i.default)("-walletlink-link-dialog-backdrop",n&&"-walletlink-link-dialog-backdrop-hidden")}),(0,o.h)("div",{class:"-walletlink-link-dialog"},(0,o.h)("div",{class:(0,i.default)("-walletlink-link-dialog-box",n&&"-walletlink-link-dialog-box-hidden")},(0,o.h)(f,{darkMode:t.darkMode,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,walletLinkUrl:t.walletLinkUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection}),t.onCancel&&(0,o.h)(h,{onClick:t.onCancel}))))};const f=t=>{const e=window.encodeURIComponent(t.walletLinkUrl),r=t.isParentConnection?"parent-id":"id",n="".concat(t.walletLinkUrl,"/#/link?").concat(r,"=").concat(t.sessionId,"&secret=").concat(t.sessionSecret,"&server=").concat(e,"&v=1");return(0,o.h)("div",{class:"-walletlink-link-dialog-box-content"},(0,o.h)("h3",null,"Scan to",(0,o.h)("br",null)," Connect"),(0,o.h)("div",{class:"-walletlink-link-dialog-box-content-qrcode"},(0,o.h)("div",{class:"-walletlink-link-dialog-box-content-qrcode-wrapper"},(0,o.h)(u.QRCode,{content:n,width:224,height:224,fgColor:"#000",bgColor:"transparent"})),(0,o.h)("input",{type:"hidden",name:"walletlink-version",value:l.LIB_VERSION}),(0,o.h)("input",{type:"hidden",value:n}),!t.isConnected&&(0,o.h)("div",{class:"-walletlink-link-dialog-box-content-qrcode-connecting"},(0,o.h)(c.Spinner,{size:128,color:t.darkMode?"#fff":"#000"}),(0,o.h)("p",null,"Connecting...")),(0,o.h)("p",{title:"WalletLink v".concat(t.version)},"Powered by WalletLink")),(0,o.h)("a",{href:"".concat(t.walletLinkUrl,"/#/wallets"),target:"_blank",rel:"noopener"},"Don\u2019t have a wallet app?"))},h=t=>(0,o.h)("button",{class:"-walletlink-link-dialog-box-cancel",onClick:t.onClick},(0,o.h)("div",{class:"-walletlink-link-dialog-box-cancel-x"}))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='.-walletlink-css-reset .-walletlink-link-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-walletlink-css-reset .-walletlink-link-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.33);transition:opacity .25s}.-walletlink-css-reset .-walletlink-link-dialog-backdrop-hidden{opacity:0}.-walletlink-css-reset .-walletlink-link-dialog-box{display:flex;position:relative;flex-direction:column;background-color:#f6f6f6;border-radius:16px;box-shadow:0px 16px 24px rgba(0,0,0,.1),0px 0px 8px rgba(0,0,0,.05);transform:scale(1);transition:opacity .25s,transform .25s;overflow:hidden}.-walletlink-css-reset .-walletlink-link-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-walletlink-css-reset .-walletlink-link-dialog-box-content{padding:24px;text-align:center}.-walletlink-css-reset .-walletlink-link-dialog-box-content h3{display:block;margin-bottom:24px;text-align:left;text-transform:uppercase;font-size:22px;font-weight:bold;line-height:1.2;color:#000}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode{position:relative;display:block;margin-bottom:24px;background-color:#f6f6f6;padding:16px;border-radius:16px;box-shadow:4px 4px 8px rgba(0,0,0,.15),-8px -8px 8px #fff;overflow:hidden}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-wrapper{display:block;width:232px;height:232px;padding:4px;border-radius:4px;background:#f4f4f4;margin-bottom:16px}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-wrapper img{display:block;width:224px;height:224px}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode>p{display:block;color:gray;font-weight:bold;font-size:12px;text-align:center}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-connecting{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(246,246,246,.98)}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-connecting p{margin-top:16px;color:#333;font-size:12px;font-weight:bold}.-walletlink-css-reset .-walletlink-link-dialog-box-content a{text-align:center;cursor:pointer;transition:color .1s;font-size:14px}.-walletlink-css-reset .-walletlink-link-dialog-box-content a,.-walletlink-css-reset .-walletlink-link-dialog-box-content a:link,.-walletlink-css-reset .-walletlink-link-dialog-box-content a:visited{color:#999}.-walletlink-css-reset .-walletlink-link-dialog-box-content a:hover,.-walletlink-css-reset .-walletlink-link-dialog-box-content a:active{color:#666;text-decoration:underline}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel{position:absolute;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;top:24px;right:24px;width:24px;height:24px;border-radius:12px;background-color:#e7e7e7;cursor:pointer}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x{position:relative;display:block}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::after{content:"";position:absolute;display:block;top:-1px;left:-7px;width:14px;height:2px;background-color:#999;transition:background-color .2s}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::before{transform:rotate(45deg)}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::after{transform:rotate(135deg)}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-a,.-walletlink-css-reset .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-b{background-color:#000}.-walletlink-css-reset .-walletlink-link-dialog-container{display:block}.-walletlink-css-reset .-walletlink-link-dialog-container-hidden{display:none}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box{background-color:#2a2a2a}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content h3{color:#ccc}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode{background-color:#2a2a2a;box-shadow:4px 4px 8px rgba(0,0,0,.5),-8px -8px 8px #343434}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode>p{color:#999}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode-connecting{background:rgba(42,42,42,.98)}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode-connecting p{color:#ddd}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:link,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:visited{color:#888}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:hover,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:active{color:#aaa}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel{background-color:#333}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel-x::after{background-color:#aaa}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x::after{background-color:#eee}'},function(t,e){function r(t){this.mode=i.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e65536?(n[0]=240|(1835008&o)>>>18,n[1]=128|(258048&o)>>>12,n[2]=128|(4032&o)>>>6,n[3]=128|63&o):o>2048?(n[0]=224|(61440&o)>>>12,n[1]=128|(4032&o)>>>6,n[2]=128|63&o):o>128?(n[0]=192|(1984&o)>>>6,n[1]=128|63&o):n[0]=o,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function n(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}r.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=n.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(this.modules[t+r][e+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=y.getLostPoint(this);(0==r||t>n)&&(t=n,e=r)}return e},createMovieClip:function(t,e,r){var n=t.createEmptyMovieClip(e,r);this.make();for(var i=0;i>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(r=0;r<18;r++){n=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,n=y.getBCHTypeInfo(r),i=0;i<15;i++){var o=!t&&1==(n>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++){o=!t&&1==(n>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,n=this.moduleCount-1,i=7,o=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var s=0;s<2;s++)if(null==this.modules[n][a-s]){var u=!1;o>>i&1)),y.getMask(e,n,a-s)&&(u=!u),this.modules[n][a-s]=u,-1==--i&&(o++,i=7)}if((n+=r)<0||this.moduleCount<=n){n-=r,r=-r;break}}}},n.PAD0=236,n.PAD1=17,n.createData=function(t,e,r){for(var i=w.getRSBlocks(t,e),o=new _,a=0;a8*u)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*u+")");for(o.getLengthInBits()+4<=8*u&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*u)&&(o.put(n.PAD0,8),!(o.getLengthInBits()>=8*u));)o.put(n.PAD1,8);return n.createBytes(o,i)},n.createBytes=function(t,e){for(var r=0,n=0,i=0,o=new Array(e.length),a=new Array(e.length),s=0;s=0?h.get(d):0}}var p=0;for(l=0;l=0;)e^=y.G15<=0;)e^=y.G18<>>=1;return e},getPatternPosition:function(t){return y.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case c:return(e+r)%2==0;case l:return e%2==0;case f:return r%3==0;case h:return(e+r)%3==0;case d:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case p:return e*r%2+e*r%3==0;case g:return(e*r%2+e*r%3)%2==0;case m:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new A([1],0),r=0;r5&&(r+=3+o-5)}for(n=0;n=256;)t-=255;return b.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},v=0;v<8;v++)b.EXP_TABLE[v]=1<>>7-t%8&1)},put:function(t,e){for(var r=0;r>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var E=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function I(t){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},"string"===typeof t&&(t={content:t}),t)for(var e in t)this.options[e]=t[e];if("string"!==typeof this.options.content)throw new Error("Expected 'content' as string!");if(0===this.options.content.length)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");var r=this.options.content,i=function(t,e){for(var r=function(t){var e=encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return e.length+(e.length!=t?3:0)}(t),n=1,i=0,o=0,a=E.length;o<=a;o++){var s=E[o];if(!s)throw new Error("Content too long: expected "+i+" but got "+r);switch(e){case"L":i=s[0];break;case"M":i=s[1];break;case"Q":i=s[2];break;case"H":i=s[3];break;default:throw new Error("Unknwon error correction level: "+e)}if(r<=i)break;n++}if(n>E.length)throw new Error("Content too long");return n}(r,this.options.ecl),c=function(t){switch(t){case"L":return o;case"M":return a;case"Q":return s;case"H":return u;default:throw new Error("Unknwon error correction level: "+t)}}(this.options.ecl);this.qrcode=new n(i,c),this.qrcode.addData(r),this.qrcode.make()}I.prototype.svg=function(t){var e=this.options||{},r=this.qrcode.modules;"undefined"==typeof t&&(t={container:e.container||"svg"});for(var n="undefined"==typeof e.pretty||!!e.pretty,i=n?" ":"",o=n?"\r\n":"",a=e.width,s=e.height,u=r.length,c=a/(u+2*e.padding),l=s/(u+2*e.padding),f="undefined"!=typeof e.join&&!!e.join,h="undefined"!=typeof e.swap&&!!e.swap,d="undefined"==typeof e.xmlDeclaration||!!e.xmlDeclaration,p="undefined"!=typeof e.predefined&&!!e.predefined,g=p?i+''+o:"",m=i+''+o,y="",b="",v=0;v'+o:i+''+o}}f&&(y=i+'');let M="";if(void 0!==this.options.image&&this.options.image.svg){const t=a*this.options.image.width/100,e=s*this.options.image.height/100,r=s/2-e/2;M+=''),M+=this.options.image.svg+o,M+=""}var C="";switch(t.container){case"svg":d&&(C+=''+o),C+=''+o,C+=g+m+y,C+=M,C+="";break;case"svg-viewbox":d&&(C+=''+o),C+=''+o,C+=g+m+y,C+=M,C+="";break;case"g":C+=''+o,C+=g+m+y,C+=M,C+="";break;default:C+=(g+m+y+M).replace(/^\s+/,"")}return C},t.exports=I},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-walletlink-css-reset .-walletlink-spinner{display:inline-block}.-walletlink-css-reset .-walletlink-spinner svg{display:inline-block;animation:2s linear infinite -walletlink-spinner-svg}.-walletlink-css-reset .-walletlink-spinner svg circle{animation:1.9s ease-in-out infinite both -walletlink-spinner-circle;display:block;fill:transparent;stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -walletlink-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -walletlink-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TryExtensionLinkDialog=void 0;const i=n(r(26)),o=r(125),a=r(695),s=n(r(2950)),u=n(r(2951)),c=n(r(2952)),l=n(r(2953)),f=r(1309),h=r(1310),d=n(r(2954)),p=r(1311);e.TryExtensionLinkDialog=t=>{const[e,r]=(0,a.useState)(!t.isOpen),[n,s]=(0,a.useState)(!t.isOpen);return(0,a.useEffect)((()=>{const{isOpen:e}=t,n=[window.setTimeout((()=>{s(!e)}),10)];return e?r(!1):n.push(window.setTimeout((()=>{r(!0)}),360)),()=>{n.forEach(window.clearTimeout)}}),[t.isOpen]),(0,o.h)("div",{class:(0,i.default)("-walletlink-extension-dialog-container",e&&"-walletlink-extension-dialog-container-hidden")},(0,o.h)("style",null,d.default),(0,o.h)("div",{class:(0,i.default)("-walletlink-extension-dialog-backdrop",n&&"-walletlink-extension-dialog-backdrop-hidden")}),(0,o.h)("div",{class:"-walletlink-extension-dialog"},(0,o.h)("div",{class:(0,i.default)("-walletlink-extension-dialog-box",n&&"-walletlink-extension-dialog-box-hidden")},(0,o.h)(g,{onInstallClick:()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),t.connectDisabled?null:(0,o.h)(m,{darkMode:t.darkMode,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,walletLinkUrl:t.walletLinkUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection}),t.onCancel&&(0,o.h)(b,{onClick:t.onCancel}))))};const g=t=>(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top"},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top-install-region"},(0,o.h)("h2",null,"Try the Coinbase Wallet extension"),(0,o.h)("button",{onClick:t.onInstallClick},"Install")),(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top-info-region"},(0,o.h)(y,{icon:u.default,text:"Connect to crypto apps with one click"}),(0,o.h)(y,{icon:c.default,text:"Your private key is stored securely"}),(0,o.h)(y,{icon:s.default,text:"Works with Ethereum, Polygon, and more"}))),m=t=>{const e=window.encodeURIComponent(t.walletLinkUrl),r=t.isParentConnection?"parent-id":"id",n="".concat(t.walletLinkUrl,"/#/link?").concat(r,"=").concat(t.sessionId,"&secret=").concat(t.sessionSecret,"&server=").concat(e,"&v=1");return(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom"},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom-description-region"},(0,o.h)("h2",null,"Or scan to connect"),(0,o.h)("body",{class:"-walletlink-extension-dialog-box-bottom-description"},"Open ",(0,o.h)("a",{href:"https://wallet.coinbase.com/"},"Coinbase Wallet")," on your mobile phone and scan")),(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom-qr-region"},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom-qr-wrapper"},(0,o.h)(f.QRCode,{content:n,width:150,height:150,fgColor:"#000",bgColor:"transparent",image:{svg:l.default,width:34,height:34}})),(0,o.h)("input",{type:"hidden",name:"walletlink-version",value:p.LIB_VERSION}),(0,o.h)("input",{type:"hidden",value:n}),!t.isConnected&&(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom-qr-connecting"},(0,o.h)(h.Spinner,{size:36,color:"#000"}),(0,o.h)("p",null,"Connecting..."))))},y=t=>(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top-description"},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top-description-icon-wrapper"},(0,o.h)("img",{src:t.icon})),(0,o.h)("body",{class:"-walletlink-extension-dialog-box-top-description-text"},t.text)),b=t=>(0,o.h)("button",{class:"-walletlink-extension-dialog-box-cancel",onClick:t.onClick},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-cancel-x"}))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLTEuNSA1LTEuOTUgNVpNNi4wNSA3QzYuMjggMy43NyA3LjU1IDIgOCAyYy40NSAwIDEuNzIgMS43NyAxLjk1IDVoLTMuOVpNNC45NCAyLjg1QzQuNDYgNCA0LjEzIDUuNDMgNC4wMyA3SDIuMDljLjMtMS43NyAxLjM3LTMuMjcgMi44NS00LjE1Wk0yLjA5IDloMS45NGMuMSAxLjU3LjQyIDMgLjkxIDQuMTVBNS45OTggNS45OTggMCAwIDEgMi4wOSA5Wm04Ljk3IDQuMTVjLjQ4LTEuMTUuODEtMi41OC45MS00LjE1aDEuOTRhNS45OTggNS45OTggMCAwIDEtMi44NSA0LjE1WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1LjYzNSAyLjExN2EzLjg4OSAzLjg4OSAwIDAgMC01LjUyMSAwTDYuODkgNS4zMzVBMy44OTQgMy44OTQgMCAwIDAgNS44IDguNzM5Yy4wODMuNTA2LjI2OCAxLjAxMS41NTMgMS40NjYuMTUxLjI1My4zMzYuNDcyLjUzNy42OTFsLjYyMS42MjQgMS4xNDEtMS4xNDYtLjYyLS42MjRhMi4xMDUgMi4xMDUgMCAwIDEtLjQ4Ny0uNzQxIDIuMzQgMi4zNCAwIDAgMSAuNTAzLTIuNTFsMy4yMDYtMy4yMmEyLjI5MyAyLjI5MyAwIDAgMSAzLjIzOSAwYy44OS44OTQuODkgMi4zNDMgMCAzLjI1M2wtMS41MjcgMS41MzNjLjIzNC42NC4zMzUgMS4zMzEuMzAyIDIuMDA1bDIuMzgzLTIuMzkyYzEuNTEtMS41MzQgMS40OTMtNC4wMjgtLjAxNy01LjU2MVoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBkPSJNMTEuMjcxIDcuNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='\n\n\n\n\n\n\n'},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='.-walletlink-css-reset .-walletlink-extension-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-walletlink-css-reset .-walletlink-extension-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);transition:opacity .25s}.-walletlink-css-reset .-walletlink-extension-dialog-backdrop-hidden{opacity:0}.-walletlink-css-reset .-walletlink-extension-dialog-box{display:flex;position:relative;max-width:500px;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-walletlink-css-reset .-walletlink-extension-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-walletlink-css-reset .-walletlink-extension-dialog-box-top{display:flex;flex-direction:row;background-color:#fff;border-radius:8px;overflow:hidden;min-height:300px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-install-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;padding:32px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-install-region button{display:block;border-radius:8px;background-color:#1652f0;color:#fff;width:90%;min-width:fit-content;height:44px;margin-top:16px;font-size:16px;padding-left:16px;padding-right:16px;cursor:pointer;font-weight:500;text-align:center}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;background-color:#fafbfc}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description{display:flex;flex-direction:row;align-items:center;padding-top:14px;padding-bottom:14px;padding-left:24px;padding-right:32px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-icon-wrapper{display:block;position:relative;width:40px;height:40px;flex-shrink:0;flex-grow:0;border-radius:20px;background-color:#fff;box-shadow:0px 0px 8px rgba(0,0,0,.04),0px 16px 24px rgba(0,0,0,.06)}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-icon-wrapper img{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-text{margin-left:16px;flex-grow:1;font-size:13px;line-height:19px;color:#000;align-self:center}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;background-color:#fff;margin-top:8px}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description-region{display:flex;flex-direction:column;justify-content:center;padding:32px;flex-grow:1}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description{font-size:13px;line-height:19px;margin-top:12px;color:#aaa}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description a{font-size:inherit;line-height:inherit;color:#1652f0;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-region{position:relative;flex-shrink:0;display:flex;flex-direction:column;justify-content:center;padding-left:24px;padding-right:24px;padding-top:16px;padding-bottom:16px}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-wrapper{position:relative;display:block;padding:8px;border-radius:8px;box-shadow:0px 4px 12px rgba(0,0,0,.1)}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-wrapper img{display:block}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background-color:rgba(255,255,255,.95)}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;color:#000;margin-top:16px}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel{position:absolute;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;top:16px;right:16px;width:24px;height:24px;border-radius:12px;background-color:#fafbfc;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::after{content:"";position:absolute;display:block;top:-1px;left:-7px;width:14px;height:1px;background-color:#000;transition:background-color .2s}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::before{transform:rotate(45deg)}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::after{transform:rotate(135deg)}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-a,.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-b{background-color:#000}.-walletlink-css-reset .-walletlink-extension-dialog-container{display:block}.-walletlink-css-reset .-walletlink-extension-dialog-container-hidden{display:none}.-walletlink-css-reset .-walletlink-extension-dialog h2{display:block;text-align:left;font-size:22px;font-weight:600;line-height:28px;color:#000}'},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Snackbar=void 0;const i=n(r(26)),o=r(125),a=r(695),s=n(r(2956));e.Snackbar=class{constructor(t){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=t.darkMode}attach(t){this.root=document.createElement("div"),this.root.className="-walletlink-snackbar-root",t.appendChild(this.root),this.render()}presentItem(t){const e=this.nextItemKey++;return this.items.set(e,t),this.render(),()=>{this.items.delete(e),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,o.render)((0,o.h)("div",null,(0,o.h)(u,{darkMode:this.darkMode},Array.from(this.items.entries()).map((t=>{let[e,r]=t;return(0,o.h)(c,Object.assign({},r,{key:e}))})))),this.root)}};const u=t=>(0,o.h)("div",{class:(0,i.default)("-walletlink-snackbar-container")},(0,o.h)("style",null,s.default),(0,o.h)("div",{class:"-walletlink-snackbar"},t.children)),c=t=>{let{autoExpand:e,message:r,menuItems:n}=t;const[s,u]=(0,a.useState)(!0),[c,l]=(0,a.useState)(null!==e&&void 0!==e&&e);(0,a.useEffect)((()=>{const t=[window.setTimeout((()=>{u(!1)}),1),window.setTimeout((()=>{l(!0)}),1e4)];return()=>{t.forEach(window.clearTimeout)}}));return(0,o.h)("div",{class:(0,i.default)("-walletlink-snackbar-instance",s&&"-walletlink-snackbar-instance-hidden",c&&"-walletlink-snackbar-instance-expanded")},(0,o.h)("div",{class:"-walletlink-snackbar-instance-header",onClick:()=>{l(!c)}},(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-walletlink-snackbar-instance-header-cblogo"}),(0,o.h)("div",{class:"-walletlink-snackbar-instance-header-message"},r),(0,o.h)("div",{class:"-gear-container"},!c&&(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),n&&n.length>0&&(0,o.h)("div",{class:"-walletlink-snackbar-instance-menu"},n.map(((t,e)=>(0,o.h)("div",{class:(0,i.default)("-walletlink-snackbar-instance-menu-item",t.isRed&&"-walletlink-snackbar-instance-menu-item-is-red"),onClick:t.onClick,key:e},(0,o.h)("svg",{width:t.svgWidth,height:t.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":t.defaultFillRule,"clip-rule":t.defaultClipRule,d:t.path,fill:"#AAAAAA"})),(0,o.h)("span",{class:(0,i.default)("-walletlink-snackbar-instance-menu-item-info",t.isRed&&"-walletlink-snackbar-instance-menu-item-info-is-red")},t.info))))))}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-walletlink-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-walletlink-css-reset .-gear-container *{user-select:none}.-walletlink-css-reset .-gear-container svg{opacity:0;position:absolute}.-walletlink-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-walletlink-css-reset .-walletlink-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-walletlink-css-reset .-walletlink-snackbar *{user-select:none}.-walletlink-css-reset .-walletlink-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-walletlink-css-reset .-walletlink-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-walletlink-css-reset .-walletlink-snackbar-instance-header *{cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-walletlink-css-reset .-walletlink-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-walletlink-css-reset .-walletlink-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-walletlink-css-reset .-walletlink-snackbar-instance-expanded .-walletlink-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.injectCssReset=void 0;const i=n(r(2958));e.injectCssReset=function(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(t)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='@namespace svg "http://www.w3.org/2000/svg";.-walletlink-css-reset,.-walletlink-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:transparent;background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;bottom:auto;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:block;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;left:auto;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";right:auto;tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;width:auto;word-spacing:normal;z-index:auto}.-walletlink-css-reset *{box-sizing:border-box;display:initial;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-walletlink-css-reset [class*=container]{margin:0;padding:0}.-walletlink-css-reset style{display:none}'},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkUI=void 0;e.WalletLinkUI=class{constructor(t){}setConnectDisabled(t){}}},function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__decorate||function(t,e,r,n){var i,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkRelay=void 0;const u=s(r(2961)),c=r(908),l=r(119),f=r(129),h=r(911),d=r(2962),p=r(912),g=r(427),m=a(r(2966)),y=r(913),b=r(1299),v=r(1312),A=r(2967),w=r(2968),_=r(2969),E=r(2970);class I extends b.WalletLinkRelayAbstract{constructor(t){super(),this.accountsCallback=null,this.chainCallback=null,this.appName="",this.appLogoUrl=null,this.subscriptions=new l.Subscription,this.walletLinkUrl=t.walletLinkUrl,this.storage=t.storage,this._session=y.Session.load(t.storage)||new y.Session(t.storage).save(),this.relayEventManager=t.relayEventManager,this.walletLinkAnalytics=t.walletLinkAnalytics?t.walletLinkAnalytics:new h.WalletLinkAnalytics,this.connection=new d.WalletLinkConnection(this._session.id,this._session.key,this.walletLinkUrl,this.walletLinkAnalytics),this.subscriptions.add(this.connection.incomingEvent$.pipe((0,f.filter)((t=>"Web3Response"===t.event))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(this.connection.linked$.pipe((0,f.skip)(1),(0,f.tap)((t=>{var e;this.isLinked=t;const r=this.storage.getItem(b.LOCAL_STORAGE_ADDRESSES_KEY);if(t&&(this.session.linked=t),this.isUnlinkedErrorState=!1,r){const n=r.split(" "),i="true"===this.storage.getItem("IsStandaloneSigning");if(""!==n[0]&&!t&&this.session.linked&&!i){this.isUnlinkedErrorState=!0;const t=this.getSessionIdHash();null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:t,origin:location.origin})}}}))).subscribe()),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,f.filter)((t=>!!t.metadata&&"1"===t.metadata.__destroyed))).subscribe((()=>{var t;const e=this.connection.isDestroyed;return null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:e,sessionIdHash:this.getSessionIdHash(),origin:location.origin}),this.resetAndReload()}))),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,f.filter)((t=>t.metadata&&void 0!==t.metadata.WalletUsername))).pipe((0,f.mergeMap)((t=>m.decrypt(t.metadata.WalletUsername,this._session.secret)))).subscribe({next:t=>{this.storage.setItem(b.WALLET_USER_NAME_KEY,t)},error:()=>{var t;null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,f.filter)((t=>t.metadata&&void 0!==t.metadata.AppVersion))).pipe((0,f.mergeMap)((t=>m.decrypt(t.metadata.AppVersion,this._session.secret)))).subscribe({next:t=>{this.storage.setItem(b.APP_VERSION_KEY,t)},error:()=>{var t;null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,f.filter)((t=>t.metadata&&void 0!==t.metadata.ChainId&&void 0!==t.metadata.JsonRpcUrl))).pipe((0,f.mergeMap)((t=>(0,l.zip)(m.decrypt(t.metadata.ChainId,this._session.secret),m.decrypt(t.metadata.JsonRpcUrl,this._session.secret))))).pipe((0,f.distinctUntilChanged)()).subscribe({next:t=>{let[e,r]=t;this.chainCallback&&this.chainCallback(e,r)},error:()=>{var t;null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,f.filter)((t=>t.metadata&&void 0!==t.metadata.EthereumAddress))).pipe((0,f.mergeMap)((t=>m.decrypt(t.metadata.EthereumAddress,this._session.secret)))).subscribe({next:t=>{this.accountsCallback&&this.accountsCallback([t]),I.accountRequestCallbackIds.size>0&&(Array.from(I.accountRequestCallbackIds.values()).forEach((e=>{const r=(0,E.Web3ResponseMessage)({id:e,response:(0,_.RequestEthereumAccountsResponse)([t])});this.invokeCallback(Object.assign(Object.assign({},r),{id:e}))})),I.accountRequestCallbackIds.clear())},error:()=>{var t;null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.ui=t.walletLinkUIConstructor({walletLinkUrl:t.walletLinkUrl,version:t.version,darkMode:t.darkMode,session:this._session,connected$:this.connection.connected$}),this.connection.connect()}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,f.timeout)(1e3),(0,f.catchError)((t=>(0,l.of)(null)))).subscribe((t=>{var e,r,n;try{this.subscriptions.unsubscribe()}catch(o){null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(r=this.walletLinkAnalytics)||void 0===r||r.sendEvent(p.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash(),origin:location.origin}),this.connection.destroy();const i=y.Session.load(this.storage);(null===i||void 0===i?void 0:i.id)===this._session.id?this.storage.clear():i&&(null===(n=this.walletLinkAnalytics)||void 0===n||n.sendEvent(p.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:y.Session.hash(i.id),origin:location.origin})),this.ui.reloadUI()}),(t=>{var e;null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.FAILURE,{method:"relay::resetAndReload",message:"failed to reset and reload with ".concat(t),sessionIdHash:this.getSessionIdHash()})}))}setAppInfo(t,e){this.appName=t,this.appLogoUrl=e}getStorageItem(t){return this.storage.getItem(t)}get session(){return this._session}setStorageItem(t,e){this.storage.setItem(t,e)}signEthereumMessage(t,e,r,n){return this.sendRequest({method:v.Web3Method.signEthereumMessage,params:{message:(0,g.hexStringFromBuffer)(t,!0),address:e,addPrefix:r,typedDataJson:n||null}})}ethereumAddressFromSignedMessage(t,e,r){return this.sendRequest({method:v.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,g.hexStringFromBuffer)(t,!0),signature:(0,g.hexStringFromBuffer)(e,!0),addPrefix:r}})}signEthereumTransaction(t){return this.sendRequest({method:v.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,g.bigIntStringFromBN)(t.weiValue),data:(0,g.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,g.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,g.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,g.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,g.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:v.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,g.bigIntStringFromBN)(t.weiValue),data:(0,g.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,g.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,g.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,g.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,g.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,e){return this.sendRequest({method:v.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,g.hexStringFromBuffer)(t,!0),chainId:e}})}scanQRCode(t){return this.sendRequest({method:v.Web3Method.scanQRCode,params:{regExp:t}})}genericRequest(t,e){return this.sendRequest({method:v.Web3Method.generic,params:{action:e,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let e=null;const r=(0,g.randomBytesHex)(8),n=()=>{this.publishWeb3RequestCanceledEvent(r),this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:r,response:(0,_.ErrorResponse)(t.method,"User rejected request")})),null===e||void 0===e||e()};return{promise:new Promise(((i,o)=>{this.ui.isStandalone()||(e=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:n,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(r,(t=>{if(null===e||void 0===e||e(),t.errorMessage)return o(new Error(t.errorMessage));i(t)})),this.ui.isStandalone()?this.sendRequestStandalone(r,t):this.publishWeb3RequestEvent(r,t)})),cancel:n}}setConnectDisabled(t){this.ui.setConnectDisabled(t)}setAccountsCallback(t){this.accountsCallback=t}setChainCallback(t){this.chainCallback=t}publishWeb3RequestEvent(t,e){var r;const n=(0,w.Web3RequestMessage)({id:t,request:e}),i=y.Session.load(this.storage);null===(r=this.walletLinkAnalytics)||void 0===r||r.sendEvent(p.EVENTS.WEB3_REQUEST,{eventId:n.id,method:"relay::".concat(n.request.method),sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?y.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString(),origin:location.origin}),this.subscriptions.add(this.publishEvent("Web3Request",n,!0).subscribe({next:t=>{var e;null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:n.id,method:"relay::".concat(n.request.method),sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?y.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString(),origin:location.origin})},error:t=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:n.id,response:{method:n.request.method,errorMessage:t.message}}))}}))}publishWeb3RequestCanceledEvent(t){const e=(0,A.Web3RequestCanceledMessage)(t);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",e,!1).subscribe())}publishEvent(t,e,r){const n=this.session.secret;return new l.Observable((t=>{m.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{origin:location.origin})),n).then((e=>{t.next(e),t.complete()}))})).pipe((0,f.mergeMap)((e=>this.connection.publishEvent(t,e,r))))}handleIncomingEvent(t){try{this.subscriptions.add(m.decrypt(t.data,this.session.secret).pipe((0,f.map)((t=>JSON.parse(t)))).subscribe({next:t=>{const e=(0,E.isWeb3ResponseMessage)(t)?t:null;e&&this.handleWeb3ResponseMessage(e)},error:()=>{var t;null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(e){return}}handleWeb3ResponseMessage(t){var e;const{response:r}=t;if(null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.WEB3_RESPONSE,{eventId:t.id,method:"relay::".concat(r.method),sessionIdHash:this.getSessionIdHash(),origin:location.origin}),(0,_.isRequestEthereumAccountsResponse)(r))return Array.from(I.accountRequestCallbackIds.values()).forEach((e=>this.invokeCallback(Object.assign(Object.assign({},t),{id:e})))),void I.accountRequestCallbackIds.clear();this.invokeCallback(t)}invokeCallback(t){const e=this.relayEventManager.callbacks.get(t.id);e&&(e(t.response),this.relayEventManager.callbacks.delete(t.id))}requestEthereumAccounts(){let t={method:v.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}};const e=(0,g.randomBytesHex)(8),r=()=>{this.publishWeb3RequestCanceledEvent(e),this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:e,response:(0,_.ErrorResponse)(t.method,"User rejected request")}))};return{promise:new Promise(((n,i)=>{var o;this.relayEventManager.callbacks.set(e,(t=>{if(this.ui.hideRequestEthereumAccounts(),t.errorMessage)return i(new Error(t.errorMessage));n(t)}));const a=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)||null;if(a&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a))window.location.href="https://go.cb-w.com/xoXnYwQimhb?cb_url=".concat(encodeURIComponent(window.location.href));else{if(this.ui.inlineAccountsResponse()){const t=t=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:e,response:(0,_.RequestEthereumAccountsResponse)(t)}))};this.ui.requestEthereumAccounts({onCancel:r,onAccounts:t})}else this.ui.requestEthereumAccounts({onCancel:r});I.accountRequestCallbackIds.add(e),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(e,t)}})),cancel:r}}watchAsset(t,e,r,n,i){const o={method:v.Web3Method.watchAsset,params:{type:t,options:{address:e,symbol:r,decimals:n,image:i}}};let a=null;const s=(0,g.randomBytesHex)(8),u=()=>{this.publishWeb3RequestCanceledEvent(s),this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:s,response:(0,_.ErrorResponse)(o.method,"User rejected request")})),null===a||void 0===a||a()};this.ui.inlineWatchAsset()||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}));return{cancel:u,promise:new Promise(((u,c)=>{this.relayEventManager.callbacks.set(s,(t=>{if(null===a||void 0===a||a(),t.errorMessage)return c(new Error(t.errorMessage));u(t)}));const l=()=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:s,response:(0,_.WatchAssetReponse)(!1)}))},f=()=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:s,response:(0,_.WatchAssetReponse)(!0)}))};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:f,onCancel:l,type:t,address:e,symbol:r,decimals:n,image:i}),this.ui.inlineWatchAsset()||this.ui.isStandalone()||this.publishWeb3RequestEvent(s,o)}))}}addEthereumChain(t,e,r,n,i,o){let a={method:v.Web3Method.addEthereumChain,params:{chainId:t,rpcUrls:e,blockExplorerUrls:n,chainName:i,iconUrls:r,nativeCurrency:o}},s=null;const u=(0,g.randomBytesHex)(8),c=()=>{this.publishWeb3RequestCanceledEvent(u),this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:u,response:(0,_.ErrorResponse)(a.method,"User rejected request")})),null===s||void 0===s||s()};this.ui.inlineAddEthereumChain(t)||(s=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload}));return{promise:new Promise(((e,r)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null===s||void 0===s||s(),t.errorMessage)return r(new Error(t.errorMessage));e(t)}));const n=()=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:u,response:(0,_.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},i=t=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:u,response:(0,_.AddEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))};this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:n,onApprove:i,chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),this.ui.inlineAddEthereumChain(t)||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,a)})),cancel:c}}switchEthereumChain(t){let e={method:v.Web3Method.switchEthereumChain,params:{chainId:t}},r=null;const n=(0,g.randomBytesHex)(8),i=()=>{this.publishWeb3RequestCanceledEvent(n),this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:n,response:(0,_.ErrorResponse)(e.method,"User rejected request")})),null===r||void 0===r||r()};this.ui.inlineSwitchEthereumChain()||(r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload}));return{promise:new Promise(((t,i)=>{this.relayEventManager.callbacks.set(n,(e=>(null===r||void 0===r||r(),e.errorMessage&&e.errorCode?i(c.ethErrors.provider.custom({code:e.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):e.errorMessage?i(new Error(e.errorMessage)):void t(e))));this.ui.switchEthereumChain({onCancel:t=>{t?this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:n,response:(0,_.ErrorResponse)(v.Web3Method.switchEthereumChain,"unsupported chainId",t)})):this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:n,response:(0,_.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:n,response:(0,_.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))},chainId:e.params.chainId}),this.ui.inlineSwitchEthereumChain()||this.ui.isStandalone()||this.publishWeb3RequestEvent(n,e)})),cancel:i}}getSessionIdHash(){return y.Session.hash(this._session.id)}sendRequestStandalone(t,e){const r=()=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:t,response:(0,_.ErrorResponse)(e.method,"User rejected request")}))},n=e=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:t,response:e}))};switch(e.method){case v.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:e,onSuccess:n,onCancel:r});break;case v.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:e,onSuccess:n,onCancel:r});break;case v.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:e,onSuccess:n,onCancel:r});break;case v.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:e,onSuccess:n});break;default:r()}}}I.accountRequestCallbackIds=new Set,o([u.default],I.prototype,"resetAndReload",null),o([u.default],I.prototype,"handleIncomingEvent",null),e.WalletLinkRelay=I},function(t,e,r){"use strict";var n;function i(t,e,r){if(!r||typeof r.value!==n.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+e+"> is not a method!");return{configurable:n.boolTrue,get:function(){var t=r.value.bind(this);return Object.defineProperty(this,e,{value:t,configurable:n.boolTrue,writable:n.boolTrue}),t}}}Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.typeOfFunction="function",t.boolTrue=!0}(n||(n={})),e.bind=i,e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkConnection=void 0;const n=r(119),i=r(129),o=r(912),a=r(913),s=r(914),u=r(2963),c=r(2964),l=r(2965);e.WalletLinkConnection=class{constructor(t,e,r,u){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:WebSocket;this.sessionId=t,this.sessionKey=e,this.subscriptions=new n.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,s.IntNumber)(1),this.connectedSubject=new n.BehaviorSubject(!1),this.linkedSubject=new n.BehaviorSubject(!1),this.sessionConfigSubject=new n.ReplaySubject(1);const f=new c.RxWebSocket(r+"/rpc",l);this.ws=f,this.walletLinkAnalytics=u,this.subscriptions.add(f.connectionState$.pipe((0,i.tap)((e=>this.walletLinkAnalytics.sendEvent(o.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:a.Session.hash(t)}))),(0,i.skip)(1),(0,i.filter)((t=>t===c.ConnectionState.DISCONNECTED&&!this.destroyed)),(0,i.delay)(5e3),(0,i.filter)((t=>!this.destroyed)),(0,i.flatMap)((t=>f.connect())),(0,i.retry)()).subscribe()),this.subscriptions.add(f.connectionState$.pipe((0,i.skip)(2),(0,i.switchMap)((t=>(0,n.iif)((()=>t===c.ConnectionState.CONNECTED),this.authenticate().pipe((0,i.tap)((t=>this.sendIsLinked())),(0,i.tap)((t=>this.sendGetSessionConfig())),(0,i.map)((t=>!0))),(0,n.of)(!1)))),(0,i.distinctUntilChanged)(),(0,i.catchError)((t=>(0,n.of)(!1)))).subscribe((t=>this.connectedSubject.next(t)))),this.subscriptions.add(f.connectionState$.pipe((0,i.skip)(1),(0,i.switchMap)((t=>(0,n.iif)((()=>t===c.ConnectionState.CONNECTED),(0,n.timer)(0,1e4))))).subscribe((t=>0===t?this.updateLastHeartbeat():this.heartbeat()))),this.subscriptions.add(f.incomingData$.pipe((0,i.filter)((t=>"h"===t))).subscribe((t=>this.updateLastHeartbeat()))),this.subscriptions.add(f.incomingJSONData$.pipe((0,i.filter)((t=>["IsLinkedOK","Linked"].includes(t.type)))).subscribe((e=>{const r=e;this.walletLinkAnalytics.sendEvent(o.EVENTS.LINKED,{sessionIdHash:a.Session.hash(t),linked:r.linked,type:e.type,onlineGuests:r.onlineGuests}),this.linkedSubject.next(r.linked||r.onlineGuests>0)}))),this.subscriptions.add(f.incomingJSONData$.pipe((0,i.filter)((t=>["GetSessionConfigOK","SessionConfigUpdated"].includes(t.type)))).subscribe((e=>{const r=e;this.walletLinkAnalytics.sendEvent(o.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:a.Session.hash(t),metadata_keys:r&&r.metadata?Object.keys(r.metadata):void 0}),this.sessionConfigSubject.next({webhookId:r.webhookId,webhookUrl:r.webhookUrl,metadata:r.metadata})})))}connect(){if(this.destroyed)throw new Error("instance is destroyed");this.walletLinkAnalytics.sendEvent(o.EVENTS.STARTED_CONNECTING,{sessionIdHash:a.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){this.subscriptions.unsubscribe(),this.ws.disconnect(),this.walletLinkAnalytics.sendEvent(o.EVENTS.DISCONNECTED,{sessionIdHash:a.Session.hash(this.sessionId)}),this.destroyed=!0}get isDestroyed(){return this.destroyed}get connected$(){return this.connectedSubject.asObservable()}get onceConnected$(){return this.connected$.pipe((0,i.filter)((t=>t)),(0,i.take)(1),(0,i.map)((()=>{})))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,i.filter)((t=>t)),(0,i.take)(1),(0,i.map)((()=>{})))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,i.filter)((t=>{if("Event"!==t.type)return!1;const e=t;return"string"===typeof e.sessionId&&"string"===typeof e.eventId&&"string"===typeof e.event&&"string"===typeof e.data})),(0,i.map)((t=>t)))}setSessionMetadata(t,e){const r=(0,u.ClientMessageSetSessionConfig)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[t]:e}});return this.onceConnected$.pipe((0,i.flatMap)((t=>this.makeRequest(r))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to set session metadata")})))}publishEvent(t,e){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=(0,u.ClientMessagePublishEvent)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:t,data:e,callWebhook:r});return this.onceLinked$.pipe((0,i.flatMap)((t=>this.makeRequest(n))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to publish event");return t.eventId})))}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(t){}}makeRequest(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4;const r=t.id;try{this.sendData(t)}catch(o){return(0,n.throwError)(o)}return this.ws.incomingJSONData$.pipe((0,i.timeoutWith)(e,(0,n.throwError)(new Error("request ".concat(r," timed out")))),(0,i.filter)((t=>t.id===r)),(0,i.take)(1))}authenticate(){const t=(0,u.ClientMessageHostSession)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(t).pipe((0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to authentcate")})))}sendIsLinked(){const t=(0,u.ClientMessageIsLinked)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}sendGetSessionConfig(){const t=(0,u.ClientMessageGetSessionConfig)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientMessagePublishEvent=e.ClientMessageSetSessionConfig=e.ClientMessageGetSessionConfig=e.ClientMessageIsLinked=e.ClientMessageHostSession=void 0,e.ClientMessageHostSession=function(t){return Object.assign({type:"HostSession"},t)},e.ClientMessageIsLinked=function(t){return Object.assign({type:"IsLinked"},t)},e.ClientMessageGetSessionConfig=function(t){return Object.assign({type:"GetSessionConfig"},t)},e.ClientMessageSetSessionConfig=function(t){return Object.assign({type:"SetSessionConfig"},t)},e.ClientMessagePublishEvent=function(t){return Object.assign({type:"PublishEvent"},t)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RxWebSocket=e.ConnectionState=void 0;const n=r(119),i=r(129);var o;!function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"}(o=e.ConnectionState||(e.ConnectionState={}));e.RxWebSocket=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WebSocket;this.WebSocketClass=e,this.webSocket=null,this.connectionStateSubject=new n.BehaviorSubject(o.DISCONNECTED),this.incomingDataSubject=new n.Subject,this.url=t.replace(/^http/,"ws")}connect(){return this.webSocket?(0,n.throwError)(new Error("webSocket object is not null")):new n.Observable((t=>{let e;try{this.webSocket=e=new this.WebSocketClass(this.url)}catch(r){return void t.error(r)}this.connectionStateSubject.next(o.CONNECTING),e.onclose=e=>{this.clearWebSocket(),t.error(new Error("websocket error ".concat(e.code,": ").concat(e.reason))),this.connectionStateSubject.next(o.DISCONNECTED)},e.onopen=e=>{t.next(),t.complete(),this.connectionStateSubject.next(o.CONNECTED)},e.onmessage=t=>{this.incomingDataSubject.next(t.data)}})).pipe((0,i.take)(1))}disconnect(){const{webSocket:t}=this;if(t){this.clearWebSocket(),this.connectionStateSubject.next(o.DISCONNECTED);try{t.close()}catch(e){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,i.flatMap)((t=>{let e;try{e=JSON.parse(t)}catch(r){return(0,n.empty)()}return(0,n.of)(e)})))}sendData(t){const{webSocket:e}=this;if(!e)throw new Error("websocket is not connected");e.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isServerMessageFail=void 0,e.isServerMessageFail=function(t){return t&&"Fail"===t.type&&"number"===typeof t.id&&"string"===typeof t.sessionId&&"string"===typeof t.error}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=void 0;const n=r(119),i=r(427);e.encrypt=async function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");const r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},n,o.encode(t)),s=a.slice(a.byteLength-16),u=a.slice(0,a.byteLength-16),c=new Uint8Array(s),l=new Uint8Array(u),f=new Uint8Array([...r,...c,...l]);return(0,i.uint8ArrayToHex)(f)},e.decrypt=function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");return new n.Observable((r=>{!async function(){const n=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,i.hexStringToUint8Array)(t),a=o.slice(0,12),s=o.slice(12,28),u=o.slice(28),c=new Uint8Array([...u,...s]),l={name:"AES-GCM",iv:new Uint8Array(a)};try{const t=await window.crypto.subtle.decrypt(l,n,c),e=new TextDecoder;r.next(e.decode(t)),r.complete()}catch(f){r.error(f)}}()}))}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestCanceledMessage=void 0;const n=r(919);e.Web3RequestCanceledMessage=function(t){return{type:n.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestMessage=void 0;const n=r(919);e.Web3RequestMessage=function(t){return Object.assign({type:n.RelayMessageType.WEB3_REQUEST},t)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumAddressFromSignedMessageResponse=e.SubmitEthereumTransactionResponse=e.SignEthereumTransactionResponse=e.SignEthereumMessageResponse=e.isRequestEthereumAccountsResponse=e.WatchAssetReponse=e.RequestEthereumAccountsResponse=e.SwitchEthereumChainResponse=e.AddEthereumChainResponse=e.ErrorResponse=void 0;const n=r(1312);e.ErrorResponse=function(t,e,r){return{method:t,errorMessage:e,errorCode:r}},e.AddEthereumChainResponse=function(t){return{method:n.Web3Method.addEthereumChain,result:t}},e.SwitchEthereumChainResponse=function(t){return{method:n.Web3Method.switchEthereumChain,result:t}},e.RequestEthereumAccountsResponse=function(t){return{method:n.Web3Method.requestEthereumAccounts,result:t}},e.WatchAssetReponse=function(t){return{method:n.Web3Method.watchAsset,result:t}},e.isRequestEthereumAccountsResponse=function(t){return t&&t.method===n.Web3Method.requestEthereumAccounts},e.SignEthereumMessageResponse=function(t){return{method:n.Web3Method.signEthereumMessage,result:t}},e.SignEthereumTransactionResponse=function(t){return{method:n.Web3Method.signEthereumTransaction,result:t}},e.SubmitEthereumTransactionResponse=function(t){return{method:n.Web3Method.submitEthereumTransaction,result:t}},e.EthereumAddressFromSignedMessageResponse=function(t){return{method:n.Web3Method.ethereumAddressFromSignedMessage,result:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWeb3ResponseMessage=e.Web3ResponseMessage=void 0;const n=r(919);e.Web3ResponseMessage=function(t){return Object.assign({type:n.RelayMessageType.WEB3_RESPONSE},t)},e.isWeb3ResponseMessage=function(t){return t&&t.type===n.RelayMessageType.WEB3_RESPONSE}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkRelayEventManager=void 0;const n=r(427);e.WalletLinkRelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const t=this._nextRequestId,e=(0,n.prepend0x)(t.toString(16));return this.callbacks.get(e)&&this.callbacks.delete(e),t}}},function(t){t.exports=JSON.parse('{"name":"walletlink","version":"2.5.0","description":"WalletLink JavaScript SDK","keywords":["cipher","cipherbrowser","coinbase","coinbasewallet","eth","ether","ethereum","etherium","injection","toshi","wallet","walletlink","web3"],"main":"dist/index.js","types":"dist/index.d.ts","repository":"https://github.com/walletlink/walletlink.git","author":"Coinbase, Inc.","license":"Apache-2.0","scripts":{"tsc":"tsc --noEmit --pretty","test":"yarn build-npm && karma start","prebuild":"node -p \\"\'export const LIB_VERSION = \' + JSON.stringify(require(\'./package.json\').version) + \';\'\\" > src/version.ts","build":"node compile-assets.js && webpack --config webpack.config.js","build-chrome":"webpack --config webpack.config.chrome.js","build-npm":"tsc -p ./tsconfig.build.json","build:dev":"export WALLETLINK_URL=\'http://localhost:3000\'; yarn build && yarn build-chrome","build:dev:watch":"nodemon -e \'ts,tsx,js,json,css,scss,svg\' --ignore \'src/**/*-css.ts\' --ignore \'src/**/*-svg.ts\' --watch src/ --watch chrome/ --exec \'yarn build:dev\'","build:prod":"yarn prebuild && yarn build && yarn build-chrome && yarn build-npm && cp ./package.json ./README.md ./LICENSE build/npm && cp -a src/vendor-js build/npm/dist && sed -i.bak \'s| \\"private\\": true,||g\' build/npm/package.json && rm -f build/npm/package.json.bak","lint":"eslint ./src --ext .ts,.tsx","lint:watch":"nodemon -e ts,tsx,js,json,css,scss,svg --watch src/ --exec \'yarn tsc && yarn lint\'"},"dependencies":{"@metamask/safe-event-emitter":"2.0.0","bind-decorator":"^1.0.11","bn.js":"^5.1.1","clsx":"^1.1.0","eth-block-tracker":"4.4.3","eth-json-rpc-filters":"4.2.2","eth-rpc-errors":"4.0.2","js-sha256":"0.9.0","json-rpc-engine":"6.1.0","keccak":"^3.0.1","preact":"^10.5.9","rxjs":"^6.6.3","stream-browserify":"^3.0.0"},"devDependencies":{"@types/bn.js":"^4.11.6","@types/node":"^14.14.20","@typescript-eslint/eslint-plugin":"^5.7.0","@typescript-eslint/eslint-plugin-tslint":"^5.7.0","@typescript-eslint/parser":"^5.7.0","browserify":"17.0.0","copy-webpack-plugin":"^6.4.1","core-js":"^3.8.2","eslint":"^8.4.1","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.25.3","eslint-plugin-preact":"^0.1.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-simple-import-sort":"^7.0.0","jasmine":"3.8.0","karma":"^6.3.15","karma-browserify":"8.1.0","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","nodemon":"^2.0.6","prettier":"^2.5.1","raw-loader":"^4.0.2","regenerator-runtime":"^0.13.7","sass":"^1.32.0","svgo":"^2.8.0","ts-jest":"^26.4.4","ts-loader":"^8.0.13","tslib":"^2.0.3","typescript":"^4.1.3","watchify":"4.0.0","webpack":"^5.49.0","webpack-cli":"^3.3.12","whatwg-fetch":"^3.5.0"},"engines":{"node":">= 10.0.0"},"jest":{"transform":{"^.+\\\\.tsx?$":"ts-jest"},"testEnvironment":"node","testPathIgnorePatterns":["/dist/","/node_modules/"],"testRegex":"(/__tests__/.*|\\\\.(test|spec))\\\\.(ts|tsx|js)$","moduleFileExtensions":["ts","js","json"]}}')},,,,function(t,e,r){"use strict";var n=r(296);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return new l(t,e)};var i=n(r(477)),o=n(r(476)),a=n(r(478)),s=n(r(479)),u=n(r(480));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var l=function(t){(0,a.default)(r,t);var e=c(r);function r(t,n,o){var a;return(0,i.default)(this,r),(a=e.call(this)).socket=new window.WebSocket(t,o),a.socket.onopen=function(){return a.emit("open")},a.socket.onmessage=function(t){return a.emit("message",t.data)},a.socket.onerror=function(t){return a.emit("error",t)},a.socket.onclose=function(t){a.emit("close",t.code,t.reason)},a}return(0,o.default)(r,[{key:"send",value:function(t,e,r){var n=r||e;try{this.socket.send(t),n()}catch(i){n(i)}}},{key:"close",value:function(t,e){this.socket.close(t,e)}},{key:"addEventListener",value:function(t,e,r){this.socket.addEventListener(t,e,r)}}]),r}(r(239).EventEmitter)},function(t,e,r){"use strict";(function(t){var n=r(296);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(1137)),o=n(r(1138)),a=n(r(837)),s=n(r(477)),u=n(r(476)),c=n(r(478)),l=n(r(479)),f=n(r(480)),h=r(239);function d(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,f.default)(t);if(e){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,l.default)(this,r)}}var p=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i1&&void 0!==arguments[1]?arguments[1]:"ws://localhost:8080",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;(0,s.default)(this,n);var u=o.autoconnect,c=void 0===u||u,l=o.reconnect,f=void 0===l||l,h=o.reconnect_interval,d=void 0===h?1e3:h,g=o.max_reconnects,m=void 0===g?5:g,y=p(o,["autoconnect","reconnect","reconnect_interval","max_reconnects"]);return(e=r.call(this)).webSocketFactory=t,e.queue={},e.rpc_id=0,e.address=i,e.autoconnect=c,e.ready=!1,e.reconnect=f,e.reconnect_interval=d,e.max_reconnects=m,e.rest_options=y,e.current_reconnects=0,e.generate_request_id=a||function(){return++e.rpc_id},e.autoconnect&&e._connect(e.address,Object.assign({autoconnect:e.autoconnect,reconnect:e.reconnect,reconnect_interval:e.reconnect_interval,max_reconnects:e.max_reconnects},e.rest_options)),e}return(0,u.default)(n,[{key:"connect",value:function(){this.socket||this._connect(this.address,Object.assign({autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects},this.rest_options))}},{key:"call",value:function(t,e,r,n){var i=this;return n||"object"!==(0,a.default)(r)||(n=r,r=null),new Promise((function(o,a){if(!i.ready)return a(new Error("socket not ready"));var s=i.generate_request_id(t,e),u={jsonrpc:"2.0",method:t,params:e||null,id:s};i.socket.send(JSON.stringify(u),n,(function(t){if(t)return a(t);i.queue[s]={promise:[o,a]},r&&(i.queue[s].timeout=setTimeout((function(){delete i.queue[s],a(new Error("reply timeout"))}),r))}))}))}},{key:"login",value:function(){var t=(0,o.default)(i.default.mark((function t(e){var r;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call("rpc.login",e);case 2:if(r=t.sent){t.next=5;break}throw new Error("authentication failed");case 5:return t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"listMethods",value:function(){var t=(0,o.default)(i.default.mark((function t(){return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call("__listMethods");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"notify",value:function(t,e){var r=this;return new Promise((function(n,i){if(!r.ready)return i(new Error("socket not ready"));var o={jsonrpc:"2.0",method:t,params:e||null};r.socket.send(JSON.stringify(o),(function(t){if(t)return i(t);n()}))}))}},{key:"subscribe",value:function(){var t=(0,o.default)(i.default.mark((function t(e){var r;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"string"===typeof e&&(e=[e]),t.next=3,this.call("rpc.on",e);case 3:if(r=t.sent,"string"!==typeof e||"ok"===r[e]){t.next=6;break}throw new Error("Failed subscribing to an event '"+e+"' with: "+r[e]);case 6:return t.abrupt("return",r);case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"unsubscribe",value:function(){var t=(0,o.default)(i.default.mark((function t(e){var r;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"string"===typeof e&&(e=[e]),t.next=3,this.call("rpc.off",e);case 3:if(r=t.sent,"string"!==typeof e||"ok"===r[e]){t.next=6;break}throw new Error("Failed unsubscribing from an event with: "+r);case 6:return t.abrupt("return",r);case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"close",value:function(t,e){this.socket.close(t||1e3,e)}},{key:"_connect",value:function(e,r){var n=this;this.socket=this.webSocketFactory(e,r),this.socket.addEventListener("open",(function(){n.ready=!0,n.emit("open"),n.current_reconnects=0})),this.socket.addEventListener("message",(function(e){var r=e.data;r instanceof ArrayBuffer&&(r=t.from(r).toString());try{r=JSON.parse(r)}catch(a){return}if(r.notification&&n.listeners(r.notification).length){if(!Object.keys(r.params).length)return n.emit(r.notification);var i=[r.notification];if(r.params.constructor===Object)i.push(r.params);else for(var o=0;on.current_reconnects||0===n.max_reconnects)&&setTimeout((function(){return n._connect(e,r)}),n.reconnect_interval))}))}}]),n}(h.EventEmitter);e.default=g}).call(this,r(7).Buffer)},,,,,function(t,e,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]()=>(e||t((e={exports:{}}).exports,e),e.exports),d=(t,e,r)=>(r=null!=t?o(c(t)):{},((t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let i of u(e))!l.call(t,i)&&i!==r&&a(t,i,{get:()=>e[i],enumerable:!(n=s(e,i))||n.enumerable});return t})(!e&&t&&t.__esModule?r:a(r,"default",{value:t,enumerable:!0}),t)),p=(t,e,r)=>new Promise(((n,i)=>{var o=t=>{try{s(r.next(t))}catch(e){i(e)}},a=t=>{try{s(r.throw(t))}catch(e){i(e)}},s=t=>t.done?n(t.value):Promise.resolve(t.value).then(o,a);s((r=r.apply(t,e)).next())})),g=h(((e,n)=>{!function(i){if("object"==typeof e&&typeof n<"u")n.exports=i();else if("function"==typeof define&&r(181))define([],i);else{(typeof window<"u"?window:typeof t<"u"?t:typeof self<"u"?self:this).localforage=i()}}((function(){return function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof f&&f;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[a]={exports:{}};e[a][0].call(l.exports,(function(t){return i(e[a][1][t]||t)}),l,l.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof f&&f,a=0;a"u"&&t(3);var a=Promise;function s(t,e){e&&t.then((function(t){e(null,t)}),(function(t){e(t)}))}function u(t,e,r){"function"==typeof e&&t.then(e),"function"==typeof r&&t.catch(r)}function c(t){return"string"!=typeof t&&(console.warn(t+" used as a key, but it is not a string."),t=String(t)),t}function l(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var f="local-forage-detect-blob-support",h=void 0,d={},p=Object.prototype.toString,g="readonly",m="readwrite";function y(t){return"boolean"==typeof h?a.resolve(h):function(t){return new a((function(e){var r=t.transaction(f,m),n=o([""]);r.objectStore(f).put(n,"key"),r.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},r.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);e(r||!t||parseInt(t[1],10)>=43)}})).catch((function(){return!1}))}(t).then((function(t){return h=t}))}function b(t){var e=d[t.name],r={};r.promise=new a((function(t,e){r.resolve=t,r.reject=e})),e.deferredOperations.push(r),e.dbReady?e.dbReady=e.dbReady.then((function(){return r.promise})):e.dbReady=r.promise}function v(t){var e=d[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function A(t,e){var r=d[t.name].deferredOperations.pop();if(r)return r.reject(e),r.promise}function w(t,e){return new a((function(r,n){if(d[t.name]=d[t.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},t.db){if(!e)return r(t.db);b(t),t.db.close()}var o=[t.name];e&&o.push(t.version);var a=i.open.apply(i,o);e&&(a.onupgradeneeded=function(e){var r=a.result;try{r.createObjectStore(t.storeName),e.oldVersion<=1&&r.createObjectStore(f)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),a.onerror=function(t){t.preventDefault(),n(a.error)},a.onsuccess=function(){var e=a.result;e.onversionchange=function(t){t.target.close()},r(e),v(t)}}))}function _(t){return w(t,!1)}function E(t){return w(t,!0)}function I(t,e){if(!t.db)return!0;var r=!t.db.objectStoreNames.contains(t.storeName),n=t.versiont.db.version;if(n&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),i||r){if(r){var o=t.db.version+1;o>t.version&&(t.version=o)}return!0}return!1}function S(t){var e=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r),i=0;i0&&(!t.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return a.resolve().then((function(){if(!t.db||"NotFoundError"===o.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),E(t)})).then((function(){return function(t){b(t);for(var e=d[t.name],r=e.forages,n=0;n>4,l[u++]=(15&n)<<4|i>>2,l[u++]=(3&i)<<6|63&o;return c}function K(t){var e,r=new Uint8Array(t),n="";for(e=0;e>2],n+=B[(3&r[e])<<4|r[e+1]>>4],n+=B[(15&r[e+1])<<2|r[e+2]>>6],n+=B[63&r[e+2]];return r.length%3===2?n=n.substring(0,n.length-1)+"=":r.length%3===1&&(n=n.substring(0,n.length-2)+"=="),n}var V={serialize:function(t,e){var r="";if(t&&(r=z.call(t)),t&&("[object ArrayBuffer]"===r||t.buffer&&"[object ArrayBuffer]"===z.call(t.buffer))){var n,i=T;t instanceof ArrayBuffer?(n=t,i+=R):(n=t.buffer,"[object Int8Array]"===r?i+=N:"[object Uint8Array]"===r?i+=j:"[object Uint8ClampedArray]"===r?i+=D:"[object Int16Array]"===r?i+=L:"[object Uint16Array]"===r?i+=U:"[object Int32Array]"===r?i+=F:"[object Uint32Array]"===r?i+=Q:"[object Float32Array]"===r?i+=G:"[object Float64Array]"===r?i+=H:e(new Error("Failed to get type for BinaryArray"))),e(i+K(n))}else if("[object Blob]"===r){var o=new FileReader;o.onload=function(){var r="~~local_forage_type~"+t.type+"~"+K(this.result);e(T+P+r)},o.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(a){console.error("Couldn't convert value into a JSON string: ",t),e(null,a)}},deserialize:function(t){if(t.substring(0,9)!==T)return JSON.parse(t);var e,r=t.substring(13),n=t.substring(9,13);if(n===P&&O.test(r)){var i=r.match(O);e=i[1],r=r.substring(i[0].length)}var a=q(r);switch(n){case R:return a;case P:return o([a],{type:e});case N:return new Int8Array(a);case j:return new Uint8Array(a);case D:return new Uint8ClampedArray(a);case L:return new Int16Array(a);case U:return new Uint16Array(a);case F:return new Int32Array(a);case Q:return new Uint32Array(a);case G:return new Float32Array(a);case H:return new Float64Array(a);default:throw new Error("Unkown type: "+n)}},stringToBuffer:q,bufferToString:K};function W(t,e,r,n){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function J(t,e,r,n,i,o){t.executeSql(r,n,i,(function(t,a){a.code===a.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,s){s.rows.length?o(t,a):W(t,e,(function(){t.executeSql(r,n,i,o)}),o)}),o):o(t,a)}),o)}function Y(t,e,r,n){var i=this;t=c(t);var o=new a((function(o,a){i.ready().then((function(){void 0===e&&(e=null);var s=e,u=i._dbInfo;u.serializer.serialize(e,(function(e,c){c?a(c):u.db.transaction((function(r){J(r,u,"INSERT OR REPLACE INTO "+u.storeName+" (key, value) VALUES (?, ?)",[t,e],(function(){o(s)}),(function(t,e){a(e)}))}),(function(e){if(e.code===e.QUOTA_ERR){if(n>0)return void o(Y.apply(i,[t,s,r,n-1]));a(e)}}))}))})).catch(a)}));return s(o,r),o}var X={_driver:"webSQLStorage",_initStorage:function(t){var e=this,r={db:null};if(t)for(var n in t)r[n]="string"!=typeof t[n]?t[n].toString():t[n];var i=new a((function(t,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(i){return n(i)}r.db.transaction((function(i){W(i,r,(function(){e._dbInfo=r,t()}),(function(t,e){n(e)}))}),n)}));return r.serializer=V,i},_support:"function"==typeof openDatabase,iterate:function(t,e){var r=this,n=new a((function(e,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){J(r,i,"SELECT * FROM "+i.storeName,[],(function(r,n){for(var o=n.rows,a=o.length,s=0;s '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var i=[],o=0;o0}var tt={_driver:"localStorageWrapper",_initStorage:function(t){var e={};if(t)for(var r in t)e[r]=t[r];return e.keyPrefix=Z(t,this._defaultConfig),$()?(this._dbInfo=e,e.serializer=V,a.resolve()):a.reject()},_support:function(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}(),iterate:function(t,e){var r=this,n=r.ready().then((function(){for(var e=r._dbInfo,n=e.keyPrefix,i=n.length,o=localStorage.length,a=1,s=0;s=0;r--){var n=localStorage.key(r);0===n.indexOf(t)&&localStorage.removeItem(n)}}));return s(r,t),r},length:function(t){var e=this.keys().then((function(t){return t.length}));return s(e,t),e},key:function(t,e){var r=this,n=r.ready().then((function(){var e,n=r._dbInfo;try{e=localStorage.key(t)}catch{e=null}return e&&(e=e.substring(n.keyPrefix.length)),e}));return s(n,e),n},keys:function(t){var e=this,r=e.ready().then((function(){for(var t=e._dbInfo,r=localStorage.length,n=[],i=0;i=0;e--){var r=localStorage.key(e);0===r.indexOf(t)&&localStorage.removeItem(r)}})):a.reject("Invalid arguments"),e),n}},et=function(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)},rt=function(t,e){for(var r=t.length,n=0;n"u"?"undefined":n(t))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var e in t){if("storeName"===e&&(t[e]=t[e].replace(/\W/g,"_")),"version"===e&&"number"!=typeof t[e])return new Error("Database version must be a number.");this._config[e]=t[e]}return!("driver"in t)||!t.driver||this.setDriver(this._config.driver)}return"string"==typeof t?this._config[t]:this._config},t.prototype.defineDriver=function(t,e,r){var n=new a((function(e,r){try{var n=t._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver)return void r(i);for(var o=ct.concat("_initStorage"),u=0,c=o.length;u{var n,i;n=typeof self<"u"?self:t,i=function(t){var e=/^~~local_forage_type~([^~]+)~/,r=Object.prototype.toString;function n(t){var e=.75*t.length,r=t.length;"="===t[t.length-1]&&(e--,"="===t[t.length-2]&&e--);for(var n=new ArrayBuffer(e),i=new Uint8Array(n),o=0,a=0;o>4,i[a++]=(15&u)<<4|c>>2,i[a++]=(3&c)<<6|63&l}return n}function i(t){for(var e=new Uint8Array(t),r="",n=0;n>2],r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&e[n])<<4|e[n+1]>>4],r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&e[n+1])<<2|e[n+2]>>6],r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[63&e[n+2]];return e.length%3===2?r=r.substring(0,r.length-1)+"=":e.length%3===1&&(r=r.substring(0,r.length-2)+"=="),r}function o(t){var e,r;if(null===t||"object"!=typeof t||"isActiveClone"in t)return t;var n=t instanceof Date?new Date(t):t.constructor();try{for(var i=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}(Object.keys(t)),a=i.next();!a.done;a=i.next()){var s=a.value;Object.prototype.hasOwnProperty.call(t,s)&&(t.isActiveClone=null,n[s]=o(t[s]),delete t.isActiveClone)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}function a(t,e){return(t.name||e.name)+"/"+(t.storeName||e.storeName)+"/"}function s(t,e){e&&t.then((function(t){e(null,t)}),(function(t){e(t)}))}function u(){for(var t=[],e=0;e{let e=()=>{if(function(t){let e=[].slice.call(document.querySelectorAll(".magic-iframe"));return Boolean(e.find((e=>e.src.includes(t))))}(encodeURIComponent(this.parameters)))Object(n.i)().log();else{let e=document.createElement("iframe");e.classList.add("magic-iframe"),e.dataset.magicIframeLabel=Object(n.l)(this.endpoint).host,e.title="Secure Modal",e.src=Object(n.l)("/send?params=".concat(encodeURIComponent(this.parameters)),this.endpoint).href,function(t){for(let[e,r]of Object.entries(v))t.style[e]=r}(e),document.body.appendChild(e),t(e)}};["loaded","interactive","complete"].includes(document.readyState)?e():window.addEventListener("load",e,!1)})),window.addEventListener("message",(t=>{var e;if(t.origin===this.endpoint&&t.data&&t.data.msgType&&this.messageHandlers.size){t.data.response=null!=(e=t.data.response)?e:{};for(let e of this.messageHandlers.values())e(t)}}))}showOverlay(){return p(this,null,(function*(){let t=yield this.iframe;t.style.display="block",this.activeElement=document.activeElement,t.focus()}))}hideOverlay(){return p(this,null,(function*(){var t;(yield this.iframe).style.display="none",null!=(t=this.activeElement)&&t.focus&&this.activeElement.focus(),this.activeElement=null}))}_post(t){return p(this,null,(function*(){let e=yield this.iframe;if(!e||!e.contentWindow)throw Object(n.j)();e.contentWindow.postMessage(t,this.endpoint)}))}},w=Object(n.k)(n.g,{platform:"web",sdkName:"magic-sdk",version:"18.4.1",defaultEndpoint:"https://auth.magic.link/",ViewController:A,configureStorage:()=>p(void 0,null,(function*(){let t=y.default.createInstance({name:"MagicAuthLocalStorageDB",storeName:"MagicAuthLocalStorage"});return yield t.defineDriver(b),yield t.setDriver([y.default.INDEXEDDB,y.default.LOCALSTORAGE,b._driver]),t}))})}.call(this,r(44))},function(t,e,r){"use strict";r.r(e),r.d(e,"FlowExtension",(function(){return d}));var n=r(507),i=r(599),o=Object.defineProperty,a=Object.defineProperties,s=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,f=(t,e,r)=>e in t?o(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,h=(t,e,r)=>new Promise(((n,i)=>{var o=t=>{try{s(r.next(t))}catch(e){i(e)}},a=t=>{try{s(r.throw(t))}catch(e){i(e)}},s=t=>t.done?n(t.value):Promise.resolve(t.value).then(o,a);s((r=r.apply(t,e)).next())})),d=class extends n.d.Internal{constructor(t){var e;super(),e=this,this.flowConfig=t,this.name="flow",this.config={},this.getAccount=()=>this.request(this.utils.createJsonRpcRequestPayload("flow_getAccount",[])),this.authorization=function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return function*(){var r;i.config().put("accessNode.api",t.config.rpcUrl);let n,o=yield t.request(t.utils.createJsonRpcRequestPayload("flow_getAccount",[]));null!=(r=null==e?void 0:e.role)&&r.proposer&&(n=(yield i.account(o)).keys[0].sequenceNumber);return d=((t,e)=>{for(var r in e||(e={}))c.call(e,r)&&f(t,r,e[r]);if(u)for(var r of u(e))l.call(e,r)&&f(t,r,e[r]);return t})({},e),a(d,s({addr:o,keyId:0,signingFunction:e=>h(t,null,(function*(){let t=yield this.request({id:42,jsonrpc:"2.0",method:"flow_signTransaction",params:{message:e.message,cadence:e.cadence}});return{addr:o,keyId:0,signature:t}})),sequenceNum:n}));var d}()}))},this.config={rpcUrl:t.rpcUrl,chainType:"FLOW",network:t.network}}}},function(t,e,r){"use strict";r.r(e),r.d(e,"MagicOpenIdConnectPayloadMethod",(function(){return o})),r.d(e,"OpenIdExtension",(function(){return a}));var n,i=r(507),o=((n=o||{}).LoginWithOIDC="magic_auth_login_with_oidc",n),a=class extends i.d.Internal{constructor(){super(...arguments),this.name="openid",this.config={}}loginWithOIDC(t){let e=this.utils.createJsonRpcRequestPayload("magic_auth_login_with_oidc",[t]);return this.request(e)}}},function(t,e,r){"use strict";r.r(e),r.d(e,"EthereumProvider",(function(){return E})),r.d(e,"OPTIONAL_EVENTS",(function(){return l})),r.d(e,"OPTIONAL_METHODS",(function(){return u})),r.d(e,"REQUIRED_EVENTS",(function(){return c})),r.d(e,"REQUIRED_METHODS",(function(){return s})),r.d(e,"default",(function(){return _}));var n=r(61),i=r(12),o=r(1447);const a="".concat("wc","@2:").concat("ethereum_provider",":"),s=["eth_sendTransaction","personal_sign"],u=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],c=["chainChanged","accountsChanged"],l=["chainChanged","accountsChanged","message","disconnect","connect"];var f=Object.defineProperty,h=Object.defineProperties,d=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b=(t,e)=>{for(var r in e||(e={}))g.call(e,r)&&y(t,r,e[r]);if(p)for(var r of p(e))m.call(e,r)&&y(t,r,e[r]);return t},v=(t,e)=>h(t,d(e));function A(t){return Number(t[0].split(":")[1])}function w(t){return"0x".concat(t.toString(16))}class _{constructor(){this.events=new n.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=a,this.on=(t,e)=>(this.events.on(t,e),this),this.once=(t,e)=>(this.events.once(t,e),this),this.removeListener=(t,e)=>(this.events.removeListener(t,e),this),this.off=(t,e)=>(this.events.off(t,e),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const e=new _;return await e.initialize(t),e}async request(t){return await this.signer.request(t,this.formatChainId(this.chainId))}sendAsync(t,e){this.signer.sendAsync(t,e,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(t);const{required:e,optional:r}=function(t){const{chains:e,optionalChains:r,methods:n,optionalMethods:o,events:a,optionalEvents:f,rpcMap:h}=t;if(!Object(i.O)(e))throw new Error("Invalid chains");const d={chains:e,methods:n||s,events:a||c,rpcMap:b({},e.length?{[A(e)]:h[A(e)]}:{})},p=null===a||void 0===a?void 0:a.filter((t=>!c.includes(t))),g=null===n||void 0===n?void 0:n.filter((t=>!s.includes(t)));if(!r&&!f&&!o&&(null==p||!p.length)&&(null==g||!g.length))return{required:e.length?d:void 0};const m=(null===p||void 0===p?void 0:p.length)&&(null===g||void 0===g?void 0:g.length)||!r,y={chains:[...new Set(m?d.chains.concat(r||[]):r)],methods:[...new Set(d.methods.concat(null!=o&&o.length?o:u))],events:[...new Set(d.events.concat(null!=f&&f.length?f:l))],rpcMap:h};return{required:e.length?d:void 0,optional:r.length?y:void 0}}(this.rpc);try{const n=await new Promise((async(n,i)=>{var o;this.rpc.showQrModal&&(null==(o=this.modal)||o.subscribeModal((t=>{!t.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),i(new Error("Connection request reset. Please try again.")))}))),await this.signer.connect(v(b({namespaces:b({},e&&{[this.namespace]:e})},r&&{optionalNamespaces:{[this.namespace]:r}}),{pairingTopic:null===t||void 0===t?void 0:t.pairingTopic})).then((t=>{n(t)})).catch((t=>{i(new Error(t.message))}))}));if(!n)return;const o=Object(i.s)(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:o),this.setAccounts(o),this.events.emit("connect",{chainId:w(this.chainId)})}catch(n){throw this.signer.logger.error(n),n}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(t=>{const{params:e}=t,{event:r}=e;"accountsChanged"===r.name?(this.accounts=this.parseAccounts(r.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===r.name?this.setChainId(this.formatChainId(r.data)):this.events.emit(r.name,r.data),this.events.emit("session_event",t)})),this.signer.on("chainChanged",(t=>{const e=parseInt(t);this.chainId=e,this.events.emit("chainChanged",w(this.chainId)),this.persist()})),this.signer.on("session_update",(t=>{this.events.emit("session_update",t)})),this.signer.on("session_delete",(t=>{this.reset(),this.events.emit("session_delete",t),this.events.emit("disconnect",v(b({},Object(i.y)("USER_DISCONNECTED")),{data:t.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(t=>{var e,r;this.rpc.showQrModal&&(null==(e=this.modal)||e.closeModal(),null==(r=this.modal)||r.openModal({uri:t})),this.events.emit("display_uri",t)}))}switchEthereumChain(t){this.request({method:"wallet_switchEthereumChain",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return"string"==typeof t&&t.startsWith("".concat(this.namespace,":"))}formatChainId(t){return"".concat(this.namespace,":").concat(t)}parseChainId(t){return Number(t.split(":")[1])}setChainIds(t){const e=t.filter((t=>this.isCompatibleChainId(t))).map((t=>this.parseChainId(t)));e.length&&(this.chainId=e[0],this.events.emit("chainChanged",w(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const e=this.parseChainId(t);this.chainId=e,this.switchEthereumChain(e)}}parseAccountId(t){const[e,r,n]=t.split(":");return{chainId:"".concat(e,":").concat(r),address:n}}setAccounts(t){this.accounts=t.filter((t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId)).map((t=>this.parseAccountId(t).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(t){var e,r;const n=null!=(e=null===t||void 0===t?void 0:t.chains)?e:[],i=null!=(r=null===t||void 0===t?void 0:t.optionalChains)?r:[],o=n.concat(i);if(!o.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const a=n.length?(null===t||void 0===t?void 0:t.methods)||s:[],u=n.length?(null===t||void 0===t?void 0:t.events)||c:[],l=(null===t||void 0===t?void 0:t.optionalMethods)||[],f=(null===t||void 0===t?void 0:t.optionalEvents)||[],h=(null===t||void 0===t?void 0:t.rpcMap)||this.buildRpcMap(o,t.projectId),d=(null===t||void 0===t?void 0:t.qrModalOptions)||void 0;return{chains:null===n||void 0===n?void 0:n.map((t=>this.formatChainId(t))),optionalChains:i.map((t=>this.formatChainId(t))),methods:a,events:u,optionalMethods:l,optionalEvents:f,rpcMap:h,showQrModal:!(null==t||!t.showQrModal),qrModalOptions:d,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,e){const r={};return t.forEach((t=>{r[t]=this.getRpcUrl(t,e)})),r}async initialize(t){if(this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?A(this.rpc.chains):A(this.rpc.optionalChains),this.signer=await o.a.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:e}=await r.e(4).then(r.bind(null,3313));t=e}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(b({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch(e){throw this.signer.logger.error(e),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(t){if(!t)return;const{chains:e,optionalChains:r,rpcMap:n}=t;e&&Object(i.O)(e)&&(this.rpc.chains=e.map((t=>this.formatChainId(t))),e.forEach((t=>{this.rpc.rpcMap[t]=(null===n||void 0===n?void 0:n[t])||this.getRpcUrl(t)}))),r&&Object(i.O)(r)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null===r||void 0===r?void 0:r.map((t=>this.formatChainId(t))),r.forEach((t=>{this.rpc.rpcMap[t]=(null===n||void 0===n?void 0:n[t])||this.getRpcUrl(t)})))}getRpcUrl(t,e){var r;return(null==(r=this.rpc.rpcMap)?void 0:r[t])||"".concat("https://rpc.walletconnect.com/v1/","?chainId=eip155:").concat(t,"&projectId=").concat(e||this.rpc.projectId)}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem("".concat(this.STORAGE_KEY,"/chainId")),e=this.session.namespaces["".concat(this.namespace,":").concat(t)]?this.session.namespaces["".concat(this.namespace,":").concat(t)]:this.session.namespaces[this.namespace];this.setChainIds(t?[this.formatChainId(t)]:null===e||void 0===e?void 0:e.accounts),this.setAccounts(null===e||void 0===e?void 0:e.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem("".concat(this.STORAGE_KEY,"/chainId"),this.chainId)}parseAccounts(t){return"string"==typeof t||t instanceof String?[this.parseAccount(t)]:t.map((t=>this.parseAccount(t)))}}const E=_},function(t,e,r){"use strict";r.r(e),r.d(e,"__extends",(function(){return i})),r.d(e,"__assign",(function(){return o})),r.d(e,"__rest",(function(){return a})),r.d(e,"__decorate",(function(){return s})),r.d(e,"__param",(function(){return u})),r.d(e,"__metadata",(function(){return c})),r.d(e,"__awaiter",(function(){return l})),r.d(e,"__generator",(function(){return f})),r.d(e,"__createBinding",(function(){return h})),r.d(e,"__exportStar",(function(){return d})),r.d(e,"__values",(function(){return p})),r.d(e,"__read",(function(){return g})),r.d(e,"__spread",(function(){return m})),r.d(e,"__spreadArrays",(function(){return y})),r.d(e,"__await",(function(){return b})),r.d(e,"__asyncGenerator",(function(){return v})),r.d(e,"__asyncDelegator",(function(){return A})),r.d(e,"__asyncValues",(function(){return w})),r.d(e,"__makeTemplateObject",(function(){return _})),r.d(e,"__importStar",(function(){return E})),r.d(e,"__importDefault",(function(){return I})),r.d(e,"__classPrivateFieldGet",(function(){return S})),r.d(e,"__classPrivateFieldSet",(function(){return M}));var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)};function i(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var o=function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a}function u(t,e){return function(r,n){e(r,n,t)}}function c(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function f(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(r=i[t](e)).value instanceof b?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(n){l(o[0][3],n)}var r}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function A(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:b(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=p(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,i,(e=t[r](e)).done,e.value)}))}}}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function E(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function I(t){return t&&t.__esModule?t:{default:t}}function S(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function M(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}},function(t,e,r){"use strict";const n=r(2992);t.exports=a;const i=function(){function t(t){return"undefined"!==typeof t&&t}try{return"undefined"!==typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(e){return t(self)||t(window)||t(this)||{}}}().console||{},o={mapHttpRequest:h,mapHttpResponse:h,wrapRequestSerializer:d,wrapResponseSerializer:d,wrapErrorSerializer:d,req:h,res:h,err:function(t){const e={type:t.constructor.name,msg:t.message,stack:t.stack};for(const r in t)void 0===e[r]&&(e[r]=t[r]);return e}};function a(t){(t=t||{}).browser=t.browser||{};const e=t.browser.transmit;if(e&&"function"!==typeof e.send)throw Error("pino: transmit option must have a send function");const r=t.browser.write||i;t.browser.write&&(t.browser.asObject=!0);const n=t.serializers||{},o=function(t,e){if(Array.isArray(t))return t.filter((function(t){return"!stdSerializers.err"!==t}));return!0===t&&Object.keys(e)}(t.browser.serialize,n);let h=t.browser.serialize;Array.isArray(t.browser.serialize)&&t.browser.serialize.indexOf("!stdSerializers.err")>-1&&(h=!1);"function"===typeof r&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),!1===t.enabled&&(t.level="silent");const d=t.level||"info",g=Object.create(r);g.log||(g.log=p),Object.defineProperty(g,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(g,"level",{get:function(){return this._level},set:function(t){if("silent"!==t&&!this.levels.values[t])throw Error("unknown level "+t);this._level=t,s(m,g,"error","log"),s(m,g,"fatal","error"),s(m,g,"warn","error"),s(m,g,"info","log"),s(m,g,"debug","log"),s(m,g,"trace","log")}});const m={transmit:e,serialize:o,asObject:t.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:f(t)};return g.levels=a.levels,g.level=d,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prependOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=p,g.serializers=n,g._serialize=o,g._stdErrSerialize=h,g.child=function(r,i){if(!r)throw new Error("missing bindings for child Pino");i=i||{},o&&r.serializers&&(i.serializers=r.serializers);const a=i.serializers;if(o&&a){var s=Object.assign({},n,a),f=!0===t.browser.serialize?Object.keys(s):o;delete r.serializers,u([r],f,s,this._stdErrSerialize)}function h(t){this._childLevel=1+(0|t._childLevel),this.error=c(t,r,"error"),this.fatal=c(t,r,"fatal"),this.warn=c(t,r,"warn"),this.info=c(t,r,"info"),this.debug=c(t,r,"debug"),this.trace=c(t,r,"trace"),s&&(this.serializers=s,this._serialize=f),e&&(this._logEvent=l([].concat(t._logEvent.bindings,r)))}return h.prototype=this,new h(this)},e&&(g._logEvent=l()),g}function s(t,e,r,o){const s=Object.getPrototypeOf(e);e[r]=e.levelVal>e.levels.values[r]?p:s[r]?s[r]:i[r]||i[o]||p,function(t,e,r){if(!t.transmit&&e[r]===p)return;e[r]=(o=e[r],function(){const s=t.timestamp(),c=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var h=0;h-1&&n in r&&(t[i][n]=r[n](t[i][n]))}function c(t,e,r){return function(){const n=new Array(1+arguments.length);n[0]=e;for(var i=1;i-1?f:0,t.charCodeAt(d+1)){case 100:case 102:if(l>=u)break;if(null==e[l])break;f=u)break;if(null==e[l])break;f=u)break;if(void 0===e[l])break;f",f=d+2,d++;break}c+=i(e[l]),f=d+2,d++;break;case 115:if(l>=u)break;f1&&void 0!==arguments[1]?arguments[1]:n.PINO_CUSTOM_CONTEXT_KEY]||""}function o(t,e){return t[arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.PINO_CUSTOM_CONTEXT_KEY]=e,t}function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.PINO_CUSTOM_CONTEXT_KEY,r="";return r="undefined"===typeof t.bindings?i(t,e):t.bindings().context||"",r}function s(t,e){const r=a(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.PINO_CUSTOM_CONTEXT_KEY);return r.trim()?"".concat(r,"/").concat(e):e}e.getDefaultLoggerOptions=function(t){return Object.assign(Object.assign({},t),{level:(null===t||void 0===t?void 0:t.level)||n.PINO_LOGGER_DEFAULTS.level})},e.getBrowserLoggerContext=i,e.setBrowserLoggerContext=o,e.getLoggerContext=a,e.formatChildLoggerContext=s,e.generateChildLogger=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.PINO_CUSTOM_CONTEXT_KEY;const i=s(t,e,r);return o(t.child({context:i}),i,r)}},function(t,e,r){"use strict";r.r(e),r.d(e,"__extends",(function(){return i})),r.d(e,"__assign",(function(){return o})),r.d(e,"__rest",(function(){return a})),r.d(e,"__decorate",(function(){return s})),r.d(e,"__param",(function(){return u})),r.d(e,"__metadata",(function(){return c})),r.d(e,"__awaiter",(function(){return l})),r.d(e,"__generator",(function(){return f})),r.d(e,"__createBinding",(function(){return h})),r.d(e,"__exportStar",(function(){return d})),r.d(e,"__values",(function(){return p})),r.d(e,"__read",(function(){return g})),r.d(e,"__spread",(function(){return m})),r.d(e,"__spreadArrays",(function(){return y})),r.d(e,"__await",(function(){return b})),r.d(e,"__asyncGenerator",(function(){return v})),r.d(e,"__asyncDelegator",(function(){return A})),r.d(e,"__asyncValues",(function(){return w})),r.d(e,"__makeTemplateObject",(function(){return _})),r.d(e,"__importStar",(function(){return E})),r.d(e,"__importDefault",(function(){return I})),r.d(e,"__classPrivateFieldGet",(function(){return S})),r.d(e,"__classPrivateFieldSet",(function(){return M}));var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)};function i(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var o=function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a}function u(t,e){return function(r,n){e(r,n,t)}}function c(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function f(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(r=i[t](e)).value instanceof b?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(n){l(o[0][3],n)}var r}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function A(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:b(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=p(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,i,(e=t[r](e)).done,e.value)}))}}}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function E(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function I(t){return t&&t.__esModule?t:{default:t}}function S(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function M(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}},function(t,e,r){"use strict";(function(t){function r(){return(null===t||void 0===t?void 0:t.crypto)||(null===t||void 0===t?void 0:t.msCrypto)||{}}function n(){const t=r();return t.subtle||t.webkitSubtle}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowserCryptoAvailable=e.getSubtleCrypto=e.getBrowerCrypto=void 0,e.getBrowerCrypto=r,e.getSubtleCrypto=n,e.isBrowserCryptoAvailable=function(){return!!r()&&!!n()}}).call(this,r(44))},function(t,e,r){"use strict";(function(t){function r(){return"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product}function n(){return"undefined"!==typeof t&&"undefined"!==typeof t.versions&&"undefined"!==typeof t.versions.node}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=e.isNode=e.isReactNative=void 0,e.isReactNative=r,e.isNode=n,e.isBrowser=function(){return!r()&&!n()}}).call(this,r(57))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SystemRandomSource=void 0;const n=r(2998),i=r(2999);e.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new i.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(t){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(t)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRandomSource=void 0;e.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t="undefined"!==typeof self?self.crypto||self.msCrypto:null;t&&void 0!==t.getRandomValues&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const e=new Uint8Array(t);for(let r=0;rthis.pulse()),o.toMiliseconds(this.interval))}))}pulse(){this.events.emit(s.HEARTBEAT_EVENTS.pulse)}}e.HeartBeat=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IHeartBeat=void 0;const n=r(402);class i extends n.IEvents{constructor(t){super()}}e.IHeartBeat=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HEARTBEAT_EVENTS=e.HEARTBEAT_INTERVAL=void 0;const n=r(53);e.HEARTBEAT_INTERVAL=n.FIVE_SECONDS,e.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},function(t,e,r){"use strict";t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(t,e,r){"use strict";var n=60103,i=60106,o=60107,a=60108,s=60114,u=60109,c=60110,l=60112,f=60113,h=60120,d=60115,p=60116,g=60121,m=60122,y=60117,b=60129,v=60131;if("function"===typeof Symbol&&Symbol.for){var A=Symbol.for;n=A("react.element"),i=A("react.portal"),o=A("react.fragment"),a=A("react.strict_mode"),s=A("react.profiler"),u=A("react.provider"),c=A("react.context"),l=A("react.forward_ref"),f=A("react.suspense"),h=A("react.suspense_list"),d=A("react.memo"),p=A("react.lazy"),g=A("react.block"),m=A("react.server.block"),y=A("react.fundamental"),b=A("react.debug_trace_mode"),v=A("react.legacy_hidden")}function w(t){if("object"===typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case o:case s:case a:case f:case h:return t;default:switch(t=t&&t.$$typeof){case c:case l:case p:case d:case u:return t;default:return e}}case i:return e}}}var _=u,E=n,I=l,S=o,M=p,C=d,k=i,x=s,B=a,O=f;e.ContextConsumer=c,e.ContextProvider=_,e.Element=E,e.ForwardRef=I,e.Fragment=S,e.Lazy=M,e.Memo=C,e.Portal=k,e.Profiler=x,e.StrictMode=B,e.Suspense=O,e.isAsyncMode=function(){return!1},e.isConcurrentMode=function(){return!1},e.isContextConsumer=function(t){return w(t)===c},e.isContextProvider=function(t){return w(t)===u},e.isElement=function(t){return"object"===typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return w(t)===l},e.isFragment=function(t){return w(t)===o},e.isLazy=function(t){return w(t)===p},e.isMemo=function(t){return w(t)===d},e.isPortal=function(t){return w(t)===i},e.isProfiler=function(t){return w(t)===s},e.isStrictMode=function(t){return w(t)===a},e.isSuspense=function(t){return w(t)===f},e.isValidElementType=function(t){return"string"===typeof t||"function"===typeof t||t===o||t===s||t===b||t===a||t===f||t===h||t===v||"object"===typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===d||t.$$typeof===u||t.$$typeof===c||t.$$typeof===l||t.$$typeof===y||t.$$typeof===g||t[0]===m)},e.typeOf=w},function(t,e,r){"use strict";(function(e){var n="object"===typeof globalThis?globalThis:"object"===typeof self?self:"object"===typeof window?window:"object"===typeof e?e:{},i=function(){var t="Prism"in n,e=t?n.Prism:void 0;return function(){t?n.Prism=e:delete n.Prism;t=void 0,e=void 0}}();n.Prism={manual:!0,disableWorkerMessageHandler:!0};var o=r(3011),a=r(3026),s=r(3033),u=r(3034),c=r(3035),l=r(3036),f=r(3037);i();var h={}.hasOwnProperty;function d(){}d.prototype=s;var p=new d;function g(t){if("function"!==typeof t||!t.displayName)throw new Error("Expected `function` for `grammar`, got `"+t+"`");void 0===p.languages[t.displayName]&&t(p)}t.exports=p,p.highlight=function(t,e){var r,n=s.highlight;if("string"!==typeof t)throw new Error("Expected `string` for `value`, got `"+t+"`");if("Object"===p.util.type(e))r=e,e=null;else{if("string"!==typeof e)throw new Error("Expected `string` for `name`, got `"+e+"`");if(!h.call(p.languages,e))throw new Error("Unknown language: `"+e+"` is not registered");r=p.languages[e]}return n.call(this,t,r,e)},p.register=g,p.alias=function(t,e){var r,n,i,o,a=p.languages,s=t;e&&((s={})[t]=e);for(r in s)for(i=(n="string"===typeof(n=s[r])?[n]:n).length,o=-1;++o4&&r.slice(0,4)===a&&s.test(e)&&("-"===e.charAt(4)?h=function(t){var e=t.slice(5).replace(u,f);return a+e.charAt(0).toUpperCase()+e.slice(1)}(e):e=function(t){var e=t.slice(4);if(u.test(e))return t;e=e.replace(c,l),"-"!==e.charAt(0)&&(e="-"+e);return a+e}(e),d=i);return new d(h,e)};var s=/^data[-\w.:]+$/i,u=/-[a-z]/g,c=/[A-Z]/g;function l(t){return"-"+t.toLowerCase()}function f(t){return t.charAt(1).toUpperCase()}},function(t,e,r){"use strict";t.exports=function(t,e){var r,i,o,a=t||"",s=e||"div",u={},c=0;for(;c65535&&(q+=l((Q-=65536)>>>10|55296),Q=56320|1023&Q),Q=q+l(Q))):J!==S&&H(R,$)),Q?(At(),X=bt(),ht=tt-1,pt+=tt-W+1,yt.push(Q),(Z=bt()).offset++,it&&it.call(st,Q,{start:X,end:Z},t.slice(W-1,tt)),X=Z):(h=t.slice(W-1,tt),mt+=h,pt+=h.length,ht=tt-1)}else 10===U&&(gt++,dt++,pt=0),U===U?(mt+=l(U),pt++):At();return yt.join("");function bt(){return{line:gt,column:pt,offset:ht+(ct.offset||0)}}function vt(t,e){var r=bt();r.column+=e,r.offset+=e,ot.call(ut,D[t],r,t)}function At(){mt&&(yt.push(mt),nt&&nt.call(at,mt,{start:X,end:bt()}),mt="")}}(t,a)};var c={}.hasOwnProperty,l=String.fromCharCode,f=Function.prototype,h={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},d=9,p=10,g=12,m=32,y=38,b=59,v=60,A=61,w=35,_=88,E=120,I=65533,S="named",M="hexadecimal",C="decimal",k={};k[M]=16,k[C]=10;var x={};x[S]=s,x[C]=o,x[M]=a;var B=1,O=2,T=3,R=4,P=5,N=6,j=7,D={};function L(t){return t>=55296&&t<=57343||t>1114111}function F(t){return t>=1&&t<=8||11===t||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||65535===(65535&t)||65534===(65535&t)}D[B]="Named character references must be terminated by a semicolon",D[O]="Numeric character references must be terminated by a semicolon",D[T]="Named character references cannot be empty",D[R]="Numeric character references cannot be empty",D[P]="Named character references must be known",D[N]="Numeric character references cannot be disallowed",D[j]="Numeric character references cannot be outside the permissible Unicode range"},function(t){t.exports=JSON.parse('{"AElig":"\xc6","AMP":"&","Aacute":"\xc1","Acirc":"\xc2","Agrave":"\xc0","Aring":"\xc5","Atilde":"\xc3","Auml":"\xc4","COPY":"\xa9","Ccedil":"\xc7","ETH":"\xd0","Eacute":"\xc9","Ecirc":"\xca","Egrave":"\xc8","Euml":"\xcb","GT":">","Iacute":"\xcd","Icirc":"\xce","Igrave":"\xcc","Iuml":"\xcf","LT":"<","Ntilde":"\xd1","Oacute":"\xd3","Ocirc":"\xd4","Ograve":"\xd2","Oslash":"\xd8","Otilde":"\xd5","Ouml":"\xd6","QUOT":"\\"","REG":"\xae","THORN":"\xde","Uacute":"\xda","Ucirc":"\xdb","Ugrave":"\xd9","Uuml":"\xdc","Yacute":"\xdd","aacute":"\xe1","acirc":"\xe2","acute":"\xb4","aelig":"\xe6","agrave":"\xe0","amp":"&","aring":"\xe5","atilde":"\xe3","auml":"\xe4","brvbar":"\xa6","ccedil":"\xe7","cedil":"\xb8","cent":"\xa2","copy":"\xa9","curren":"\xa4","deg":"\xb0","divide":"\xf7","eacute":"\xe9","ecirc":"\xea","egrave":"\xe8","eth":"\xf0","euml":"\xeb","frac12":"\xbd","frac14":"\xbc","frac34":"\xbe","gt":">","iacute":"\xed","icirc":"\xee","iexcl":"\xa1","igrave":"\xec","iquest":"\xbf","iuml":"\xef","laquo":"\xab","lt":"<","macr":"\xaf","micro":"\xb5","middot":"\xb7","nbsp":"\xa0","not":"\xac","ntilde":"\xf1","oacute":"\xf3","ocirc":"\xf4","ograve":"\xf2","ordf":"\xaa","ordm":"\xba","oslash":"\xf8","otilde":"\xf5","ouml":"\xf6","para":"\xb6","plusmn":"\xb1","pound":"\xa3","quot":"\\"","raquo":"\xbb","reg":"\xae","sect":"\xa7","shy":"\xad","sup1":"\xb9","sup2":"\xb2","sup3":"\xb3","szlig":"\xdf","thorn":"\xfe","times":"\xd7","uacute":"\xfa","ucirc":"\xfb","ugrave":"\xf9","uml":"\xa8","uuml":"\xfc","yacute":"\xfd","yen":"\xa5","yuml":"\xff"}')},function(t){t.exports=JSON.parse('{"0":"\ufffd","128":"\u20ac","130":"\u201a","131":"\u0192","132":"\u201e","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02c6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017d","145":"\u2018","146":"\u2019","147":"\u201c","148":"\u201d","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02dc","153":"\u2122","154":"\u0161","155":"\u203a","156":"\u0153","158":"\u017e","159":"\u0178"}')},function(t,e,r){"use strict";t.exports=function(t){var e="string"===typeof t?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}},function(t,e,r){"use strict";var n=r(3031),i=r(1332);t.exports=function(t){return n(t)||i(t)}},function(t,e,r){"use strict";t.exports=function(t){var e="string"===typeof t?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}},function(t,e,r){"use strict";var n;t.exports=function(t){var e,r="&"+t+";";if((n=n||document.createElement("i")).innerHTML=r,59===(e=n.textContent).charCodeAt(e.length-1)&&"semi"!==t)return!1;return e!==r&&e}},function(t,e,r){(function(e){var r=function(t){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,r=0,n={},i={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(e){return e instanceof o?new o(e.type,t(e.content),e.alias):Array.isArray(e)?e.map(t):e.replace(/&/g,"&").replace(/=f.reach);E+=_.value.length,_=_.next){var I=_.value;if(e.length>t.length)return;if(!(I instanceof o)){var S,M=1;if(b){if(!(S=a(w,E,t,y))||S.index>=t.length)break;var C=S.index,k=S.index+S[0].length,x=E;for(x+=_.value.length;C>=x;)x+=(_=_.next).value.length;if(E=x-=_.value.length,_.value instanceof o)continue;for(var B=_;B!==e.tail&&(xf.reach&&(f.reach=P);var N=_.prev;if(T&&(N=c(e,N,T),E+=T.length),l(e,N,M),_=c(e,N,new o(h,m?i.tokenize(O,m):O,v,O)),R&&c(e,_,R),M>1){var j={cause:h+","+p,reach:P};s(t,e,r,_.prev,E,j),f&&j.reach>f.reach&&(f.reach=j.reach)}}}}}}function u(){var t={value:null,prev:null,next:null},e={value:null,prev:t,next:null};t.next=e,this.head=t,this.tail=e,this.length=0}function c(t,e,r){var n=e.next,i={value:r,prev:e,next:n};return e.next=i,n.prev=i,t.length++,i}function l(t,e,r){for(var n=e.next,i=0;i"+o.content+""},!t.document)return t.addEventListener?(i.disableWorkerMessageHandler||t.addEventListener("message",(function(e){var r=JSON.parse(e.data),n=r.language,o=r.code,a=r.immediateClose;t.postMessage(i.highlight(o,i.languages[n],n)),a&&t.close()}),!1),i):i;var f=i.util.currentScript();function h(){i.manual||i.highlightAll()}if(f&&(i.filename=f.src,f.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var d=document.readyState;"loading"===d||"interactive"===d&&f&&f.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return i}("undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});t.exports&&(t.exports=r),"undefined"!==typeof e&&(e.Prism=r)}).call(this,r(44))},function(t,e,r){"use strict";function n(t){t.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.value.replace(/&/,"&"))})),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,r){var n={};n["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[r]},n.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:n}};i["language-"+r]={pattern:/[\s\S]+/,inside:t.languages[r]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,r){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:t.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml}t.exports=n,n.displayName="markup",n.aliases=["html","mathml","svg","xml","ssml","atom","rss"]},function(t,e,r){"use strict";function n(t){!function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))}(t)}t.exports=n,n.displayName="css",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}t.exports=n,n.displayName="clike",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript}t.exports=n,n.displayName="javascript",n.aliases=["js"]},function(t,e,r){"use strict";function n(t){t.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:SCIENTIFIC_WITH_LEADING_ZERO|SCALE_PRESERVING_SCIENTIFIC|RMC_COMMUNICATION_FAILURE|END-ENHANCEMENT-SECTION|MULTIPLY-CORRESPONDING|SUBTRACT-CORRESPONDING|VERIFICATION-MESSAGE|DIVIDE-CORRESPONDING|ENHANCEMENT-SECTION|CURRENCY_CONVERSION|RMC_SYSTEM_FAILURE|START-OF-SELECTION|MOVE-CORRESPONDING|RMC_INVALID_STATUS|CUSTOMER-FUNCTION|END-OF-DEFINITION|ENHANCEMENT-POINT|SYSTEM-EXCEPTIONS|ADD-CORRESPONDING|SCALE_PRESERVING|SELECTION-SCREEN|CURSOR-SELECTION|END-OF-SELECTION|LOAD-OF-PROGRAM|SCROLL-BOUNDARY|SELECTION-TABLE|EXCEPTION-TABLE|IMPLEMENTATIONS|PARAMETER-TABLE|RIGHT-JUSTIFIED|UNIT_CONVERSION|AUTHORITY-CHECK|LIST-PROCESSING|SIGN_AS_POSTFIX|COL_BACKGROUND|IMPLEMENTATION|INTERFACE-POOL|TRANSFORMATION|IDENTIFICATION|ENDENHANCEMENT|LINE-SELECTION|INITIALIZATION|LEFT-JUSTIFIED|SELECT-OPTIONS|SELECTION-SETS|COMMUNICATION|CORRESPONDING|DECIMAL_SHIFT|PRINT-CONTROL|VALUE-REQUEST|CHAIN-REQUEST|FUNCTION-POOL|FIELD-SYMBOLS|FUNCTIONALITY|INVERTED-DATE|SELECTION-SET|CLASS-METHODS|OUTPUT-LENGTH|CLASS-CODING|COL_NEGATIVE|ERRORMESSAGE|FIELD-GROUPS|HELP-REQUEST|NO-EXTENSION|NO-TOPOFPAGE|REDEFINITION|DISPLAY-MODE|ENDINTERFACE|EXIT-COMMAND|FIELD-SYMBOL|NO-SCROLLING|SHORTDUMP-ID|ACCESSPOLICY|CLASS-EVENTS|COL_POSITIVE|DECLARATIONS|ENHANCEMENTS|FILTER-TABLE|SWITCHSTATES|SYNTAX-CHECK|TRANSPORTING|ASYNCHRONOUS|SYNTAX-TRACE|TOKENIZATION|USER-COMMAND|WITH-HEADING|ABAP-SOURCE|BREAK-POINT|CHAIN-INPUT|COMPRESSION|FIXED-POINT|NEW-SECTION|NON-UNICODE|OCCURRENCES|RESPONSIBLE|SYSTEM-CALL|TRACE-TABLE|ABBREVIATED|CHAR-TO-HEX|END-OF-FILE|ENDFUNCTION|ENVIRONMENT|ASSOCIATION|COL_HEADING|EDITOR-CALL|END-OF-PAGE|ENGINEERING|IMPLEMENTED|INTENSIFIED|RADIOBUTTON|SYSTEM-EXIT|TOP-OF-PAGE|TRANSACTION|APPLICATION|CONCATENATE|DESTINATION|ENHANCEMENT|IMMEDIATELY|NO-GROUPING|PRECOMPILED|REPLACEMENT|TITLE-LINES|ACTIVATION|BYTE-ORDER|CLASS-POOL|CONNECTION|CONVERSION|DEFINITION|DEPARTMENT|EXPIRATION|INHERITING|MESSAGE-ID|NO-HEADING|PERFORMING|QUEUE-ONLY|RIGHTSPACE|SCIENTIFIC|STATUSINFO|STRUCTURES|SYNCPOINTS|WITH-TITLE|ATTRIBUTES|BOUNDARIES|CLASS-DATA|COL_NORMAL|DD\/MM\/YYYY|DESCENDING|INTERFACES|LINE-COUNT|MM\/DD\/YYYY|NON-UNIQUE|PRESERVING|SELECTIONS|STATEMENTS|SUBROUTINE|TRUNCATION|TYPE-POOLS|ARITHMETIC|BACKGROUND|ENDPROVIDE|EXCEPTIONS|IDENTIFIER|INDEX-LINE|OBLIGATORY|PARAMETERS|PERCENTAGE|PUSHBUTTON|RESOLUTION|COMPONENTS|DEALLOCATE|DISCONNECT|DUPLICATES|FIRST-LINE|HEAD-LINES|NO-DISPLAY|OCCURRENCE|RESPECTING|RETURNCODE|SUBMATCHES|TRACE-FILE|ASCENDING|BYPASSING|ENDMODULE|EXCEPTION|EXCLUDING|EXPORTING|INCREMENT|MATCHCODE|PARAMETER|PARTIALLY|PREFERRED|REFERENCE|REPLACING|RETURNING|SELECTION|SEPARATED|SPECIFIED|STATEMENT|TIMESTAMP|TYPE-POOL|ACCEPTING|APPENDAGE|ASSIGNING|COL_GROUP|COMPARING|CONSTANTS|DANGEROUS|IMPORTING|INSTANCES|LEFTSPACE|LOG-POINT|QUICKINFO|READ-ONLY|SCROLLING|SQLSCRIPT|STEP-LOOP|TOP-LINES|TRANSLATE|APPENDING|AUTHORITY|CHARACTER|COMPONENT|CONDITION|DIRECTORY|DUPLICATE|MESSAGING|RECEIVING|SUBSCREEN|ACCORDING|COL_TOTAL|END-LINES|ENDMETHOD|ENDSELECT|EXPANDING|EXTENSION|INCLUDING|INFOTYPES|INTERFACE|INTERVALS|LINE-SIZE|PF-STATUS|PROCEDURE|PROTECTED|REQUESTED|RESUMABLE|RIGHTPLUS|SAP-SPOOL|SECONDARY|STRUCTURE|SUBSTRING|TABLEVIEW|NUMOFCHAR|ADJACENT|ANALYSIS|ASSIGNED|BACKWARD|CHANNELS|CHECKBOX|CONTINUE|CRITICAL|DATAINFO|DD\/MM\/YY|DURATION|ENCODING|ENDCLASS|FUNCTION|LEFTPLUS|LINEFEED|MM\/DD\/YY|OVERFLOW|RECEIVED|SKIPPING|SORTABLE|STANDARD|SUBTRACT|SUPPRESS|TABSTRIP|TITLEBAR|TRUNCATE|UNASSIGN|WHENEVER|ANALYZER|COALESCE|COMMENTS|CONDENSE|DECIMALS|DEFERRED|ENDWHILE|EXPLICIT|KEYWORDS|MESSAGES|POSITION|PRIORITY|RECEIVER|RENAMING|TIMEZONE|TRAILING|ALLOCATE|CENTERED|CIRCULAR|CONTROLS|CURRENCY|DELETING|DESCRIBE|DISTANCE|ENDCATCH|EXPONENT|EXTENDED|GENERATE|IGNORING|INCLUDES|INTERNAL|MAJOR-ID|MODIFIER|NEW-LINE|OPTIONAL|PROPERTY|ROLLBACK|STARTING|SUPPLIED|ABSTRACT|CHANGING|CONTEXTS|CREATING|CUSTOMER|DATABASE|DAYLIGHT|DEFINING|DISTINCT|DIVISION|ENABLING|ENDCHAIN|ESCAPING|HARMLESS|IMPLICIT|INACTIVE|LANGUAGE|MINOR-ID|MULTIPLY|NEW-PAGE|NO-TITLE|POS_HIGH|SEPARATE|TEXTPOOL|TRANSFER|SELECTOR|DBMAXLEN|ITERATOR|ARCHIVE|BIT-XOR|BYTE-CO|COLLECT|COMMENT|CURRENT|DEFAULT|DISPLAY|ENDFORM|EXTRACT|LEADING|LISTBOX|LOCATOR|MEMBERS|METHODS|NESTING|POS_LOW|PROCESS|PROVIDE|RAISING|RESERVE|SECONDS|SUMMARY|VISIBLE|BETWEEN|BIT-AND|BYTE-CS|CLEANUP|COMPUTE|CONTROL|CONVERT|DATASET|ENDCASE|FORWARD|HEADERS|HOTSPOT|INCLUDE|INVERSE|KEEPING|NO-ZERO|OBJECTS|OVERLAY|PADDING|PATTERN|PROGRAM|REFRESH|SECTION|SUMMING|TESTING|VERSION|WINDOWS|WITHOUT|BIT-NOT|BYTE-CA|BYTE-NA|CASTING|CONTEXT|COUNTRY|DYNAMIC|ENABLED|ENDLOOP|EXECUTE|FRIENDS|HANDLER|HEADING|INITIAL|\*-INPUT|LOGFILE|MAXIMUM|MINIMUM|NO-GAPS|NO-SIGN|PRAGMAS|PRIMARY|PRIVATE|REDUCED|REPLACE|REQUEST|RESULTS|UNICODE|WARNING|ALIASES|BYTE-CN|BYTE-NS|CALLING|COL_KEY|COLUMNS|CONNECT|ENDEXEC|ENTRIES|EXCLUDE|FILTERS|FURTHER|HELP-ID|LOGICAL|MAPPING|MESSAGE|NAMETAB|OPTIONS|PACKAGE|PERFORM|RECEIVE|STATICS|VARYING|BINDING|CHARLEN|GREATER|XSTRLEN|ACCEPT|APPEND|DETAIL|ELSEIF|ENDING|ENDTRY|FORMAT|FRAMES|GIVING|HASHED|HEADER|IMPORT|INSERT|MARGIN|MODULE|NATIVE|OBJECT|OFFSET|REMOTE|RESUME|SAVING|SIMPLE|SUBMIT|TABBED|TOKENS|UNIQUE|UNPACK|UPDATE|WINDOW|YELLOW|ACTUAL|ASPECT|CENTER|CURSOR|DELETE|DIALOG|DIVIDE|DURING|ERRORS|EVENTS|EXTEND|FILTER|HANDLE|HAVING|IGNORE|LITTLE|MEMORY|NO-GAP|OCCURS|OPTION|PERSON|PLACES|PUBLIC|REDUCE|REPORT|RESULT|SINGLE|SORTED|SWITCH|SYNTAX|TARGET|VALUES|WRITER|ASSERT|BLOCKS|BOUNDS|BUFFER|CHANGE|COLUMN|COMMIT|CONCAT|COPIES|CREATE|DDMMYY|DEFINE|ENDIAN|ESCAPE|EXPAND|KERNEL|LAYOUT|LEGACY|LEVELS|MMDDYY|NUMBER|OUTPUT|RANGES|READER|RETURN|SCREEN|SEARCH|SELECT|SHARED|SOURCE|STABLE|STATIC|SUBKEY|SUFFIX|TABLES|UNWIND|YYMMDD|ASSIGN|BACKUP|BEFORE|BINARY|BIT-OR|BLANKS|CLIENT|CODING|COMMON|DEMAND|DYNPRO|EXCEPT|EXISTS|EXPORT|FIELDS|GLOBAL|GROUPS|LENGTH|LOCALE|MEDIUM|METHOD|MODIFY|NESTED|OTHERS|REJECT|SCROLL|SUPPLY|SYMBOL|ENDFOR|STRLEN|ALIGN|BEGIN|BOUND|ENDAT|ENTRY|EVENT|FINAL|FLUSH|GRANT|INNER|SHORT|USING|WRITE|AFTER|BLACK|BLOCK|CLOCK|COLOR|COUNT|DUMMY|EMPTY|ENDDO|ENDON|GREEN|INDEX|INOUT|LEAVE|LEVEL|LINES|MODIF|ORDER|OUTER|RANGE|RESET|RETRY|RIGHT|SMART|SPLIT|STYLE|TABLE|THROW|UNDER|UNTIL|UPPER|UTF-8|WHERE|ALIAS|BLANK|CLEAR|CLOSE|EXACT|FETCH|FIRST|FOUND|GROUP|LLANG|LOCAL|OTHER|REGEX|SPOOL|TITLE|TYPES|VALID|WHILE|ALPHA|BOXED|CATCH|CHAIN|CHECK|CLASS|COVER|ENDIF|EQUIV|FIELD|FLOOR|FRAME|INPUT|LOWER|MATCH|NODES|PAGES|PRINT|RAISE|ROUND|SHIFT|SPACE|SPOTS|STAMP|STATE|TASKS|TIMES|TRMAC|ULINE|UNION|VALUE|WIDTH|EQUAL|LOG10|TRUNC|BLOB|CASE|CEIL|CLOB|COND|EXIT|FILE|GAPS|HOLD|INCL|INTO|KEEP|KEYS|LAST|LINE|LONG|LPAD|MAIL|MODE|OPEN|PINK|READ|ROWS|TEST|THEN|ZERO|AREA|BACK|BADI|BYTE|CAST|EDIT|EXEC|FAIL|FIND|FKEQ|FONT|FREE|GKEQ|HIDE|INIT|ITNO|LATE|LOOP|MAIN|MARK|MOVE|NEXT|NULL|RISK|ROLE|UNIT|WAIT|ZONE|BASE|CALL|CODE|DATA|DATE|FKGE|GKGE|HIGH|KIND|LEFT|LIST|MASK|MESH|NAME|NODE|PACK|PAGE|POOL|SEND|SIGN|SIZE|SOME|STOP|TASK|TEXT|TIME|USER|VARY|WITH|WORD|BLUE|CONV|COPY|DEEP|ELSE|FORM|FROM|HINT|ICON|JOIN|LIKE|LOAD|ONLY|PART|SCAN|SKIP|SORT|TYPE|UNIX|VIEW|WHEN|WORK|ACOS|ASIN|ATAN|COSH|EACH|FRAC|LESS|RTTI|SINH|SQRT|TANH|AVG|BIT|DIV|ISO|LET|OUT|PAD|SQL|ALL|CI_|CPI|END|LOB|LPI|MAX|MIN|NEW|OLE|RUN|SET|\?TO|YES|ABS|ADD|AND|BIG|FOR|HDB|JOB|LOW|NOT|SAP|TRY|VIA|XML|ANY|GET|IDS|KEY|MOD|OFF|PUT|RAW|RED|REF|SUM|TAB|XSD|CNT|COS|EXP|LOG|SIN|TAN|XOR|AT|CO|CP|DO|GT|ID|IF|NS|OR|BT|CA|CS|GE|NA|NB|EQ|IN|LT|NE|NO|OF|ON|PF|TO|AS|BY|CN|IS|LE|NP|UP|E|I|M|O|Z|C|X)\b/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}t.exports=n,n.displayName="abap",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e="(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)";t.languages.abnf={comment:/;.*/,string:{pattern:/(?:%[is])?"[^"\n\r]*"/,greedy:!0,inside:{punctuation:/^%[is]/}},range:{pattern:/%(?:b[01]+-[01]+|d\d+-\d+|x[A-F\d]+-[A-F\d]+)/i,alias:"number"},terminal:{pattern:/%(?:b[01]+(?:\.[01]+)*|d\d+(?:\.\d+)*|x[A-F\d]+(?:\.[A-F\d]+)*)/i,alias:"number"},repetition:{pattern:/(^|[^\w-])(?:\d*\*\d*|\d+)/,lookbehind:!0,alias:"operator"},definition:{pattern:/(^[ \t]*)(?:[a-z][\w-]*|<[^<>\r\n]*>)(?=\s*=)/m,lookbehind:!0,alias:"keyword",inside:{punctuation:/<|>/}},"core-rule":{pattern:RegExp("(?:(^|[^<\\w-])"+e+"|<"+e+">)(?![\\w-])","i"),lookbehind:!0,alias:["rule","constant"],inside:{punctuation:/<|>/}},rule:{pattern:/(^|[^<\w-])[a-z][\w-]*|<[^<>\r\n]*>/i,lookbehind:!0,inside:{punctuation:/<|>/}},operator:/=\/?|\//,punctuation:/[()\[\]]/}}(t)}t.exports=n,n.displayName="abnf",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.actionscript=t.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),t.languages.actionscript["class-name"].alias="function",delete t.languages.actionscript.parameter,delete t.languages.actionscript["literal-property"],t.languages.markup&&t.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:t.languages.markup}})}t.exports=n,n.displayName="actionscript",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.ada={comment:/--.*/,string:/"(?:""|[^"\r\f\n])*"/,number:[{pattern:/\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i},{pattern:/\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i}],"attr-name":/\b'\w+/,keyword:/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,boolean:/\b(?:false|true)\b/i,operator:/<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,punctuation:/\.\.?|[,;():]/,char:/'.'/,variable:/\b[a-z](?:\w)*\b/i}}t.exports=n,n.displayName="ada",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.agda={comment:/\{-[\s\S]*?(?:-\}|$)|--.*/,string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},punctuation:/[(){}\u2983\u2984.;@]/,"class-name":{pattern:/((?:data|record) +)\S+/,lookbehind:!0},function:{pattern:/(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,lookbehind:!0},operator:{pattern:/(^\s*|\s)(?:[=|:\u2200\u2192\u03bb\\?_]|->)(?=\s)/,lookbehind:!0},keyword:/\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/}}(t)}t.exports=n,n.displayName="agda",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.al={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},function:{pattern:/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,lookbehind:!0},keyword:[/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i],number:/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,boolean:/\b(?:false|true)\b/i,variable:/\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,"class-name":/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,operator:/\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,punctuation:/[()\[\]{}:.;,]/}}t.exports=n,n.displayName="al",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.antlr4={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,string:{pattern:/'(?:\\.|[^\\'\r\n])*'/,greedy:!0},"character-class":{pattern:/\[(?:\\.|[^\\\]\r\n])*\]/,greedy:!0,alias:"regex",inside:{range:{pattern:/([^[]|(?:^|[^\\])(?:\\\\)*\\\[)-(?!\])/,lookbehind:!0,alias:"punctuation"},escape:/\\(?:u(?:[a-fA-F\d]{4}|\{[a-fA-F\d]+\})|[pP]\{[=\w-]+\}|[^\r\nupP])/,punctuation:/[\[\]]/}},action:{pattern:/\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\}/,greedy:!0,inside:{content:{pattern:/(\{)[\s\S]+(?=\})/,lookbehind:!0},punctuation:/[{}]/}},command:{pattern:/(->\s*(?!\s))(?:\s*(?:,\s*)?\b[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i,lookbehind:!0,inside:{function:/\b\w+(?=\s*(?:[,(]|$))/,punctuation:/[,()]/}},annotation:{pattern:/@\w+(?:::\w+)*/,alias:"keyword"},label:{pattern:/#[ \t]*\w+/,alias:"punctuation"},keyword:/\b(?:catch|channels|finally|fragment|grammar|import|lexer|locals|mode|options|parser|returns|throws|tokens)\b/,definition:[{pattern:/\b[a-z]\w*(?=\s*:)/,alias:["rule","class-name"]},{pattern:/\b[A-Z]\w*(?=\s*:)/,alias:["token","constant"]}],constant:/\b[A-Z][A-Z_]*\b/,operator:/\.\.|->|[|~]|[*+?]\??/,punctuation:/[;:()=]/},t.languages.g4=t.languages.antlr4}t.exports=n,n.displayName="antlr4",n.aliases=["g4"]},function(t,e,r){"use strict";function n(t){t.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|Type|UserFile|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|Limit(?:InternalRecursion|Request(?:Body|Fields|FieldSize|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|SRPUnknownUserSeed|SRPVerifierFile|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UserName|UseStapling|VerifyClient|VerifyDepth)|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}}t.exports=n,n.displayName="apacheconf",n.aliases=[]},function(t,e,r){"use strict";var n=r(923);function i(t){t.register(n),function(t){var e=/\b(?:(?:after|before)(?=\s+[a-z])|abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|get(?=\s*[{};])|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|(?:inherited|with|without)\s+sharing)\b/i,r=/\b(?:(?=[a-z_]\w*\s*[<\[])|(?!))[A-Z_]\w*(?:\s*\.\s*[A-Z_]\w*)*\b(?:\s*(?:\[\s*\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*/.source.replace(//g,(function(){return e.source}));function n(t){return RegExp(t.replace(//g,(function(){return r})),"i")}var i={keyword:e,punctuation:/[()\[\]{};,:.<>]/};t.languages.apex={comment:t.languages.clike.comment,string:t.languages.clike.string,sql:{pattern:/((?:[=,({:]|\breturn)\s*)\[[^\[\]]*\]/i,lookbehind:!0,greedy:!0,alias:"language-sql",inside:t.languages.sql},annotation:{pattern:/@\w+\b/,alias:"punctuation"},"class-name":[{pattern:n(/(\b(?:class|enum|extends|implements|instanceof|interface|new|trigger\s+\w+\s+on)\s+)/.source),lookbehind:!0,inside:i},{pattern:n(/(\(\s*)(?=\s*\)\s*[\w(])/.source),lookbehind:!0,inside:i},{pattern:n(/(?=\s*\w+\s*[;=,(){:])/.source),inside:i}],trigger:{pattern:/(\btrigger\s+)\w+\b/i,lookbehind:!0,alias:"class-name"},keyword:e,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/(?:\B\.\d+|\b\d+(?:\.\d+|L)?)\b/i,operator:/[!=](?:==?)?|\?\.?|&&|\|\||--|\+\+|[-+*/^&|]=?|:|<{1,3}=?/,punctuation:/[()\[\]{};,.]/}}(t)}t.exports=i,i.displayName="apex",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.apl={comment:/(?:\u235d|#[! ]).*$/m,string:{pattern:/'(?:[^'\r\n]|'')*'/,greedy:!0},number:/\xaf?(?:\d*\.?\b\d+(?:e[+\xaf]?\d+)?|\xaf|\u221e)(?:j\xaf?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+\xaf]?\d+)?|\xaf|\u221e))?/i,statement:/:[A-Z][a-z][A-Za-z]*\b/,"system-function":{pattern:/\u2395[A-Z]+/i,alias:"function"},constant:/[\u236c\u233e#\u2395\u235e]/,function:/[-+\xd7\xf7\u2308\u230a\u2223|\u2373\u2378?*\u235f\u25cb!\u2339<\u2264=>\u2265\u2260\u2261\u2262\u220a\u2377\u222a\u2229~\u2228\u2227\u2371\u2372\u2374,\u236a\u233d\u2296\u2349\u2191\u2193\u2282\u2283\u2286\u2287\u2337\u234b\u2352\u22a4\u22a5\u2355\u234e\u22a3\u22a2\u2341\u2342\u2248\u236f\u2197\xa4\u2192]/,"monadic-operator":{pattern:/[\\\/\u233f\u2340\xa8\u2368\u2336&\u2225]/,alias:"operator"},"dyadic-operator":{pattern:/[.\u2363\u2360\u2364\u2218\u2338@\u233a\u2365]/,alias:"operator"},assignment:{pattern:/\u2190/,alias:"keyword"},punctuation:/[\[;\]()\u25c7\u22c4]/,dfn:{pattern:/[{}\u237a\u2375\u2376\u2379\u2207\u236b:]/,alias:"builtin"}}}t.exports=n,n.displayName="apl",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=\u2260\u2264\u2265*+\-\/\xf7^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class-name":/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,punctuation:/[{}():,\xac\xab\xbb\u300a\u300b]/}}t.exports=n,n.displayName="applescript",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'\xb4`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},identifier:{pattern:/([\xb4`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:false|true)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}}t.exports=n,n.displayName="aql",n.aliases=[]},function(t,e,r){"use strict";var n=r(924);function i(t){t.register(n),t.languages.arduino=t.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),t.languages.ino=t.languages.arduino}t.exports=i,i.displayName="arduino",i.aliases=["ino"]},function(t,e,r){"use strict";function n(t){t.languages.arff={comment:/%.*/,string:{pattern:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/@(?:attribute|data|end|relation)\b/i,number:/\b\d+(?:\.\d+)?\b/,punctuation:/[{},]/}}t.exports=n,n.displayName="arff",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},r=t.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:e,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:e.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:e,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|R|TM)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function n(t){for(var e={},n=0,i=(t=t.split(" ")).length;n>=?|<<=?|&&?|\|\|?|[-+*/%&|^!=<>?]=?/,punctuation:/[(),:]/}}t.exports=n,n.displayName="asmatmel",n.aliases=[]},function(t,e,r){"use strict";var n=r(697);function i(t){t.register(n),t.languages.aspnet=t.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:t.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/,alias:"tag"},rest:t.languages.csharp}}}),t.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,t.languages.insertBefore("inside","punctuation",{directive:t.languages.aspnet.directive},t.languages.aspnet.tag.inside["attr-value"]),t.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),t.languages.insertBefore("aspnet",t.languages.javascript?"script":"tag",{"asp-script":{pattern:/(]*>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,alias:["asp","script"],inside:t.languages.csharp||{}}})}t.exports=i,i.displayName="aspnet",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.autohotkey={comment:[{pattern:/(^|\s);.*/,lookbehind:!0},{pattern:/(^[\t ]*)\/\*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m,lookbehind:!0,greedy:!0}],tag:{pattern:/^([ \t]*)[^\s,`":]+(?=:[ \t]*$)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,boolean:/\b(?:false|true)\b/,selector:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guicontrol|a_guicontrolevent|a_guievent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|isfunc|islabel|IsObject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|numget|numput|onmessage|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strlen|strreplace|strsplit|substr|tan|tv_add|tv_delete|tv_get|tv_getchild|tv_getcount|tv_getnext|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__Call|__Get|__New|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,important:/#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i,keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/,punctuation:/[{}[\]():,]/}}t.exports=n,n.displayName="autohotkey",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.autoit={comment:[/;.*/,{pattern:/(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:ce|comments-end)/m,lookbehind:!0}],url:{pattern:/(^[\t ]*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,lookbehind:!0},string:{pattern:/(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,greedy:!0,inside:{variable:/([%$@])\w+\1/}},directive:{pattern:/(^[\t ]*)#[\w-]+/m,lookbehind:!0,alias:"keyword"},function:/\b\w+(?=\()/,variable:/[$@]\w+/,keyword:/\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,boolean:/\b(?:False|True)\b/i,operator:/<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Not|Or)\b/i,punctuation:/[\[\]().,:]/}}t.exports=n,n.displayName="autoit",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){function e(t,e,r){return RegExp(function(t,e){return t.replace(/<<(\d+)>>/g,(function(t,r){return e[+r]}))}(t,e),r||"")}var r=/bool|clip|float|int|string|val/.source,n=[[/is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/.source,/apply|assert|default|eval|import|nop|select|undefined/.source,/opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/.source,/hex(?:value)?|value/.source,/abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/.source,/a?sinh?|a?cosh?|a?tan[2h]?/.source,/(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/.source,/average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/.source,/getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/.source,/chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/.source,/isversionorgreater|version(?:number|string)/.source,/buildpixeltype|colorspacenametopixeltype/.source,/addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source].join("|"),[/has(?:audio|video)/.source,/height|width/.source,/frame(?:count|rate)|framerate(?:denominator|numerator)/.source,/getparity|is(?:field|frame)based/.source,/bitspercomponent|componentsize|hasalpha|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:va?|y2))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|numcomponents|pixeltype/.source,/audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/.source].join("|"),[/avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/.source,/coloryuv|convertbacktoyuy2|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:411|420|422|444)|YUY2)|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:chroma|luma)|rgbadjust|show(?:alpha|blue|green|red)|swapuv|tweak|[uv]toy8?|ytouv/.source,/(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source,/addborders|(?:bicubic|bilinear|blackman|gauss|lanczos4|lanczos|point|sinc|spline(?:16|36|64))resize|crop(?:bottom)?|flip(?:horizontal|vertical)|(?:horizontal|vertical)?reduceby2|letterbox|skewrows|turn(?:180|left|right)/.source,/blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/.source,/trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|io|out)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/.source,/assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/.source,/amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|ssrc|supereq|timestretch/.source,/animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/.source,/imagewriter/.source,/blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/.source].join("|")].join("|");t.languages.avisynth={comment:[{pattern:/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],argument:{pattern:e(/\b(?:<<0>>)\s+("?)\w+\1/.source,[r],"i"),inside:{keyword:/^\w+/}},"argument-label":{pattern:/([,(][\s\\]*)\w+\s*=(?!=)/,lookbehind:!0,inside:{"argument-name":{pattern:/^\w+/,alias:"punctuation"},punctuation:/=$/}},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0,inside:{constant:{pattern:/\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/}}}],variable:/\b(?:last)\b/i,boolean:/\b(?:false|no|true|yes)\b/i,keyword:/\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,constant:/\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,"builtin-function":{pattern:e(/\b(?:<<0>>)\b/.source,[n],"i"),alias:"function"},"type-cast":{pattern:e(/\b(?:<<0>>)(?=\s*\()/.source,[r],"i"),alias:"keyword"},function:{pattern:/\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,lookbehind:!0},"line-continuation":{pattern:/(^[ \t]*)\\|\\(?=[ \t]*$)/m,lookbehind:!0,alias:"punctuation"},number:/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,operator:/\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,punctuation:/[{}\[\]();,.]/},t.languages.avs=t.languages.avisynth}(t)}t.exports=n,n.displayName="avisynth",n.aliases=["avs"]},function(t,e,r){"use strict";function n(t){t.languages["avro-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0},annotation:{pattern:/@(?:[$\w.-]|`[^\r\n`]+`)+/,greedy:!0,alias:"function"},"function-identifier":{pattern:/`[^\r\n`]+`(?=\s*\()/,greedy:!0,alias:"function"},identifier:{pattern:/`[^\r\n`]+`/,greedy:!0},"class-name":{pattern:/(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,lookbehind:!0,greedy:!0},keyword:/\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:[{pattern:/(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,lookbehind:!0},/-?\b(?:Infinity|NaN)\b/],operator:/=/,punctuation:/[()\[\]{}<>.:,;-]/},t.languages.avdl=t.languages["avro-idl"]}t.exports=n,n.displayName="avroIdl",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/%%?[~:\w]+%?|!\S+!/,r={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},n=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;t.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:n,parameter:r,variable:e,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:n,parameter:r,variable:e,number:i,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:n,parameter:r,variable:[e,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:n,parameter:r,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:e,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(t)}t.exports=n,n.displayName="batch",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.bbcode={tag:{pattern:/\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/,inside:{tag:{pattern:/^\[\/?[^\s=\]]+/,inside:{punctuation:/^\[\/?/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\]/,"attr-name":/[^\s=\]]+/}}},t.languages.shortcode=t.languages.bbcode}t.exports=n,n.displayName="bbcode",n.aliases=["shortcode"]},function(t,e,r){"use strict";function n(t){t.languages.bicep={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],property:[{pattern:/([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,lookbehind:!0},{pattern:/([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,lookbehind:!0,greedy:!0}],string:[{pattern:/'''[^'][\s\S]*?'''/,greedy:!0},{pattern:/(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0}],"interpolated-string":{pattern:/(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}\r\n]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0},punctuation:/^\$\{|\}$/}},string:/[\s\S]+/}},datatype:{pattern:/(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,lookbehind:!0,alias:"class-name"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/,decorator:/@\w+\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,punctuation:/[{}[\];(),.:]/},t.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside=t.languages.bicep}t.exports=n,n.displayName="bicep",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.birb=t.languages.extend("clike",{string:{pattern:/r?("|')(?:\\.|(?!\1)[^\\])*\1/,greedy:!0},"class-name":[/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,/\b(?:[A-Z]\w*|(?!(?:var|void)\b)[a-z]\w*)(?=\s+\w+\s*[;,=()])/],keyword:/\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,operator:/\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,variable:/\b[a-z_]\w*\b/}),t.languages.insertBefore("birb","function",{metadata:{pattern:/<\w+>/,greedy:!0,alias:"symbol"}})}t.exports=n,n.displayName="birb",n.aliases=[]},function(t,e,r){"use strict";var n=r(428);function i(t){t.register(n),t.languages.bison=t.languages.extend("c",{}),t.languages.insertBefore("bison","comment",{bison:{pattern:/^(?:[^%]|%(?!%))*%%[\s\S]*?%%/,inside:{c:{pattern:/%\{[\s\S]*?%\}|\{(?:\{[^}]*\}|[^{}])*\}/,inside:{delimiter:{pattern:/^%?\{|%?\}$/,alias:"punctuation"},"bison-variable":{pattern:/[$@](?:<[^\s>]+>)?[\w$]+/,alias:"variable",inside:{punctuation:/<|>/}},rest:t.languages.c}},comment:t.languages.c.comment,string:t.languages.c.string,property:/\S+(?=:)/,keyword:/%\w+/,number:{pattern:/(^|[^@])\b(?:0x[\da-f]+|\d+)/i,lookbehind:!0},punctuation:/%[%?]|[|:;\[\]<>]/}}})}t.exports=i,i.displayName="bison",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.bnf={string:{pattern:/"[^\r\n"]*"|'[^\r\n']*'/},definition:{pattern:/<[^<>\r\n\t]+>(?=\s*::=)/,alias:["rule","keyword"],inside:{punctuation:/^<|>$/}},rule:{pattern:/<[^<>\r\n\t]+>/,inside:{punctuation:/^<|>$/}},operator:/::=|[|()[\]{}*+?]|\.{3}/},t.languages.rbnf=t.languages.bnf}t.exports=n,n.displayName="bnf",n.aliases=["rbnf"]},function(t,e,r){"use strict";function n(t){t.languages.brainfuck={pointer:{pattern:/<|>/,alias:"keyword"},increment:{pattern:/\+/,alias:"inserted"},decrement:{pattern:/-/,alias:"deleted"},branching:{pattern:/\[|\]/,alias:"important"},operator:/[.,]/,comment:/\S+/}}t.exports=n,n.displayName="brainfuck",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.brightscript={comment:/(?:\brem|').*/i,"directive-statement":{pattern:/(^[\t ]*)#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if).*/im,lookbehind:!0,alias:"property",inside:{"error-message":{pattern:/(^#error).+/,lookbehind:!0},directive:{pattern:/^#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if)/,alias:"keyword"},expression:{pattern:/[\s\S]+/,inside:null}}},property:{pattern:/([\r\n{,][\t ]*)(?:(?!\d)\w+|"(?:[^"\r\n]|"")*"(?!"))(?=[ \t]*:)/,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},"class-name":{pattern:/(\bAs[\t ]+)\w+/i,lookbehind:!0},keyword:/\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?!\d)\w+(?=[\t ]*\()/,number:/(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i,operator:/--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i,punctuation:/[.,;()[\]{}]/,constant:/\b(?:LINE_NUM)\b/i},t.languages.brightscript["directive-statement"].inside.expression.inside=t.languages.brightscript}t.exports=n,n.displayName="brightscript",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.bro={comment:{pattern:/(^|[^\\$])#.*/,lookbehind:!0,inside:{italic:/\b(?:FIXME|TODO|XXX)\b/}},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},boolean:/\b[TF]\b/,function:{pattern:/(\b(?:event|function|hook)[ \t]+)\w+(?:::\w+)?/,lookbehind:!0},builtin:/(?:@(?:load(?:-(?:plugin|sigs))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:add_func|create_expire|default|delete_func|encrypt|error_handler|expire_func|group|log|mergeable|optional|persistent|priority|raw_output|read_expire|redef|rotate_interval|rotate_size|synchronized|type_column|write_expire))/,constant:{pattern:/(\bconst[ \t]+)\w+/i,lookbehind:!0},keyword:/\b(?:add|addr|alarm|any|bool|break|const|continue|count|delete|double|else|enum|event|export|file|for|function|global|hook|if|in|int|interval|local|module|next|of|opaque|pattern|port|print|record|return|schedule|set|string|subnet|table|time|timeout|using|vector|when)\b/,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,punctuation:/[{}[\];(),.:]/}}t.exports=n,n.displayName="bro",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.bsl={comment:/\/\/.*/,string:[{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},{pattern:/'(?:[^'\r\n\\]|\\.)*'/}],keyword:[{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\u043f\u043e\u043a\u0430|\u0434\u043b\u044f|\u043d\u043e\u0432\u044b\u0439|\u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c|\u043f\u043e\u043f\u044b\u0442\u043a\u0430|\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435|\u0432\u044b\u0437\u0432\u0430\u0442\u044c\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435|\u0438\u043d\u0430\u0447\u0435|\u043a\u043e\u043d\u0435\u0446\u043f\u043e\u043f\u044b\u0442\u043a\u0438|\u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e|\u0444\u0443\u043d\u043a\u0446\u0438\u044f|\u043f\u0435\u0440\u0435\u043c|\u0432\u043e\u0437\u0432\u0440\u0430\u0442|\u043a\u043e\u043d\u0435\u0446\u0444\u0443\u043d\u043a\u0446\u0438\u0438|\u0435\u0441\u043b\u0438|\u0438\u043d\u0430\u0447\u0435\u0435\u0441\u043b\u0438|\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430|\u043a\u043e\u043d\u0435\u0446\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b|\u0442\u043e\u0433\u0434\u0430|\u0437\u043d\u0430\u0447|\u044d\u043a\u0441\u043f\u043e\u0440\u0442|\u043a\u043e\u043d\u0435\u0446\u0435\u0441\u043b\u0438|\u0438\u0437|\u043a\u0430\u0436\u0434\u043e\u0433\u043e|\u0438\u0441\u0442\u0438\u043d\u0430|\u043b\u043e\u0436\u044c|\u043f\u043e|\u0446\u0438\u043a\u043b|\u043a\u043e\u043d\u0435\u0446\u0446\u0438\u043a\u043b\u0430|\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:break|do|each|else|elseif|enddo|endfunction|endif|endprocedure|endtry|except|execute|export|false|for|function|if|in|new|null|procedure|raise|return|then|to|true|try|undefined|val|var|while)\b/i}],number:{pattern:/(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?/i,lookbehind:!0},operator:[/[<>+\-*/]=?|[%=]/,{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\u0438|\u0438\u043b\u0438|\u043d\u0435)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:and|not|or)\b/i}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/,directive:[{pattern:/^([ \t]*)&.*/m,lookbehind:!0,greedy:!0,alias:"important"},{pattern:/^([ \t]*)#.*/gm,lookbehind:!0,greedy:!0,alias:"important"}]},t.languages.oscript=t.languages.bsl}t.exports=n,n.displayName="bsl",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.cfscript=t.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,inside:{annotation:{pattern:/(?:^|[^.])@[\w\.]+/,alias:"punctuation"}}},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],keyword:/\b(?:abstract|break|catch|component|continue|default|do|else|extends|final|finally|for|function|if|in|include|package|private|property|public|remote|required|rethrow|return|static|switch|throw|try|var|while|xml)\b(?!\s*=)/,operator:[/\+\+|--|&&|\|\||::|=>|[!=]==|<=?|>=?|[-+*/%&|^!=<>]=?|\?(?:\.|:)?|[?:]/,/\b(?:and|contains|eq|equal|eqv|gt|gte|imp|is|lt|lte|mod|not|or|xor)\b/],scope:{pattern:/\b(?:application|arguments|cgi|client|cookie|local|session|super|this|variables)\b/,alias:"global"},type:{pattern:/\b(?:any|array|binary|boolean|date|guid|numeric|query|string|struct|uuid|void|xml)\b/,alias:"builtin"}}),t.languages.insertBefore("cfscript","keyword",{"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"}}),delete t.languages.cfscript["class-name"],t.languages.cfc=t.languages.cfscript}t.exports=n,n.displayName="cfscript",n.aliases=[]},function(t,e,r){"use strict";var n=r(924);function i(t){t.register(n),t.languages.chaiscript=t.languages.extend("clike",{string:{pattern:/(^|[^\\])'(?:[^'\\]|\\[\s\S])*'/,lookbehind:!0,greedy:!0},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},{pattern:/(\b(?:attr|def)\s+)\w+(?=\s*::)/,lookbehind:!0}],keyword:/\b(?:attr|auto|break|case|catch|class|continue|def|default|else|finally|for|fun|global|if|return|switch|this|try|var|while)\b/,number:[t.languages.cpp.number,/\b(?:Infinity|NaN)\b/],operator:/>>=?|<<=?|\|\||&&|:[:=]?|--|\+\+|[=!<>+\-*/%|&^]=?|[?~]|`[^`\r\n]{1,4}`/}),t.languages.insertBefore("chaiscript","operator",{"parameter-type":{pattern:/([,(]\s*)\w+(?=\s+\w)/,lookbehind:!0,alias:"class-name"}}),t.languages.insertBefore("chaiscript","string",{"string-interpolation":{pattern:/(^|[^\\])"(?:[^"$\\]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\}/,lookbehind:!0,inside:{"interpolation-expression":{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:t.languages.chaiscript},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"}}},string:/[\s\S]+/}}})}t.exports=i,i.displayName="chaiscript",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}}t.exports=n,n.displayName="cil",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},char:/\\\w+/,symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}}t.exports=n,n.displayName="clojure",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_(?:BINARY_DIR|DESCRIPTION|HOMEPAGE_URL|NAME|SOURCE_DIR|VERSION|VERSION_(?:MAJOR|MINOR|PATCH|TWEAK))|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE|XCODE_VERSION))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|GLOBAL_KEYWORD|GLOBAL_PROJECT_TYPES|GLOBAL_ROOTNAMESPACE|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}}t.exports=n,n.displayName="cmake",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}}t.exports=n,n.displayName="cobol",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/#(?!\{).+/,r={pattern:/#\{[^}]+\}/,alias:"variable"};t.languages.coffeescript=t.languages.extend("javascript",{comment:e,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:r}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),t.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:e,interpolation:r}}}),t.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:t.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:r}}]}),t.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete t.languages.coffeescript["template-string"],t.languages.coffee=t.languages.coffeescript}(t)}t.exports=n,n.displayName="coffeescript",n.aliases=["coffee"]},function(t,e,r){"use strict";function n(t){t.languages.concurnas={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,lookbehind:!0,greedy:!0},langext:{pattern:/\b\w+\s*\|\|[\s\S]+?\|\|/,greedy:!0,inside:{"class-name":/^\w+/,string:{pattern:/(^\s*\|\|)[\s\S]+(?=\|\|$)/,lookbehind:!0},punctuation:/\|\|/}},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,lookbehind:!0},keyword:/\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,boolean:/\b(?:false|true)\b/,number:/\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,punctuation:/[{}[\];(),.:]/,operator:/<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,annotation:{pattern:/@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,alias:"builtin"}},t.languages.insertBefore("concurnas","langext",{"regex-literal":{pattern:/\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:t.languages.concurnas},regex:/[\s\S]+/}},"string-literal":{pattern:/(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:t.languages.concurnas},string:/[\s\S]+/}}}),t.languages.conc=t.languages.concurnas}t.exports=n,n.displayName="concurnas",n.aliases=["conc"]},function(t,e,r){"use strict";function n(t){!function(t){for(var e=/\(\*(?:[^(*]|\((?!\*)|\*(?!\))|)*\*\)/.source,r=0;r<2;r++)e=e.replace(//g,(function(){return e}));e=e.replace(//g,"[]"),t.languages.coq={comment:RegExp(e),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp(/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|)*\]/.source.replace(//g,(function(){return e}))),greedy:!0,alias:"attr-name",inside:{comment:RegExp(e),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}(t)}t.exports=n,n.displayName="coq",n.aliases=[]},function(t,e,r){"use strict";var n=r(698);function i(t){t.register(n),function(t){t.languages.crystal=t.languages.extend("ruby",{keyword:[/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,operator:[/->/,t.languages.ruby.operator],punctuation:/[(){}[\].,;\\]/}),t.languages.insertBefore("crystal","string-literal",{attribute:{pattern:/@\[.*?\]/,inside:{delimiter:{pattern:/^@\[|\]$/,alias:"punctuation"},attribute:{pattern:/^(\s*)\w+/,lookbehind:!0,alias:"class-name"},args:{pattern:/\S(?:[\s\S]*\S)?/,inside:t.languages.crystal}}},expansion:{pattern:/\{(?:\{.*?\}|%.*?%)\}/,inside:{content:{pattern:/^(\{.)[\s\S]+(?=.\}$)/,lookbehind:!0,inside:t.languages.crystal},delimiter:{pattern:/^\{[\{%]|[\}%]\}$/,alias:"operator"}}},char:{pattern:/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,greedy:!0}})}(t)}t.exports=i,i.displayName="crystal",i.aliases=[]},function(t,e,r){"use strict";var n=r(697);function i(t){t.register(n),function(t){var e=/\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//.source,r=/@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source+"|"+/'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;function n(t,n){for(var i=0;i/g,(function(){return"(?:"+t+")"}));return t.replace(//g,"[^\\s\\S]").replace(//g,"(?:"+r+")").replace(//g,"(?:"+e+")")}var i=n(/\((?:[^()'"@/]|||)*\)/.source,2),o=n(/\[(?:[^\[\]'"@/]|||)*\]/.source,2),a=n(/\{(?:[^{}'"@/]|||)*\}/.source,2),s=n(/<(?:[^<>'"@/]|||)*>/.source,2),u=/(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?/.source,c=/(?!\d)[^\s>\/=$<%]+/.source+u+/\s*\/?>/.source,l=/\B@?/.source+"(?:"+/<([a-zA-Z][\w:]*)/.source+u+/\s*>/.source+"(?:"+/[^<]/.source+"|"+/<\/?(?!\1\b)/.source+c+"|"+n(/<\1/.source+u+/\s*>/.source+"(?:"+/[^<]/.source+"|"+/<\/?(?!\1\b)/.source+c+"|)*"+/<\/\1\s*>/.source,2)+")*"+/<\/\1\s*>/.source+"|"+/|\+|~|\|\|/,punctuation:/[(),]/}},t.languages.css.atrule.inside["selector-function-argument"].inside=e,t.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var n={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};t.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,number:i})}(t)}t.exports=n,n.displayName="cssExtras",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}}t.exports=n,n.displayName="csv",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.cypher={comment:/\/\/.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,greedy:!0},"class-name":{pattern:/(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,lookbehind:!0,greedy:!0},relationship:{pattern:/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,lookbehind:!0,greedy:!0,alias:"property"},identifier:{pattern:/`(?:[^`\\\r\n])*`/,greedy:!0},variable:/\$\w+/,keyword:/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,function:/\b\w+\b(?=\s*\()/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,operator:/:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,punctuation:/[()[\]{},;.]/}}t.exports=n,n.displayName="cypher",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.d=t.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp(/(^|[^\\])/.source+"(?:"+[/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,/\/\/.*/.source,/\/\*[\s\S]*?\*\//.source].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp([/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,/\bq"(.)[\s\S]*?\2"/.source,/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),t.languages.insertBefore("d","string",{char:/'(?:\\(?:\W|\w+)|[^\\])'/}),t.languages.insertBefore("d","keyword",{property:/\B@\w*/}),t.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}})}t.exports=n,n.displayName="d",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],r=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,n={pattern:RegExp(r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};t.languages.dart=t.languages.extend("clike",{"class-name":[n,{pattern:RegExp(r+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:n.inside}],keyword:e,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),t.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:t.languages.dart}}},string:/[\s\S]+/}},string:void 0}),t.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),t.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":n,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(t)}t.exports=n,n.displayName="dart",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.dataweave={url:/\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,property:{pattern:/(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,greedy:!0},string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},"mime-type":/\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,date:{pattern:/\|[\w:+-]+\|/,greedy:!0},comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],regex:{pattern:/\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,greedy:!0},keyword:/\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/,function:/\b[A-Z_]\w*(?=\s*\()/i,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\];(),.:@]/,operator:/<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,boolean:/\b(?:false|true)\b/}}(t)}t.exports=n,n.displayName="dataweave",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.dax={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,lookbehind:!0},"data-field":{pattern:/'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,alias:"symbol"},measure:{pattern:/\[[ \w\xA0-\uFFFF]+\]/,alias:"constant"},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},function:/\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,keyword:/\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,boolean:{pattern:/\b(?:FALSE|NULL|TRUE)\b/i,alias:"constant"},number:/\b\d+(?:\.\d*)?|\B\.\d+\b/,operator:/:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,punctuation:/[;\[\](){}`,.]/}}t.exports=n,n.displayName="dax",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.dhall={comment:/--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,string:{pattern:/"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,alias:"language-dhall",inside:null},punctuation:/\$\{|\}/}}}},label:{pattern:/`[^`]*`/,greedy:!0},url:{pattern:/\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,greedy:!0},env:{pattern:/\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,greedy:!0,inside:{function:/^env/,operator:/^:/,variable:/[\s\S]+/}},hash:{pattern:/\bsha256:[\da-fA-F]{64}\b/,inside:{function:/sha256/,operator:/:/,number:/[\da-fA-F]{64}/}},keyword:/\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,builtin:/\b(?:None|Some)\b/,boolean:/\b(?:False|True)\b/,number:/\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,operator:/\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,punctuation:/\.\.|[{}\[\](),./]/,"class-name":/\b[A-Z]\w*\b/},t.languages.dhall.string.inside.interpolation.inside.expression.inside=t.languages.dhall}t.exports=n,n.displayName="dhall",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var e={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(e).forEach((function(r){var n=e[r],i=[];/^\w+$/.test(r)||i.push(/\w+/.exec(r)[0]),"diff"===r&&i.push("bold"),t.languages.diff[r]={pattern:RegExp("^(?:["+n+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}})),Object.defineProperty(t.languages.diff,"PREFIXES",{value:e})}(t)}t.exports=n,n.displayName="diff",n.aliases=[]},function(t,e,r){"use strict";var n=r(223);function i(t){t.register(n),function(t){t.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var e=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,r=t.languages["markup-templating"];t.hooks.add("before-tokenize",(function(t){r.buildPlaceholders(t,"django",e)})),t.hooks.add("after-tokenize",(function(t){r.tokenizePlaceholders(t,"django")})),t.languages.jinja2=t.languages.django,t.hooks.add("before-tokenize",(function(t){r.buildPlaceholders(t,"jinja2",e)})),t.hooks.add("after-tokenize",(function(t){r.tokenizePlaceholders(t,"jinja2")}))}(t)}t.exports=i,i.displayName="django",i.aliases=["jinja2"]},function(t,e,r){"use strict";function n(t){t.languages["dns-zone-file"]={comment:/;.*/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},variable:[{pattern:/(^\$ORIGIN[ \t]+)\S+/m,lookbehind:!0},{pattern:/(^|\s)@(?=\s|$)/,lookbehind:!0}],keyword:/^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,class:{pattern:/(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,lookbehind:!0,alias:"keyword"},punctuation:/[()]/},t.languages["dns-zone"]=t.languages["dns-zone-file"]}t.exports=n,n.displayName="dnsZoneFile",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,r=/(?:[ \t]+(?![ \t])(?:)?|)/.source.replace(//g,(function(){return e})),n=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(//g,(function(){return n})),o={pattern:RegExp(n),greedy:!0},a={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function s(t,e){return t=t.replace(//g,(function(){return i})).replace(//g,(function(){return r})),RegExp(t,e)}t.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:s(/(^(?:ONBUILD)?\w+)(?:)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[o,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:s(/(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:s(/(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\]+)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:s(/(^ONBUILD)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:a,string:o,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:a},t.languages.dockerfile=t.languages.docker}(t)}t.exports=n,n.displayName="docker",n.aliases=["dockerfile"]},function(t,e,r){"use strict";function n(t){!function(t){var e="(?:"+[/[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source,/-?(?:\.\d+|\d+(?:\.\d*)?)/.source,/"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source,/<(?:[^<>]|(?!)*>/.source].join("|")+")",r={markup:{pattern:/(^<)[\s\S]+(?=>$)/,lookbehind:!0,alias:["language-markup","language-html","language-xml"],inside:t.languages.markup}};function n(t,r){return RegExp(t.replace(//g,(function(){return e})),r)}t.languages.dot={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,greedy:!0},"graph-name":{pattern:n(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)/.source,"i"),lookbehind:!0,greedy:!0,alias:"class-name",inside:r},"attr-value":{pattern:n(/(=[ \t\r\n]*)/.source),lookbehind:!0,greedy:!0,inside:r},"attr-name":{pattern:n(/([\[;, \t\r\n])(?=[ \t\r\n]*=)/.source),lookbehind:!0,greedy:!0,inside:r},keyword:/\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,"compass-point":{pattern:/(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,lookbehind:!0,alias:"builtin"},node:{pattern:n(/(^|[^-.\w\x80-\uFFFF\\])/.source),lookbehind:!0,greedy:!0,inside:r},operator:/[=:]|-[->]/,punctuation:/[\[\]{};,]/},t.languages.gv=t.languages.dot}(t)}t.exports=n,n.displayName="dot",n.aliases=["gv"]},function(t,e,r){"use strict";function n(t){t.languages.ebnf={comment:/\(\*[\s\S]*?\*\)/,string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},special:{pattern:/\?[^?\r\n]*\?/,greedy:!0,alias:"class-name"},definition:{pattern:/^([\t ]*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im,lookbehind:!0,alias:["rule","keyword"]},rule:/\b[a-z]\w*(?:[ \t]+[a-z]\w*)*\b/i,punctuation:/\([:/]|[:/]\)|[.,;()[\]{}]/,operator:/[-=|*/!]/}}t.exports=n,n.displayName="ebnf",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.editorconfig={comment:/[;#].*/,section:{pattern:/(^[ \t]*)\[.+\]/m,lookbehind:!0,alias:"selector",inside:{regex:/\\\\[\[\]{},!?.*]/,operator:/[!?]|\.\.|\*{1,2}/,punctuation:/[\[\]{},]/}},key:{pattern:/(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/=.*/,alias:"attr-value",inside:{punctuation:/^=/}}}}t.exports=n,n.displayName="editorconfig",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}t.exports=n,n.displayName="eiffel",n.aliases=[]},function(t,e,r){"use strict";var n=r(223);function i(t){t.register(n),function(t){t.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:t.languages.javascript}},t.hooks.add("before-tokenize",(function(e){t.languages["markup-templating"].buildPlaceholders(e,"ejs",/<%(?!%)[\s\S]+?%>/g)})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"ejs")})),t.languages.eta=t.languages.ejs}(t)}t.exports=i,i.displayName="ejs",i.aliases=["eta"]},function(t,e,r){"use strict";function n(t){t.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},t.languages.elixir.string.forEach((function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:t.languages.elixir}}}}))}t.exports=n,n.displayName="elixir",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}}t.exports=n,n.displayName="elm",n.aliases=[]},function(t,e,r){"use strict";var n=r(698),i=r(223);function o(t){t.register(n),t.register(i),function(t){t.languages.erb={delimiter:{pattern:/^(\s*)<%=?|%>(?=\s*$)/,lookbehind:!0,alias:"punctuation"},ruby:{pattern:/\s*\S[\s\S]*/,alias:"language-ruby",inside:t.languages.ruby}},t.hooks.add("before-tokenize",(function(e){t.languages["markup-templating"].buildPlaceholders(e,"erb",/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g)})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"erb")}))}(t)}t.exports=o,o.displayName="erb",o.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}}t.exports=n,n.displayName="erlang",n.aliases=[]},function(t,e,r){"use strict";var n=r(1335),i=r(223);function o(t){t.register(n),t.register(i),function(t){t.languages.etlua={delimiter:{pattern:/^<%[-=]?|-?%>$/,alias:"punctuation"},"language-lua":{pattern:/[\s\S]+/,inside:t.languages.lua}},t.hooks.add("before-tokenize",(function(e){t.languages["markup-templating"].buildPlaceholders(e,"etlua",/<%[\s\S]+?%>/g)})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"etlua")}))}(t)}t.exports=o,o.displayName="etlua",o.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages["excel-formula"]={comment:{pattern:/(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},reference:{pattern:/(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,greedy:!0,alias:"string",inside:{operator:/!$/,punctuation:/'/,sheet:{pattern:/[^[\]]+$/,alias:"function"},file:{pattern:/\[[^[\]]+\]$/,inside:{punctuation:/[[\]]/}},path:/[\s\S]+/}},"function-name":{pattern:/\b[A-Z]\w*(?=\()/i,alias:"keyword"},range:{pattern:/\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,alias:"property",inside:{operator:/:/,cell:/\$?[A-Z]+\$?\d+/i,column:/\$?[A-Z]+/i,row:/\$?\d+/}},cell:{pattern:/\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,alias:"property"},number:/(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,boolean:/\b(?:FALSE|TRUE)\b/i,operator:/[-+*/^%=&,]|<[=>]?|>=?/,punctuation:/[[\]();{}|]/},t.languages.xlsx=t.languages.xls=t.languages["excel-formula"]}t.exports=n,n.displayName="excelFormula",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e={function:/\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/},r={number:/\\[^\s']|%\w/},n={comment:[{pattern:/(^|\s)(?:! .*|!$)/,lookbehind:!0,inside:e},{pattern:/(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,lookbehind:!0,greedy:!0,inside:e},{pattern:/(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,inside:e}],number:[{pattern:/(^|\s)[+-]?\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)-\d+-\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,lookbehind:!0}],regexp:{pattern:/(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,lookbehind:!0,alias:"number",inside:{variable:/\\\S/,keyword:/[+?*\[\]^$(){}.|]/,operator:{pattern:/(\/)[idmsr]+(?:-[idmsr]+)?/,lookbehind:!0}}},boolean:{pattern:/(^|\s)[tf](?=\s|$)/,lookbehind:!0},"custom-string":{pattern:/(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:/\\\S|%\w|\//}},"multiline-string":[{pattern:/(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:r.number,"semicolon-or-setlocal":{pattern:/([\r\n][ \t]*);(?=\s|$)/,lookbehind:!0,alias:"function"}}},{pattern:/(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:r},{pattern:/(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:r}],"special-using":{pattern:/(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,lookbehind:!0,alias:"function",inside:{string:{pattern:/(\s)[^:\s]+/,lookbehind:!0}}},"stack-effect-delimiter":[{pattern:/(^|\s)(?:call|eval|execute)?\((?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)--(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\)(?=\s|$)/,lookbehind:!0,alias:"operator"}],combinators:{pattern:null,lookbehind:!0,alias:"keyword"},"kernel-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"sequences-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"math-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"constructor-word":{pattern:/(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,lookbehind:!0,alias:"keyword"},"other-builtin-syntax":{pattern:null,lookbehind:!0,alias:"operator"},"conventionally-named-word":{pattern:/(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,lookbehind:!0,alias:"keyword"},"colon-syntax":{pattern:/(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"function"},"semicolon-or-setlocal":{pattern:/(\s)(?:;|:>)(?=\s|$)/,lookbehind:!0,alias:"function"},"curly-brace-literal-delimiter":[{pattern:/(^|\s)[a-z]*\{(?=\s)/i,lookbehind:!0,alias:"operator"},{pattern:/(\s)\}(?=\s|$)/,lookbehind:!0,alias:"operator"}],"quotation-delimiter":[{pattern:/(^|\s)\[(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\](?=\s|$)/,lookbehind:!0,alias:"operator"}],"normal-word":{pattern:/(^|\s)[^"\s]\S*(?=\s|$)/,lookbehind:!0},string:{pattern:/"(?:\\\S|[^"\\])*"/,greedy:!0,inside:r}},i=function(t){return(t+"").replace(/([.?*+\^$\[\]\\(){}|\-])/g,"\\$1")},o=function(t){return new RegExp("(^|\\s)(?:"+t.map(i).join("|")+")(?=\\s|$)")},a={"kernel-builtin":["or","2nipd","4drop","tuck","wrapper","nip","wrapper?","callstack>array","die","dupd","callstack","callstack?","3dup","hashcode","pick","4nip","build",">boolean","nipd","clone","5nip","eq?","?","=","swapd","2over","clear","2dup","get-retainstack","not","tuple?","dup","3nipd","call","-rotd","object","drop","assert=","assert?","-rot","execute","boa","get-callstack","curried?","3drop","pickd","overd","over","roll","3nip","swap","and","2nip","rotd","throw","(clone)","hashcode*","spin","reach","4dup","equal?","get-datastack","assert","2drop","","boolean?","identity-hashcode","identity-tuple?","null","composed?","new","5drop","rot","-roll","xor","identity-tuple","boolean"],"other-builtin-syntax":["=======","recursive","flushable",">>","<<<<<<","M\\","B","PRIVATE>","\\","======","final","inline","delimiter","deprecated",">>>>>","<<<<<<<","parse-complex","malformed-complex","read-only",">>>>>>>","call-next-method","<<","foldable","$","$[","${"],"sequences-builtin":["member-eq?","mismatch","append","assert-sequence=","longer","repetition","clone-like","3sequence","assert-sequence?","last-index-from","reversed","index-from","cut*","pad-tail","join-as","remove-eq!","concat-as","but-last","snip","nths","nth","sequence","longest","slice?","","remove-nth","tail-slice","empty?","tail*","member?","virtual-sequence?","set-length","drop-prefix","iota","unclip","bounds-error?","unclip-last-slice","non-negative-integer-expected","non-negative-integer-expected?","midpoint@","longer?","?set-nth","?first","rest-slice","prepend-as","prepend","fourth","sift","subseq-start","new-sequence","?last","like","first4","1sequence","reverse","slice","virtual@","repetition?","set-last","index","4sequence","max-length","set-second","immutable-sequence","first2","first3","supremum","unclip-slice","suffix!","insert-nth","tail","3append","short","suffix","concat","flip","immutable?","reverse!","2sequence","sum","delete-all","indices","snip-slice","","check-slice","sequence?","head","append-as","halves","sequence=","collapse-slice","?second","slice-error?","product","bounds-check?","bounds-check","immutable","virtual-exemplar","harvest","remove","pad-head","last","set-fourth","cartesian-product","remove-eq","shorten","shorter","reversed?","shorter?","shortest","head-slice","pop*","tail-slice*","but-last-slice","iota?","append!","cut-slice","new-resizable","head-slice*","sequence-hashcode","pop","set-nth","?nth","second","join","immutable-sequence?","","3append-as","virtual-sequence","subseq?","remove-nth!","length","last-index","lengthen","assert-sequence","copy","move","third","first","tail?","set-first","prefix","bounds-error","","exchange","surround","cut","min-length","set-third","push-all","head?","subseq-start-from","delete-slice","rest","sum-lengths","head*","infimum","remove!","glue","slice-error","subseq","push","replace-slice","subseq-as","unclip-last"],"math-builtin":["number=","next-power-of-2","?1+","fp-special?","imaginary-part","float>bits","number?","fp-infinity?","bignum?","fp-snan?","denominator","gcd","*","+","fp-bitwise=","-","u>=","/",">=","bitand","power-of-2?","log2-expects-positive","neg?","<","log2",">","integer?","number","bits>double","2/","zero?","bits>float","float?","shift","ratio?","rect>","even?","ratio","fp-sign","bitnot",">fixnum","complex?","/i","integer>fixnum","/f","sgn",">bignum","next-float","u<","u>","mod","recip","rational",">float","2^","integer","fixnum?","neg","fixnum","sq","bignum",">rect","bit?","fp-qnan?","simple-gcd","complex","","real",">fraction","double>bits","bitor","rem","fp-nan-payload","real-part","log2-expects-positive?","prev-float","align","unordered?","float","fp-nan?","abs","bitxor","integer>fixnum-strict","u<=","odd?","<=","/mod",">integer","real?","rational?","numerator"]};Object.keys(a).forEach((function(t){n[t].pattern=o(a[t])}));n.combinators.pattern=o(["2bi","while","2tri","bi*","4dip","both?","same?","tri@","curry","prepose","3bi","?if","tri*","2keep","3keep","curried","2keepd","when","2bi*","2tri*","4keep","bi@","keepdd","do","unless*","tri-curry","if*","loop","bi-curry*","when*","2bi@","2tri@","with","2with","either?","bi","until","3dip","3curry","tri-curry*","tri-curry@","bi-curry","keepd","compose","2dip","if","3tri","unless","tuple","keep","2curry","tri","most","while*","dip","composed","bi-curry@","find-last-from","trim-head-slice","map-as","each-from","none?","trim-tail","partition","if-empty","accumulate*","reject!","find-from","accumulate-as","collector-for-as","reject","map","map-sum","accumulate!","2each-from","follow","supremum-by","map!","unless-empty","collector","padding","reduce-index","replicate-as","infimum-by","trim-tail-slice","count","find-index","filter","accumulate*!","reject-as","map-integers","map-find","reduce","selector","interleave","2map","filter-as","binary-reduce","map-index-as","find","produce","filter!","replicate","cartesian-map","cartesian-each","find-index-from","map-find-last","3map-as","3map","find-last","selector-as","2map-as","2map-reduce","accumulate","each","each-index","accumulate*-as","when-empty","all?","collector-as","push-either","new-like","collector-for","2selector","push-if","2all?","map-reduce","3each","any?","trim-slice","2reduce","change-nth","produce-as","2each","trim","trim-head","cartesian-find","map-index","if-zero","each-integer","unless-zero","(find-integer)","when-zero","find-last-integer","(all-integers?)","times","(each-integer)","find-integer","all-integers?","unless-negative","if-positive","when-positive","when-negative","unless-positive","if-negative","case","2cleave","cond>quot","case>quot","3cleave","wrong-values","to-fixed-point","alist>quot","cond","cleave","call-effect","recursive-hashcode","spread","deep-spread>quot","2||","0||","n||","0&&","2&&","3||","1||","1&&","n&&","3&&","smart-unless*","keep-inputs","reduce-outputs","smart-when*","cleave>array","smart-with","smart-apply","smart-if","inputs/outputs","output>sequence-n","map-outputs","map-reduce-outputs","dropping","output>array","smart-map-reduce","smart-2map-reduce","output>array-n","nullary","inputsequence"]),t.languages.factor=n}(t)}t.exports=n,n.displayName="factor",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.false={comment:{pattern:/\{[^}]*\}/},string:{pattern:/"[^"]*"/,greedy:!0},"character-code":{pattern:/'(?:[^\r]|\r\n?)/,alias:"number"},"assembler-code":{pattern:/\d+`/,alias:"important"},number:/\d+/,operator:/[-!#$%&'*+,./:;=>?@\\^_`|~\xdf\xf8]/,punctuation:/\[|\]/,variable:/[a-z]/,"non-standard":{pattern:/[()!=]=?|[-+*/%]|\b(?:in|is)\b/}),delete t.languages["firestore-security-rules"]["class-name"],t.languages.insertBefore("firestore-security-rules","keyword",{path:{pattern:/(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,inside:{operator:/=/,keyword:/\*\*/,punctuation:/[.$(){}]/}},punctuation:/\//}},method:{pattern:/(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,lookbehind:!0,alias:"builtin",inside:{punctuation:/,/}}})}t.exports=n,n.displayName="firestoreSecurityRules",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.flow=t.languages.extend("javascript",{}),t.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,alias:"tag"}]}),t.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete t.languages.flow.parameter,t.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(t.languages.flow.keyword)||(t.languages.flow.keyword=[t.languages.flow.keyword]),t.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(t)}t.exports=n,n.displayName="flow",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}}t.exports=n,n.displayName="fortran",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.fsharp=t.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),t.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),t.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),t.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,greedy:!0,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:t.languages.fsharp}}},char:{pattern:/'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0}})}t.exports=n,n.displayName="fsharp",n.aliases=[]},function(t,e,r){"use strict";var n=r(223);function i(t){t.register(n),function(t){for(var e=/[^<()"']|\((?:)*\)|<(?!#--)|<#--(?:[^-]|-(?!->))*-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/.source,r=0;r<2;r++)e=e.replace(//g,(function(){return e}));e=e.replace(//g,/[^\s\S]/.source);var n={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp(/("|')(?:(?!\1|\$\{)[^\\]|\\.|\$\{(?:(?!\})(?:))*\})*\1/.source.replace(//g,(function(){return e}))),greedy:!0,inside:{interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\\\)*)\$\{(?:(?!\})(?:))*\}/.source.replace(//g,(function(){return e}))),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\b\w+(?=\s*\()/,number:/\b\d+(?:\.\d+)?\b/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};n.string[1].inside.interpolation.inside.rest=n,t.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:n}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:n}}}},t.hooks.add("before-tokenize",(function(r){var n=RegExp(/<#--[\s\S]*?-->|<\/?[#@][a-zA-Z](?:)*?>|\$\{(?:)*?\}/.source.replace(//g,(function(){return e})),"gi");t.languages["markup-templating"].buildPlaceholders(r,"ftl",n)})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"ftl")}))}(t)}t.exports=i,i.displayName="ftl",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.gap={shell:{pattern:/^gap>[\s\S]*?(?=^gap>|$(?![\s\S]))/m,greedy:!0,inside:{gap:{pattern:/^(gap>).+(?:(?:\r(?:\n|(?!\n))|\n)>.*)*/,lookbehind:!0,inside:null},punctuation:/^gap>/}},comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(^|[^\\'"])(?:'(?:[^\r\n\\']|\\.){1,10}'|"(?:[^\r\n\\"]|\\.)*"(?!")|"""[\s\S]*?""")/,lookbehind:!0,greedy:!0,inside:{continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"}}},keyword:/\b(?:Assert|Info|IsBound|QUIT|TryNextMethod|Unbind|and|atomic|break|continue|do|elif|else|end|fi|for|function|if|in|local|mod|not|od|or|quit|readonly|readwrite|rec|repeat|return|then|until|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"},operator:/->|[-+*/^~=!]|<>|[<>]=?|:=|\.\./,punctuation:/[()[\]{},;.:]/},t.languages.gap.shell.inside.gap.inside=t.languages.gap}t.exports=n,n.displayName="gap",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.gcode={comment:/;.*|\B\(.*?\)\B/,string:{pattern:/"(?:""|[^"])*"/,greedy:!0},keyword:/\b[GM]\d+(?:\.\d+)?\b/,property:/\b[A-Z]/,checksum:{pattern:/(\*)\d+/,lookbehind:!0,alias:"number"},punctuation:/[:*]/}}t.exports=n,n.displayName="gcode",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.gdscript={comment:/#.*/,string:{pattern:/@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,greedy:!0},"class-name":{pattern:/(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,lookbehind:!0},keyword:/\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,variable:/\$\w+/,number:[/\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,/\b(?:INF|NAN|PI|TAU)\b/],constant:/\b[A-Z][A-Z_\d]*\b/,boolean:/\b(?:false|true)\b/,operator:/->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,punctuation:/[.:,;()[\]{}]/}}t.exports=n,n.displayName="gdscript",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.gedcom={"line-value":{pattern:/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,lookbehind:!0,inside:{pointer:{pattern:/^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,alias:"variable"}}},tag:{pattern:/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,lookbehind:!0,alias:"string"},level:{pattern:/(^[\t ]*)\d+/m,lookbehind:!0,alias:"number"},pointer:{pattern:/@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,alias:"variable"}}}t.exports=n,n.displayName="gedcom",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/(?:\r?\n|\r)[ \t]*\|.+\|(?:(?!\|).)*/.source;t.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Caracter\xedstica|Egenskab|Egenskap|Eiginleiki|Feature|F\u012b\u010da|Fitur|Fonctionnalit\xe9|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Func\u0163ionalitate|Func\u021bionalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalit\u0101te|Funkcionalnost|Funkcja|Funksie|Funktionalit\xe4t|Funktionalit\xe9it|Funzionalit\xe0|Hwaet|Hw\xe6t|Jellemz\u0151|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogu\u0107nost|Moznosti|Mo\u017enosti|OH HAI|Omadus|Ominaisuus|Osobina|\xd6zellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Po\u017eadavek|Po\u017eiadavka|Pretty much|Qap|Qu'meH 'ut|Savyb\u0117|T\xednh n\u0103ng|Trajto|Vermo\xeb|Vlastnos\u0165|W\u0142a\u015bciwo\u015b\u0107|Zna\u010dilnost|\u0394\u03c5\u03bd\u03b1\u03c4\u03cc\u03c4\u03b7\u03c4\u03b1|\u039b\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1|\u041c\u043e\u0433\u0443\u045b\u043d\u043e\u0441\u0442|\u041c\u04e9\u043c\u043a\u0438\u043d\u043b\u0435\u043a|\u041e\u0441\u043e\u0431\u0438\u043d\u0430|\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e|\u04ae\u0437\u0435\u043d\u0447\u04d9\u043b\u0435\u043a\u043b\u0435\u043b\u0435\u043a|\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b|\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043d\u043e\u0441\u0442|\u0424\u0443\u043d\u043a\u0446\u0438\u044f|\u0424\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b|\u05ea\u05db\u05d5\u05e0\u05d4|\u062e\u0627\u0635\u064a\u0629|\u062e\u0635\u0648\u0635\u06cc\u062a|\u0635\u0644\u0627\u062d\u06cc\u062a|\u06a9\u0627\u0631\u0648\u0628\u0627\u0631 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a|\u0648\u0650\u06cc\u0698\u06af\u06cc|\u0930\u0942\u092a \u0932\u0947\u0916|\u0a16\u0a3e\u0a38\u0a40\u0a05\u0a24|\u0a28\u0a15\u0a36 \u0a28\u0a41\u0a39\u0a3e\u0a30|\u0a2e\u0a41\u0a39\u0a3e\u0a02\u0a26\u0a30\u0a3e|\u0c17\u0c41\u0c23\u0c2e\u0c41|\u0cb9\u0cc6\u0c9a\u0ccd\u0c9a\u0cb3|\u0e04\u0e27\u0e32\u0e21\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e17\u0e32\u0e07\u0e18\u0e38\u0e23\u0e01\u0e34\u0e08|\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16|\u0e42\u0e04\u0e23\u0e07\u0e2b\u0e25\u0e31\u0e01|\uae30\ub2a5|\u30d5\u30a3\u30fc\u30c1\u30e3|\u529f\u80fd|\u6a5f\u80fd):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|\xc6r|Agtergrond|All y'all|Antecedentes|Antecedents|Atbur\xf0ar\xe1s|Atbur\xf0ar\xe1sir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|B\u1ed1i c\u1ea3nh|Cefndir|Cenario|Cen\xe1rio|Cenario de Fundo|Cen\xe1rio de Fundo|Cenarios|Cen\xe1rios|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|D\xe6mi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delinea\xe7\xe3o do Cen\xe1rio|Dis is what went down|D\u1eef li\u1ec7u|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cen\xe1rio|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgat\xf3k\xf6nyv|Forgat\xf3k\xf6nyv v\xe1zlat|Fundo|Ge\xe7mi\u015f|Grundlage|Hannergrond|ghantoH|H\xe1tt\xe9r|Heave to|Istorik|Juhtumid|Keadaan|Khung k\u1ecbch b\u1ea3n|Khung t\xecnh hu\u1ed1ng|K\u1ecbch b\u1ea3n|Koncept|Konsep skenario|Kont\xe8ks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|L\xfdsing Atbur\xf0ar\xe1sar|L\xfdsing D\xe6ma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|N\xe1\u010drt Scen\xe1ra|N\xe1\u010drt Sc\xe9n\xe1\u0159e|N\xe1\u010drt Scen\xe1ru|Oris scenarija|\xd6rnekler|Osnova|Osnova Scen\xe1ra|Osnova sc\xe9n\xe1\u0159e|Osnutek|Ozadje|Paraugs|Pavyzd\u017eiai|P\xe9ld\xe1k|Piem\u0113ri|Plan du sc\xe9nario|Plan du Sc\xe9nario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozad\xed|Pozadie|Pozadina|Pr\xedklady|P\u0159\xedklady|Primer|Primeri|Primjeri|Przyk\u0142ady|Raamstsenaarium|Reckon it's like|Rerefons|Scen\xe1r|Sc\xe9n\xe1\u0159|Scenarie|Scenarij|Scenarijai|Scenarijaus \u0161ablonas|Scenariji|Scen\u0101rijs|Scen\u0101rijs p\u0113c parauga|Scenarijus|Scenario|Sc\xe9nario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se \xf0e|Se the|Se \xfee|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo tasla\u011f\u0131|Shiver me timbers|Situ\u0101cija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structur\u0103 scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hw\xe6r swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|T\xecnh hu\u1ed1ng|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Za\u0142o\u017cenia|\u03a0\u03b1\u03c1\u03b1\u03b4\u03b5\u03af\u03b3\u03bc\u03b1\u03c4\u03b1|\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03a3\u03b5\u03bd\u03b1\u03c1\u03af\u03bf\u03c5|\u03a3\u03b5\u03bd\u03ac\u03c1\u03b9\u03b1|\u03a3\u03b5\u03bd\u03ac\u03c1\u03b9\u03bf|\u03a5\u03c0\u03cc\u03b2\u03b1\u03b8\u03c1\u03bf|\u041a\u0435\u0440\u0435\u0448|\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442|\u041a\u043e\u043d\u0446\u0435\u043f\u0442|\u041c\u0438\u0441\u0430\u043b\u043b\u0430\u0440|\u041c\u0438\u0441\u043e\u043b\u043b\u0430\u0440|\u041e\u0441\u043d\u043e\u0432\u0430|\u041f\u0435\u0440\u0435\u0434\u0443\u043c\u043e\u0432\u0430|\u041f\u043e\u0437\u0430\u0434\u0438\u043d\u0430|\u041f\u0440\u0435\u0434\u0438\u0441\u0442\u043e\u0440\u0438\u044f|\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f|\u041f\u0440\u0438\u043a\u043b\u0430\u0434\u0438|\u041f\u0440\u0438\u043c\u0435\u0440|\u041f\u0440\u0438\u043c\u0435\u0440\u0438|\u041f\u0440\u0438\u043c\u0435\u0440\u044b|\u0420\u0430\u043c\u043a\u0430 \u043d\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439|\u0421\u043a\u0438\u0446\u0430|\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0458\u0430|\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f|\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e|\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439|\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0441\u0438|\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439\u043d\u044b\u04a3 \u0442\u04e9\u0437\u0435\u043b\u0435\u0448\u0435|\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0458\u0438|\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u043e|\u0421\u0446\u0435\u043d\u0430\u0440\u0456\u0439|\u0422\u0430\u0440\u0438\u0445|\u04ae\u0440\u043d\u04d9\u043a\u043b\u04d9\u0440|\u05d3\u05d5\u05d2\u05de\u05d0\u05d5\u05ea|\u05e8\u05e7\u05e2|\u05ea\u05d1\u05e0\u05d9\u05ea \u05ea\u05e8\u05d7\u05d9\u05e9|\u05ea\u05e8\u05d7\u05d9\u05e9|\u0627\u0644\u062e\u0644\u0641\u064a\u0629|\u0627\u0644\u06af\u0648\u06cc \u0633\u0646\u0627\u0631\u06cc\u0648|\u0627\u0645\u062b\u0644\u0629|\u067e\u0633 \u0645\u0646\u0638\u0631|\u0632\u0645\u06cc\u0646\u0647|\u0633\u0646\u0627\u0631\u06cc\u0648|\u0633\u064a\u0646\u0627\u0631\u064a\u0648|\u0633\u064a\u0646\u0627\u0631\u064a\u0648 \u0645\u062e\u0637\u0637|\u0645\u062b\u0627\u0644\u06cc\u06ba|\u0645\u0646\u0638\u0631 \u0646\u0627\u0645\u06d2 \u06a9\u0627 \u062e\u0627\u06a9\u06c1|\u0645\u0646\u0638\u0631\u0646\u0627\u0645\u06c1|\u0646\u0645\u0648\u0646\u0647 \u0647\u0627|\u0909\u0926\u093e\u0939\u0930\u0923|\u092a\u0930\u093f\u0926\u0943\u0936\u094d\u092f|\u092a\u0930\u093f\u0926\u0943\u0936\u094d\u092f \u0930\u0942\u092a\u0930\u0947\u0916\u093e|\u092a\u0943\u0937\u094d\u0920\u092d\u0942\u092e\u093f|\u0a09\u0a26\u0a3e\u0a39\u0a30\u0a28\u0a3e\u0a02|\u0a2a\u0a1f\u0a15\u0a25\u0a3e|\u0a2a\u0a1f\u0a15\u0a25\u0a3e \u0a22\u0a3e\u0a02\u0a1a\u0a3e|\u0a2a\u0a1f\u0a15\u0a25\u0a3e \u0a30\u0a42\u0a2a \u0a30\u0a47\u0a16\u0a3e|\u0a2a\u0a3f\u0a1b\u0a4b\u0a15\u0a5c|\u0c09\u0c26\u0c3e\u0c39\u0c30\u0c23\u0c32\u0c41|\u0c15\u0c25\u0c28\u0c02|\u0c28\u0c47\u0c2a\u0c25\u0c4d\u0c2f\u0c02|\u0c38\u0c28\u0c4d\u0c28\u0c3f\u0c35\u0c47\u0c36\u0c02|\u0c89\u0ca6\u0cbe\u0cb9\u0cb0\u0ca3\u0cc6\u0c97\u0cb3\u0cc1|\u0c95\u0ca5\u0cbe\u0cb8\u0cbe\u0cb0\u0cbe\u0c82\u0cb6|\u0cb5\u0cbf\u0cb5\u0cb0\u0ca3\u0cc6|\u0cb9\u0cbf\u0ca8\u0ccd\u0ca8\u0cc6\u0cb2\u0cc6|\u0e42\u0e04\u0e23\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e02\u0e2d\u0e07\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c|\u0e0a\u0e38\u0e14\u0e02\u0e2d\u0e07\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07|\u0e0a\u0e38\u0e14\u0e02\u0e2d\u0e07\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c|\u0e41\u0e19\u0e27\u0e04\u0e34\u0e14|\u0e2a\u0e23\u0e38\u0e1b\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c|\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c|\ubc30\uacbd|\uc2dc\ub098\ub9ac\uc624|\uc2dc\ub098\ub9ac\uc624 \uac1c\uc694|\uc608|\u30b5\u30f3\u30d7\u30eb|\u30b7\u30ca\u30ea\u30aa|\u30b7\u30ca\u30ea\u30aa\u30a2\u30a6\u30c8\u30e9\u30a4\u30f3|\u30b7\u30ca\u30ea\u30aa\u30c6\u30f3\u30d7\u30ec|\u30b7\u30ca\u30ea\u30aa\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8|\u30c6\u30f3\u30d7\u30ec|\u4f8b|\u4f8b\u5b50|\u5267\u672c|\u5267\u672c\u5927\u7eb2|\u5287\u672c|\u5287\u672c\u5927\u7db1|\u573a\u666f|\u573a\u666f\u5927\u7eb2|\u5834\u666f|\u5834\u666f\u5927\u7db1|\u80cc\u666f):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+e+")(?:"+e+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(e),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'a|'ach|'ej|7|a|A tak\xe9|A taktie\u017e|A tie\u017e|A z\xe1rove\u0148|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|At\xe8s|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Bi\u1ebft|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|C\xe2nd|Cand|Cando|Ce|Cuando|\u010ce|\xd0a \xf0e|\xd0a|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Da\u0163i fiind|Da\u021bi fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donita\u0135o|Do|Dun|Duota|\xd0urh|Eeldades|Ef|E\u011fer ki|Entao|Ent\xe3o|Ent\xf3n|E|En|Entonces|Epi|\xc9s|Etant donn\xe9e|Etant donn\xe9|Et|\xc9tant donn\xe9es|\xc9tant donn\xe9e|\xc9tant donn\xe9|Etant donn\xe9es|Etant donn\xe9s|\xc9tant donn\xe9s|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Je\u015bli|Je\u017celi|Kad|Kada|Kadar|Kai|Kaj|Kdy\u017e|Ke\u010f|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|L\xe8 sa a|L\xe8|Logo|Lorsqu'<|Lorsque|m\xe4|Maar|Mais|Maj\u0105c|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|N\xe5r|N\xe4r|Nato|Nh\u01b0ng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Per\xf2|Podano|Pokia\u013e|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|S\xe5|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|\u015ei|\u0218i|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Th\xec|Thurh|Toda|Too right|Un|Und|ugeholl|V\xe0|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za p\u0159edpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zak\u0142adaj\u0105c|Zaradi|Zatati|\xdea \xfee|\xdea|\xde\xe1|\xdeegar|\xdeurh|\u0391\u03bb\u03bb\u03ac|\u0394\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03bf\u03c5|\u039a\u03b1\u03b9|\u038c\u03c4\u03b1\u03bd|\u03a4\u03cc\u03c4\u03b5|\u0410 \u0442\u0430\u043a\u043e\u0436|\u0410\u0433\u0430\u0440|\u0410\u043b\u0435|\u0410\u043b\u0438|\u0410\u043c\u043c\u043e|\u0410|\u04d8\u0433\u04d9\u0440|\u04d8\u0439\u0442\u0438\u043a|\u04d8\u043c\u043c\u0430|\u0411\u0438\u0440\u043e\u043a|\u0412\u0430|\u0412\u04d9|\u0414\u0430\u0434\u0435\u043d\u043e|\u0414\u0430\u043d\u043e|\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c|\u0415\u0441\u043b\u0438|\u0417\u0430\u0434\u0430\u0442\u0435|\u0417\u0430\u0434\u0430\u0442\u0438|\u0417\u0430\u0434\u0430\u0442\u043e|\u0418|\u0406|\u041a \u0442\u043e\u043c\u0443 \u0436\u0435|\u041a\u0430\u0434\u0430|\u041a\u0430\u0434|\u041a\u043e\u0433\u0430\u0442\u043e|\u041a\u043e\u0433\u0434\u0430|\u041a\u043e\u043b\u0438|\u041b\u04d9\u043a\u0438\u043d|\u041b\u0435\u043a\u0438\u043d|\u041d\u04d9\u0442\u0438\u0497\u04d9\u0434\u04d9|\u041d\u0435\u0445\u0430\u0439|\u041d\u043e|\u041e\u043d\u0434\u0430|\u041f\u0440\u0438\u043f\u0443\u0441\u0442\u0438\u043c\u043e, \u0449\u043e|\u041f\u0440\u0438\u043f\u0443\u0441\u0442\u0438\u043c\u043e|\u041f\u0443\u0441\u0442\u044c|\u0422\u0430\u043a\u0436\u0435|\u0422\u0430|\u0422\u043e\u0433\u0434\u0430|\u0422\u043e\u0434\u0456|\u0422\u043e|\u0423\u043d\u0434\u0430|\u04ba\u04d9\u043c|\u042f\u043a\u0449\u043e|\u05d0\u05d1\u05dc|\u05d0\u05d6\u05d9|\u05d0\u05d6|\u05d1\u05d4\u05d9\u05e0\u05ea\u05df|\u05d5\u05d2\u05dd|\u05db\u05d0\u05e9\u05e8|\u0622\u0646\u06af\u0627\u0647|\u0627\u0630\u0627\u064b|\u0627\u06af\u0631|\u0627\u0645\u0627|\u0627\u0648\u0631|\u0628\u0627 \u0641\u0631\u0636|\u0628\u0627\u0644\u0641\u0631\u0636|\u0628\u0641\u0631\u0636|\u067e\u06be\u0631|\u062a\u0628|\u062b\u0645|\u062c\u0628|\u0639\u0646\u062f\u0645\u0627|\u0641\u0631\u0636 \u06a9\u06cc\u0627|\u0644\u0643\u0646|\u0644\u06cc\u06a9\u0646|\u0645\u062a\u0649|\u0647\u0646\u06af\u0627\u0645\u06cc|\u0648|\u0905\u0917\u0930|\u0914\u0930|\u0915\u0926\u093e|\u0915\u093f\u0928\u094d\u0924\u0941|\u091a\u0942\u0902\u0915\u093f|\u091c\u092c|\u0924\u0925\u093e|\u0924\u0926\u093e|\u0924\u092c|\u092a\u0930\u0928\u094d\u0924\u0941|\u092a\u0930|\u092f\u0926\u093f|\u0a05\u0a24\u0a47|\u0a1c\u0a26\u0a4b\u0a02|\u0a1c\u0a3f\u0a35\u0a47\u0a02 \u0a15\u0a3f|\u0a1c\u0a47\u0a15\u0a30|\u0a24\u0a26|\u0a2a\u0a30|\u0c05\u0c2a\u0c4d\u0c2a\u0c41\u0c21\u0c41|\u0c08 \u0c2a\u0c30\u0c3f\u0c38\u0c4d\u0c25\u0c3f\u0c24\u0c3f\u0c32\u0c4b|\u0c15\u0c3e\u0c28\u0c3f|\u0c1a\u0c46\u0c2a\u0c4d\u0c2a\u0c2c\u0c21\u0c3f\u0c28\u0c26\u0c3f|\u0c2e\u0c30\u0c3f\u0c2f\u0c41|\u0c86\u0ca6\u0cb0\u0cc6|\u0ca8\u0c82\u0ca4\u0cb0|\u0ca8\u0cbf\u0cd5\u0ca1\u0cbf\u0ca6|\u0cae\u0ca4\u0ccd\u0ca4\u0cc1|\u0cb8\u0ccd\u0ca5\u0cbf\u0ca4\u0cbf\u0caf\u0ca8\u0ccd\u0ca8\u0cc1|\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e43\u0e2b\u0e49|\u0e14\u0e31\u0e07\u0e19\u0e31\u0e49\u0e19|\u0e41\u0e15\u0e48|\u0e40\u0e21\u0e37\u0e48\u0e2d|\u0e41\u0e25\u0e30|\uadf8\ub7ec\uba74<|\uadf8\ub9ac\uace0<|\ub2e8<|\ub9cc\uc57d<|\ub9cc\uc77c<|\uba3c\uc800<|\uc870\uac74<|\ud558\uc9c0\ub9cc<|\u304b\u3064<|\u3057\u304b\u3057<|\u305f\u3060\u3057<|\u306a\u3089\u3070<|\u3082\u3057<|\u4e26\u4e14<|\u4f46\u3057<|\u4f46\u662f<|\u5047\u5982<|\u5047\u5b9a<|\u5047\u8a2d<|\u5047\u8bbe<|\u524d\u63d0<|\u540c\u65f6<|\u540c\u6642<|\u5e76\u4e14<|\u5f53<|\u7576<|\u800c\u4e14<|\u90a3\u4e48<|\u90a3\u9ebc<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"}}},outline:{pattern:/<[^>]+>/,alias:"variable"}}}(t)}t.exports=n,n.displayName="gherkin",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}}t.exports=n,n.displayName="git",n.aliases=[]},function(t,e,r){"use strict";var n=r(428);function i(t){t.register(n),t.languages.glsl=t.languages.extend("c",{keyword:/\b(?:active|asm|atomic_uint|attribute|[ibdu]?vec[234]|bool|break|buffer|case|cast|centroid|class|coherent|common|const|continue|d?mat[234](?:x[234])?|default|discard|do|double|else|enum|extern|external|false|filter|fixed|flat|float|for|fvec[234]|goto|half|highp|hvec[234]|[iu]?sampler2DMS(?:Array)?|[iu]?sampler2DRect|[iu]?samplerBuffer|[iu]?samplerCube|[iu]?samplerCubeArray|[iu]?sampler[123]D|[iu]?sampler[12]DArray|[iu]?image2DMS(?:Array)?|[iu]?image2DRect|[iu]?imageBuffer|[iu]?imageCube|[iu]?imageCubeArray|[iu]?image[123]D|[iu]?image[12]DArray|if|in|inline|inout|input|int|interface|invariant|layout|long|lowp|mediump|namespace|noinline|noperspective|out|output|partition|patch|precise|precision|public|readonly|resource|restrict|return|sample|sampler[12]DArrayShadow|sampler[12]DShadow|sampler2DRectShadow|sampler3DRect|samplerCubeArrayShadow|samplerCubeShadow|shared|short|sizeof|smooth|static|struct|subroutine|superp|switch|template|this|true|typedef|uint|uniform|union|unsigned|using|varying|void|volatile|while|writeonly)\b/})}t.exports=i,i.displayName="glsl",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.gamemakerlanguage=t.languages.gml=t.languages.extend("clike",{keyword:/\b(?:break|case|continue|default|do|else|enum|exit|for|globalvar|if|repeat|return|switch|until|var|while)\b/,number:/(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i,operator:/--|\+\+|[-+%/=]=?|!=|\*\*?=?|<[<=>]?|>[=>]?|&&?|\^\^?|\|\|?|~|\b(?:and|at|not|or|with|xor)\b/,constant:/\b(?:GM_build_date|GM_version|action_(?:continue|restart|reverse|stop)|all|gamespeed_(?:fps|microseconds)|global|local|noone|other|pi|pointer_(?:invalid|null)|self|timezone_(?:local|utc)|undefined|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|post|pre)|keypress|keyrelease|trigger|(?:left|middle|no|right)_button|(?:left|middle|right)_press|(?:left|middle|right)_release|mouse_(?:enter|leave|wheel_down|wheel_up)|global_(?:left|middle|right)_button|global_(?:left|middle|right)_press|global_(?:left|middle|right)_release|joystick(?:1|2)_(?:button1|button2|button3|button4|button5|button6|button7|button8|down|left|right|up)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|gui|gui_begin|gui_end|step_(?:begin|end|normal))|vk_(?:alt|anykey|backspace|control|delete|down|end|enter|escape|home|insert|left|nokey|pagedown|pageup|pause|printscreen|return|right|shift|space|tab|up|f\d|numpad\d|add|decimal|divide|lalt|lcontrol|lshift|multiply|ralt|rcontrol|rshift|subtract)|achievement_(?:filter_(?:all_players|favorites_only|friends_only)|friends_info|info|leaderboard_info|our_info|pic_loaded|show_(?:achievement|bank|friend_picker|leaderboard|profile|purchase_prompt|ui)|type_challenge|type_score_challenge)|asset_(?:font|object|path|room|script|shader|sound|sprite|tiles|timeline|unknown)|audio_(?:3d|falloff_(?:exponent_distance|exponent_distance_clamped|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|none)|mono|new_system|old_system|stereo)|bm_(?:add|complex|dest_alpha|dest_color|dest_colour|inv_dest_alpha|inv_dest_color|inv_dest_colour|inv_src_alpha|inv_src_color|inv_src_colour|max|normal|one|src_alpha|src_alpha_sat|src_color|src_colour|subtract|zero)|browser_(?:chrome|firefox|ie|ie_mobile|not_a_browser|opera|safari|safari_mobile|tizen|unknown|windows_store)|buffer_(?:bool|f16|f32|f64|fast|fixed|generalerror|grow|invalidtype|network|outofbounds|outofspace|s16|s32|s8|seek_end|seek_relative|seek_start|string|text|u16|u32|u64|u8|vbuffer|wrap)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)|cmpfunc_(?:always|equal|greater|greaterequal|less|lessequal|never|notequal)|cr_(?:appstart|arrow|beam|cross|default|drag|handpoint|hourglass|none|size_all|size_nesw|size_ns|size_nwse|size_we|uparrow)|cull_(?:clockwise|counterclockwise|noculling)|device_(?:emulator|tablet)|device_ios_(?:ipad|ipad_retina|iphone|iphone5|iphone6|iphone6plus|iphone_retina|unknown)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|dll_(?:cdecl|cdel|stdcall)|ds_type_(?:grid|list|map|priority|queue|stack)|ef_(?:cloud|ellipse|explosion|firework|flare|rain|ring|smoke|smokeup|snow|spark|star)|fa_(?:archive|bottom|center|directory|hidden|left|middle|readonly|right|sysfile|top|volumeid)|fb_login_(?:default|fallback_to_webview|forcing_safari|forcing_webview|no_fallback_to_webview|use_system_account)|iap_(?:available|canceled|ev_consume|ev_product|ev_purchase|ev_restore|ev_storeload|failed|purchased|refunded|status_available|status_loading|status_processing|status_restoring|status_unavailable|status_uninitialised|storeload_failed|storeload_ok|unavailable)|leaderboard_type_(?:number|time_mins_secs)|lighttype_(?:dir|point)|matrix_(?:projection|view|world)|mb_(?:any|left|middle|none|right)|network_(?:config_(?:connect_timeout|disable_reliable_udp|enable_reliable_udp|use_non_blocking_socket)|socket_(?:bluetooth|tcp|udp)|type_(?:connect|data|disconnect|non_blocking_connect))|of_challenge_(?:lose|tie|win)|os_(?:android|ios|linux|macosx|ps3|ps4|psvita|unknown|uwp|win32|win8native|windows|winphone|xboxone)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|angle|angle_limits|damping_ratio|frequency|length_1|length_2|lower_angle_limit|max_force|max_length|max_motor_force|max_motor_torque|max_torque|motor_force|motor_speed|motor_torque|reaction_force_x|reaction_force_y|reaction_torque|speed|translation|upper_angle_limit)|phy_particle_data_flag_(?:category|color|colour|position|typeflags|velocity)|phy_particle_flag_(?:colormixing|colourmixing|elastic|powder|spring|tensile|viscous|wall|water|zombie)|phy_particle_group_flag_(?:rigid|solid)|pr_(?:linelist|linestrip|pointlist|trianglefan|trianglelist|trianglestrip)|ps_(?:distr|shape)_(?:diamond|ellipse|gaussian|invgaussian|line|linear|rectangle)|pt_shape_(?:circle|cloud|disk|explosion|flare|line|pixel|ring|smoke|snow|spark|sphere|square|star)|ty_(?:real|string)|gp_(?:face\d|axislh|axislv|axisrh|axisrv|padd|padl|padr|padu|select|shoulderl|shoulderlb|shoulderr|shoulderrb|start|stickl|stickr)|lb_disp_(?:none|numeric|time_ms|time_sec)|lb_sort_(?:ascending|descending|none)|ov_(?:achievements|community|friends|gamegroup|players|settings)|ugc_(?:filetype_(?:community|microtrans)|list_(?:Favorited|Followed|Published|Subscribed|UsedOrPlayed|VotedDown|VotedOn|VotedUp|WillVoteLater)|match_(?:AllGuides|Artwork|Collections|ControllerBindings|IntegratedGuides|Items|Items_Mtx|Items_ReadyToUse|Screenshots|UsableInGame|Videos|WebGuides)|query_(?:AcceptedForGameRankedByAcceptanceDate|CreatedByFriendsRankedByPublicationDate|FavoritedByFriendsRankedByPublicationDate|NotYetRated)|query_RankedBy(?:NumTimesReported|PublicationDate|TextSearch|TotalVotesAsc|Trend|Vote|VotesUp)|result_success|sortorder_CreationOrder(?:Asc|Desc)|sortorder_(?:ForModeration|LastUpdatedDesc|SubscriptionDateDesc|TitleAsc|VoteScoreDesc)|visibility_(?:friends_only|private|public))|vertex_usage_(?:binormal|blendindices|blendweight|color|colour|depth|fog|normal|position|psize|sample|tangent|texcoord|textcoord)|vertex_type_(?:float\d|color|colour|ubyte4)|input_type|layerelementtype_(?:background|instance|oldtilemap|particlesystem|sprite|tile|tilemap|undefined)|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|tile_(?:flip|index_mask|mirror|rotate)|(?:obj|rm|scr|spr)\w+)\b/,variable:/\b(?:alarm|application_surface|async_load|background_(?:alpha|blend|color|colour|foreground|height|hspeed|htiled|index|showcolor|showcolour|visible|vspeed|vtiled|width|x|xscale|y|yscale)|bbox_(?:bottom|left|right|top)|browser_(?:height|width)|caption_(?:health|lives|score)|current_(?:day|hour|minute|month|second|time|weekday|year)|cursor_sprite|debug_mode|delta_time|direction|display_aa|error_(?:last|occurred)|event_(?:action|number|object|type)|fps|fps_real|friction|game_(?:display|project|save)_(?:id|name)|gamemaker_(?:pro|registered|version)|gravity|gravity_direction|(?:h|v)speed|health|iap_data|id|image_(?:alpha|angle|blend|depth|index|number|speed|xscale|yscale)|instance_(?:count|id)|keyboard_(?:key|lastchar|lastkey|string)|layer|lives|mask_index|mouse_(?:button|lastbutton|x|y)|object_index|os_(?:browser|device|type|version)|path_(?:endaction|index|orientation|position|positionprevious|scale|speed)|persistent|phy_(?:rotation|(?:col_normal|collision|com|linear_velocity|position|speed)_(?:x|y)|angular_(?:damping|velocity)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|pointer_(?:invalid|null)|room|room_(?:caption|first|height|last|persistent|speed|width)|score|secure_mode|show_(?:health|lives|score)|solid|speed|sprite_(?:height|index|width|xoffset|yoffset)|temp_directory|timeline_(?:index|loop|position|running|speed)|transition_(?:color|kind|steps)|undefined|view_(?:angle|current|enabled|(?:h|v)(?:border|speed)|(?:h|w|x|y)port|(?:h|w|x|y)view|object|surface_id|visible)|visible|webgl_enabled|working_directory|(?:x|y)(?:previous|start)|x|y|argument(?:_relitive|_count|\d)|argument|global|local|other|self)\b/})}t.exports=n,n.displayName="gml",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.gn={comment:{pattern:/#.*/,greedy:!0},"string-literal":{pattern:/(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,lookbehind:!0,inside:{number:/^\$0x[\s\S]{2}$/,variable:/^\$\w+$/,"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},keyword:/\b(?:else|if)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,alias:"keyword"},function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/,number:/-?\b\d+\b/,operator:/[-+!=<>]=?|&&|\|\|/,punctuation:/[(){}[\],.]/},t.languages.gn["string-literal"].inside.interpolation.inside.expression.inside=t.languages.gn,t.languages.gni=t.languages.gn}t.exports=n,n.displayName="gn",n.aliases=["gni"]},function(t,e,r){"use strict";function n(t){t.languages["go-mod"]=t.languages["go-module"]={comment:{pattern:/\/\/.*/,greedy:!0},version:{pattern:/(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,lookbehind:!0,alias:"number"},"go-version":{pattern:/((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,lookbehind:!0,alias:"number"},keyword:{pattern:/^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,lookbehind:!0},operator:/=>/,punctuation:/[()[\],]/}}t.exports=n,n.displayName="goModule",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.go=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),t.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete t.languages.go["class-name"]}t.exports=n,n.displayName="go",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:t.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},t.hooks.add("after-tokenize",(function(t){if("graphql"===t.language)for(var e=t.tokens.filter((function(t){return"string"!==typeof t&&"comment"!==t.type&&"scalar"!==t.type})),r=0;r0)){var s=h(/^\{$/,/^\}$/);if(-1===s)continue;for(var u=r;u=0&&d(c,"variable-input")}}}}function l(t){return e[r+t]}function f(t,e){e=e||0;for(var r=0;r]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),t.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),t.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),t.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.hooks.add("wrap",(function(e){if("groovy"===e.language&&"string"===e.type){var r=e.content.value[0];if("'"!=r){var n=/([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;"$"===r&&(n=/([^\$])(?:\$(?:\{.*?\}|[\w.]+))/),e.content.value=e.content.value.replace(/</g,"<").replace(/&/g,"&"),e.content=t.highlight(e.content.value,{expression:{pattern:n,lookbehind:!0,inside:t.languages.groovy}}),e.classes.push("/"===r?"regex":"gstring")}}}))}t.exports=n,n.displayName="groovy",n.aliases=[]},function(t,e,r){"use strict";var n=r(698);function i(t){t.register(n),function(t){t.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,lookbehind:!0,inside:t.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,lookbehind:!0,inside:t.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:t.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:t.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:t.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:t.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},ruby:{pattern:/[\s\S]+/,inside:t.languages.ruby}}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var e=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],r={},n=0,i=e.length;n@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},t.hooks.add("before-tokenize",(function(e){t.languages["markup-templating"].buildPlaceholders(e,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"handlebars")})),t.languages.hbs=t.languages.handlebars}(t)}t.exports=i,i.displayName="handlebars",i.aliases=["hbs"]},function(t,e,r){"use strict";function n(t){t.languages.haxe=t.languages.extend("clike",{string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},"class-name":[{pattern:/(\b(?:abstract|class|enum|extends|implements|interface|new|typedef)\s+)[A-Z_]\w*/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|final|for|from|function|if|implements|import|in|inline|interface|macro|new|null|operator|overload|override|package|private|public|return|static|super|switch|throw|to|try|typedef|untyped|using|var|while)(?!\.)\b/,function:{pattern:/\b[a-z_]\w*(?=\s*(?:<[^<>]*>\s*)?\()/i,greedy:!0},operator:/\.{3}|\+\+|--|&&|\|\||->|=>|(?:<{1,3}|[-+*/%!=&|^])=?|[?:~]/}),t.languages.insertBefore("haxe","string",{"string-interpolation":{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{interpolation:{pattern:/(^|[^\\])\$(?:\w+|\{[^{}]+\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:t.languages.haxe}}},string:/[\s\S]+/}}}),t.languages.insertBefore("haxe","class-name",{regex:{pattern:/~\/(?:[^\/\\\r\n]|\\.)+\/[a-z]*/,greedy:!0,inside:{"regex-flags":/\b[a-z]+$/,"regex-source":{pattern:/^(~\/)[\s\S]+(?=\/$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^~\/|\/$/}}}),t.languages.insertBefore("haxe","keyword",{preprocessor:{pattern:/#(?:else|elseif|end|if)\b.*/,alias:"property"},metadata:{pattern:/@:?[\w.]+/,alias:"symbol"},reification:{pattern:/\$(?:\w+|(?=\{))/,alias:"important"}})}t.exports=n,n.displayName="haxe",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:count|data|local|module|path|self|terraform|var)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:false|true)\b/i,punctuation:/[=\[\]{}]/}}t.exports=n,n.displayName="hcl",n.aliases=[]},function(t,e,r){"use strict";var n=r(428);function i(t){t.register(n),t.languages.hlsl=t.languages.extend("c",{"class-name":[t.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/})}t.exports=i,i.displayName="hlsl",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.hoon={comment:{pattern:/::.*/,greedy:!0},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},constant:/%(?:\.[ny]|[\w-]+)/,"class-name":/@(?:[a-z0-9-]*[a-z0-9])?|\*/i,function:/(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,keyword:/\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/}}t.exports=n,n.displayName="hoon",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.hpkp={directive:{pattern:/\b(?:includeSubDomains|max-age|pin-sha256|preload|report-to|report-uri|strict)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/}}t.exports=n,n.displayName="hpkp",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.hsts={directive:{pattern:/\b(?:includeSubDomains|max-age|preload)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/}}t.exports=n,n.displayName="hsts",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){function e(t){return RegExp("(^(?:"+t+"):[ \t]*(?![ \t]))[^]+","i")}t.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:t.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:e(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:t.languages.csp},{pattern:e(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:t.languages.hpkp},{pattern:e(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:t.languages.hsts},{pattern:e(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var r,n=t.languages,i={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css,"text/plain":n.plain},o={"application/json":!0,"application/xml":!0};function a(t){var e=t.replace(/^[a-z]+\//,"");return"(?:"+t+"|"+("\\w+/(?:[\\w.-]+\\+)+"+e+"(?![+\\w.-])")+")"}for(var s in i)if(i[s]){r=r||{};var u=o[s]?a(s):s;r[s.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+u+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:i[s]}}r&&t.languages.insertBefore("http","header",r)}(t)}t.exports=n,n.displayName="http",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.ichigojam={comment:/(?:\B'|REM)(?:[^\n\r]*)/i,string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,function:/\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,label:/(?:\B@\S+)/,operator:/<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,punctuation:/[\[,;:()\]]/}}t.exports=n,n.displayName="ichigojam",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.icon={comment:/#.*/,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n_]|\\.|_(?!\1)(?:\r\n|[\s\S]))*\1/,greedy:!0},number:/\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,"builtin-keyword":{pattern:/&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,alias:"variable"},directive:{pattern:/\$\w+/,alias:"builtin"},keyword:/\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,function:/\b(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,operator:/[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,punctuation:/[\[\](){},;]/}}t.exports=n,n.displayName="icon",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){function e(t,r){return r<=0?/[]/.source:t.replace(//g,(function(){return e(t,r-1)}))}var r=/'[{}:=,](?:[^']|'')*'(?!')/,n={pattern:/''/,greedy:!0,alias:"operator"},i={pattern:r,greedy:!0,inside:{escape:n}},o=e(/\{(?:[^{}']|'(?![{},'])|''||)*\}/.source.replace(//g,(function(){return r.source})),8),a={pattern:RegExp(o),inside:{message:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:null},"message-delimiter":{pattern:/./,alias:"punctuation"}}};t.languages["icu-message-format"]={argument:{pattern:RegExp(o),greedy:!0,inside:{content:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:{"argument-name":{pattern:/^(\s*)[^{}:=,\s]+/,lookbehind:!0},"choice-style":{pattern:/^(\s*,\s*choice\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{punctuation:/\|/,range:{pattern:/^(\s*)[+-]?(?:\d+(?:\.\d*)?|\u221e)\s*[<#\u2264]/,lookbehind:!0,inside:{operator:/[<#\u2264]/,number:/\S+/}},rest:null}},"plural-style":{pattern:/^(\s*,\s*(?:plural|selectordinal)\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{offset:/^offset:\s*\d+/,"nested-message":a,selector:{pattern:/=\d+|[^{}:=,\s]+/,inside:{keyword:/^(?:few|many|one|other|two|zero)$/}}}},"select-style":{pattern:/^(\s*,\s*select\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{"nested-message":a,selector:{pattern:/[^{}:=,\s]+/,inside:{keyword:/^other$/}}}},keyword:/\b(?:choice|plural|select|selectordinal)\b/,"arg-type":{pattern:/\b(?:date|duration|number|ordinal|spellout|time)\b/,alias:"keyword"},"arg-skeleton":{pattern:/(,\s*)::[^{}:=,\s]+/,lookbehind:!0},"arg-style":{pattern:/(,\s*)(?:currency|full|integer|long|medium|percent|short)(?=\s*$)/,lookbehind:!0},"arg-style-text":{pattern:RegExp(/(^\s*,\s*(?=\S))/.source+e(/(?:[^{}']|'[^']*'|\{(?:)?\})+/.source,8)+"$"),lookbehind:!0,alias:"string"},punctuation:/,/}},"argument-delimiter":{pattern:/./,alias:"operator"}}},escape:n,string:i},a.inside.message.inside=t.languages["icu-message-format"],t.languages["icu-message-format"].argument.inside.content.inside["choice-style"].inside.rest=t.languages["icu-message-format"]}(t)}t.exports=n,n.displayName="icuMessageFormat",n.aliases=[]},function(t,e,r){"use strict";var n=r(925);function i(t){t.register(n),t.languages.idris=t.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,builtin:void 0}),t.languages.insertBefore("idris","keyword",{"import-statement":{pattern:/(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0,inside:{punctuation:/\./}}}),t.languages.idr=t.languages.idris}t.exports=i,i.displayName="idris",i.aliases=["idr"]},function(t,e,r){"use strict";function n(t){t.languages.iecst={comment:[{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:[/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:ACCESS|CONFIG|EXTERNAL|GLOBAL|INPUT|IN_OUT|OUTPUT|TEMP)|VAR|METHOD|PROPERTY)\b/i,/\b(?:AT|BY|(?:END_)?(?:CASE|FOR|IF|REPEAT|WHILE)|CONSTANT|CONTINUE|DO|ELSE|ELSIF|EXIT|EXTENDS|FROM|GET|GOTO|IMPLEMENTS|JMP|NON_RETAIN|OF|PRIVATE|PROTECTED|PUBLIC|RETAIN|RETURN|SET|TASK|THEN|TO|UNTIL|USING|WITH|__CATCH|__ENDTRY|__FINALLY|__TRY)\b/],"class-name":/\b(?:ANY|ARRAY|BOOL|BYTE|U?(?:D|L|S)?INT|(?:D|L)?WORD|DATE(?:_AND_TIME)?|DT|L?REAL|POINTER|STRING|TIME(?:_OF_DAY)?|TOD)\b/,address:{pattern:/%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,alias:"symbol"},number:/\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:D|DT|T|TOD)#[\d_shmd:]*|\b[A-Z]*#[\d.,_]*|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/,operator:/S?R?:?=>?|&&?|\*\*?|<[=>]?|>=?|[-:^/+#]|\b(?:AND|EQ|EXPT|GE|GT|LE|LT|MOD|NE|NOT|OR|XOR)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,punctuation:/[()[\].,;]/}}t.exports=n,n.displayName="iecst",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},t.languages.gitignore=t.languages.ignore,t.languages.hgignore=t.languages.ignore,t.languages.npmignore=t.languages.ignore}(t)}t.exports=n,n.displayName="ignore",n.aliases=["gitignore","hgignore","npmignore"]},function(t,e,r){"use strict";function n(t){t.languages.inform7={string:{pattern:/"[^"]*"/,inside:{substitution:{pattern:/\[[^\[\]]+\]/,inside:{delimiter:{pattern:/\[|\]/,alias:"punctuation"}}}}},comment:{pattern:/\[[^\[\]]+\]/,greedy:!0},title:{pattern:/^[ \t]*(?:book|chapter|part(?! of)|section|table|volume)\b.+/im,alias:"important"},number:{pattern:/(^|[^-])(?:\b\d+(?:\.\d+)?(?:\^\d+)?(?:(?!\d)\w+)?|\b(?:eight|eleven|five|four|nine|one|seven|six|ten|three|twelve|two))\b(?!-)/i,lookbehind:!0},verb:{pattern:/(^|[^-])\b(?:answering|applying to|are|asking|attacking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:ing|s)?|consulting|contain(?:ing|s)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:s|ve|ving)|hold(?:ing|s)?|impl(?:ies|y)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:ing|s)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:ing|s)?|setting|showing|singing|sleeping|smelling|squeezing|support(?:ing|s)?|swearing|switching|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:ing|s)?|var(?:ies|y|ying)|waiting|waking|waving|wear(?:ing|s)?)\b(?!-)/i,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|the story|unless)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,lookbehind:!0},property:{pattern:/(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: off| on)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,lookbehind:!0,alias:"symbol"},position:{pattern:/(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|[^-])\b(?:actions?|activit(?:ies|y)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,lookbehind:!0,alias:"variable"},punctuation:/[.,:;(){}]/},t.languages.inform7.string.inside.substitution.inside.rest=t.languages.inform7,t.languages.inform7.string.inside.substitution.inside.rest.text={pattern:/\S(?:\s*\S)*/,alias:"comment"}}t.exports=n,n.displayName="inform7",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}t.exports=n,n.displayName="ini",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.io={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*|#.*)/,lookbehind:!0,greedy:!0},"triple-quoted-string":{pattern:/"""(?:\\[\s\S]|(?!""")[^\\])*"""/,greedy:!0,alias:"string"},string:{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},keyword:/\b(?:activate|activeCoroCount|asString|block|break|call|catch|clone|collectGarbage|compileString|continue|do|doFile|doMessage|doString|else|elseif|exit|for|foreach|forward|getEnvironmentVariable|getSlot|hasSlot|if|ifFalse|ifNil|ifNilEval|ifTrue|isActive|isNil|isResumable|list|message|method|parent|pass|pause|perform|performWithArgList|print|println|proto|raise|raiseResumable|removeSlot|resend|resume|schedulerSleepSeconds|self|sender|setSchedulerSleepSeconds|setSlot|shallowCopy|slotNames|super|system|then|thisBlock|thisContext|try|type|uniqueId|updateSlot|wait|while|write|yield)\b/,builtin:/\b(?:Array|AudioDevice|AudioMixer|BigNum|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Random|Regex|SGML|SGMLElement|SGMLParser|SQLite|Sequence|Server|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink)\b/,boolean:/\b(?:false|nil|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?/i,operator:/[=!*/%+\-^&|]=|>>?=?|<+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,alias:"keyword"},number:/\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:ad|ar|[ejpx])_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/,adverb:{pattern:/[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,alias:"builtin"},operator:/[=a][.:]|_\./,conjunction:{pattern:/&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,alias:"variable"},punctuation:/[()]/}}t.exports=n,n.displayName="j",n.aliases=[]},function(t,e,r){"use strict";var n=r(926),i=r(699);function o(t){t.register(n),t.register(i),function(t){var e=/(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m,r=/#\s*\w+(?:\s*\([^()]*\))?/.source,n=/(?:\b[a-zA-Z]\w+\s*\.\s*)*\b[A-Z]\w*(?:\s*)?|/.source.replace(//g,(function(){return r}));t.languages.javadoc=t.languages.extend("javadoclike",{}),t.languages.insertBefore("javadoc","keyword",{reference:{pattern:RegExp(/(@(?:exception|link|linkplain|see|throws|value)\s+(?:\*\s*)?)/.source+"(?:"+n+")"),lookbehind:!0,inside:{function:{pattern:/(#\s*)\w+(?=\s*\()/,lookbehind:!0},field:{pattern:/(#\s*)\w+/,lookbehind:!0},namespace:{pattern:/\b(?:[a-z]\w*\s*\.\s*)+/,inside:{punctuation:/\./}},"class-name":/\b[A-Z]\w*/,keyword:t.languages.java.keyword,punctuation:/[#()[\],.]/}},"class-name":{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}},"code-section":[{pattern:/(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,lookbehind:!0,inside:{code:{pattern:e,lookbehind:!0,inside:t.languages.java,alias:"language-java"}}},{pattern:/(<(code|pre|tt)>(?!)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,lookbehind:!0,inside:{line:{pattern:e,lookbehind:!0,inside:{tag:t.languages.markup.tag,entity:t.languages.markup.entity,code:{pattern:/.+/,inside:t.languages.java,alias:"language-java"}}}}}],tag:t.languages.markup.tag,entity:t.languages.markup.entity}),t.languages.javadoclike.addSupport("java",t.languages.javadoc)}(t)}t.exports=o,o.displayName="javadoc",o.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.javastacktrace={summary:{pattern:/^([\t ]*)(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,lookbehind:!0,inside:{keyword:{pattern:/^([\t ]*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+$/,namespace:/\b[a-z]\w*\b/,punctuation:/\./}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/:/}},"stack-frame":{pattern:/^([\t ]*)at (?:[\w$./]|@[\w$.+-]*\/)+(?:)?\([^()]*\)/m,lookbehind:!0,inside:{keyword:{pattern:/^(\s*)at(?= )/,lookbehind:!0},source:[{pattern:/(\()\w+\.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\b\d+\b/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Native Method|Unknown Source)$/}}],"class-name":/[\w$]+(?=\.(?:|[\w$]+)\()/,function:/(?:|[\w$]+)(?=\()/,"class-loader":{pattern:/(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,lookbehind:!0,alias:"namespace",inside:{punctuation:/\./}},module:{pattern:/([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,lookbehind:!0,inside:{version:{pattern:/(@)[\s\S]+/,lookbehind:!0,alias:"number"},punctuation:/[@.]/}},namespace:{pattern:/(?:\b[a-z]\w*\.)+/,inside:{punctuation:/\./}},punctuation:/[()/.]/}},more:{pattern:/^([\t ]*)\.{3} \d+ [a-z]+(?: [a-z]+)*/m,lookbehind:!0,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}}t.exports=n,n.displayName="javastacktrace",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.jexl={string:/(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,transform:{pattern:/(\|\s*)[a-zA-Z\u0430-\u044f\u0410-\u042f_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\w\u0430-\u044f\u0410-\u042f\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/,alias:"function",lookbehind:!0},function:/[a-zA-Z\u0430-\u044f\u0410-\u042f_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\w\u0430-\u044f\u0410-\u042f\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/,number:/\b\d+(?:\.\d+)?\b|\B\.\d+\b/,operator:/[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/,boolean:/\b(?:false|true)\b/,keyword:/\bin\b/,punctuation:/[{}[\](),.]/}}t.exports=n,n.displayName="jexl",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.jolie=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,lookbehind:!0,greedy:!0},"class-name":{pattern:/((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,lookbehind:!0},keyword:/\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,function:/\b[a-z_]\w*(?=[ \t]*[@(])/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,punctuation:/[()[\]{},;.:]/,builtin:/\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/}),t.languages.insertBefore("jolie","keyword",{aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{keyword:/\bwith\b/,"class-name":/\w+/,punctuation:/,/}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:/,/,"class-name":/\w+/,operator:/=>/}},property:{pattern:/\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/}})}t.exports=n,n.displayName="jolie",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\\\((?:[^()]|\([^()]*\))*\)/.source,r=RegExp(/(^|[^\\])"(?:[^"\r\n\\]|\\[^\r\n(]|__)*"/.source.replace(/__/g,(function(){return e}))),n={interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+e),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},i=t.languages.jq={comment:/#.*/,property:{pattern:RegExp(r.source+/(?=\s*:(?!:))/.source),lookbehind:!0,greedy:!0,inside:n},string:{pattern:r,lookbehind:!0,greedy:!0,inside:n},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/\b[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};n.interpolation.inside.content.inside=i}(t)}t.exports=n,n.displayName="jq",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){function e(t,e){return RegExp(t.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),e)}t.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+t.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),t.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+t.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),t.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),t.languages.insertBefore("javascript","keyword",{imports:{pattern:e(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:t.languages.javascript},exports:{pattern:e(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:t.languages.javascript}}),t.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),t.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),t.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:e(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var r=["function","function-variable","method","method-variable","property-access"],n=0;n=h.length)return;var n=e[r];if("string"===typeof n||"string"===typeof n.content){var i=h[a],o="string"===typeof n?n:n.content,s=o.indexOf(i);if(-1!==s){++a;var u=o.substring(0,s),f=c(l[i]),d=o.substring(s+i.length),p=[];if(u&&p.push(u),p.push(f),d){var g=[d];t(g),p.push.apply(p,g)}"string"===typeof n?(e.splice.apply(e,[r,1].concat(p)),r+=p.length-1):n.content=p}}else{var m=n.content;Array.isArray(m)?t(m):t([m])}}}(f),new t.Token(n,f,"language-"+n,e)}t.languages.javascript["template-string"]=[a("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),a("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),a("svg",/\bsvg/.source),a("markdown",/\b(?:markdown|md)/.source),a("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),a("sql",/\bsql/.source),e].filter(Boolean);var f={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function h(t){return"string"===typeof t?t:Array.isArray(t)?t.map(h).join(""):h(t.content)}t.hooks.add("after-tokenize",(function(e){e.language in f&&function e(r){for(var n=0,i=r.length;n\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(//g,(function(){return r}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+r),lookbehind:!0,inside:{string:e.string,number:e.number,boolean:e.boolean,keyword:t.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:e,alias:"language-javascript"}}}}),t.languages.javadoclike.addSupport("javascript",t.languages.jsdoc)}(t)}t.exports=o,o.displayName="jsdoc",o.aliases=[]},function(t,e,r){"use strict";var n=r(928);function i(t){t.register(n),function(t){var e=/("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;t.languages.json5=t.languages.extend("json",{property:[{pattern:RegExp(e.source+"(?=\\s*:)"),greedy:!0},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/,alias:"unquoted"}],string:{pattern:e,greedy:!0},number:/[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/})}(t)}t.exports=i,i.displayName="json5",i.aliases=[]},function(t,e,r){"use strict";var n=r(928);function i(t){t.register(n),t.languages.jsonp=t.languages.extend("json",{punctuation:/[{}[\]();,.]/}),t.languages.insertBefore("jsonp","punctuation",{function:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*\()/})}t.exports=i,i.displayName="jsonp",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/(^[ \t]+)at[ \t].*/m,lookbehind:!0,inside:{"not-my-code":{pattern:/^at[ \t]+(?!\s)(?:node\.js||.*(?:node_modules|\(\)|\(|$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:\d+(?::\d+)?\b/,alias:"number",inside:{punctuation:/:/}}}}}}t.exports=n,n.displayName="jsstacktrace",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|(?:\b\w+)?"(?:\\.|[^"\\\r\n])*"|`(?:[^\\`\r\n]|\\.)*`/,greedy:!0},char:{pattern:/(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%\xf7\u22bb&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~\u2260\u2264\u2265'\u221a\u221b]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:Inf|NaN)(?:16|32|64)?|im|pi)\b|[\u03c0\u212f]/}}t.exports=n,n.displayName="julia",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.keepalived={comment:{pattern:/[#!].*/,greedy:!0},string:{pattern:/(^|[^\\])(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,lookbehind:!0,greedy:!0},ip:{pattern:RegExp(/\b(?:(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){5}:(?:[\da-f]{1,4}:)?[\da-f]{1,4}|(?:[\da-f]{1,4}:){4}:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4}|(?:[\da-f]{1,4}:){3}:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4}|(?:[\da-f]{1,4}:){2}:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}|(?:[\da-f]{1,4}:){0,5}:|::(?:[\da-f]{1,4}:){0,5}|[\da-f]{1,4}::(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4}|::(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:)(?:\/\d{1,3})?|(?:\/\d{1,2})?)\b/.source.replace(//g,(function(){return/(?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d))/.source})),"i"),alias:"number"},path:{pattern:/(\s)\/(?:[^\/\s]+\/)*[^\/\s]*|\b[a-zA-Z]:\\(?:[^\\\s]+\\)*[^\\\s]*/,lookbehind:!0,alias:"string"},variable:/\$\{?\w+\}?/,email:{pattern:/[\w-]+@[\w-]+(?:\.[\w-]{2,3}){1,2}/,alias:"string"},"conditional-configuration":{pattern:/@\^?[\w-]+/,alias:"variable"},operator:/=/,property:/\b(?:BFD_CHECK|DNS_CHECK|FILE_CHECK|HTTP_GET|MISC_CHECK|NAME|PING_CHECK|SCRIPTS|SMTP_CHECK|SSL|SSL_GET|TCP_CHECK|UDP_CHECK|accept|advert_int|alpha|auth_pass|auth_type|authentication|bfd_cpu_affinity|bfd_instance|bfd_no_swap|bfd_priority|bfd_process_name|bfd_rlimit_rttime|bfd_rt_priority|bind_if|bind_port|bindto|ca|certificate|check_unicast_src|checker|checker_cpu_affinity|checker_log_all_failures|checker_no_swap|checker_priority|checker_rlimit_rttime|checker_rt_priority|child_wait_time|connect_ip|connect_port|connect_timeout|dbus_service_name|debug|default_interface|delay|delay_before_retry|delay_loop|digest|dont_track_primary|dynamic|dynamic_interfaces|enable_(?:dbus|script_security|sni|snmp_checker|snmp_rfc|snmp_rfcv2|snmp_rfcv3|snmp_vrrp|traps)|end|fall|fast_recovery|file|flag-[123]|fork_delay|full_command|fwmark|garp_group|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|global_defs|global_tracking|gna_interval|group|ha_suspend|hashed|helo_name|higher_prio_send_advert|hoplimit|http_protocol|hysteresis|idle_tx|include|inhibit_on_failure|init_fail|init_file|instance|interface|interfaces|interval|ip_family|ipvs_process_name|keepalived.conf|kernel_rx_buf_size|key|linkbeat_interfaces|linkbeat_use_polling|log_all_failures|log_unknown_vrids|lower_prio_no_advert|lthreshold|lvs_flush|lvs_flush_onstop|lvs_method|lvs_netlink_cmd_rcv_bufs|lvs_netlink_cmd_rcv_bufs_force|lvs_netlink_monitor_rcv_bufs|lvs_netlink_monitor_rcv_bufs_force|lvs_notify_fifo|lvs_notify_fifo_script|lvs_sched|lvs_sync_daemon|max_auto_priority|max_hops|mcast_src_ip|mh-fallback|mh-port|min_auto_priority_delay|min_rx|min_tx|misc_dynamic|misc_path|misc_timeout|multiplier|name|namespace_with_ipsets|native_ipv6|neighbor_ip|net_namespace|net_namespace_ipvs|nftables|nftables_counters|nftables_ifindex|nftables_priority|no_accept|no_checker_emails|no_email_faults|nopreempt|notification_email|notification_email_from|notify|notify_backup|notify_deleted|notify_down|notify_fault|notify_fifo|notify_fifo_script|notify_master|notify_master_rx_lower_pri|notify_priority_changes|notify_stop|notify_up|old_unicast_checksum|omega|ops|param_match|passive|password|path|persistence_engine|persistence_granularity|persistence_timeout|preempt|preempt_delay|priority|process|process_monitor_rcv_bufs|process_monitor_rcv_bufs_force|process_name|process_names|promote_secondaries|protocol|proxy_arp|proxy_arp_pvlan|quorum|quorum_down|quorum_max|quorum_up|random_seed|real_server|regex|regex_max_offset|regex_min_offset|regex_no_match|regex_options|regex_stack|reload_repeat|reload_time_file|require_reply|retry|rise|router_id|rs_init_notifies|script|script_user|sh-fallback|sh-port|shutdown_script|shutdown_script_timeout|skip_check_adv_addr|smtp_alert|smtp_alert_checker|smtp_alert_vrrp|smtp_connect_timeout|smtp_helo_name|smtp_server|snmp_socket|sorry_server|sorry_server_inhibit|sorry_server_lvs_method|source_ip|start|startup_script|startup_script_timeout|state|static_ipaddress|static_routes|static_rules|status_code|step|strict_mode|sync_group_tracking_weight|terminate_delay|timeout|track_bfd|track_file|track_group|track_interface|track_process|track_script|track_src_ip|ttl|type|umask|unicast_peer|unicast_src_ip|unicast_ttl|url|use_ipvlan|use_pid_dir|use_vmac|user|uthreshold|val[123]|version|virtual_ipaddress|virtual_ipaddress_excluded|virtual_router_id|virtual_routes|virtual_rules|virtual_server|virtual_server_group|virtualhost|vmac_xmit_base|vrrp|vrrp_(?:check_unicast_src|cpu_affinity|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|gna_interval|higher_prio_send_advert|instance|ipsets|iptables|lower_prio_no_advert|mcast_group4|mcast_group6|min_garp|netlink_cmd_rcv_bufs|netlink_cmd_rcv_bufs_force|netlink_monitor_rcv_bufs|netlink_monitor_rcv_bufs_force|no_swap|notify_fifo|notify_fifo_script|notify_priority_changes|priority|process_name|rlimit_rttime|rt_priority|rx_bufs_multiplier|rx_bufs_policy|script|skip_check_adv_addr|startup_delay|strict|sync_group|track_process|version)|warmup|weight)\b/,constant:/\b(?:A|AAAA|AH|BACKUP|CNAME|DR|MASTER|MX|NAT|NS|PASS|SCTP|SOA|TCP|TUN|TXT|UDP|dh|fo|lblc|lblcr|lc|mh|nq|ovf|rr|sed|sh|wlc|wrr)\b/,number:{pattern:/(^|[^\w.-])-?\d+(?:\.\d+)?/,lookbehind:!0},boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\{\}]/}}t.exports=n,n.displayName="keepalived",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.keyman={comment:{pattern:/\bc .*/i,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},"virtual-key":{pattern:/\[\s*(?:(?:ALT|CAPS|CTRL|LALT|LCTRL|NCAPS|RALT|RCTRL|SHIFT)\s+)*(?:[TKU]_[\w?]+|[A-E]\d\d?|"[^"\r\n]*"|'[^'\r\n]*')\s*\]/i,greedy:!0,alias:"function"},"header-keyword":{pattern:/&\w+/,alias:"bold"},"header-statement":{pattern:/\b(?:bitmap|bitmaps|caps always off|caps on only|copyright|hotkey|language|layout|message|name|shift frees caps|version)\b/i,alias:"bold"},"rule-keyword":{pattern:/\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|reset|return|save|set|store|use)\b/i,alias:"keyword"},"structural-keyword":{pattern:/\b(?:ansi|begin|group|match|nomatch|unicode|using keys)\b/i,alias:"keyword"},"compile-target":{pattern:/\$(?:keyman|keymanonly|keymanweb|kmfl|weaver):/i,alias:"property"},number:/\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i,operator:/[+>\\$]|\.\./,punctuation:/[()=,]/}}t.exports=n,n.displayName="keyman",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.kotlin=t.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete t.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:t.languages.kotlin}};t.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete t.languages.kotlin.string,t.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),t.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),t.languages.kt=t.languages.kotlin,t.languages.kts=t.languages.kotlin}(t)}t.exports=n,n.displayName="kotlin",n.aliases=["kt","kts"]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\s\x00-\x1f\x22-\x2f\x3a-\x3f\x5b-\x5e\x60\x7b-\x7e/.source;function r(t,r){return RegExp(t.replace(//g,e),r)}t.languages.kumir={comment:{pattern:/\|.*/},prolog:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^\n\r"]*"|'[^\n\r']*'/,greedy:!0},boolean:{pattern:r(/(^|[])(?:\u0434\u0430|\u043d\u0435\u0442)(?=[]|$)/.source),lookbehind:!0},"operator-word":{pattern:r(/(^|[])(?:\u0438|\u0438\u043b\u0438|\u043d\u0435)(?=[]|$)/.source),lookbehind:!0,alias:"keyword"},"system-variable":{pattern:r(/(^|[])\u0437\u043d\u0430\u0447(?=[]|$)/.source),lookbehind:!0,alias:"keyword"},type:[{pattern:r(/(^|[])(?:\u0432\u0435\u0449|\u043b\u0438\u0442|\u043b\u043e\u0433|\u0441\u0438\u043c|\u0446\u0435\u043b)(?:\x20*\u0442\u0430\u0431)?(?=[]|$)/.source),lookbehind:!0,alias:"builtin"},{pattern:r(/(^|[])(?:\u043a\u043e\u043c\u043f\u043b|\u0441\u043a\u0430\u043d\u043a\u043e\u0434|\u0444\u0430\u0439\u043b|\u0446\u0432\u0435\u0442)(?=[]|$)/.source),lookbehind:!0,alias:"important"}],keyword:{pattern:r(/(^|[])(?:\u0430\u043b\u0433|\u0430\u0440\u0433(?:\x20*\u0440\u0435\u0437)?|\u0432\u0432\u043e\u0434|\u0412\u041a\u041b\u042e\u0427\u0418\u0422\u042c|\u0432\u0441[\u0435\u0451]|\u0432\u044b\u0431\u043e\u0440|\u0432\u044b\u0432\u043e\u0434|\u0432\u044b\u0445\u043e\u0434|\u0434\u0430\u043d\u043e|\u0434\u043b\u044f|\u0434\u043e|\u0434\u0441|\u0435\u0441\u043b\u0438|\u0438\u043d\u0430\u0447\u0435|\u0438\u0441\u043f|\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c|\u043a\u043e\u043d(?:(?:\x20+|_)\u0438\u0441\u043f)?|\u043a\u0446(?:(?:\x20+|_)\u043f\u0440\u0438)?|\u043d\u0430\u0434\u043e|\u043d\u0430\u0447|\u043d\u0441|\u043d\u0446|\u043e\u0442|\u043f\u0430\u0443\u0437\u0430|\u043f\u043e\u043a\u0430|\u043f\u0440\u0438|\u0440\u0430\u0437\u0430?|\u0440\u0435\u0437|\u0441\u0442\u043e\u043f|\u0442\u0430\u0431|\u0442\u043e|\u0443\u0442\u0432|\u0448\u0430\u0433)(?=[]|$)/.source),lookbehind:!0},name:{pattern:r(/(^|[])[^\d][^]*(?:\x20+[^]+)*(?=[]|$)/.source),lookbehind:!0},number:{pattern:r(/(^|[])(?:\B\$[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?=[]|$)/.source,"i"),lookbehind:!0},punctuation:/:=|[(),:;\[\]]/,"operator-char":{pattern:/\*\*?|<[=>]?|>=?|[-+/=]/,alias:"operator"}},t.languages.kum=t.languages.kumir}(t)}t.exports=n,n.displayName="kumir",n.aliases=["kum"]},function(t,e,r){"use strict";function n(t){t.languages.kusto={comment:{pattern:/\/\/.*/,greedy:!0},string:{pattern:/```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,greedy:!0},verb:{pattern:/(\|\s*)[a-z][\w-]*/i,lookbehind:!0,alias:"keyword"},command:{pattern:/\.[a-z][a-z\d-]*\b/,alias:"keyword"},"class-name":/\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,keyword:/\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,boolean:/\b(?:false|null|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/,datetime:[{pattern:/\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/,alias:"number"},{pattern:/[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,alias:"number"}],number:/\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mn\xb5]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/,operator:/=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,punctuation:/[()\[\]{},;.:]/}}t.exports=n,n.displayName="kusto",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\\(?:[^a-z()[\]]|[a-z*]+)/i,r={"equation-command":{pattern:e,alias:"regex"}};t.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:r,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:r,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/},t.languages.tex=t.languages.latex,t.languages.context=t.languages.latex}(t)}t.exports=n,n.displayName="latex",n.aliases=["tex","context"]},function(t,e,r){"use strict";var n=r(223),i=r(700);function o(t){t.register(n),t.register(i),function(t){t.languages.latte={comment:/^\{\*[\s\S]*/,"latte-tag":{pattern:/(^\{(?:\/(?=[a-z]))?)(?:[=_]|[a-z]\w*\b(?!\())/i,lookbehind:!0,alias:"important"},delimiter:{pattern:/^\{\/?|\}$/,alias:"punctuation"},php:{pattern:/\S(?:[\s\S]*\S)?/,alias:"language-php",inside:t.languages.php}};var e=t.languages.extend("markup",{});t.languages.insertBefore("inside","attr-value",{"n-attr":{pattern:/n:[\w-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+))?/,inside:{"attr-name":{pattern:/^[^\s=]+/,alias:"important"},"attr-value":{pattern:/=[\s\S]+/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}],php:{pattern:/\S(?:[\s\S]*\S)?/,inside:t.languages.php}}}}}},e.tag),t.hooks.add("before-tokenize",(function(r){if("latte"===r.language){t.languages["markup-templating"].buildPlaceholders(r,"latte",/\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*(?:[^*]|\*(?!\/))*\*\/)*\}/g),r.grammar=e}})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"latte")}))}(t)}t.exports=o,o.displayName="latte",o.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.less=t.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),t.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}t.exports=n,n.displayName="less",n.aliases=[]},function(t,e,r){"use strict";var n=r(929);function i(t){t.register(n),function(t){for(var e=/\((?:[^();"#\\]|\\[\s\S]|;.*(?!.)|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|)*\)/.source,r=0;r<5;r++)e=e.replace(//g,(function(){return e}));e=e.replace(//g,/[^\s\S]/.source);var n=t.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp(/(^|[=\s])#(?:"(?:[^"\\]|\\.)*"|[^\s()"]*(?:[^\s()]|))/.source.replace(//g,(function(){return e})),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:t.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};n["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=n,t.languages.ly=n}(t)}t.exports=i,i.displayName="lilypond",i.aliases=[]},function(t,e,r){"use strict";var n=r(223);function i(t){t.register(n),t.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},t.hooks.add("before-tokenize",(function(e){var r=!1;t.languages["markup-templating"].buildPlaceholders(e,"liquid",/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,(function(t){var e=/^\{%-?\s*(\w+)/.exec(t);if(e){var n=e[1];if("raw"===n&&!r)return r=!0,!0;if("endraw"===n)return r=!1,!0}return!r}))})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"liquid")}))}t.exports=i,i.displayName="liquid",i.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){function e(t){return RegExp(/(\()/.source+"(?:"+t+")"+/(?=[\s\)])/.source)}function r(t){return RegExp(/([\s([])/.source+"(?:"+t+")"+/(?=[\s)])/.source)}var n=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,i="&"+n,o="(\\()",a="(?=\\s)",s=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,u={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+n+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+n),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+n),alias:"property"},splice:{pattern:RegExp(",@?"+n),alias:["symbol","variable"]},keyword:[{pattern:RegExp(o+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+a),lookbehind:!0},{pattern:RegExp(o+"(?:append|by|collect|concat|do|finally|for|in|return)"+a),lookbehind:!0}],declare:{pattern:e(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:e(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:r(/nil|t/.source),lookbehind:!0},number:{pattern:r(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(o+"def(?:const|custom|group|var)\\s+"+n),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(n)}},defun:{pattern:RegExp(o+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+n+/\s+\(/.source+s+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+n),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(o+"lambda\\s+\\(\\s*(?:&?"+n+"(?:\\s+&?"+n+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(o+n),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},c={"lisp-marker":RegExp(i),varform:{pattern:RegExp(/\(/.source+n+/\s+(?=\S)/.source+s+/\)/.source),inside:u},argument:{pattern:RegExp(/(^|[\s(])/.source+n),lookbehind:!0,alias:"variable"},rest:u},l="\\S+(?:\\s+\\S+)*",f={pattern:RegExp(o+s+"(?=\\))"),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+l),inside:c},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+l),inside:c},keys:{pattern:RegExp("&key\\s+"+l+"(?:\\s+&allow-other-keys)?"),inside:c},argument:{pattern:RegExp(n),alias:"variable"},punctuation:/[()]/}};u.lambda.inside.arguments=f,u.defun.inside.arguments=t.util.clone(f),u.defun.inside.arguments.inside.sublist=f,t.languages.lisp=u,t.languages.elisp=u,t.languages.emacs=u,t.languages["emacs-lisp"]=u}(t)}t.exports=n,n.displayName="lisp",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.livescript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\])#.*/,lookbehind:!0}],"interpolated-string":{pattern:/(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,lookbehind:!0},interpolation:{pattern:/(^|[^\\])#\{[^}]+\}/m,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^#\{|\}$/,alias:"variable"}}},string:/[\s\S]+/}},string:[{pattern:/('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/<\[[\s\S]*?\]>/,greedy:!0},/\\[^\s,;\])}]+/],regex:[{pattern:/\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/,greedy:!0,inside:{comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0}}},{pattern:/\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/,greedy:!0}],keyword:{pattern:/(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,lookbehind:!0},"keyword-operator":{pattern:/(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?: not|nt)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,lookbehind:!0,alias:"operator"},boolean:{pattern:/(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,lookbehind:!0},argument:{pattern:/(^|(?!\.&\.)[^&])&(?!&)\d*/m,lookbehind:!0,alias:"variable"},number:/\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,identifier:/[a-z_](?:-?[a-z]|[\d_])*/i,operator:[{pattern:/( )\.(?= )/,lookbehind:!0},/\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/],punctuation:/[(){}\[\]|.,:;`]/},t.languages.livescript["interpolated-string"].inside.interpolation.inside.rest=t.languages.livescript}t.exports=n,n.displayName="livescript",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.llvm={comment:/;.*/,string:{pattern:/"[^"]*"/,greedy:!0},boolean:/\b(?:false|true)\b/,variable:/[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,label:/(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,type:{pattern:/\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,alias:"class-name"},keyword:/\b[a-z_][a-z_0-9]*\b/,number:/[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,punctuation:/[{}[\];(),.!*=<>]/}}(t)}t.exports=n,n.displayName="llvm",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},exception:{pattern:/(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,lookbehind:!0,greedy:!0,alias:["javastacktrace","language-javastacktrace"],inside:t.languages.javastacktrace||{keyword:/\bat\b/,function:/[a-z_][\w$]*(?=\()/,punctuation:/[.:()]/}},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING|WRN)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DBG|DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp(/\b\d{4}[-/]\d{2}[-/]\d{2}(?:T(?=\d{1,2}:)|(?=\s\d{1,2}:))/.source+"|"+/\b\d{1,4}[-/ ](?:\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\d{2,4}T?\b/.source+"|"+/\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\s{1,2}\d{1,2}\b/.source,"i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:false|null|true)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/}}t.exports=n,n.displayName="log",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.lolcode={comment:[/\bOBTW\s[\s\S]*?\sTLDR\b/,/\bBTW.+/],string:{pattern:/"(?::.|[^":])*"/,inside:{variable:/:\{[^}]+\}/,symbol:[/:\([a-f\d]+\)/i,/:\[[^\]]+\]/,/:[)>o":]/]},greedy:!0},number:/(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/,symbol:{pattern:/(^|\s)(?:A )?(?:BUKKIT|NOOB|NUMBAR|NUMBR|TROOF|YARN)(?=\s|,|$)/,lookbehind:!0,inside:{keyword:/A(?=\s)/}},label:{pattern:/((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,lookbehind:!0,alias:"string"},function:{pattern:/((?:^|\s)(?:HOW IZ I|I IZ|IZ) )[a-zA-Z]\w*/,lookbehind:!0},keyword:[{pattern:/(^|\s)(?:AN|FOUND YR|GIMMEH|GTFO|HAI|HAS A|HOW IZ I|I HAS A|I IZ|IF U SAY SO|IM IN YR|IM OUTTA YR|IS NOW(?: A)?|ITZ(?: A)?|IZ|KTHX|KTHXBYE|LIEK(?: A)?|MAEK|MEBBE|MKAY|NERFIN|NO WAI|O HAI IM|O RLY\?|OIC|OMG|OMGWTF|R|SMOOSH|SRS|TIL|UPPIN|VISIBLE|WILE|WTF\?|YA RLY|YR)(?=\s|,|$)/,lookbehind:!0},/'Z(?=\s|,|$)/],boolean:{pattern:/(^|\s)(?:FAIL|WIN)(?=\s|,|$)/,lookbehind:!0},variable:{pattern:/(^|\s)IT(?=\s|,|$)/,lookbehind:!0},operator:{pattern:/(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:ALL|ANY|BIGGR|BOTH|DIFF|EITHER|MOD|PRODUKT|QUOSHUNT|SMALLR|SUM|WON) OF)(?=\s|,|$)/,lookbehind:!0},punctuation:/\.{3}|\u2026|,|!/}}t.exports=n,n.displayName="lolcode",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.magma={output:{pattern:/^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/,lookbehind:!0,greedy:!0},keyword:/\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/,boolean:/\b(?:false|true)\b/,generator:{pattern:/\b[a-z_]\w*(?=\s*<)/i,alias:"class-name"},function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},operator:/->|[-+*/^~!|#=]|:=|\.\./,punctuation:/[()[\]{}<>,;.:]/}}t.exports=n,n.displayName="magma",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}t.exports=n,n.displayName="makefile",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(t){return t=t.replace(//g,(function(){return e})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+t+")")}var n=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return n})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(n),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(n),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(e){["url","bold","italic","strike","code-snippet"].forEach((function(r){e!==r&&(t.languages.markdown[e].inside.content.inside[r]=t.languages.markdown[r])}))})),t.hooks.add("after-tokenize",(function(t){"markdown"!==t.language&&"md"!==t.language||function t(e){if(e&&"string"!==typeof e)for(var r=0,n=e.length;r",quot:'"'},u=String.fromCodePoint||String.fromCharCode;t.languages.md=t.languages.markdown}(t)}t.exports=n,n.displayName="markdown",n.aliases=["md"]},function(t,e,r){"use strict";function n(t){t.languages.matlab={comment:[/%\{[\s\S]*?\}%/,/%.+/],string:{pattern:/\B'(?:''|[^'\r\n])*'/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,keyword:/\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,function:/\b(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/}}t.exports=n,n.displayName="matlab",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i;t.languages.maxscript={comment:{pattern:/\/\*[\s\S]*?(?:\*\/|$)|--.*/,greedy:!0},string:{pattern:/(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,lookbehind:!0,greedy:!0},path:{pattern:/\$(?:[\w/\\.*?]|'[^']*')*/,greedy:!0,alias:"string"},"function-call":{pattern:RegExp("((?:"+/^/.source+"|"+/[;=<>+\-*/^({\[]/.source+"|"+/\b(?:and|by|case|catch|collect|do|else|if|in|not|or|return|then|to|try|where|while|with)\b/.source+")[ \t]*)(?!"+e.source+")"+/[a-z_]\w*\b/.source+"(?=[ \t]*(?:(?!"+e.source+")"+/[a-z_]/.source+"|"+/\d|-\.?\d/.source+"|"+/[({'"$@#?]/.source+"))","im"),lookbehind:!0,greedy:!0,alias:"function"},"function-definition":{pattern:/(\b(?:fn|function)\s+)\w+\b/i,lookbehind:!0,alias:"function"},argument:{pattern:/\b[a-z_]\w*(?=:)/i,alias:"attr-name"},keyword:e,boolean:/\b(?:false|true)\b/,time:{pattern:/(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,lookbehind:!0,alias:"number"},number:[{pattern:/(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,lookbehind:!0},/\b(?:e|pi)\b/],constant:/\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/,color:{pattern:/\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/i,alias:"constant"},operator:/[-+*/<>=!]=?|[&^?]|#(?!\()/,punctuation:/[()\[\]{}.:,;]|#(?=\()|\\$/m}}(t)}t.exports=n,n.displayName="maxscript",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.mel={comment:/\/\/.*/,code:{pattern:/`(?:\\.|[^\\`\r\n])*`/,greedy:!0,alias:"italic",inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},variable:/\$\w+/,number:/\b0x[\da-fA-F]+\b|\b\d+(?:\.\d*)?|\B\.\d+/,flag:{pattern:/-[^\d\W]\w*/,alias:"operator"},keyword:/\b(?:break|case|continue|default|do|else|float|for|global|if|in|int|matrix|proc|return|string|switch|vector|while)\b/,function:/\b\w+(?=\()|\b(?:CBG|HfAddAttractorToAS|HfAssignAS|HfBuildEqualMap|HfBuildFurFiles|HfBuildFurImages|HfCancelAFR|HfConnectASToHF|HfCreateAttractor|HfDeleteAS|HfEditAS|HfPerformCreateAS|HfRemoveAttractorFromAS|HfSelectAttached|HfSelectAttractors|HfUnAssignAS|Mayatomr|about|abs|addAttr|addAttributeEditorNodeHelp|addDynamic|addNewShelfTab|addPP|addPanelCategory|addPrefixToName|advanceToNextDrivenKey|affectedNet|affects|aimConstraint|air|alias|aliasAttr|align|alignCtx|alignCurve|alignSurface|allViewFit|ambientLight|angle|angleBetween|animCone|animCurveEditor|animDisplay|animView|annotate|appendStringArray|applicationName|applyAttrPreset|applyTake|arcLenDimContext|arcLengthDimension|arclen|arrayMapper|art3dPaintCtx|artAttrCtx|artAttrPaintVertexCtx|artAttrSkinPaintCtx|artAttrTool|artBuildPaintMenu|artFluidAttrCtx|artPuttyCtx|artSelectCtx|artSetPaintCtx|artUserPaintCtx|assignCommand|assignInputDevice|assignViewportFactories|attachCurve|attachDeviceAttr|attachSurface|attrColorSliderGrp|attrCompatibility|attrControlGrp|attrEnumOptionMenu|attrEnumOptionMenuGrp|attrFieldGrp|attrFieldSliderGrp|attrNavigationControlGrp|attrPresetEditWin|attributeExists|attributeInfo|attributeMenu|attributeQuery|autoKeyframe|autoPlace|bakeClip|bakeFluidShading|bakePartialHistory|bakeResults|bakeSimulation|basename|basenameEx|batchRender|bessel|bevel|bevelPlus|binMembership|bindSkin|blend2|blendShape|blendShapeEditor|blendShapePanel|blendTwoAttr|blindDataType|boneLattice|boundary|boxDollyCtx|boxZoomCtx|bufferCurve|buildBookmarkMenu|buildKeyframeMenu|button|buttonManip|cacheFile|cacheFileCombine|cacheFileMerge|cacheFileTrack|camera|cameraView|canCreateManip|canvas|capitalizeString|catch|catchQuiet|ceil|changeSubdivComponentDisplayLevel|changeSubdivRegion|channelBox|character|characterMap|characterOutlineEditor|characterize|chdir|checkBox|checkBoxGrp|checkDefaultRenderGlobals|choice|circle|circularFillet|clamp|clear|clearCache|clip|clipEditor|clipEditorCurrentTimeCtx|clipSchedule|clipSchedulerOutliner|clipTrimBefore|closeCurve|closeSurface|cluster|cmdFileOutput|cmdScrollFieldExecuter|cmdScrollFieldReporter|cmdShell|coarsenSubdivSelectionList|collision|color|colorAtPoint|colorEditor|colorIndex|colorIndexSliderGrp|colorSliderButtonGrp|colorSliderGrp|columnLayout|commandEcho|commandLine|commandPort|compactHairSystem|componentEditor|compositingInterop|computePolysetVolume|condition|cone|confirmDialog|connectAttr|connectControl|connectDynamic|connectJoint|connectionInfo|constrain|constrainValue|constructionHistory|container|containsMultibyte|contextInfo|control|convertFromOldLayers|convertIffToPsd|convertLightmap|convertSolidTx|convertTessellation|convertUnit|copyArray|copyFlexor|copyKey|copySkinWeights|cos|cpButton|cpCache|cpClothSet|cpCollision|cpConstraint|cpConvClothToMesh|cpForces|cpGetSolverAttr|cpPanel|cpProperty|cpRigidCollisionFilter|cpSeam|cpSetEdit|cpSetSolverAttr|cpSolver|cpSolverTypes|cpTool|cpUpdateClothUVs|createDisplayLayer|createDrawCtx|createEditor|createLayeredPsdFile|createMotionField|createNewShelf|createNode|createRenderLayer|createSubdivRegion|cross|crossProduct|ctxAbort|ctxCompletion|ctxEditMode|ctxTraverse|currentCtx|currentTime|currentTimeCtx|currentUnit|curve|curveAddPtCtx|curveCVCtx|curveEPCtx|curveEditorCtx|curveIntersect|curveMoveEPCtx|curveOnSurface|curveSketchCtx|cutKey|cycleCheck|cylinder|dagPose|date|defaultLightListCheckBox|defaultNavigation|defineDataServer|defineVirtualDevice|deformer|deg_to_rad|delete|deleteAttr|deleteShadingGroupsAndMaterials|deleteShelfTab|deleteUI|deleteUnusedBrushes|delrandstr|detachCurve|detachDeviceAttr|detachSurface|deviceEditor|devicePanel|dgInfo|dgdirty|dgeval|dgtimer|dimWhen|directKeyCtx|directionalLight|dirmap|dirname|disable|disconnectAttr|disconnectJoint|diskCache|displacementToPoly|displayAffected|displayColor|displayCull|displayLevelOfDetail|displayPref|displayRGBColor|displaySmoothness|displayStats|displayString|displaySurface|distanceDimContext|distanceDimension|doBlur|dolly|dollyCtx|dopeSheetEditor|dot|dotProduct|doubleProfileBirailSurface|drag|dragAttrContext|draggerContext|dropoffLocator|duplicate|duplicateCurve|duplicateSurface|dynCache|dynControl|dynExport|dynExpression|dynGlobals|dynPaintEditor|dynParticleCtx|dynPref|dynRelEdPanel|dynRelEditor|dynamicLoad|editAttrLimits|editDisplayLayerGlobals|editDisplayLayerMembers|editRenderLayerAdjustment|editRenderLayerGlobals|editRenderLayerMembers|editor|editorTemplate|effector|emit|emitter|enableDevice|encodeString|endString|endsWith|env|equivalent|equivalentTol|erf|error|eval|evalDeferred|evalEcho|event|exactWorldBoundingBox|exclusiveLightCheckBox|exec|executeForEachObject|exists|exp|expression|expressionEditorListen|extendCurve|extendSurface|extrude|fcheck|fclose|feof|fflush|fgetline|fgetword|file|fileBrowserDialog|fileDialog|fileExtension|fileInfo|filetest|filletCurve|filter|filterCurve|filterExpand|filterStudioImport|findAllIntersections|findAnimCurves|findKeyframe|findMenuItem|findRelatedSkinCluster|finder|firstParentOf|fitBspline|flexor|floatEq|floatField|floatFieldGrp|floatScrollBar|floatSlider|floatSlider2|floatSliderButtonGrp|floatSliderGrp|floor|flow|fluidCacheInfo|fluidEmitter|fluidVoxelInfo|flushUndo|fmod|fontDialog|fopen|formLayout|format|fprint|frameLayout|fread|freeFormFillet|frewind|fromNativePath|fwrite|gamma|gauss|geometryConstraint|getApplicationVersionAsFloat|getAttr|getClassification|getDefaultBrush|getFileList|getFluidAttr|getInputDeviceRange|getMayaPanelTypes|getModifiers|getPanel|getParticleAttr|getPluginResource|getenv|getpid|glRender|glRenderEditor|globalStitch|gmatch|goal|gotoBindPose|grabColor|gradientControl|gradientControlNoAttr|graphDollyCtx|graphSelectContext|graphTrackCtx|gravity|grid|gridLayout|group|groupObjectsByName|hardenPointCurve|hardware|hardwareRenderPanel|headsUpDisplay|headsUpMessage|help|helpLine|hermite|hide|hilite|hitTest|hotBox|hotkey|hotkeyCheck|hsv_to_rgb|hudButton|hudSlider|hudSliderButton|hwReflectionMap|hwRender|hwRenderLoad|hyperGraph|hyperPanel|hyperShade|hypot|iconTextButton|iconTextCheckBox|iconTextRadioButton|iconTextRadioCollection|iconTextScrollList|iconTextStaticLabel|ikHandle|ikHandleCtx|ikHandleDisplayScale|ikSolver|ikSplineHandleCtx|ikSystem|ikSystemInfo|ikfkDisplayMethod|illustratorCurves|image|imfPlugins|inheritTransform|insertJoint|insertJointCtx|insertKeyCtx|insertKnotCurve|insertKnotSurface|instance|instanceable|instancer|intField|intFieldGrp|intScrollBar|intSlider|intSliderGrp|interToUI|internalVar|intersect|iprEngine|isAnimCurve|isConnected|isDirty|isParentOf|isSameObject|isTrue|isValidObjectName|isValidString|isValidUiName|isolateSelect|itemFilter|itemFilterAttr|itemFilterRender|itemFilterType|joint|jointCluster|jointCtx|jointDisplayScale|jointLattice|keyTangent|keyframe|keyframeOutliner|keyframeRegionCurrentTimeCtx|keyframeRegionDirectKeyCtx|keyframeRegionDollyCtx|keyframeRegionInsertKeyCtx|keyframeRegionMoveKeyCtx|keyframeRegionScaleKeyCtx|keyframeRegionSelectKeyCtx|keyframeRegionSetKeyCtx|keyframeRegionTrackCtx|keyframeStats|lassoContext|lattice|latticeDeformKeyCtx|launch|launchImageEditor|layerButton|layeredShaderPort|layeredTexturePort|layout|layoutDialog|lightList|lightListEditor|lightListPanel|lightlink|lineIntersection|linearPrecision|linstep|listAnimatable|listAttr|listCameras|listConnections|listDeviceAttachments|listHistory|listInputDeviceAxes|listInputDeviceButtons|listInputDevices|listMenuAnnotation|listNodeTypes|listPanelCategories|listRelatives|listSets|listTransforms|listUnselected|listerEditor|loadFluid|loadNewShelf|loadPlugin|loadPluginLanguageResources|loadPrefObjects|localizedPanelLabel|lockNode|loft|log|longNameOf|lookThru|ls|lsThroughFilter|lsType|lsUI|mag|makeIdentity|makeLive|makePaintable|makeRoll|makeSingleSurface|makeTubeOn|makebot|manipMoveContext|manipMoveLimitsCtx|manipOptions|manipRotateContext|manipRotateLimitsCtx|manipScaleContext|manipScaleLimitsCtx|marker|match|max|memory|menu|menuBarLayout|menuEditor|menuItem|menuItemToShelf|menuSet|menuSetPref|messageLine|min|minimizeApp|mirrorJoint|modelCurrentTimeCtx|modelEditor|modelPanel|mouse|movIn|movOut|move|moveIKtoFK|moveKeyCtx|moveVertexAlongDirection|multiProfileBirailSurface|mute|nParticle|nameCommand|nameField|namespace|namespaceInfo|newPanelItems|newton|nodeCast|nodeIconButton|nodeOutliner|nodePreset|nodeType|noise|nonLinear|normalConstraint|normalize|nurbsBoolean|nurbsCopyUVSet|nurbsCube|nurbsEditUV|nurbsPlane|nurbsSelect|nurbsSquare|nurbsToPoly|nurbsToPolygonsPref|nurbsToSubdiv|nurbsToSubdivPref|nurbsUVSet|nurbsViewDirectionVector|objExists|objectCenter|objectLayer|objectType|objectTypeUI|obsoleteProc|oceanNurbsPreviewPlane|offsetCurve|offsetCurveOnSurface|offsetSurface|openGLExtension|openMayaPref|optionMenu|optionMenuGrp|optionVar|orbit|orbitCtx|orientConstraint|outlinerEditor|outlinerPanel|overrideModifier|paintEffectsDisplay|pairBlend|palettePort|paneLayout|panel|panelConfiguration|panelHistory|paramDimContext|paramDimension|paramLocator|parent|parentConstraint|particle|particleExists|particleInstancer|particleRenderInfo|partition|pasteKey|pathAnimation|pause|pclose|percent|performanceOptions|pfxstrokes|pickWalk|picture|pixelMove|planarSrf|plane|play|playbackOptions|playblast|plugAttr|plugNode|pluginInfo|pluginResourceUtil|pointConstraint|pointCurveConstraint|pointLight|pointMatrixMult|pointOnCurve|pointOnSurface|pointPosition|poleVectorConstraint|polyAppend|polyAppendFacetCtx|polyAppendVertex|polyAutoProjection|polyAverageNormal|polyAverageVertex|polyBevel|polyBlendColor|polyBlindData|polyBoolOp|polyBridgeEdge|polyCacheMonitor|polyCheck|polyChipOff|polyClipboard|polyCloseBorder|polyCollapseEdge|polyCollapseFacet|polyColorBlindData|polyColorDel|polyColorPerVertex|polyColorSet|polyCompare|polyCone|polyCopyUV|polyCrease|polyCreaseCtx|polyCreateFacet|polyCreateFacetCtx|polyCube|polyCut|polyCutCtx|polyCylinder|polyCylindricalProjection|polyDelEdge|polyDelFacet|polyDelVertex|polyDuplicateAndConnect|polyDuplicateEdge|polyEditUV|polyEditUVShell|polyEvaluate|polyExtrudeEdge|polyExtrudeFacet|polyExtrudeVertex|polyFlipEdge|polyFlipUV|polyForceUV|polyGeoSampler|polyHelix|polyInfo|polyInstallAction|polyLayoutUV|polyListComponentConversion|polyMapCut|polyMapDel|polyMapSew|polyMapSewMove|polyMergeEdge|polyMergeEdgeCtx|polyMergeFacet|polyMergeFacetCtx|polyMergeUV|polyMergeVertex|polyMirrorFace|polyMoveEdge|polyMoveFacet|polyMoveFacetUV|polyMoveUV|polyMoveVertex|polyNormal|polyNormalPerVertex|polyNormalizeUV|polyOptUvs|polyOptions|polyOutput|polyPipe|polyPlanarProjection|polyPlane|polyPlatonicSolid|polyPoke|polyPrimitive|polyPrism|polyProjection|polyPyramid|polyQuad|polyQueryBlindData|polyReduce|polySelect|polySelectConstraint|polySelectConstraintMonitor|polySelectCtx|polySelectEditCtx|polySeparate|polySetToFaceNormal|polySewEdge|polyShortestPathCtx|polySmooth|polySoftEdge|polySphere|polySphericalProjection|polySplit|polySplitCtx|polySplitEdge|polySplitRing|polySplitVertex|polyStraightenUVBorder|polySubdivideEdge|polySubdivideFacet|polyToSubdiv|polyTorus|polyTransfer|polyTriangulate|polyUVSet|polyUnite|polyWedgeFace|popen|popupMenu|pose|pow|preloadRefEd|print|progressBar|progressWindow|projFileViewer|projectCurve|projectTangent|projectionContext|projectionManip|promptDialog|propModCtx|propMove|psdChannelOutliner|psdEditTextureFile|psdExport|psdTextureFile|putenv|pwd|python|querySubdiv|quit|rad_to_deg|radial|radioButton|radioButtonGrp|radioCollection|radioMenuItemCollection|rampColorPort|rand|randomizeFollicles|randstate|rangeControl|readTake|rebuildCurve|rebuildSurface|recordAttr|recordDevice|redo|reference|referenceEdit|referenceQuery|refineSubdivSelectionList|refresh|refreshAE|registerPluginResource|rehash|reloadImage|removeJoint|removeMultiInstance|removePanelCategory|rename|renameAttr|renameSelectionList|renameUI|render|renderGlobalsNode|renderInfo|renderLayerButton|renderLayerParent|renderLayerPostProcess|renderLayerUnparent|renderManip|renderPartition|renderQualityNode|renderSettings|renderThumbnailUpdate|renderWindowEditor|renderWindowSelectContext|renderer|reorder|reorderDeformers|requires|reroot|resampleFluid|resetAE|resetPfxToPolyCamera|resetTool|resolutionNode|retarget|reverseCurve|reverseSurface|revolve|rgb_to_hsv|rigidBody|rigidSolver|roll|rollCtx|rootOf|rot|rotate|rotationInterpolation|roundConstantRadius|rowColumnLayout|rowLayout|runTimeCommand|runup|sampleImage|saveAllShelves|saveAttrPreset|saveFluid|saveImage|saveInitialState|saveMenu|savePrefObjects|savePrefs|saveShelf|saveToolSettings|scale|scaleBrushBrightness|scaleComponents|scaleConstraint|scaleKey|scaleKeyCtx|sceneEditor|sceneUIReplacement|scmh|scriptCtx|scriptEditorInfo|scriptJob|scriptNode|scriptTable|scriptToShelf|scriptedPanel|scriptedPanelType|scrollField|scrollLayout|sculpt|searchPathArray|seed|selLoadSettings|select|selectContext|selectCurveCV|selectKey|selectKeyCtx|selectKeyframeRegionCtx|selectMode|selectPref|selectPriority|selectType|selectedNodes|selectionConnection|separator|setAttr|setAttrEnumResource|setAttrMapping|setAttrNiceNameResource|setConstraintRestPosition|setDefaultShadingGroup|setDrivenKeyframe|setDynamic|setEditCtx|setEditor|setFluidAttr|setFocus|setInfinity|setInputDeviceMapping|setKeyCtx|setKeyPath|setKeyframe|setKeyframeBlendshapeTargetWts|setMenuMode|setNodeNiceNameResource|setNodeTypeFlag|setParent|setParticleAttr|setPfxToPolyCamera|setPluginResource|setProject|setStampDensity|setStartupMessage|setState|setToolTo|setUITemplate|setXformManip|sets|shadingConnection|shadingGeometryRelCtx|shadingLightRelCtx|shadingNetworkCompare|shadingNode|shapeCompare|shelfButton|shelfLayout|shelfTabLayout|shellField|shortNameOf|showHelp|showHidden|showManipCtx|showSelectionInTitle|showShadingGroupAttrEditor|showWindow|sign|simplify|sin|singleProfileBirailSurface|size|sizeBytes|skinCluster|skinPercent|smoothCurve|smoothTangentSurface|smoothstep|snap2to2|snapKey|snapMode|snapTogetherCtx|snapshot|soft|softMod|softModCtx|sort|sound|soundControl|source|spaceLocator|sphere|sphrand|spotLight|spotLightPreviewPort|spreadSheetEditor|spring|sqrt|squareSurface|srtContext|stackTrace|startString|startsWith|stitchAndExplodeShell|stitchSurface|stitchSurfacePoints|strcmp|stringArrayCatenate|stringArrayContains|stringArrayCount|stringArrayInsertAtIndex|stringArrayIntersector|stringArrayRemove|stringArrayRemoveAtIndex|stringArrayRemoveDuplicates|stringArrayRemoveExact|stringArrayToString|stringToStringArray|strip|stripPrefixFromName|stroke|subdAutoProjection|subdCleanTopology|subdCollapse|subdDuplicateAndConnect|subdEditUV|subdListComponentConversion|subdMapCut|subdMapSewMove|subdMatchTopology|subdMirror|subdToBlind|subdToPoly|subdTransferUVsToCache|subdiv|subdivCrease|subdivDisplaySmoothness|substitute|substituteAllString|substituteGeometry|substring|surface|surfaceSampler|surfaceShaderList|swatchDisplayPort|switchTable|symbolButton|symbolCheckBox|sysFile|system|tabLayout|tan|tangentConstraint|texLatticeDeformContext|texManipContext|texMoveContext|texMoveUVShellContext|texRotateContext|texScaleContext|texSelectContext|texSelectShortestPathCtx|texSmudgeUVContext|texWinToolCtx|text|textCurves|textField|textFieldButtonGrp|textFieldGrp|textManip|textScrollList|textToShelf|textureDisplacePlane|textureHairColor|texturePlacementContext|textureWindow|threadCount|threePointArcCtx|timeControl|timePort|timerX|toNativePath|toggle|toggleAxis|toggleWindowVisibility|tokenize|tokenizeList|tolerance|tolower|toolButton|toolCollection|toolDropped|toolHasOptions|toolPropertyWindow|torus|toupper|trace|track|trackCtx|transferAttributes|transformCompare|transformLimits|translator|trim|trunc|truncateFluidCache|truncateHairCache|tumble|tumbleCtx|turbulence|twoPointArcCtx|uiRes|uiTemplate|unassignInputDevice|undo|undoInfo|ungroup|uniform|unit|unloadPlugin|untangleUV|untitledFileName|untrim|upAxis|updateAE|userCtx|uvLink|uvSnapshot|validateShelfName|vectorize|view2dToolCtx|viewCamera|viewClipPlane|viewFit|viewHeadOn|viewLookAt|viewManip|viewPlace|viewSet|visor|volumeAxis|vortex|waitCursor|warning|webBrowser|webBrowserPrefs|whatIs|window|windowPref|wire|wireContext|workspace|wrinkle|wrinkleContext|writeTake|xbmLangPathList|xform)\b/,operator:[/\+[+=]?|-[-=]?|&&|\|\||[<>]=|[*\/!=]=?|[%^]/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,:;?\[\](){}]/},t.languages.mel.code.inside.rest=t.languages.mel}t.exports=n,n.displayName="mel",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.mermaid={comment:{pattern:/%%.*/,greedy:!0},style:{pattern:/^([ \t]*(?:classDef|linkStyle|style)[ \t]+[\w$-]+[ \t]+)\w.*[^\s;]/m,lookbehind:!0,inside:{property:/\b\w[\w-]*(?=[ \t]*:)/,operator:/:/,punctuation:/,/}},"inter-arrow-label":{pattern:/([^<>ox.=-])(?:-[-.]|==)(?![<>ox.=-])[ \t]*(?:"[^"\r\n]*"|[^\s".=-](?:[^\r\n.=-]*[^\s.=-])?)[ \t]*(?:\.+->?|--+[->]|==+[=>])(?![<>ox.=-])/,lookbehind:!0,greedy:!0,inside:{arrow:{pattern:/(?:\.+->?|--+[->]|==+[=>])$/,alias:"operator"},label:{pattern:/^([\s\S]{2}[ \t]*)\S(?:[\s\S]*\S)?/,lookbehind:!0,alias:"property"},"arrow-head":{pattern:/^\S+/,alias:["arrow","operator"]}}},arrow:[{pattern:/(^|[^{}|o.-])[|}][|o](?:--|\.\.)[|o][|{](?![{}|o.-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>ox.=-])(?:[ox]?|(?:==+|--+|-\.*-)[>ox]|===+|---+|-\.+-)(?![<>ox.=-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>()x-])(?:--?(?:>>|[x>)])(?![<>()x])|(?:<<|[x<(])--?(?!-))/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>|*o.-])(?:[*o]--|--[*o]|<\|?(?:--|\.\.)|(?:--|\.\.)\|?>|--|\.\.)(?![<>|*o.-])/,lookbehind:!0,alias:"operator"}],label:{pattern:/(^|[^|<])\|(?:[^\r\n"|]|"[^"\r\n]*")+\|/,lookbehind:!0,greedy:!0,alias:"property"},text:{pattern:/(?:[(\[{]+|\b>)(?:[^\r\n"()\[\]{}]|"[^"\r\n]*")+(?:[)\]}]+|>)/,alias:"string"},string:{pattern:/"[^"\r\n]*"/,greedy:!0},annotation:{pattern:/<<(?:abstract|choice|enumeration|fork|interface|join|service)>>|\[\[(?:choice|fork|join)\]\]/i,alias:"important"},keyword:[{pattern:/(^[ \t]*)(?:action|callback|class|classDef|classDiagram|click|direction|erDiagram|flowchart|gantt|gitGraph|graph|journey|link|linkStyle|pie|requirementDiagram|sequenceDiagram|stateDiagram|stateDiagram-v2|style|subgraph)(?![\w$-])/m,lookbehind:!0,greedy:!0},{pattern:/(^[ \t]*)(?:activate|alt|and|as|autonumber|deactivate|else|end(?:[ \t]+note)?|loop|opt|par|participant|rect|state|note[ \t]+(?:over|(?:left|right)[ \t]+of))(?![\w$-])/im,lookbehind:!0,greedy:!0}],entity:/#[a-z0-9]+;/,operator:{pattern:/(\w[ \t]*)&(?=[ \t]*\w)|:::|:/,lookbehind:!0},punctuation:/[(){};]/}}t.exports=n,n.displayName="mermaid",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.mizar={comment:/::.+/,keyword:/@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,parameter:{pattern:/\$(?:10|\d)/,alias:"variable"},variable:/\b\w+(?=:)/,number:/(?:\b|-)\d+\b/,operator:/\.\.\.|->|&|\.?=/,punctuation:/\(#|#\)|[,:;\[\](){}]/}}t.exports=n,n.displayName="mizar",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$setWindowFields","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$count","$dateAdd","$dateDiff","$dateSubtract","$dateTrunc","$getField","$rand","$sampleRate","$setField","$unsetField","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"],r="(?:"+(e=e.map((function(t){return t.replace("$","\\$")}))).join("|")+")\\b";t.languages.mongodb=t.languages.extend("javascript",{}),t.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp("^(['\"])?"+r+"(?:\\1)?$")}}}),t.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d\d?|2[0-4]\d|25[0-5])\b/,greedy:!0}},t.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:"+["ObjectId","Code","BinData","DBRef","Timestamp","NumberLong","NumberDecimal","MaxKey","MinKey","RegExp","ISODate","UUID"].join("|")+")\\b"),alias:"keyword"}})}(t)}t.exports=n,n.displayName="mongodb",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.monkey={comment:{pattern:/^#Rem\s[\s\S]*?^#End|'.+/im,greedy:!0},string:{pattern:/"[^"\r\n]*"/,greedy:!0},preprocessor:{pattern:/(^[ \t]*)#.+/m,lookbehind:!0,greedy:!0,alias:"property"},function:/\b\w+(?=\()/,"type-char":{pattern:/\b[?%#$]/,alias:"class-name"},number:{pattern:/((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,lookbehind:!0},keyword:/\b(?:Abstract|Array|Bool|Case|Catch|Class|Const|Continue|Default|Eachin|Else|ElseIf|End|EndIf|Exit|Extends|Extern|False|Field|Final|Float|For|Forever|Function|Global|If|Implements|Import|Inline|Int|Interface|Local|Method|Module|New|Next|Null|Object|Private|Property|Public|Repeat|Return|Select|Self|Step|Strict|String|Super|Then|Throw|To|True|Try|Until|Void|Wend|While)\b/i,operator:/\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i,punctuation:/[.,:;()\[\]]/}}t.exports=n,n.displayName="monkey",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.moonscript={comment:/--.*/,string:[{pattern:/'[^']*'|\[(=*)\[[\s\S]*?\]\1\]/,greedy:!0},{pattern:/"[^"]*"/,greedy:!0,inside:{interpolation:{pattern:/#\{[^{}]*\}/,inside:{moonscript:{pattern:/(^#\{)[\s\S]+(?=\})/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/#\{|\}/,alias:"punctuation"}}}}}],"class-name":[{pattern:/(\b(?:class|extends)[ \t]+)\w+/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\b(?:class|continue|do|else|elseif|export|extends|for|from|if|import|in|local|nil|return|self|super|switch|then|unless|using|when|while|with)\b/,variable:/@@?\w*/,property:{pattern:/\b(?!\d)\w+(?=:)|(:)(?!\d)\w+/,lookbehind:!0},function:{pattern:/\b(?:_G|_VERSION|assert|collectgarbage|coroutine\.(?:create|resume|running|status|wrap|yield)|debug\.(?:debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)|dofile|error|getfenv|getmetatable|io\.(?:close|flush|input|lines|open|output|popen|read|stderr|stdin|stdout|tmpfile|type|write)|ipairs|load|loadfile|loadstring|math\.(?:abs|acos|asin|atan|atan2|ceil|cos|cosh|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pi|pow|rad|random|randomseed|sin|sinh|sqrt|tan|tanh)|module|next|os\.(?:clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(?:cpath|loaded|loadlib|path|preload|seeall)|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|string\.(?:byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\.(?:concat|insert|maxn|remove|sort)|tonumber|tostring|type|unpack|xpcall)\b/,inside:{punctuation:/\./}},boolean:/\b(?:false|true)\b/,number:/(?:\B\.\d+|\b\d+\.\d+|\b\d+(?=[eE]))(?:[eE][-+]?\d+)?\b|\b(?:0x[a-fA-F\d]+|\d+)(?:U?LL)?\b/,operator:/\.{3}|[-=]>|~=|(?:[-+*/%<>!=]|\.\.)=?|[:#^]|\b(?:and|or)\b=?|\b(?:not)\b/,punctuation:/[.,()[\]{}\\]/},t.languages.moonscript.string[1].inside.interpolation.inside.moonscript.inside=t.languages.moonscript,t.languages.moon=t.languages.moonscript}t.exports=n,n.displayName="moonscript",n.aliases=["moon"]},function(t,e,r){"use strict";function n(t){t.languages.n1ql={comment:{pattern:/\/\*[\s\S]*?(?:$|\*\/)|--.*/,greedy:!0},string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,greedy:!0},identifier:{pattern:/`(?:\\[\s\S]|[^\\`]|``)*`/,greedy:!0},parameter:/\$[\w.]+/,keyword:/\b(?:ADVISE|ALL|ALTER|ANALYZE|AS|ASC|AT|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|COMMITTED|CONNECT|CONTINUE|CORRELATE|CORRELATED|COVER|CREATE|CURRENT|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FILTER|FLATTEN|FLUSH|FOLLOWING|FOR|FORCE|FROM|FTS|FUNCTION|GOLANG|GRANT|GROUP|GROUPS|GSI|HASH|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|ISOLATION|JAVASCRIPT|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LANGUAGE|LAST|LEFT|LET|LETTING|LEVEL|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NL|NO|NTH_VALUE|NULL|NULLS|NUMBER|OBJECT|OFFSET|ON|OPTION|OPTIONS|ORDER|OTHERS|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PRECEDING|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROBE|PROCEDURE|PUBLIC|RANGE|RAW|REALM|REDUCE|RENAME|RESPECT|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|ROW|ROWS|SATISFIES|SAVEPOINT|SCHEMA|SCOPE|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TIES|TO|TRAN|TRANSACTION|TRIGGER|TRUNCATE|UNBOUNDED|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WINDOW|WITH|WORK|XOR)\b/i,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:FALSE|TRUE)\b/i,number:/(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,punctuation:/[;[\](),.{}:]/}}t.exports=n,n.displayName="n1ql",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.n4js=t.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),t.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),t.languages.n4jsd=t.languages.n4js}t.exports=n,n.displayName="n4js",n.aliases=["n4jsd"]},function(t,e,r){"use strict";function n(t){t.languages["nand2tetris-hdl"]={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,keyword:/\b(?:BUILTIN|CHIP|CLOCKED|IN|OUT|PARTS)\b/,boolean:/\b(?:false|true)\b/,function:/\b[A-Za-z][A-Za-z0-9]*(?=\()/,number:/\b\d+\b/,operator:/=|\.\./,punctuation:/[{}[\];(),:]/}}t.exports=n,n.displayName="nand2tetrisHdl",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\{[^\r\n\[\]{}]*\}/,r={"quoted-string":{pattern:/"(?:[^"\\]|\\.)*"/,alias:"operator"},"command-param-id":{pattern:/(\s)\w+:/,lookbehind:!0,alias:"property"},"command-param-value":[{pattern:e,alias:"selector"},{pattern:/([\t ])\S+/,lookbehind:!0,greedy:!0,alias:"operator"},{pattern:/\S(?:.*\S)?/,alias:"operator"}]};function n(t){return"string"===typeof t?t:Array.isArray(t)?t.map(n).join(""):n(t.content)}t.languages.naniscript={comment:{pattern:/^([\t ]*);.*/m,lookbehind:!0},define:{pattern:/^>.+/m,alias:"tag",inside:{value:{pattern:/(^>\w+[\t ]+)(?!\s)[^{}\r\n]+/,lookbehind:!0,alias:"operator"},key:{pattern:/(^>)\w+/,lookbehind:!0}}},label:{pattern:/^([\t ]*)#[\t ]*\w+[\t ]*$/m,lookbehind:!0,alias:"regex"},command:{pattern:/^([\t ]*)@\w+(?=[\t ]|$).*/m,lookbehind:!0,alias:"function",inside:{"command-name":/^@\w+/,expression:{pattern:e,greedy:!0,alias:"selector"},"command-params":{pattern:/\s*\S[\s\S]*/,inside:r}}},"generic-text":{pattern:/(^[ \t]*)[^#@>;\s].*/m,lookbehind:!0,alias:"punctuation",inside:{"escaped-char":/\\[{}\[\]"]/,expression:{pattern:e,greedy:!0,alias:"selector"},"inline-command":{pattern:/\[[\t ]*\w[^\r\n\[\]]*\]/,greedy:!0,alias:"function",inside:{"command-params":{pattern:/(^\[[\t ]*\w+\b)[\s\S]+(?=\]$)/,lookbehind:!0,inside:r},"command-param-name":{pattern:/^(\[[\t ]*)\w+/,lookbehind:!0,alias:"name"},"start-stop-char":/[\[\]]/}}}}},t.languages.nani=t.languages.naniscript,t.hooks.add("after-tokenize",(function(t){t.tokens.forEach((function(t){if("string"!==typeof t&&"generic-text"===t.type){var e=n(t);(function(t){for(var e="[]{}",r=[],n=0;n=&|$!]/}}t.exports=n,n.displayName="nasm",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"atrule"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+(?:\.\d*)?|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:false|no|true|yes)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"',:=[\]{}()\s`-]|[:-][^"',=[\]{}()\s])(?:[^,:=\]})(\s]|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}}t.exports=n,n.displayName="neon",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.nevod={comment:/\/\/.*|(?:\/\*[\s\S]*?(?:\*\/|$))/,string:{pattern:/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))!?\*?/,greedy:!0,inside:{"string-attrs":/!$|!\*$|\*$/}},namespace:{pattern:/(@namespace\s+)[a-zA-Z0-9\-.]+(?=\s*\{)/,lookbehind:!0},pattern:{pattern:/(@pattern\s+)?#?[a-zA-Z0-9\-.]+(?:\s*\(\s*(?:~\s*)?[a-zA-Z0-9\-.]+\s*(?:,\s*(?:~\s*)?[a-zA-Z0-9\-.]*)*\))?(?=\s*=)/,lookbehind:!0,inside:{"pattern-name":{pattern:/^#?[a-zA-Z0-9\-.]+/,alias:"class-name"},fields:{pattern:/\(.*\)/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},punctuation:/[,()]/,operator:{pattern:/~/,alias:"field-hidden-mark"}}}}},search:{pattern:/(@search\s+|#)[a-zA-Z0-9\-.]+(?:\.\*)?(?=\s*;)/,alias:"function",lookbehind:!0},keyword:/@(?:having|inside|namespace|outside|pattern|require|search|where)\b/,"standard-pattern":{pattern:/\b(?:Alpha|AlphaNum|Any|Blank|End|LineBreak|Num|NumAlpha|Punct|Space|Start|Symbol|Word|WordBreak)\b(?:\([a-zA-Z0-9\-.,\s+]*\))?/,inside:{"standard-pattern-name":{pattern:/^[a-zA-Z0-9\-.]+/,alias:"builtin"},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},"standard-pattern-attr":{pattern:/[a-zA-Z0-9\-.]+/,alias:"builtin"},punctuation:/[,()]/}},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},operator:[{pattern:/=/,alias:"pattern-def"},{pattern:/&/,alias:"conjunction"},{pattern:/~/,alias:"exception"},{pattern:/\?/,alias:"optionality"},{pattern:/[[\]]/,alias:"repetition"},{pattern:/[{}]/,alias:"variation"},{pattern:/[+_]/,alias:"sequence"},{pattern:/\.{2,3}/,alias:"span"}],"field-capture":[{pattern:/([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/,lookbehind:!0,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}},{pattern:/[a-zA-Z0-9\-.]+\s*:/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}}],punctuation:/[:;,()]/,name:/[a-zA-Z0-9\-.]+/}}t.exports=n,n.displayName="nevod",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i;t.languages.nginx={comment:{pattern:/(^|[\s{};])#.*/,lookbehind:!0,greedy:!0},directive:{pattern:/(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:{string:{pattern:/((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,lookbehind:!0,greedy:!0,inside:{escape:{pattern:/\\["'\\nrt]/,alias:"entity"},variable:e}},comment:{pattern:/(\s)#.*/,lookbehind:!0,greedy:!0},keyword:{pattern:/^\S+/,greedy:!0},boolean:{pattern:/(\s)(?:off|on)(?!\S)/,lookbehind:!0},number:{pattern:/(\s)\d+[a-z]*(?!\S)/i,lookbehind:!0},variable:e}},punctuation:/[{};]/}}(t)}t.exports=n,n.displayName="nginx",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.nim={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(?:\b(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")/,greedy:!0},char:{pattern:/'(?:\\(?:\d+|x[\da-fA-F]{0,2}|.)|[^'])'/,greedy:!0},function:{pattern:/(?:(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,greedy:!0,inside:{operator:/\*$/}},identifier:{pattern:/`[^`\r\n]+`/,greedy:!0,inside:{punctuation:/`/}},number:/\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,keyword:/\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,operator:{pattern:/(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,lookbehind:!0},punctuation:/[({\[]\.|\.[)}\]]|[`(){}\[\],:]/}}t.exports=n,n.displayName="nim",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.nix={comment:{pattern:/\/\*[\s\S]*?\*\/|#.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:null}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"important"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},t.languages.nix.string.inside.interpolation.inside=t.languages.nix}t.exports=n,n.displayName="nix",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.nsis={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|[#;].*)/,lookbehind:!0,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:{pattern:/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,lookbehind:!0},property:/\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/,constant:/\$\{[!\w\.:\^-]+\}|\$\([!\w\.:\^-]+\)/,variable:/\$\w[\w\.]*/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/,punctuation:/[{}[\];(),.:]/,important:{pattern:/(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im,lookbehind:!0}}}t.exports=n,n.displayName="nsis",n.aliases=[]},function(t,e,r){"use strict";var n=r(428);function i(t){t.register(n),t.languages.objectivec=t.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete t.languages.objectivec["class-name"],t.languages.objc=t.languages.objectivec}t.exports=i,i.displayName="objectivec",i.aliases=["objc"]},function(t,e,r){"use strict";function n(t){t.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/}}t.exports=n,n.displayName="ocaml",n.aliases=[]},function(t,e,r){"use strict";var n=r(428);function i(t){t.register(n),function(t){t.languages.opencl=t.languages.extend("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:/\b(?:false|true)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:2|10)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),t.languages.insertBefore("opencl","class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/,alias:"keyword"}});var e={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};t.languages.insertBefore("c","keyword",e),t.languages.cpp&&(e["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|Sampler|UserEvent)\b/,alias:"keyword"},t.languages.insertBefore("cpp","keyword",e))}(t)}t.exports=i,i.displayName="opencl",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.openqasm={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"[^"\r\n\t]*"|'[^'\r\n\t]*'/,greedy:!0},keyword:/\b(?:CX|OPENQASM|U|barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while)\b|#pragma\b/,"class-name":/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,function:/\b(?:cos|exp|ln|popcount|rotl|rotr|sin|sqrt|tan)\b(?=\s*\()/,constant:/\b(?:euler|pi|tau)\b|\u03c0|\ud835\udf0f|\u2107/,number:{pattern:/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|\xb5s|ms|s)?/i,lookbehind:!0},operator:/->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,punctuation:/[(){}\[\];,:.]/},t.languages.qasm=t.languages.openqasm}t.exports=n,n.displayName="openqasm",n.aliases=["qasm"]},function(t,e,r){"use strict";function n(t){t.languages.oz={comment:{pattern:/\/\*[\s\S]*?\*\/|%.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},atom:{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,alias:"builtin"},keyword:/\$|\[\]|\b(?:_|at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/,function:[/\b[a-z][A-Za-z\d]*(?=\()/,{pattern:/(\{)[A-Z][A-Za-z\d]*\b/,lookbehind:!0}],number:/\b(?:0[bx][\da-f]+|\d+(?:\.\d*)?(?:e~?\d+)?)\b|&(?:[^\\]|\\(?:\d{3}|.))/i,variable:/`(?:[^`\\]|\\.)+`/,"attr-name":/\b\w+(?=[ \t]*:(?![:=]))/,operator:/:(?:=|::?)|<[-:=]?|=(?:=|=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/,punctuation:/[\[\](){}.:;?]/}}t.exports=n,n.displayName="oz",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.parigp={comment:/\/\*[\s\S]*?\*\/|\\\\.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"/,greedy:!0},keyword:function(){var t=["breakpoint","break","dbg_down","dbg_err","dbg_up","dbg_x","forcomposite","fordiv","forell","forpart","forprime","forstep","forsubgroup","forvec","for","iferr","if","local","my","next","return","until","while"];return t=t.map((function(t){return t.split("").join(" *")})).join("|"),RegExp("\\b(?:"+t+")\\b")}(),function:/\b\w(?:[\w ]*\w)?(?= *\()/,number:{pattern:/((?:\. *\. *)?)(?:\b\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *(?:[+-] *)?\d(?: *\d)*)?/i,lookbehind:!0},operator:/\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?: *>|(?: *<)?(?: *=)?)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/,punctuation:/[\[\]{}().,:;|]/}}t.exports=n,n.displayName="parigp",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=t.languages.parser=t.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});e=t.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:e.keyword,variable:e.variable,function:e.function,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:e.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:e.punctuation}}}),t.languages.insertBefore("inside","punctuation",{expression:e.expression,keyword:e.keyword,variable:e.variable,function:e.function,escape:e.escape,"parser-punctuation":{pattern:e.punctuation,alias:"punctuation"}},e.tag.inside["attr-value"])}(t)}t.exports=n,n.displayName="parser",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.pascal={directive:{pattern:/\{\$[\s\S]*?\}/,greedy:!0,alias:["marco","property"]},comment:{pattern:/\(\*[\s\S]*?\*\)|\{[\s\S]*?\}|\/\/.*/,greedy:!0},string:{pattern:/(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},asm:{pattern:/(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i,lookbehind:!0,greedy:!0,inside:null},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},t.languages.pascal.asm.inside=t.languages.extend("pascal",{asm:void 0,keyword:void 0,operator:void 0}),t.languages.objectpascal=t.languages.pascal}t.exports=n,n.displayName="pascal",n.aliases=["objectpascal"]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source,r=/(?:\b\w+(?:)?|)/.source.replace(//g,(function(){return e})),n=t.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp(/(\btype\s+\w+\s+is\s+)/.source.replace(//g,(function(){return r})),"i"),lookbehind:!0,inside:null},{pattern:RegExp(/(?=\s+is\b)/.source.replace(//g,(function(){return r})),"i"),inside:null},{pattern:RegExp(/(:\s*)/.source.replace(//g,(function(){return r}))),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:False|True)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\b\w+(?=\s*\()/,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},i=["comment","keyword","builtin","operator","punctuation"].reduce((function(t,e){return t[e]=n[e],t}),{});n["class-name"].forEach((function(t){t.inside=i}))}(t)}t.exports=n,n.displayName="pascaligo",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.pcaxis={string:/"[^"]*"/,keyword:{pattern:/((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,lookbehind:!0,greedy:!0,inside:{keyword:/^[-A-Z\d]+/,language:{pattern:/^(\s*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/^\[|\]$/,property:/[-\w]+/}},"sub-key":{pattern:/^(\s*)\S[\s\S]*/,lookbehind:!0,inside:{parameter:{pattern:/"[^"]*"/,alias:"property"},punctuation:/^\(|\)$|,/}}}},operator:/=/,tlist:{pattern:/TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,greedy:!0,inside:{function:/^TLIST/,property:{pattern:/^(\s*\(\s*)\w+/,lookbehind:!0},string:/"[^"]*"/,punctuation:/[(),]/,operator:/-/}},punctuation:/[;,]/,number:{pattern:/(^|\s)\d+(?:\.\d+)?(?!\S)/,lookbehind:!0},boolean:/NO|YES/},t.languages.px=t.languages.pcaxis}t.exports=n,n.displayName="pcaxis",n.aliases=["px"]},function(t,e,r){"use strict";function n(t){t.languages.peoplecode={comment:RegExp([/\/\*[\s\S]*?\*\//.source,/\bREM[^;]*;/.source,/<\*(?:[^<*]|\*(?!>)|<(?!\*)|<\*(?:(?!\*>)[\s\S])*\*>)*\*>/.source,/\/\+[\s\S]*?\+\//.source].join("|")),string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},variable:/%\w+/,"function-definition":{pattern:/((?:^|[^\w-])(?:function|method)\s+)\w+/i,lookbehind:!0,alias:"function"},"class-name":{pattern:/((?:^|[^-\w])(?:as|catch|class|component|create|extends|global|implements|instance|local|of|property|returns)\s+)\w+(?::\w+)*/i,lookbehind:!0,inside:{punctuation:/:/}},keyword:/\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|if|implements|import|instance|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i,"operator-keyword":{pattern:/\b(?:and|not|or)\b/i,alias:"operator"},function:/[_a-z]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/\b\d+(?:\.\d+)?\b/,operator:/<>|[<>]=?|!=|\*\*|[-+*/|=@]/,punctuation:/[:.;,()[\]]/},t.languages.pcode=t.languages.peoplecode}t.exports=n,n.displayName="peoplecode",n.aliases=["pcode"]},function(t,e,r){"use strict";function n(t){!function(t){var e=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;t.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,e].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,e].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,e+/\s*/.source+e].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(t)}t.exports=n,n.displayName="perl",n.aliases=[]},function(t,e,r){"use strict";var n=r(700);function i(t){t.register(n),t.languages.insertBefore("php","variable",{this:{pattern:/\$this\b/,alias:"keyword"},global:/\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/,scope:{pattern:/\b[\w\\]+::/,inside:{keyword:/\b(?:parent|self|static)\b/,punctuation:/::|\\/}}})}t.exports=i,i.displayName="phpExtras",i.aliases=[]},function(t,e,r){"use strict";var n=r(700),i=r(699);function o(t){t.register(n),t.register(i),function(t){var e=/(?:\b[a-zA-Z]\w*|[|\\[\]])+/.source;t.languages.phpdoc=t.languages.extend("javadoclike",{parameter:{pattern:RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:"+e+"\\s+)?)\\$\\w+"),lookbehind:!0}}),t.languages.insertBefore("phpdoc","keyword",{"class-name":[{pattern:RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)"+e),lookbehind:!0,inside:{keyword:/\b(?:array|bool|boolean|callback|double|false|float|int|integer|mixed|null|object|resource|self|string|true|void)\b/,punctuation:/[|\\[\]()]/}}]}),t.languages.javadoclike.addSupport("php",t.languages.phpdoc)}(t)}t.exports=o,o.displayName="phpdoc",o.aliases=[]},function(t,e,r){"use strict";var n=r(923);function i(t){t.register(n),t.languages.plsql=t.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),t.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}t.exports=i,i.displayName="plsql",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.powerquery={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},"quoted-identifier":{pattern:/#"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},string:{pattern:/(?:#!)?"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},constant:[/\bDay\.(?:Friday|Monday|Saturday|Sunday|Thursday|Tuesday|Wednesday)\b/,/\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/,/\bOccurrence\.(?:All|First|Last)\b/,/\bOrder\.(?:Ascending|Descending)\b/,/\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/,/\bMissingField\.(?:Error|Ignore|UseNull)\b/,/\bQuoteStyle\.(?:Csv|None)\b/,/\bJoinKind\.(?:FullOuter|Inner|LeftAnti|LeftOuter|RightAnti|RightOuter)\b/,/\bGroupKind\.(?:Global|Local)\b/,/\bExtraValues\.(?:Error|Ignore|List)\b/,/\bJoinAlgorithm\.(?:Dynamic|LeftHash|LeftIndex|PairwiseHash|RightHash|RightIndex|SortMerge)\b/,/\bJoinSide\.(?:Left|Right)\b/,/\bPrecision\.(?:Decimal|Double)\b/,/\bRelativePosition\.From(?:End|Start)\b/,/\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf16|Utf8|Windows)\b/,/\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Function|Int16|Int32|Int64|Int8|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/,/\bnull\b/],boolean:/\b(?:false|true)\b/,keyword:/\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/,function:{pattern:/(^|[^#\w.])[a-z_][\w.]*(?=\s*\()/i,lookbehind:!0},"data-type":{pattern:/\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time)\b/,alias:"class-name"},number:{pattern:/\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i,lookbehind:!0},operator:/[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/,punctuation:/[,;\[\](){}]/},t.languages.pq=t.languages.powerquery,t.languages.mscript=t.languages.powerquery}t.exports=n,n.displayName="powerquery",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=t.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}}(t)}t.exports=n,n.displayName="powershell",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.processing=t.languages.extend("clike",{keyword:/\b(?:break|case|catch|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,function:/\b\w+(?=\s*\()/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),t.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"class-name"}})}t.exports=n,n.displayName="processing",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.prolog={comment:{pattern:/\/\*[\s\S]*?\*\/|%.*/,greedy:!0},string:{pattern:/(["'])(?:\1\1|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1(?!\1)/,greedy:!0},builtin:/\b(?:fx|fy|xf[xy]?|yfx?)\b/,function:/\b[a-z]\w*(?:(?=\()|\/\d+)/,number:/\b\d+(?:\.\d*)?/,operator:/[:\\=><\-?*@\/;+^|!$.]+|\b(?:is|mod|not|xor)\b/,punctuation:/[(){}\[\],]/}}t.exports=n,n.displayName="prolog",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=["on","ignoring","group_right","group_left","by","without"],r=["sum","min","max","avg","group","stddev","stdvar","count","count_values","bottomk","topk","quantile"].concat(e,["offset"]);t.languages.promql={comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},"vector-match":{pattern:new RegExp("((?:"+e.join("|")+")\\s*)\\([^)]*\\)"),lookbehind:!0,inside:{"label-key":{pattern:/\b[^,]+\b/,alias:"attr-name"},punctuation:/[(),]/}},"context-labels":{pattern:/\{[^{}]*\}/,inside:{"label-key":{pattern:/\b[a-z_]\w*(?=\s*(?:=|![=~]))/,alias:"attr-name"},"label-value":{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0,alias:"attr-value"},punctuation:/\{|\}|=~?|![=~]|,/}},"context-range":[{pattern:/\[[\w\s:]+\]/,inside:{punctuation:/\[|\]|:/,"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}},{pattern:/(\boffset\s+)\w+/,lookbehind:!0,inside:{"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}}],keyword:new RegExp("\\b(?:"+r.join("|")+")\\b","i"),function:/\b[a-z_]\w*(?=\s*\()/i,number:/[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i,operator:/[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|or|unless)\b/i,punctuation:/[{};()`,.[\]]/}}(t)}t.exports=n,n.displayName="promql",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.properties={comment:/^[ \t]*[#!].*$/m,"attr-value":{pattern:/(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?: *[=:] *(?! )| ))(?:\\(?:\r\n|[\s\S])|[^\\\r\n])+/m,lookbehind:!0},"attr-name":/^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?= *[=:]| )/m,punctuation:/[=:]/}}t.exports=n,n.displayName="properties",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;t.languages.protobuf=t.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),t.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:e}},builtin:e,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}(t)}t.exports=n,n.displayName="protobuf",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.psl={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,inside:{symbol:/\\[ntrbA-Z"\\]/}},"heredoc-string":{pattern:/<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/,alias:"string",greedy:!0},keyword:/\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/,constant:/\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SEP_HORIZ|R_SEP_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|VOID|WARN)\b/,boolean:/\b(?:FALSE|False|NO|No|TRUE|True|YES|Yes|false|no|true|yes)\b/,variable:/\b(?:PslDebug|errno|exit_status)\b/,builtin:{pattern:/\b(?:PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|_snmp_debug|acos|add_diary|annotate|annotate_get|ascii_to_ebcdic|asctime|asin|atan|atexit|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|date|dcget_text|destroy|destroy_lock|dget_text|difference|dump_hist|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|file|floor|fmod|fopen|fseek|ftell|full_discovery|get|get_chan_info|get_ranges|get_text|get_vars|getenv|gethostinfo|getpid|getpname|grep|history|history_get_retention|in_transition|index|int|internal|intersection|is_var|isnumber|join|kill|length|lines|lock|lock_info|log|log10|loge|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|nthargf|nthline|nthlinef|num_bytes|num_consoles|pconfig|popen|poplines|pow|print|printf|proc_exists|process|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|snmp_agent_config|snmp_agent_start|snmp_agent_stop|snmp_close|snmp_config|snmp_get|snmp_get_next|snmp_h_get|snmp_h_get_next|snmp_h_set|snmp_open|snmp_set|snmp_trap_ignore|snmp_trap_listen|snmp_trap_raise_std_trap|snmp_trap_receive|snmp_trap_register_im|snmp_trap_send|snmp_walk|sopen|sort|splitline|sprintf|sqrt|srandom|str_repeat|strcasecmp|subset|substr|system|tail|tan|tanh|text_domain|time|tmpnam|tolower|toupper|trace_psl_process|trim|union|unique|unlock|unset|va_arg|va_start|write)\b/,alias:"builtin-function"},"foreach-variable":{pattern:/(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/,lookbehind:!0,greedy:!0},function:/\b[_a-z]\w*\b(?=\s*\()/i,number:/\b(?:0x[0-9a-f]+|\d+(?:\.\d+)?)\b/i,operator:/--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/,punctuation:/[(){}\[\];,]/}}t.exports=n,n.displayName="psl",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.pug={comment:{pattern:/(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,lookbehind:!0},"multiline-script":{pattern:/(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:t.languages.javascript},filter:{pattern:/(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},text:/\S[\s\S]*/}},"multiline-plain-text":{pattern:/(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0},markup:{pattern:/(^[\t ]*)<.+/m,lookbehind:!0,inside:t.languages.markup},doctype:{pattern:/((?:^|\n)[\t ]*)doctype(?: .+)?/,lookbehind:!0},"flow-control":{pattern:/(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m,lookbehind:!0,inside:{each:{pattern:/^each .+? in\b/,inside:{keyword:/\b(?:each|in)\b/,punctuation:/,/}},branch:{pattern:/^(?:case|default|else|if|unless|when|while)\b/,alias:"keyword"},rest:t.languages.javascript}},keyword:{pattern:/(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m,lookbehind:!0},mixin:[{pattern:/(^[\t ]*)mixin .+/m,lookbehind:!0,inside:{keyword:/^mixin/,function:/\w+(?=\s*\(|\s*$)/,punctuation:/[(),.]/}},{pattern:/(^[\t ]*)\+.+/m,lookbehind:!0,inside:{name:{pattern:/^\+\w+/,alias:"function"},rest:t.languages.javascript}}],script:{pattern:/(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,lookbehind:!0,inside:t.languages.javascript},"plain-text":{pattern:/(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,lookbehind:!0},tag:{pattern:/(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,lookbehind:!0,inside:{attributes:[{pattern:/&[^(]+\([^)]+\)/,inside:t.languages.javascript},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,lookbehind:!0,inside:t.languages.javascript},"attr-name":/[\w-]+(?=\s*!?=|\s*[,)])/,punctuation:/[!=(),]+/}}],punctuation:/:/,"attr-id":/#[\w\-]+/,"attr-class":/\.[\w\-]+/}},code:[{pattern:/(^[\t ]*(?:-|!?=)).+/m,lookbehind:!0,inside:t.languages.javascript}],punctuation:/[.\-!=|]+/};for(var e=/(^([\t ]*)):(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/.source,r=[{filter:"atpl",language:"twig"},{filter:"coffee",language:"coffeescript"},"ejs","handlebars","less","livescript","markdown",{filter:"sass",language:"scss"},"stylus"],n={},i=0,o=r.length;i",(function(){return a.filter})),"m"),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},text:{pattern:/\S[\s\S]*/,alias:[a.language,"language-"+a.language],inside:t.languages[a.language]}}})}t.languages.insertBefore("pug","filter",n)}(t)}t.exports=n,n.displayName="pug",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,greedy:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,greedy:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|\$(?!\{)|(?!\1)[^\\$]|\\[\s\S])*\1/,greedy:!0,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\b\w+|\*)(?=\s*=>)/,function:[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,boolean:/\b(?:false|true)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/};var e=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:t.languages.puppet}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}];t.languages.puppet.heredoc[0].inside.interpolation=e,t.languages.puppet.string.inside["double-quoted"].inside.interpolation=e}(t)}t.exports=n,n.displayName="puppet",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:NULL|ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,function:/\b(?:abs|add_(?:addr|constdef|(?:fundef|interface|macdef|typedef)(?:_at)?|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_c?string(?:_pointer)?|byte_(?:matrix|pointer)|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|sentry|short|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?:[!"#$%&'*+,\-.\/:<=>?@\\^`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]|\b_+\b)+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/};var e=/%< *-\*- *\d* *-\*-[\s\S]+?%>/.source;["c",{lang:"c++",alias:"cpp"},"fortran"].forEach((function(r){var n=r;if("string"!==typeof r&&(n=r.alias,r=r.lang),t.languages[n]){var i={};i["inline-lang-"+n]={pattern:RegExp(e.replace("",r.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:t.util.clone(t.languages.pure["inline-lang"].inside)},i["inline-lang-"+n].inside.rest=t.util.clone(t.languages[n]),t.languages.insertBefore("pure","inline-lang",i)}})),t.languages.c&&(t.languages.pure["inline-lang"].inside.rest=t.util.clone(t.languages.c))}(t)}t.exports=n,n.displayName="pure",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.purebasic=t.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|forever|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*/@]/}),t.languages.insertBefore("purebasic","keyword",{tag:/#\w+\$?/,asm:{pattern:/(^[\t ]*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},keyword:[/\b(?:extern|global)\b[^;\r\n]*/i,/\b(?:CPU|DEFAULT|FLOAT)\b.*/],function:{pattern:/^([\t ]*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^([\t ]*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete t.languages.purebasic["class-name"],delete t.languages.purebasic.boolean,t.languages.pbfasm=t.languages.purebasic}t.exports=n,n.displayName="purebasic",n.aliases=[]},function(t,e,r){"use strict";var n=r(925);function i(t){t.register(n),t.languages.purescript=t.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|\u2200/,"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import)\b/,punctuation:/\./}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/,operator:[t.languages.haskell.operator[0],t.languages.haskell.operator[2],/[\xa2-\xa6\xa8\xa9\xac\xae-\xb1\xb4\xb8\xd7\xf7\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u03f6\u0482\u058d-\u058f\u0606-\u0608\u060b\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u07fe\u07ff\u09f2\u09f3\u09fa\u09fb\u0af1\u0b70\u0bf3-\u0bfa\u0c7f\u0d4f\u0d79\u0e3f\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u166d\u17db\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u2052\u207a-\u207c\u208a-\u208c\u20a0-\u20bf\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u2140-\u2144\u214a-\u214d\u214f\u218a\u218b\u2190-\u2307\u230c-\u2328\u232b-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b73\u2b76-\u2b95\u2b97-\u2bff\u2ce5-\u2cea\u2e50\u2e51\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua700-\ua716\ua720\ua721\ua789\ua78a\ua828-\ua82b\ua836-\ua839\uaa77-\uaa79\uab5b\uab6a\uab6b\ufb29\ufbb2-\ufbc1\ufdfc\ufdfd\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd]/]}),t.languages.purs=t.languages.purescript}t.exports=i,i.displayName="purescript",i.aliases=["purs"]},function(t,e,r){"use strict";function n(t){t.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},t.languages.python["string-interpolation"].inside.interpolation.inside.rest=t.languages.python,t.languages.py=t.languages.python}t.exports=n,n.displayName="python",n.aliases=["py"]},function(t,e,r){"use strict";function n(t){t.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}}t.exports=n,n.displayName="q",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){for(var e=/"(?:\\.|[^\\"\r\n])*"|'(?:\\.|[^\\'\r\n])*'/.source,r=/\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))*\*\//.source,n=/(?:[^\\()[\]{}"'/]||\/(?![*/])||\(*\)|\[*\]|\{*\}|\\[\s\S])/.source.replace(//g,(function(){return e})).replace(//g,(function(){return r})),i=0;i<2;i++)n=n.replace(//g,(function(){return n}));n=n.replace(//g,"[^\\s\\S]"),t.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp(/((?:^|;)[ \t]*)function\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*\(*\)\s*\{*\}/.source.replace(//g,(function(){return n})),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:t.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp(/(:[ \t]*)(?![\s;}[])(?:(?!$|[;}]))+/.source.replace(//g,(function(){return n})),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:t.languages.javascript},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(t)}t.exports=n,n.displayName="qml",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.qore=t.languages.extend("clike",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,lookbehind:!0},string:{pattern:/("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:bool|date|float|int|list|number|string)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,boolean:/\b(?:false|true)\b/i,function:/\$?\b(?!\d)\w+(?=\()/,number:/\b(?:0b[01]+|0x(?:[\da-f]*\.)?[\da-fp\-]+|(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?[df]|(?:\d+(?:\.\d+)?|\.\d+))\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,lookbehind:!0},variable:/\$(?!\d)\w+\b/})}t.exports=n,n.displayName="qore",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){function e(t,e){return t.replace(/<<(\d+)>>/g,(function(t,r){return"(?:"+e[+r]+")"}))}function r(t,r,n){return RegExp(e(t,r),n||"")}var n=RegExp("\\b(?:"+("Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero"+" "+"Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within").trim().replace(/ /g,"|")+")\\b"),i=e(/<<0>>(?:\s*\.\s*<<0>>)*/.source,[/\b[A-Za-z_]\w*\b/.source]),o={keyword:n,punctuation:/[<>()?,.:[\]]/},a=/"(?:\\.|[^\\"])*"/.source;t.languages.qsharp=t.languages.extend("clike",{comment:/\/\/.*/,string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[a]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\b(?:as|open)\s+)<<0>>(?=\s*(?:;|as\b))/.source,[i]),lookbehind:!0,inside:o},{pattern:r(/(\bnamespace\s+)<<0>>(?=\s*\{)/.source,[i]),lookbehind:!0,inside:o}],keyword:n,number:/(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i,operator:/\band=|\bor=|\band\b|\bnot\b|\bor\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/,punctuation:/::|[{}[\];(),.:]/}),t.languages.insertBefore("qsharp","number",{range:{pattern:/\.\./,alias:"operator"}});var s=function(t,e){for(var r=0;r>/g,(function(){return"(?:"+t+")"}));return t.replace(/<>/g,"[^\\s\\S]")}(e(/\{(?:[^"{}]|<<0>>|<>)*\}/.source,[a]),2);t.languages.insertBefore("qsharp","string",{"interpolation-string":{pattern:r(/\$"(?:\\.|<<0>>|[^\\"{])*"/.source,[s]),greedy:!0,inside:{interpolation:{pattern:r(/((?:^|[^\\])(?:\\\\)*)<<0>>/.source,[s]),lookbehind:!0,inside:{punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-qsharp",inside:t.languages.qsharp}}},string:/[\s\S]+/}}})}(t),t.languages.qs=t.languages.qsharp}t.exports=n,n.displayName="qsharp",n.aliases=["qs"]},function(t,e,r){"use strict";function n(t){t.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}t.exports=n,n.displayName="r",n.aliases=[]},function(t,e,r){"use strict";var n=r(929);function i(t){t.register(n),t.languages.racket=t.languages.extend("scheme",{"lambda-parameter":{pattern:/([(\[]lambda\s+[(\[])[^()\[\]'\s]+/,lookbehind:!0}}),t.languages.insertBefore("racket","string",{lang:{pattern:/^#lang.+/m,greedy:!0,alias:"keyword"}}),t.languages.rkt=t.languages.racket}t.exports=i,i.displayName="racket",i.aliases=["rkt"]},function(t,e,r){"use strict";function n(t){t.languages.reason=t.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),t.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete t.languages.reason.function}t.exports=n,n.displayName="reason",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,n="(?:[^\\\\-]|"+r.source+")",i=RegExp(n+"-"+n),o={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};t.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:r}},"special-escape":e,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|:=]=?|!=|\b_\b/,punctuation:/[,;.\[\]{}()]/}}t.exports=n,n.displayName="rego",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.renpy={comment:{pattern:/(^|[^\\])#.+/,lookbehind:!0},string:{pattern:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m,greedy:!0},function:/\b[a-z_]\w*(?=\()/i,property:/\b(?:Update|UpdateVersion|action|activate_sound|adv_nvl_transition|after_load_transition|align|alpha|alt|anchor|antialias|area|auto|background|bar_invert|bar_resizing|bar_vertical|black_color|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_reverse|box_wrap|can_update|caret|child|color|crop|default_afm_enable|default_afm_time|default_fullscreen|default_text_cps|developer|directory_name|drag_handle|drag_joined|drag_name|drag_raise|draggable|dragged|drop_shadow|drop_shadow_color|droppable|dropped|easein|easeout|edgescroll|end_game_transition|end_splash_transition|enter_replay_transition|enter_sound|enter_transition|enter_yesno_transition|executable_name|exit_replay_transition|exit_sound|exit_transition|exit_yesno_transition|fadein|fadeout|first_indent|first_spacing|fit_first|focus|focus_mask|font|foreground|game_main_transition|get_installed_packages|google_play_key|google_play_salt|ground|has_music|has_sound|has_voice|height|help|hinting|hover|hover_background|hover_color|hover_sound|hovered|hyperlink_functions|idle|idle_color|image_style|include_update|insensitive|insensitive_background|insensitive_color|inside|intra_transition|italic|justify|kerning|keyboard_focus|language|layer_clipping|layers|layout|left_bar|left_gutter|left_margin|left_padding|length|line_leading|line_overlap_split|line_spacing|linear|main_game_transition|main_menu_music|maximum|min_width|minimum|minwidth|modal|mouse|mousewheel|name|narrator_menu|newline_indent|nvl_adv_transition|offset|order_reverse|outlines|overlay_functions|pos|position|prefix|radius|range|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|sample_sound|save_directory|say_attribute_transition|screen_height|screen_width|scrollbars|selected_hover|selected_hover_color|selected_idle|selected_idle_color|selected_insensitive|show_side_image|show_two_window|side_spacing|side_xpos|side_ypos|size|size_group|slow_cps|slow_cps_multiplier|spacing|strikethrough|subpixel|text_align|text_style|text_xpos|text_y_fudge|text_ypos|thumb|thumb_offset|thumb_shadow|thumbnail_height|thumbnail_width|time|top_bar|top_gutter|top_margin|top_padding|translations|underline|unscrollable|update|value|version|version_name|version_tuple|vertical|width|window_hide_transition|window_icon|window_left_padding|window_show_transition|window_title|windows_icon|xadjustment|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xinitial|xmargin|xmaximum|xminimum|xoffset|xofsset|xpadding|xpos|xsize|xzoom|yadjustment|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yinitial|ymargin|ymaximum|yminimum|yoffset|ypadding|ypos|ysize|ysizexysize|yzoom|zoom|zorder)\b/,tag:/\b(?:bar|block|button|buttoscreenn|drag|draggroup|fixed|frame|grid|[hv]box|hotbar|hotspot|image|imagebutton|imagemap|input|key|label|menu|mm_menu_frame|mousearea|nvl|parallel|screen|self|side|tag|text|textbutton|timer|vbar|viewport|window)\b|\$/,keyword:/\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|yield)\b/,boolean:/\b(?:[Ff]alse|[Tt]rue)\b/,number:/(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?)|\B\.\d+)(?:e[+-]?\d+)?j?/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with)\b/,punctuation:/[{}[\];(),.:]/},t.languages.rpy=t.languages.renpy}t.exports=n,n.displayName="renpy",n.aliases=["rpy"]},function(t,e,r){"use strict";function n(t){t.languages.rest={table:[{pattern:/(^[\t ]*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1[+|].+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/m,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(^[\t ]*)=+ [ =]*=(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1=+ [ =]*=(?=(?:\r?\n|\r){2}|\s*$)/m,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^[\t ]*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( )(?! )[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^[\t ]*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^[\t ]*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^[\t ]*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^[\t ]*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^[\t ]*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^[\t ]*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+)(?![ \t]).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^[\t ]*)(?:[*+\-\u2022\u2023\u2043]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^[\t ]*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s)(?:(?!\2).)*\S\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\[\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^[\t ]*)(?:\|(?= |$)|(?:---?|\u2014|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}}}t.exports=n,n.displayName="rest",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.rip={comment:{pattern:/#.*/,greedy:!0},char:{pattern:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},regex:{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},keyword:/(?:=>|->)|\b(?:case|catch|class|else|exit|finally|if|raise|return|switch|try)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:false|true)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,number:/[+-]?\b(?:\d+\.\d+|\d+)\b/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}}t.exports=n,n.displayName="rip",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.roboconf={comment:/#.*/,keyword:{pattern:/(^|\s)(?:(?:external|import)\b|(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{))/,lookbehind:!0},component:{pattern:/[\w-]+(?=[ \t]*\{)/,alias:"variable"},property:/[\w.-]+(?=[ \t]*:)/,value:{pattern:/(=[ \t]*(?![ \t]))[^,;]+/,lookbehind:!0,alias:"attr-value"},optional:{pattern:/\(optional\)/,alias:"builtin"},wildcard:{pattern:/(\.)\*/,lookbehind:!0,alias:"operator"},punctuation:/[{},.;:=]/}}t.exports=n,n.displayName="roboconf",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},r={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function n(t,n){var i={"section-header":{pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"}};for(var o in n)i[o]=n[o];return i.tag={pattern:/([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},i.variable=r,i.comment=e,{pattern:RegExp(/^ ?\*{3}[ \t]*[ \t]*\*{3}(?:.|[\r\n](?!\*{3}))*/.source.replace(//g,(function(){return t})),"im"),alias:"section",inside:i}}var i={pattern:/(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},o={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:r}},a={pattern:/([\r\n](?: {2}|\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:r}};t.languages.robotframework={settings:n("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:n("Variables"),"test-cases":n("Test Cases",{"test-name":o,documentation:i,property:a}),keywords:n("Keywords",{"keyword-name":o,documentation:i,property:a}),tasks:n("Tasks",{"task-name":o,documentation:i,property:a}),comment:e},t.languages.robot=t.languages.robotframework}(t)}t.exports=n,n.displayName="robotframework",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)e=e.replace(//g,(function(){return e}));e=e.replace(//g,(function(){return/[^\s\S]/.source})),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string}(t)}t.exports=n,n.displayName="rust",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))/.source,r=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(e+"[bx]"),alias:"number"},i={pattern:/&[a-z_]\w*/i},o={pattern:/((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},a={pattern:/(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i,alias:"keyword",lookbehind:!0},s=[/\/\*[\s\S]*?\*\//,{pattern:/(^[ \t]*|;\s*)\*[^;]*;/m,lookbehind:!0}],u={pattern:RegExp(e),greedy:!0},c=/[$%@.(){}\[\];,\\]/,l={pattern:/%?\b\w+(?=\()/,alias:"keyword"},f={function:l,"arg-value":{pattern:/(=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":i,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:r,"numeric-constant":n,punctuation:c,string:u},h={pattern:/\b(?:format|put)\b=?[\w'$.]+/i,inside:{keyword:/^(?:format|put)(?==)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/,alias:"number"}}},d={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},p={pattern:/((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},g={pattern:/(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},m=/aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce/.source,y={pattern:RegExp(/(^|\s)(?:action\s+)?(?:)\.[a-z]+\b[^;]+/.source.replace(//g,(function(){return m})),"i"),lookbehind:!0,inside:{keyword:RegExp(/(?:)\.[a-z]+\b/.source.replace(//g,(function(){return m})),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},comment:s,function:l,"arg-value":f["arg-value"],operator:f.operator,argument:f.arg,number:r,"numeric-constant":n,punctuation:c,string:u}},b={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i,lookbehind:!0};t.languages.sas={datalines:{pattern:/^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:cards|(?:data)?lines)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp(/^[ \t]*(?:select|alter\s+table|(?:create|describe|drop)\s+(?:index|table(?:\s+constraints)?|view)|create\s+unique\s+index|insert\s+into|update)(?:|[^;"'])+;/.source.replace(//g,(function(){return e})),"im"),alias:"language-sql",inside:t.languages.sql},"global-statements":p,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i,lookbehind:!0,alias:"keyword"},number:r,"numeric-constant":n,punctuation:c,string:u}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,groovy:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g,(function(){return e})),"im"),lookbehind:!0,alias:"language-groovy",inside:t.languages.groovy},keyword:b,"submit-statement":g,"global-statements":p,number:r,"numeric-constant":n,punctuation:c,string:u}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,lua:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g,(function(){return e})),"im"),lookbehind:!0,alias:"language-lua",inside:t.languages.lua},keyword:b,"submit-statement":g,"global-statements":p,number:r,"numeric-constant":n,punctuation:c,string:u}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,"statement-var":{pattern:/((?:^|\s)=?)saveresult\s[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:f}},"cas-actions":y,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:f},step:a,keyword:b,function:l,format:h,altformat:d,"global-statements":p,number:r,"numeric-constant":n,punctuation:c,string:u}},"proc-args":{pattern:RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|)+;/.source.replace(//g,(function(){return e})),"im"),lookbehind:!0,inside:f},"macro-keyword":o,"macro-variable":i,"macro-string-functions":{pattern:/((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i,lookbehind:!0,inside:{function:{pattern:/%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i,alias:"keyword"},"macro-keyword":o,"macro-variable":i,"escaped-char":{pattern:/%['"()<>=\xac^~;,#]/},punctuation:c}},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:s,number:r,"numeric-constant":n}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:f},"cas-actions":y,comment:s,function:l,format:h,altformat:d,"numeric-constant":n,datetime:{pattern:RegExp(e+"(?:dt?|t)"),alias:"number"},string:u,step:a,keyword:b,"operator-keyword":{pattern:/\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i,alias:"operator"},number:r,operator:/\*\*?|\|\|?|!!?|\xa6\xa6?|<[>=]?|>[<=]?|[-+\/=&]|[~\xac^]=?/,punctuation:c}}(t)}t.exports=n,n.displayName="sas",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.sass=t.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),t.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete t.languages.sass.atrule;var e=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];t.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:e,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:e,operator:r,important:t.languages.sass.important}}}),delete t.languages.sass.property,delete t.languages.sass.important,t.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(t)}t.exports=n,n.displayName="sass",n.aliases=[]},function(t,e,r){"use strict";var n=r(926);function i(t){t.register(n),t.languages.scala=t.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),t.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:t.languages.scala}}},string:/[\s\S]+/}}}),delete t.languages.scala["class-name"],delete t.languages.scala.function}t.exports=i,i.displayName="scala",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.scss=t.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),t.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),t.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),t.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),t.languages.scss.atrule.inside.rest=t.languages.scss}t.exports=n,n.displayName="scss",n.aliases=[]},function(t,e,r){"use strict";var n=r(1333);function i(t){t.register(n),function(t){var e=[/"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/.source,/'[^']*'/.source,/\$'(?:[^'\\]|\\[\s\S])*'/.source,/<<-?\s*(["']?)(\w+)\1\s[\s\S]*?[\r\n]\2/.source].join("|");t.languages["shell-session"]={command:{pattern:RegExp(/^/.source+"(?:"+/[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+(?::[^\0-\x1F$#%*?"<>:;|]+)?/.source+"|"+/[/~.][^\0-\x1F$#%*?"<>@:;|]*/.source+")?"+/[$#%](?=\s)/.source+/(?:[^\\\r\n \t'"<$]|[ \t](?:(?!#)|#.*$)|\\(?:[^\r]|\r\n?)|\$(?!')|<(?!<)|<>)+/.source.replace(/<>/g,(function(){return e})),"m"),greedy:!0,inside:{info:{pattern:/^[^#$%]+/,alias:"punctuation",inside:{user:/^[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#%]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:t.languages.bash},"shell-symbol":{pattern:/^[$#%]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},t.languages["sh-session"]=t.languages.shellsession=t.languages["shell-session"]}(t)}t.exports=i,i.displayName="shellSession",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.smali={comment:/#.*/,string:{pattern:/"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\(?:.|u[\da-fA-F]{4}))'/,greedy:!0},"class-name":{pattern:/(^|[^L])L(?:(?:\w+|`[^`\r\n]*`)\/)*(?:[\w$]+|`[^`\r\n]*`)(?=\s*;)/,lookbehind:!0,inside:{"class-name":{pattern:/(^L|\/)(?:[\w$]+|`[^`\r\n]*`)$/,lookbehind:!0},namespace:{pattern:/^(L)(?:(?:\w+|`[^`\r\n]*`)\/)+/,lookbehind:!0,inside:{punctuation:/\//}},builtin:/^L/}},builtin:[{pattern:/([();\[])[BCDFIJSVZ]+/,lookbehind:!0},{pattern:/([\w$>]:)[BCDFIJSVZ]/,lookbehind:!0}],keyword:[{pattern:/(\.end\s+)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])\.(?!\d)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])(?:abstract|annotation|bridge|constructor|enum|final|interface|private|protected|public|runtime|static|synthetic|system|transient)(?![\w.-])/,lookbehind:!0}],function:{pattern:/(^|[^\w.-])(?:\w+|<[\w$-]+>)(?=\()/,lookbehind:!0},field:{pattern:/[\w$]+(?=:)/,alias:"variable"},register:{pattern:/(^|[^\w.-])[vp]\d(?![\w.-])/,lookbehind:!0,alias:"variable"},boolean:{pattern:/(^|[^\w.-])(?:false|true)(?![\w.-])/,lookbehind:!0},number:{pattern:/(^|[^/\w.-])-?(?:NAN|INFINITY|0x(?:[\dA-F]+(?:\.[\dA-F]*)?|\.[\dA-F]+)(?:p[+-]?[\dA-F]+)?|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)[dflst]?(?![\w.-])/i,lookbehind:!0},label:{pattern:/(:)\w+/,lookbehind:!0,alias:"property"},operator:/->|\.\.|[\[=]/,punctuation:/[{}(),;:]/}}t.exports=n,n.displayName="smali",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.smalltalk={comment:{pattern:/"(?:""|[^"])*"/,greedy:!0},char:{pattern:/\$./,greedy:!0},string:{pattern:/'(?:''|[^'])*'/,greedy:!0},symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}}t.exports=n,n.displayName="smalltalk",n.aliases=[]},function(t,e,r){"use strict";var n=r(223);function i(t){t.register(n),function(t){t.languages.smarty={comment:{pattern:/^\{\*[\s\S]*?\*\}/,greedy:!0},"embedded-php":{pattern:/^\{php\}[\s\S]*?\{\/php\}/,greedy:!0,inside:{smarty:{pattern:/^\{php\}|\{\/php\}$/,inside:null},php:{pattern:/[\s\S]+/,alias:"language-php",inside:t.languages.php}}},string:[{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0,inside:{interpolation:{pattern:/\{[^{}]*\}|`[^`]*`/,inside:{"interpolation-punctuation":{pattern:/^[{`]|[`}]$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},variable:/\$\w+/}},{pattern:/'(?:\\.|[^'\\\r\n])*'/,greedy:!0}],keyword:{pattern:/(^\{\/?)[a-z_]\w*\b(?!\()/i,lookbehind:!0,greedy:!0},delimiter:{pattern:/^\{\/?|\}$/,greedy:!0,alias:"punctuation"},number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,variable:[/\$(?!\d)\w+/,/#(?!\d)\w+#/,{pattern:/(\.|->|\w\s*=)(?!\d)\w+\b(?!\()/,lookbehind:!0},{pattern:/(\[)(?!\d)\w+(?=\])/,lookbehind:!0}],function:{pattern:/(\|\s*)@?[a-z_]\w*|\b[a-z_]\w*(?=\()/i,lookbehind:!0},"attr-name":/\b[a-z_]\w*(?=\s*=)/i,boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\[\](){}.,:`]|->/,operator:[/[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/,/\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/,/\b(?:and|eq|gt?e|gt|lt?e|lt|mod|neq?|not|or)\b/]},t.languages.smarty["embedded-php"].inside.smarty.inside=t.languages.smarty,t.languages.smarty.string[0].inside.interpolation.inside.expression.inside=t.languages.smarty;var e=/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,r=RegExp(/\{\*[\s\S]*?\*\}/.source+"|"+/\{php\}[\s\S]*?\{\/php\}/.source+"|"+/\{(?:[^{}"']||\{(?:[^{}"']||\{(?:[^{}"']|)*\})*\})*\}/.source.replace(//g,(function(){return e.source})),"g");t.hooks.add("before-tokenize",(function(e){var n=!1;t.languages["markup-templating"].buildPlaceholders(e,"smarty",r,(function(t){return"{/literal}"===t&&(n=!1),!n&&("{literal}"===t&&(n=!0),!0)}))})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"smarty")}))}(t)}t.exports=i,i.displayName="smarty",i.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\b(?:abstype|and|andalso|as|case|datatype|do|else|end|eqtype|exception|fn|fun|functor|handle|if|in|include|infix|infixr|let|local|nonfix|of|op|open|orelse|raise|rec|sharing|sig|signature|struct|structure|then|type|val|where|while|with|withtype)\b/i;t.languages.sml={comment:/\(\*(?:[^*(]|\*(?!\))|\((?!\*)|\(\*(?:[^*(]|\*(?!\))|\((?!\*))*\*\))*\*\)/,string:{pattern:/#?"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":[{pattern:RegExp(/((?:^|[^:]):\s*)(?:\s*(?:(?:\*|->)\s*|,\s*(?:(?=)|(?!)\s+)))*/.source.replace(//g,(function(){return/\s*(?:[*,]|->)/.source})).replace(//g,(function(){return/(?:'[\w']*||\((?:[^()]|\([^()]*\))*\)|\{(?:[^{}]|\{[^{}]*\})*\})(?:\s+)*/.source})).replace(//g,(function(){return/(?!)[a-z\d_][\w'.]*/.source})).replace(//g,(function(){return e.source})),"i"),lookbehind:!0,greedy:!0,inside:null},{pattern:/((?:^|[^\w'])(?:datatype|exception|functor|signature|structure|type)\s+)[a-z_][\w'.]*/i,lookbehind:!0}],function:{pattern:/((?:^|[^\w'])fun\s+)[a-z_][\w'.]*/i,lookbehind:!0},keyword:e,variable:{pattern:/(^|[^\w'])'[\w']*/,lookbehind:!0},number:/~?\b(?:\d+(?:\.\d+)?(?:e~?\d+)?|0x[\da-f]+)\b/i,word:{pattern:/\b0w(?:\d+|x[\da-f]+)\b/i,alias:"constant"},boolean:/\b(?:false|true)\b/i,operator:/\.\.\.|:[>=:]|=>?|->|[<>]=?|[!+\-*/^#|@~]/,punctuation:/[(){}\[\].:,;]/},t.languages.sml["class-name"][0].inside=t.languages.sml,t.languages.smlnj=t.languages.sml}(t)}t.exports=n,n.displayName="sml",n.aliases=["smlnj"]},function(t,e,r){"use strict";function n(t){t.languages.solidity=t.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),t.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),t.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),t.languages.sol=t.languages.solidity}t.exports=n,n.displayName="solidity",n.aliases=["sol"]},function(t,e,r){"use strict";function n(t){!function(t){var e={pattern:/\{[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}\}/i,alias:"constant",inside:{punctuation:/[{}]/}};t.languages["solution-file"]={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0,inside:{guid:e}},object:{pattern:/^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m,lookbehind:!0,greedy:!0,alias:"keyword"},property:{pattern:/^([ \t]*)(?!\s)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m,lookbehind:!0,inside:{guid:e}},guid:e,number:/\b\d+(?:\.\d+)*\b/,boolean:/\b(?:FALSE|TRUE)\b/,operator:/=/,punctuation:/[(),]/},t.languages.sln=t.languages["solution-file"]}(t)}t.exports=n,n.displayName="solutionFile",n.aliases=[]},function(t,e,r){"use strict";var n=r(223);function i(t){t.register(n),function(t){var e=/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,r=/\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-F]+\b/;t.languages.soy={comment:[/\/\*[\s\S]*?\*\//,{pattern:/(\s)\/\/.*/,lookbehind:!0,greedy:!0}],"command-arg":{pattern:/(\{+\/?\s*(?:alias|call|delcall|delpackage|deltemplate|namespace|template)\s+)\.?[\w.]+/,lookbehind:!0,alias:"string",inside:{punctuation:/\./}},parameter:{pattern:/(\{+\/?\s*@?param\??\s+)\.?[\w.]+/,lookbehind:!0,alias:"variable"},keyword:[{pattern:/(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/,lookbehind:!0},/\b(?:any|as|attributes|bool|css|float|html|in|int|js|list|map|null|number|string|uri)\b/],delimiter:{pattern:/^\{+\/?|\/?\}+$/,alias:"punctuation"},property:/\w+(?==)/,variable:{pattern:/\$[^\W\d]\w*(?:\??(?:\.\w+|\[[^\]]+\]))*/,inside:{string:{pattern:e,greedy:!0},number:r,punctuation:/[\[\].?]/}},string:{pattern:e,greedy:!0},function:[/\w+(?=\()/,{pattern:/(\|[^\S\r\n]*)\w+/,lookbehind:!0}],boolean:/\b(?:false|true)\b/,number:r,operator:/\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,punctuation:/[{}()\[\]|.,:]/},t.hooks.add("before-tokenize",(function(e){var r=!1;t.languages["markup-templating"].buildPlaceholders(e,"soy",/\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g,(function(t){return"{/literal}"===t&&(r=!1),!r&&("{literal}"===t&&(r=!0),!0)}))})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"soy")}))}(t)}t.exports=i,i.displayName="soy",i.aliases=[]},function(t,e,r){"use strict";var n=r(1337);function i(t){t.register(n),t.languages.sparql=t.languages.extend("turtle",{boolean:/\b(?:false|true)\b/i,variable:{pattern:/[?$]\w+/,greedy:!0}}),t.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:BASE|GRAPH|PREFIX)\b/i]}),t.languages.rq=t.languages.sparql}t.exports=i,i.displayName="sparql",i.aliases=["rq"]},function(t,e,r){"use strict";function n(t){t.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\b\w+(?=\s*\()/,property:/\b\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/}}t.exports=n,n.displayName="splunkSpl",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.sqf=t.languages.extend("clike",{string:{pattern:/"(?:(?:"")?[^"])*"(?!")|'(?:[^'])*'/,greedy:!0},keyword:/\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execFSM|execVM|exitWith|for|forEach|forEachMember|forEachMemberAgent|forEachMemberTeam|from|goto|if|nil|preprocessFile|preprocessFileLineNumbers|private|scopeName|spawn|step|switch|then|throw|to|try|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?:abs|accTime|acos|action|actionIDs|actionKeys|actionKeysImages|actionKeysNames|actionKeysNamesArray|actionName|actionParams|activateAddons|activatedAddons|activateKey|add3DENConnection|add3DENEventHandler|add3DENLayer|addAction|addBackpack|addBackpackCargo|addBackpackCargoGlobal|addBackpackGlobal|addCamShake|addCuratorAddons|addCuratorCameraArea|addCuratorEditableObjects|addCuratorEditingArea|addCuratorPoints|addEditorObject|addEventHandler|addForce|addForceGeneratorRTD|addGoggles|addGroupIcon|addHandgunItem|addHeadgear|addItem|addItemCargo|addItemCargoGlobal|addItemPool|addItemToBackpack|addItemToUniform|addItemToVest|addLiveStats|addMagazine|addMagazineAmmoCargo|addMagazineCargo|addMagazineCargoGlobal|addMagazineGlobal|addMagazinePool|addMagazines|addMagazineTurret|addMenu|addMenuItem|addMissionEventHandler|addMPEventHandler|addMusicEventHandler|addOwnedMine|addPlayerScores|addPrimaryWeaponItem|addPublicVariableEventHandler|addRating|addResources|addScore|addScoreSide|addSecondaryWeaponItem|addSwitchableUnit|addTeamMember|addToRemainsCollector|addTorque|addUniform|addVehicle|addVest|addWaypoint|addWeapon|addWeaponCargo|addWeaponCargoGlobal|addWeaponGlobal|addWeaponItem|addWeaponPool|addWeaponTurret|admin|agent|agents|AGLToASL|aimedAtTarget|aimPos|airDensityCurveRTD|airDensityRTD|airplaneThrottle|airportSide|AISFinishHeal|alive|all3DENEntities|allAirports|allControls|allCurators|allCutLayers|allDead|allDeadMen|allDisplays|allGroups|allMapMarkers|allMines|allMissionObjects|allow3DMode|allowCrewInImmobile|allowCuratorLogicIgnoreAreas|allowDamage|allowDammage|allowFileOperations|allowFleeing|allowGetIn|allowSprint|allPlayers|allSimpleObjects|allSites|allTurrets|allUnits|allUnitsUAV|allVariables|ammo|ammoOnPylon|animate|animateBay|animateDoor|animatePylon|animateSource|animationNames|animationPhase|animationSourcePhase|animationState|append|apply|armoryPoints|arrayIntersect|asin|ASLToAGL|ASLToATL|assert|assignAsCargo|assignAsCargoIndex|assignAsCommander|assignAsDriver|assignAsGunner|assignAsTurret|assignCurator|assignedCargo|assignedCommander|assignedDriver|assignedGunner|assignedItems|assignedTarget|assignedTeam|assignedVehicle|assignedVehicleRole|assignItem|assignTeam|assignToAirport|atan|atan2|atg|ATLToASL|attachedObject|attachedObjects|attachedTo|attachObject|attachTo|attackEnabled|backpack|backpackCargo|backpackContainer|backpackItems|backpackMagazines|backpackSpaceFor|behaviour|benchmark|binocular|blufor|boundingBox|boundingBoxReal|boundingCenter|briefingName|buildingExit|buildingPos|buldozer_EnableRoadDiag|buldozer_IsEnabledRoadDiag|buldozer_LoadNewRoads|buldozer_reloadOperMap|buttonAction|buttonSetAction|cadetMode|callExtension|camCommand|camCommit|camCommitPrepared|camCommitted|camConstuctionSetParams|camCreate|camDestroy|cameraEffect|cameraEffectEnableHUD|cameraInterest|cameraOn|cameraView|campaignConfigFile|camPreload|camPreloaded|camPrepareBank|camPrepareDir|camPrepareDive|camPrepareFocus|camPrepareFov|camPrepareFovRange|camPreparePos|camPrepareRelPos|camPrepareTarget|camSetBank|camSetDir|camSetDive|camSetFocus|camSetFov|camSetFovRange|camSetPos|camSetRelPos|camSetTarget|camTarget|camUseNVG|canAdd|canAddItemToBackpack|canAddItemToUniform|canAddItemToVest|cancelSimpleTaskDestination|canFire|canMove|canSlingLoad|canStand|canSuspend|canTriggerDynamicSimulation|canUnloadInCombat|canVehicleCargo|captive|captiveNum|cbChecked|cbSetChecked|ceil|channelEnabled|cheatsEnabled|checkAIFeature|checkVisibility|civilian|className|clear3DENAttribute|clear3DENInventory|clearAllItemsFromBackpack|clearBackpackCargo|clearBackpackCargoGlobal|clearForcesRTD|clearGroupIcons|clearItemCargo|clearItemCargoGlobal|clearItemPool|clearMagazineCargo|clearMagazineCargoGlobal|clearMagazinePool|clearOverlay|clearRadio|clearVehicleInit|clearWeaponCargo|clearWeaponCargoGlobal|clearWeaponPool|clientOwner|closeDialog|closeDisplay|closeOverlay|collapseObjectTree|collect3DENHistory|collectiveRTD|combatMode|commandArtilleryFire|commandChat|commander|commandFire|commandFollow|commandFSM|commandGetOut|commandingMenu|commandMove|commandRadio|commandStop|commandSuppressiveFire|commandTarget|commandWatch|comment|commitOverlay|compile|compileFinal|completedFSM|composeText|configClasses|configFile|configHierarchy|configName|configNull|configProperties|configSourceAddonList|configSourceMod|configSourceModList|confirmSensorTarget|connectTerminalToUAV|controlNull|controlsGroupCtrl|copyFromClipboard|copyToClipboard|copyWaypoints|cos|count|countEnemy|countFriendly|countSide|countType|countUnknown|create3DENComposition|create3DENEntity|createAgent|createCenter|createDialog|createDiaryLink|createDiaryRecord|createDiarySubject|createDisplay|createGearDialog|createGroup|createGuardedPoint|createLocation|createMarker|createMarkerLocal|createMenu|createMine|createMissionDisplay|createMPCampaignDisplay|createSimpleObject|createSimpleTask|createSite|createSoundSource|createTask|createTeam|createTrigger|createUnit|createVehicle|createVehicleCrew|createVehicleLocal|crew|ctAddHeader|ctAddRow|ctClear|ctCurSel|ctData|ctFindHeaderRows|ctFindRowHeader|ctHeaderControls|ctHeaderCount|ctRemoveHeaders|ctRemoveRows|ctrlActivate|ctrlAddEventHandler|ctrlAngle|ctrlAutoScrollDelay|ctrlAutoScrollRewind|ctrlAutoScrollSpeed|ctrlChecked|ctrlClassName|ctrlCommit|ctrlCommitted|ctrlCreate|ctrlDelete|ctrlEnable|ctrlEnabled|ctrlFade|ctrlHTMLLoaded|ctrlIDC|ctrlIDD|ctrlMapAnimAdd|ctrlMapAnimClear|ctrlMapAnimCommit|ctrlMapAnimDone|ctrlMapCursor|ctrlMapMouseOver|ctrlMapScale|ctrlMapScreenToWorld|ctrlMapWorldToScreen|ctrlModel|ctrlModelDirAndUp|ctrlModelScale|ctrlParent|ctrlParentControlsGroup|ctrlPosition|ctrlRemoveAllEventHandlers|ctrlRemoveEventHandler|ctrlScale|ctrlSetActiveColor|ctrlSetAngle|ctrlSetAutoScrollDelay|ctrlSetAutoScrollRewind|ctrlSetAutoScrollSpeed|ctrlSetBackgroundColor|ctrlSetChecked|ctrlSetDisabledColor|ctrlSetEventHandler|ctrlSetFade|ctrlSetFocus|ctrlSetFont|ctrlSetFontH1|ctrlSetFontH1B|ctrlSetFontH2|ctrlSetFontH2B|ctrlSetFontH3|ctrlSetFontH3B|ctrlSetFontH4|ctrlSetFontH4B|ctrlSetFontH5|ctrlSetFontH5B|ctrlSetFontH6|ctrlSetFontH6B|ctrlSetFontHeight|ctrlSetFontHeightH1|ctrlSetFontHeightH2|ctrlSetFontHeightH3|ctrlSetFontHeightH4|ctrlSetFontHeightH5|ctrlSetFontHeightH6|ctrlSetFontHeightSecondary|ctrlSetFontP|ctrlSetFontPB|ctrlSetFontSecondary|ctrlSetForegroundColor|ctrlSetModel|ctrlSetModelDirAndUp|ctrlSetModelScale|ctrlSetPixelPrecision|ctrlSetPosition|ctrlSetScale|ctrlSetStructuredText|ctrlSetText|ctrlSetTextColor|ctrlSetTextColorSecondary|ctrlSetTextSecondary|ctrlSetTooltip|ctrlSetTooltipColorBox|ctrlSetTooltipColorShade|ctrlSetTooltipColorText|ctrlShow|ctrlShown|ctrlText|ctrlTextHeight|ctrlTextSecondary|ctrlTextWidth|ctrlType|ctrlVisible|ctRowControls|ctRowCount|ctSetCurSel|ctSetData|ctSetHeaderTemplate|ctSetRowTemplate|ctSetValue|ctValue|curatorAddons|curatorCamera|curatorCameraArea|curatorCameraAreaCeiling|curatorCoef|curatorEditableObjects|curatorEditingArea|curatorEditingAreaType|curatorMouseOver|curatorPoints|curatorRegisteredObjects|curatorSelected|curatorWaypointCost|current3DENOperation|currentChannel|currentCommand|currentMagazine|currentMagazineDetail|currentMagazineDetailTurret|currentMagazineTurret|currentMuzzle|currentNamespace|currentTask|currentTasks|currentThrowable|currentVisionMode|currentWaypoint|currentWeapon|currentWeaponMode|currentWeaponTurret|currentZeroing|cursorObject|cursorTarget|customChat|customRadio|cutFadeOut|cutObj|cutRsc|cutText|damage|date|dateToNumber|daytime|deActivateKey|debriefingText|debugFSM|debugLog|deg|delete3DENEntities|deleteAt|deleteCenter|deleteCollection|deleteEditorObject|deleteGroup|deleteGroupWhenEmpty|deleteIdentity|deleteLocation|deleteMarker|deleteMarkerLocal|deleteRange|deleteResources|deleteSite|deleteStatus|deleteTeam|deleteVehicle|deleteVehicleCrew|deleteWaypoint|detach|detectedMines|diag_activeMissionFSMs|diag_activeScripts|diag_activeSQFScripts|diag_activeSQSScripts|diag_captureFrame|diag_captureFrameToFile|diag_captureSlowFrame|diag_codePerformance|diag_drawMode|diag_dynamicSimulationEnd|diag_enable|diag_enabled|diag_fps|diag_fpsMin|diag_frameNo|diag_lightNewLoad|diag_list|diag_log|diag_logSlowFrame|diag_mergeConfigFile|diag_recordTurretLimits|diag_setLightNew|diag_tickTime|diag_toggle|dialog|diarySubjectExists|didJIP|didJIPOwner|difficulty|difficultyEnabled|difficultyEnabledRTD|difficultyOption|direction|directSay|disableAI|disableCollisionWith|disableConversation|disableDebriefingStats|disableMapIndicators|disableNVGEquipment|disableRemoteSensors|disableSerialization|disableTIEquipment|disableUAVConnectability|disableUserInput|displayAddEventHandler|displayCtrl|displayNull|displayParent|displayRemoveAllEventHandlers|displayRemoveEventHandler|displaySetEventHandler|dissolveTeam|distance|distance2D|distanceSqr|distributionRegion|do3DENAction|doArtilleryFire|doFire|doFollow|doFSM|doGetOut|doMove|doorPhase|doStop|doSuppressiveFire|doTarget|doWatch|drawArrow|drawEllipse|drawIcon|drawIcon3D|drawLine|drawLine3D|drawLink|drawLocation|drawPolygon|drawRectangle|drawTriangle|driver|drop|dynamicSimulationDistance|dynamicSimulationDistanceCoef|dynamicSimulationEnabled|dynamicSimulationSystemEnabled|east|edit3DENMissionAttributes|editObject|editorSetEventHandler|effectiveCommander|emptyPositions|enableAI|enableAIFeature|enableAimPrecision|enableAttack|enableAudioFeature|enableAutoStartUpRTD|enableAutoTrimRTD|enableCamShake|enableCaustics|enableChannel|enableCollisionWith|enableCopilot|enableDebriefingStats|enableDiagLegend|enableDynamicSimulation|enableDynamicSimulationSystem|enableEndDialog|enableEngineArtillery|enableEnvironment|enableFatigue|enableGunLights|enableInfoPanelComponent|enableIRLasers|enableMimics|enablePersonTurret|enableRadio|enableReload|enableRopeAttach|enableSatNormalOnDetail|enableSaving|enableSentences|enableSimulation|enableSimulationGlobal|enableStamina|enableStressDamage|enableTeamSwitch|enableTraffic|enableUAVConnectability|enableUAVWaypoints|enableVehicleCargo|enableVehicleSensor|enableWeaponDisassembly|endl|endLoadingScreen|endMission|engineOn|enginesIsOnRTD|enginesPowerRTD|enginesRpmRTD|enginesTorqueRTD|entities|environmentEnabled|estimatedEndServerTime|estimatedTimeLeft|evalObjectArgument|everyBackpack|everyContainer|exec|execEditorScript|exp|expectedDestination|exportJIPMessages|eyeDirection|eyePos|face|faction|fadeMusic|fadeRadio|fadeSound|fadeSpeech|failMission|fillWeaponsFromPool|find|findCover|findDisplay|findEditorObject|findEmptyPosition|findEmptyPositionReady|findIf|findNearestEnemy|finishMissionInit|finite|fire|fireAtTarget|firstBackpack|flag|flagAnimationPhase|flagOwner|flagSide|flagTexture|fleeing|floor|flyInHeight|flyInHeightASL|fog|fogForecast|fogParams|forceAddUniform|forceAtPositionRTD|forcedMap|forceEnd|forceFlagTexture|forceFollowRoad|forceGeneratorRTD|forceMap|forceRespawn|forceSpeed|forceWalk|forceWeaponFire|forceWeatherChange|forgetTarget|format|formation|formationDirection|formationLeader|formationMembers|formationPosition|formationTask|formatText|formLeader|freeLook|fromEditor|fuel|fullCrew|gearIDCAmmoCount|gearSlotAmmoCount|gearSlotData|get3DENActionState|get3DENAttribute|get3DENCamera|get3DENConnections|get3DENEntity|get3DENEntityID|get3DENGrid|get3DENIconsVisible|get3DENLayerEntities|get3DENLinesVisible|get3DENMissionAttribute|get3DENMouseOver|get3DENSelected|getAimingCoef|getAllEnvSoundControllers|getAllHitPointsDamage|getAllOwnedMines|getAllSoundControllers|getAmmoCargo|getAnimAimPrecision|getAnimSpeedCoef|getArray|getArtilleryAmmo|getArtilleryComputerSettings|getArtilleryETA|getAssignedCuratorLogic|getAssignedCuratorUnit|getBackpackCargo|getBleedingRemaining|getBurningValue|getCameraViewDirection|getCargoIndex|getCenterOfMass|getClientState|getClientStateNumber|getCompatiblePylonMagazines|getConnectedUAV|getContainerMaxLoad|getCursorObjectParams|getCustomAimCoef|getDammage|getDescription|getDir|getDirVisual|getDLCAssetsUsage|getDLCAssetsUsageByName|getDLCs|getDLCUsageTime|getEditorCamera|getEditorMode|getEditorObjectScope|getElevationOffset|getEngineTargetRpmRTD|getEnvSoundController|getFatigue|getFieldManualStartPage|getForcedFlagTexture|getFriend|getFSMVariable|getFuelCargo|getGroupIcon|getGroupIconParams|getGroupIcons|getHideFrom|getHit|getHitIndex|getHitPointDamage|getItemCargo|getMagazineCargo|getMarkerColor|getMarkerPos|getMarkerSize|getMarkerType|getMass|getMissionConfig|getMissionConfigValue|getMissionDLCs|getMissionLayerEntities|getMissionLayers|getModelInfo|getMousePosition|getMusicPlayedTime|getNumber|getObjectArgument|getObjectChildren|getObjectDLC|getObjectMaterials|getObjectProxy|getObjectTextures|getObjectType|getObjectViewDistance|getOxygenRemaining|getPersonUsedDLCs|getPilotCameraDirection|getPilotCameraPosition|getPilotCameraRotation|getPilotCameraTarget|getPlateNumber|getPlayerChannel|getPlayerScores|getPlayerUID|getPlayerUIDOld|getPos|getPosASL|getPosASLVisual|getPosASLW|getPosATL|getPosATLVisual|getPosVisual|getPosWorld|getPylonMagazines|getRelDir|getRelPos|getRemoteSensorsDisabled|getRepairCargo|getResolution|getRotorBrakeRTD|getShadowDistance|getShotParents|getSlingLoad|getSoundController|getSoundControllerResult|getSpeed|getStamina|getStatValue|getSuppression|getTerrainGrid|getTerrainHeightASL|getText|getTotalDLCUsageTime|getTrimOffsetRTD|getUnitLoadout|getUnitTrait|getUserMFDText|getUserMFDValue|getVariable|getVehicleCargo|getWeaponCargo|getWeaponSway|getWingsOrientationRTD|getWingsPositionRTD|getWPPos|glanceAt|globalChat|globalRadio|goggles|group|groupChat|groupFromNetId|groupIconSelectable|groupIconsVisible|groupId|groupOwner|groupRadio|groupSelectedUnits|groupSelectUnit|grpNull|gunner|gusts|halt|handgunItems|handgunMagazine|handgunWeapon|handsHit|hasInterface|hasPilotCamera|hasWeapon|hcAllGroups|hcGroupParams|hcLeader|hcRemoveAllGroups|hcRemoveGroup|hcSelected|hcSelectGroup|hcSetGroup|hcShowBar|hcShownBar|headgear|hideBody|hideObject|hideObjectGlobal|hideSelection|hint|hintC|hintCadet|hintSilent|hmd|hostMission|htmlLoad|HUDMovementLevels|humidity|image|importAllGroups|importance|in|inArea|inAreaArray|incapacitatedState|independent|inflame|inflamed|infoPanel|infoPanelComponentEnabled|infoPanelComponents|infoPanels|inGameUISetEventHandler|inheritsFrom|initAmbientLife|inPolygon|inputAction|inRangeOfArtillery|insertEditorObject|intersect|is3DEN|is3DENMultiplayer|isAbleToBreathe|isAgent|isAimPrecisionEnabled|isArray|isAutoHoverOn|isAutonomous|isAutoStartUpEnabledRTD|isAutotest|isAutoTrimOnRTD|isBleeding|isBurning|isClass|isCollisionLightOn|isCopilotEnabled|isDamageAllowed|isDedicated|isDLCAvailable|isEngineOn|isEqualTo|isEqualType|isEqualTypeAll|isEqualTypeAny|isEqualTypeArray|isEqualTypeParams|isFilePatchingEnabled|isFlashlightOn|isFlatEmpty|isForcedWalk|isFormationLeader|isGroupDeletedWhenEmpty|isHidden|isInRemainsCollector|isInstructorFigureEnabled|isIRLaserOn|isKeyActive|isKindOf|isLaserOn|isLightOn|isLocalized|isManualFire|isMarkedForCollection|isMultiplayer|isMultiplayerSolo|isNil|isNull|isNumber|isObjectHidden|isObjectRTD|isOnRoad|isPipEnabled|isPlayer|isRealTime|isRemoteExecuted|isRemoteExecutedJIP|isServer|isShowing3DIcons|isSimpleObject|isSprintAllowed|isStaminaEnabled|isSteamMission|isStreamFriendlyUIEnabled|isStressDamageEnabled|isText|isTouchingGround|isTurnedOut|isTutHintsEnabled|isUAVConnectable|isUAVConnected|isUIContext|isUniformAllowed|isVehicleCargo|isVehicleRadarOn|isVehicleSensorEnabled|isWalking|isWeaponDeployed|isWeaponRested|itemCargo|items|itemsWithMagazines|join|joinAs|joinAsSilent|joinSilent|joinString|kbAddDatabase|kbAddDatabaseTargets|kbAddTopic|kbHasTopic|kbReact|kbRemoveTopic|kbTell|kbWasSaid|keyImage|keyName|knowsAbout|land|landAt|landResult|language|laserTarget|lbAdd|lbClear|lbColor|lbColorRight|lbCurSel|lbData|lbDelete|lbIsSelected|lbPicture|lbPictureRight|lbSelection|lbSetColor|lbSetColorRight|lbSetCurSel|lbSetData|lbSetPicture|lbSetPictureColor|lbSetPictureColorDisabled|lbSetPictureColorSelected|lbSetPictureRight|lbSetPictureRightColor|lbSetPictureRightColorDisabled|lbSetPictureRightColorSelected|lbSetSelectColor|lbSetSelectColorRight|lbSetSelected|lbSetText|lbSetTextRight|lbSetTooltip|lbSetValue|lbSize|lbSort|lbSortByValue|lbText|lbTextRight|lbValue|leader|leaderboardDeInit|leaderboardGetRows|leaderboardInit|leaderboardRequestRowsFriends|leaderboardRequestRowsGlobal|leaderboardRequestRowsGlobalAroundUser|leaderboardsRequestUploadScore|leaderboardsRequestUploadScoreKeepBest|leaderboardState|leaveVehicle|libraryCredits|libraryDisclaimers|lifeState|lightAttachObject|lightDetachObject|lightIsOn|lightnings|limitSpeed|linearConversion|lineBreak|lineIntersects|lineIntersectsObjs|lineIntersectsSurfaces|lineIntersectsWith|linkItem|list|listObjects|listRemoteTargets|listVehicleSensors|ln|lnbAddArray|lnbAddColumn|lnbAddRow|lnbClear|lnbColor|lnbColorRight|lnbCurSelRow|lnbData|lnbDeleteColumn|lnbDeleteRow|lnbGetColumnsPosition|lnbPicture|lnbPictureRight|lnbSetColor|lnbSetColorRight|lnbSetColumnsPos|lnbSetCurSelRow|lnbSetData|lnbSetPicture|lnbSetPictureColor|lnbSetPictureColorRight|lnbSetPictureColorSelected|lnbSetPictureColorSelectedRight|lnbSetPictureRight|lnbSetText|lnbSetTextRight|lnbSetValue|lnbSize|lnbSort|lnbSortByValue|lnbText|lnbTextRight|lnbValue|load|loadAbs|loadBackpack|loadFile|loadGame|loadIdentity|loadMagazine|loadOverlay|loadStatus|loadUniform|loadVest|local|localize|locationNull|locationPosition|lock|lockCameraTo|lockCargo|lockDriver|locked|lockedCargo|lockedDriver|lockedTurret|lockIdentity|lockTurret|lockWP|log|logEntities|logNetwork|logNetworkTerminate|lookAt|lookAtPos|magazineCargo|magazines|magazinesAllTurrets|magazinesAmmo|magazinesAmmoCargo|magazinesAmmoFull|magazinesDetail|magazinesDetailBackpack|magazinesDetailUniform|magazinesDetailVest|magazinesTurret|magazineTurretAmmo|mapAnimAdd|mapAnimClear|mapAnimCommit|mapAnimDone|mapCenterOnCamera|mapGridPosition|markAsFinishedOnSteam|markerAlpha|markerBrush|markerColor|markerDir|markerPos|markerShape|markerSize|markerText|markerType|max|members|menuAction|menuAdd|menuChecked|menuClear|menuCollapse|menuData|menuDelete|menuEnable|menuEnabled|menuExpand|menuHover|menuPicture|menuSetAction|menuSetCheck|menuSetData|menuSetPicture|menuSetValue|menuShortcut|menuShortcutText|menuSize|menuSort|menuText|menuURL|menuValue|min|mineActive|mineDetectedBy|missionConfigFile|missionDifficulty|missionName|missionNamespace|missionStart|missionVersion|modelToWorld|modelToWorldVisual|modelToWorldVisualWorld|modelToWorldWorld|modParams|moonIntensity|moonPhase|morale|move|move3DENCamera|moveInAny|moveInCargo|moveInCommander|moveInDriver|moveInGunner|moveInTurret|moveObjectToEnd|moveOut|moveTime|moveTo|moveToCompleted|moveToFailed|musicVolume|name|nameSound|nearEntities|nearestBuilding|nearestLocation|nearestLocations|nearestLocationWithDubbing|nearestObject|nearestObjects|nearestTerrainObjects|nearObjects|nearObjectsReady|nearRoads|nearSupplies|nearTargets|needReload|netId|netObjNull|newOverlay|nextMenuItemIndex|nextWeatherChange|nMenuItems|numberOfEnginesRTD|numberToDate|objectCurators|objectFromNetId|objectParent|objNull|objStatus|onBriefingGear|onBriefingGroup|onBriefingNotes|onBriefingPlan|onBriefingTeamSwitch|onCommandModeChanged|onDoubleClick|onEachFrame|onGroupIconClick|onGroupIconOverEnter|onGroupIconOverLeave|onHCGroupSelectionChanged|onMapSingleClick|onPlayerConnected|onPlayerDisconnected|onPreloadFinished|onPreloadStarted|onShowNewObject|onTeamSwitch|openCuratorInterface|openDLCPage|openDSInterface|openMap|openSteamApp|openYoutubeVideo|opfor|orderGetIn|overcast|overcastForecast|owner|param|params|parseNumber|parseSimpleArray|parseText|parsingNamespace|particlesQuality|pi|pickWeaponPool|pitch|pixelGrid|pixelGridBase|pixelGridNoUIScale|pixelH|pixelW|playableSlotsNumber|playableUnits|playAction|playActionNow|player|playerRespawnTime|playerSide|playersNumber|playGesture|playMission|playMove|playMoveNow|playMusic|playScriptedMission|playSound|playSound3D|position|positionCameraToWorld|posScreenToWorld|posWorldToScreen|ppEffectAdjust|ppEffectCommit|ppEffectCommitted|ppEffectCreate|ppEffectDestroy|ppEffectEnable|ppEffectEnabled|ppEffectForceInNVG|precision|preloadCamera|preloadObject|preloadSound|preloadTitleObj|preloadTitleRsc|primaryWeapon|primaryWeaponItems|primaryWeaponMagazine|priority|processDiaryLink|processInitCommands|productVersion|profileName|profileNamespace|profileNameSteam|progressLoadingScreen|progressPosition|progressSetPosition|publicVariable|publicVariableClient|publicVariableServer|pushBack|pushBackUnique|putWeaponPool|queryItemsPool|queryMagazinePool|queryWeaponPool|rad|radioChannelAdd|radioChannelCreate|radioChannelRemove|radioChannelSetCallSign|radioChannelSetLabel|radioVolume|rain|rainbow|random|rank|rankId|rating|rectangular|registeredTasks|registerTask|reload|reloadEnabled|remoteControl|remoteExec|remoteExecCall|remoteExecutedOwner|remove3DENConnection|remove3DENEventHandler|remove3DENLayer|removeAction|removeAll3DENEventHandlers|removeAllActions|removeAllAssignedItems|removeAllContainers|removeAllCuratorAddons|removeAllCuratorCameraAreas|removeAllCuratorEditingAreas|removeAllEventHandlers|removeAllHandgunItems|removeAllItems|removeAllItemsWithMagazines|removeAllMissionEventHandlers|removeAllMPEventHandlers|removeAllMusicEventHandlers|removeAllOwnedMines|removeAllPrimaryWeaponItems|removeAllWeapons|removeBackpack|removeBackpackGlobal|removeCuratorAddons|removeCuratorCameraArea|removeCuratorEditableObjects|removeCuratorEditingArea|removeDrawIcon|removeDrawLinks|removeEventHandler|removeFromRemainsCollector|removeGoggles|removeGroupIcon|removeHandgunItem|removeHeadgear|removeItem|removeItemFromBackpack|removeItemFromUniform|removeItemFromVest|removeItems|removeMagazine|removeMagazineGlobal|removeMagazines|removeMagazinesTurret|removeMagazineTurret|removeMenuItem|removeMissionEventHandler|removeMPEventHandler|removeMusicEventHandler|removeOwnedMine|removePrimaryWeaponItem|removeSecondaryWeaponItem|removeSimpleTask|removeSwitchableUnit|removeTeamMember|removeUniform|removeVest|removeWeapon|removeWeaponAttachmentCargo|removeWeaponCargo|removeWeaponGlobal|removeWeaponTurret|reportRemoteTarget|requiredVersion|resetCamShake|resetSubgroupDirection|resistance|resize|resources|respawnVehicle|restartEditorCamera|reveal|revealMine|reverse|reversedMouseY|roadAt|roadsConnectedTo|roleDescription|ropeAttachedObjects|ropeAttachedTo|ropeAttachEnabled|ropeAttachTo|ropeCreate|ropeCut|ropeDestroy|ropeDetach|ropeEndPosition|ropeLength|ropes|ropeUnwind|ropeUnwound|rotorsForcesRTD|rotorsRpmRTD|round|runInitScript|safeZoneH|safeZoneW|safeZoneWAbs|safeZoneX|safeZoneXAbs|safeZoneY|save3DENInventory|saveGame|saveIdentity|saveJoysticks|saveOverlay|saveProfileNamespace|saveStatus|saveVar|savingEnabled|say|say2D|say3D|score|scoreSide|screenshot|screenToWorld|scriptDone|scriptName|scriptNull|scudState|secondaryWeapon|secondaryWeaponItems|secondaryWeaponMagazine|select|selectBestPlaces|selectDiarySubject|selectedEditorObjects|selectEditorObject|selectionNames|selectionPosition|selectLeader|selectMax|selectMin|selectNoPlayer|selectPlayer|selectRandom|selectRandomWeighted|selectWeapon|selectWeaponTurret|sendAUMessage|sendSimpleCommand|sendTask|sendTaskResult|sendUDPMessage|serverCommand|serverCommandAvailable|serverCommandExecutable|serverName|serverTime|set|set3DENAttribute|set3DENAttributes|set3DENGrid|set3DENIconsVisible|set3DENLayer|set3DENLinesVisible|set3DENLogicType|set3DENMissionAttribute|set3DENMissionAttributes|set3DENModelsVisible|set3DENObjectType|set3DENSelected|setAccTime|setActualCollectiveRTD|setAirplaneThrottle|setAirportSide|setAmmo|setAmmoCargo|setAmmoOnPylon|setAnimSpeedCoef|setAperture|setApertureNew|setArmoryPoints|setAttributes|setAutonomous|setBehaviour|setBleedingRemaining|setBrakesRTD|setCameraInterest|setCamShakeDefParams|setCamShakeParams|setCamUseTI|setCaptive|setCenterOfMass|setCollisionLight|setCombatMode|setCompassOscillation|setConvoySeparation|setCuratorCameraAreaCeiling|setCuratorCoef|setCuratorEditingAreaType|setCuratorWaypointCost|setCurrentChannel|setCurrentTask|setCurrentWaypoint|setCustomAimCoef|setCustomWeightRTD|setDamage|setDammage|setDate|setDebriefingText|setDefaultCamera|setDestination|setDetailMapBlendPars|setDir|setDirection|setDrawIcon|setDriveOnPath|setDropInterval|setDynamicSimulationDistance|setDynamicSimulationDistanceCoef|setEditorMode|setEditorObjectScope|setEffectCondition|setEngineRpmRTD|setFace|setFaceAnimation|setFatigue|setFeatureType|setFlagAnimationPhase|setFlagOwner|setFlagSide|setFlagTexture|setFog|setForceGeneratorRTD|setFormation|setFormationTask|setFormDir|setFriend|setFromEditor|setFSMVariable|setFuel|setFuelCargo|setGroupIcon|setGroupIconParams|setGroupIconsSelectable|setGroupIconsVisible|setGroupId|setGroupIdGlobal|setGroupOwner|setGusts|setHideBehind|setHit|setHitIndex|setHitPointDamage|setHorizonParallaxCoef|setHUDMovementLevels|setIdentity|setImportance|setInfoPanel|setLeader|setLightAmbient|setLightAttenuation|setLightBrightness|setLightColor|setLightDayLight|setLightFlareMaxDistance|setLightFlareSize|setLightIntensity|setLightnings|setLightUseFlare|setLocalWindParams|setMagazineTurretAmmo|setMarkerAlpha|setMarkerAlphaLocal|setMarkerBrush|setMarkerBrushLocal|setMarkerColor|setMarkerColorLocal|setMarkerDir|setMarkerDirLocal|setMarkerPos|setMarkerPosLocal|setMarkerShape|setMarkerShapeLocal|setMarkerSize|setMarkerSizeLocal|setMarkerText|setMarkerTextLocal|setMarkerType|setMarkerTypeLocal|setMass|setMimic|setMousePosition|setMusicEffect|setMusicEventHandler|setName|setNameSound|setObjectArguments|setObjectMaterial|setObjectMaterialGlobal|setObjectProxy|setObjectTexture|setObjectTextureGlobal|setObjectViewDistance|setOvercast|setOwner|setOxygenRemaining|setParticleCircle|setParticleClass|setParticleFire|setParticleParams|setParticleRandom|setPilotCameraDirection|setPilotCameraRotation|setPilotCameraTarget|setPilotLight|setPiPEffect|setPitch|setPlateNumber|setPlayable|setPlayerRespawnTime|setPos|setPosASL|setPosASL2|setPosASLW|setPosATL|setPosition|setPosWorld|setPylonLoadOut|setPylonsPriority|setRadioMsg|setRain|setRainbow|setRandomLip|setRank|setRectangular|setRepairCargo|setRotorBrakeRTD|setShadowDistance|setShotParents|setSide|setSimpleTaskAlwaysVisible|setSimpleTaskCustomData|setSimpleTaskDescription|setSimpleTaskDestination|setSimpleTaskTarget|setSimpleTaskType|setSimulWeatherLayers|setSize|setSkill|setSlingLoad|setSoundEffect|setSpeaker|setSpeech|setSpeedMode|setStamina|setStaminaScheme|setStatValue|setSuppression|setSystemOfUnits|setTargetAge|setTaskMarkerOffset|setTaskResult|setTaskState|setTerrainGrid|setText|setTimeMultiplier|setTitleEffect|setToneMapping|setToneMappingParams|setTrafficDensity|setTrafficDistance|setTrafficGap|setTrafficSpeed|setTriggerActivation|setTriggerArea|setTriggerStatements|setTriggerText|setTriggerTimeout|setTriggerType|setType|setUnconscious|setUnitAbility|setUnitLoadout|setUnitPos|setUnitPosWeak|setUnitRank|setUnitRecoilCoefficient|setUnitTrait|setUnloadInCombat|setUserActionText|setUserMFDText|setUserMFDValue|setVariable|setVectorDir|setVectorDirAndUp|setVectorUp|setVehicleAmmo|setVehicleAmmoDef|setVehicleArmor|setVehicleCargo|setVehicleId|setVehicleInit|setVehicleLock|setVehiclePosition|setVehicleRadar|setVehicleReceiveRemoteTargets|setVehicleReportOwnPosition|setVehicleReportRemoteTargets|setVehicleTIPars|setVehicleVarName|setVelocity|setVelocityModelSpace|setVelocityTransformation|setViewDistance|setVisibleIfTreeCollapsed|setWantedRpmRTD|setWaves|setWaypointBehaviour|setWaypointCombatMode|setWaypointCompletionRadius|setWaypointDescription|setWaypointForceBehaviour|setWaypointFormation|setWaypointHousePosition|setWaypointLoiterRadius|setWaypointLoiterType|setWaypointName|setWaypointPosition|setWaypointScript|setWaypointSpeed|setWaypointStatements|setWaypointTimeout|setWaypointType|setWaypointVisible|setWeaponReloadingTime|setWind|setWindDir|setWindForce|setWindStr|setWingForceScaleRTD|setWPPos|show3DIcons|showChat|showCinemaBorder|showCommandingMenu|showCompass|showCuratorCompass|showGPS|showHUD|showLegend|showMap|shownArtilleryComputer|shownChat|shownCompass|shownCuratorCompass|showNewEditorObject|shownGPS|shownHUD|shownMap|shownPad|shownRadio|shownScoretable|shownUAVFeed|shownWarrant|shownWatch|showPad|showRadio|showScoretable|showSubtitles|showUAVFeed|showWarrant|showWatch|showWaypoint|showWaypoints|side|sideAmbientLife|sideChat|sideEmpty|sideEnemy|sideFriendly|sideLogic|sideRadio|sideUnknown|simpleTasks|simulationEnabled|simulCloudDensity|simulCloudOcclusion|simulInClouds|simulWeatherSync|sin|size|sizeOf|skill|skillFinal|skipTime|sleep|sliderPosition|sliderRange|sliderSetPosition|sliderSetRange|sliderSetSpeed|sliderSpeed|slingLoadAssistantShown|soldierMagazines|someAmmo|sort|soundVolume|speaker|speed|speedMode|splitString|sqrt|squadParams|stance|startLoadingScreen|stop|stopEngineRTD|stopped|str|sunOrMoon|supportInfo|suppressFor|surfaceIsWater|surfaceNormal|surfaceType|swimInDepth|switchableUnits|switchAction|switchCamera|switchGesture|switchLight|switchMove|synchronizedObjects|synchronizedTriggers|synchronizedWaypoints|synchronizeObjectsAdd|synchronizeObjectsRemove|synchronizeTrigger|synchronizeWaypoint|systemChat|systemOfUnits|tan|targetKnowledge|targets|targetsAggregate|targetsQuery|taskAlwaysVisible|taskChildren|taskCompleted|taskCustomData|taskDescription|taskDestination|taskHint|taskMarkerOffset|taskNull|taskParent|taskResult|taskState|taskType|teamMember|teamMemberNull|teamName|teams|teamSwitch|teamSwitchEnabled|teamType|terminate|terrainIntersect|terrainIntersectASL|terrainIntersectAtASL|text|textLog|textLogFormat|tg|time|timeMultiplier|titleCut|titleFadeOut|titleObj|titleRsc|titleText|toArray|toFixed|toLower|toString|toUpper|triggerActivated|triggerActivation|triggerArea|triggerAttachedVehicle|triggerAttachObject|triggerAttachVehicle|triggerDynamicSimulation|triggerStatements|triggerText|triggerTimeout|triggerTimeoutCurrent|triggerType|turretLocal|turretOwner|turretUnit|tvAdd|tvClear|tvCollapse|tvCollapseAll|tvCount|tvCurSel|tvData|tvDelete|tvExpand|tvExpandAll|tvPicture|tvPictureRight|tvSetColor|tvSetCurSel|tvSetData|tvSetPicture|tvSetPictureColor|tvSetPictureColorDisabled|tvSetPictureColorSelected|tvSetPictureRight|tvSetPictureRightColor|tvSetPictureRightColorDisabled|tvSetPictureRightColorSelected|tvSetSelectColor|tvSetText|tvSetTooltip|tvSetValue|tvSort|tvSortByValue|tvText|tvTooltip|tvValue|type|typeName|typeOf|UAVControl|uiNamespace|uiSleep|unassignCurator|unassignItem|unassignTeam|unassignVehicle|underwater|uniform|uniformContainer|uniformItems|uniformMagazines|unitAddons|unitAimPosition|unitAimPositionVisual|unitBackpack|unitIsUAV|unitPos|unitReady|unitRecoilCoefficient|units|unitsBelowHeight|unlinkItem|unlockAchievement|unregisterTask|updateDrawIcon|updateMenuItem|updateObjectTree|useAIOperMapObstructionTest|useAISteeringComponent|useAudioTimeForMoves|userInputDisabled|vectorAdd|vectorCos|vectorCrossProduct|vectorDiff|vectorDir|vectorDirVisual|vectorDistance|vectorDistanceSqr|vectorDotProduct|vectorFromTo|vectorMagnitude|vectorMagnitudeSqr|vectorModelToWorld|vectorModelToWorldVisual|vectorMultiply|vectorNormalized|vectorUp|vectorUpVisual|vectorWorldToModel|vectorWorldToModelVisual|vehicle|vehicleCargoEnabled|vehicleChat|vehicleRadio|vehicleReceiveRemoteTargets|vehicleReportOwnPosition|vehicleReportRemoteTargets|vehicles|vehicleVarName|velocity|velocityModelSpace|verifySignature|vest|vestContainer|vestItems|vestMagazines|viewDistance|visibleCompass|visibleGPS|visibleMap|visiblePosition|visiblePositionASL|visibleScoretable|visibleWatch|waitUntil|waves|waypointAttachedObject|waypointAttachedVehicle|waypointAttachObject|waypointAttachVehicle|waypointBehaviour|waypointCombatMode|waypointCompletionRadius|waypointDescription|waypointForceBehaviour|waypointFormation|waypointHousePosition|waypointLoiterRadius|waypointLoiterType|waypointName|waypointPosition|waypoints|waypointScript|waypointsEnabledUAV|waypointShow|waypointSpeed|waypointStatements|waypointTimeout|waypointTimeoutCurrent|waypointType|waypointVisible|weaponAccessories|weaponAccessoriesCargo|weaponCargo|weaponDirection|weaponInertia|weaponLowered|weapons|weaponsItems|weaponsItemsCargo|weaponState|weaponsTurret|weightRTD|west|WFSideText|wind|windDir|windRTD|windStr|wingsForcesRTD|worldName|worldSize|worldToModel|worldToModelVisual|worldToScreen)\b/i,number:/(?:\$|\b0x)[\da-f]+\b|(?:\B\.\d+|\b\d+(?:\.\d+)?)(?:e[+-]?\d+)?\b/i,operator:/##|>>|&&|\|\||[!=<>]=?|[-+*/%#^]|\b(?:and|mod|not|or)\b/i,"magic-variable":{pattern:/\b(?:this|thisList|thisTrigger|_exception|_fnc_scriptName|_fnc_scriptNameParent|_forEachIndex|_this|_thisEventHandler|_thisFSM|_thisScript|_x)\b/i,alias:"keyword"},constant:/\bDIK(?:_[a-z\d]+)+\b/i}),t.languages.insertBefore("sqf","string",{macro:{pattern:/(^[ \t]*)#[a-z](?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{directive:{pattern:/#[a-z]+\b/i,alias:"keyword"},comment:t.languages.sqf.comment}}}),delete t.languages.sqf["class-name"]}t.exports=n,n.displayName="sqf",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.squirrel=t.languages.extend("clike",{comment:[t.languages.clike.comment[0],{pattern:/(^|[^\\:])(?:\/\/|#).*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^\\"'@])(?:@"(?:[^"]|"")*"(?!")|"(?:[^\\\r\n"]|\\.)*")/,lookbehind:!0,greedy:!0},"class-name":{pattern:/(\b(?:class|enum|extends|instanceof)\s+)\w+(?:\.\w+)*/,lookbehind:!0,inside:{punctuation:/\./}},keyword:/\b(?:__FILE__|__LINE__|base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield)\b/,number:/\b(?:0x[0-9a-fA-F]+|\d+(?:\.(?:\d+|[eE][+-]?\d+))?)\b/,operator:/\+\+|--|<=>|<[-<]|>>>?|&&?|\|\|?|[-+*/%!=<>]=?|[~^]|::?/,punctuation:/[(){}\[\],;.]/}),t.languages.insertBefore("squirrel","string",{char:{pattern:/(^|[^\\"'])'(?:[^\\']|\\(?:[xuU][0-9a-fA-F]{0,8}|[\s\S]))'/,lookbehind:!0,greedy:!0}}),t.languages.insertBefore("squirrel","operator",{"attribute-punctuation":{pattern:/<\/|\/>/,alias:"important"},lambda:{pattern:/@(?=\()/,alias:"operator"}})}t.exports=n,n.displayName="squirrel",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\b(?:algebra_solver|algebra_solver_newton|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect|ode_(?:adams|bdf|ckrk|rk45)(?:_tol)?|ode_adjoint_tol_ctl|reduce_sum|reduce_sum_static)\b/;t.languages.stan={comment:/\/\/.*|\/\*[\s\S]*?\*\/|#(?!include).*/,string:{pattern:/"[\x20\x21\x23-\x5B\x5D-\x7E]*"/,greedy:!0},directive:{pattern:/^([ \t]*)#include\b.*/m,lookbehind:!0,alias:"property"},"function-arg":{pattern:RegExp("("+e.source+/\s*\(\s*/.source+")"+/[a-zA-Z]\w*/.source),lookbehind:!0,alias:"function"},constraint:{pattern:/(\b(?:int|matrix|real|row_vector|vector)\s*)<[^<>]*>/,lookbehind:!0,inside:{expression:{pattern:/(=\s*)\S(?:\S|\s+(?!\s))*?(?=\s*(?:>$|,\s*\w+\s*=))/,lookbehind:!0,inside:null},property:/\b[a-z]\w*(?=\s*=)/i,operator:/=/,punctuation:/^<|>$|,/}},keyword:[{pattern:/\bdata(?=\s*\{)|\b(?:functions|generated|model|parameters|quantities|transformed)\b/,alias:"program-block"},/\b(?:array|break|cholesky_factor_corr|cholesky_factor_cov|complex|continue|corr_matrix|cov_matrix|data|else|for|if|in|increment_log_prob|int|matrix|ordered|positive_ordered|print|real|reject|return|row_vector|simplex|target|unit_vector|vector|void|while)\b/,e],function:/\b[a-z]\w*(?=\s*\()/i,number:/(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:E[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,boolean:/\b(?:false|true)\b/,operator:/<-|\.[*/]=?|\|\|?|&&|[!=<>+\-*/]=?|['^%~?:]/,punctuation:/[()\[\]{},;]/},t.languages.stan.constraint.inside.expression.inside=t.languages.stan}(t)}t.exports=n,n.displayName="stan",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},n={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:e,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:e,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:r,punctuation:/[{}()\[\];:,]/};n.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:n}},n.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:n}},t.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:n}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:n}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:n}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:n.interpolation}},rest:n}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:n.interpolation,comment:n.comment,punctuation:/[{},]/}},func:n.func,string:n.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:n.interpolation,punctuation:/[{}()\[\];:.]/}}(t)}t.exports=n,n.displayName="stylus",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},t.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=t.languages.swift}))}t.exports=n,n.displayName="swift",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e={pattern:/^[;#].*/m,greedy:!0},r=/"(?:[^\r\n"\\]|\\(?:[^\r]|\r\n?))*"(?!\S)/.source;t.languages.systemd={comment:e,section:{pattern:/^\[[^\n\r\[\]]*\](?=[ \t]*$)/m,greedy:!0,inside:{punctuation:/^\[|\]$/,"section-name":{pattern:/[\s\S]+/,alias:"selector"}}},key:{pattern:/^[^\s=]+(?=[ \t]*=)/m,greedy:!0,alias:"attr-name"},value:{pattern:RegExp(/(=[ \t]*(?!\s))/.source+"(?:"+r+'|(?=[^"\r\n]))(?:'+/[^\s\\]/.source+'|[ \t]+(?:(?![ \t"])|'+r+")|"+/\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;])/.source+")*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:e,quoted:{pattern:RegExp(/(^|\s)/.source+r),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},punctuation:/=/}}(t)}t.exports=n,n.displayName="systemd",n.aliases=[]},function(t,e,r){"use strict";var n=r(930),i=r(697);function o(t){t.register(n),t.register(i),t.languages.t4=t.languages["t4-cs"]=t.languages["t4-templating"].createT4("csharp")}t.exports=o,o.displayName="t4Cs",o.aliases=[]},function(t,e,r){"use strict";var n=r(930),i=r(1338);function o(t){t.register(n),t.register(i),t.languages["t4-vb"]=t.languages["t4-templating"].createT4("vbnet")}t.exports=o,o.displayName="t4Vb",o.aliases=[]},function(t,e,r){"use strict";var n=r(1339);function i(t){t.register(n),t.languages.tap={fail:/not ok[^#{\n\r]*/,pass:/ok[^#{\n\r]*/,pragma:/pragma [+-][a-z]+/,bailout:/bail out!.*/i,version:/TAP version \d+/i,plan:/\b\d+\.\.\d+(?: +#.*)?/,subtest:{pattern:/# Subtest(?:: .*)?/,greedy:!0},punctuation:/[{}]/,directive:/#.*/,yamlish:{pattern:/(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,lookbehind:!0,inside:t.languages.yaml,alias:"language-yaml"}}}t.exports=i,i.displayName="tap",i.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.tcl={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,greedy:!0},variable:[{pattern:/(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/,lookbehind:!0},{pattern:/(\$)\{[^}]+\}/,lookbehind:!0},{pattern:/(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m,lookbehind:!0}],function:{pattern:/(^[\t ]*proc[ \t]+)\S+/m,lookbehind:!0},builtin:[{pattern:/(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m,lookbehind:!0},/\b(?:else|elseif)\b/],scope:{pattern:/(^[\t ]*)(?:global|upvar|variable)\b/m,lookbehind:!0,alias:"constant"},keyword:{pattern:/(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,lookbehind:!0},operator:/!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/,punctuation:/[{}()\[\]]/}}t.exports=n,n.displayName="tcl",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source,r=/\)|\((?![^|()\n]+\))/.source;function n(t,n){return RegExp(t.replace(//g,(function(){return"(?:"+e+")"})).replace(//g,(function(){return"(?:"+r+")"})),n||"")}var i={css:{pattern:/\{[^{}]+\}/,inside:{rest:t.languages.css}},"class-id":{pattern:/(\()[^()]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\[\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},o=t.languages.textile=t.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:n(/^[a-z]\w*(?:||[<>=])*\./.source),inside:{modifier:{pattern:n(/(^[a-z]\w*)(?:||[<>=])+(?=\.)/.source),lookbehind:!0,inside:i},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:n(/^[*#]+*\s+\S.*/.source,"m"),inside:{modifier:{pattern:n(/(^[*#]+)+/.source),lookbehind:!0,inside:i},punctuation:/^[*#]+/}},table:{pattern:n(/^(?:(?:||[<>=^~])+\.\s*)?(?:\|(?:(?:||[<>=^~_]|[\\/]\d+)+\.|(?!(?:||[<>=^~_]|[\\/]\d+)+\.))[^|]*)+\|/.source,"m"),inside:{modifier:{pattern:n(/(^|\|(?:\r?\n|\r)?)(?:||[<>=^~_]|[\\/]\d+)+(?=\.)/.source),lookbehind:!0,inside:i},punctuation:/\||^\./}},inline:{pattern:n(/(^|[^a-zA-Z\d])(\*\*|__|\?\?|[*_%@+\-^~])*.+?\2(?![a-zA-Z\d])/.source),lookbehind:!0,inside:{bold:{pattern:n(/(^(\*\*?)*).+?(?=\2)/.source),lookbehind:!0},italic:{pattern:n(/(^(__?)*).+?(?=\2)/.source),lookbehind:!0},cite:{pattern:n(/(^\?\?*).+?(?=\?\?)/.source),lookbehind:!0,alias:"string"},code:{pattern:n(/(^@*).+?(?=@)/.source),lookbehind:!0,alias:"keyword"},inserted:{pattern:n(/(^\+*).+?(?=\+)/.source),lookbehind:!0},deleted:{pattern:n(/(^-*).+?(?=-)/.source),lookbehind:!0},span:{pattern:n(/(^%*).+?(?=%)/.source),lookbehind:!0},modifier:{pattern:n(/(^\*\*|__|\?\?|[*_%@+\-^~])+/.source),lookbehind:!0,inside:i},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(^\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:n(/"*[^"]+":.+?(?=[^\w/]?(?:\s|$))/.source),inside:{text:{pattern:n(/(^"*)[^"]+(?=")/.source),lookbehind:!0},modifier:{pattern:n(/(^")+/.source),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:n(/!(?:||[<>=])*(?![<>=])[^!\s()]+(?:\([^)]+\))?!(?::.+?(?=[^\w/]?(?:\s|$)))?/.source),inside:{source:{pattern:n(/(^!(?:||[<>=])*)(?![<>=])[^!\s()]+(?:\([^)]+\))?(?=!)/.source),lookbehind:!0,alias:"url"},modifier:{pattern:n(/(^!)(?:||[<>=])+/.source),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^()]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:C|R|TM)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),a=o.phrase.inside,s={inline:a.inline,link:a.link,image:a.image,footnote:a.footnote,acronym:a.acronym,mark:a.mark};o.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var u=a.inline.inside;u.bold.inside=s,u.italic.inside=s,u.inserted.inside=s,u.deleted.inside=s,u.span.inside=s;var c=a.table.inside;c.inline=s.inline,c.link=s.link,c.image=s.image,c.footnote=s.footnote,c.acronym=s.acronym,c.mark=s.mark}(t)}t.exports=n,n.displayName="textile",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function r(t){return t.replace(/__/g,(function(){return e}))}t.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(r(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(r(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}}(t)}t.exports=n,n.displayName="toml",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{regex:{pattern:/(^re)\|[\s\S]+/,lookbehind:!0},function:/^\w+/,value:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0b[01_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?>?=?|(?:absent|and|not|or|present|xor)\b/,punctuation:/::|[;\[\]()\{\},.:]/};var e=/#\{(?:[^"{}]|\{[^{}]*\}|"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*")*\}/.source;t.languages.tremor["interpolated-string"]={pattern:RegExp(/(^|[^\\])/.source+'(?:"""(?:'+/[^"\\#]|\\[\s\S]|"(?!"")|#(?!\{)/.source+"|"+e+')*"""|"(?:'+/[^"\\\r\n#]|\\(?:\r\n|[\s\S])|#(?!\{)/.source+"|"+e+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(e),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:t.languages.tremor}}},string:/[\s\S]+/}},t.languages.troy=t.languages.tremor,t.languages.trickle=t.languages.tremor}(t)}t.exports=n,n.displayName="tremor",n.aliases=[]},function(t,e,r){"use strict";var n=r(1336),i=r(927);function o(t){t.register(n),t.register(i),function(t){var e=t.util.clone(t.languages.typescript);t.languages.tsx=t.languages.extend("jsx",e),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"];var r=t.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0}(t)}t.exports=o,o.displayName="tsx",o.aliases=[]},function(t,e,r){"use strict";var n=r(223);function i(t){t.register(n),function(t){t.languages.tt2=t.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),t.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/,variable:{pattern:/\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i}}),t.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%\]$/,alias:"punctuation"}}),t.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete t.languages.tt2.string,t.hooks.add("before-tokenize",(function(e){t.languages["markup-templating"].buildPlaceholders(e,"tt2",/\[%[\s\S]+?%\]/g)})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"tt2")}))}(t)}t.exports=i,i.displayName="tt2",i.aliases=[]},function(t,e,r){"use strict";var n=r(223);function i(t){t.register(n),t.languages.twig={comment:/^\{#[\s\S]*?#\}$/,"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/}},keyword:/\b(?:even|if|odd)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/},t.hooks.add("before-tokenize",(function(e){if("twig"===e.language){t.languages["markup-templating"].buildPlaceholders(e,"twig",/\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g)}})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"twig")}))}t.exports=i,i.displayName="twig",i.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/;t.languages.typoscript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^"'])#.*/,lookbehind:!0,greedy:!0}],function:[{pattern://,inside:{string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,inside:{keyword:e}},keyword:{pattern:/INCLUDE_TYPOSCRIPT/}}},{pattern:/@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/,inside:{string:/"[^"\r\n]*"|'[^'\r\n]*'/}}],string:{pattern:/^([^=]*=[< ]?)(?:(?!\]\n).)*/,lookbehind:!0,inside:{function:/\{\$.*\}/,keyword:e,number:/^\d+$/,punctuation:/[,|:]/}},keyword:e,number:{pattern:/\b\d+\s*[.{=]/,inside:{operator:/[.{=]/}},tag:{pattern:/\.?[-\w\\]+\.?/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:|]/,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/},t.languages.tsconfig=t.languages.typoscript}(t)}t.exports=n,n.displayName="typoscript",n.aliases=["tsconfig"]},function(t,e,r){"use strict";function n(t){t.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},t.languages.uc=t.languages.uscript=t.languages.unrealscript}t.exports=n,n.displayName="unrealscript",n.aliases=["uc","uscript"]},function(t,e,r){"use strict";function n(t){t.languages.uorazor={"comment-hash":{pattern:/#.*/,alias:"comment",greedy:!0},"comment-slash":{pattern:/\/\/.*/,alias:"comment",greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/},greedy:!0},"source-layers":{pattern:/\b(?:arms|backpack|blue|bracelet|cancel|clear|cloak|criminal|earrings|enemy|facialhair|friend|friendly|gloves|gray|grey|ground|hair|head|innerlegs|innertorso|innocent|lefthand|middletorso|murderer|neck|nonfriendly|onehandedsecondary|outerlegs|outertorso|pants|red|righthand|ring|self|shirt|shoes|talisman|waist)\b/i,alias:"function"},"source-commands":{pattern:/\b(?:alliance|attack|cast|clearall|clearignore|clearjournal|clearlist|clearsysmsg|createlist|createtimer|dclick|dclicktype|dclickvar|dress|dressconfig|drop|droprelloc|emote|getlabel|guild|gumpclose|gumpresponse|hotkey|ignore|lasttarget|lift|lifttype|menu|menuresponse|msg|org|organize|organizer|overhead|pause|poplist|potion|promptresponse|pushlist|removelist|removetimer|rename|restock|say|scav|scavenger|script|setability|setlasttarget|setskill|settimer|setvar|sysmsg|target|targetloc|targetrelloc|targettype|undress|unignore|unsetvar|useobject|useonce|useskill|usetype|virtue|wait|waitforgump|waitformenu|waitforprompt|waitforstat|waitforsysmsg|waitfortarget|walk|wfsysmsg|wft|whisper|yell)\b/,alias:"function"},"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},function:/\b(?:atlist|close|closest|count|counter|counttype|dead|dex|diffhits|diffmana|diffstam|diffweight|find|findbuff|finddebuff|findlayer|findtype|findtypelist|followers|gumpexists|hidden|hits|hp|hue|human|humanoid|ingump|inlist|insysmessage|insysmsg|int|invul|lhandempty|list|listexists|mana|maxhits|maxhp|maxmana|maxstam|maxweight|monster|mounted|name|next|noto|paralyzed|poisoned|position|prev|previous|queued|rand|random|rhandempty|skill|stam|str|targetexists|timer|timerexists|varexist|warmode|weight)\b/,keyword:/\b(?:and|as|break|continue|else|elseif|endfor|endif|endwhile|for|if|loop|not|or|replay|stop|while)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/}}t.exports=n,n.displayName="uorazor",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.uri={scheme:{pattern:/^[a-z][a-z0-9+.-]*:/im,greedy:!0,inside:{"scheme-delimiter":/:$/}},fragment:{pattern:/#[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"fragment-delimiter":/^#/}},query:{pattern:/\?[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"query-delimiter":{pattern:/^\?/,greedy:!0},"pair-delimiter":/[&;]/,pair:{pattern:/^[^=][\s\S]*/,inside:{key:/^[^=]+/,value:{pattern:/(^=)[\s\S]+/,lookbehind:!0}}}}},authority:{pattern:RegExp(/^\/\//.source+/(?:[\w\-.~!$&'()*+,;=%:]*@)?/.source+"(?:"+/\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\.[\w\-.~!$&'()*+,;=]+)\]/.source+"|"+/[\w\-.~!$&'()*+,;=%]*/.source+")"+/(?::\d*)?/.source,"m"),inside:{"authority-delimiter":/^\/\//,"user-info-segment":{pattern:/^[\w\-.~!$&'()*+,;=%:]*@/,inside:{"user-info-delimiter":/@$/,"user-info":/^[\w\-.~!$&'()*+,;=%:]+/}},"port-segment":{pattern:/:\d*$/,inside:{"port-delimiter":/^:/,port:/^\d+/}},host:{pattern:/[\s\S]+/,inside:{"ip-literal":{pattern:/^\[[\s\S]+\]$/,inside:{"ip-literal-delimiter":/^\[|\]$/,"ipv-future":/^v[\s\S]+/,"ipv6-address":/^[\s\S]+/}},"ipv4-address":/^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]\d{0,2})$/}}}},path:{pattern:/^[\w\-.~!$&'()*+,;=%:@/]+/m,inside:{"path-separator":/\//}}},t.languages.url=t.languages.uri}t.exports=n,n.displayName="uri",n.aliases=["url"]},function(t,e,r){"use strict";function n(t){!function(t){var e={pattern:/[\s\S]+/,inside:null};t.languages.v=t.languages.extend("clike",{string:{pattern:/r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,alias:"quoted-string",greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/,lookbehind:!0,inside:{"interpolation-variable":{pattern:/^\$\w[\s\S]*$/,alias:"variable"},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},"interpolation-expression":e}}}},"class-name":{pattern:/(\b(?:enum|interface|struct|type)\s+)(?:C\.)?\w+/,lookbehind:!0},keyword:/(?:\b(?:__global|as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:else|for|if)|#(?:flag|include))\b/,number:/\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i,operator:/~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/,builtin:/\b(?:any(?:_float|_int)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|64|128|nt)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/}),e.inside=t.languages.v,t.languages.insertBefore("v","string",{char:{pattern:/`(?:\\`|\\?[^`]{1,2})`/,alias:"rune"}}),t.languages.insertBefore("v","operator",{attribute:{pattern:/(^[\t ]*)\[(?:deprecated|direct_array_access|flag|inline|live|ref_only|typedef|unsafe_fn|windows_stdcall)\]/m,lookbehind:!0,alias:"annotation",inside:{punctuation:/[\[\]]/,keyword:/\w+/}},generic:{pattern:/<\w+>(?=\s*[\)\{])/,inside:{punctuation:/[<>]/,"class-name":/\w+/}}}),t.languages.insertBefore("v","function",{"generic-function":{pattern:/\b\w+\s*<\w+>(?=\()/,inside:{function:/^\w+/,generic:{pattern:/<\w+>/,inside:t.languages.v.generic.inside}}}})}(t)}t.exports=n,n.displayName="v",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.vala=t.languages.extend("clike",{"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|enum|interface|new|struct)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],keyword:/\b(?:abstract|as|assert|async|base|bool|break|case|catch|char|class|const|construct|continue|default|delegate|delete|do|double|dynamic|else|ensures|enum|errordomain|extern|finally|float|for|foreach|get|if|in|inline|int|int16|int32|int64|int8|interface|internal|is|lock|long|namespace|new|null|out|override|owned|params|private|protected|public|ref|requires|return|set|short|signal|sizeof|size_t|ssize_t|static|string|struct|switch|this|throw|throws|try|typeof|uchar|uint|uint16|uint32|uint64|uint8|ulong|unichar|unowned|ushort|using|value|var|virtual|void|volatile|weak|while|yield)\b/i,function:/\b\w+(?=\s*\()/,number:/(?:\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,operator:/\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/,constant:/\b[A-Z0-9_]+\b/}),t.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:t.languages.vala}},string:/[\s\S]+/}}}),t.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\//,"regex-flags":/^[a-z]+$/}}})}t.exports=n,n.displayName="vala",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.velocity=t.languages.extend("markup",{});var e={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/};e.variable.inside={string:e.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:e.number,boolean:e.boolean,punctuation:e.punctuation},t.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:e}},variable:e.variable}),t.languages.velocity.tag.inside["attr-value"].inside.rest=t.languages.velocity}(t)}t.exports=n,n.displayName="velocity",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.verilog={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"kernel-function":{pattern:/\B\$\w+\b/,alias:"property"},constant:/\B`\w+\b/,function:/\b\w+(?=\()/,keyword:/\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|cell|chandle|class|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endsequence|endspecify|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/,important:/\b(?:always|always_comb|always_ff|always_latch)\b(?: *@)?/,number:/\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b(?:\d*[._])?\d+(?:e[-+]?\d+)?/i,operator:/[-+{}^~%*\/?=!<>&|]+/,punctuation:/[[\];(),.:]/}}t.exports=n,n.displayName="verilog",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:library|use)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}}t.exports=n,n.displayName="vhdl",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,function:/\b\w+(?=\()/,keyword:/\b(?:N|Next|P|Print|X|XMLent|XMLns|ab|abbreviate|abc|abclear|abo|aboveleft|al|all|ar|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|args|argu|argument|as|ascii|b|bN|bNext|ba|bad|badd|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bo|botright|bp|bprevious|br|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|brewind|bro|browse|bufdo|buffer|buffers|bun|bunload|bw|bwipeout|c|cN|cNext|cNfcNfile|ca|cabbrev|cabc|cabclear|cad|caddb|caddbuffer|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cg|cgetb|cgetbuffer|cgete|cgetexpr|cgetfile|change|changes|chd|chdir|che|checkpath|checkt|checktime|cl|cla|clast|clist|clo|close|cmapc|cmapclear|cn|cnew|cnewer|cnext|cnf|cnfile|cnorea|cnoreabbrev|co|col|colder|colo|colorscheme|comc|comclear|comp|compiler|con|conf|confirm|continue|cope|copen|copy|cp|cpf|cpfile|cprevious|cq|cquit|cr|crewind|cu|cuna|cunabbrev|cunmap|cw|cwindow|d|debugg|debuggreedy|delc|delcommand|delete|delf|delfunction|delm|delmarks|di|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|e|earlier|echoe|echoerr|echom|echomsg|echon|edit|el|else|elsei|elseif|em|emenu|en|endf|endfo|endfor|endfun|endfunction|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fin|fina|finally|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoc|folddoclosed|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|h|ha|hardcopy|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iu|iuna|iunabbrev|iunmap|j|join|ju|jumps|k|kee|keepalt|keepj|keepjumps|keepmarks|l|lN|lNext|lNf|lNfile|la|lad|laddb|laddbuffer|laddexpr|laddf|laddfile|lan|language|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|left|lefta|leftabove|let|lex|lexpr|lf|lfile|lfir|lfirst|lg|lgetb|lgetbuffer|lgete|lgetexpr|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|list|ll|lla|llast|lli|llist|lm|lmak|lmake|lmap|lmapc|lmapclear|ln|lne|lnew|lnewer|lnext|lnf|lnfile|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lpf|lpfile|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|ma|mak|make|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvie|mkview|mkvimrc|mod|mode|move|mz|mzf|mzfile|mzscheme|n|nbkey|new|next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|o|omapc|omapclear|on|only|open|opt|options|ou|ounmap|p|pc|pclose|pe|ped|pedit|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|print|prof|profd|profdel|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|ptN|ptNext|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|py|pyf|pyfile|python|q|qa|qall|quit|quita|quitall|r|read|rec|recover|red|redi|redir|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|rub|ruby|rubyd|rubydo|rubyf|rubyfile|runtime|rv|rviminfo|sN|sNext|sa|sal|sall|san|sandbox|sargument|sav|saveas|sb|sbN|sbNext|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbp|sbprevious|sbr|sbrewind|sbuffer|scrip|scripte|scriptencoding|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sl|sla|slast|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|so|sor|sort|source|sp|spe|spelld|spelldump|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|split|spr|sprevious|sre|srewind|st|sta|stag|star|startg|startgreplace|startinsert|startr|startreplace|stj|stjump|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tN|tNext|ta|tab|tabN|tabNext|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnew|tabnext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|una|unabbreviate|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|ve|verb|verbose|version|vert|vertical|vi|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|w|wN|wNext|wa|wall|wh|while|win|winc|wincmd|windo|winp|winpos|winsize|wn|wnext|wp|wprevious|wq|wqa|wqall|write|ws|wsverb|wv|wviminfo|x|xa|xall|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autocmd|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|t_AB|t_AF|t_AL|t_CS|t_CV|t_Ce|t_Co|t_Cs|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_IE|t_IS|t_K1|t_K3|t_K4|t_K5|t_K6|t_K7|t_K8|t_K9|t_KA|t_KB|t_KC|t_KD|t_KE|t_KF|t_KG|t_KH|t_KI|t_KJ|t_KK|t_KL|t_RI|t_RV|t_SI|t_Sb|t_Sf|t_WP|t_WS|t_ZH|t_ZR|t_al|t_bc|t_cd|t_ce|t_cl|t_cm|t_cs|t_da|t_db|t_dl|t_fs|t_k1|t_k2|t_k3|t_k4|t_k5|t_k6|t_k7|t_k8|t_k9|t_kB|t_kD|t_kI|t_kN|t_kP|t_kb|t_kd|t_ke|t_kh|t_kl|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_se|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_xs|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/}}t.exports=n,n.displayName="vim",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages["visual-basic"]={comment:{pattern:/(?:['\u2018\u2019]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["\u201c\u201d](?:["\u201c\u201d]{2}|[^"\u201c\u201d])*["\u201c\u201d]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},t.languages.vb=t.languages["visual-basic"],t.languages.vba=t.languages["visual-basic"]}t.exports=n,n.displayName="visualBasic",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:F|T|false|true)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/}}t.exports=n,n.displayName="warpscript",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}}t.exports=n,n.displayName="wasm",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){var e=/(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source,r="(?:"+/\b(?:unsigned\s+)?long\s+long(?![\w-])/.source+"|"+/\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source+"|"+/(?!(?:unrestricted|unsigned)\b)/.source+e+/(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source+")"+/(?:\s*\?)?/.source,n={};for(var i in t.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp(/(\bnamespace\s+)/.source+e),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:n},{pattern:RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source+r),lookbehind:!0,inside:n},{pattern:RegExp("("+/\bcallback\s+/.source+e+/\s*=\s*/.source+")"+r),lookbehind:!0,inside:n},{pattern:RegExp(/(\btypedef\b\s*)/.source+r),lookbehind:!0,inside:n},{pattern:RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source+e),lookbehind:!0},{pattern:RegExp(/(:\s*)/.source+e),lookbehind:!0},RegExp(e+/(?=\s+(?:implements|includes)\b)/.source),{pattern:RegExp(/(\b(?:implements|includes)\s+)/.source+e),lookbehind:!0},{pattern:RegExp(r+"(?="+/\s*(?:\.{3}\s*)?/.source+e+/\s*[(),;=]/.source+")"),inside:n}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/},t.languages["web-idl"])"class-name"!==i&&(n[i]=t.languages["web-idl"][i]);t.languages.webidl=t.languages["web-idl"]}(t)}t.exports=n,n.displayName="webIdl",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.wiki=t.languages.extend("markup",{"block-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},heading:{pattern:/^(=+)[^=\r\n].*?\1/m,inside:{punctuation:/^=+|=+$/,important:/.+/}},emphasis:{pattern:/('{2,5}).+?\1/,inside:{"bold-italic":{pattern:/(''''').+?(?=\1)/,lookbehind:!0,alias:["bold","italic"]},bold:{pattern:/(''')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},italic:{pattern:/('')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},punctuation:/^''+|''+$/}},hr:{pattern:/^-{4,}/m,alias:"punctuation"},url:[/ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:PMID|RFC) +\d+/i,/\[\[.+?\]\]|\[.+?\]/],variable:[/__[A-Z]+__/,/\{{3}.+?\}{3}/,/\{\{.+?\}\}/],symbol:[/^#redirect/im,/~{3,5}/],"table-tag":{pattern:/((?:^|[|!])[|!])[^|\r\n]+\|(?!\|)/m,lookbehind:!0,inside:{"table-bar":{pattern:/\|$/,alias:"punctuation"},rest:t.languages.markup.tag.inside}},punctuation:/^(?:\{\||\|\}|\|-|[*#:;!|])|\|\||!!/m}),t.languages.insertBefore("wiki","tag",{nowiki:{pattern:/<(nowiki|pre|source)\b[^>]*>[\s\S]*?<\/\1>/i,inside:{tag:{pattern:/<(?:nowiki|pre|source)\b[^>]*>|<\/(?:nowiki|pre|source)>/i,inside:t.languages.markup.tag.inside}}}})}t.exports=n,n.displayName="wiki",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.wolfram={comment:/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,context:{pattern:/\b\w+`+\w*/,alias:"class-name"},blank:{pattern:/\b\w+_\b/,alias:"regex"},"global-variable":{pattern:/\$\w+/,alias:"variable"},boolean:/\b(?:False|True)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},t.languages.mathematica=t.languages.wolfram,t.languages.wl=t.languages.wolfram,t.languages.nb=t.languages.wolfram}t.exports=n,n.displayName="wolfram",n.aliases=["mathematica","wl","nb"]},function(t,e,r){"use strict";function n(t){t.languages.wren={comment:[{pattern:/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"string-literal":null,hashbang:{pattern:/^#!\/.+/,greedy:!0,alias:"comment"},attribute:{pattern:/#!?[ \t\u3000]*\w+/,alias:"keyword"},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},/\b[A-Z][a-z\d_]*\b/],constant:/\b[A-Z][A-Z\d_]*\b/,null:{pattern:/\bnull\b/,alias:"keyword"},keyword:/\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,function:/\b[a-z_]\w*(?=\s*[({])/i,operator:/<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/,punctuation:/[\[\](){}.,;]/},t.languages.wren["string-literal"]={pattern:/(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/,lookbehind:!0,inside:{expression:{pattern:/^(%\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:t.languages.wren},"interpolation-punctuation":{pattern:/^%\(|\)$/,alias:"punctuation"}}},string:/[\s\S]+/}}}t.exports=n,n.displayName="wren",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.xeora=t.languages.extend("markup",{constant:{pattern:/\$(?:DomainContents|PageRenderDuration)\$/,inside:{punctuation:{pattern:/\$/}}},variable:{pattern:/\$@?(?:#+|[-+*~=^])?[\w.]+\$/,inside:{punctuation:{pattern:/[$.]/},operator:{pattern:/#+|[-+*~=^@]/}}},"function-inline":{pattern:/\$F:[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\$/,inside:{variable:{pattern:/(?:[,|])@?(?:#+|[-+*~=^])?[\w.]+/,inside:{punctuation:{pattern:/[,.|]/},operator:{pattern:/#+|[-+*~=^@]/}}},punctuation:{pattern:/\$\w:|[$:?.,|]/}},alias:"function"},"function-block":{pattern:/\$XF:\{[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\}:XF\$/,inside:{punctuation:{pattern:/[$:{}?.,|]/}},alias:"function"},"directive-inline":{pattern:/\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\/\w.]+\$/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}}},alias:"function"},"directive-block-open":{pattern:/\$\w+:\{|\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\w.]+:\{(?:![A-Z]+)?/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}},attribute:{pattern:/![A-Z]+$/,inside:{punctuation:{pattern:/!/}},alias:"keyword"}},alias:"function"},"directive-block-separator":{pattern:/\}:[-\w.]+:\{/,inside:{punctuation:{pattern:/[:{}]/}},alias:"function"},"directive-block-close":{pattern:/\}:[-\w.]+\$/,inside:{punctuation:{pattern:/[:{}$]/}},alias:"function"}}),t.languages.insertBefore("inside","punctuation",{variable:t.languages.xeora["function-inline"].inside.variable},t.languages.xeora["function-block"]),t.languages.xeoracube=t.languages.xeora}(t)}t.exports=n,n.displayName="xeora",n.aliases=["xeoracube"]},function(t,e,r){"use strict";function n(t){!function(t){function e(e,r){t.languages[e]&&t.languages.insertBefore(e,"comment",{"doc-comment":r})}var r=t.languages.markup.tag,n={pattern:/\/\/\/.*/,greedy:!0,alias:"comment",inside:{tag:r}},i={pattern:/'''.*/,greedy:!0,alias:"comment",inside:{tag:r}};e("csharp",n),e("fsharp",n),e("vbnet",i)}(t)}t.exports=n,n.displayName="xmlDoc",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,greedy:!0},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],directive:{pattern:/#(?:Else|ElseIf|Endif|If|Pragma)\b/i,alias:"property"},keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,punctuation:/[.,;:()]/}}t.exports=n,n.displayName="xojo",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){t.languages.xquery=t.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),t.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,t.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,t.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,t.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:t.languages.xquery,alias:"language-xquery"};var e=function(t){return"string"===typeof t?t:"string"===typeof t.content?t.content:t.content.map(e).join("")},r=function(n){for(var i=[],o=0;o0&&i[i.length-1].tagName===e(a.content[0].content[1])&&i.pop():"/>"===a.content[a.content.length-1].content||i.push({tagName:e(a.content[0].content[1]),openedBraces:0}):!(i.length>0&&"punctuation"===a.type&&"{"===a.content)||n[o+1]&&"punctuation"===n[o+1].type&&"{"===n[o+1].content||n[o-1]&&"plain-text"===n[o-1].type&&"{"===n[o-1].content?i.length>0&&i[i.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?i[i.length-1].openedBraces--:"comment"!==a.type&&(s=!0):i[i.length-1].openedBraces++),(s||"string"===typeof a)&&i.length>0&&0===i[i.length-1].openedBraces){var u=e(a);o0&&("string"===typeof n[o-1]||"plain-text"===n[o-1].type)&&(u=e(n[o-1])+u,n.splice(o-1,1),o--),/^\s+$/.test(u)?n[o]=u:n[o]=new t.Token("plain-text",u,null,u)}a.content&&"string"!==typeof a.content&&r(a.content)}};t.hooks.add("after-tokenize",(function(t){"xquery"===t.language&&r(t.tokens)}))}(t)}t.exports=n,n.displayName="xquery",n.aliases=[]},function(t,e,r){"use strict";function n(t){t.languages.yang={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"(?:[^\\"]|\\.)*"|'[^']*'/,greedy:!0},keyword:{pattern:/(^|[{};\r\n][ \t]*)[a-z_][\w.-]*/i,lookbehind:!0},namespace:{pattern:/(\s)[a-z_][\w.-]*(?=:)/i,lookbehind:!0},boolean:/\b(?:false|true)\b/,operator:/\+/,punctuation:/[{};:]/}}t.exports=n,n.displayName="yang",n.aliases=[]},function(t,e,r){"use strict";function n(t){!function(t){function e(t){return function(){return t}}var r=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,n="\\b(?!"+r.source+")(?!\\d)\\w+\\b",i=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,o="(?!\\s)(?:!?\\s*(?:"+/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(//g,e(i))+"\\s*)*"+/(?:\bpromise\b|(?:\berror\.)?(?:\.)*(?!\s+))/.source.replace(//g,e(n))+")+";t.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)(?=\s*(?:\s*)?[=;,)])|(?=\s*(?:\s*)?\{)/.source.replace(//g,e(o)).replace(//g,e(i))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)(?=\s*(?:\s*)?;)/.source.replace(//g,e(o)).replace(//g,e(i))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:r,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},t.languages.zig["class-name"].forEach((function(e){null===e.inside&&(e.inside=t.languages.zig)}))}(t)}t.exports=n,n.displayName="zig",n.aliases=[]},function(t,e){t.exports=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(1340);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(1340);t.exports=function(t,e){if(t){if("string"===typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},,,,function(t,e,r){"use strict";r.r(e),r.d(e,"BeaconWallet",(function(){return ne})),r.d(e,"BeaconWalletNotInitialized",(function(){return ee})),r.d(e,"MissingRequiredScopes",(function(){return re})),r.d(e,"VERSION",(function(){return te}));var n=r(46),i=r(1249),o=r(17),a=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const s=new n.j("P2PTransport");class u extends n.v{constructor(t,e,r,a,s,u,c){super(t,new i.a(t,e,1,r,a,u,c),new n.q(r,s)),this.type=o.k.P2P}static isAvailable(){return a(this,void 0,void 0,(function*(){return Promise.resolve(!0)}))}connect(){const t=Object.create(null,{connect:{get:()=>super.connect}});return a(this,void 0,void 0,(function*(){if(this._isConnected!==o.j.NOT_CONNECTED)return;s.log("connect"),this._isConnected=o.j.CONNECTING,yield this.client.start();const e=yield this.getPeers();if(e.length>0){s.log("connect","connecting to ".concat(e.length," peers"));const t=e.map((t=>a(this,void 0,void 0,(function*(){return this.listen(t.publicKey)}))));Promise.all(t).catch((t=>s.error("connect",t)))}return yield this.startOpenChannelListener(),t.connect.call(this)}))}disconnect(){const t=Object.create(null,{disconnect:{get:()=>super.disconnect}});return a(this,void 0,void 0,(function*(){return yield this.client.stop(),t.disconnect.call(this)}))}startOpenChannelListener(){return a(this,void 0,void 0,(function*(){}))}getPairingRequestInfo(){return a(this,void 0,void 0,(function*(){return this.client.getPairingRequestInfo()}))}listen(t){return a(this,void 0,void 0,(function*(){yield this.client.listenForEncryptedMessage(t,(e=>{const r={origin:o.f.P2P,id:t};this.notifyListeners(e,r).catch((t=>{throw t}))})).catch((t=>{throw t}))}))}}var c=r(1421),l=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const f=new n.j("PostMessageTransport");let h,d,p=!1;class g extends n.v{constructor(t,e,r,i){super(t,new c.a(t,e),new n.q(r,i)),this.type=o.k.POST_MESSAGE}static isAvailable(){return l(this,void 0,void 0,(function*(){return new Promise((t=>{const e=r=>{const i=r.data;i&&"pong"===i.payload&&(t(!0),n.z.removeEventListener("message",e))};n.z.addEventListener("message",e);const r={target:o.d.EXTENSION,payload:"ping"};n.z.postMessage(r,n.z.location.origin)}))}))}static getAvailableExtensions(){return l(this,void 0,void 0,(function*(){return h||(d||(d=[],h=new Promise((t=>{g.listenForExtensions(),setTimeout((()=>{t(null!==d&&void 0!==d?d:[])}),1e3)})).finally((()=>{h=void 0})),h))}))}static listenForExtensions(){if(p)return;n.z.addEventListener("message",(t=>{if(t.source!==n.z||t.origin!==n.z.location.origin)return;const e=t.data,r=e.sender;var i;e&&"pong"===e.payload&&r&&(f.log("getAvailableExtensions",'extension "'.concat(r.name,'" is available'),r),i=r,d||(d=[]),d.some((t=>t.id===i.id))||(d.push(i),n.z.postMessage("extensionsUpdated",n.z.location.origin)))}));const t={target:o.d.EXTENSION,payload:"ping"};n.z.postMessage(t,n.z.location.origin),p=!0}connect(){const t=Object.create(null,{connect:{get:()=>super.connect}});return l(this,void 0,void 0,(function*(){if(f.log("connect"),this._isConnected!==o.j.NOT_CONNECTED)return;this._isConnected=o.j.CONNECTING;const e=yield this.getPeers();if(e.length>0){f.log("connect","connecting to ".concat(e.length," peers"));const t=e.map((t=>l(this,void 0,void 0,(function*(){return this.listen(t.publicKey)}))));Promise.all(t).catch((t=>f.error("connect",t)))}yield this.startOpenChannelListener(),yield t.connect.call(this)}))}startOpenChannelListener(){return l(this,void 0,void 0,(function*(){}))}getPairingRequestInfo(){return l(this,void 0,void 0,(function*(){return this.client.getPairingRequestInfo()}))}listen(t){return l(this,void 0,void 0,(function*(){f.log("listen",t),yield this.client.listenForEncryptedMessage(t,((t,e)=>{const r={origin:o.f.EXTENSION,id:e.id};this.notifyListeners(t,r).catch((t=>{throw t}))})).catch((t=>{throw t}))}))}}var m=r(54);const y={css:":host {\n --animation-duration: 300ms;\n all: initial;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n.beacon-modal__wrapper {\n position: relative;\n top: 0;\n display: inline-block;\n z-index: 2147483000;\n max-width: 500px;\n width: 80%;\n padding: 24px;\n}\n\n@media (min-height: 700px) {\n .beacon-modal__wrapper {\n top: 50%;\n transform: translateY(-50%);\n }\n}\n\n.theme__light .beacon-modal__base,\n.theme__light .beacon-modal__close__wrapper {\n background: #fff;\n}\n\n.theme__dark .beacon-modal__base,\n.theme__dark .beacon-modal__close__wrapper {\n background: #27334c;\n}\n\n.beacon-modal__base,\n.beacon-modal__close__wrapper {\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1);\n}\n\n.beacon-modal__base {\n margin: 0 auto;\n border-radius: 32px;\n overflow: hidden;\n}\n\n.beacon-modal__header {\n padding: 16px 0;\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n\n.beacon-modal__headerLogo {\n width: 100%;\n max-width: 320px;\n margin: 20px auto;\n height: 100%;\n}\n\na,\nbutton {\n cursor: pointer;\n}\n\n.beacon-modal__close__wrapper {\n position: absolute;\n top: 44px;\n right: 24px;\n z-index: 10000;\n cursor: pointer;\n border-radius: 100%;\n}\n\n.beacon-modal__close__icon {\n width: 16px;\n height: 16px;\n position: relative;\n top: 0;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n margin: 8px;\n}\n\n.beacon-modal__close__line1 {\n position: absolute;\n width: 90%;\n}\n\n.beacon-modal__close__line2 {\n position: absolute;\n width: 90%;\n transform: rotate(90deg);\n}\n\n.theme__light .beacon-modal__close__line2,\n.theme__light .beacon-modal__close__line1 {\n border: 1px solid #000;\n}\n\n.theme__dark .beacon-modal__close__line2,\n.theme__dark .beacon-modal__close__line1 {\n border: 1px solid #fff;\n}\n\n.beacon-alert__base {\n position: fixed;\n overflow-y: scroll;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 2147482999;\n background-color: rgb(17 17 17 / 0.84);\n text-align: center;\n -ms-overflow-style: none;\n scrollbar-width: none;\n font-family: Roboto, Helvetica, sans-serif;\n}\n\n.beacon-alert__base::-webkit-scrollbar {\n display: none;\n}\n\n.beacon-alert__title {\n text-align: center;\n}\n\n.beacon-alert__text,\n.beacon-alert__title {\n margin: 0 auto;\n padding: 0 0 24px;\n}\n\n.margin__bottom {\n margin-bottom: 16px;\n}\n\n.beacon-alert__title {\n font-size: 18px;\n}\n\n.theme__light .beacon-alert__title {\n color: #3b3d40;\n}\n\n.theme__dark .beacon-alert__title,\n.theme__dark .beacon-alert__text {\n color: #7c99d6;\n}\n\n.beacon-alert__text {\n color: #000;\n font-size: 14px;\n}\n\n.beacon-modal__button,\n.beacon-modal__button--outline {\n height: 36px;\n font-size: 14px;\n letter-spacing: 0.84px;\n margin-bottom: 4px;\n margin-inline-end: 2px;\n margin-inline-start: 2px;\n margin-left: 2px;\n margin-right: 2px;\n margin-top: 4px;\n padding-inline-end: 15.4px;\n padding-inline-start: 15.4px;\n padding-left: 15.4px;\n padding-right: 15.4px;\n overflow-wrap: break-word;\n pointer-events: auto;\n text-align: center;\n border-radius: 4px;\n border: 2px solid #3880ff;\n}\n\n.beacon-modal__button {\n background: #3880ff;\n color: #fff;\n}\n\n.beacon-modal__button--outline {\n background: #fff;\n color: #444444;\n border: 1px solid #444444;\n}\n\n.beacon-alert__image {\n width: 200px;\n height: 200px;\n box-sizing: border-box;\n box-shadow: 0 10px 20px 0 rgba(17, 17, 17, 0.12);\n border: 1px solid rgba(17, 17, 17, 0.04);\n border-radius: 16px;\n}\n.connect__btn {\n margin: 24px 0;\n width: 100%;\n}\n\n#beacon-modal__content {\n padding: 24px;\n}\n\n#beacon-switch {\n margin-top: 24px;\n}\n\n#beacon-title {\n margin: 0 0 24px;\n}\n\na {\n text-decoration: none;\n}\n\npre {\n white-space: pre-wrap; /* css-3 */\n white-space: -moz-pre-wrap; /* Mozilla, since 1999 */\n white-space: -pre-wrap; /* Opera 4-6 */\n white-space: -o-pre-wrap; /* Opera 7 */\n word-wrap: break-word; /* Internet Explorer 5.5+ */\n padding: 16px;\n background: #ececec;\n line-height: 1.25rem;\n}\n"},b={css:"#beacon-main-text {\n display: initial;\n}\n.beacon-selection__container {\n padding: 16px 16px 0;\n}\n.beacon-selection__list {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n text-decoration: none;\n padding-bottom: 12px;\n align-items: center;\n}\n.beacon-list__title {\n text-align: left;\n font-size: 12px;\n}\n.beacon-list__wrapper:nth-child(-n + 3) {\n padding: 0 0 1rem;\n}\n.theme__light .beacon-list__title {\n color: #7c828b;\n}\n.theme__dark .beacon-list__title,\n.theme__dark #beacon--disclaimer {\n color: #7c99d6;\n}\n\n.beacon-selection__name {\n font-size: 1rem;\n font-weight: 600;\n text-align: left;\n}\n.theme__light .beacon-selection__name,\n.theme__light .beacon--selection__name__lg {\n color: #3b3d40;\n}\n.theme__dark .beacon-selection__name,\n.theme__dark .beacon--selection__name__lg {\n color: #6183ff;\n}\n.beacon-selection__img {\n width: 48px;\n height: 48px;\n box-shadow: 0 4px 12px 0 rgba(17, 17, 17, 0.24);\n border-radius: 16px;\n background-color: #fff;\n}\n.beacon--selection__name__lg {\n font-size: 1.5rem;\n font-weight: 600;\n text-align: center;\n padding: 1rem 0;\n}\n.beacon--selected__container {\n padding: 2rem 0 0;\n}\n#beacon--qr__copy__container {\n height: 0;\n}\n#beacon--qr__copy {\n display: none;\n position: relative;\n top: -190px;\n left: 138px;\n margin: 0;\n}\n#beacon--qr__container {\n margin-left: auto;\n margin-right: auto;\n}\n#beacon--qr__container:hover #beacon--qr__copy {\n display: block;\n}\n.disabled {\n cursor: initial;\n}\n.disabled span,\n.disabled img {\n opacity: 0.48;\n}\n.disabled p {\n text-align: left;\n margin: 0;\n font-size: 10px;\n font-weight: 300;\n}\n.disabled img {\n -webkit-filter: grayscale(100%);\n -moz-filter: grayscale(100%);\n -ms-filter: grayscale(100%);\n -o-filter: grayscale(100%);\n filter: grayscale(100%);\n filter: gray;\n}\n\n#beacon--disclaimer {\n text-align: left;\n padding-top: 24px;\n font-size: 0.875rem;\n}\n.progress-line,\n.progress-line:before {\n height: 3px;\n width: -webkit-fill-available;\n margin-left: -24px;\n margin-right: -24px;\n}\n.progress-line {\n background-color: #a7c4f7;\n display: -webkit-flex;\n display: flex;\n}\n.progress-line:before {\n background-color: #3880ff;\n content: '';\n -webkit-animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n}\n@-webkit-keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n@keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n"},v=(t,e)=>e.test(t.navigator.userAgent),A=t=>((t,e)=>t.matchMedia(e).matches)(t,"(any-pointer:coarse)"),w=t=>v(t,/iPhone|iPod/i)||(t=>!!v(t,/iPad/i)||!(!v(t,/Macintosh/i)||!A(t)))(t),_=t=>v(t,/android|sink/i);var E=r(742);const I=new n.j("QR"),S=(t,e)=>"".concat(t,"?type=tzip10&data=").concat(e);var M=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};let C=[{key:"galleon_desktop",name:"Galleon",shortName:"Galleon",color:"",logo:"data:image/;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAN6ElEQVR4Ad3BC3SW9X3A8e/v/7yX3IAQCLdwhyCKGlARRBRorbdZaWu1lx27Xlydp+txW1vtXLs2nh0723o6e13VdhU7dahzFdGCchOEAAICohAScg/kfnnzXvI+z/P/7U0lPVlGIIE31O3zEYaZqoI2OerlTLfqzzJGJnmJ7rxAOJiFVZP0bTJkJKJOoEGUanGkFMdvhxGICMNNSDNVhY62IBnBpSpcD+5SVRagZINyRiIKUilGSnDZJMZ5lYycWhFhOAhpoloBfv6Vat0vqdXbUB1DOohYEXbiOE+JJJ/GjO0QEdJFOEdquyQRdz8WDsj9av1FDCeRTjHBXx1vbPnhpIJd9SJ3cK6Es6SqqI0tU899BOtfzvkkEhcn9KgY7yFxciOcA+EsWK87Dxv7kfr2TkD4UxFTK478tQRG/U5EOBvCEKgqfjK2QrR7FaqT+YAQE3wiltR7c0aMijFEDoOkWoF6oW/gJ54EcvkgUXtZKCC3fLf4W+uKH3yonSFwGAS11vG73V9i7TcBwweR6gTr+5/+bvHfbC5+8JF6BsnhDDQRDagXexrkc3zACeSgwU8X33//tuLvPVzNIDichlrfqO3+jar/Gf7vCKsjnywu/vbrxQ8+VM8ZOAxAVfGT7Q+j/j0MM5vsRpwAaRS2vr+y+MFvvVD84PfaOQ3DAGyy689F9RsMIzfSRndLA1UvPkW6CYy3rn0x2R3P4jQMp6Be9wVY95cMM7ezDT/RRe3a1cSO15B26hcFSD6qqgzE0I/aSMB6sadAszlPrO9R/uSPGQ5qvbvUi6xkAIZ+1NevonYh51nr/t207HmT4aC+9zP14yM4BUMf6sfHqe99hz+R8qd+hnoeaadaoL77gOpq+jOcpKokE7EHUB3FeeDFuvBiXfQVb6in9vfPMxzUevdGI9dNoh/DSWqTEwKOfJnzpOLZx/DicfqrfvEp3K5O0k41MyvD+bqq0pehl9/1V6hmch50lr1L/WsvcSpeLErVC79hOKj1v4StG0UfhhS10YBauYvzQK1P6eM/BFUGUv/6SySajpN2qiPVjvgsfRhS1Pc+jGoB50Ht2tVEq49xOup5VD73a4aD+v6dqkovo6rg2ds4DxJNJ6h6/jcMRuO214nVVZN2yiKiHZM5ydDUKCp6M+fB0V//CD/ZzWCoKlX/+STpp0aN3sRJhrwRc1AKGGZNJZtofXsnQ9G0YyPxEzWknWNWqCo9jNrkYlCGkxfrouzJnzBUqkrNmv8g3VTtYminhwEpYphVPPsYyfZWzkbD1nW4kQ7SS6fjB3JJMVh7AcOo8+gh6l9fw9myrsuJTWtJK1VRnzmkGIWpDBP1fUof/yGoci6Ob3wZVEknC1NJMaDjGSY1Lz9DtKaCcxVvqKf93X2kk7H+eFIMMJJhEG+oo+qFVaTL8U1rSSdfdQQpBtUQw+DoE49g3STp0rxrK148Sro4jgmRYgBLmjW88Xva3tlLOlk3SVPJJtJGxJJiEBMjjdxIO+VP/Zzh0LjtddLFT7oxUgxoK2lUvupnuF2dDIf29/aT7GglHZxQqJUUA1LHIFlrUQbWdmA3Ddte438TQAABBBAQ+hAGRZWW3dtIB1XqSQkI5phil3AG1lruL/457ZEY//T3dzE+P4/+wmPGMf87P+Z/EFKEPxAQThIwoRA9ir79I1BlMMKjx3LuBEHKSQlgvEP4nFYy6fL14l+wbssuetz02fv4yuc/zp133EAoGKCXk5FFtPYYg9Xd2kCPcN54BkVh5OyLOGdCVIKRSlICSOgtSDKQxuZ27v2HR9l76Ci9ovEE3//FM6x6fh1f/PTNfPKjy8jOyiQ0egxNJZtpKtnCcJj9hXsxwSBDYa3ltS17eOfdMv72nk9hjCFlHzLBJyUgSd2pjrioBuln85v7eOCfH6elrZNTOdHUykM/+S3/8thzXL98ITcsX8hVf/lNUEvTzq2k0+zP30vB9R9nMKxV9h8qY/2W3bz82nYaW9rpUd/QwsP/eA/BYHibiNAjQDQRkVGh7ar+Mk5qaGrl+z99hpc37GAwYt3d/Ne6bfxu3TYcY5hXOJWrE1nMz4iRDi9E80luOMYFFauZUjCO/DG55ORk4WDw1CcSidLY0k5VbQOHj1ax/1AZXfEE/b28sYSW9ghfu/v29ZwkpNhE+9+p+o80NrXx62de4ZkXXyfhuvQwIiiKtSACRgQFVJXTcUS5e0wr8zPjnItn23PZGMmhPxFSBFRRhkJa4k2HJ9ZVH3NJCZCy6ulnV+8+WPf998pqnDmzp3PNVQvooVZRAd9TMsLg++C6EAg6gI+Ig7VKIGA4VlVHWUUNyvt8FX7Zksfn89qYGkpyNkrcsTiXXc0NpIhQXllLWUUNiKBKijJUin2+rvqYy0kBepi5tT4n1o8ckXPTpq07sYAqgyICapUZUydx3bLFiCrGMRyrqqO0vIpfteQhDJ1y0pad/IEqs2ZM5vrlV4EqIhBLJDlaXkV9YzOO46CqnEnCDf4bfQgnTbtk5U3BUPIV0kGVGVMLuGDWNKwq8USCnXvfIel6pI0qmeEQhbOmM3H8GHzf8j5FRFCrBEMhPN9HfZduV/HV7nzj1R2LKys300s4KTD/MpnmjNsryHzOgghY35I/ZjSTC8YzJncUoVCIZLKb7KxsFl5xCQcOHKa5rR0siAHHOPjWJxwOknQ9GpvbqKiqIxKNImI4WyKCquK7HggEwyFCJkA4y3xiz8YXX6QPoY+pl3/01hDe7xgEVSU/L5eLLyok6Bh6iDE0t7RRU3eC5tZOPM8lEAzSQ1XpTwQEwfU8Ao7D+Pw8ZkwrYGRODmotCBw6coza442ICOfG7Kn0Wei9vVbpI0AfsUT1S8HgxI3iyIc4BccYFi6Yx6gR2YDQ3NLG9p37SHo+p+IEAqgqA1EFRXEcBwVONLVyoqmVXgJ87o5b6IrGiMYSHK2opryiBkQYIk3GE1/z3t2g9CP0M6Xo2gvDgex9QJgeqswtnMGMKZPwrWXX3ndoj3QhAoKgpKiipN81VxbR1NbJ4aMVqCqFM6cyZ8YURAxbS/bSGY0xGKr+qvLwlL9gx6/oT+jv9tuZVRa7LxDg4aWLFpCdmUEymcQ4BmsVARQLOCjvM6KoVUSEHj5wtKySmvoGEGGoFLhpxVW8d7SSqtrj9DU2L5eii+bQnXQZNSKbg++VU11/nIEI1HZ1ZRcdP/J8K6cgnMLd93zFXLH42nVHSyuv64onKK+qpbyiBjEGVeVMHCMUzpzOtMnjQZWE67HzrYMkkknOJOA4rLxxGZve3ENrewd9BRyHlTcu5/mXNyACqHLpRYVcueASXt24jboTTfTj+9Z+pGLfuk0MQBjAvKU35yei/i4xZjrnKBwKseSKS8nMCHO4rJJj1XWcSu7IHK67djFr1m2h23XpS4DbbrmONes20+169LrmyiKq6hoZm5dLwYSxbN25j/bOLnq4ycR9Eqn4QWVlJQMRTmPCrI9cnJMbeAMYTTqoMrdwJrOnFVBaUU3psWp6zZ09nakFE1i/pYT+FFh54wq2vLmTjkiMXpdfOpdorJvDZRX0EOCaxZeRGQ6xedvbj3eM9b5c+8oaTsfhNLrajjVOnFH4hu9zBxAmRQRUwXoWtRaL4DgGYRBEaG5tp7SimrGjc7l64Xyam9tZumgB8XiCHXsO0J8RuO3mFWx+8y06IlF6zb+oEAEOHi6nr6ra4zQ2Na1+4tEHvvjIfd9QzkAYhE996atXjcoZvTZgzGirihEwThAERC1J1wUMxoAxhtb2CAcOHSHpeigDK5iQzyf+7MOsWr2GjkiU/jJCIT56wzJe3bCNrlicXpfOLSQUNLx18Aj9+RL87fjM6BdKtm7wGARhkBbfcvvFTfWda0TMdE5DVckbNZKii+cQCgYQMZRVVFNWWYuI0CM7K4PlS66gsamV3fsPAUJ/UyaO4/KiC1mzfiu+tfS6/JILAGXPwVL6s+r+oK3KfrOtZaNlkIQhmHHhsnwysp52DNcxWKoUzpzKzOlTCAUcfN+SSCTZsmMPvlr6U4VrFy3A8z127DlIX1cvLKKto4t3S8vpJxpL2rtDGa3/Xrl7N0MhDFHBkmtNOJH5dSPmQSDMIMyYMomL5syksyvKm7vexqpyKuPGjmbpwgVs27WPxpY2eglw04eXcuhIOVW1x+lL0d3GDd159MBLRzgLwtm4/XYmVMcvzEqYn5qA+yFOIRQMsGRhEVkZGVTU1PFeaQWIcCrhYJAVS6+kIxJh++4DiPBHeaNGsGLpItZv3k4kGuOPNNDRnbTFMXPiJy0H9nicJeEc5M6YQzB/zq0jfa9YkPkoFM0rZNL4fJKux/bd+4l3dzOQjFCIa6+6DBQ273iLpOvxR6osvryIzIwQm7a/RR/xOP5j3SbwUPPuVxo5R0IaBJYslWmJSTd+8uZFX92xd//19Q1NDgNRZea0ycydPZ3uZJI3Svbheh59TRw3lsWXXULJ3gMcb2zhfVLneYEnWqIj/jWyIHmC554jHYR0Gnkr4yc0TM4MmDska9StjsoSgaAIzJs7m4IJ+QhCeVUtpeVVIEJf2VkZLF+ykKamVnbtP0RKXbdNvOIkEi90BXI2NB98zSPNhGGSPXEiubnTRnzuMx9bNH3yxCtWPbN2XkNL50zEFACjQTMBA7jhcCiy8sblDR0dsepX168/4pnAft/rLIn62aXthzcr/1/kXng15OQzadZCcifPkbyCQpORP5fr77qLd8rKgHmcb/8N3VaULP16cD8AAAAASUVORK5CYII=",deepLink:"galleon://"},{key:"umami_desktop",name:"Umami",shortName:"Umami",color:"",logo:"data:image/;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAANSklEQVR4Ae3BC1RVZaLA8f+39z4HgQXiJBmgLWpEHRXFQhHMiJGsMTR5zJjL8Iosb2KOaRpZ4gulScXedWOIAequtGmC1mAjjSmWYyRpoGiTiEp6xgxWJ5QAOY/9XbhLW3DcoFQ+6/fjF7/4eRN0k5TSExgLhAD9AA+urCbgOFAB7BBCNNINgoskpQwBFgFxgDtXp2agAMgUQlRwEQQXIKXsCawHkgClsrKSwsJCSktLqampobGxESklV4IQAk9PTwIDAwkPDyc2Npbg4GBa6UAusFAIcYouCLogpRwIFAFBu3fvJjU1lZKSEtooioKfnx9eXl4IIbgSpJQ0NDTw1Vdfoes6baKioli7di2hoaG0OgRMFEIcpBOCTkgpBwIfSin7rFq1ivT0dHRdJyYmhuTkZKKiovD29uZqcPr0aUpKSsjJyWHTpk0oisKyZctYunQpQoivgTuFEFUYEBiQUvYEPpVSBs2aNYucnByCgoLIy8sjIiKCq9nHH3/MjBkzOHToEMnJyWRnZyOEOASMFEKcwoWCsfVA0KpVq8jJyWHMmDGUlZURERHB1S4iIoKysjLGjBlDTk4Oq1atolUQsB4DCi6klCFA0u7du0lPTycoKIhNmzbh4+PDtcLHx4dNmzYRFBREeno6u3fvplWSlDIEFxrnWwQoqamp6LpOXl4ePj4+uNKrPkP/9J/Ib2tR+g9Hvfe/kKe/wfF6BkhJByYz6p1xKIPDwHYGe/YS0HXOIxSUXwejjn8QVA2kxP7nJ8F2BkNCIHrdiDJyPMqA22jPx8eHvLw87rjjDlJTU9m2bZsCLAIepB2NdqSUnkBcZWUlJSUlTJw4kYiICDqwncH+0qM4PyrkHOfWtxCBQ1AG3Y785iv08u24cn6wEXP6X1EGhyF6B+DYsA4jzg/A+VEBpvkvIfrcjHbfTOx56ei7P6BTbz+POnYypj8+C+YenBMREUFMTAxFRUVUVlYSHBwcJ6X0FEI0cpZCR2MB98LCQtokJyfjyrE5D+dHhXQgdeyvPAYOO6Y5mQjPnpzHYcP+9Ezkfw6jTXkUbfJsOqP/+1Na5v8Wx9+zEH63YE57A/O6f6COmQSaCSPOHe9if3EBrpKTk2lTWFhIK3dgLO0odBRCq9LSUhRFISoqClfqyPFgMuNKHvsCx4ZMhG8A2py1GJGnrdhWPICsPY42Yzna7+fTqeZGHH9ZQcu8u3DueBfl18MwPZaFW045ptlrUEKjwcOL9pw73kWv+oz2oqKiUBSF0tJSzgqhHY2O+tGqpqYGPz8/vL296cBhR/jfinZ/Co6/PY8rR+HLKCGRqGMmIf/9KY5Nr+FK1lmwpcVjXvkW2rTHEb39sWcvAYcdI/I/h7GvT8Hxv39CvScRNTIe9d7pqPdOB92JtFSjWw4h6yxw2oowmWnP29sbPz8/jh49yln9aEejIw9aNTY24uXlhStHfjrq5Dlof5iP8+Mi5IkjdKDr2J+ZgzmzGC1pObrlEHrFh7iStcexPXE/piX5qPckIvoNwL4+BfnNV3RGfn0Mx+sZON74E8qAESghd6EMDkPcOgT15oF0xcvLi8bGRs7yoB0FA1JKhBC4kk3fYc9aDOYemOY9B4qKK/ltLfanZ4LDjjk1G+XWoRiR9XXYlsThLHkbZXAY5ue2ot5xPxckdfSDe3C8tR7b8j/QkjiElsQh2B4dj23lVPQDn+BKCIGUEiMK3aSX/RNnydsog0ai/f4RjOiHKrA/MwfcPDAt34DoNwBDtjPYn5+H/cUFCM2EadGrmNNeR/jdQnfIBiv6kUr08u04S/5Kdyj8APbsJciTNWhTHkUJHoMR565i7C8vRHj/CvOqvyECB9MZ59aNtDzyW/TPtqGE3o3bi9sx/fdTiBv86DYp6Q6FH6KpAXvmbHA6MC16FeHbFyPObW9hf2khwvtXuGUUoAwJpzOy9ji29GnYn5qBPPkl6oQk3LI+wTT/RZRBoVwqCj+QXr0X+6tPIHr2xrwkHzy8MOLcuhF7ZgqYe2BesRE1eipdcZa9T8u8KOzPzkVaqlHvSsD8dBFur+xEe/AJlEEjQdXonKA7NDqh6zrnUVTac27dgOgXhDY5BfPjr2FbnQh2G66cHxch67/G9HgOprnPoAy8HXt2GtjOYEh34vzwHZwfvoMyZDRq9FTUsN+hJcyDhHnQ3IheXYF+ZD/ScghZZ0HW10HjacTNA3Gl6zqd0ehEfX09rsSNfXHleH01orc/6h33Y1r4P9jXPQROB670z8uwLfodptQ/o949DeU3o7A/90f06r10RT/wCfqBT7CbUlGGjUEdEYUyZDTK4NEowWO4GPX19ZhMJoxodKK2tpa6ujp8fX05R42IwbEhE3Qn39N17M/NQ3h4oY6eAItexb4+BRx2XMk6C7YnJqM9+DjapNmY17yHY1M2jo3rofk7umRvQd+zDX3PNv6fmztKv4EI/1sRvv7Q0xfR60bUsZNpr66ujtraWgICAjCi0AkpJcXFxbQnAvqjTU7hPA4btqdnopeXoIbfh/nJfOjhgSGHDUfeKmxpsciTR9Hun43by/9CvXsaqBoXraUZvboC50cFON55CcdfliOPHsBVcXExUko6o9CFrKwsXGmJT6JNfQxMbnRga8H21Aycpf9AuS0K8+oChG8AndE/L6Nl/jgcbzyFcPfE9HAmbi99hBo9FUxmusXkhjb1MbTEJ3GVlZVFVzS6sHPnTgoKCoiLi+N7QqBNeRT13uno5R8iv/0akHzvzHe0UfoPx+3lf+Hc/QGy9hhISWf0w/tQhkYg/G7BNPcZtAefQN+1GdnUQNcEoteNKCPuQvTsjauCggJ27txJVzQuYPbs2dx2220EBgbSnujZG/WueLpk7oEaEUN3CR9f1Hum82PU1NQwe/ZsLkThAurq6oiOjqa6upprRXV1NdHR0dTV1XFOjx49MKJwEQ4fPszIkSPJzc1F13WuVrquk5uby6hRozh8+DDtBQQEYETjItXX1zNz5kzWrFlDUlIS48aNY8CAAXh5eSGE4EqQUtLQ0EBVVRVbt24lNzeXgwcPYuT222/HiEY3HTx4kMWLF3O5nDhxAqvVytChQ/kxYmJiMKLwMzBo0CAiIyMxovAzsHr1ahRFwYjCdW7KlCnEx8fz+eefY0ThOjZ69GhycnI4deoUKSkpGNG4Tt13331s2LABk8lEfHw8R44cwYjGdcbX15f09HQeeughmpqaiI+P5/3336d///4Y0bgO3HDDDYwePZrY2FgeeOABPD09qaioIDExkf3799Omb9++GNG4AqKjo0lJSSEkJAR3d3e60qdPH3x9fTlx4gRGPD098fb25pyqqioyMzPJzc3F4XBwTmhoKEY0LiMhBC+88AJz586lzZdffonVaqUrVquVzkgpsVgsWCwWysvL2bJlC7t27UJKiauJEydiROMyWrBgAXPnzmXPnj0kJSVRWVnJ5TB06FDGjh2LEY3LxN3dnbS0NE6ePMn48eOxWq1cLhkZGQghMKJwmYSFhdGrVy9yc3OxWq34+/uzb98+9u3bh7+/P5dKYmIikyZNYu/evRhRuEz69OlDm5qaGtpER0cTHBxMcHAw0dHRXAqRkZFkZWVhtVqZM2cORjQuE4vFQptBgwbRpqioiM2bN9OmqKiIn1pCQgL5+fkIIUhISODYsWMY0TAghOCnVlZWxsmTJ0lKSuLZZ5/l+PHjTJgwgZ9aQEAAGRkZTJ8+nYaGBhISEigpKaFfv34Y0eioiVaenp781Ox2O4sXLyYvL4/t27fz8MMPs2XLFpxOJz+GEIK+ffsSFhZGXFwccXFxuLm5sWvXLqZPn05VVRVtPDw8OKuJdjQ6Ok6rwMBAvvjiC35q+fn53HTTTWRkZLB582ZaWlpobm7mx/Dw8MBsNnPOvn37WLduHW+++Sa6rnNOYGAgZ1loR6OjClqFh4dTXFzMpbBmzRree+89Zs2axYgRI3B3d6crw4cPx+FwcODAAVxJKWlubsZisVBeXs6WLVvYu3cvRsLDwzmrgnY0OtoBNMfGxrovX76cS2X//v088sgjXIwTJ05gtVoZOXIkP0ZsbCytmoEdtKPQjhCiESgIDg4mKiqK60VkZCTDhg2j1btCiO9oR+F8mYC+du1aVFXlWqeqKmvXrqWVBDJxoeBCCFEB5IaGhrJs2TKudWlpaYwaNYpW+UKIz3ChYGwhcGjp0qUkJydzrUpKSmLZsmW0OgwswICCASHEKWCiEOLr7OxsVq5ciaqqXCtUVWX58uW89tprKIpSC8QIIeoxoNKJlStXfrNixYoiIcQ9kZGRN0yYMIHq6mpqamq4nBYuXEhzczOvvPIKFyMyMpKNGzcybdo0hBCHgfFCiC/ohOACpJQ9gfVAEqBUVlZSWFhIaWkpR48epampCSkll8qePXuor69n3LhxuBJC4OHhQWBgIOHh4cTGxjJs2DBaSSAfWCCEqKcLgoskpRwBLAJiAXeuTs3Au0CmEOIzLoKgm6SUnsCdwHCgH+DBldUEWIAKYIcQ4jt+8YtfXKz/A/OhBgM5KLZoAAAAAElFTkSuQmCC",deepLink:"umami://"}],k=[{key:"spire_chrome",id:"gpfndedineagiepkpinficbcbbgjoenn",name:"Spire",shortName:"Spire",color:"",logo:"data:image/;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAIIElEQVR4Ae3Ba5BeZWEA4Oc9u9kkJGHZkIQkLhQziQmVBpJwOTDg7saKEIQwnYq2/WWnUjuxHTOOgbYq77ZqSVGrtZliae2P/gE74zQIodoZEmwrR6pQlTYJ0DWNuWAChBBIyN7exsGZL2e/3Xy3Xf3RPI+zzvr/LfgFyGMKCMPHX/JT7eec75RUxJD8nAVTKI/JKe1YjquxEsuwCHOPH/phm9ER5yy8fAQv4yCeww/wHezGcBGDqRJMgTymaejD+3AjFhvHC09+SRodtijfaAIH8CgexI4ihiGTLJhEeUzn4Q58CG9Vw7MP/po0OmL5b2xVhx/hPny5iOGoSRJMgjymmfgwNmGeOowOnfD0F5eQRq36yIBs2ix1OoR7saWI4YQWBS3IYwrowxasMLGEo3gK/4UfDXz9d+ce+t79HydZsPp3PrPk1vtfxBK8HatxLoKJ7cQGbC9i0KygSXlM0/EpbESbagl78QAewneLGAZVbMTnvWkT7vUzeUwduBK34b24CEG1YXwOdxcxnNSEoAl5TAvwAPpUS3gS9+CRIoYh43sYN3vTNtxsHHlMHViHu3AVgmqP4f1FDIc1KGhQHtMSPIIVqu3GXXioiGHUxGZhAAu86UUswTETyGPKsB6bsUy1nXhPEcOABgQNyGNagn/BEmXD+BI+WcTwmtquxJPKrsUTashjmo0/we+jXdkA3lXEMKBOQZ3ymBbgcaxQdgQfKGLYqn6bsFnZH+HP1CmP6TZ8BV3KdqKniOGwOrSpQx7TdGzFFcr24sYihsc15hNYqmwU/6BO+3b07+rujd/EOnSqmI813b3xwX07+kfUkKkhjyngU+hVthfvLmL4vsbMwRrVrkCnBhQxPI0b8GNla9Gfx6SWTG192KjsCG4tYtilcZdinmpdWKlBRQy7sB5HlH0UfWrInEEe00xsQZuKYXygiOH7mvOrJtarCUUMT+O3MayiHVvymGY6g8yZfRgrlP1lEcNWzesxsT5NKmL4J2xRdgk2OIPMBPKYunCnst24W/POxWoTW43zNO8TeF7Zx/KYOk0gM7EP4nwVCXcVMbymeavQZWKdWKVJRQzHsAlJxQLcYQKZceQxTcPvKfs2HtKatWrr1ZqteFLZh/KY2o0jM761uFhFwr1FDKNa06O2Pi0oYhjFPUgqlqDXODJj5DE55XZl/4ttWtOFy9V2OeZqzTbsVXa7cWSqteNGZQ8UMQxpzRXoVNscrNGCIoZB/KOydXlMbcbIVFuOxSoSvq51PerXo3VbkVS8BcuNkal2jbKj+K7WBPSq31oErfkPvKrsamNkql2q7HtFDINaMxeXqd9KnK8FRQwn8bSylcbIVFum7L+17irMVr9ZuFLrnlG21BiZ0+QxBSxWNqB1PRrXq3V7lC3OYwpOkykL6FJ2WGsCejVuLYLWHFI2F8FpMtVmKntda+Zjpca9HfO1ZlBZZozM1LsaMzVuJq42xTLVTiibpTU9mterNR3KRo2RKUs4omy+5mVYq3l9yDRvgbKXkZwmc5oihoQDypZo3gW4RPMuwQWad7GyA0UMyWky1Z5T9sual2OG5s1ArnmXKnveGJlqzyhbk8fUoTl9WterCXlM07FK2Q+Mkan2hLJOXKFxbejVuj60adyVOFfZd4yRqbYbB1QE3KJxC7Fc65ZjocatR1CxH7uNkak2jH9W9v48pmkacy06tK4D12pAHlMH3qtsWxHDiDEyYxQxOOWryn4J6zTmnSZPn8bcjIuUfdU4MuN7DHtUBHwsjylTnzZcb/L0oE0d8pgy3ImgYgA7jCMzjiKGIfy1smtxq/osxttMnrdhsfqsx1XK7itiGDaOzMTux0sqAu7JY5qttneg3eRpx3VqyGOagz9HUHEIf2MCmQkUMRzBZmXL0a+2PpNvrdr+FEuV3VvEcNQEMmf2V9il7A/ymNabWDuuM/muR7sJ5DHdhg3KdmKLM8icQRHDCWzAiIp2/H0e02XGdyGWmnxL0W0ceUyr8BW0qxjGhiKGE84gU9t2/IWyLjyUx7RCtR60mXxtuM4YeUwrsBVdyj6H7WrI1FDEkPBxbFd2Eb6Rx3SZsl5T551Ok8e0Ct/Ehcoew91FDGppU4d9O/pHunvjo7gF81R04n3dvXH3vh39uzANmzHX1JiN+zCax3QbvoYLlO3Ee4oYXlWHNnXat6P/9e7e+ChuQZeKmfj17t7YdeTZh38ydOzgnQimxnmzFq/52pqPHrgTn8UsZQO4qYhhvzq1acC+Hf1Hunvjw3g35qnIcI00+puvPPvIDFMnXNjX/1uzFq3pQaZsJ24qYhjQgEyDihgG0IPtxji299/mmGKv7nl8jmqPoaeIYUCDMk0oYjiEm/BZjDgljQw6tvffTbVjP/62NDLoZ4axGeuKGA5rQqZJRQwnsQk3YNcbL/+Pk6/sMdVOvrLHyVf2OGUnbsBdRQwnNSmYBHlMM/d/69Mb9//rZzaNDh3vNIWy9hlHu3s+uXnx9X/4hSKGE1oUTKKLb/ri/ENP/d2GwVf33zF84qVFJlH7jK4XOjq7vyylLccPPXPYJAmmwII1H+x44+Xn140Onbj9jRd33zj8xpEuTWibcd6R6Z0XfaN9ZteDM+Yu23boqb8dNMmCKfSWd/yx0eGT04ZeO3j56wefytPwyV8ZOv7israO2RekkcFFieCUQAptHQdHBl/7ybRz5j0X2qf/cNai1cW02Qv/M2ufMbT/W582VYJfgEXXfCQMHXshS2nET4XQZtqchaMHn/hCctZZZ/08/R8wPGmSSU1PIgAAAABJRU5ErkJggg==",link:"https://spirewallet.com/"},{key:"temple_chrome",id:"ookjlbkiijinhpmnjffcofjonbfbgaoc",name:"Temple Wallet",shortName:"Temple",color:"",logo:"data:image/;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAGbElEQVR4Ae3B32/ddR3H8efr/f1+z2m7dT1n3Vp+De22EsxmxARvCNDGhBvDj3/AaxdMJEpIUAOJxl8IXJnFGyNX3i3BiEG9ELIqZNSLmRBYYD+7CS3tuv5Y23N6es7n87Zd2uULxAXDt2cmnseDjo6Ojo6Ojo6Ojo7/S6Jgje/sGdTdu1+2ewZvwwQSMsAEJjCBBCYwwAQSMoEJDDCBBCYwgQmJN3XLH79JwUSBGt/dO4jzmqrlQ/bQEJhAQgaYwAQmkMAEBphAQiYwgQEmkMAEJjAhsYxU1eArLQpkFKTx5MAg0mskOuTLTVgLFErsBO6lYEZRTN8i0SESgQmfq1M4MUrBUoqS6E2xTgIBc6twWy8bfLkJszWukfgUgZMj1okN6iujQ3vYNAI8R4FSCiLTCaQGoozA51cRmxotwvFLEBxChOAQHYJDiHhwCA7RIUQIDsEBRweqZF/qBxPr7vfLj6Xa+4cWBUkpSOkXU/W1Z28fRzwIgloTmgFKKezuJnn4IAiQQIDENQIkJECsEwgQ+L+WCK9fxCeX0Z29rNsJ3Au8RUFSipTYGOJBNkj4QgMNpEjAQA+YwAQSmMAAE0jIBCYwwAQS2ttD+NM5/PQc3NnLNWIUeIuCGEVKdJxEkBgkgoUGn8uuMvSWiKeukDNCgYwiJTpBYg0SQSL8aoP/RnhtApyPSY98leTRg+Tc71ceSymIUaDSDy/WSTROIkgMVlvQinwW8Z3LhGPv49Mr5OmWHejOXeTsBN1LQYyimY0pMZQIJYKlBp+FBnaAwE/P8xmMUpCUginVceBZJAiR8Oo5MKHUIDVIDUoJ9pUBdFeVLRroQdUu4pk5bHQfG/zSVcKJD1EpgVICpQSVzCmnH1CQlKKZTiA1CLEcT07jy2uQJZAaZAalBB2s4HN1RJU83bUbPzMPDgioduFTy1BOoZxAOXVKdiR78tzvKIhRsOyJM3VCHI/jU/jCKh9jQkN9qDuDpTVYDeTZcBVfWsOnV9ig3hKqdLHJcT+SPXnuNxQoZRuEv33wbVbW9pEZeTZcfZSe7HFCxB18ro56etmi4d0g8LPz6NadbEge+uJL4ZWzx3DmSj+Y+AcFS9kGXS+vvgu8C5G8tRcH52jFx3Fng8/W0R29bNFAD6p0Ec8sYA/sY4P27aqUfj75F7aJ0U7BTxLiVYJDK+IzK3yShqv4uXlyRuLkw8Y2Mdqo9PSFFi1/g1aE4LDYgFqLPBuu4str+MwKm/qBw2wTo91CHCM4tCK0HJ9ZIU8HqyDhZxfIGWWbGO3WiscJEYJDiPjUCnna240qZeK5eXJG2CZGu0U/SStepRUhOD65xCfpYBU/v8B10oh/9IixDYw2K/1ssuXB3/AQ8VbE51dhpUmeHajgy018psamfuAw28C4GVpxjOAQIgTHJ5fI04EqkvDzC+SMsg1SbgL1ZL32tVtAYoN2d5OnPd2oUsbPL8B9t7NpBPgVBTParPG9vU95rfmMbutFBypouAr93XyMQPsrxAsL5Iz49KNGwYw2ajw1+BSpvUBm+EyNG9GBCiw38cs1rhH9wGEKZrTJ2vdv/bIye0FZgjLDZ2vciPZXQODnF7hOjFIwo11SO02W1MkMsgTmV7kR9XejvjJ+YZGcEQpmtEnppx82yOwEpQQyw+stWAvciPZXiBOL4GwZ8cuPGQVKaadSMob4OhJEJ/z+DHSlKDPoLZE8cAd0p2zRUAXeuQyzNRjsYV0/cBh4m4IYbaTMjitLkMBPzRLfu4KfmiVOLEK9hV+pk6ehPpCIE4vkjFIgo51SGwfq8Z/T+GKDa7pTbKgP3PGZGnnq70Z9ZfzCIteJEQqU0EY/+fNceOb2cNpn66+T6FUSe9UO7XkQKBMc1gI2XAUJJJDwj1bwS4sk990BEkgDP3r67hd//Pz7TgFS2qz80uIxctbu4RFC/Abu+HyAWgt2ZmzRUB/x1Cx+pY729rCuH3QYeJsCGDdbM4zRjNCM0Az41DJ5+kIfSPjEIjmjFCTlZmvG47iDA9EJf72ITk5DapAIMoNEhPEpfLoGBkg9FCTlZmvFkx79Ku67fHIZ5huQGaSGMoMdGSTCP1omzNbAdBT4JQUxbrLSc1MtmuENv7QEM3U+pRGgGdl0FHiifPSKU5CU/wE+ufI8l2t/JzH+I2eW6L8t/3rO6ejo6Ojo6Ojo6Ojo+Jz+DTK0Yr9D+W0JAAAAAElFTkSuQmCC",link:"https://templewallet.com/"}],x=[{key:"kukai_web",name:"Kukai Wallet",shortName:"Kukai",color:"",logo:"data:image/;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAHNklEQVR4Ae3BbWyUhQEA4Ofevg0f7d0RsAllEJSpQVy1K3SQIQro2HRoVIymS/Zj6w8xfk6NWzRzoJkO48d0MUaTZv6yMRFNxM2EIX4wIthSUJERgrCmjHZWCXdXapsWbgk/iLbvlXuPsgHjeZx11ln/1xJiaGjMV+NazMU0lDs1DKADm7GmuSnRqUgJRWhozF+AR7EMoVPbIFbjoeamxOeOI+E4Ghrzy/EMxjq99OGe5qbEi0ZQZgQNjfk/4HGETj8hltbUrRi3fevKdQooU0BDY345Hnf6u6ymbkXX9q0rt4gQiNDQmL8Azzhz/LGhMf9dEQLRHsVYZ46x+L0IgSEaGvPVWObMs6yhMV9tiNBw1yJ0EiQSVJ1D9WQmTmDsGEf19XPgIJ1ddH9JPu9kCHEtXvINoeHmGkXl5cyppb6Oiy8iWWlE2Rw7dtLSRus2BgaMprl4yTeEhptmFIwfz9VXsWQxyUpFSyWZV8+8enI9rF3P2+vo7TUaphkiNFy5IowZwyWzSCbZ287edsdcMZ+Gm0glnZBkJcuu40eLeOU1PtjomPOmM+Ncsjk+/Yy+fsUoN0SoBOfP4L7bSacds6mFtev56Y+ZXWtUpZIs/wX13+cva/nJlfxgtmMyGZ56nt17xBaKacwY7ruddNq3zKtnXr2TanYts2sNk05z3+3c8yD9/WIJxXTJLNJpJ+RQL51dZHOOSiWpnkzFeCVLp7lkFi1bxRKKadw4Jen+inc30NrGvv0iTZ3CnDoWLaBqktjGjRNbKKb2DrH0HOLV13lvA4ePGNG+/ezbz5q/snABt9xIZYWitXeILRBTewd/36QoO3fxwMO88z6Hjyja4SO88z4PPMzOXYqycTPtHWILlODFP/PxdiPa8jGPPc3BjJIdzPDY02z52Ii2fcoLTUoSKMHhw3T8S0E7d/HsCwwOOmGDgzz7Ajt3KWjffo4cUZJACcrLWThfpJ5DPPcig4NGzeAgz71IzyGRLv8h5eVKEijBnFoqK0V69XUOZhQlnSKVVJSDGV59XaRUkjm1ShIqQX2dSN1f8d4GI0qnuGEp8+pJJR2VzbGphTfeIpNV0HsbuO4aqiYZpr6OD1vEFogpkeB7s0R6dwOHjyjo/BmsWsmSxaSSjkklWbKYVSs5f4aCDh/h3Q0iXXwRiYTYAjFVnUNlhUitbQpKp7j/TlJJBaWS3H8n6ZSCWttESlZSdY7YAjFVTxbpUC/79ivohqWkko4rleSGpQrat59DvSJVTxZbIKaJE0Tq7DKiefWKNq/eiDq7RJo4QWyBmMaOESmbU1AqSSqpaKkkqaSCsjmRxo4RW+C/IJFwygrE1NcvUiqpoEyWbE7RsjmyOQWlkiL19YstENOBgyJVTzaiTS2KtqnFiKoni3TgoNgCMXV2iVQxnqlTFPTGW2Rzjiub4423FDR1ChXjRersElsgpu4v6Tkk0pw6BWWyPPknsjkFZbI8+ScyWQXNqRMp10P3l2ILxJTPs32HSIsWUBYoaPcefv071q4nm3NMNsfa9fxmBbv3KKgsYNECkT77B/m82EIlaGljXr1hqiaxcAHvvK+gTJaXX+HlV0glHZXNKcrCBVRNEqmlTUkCJWjdRk+PSLfcyIS0omRzZHOKMiHNLTeKlM3Ruk1JAiUYGOC9jSJVVnDXrYShUROG3HUrlRUifbCRgQElCZSgLGDqFAXNvJC7byMMnbAw5O7bmHmhgqZ+hyBQkkAJljdSW2NEsy/lwXuZkFayCWkevJfZlxpRbQ23NSpJIKbp05g/V1FmXsgTj3DlFZQFilYWcOUVPPEIMy9UlPlzmT5NbKGYpk8TS2UFjT/numt4dwOtbezbL9LUKcypY9ECqiaJbfo02jvEEorp66+VpGoSN1/PzddzqJfOLrI5R6WSVE+mYrwT8vXXYgvF9MkOMhnSaSWrGM/5M4yqTIZPdogtEFN/P089TybjWz7awiNPsGWbk2bLNh55go+2+JZMhqeep79fbKES7N7Drx6k5mJSSfb8k73tjtq5i8vn87ObSCWNimyOV17jg42O2rmL86Yz41yyOT79jL5+JQkNN6AIff20tIn0wUZat3L1VSxZTLJSSXI9rF3P2+vo7fUte9vZ2y6uAUOEhuswCnp7Wf0mb77NnFrq65g1k1TSiLI5duykpY3WbQwMGE0dhggNtxm/NEoGBviwhQ9bSCSoOofqyUycwNgxjurr58BBOrvo/pJ83smy2RCh4dbgeYRGWT7PF9180e1/YRBrDBEYorkp0YnVzjyrm5sSnYYIRPst+pw5+vCQCGUibN+68kBN3YqvsNSZ4Y7mpsTfRChTwPatK1tr6laMw2VOb6uamxKrFFBmBNu3rlxXU7fi37gKodNLH+5obkqsMoKEIjQ05i/Ao1iG0KltEKvxUHNT4nPHkRBDQ2O+GtdiLqah3KlhAB3YjDXNTYlOZ5111llF+A8aUDCF69BprwAAAABJRU5ErkJggg==",links:{mainnet:"https://wallet.kukai.app",delphinet:"https://testnet.kukai.app",edonet:"https://edonet.kukai.app",florencenet:"https://florencenet.kukai.app",granadanet:"https://granadanet.kukai.app",hangzhounet:"https://hangzhounet.kukai.app",ithacanet:"https://ithacanet.kukai.app",jakartanet:"https://jakartanet.kukai.app"}}],B=[{key:"airgap_ios",name:"AirGap Wallet",shortName:"AirGap",color:"rgb(4, 235, 204)",logo:"data:image/;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAALT0lEQVR4AeXBCXiU9Z3A8e/vfd+5kskBARYIkAsCSIRyRe5AKbhQ8CqWemGpVnF1qVKPrdoSrSiW6qq0lhZXu7UrskVQSq0VpAIGwxGgHAE5RBMIgUAyk8xkMjOZ+e/zZh9cauXNTMjx7MPnI0qpRkC4PCkDEEDj8hTVuMxpXOY02om3xsfix1/jlumP4qmu48saAiHumv1TFj/2Kp7qOtqLQRsLhxp549U/8x8vvY2vth7TkUNljBwziAsdO3KCnUWl7Cwq5U+rP+KO+ddx8x3TsNtttCWDNhKNRPnjW5tZ9twqTp88xxcUIMKXiQZKKUQEf12AlxatYOVr73PPgzcyY9Z4NE2jLeiFhYULAaGVNDZGWLdqM4/8y0usXbkJf12A84J9u1Je+M/MnjSCPrqdC3Xt1okrhmRz5FA5NWdrMfnrAnz4l538Ze3HJKUkkNOvF5qm0YqUQSs5frSCdX/YxDsrN1F91ssXFARzu1L5/dFUT87FyoRvDGP85KGsX1fM8hfXcPRgGSLC58dO8eP5L/PiohVc952JzLxxAr0zu9MaDFpIKcXBfcfZvH4XG9/bzpHSMkSELyjwj8rgzK0j8YzNBEVMRISpM0czZcYoPtq4h9d/vY4dRQcQEc6eruGVF9ew/IXVDLwyi0nTRjLhG8Ppf0UGCC1iEKNoNMqxwyfYs/0TSj4uZXvRAWrO1SIimEQEUyTZSc2MQZyd9TUCmZ1AAYq4iQjjJw9l/OShfHr4BKt+/wHvrt5CrcePiHBo/2cc2v8ZL//sv+nSLZWR4/IYPmogw/IHkNm3JyJCLAya8Unp57z09Bvs3naIQH0QEeE8EcEUdTuondiXmin98Y7JQmlCE8VXqo1GiEd2bi8efvJ2Fvz4Vor+uof164rZtL4Ef10AEeFclZf31hTx3poilFIkJrkYmj+Aex+ezYC8TKwYWAjUB5k3+ym8NT5MIkITpQjmdKVubBbe8dnUDeuNEmK2xF9JgT2JBNGIh2HTKZg6nIKpw4k0RigpPsiWD3ax9cO/8enhk4gIIkK9r4GijXv4W8lh3i1eijspgYsxsFBSXIq3xocp3D0ZX34GvhG9qR2VQaiLG5SiJf4a9pF5di/9dCeCYBLAEP5BZzGY60pjhiOVC+mGTv64PPLH5fHDhXCmsprizfvYufUAO7aWcrriHD5vPTu3ljLx6hFcjIGFqsoazit7Yhq1I3rzBaW4FFXRCFVRP7FYHfSwPLkPd7q6cjHdunfmmm8XcM23C9j5cSl33fhTTGcqa7CiYcHr8XFeJMVJRyr0nSJWKalulKJJrdeHFQ0Lfl8DTaKKcKcEOtKpaJhGFLHo3CWZaDSKyVdbjxUNC746PyZRikiKk46Ub0vAQIhFUkoiIjTx+xuwomGhIRDCpOwGEYdBR+mmGSxLyiBWdrsNh9OOKRgIYcXAQsAfxKQS7CACKOI1yeZmiiOZJNFpic6aznR7KqmaTjwS3S481XUE6huwYmAhEGjA1JhoB6WIR4JovJmSxUxHKh0h0e3CU11HQ0MIKxoWQsFGTMppgFLE49dJfZjpSKWj2OwGpnAwjBUNC4H6BkzKaQNFzHJ0O7e40uhIDocdUyAQxIqGBb+/AVPEZSMeo2xuhI6V6HZiqvc3YEXDQjAQwhR12vj/xuGyYwo2hLGiYaEhEMQUddmIR3HYh6JjOZ0OTIH6IFY0LAQCQUxRp0E8jkVC/FfgHB0pIdGJKRBowIqGhXCoEZOyG8Tr7roy3gnW0FHsdgNTONSIFQMLkcYoJmVoxKteRbnO8ykFNjdTHckki855OvBdVxdcotFWdEPHFI1EsWJgQSmFKaoLLbUp7GNT2MeFbnd25p6EbrQlTdcwKYUlDQsiNNGiitY00HDR1qLRKCYRLGlY0G06JglFaE1/CnqI0rYawxFMuk3HioEFl8tBqCGMVh+iNW0J+7nec5Q7XF1wi8bFuEVnmC0BAyFefl8AU0KCEysGFpJT3XhrfOjeBlrb2qCXtUEvzemr23krNYfBRgLx8Hp8mJJTErGiYaFzWjIme5UPhA5xNBLiW55jNKKIR1VlDaa0rilY0bDQPb0LJvsJD4LQUY5GQuwO1xMrpRQV5VWYuqd3wYqGhcycHjQJNeIo99CRFLE7WX6GQH0DpozsHljRsNA/L5MmIiTuq6CjZOt2htkSiNW+kqNomoYpd1AGVjQsfG1Ef5RSmJJ2lNERsjQ7q1NyMBBitWPrAUxKKYaMyMWKgYXUzknkXpHBkYNlJG8+iqirUUJcrrYnMceZRrKmc56GIPwfAYR/lCQ6I+2J2BBiFY0qNm/YhanfwD506pyMFYNmFEwdzpGDZeg1AZI/Po53TBaxusOVxvLkTIT2U7xlL+fOeBGBgqnDaY5GM6bfMA6lFKZuK3aBEBMBFrnTEdrXG6/8GRFQSjH9hnE0R6MZmTk9GTF2ECZ30XHce08RC7do/JNmoz3tLTlM0cY9mEaMHURW33SaoxGDO+dfj1IKBHr9fCOxqFNRDjU20G4UPPfE64gISinu+sENxEIjBleNy2NUwWBMrv2n6LLuALG4p/Zz/CpKe/jjqs3s23UU0+iJgxk5dhCxMIjRQ0/MYfaUR4g0Run5/Id4x+cQTnFi5cOwj4Fn9/MtZydSRScWugiDDRffdKSgI8TCU13H80++jkk3NB4snEOsDGKU3a8Xc+6ZyWtL30H3Buiz6H2OLbkWlMJKeTTMC/VniFe+4eLdTrmkaQbNWfSjV/DW+DDddvcMsvv1IlYacZj3wCyy+/fClLzhMF3X7KWtbG8McG9tGc1Zs2IjG9Ztw5TVL515P5xFPDTiYLMbLH55PnaHDQTSn91A4qEztJXVwRrqVZSLKd37Kc8+/ltEBJvD4JmX/xW73UY8NOLUt39vHnv2TpRSSChC9v1vYT/toy2EUdSpCF+lsuIc989dQigYRinFj57+HrkDM4iXRgvMnDWB2+bNwGRU+ek3byW26npaW2/NTjfNxpdVn/Uy76anOHvag+mmO6dx3exJtIRGCz3w+C1MuXYUJntZDbnfW4HjVB2tRYBnk9IR/l5FeRVzry+k7Fglpq9PH8mDC+fQUhotJCI8/eJ9TJgyDJO9vIb+t/2O5F0niJ0CFKAAhQAacKXhZFVKNjc507jQjq0HuHXGY5Qfr8Q0umAwz/xyPpomtJTBJdANneeWL+DR+b9g/dpi9JoAOXe9SdXtV1ExbyxRm8ZXydBsrEjNZoiRgPC/BLCJAILO3wuFwvzq53/gd8vWoaIKU8HVw/nZsvux2QwuhcEl0g2dxb+cT1bfdJb/+2qUUnT97TZSNnzCyYe+jmd8DijFhZ5ypzPa5iYWWz7YzZKF/8mJz07TRGDuvddw78PfQdOES2XQCkSEeQtmkT92ED954FdUlFVhP+Eha/5q/CN6c+q+8dQN6QmKJr10O83Zt/sIv1i8ku0f7UdEMHVPT6Pw+Xnkj82jteiFhYULAaEV9OjVlRtunkxjJMKB3ceIKoX9VC2d395L8p4Kwj2SCaan8l1nGpm6g69SUnyQpx55haVPr6CivAoRQdc1bvn+NJb8ZgGZOT1pRcqglTlddn7w6M1cf9Mknn/y92x6vwQRIXH75+Rs+4zAlT2xLVsAmUlc6PSpczx89wvsLTmCiCAiKKUYN3koC35yK1l902kLBm2kT1YPXnjtIXZvP8TSZ95k9/ZDiAiu/adwVHghsxcXqjx5jn27jiIiKKUYPDyX+/5tNiPHDKItGbSxofkDeHVNIds+2s+rS9/G6/HRf1AmX9ZvQG/652XidruYe9+1jJk4hPZg0E6uGpfHVePyuJgEt4sV7z1De9O4zGlc5gxAAVEuT+p/ABopEAN9AKm/AAAAAElFTkSuQmCC",universalLink:"https://wallet.airgap.it",deepLink:"airgap-wallet://"},{key:"naan_ios",name:"Naan Wallet",shortName:"Naan",color:"rgb(129, 100, 100)",logo:"data:image/;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAZfElEQVR4Ad3Be5BeZ33Y8e/veZ5zznvd+0VaaVfWfSVLtiUbY4PBBsaUy0CCE0JDadopCdBJ2iQ0w0ynSSedyaQzzaTJtJlJ/oBShoRJS2nTlNImxNg4gSBsLNuydZdWu5J2tau9vfvezznP8yuvPLJLhtYr22khn4/8yscarpnG0mitStluiBYsJndS8GUsDRmoWsltJB2vSCYikZOO74gJGVEwIlJGoiAejw9G0IjUd6XolSiyaAyZ74giCJkJmsWCxuCcqjGqKmLwqM8QzVSjrrVOjQhWYiWFPFc6BpxxKsYjJqgYi+0mGvwGIQkaJMJqot0cjeNMS5GobadstFAvJbxLteva6tsBDVZL1XGNRdWVvJWosyJ5XhdfNQwSiwYrmW8QF61keZCcTDyR5KISdz1YFQTJrGAUcagR1oYNy3uQ9Z2xWZnE1Cdy0xhT3xwRbQ4IaT/4kiU4UAMYBIPQExACSEBsRjBNpVDLKa6JGbgurrQYU5lHhufQgUtWRy8E37+ekStO9LtE8SqpR1wQsJrnuUqwGseWTrtOREIICWnS0aTVpVhflzjpx+WtZVkLHcn7DP2dWJJiJKHUFtOxmDQzrWIQkyLQhciKqhHj1ajMH4rszNuU2ftDWLgDOlsEhO+yhhuU71I2wwAGFMhjoAzpGGygLIIBw8tU8UL5qpitz2J2HAvhtsfVbzuptqPGBBUfyL2RzJlQ7AqmXNZ2pyUmcwxKzHoJ1jttKu0Wbt2komVhsB3LUB5LppkQCmKDiisUJc86YiIrGlKh2xzAPfX3nXvm70J9F98lwv8PFppTRs5PoeffZwTUVi8qd/2+Zvd8TszAauLikGapwUVK16uLihqHNqVugjhYL2Xa7Hix9x38eVeQRExuxcuGaDkRUSvWOOlKR8RYwQWH/OXHnP3i50Vm3gXpID9ghHRQmHvQmqf/HiKp2sln1IvmWYq1ESY2SEFIsxa5dwiO3Cv2wYO/FEU4CT6VXIxEhViMFfHWS+pVMCtbhD/4A+GZj4Iv8gPPF+DiO5TTDwRue8yHcoPIY50B4+mmHXwOTmJciDHGODGSSqVUoiAFcZmVXHNJQ26cub7XyGe/Clffwg8bXXiTMZ/5qomX9ucGyTQVmxlxGkmxkGBCWwTERFEqSbGAEKRbSqRl2uKDiNX6DpHP/jE0Jvmh1dpm5LP/1bCy2wcnbRckK1YkUielUh+FomBsFNGVVDpRapzPxKgTtFkVPvcFaG/lh157i+H3vwD1PpMjziOduGtatMVbFSOFSEBE8kysqFhjxPLlX4fVg/yNsbbfyh//KyQXa1UIuSCIOCNONWCMiBgkhFQMFx+Ekx/hr0EpVkZKnoFSoBwHYqv05EFopkKtbbneNDS6htednv7bmNP/KWP/o8aAESNiFae5kUxUjLOEFBeFP/k1EYTXgQDjfZ7psZSdQzlDJY8Rvq+gioiAQq1jmFmNOLMUcaXmUOV1of7Pfi3P9z1hIpMFCRJlRu3bjn4qMV6NEETsifcbOf4xXiMjcGA85T0HW9y/o0NORkeFgQRE4GrLsjZ+gOt5QjWrMev7aN/xdhZDhXh9nv4CbO3zHNqaMj2WogrXmw5VXhORzojYgbOiW05GwWO8weV0RFB8biWKjn2C12jHYM7b97YZKXsutyNmd9zHnqOHERGe+6M/QlD2PPIeqtUSqvDof/4T3vTuBymVCtRLjmfOn+N2U6cYGXqGSoGH97d5w1SXxy8UOXc94rUwfOsTWTjyJZWAulQc4kUtAkt7hWv38ipFVnloT5s7J1JCUE7LBHsfeQ+VSpGe4ANh6iBH7t6PtQZQLp+b5fCb7qZUKhDSBtUdQ+w9vI/nvvU0924H4WUDxcCPHmpyeiniq2dKdHLh1RCuHxUWDoiZOGmswbjcYiQRZ0+/FxBehb5C4MNHG9w1keK9crayjzsfeYRKpUhPSOucPD3DXUf3Ya0BFN9Zop5njG8dADJMlAEZW+67nYnJbZxd5fuaHsv4yD11hsueV0ki98J7rcQkPhIDiYRgQWce4FUYLnk+fLTBWMXjg3KmtIcj734TRjaADmiTuSvzTG4fxNk6mtdAN5idX2fXbSOEdIV0Yx4IvMiz9wMPk/dtpdYJ9NQ7Oaq8ZLAY+PCRBhN9Oa+Ghpm35sFIFgwmSzwqLWdk4Si3aKAY+Im7mlSTgA/Ko9cKTAz3I5KTNWqktUVW11a4+uwM5SgAns7qEqo5Z791Gt1oYSIHQVk9eY50owGqiEk5+uPvZXFkmp4vLTX4xMUVvrlQ56ZCpPzYnU3Gq55bJbJ0REwzyeNMDHgxcm0X5APcgsQpjxxuUkkCPV++CNsiZeJN9wOOqFImb7X56pePs3OkgisN0BOVivzZZ/6Y5PoipS3bQCqYyJHW6pz+91+ktbiM73S5fvwZ9j74VmbbCWvtjM/vGeDHGh3SPHBTwSkfONykEgdujS8Ll6eRIMZ5h2X5MLfo4X1thsuenr+4ooyXChz40feBCEiJkOV8/avPsa1TY2DvHsABRRC41nbsPbSHFyXU5xZ49rc/Q2nLKMngALY4zvgbpimVEkr3P8w+tQwuNPjHxvBfZtb4rUtrNLs5PdUk8N6DLYxwS0SvHbZeMCE4VBenuQX7xzIOjKf0zG5A3Q6w7859lCe28iJDbXmd1fWMidE+Slu2cINEXHj0W+jqOuP3voGe9tIi/bunuOuffIzb3v8wttAPdifY3YDjO8sZXyj0ccfcBt9R5R9MlvmiBkqx46apwZwj27rcCtWlg0ENJs0zUV3ewyZFVnnbnjY9rTRwKt7JgSHLtoce5KaNi6c4/vwieyqw6wM/So+GQP3SOdaLgxy8707EWsBQHBvDxIOM3fshbDIJlAADMgxmhPv27eXJkHFxaIChZsb+uQ1+I4r4zVNLzK93yHyg5807O5RjZfNWd3fTTOz9Rz5ZjM3jPy/S3sIm3DOZsm80o+d4e4i9D9zPvgfvB7Hc1LU5Fy5ucPTuaQqDgyCCiJD0x5w4s8K9D91LUh4CuwPIgYC4YcQOg+kHIkBAClTLFT75lh9heeYiP1V1/POJAlN9CXOdnN+9vM7PtboMNDPu7k9wBmZWIzYnaObv+7SLTBCR+nY2wRq4e3uXnit10Klpdu+eAATsTtAGhEVmLtTYtXs7/XumwAwDBQgLQIF2SygWE9AuEMBsgTAPYQ3MVsACyssSen7hPR8mdGb40qd/j1+sKKVWxtpIkf5mRrko5D5weCLlL2cLtDPhlYi0txqXOxO7ZgXSPjZhz3BGJQn0rAzsZmxsgBcpICD9BE24PLfC1I4xXmRBymDGaLXBZi3ai4tAgLDIDWYrkIHWAEVDG/V1NO9w0+joVsa3T/O5sTGWp/rY4ZWP1lI+UYh4uL9AElliqxwYT9mcvBhH3X4j1AeAiE2YHk/puVpX0uooleU5XqItemYudeiPQOo1btAaN0gfy6s5w31F2svL3KBNCEuAAbMNiOgJ7Q2az38NcY7vIUOsA4dfqPN7oxU+v7XML+/o4/NXa9w0PZaxSUZCbdiEkA6xCdbAjsGcno3KBGZjjUK1yku0Rk+7sUF+fZG4WuUG7YJu0NNNqxT6qnRWV3mJ1iAsARakBAimOELljr8FOP6qr3zoUzz2s7/A9Y6llXrwgScqMTdt7cspRspmCO0BY0yjj00YLXsSp/To8HY6iwv0793DS7QJ2sWnDXyzQWd5hZeE64CnUCghxrF25Ro3qW9AuARhnpvEOJAC3ysHXWN0ZIDhsWkm3/k+HrUxX1/u8pZmRlClxwhM9OVshtCpmuBDiU0Yq3p6luoZwxNbac9fRYzhe+gKPmuTtzvE/X28zENYZGxsBOscC0s11HtAERMAD2EWXz9L6Db5/jyE6+DnQOtsHR9C+7ZzZGuVT06PYkS4aazq2RwtGkQSNmGg6Omp5Y5yKaGybYK4r4+XaJvglzHGI9Zg4piXhA6EJZK4DbbIyJvfglgLuoHvNNi4OMflP30CW6hjYsv3l4CUQdtofoFkoMjOvTv59kwXVb7HYDGwGSI+MYJ1bEI5VnokijHGEPX1oSHwooD6BkKDEHJsqUxrYYGbVFtAG/x5kvIg/eUC8/MrIBVsoZ/lZ09Rn5tHyYCM/yMziu/Wqc9eIWQ1hu+4nZ2HDnJ8xaHKS0qxshkhdKxRhM2IjNIjqhgjDB85ihgBrZG3ryHWICIYA6NHj9K3axeQ4tuLiFFelLLztiK15VUW5pZQNSBltr/9rez5ifciUuL/Lka5jdn/8ThiDC6B2971TqYOHOSkjqO8KLbKZhgTYwRhU4QbXN7B+wBBAQEEV0hYfvYUs195jJC2KESOer0FCLYQUTt/idr5S8x+5TEKSZOkuoXRcsSJ5y7SEw/dRTx4F5hBkBLgQRtA4K9ypTFu//jPYhOHiRTjYOK+e7nrkQ9wymxDlU1TVYwS2Iw0F3rGyobFxVXSTsoN0oeGmOXjL9CcX8RFgdHhPi7PLQERSD/liW089Wv/lsLQAEjO9NEjXDy1QNxqcvnyEmgdZBTMJGAhrKD5BfCnQFt8D3GI2wlEgAetYZMOLhLu/JH3c9pM0M3ZpKDGSMjZhGZq6CnGhu7KIs4I7XaXnrztGZzezdg9d7D70E6uXV+n2+ygqoAFIu755X/E0OH9IP0ICW94/09y+TvPszq7wOrKMoRlXiIxIinoBvjnydYv8bIMsRakyMs8i8f+HPEph97/Pk6mQ2xOITci2mUTVluGmzonvs1wIszNLtITVScYv/8BBg/soVweotPoMlYwnDt3lR5X2Un/vjcSlctABBJRLpe448d/ho0TJ7j4/AWajQXQNW6QhKzZYO3MBdZOncHEV0HbgII/Tb5xjNXnj5Oub/DtX/0tVJXxew9j4xZxLLzjI+9GEuEVCV2jSItNWGpYbhofjLj27HN0mh1ukCLY27HFKZA+Jg+8mYXT52iuNfA+AApmF9g7wU4BBvCMb9vC9oc/TNTY4NSJGdrNqxCWgISoMsn814+R1hvYuAS6yA1mJ65UpjK1lSuPfZO+XVO0FpZ4kQGEoaEqD77/Tl6JYJoGqnU2YaVpaWdCz0S/49qZM5TjiNXVOmgbsGB2gtnO6Pg4zbzIiEk5c3oOtAHkIEUgAQL4GfBn2blvC9UDDzFYLXPy2QvUNxbAzwLC/p/6EKNHDoEUQVMISyAVcIeJ+yZoLVynvbRMeWIcpAoyCFh64sTySpS+dQNujU0ICjOrETcNlpX8haeZv3wdtA14XqItjr7vPl74b/+d0O7SaLQgrPKyAORovgr+LLt2D2GruykXi8ycnuPKlXnA44qjmHgIMNygNdAVICZrDHDwp3+SI7/0cfJ2B4i46blnZvjT//g0ryRovOqC9q0ZyAHHKzi1GHFwPKVn//YK37m6xOCWNdI0Iy7UQIZ4UUalBGMPvRF78RRng3L03hJoFaQICD6tYyMDePDnmNyym5XyEebOPU1nvcHxa2sMlSwDsWLjhOLYGLaQoH4ZsULUvw18HXQDVyzRbLZ5/vhZXjg2w6VzGzhjeQVZO+9bd3lIGrFEDcgGeAWXViNqbUN/MZBEhmrVsXWwzPlzVzh4ewK2HzCErIXQ5q4H7+Bbf/oCkwMVZmYW2LnTgp0EBBuXqJ19jrXT55l690NktROMbXmQkZGHOXPqSUJ6meXUsdCo07k2T3txger4GJVtE/Tv3kWeWzqtBldm50nnZyltLHD7WMxjswM4Y3ll8QYhaZg82KBamWcTgsKTlxNu2lFssZ4qWatLlnUhLNFjIkdr4RrNK/P0s0G706WxusHGxgb4K4CCDFCfvcrKc6cJWU5hpATawBjDgQOjHJqusGNvBRtqDO6fIh4YoO/QNL4Yc+35F8i6TbqdDrevPMU7h1Z54LaE00tF0lzYDNX+OaNGnVELDM7A2kE24bmFhLsnuwwWA30Fy5Uzx9n50MOcPjnL4TsdaAGIMUmJZ/7lv+HOX/woV+odhsuDnD15iTvv3k/ELKCMv/FuRo4cxJUGgRLoOkgfmAmSwVXikJL3C0k1x2bXOXRkKy8rgpQ4sTLLaOM8rUx46nLC5g1cEmsxzhRVZPQ8m+QDPHq2iPKiXWaZufMzJCIsL29AuA5hCVcosvuD76G8dSvTB3dzbXWDqa3DHH/qDHmeAUrUN05heAxw3KAd0DpQALsfkZi80eLb/+K3KY4N015a4WWBnsn73sxiC75+vkgnFzZNhs85Z9WI7aKMnuYWzKxGPHs1oacQGQozT1GIHbMXrpJlOaBE1WHG7z0KJgEKHLlnP3NLGZPjgxx/8gz1RhvUgvQBMS8J1wEPUgU7RfW2Sfp3TTF4YA/FsRGQEkgVpEzPwGCVk34HL1yLuTXjp6woxpucYLac4BY9dr7AwoalZ0clcP3YY2wbG+DpJ8/ifQAixA4hpkyPiHDPvXew0u6nv1zi0unLfOOLX2H+L77B2slTvCyHcJ2etJZTnhjnvl//FNWpCSABikAMCD0hKKfmuii3RsOW57zmah+8+1MFQqlm+ObHISRsUlDhwkrEnpGMYqSMRCnnLsyzbd80585fpXP6BP3bt2Gc42UpY1unCW6A9fUVqiP9rHaFuROnmf/qnxCL0rh8hcrkGIjDFkcwrgmk2DgGHEhMjyrMzi7yh595nLXLdUSEzUuWg3/Pr2sguDiLNHVJFsL400auPsQtaKaG//BMhQ/e1WS45DlcrHH+G1+hdOB+asURvv67n2PX7gmG77yD6tQU4EFrjI6OUMkmaDKLv2awt+9nbXWK2a4jSSLWTs5io6tYm5DEEDQn7bao11dYurpEtbuGWV/hiWeVTh4hItyaiackSnziRe3Db/ilAiZDdX1cmH0btyj1wumlmPGqZ6AYGIo9ZmmG9VZG9dBR1rxj7vEnMGvLiDEUBktg+okqfZRKNcbGKwwmGVP7d5CZBBPHoErIA51Wi4vPvkB44Rj+4mkGF89w0F7HbDT4sxcSmqnj1Tn6GTE7noqNUfvAG34hCT6X3JeXnHnqZwDhFuVBOLUY0zPRn1OMhDFpoAsX6KY5fmI3jdIwXZuQq6dcApEU8ECGKxVwUYmhoUFGRvsZHRtgdGwAayA5/yT7yl1GikI5thy/mvDlkyXameHVEd/17/skEm14k6nTPAf1KoxeUt3+dZErb+NVCArfmClw7nrE2/e2mRzIGSlbRlgmtJa5cs3TvjrEeSlzrGuQSh/FaoVCKSaODWkGeZoyFAcKeRvWl6g2rrGjKPRcq1seO1fkSs3xWiiTXxMduCoh16CKM7lVNV6c8Rrkgd+x/OHbeA2WGpY/PF5hx2DOvVMddgzmGIGpfgvUgBrE3NBdD3SuB1TBWaEUG4wIN2lRuFJzPHU54fxyhCqvWeCB3zE2qISA8bG6NIrUWFX1OeT7Hjdu4hvC/Jt5jWbXHLNrFfqLgf2jGTuHM7ZWPZFVbkqcIXGG/13mhaWGZWbVcXYpYqVleb0o254I+d4/x+WaR0atWHWxQ0UjNZojUeS9ffc/Jf93XwN1vA5qbcO35xK+PZfgDAwUPQPFQDlWIqv0ZF5opcJ6x7DeNmReeP1JFty7/llB4mAwmmNVrcdJJ+CjoMbEiE8Q3XYiyBv/tei3PsXrLA+w3LQsNy3/r6m86TeN3/a8CZHiRH0IaluRGu2gVq1aE2kWcjSLlPDO30B2PMrfGJNfE33Hb4pPtJvngFHrUc1EjbiCOhWVbqreoFnuFV/MNPydj8L40/yQU8aeCeGDH8VHmVev3gY13UxtEMXkatLcabPZIojRKN1QrNU8dDTvROvB//QjysQ3+CGluuWY6scf8d2+tSzLVcVolDU0F9V2u0EnL6i9f/oTzpiEPG2KjRPEe2IMkYswlLvK9JfEtEswfzdg+OEQxNzxGfUf/LjTaj0S1OBVQlutLWq3mxE01jxLsXcf/Dnri4aiTyiQgYoaY8RaIdWAaOKtmX5Mza7HNVzdJ9Lczg8w1dFnxT3yCRPe+mkJSRYQtRLUaa4iRk3mVUxJu7HXXLtq7zryD61FiSNDKY3IrRfvIRglOKcGwYqgoXI14+gXVLc/oXhrZG07hAI/EEwz6K7/qfLwr3h9169aHZ2JcBrEahBFQ1tDMEowWgixdqJMWzbTTHN1cZqDFV0vQh5HmLxA0EwrxknikW7iCZmi0kGsDSa77Zve7/qmtxpF9spRYf6NhJmjyOLtUJ8ETfjrlUH5KrrlpMrkMyKTxzK//Um8a1sXwAbNQ6oSvJpiokkH9a6krbyr3id0krbWXa5R6snzgGvHQRPvJaqjjSoUxRB1E9qdDkkxIU0NNvKI6SNkKcZ3lDiIkyS1ZvpYnh865vO2GOvF2k5RdWWb92s7nDYmRGrjSmcU1x5CW/3QrYKWoFmEPAZ13CA5uBTKHZAmxHWkVCMU1yQUl4X+axnleTGDl0WGrvhQauKtii1q5FKiONc0bWOCaG4SIh+r913NWmhANUu7hBChcVdrLle3kdOWTH3JqxsobdN6tkLa6Uo1Q9MiqDqpypCa3FPqNggVq92QiwYrVkviQ1vFBokDquolt5mKtSKm1Ay+cC5w27mcgCMT5wwSRWR5JkE9AhgDISggCKCioAbVgAgY47DGachyvCpeHCpWjaYYa9RaJZcM52ONg9GuCSBGNU1ArHoJWiBWWp48LmspGtQNU6dJW5NGpq0oI6r0acVV9X8BXChrJiNQKxUAAAAASUVORK5CYII=",universalLink:"https://naanwallet.com",deepLink:"naan://"},{key:"autonomy-app",name:"Autonomy",shortName:"Autonomy",color:"",logo:"data:image/;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAIPElEQVR4AeXBe2yNdwPA8e/vdw5VdGmxJsV0SiKaLC5L3GLuySLZTObSLKOtS8XQHdritNWn+lTbHWXVRlyaoUhZOtFISJhLJAhxi6nJrOJadVDM5XC0nOd9+4dkked3ejunXu/5fITxXwQwSYCTBDhJgJMEOEmAkwQ4SYCTBDgrrejWrVtUVVVRzzAMDMPgXd26daNnz560FiutpLa2lhkzZvDq1StiY2ORUmJm1apVlJSUEBoaSmuw0kqKiopITU3lt99+48svvyQyMhIzgwcPJicnh/z8fFqDpBXcu3ePiooKxo0bh6Zp6LqOymeffUZdXR1//fUXrUHSCrKzs9E0jXrdunUjKiqKY8eOoZKRkUF2djatQeJn58+f56OPPqJXr168lZyczJo1a/B4PJjp3LkzQ4cOZe/evfibxI8Mw+Cnn34iNTWVf2vXrh3fffcdmzdvRmXu3Lls3ryZ2tpa/EniR2VlZYwfP56QkBDeNXnyZA4ePMiTJ08wY7VamT9/PoWFhfiTxE9evnxJWVkZcXFxqKSlpZGbm4vK2LFj+fPPP3E6nfiLxE/y8/NJTk5GSolKv379ePnyJX///Tcqmqah6zr+IvGD27dvc/v2bYYNG0ZDMjIyyM7ORiUqKopOnTpx9uxZ/EHiB7quo2kajfHxxx8zcOBADhw4gIrdbsfhcGAYBr4m8bETJ07Qo0cPPvnkExprwYIFbNy4kbq6Osx07NiRCRMmsGPHDnxN4kMej4eff/6ZlJQUmqJNmzYkJCSwbt06VKZNm0Z5eTkulwtfkvhQSUkJMTExBAcH01Tjx4/nzJkz1NTUYEYIwZIlS3A4HPiSxEeePn3K/v37mTJlCiqHDx+muLgYlYyMDLKzs1EZNGgQDx484Pr16/iKxEfy8vJITU1FCIGZuro65s+fT1JSElVVVZjp06cPQUFBXLx4ERVN08jKysJXJD5w9epVnj17xoABA1BZu3YtV65cweVysXTpUlTS0tLIzc1FJSIigujoaI4cOYIvSHxA13U0TUPlwYMH6LrOWzt37uTEiROYCQ0NZcyYMezevRsVm83G2rVref36NS0laaGDBw/Sr18/wsPDUcnIyOCff/7hLcMwsNlseDwezMyaNYvS0lLcbjdmgoKCiI+Pp7i4mJaStMDr169Zv349iYmJqFy4cIFffvmFd507d44tW7ZgxmKx8OOPP1JQUIDKhAkTOH78OI8ePaIlJC2wYcMGZs6cSdu2bVFZtGgRb968wUxaWhpPnjzBzMiRI6msrKS6uhqVZcuWsWLFClpC0kwPHz7k5MmTfPXVV6js2rWLo0ePonL//n10XUdF0zR0XUclOjoaKSWXLl2iuSTNtGLFCpYtW4aK2+1m8eLFeNOhQwfu3r3LlStXMPPpp58SHh7O6dOnUUlPTycnJ4fmkjTDpUuXsFgs9O3bF5XVq1dz48YNvLHb7RQVFaHrOipLly5l5cqVGIaBmbCwMEaNGkV5eTnNIWmGnJwc0tPTUblz5w55eXl4ExkZSXJyMl26dGHIkCHs27cPMx06dGDixImUlpaiMnv2bLZv347b7aapJE20Z88eRowYQVhYGCp2ux2Xy4U3DoeD4OBg6v3www9s2rSJ2tpazHz//ffs2bMHl8uFGYvFgs1mo6CggKaSNMGrV6/YunUrc+bMQeXUqVOUlpbizfDhw5k6dSpvWa1W5s2bR1FREWaEECxevBiHw4HKyJEjqayspLq6mqaQNEFhYSGJiYlYLBbMGIaBzWbDMAxUpJSsWbMGIQT/Nm7cOCoqKnA6nZgZNGgQ9+/f58aNG6hkZmaSlZVFU0gayel0cvnyZUaPHo3Ktm3bOH36NN7ExcXx+eefYyYzMxNd11HJzMwkKysLlcjISCIiIjh16hSNZaWRdF0nMzMTlefPn5OWloY3UkrGjBnDoUOHqOfxeHjL4/FQ7+bNm5SUlBAeHk49j8fDWx6Ph0ePHnHs2DG++OILzCxZsoTY2FjKysqQUtIQK41w9uxZOnXqRM+ePVHJzc2luroabxISEqjndDoRQiCEoJ4QAiEE9WJjYxFC8Pz5c4QQCCGoJ4RACEFcXBx9+vRBpX379kyePJlt27YRHx9PQ6w0wDAMHA4HW7ZsQeXatWsUFBTgTVRUFIWFhQQFBeFvMTExxMTEMGnSJEJCQvBG0oCdO3fy9ddf07FjR1RSUlJwu914k5+fT1BQEK1BCIHdbicvL4+GSLx48eIFu3fvZvr06agcOXKE8vJyvBk1ahTffvstrWngwIE8ffqUq1ev4o3Ei5UrV5KSkoIQAjNv3rxh4cKFeGOxWCgoKOB90DQNXdfxRqJw8+ZN7t69y5AhQ1ApLi6moqICb2bNmkX//v15H8LDw+nfvz+///47KlYUdF1H13VUHj9+jKZpeBMSEkJ6ejput5v3JSEhgWnTpjF69GjatGnDu6yY8Hg8OJ1Ounbtisry5cupqanBm2fPnhEZGcn7FhYWhsvlIjQ0lHdJTEgpiY+PZ+PGjZi5fPky69ev50Nht9sJDQ3FjERhypQpnDx5kqqqKt6VlJREXV0dH4Lu3buTmJiIisSLvLw8UlNT+be9e/dy4MABPhTLly8nODgYFYkXXbt2ZcSIEfz666/Uq62tJSkpiQ9FdHQ08fHxeCNpwOzZsykvL6empoaioiIqKyv5UOTm5mKxWPDGSgOEEOTk5LBgwQL279/Ph2LYsGF88803NMRKI/Tu3ZuhQ4fyxx9/EBERwf86IQSrVq2iMaw0ks1mw2az8f9GEuAkAU4S4CQBThLgJAFOEuAkAe4/IW7lge8FkmkAAAAASUVORK5CYII=",universalLink:"https://au.bitmark.com/apps/tezos",deepLink:"autonomy-tezos://"}];const O=()=>C,T=()=>k,R=()=>x,P=()=>B,N=new n.r,j=["ookjlbkiijinhpmnjffcofjonbfbgaoc","gpfndedineagiepkpinficbcbbgjoenn"];var D,L;!function(t){t[t.DESKTOP=0]="DESKTOP",t[t.IOS=1]="IOS",t[t.ANDROID=2]="ANDROID"}(D||(D={})),function(t){t.IOS="ios",t.ANDROID="android",t.EXTENSION="extension",t.DESKTOP="desktop",t.WEB="web"}(L||(L={}));class F{static getPlatfrom(){return M(this,void 0,void 0,(function*(){return _(window)?D.ANDROID:w(window)?D.IOS:D.DESKTOP}))}static getPairingInfo(t,e,r,n){return M(this,void 0,void 0,(function*(){const i=null!==n&&void 0!==n?n:yield F.getPlatfrom(),o=t.p2pSyncCode,a=t.postmessageSyncCode,s=t.preferredNetwork;switch(i){case D.DESKTOP:return F.getDesktopPairingAlert(o,e,a,r,s);case D.IOS:return F.getIOSPairingAlert(o,e,s);case D.ANDROID:return F.getAndroidPairingAlert(o,e,s);default:throw new Error("platform unknown")}}))}static getDesktopPairingAlert(t,e,r,i,a){return M(this,void 0,void 0,(function*(){const s=yield g.getAvailableExtensions();s.forEach((t=>{const e=j.indexOf(t.id);e>=0&&j.splice(e,1)}));const u=[];return T().length>0&&u.push({title:"Browser Extensions",type:L.EXTENSION,wallets:[...s.map((t=>{var i,a,s,u,c;const l=T().find((e=>e.id===t.id));return{key:null!==(i=null===l||void 0===l?void 0:l.key)&&void 0!==i?i:t.id,name:null!==(a=t.name)&&void 0!==a?a:null===l||void 0===l?void 0:l.name,logo:null!==(s=t.iconUrl)&&void 0!==s?s:null===l||void 0===l?void 0:l.logo,shortName:null!==(u=t.shortName)&&void 0!==u?u:null===l||void 0===l?void 0:l.shortName,color:null!==(c=t.color)&&void 0!==c?c:null===l||void 0===l?void 0:l.color,enabled:!0,clicked:!1,clickHandler(){return M(this,void 0,void 0,(function*(){if(!this.clicked){if(this.clicked=!0,r){const e=yield N.serialize(yield r()),i={target:o.d.EXTENSION,payload:e,targetId:t.id};n.z.postMessage(i,n.z.location.origin)}e(L.EXTENSION,this)}}))}}})),...T().filter((t=>j.some((e=>e===t.id)))).map((t=>({key:t.key,name:t.name,shortName:t.shortName,color:t.color,logo:t.logo,enabled:!1,clickHandler:()=>{}})))].sort(((t,e)=>t.key.localeCompare(e.key)))}),O().length>0&&u.push({title:"Desktop & Web Wallets",type:L.DESKTOP,wallets:[...O().map((r=>({key:r.key,name:r.name,shortName:r.shortName,color:r.color,logo:r.logo,enabled:!0,clicked:!1,clickHandler(){return M(this,void 0,void 0,(function*(){if(this.clicked)return;this.clicked=!0;const n=yield N.serialize(yield t()),i=S(r.deepLink,n);window.open(i,"_blank"),e(L.DESKTOP,this,!0)}))}}))),...yield F.getWebList(t,e,a)].sort(((t,e)=>t.key.localeCompare(e.key)))}),P().length>0&&u.push({title:"Mobile Wallets",type:L.IOS,wallets:[...P().map((r=>({key:r.key,name:r.name,shortName:r.shortName,color:r.color,logo:r.logo,enabled:!0,clicked:!1,clickHandler(){return M(this,void 0,void 0,(function*(){if(this.clicked)return;this.clicked=!0;const r=yield N.serialize(yield t());i(r),e(L.IOS,this,!0)}))}})))].sort(((t,e)=>t.key.localeCompare(e.key)))}),{walletLists:u,buttons:[]}}))}static getIOSPairingAlert(t,e,r){return M(this,void 0,void 0,(function*(){return{walletLists:[{title:"Mobile Wallets",type:L.IOS,wallets:P().map((r=>({key:r.key,name:r.name,shortName:r.shortName,color:r.color,logo:r.logo,enabled:!0,clicked:!1,clickHandler(){var n;return M(this,void 0,void 0,(function*(){if(this.clicked)return;this.clicked=!0;const i=yield N.serialize(yield t()),o=S(null!==(n=r.deepLink)&&void 0!==n?n:r.universalLink,i),a=document.createElement("a");a.setAttribute("href",o),a.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0})),e(L.IOS,this,!0)}))}}))).sort(((t,e)=>t.key.localeCompare(e.key)))},{title:"Web Wallets",type:L.WEB,wallets:[...yield F.getWebList(t,e,r)].sort(((t,e)=>t.key.localeCompare(e.key)))}],buttons:[]}}))}static getAndroidPairingAlert(t,e,r){return M(this,void 0,void 0,(function*(){return{walletLists:[{title:"Web Wallets",type:L.WEB,wallets:[...yield F.getWebList(t,e,r)].sort(((t,e)=>t.key.localeCompare(e.key)))}],buttons:[{title:"Mobile Wallets",text:"Connect Wallet",clickHandler:()=>M(this,void 0,void 0,(function*(){const r=yield N.serialize(yield t()),n=S("tezos://",r);window.open(n,"_blank"),e(L.ANDROID)}))}]}}))}static getWebList(t,e,r){return M(this,void 0,void 0,(function*(){return R().map((n=>({key:n.key,name:n.name,shortName:n.shortName,color:n.color,logo:n.logo,enabled:!0,clicked:!1,clickHandler(){if(this.clicked)return;this.clicked=!0;const i=window.open("","_blank");t().then((t=>N.serialize(t))).then((t=>{var a;const s=S(null!==(a=n.links[r])&&void 0!==a?a:n.links[o.e.MAINNET],t);i?i.location.href=s:window.open(s,"_blank"),e(L.WEB,this,!0)})).catch((t=>{console.error(t)}))}}))).sort(((t,e)=>t.key.localeCompare(e.key)))}))}}const U=(t,e,r,n)=>{const i=document.createElement(t);return e.length>0&&i.classList.add(...e.filter((t=>!!t)).map((t=>z(t)))),r.forEach((t=>{i.setAttribute(z(t[0]),z(t[1]))})),"object"===typeof n&&Array.isArray(n)?n.filter((t=>!!t)).forEach((t=>{i.appendChild(t)})):"string"===typeof n&&(i.innerText=n),i},Q=(t,e,r)=>{const n=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.length>0&&n.classList.add(...t.filter((t=>!!t))),e.forEach((t=>{n.setAttribute(z(t[0]),z(t[1]))})),"object"===typeof r&&Array.isArray(r)&&r.filter((t=>!!t)).forEach((t=>{n.appendChild(t)})),n},G=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","path");return t.forEach((t=>{e.setAttribute(z(t[0]),z(t[1]))})),e},H=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","g");return t.filter((t=>!!t)).forEach((t=>{e.appendChild(t)})),e},z=t=>{const e=document.createElement("div");return e.innerText=t,e.innerHTML},q=t=>{t.innerHTML=""};var K=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const V=new n.j("Alert"),W=new n.r,J=(t,e,r)=>K(void 0,void 0,void 0,(function*(){const i=()=>K(void 0,void 0,void 0,(function*(){return F.getPairingInfo(r,((t,e,r)=>K(void 0,void 0,void 0,(function*(){r||(yield at())}))),(()=>K(void 0,void 0,void 0,(function*(){x()}))))})),o=yield i(),a=e.getElementById("pairing-container");if(!a)throw new Error("container not found");const s=document.createElement("span");a.appendChild(s),o.buttons.forEach((t=>K(void 0,void 0,void 0,(function*(){const r=yield Object(m.e)(),n=U("div",["beacon-list__title"],[],t.title),i=U("button",["beacon-modal__button","connect__btn"],[],t.text),o=document.createElement("a");o.id="button_".concat(r),o.appendChild(n),o.appendChild(i),s.appendChild(o);const a=e.getElementById(o.id);a&&a.addEventListener("click",(()=>K(void 0,void 0,void 0,(function*(){t.clickHandler()}))))}))));const u=document.createElement("span");a.appendChild(u);const c=t=>{q(u),t.forEach((t=>{const r=document.createElement("div");r.classList.add("beacon-list__wrapper"),u.appendChild(r),r.appendChild(U("div",["beacon-list__title"],[],t.title));const n=document.createElement("span");r.appendChild(n),t.wallets.forEach((r=>K(void 0,void 0,void 0,(function*(){((t,r,n)=>{const i="Open in ".concat(n.name),o=n.key,a=n.logo?U("div",[],[],[U("img",["beacon-selection__img"],[["src",n.logo]],"")]):Q(["beacon-selection__img","svg-inline--fa","fa-wallet","fa-w-16"],[["aria-hidden","true"],["focusable","false"],["data-prefix","fas"],["data-icon","wallet"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 512 512"],["style","enable-background:new 0 0 512 512;"],["xml:space","preserve"]],[G([["d","M376.2,181H152.9c-5.2,0-9.4-4.2-9.4-9.4s4.2-9.4,9.4-9.4h225c5.2,0,9.4-4.2,9.4-9.4c0-15.5-12.6-28.1-28.1-28.1H143.5c-20.7,0-37.5,16.8-37.5,37.5v187.5c0,20.7,16.8,37.5,37.5,37.5h232.7c16.4,0,29.8-12.6,29.8-28.1v-150C406,193.6,392.7,181,376.2,181z M349.8,302.9c-10.4,0-18.8-8.4-18.8-18.8s8.4-18.8,18.8-18.8s18.8,8.4,18.8,18.8S360.1,302.9,349.8,302.9z"]])]),s=U("div",["beacon-selection__name"],[],[U("span",[],[],n.name),n.enabled?void 0:U("p",[],[],"Not installed")]),u=U("a",["beacon-selection__list",n.enabled?"":"disabled"],[["tabindex","0"],["id","wallet_".concat(o)],["alt",i],["target","_blank"]],[s,a]),c=document.createElement("span");c.appendChild(u),t.appendChild(c);const l=e.getElementById("wallet_".concat(o)),f=t=>K(void 0,void 0,void 0,(function*(){if(t&&"Enter"!==t.key)return;n.clickHandler();const i=e.getElementById("beacon-modal__content");i&&r!==L.EXTENSION&&r!==L.IOS&&(q(i),i.appendChild(U("p",["beacon-alert__title"],[],"Establishing Connection..")),i.appendChild(U("div",["progress-line"],[["id","beacon-toast-loader"]],"")),i.appendChild(U("div",["beacon--selected__container"],[],[...n.logo?[U("img",["beacon-selection__img"],[["src",n.logo]],""),U("img",["beacon--selection__name__lg"],[],n.name)]:[]])))}));l&&(l.addEventListener("click",(()=>f())),l.addEventListener("keydown",f))})(n,t.type,r)}))))}))};c(o.walletLists);const l=t=>K(void 0,void 0,void 0,(function*(){if("extensionsUpdated"===t.data){const t=yield i();c(t.walletLists)}}));let f;f=e=>{e.data==="closeAlert-".concat(t)&&(n.z.removeEventListener("message",l),n.z.removeEventListener("message",f))},n.z.addEventListener("message",l),n.z.addEventListener("message",f);const h=e.getElementById("beacon--qr__container"),d=e.getElementById("beacon--qr__copy"),p=e.getElementById("beacon-title"),g=_(window)?"android":w(window)?"ios":"desktop",y=e.getElementById("beacon-main-text"),b=e.getElementById("pairing-container"),v=e.getElementById("beacon--switch__container"),A=()=>K(void 0,void 0,void 0,(function*(){const t=r?yield W.serialize(yield r.p2pSyncCode()):"";navigator.clipboard.writeText(t).then((()=>{d&&(d.innerText="Copied"),V.log("Copying to clipboard was successful!")}),(t=>{V.error("Could not copy text to clipboard: ",t)}))}));let M=!1;const C=t=>K(void 0,void 0,void 0,(function*(){const n=e.getElementById("beacon-switch");if(n&&(n.innerText="none"===t?"Pair wallet on same device":"Pair wallet on another device"),y&&b&&v&&d&&h&&p)switch(y.style.display="none",p.style.textAlign="center",b.style.display="none",v.style.display="initial",t){case"ios":case"android":b.style.display="initial";break;case"desktop":b.style.display="initial",p.style.textAlign="left",y.style.display="none",v.style.display="initial";break;default:if(!M){M=!0;const t=yield W.serialize(yield r.p2pSyncCode()),e=((t,e)=>{const r=E(0,"L");t.length>500&&I.warn("getQrData",'The size of the payload in the QR code is quite long and some devices might not be able to scan it anymore. To reduce the QR size, try using a shorter "name", "appUrl" and "iconUrl"');try{if(r.addData(t),r.make(),"svg"===e)return r.createSvgTag();if("ascii"===e){const t=r.getModuleCount(),e="\x1b[40m \x1b[0m",n="\x1b[47m \x1b[0m",i=new Array(t+3).join(n),o=new Array(t+3).join(e);let a="";a+="".concat(o,"\n"),a+="".concat(i,"\n");for(let s=0;s{C(k?"none":g),k=!k};x();{const t=e.getElementById("beacon-switch");t&&t.addEventListener("click",x)}}));let Y=o.c.LIGHT;const X=t=>{Y=t},Z=()=>Y,$=(t,e,r,n)=>U("div",["beacon-alert__base","animated","fadeIn"],[["id","beacon-alert-modal-".concat(t)]],[U("div",["beacon-modal__wrapper"],[],[U("div",["beacon-modal__header"],[],[Q([],[["xmlns","http://www.w3.org/2000/svg"],["id","Guides"],["x","0"],["y","0"],["version","1.1"],["viewBox","0 0 179.2 43"],["xml:space","preserve"],["width","140"],["height","40"]],[U("style",[],[],".st0 {\n fill: #3880ff;\n }\n .st1 {\n fill: #fff;\n }"),G([["d","M45 19v.9c0 .3-.2 7.5-3.4 13.2-3.3 5.6-9.4 9.3-9.7 9.5l-.8.4-1.3-.8-7.6-4.4c-.5-.3-.9-.6-1.4-.9-.4-.3-.7-.5-1.1-.8-.8-.7-1.5-1.4-2.1-2.2-.9-1.1-1.6-2.4-2.1-3.7-.9-2.3-1.3-4.8-1.2-7.5.8-.4 1.6-.6 2.4-.6h.6c-.2 2.4.1 4.6.8 6.6 1 2.8 2.9 5.1 5.5 6.6l7.4 4.3c.2-.1.4-.2.6-.4 1.9-1.3 5.3-4.1 7.3-7.6 2.2-3.9 2.8-8.9 3-10.8L38.8 19c.3-1 .4-2.1.5-3.2L45 19z"],["class","st0"]]),G([["d","M36.3 4.1v10.3c0 .5 0 1.1-.1 1.6s-.1.9-.2 1.3c-.2 1-.5 2-.9 3-.5 1.3-1.3 2.6-2.2 3.7-1.5 1.9-3.5 3.6-5.9 4.8-.9-.6-1.6-1.3-2-2.4 2.1-1 3.9-2.3 5.2-4 1.9-2.3 3-5.1 3-8.1V5.9l-.6-.3c-2-1-6.1-2.6-10.1-2.6-4.5 0-9.1 2-10.9 2.9v3.6c-1 .3-2 .7-3 1.1V4.1l.8-.4C9.7 3.5 16 0 22.5 0s12.8 3.5 13.1 3.6l.7.5z"],["class","st0"]]),G([["d","M10.5 16.5l-7.4 4.3v.7c.2 2.1.9 6.5 2.9 10 2.2 3.9 6.2 6.9 7.9 8l3.1-1.8c.8.7 1.6 1.4 2.5 2L13.8 43l-.8-.5c-.3-.2-6.4-3.9-9.7-9.5C.1 27.4 0 20.2 0 19.9V19l1.3-.8L9 13.9c.5-.3.9-.5 1.4-.7.4-.2.8-.4 1.3-.5 1-.4 2-.6 3-.7 1.4-.2 2.9-.2 4.3 0 2.4.3 4.8 1.2 7.1 2.7 0 1-.4 2-1 2.9-1.9-1.3-4-2.2-6-2.5-3.1-.6-6-.1-8.6 1.4z"],["class","st0"]]),H([G([["d","M73.9 23c.9 1 1.3 2.3 1.3 3.7 0 1.9-.6 3.4-1.9 4.5-1.3 1.1-3.1 1.7-5.5 1.7h-8.6v-23h8.4c2.3 0 4.1.5 5.3 1.5 1.2 1 1.8 2.4 1.8 4.2 0 1.5-.4 2.7-1.2 3.6-.8.9-1.8 1.5-3.1 1.8 1.5.3 2.6 1 3.5 2zm-11.7-3h5c1.5 0 2.6-.3 3.4-1 .8-.7 1.2-1.6 1.2-2.8 0-1.2-.4-2.1-1.1-2.8-.8-.7-1.9-1-3.5-1h-4.8V20zm8.7 9.4c.9-.7 1.3-1.7 1.3-3s-.4-2.3-1.3-3c-.9-.7-2.1-1.1-3.7-1.1h-5v8.2h5c1.6-.1 2.8-.4 3.7-1.1zM95.3 24.6H81c.1 2.1.6 3.6 1.7 4.6s2.4 1.5 4 1.5c1.4 0 2.6-.4 3.6-1.1 1-.7 1.6-1.7 1.8-2.9h3.2c-.2 1.2-.7 2.4-1.5 3.3-.8 1-1.7 1.7-2.9 2.3-1.2.5-2.6.8-4.1.8-1.7 0-3.2-.4-4.6-1.1-1.3-.7-2.4-1.8-3.1-3.2-.8-1.4-1.1-3-1.1-4.9 0-1.9.4-3.5 1.1-4.9.8-1.4 1.8-2.5 3.1-3.2 1.3-.7 2.9-1.1 4.6-1.1 1.7 0 3.3.4 4.6 1.1 1.3.7 2.3 1.7 3 3 .7 1.2 1 2.6 1 4.1.1.7 0 1.2-.1 1.7zm-3.5-4.8c-.5-.9-1.2-1.6-2.1-2-.9-.4-1.8-.7-2.8-.7-1.6 0-3 .5-4.1 1.5-1.1 1-1.7 2.5-1.8 4.5h11.5c0-1.3-.2-2.4-.7-3.3zM111.2 16c1.2.9 2.1 2 2.5 3.5V15h3v18h-3v-4.6c-.5 1.5-1.3 2.6-2.5 3.5-1.2.9-2.7 1.3-4.4 1.3-1.6 0-3-.4-4.3-1.1-1.2-.7-2.2-1.8-2.9-3.2-.7-1.4-1.1-3-1.1-4.9 0-1.9.4-3.5 1.1-4.9.7-1.4 1.7-2.5 2.9-3.2 1.2-.7 2.7-1.1 4.3-1.1 1.7-.1 3.1.4 4.4 1.2zm-8 3.1c-1.1 1.2-1.7 2.8-1.7 4.8 0 2.1.5 3.7 1.7 4.8 1.1 1.2 2.6 1.8 4.4 1.8 1.2 0 2.2-.3 3.2-.8.9-.5 1.7-1.3 2.2-2.3.5-1 .8-2.1.8-3.5 0-1.3-.3-2.5-.8-3.5s-1.2-1.8-2.2-2.3c-.9-.5-2-.8-3.2-.8-1.9.1-3.3.7-4.4 1.8zM135 16.6c1.5 1.2 2.4 2.9 2.8 4.9h-3.1c-.2-1.3-.8-2.3-1.8-3-1-.7-2.2-1.1-3.6-1.1-1 0-2 .2-2.9.7-.9.5-1.6 1.2-2.1 2.2-.5 1-.8 2.2-.8 3.7s.3 2.7.8 3.7 1.2 1.7 2.1 2.2c.9.5 1.8.7 2.9.7 1.4 0 2.6-.4 3.6-1.1 1-.7 1.6-1.8 1.8-3h3.1c-.3 2.1-1.3 3.7-2.8 4.9-1.5 1.2-3.4 1.8-5.7 1.8-1.7 0-3.2-.4-4.6-1.1-1.3-.7-2.4-1.8-3.1-3.2-.8-1.4-1.1-3-1.1-4.9 0-1.9.4-3.5 1.1-4.9.8-1.4 1.8-2.5 3.1-3.2 1.3-.7 2.9-1.1 4.6-1.1 2.3-.1 4.2.6 5.7 1.8zM154.5 15.9c1.4.7 2.4 1.8 3.2 3.2.8 1.4 1.2 3 1.2 4.9 0 1.9-.4 3.5-1.2 4.9-.8 1.4-1.8 2.4-3.2 3.2-1.4.7-2.9 1.1-4.6 1.1-1.7 0-3.3-.4-4.6-1.1-1.4-.7-2.4-1.8-3.2-3.2-.8-1.4-1.2-3-1.2-4.9 0-1.9.4-3.5 1.2-4.9.8-1.4 1.9-2.5 3.2-3.2 1.4-.7 2.9-1.1 4.6-1.1 1.7-.1 3.2.3 4.6 1.1zm-7.6 2.2c-.9.5-1.6 1.2-2.2 2.2-.6 1-.8 2.2-.8 3.7 0 1.4.3 2.7.8 3.6.6 1 1.3 1.7 2.2 2.2.9.5 1.9.7 3 .7s2.1-.2 3-.7c.9-.5 1.6-1.2 2.2-2.2.6-1 .8-2.2.8-3.6 0-1.5-.3-2.7-.8-3.7-.6-1-1.3-1.7-2.2-2.2-.9-.5-1.9-.7-3-.7s-2.1.2-3 .7zM177.3 16.7c1.3 1.3 1.9 3.3 1.9 5.8v10.4h-3V22.8c0-1.8-.5-3.2-1.4-4.1-.9-1-2.2-1.4-3.7-1.4-1.6 0-2.9.5-3.9 1.6s-1.5 2.6-1.5 4.6V33h-3V15h3v4.3c.5-1.5 1.3-2.6 2.4-3.4 1.2-.8 2.5-1.2 4-1.2 2.2 0 3.9.6 5.2 2z"],["class","st1"]])])]),U("div",["beacon-modal__close__wrapper"],[["id","beacon-alert-".concat(t,"-close")]],[U("div",["beacon-modal__close__icon"],[],[U("div",["beacon-modal__close__line1"],[],[]),U("div",["beacon-modal__close__line2"],[],[])])])]),U("div",["beacon-modal__base"],[],[U("div",[],[["id","beacon-modal__content"]],[U("div",[],[],[U("p",["beacon-alert__title"],[],e),...n,U("div",["beacon-action__container"],[],r)])])])])]);var tt=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};let et,rt;"undefined"!==typeof window&&"undefined"!==typeof window.document&&(rt=window.document);const nt={},it=(t,e,r,n,i)=>{const o=r,a=n.map(((e,r)=>U("button",["beacon-modal__button".concat("outline"===e.style?"--outline":"")],[["id","beacon-alert-".concat(t,"-").concat(r)]],e.text)));let s=y.css;i&&(s+=b.css);const u=U("span",[],[],o),c=i?((t,e,r,n)=>$(t,e,r,[U("span",[],[["id","pairing-container"]],""),U("div",["beacon-alert__text"],[["id","beacon-main-text"]],[U("p",["beacon-list__title"],[["id","beacon-title"]],[document.createTextNode("Scan QR code with a Beacon-compatible wallet.\xa0"),U("a",[],[["href","https://docs.walletbeacon.io/supported-wallets"],["target","_blank"]],"Learn more"),...n])]),U("div",[],[["id","beacon--switch__container"]],[U("button",["beacon-modal__button--outline"],[["id","beacon-switch"]],"")]),U("div",[],[["id","beacon--disclaimer"]],"")]))(t,[u],a,[e]):((t,e,r,n)=>$(t,e,r,[U("div",["beacon-alert__text"],[["id","beacon-main-text"]],n)]))(t,[u],a,[e]);return{style:s,html:c}},ot=t=>(n.z.postMessage("closeAlert-".concat(t)),new Promise((e=>{var r;const n=rt.getElementById("beacon-alert-wrapper-".concat(t));if(!n)return e();const i=null===(r=n.shadowRoot)||void 0===r?void 0:r.getElementById("beacon-alert-modal-".concat(t));if(i){const r=300,o=nt[t];o&&(clearTimeout(o),nt[t]=void 0),i.className=i.className.replace("fadeIn","fadeOut"),window.setTimeout((()=>{const t=n.parentNode;t&&t.removeChild(n),et&&et.focus(),e()}),r)}else e()}))),at=()=>tt(void 0,void 0,void 0,(function*(){return new Promise((t=>tt(void 0,void 0,void 0,(function*(){const e=rt.querySelectorAll('[id^="beacon-alert-wrapper-"]');if(e.length>0){const r=[];e.forEach((t=>tt(void 0,void 0,void 0,(function*(){r.push(t.id.split("-")[3])})))),yield Promise.all(r.map(ot)),t()}else t()}))))})),st=t=>tt(void 0,void 0,void 0,(function*(){var e,r;const n=t.body,i=t.data,o=t.title,a=t.timer,s=t.pairingPayload,u=t.disclaimerText,c=t.closeButtonCallback;yield at();const l=(yield Object(m.e)()).split("-").join(""),f=rt.createElement("div");f.setAttribute("id","beacon-alert-wrapper-".concat(l));const h=f.attachShadow({mode:"open"}),d=rt.createElement("div");d.setAttribute("tabindex","0"),h.appendChild(d);const p=[...null!==(r=null===(e=t.buttons)||void 0===e?void 0:e.map((t=>{var e,r;return{text:t.text,actionCallback:null!==(e=t.actionCallback)&&void 0!==e?e:()=>Promise.resolve(),style:null!==(r=t.style)&&void 0!==r?r:"outline"}})))&&void 0!==r?r:[]];let g=s?"string"===typeof n?U("div",[],[["id","beacon--qr__container"]],[U("div",[],[["id","beacon--qr__copy__container"]],[U("button",["beacon-modal__button--outline"],[["id","beacon--qr__copy"]],"Copy")])]):U("span",[],[],""):U("span",[],[],null!==n&&void 0!==n?n:"");i&&(g=U("span",[],[],[g,U("pre",[],[["style","text-align: left"]],i)]));const{style:y,html:b}=it(l,g,o,p,!!(null===s||void 0===s?void 0:s.p2pSyncCode));d.appendChild(b);const v=rt.createElement("style");v.textContent=y,h.appendChild(v),a&&(nt[l]=window.setTimeout((()=>tt(void 0,void 0,void 0,(function*(){yield ot(l)}))),a)),rt.body.prepend(f);const A=h.getElementById("beacon-alert-".concat(l,"-close")),w=()=>tt(void 0,void 0,void 0,(function*(){c&&c(),yield ot(l)}));if(u){const t=h.getElementById("beacon--disclaimer");t&&(t.innerText=u)}const _=Z(),E=h.getElementById("beacon-alert-modal-".concat(l));E&&(E.classList.add("theme__".concat(_)),E.addEventListener("click",w));const I=h.querySelectorAll(".beacon-modal__wrapper");return I.length>0&&I[0].addEventListener("click",(t=>{t.stopPropagation()})),et=rt.activeElement,d.focus(),p.forEach(((t,e)=>{const r=h.getElementById("beacon-alert-".concat(l,"-").concat(e));r&&r.addEventListener("click",(()=>tt(void 0,void 0,void 0,(function*(){yield ot(l),t.actionCallback&&(yield t.actionCallback())}))))})),A&&A.addEventListener("click",(()=>tt(void 0,void 0,void 0,(function*(){yield w()})))),window.addEventListener("keydown",(t=>tt(void 0,void 0,void 0,(function*(){"Escape"===t.key&&(yield w())})))),s&&(yield J(l,h,s)),l})),ut={css:":host {\n --animation-duration: 300ms;\n all: initial;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n.beacon-toast__base {\n position: fixed;\n top: 16px;\n right: 16px;\n z-index: 2147483000;\n margin: 0 auto;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1);\n flex-direction: column;\n}\n@media (max-width: 576px) {\n .beacon-toast__base {\n top: 8px;\n right: 8px;\n left: 8px;\n }\n .beacon-toast__wallet__outer {\n flex-wrap: wrap;\n }\n .beacon-toast__wallet__link {\n display: flex;\n margin-left: 12px !important;\n }\n}\n\n.theme__light.beacon-toast__base {\n background: #fff;\n}\n\n.theme__dark.beacon-toast__base {\n background: #27334c;\n}\n\n.theme__dark p {\n color: #6183ff;\n}\n\na {\n text-decoration: none;\n color: #3880ff;\n}\n\na svg {\n width: 12px;\n margin-left: 2px;\n}\n\na:visited {\n color: #3880ff;\n}\n\nhr {\n height: 1px;\n color: rgba(0, 0, 0, 0.12);\n background-color: rgba(0, 0, 0, 0.12);\n border: none;\n width: 100%;\n margin: 0;\n display: none;\n}\n\n.show {\n display: block !important;\n}\n\n.hide {\n display: none !important;\n}\n\n#beacon-toast-list {\n display: none;\n}\n\n.beacon-toast__upside_down {\n transform: rotate(180deg);\n}\n\n.beacon-toast__content {\n justify-content: space-between;\n min-height: 56px;\n height: 0;\n}\n\n.beacon-toast__action__item,\n.beacon-toast__powered a,\n.beacon-toast__wallet__container,\n#beacon-text,\n.beacon-toast__action__item p,\n.beacon-toast__wallet__outer {\n align-items: center;\n}\n\n.beacon-toast__content,\n.beacon-toast__base,\n.beacon-toast__action__item,\n.beacon-toast__powered a,\n#beacon-text,\n.beacon-toast__wallet__container,\n.beacon-toast__wallet__outer {\n display: flex;\n}\n\n.beacon-toast__content,\n.beacon-toast__action__item,\n.beacon-toast__powered a {\n padding: 0 16px;\n font-family: Roboto, Helvetica, sans-serif;\n}\n\n#beacon-text strong {\n display: contents;\n}\n.beacon-toast__wallet__link {\n margin-left: 8px;\n}\n.beacon-toast__wallet__link svg {\n margin-left: 4px;\n}\n.beacon-toast__powered a {\n margin: 4px 0 12px;\n font-size: 12px;\n opacity: 0.64;\n}\n\n.beacon-toast__powered svg {\n width: 20px;\n height: 20px;\n margin: 0 2px 0 4px;\n}\n\n.beacon-toast__action__item {\n font-size: 14px;\n max-width: 40ch;\n}\n\n.beacon-toast__action__item p {\n margin-right: 8px;\n}\n\n.beacon-toast__action__item__subtitle,\n.beacon-toast__powered a {\n min-width: 88px;\n color: rgba(0, 0, 0, 0.54);\n}\n\n.theme__dark .beacon-toast__powered a {\n color: #7c99d6;\n}\n\n.beacon-toast__content__img {\n width: 24px;\n height: 24px;\n margin-right: 4px;\n image-rendering: -moz-crisp-edges; /* Firefox */\n image-rendering: -o-crisp-edges; /* Opera */\n image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming) */\n image-rendering: crisp-edges;\n -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */\n}\n\n.beacon-toast__more {\n width: 14px;\n transition: transform 0.5s;\n}\n\na,\n.beacon-toast__more {\n cursor: pointer;\n}\n\na:hover {\n opacity: 0.64;\n}\n\n.theme__dark .beacon-toast__more {\n color: #7c99d6;\n}\n\n.beacon-toast__more--action {\n margin: 8px 0;\n}\n\n#beacon-text {\n padding-right: 24px;\n}\n\n#beacon-text-content {\n display: flex;\n align-items: center;\n}\n\n.progress-line,\n.progress-line:before {\n height: 3px;\n width: 100%;\n margin: 0;\n}\n.progress-line {\n background-color: #a7c4f7;\n display: -webkit-flex;\n display: flex;\n}\n.progress-line:before {\n background-color: #3880ff;\n content: '';\n -webkit-animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n}\n@-webkit-keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n@keyframes running-progress {\n 0% {\n margin-left: 0px;\n margin-right: 100%;\n }\n 50% {\n margin-left: 25%;\n margin-right: 0%;\n }\n 100% {\n margin-left: 100%;\n margin-right: 0;\n }\n}\n"};var ct=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};let lt;"undefined"!==typeof window&&"undefined"!==typeof window.document&&(lt=window.document);let ft,ht,dt;const pt=t=>{for(;t.firstChild;)t.removeChild(t.firstChild)},gt=t=>{var e,r;const n=null===(e=null===dt||void 0===dt?void 0:dt.walletInfo)||void 0===e?void 0:e.icon,i=null===(r=null===dt||void 0===dt?void 0:dt.walletInfo)||void 0===r?void 0:r.name;let o;const a=U("strong",[],[],null!==i&&void 0!==i?i:"Wallet");o=n?U("span",["beacon-toast__wallet__container"],[],[U("img",["beacon-toast__content__img"],[["src",n]],""),a]):a;const s=t.split("{{wallet}}");if(1===s.length)return[U("span",[],[],t)];{const t=[];for(let e=0;e{const e=t.body,r=gt(e),n=(t=>U("div",["beacon-toast__base","animated","fadeIn"],[["id","beacon-toast"]],[U("div",["beacon-toast__content"],[],[U("span",[],[["id","beacon-text"]],[U("p",[],[["id","beacon-text-content"]],t),U("a",["beacon-toast__wallet__link"],[["id","beacon-open-wallet"]],[U("span",[],[],"Open"),Q(["svg-inline--fa","fa-external-link-alt","fa-w-16"],[["aria-hidden","true"],["focusable","false"],["data-prefix","fas"],["data-icon","external-link-alt"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 512 512"]],[G([["fill","currentColor"],["d","M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"]])])])]),Q(["beacon-toast__more","svg-inline--fa","fa-angle-down","fa-w-10"],[["id","beacon-toast-button-expand"],["aria-hidden","true"],["focusable","false"],["data-prefix","fas"],["data-icon","angle-down"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 320 512"]],[G([["fill","currentColor"],["d","M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z"]])]),Q(["beacon-toast__more","svg-inline--fa","fa-times","fa-w-10"],[["id","beacon-toast-button-close"],["aria-hidden","true"],["focusable","false"],["data-prefix","fal"],["data-icon","times"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 320 512"]],[G([["fill","currentColor"],["d","M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z"]])])]),U("div",["progress-line"],[["id","beacon-toast-loader"]],""),U("hr",["hide"],[["id","beacon-toast-loader-placeholder"]],""),U("div",["beacon-toast__more--action"],[["id","beacon-toast-list"]],"")]))([U("span",["beacon-toast__wallet__outer"],[],r)]);return{style:ut.css,html:n}},yt=()=>new Promise((t=>{var e;dt=void 0;const r=lt.getElementById("beacon-toast-wrapper");if(!r)return t();const n=null===(e=r.shadowRoot)||void 0===e?void 0:e.getElementById("beacon-toast");if(n){const e=300;ft&&(clearTimeout(ft),ft=void 0),n.className=n.className.replace("fadeIn","fadeOut"),window.setTimeout((()=>{const e=r.parentNode;e&&e.removeChild(r),t()}),e)}else t()})),bt=(t,e,r)=>{const n=t.getElementById(e);return n&&n.addEventListener("click",(()=>ct(void 0,void 0,void 0,(function*(){yield r(n)})))),n},vt=(t,e)=>{const r=t.getElementById(e);r&&(r.classList.remove("hide"),r.classList.add("show"))},At=(t,e)=>{const r=t.getElementById(e);r&&(r.classList.add("hide"),r.classList.remove("show"))},wt=t=>{vt(t,"beacon-toast-button-close"),At(t,"beacon-toast-button-expand")},_t=t=>{const e=t.getElementById("beacon-toast-button-expand"),r=t.getElementById("beacon-toast-list");e&&r&&(e.classList.remove("beacon-toast__upside_down"),r.classList.add("hide"),r.classList.remove("show"))},Et=t=>{const e=t.getElementById("beacon-toast-button-expand"),r=t.getElementById("beacon-toast-list");e&&r&&(e.classList.add("beacon-toast__upside_down"),r.classList.remove("hide"),r.classList.add("show"))},It=t=>{const e=t.getElementById("beacon-toast-button-expand"),r=t.getElementById("beacon-toast-list");e&&r&&(e.classList.contains("beacon-toast__upside_down")?_t(t):Et(t))},St=(t,e,r)=>ct(void 0,void 0,void 0,(function*(){const n=e.actions;if(n&&n.length>0){const e=n.map((t=>ct(void 0,void 0,void 0,(function*(){return e=t,ct(void 0,void 0,void 0,(function*(){const{text:t,isBold:r,actionText:n,actionLogo:i,actionCallback:o}=e,a=yield Object(m.e)(),s=lt.createElement("div");s.classList.add("beacon-toast__action__item"),pt(s);const u=t=>U("strong",[],[],t);if(o){t.length>0&&s.appendChild(U("p",[],[],t));const e=U("span",[],[],[U("span",[],[],n),i&&"external"===i?Q(["svg-inline--fa","fa-external-link-alt","fa-w-16"],[["aria-hidden","true"],["focusable","false"],["data-prefix","fas"],["data-icon","external-link-alt"],["role","img"],["xmlns","http://www.w3.org/2000/svg"],["viewBox","0 0 512 512"]],[G([["fill","currentColor"],["d","M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"]])]):void 0]);s.appendChild(U("p",[],[],[U("a",[],[["id",a]],[r?u([e]):e])]))}else if(n){t.length>0&&s.appendChild(U("p",["beacon-toast__action__item__subtitle"],[],t));const e=U("span",[],[],n);s.appendChild(U("p",[],[],[r?u([e]):e]))}else{const e=U("p",[],[],t);s.appendChild(r?u([e]):e)}return o&&s.addEventListener("click",o),s}));var e}))));(yield Promise.all(e)).forEach((t=>r.appendChild(t)));const i=lt.createElement("small");i.classList.add("beacon-toast__powered"),i.appendChild(U("a",[],[["href","https://walletbeacon.io"],["target","_blank"]],[document.createTextNode("powered by"),Q([],[["id","f63e95a9-fd19-4487-bc1a-09eb2f066704"],["data-name","Guides"],["xmlns","http://www.w3.org/2000/svg"],["width","65"],["height","65"],["viewBox","0 0 65 65"]],[U("title",[],[],"beacon_logo"),G([["fill","currentColor"],["d","M59.66,29.52v1.06c0,.37-.18,9.07-4.11,15.88S44.16,57.75,43.84,57.93l-.91.54-1.61-.93-9.19-5.3a14.68,14.68,0,0,1-1.63-1.06h0a14.09,14.09,0,0,1-1.29-1,17.63,17.63,0,0,1-2.56-2.7,18.58,18.58,0,0,1-2.56-4.51,21.53,21.53,0,0,1-1.5-9,6.21,6.21,0,0,1,2.93-.73c.25,0,.49,0,.74,0a18.29,18.29,0,0,0,1,7.93,15.06,15.06,0,0,0,6.67,8l8.93,5.16c.2-.13.43-.3.68-.48,2.26-1.6,6.42-4.92,8.86-9.13C55.12,39.94,55.8,34,56,31.57l-3.79-2.19a23,23,0,0,0,.6-3.83Z"]]),G([["fill","currentColor"],["d","M49.22,11.43V23.89c0,.65,0,1.3-.1,1.94v0c-.06.55-.13,1.1-.24,1.63A18,18,0,0,1,47.82,31a19.11,19.11,0,0,1-2.62,4.49,21.37,21.37,0,0,1-7.07,5.8,6.08,6.08,0,0,1-2.42-2.84A18.1,18.1,0,0,0,42,33.7h0a15.12,15.12,0,0,0,3.58-9.81V13.6c-.21-.11-.47-.21-.74-.35-2.52-1.16-7.47-3.1-12.36-3.1-5.42,0-11,2.4-13.08,3.45V18a22.54,22.54,0,0,0-3.63,1.38V11.43l.92-.52c.33-.18,8-4.38,15.79-4.38s15.48,4.2,15.8,4.38Z"]]),G([["fill","currentColor"],["d","M18,26.4,9,31.55q0,.35.06.78a31.63,31.63,0,0,0,3.49,12.28c2.71,4.71,7.55,8.3,9.53,9.64l3.79-2.19a23.33,23.33,0,0,0,3,2.44l-6.88,4-.92-.54c-.31-.18-7.75-4.69-11.68-11.5S5.36,30.92,5.35,30.56V29.49L7,28.55l9.17-5.29c.57-.32,1.14-.61,1.72-.87a13.46,13.46,0,0,1,1.55-.61A17.52,17.52,0,0,1,23,20.91a19.2,19.2,0,0,1,5.19,0,21.49,21.49,0,0,1,8.55,3.24,6.29,6.29,0,0,1-1.25,3.51,17.9,17.9,0,0,0-7.3-3.06A15.14,15.14,0,0,0,18,26.4Z"]])]),document.createTextNode("Beacon")])),r.appendChild(i),(t=>{vt(t,"beacon-toast-button-expand"),At(t,"beacon-toast-button-close")})(t)}else wt(t),_t(t)})),Mt=t=>ct(void 0,void 0,void 0,(function*(){dt=t;const e=t.timer,r=lt.createElement("div");r.setAttribute("id","beacon-toast-wrapper");const n=r.attachShadow({mode:"open"}),i=lt.createElement("div"),{style:o,html:a}=mt(t);i.appendChild(a);const s=lt.createElement("style");s.textContent=o,n.appendChild(i),n.appendChild(s),e&&(ft=window.setTimeout((()=>ct(void 0,void 0,void 0,(function*(){yield yt()}))),e)),lt.body.prepend(r);const u=Z(),c=n.getElementById("beacon-toast");c&&c.classList.add("theme__".concat(u));const l=n.getElementById("beacon-toast-list");l&&(yield St(n,t,l));const f=n.getElementById("beacon-open-wallet");f&&(t.openWalletAction?f.addEventListener("click",(()=>{t.openWalletAction&&t.openWalletAction()})):f.classList.add("hide")),"loading"===dt.state&&(ht=window.setTimeout((()=>ct(void 0,void 0,void 0,(function*(){const t=n.getElementById("beacon-toast-button-expand");t&&!t.classList.contains("beacon-toast__upside_down")&&It(n)}))),5e3)),bt(n,"beacon-toast-button-done",(()=>ct(void 0,void 0,void 0,(function*(){yield yt()}))));const h=bt(n,"beacon-toast-button-close",(()=>ct(void 0,void 0,void 0,(function*(){yield yt()}))));h&&"loading"===dt.state&&h.classList.add("hide"),bt(n,"beacon-toast-button-expand",(()=>ct(void 0,void 0,void 0,(function*(){It(n)}))))})),Ct=t=>ct(void 0,void 0,void 0,(function*(){var e;ht&&clearTimeout(ht);if(lt.getElementById("beacon-toast-wrapper")?t.forceNew?(yield yt(),yield Mt(t)):yield(t=>ct(void 0,void 0,void 0,(function*(){dt=Object.assign(Object.assign({},dt),t);const e=t.timer,r=lt.getElementById("beacon-toast-wrapper");if(!r)return;const n=r.shadowRoot;if(!n)return;const i=n.getElementById("beacon-toast-list");i&&(pt(i),yield St(n,t,i)),"loading"===dt.state&&(ht=window.setTimeout((()=>ct(void 0,void 0,void 0,(function*(){const t=n.getElementById("beacon-toast-button-expand");t&&!t.classList.contains("beacon-toast__upside_down")&&It(n)}))),5e3));const o=n.getElementById("beacon-text-content");o&&(pt(o),o.appendChild(U("span",["beacon-toast__wallet__outer"],[],gt(t.body))));const a=n.getElementById("beacon-open-wallet");a&&(t.openWalletAction?(a.classList.remove("hide"),a.addEventListener("click",(()=>{t.openWalletAction&&t.openWalletAction()}))):a.classList.add("hide")),e&&(ft=window.setTimeout((()=>ct(void 0,void 0,void 0,(function*(){yield yt()}))),e));const s=n.getElementById("beacon-toast-button-done");s&&s.addEventListener("click",(()=>ct(void 0,void 0,void 0,(function*(){yield yt()}))))})))(t):yield Mt(t),dt&&"finished"===dt.state){const t=null===(e=lt.getElementById("beacon-toast-wrapper"))||void 0===e?void 0:e.shadowRoot;t&&((t=>{At(t,"beacon-toast-loader"),vt(t,"beacon-toast-loader-placeholder")})(t),wt(t),Et(t))}})),kt=t=>t.length>=12?"".concat(t.substr(0,5),"...").concat(t.substr(-5)):t;var xt=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const Bt=new n.j("BeaconEvents"),Ot=5e3;var Tt;!function(t){t.PERMISSION_REQUEST_SENT="PERMISSION_REQUEST_SENT",t.PERMISSION_REQUEST_SUCCESS="PERMISSION_REQUEST_SUCCESS",t.PERMISSION_REQUEST_ERROR="PERMISSION_REQUEST_ERROR",t.OPERATION_REQUEST_SENT="OPERATION_REQUEST_SENT",t.OPERATION_REQUEST_SUCCESS="OPERATION_REQUEST_SUCCESS",t.OPERATION_REQUEST_ERROR="OPERATION_REQUEST_ERROR",t.SIGN_REQUEST_SENT="SIGN_REQUEST_SENT",t.SIGN_REQUEST_SUCCESS="SIGN_REQUEST_SUCCESS",t.SIGN_REQUEST_ERROR="SIGN_REQUEST_ERROR",t.BROADCAST_REQUEST_SENT="BROADCAST_REQUEST_SENT",t.BROADCAST_REQUEST_SUCCESS="BROADCAST_REQUEST_SUCCESS",t.BROADCAST_REQUEST_ERROR="BROADCAST_REQUEST_ERROR",t.ACKNOWLEDGE_RECEIVED="ACKNOWLEDGE_RECEIVED",t.LOCAL_RATE_LIMIT_REACHED="LOCAL_RATE_LIMIT_REACHED",t.NO_PERMISSIONS="NO_PERMISSIONS",t.ACTIVE_ACCOUNT_SET="ACTIVE_ACCOUNT_SET",t.ACTIVE_TRANSPORT_SET="ACTIVE_TRANSPORT_SET",t.SHOW_PREPARE="SHOW_PREPARE",t.HIDE_UI="HIDE_UI",t.PAIR_INIT="PAIR_INIT",t.PAIR_SUCCESS="PAIR_SUCCESS",t.CHANNEL_CLOSED="CHANNEL_CLOSED",t.INTERNAL_ERROR="INTERNAL_ERROR",t.UNKNOWN="UNKNOWN"}(Tt||(Tt={}));const Rt=t=>xt(void 0,void 0,void 0,(function*(){let e;const r=[];if(t.walletInfo.deeplink&&("web"===t.walletInfo.type||"mobile"===t.walletInfo.type&&A(window)||"desktop"===t.walletInfo.type&&!A(window))){const r=t.walletInfo.deeplink;e=()=>xt(void 0,void 0,void 0,(function*(){const t=document.createElement("a");t.setAttribute("href",r),t.setAttribute("target","_blank"),t.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))}))}r.push({text:"No answer from your wallet received yet. Please make sure the wallet is open.",isBold:!0}),r.push({text:"Did you make a mistake?",actionText:"Cancel Request",actionCallback:()=>xt(void 0,void 0,void 0,(function*(){yield yt()}))}),r.push({text:"Wallet not receiving request?",actionText:"Reset Connection",actionCallback:()=>xt(void 0,void 0,void 0,(function*(){yield yt();const e=t.extraInfo.resetCallback;e&&(Bt.log("showSentToast","resetCallback invoked"),yield e())}))}),Ct({body:"Request sent to\xa0 {{wallet}}",walletInfo:t.walletInfo,state:"loading",actions:r,openWalletAction:e}).catch((t=>console.error(t)))})),Pt=(t,e)=>xt(void 0,void 0,void 0,(function*(){const r=t.errorResponse.errorType?n.d.getError(t.errorResponse.errorType,t.errorResponse.errorData):new n.w,i=[{text:r.title,isBold:!0},{text:r.description}];t.errorResponse.errorType===o.a.TRANSACTION_INVALID_ERROR&&t.errorResponse.errorData&&i.push({text:"",actionText:"Show Details",actionCallback:()=>xt(void 0,void 0,void 0,(function*(){yield yt(),yield st({title:r.title,body:r.fullDescription.description,data:r.fullDescription.data,buttons:e})}))}),yield Ct({body:"{{wallet}}\xa0 has returned an error",timer:t.errorResponse.errorType===o.a.ABORTED_ERROR?Ot:void 0,state:"finished",walletInfo:t.walletInfo,actions:i})})),Nt=()=>()=>xt(void 0,void 0,void 0,(function*(){})),jt={[Tt.PERMISSION_REQUEST_SENT]:Rt,[Tt.PERMISSION_REQUEST_SUCCESS]:t=>xt(void 0,void 0,void 0,(function*(){const{output:e}=t;yield Ct({body:"{{wallet}}\xa0 has granted permission",timer:Ot,walletInfo:t.walletInfo,state:"finished",actions:[{text:"Address",actionText:kt(e.address),isBold:!0},{text:"Network",actionText:"".concat(e.network.type)},{text:"Permissions",actionText:e.scopes.join(", ")}]})})),[Tt.PERMISSION_REQUEST_ERROR]:Pt,[Tt.OPERATION_REQUEST_SENT]:Rt,[Tt.OPERATION_REQUEST_SUCCESS]:t=>xt(void 0,void 0,void 0,(function*(){const{account:e,output:r,blockExplorer:n}=t;yield Ct({body:"{{wallet}}\xa0 successfully submitted operation",timer:Ot,state:"finished",walletInfo:t.walletInfo,actions:[{text:kt(r.transactionHash),isBold:!0,actionText:"Open Blockexplorer",actionLogo:"external",actionCallback:()=>xt(void 0,void 0,void 0,(function*(){const t=yield n.getTransactionLink(r.transactionHash,e.network);window.open(t,"_blank"),yield yt()}))}]})})),[Tt.OPERATION_REQUEST_ERROR]:Pt,[Tt.SIGN_REQUEST_SENT]:Rt,[Tt.SIGN_REQUEST_SUCCESS]:t=>xt(void 0,void 0,void 0,(function*(){const e=t.output;yield Ct({body:"{{wallet}}\xa0 successfully signed payload",timer:Ot,state:"finished",walletInfo:t.walletInfo,actions:[{text:"Signature: ".concat(kt(e.signature)),actionText:"Copy to clipboard",actionCallback:()=>xt(void 0,void 0,void 0,(function*(){navigator.clipboard.writeText(e.signature).then((()=>{Bt.log("showSignSuccessAlert","Copying to clipboard was successful!")}),(t=>{Bt.error("showSignSuccessAlert","Could not copy text to clipboard: ",t)})),yield yt()}))}]})})),[Tt.SIGN_REQUEST_ERROR]:Pt,[Tt.BROADCAST_REQUEST_SENT]:Rt,[Tt.BROADCAST_REQUEST_SUCCESS]:t=>xt(void 0,void 0,void 0,(function*(){const{network:e,output:r,blockExplorer:n}=t;yield Ct({body:"{{wallet}}\xa0 successfully injected operation",timer:Ot,state:"finished",walletInfo:t.walletInfo,actions:[{text:kt(r.transactionHash),isBold:!0,actionText:"Open Blockexplorer",actionLogo:"external",actionCallback:()=>xt(void 0,void 0,void 0,(function*(){const t=yield n.getTransactionLink(r.transactionHash,e);window.open(t,"_blank"),yield yt()}))}]})})),[Tt.BROADCAST_REQUEST_ERROR]:Pt,[Tt.ACKNOWLEDGE_RECEIVED]:t=>xt(void 0,void 0,void 0,(function*(){Ct({body:"Awaiting confirmation in\xa0 {{wallet}}",state:"acknowledge",walletInfo:t.walletInfo}).catch((t=>console.error(t)))})),[Tt.LOCAL_RATE_LIMIT_REACHED]:()=>xt(void 0,void 0,void 0,(function*(){st({title:"Error",body:"Rate limit reached. Please slow down",buttons:[{text:"Done",style:"outline"}],timer:3e3}).catch((t=>console.error(t)))})),[Tt.NO_PERMISSIONS]:()=>xt(void 0,void 0,void 0,(function*(){yield st({title:"No Permission",body:"Please allow the wallet to handle this type of request."})})),[Tt.ACTIVE_ACCOUNT_SET]:Nt(),[Tt.ACTIVE_TRANSPORT_SET]:Nt(),[Tt.SHOW_PREPARE]:t=>xt(void 0,void 0,void 0,(function*(){const e=t.walletInfo?"Preparing Request for\xa0 {{wallet}}...":"Preparing Request...";Ct({body:e,state:"prepare",walletInfo:t.walletInfo}).catch((t=>console.error(t)))})),[Tt.HIDE_UI]:t=>xt(void 0,void 0,void 0,(function*(){t?(t.includes("alert")&&at(),t.includes("toast")&&yt()):yt()})),[Tt.PAIR_INIT]:t=>xt(void 0,void 0,void 0,(function*(){const e={title:"Choose your preferred wallet",body:"

",pairingPayload:{p2pSyncCode:t.p2pPeerInfo,postmessageSyncCode:t.postmessagePeerInfo,preferredNetwork:t.preferredNetwork},closeButtonCallback:t.abortedHandler,disclaimerText:t.disclaimerText};yield st(e)})),[Tt.PAIR_SUCCESS]:()=>xt(void 0,void 0,void 0,(function*(){yield at()})),[Tt.CHANNEL_CLOSED]:()=>xt(void 0,void 0,void 0,(function*(){yield st({title:"Channel closed",body:"Your peer has closed the connection.",buttons:[{text:"Done",style:"outline"}],timer:1500})})),[Tt.INTERNAL_ERROR]:t=>xt(void 0,void 0,void 0,(function*(){var e;const r=[...null!==(e=t.buttons)&&void 0!==e?e:[]];r.push({text:"Done",style:"outline"});const n={title:"Internal Error",body:t.text,buttons:r};yield st(n)})),[Tt.UNKNOWN]:Nt()};class Dt{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;this.callbackMap={[Tt.PERMISSION_REQUEST_SENT]:[jt.PERMISSION_REQUEST_SENT],[Tt.PERMISSION_REQUEST_SUCCESS]:[jt.PERMISSION_REQUEST_SUCCESS],[Tt.PERMISSION_REQUEST_ERROR]:[jt.PERMISSION_REQUEST_ERROR],[Tt.OPERATION_REQUEST_SENT]:[jt.OPERATION_REQUEST_SENT],[Tt.OPERATION_REQUEST_SUCCESS]:[jt.OPERATION_REQUEST_SUCCESS],[Tt.OPERATION_REQUEST_ERROR]:[jt.OPERATION_REQUEST_ERROR],[Tt.SIGN_REQUEST_SENT]:[jt.SIGN_REQUEST_SENT],[Tt.SIGN_REQUEST_SUCCESS]:[jt.SIGN_REQUEST_SUCCESS],[Tt.SIGN_REQUEST_ERROR]:[jt.SIGN_REQUEST_ERROR],[Tt.BROADCAST_REQUEST_SENT]:[jt.BROADCAST_REQUEST_SENT],[Tt.BROADCAST_REQUEST_SUCCESS]:[jt.BROADCAST_REQUEST_SUCCESS],[Tt.BROADCAST_REQUEST_ERROR]:[jt.BROADCAST_REQUEST_ERROR],[Tt.ACKNOWLEDGE_RECEIVED]:[jt.ACKNOWLEDGE_RECEIVED],[Tt.LOCAL_RATE_LIMIT_REACHED]:[jt.LOCAL_RATE_LIMIT_REACHED],[Tt.NO_PERMISSIONS]:[jt.NO_PERMISSIONS],[Tt.ACTIVE_ACCOUNT_SET]:[jt.ACTIVE_ACCOUNT_SET],[Tt.ACTIVE_TRANSPORT_SET]:[jt.ACTIVE_TRANSPORT_SET],[Tt.SHOW_PREPARE]:[jt.SHOW_PREPARE],[Tt.HIDE_UI]:[jt.HIDE_UI],[Tt.PAIR_INIT]:[jt.PAIR_INIT],[Tt.PAIR_SUCCESS]:[jt.PAIR_SUCCESS],[Tt.CHANNEL_CLOSED]:[jt.CHANNEL_CLOSED],[Tt.INTERNAL_ERROR]:[jt.INTERNAL_ERROR],[Tt.UNKNOWN]:[jt.UNKNOWN]},e&&this.setAllHandlers(),this.overrideDefaults(t)}on(t,e){return xt(this,void 0,void 0,(function*(){const r=this.callbackMap[t]||[];r.push(e),this.callbackMap[t]=r}))}emit(t,e,r){return xt(this,void 0,void 0,(function*(){const n=this.callbackMap[t];n&&n.length>0&&n.forEach((n=>xt(this,void 0,void 0,(function*(){try{yield n(e,r)}catch(i){Bt.error("error handling event ".concat(t),i)}}))))}))}overrideDefaults(t){Object.keys(t).forEach((e=>{const r=e,n=t[r];n&&(this.callbackMap[r]=[n.handler])}))}setAllHandlers(t){Object.keys(this.callbackMap).forEach((e=>{const r=e;this.callbackMap[r]=[],t?this.callbackMap[r].push(t):this.callbackMap[r].push((function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{[o.e.MAINNET]:"https://tezblock.io",[o.e.DELPHINET]:"https://delphinet.tezblock.io",[o.e.EDONET]:"https://edonet.tezblock.io",[o.e.FLORENCENET]:"https://florencenet.tezblock.io",[o.e.GRANADANET]:"https://granadanet.tezblock.io",[o.e.HANGZHOUNET]:"https://hangzhounet.tezblock.io",[o.e.ITHACANET]:"https://ithacanet.tezblock.io",[o.e.JAKARTANET]:"https://jakartanet.tezblock.io",[o.e.CUSTOM]:"https://jakartanet.tezblock.io"};super(t),this.rpcUrls=t}getAddressLink(t,e){return Qt(this,void 0,void 0,(function*(){const r=yield this.getLinkForNetwork(e);return"".concat(r,"/account/").concat(t)}))}getTransactionLink(t,e){return Qt(this,void 0,void 0,(function*(){const r=yield this.getLinkForNetwork(e);return"".concat(r,"/transaction/").concat(t)}))}}var Ht=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const zt=new n.j("DappPostMessageTransport");class qt extends g{constructor(t,e,r){super(t,e,r,o.i.TRANSPORT_POSTMESSAGE_PEERS_DAPP)}startOpenChannelListener(){return Ht(this,void 0,void 0,(function*(){return this.client.listenForChannelOpening((t=>Ht(this,void 0,void 0,(function*(){zt.log("connect","received PostMessagePairingResponse",t),yield this.addPeer(t),this._isConnected=o.j.CONNECTED,this.newPeerListener&&(this.newPeerListener(t),this.newPeerListener=void 0)}))))}))}listenForNewPeer(t){return Ht(this,void 0,void 0,(function*(){zt.log("listenForNewPeer"),this.newPeerListener=t}))}stopListeningForNewPeers(){return Ht(this,void 0,void 0,(function*(){zt.log("stopListeningForNewPeers"),this.newPeerListener=void 0}))}}var Kt=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const Vt=new n.j("DappP2PTransport");class Wt extends u{constructor(t,e,r,n,i,a){super(t,e,r,n,o.i.TRANSPORT_P2P_PEERS_DAPP,i,a)}startOpenChannelListener(){return Kt(this,void 0,void 0,(function*(){return this.client.listenForChannelOpening((t=>Kt(this,void 0,void 0,(function*(){Vt.log("listenForNewPeer","new publicKey",t.publicKey),yield this.addPeer(t),this._isConnected=o.j.CONNECTED,this.newPeerListener&&(this.newPeerListener(t),this.newPeerListener=void 0)}))))}))}listenForNewPeer(t){return Kt(this,void 0,void 0,(function*(){Vt.log("listenForNewPeer"),this.newPeerListener=t}))}stopListeningForNewPeers(){return Kt(this,void 0,void 0,(function*(){Vt.log("stopListeningForNewPeers"),this.newPeerListener=void 0}))}}var Jt=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const Yt=new n.j("DAppClient");class Xt extends n.g{constructor(t){var e,r,i,a;super(Object.assign({storage:t&&t.storage?t.storage:new n.i},t)),this.events=new Dt,this.openRequests=new Map,this._activeAccount=new m.a,this._activePeer=new m.a,this.blockchains=new Map,this.events=new Dt(t.eventHandlers,null!==(e=t.disableDefaultEvents)&&void 0!==e&&e),this.blockExplorer=null!==(r=t.blockExplorer)&&void 0!==r?r:new Gt,this.preferredNetwork=null!==(i=t.preferredNetwork)&&void 0!==i?i:o.e.MAINNET,X(null!==(a=t.colorMode)&&void 0!==a?a:o.c.LIGHT),this.disclaimerText=t.disclaimerText,this.appMetadataManager=new n.b(this.storage),this.activeAccountLoaded=this.storage.get(o.i.ACTIVE_ACCOUNT).then((t=>Jt(this,void 0,void 0,(function*(){t?yield this.setActiveAccount(yield this.accountManager.getAccount(t)):yield this.setActiveAccount(void 0)})))).catch((t=>Jt(this,void 0,void 0,(function*(){yield this.setActiveAccount(void 0),console.error(t)})))),this.handleResponse=(t,e)=>Jt(this,void 0,void 0,(function*(){var r,n;const i=this.openRequests.get(t.id);if(Yt.log("handleResponse","Received message",t,e),"3"===t.version){const n=t;if(i&&n.message.type===o.b.Acknowledge)Yt.log("acknowledge message received for ".concat(t.id)),console.timeLog(t.id,"acknowledge"),this.events.emit(Tt.ACKNOWLEDGE_RECEIVED,{message:n.message,extraInfo:{},walletInfo:yield this.getWalletInfo()}).catch(console.error);else if(i){const r=n.message.blockchainData.appMetadata;n.message.type===o.b.PermissionResponse&&r&&(yield this.appMetadataManager.addAppMetadata(r)),console.timeLog(n.id,"response"),console.timeEnd(n.id),n.message.type===o.b.Error?i.reject(n.message):i.resolve({message:t,connectionInfo:e}),this.openRequests.delete(n.id)}else if(n.message.type===o.b.Disconnect){const n=e.origin===o.f.P2P?this.p2pTransport:null!==(r=this.postMessageTransport)&&void 0!==r?r:yield this.transport;if(n){const e=(yield n.getPeers()).find((e=>e.senderId===t.senderId));e?(yield n.removePeer(e),yield this.removeAccountsForPeers([e]),yield this.events.emit(Tt.CHANNEL_CLOSED)):Yt.error("handleDisconnect","cannot find peer for sender ID",t.senderId)}}else Yt.error("handleResponse","no request found for id ",t.id)}else{const r=t;if(i&&r.type===o.b.Acknowledge)Yt.log("acknowledge message received for ".concat(t.id)),console.timeLog(t.id,"acknowledge"),this.events.emit(Tt.ACKNOWLEDGE_RECEIVED,{message:r,extraInfo:{},walletInfo:yield this.getWalletInfo()}).catch(console.error);else if(i)r.type===o.b.PermissionResponse&&r.appMetadata&&(yield this.appMetadataManager.addAppMetadata(r.appMetadata)),console.timeLog(r.id,"response"),console.timeEnd(r.id),r.type===o.b.Error||t.errorType?i.reject(r):i.resolve({message:t,connectionInfo:e}),this.openRequests.delete(r.id);else if(r.type===o.b.Disconnect||t.typedMessage.type===o.b.Disconnect){const r=e.origin===o.f.P2P?this.p2pTransport:null!==(n=this.postMessageTransport)&&void 0!==n?n:yield this.transport;if(r){const e=(yield r.getPeers()).find((e=>e.senderId===t.senderId));e?(yield r.removePeer(e),yield this.removeAccountsForPeers([e]),yield this.events.emit(Tt.CHANNEL_CLOSED)):Yt.error("handleDisconnect","cannot find peer for sender ID",t.senderId)}}else Yt.error("handleResponse","no request found for id ",t.id)}}))}initInternalTransports(){return Jt(this,void 0,void 0,(function*(){const t=yield this.keyPair;this.postMessageTransport||this.p2pTransport||(this.postMessageTransport=new qt(this.name,t,this.storage),yield this.addListener(this.postMessageTransport),this.p2pTransport=new Wt(this.name,t,this.storage,this.matrixNodes,this.iconUrl,this.appUrl),yield this.addListener(this.p2pTransport))}))}init(t){const e=Object.create(null,{init:{get:()=>super.init}});return Jt(this,void 0,void 0,(function*(){if(this._initPromise)return this._initPromise;try{yield this.activeAccountLoaded}catch(r){}return this._initPromise=new Promise((r=>Jt(this,void 0,void 0,(function*(){if(t)yield this.addListener(t),r(yield e.init.call(this,t));else if(this._transport.isSettled())yield(yield this.transport).connect(),r(yield e.init.call(this,yield this.transport));else{const t=yield this.getActiveAccount(),n=()=>{this.postMessageTransport&&this.postMessageTransport.stopListeningForNewPeers().catch(console.error),this.p2pTransport&&this.p2pTransport.stopListeningForNewPeers().catch(console.error)};if(yield this.initInternalTransports(),!this.postMessageTransport||!this.p2pTransport)return;if(this.postMessageTransport.connect().then().catch(console.error),t&&t.origin){const n=t.origin.type;n===o.f.EXTENSION?r(yield e.init.call(this,this.postMessageTransport)):n===o.f.P2P&&r(yield e.init.call(this,this.p2pTransport))}else{const t=this.p2pTransport,e=this.postMessageTransport;e.listenForNewPeer((t=>{Yt.log("init","postmessage transport peer connected",t),this.events.emit(Tt.PAIR_SUCCESS,t).catch((t=>console.warn(t))),this.setActivePeer(t).catch(console.error),this.setTransport(this.postMessageTransport).catch(console.error),n(),r(o.k.POST_MESSAGE)})).catch(console.error),t.listenForNewPeer((t=>{Yt.log("init","p2p transport peer connected",t),this.events.emit(Tt.PAIR_SUCCESS,t).catch((t=>console.warn(t))),this.setActivePeer(t).catch(console.error),this.setTransport(this.p2pTransport).catch(console.error),n(),r(o.k.P2P)})).catch(console.error),g.getAvailableExtensions().then((()=>Jt(this,void 0,void 0,(function*(){this.events.emit(Tt.PAIR_INIT,{p2pPeerInfo:()=>(t.connect().then().catch(console.error),t.getPairingRequestInfo()),postmessagePeerInfo:()=>e.getPairingRequestInfo(),preferredNetwork:this.preferredNetwork,abortedHandler:()=>{this._initPromise=void 0},disclaimerText:this.disclaimerText}).catch((t=>console.warn(t)))})))).catch((t=>{this._initPromise=void 0,console.error(t)}))}}})))),this._initPromise}))}getActiveAccount(){return Jt(this,void 0,void 0,(function*(){return this._activeAccount.promise}))}setActiveAccount(t){return Jt(this,void 0,void 0,(function*(){if(this._activeAccount.isSettled()?this._activeAccount=m.a.resolve(t):this._activeAccount.resolve(t),t){const e=t.origin.type;yield this.initInternalTransports(),e===o.f.EXTENSION?yield this.setTransport(this.postMessageTransport):e===o.f.P2P&&(yield this.setTransport(this.p2pTransport));const r=yield this.getPeer(t);yield this.setActivePeer(r)}else yield this.setActivePeer(void 0),yield this.setTransport(void 0);yield this.storage.set(o.i.ACTIVE_ACCOUNT,t?t.accountIdentifier:void 0),yield this.events.emit(Tt.ACTIVE_ACCOUNT_SET,t)}))}clearActiveAccount(){return this.setActiveAccount()}setColorMode(t){return Jt(this,void 0,void 0,(function*(){return X(t)}))}getColorMode(){return Jt(this,void 0,void 0,(function*(){return Z()}))}getAppMetadata(){return Jt(this,void 0,void 0,(function*(){return this.getOwnAppMetadata()}))}showPrepare(){return Jt(this,void 0,void 0,(function*(){const t=yield(()=>Jt(this,void 0,void 0,(function*(){try{return yield this.getWalletInfo()}catch(t){return}})))();yield this.events.emit(Tt.SHOW_PREPARE,{walletInfo:t})}))}hideUI(t){return Jt(this,void 0,void 0,(function*(){yield this.events.emit(Tt.HIDE_UI,t)}))}removeAccount(t){const e=Object.create(null,{removeAccount:{get:()=>super.removeAccount}});return Jt(this,void 0,void 0,(function*(){const r=e.removeAccount.call(this,t),n=yield this.getActiveAccount();return n&&n.accountIdentifier===t&&(yield this.setActiveAccount(void 0)),r}))}removeAllAccounts(){const t=Object.create(null,{removeAllAccounts:{get:()=>super.removeAllAccounts}});return Jt(this,void 0,void 0,(function*(){yield t.removeAllAccounts.call(this),yield this.setActiveAccount(void 0)}))}removePeer(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Jt(this,void 0,void 0,(function*(){const r=yield this.transport,n=r.removePeer(t);return yield this.removeAccountsForPeers([t]),e&&(yield this.sendDisconnectToPeer(t,r)),n}))}removeAllPeers(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Jt(this,void 0,void 0,(function*(){const e=yield this.transport,r=yield e.getPeers(),n=e.removeAllPeers();if(yield this.removeAccountsForPeers(r),t){const t=r.map((t=>this.sendDisconnectToPeer(t,e)));yield Promise.all(t)}return n}))}subscribeToEvent(t,e){return Jt(this,void 0,void 0,(function*(){yield this.events.on(t,e)}))}checkPermissions(t){return Jt(this,void 0,void 0,(function*(){if(t===o.b.PermissionRequest)return!0;const e=yield this.getActiveAccount();if(!e)throw yield this.sendInternalError("No active account set!");const r=e.scopes;switch(t){case o.b.OperationRequest:return r.includes(o.g.OPERATION_REQUEST);case o.b.SignPayloadRequest:return r.includes(o.g.SIGN);case o.b.BroadcastRequest:return!0;default:return!1}}))}addBlockchain(t){this.blockchains.set(t.identifier,t),t.getWalletLists().then((t=>{var e;(t=>{C=t})(t.desktopList),(t=>{k=t})(t.extensionList),(t=>{x=t})(t.webList),e=t.iOSList,B=e}))}removeBlockchain(t){this.blockchains.delete(t)}permissionRequest(t){return Jt(this,void 0,void 0,(function*(){console.log("PERMISSION REQUEST");const e=this.blockchains.get(t.blockchainIdentifier);if(!e)throw new Error('Blockchain "'.concat(t.blockchainIdentifier,'" not supported by dAppClient'));const r=Object.assign(Object.assign({},t),{type:o.b.PermissionRequest,blockchainData:Object.assign(Object.assign({},t.blockchainData),{appMetadata:yield this.getOwnAppMetadata()})});console.log("REQUESTION PERMIMISSION V3","xxx",r);const{message:n,connectionInfo:i}=yield this.makeRequestV3(r).catch((t=>Jt(this,void 0,void 0,(function*(){throw new Error("TODO")}))));console.log("RESPONSE V3",n,i);const a=yield e.getAccountInfosFromPermissionResponse(n.message),s={accountIdentifier:a[0].accountId,senderId:n.senderId,origin:{type:i.origin,id:i.id},address:a[0].address,publicKey:a[0].publicKey,scopes:n.message.blockchainData.scopes,connectedAt:(new Date).getTime(),chainData:n.message.blockchainData};return yield this.accountManager.addAccount(s),yield this.setActiveAccount(s),yield e.handleResponse({request:r,account:s,output:n,blockExplorer:this.blockExplorer,connectionContext:i,walletInfo:yield this.getWalletInfo()}),yield this.notifySuccess(r,{account:s,output:{address:a[0].address,network:{type:o.e.MAINNET},scopes:[o.g.OPERATION_REQUEST]},blockExplorer:this.blockExplorer,connectionContext:i,walletInfo:yield this.getWalletInfo()}),n.message}))}request(t){return Jt(this,void 0,void 0,(function*(){console.log("REQUEST",t);const e=this.blockchains.get(t.blockchainIdentifier);if(!e)throw new Error('Blockchain "'.concat(e,'" not supported by dAppClient'));yield e.validateRequest(t);const r=yield this.getActiveAccount();if(!r)throw yield this.sendInternalError("No active account!");const n=Object.assign(Object.assign({},t),{type:o.b.BlockchainRequest,accountId:r.accountIdentifier}),{message:i,connectionInfo:a}=yield this.makeRequestV3(n).catch((t=>Jt(this,void 0,void 0,(function*(){throw console.error(t),new Error("TODO")}))));return yield e.handleResponse({request:n,account:r,output:i,blockExplorer:this.blockExplorer,connectionContext:a,walletInfo:yield this.getWalletInfo()}),i.message}))}requestPermissions(t){return Jt(this,void 0,void 0,(function*(){const e={appMetadata:yield this.getOwnAppMetadata(),type:o.b.PermissionRequest,network:t&&t.network?t.network:{type:o.e.MAINNET},scopes:t&&t.scopes?t.scopes:[o.g.OPERATION_REQUEST,o.g.SIGN]},{message:r,connectionInfo:i}=yield this.makeRequest(e).catch((t=>Jt(this,void 0,void 0,(function*(){throw yield this.handleRequestError(e,t)})))),a=r.publicKey||r.pubkey||r.pubKey,s=yield Object(m.f)(a),u={accountIdentifier:yield Object(n.x)(s,r.network),senderId:r.senderId,origin:{type:i.origin,id:i.id},address:s,publicKey:a,network:r.network,scopes:r.scopes,threshold:r.threshold,connectedAt:(new Date).getTime()};yield this.accountManager.addAccount(u),yield this.setActiveAccount(u);const c=Object.assign(Object.assign({},r),{address:s,accountInfo:u});return yield this.notifySuccess(e,{account:u,output:c,blockExplorer:this.blockExplorer,connectionContext:i,walletInfo:yield this.getWalletInfo()}),c}))}requestSignPayload(t){return Jt(this,void 0,void 0,(function*(){if(!t.payload)throw yield this.sendInternalError("Payload must be provided");const e=yield this.getActiveAccount();if(!e)throw yield this.sendInternalError("No active account!");const r=t.payload;if("string"!==typeof r)throw new Error("Payload must be a string");const n=(()=>{switch(t.signingType){case o.h.OPERATION:if(!r.startsWith("03"))throw new Error('When using signing type "OPERATION", the payload must start with prefix "03"');return o.h.OPERATION;case o.h.MICHELINE:if(!r.startsWith("05"))throw new Error('When using signing type "MICHELINE", the payload must start with prefix "05"');return o.h.MICHELINE;case o.h.RAW:default:return o.h.RAW}})(),i={type:o.b.SignPayloadRequest,signingType:n,payload:r,sourceAddress:t.sourceAddress||e.address},{message:a,connectionInfo:s}=yield this.makeRequest(i).catch((t=>Jt(this,void 0,void 0,(function*(){throw yield this.handleRequestError(i,t)}))));return yield this.notifySuccess(i,{account:e,output:a,connectionContext:s,walletInfo:yield this.getWalletInfo()}),a}))}requestOperation(t){return Jt(this,void 0,void 0,(function*(){if(!t.operationDetails)throw yield this.sendInternalError("Operation details must be provided");const e=yield this.getActiveAccount();if(!e)throw yield this.sendInternalError("No active account!");const r={type:o.b.OperationRequest,network:e.network||{type:o.e.MAINNET},operationDetails:t.operationDetails,sourceAddress:e.address||""},{message:n,connectionInfo:i}=yield this.makeRequest(r).catch((t=>Jt(this,void 0,void 0,(function*(){throw yield this.handleRequestError(r,t)}))));return yield this.notifySuccess(r,{account:e,output:n,blockExplorer:this.blockExplorer,connectionContext:i,walletInfo:yield this.getWalletInfo()}),n}))}requestBroadcast(t){return Jt(this,void 0,void 0,(function*(){if(!t.signedTransaction)throw yield this.sendInternalError("Signed transaction must be provided");const e=t.network||{type:o.e.MAINNET},r={type:o.b.BroadcastRequest,network:e,signedTransaction:t.signedTransaction},{message:n,connectionInfo:i}=yield this.makeRequest(r).catch((t=>Jt(this,void 0,void 0,(function*(){throw yield this.handleRequestError(r,t)}))));return yield this.notifySuccess(r,{network:e,output:n,blockExplorer:this.blockExplorer,connectionContext:i,walletInfo:yield this.getWalletInfo()}),n}))}setActivePeer(t){return Jt(this,void 0,void 0,(function*(){this._activePeer.isSettled()?this._activePeer=m.a.resolve(t):this._activePeer.resolve(t),t&&(yield this.initInternalTransports(),"postmessage-pairing-response"===t.type?yield this.setTransport(this.postMessageTransport):"p2p-pairing-response"===t.type&&(yield this.setTransport(this.p2pTransport)))}))}setTransport(t){const e=Object.create(null,{setTransport:{get:()=>super.setTransport}});return Jt(this,void 0,void 0,(function*(){t||(this._initPromise=void 0);const r=e.setTransport.call(this,t);return yield this.events.emit(Tt.ACTIVE_TRANSPORT_SET,t),r}))}sendInternalError(t){return Jt(this,void 0,void 0,(function*(){throw yield this.events.emit(Tt.INTERNAL_ERROR,{text:t}),new Error(t)}))}removeAccountsForPeers(t){return Jt(this,void 0,void 0,(function*(){const e=yield this.accountManager.getAccounts(),r=t.map((t=>t.senderId)),n=e.filter((t=>r.includes(t.senderId))).map((t=>t.accountIdentifier));yield this.accountManager.removeAccounts(n);const i=yield this.getActiveAccount();i&&n.includes(i.accountIdentifier)&&(yield this.setActiveAccount(void 0))}))}handleRequestError(t,e){return Jt(this,void 0,void 0,(function*(){if(Yt.error("handleRequestError","error response",e),e.errorType){const r=[];if(e.errorType===o.a.NO_PRIVATE_KEY_FOUND_ERROR){const e=()=>Jt(this,void 0,void 0,(function*(){const e=t;let r;if(e.sourceAddress&&e.network){const t=yield Object(n.x)(e.sourceAddress,e.network);r=yield this.getAccount(t),r&&(yield this.removeAccount(r.accountIdentifier))}}));r.push({text:"Remove account",actionCallback:e})}const i=yield this.getPeer(),a=yield this.getActiveAccount();throw t.type===o.b.PermissionRequest&&void 0===(yield this.getActiveAccount())&&(this._initPromise=void 0,this.postMessageTransport=void 0,this.p2pTransport=void 0,yield this.setTransport(),yield this.setActivePeer()),this.events.emit(Lt[t.type].error,{errorResponse:e,walletInfo:yield this.getWalletInfo(i,a)},r).catch((t=>Yt.error("handleRequestError",t))),n.d.getError(e.errorType,e.errorData)}throw e}))}notifySuccess(t,e){return Jt(this,void 0,void 0,(function*(){this.events.emit(Lt[t.type].success,e).catch((t=>console.warn(t)))}))}getWalletInfo(t,e){var r,n;return Jt(this,void 0,void 0,(function*(){const i=e||(yield this.getActiveAccount()),o=t||(yield this.getPeer(i));let a;i&&(a=yield this.appMetadataManager.getAppMetadata(i.senderId));const s=o;a||(a={name:s.name,icon:s.icon});const u=(t,e)=>!(!t||!e)&&t.toLowerCase()===e.toLowerCase();let c,l;if(P().find((t=>u(t.name,null===a||void 0===a?void 0:a.name)))?(c=P().find((t=>u(t.name,null===a||void 0===a?void 0:a.name))),l="mobile"):R().find((t=>u(t.name,null===a||void 0===a?void 0:a.name)))?(c=R().find((t=>u(t.name,null===a||void 0===a?void 0:a.name))),l="web"):O().find((t=>u(t.name,null===a||void 0===a?void 0:a.name)))?(c=O().find((t=>u(t.name,null===a||void 0===a?void 0:a.name))),l="desktop"):T().find((t=>u(t.name,null===a||void 0===a?void 0:a.name)))&&(c=T().find((t=>u(t.name,null===a||void 0===a?void 0:a.name))),l="extension"),c){let t;return c.hasOwnProperty("links")?t=c.links[null!==(r=null===i||void 0===i?void 0:i.network.type)&&void 0!==r?r:this.preferredNetwork]:c.hasOwnProperty("deepLink")&&(t=c.deepLink),{name:a.name,icon:null!==(n=a.icon)&&void 0!==n?n:c.logo,deeplink:t,type:l}}return a}))}getPeer(t){var e,r,n,i;return Jt(this,void 0,void 0,(function*(){let o;if(t){Yt.log("getPeer","We have an account",t);const a=[...null!==(r=yield null===(e=this.postMessageTransport)||void 0===e?void 0:e.getPeers())&&void 0!==r?r:[],...null!==(i=yield null===(n=this.p2pTransport)||void 0===n?void 0:n.getPeers())&&void 0!==i?i:[]];Yt.log("getPeer","Found peers",a,t),o=a.find((e=>e.senderId===t.senderId)),o||(o=a.find((e=>e.extensionId===t.origin.id)))}else o=yield this._activePeer.promise,Yt.log("getPeer","Active peer",o);if(!o)throw new Error("No matching peer found.");return o}))}makeRequest(t){var e;return Jt(this,void 0,void 0,(function*(){const r=yield Object(m.e)();if(console.time(r),Yt.log("makeRequest","starting"),yield this.init(),console.timeLog(r,"init done"),Yt.log("makeRequest","after init"),yield this.addRequestAndCheckIfRateLimited())throw this.events.emit(Tt.LOCAL_RATE_LIMIT_REACHED).catch((t=>console.warn(t))),new Error("rate limit reached");if(!(yield this.checkPermissions(t.type)))throw this.events.emit(Tt.NO_PERMISSIONS).catch((t=>console.warn(t))),new Error("No permissions to send this request to wallet!");if(!this.beaconId)throw yield this.sendInternalError("BeaconID not defined");const i=Object.assign({id:r,version:"2",senderId:yield Object(n.y)(yield this.beaconId)},t),o=new m.a;this.addOpenRequest(i.id,o);const a=yield(new n.r).serialize(i),s=yield this.getActiveAccount(),u=yield this.getPeer(s),c=yield this.getWalletInfo(u,s);Yt.log("makeRequest","sending message",i),console.timeLog(r,"sending");try{yield(yield this.transport).send(a,u)}catch(l){throw this.events.emit(Tt.INTERNAL_ERROR,{text:"Unable to send message. If this problem persists, please reset the connection and pair your wallet again.",buttons:[{text:"Reset Connection",actionCallback:()=>Jt(this,void 0,void 0,(function*(){yield yt(),this.disconnect()}))}]}),console.timeLog(r,"send error"),l}return console.timeLog(r,"sent"),this.events.emit(Lt[t.type].sent,{walletInfo:Object.assign(Object.assign({},c),{name:null!==(e=c.name)&&void 0!==e?e:"Wallet"}),extraInfo:{resetCallback:()=>Jt(this,void 0,void 0,(function*(){this.disconnect()}))}}).catch((t=>console.warn(t))),o.promise}))}makeRequestV3(t){var e;return Jt(this,void 0,void 0,(function*(){const r=yield Object(m.e)();if(console.time(r),Yt.log("makeRequest","starting"),yield this.init(),console.timeLog(r,"init done"),Yt.log("makeRequest","after init"),yield this.addRequestAndCheckIfRateLimited())throw this.events.emit(Tt.LOCAL_RATE_LIMIT_REACHED).catch((t=>console.warn(t))),new Error("rate limit reached");if(!this.beaconId)throw yield this.sendInternalError("BeaconID not defined");const i={id:r,version:n.c,senderId:yield Object(n.y)(yield this.beaconId),message:t},o=new m.a;this.addOpenRequest(i.id,o);const a=yield(new n.r).serialize(i),s=yield this.getActiveAccount(),u=yield this.getPeer(s),c=yield this.getWalletInfo(u,s);Yt.log("makeRequest","sending message",i),console.timeLog(r,"sending");try{yield(yield this.transport).send(a,u)}catch(f){throw this.events.emit(Tt.INTERNAL_ERROR,{text:"Unable to send message. If this problem persists, please reset the connection and pair your wallet again.",buttons:[{text:"Reset Connection",actionCallback:()=>Jt(this,void 0,void 0,(function*(){yield yt(),this.disconnect()}))}]}),console.timeLog(r,"send error"),f}console.timeLog(r,"sent");const l=t.type;return this.events.emit(Lt[l].sent,{walletInfo:Object.assign(Object.assign({},c),{name:null!==(e=c.name)&&void 0!==e?e:"Wallet"}),extraInfo:{resetCallback:()=>Jt(this,void 0,void 0,(function*(){this.disconnect()}))}}).catch((t=>console.warn(t))),o.promise}))}disconnect(){return Jt(this,void 0,void 0,(function*(){this.postMessageTransport=void 0,this.p2pTransport=void 0,yield Promise.all([this.clearActiveAccount(),(yield this.transport).disconnect()])}))}addOpenRequest(t,e){Yt.log("addOpenRequest",this.name,"adding request ".concat(t," and waiting for answer")),this.openRequests.set(t,e)}}var Zt=r(517);function $t(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}const te={commitHash:"cbdd0af87e400489076259d065e2d328feb8e1b4",version:"12.1.0"};class ee extends Error{constructor(){super("You need to initialize BeaconWallet by calling beaconWallet.requestPermissions first"),this.name="BeaconWalletNotInitialized"}}class re extends Error{constructor(t){super("Required permissions scopes were not granted: ".concat(t.join(","))),this.requiredScopes=t,this.name="MissingRequiredScopes"}}class ne{constructor(t){this.client=new Xt(t)}validateRequiredScopesOrFail(t,e){const r=new Set(e);for(const n of t)r.has(n)&&r.delete(n);if(r.size>0)throw new re(Array.from(r))}requestPermissions(t){return $t(this,void 0,void 0,(function*(){yield this.client.requestPermissions(t)}))}getPKH(){return $t(this,void 0,void 0,(function*(){const t=yield this.client.getActiveAccount();if(!t)throw new ee;return t.address}))}mapTransferParamsToWalletParams(t){return $t(this,void 0,void 0,(function*(){let e;yield this.client.showPrepare();try{e=yield t()}catch(r){throw yield this.client.hideUI(),r}return this.removeDefaultParams(e,yield Object(Zt.createTransferOperation)(this.formatParameters(e)))}))}mapOriginateParamsToWalletParams(t){return $t(this,void 0,void 0,(function*(){let e;yield this.client.showPrepare();try{e=yield t()}catch(r){throw yield this.client.hideUI(),r}return this.removeDefaultParams(e,yield Object(Zt.createOriginationOperation)(this.formatParameters(e)))}))}mapDelegateParamsToWalletParams(t){return $t(this,void 0,void 0,(function*(){let e;yield this.client.showPrepare();try{e=yield t()}catch(r){throw yield this.client.hideUI(),r}return this.removeDefaultParams(e,yield Object(Zt.createSetDelegateOperation)(this.formatParameters(e)))}))}formatParameters(t){return t.fee&&(t.fee=t.fee.toString()),t.storageLimit&&(t.storageLimit=t.storageLimit.toString()),t.gasLimit&&(t.gasLimit=t.gasLimit.toString()),t}removeDefaultParams(t,e){return t.fee||delete e.fee,t.storageLimit||delete e.storage_limit,t.gasLimit||delete e.gas_limit,e}sendOperations(t){return $t(this,void 0,void 0,(function*(){const e=yield this.client.getActiveAccount();if(!e)throw new ee;const r=e.scopes;this.validateRequiredScopesOrFail(r,[o.g.OPERATION_REQUEST]);const{transactionHash:n}=yield this.client.requestOperation({operationDetails:t});return n}))}disconnect(){return $t(this,void 0,void 0,(function*(){yield this.client.destroy()}))}clearActiveAccount(){return $t(this,void 0,void 0,(function*(){yield this.client.setActiveAccount()}))}}},function(t,e,r){"use strict";r.r(e);var n=r(239),i=r.n(n),o=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i.a),s=a,u=r(117),c=r.n(u),l=r(7),f=r(769),h=r.n(f),d=r(69),p=r.n(d),g=r(224),m=r(9),y=r(770),b=r(2),v=(r(1443),r(738),r(183)),A=r.n(v),w=r(112),_=r.n(w);const E=t=>l.Buffer.isBuffer(t)?t:t instanceof Uint8Array?l.Buffer.from(t.buffer,t.byteOffset,t.byteLength):l.Buffer.from(t);var I={},S={},M=C;function C(t,e){if(!t)throw new Error(e||"Assertion failed")}C.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)};var k={exports:{}};"function"===typeof Object.create?k.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:k.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}};var x=M,B=k.exports;function O(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function T(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function R(t){return 1===t.length?"0"+t:t}function P(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}S.inherits=B,S.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"===typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=63&o|128):O(t,i)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i>>0}return o},S.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},S.rotr32=function(t,e){return t>>>e|t<<32-e},S.rotl32=function(t,e){return t<>>32-e},S.sum32=function(t,e){return t+e>>>0},S.sum32_3=function(t,e,r){return t+e+r>>>0},S.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},S.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},S.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,a=(o>>0,t[e+1]=o},S.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},S.sum64_lo=function(t,e,r,n){return e+n>>>0},S.sum64_4_hi=function(t,e,r,n,i,o,a,s){var u=0,c=e;return u+=(c=c+n>>>0)>>0)>>0)>>0},S.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},S.sum64_5_hi=function(t,e,r,n,i,o,a,s,u,c){var l=0,f=e;return l+=(f=f+n>>>0)>>0)>>0)>>0)>>0},S.sum64_5_lo=function(t,e,r,n,i,o,a,s,u,c){return e+n+o+s+c>>>0},S.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},S.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},S.shr64_hi=function(t,e,r){return t>>>r},S.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0};var N={},j=S,D=M;function L(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}N.BlockHash=L,L.prototype.update=function(t,e){if(t=j.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=j.join32(t,0,t.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o>>3},U.g1_256=function(t){return Q(t,17)^Q(t,19)^t>>>10};var q=S,K=N,V=U,W=q.rotl32,J=q.sum32,Y=q.sum32_5,X=V.ft_1,Z=K.BlockHash,$=[1518500249,1859775393,2400959708,3395469782];function tt(){if(!(this instanceof tt))return new tt;Z.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}q.inherits(tt,Z);var et=tt;tt.blockSize=512,tt.outSize=160,tt.hmacStrength=80,tt.padLength=64,tt.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;nthis.blockSize&&(t=(new this.Hash).update(t).digest()),Ae(t.length<=this.blockSize);for(var e=t.length;e{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var Be,Oe;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(Be||(Be={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(Oe||(Oe={}));const Te="0123456789abcdef";class Re{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const r=t.toLowerCase();null==Me[r]&&this.throwArgumentError("invalid log level name","logLevel",t),Ce>Me[r]||console.log.apply(console,e)}debug(){for(var t=arguments.length,e=new Array(t),r=0;r{const e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t>4],r+=Te[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(a){n.push(t+"="+JSON.stringify(r[t].toString()))}})),n.push("code=".concat(e)),n.push("version=".concat(this.version));const i=t;let o="";switch(e){case Oe.NUMERIC_FAULT:{o="NUMERIC_FAULT";const e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":o+="-"+e;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break}case Oe.CALL_EXCEPTION:case Oe.INSUFFICIENT_FUNDS:case Oe.MISSING_NEW:case Oe.NONCE_EXPIRED:case Oe.REPLACEMENT_UNDERPRICED:case Oe.TRANSACTION_REPLACED:case Oe.UNPREDICTABLE_GAS_LIMIT:o=e}o&&(t+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const a=new Error(t);return a.reason=i,a.code=e,Object.keys(r).forEach((function(t){a[t]=r[t]})),a}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,Re.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){xe&&this.throwError("platform missing String.prototype.normalize",Re.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:xe})}checkSafeUint53(t,e){"number"===typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,Re.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,Re.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",te&&this.throwError("too many arguments"+r,Re.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){t!==Object&&null!=t||this.throwError("missing new",Re.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",Re.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",Re.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return ke||(ke=new Re("logger/5.6.0")),ke}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",Re.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Ie){if(!t)return;this.globalLogger().throwError("error censorship permanent",Re.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Se=!!t,Ie=!!e}static setLogLevel(t){const e=Me[t.toLowerCase()];null!=e?Ce=e:Re.globalLogger().warn("invalid log level - "+t)}static from(t){return new Re(t)}}Re.errors=Oe,Re.levels=Be;const Pe=new Re("bytes/5.6.0");function Ne(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Ne(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function je(t){return"number"===typeof t&&t==t&&t%1===0}function De(t,e){if(e||(e={}),"number"===typeof t){Pe.checkSafeUint53(t,"invalid arrayify value");const e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),Ne(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),function(t){return!!t.toHexString}(t)&&(t=t.toHexString()),function(t,e){if("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))return!1;if(e&&t.length!==2+2*e)return!1;return!0}(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0x0"+r.substring(2):"right"===e.hexPad?r+="0":Pe.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let t=0;t=256)return!1}return!0}(t)?Ne(new Uint8Array(t)):Pe.throwArgumentError("invalid arrayify value","value",t)}function Le(t){return"0x"+Ee.sha256().update(De(t)).digest("hex")}new Re("sha2/5.6.0");class Fe{constructor(t){Object.assign(this,t)}encode(){return l.Buffer.from(Object(g.serialize)(Ue,this))}static decode(t){return Object(g.deserialize)(Ue,this,t)}static decodeUnchecked(t){return Object(g.deserializeUnchecked)(Ue,this,t)}}const Ue=new Map;class Qe extends Fe{constructor(t){if(super({}),this._bn=void 0,function(t){return void 0!==t._bn}(t))this._bn=t._bn;else{if("string"===typeof t){const e=p.a.decode(t);if(32!=e.length)throw new Error("Invalid public key input");this._bn=new h.a(e)}else this._bn=new h.a(t);if(this._bn.byteLength()>32)throw new Error("Invalid public key input")}}equals(t){return this._bn.eq(t._bn)}toBase58(){return p.a.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){return this.toBuffer()}toBuffer(){const t=this._bn.toArrayLike(l.Buffer);if(32===t.length)return t;const e=l.Buffer.alloc(32);return t.copy(e,32-t.length),e}toString(){return this.toBase58()}static async createWithSeed(t,e,r){const n=l.Buffer.concat([t.toBuffer(),l.Buffer.from(e),r.toBuffer()]),i=Le(new Uint8Array(n)).slice(2);return new Qe(l.Buffer.from(i,"hex"))}static createProgramAddressSync(t,e){let r=l.Buffer.alloc(0);t.forEach((function(t){if(t.length>32)throw new TypeError("Max seed length exceeded");r=l.Buffer.concat([r,E(t)])})),r=l.Buffer.concat([r,e.toBuffer(),l.Buffer.from("ProgramDerivedAddress")]);let n=Le(new Uint8Array(r)).slice(2),i=new h.a(n,16).toArray(void 0,32);if(He(i))throw new Error("Invalid seeds, address must fall off the curve");return new Qe(i)}static async createProgramAddress(t,e){return this.createProgramAddressSync(t,e)}static findProgramAddressSync(t,e){let r,n=255;for(;0!=n;){try{const i=t.concat(l.Buffer.from([n]));r=this.createProgramAddressSync(i,e)}catch(i){if(i instanceof TypeError)throw i;n--;continue}return[r,n]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(t,e){return this.findProgramAddressSync(t,e)}static isOnCurve(t){return 1==He(new Qe(t).toBytes())}}Qe.default=new Qe("11111111111111111111111111111111"),Ue.set(Qe,{kind:"struct",fields:[["_bn","u256"]]});let Ge=c.a.lowlevel;function He(t){var e=[Ge.gf(),Ge.gf(),Ge.gf(),Ge.gf()],r=Ge.gf(),n=Ge.gf(),i=Ge.gf(),o=Ge.gf(),a=Ge.gf(),s=Ge.gf(),u=Ge.gf();return Ge.set25519(e[2],ze),Ge.unpack25519(e[1],t),Ge.S(i,e[1]),Ge.M(o,i,Ge.D),Ge.Z(i,i,e[2]),Ge.A(o,e[2],o),Ge.S(a,o),Ge.S(s,a),Ge.M(u,s,a),Ge.M(r,u,i),Ge.M(r,r,o),Ge.pow2523(r,r),Ge.M(r,r,i),Ge.M(r,r,o),Ge.M(r,r,o),Ge.M(e[0],r,o),Ge.S(n,e[0]),Ge.M(n,n,o),Ke(n,i)&&Ge.M(e[0],e[0],qe),Ge.S(n,e[0]),Ge.M(n,n,o),Ke(n,i)?0:1}let ze=Ge.gf([1]),qe=Ge.gf([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function Ke(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return Ge.pack25519(r,t),Ge.pack25519(n,e),Ge.crypto_verify_32(r,0,n,0)}new Qe("BPFLoader1111111111111111111111111111111111");const Ve=1232;class We extends Error{constructor(t){super("Signature ".concat(t," has expired: block height exceeded.")),this.signature=void 0,this.signature=t}}Object.defineProperty(We.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class Je extends Error{constructor(t,e){super("Transaction was not confirmed in ".concat(e.toFixed(2)," seconds. It is ")+"unknown if it succeeded or failed. Check signature "+"".concat(t," using the Solana Explorer or CLI tools.")),this.signature=void 0,this.signature=t}}Object.defineProperty(Je.prototype,"name",{value:"TransactionExpiredTimeoutError"});const Ye=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"publicKey";return m.blob(32,t)},Xe=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"string";const e=m.struct([m.u32("length"),m.u32("lengthPadding"),m.blob(m.offset(m.u32(),-8),"chars")],t),r=e.decode.bind(e),n=e.encode.bind(e),i=e;return i.decode=(t,e)=>r(t,e).chars.toString(),i.encode=(t,e,r)=>{const i={chars:l.Buffer.from(t,"utf8")};return n(i,e,r)},i.alloc=t=>m.u32().span+m.u32().span+l.Buffer.from(t,"utf8").length,i};function Ze(t){let e=0,r=0;for(;;){let n=t.shift();if(e|=(127&n)<<7*r,r+=1,0===(128&n))break}return e}function $e(t,e){let r=e;for(;;){let e=127&r;if(r>>=7,0==r){t.push(e);break}e|=128,t.push(e)}}class tr{constructor(t){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map((t=>new Qe(t))),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach((t=>this.indexToProgramIds.set(t.programIdIndex,this.accountKeys[t.programIdIndex])))}isAccountSigner(t){return t=this.header.numRequiredSignatures&&t!this.isProgramId(e)))}serialize(){const t=this.accountKeys.length;let e=[];$e(e,t);const r=this.instructions.map((t=>{const{accounts:e,programIdIndex:r}=t,n=Array.from(p.a.decode(t.data));let i=[];$e(i,e.length);let o=[];return $e(o,n.length),{programIdIndex:r,keyIndicesCount:l.Buffer.from(i),keyIndices:e,dataLength:l.Buffer.from(o),data:n}}));let n=[];$e(n,r.length);let i=l.Buffer.alloc(Ve);l.Buffer.from(n).copy(i);let o=n.length;r.forEach((t=>{const e=m.struct([m.u8("programIdIndex"),m.blob(t.keyIndicesCount.length,"keyIndicesCount"),m.seq(m.u8("keyIndex"),t.keyIndices.length,"keyIndices"),m.blob(t.dataLength.length,"dataLength"),m.seq(m.u8("userdatum"),t.data.length,"data")]).encode(t,i,o);o+=e})),i=i.slice(0,o);const a=m.struct([m.blob(1,"numRequiredSignatures"),m.blob(1,"numReadonlySignedAccounts"),m.blob(1,"numReadonlyUnsignedAccounts"),m.blob(e.length,"keyCount"),m.seq(Ye("key"),t,"keys"),Ye("recentBlockhash")]),s={numRequiredSignatures:l.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:l.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:l.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:l.Buffer.from(e),keys:this.accountKeys.map((t=>E(t.toBytes()))),recentBlockhash:p.a.decode(this.recentBlockhash)};let u=l.Buffer.alloc(2048);const c=a.encode(s,u);return i.copy(u,c),u.slice(0,c+i.length)}static from(t){let e=[...t];const r=e.shift(),n=e.shift(),i=e.shift(),o=Ze(e);let a=[];for(let h=0;h{let{pubkey:e,isSigner:r,isWritable:n}=t;return{pubkey:e.toJSON(),isSigner:r,isWritable:n}})),programId:this.programId.toJSON(),data:[...this.data]}}}class or{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(t){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this._message=void 0,this._json=void 0,t)if(t.feePayer&&(this.feePayer=t.feePayer),t.signatures&&(this.signatures=t.signatures),Object.prototype.hasOwnProperty.call(t,"lastValidBlockHeight")){const{blockhash:e,lastValidBlockHeight:r}=t;this.recentBlockhash=e,this.lastValidBlockHeight=r}else{const{recentBlockhash:e,nonceInfo:r}=t;r&&(this.nonceInfo=r),this.recentBlockhash=e}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map((t=>t.toJSON())),signers:this.signatures.map((t=>{let{publicKey:e}=t;return e.toJSON()}))}}add(){for(var t=arguments.length,e=new Array(t),r=0;r{"instructions"in t?this.instructions=this.instructions.concat(t.instructions):"data"in t&&"programId"in t&&"keys"in t?this.instructions.push(t):this.instructions.push(new ir(t))})),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let t,e,r;if(this.nonceInfo?(t=this.nonceInfo.nonce,e=this.instructions[0]!=this.nonceInfo.nonceInstruction?[this.nonceInfo.nonceInstruction,...this.instructions]:this.instructions):(t=this.recentBlockhash,e=this.instructions),!t)throw new Error("Transaction recentBlockhash required");if(e.length<1&&console.warn("No instructions provided"),this.feePayer)r=this.feePayer;else{if(!(this.signatures.length>0&&this.signatures[0].publicKey))throw new Error("Transaction fee payer required");r=this.signatures[0].publicKey}for(let p=0;p{t.keys.forEach((t=>{i.push({...t})}));const e=t.programId.toString();n.includes(e)||n.push(e)})),n.forEach((t=>{i.push({pubkey:new Qe(t),isSigner:!1,isWritable:!1})}));const o=[];i.forEach((t=>{const e=t.pubkey.toString(),r=o.findIndex((t=>t.pubkey.toString()===e));r>-1?(o[r].isWritable=o[r].isWritable||t.isWritable,o[r].isSigner=o[r].isSigner||t.isSigner):o.push(t)})),o.sort((function(t,e){return t.isSigner!==e.isSigner?t.isSigner?-1:1:t.isWritable!==e.isWritable?t.isWritable?-1:1:t.pubkey.toBase58().localeCompare(e.pubkey.toBase58())}));const a=o.findIndex((t=>t.pubkey.equals(r)));if(a>-1){const[t]=o.splice(a,1);t.isSigner=!0,t.isWritable=!0,o.unshift(t)}else o.unshift({pubkey:r,isSigner:!0,isWritable:!0});for(const p of this.signatures){const t=o.findIndex((t=>t.pubkey.equals(p.publicKey)));if(!(t>-1))throw new Error("unknown signer: ".concat(p.publicKey.toString()));o[t].isSigner||(o[t].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."))}let s=0,u=0,c=0;const l=[],f=[];o.forEach((t=>{let{pubkey:e,isSigner:r,isWritable:n}=t;r?(l.push(e.toString()),s+=1,n||(u+=1)):(f.push(e.toString()),n||(c+=1))}));const h=l.concat(f),d=e.map((t=>{const{data:e,programId:r}=t;return{programIdIndex:h.indexOf(r.toString()),accounts:t.keys.map((t=>h.indexOf(t.pubkey.toString()))),data:p.a.encode(e)}}));return d.forEach((t=>{er(t.programIdIndex>=0),t.accounts.forEach((t=>er(t>=0)))})),new tr({header:{numRequiredSignatures:s,numReadonlySignedAccounts:u,numReadonlyUnsignedAccounts:c},accountKeys:h,recentBlockhash:t,instructions:d})}_compile(){const t=this.compileMessage(),e=t.accountKeys.slice(0,t.header.numRequiredSignatures);if(this.signatures.length===e.length){if(this.signatures.every(((t,r)=>e[r].equals(t.publicKey))))return t}return this.signatures=e.map((t=>({signature:null,publicKey:t}))),t}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(t){return(await t.getFeeForMessage(this.compileMessage())).value}setSigners(){for(var t=arguments.length,e=new Array(t),r=0;r{const e=t.toString();return!n.has(e)&&(n.add(e),!0)})).map((t=>({signature:null,publicKey:t})))}sign(){for(var t=arguments.length,e=new Array(t),r=0;r({signature:null,publicKey:t.publicKey})));const o=this._compile();this._partialSign(o,...i)}partialSign(){for(var t=arguments.length,e=new Array(t),r=0;r1?r-1:0),i=1;i{const r=c.a.sign.detached(e,t.secretKey);this._addSignature(t.publicKey,E(r))}))}addSignature(t,e){this._compile(),this._addSignature(t,e)}_addSignature(t,e){er(64===e.length);const r=this.signatures.findIndex((e=>t.equals(e.publicKey)));if(r<0)throw new Error("unknown signer: ".concat(t.toString()));this.signatures[r].signature=l.Buffer.from(e)}verifySignatures(){return this._verifySignatures(this.serializeMessage(),!0)}_verifySignatures(t,e){for(const{signature:r,publicKey:n}of this.signatures)if(null===r){if(e)return!1}else if(!c.a.sign.detached.verify(t,r,n.toBuffer()))return!1;return!0}serialize(t){const{requireAllSignatures:e,verifySignatures:r}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},t),n=this.serializeMessage();if(r&&!this._verifySignatures(n,e))throw new Error("Signature verification failed");return this._serialize(n)}_serialize(t){const{signatures:e}=this,r=[];$e(r,e.length);const n=r.length+64*e.length+t.length,i=l.Buffer.alloc(n);return er(e.length<256),l.Buffer.from(r).copy(i,0),e.forEach(((t,e)=>{let{signature:n}=t;null!==n&&(er(64===n.length,"signature has invalid length"),l.Buffer.from(n).copy(i,r.length+64*e))})),t.copy(i,r.length+64*e.length),er(i.length<=Ve,"Transaction too large: ".concat(i.length," > ").concat(Ve)),i}get keys(){return er(1===this.instructions.length),this.instructions[0].keys.map((t=>t.pubkey))}get programId(){return er(1===this.instructions.length),this.instructions[0].programId}get data(){return er(1===this.instructions.length),this.instructions[0].data}static from(t){let e=[...t];const r=Ze(e);let n=[];for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:[];const r=new or;return r.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(r.feePayer=t.accountKeys[0]),e.forEach(((e,n)=>{const i={signature:e==p.a.encode(nr)?null:p.a.decode(e),publicKey:t.accountKeys[n]};r.signatures.push(i)})),t.instructions.forEach((e=>{const n=e.accounts.map((e=>{const n=t.accountKeys[e];return{pubkey:n,isSigner:r.signatures.some((t=>t.publicKey.toString()===n.toString()))||t.isAccountSigner(e),isWritable:t.isAccountWritable(e)}}));r.instructions.push(new ir({keys:n,programId:t.accountKeys[e.programIdIndex],data:p.a.decode(e.data)}))})),r._message=t,r._json=r.toJSON(),r}}const ar=new Qe("SysvarC1ock11111111111111111111111111111111"),sr=(new Qe("SysvarEpochSchedu1e111111111111111111111111"),new Qe("Sysvar1nstructions1111111111111111111111111"),new Qe("SysvarRecentB1ockHashes11111111111111111111")),ur=new Qe("SysvarRent111111111111111111111111111111111"),cr=(new Qe("SysvarRewards111111111111111111111111111111"),new Qe("SysvarS1otHashes111111111111111111111111111"),new Qe("SysvarS1otHistory11111111111111111111111111"),new Qe("SysvarStakeHistory1111111111111111111111111"));async function lr(t,e,r,n){const i=n&&{skipPreflight:n.skipPreflight,preflightCommitment:n.preflightCommitment||n.commitment,maxRetries:n.maxRetries,minContextSlot:n.minContextSlot},o=await t.sendTransaction(e,r,i),a=null!=e.recentBlockhash&&null!=e.lastValidBlockHeight?(await t.confirmTransaction({signature:o,blockhash:e.recentBlockhash,lastValidBlockHeight:e.lastValidBlockHeight},n&&n.commitment)).value:(await t.confirmTransaction(o,n&&n.commitment)).value;if(a.err)throw new Error("Transaction ".concat(o," failed (").concat(JSON.stringify(a),")"));return o}function fr(t){return new Promise((e=>setTimeout(e,t)))}function hr(t,e){const r=t.layout.span>=0?t.layout.span:function(t,e){const r=t=>{if(t.span>=0)return t.span;if("function"===typeof t.alloc)return t.alloc(e[t.property]);if("count"in t&&"elementLayout"in t){const n=e[t.property];if(Array.isArray(n))return n.length*r(t.elementLayout)}return 0};let n=0;return t.layout.fields.forEach((t=>{n+=r(t)})),n}(t,e),n=l.Buffer.alloc(r),i=Object.assign({instruction:t.index},e);return t.layout.encode(i,n),n}const dr=m.nu64("lamportsPerSignature"),pr=m.struct([m.u32("version"),m.u32("state"),Ye("authorizedPubkey"),Ye("nonce"),m.struct([dr],"feeCalculator")]),gr=pr.span;const mr=(yr=8,t=>{const e=Object(m.blob)(yr,t),{encode:r,decode:n}=(t=>({decode:t.decode.bind(t),encode:t.encode.bind(t)}))(e),i=e;return i.decode=(t,e)=>{const r=n(t,e);return Object(y.toBigIntLE)(l.Buffer.from(r))},i.encode=(t,e,n)=>{const i=Object(y.toBufferLE)(t,yr);return r(i,e,n)},i});var yr;const br=Object.freeze({Create:{index:0,layout:m.struct([m.u32("instruction"),m.ns64("lamports"),m.ns64("space"),Ye("programId")])},Assign:{index:1,layout:m.struct([m.u32("instruction"),Ye("programId")])},Transfer:{index:2,layout:m.struct([m.u32("instruction"),mr("lamports")])},CreateWithSeed:{index:3,layout:m.struct([m.u32("instruction"),Ye("base"),Xe("seed"),m.ns64("lamports"),m.ns64("space"),Ye("programId")])},AdvanceNonceAccount:{index:4,layout:m.struct([m.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:m.struct([m.u32("instruction"),m.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:m.struct([m.u32("instruction"),Ye("authorized")])},AuthorizeNonceAccount:{index:7,layout:m.struct([m.u32("instruction"),Ye("authorized")])},Allocate:{index:8,layout:m.struct([m.u32("instruction"),m.ns64("space")])},AllocateWithSeed:{index:9,layout:m.struct([m.u32("instruction"),Ye("base"),Xe("seed"),m.ns64("space"),Ye("programId")])},AssignWithSeed:{index:10,layout:m.struct([m.u32("instruction"),Ye("base"),Xe("seed"),Ye("programId")])},TransferWithSeed:{index:11,layout:m.struct([m.u32("instruction"),mr("lamports"),Xe("seed"),Ye("programId")])},UpgradeNonceAccount:{index:12,layout:m.struct([m.u32("instruction")])}});class vr{constructor(){}static createAccount(t){const e=hr(br.Create,{lamports:t.lamports,space:t.space,programId:E(t.programId.toBuffer())});return new ir({keys:[{pubkey:t.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:t.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:e})}static transfer(t){let e,r;if("basePubkey"in t){e=hr(br.TransferWithSeed,{lamports:BigInt(t.lamports),seed:t.seed,programId:E(t.programId.toBuffer())}),r=[{pubkey:t.fromPubkey,isSigner:!1,isWritable:!0},{pubkey:t.basePubkey,isSigner:!0,isWritable:!1},{pubkey:t.toPubkey,isSigner:!1,isWritable:!0}]}else{e=hr(br.Transfer,{lamports:BigInt(t.lamports)}),r=[{pubkey:t.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:t.toPubkey,isSigner:!1,isWritable:!0}]}return new ir({keys:r,programId:this.programId,data:e})}static assign(t){let e,r;if("basePubkey"in t){e=hr(br.AssignWithSeed,{base:E(t.basePubkey.toBuffer()),seed:t.seed,programId:E(t.programId.toBuffer())}),r=[{pubkey:t.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:t.basePubkey,isSigner:!0,isWritable:!1}]}else{e=hr(br.Assign,{programId:E(t.programId.toBuffer())}),r=[{pubkey:t.accountPubkey,isSigner:!0,isWritable:!0}]}return new ir({keys:r,programId:this.programId,data:e})}static createAccountWithSeed(t){const e=hr(br.CreateWithSeed,{base:E(t.basePubkey.toBuffer()),seed:t.seed,lamports:t.lamports,space:t.space,programId:E(t.programId.toBuffer())});let r=[{pubkey:t.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:t.newAccountPubkey,isSigner:!1,isWritable:!0}];return t.basePubkey!=t.fromPubkey&&r.push({pubkey:t.basePubkey,isSigner:!0,isWritable:!1}),new ir({keys:r,programId:this.programId,data:e})}static createNonceAccount(t){const e=new or;"basePubkey"in t&&"seed"in t?e.add(vr.createAccountWithSeed({fromPubkey:t.fromPubkey,newAccountPubkey:t.noncePubkey,basePubkey:t.basePubkey,seed:t.seed,lamports:t.lamports,space:gr,programId:this.programId})):e.add(vr.createAccount({fromPubkey:t.fromPubkey,newAccountPubkey:t.noncePubkey,lamports:t.lamports,space:gr,programId:this.programId}));const r={noncePubkey:t.noncePubkey,authorizedPubkey:t.authorizedPubkey};return e.add(this.nonceInitialize(r)),e}static nonceInitialize(t){const e=hr(br.InitializeNonceAccount,{authorized:E(t.authorizedPubkey.toBuffer())}),r={keys:[{pubkey:t.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:sr,isSigner:!1,isWritable:!1},{pubkey:ur,isSigner:!1,isWritable:!1}],programId:this.programId,data:e};return new ir(r)}static nonceAdvance(t){const e=hr(br.AdvanceNonceAccount),r={keys:[{pubkey:t.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:sr,isSigner:!1,isWritable:!1},{pubkey:t.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:e};return new ir(r)}static nonceWithdraw(t){const e=hr(br.WithdrawNonceAccount,{lamports:t.lamports});return new ir({keys:[{pubkey:t.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:t.toPubkey,isSigner:!1,isWritable:!0},{pubkey:sr,isSigner:!1,isWritable:!1},{pubkey:ur,isSigner:!1,isWritable:!1},{pubkey:t.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:e})}static nonceAuthorize(t){const e=hr(br.AuthorizeNonceAccount,{authorized:E(t.newAuthorizedPubkey.toBuffer())});return new ir({keys:[{pubkey:t.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:t.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:e})}static allocate(t){let e,r;if("basePubkey"in t){e=hr(br.AllocateWithSeed,{base:E(t.basePubkey.toBuffer()),seed:t.seed,space:t.space,programId:E(t.programId.toBuffer())}),r=[{pubkey:t.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:t.basePubkey,isSigner:!0,isWritable:!1}]}else{e=hr(br.Allocate,{space:t.space}),r=[{pubkey:t.accountPubkey,isSigner:!0,isWritable:!0}]}return new ir({keys:r,programId:this.programId,data:e})}}vr.programId=new Qe("11111111111111111111111111111111");class Ar{constructor(){}static getMinNumSignatures(t){return 2*(Math.ceil(t/Ar.chunkSize)+1+1)}static async load(t,e,r,n,i){{const o=await t.getMinimumBalanceForRentExemption(i.length),a=await t.getAccountInfo(r.publicKey,"confirmed");let s=null;if(null!==a){if(a.executable)return console.error("Program load failed, account is already executable"),!1;a.data.length!==i.length&&(s=s||new or,s.add(vr.allocate({accountPubkey:r.publicKey,space:i.length}))),a.owner.equals(n)||(s=s||new or,s.add(vr.assign({accountPubkey:r.publicKey,programId:n}))),a.lamports0?o:1,space:i.length,programId:n}));null!==s&&await lr(t,s,[e,r],{commitment:"confirmed"})}const o=m.struct([m.u32("instruction"),m.u32("offset"),m.u32("bytesLength"),m.u32("bytesLengthPadding"),m.seq(m.u8("byte"),m.offset(m.u32(),-8),"bytes")]),a=Ar.chunkSize;let s=0,u=i,c=[];for(;u.length>0;){const i=u.slice(0,a),f=l.Buffer.alloc(a+16);o.encode({instruction:0,offset:s,bytes:i,bytesLength:0,bytesLengthPadding:0},f);const h=(new or).add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0}],programId:n,data:f});if(c.push(lr(t,h,[e,r],{commitment:"confirmed"})),t._rpcEndpoint.includes("solana.com")){const t=4;await fr(1e3/t)}s+=a,u=u.slice(a)}await Promise.all(c);{const i=m.struct([m.u32("instruction")]),o=l.Buffer.alloc(i.span);i.encode({instruction:1},o);const a=(new or).add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0},{pubkey:ur,isSigner:!1,isWritable:!1}],programId:n,data:o});await lr(t,a,[e,r],{commitment:"confirmed"})}return!0}}Ar.chunkSize=932;new Qe("BPFLoader2111111111111111111111111111111111");Object.prototype.toString,Object.keys;class wr extends Error{constructor(t,e){super(t),this.logs=void 0,this.logs=e}}class _r extends Error{constructor(t,e){let{code:r,message:n,data:i}=t;super(null!=e?"".concat(e,": ").concat(n):n),this.code=void 0,this.data=void 0,this.code=r,this.data=i,this.name="SolanaJSONRPCError"}}globalThis.fetch;m.struct([m.u32("typeIndex"),mr("deactivationSlot"),m.nu64("lastExtendedSlot"),m.u8("lastExtendedStartIndex"),m.u8(),m.seq(Ye(),m.offset(m.u8(),-1),"authority")]),globalThis.URL;var Er;const Ir=Object(b.e)(Object(b.g)(Qe),Object(b.m)(),(t=>new Qe(t))),Sr=Object(b.n)([Object(b.m)(),Object(b.h)("base64")]),Mr=Object(b.e)(Object(b.g)(l.Buffer),Sr,(t=>l.Buffer.from(t[0],"base64")));function Cr(t){return Object(b.p)([Object(b.o)({jsonrpc:Object(b.h)("2.0"),id:Object(b.m)(),result:t}),Object(b.o)({jsonrpc:Object(b.h)("2.0"),id:Object(b.m)(),error:Object(b.o)({code:Object(b.q)(),message:Object(b.m)(),data:Object(b.k)(Object(b.a)())})})])}const kr=Cr(Object(b.q)());function xr(t){return Object(b.e)(Cr(t),kr,(e=>"error"in e?e:{...e,result:Object(b.f)(e.result,t)}))}function Br(t){return xr(Object(b.o)({context:Object(b.o)({slot:Object(b.j)()}),value:t}))}function Or(t){return Object(b.o)({context:Object(b.o)({slot:Object(b.j)()}),value:t})}const Tr=Object(b.o)({foundation:Object(b.j)(),foundationTerm:Object(b.j)(),initial:Object(b.j)(),taper:Object(b.j)(),terminal:Object(b.j)()}),Rr=(xr(Object(b.b)(Object(b.i)(Object(b.o)({epoch:Object(b.j)(),effectiveSlot:Object(b.j)(),amount:Object(b.j)(),postBalance:Object(b.j)()})))),Object(b.o)({epoch:Object(b.j)(),slotIndex:Object(b.j)(),slotsInEpoch:Object(b.j)(),absoluteSlot:Object(b.j)(),blockHeight:Object(b.k)(Object(b.j)()),transactionCount:Object(b.k)(Object(b.j)())})),Pr=Object(b.o)({slotsPerEpoch:Object(b.j)(),leaderScheduleSlotOffset:Object(b.j)(),warmup:Object(b.d)(),firstNormalEpoch:Object(b.j)(),firstNormalSlot:Object(b.j)()}),Nr=Object(b.l)(Object(b.m)(),Object(b.b)(Object(b.j)())),jr=Object(b.i)(Object(b.p)([Object(b.o)({}),Object(b.m)()])),Dr=Object(b.o)({err:jr}),Lr=Object(b.h)("receivedSignature");Object(b.o)({"solana-core":Object(b.m)(),"feature-set":Object(b.k)(Object(b.j)())}),Br(Object(b.o)({err:Object(b.i)(Object(b.p)([Object(b.o)({}),Object(b.m)()])),logs:Object(b.i)(Object(b.b)(Object(b.m)())),accounts:Object(b.k)(Object(b.i)(Object(b.b)(Object(b.i)(Object(b.o)({executable:Object(b.d)(),owner:Object(b.m)(),lamports:Object(b.j)(),data:Object(b.b)(Object(b.m)()),rentEpoch:Object(b.k)(Object(b.j)())}))))),unitsConsumed:Object(b.k)(Object(b.j)()),returnData:Object(b.k)(Object(b.i)(Object(b.o)({programId:Object(b.m)(),data:Object(b.n)([Object(b.m)(),Object(b.h)("base64")])})))})),Br(Object(b.o)({byIdentity:Object(b.l)(Object(b.m)(),Object(b.b)(Object(b.j)())),range:Object(b.o)({firstSlot:Object(b.j)(),lastSlot:Object(b.j)()})}));xr(Tr),xr(Rr),xr(Pr),xr(Nr),xr(Object(b.j)()),Br(Object(b.o)({total:Object(b.j)(),circulating:Object(b.j)(),nonCirculating:Object(b.j)(),nonCirculatingAccounts:Object(b.b)(Ir)}));const Fr=Object(b.o)({amount:Object(b.m)(),uiAmount:Object(b.i)(Object(b.j)()),decimals:Object(b.j)(),uiAmountString:Object(b.k)(Object(b.m)())}),Ur=(Br(Object(b.b)(Object(b.o)({address:Ir,amount:Object(b.m)(),uiAmount:Object(b.i)(Object(b.j)()),decimals:Object(b.j)(),uiAmountString:Object(b.k)(Object(b.m)())}))),Br(Object(b.b)(Object(b.o)({pubkey:Ir,account:Object(b.o)({executable:Object(b.d)(),owner:Ir,lamports:Object(b.j)(),data:Mr,rentEpoch:Object(b.j)()})}))),Object(b.o)({program:Object(b.m)(),parsed:Object(b.q)(),space:Object(b.j)()})),Qr=(Br(Object(b.b)(Object(b.o)({pubkey:Ir,account:Object(b.o)({executable:Object(b.d)(),owner:Ir,lamports:Object(b.j)(),data:Ur,rentEpoch:Object(b.j)()})}))),Br(Object(b.b)(Object(b.o)({lamports:Object(b.j)(),address:Ir}))),Object(b.o)({executable:Object(b.d)(),owner:Ir,lamports:Object(b.j)(),data:Mr,rentEpoch:Object(b.j)()})),Gr=(Object(b.o)({pubkey:Ir,account:Qr}),Object(b.e)(Object(b.p)([Object(b.g)(l.Buffer),Ur]),Object(b.p)([Sr,Ur]),(t=>Array.isArray(t)?Object(b.f)(t,Mr):t))),Hr=Object(b.o)({executable:Object(b.d)(),owner:Ir,lamports:Object(b.j)(),data:Gr,rentEpoch:Object(b.j)()}),zr=(Object(b.o)({pubkey:Ir,account:Hr}),Object(b.o)({state:Object(b.p)([Object(b.h)("active"),Object(b.h)("inactive"),Object(b.h)("activating"),Object(b.h)("deactivating")]),active:Object(b.j)(),inactive:Object(b.j)()}),xr(Object(b.b)(Object(b.o)({signature:Object(b.m)(),slot:Object(b.j)(),err:jr,memo:Object(b.i)(Object(b.m)()),blockTime:Object(b.k)(Object(b.i)(Object(b.j)()))}))),xr(Object(b.b)(Object(b.o)({signature:Object(b.m)(),slot:Object(b.j)(),err:jr,memo:Object(b.i)(Object(b.m)()),blockTime:Object(b.k)(Object(b.i)(Object(b.j)()))}))),Object(b.o)({subscription:Object(b.j)(),result:Or(Qr)}),Object(b.o)({pubkey:Ir,account:Qr})),qr=(Object(b.o)({subscription:Object(b.j)(),result:Or(zr)}),Object(b.o)({parent:Object(b.j)(),slot:Object(b.j)(),root:Object(b.j)()})),Kr=(Object(b.o)({subscription:Object(b.j)(),result:qr}),Object(b.p)([Object(b.o)({type:Object(b.p)([Object(b.h)("firstShredReceived"),Object(b.h)("completed"),Object(b.h)("optimisticConfirmation"),Object(b.h)("root")]),slot:Object(b.j)(),timestamp:Object(b.j)()}),Object(b.o)({type:Object(b.h)("createdBank"),parent:Object(b.j)(),slot:Object(b.j)(),timestamp:Object(b.j)()}),Object(b.o)({type:Object(b.h)("frozen"),slot:Object(b.j)(),timestamp:Object(b.j)(),stats:Object(b.o)({numTransactionEntries:Object(b.j)(),numSuccessfulTransactions:Object(b.j)(),numFailedTransactions:Object(b.j)(),maxTransactionsPerEntry:Object(b.j)()})}),Object(b.o)({type:Object(b.h)("dead"),slot:Object(b.j)(),timestamp:Object(b.j)(),err:Object(b.m)()})])),Vr=(Object(b.o)({subscription:Object(b.j)(),result:Kr}),Object(b.o)({subscription:Object(b.j)(),result:Or(Object(b.p)([Dr,Lr]))}),Object(b.o)({subscription:Object(b.j)(),result:Object(b.j)()}),Object(b.o)({pubkey:Object(b.m)(),gossip:Object(b.i)(Object(b.m)()),tpu:Object(b.i)(Object(b.m)()),rpc:Object(b.i)(Object(b.m)()),version:Object(b.i)(Object(b.m)())}),Object(b.o)({votePubkey:Object(b.m)(),nodePubkey:Object(b.m)(),activatedStake:Object(b.j)(),epochVoteAccount:Object(b.d)(),epochCredits:Object(b.b)(Object(b.n)([Object(b.j)(),Object(b.j)(),Object(b.j)()])),commission:Object(b.j)(),lastVote:Object(b.j)(),rootSlot:Object(b.i)(Object(b.j)())})),Wr=(xr(Object(b.o)({current:Object(b.b)(Vr),delinquent:Object(b.b)(Vr)})),Object(b.p)([Object(b.h)("processed"),Object(b.h)("confirmed"),Object(b.h)("finalized")])),Jr=Object(b.o)({slot:Object(b.j)(),confirmations:Object(b.i)(Object(b.j)()),err:jr,confirmationStatus:Object(b.k)(Wr)}),Yr=(Br(Object(b.b)(Object(b.i)(Jr))),xr(Object(b.j)()),Object(b.o)({signatures:Object(b.b)(Object(b.m)()),message:Object(b.o)({accountKeys:Object(b.b)(Object(b.m)()),header:Object(b.o)({numRequiredSignatures:Object(b.j)(),numReadonlySignedAccounts:Object(b.j)(),numReadonlyUnsignedAccounts:Object(b.j)()}),instructions:Object(b.b)(Object(b.o)({accounts:Object(b.b)(Object(b.j)()),data:Object(b.m)(),programIdIndex:Object(b.j)()})),recentBlockhash:Object(b.m)()})})),Xr=Object(b.o)({parsed:Object(b.q)(),program:Object(b.m)(),programId:Ir}),Zr=Object(b.o)({accounts:Object(b.b)(Ir),data:Object(b.m)(),programId:Ir}),$r=Object(b.p)([Zr,Xr]),tn=Object(b.p)([Object(b.o)({parsed:Object(b.q)(),program:Object(b.m)(),programId:Object(b.m)()}),Object(b.o)({accounts:Object(b.b)(Object(b.m)()),data:Object(b.m)(),programId:Object(b.m)()})]),en=Object(b.e)($r,tn,(t=>"accounts"in t?Object(b.f)(t,Zr):Object(b.f)(t,Xr))),rn=Object(b.o)({signatures:Object(b.b)(Object(b.m)()),message:Object(b.o)({accountKeys:Object(b.b)(Object(b.o)({pubkey:Ir,signer:Object(b.d)(),writable:Object(b.d)()})),instructions:Object(b.b)(en),recentBlockhash:Object(b.m)()})}),nn=Object(b.o)({accountIndex:Object(b.j)(),mint:Object(b.m)(),owner:Object(b.k)(Object(b.m)()),uiTokenAmount:Fr}),on=Object(b.o)({writable:Object(b.b)(Ir),readonly:Object(b.b)(Ir)}),an=Object(b.o)({err:jr,fee:Object(b.j)(),innerInstructions:Object(b.k)(Object(b.i)(Object(b.b)(Object(b.o)({index:Object(b.j)(),instructions:Object(b.b)(Object(b.o)({accounts:Object(b.b)(Object(b.j)()),data:Object(b.m)(),programIdIndex:Object(b.j)()}))})))),preBalances:Object(b.b)(Object(b.j)()),postBalances:Object(b.b)(Object(b.j)()),logMessages:Object(b.k)(Object(b.i)(Object(b.b)(Object(b.m)()))),preTokenBalances:Object(b.k)(Object(b.i)(Object(b.b)(nn))),postTokenBalances:Object(b.k)(Object(b.i)(Object(b.b)(nn))),loadedAddresses:Object(b.k)(on)}),sn=Object(b.o)({err:jr,fee:Object(b.j)(),innerInstructions:Object(b.k)(Object(b.i)(Object(b.b)(Object(b.o)({index:Object(b.j)(),instructions:Object(b.b)(en)})))),preBalances:Object(b.b)(Object(b.j)()),postBalances:Object(b.b)(Object(b.j)()),logMessages:Object(b.k)(Object(b.i)(Object(b.b)(Object(b.m)()))),preTokenBalances:Object(b.k)(Object(b.i)(Object(b.b)(nn))),postTokenBalances:Object(b.k)(Object(b.i)(Object(b.b)(nn))),loadedAddresses:Object(b.k)(on)}),un=(xr(Object(b.i)(Object(b.o)({blockhash:Object(b.m)(),previousBlockhash:Object(b.m)(),parentSlot:Object(b.j)(),transactions:Object(b.b)(Object(b.o)({transaction:Yr,meta:Object(b.i)(an)})),rewards:Object(b.k)(Object(b.b)(Object(b.o)({pubkey:Object(b.m)(),lamports:Object(b.j)(),postBalance:Object(b.i)(Object(b.j)()),rewardType:Object(b.i)(Object(b.m)())}))),blockTime:Object(b.i)(Object(b.j)()),blockHeight:Object(b.i)(Object(b.j)())}))),xr(Object(b.i)(Object(b.o)({blockhash:Object(b.m)(),previousBlockhash:Object(b.m)(),parentSlot:Object(b.j)(),transactions:Object(b.b)(Object(b.o)({transaction:Yr,meta:Object(b.i)(an)})),rewards:Object(b.k)(Object(b.b)(Object(b.o)({pubkey:Object(b.m)(),lamports:Object(b.j)(),postBalance:Object(b.i)(Object(b.j)()),rewardType:Object(b.i)(Object(b.m)())}))),blockTime:Object(b.i)(Object(b.j)())}))),xr(Object(b.i)(Object(b.o)({blockhash:Object(b.m)(),previousBlockhash:Object(b.m)(),parentSlot:Object(b.j)(),signatures:Object(b.b)(Object(b.m)()),blockTime:Object(b.i)(Object(b.j)())}))),xr(Object(b.i)(Object(b.o)({slot:Object(b.j)(),meta:an,blockTime:Object(b.k)(Object(b.i)(Object(b.j)())),transaction:Yr}))),xr(Object(b.i)(Object(b.o)({slot:Object(b.j)(),transaction:rn,meta:Object(b.i)(sn),blockTime:Object(b.k)(Object(b.i)(Object(b.j)()))}))),Br(Object(b.o)({blockhash:Object(b.m)(),feeCalculator:Object(b.o)({lamportsPerSignature:Object(b.j)()})})),Br(Object(b.o)({blockhash:Object(b.m)(),lastValidBlockHeight:Object(b.j)()})),Object(b.o)({slot:Object(b.j)(),numTransactions:Object(b.j)(),numSlots:Object(b.j)(),samplePeriodSecs:Object(b.j)()})),cn=(xr(Object(b.b)(un)),Br(Object(b.i)(Object(b.o)({feeCalculator:Object(b.o)({lamportsPerSignature:Object(b.j)()})}))),xr(Object(b.m)()),xr(Object(b.m)()),Object(b.o)({err:jr,logs:Object(b.b)(Object(b.m)()),signature:Object(b.m)()}));Object(b.o)({result:Or(cn),subscription:Object(b.j)()}),"js/".concat(null!==(Er="0.0.0-development")?Er:"UNKNOWN");class ln{constructor(t){this._keypair=void 0,this._keypair=t||c.a.sign.keyPair()}static generate(){return new ln(c.a.sign.keyPair())}static fromSecretKey(t,e){const r=c.a.sign.keyPair.fromSecretKey(t);if(!e||!e.skipValidation){const t=(new TextEncoder).encode("@solana/web3.js-validation-v1"),e=c.a.sign.detached(t,r.secretKey);if(!c.a.sign.detached.verify(t,e,r.publicKey))throw new Error("provided secretKey is invalid")}return new ln(r)}static fromSeed(t){return new ln(c.a.sign.keyPair.fromSeed(t))}get publicKey(){return new Qe(this._keypair.publicKey)}get secretKey(){return this._keypair.secretKey}}const fn=Object.freeze({CreateLookupTable:{index:0,layout:m.struct([m.u32("instruction"),mr("recentSlot"),m.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:m.struct([m.u32("instruction")])},ExtendLookupTable:{index:2,layout:m.struct([m.u32("instruction"),mr(),m.seq(Ye(),m.offset(m.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:m.struct([m.u32("instruction")])},CloseLookupTable:{index:4,layout:m.struct([m.u32("instruction")])}});class hn{constructor(){}static createLookupTable(t){const[e,r]=Qe.findProgramAddressSync([t.authority.toBuffer(),Object(y.toBufferLE)(BigInt(t.recentSlot),8)],this.programId),n=hr(fn.CreateLookupTable,{recentSlot:BigInt(t.recentSlot),bumpSeed:r}),i=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:t.authority,isSigner:!0,isWritable:!1},{pubkey:t.payer,isSigner:!0,isWritable:!0},{pubkey:vr.programId,isSigner:!1,isWritable:!1}];return[new ir({programId:this.programId,keys:i,data:n}),e]}static freezeLookupTable(t){const e=hr(fn.FreezeLookupTable),r=[{pubkey:t.lookupTable,isSigner:!1,isWritable:!0},{pubkey:t.authority,isSigner:!0,isWritable:!1}];return new ir({programId:this.programId,keys:r,data:e})}static extendLookupTable(t){const e=hr(fn.ExtendLookupTable,{addresses:t.addresses.map((t=>t.toBytes()))}),r=[{pubkey:t.lookupTable,isSigner:!1,isWritable:!0},{pubkey:t.authority,isSigner:!0,isWritable:!1}];return t.payer&&r.push({pubkey:t.payer,isSigner:!0,isWritable:!0},{pubkey:vr.programId,isSigner:!1,isWritable:!1}),new ir({programId:this.programId,keys:r,data:e})}static deactivateLookupTable(t){const e=hr(fn.DeactivateLookupTable),r=[{pubkey:t.lookupTable,isSigner:!1,isWritable:!0},{pubkey:t.authority,isSigner:!0,isWritable:!1}];return new ir({programId:this.programId,keys:r,data:e})}static closeLookupTable(t){const e=hr(fn.CloseLookupTable),r=[{pubkey:t.lookupTable,isSigner:!1,isWritable:!0},{pubkey:t.authority,isSigner:!0,isWritable:!1},{pubkey:t.recipient,isSigner:!1,isWritable:!0}];return new ir({programId:this.programId,keys:r,data:e})}}hn.programId=new Qe("AddressLookupTab1e1111111111111111111111111");const dn=Object.freeze({RequestUnits:{index:0,layout:m.struct([m.u8("instruction"),m.u32("units"),m.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:m.struct([m.u8("instruction"),m.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:m.struct([m.u8("instruction"),m.u32("units")])},SetComputeUnitPrice:{index:3,layout:m.struct([m.u8("instruction"),mr("microLamports")])}});class pn{constructor(){}static requestUnits(t){const e=hr(dn.RequestUnits,t);return new ir({keys:[],programId:this.programId,data:e})}static requestHeapFrame(t){const e=hr(dn.RequestHeapFrame,t);return new ir({keys:[],programId:this.programId,data:e})}static setComputeUnitLimit(t){const e=hr(dn.SetComputeUnitLimit,t);return new ir({keys:[],programId:this.programId,data:e})}static setComputeUnitPrice(t){const e=hr(dn.SetComputeUnitPrice,{microLamports:BigInt(t.microLamports)});return new ir({keys:[],programId:this.programId,data:e})}}pn.programId=new Qe("ComputeBudget111111111111111111111111111111");const gn=m.struct([m.u8("numSignatures"),m.u8("padding"),m.u16("signatureOffset"),m.u16("signatureInstructionIndex"),m.u16("publicKeyOffset"),m.u16("publicKeyInstructionIndex"),m.u16("messageDataOffset"),m.u16("messageDataSize"),m.u16("messageInstructionIndex")]);class mn{constructor(){}static createInstructionWithPublicKey(t){const{publicKey:e,message:r,signature:n,instructionIndex:i}=t;er(32===e.length,"Public Key must be ".concat(32," bytes but received ").concat(e.length," bytes")),er(64===n.length,"Signature must be ".concat(64," bytes but received ").concat(n.length," bytes"));const o=gn.span,a=o+e.length,s=a+n.length,u=l.Buffer.alloc(s+r.length),c=null==i?65535:i;return gn.encode({numSignatures:1,padding:0,signatureOffset:a,signatureInstructionIndex:c,publicKeyOffset:o,publicKeyInstructionIndex:c,messageDataOffset:s,messageDataSize:r.length,messageInstructionIndex:c},u),u.fill(e,o),u.fill(n,a),u.fill(r,s),new ir({keys:[],programId:mn.programId,data:u})}static createInstructionWithPrivateKey(t){const{privateKey:e,message:r,instructionIndex:n}=t;er(64===e.length,"Private key must be ".concat(64," bytes but received ").concat(e.length," bytes"));try{const t=ln.fromSecretKey(e),i=t.publicKey.toBytes(),o=c.a.sign.detached(r,t.secretKey);return this.createInstructionWithPublicKey({publicKey:i,message:r,signature:o,instructionIndex:n})}catch(i){throw new Error("Error creating instruction; ".concat(i))}}}mn.programId=new Qe("Ed25519SigVerify111111111111111111111111111");const{publicKeyCreate:yn,ecdsaSign:bn}=A.a,vn=m.struct([m.u8("numSignatures"),m.u16("signatureOffset"),m.u8("signatureInstructionIndex"),m.u16("ethAddressOffset"),m.u8("ethAddressInstructionIndex"),m.u16("messageDataOffset"),m.u16("messageDataSize"),m.u8("messageInstructionIndex"),m.blob(20,"ethAddress"),m.blob(64,"signature"),m.u8("recoveryId")]);class An{constructor(){}static publicKeyToEthAddress(t){er(64===t.length,"Public key must be ".concat(64," bytes but received ").concat(t.length," bytes"));try{return l.Buffer.from(_.a.keccak_256.update(E(t)).digest()).slice(-20)}catch(e){throw new Error("Error constructing Ethereum address: ".concat(e))}}static createInstructionWithPublicKey(t){const{publicKey:e,message:r,signature:n,recoveryId:i,instructionIndex:o}=t;return An.createInstructionWithEthAddress({ethAddress:An.publicKeyToEthAddress(e),message:r,signature:n,recoveryId:i,instructionIndex:o})}static createInstructionWithEthAddress(t){const{ethAddress:e,message:r,signature:n,recoveryId:i,instructionIndex:o=0}=t;let a;a="string"===typeof e?e.startsWith("0x")?l.Buffer.from(e.substr(2),"hex"):l.Buffer.from(e,"hex"):e,er(20===a.length,"Address must be ".concat(20," bytes but received ").concat(a.length," bytes"));const s=12+a.length,u=s+n.length+1,c=l.Buffer.alloc(vn.span+r.length);return vn.encode({numSignatures:1,signatureOffset:s,signatureInstructionIndex:o,ethAddressOffset:12,ethAddressInstructionIndex:o,messageDataOffset:u,messageDataSize:r.length,messageInstructionIndex:o,signature:E(n),ethAddress:E(a),recoveryId:i},c),c.fill(E(r),vn.span),new ir({keys:[],programId:An.programId,data:c})}static createInstructionWithPrivateKey(t){const{privateKey:e,message:r,instructionIndex:n}=t;er(32===e.length,"Private key must be ".concat(32," bytes but received ").concat(e.length," bytes"));try{const t=E(e),i=yn(t,!1).slice(1),o=l.Buffer.from(_.a.keccak_256.update(E(r)).digest()),{signature:a,recid:s}=bn(o,t);return this.createInstructionWithPublicKey({publicKey:i,message:r,signature:a,recoveryId:s,instructionIndex:n})}catch(i){throw new Error("Error creating instruction; ".concat(i))}}}An.programId=new Qe("KeccakSecp256k11111111111111111111111111111");const wn=new Qe("StakeConfig11111111111111111111111111111111");class _n{constructor(t,e,r){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=e,this.custodian=r}}_n.default=new _n(0,0,Qe.default);const En=Object.freeze({Initialize:{index:0,layout:m.struct([m.u32("instruction"),function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"authorized";return m.struct([Ye("staker"),Ye("withdrawer")],t)}(),function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lockup";return m.struct([m.ns64("unixTimestamp"),m.ns64("epoch"),Ye("custodian")],t)}()])},Authorize:{index:1,layout:m.struct([m.u32("instruction"),Ye("newAuthorized"),m.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:m.struct([m.u32("instruction")])},Split:{index:3,layout:m.struct([m.u32("instruction"),m.ns64("lamports")])},Withdraw:{index:4,layout:m.struct([m.u32("instruction"),m.ns64("lamports")])},Deactivate:{index:5,layout:m.struct([m.u32("instruction")])},Merge:{index:7,layout:m.struct([m.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:m.struct([m.u32("instruction"),Ye("newAuthorized"),m.u32("stakeAuthorizationType"),Xe("authoritySeed"),Ye("authorityOwner")])}});Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class In{constructor(){}static initialize(t){const{stakePubkey:e,authorized:r,lockup:n}=t,i=n||_n.default,o=hr(En.Initialize,{authorized:{staker:E(r.staker.toBuffer()),withdrawer:E(r.withdrawer.toBuffer())},lockup:{unixTimestamp:i.unixTimestamp,epoch:i.epoch,custodian:E(i.custodian.toBuffer())}}),a={keys:[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:ur,isSigner:!1,isWritable:!1}],programId:this.programId,data:o};return new ir(a)}static createAccountWithSeed(t){const e=new or;e.add(vr.createAccountWithSeed({fromPubkey:t.fromPubkey,newAccountPubkey:t.stakePubkey,basePubkey:t.basePubkey,seed:t.seed,lamports:t.lamports,space:this.space,programId:this.programId}));const{stakePubkey:r,authorized:n,lockup:i}=t;return e.add(this.initialize({stakePubkey:r,authorized:n,lockup:i}))}static createAccount(t){const e=new or;e.add(vr.createAccount({fromPubkey:t.fromPubkey,newAccountPubkey:t.stakePubkey,lamports:t.lamports,space:this.space,programId:this.programId}));const{stakePubkey:r,authorized:n,lockup:i}=t;return e.add(this.initialize({stakePubkey:r,authorized:n,lockup:i}))}static delegate(t){const{stakePubkey:e,authorizedPubkey:r,votePubkey:n}=t,i=hr(En.Delegate);return(new or).add({keys:[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:ar,isSigner:!1,isWritable:!1},{pubkey:cr,isSigner:!1,isWritable:!1},{pubkey:wn,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static authorize(t){const{stakePubkey:e,authorizedPubkey:r,newAuthorizedPubkey:n,stakeAuthorizationType:i,custodianPubkey:o}=t,a=hr(En.Authorize,{newAuthorized:E(n.toBuffer()),stakeAuthorizationType:i.index}),s=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:ar,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&s.push({pubkey:o,isSigner:!1,isWritable:!1}),(new or).add({keys:s,programId:this.programId,data:a})}static authorizeWithSeed(t){const{stakePubkey:e,authorityBase:r,authoritySeed:n,authorityOwner:i,newAuthorizedPubkey:o,stakeAuthorizationType:a,custodianPubkey:s}=t,u=hr(En.AuthorizeWithSeed,{newAuthorized:E(o.toBuffer()),stakeAuthorizationType:a.index,authoritySeed:n,authorityOwner:E(i.toBuffer())}),c=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:ar,isSigner:!1,isWritable:!1}];return s&&c.push({pubkey:s,isSigner:!1,isWritable:!1}),(new or).add({keys:c,programId:this.programId,data:u})}static splitInstruction(t){const{stakePubkey:e,authorizedPubkey:r,splitStakePubkey:n,lamports:i}=t,o=hr(En.Split,{lamports:i});return new ir({keys:[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static split(t){const e=new or;return e.add(vr.createAccount({fromPubkey:t.authorizedPubkey,newAccountPubkey:t.splitStakePubkey,lamports:0,space:this.space,programId:this.programId})),e.add(this.splitInstruction(t))}static splitWithSeed(t){const{stakePubkey:e,authorizedPubkey:r,splitStakePubkey:n,basePubkey:i,seed:o,lamports:a}=t,s=new or;return s.add(vr.allocate({accountPubkey:n,basePubkey:i,seed:o,space:this.space,programId:this.programId})),s.add(this.splitInstruction({stakePubkey:e,authorizedPubkey:r,splitStakePubkey:n,lamports:a}))}static merge(t){const{stakePubkey:e,sourceStakePubKey:r,authorizedPubkey:n}=t,i=hr(En.Merge);return(new or).add({keys:[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:ar,isSigner:!1,isWritable:!1},{pubkey:cr,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static withdraw(t){const{stakePubkey:e,authorizedPubkey:r,toPubkey:n,lamports:i,custodianPubkey:o}=t,a=hr(En.Withdraw,{lamports:i}),s=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:ar,isSigner:!1,isWritable:!1},{pubkey:cr,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&s.push({pubkey:o,isSigner:!1,isWritable:!1}),(new or).add({keys:s,programId:this.programId,data:a})}static deactivate(t){const{stakePubkey:e,authorizedPubkey:r}=t,n=hr(En.Deactivate);return(new or).add({keys:[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:ar,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:n})}}In.programId=new Qe("Stake11111111111111111111111111111111111111"),In.space=200;const Sn=Object.freeze({InitializeAccount:{index:0,layout:m.struct([m.u32("instruction"),function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"voteInit";return m.struct([Ye("nodePubkey"),Ye("authorizedVoter"),Ye("authorizedWithdrawer"),m.u8("commission")],t)}()])},Authorize:{index:1,layout:m.struct([m.u32("instruction"),Ye("newAuthorized"),m.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:m.struct([m.u32("instruction"),m.ns64("lamports")])}});Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class Mn{constructor(){}static initializeAccount(t){const{votePubkey:e,nodePubkey:r,voteInit:n}=t,i=hr(Sn.InitializeAccount,{voteInit:{nodePubkey:E(n.nodePubkey.toBuffer()),authorizedVoter:E(n.authorizedVoter.toBuffer()),authorizedWithdrawer:E(n.authorizedWithdrawer.toBuffer()),commission:n.commission}}),o={keys:[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:ur,isSigner:!1,isWritable:!1},{pubkey:ar,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i};return new ir(o)}static createAccount(t){const e=new or;return e.add(vr.createAccount({fromPubkey:t.fromPubkey,newAccountPubkey:t.votePubkey,lamports:t.lamports,space:this.space,programId:this.programId})),e.add(this.initializeAccount({votePubkey:t.votePubkey,nodePubkey:t.voteInit.nodePubkey,voteInit:t.voteInit}))}static authorize(t){const{votePubkey:e,authorizedPubkey:r,newAuthorizedPubkey:n,voteAuthorizationType:i}=t,o=hr(Sn.Authorize,{newAuthorized:E(n.toBuffer()),voteAuthorizationType:i.index}),a=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:ar,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return(new or).add({keys:a,programId:this.programId,data:o})}static withdraw(t){const{votePubkey:e,authorizedWithdrawerPubkey:r,lamports:n,toPubkey:i}=t,o=hr(Sn.Withdraw,{lamports:n}),a=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return(new or).add({keys:a,programId:this.programId,data:o})}}Mn.programId=new Qe("Vote111111111111111111111111111111111111111"),Mn.space=3731;new Qe("Va1idator1nfo111111111111111111111111111111"),Object(b.o)({name:Object(b.m)(),website:Object(b.k)(Object(b.m)()),details:Object(b.k)(Object(b.m)()),keybaseUsername:Object(b.k)(Object(b.m)())});new Qe("Vote111111111111111111111111111111111111111"),m.struct([Ye("nodePubkey"),Ye("authorizedWithdrawer"),m.u8("commission"),m.nu64(),m.seq(m.struct([m.nu64("slot"),m.u32("confirmationCount")]),m.offset(m.u32(),-8),"votes"),m.u8("rootSlotValid"),m.nu64("rootSlot"),m.nu64(),m.seq(m.struct([m.nu64("epoch"),Ye("authorizedVoter")]),m.offset(m.u32(),-8),"authorizedVoters"),m.struct([m.seq(m.struct([Ye("authorizedPubkey"),m.nu64("epochOfLastAuthorizedSwitch"),m.nu64("targetEpoch")]),32,"buf"),m.nu64("idx"),m.u8("isEmpty")],"priorVoters"),m.nu64(),m.seq(m.struct([m.nu64("epoch"),m.nu64("credits"),m.nu64("prevCredits")]),m.offset(m.u32(),-8),"epochCredits"),m.struct([m.nu64("slot"),m.nu64("timestamp")],"lastTimestamp")]);class Cn extends i.a{constructor(t,e){var r,n;if(super(),r=this,this._handleMessage=t=>{if(this._injectedProvider&&t.source===window||t.origin===this._providerUrl.origin&&t.source===this._popup)if("connected"===t.data.method){const e=new Qe(t.data.params.publicKey);this._publicKey&&this._publicKey.equals(e)||(this._publicKey&&!this._publicKey.equals(e)&&this._handleDisconnect(),this._publicKey=e,this._autoApprove=!!t.data.params.autoApprove,this.emit("connect",this._publicKey))}else if("disconnected"===t.data.method)this._handleDisconnect();else if((t.data.result||t.data.error)&&this._responsePromises.has(t.data.id)){const[e,r]=this._responsePromises.get(t.data.id);t.data.result?e(t.data.result):r(new Error(t.data.error))}},this._handleConnect=()=>(this._handlerAdded||(this._handlerAdded=!0,window.addEventListener("message",this._handleMessage),window.addEventListener("beforeunload",this.disconnect)),this._injectedProvider?new Promise((t=>{this._sendRequest("connect",{}),t()})):(window.name="parent",this._popup=window.open(this._providerUrl.toString(),"_blank","location,resizable,width=460,height=675"),new Promise((t=>{this.once("connect",t)})))),this._handleDisconnect=()=>{this._handlerAdded&&(this._handlerAdded=!1,window.removeEventListener("message",this._handleMessage),window.removeEventListener("beforeunload",this.disconnect)),this._publicKey&&(this._publicKey=null,this.emit("disconnect")),this._responsePromises.forEach(((t,e)=>{let[r,n]=t;this._responsePromises.delete(e),n("Wallet disconnected")}))},this._sendRequest=async function(t,e){if("connect"!==t&&!r.connected)throw new Error("Wallet not connected");const n=r._nextRequestId;return++r._nextRequestId,new Promise(((i,o)=>{r._responsePromises.set(n,[i,o]),r._injectedProvider?r._injectedProvider.postMessage({jsonrpc:"2.0",id:n,method:t,params:{network:r._network,...e}}):(r._popup.postMessage({jsonrpc:"2.0",id:n,method:t,params:e},r._providerUrl.origin),r.autoApprove||r._popup.focus())}))},this.connect=()=>(this._popup&&this._popup.close(),this._handleConnect()),this.disconnect=async function(){r._injectedProvider&&await r._sendRequest("disconnect",{}),r._popup&&r._popup.close(),r._handleDisconnect()},this.sign=async function(t,e){if(!(t instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");const n=await r._sendRequest("sign",{data:t,display:e});return{signature:p.a.decode(n.signature),publicKey:new Qe(n.publicKey)}},this.signTransaction=async function(t){const e=await r._sendRequest("signTransaction",{message:p.a.encode(t.serializeMessage())}),n=p.a.decode(e.signature),i=new Qe(e.publicKey);return t.addSignature(i,n),t},this.signAllTransactions=async function(t){const e=await r._sendRequest("signAllTransactions",{messages:t.map((t=>p.a.encode(t.serializeMessage())))}),n=e.signatures.map((t=>p.a.decode(t))),i=new Qe(e.publicKey);return t=t.map(((t,e)=>(t.addSignature(i,n[e]),t)))},function(t){return"object"===typeof t&&null!==t}(n=t)&&function(t){return"function"===typeof t}(n.postMessage))this._injectedProvider=t;else{if(!function(t){return"string"===typeof t}(t))throw new Error("provider parameter must be an injected provider or a URL string.");this._providerUrl=new URL(t),this._providerUrl.hash=new URLSearchParams({origin:window.location.origin,network:e}).toString()}this._network=e,this._publicKey=null,this._autoApprove=!1,this._popup=null,this._handlerAdded=!1,this._nextRequestId=1,this._responsePromises=new Map}get publicKey(){return this._publicKey}get connected(){return null!==this._publicKey}get autoApprove(){return this._autoApprove}}var kn=Cn,xn=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Bn=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},On=function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Hn=function(t){function e(r){var n=t.call(this)||this;return n._network="mainnet-beta",n._provider=null,n._adapterInstance=null,n._element=null,n._iframe=null,n._connectHandler=null,n._flutterHandlerInterval=null,n._handleEvent=function(t){var e,r,i;switch(t.type){case"connect_native_web":return n._collapseIframe(),n._adapterInstance=new Tn(n._iframe,n._network,(null===(e=t.data)||void 0===e?void 0:e.provider)||n._provider||"https://solflare.com/provider"),n._adapterInstance.on("connect",n._webConnected),n._adapterInstance.on("disconnect",n._webDisconnected),n._adapterInstance.connect(),void n._setPreferredAdapter("native_web");case"connect":return n._collapseIframe(),n._adapterInstance=new Ln(n._iframe,(null===(r=t.data)||void 0===r?void 0:r.publicKey)||""),n._adapterInstance.connect(),n._setPreferredAdapter(null===(i=t.data)||void 0===i?void 0:i.adapter),n._connectHandler&&(n._connectHandler.resolve(),n._connectHandler=null),void n.emit("connect",n.publicKey);case"disconnect":return n._connectHandler&&(n._connectHandler.reject(),n._connectHandler=null),n._disconnected(),void n.emit("disconnect");case"collapse":return void n._collapseIframe();default:return}},n._handleMessage=function(t){var e;if("solflareIframeToWalletAdapter"===(null===(e=t.data)||void 0===e?void 0:e.channel)){var r=t.data.data||{};"event"===r.type?n._handleEvent(r.event):n._adapterInstance&&n._adapterInstance.handleMessage(r)}},n._removeElement=function(){null!==n._flutterHandlerInterval&&(clearInterval(n._flutterHandlerInterval),n._flutterHandlerInterval=null),n._element&&(n._element.remove(),n._element=null)},n._removeDanglingElements=function(){var t,e,r=document.getElementsByClassName("solflare-wallet-adapter-iframe");try{for(var n=Gn(r),i=n.next();!i.done;i=n.next()){var o=i.value;o.parentElement&&o.remove()}}catch(a){t={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},n._injectElement=function(){n._removeElement(),n._removeDanglingElements();var t="".concat(e.IFRAME_URL,"?cluster=").concat(encodeURIComponent(n._network),"&origin=").concat(encodeURIComponent(window.location.origin)),r=n._getPreferredAdapter();r&&(t+="&adapter=".concat(encodeURIComponent(r))),n._element=document.createElement("div"),n._element.className="solflare-wallet-adapter-iframe",n._element.innerHTML="\n \n "),document.body.appendChild(n._element),n._iframe=n._element.querySelector("iframe"),window.fromFlutter=n._handleMobileMessage,n._flutterHandlerInterval=setInterval((function(){window.fromFlutter=n._handleMobileMessage}),100),window.addEventListener("message",n._handleMessage,!1)},n._collapseIframe=function(){n._iframe&&(n._iframe.style.top="",n._iframe.style.right="",n._iframe.style.height="2px",n._iframe.style.width="2px")},n._getPreferredAdapter=function(){return localStorage&&localStorage.getItem("solflarePreferredWalletAdapter")||null},n._setPreferredAdapter=function(t){localStorage&&t&&localStorage.setItem("solflarePreferredWalletAdapter",t)},n._clearPreferredAdapter=function(){localStorage&&localStorage.removeItem("solflarePreferredWalletAdapter")},n._webConnected=function(){n._connectHandler&&(n._connectHandler.resolve(),n._connectHandler=null),n.emit("connect",n.publicKey)},n._webDisconnected=function(){n._connectHandler&&(n._connectHandler.reject(),n._connectHandler=null),n._disconnected(),n.emit("disconnect")},n._disconnected=function(){window.removeEventListener("message",n._handleMessage,!1),n._removeElement(),n._clearPreferredAdapter(),n._adapterInstance=null},n._handleMobileMessage=function(t){var e,r;null===(r=null===(e=n._iframe)||void 0===e?void 0:e.contentWindow)||void 0===r||r.postMessage({channel:"solflareMobileToIframe",data:t},"*")},(null===r||void 0===r?void 0:r.network)&&(n._network=null===r||void 0===r?void 0:r.network),(null===r||void 0===r?void 0:r.provider)&&(n._provider=null===r||void 0===r?void 0:r.provider),n}return Fn(e,t),Object.defineProperty(e.prototype,"publicKey",{get:function(){var t;return(null===(t=this._adapterInstance)||void 0===t?void 0:t.publicKey)||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){var t;return!!(null===(t=this._adapterInstance)||void 0===t?void 0:t.connected)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"connected",{get:function(){return this.isConnected},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoApprove",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.connect=function(){return Un(this,void 0,void 0,(function(){var t=this;return Qn(this,(function(e){switch(e.label){case 0:return this.connected?[2]:(this._injectElement(),[4,new Promise((function(e,r){t._connectHandler={resolve:e,reject:r}}))]);case 1:return e.sent(),[2]}}))}))},e.prototype.disconnect=function(){return Un(this,void 0,void 0,(function(){return Qn(this,(function(t){switch(t.label){case 0:return this._adapterInstance?[4,this._adapterInstance.disconnect()]:[2];case 1:return t.sent(),this._disconnected(),this.emit("disconnect"),[2]}}))}))},e.prototype.signTransaction=function(t){return Un(this,void 0,void 0,(function(){return Qn(this,(function(e){switch(e.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signTransaction(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.signAllTransactions=function(t){return Un(this,void 0,void 0,(function(){return Qn(this,(function(e){switch(e.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signAllTransactions(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.signMessage=function(t,e){return void 0===e&&(e="utf8"),Un(this,void 0,void 0,(function(){return Qn(this,(function(r){switch(r.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signMessage(t,e)];case 1:return[2,r.sent()]}}))}))},e.prototype.sign=function(t,e){return void 0===e&&(e="utf8"),Un(this,void 0,void 0,(function(){return Qn(this,(function(r){switch(r.label){case 0:return[4,this.signMessage(t,e)];case 1:return[2,r.sent()]}}))}))},e.prototype.detectWallet=function(t){return void 0===t&&(t=10),Un(this,void 0,void 0,(function(){return Qn(this,(function(r){return[2,new Promise((function(r){var n=null;function i(t){!function(){window.removeEventListener("message",a,!1),n&&(document.body.removeChild(n),n=null);o&&(clearTimeout(o),o=null)}(),r(t)}var o=setTimeout((function(){i(!1)}),1e3*t);function a(t){var e,r,n;"solflareDetectorToAdapter"===(null===(e=t.data)||void 0===e?void 0:e.channel)&&i(!!(null===(n=null===(r=t.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.detected))}window.addEventListener("message",a,!1),(n=document.createElement("div")).className="solflare-wallet-detect-iframe",n.innerHTML="\n \n "),document.body.appendChild(n)}))]}))}))},e.IFRAME_URL="https://connect.solflare.com/",e.DETECT_IFRAME_URL="https://connect.solflare.com/detect",e}(i.a);e.default=Hn},function(t,e,r){"use strict";r.r(e),r.d(e,"Mutex",(function(){return o})),r.d(e,"Semaphore",(function(){return i})),r.d(e,"withTimeout",(function(){return a}));var n=r(11),i=function(){function t(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return t.prototype.acquire=function(){var t=this,e=this.isLocked(),r=new Promise((function(e){return t._queue.push(e)}));return e||this._dispatch(),r},t.prototype.runExclusive=function(t){return Object(n.__awaiter)(this,void 0,void 0,(function(){var e,r,i;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return[4,this.acquire()];case 1:e=n.sent(),r=e[0],i=e[1],n.label=2;case 2:return n.trys.push([2,,4,5]),[4,t(r)];case 3:return[2,n.sent()];case 4:return i(),[7];case 5:return[2]}}))}))},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},t.prototype._dispatch=function(){var t=this,e=this._queue.shift();if(e){var r=!1;this._currentReleaser=function(){r||(r=!0,t._value++,t._dispatch())},e([this._value--,this._currentReleaser])}},t}(),o=function(){function t(){this._semaphore=new i(1)}return t.prototype.acquire=function(){return Object(n.__awaiter)(this,void 0,void 0,(function(){var t;return Object(n.__generator)(this,(function(e){switch(e.label){case 0:return[4,this._semaphore.acquire()];case 1:return t=e.sent(),[2,t[1]]}}))}))},t.prototype.runExclusive=function(t){return this._semaphore.runExclusive((function(){return t()}))},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();function a(t,e,r){var i=this;return void 0===r&&(r=new Error("timeout")),{acquire:function(){return new Promise((function(o,a){return Object(n.__awaiter)(i,void 0,void 0,(function(){var i,s;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return i=!1,setTimeout((function(){i=!0,a(r)}),e),[4,t.acquire()];case 1:return s=n.sent(),i?(Array.isArray(s)?s[1]:s)():o(s),[2]}}))}))}))},runExclusive:function(t){return Object(n.__awaiter)(this,void 0,void 0,(function(){var e,r;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:e=function(){},n.label=1;case 1:return n.trys.push([1,,7,8]),[4,this.acquire()];case 2:return r=n.sent(),Array.isArray(r)?(e=r[1],[4,t(r[0])]):[3,4];case 3:return[2,n.sent()];case 4:return e=r,[4,t()];case 5:return[2,n.sent()];case 6:return[3,8];case 7:return e(),[7];case 8:return[2]}}))}))},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}},function(t,e,r){"use strict";r.r(e),r.d(e,"componentsToDebugString",(function(){return lt})),r.d(e,"default",(function(){return gt})),r.d(e,"getFullscreenElement",(function(){return N})),r.d(e,"getScreenFrame",(function(){return W})),r.d(e,"hashComponents",(function(){return ft})),r.d(e,"isAndroid",(function(){return D})),r.d(e,"isChromium",(function(){return O})),r.d(e,"isDesktopSafari",(function(){return R})),r.d(e,"isEdgeHTML",(function(){return B})),r.d(e,"isGecko",(function(){return P})),r.d(e,"isTrident",(function(){return x})),r.d(e,"isWebKit",(function(){return T})),r.d(e,"load",(function(){return pt})),r.d(e,"loadSources",(function(){return C})),r.d(e,"murmurX64Hash128",(function(){return mt})),r.d(e,"prepareForSources",(function(){return ht})),r.d(e,"sources",(function(){return st})),r.d(e,"transformSource",(function(){return k})),r.d(e,"withIframe",(function(){return F}));var n=function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=i+r?(i=s,[4,u(0)]):[3,3]):[3,4];case 2:o.sent(),o.label=3;case 3:return++a,[3,1];case 4:return[2,n]}}))}))}function h(t){t.then(void 0,(function(){}))}function d(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var r=[0,0,0,0];return r[3]+=t[3]+e[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=t[2]+e[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=t[1]+e[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=t[0]+e[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function p(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var r=[0,0,0,0];return r[3]+=t[3]*e[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=t[2]*e[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=t[3]*e[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=t[1]*e[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=t[2]*e[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=t[3]*e[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function g(t,e){return 32===(e%=64)?[t[1],t[0]]:e<32?[t[0]<>>32-e,t[1]<>>32-e]:(e-=32,[t[1]<>>32-e,t[0]<>>32-e])}function m(t,e){return 0===(e%=64)?t:e<32?[t[0]<>>32-e,t[1]<>>1]),t=y(t=p(t,[4283543511,3981806797]),[0,t[0]>>>1]),t=y(t=p(t,[3301882366,444984403]),[0,t[0]>>>1])}function v(t,e){e=e||0;var r,n=(t=t||"").length%16,i=t.length-n,o=[0,e],a=[0,e],s=[0,0],u=[0,0],c=[2277735313,289559509],l=[1291169091,658871167];for(r=0;r>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)+("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)}function A(t){return parseInt(t)}function w(t){return parseFloat(t)}function _(t,e){return"number"===typeof t&&isNaN(t)?e:t}function E(t){return t.reduce((function(t,e){return t+(e?1:0)}),0)}function I(t,e){if(void 0===e&&(e=1),Math.abs(e)>=1)return Math.round(t/e)*e;var r=1/e;return Math.round(t*r)/r}function S(t){return t&&"object"===typeof t&&"message"in t?t:{message:t}}function M(t){return"function"!==typeof t}function C(t,e,r){var n=Object.keys(t).filter((function(t){return!function(t,e){for(var r=0,n=t.length;r=4}function B(){var t=window,e=navigator;return E(["msWriteProfilerMark"in t,"MSStream"in t,"msLaunchUri"in e,"msSaveBlob"in e])>=3&&!x()}function O(){var t=window,e=navigator;return E(["webkitPersistentStorage"in e,"webkitTemporaryStorage"in e,0===e.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in t,"BatteryManager"in t,"webkitMediaStream"in t,"webkitSpeechGrammar"in t])>=5}function T(){var t=window,e=navigator;return E(["ApplePayError"in t,"CSSPrimitiveValue"in t,"Counter"in t,0===e.vendor.indexOf("Apple"),"getStorageUpdates"in e,"WebKitMediaKeys"in t])>=4}function R(){var t=window;return E(["safari"in t,!("DeviceMotionEvent"in t),!("ongestureend"in t),!("standalone"in navigator)])>=3}function P(){var t,e,r=window;return E(["buildID"in navigator,"MozAppearance"in(null!==(e=null===(t=document.documentElement)||void 0===t?void 0:t.style)&&void 0!==e?e:{}),"onmozfullscreenchange"in r,"mozInnerScreenX"in r,"CSSMozDocumentRule"in r,"CanvasCaptureMediaStream"in r])>=4}function N(){var t=document;return t.fullscreenElement||t.msFullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||null}function j(){var t=document;return(t.exitFullscreen||t.msExitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen).call(t)}function D(){var t=O(),e=P();if(!t&&!e)return!1;var r=window;return E(["onorientationchange"in r,"orientation"in r,t&&!("SharedWorker"in r),e&&/android/i.test(navigator.appVersion)])>=2}function L(t){var e=new Error(t);return e.name=t,e}function F(t,e,r){var n,a,s;return void 0===r&&(r=50),i(this,void 0,void 0,(function(){var i,c;return o(this,(function(o){switch(o.label){case 0:i=document,o.label=1;case 1:return i.body?[3,3]:[4,u(r)];case 2:return o.sent(),[3,1];case 3:c=i.createElement("iframe"),o.label=4;case 4:return o.trys.push([4,,10,11]),[4,new Promise((function(t,r){var n=!1,o=function(){n=!0,t()};c.onload=o,c.onerror=function(t){n=!0,r(t)};var a=c.style;a.setProperty("display","block","important"),a.position="absolute",a.top="0",a.left="0",a.visibility="hidden",e&&"srcdoc"in c?c.srcdoc=e:c.src="about:blank",i.body.appendChild(c);var s=function(){var t,e;n||("complete"===(null===(e=null===(t=c.contentWindow)||void 0===t?void 0:t.document)||void 0===e?void 0:e.readyState)?o():setTimeout(s,10))};s()}))];case 5:o.sent(),o.label=6;case 6:return(null===(a=null===(n=c.contentWindow)||void 0===n?void 0:n.document)||void 0===a?void 0:a.body)?[3,8]:[4,u(r)];case 7:return o.sent(),[3,6];case 8:return[4,t(c,c.contentWindow)];case 9:return[2,o.sent()];case 10:return null===(s=c.parentNode)||void 0===s||s.removeChild(c),[7];case 11:return[2]}}))}))}function U(t){for(var e=function(t){for(var e,r,n="Unexpected syntax '".concat(t,"'"),i=/^\s*([a-z-]*)(.*)$/i.exec(t),o=i[1]||void 0,a={},s=/([.:#][\w-]+|\[.+?\])/gi,u=function(t,e){a[t]=a[t]||[],a[t].push(e)};;){var c=s.exec(i[2]);if(!c)break;var l=c[0];switch(l[0]){case".":u("class",l.slice(1));break;case"#":u("id",l.slice(1));break;case"[":var f=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(l);if(!f)throw new Error(n);u(f[1],null!==(r=null!==(e=f[4])&&void 0!==e?e:f[5])&&void 0!==r?r:"");break;default:throw new Error(n)}}return[o,a]}(t),r=e[0],n=e[1],i=document.createElement(null!==r&&void 0!==r?r:"div"),o=0,a=Object.keys(n);o.6*r.length}))).sort(),[2,i]}}))}))},fontPreferences:function(){return function(t,e){void 0===e&&(e=4e3);return F((function(r,n){var i=n.document,o=i.body,s=o.style;s.width="".concat(e,"px"),s.webkitTextSizeAdjust=s.textSizeAdjust="none",O()?o.style.zoom="".concat(1/n.devicePixelRatio):T()&&(o.style.zoom="reset");var u=i.createElement("div");return u.textContent=a([],Array(e/20<<0),!0).map((function(){return"word"})).join(" "),o.appendChild(u),t(i,o)}),'')}((function(t,e){for(var r={},n={},i=0,o=Object.keys(at);i=3}())return-1;var r=new e(1,5e3,44100),n=r.createOscillator();n.type="triangle",n.frequency.value=1e4;var i=r.createDynamicsCompressor();i.threshold.value=-50,i.knee.value=40,i.ratio.value=12,i.attack.value=0,i.release.value=.25,n.connect(i),i.connect(r.destination),n.start(0);var o=function(t){var e=3,r=500,n=500,i=5e3,o=function(){},a=new Promise((function(a,s){var u=!1,l=0,f=0;t.oncomplete=function(t){return a(t.renderedBuffer)};var d=function(){setTimeout((function(){return s(L("timeout"))}),Math.min(n,f+i-Date.now()))},p=function(){try{var n=t.startRendering();switch(c(n)&&h(n),t.state){case"running":f=Date.now(),u&&d();break;case"suspended":document.hidden||l++,u&&l>=e?s(L("suspended")):setTimeout(p,r)}}catch(i){s(i)}};p(),o=function(){u||(u=!0,f>0&&d())}}));return[a,o]}(r),a=o[0],s=o[1],u=a.then((function(t){return function(t){for(var e=0,r=0;r=3}()||e.push(t.languages);else if("string"===typeof t.languages){var n=t.languages;n&&e.push(n.split(","))}return e},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return _(w(navigator.deviceMemory),void 0)},screenResolution:function(){var t=screen,e=function(t){return _(A(t),null)},r=[e(t.width),e(t.height)];return r.sort().reverse(),r},hardwareConcurrency:function(){return _(A(navigator.hardwareConcurrency),void 0)},timezone:function(){var t,e=null===(t=window.Intl)||void 0===t?void 0:t.DateTimeFormat;if(e){var r=(new e).resolvedOptions().timeZone;if(r)return r}var n=-function(){var t=(new Date).getFullYear();return Math.max(w(new Date(t,0,1).getTimezoneOffset()),w(new Date(t,6,1).getTimezoneOffset()))}();return"UTC".concat(n>=0?"+":"").concat(Math.abs(n))},sessionStorage:function(){try{return!!window.sessionStorage}catch(t){return!0}},localStorage:function(){try{return!!window.localStorage}catch(t){return!0}},indexedDB:function(){if(!x()&&!B())try{return!!window.indexedDB}catch(t){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var t=navigator.platform;return"MacIntel"===t&&T()&&!R()?function(){if("iPad"===navigator.platform)return!0;var t=screen,e=t.width/t.height;return E(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,e>.65&&e<1.53])>=2}()?"iPad":"iPhone":t},plugins:function(){var t=navigator.plugins;if(t){for(var e=[],r=0;r=.001))try{var t=new XMLHttpRequest;t.open("get","https://m1.openfpcdn.io/fingerprintjs/v".concat(s,"/npm-monitoring"),!0),t.send()}catch(e){console.error(e)}}(),[4,ht(r)];case 1:return t.sent(),[2,dt(C(st,{debug:n},[]),n)]}}))}))}var gt={load:pt,hashComponents:ft,componentsToDebugString:lt},mt=v},function(t,e,r){"use strict";r.r(e),r.d(e,"TransactionTypes",(function(){return d})),r.d(e,"computeAddress",(function(){return b})),r.d(e,"recoverAddress",(function(){return v})),r.d(e,"accessListify",(function(){return _})),r.d(e,"serialize",(function(){return M})),r.d(e,"parse",(function(){return k}));var n=r(246),i=r(234),o=r(1),a=r(3422),s=r(163),u=r(6),c=r(287),l=r(604),f=r(5);const h=new f.b("transactions/5.6.0");var d;function p(t){return"0x"===t?null:Object(n.a)(t)}function g(t){return"0x"===t?a.d:i.a.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(d||(d={}));const m=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],y={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function b(t){const e=Object(l.b)(t);return Object(n.a)(Object(o.e)(Object(s.keccak256)(Object(o.e)(e,1)),12))}function v(t,e){return b(Object(l.c)(Object(o.a)(t),e))}function A(t,e){const r=Object(o.o)(i.a.from(t).toHexString());return r.length>32&&h.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function w(t,e){return{address:Object(n.a)(t),storageKeys:(e||[]).map(((e,r)=>(32!==Object(o.d)(e)&&h.throwArgumentError("invalid access list storageKey","accessList[".concat(t,":").concat(r,"]"),e),e.toLowerCase())))}}function _(t){if(Array.isArray(t))return t.map(((t,e)=>Array.isArray(t)?(t.length>2&&h.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(e,"]"),t),w(t[0],t[1])):w(t.address,t.storageKeys)));const e=Object.keys(t).map((e=>{const r=t[e].reduce(((t,e)=>(t[e]=!0,t)),{});return w(e,Object.keys(r).sort())}));return e.sort(((t,e)=>t.address.localeCompare(e.address))),e}function E(t){return _(t).map((t=>[t.address,t.storageKeys]))}function I(t,e){if(null!=t.gasPrice){const e=i.a.from(t.gasPrice),r=i.a.from(t.maxFeePerGas||0);e.eq(r)||h.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:e,maxFeePerGas:r})}const r=[A(t.chainId||0,"chainId"),A(t.nonce||0,"nonce"),A(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),A(t.maxFeePerGas||0,"maxFeePerGas"),A(t.gasLimit||0,"gasLimit"),null!=t.to?Object(n.a)(t.to):"0x",A(t.value||0,"value"),t.data||"0x",E(t.accessList||[])];if(e){const t=Object(o.n)(e);r.push(A(t.recoveryParam,"recoveryParam")),r.push(Object(o.o)(t.r)),r.push(Object(o.o)(t.s))}return Object(o.c)(["0x02",c.b(r)])}function S(t,e){const r=[A(t.chainId||0,"chainId"),A(t.nonce||0,"nonce"),A(t.gasPrice||0,"gasPrice"),A(t.gasLimit||0,"gasLimit"),null!=t.to?Object(n.a)(t.to):"0x",A(t.value||0,"value"),t.data||"0x",E(t.accessList||[])];if(e){const t=Object(o.n)(e);r.push(A(t.recoveryParam,"recoveryParam")),r.push(Object(o.o)(t.r)),r.push(Object(o.o)(t.s))}return Object(o.c)(["0x01",c.b(r)])}function M(t,e){if(null==t.type||0===t.type)return null!=t.accessList&&h.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),function(t,e){Object(u.b)(t,y);const r=[];m.forEach((function(e){let n=t[e.name]||[];const i={};e.numeric&&(i.hexPad="left"),n=Object(o.a)(Object(o.i)(n,i)),e.length&&n.length!==e.length&&n.length>0&&h.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),e.maxLength&&(n=Object(o.o)(n),n.length>e.maxLength&&h.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n)),r.push(Object(o.i)(n))}));let n=0;if(null!=t.chainId?(n=t.chainId,"number"!==typeof n&&h.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!Object(o.k)(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),0!==n&&(r.push(Object(o.i)(n)),r.push("0x"),r.push("0x")),!e)return c.b(r);const i=Object(o.n)(e);let a=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),a+=2*n+8,i.v>28&&i.v!==a&&h.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==a&&h.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(Object(o.i)(a)),r.push(Object(o.o)(Object(o.a)(i.r))),r.push(Object(o.o)(Object(o.a)(i.s))),c.b(r)}(t,e);switch(t.type){case 1:return S(t,e);case 2:return I(t,e)}return h.throwError("unsupported transaction type: ".concat(t.type),f.b.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function C(t,e,r){try{const r=g(e[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");t.v=r}catch(n){h.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Object(o.h)(e[1],32),t.s=Object(o.h)(e[2],32);try{const e=Object(s.keccak256)(r(t));t.from=v(e,{r:t.r,s:t.s,recoveryParam:t.v})}catch(n){console.log(n)}}function k(t){const e=Object(o.a)(t);if(e[0]>127)return function(t){const e=c.a(t);9!==e.length&&6!==e.length&&h.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:g(e[0]).toNumber(),gasPrice:g(e[1]),gasLimit:g(e[2]),to:p(e[3]),value:g(e[4]),data:e[5],chainId:0};if(6===e.length)return r;try{r.v=i.a.from(e[6]).toNumber()}catch(n){return console.log(n),r}if(r.r=Object(o.h)(e[7],32),r.s=Object(o.h)(e[8],32),i.a.from(r.r).isZero()&&i.a.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let i=r.v-27;const a=e.slice(0,6);0!==r.chainId&&(a.push(Object(o.i)(r.chainId)),a.push("0x"),a.push("0x"),i-=2*r.chainId+8);const u=Object(s.keccak256)(c.b(a));try{r.from=v(u,{r:Object(o.i)(r.r),s:Object(o.i)(r.s),recoveryParam:i})}catch(n){console.log(n)}r.hash=Object(s.keccak256)(t)}return r.type=null,r}(e);switch(e[0]){case 1:return function(t){const e=c.a(t.slice(1));8!==e.length&&11!==e.length&&h.throwArgumentError("invalid component count for transaction type: 1","payload",Object(o.i)(t));const r={type:1,chainId:g(e[0]).toNumber(),nonce:g(e[1]).toNumber(),gasPrice:g(e[2]),gasLimit:g(e[3]),to:p(e[4]),value:g(e[5]),data:e[6],accessList:_(e[7])};return 8===e.length||(r.hash=Object(s.keccak256)(t),C(r,e.slice(8),S)),r}(e);case 2:return function(t){const e=c.a(t.slice(1));9!==e.length&&12!==e.length&&h.throwArgumentError("invalid component count for transaction type: 2","payload",Object(o.i)(t));const r=g(e[2]),n=g(e[3]),i={type:2,chainId:g(e[0]).toNumber(),nonce:g(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:g(e[4]),to:p(e[5]),value:g(e[6]),data:e[7],accessList:_(e[8])};return 9===e.length||(i.hash=Object(s.keccak256)(t),C(i,e.slice(9),I)),i}(e)}return h.throwError("unsupported transaction type: ".concat(e[0]),f.b.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(4),i=r(727);function o(){return n.useContext(i.a)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(33),i=r(82),o=r(773),a=r(757);const s=["sx"],u=t=>{const e={systemProps:{},otherProps:{}};return Object.keys(t).forEach((r=>{a.a[r]?e.systemProps[r]=t[r]:e.otherProps[r]=t[r]})),e};function c(t){const{sx:e}=t,r=Object(i.a)(t,s),{systemProps:a,otherProps:c}=u(r);let l;return l=Array.isArray(e)?[a,...e]:"function"===typeof e?function(){const t=e(...arguments);return Object(o.b)(t)?Object(n.a)({},a,t):a}:Object(n.a)({},a,e),Object(n.a)({},c,{sx:l})}},function(t,e,r){"use strict";var n=r(10),i=(r(4),r(3306)),o=r(390),a=r(0);e.a=function(t){return Object(a.jsx)(i.a,Object(n.a)({},t,{defaultTheme:o.a}))}},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));r(4);var n=r(432),i=r(0);function o(t){const{styles:e,defaultTheme:r={}}=t,o="function"===typeof e?t=>{return e(void 0===(n=t)||null===n||0===Object.keys(n).length?r:t);var n}:e;return Object(i.jsx)(n.a,{styles:o})}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);function i(t,e){return n.isValidElement(t)&&-1!==e.indexOf(t.type.muiName)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(4);let i=0;const o=n.useId;function a(t){if(void 0!==o){const e=o();return null!=t?t:e}return function(t){const[e,r]=n.useState(t),o=t||e;return n.useEffect((()=>{null==e&&(i+=1,r("mui-".concat(i)))}),[e]),o}(t)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);function i(t){let{controlled:e,default:r,name:i,state:o="value"}=t;const{current:a}=n.useRef(void 0!==e),[s,u]=n.useState(r);return[a?e:s,n.useCallback((t=>{a||u(t)}),[])]}},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n={};r.r(n),r.d(n,"encode",(function(){return R})),r.d(n,"decode",(function(){return j}));var i={};r.r(i),r.d(i,"decode",(function(){return Te})),r.d(i,"encode",(function(){return Re}));var o={};r.r(o),r.d(o,"AbiCoder",(function(){return $t})),r.d(o,"defaultAbiCoder",(function(){return te})),r.d(o,"Fragment",(function(){return Dt})),r.d(o,"ConstructorFragment",(function(){return Gt})),r.d(o,"ErrorFragment",(function(){return qt})),r.d(o,"EventFragment",(function(){return Lt})),r.d(o,"FunctionFragment",(function(){return Ht})),r.d(o,"ParamType",(function(){return Nt})),r.d(o,"FormatTypes",(function(){return Rt})),r.d(o,"checkResultErrors",(function(){return _})),r.d(o,"Logger",(function(){return u.b})),r.d(o,"RLP",(function(){return n})),r.d(o,"_fetchData",(function(){return xo})),r.d(o,"fetchJson",(function(){return Bo})),r.d(o,"poll",(function(){return Oo})),r.d(o,"checkProperties",(function(){return s.b})),r.d(o,"deepCopy",(function(){return s.c})),r.d(o,"defineReadOnly",(function(){return s.d})),r.d(o,"getStatic",(function(){return s.e})),r.d(o,"resolveProperties",(function(){return s.f})),r.d(o,"shallowCopy",(function(){return s.g})),r.d(o,"arrayify",(function(){return a.a})),r.d(o,"concat",(function(){return a.b})),r.d(o,"stripZeros",(function(){return a.o})),r.d(o,"zeroPad",(function(){return a.p})),r.d(o,"isBytes",(function(){return a.j})),r.d(o,"isBytesLike",(function(){return a.k})),r.d(o,"defaultPath",(function(){return di})),r.d(o,"HDNode",(function(){return pi})),r.d(o,"SigningKey",(function(){return Di})),r.d(o,"Interface",(function(){return ve})),r.d(o,"LogDescription",(function(){return de})),r.d(o,"TransactionDescription",(function(){return pe})),r.d(o,"base58",(function(){return Ne})),r.d(o,"base64",(function(){return i})),r.d(o,"hexlify",(function(){return a.i})),r.d(o,"isHexString",(function(){return a.l})),r.d(o,"hexConcat",(function(){return a.c})),r.d(o,"hexStripZeros",(function(){return a.f})),r.d(o,"hexValue",(function(){return a.g})),r.d(o,"hexZeroPad",(function(){return a.h})),r.d(o,"hexDataLength",(function(){return a.d})),r.d(o,"hexDataSlice",(function(){return a.e})),r.d(o,"nameprep",(function(){return uo})),r.d(o,"_toEscapedUtf8String",(function(){return Wi})),r.d(o,"toUtf8Bytes",(function(){return Ki})),r.d(o,"toUtf8CodePoints",(function(){return Xi})),r.d(o,"toUtf8String",(function(){return Yi})),r.d(o,"Utf8ErrorFuncs",(function(){return zi})),r.d(o,"formatBytes32String",(function(){return lo})),r.d(o,"parseBytes32String",(function(){return fo})),r.d(o,"dnsEncode",(function(){return $e})),r.d(o,"hashMessage",(function(){return er})),r.d(o,"namehash",(function(){return Ze})),r.d(o,"isValidName",(function(){return Xe})),r.d(o,"id",(function(){return fe})),r.d(o,"_TypedDataEncoder",(function(){return Pr})),r.d(o,"getAddress",(function(){return Ce})),r.d(o,"getIcapAddress",(function(){return xe})),r.d(o,"getContractAddress",(function(){return Be})),r.d(o,"getCreate2Address",(function(){return Oe})),r.d(o,"isAddress",(function(){return ke})),r.d(o,"formatEther",(function(){return ho.b})),r.d(o,"parseEther",(function(){return ho.d})),r.d(o,"formatUnits",(function(){return ho.c})),r.d(o,"parseUnits",(function(){return ho.e})),r.d(o,"commify",(function(){return ho.a})),r.d(o,"computeHmac",(function(){return on})),r.d(o,"keccak256",(function(){return we})),r.d(o,"ripemd160",(function(){return en})),r.d(o,"sha256",(function(){return rn})),r.d(o,"sha512",(function(){return nn})),r.d(o,"randomBytes",(function(){return Oi.a})),r.d(o,"shuffled",(function(){return Ti})),r.d(o,"solidityPack",(function(){return Bi.b})),r.d(o,"solidityKeccak256",(function(){return Bi.a})),r.d(o,"soliditySha256",(function(){return Bi.c})),r.d(o,"splitSignature",(function(){return a.n})),r.d(o,"joinSignature",(function(){return a.m})),r.d(o,"accessListify",(function(){return qn})),r.d(o,"parseTransaction",(function(){return Xn})),r.d(o,"serializeTransaction",(function(){return Jn})),r.d(o,"TransactionTypes",(function(){return jn})),r.d(o,"getJsonWalletAddress",(function(){return xi})),r.d(o,"computeAddress",(function(){return Qn})),r.d(o,"recoverAddress",(function(){return Gn})),r.d(o,"computePublicKey",(function(){return Fi})),r.d(o,"recoverPublicKey",(function(){return Li})),r.d(o,"verifyMessage",(function(){return po.b})),r.d(o,"verifyTypedData",(function(){return po.c})),r.d(o,"getAccountPath",(function(){return vi})),r.d(o,"mnemonicToEntropy",(function(){return mi})),r.d(o,"entropyToMnemonic",(function(){return yi})),r.d(o,"isValidMnemonic",(function(){return bi})),r.d(o,"mnemonicToSeed",(function(){return gi})),r.d(o,"SupportedAlgorithm",(function(){return Xr})),r.d(o,"UnicodeNormalizationForm",(function(){return Qi})),r.d(o,"Utf8ErrorReason",(function(){return Gi})),r.d(o,"Indexed",(function(){return me}));var a=r(1),s=r(6),u=r(5);const c="abi/5.6.4";var l=r(1385);var f=r.n(l).a.BN;const h=new u.b("bignumber/5.6.2"),d={},p=9007199254740991;let g=!1;class m{constructor(t,e){t!==d&&h.throwError("cannot call constructor directly; use BigNumber.from",u.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return b(v(this).fromTwos(t))}toTwos(t){return b(v(this).toTwos(t))}abs(){return"-"===this._hex[0]?m.from(this._hex.substring(1)):this}add(t){return b(v(this).add(v(t)))}sub(t){return b(v(this).sub(v(t)))}div(t){return m.from(t).isZero()&&A("division-by-zero","div"),b(v(this).div(v(t)))}mul(t){return b(v(this).mul(v(t)))}mod(t){const e=v(t);return e.isNeg()&&A("division-by-zero","mod"),b(v(this).umod(e))}pow(t){const e=v(t);return e.isNeg()&&A("negative-power","pow"),b(v(this).pow(e))}and(t){const e=v(t);return(this.isNegative()||e.isNeg())&&A("unbound-bitwise-result","and"),b(v(this).and(e))}or(t){const e=v(t);return(this.isNegative()||e.isNeg())&&A("unbound-bitwise-result","or"),b(v(this).or(e))}xor(t){const e=v(t);return(this.isNegative()||e.isNeg())&&A("unbound-bitwise-result","xor"),b(v(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&A("negative-width","mask"),b(v(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&A("negative-width","shl"),b(v(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&A("negative-width","shr"),b(v(this).shrn(t))}eq(t){return v(this).eq(v(t))}lt(t){return v(this).lt(v(t))}lte(t){return v(this).lte(v(t))}gt(t){return v(this).gt(v(t))}gte(t){return v(this).gte(v(t))}isNegative(){return"-"===this._hex[0]}isZero(){return v(this).isZero()}toNumber(){try{return v(this).toNumber()}catch(t){A("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return h.throwError("this platform does not support BigInt",u.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?g||(g=!0,h.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?h.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",u.b.errors.UNEXPECTED_ARGUMENT,{}):h.throwError("BigNumber.toString does not accept parameters",u.b.errors.UNEXPECTED_ARGUMENT,{})),v(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof m)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new m(d,y(t)):t.match(/^-?[0-9]+$/)?new m(d,y(new f(t))):h.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&A("underflow","BigNumber.from",t),(t>=p||t<=-p)&&A("overflow","BigNumber.from",t),m.from(String(t));const e=t;if("bigint"===typeof e)return m.from(e.toString());if(Object(a.j)(e))return m.from(Object(a.i)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return m.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&(Object(a.l)(t)||"-"===t[0]&&Object(a.l)(t.substring(1))))return m.from(t)}return h.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function y(t){if("string"!==typeof t)return y(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&h.throwArgumentError("invalid hex","value",t),"0x00"===(t=y(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function b(t){return m.from(y(t))}function v(t){const e=m.from(t).toHexString();return"-"===e[0]?new f("-"+e.substring(3),16):new f(e.substring(2),16)}function A(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),h.throwError(t,u.b.errors.NUMERIC_FAULT,n)}const w=new u.b(c);function _(t){const e=[],r=function(t,n){if(Array.isArray(n))for(let o in n){const a=t.slice();a.push(o);try{r(a,n[o])}catch(i){e.push({path:a,error:i})}}};return r([],t),e}class E{constructor(t,e,r,n){this.name=t,this.type=e,this.localName=r,this.dynamic=n}_throwError(t,e){w.throwArgumentError(t,this.localName,e)}}class I{constructor(t){Object(s.d)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return Object(a.c)(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData(Object(a.b)(t._data))}writeBytes(t){let e=Object(a.a)(t);const r=e.length%this.wordSize;return r&&(e=Object(a.b)([e,this._padding.slice(r)])),this._writeData(e)}_getValue(t){let e=Object(a.a)(m.from(t));return e.length>this.wordSize&&w.throwError("value out-of-bounds",u.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=Object(a.b)([this._padding.slice(e.length%this.wordSize),e])),e}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class S{constructor(t,e,r,n){Object(s.d)(this,"_data",Object(a.a)(t)),Object(s.d)(this,"wordSize",e||32),Object(s.d)(this,"_coerceFunc",r),Object(s.d)(this,"allowLoose",n),this._offset=0}get data(){return Object(a.i)(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):S.coerce(t,e)}_peekBytes(t,e,r){let n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:w.throwError("data out-of-bounds",u.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(t){return new S(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return m.from(this.readBytes(this.wordSize))}}var M=r(112),C=r.n(M);function k(t){return"0x"+C.a.keccak_256(Object(a.a)(t))}const x=new u.b("rlp/5.6.1");function B(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function O(t,e,r){let n=0;for(let i=0;ie+1+n&&x.throwError("child data too short",u.b.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function N(t,e){if(0===t.length&&x.throwError("data too short",u.b.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&x.throwError("data short segment too short",u.b.errors.BUFFER_OVERRUN,{});const n=O(t,e+1,r);return e+1+r+n>t.length&&x.throwError("data long segment too short",u.b.errors.BUFFER_OVERRUN,{}),P(t,e,e+1+r,r+n)}if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&x.throwError("data array too short",u.b.errors.BUFFER_OVERRUN,{}),P(t,e,e+1,r)}if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&x.throwError("data array too short",u.b.errors.BUFFER_OVERRUN,{});const n=O(t,e+1,r);e+1+r+n>t.length&&x.throwError("data array too short",u.b.errors.BUFFER_OVERRUN,{});return{consumed:1+r+n,result:Object(a.i)(t.slice(e+1+r,e+1+r+n))}}if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&x.throwError("data too short",u.b.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:Object(a.i)(t.slice(e+1,e+1+r))}}return{consumed:1,result:Object(a.i)(t[e])}}function j(t){const e=Object(a.a)(t),r=N(e,0);return r.consumed!==e.length&&x.throwArgumentError("invalid rlp data","data",t),r.result}const D=new u.b("address/5.6.1");function L(t){Object(a.l)(t,20)||D.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=Object(a.a)(k(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(15&n[i>>1])>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const F={};for(let To=0;To<10;To++)F[String(To)]=String(To);for(let To=0;To<26;To++)F[String.fromCharCode(65+To)]=String(10+To);const U=Math.floor((Q=9007199254740991,Math.log10?Math.log10(Q):Math.log(Q)/Math.LN10));var Q;function G(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>F[t])).join("");for(;e.length>=U;){let t=e.substring(0,U);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function H(t){let e=null;if("string"!==typeof t&&D.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=L(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&D.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==G(t)&&D.throwArgumentError("bad icap checksum","address",t),r=t.substring(4),e=new f(r,36).toString(16);e.length<40;)e="0"+e;e=L("0x"+e)}else D.throwArgumentError("invalid address","address",t);var r;return e}class z extends E{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){try{e=H(e)}catch(r){this._throwError(r.message,e)}return t.writeValue(e)}decode(t){return H(Object(a.h)(t.readValue().toHexString(),20))}}class q extends E{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}const K=new u.b(c);function V(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){let t={};n=e.map((e=>{const n=e.localName;return n||K.throwError("cannot encode object for signature with missing names",u.b.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]&&K.throwError("cannot encode object for signature with duplicate names",u.b.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]=!0,r[n]}))}else K.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&K.throwArgumentError("types/value length mismatch","tuple",r);let i=new I(t.wordSize),o=new I(t.wordSize),a=[];e.forEach(((t,e)=>{let r=n[e];if(t.dynamic){let e=o.length;t.encode(o,r);let n=i.writeUpdatableValue();a.push((t=>{n(t+e)}))}else t.encode(i,r)})),a.forEach((t=>{t(i.length)}));let s=t.appendWriter(i);return s+=t.appendWriter(o),s}function W(t,e){let r=[],n=t.subReader(0);e.forEach((e=>{let i=null;if(e.dynamic){let r=t.readValue(),a=n.subReader(r.toNumber());try{i=e.decode(a)}catch(o){if(o.code===u.b.errors.BUFFER_OVERRUN)throw o;i=o,i.baseType=e.name,i.name=e.localName,i.type=e.type}}else try{i=e.decode(t)}catch(o){if(o.code===u.b.errors.BUFFER_OVERRUN)throw o;i=o,i.baseType=e.name,i.name=e.localName,i.type=e.type}void 0!=i&&r.push(i)}));const i=e.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach(((t,e)=>{let n=t.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[e];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let o=0;o{throw t}})}return Object.freeze(r)}class J extends E{constructor(t,e,r){super("array",t.type+"["+(e>=0?e:"")+"]",r,-1===e||t.dynamic),this.coder=t,this.length=e}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;rt._data.length&&K.throwError("insufficient data length",u.b.errors.BUFFER_OVERRUN,{length:t._data.length,count:e}));let r=[];for(let n=0;n0&&(10===arguments[0]?at||(at=!0,nt.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?nt.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",u.b.errors.UNEXPECTED_ARGUMENT,{}):nt.throwError("BigNumber.toString does not accept parameters",u.b.errors.UNEXPECTED_ARGUMENT,{})),lt(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof st)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new st(it,ut(t)):t.match(/^-?[0-9]+$/)?new st(it,ut(new rt(t))):nt.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&ft("underflow","BigNumber.from",t),(t>=ot||t<=-9007199254740991)&&ft("overflow","BigNumber.from",t),st.from(String(t));const e=t;if("bigint"===typeof e)return st.from(e.toString());if(Object(a.j)(e))return st.from(Object(a.i)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return st.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&(Object(a.l)(t)||"-"===t[0]&&Object(a.l)(t.substring(1))))return st.from(t)}return nt.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function ut(t){if("string"!==typeof t)return ut(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&nt.throwArgumentError("invalid hex","value",t),"0x00"===(t=ut(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function ct(t){return st.from(ut(t))}function lt(t){const e=st.from(t).toHexString();return"-"===e[0]?new rt("-"+e.substring(3),16):new rt(e.substring(2),16)}function ft(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),nt.throwError(t,u.b.errors.NUMERIC_FAULT,n)}const ht=st.from(-1),dt=st.from(0),pt=st.from(1),gt=st.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class mt extends E{constructor(t,e,r){const n=(e?"int":"uint")+8*t;super(n,n,r,!1),this.size=t,this.signed=e}defaultValue(){return 0}encode(t,e){let r=m.from(e),n=gt.mask(8*t.wordSize);if(this.signed){let t=n.mask(8*this.size-1);(r.gt(t)||r.lt(t.add(pt).mul(ht)))&&this._throwError("value out-of-bounds",e)}else(r.lt(dt)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",e);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*t.wordSize)),t.writeValue(r)}decode(t){let e=t.readValue().mask(8*this.size);return this.signed&&(e=e.fromTwos(8*this.size)),t.coerce(this.name,e)}}const yt=new u.b("strings/5.6.1");var bt,vt;function At(t,e,r,n,i){if(t===vt.BAD_PREFIX||t===vt.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6===2;n++)t++;return t}return t===vt.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(bt||(bt={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(vt||(vt={}));const wt=Object.freeze({error:function(t,e,r,n,i){return yt.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:At,replace:function(t,e,r,n,i){return t===vt.OVERLONG?(n.push(i),0):(n.push(65533),At(t,e,r))}});function _t(t,e){null==e&&(e=wt.error),t=Object(a.a)(t);const r=[];let n=0;for(;n>7===0){r.push(i);continue}let o=null,a=null;if(192===(224&i))o=1,a=127;else if(224===(240&i))o=2,a=2047;else{if(240!==(248&i)){n+=e(128===(192&i)?vt.UNEXPECTED_CONTINUE:vt.BAD_PREFIX,n-1,t,r);continue}o=3,a=65535}if(n-1+o>=t.length){n+=e(vt.OVERRUN,n-1,t,r);continue}let s=i&(1<<8-o-1)-1;for(let u=0;u1114111?n+=e(vt.OUT_OF_RANGE,n-1-o,t,r,s):s>=55296&&s<=57343?n+=e(vt.UTF16_SURROGATE,n-1-o,t,r,s):s<=a?n+=e(vt.OVERLONG,n-1-o,t,r,s):r.push(s))}return r}function Et(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bt.current;e!=bt.current&&(yt.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return Object(a.a)(r)}function It(t,e){return _t(t,e).map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}class St extends X{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,Et(e))}decode(t){return It(super.decode(t))}}class Mt extends E{constructor(t,e){let r=!1;const n=[];t.forEach((t=>{t.dynamic&&(r=!0),n.push(t.type)}));super("tuple","tuple("+n.join(",")+")",e,r),this.coders=t}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===e[i]&&("length"===i&&(i="_length"),null==t[i]&&(t[i]=t[n]))})),Object.freeze(t)}encode(t,e){return V(t,this.coders,e)}decode(t){return t.coerce(this.name,W(t,this.coders))}}const Ct=new u.b(c),kt={};let xt={calldata:!0,memory:!0,storage:!0},Bt={calldata:!0,memory:!0};function Ot(t,e){if("bytes"===t||"string"===t){if(xt[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&Bt[e])return!0;return(xt[e]||"payable"===e)&&Ct.throwArgumentError("invalid modifier","name",e),!1}function Tt(t,e){for(let r in e)Object(s.d)(t,r,e[r])}const Rt=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),Pt=new RegExp(/^(.*)\[([0-9]*)\]$/);class Nt{constructor(t,e){t!==kt&&Ct.throwError("use fromString",u.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Tt(this,e);let r=this.type.match(Pt);Tt(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:Nt.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=Rt.sighash),Rt[t]||Ct.throwArgumentError("invalid format type","format",t),t===Rt.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==Rt.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===Rt.full?", ":",")+")"):e+=this.type,t!==Rt.sighash&&(!0===this.indexed&&(e+=" indexed"),t===Rt.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"===typeof t?Nt.fromString(t,e):Nt.fromObject(t)}static fromObject(t){return Nt.isParamType(t)?t:new Nt(kt,{name:t.name||null,type:Kt(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(Nt.fromObject):null})}static fromString(t,e){return r=function(t,e){let r=t;function n(e){Ct.throwArgumentError("unexpected character at position ".concat(e),"param",t)}function i(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},a=o;for(let s=0;sNt.fromString(t,e)))}class Dt{constructor(t,e){t!==kt&&Ct.throwError("use a static from method",u.b.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Tt(this,e),this._isFragment=!0,Object.freeze(this)}static from(t){return Dt.isFragment(t)?t:"string"===typeof t?Dt.fromString(t):Dt.fromObject(t)}static fromObject(t){if(Dt.isFragment(t))return t;switch(t.type){case"function":return Ht.fromObject(t);case"event":return Lt.fromObject(t);case"constructor":return Gt.fromObject(t);case"error":return qt.fromObject(t);case"fallback":case"receive":return null}return Ct.throwArgumentError("invalid fragment object","value",t)}static fromString(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Lt.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?Ht.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?Gt.fromString(t.trim()):"error"===t.split(" ")[0]?qt.fromString(t.substring(5).trim()):Ct.throwArgumentError("unsupported fragment","value",t)}static isFragment(t){return!(!t||!t._isFragment)}}class Lt extends Dt{format(t){if(t||(t=Rt.sighash),Rt[t]||Ct.throwArgumentError("invalid format type","format",t),t===Rt.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==Rt.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===Rt.full?", ":",")+") ",t!==Rt.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}static from(t){return"string"===typeof t?Lt.fromString(t):Lt.fromObject(t)}static fromObject(t){if(Lt.isEventFragment(t))return t;"event"!==t.type&&Ct.throwArgumentError("invalid event object","value",t);const e={name:Wt(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(Nt.fromObject):[],type:"event"};return new Lt(kt,e)}static fromString(t){let e=t.match(Jt);e||Ct.throwArgumentError("invalid event string","value",t);let r=!1;return e[3].split(" ").forEach((t=>{switch(t.trim()){case"anonymous":r=!0;break;case"":break;default:Ct.warn("unknown modifier: "+t)}})),Lt.fromObject({name:e[1].trim(),anonymous:r,inputs:jt(e[2],!0),type:"event"})}static isEventFragment(t){return t&&t._isFragment&&"event"===t.type}}function Ft(t,e){e.gas=null;let r=t.split("@");return 1!==r.length?(r.length>2&&Ct.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Ct.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=m.from(r[1]),r[0]):t}function Ut(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function Qt(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&Ct.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&Ct.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||Ct.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Ct.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&Ct.throwArgumentError("unable to determine stateMutability","value",t),e}class Gt extends Dt{format(t){if(t||(t=Rt.sighash),Rt[t]||Ct.throwArgumentError("invalid format type","format",t),t===Rt.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});t===Rt.sighash&&Ct.throwError("cannot format a constructor for sighash",u.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let e="constructor("+this.inputs.map((e=>e.format(t))).join(t===Rt.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}static from(t){return"string"===typeof t?Gt.fromString(t):Gt.fromObject(t)}static fromObject(t){if(Gt.isConstructorFragment(t))return t;"constructor"!==t.type&&Ct.throwArgumentError("invalid constructor object","value",t);let e=Qt(t);e.constant&&Ct.throwArgumentError("constructor cannot be constant","value",t);const r={name:null,type:t.type,inputs:t.inputs?t.inputs.map(Nt.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?m.from(t.gas):null};return new Gt(kt,r)}static fromString(t){let e={type:"constructor"},r=(t=Ft(t,e)).match(Jt);return r&&"constructor"===r[1].trim()||Ct.throwArgumentError("invalid constructor string","value",t),e.inputs=jt(r[2].trim(),!1),Ut(r[3].trim(),e),Gt.fromObject(e)}static isConstructorFragment(t){return t&&t._isFragment&&"constructor"===t.type}}class Ht extends Gt{format(t){if(t||(t=Rt.sighash),Rt[t]||Ct.throwArgumentError("invalid format type","format",t),t===Rt.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==Rt.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===Rt.full?", ":",")+") ",t!==Rt.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((e=>e.format(t))).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}static from(t){return"string"===typeof t?Ht.fromString(t):Ht.fromObject(t)}static fromObject(t){if(Ht.isFunctionFragment(t))return t;"function"!==t.type&&Ct.throwArgumentError("invalid function object","value",t);let e=Qt(t);const r={type:t.type,name:Wt(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(Nt.fromObject):[],outputs:t.outputs?t.outputs.map(Nt.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?m.from(t.gas):null};return new Ht(kt,r)}static fromString(t){let e={type:"function"},r=(t=Ft(t,e)).split(" returns ");r.length>2&&Ct.throwArgumentError("invalid function string","value",t);let n=r[0].match(Jt);if(n||Ct.throwArgumentError("invalid function signature","value",t),e.name=n[1].trim(),e.name&&Wt(e.name),e.inputs=jt(n[2],!1),Ut(n[3].trim(),e),r.length>1){let n=r[1].match(Jt);""==n[1].trim()&&""==n[3].trim()||Ct.throwArgumentError("unexpected tokens","value",t),e.outputs=jt(n[2],!1)}else e.outputs=[];return Ht.fromObject(e)}static isFunctionFragment(t){return t&&t._isFragment&&"function"===t.type}}function zt(t){const e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||Ct.throwArgumentError("cannot specify user defined ".concat(e," error"),"fragment",t),t}class qt extends Dt{format(t){if(t||(t=Rt.sighash),Rt[t]||Ct.throwArgumentError("invalid format type","format",t),t===Rt.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==Rt.sighash&&(e+="error "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===Rt.full?", ":",")+") ",e.trim()}static from(t){return"string"===typeof t?qt.fromString(t):qt.fromObject(t)}static fromObject(t){if(qt.isErrorFragment(t))return t;"error"!==t.type&&Ct.throwArgumentError("invalid error object","value",t);const e={type:t.type,name:Wt(t.name),inputs:t.inputs?t.inputs.map(Nt.fromObject):[]};return zt(new qt(kt,e))}static fromString(t){let e={type:"error"},r=t.match(Jt);return r||Ct.throwArgumentError("invalid error signature","value",t),e.name=r[1].trim(),e.name&&Wt(e.name),e.inputs=jt(r[2],!1),zt(qt.fromObject(e))}static isErrorFragment(t){return t&&t._isFragment&&"error"===t.type}}function Kt(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const Vt=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Wt(t){return t&&t.match(Vt)||Ct.throwArgumentError('invalid identifier "'.concat(t,'"'),"value",t),t}const Jt=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const Yt=new u.b(c),Xt=new RegExp(/^bytes([0-9]*)$/),Zt=new RegExp(/^(u?int)([0-9]*)$/);class $t{constructor(t){Object(s.d)(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new z(t.name);case"bool":return new Y(t.name);case"string":return new St(t.name);case"bytes":return new Z(t.name);case"array":return new J(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new Mt((t.components||[]).map((t=>this._getCoder(t))),t.name);case"":return new tt(t.name)}let e=t.type.match(Zt);if(e){let r=parseInt(e[2]||"256");return(0===r||r>256||r%8!==0)&&Yt.throwArgumentError("invalid "+e[1]+" bit length","param",t),new mt(r/8,"int"===e[1],t.name)}if(e=t.type.match(Xt),e){let r=parseInt(e[1]);return(0===r||r>32)&&Yt.throwArgumentError("invalid bytes length","param",t),new $(r,t.name)}return Yt.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new S(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new I(this._getWordSize())}getDefaultValue(t){const e=t.map((t=>this._getCoder(Nt.from(t))));return new Mt(e,"_").defaultValue()}encode(t,e){t.length!==e.length&&Yt.throwError("types/values length mismatch",u.b.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});const r=t.map((t=>this._getCoder(Nt.from(t)))),n=new Mt(r,"_"),i=this._getWriter();return n.encode(i,e),i.data}decode(t,e,r){const n=t.map((t=>this._getCoder(Nt.from(t))));return new Mt(n,"_").decode(this._getReader(Object(a.a)(e),r))}}const te=new $t;function ee(t){return"0x"+C.a.keccak_256(Object(a.a)(t))}const re=new u.b("strings/5.6.1");var ne,ie;function oe(t,e,r,n,i){if(t===ie.BAD_PREFIX||t===ie.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6===2;n++)t++;return t}return t===ie.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(ne||(ne={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(ie||(ie={}));const ae=Object.freeze({error:function(t,e,r,n,i){return re.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:oe,replace:function(t,e,r,n,i){return t===ie.OVERLONG?(n.push(i),0):(n.push(65533),oe(t,e,r))}});function se(t,e){null==e&&(e=ae.error),t=Object(a.a)(t);const r=[];let n=0;for(;n>7===0){r.push(i);continue}let o=null,a=null;if(192===(224&i))o=1,a=127;else if(224===(240&i))o=2,a=2047;else{if(240!==(248&i)){n+=e(128===(192&i)?ie.UNEXPECTED_CONTINUE:ie.BAD_PREFIX,n-1,t,r);continue}o=3,a=65535}if(n-1+o>=t.length){n+=e(ie.OVERRUN,n-1,t,r);continue}let s=i&(1<<8-o-1)-1;for(let u=0;u1114111?n+=e(ie.OUT_OF_RANGE,n-1-o,t,r,s):s>=55296&&s<=57343?n+=e(ie.UTF16_SURROGATE,n-1-o,t,r,s):s<=a?n+=e(ie.OVERLONG,n-1-o,t,r,s):r.push(s))}return r}function ue(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ne.current;e!=ne.current&&(re.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return Object(a.a)(r)}function ce(t){return t.map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}function le(t){return se(ue(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:ne.current))}function fe(t){return ee(ue(t))}const he=new u.b(c);class de extends s.a{}class pe extends s.a{}class ge extends s.a{}class me extends s.a{static isIndexed(t){return!(!t||!t._isIndexed)}}const ye={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function be(t,e){const r=new Error("deferred error during ABI decoding triggered accessing ".concat(t));return r.error=e,r}class ve{constructor(t){let e=[];e="string"===typeof t?JSON.parse(t):t,Object(s.d)(this,"fragments",e.map((t=>Dt.from(t))).filter((t=>null!=t))),Object(s.d)(this,"_abiCoder",Object(s.e)(new.target,"getAbiCoder")()),Object(s.d)(this,"functions",{}),Object(s.d)(this,"errors",{}),Object(s.d)(this,"events",{}),Object(s.d)(this,"structs",{}),this.fragments.forEach((t=>{let e=null;switch(t.type){case"constructor":return this.deploy?void he.warn("duplicate definition - constructor"):void Object(s.d)(this,"deploy",t);case"function":e=this.functions;break;case"event":e=this.events;break;case"error":e=this.errors;break;default:return}let r=t.format();e[r]?he.warn("duplicate definition - "+r):e[r]=t})),this.deploy||Object(s.d)(this,"deploy",Gt.from({payable:!1,type:"constructor"})),Object(s.d)(this,"_isInterface",!0)}format(t){t||(t=Rt.full),t===Rt.sighash&&he.throwArgumentError("interface does not support formatting sighash","format",t);const e=this.fragments.map((e=>e.format(t)));return t===Rt.json?JSON.stringify(e.map((t=>JSON.parse(t)))):e}static getAbiCoder(){return te}static getAddress(t){return H(t)}static getSighash(t){return Object(a.e)(fe(t.format()),0,4)}static getEventTopic(t){return fe(t.format())}getFunction(t){if(Object(a.l)(t)){for(const e in this.functions)if(t===this.getSighash(e))return this.functions[e];he.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.functions).filter((t=>t.split("(")[0]===e));return 0===r.length?he.throwArgumentError("no matching function","name",e):r.length>1&&he.throwArgumentError("multiple matching functions","name",e),this.functions[r[0]]}const e=this.functions[Ht.fromString(t).format()];return e||he.throwArgumentError("no matching function","signature",t),e}getEvent(t){if(Object(a.l)(t)){const e=t.toLowerCase();for(const t in this.events)if(e===this.getEventTopic(t))return this.events[t];he.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.events).filter((t=>t.split("(")[0]===e));return 0===r.length?he.throwArgumentError("no matching event","name",e):r.length>1&&he.throwArgumentError("multiple matching events","name",e),this.events[r[0]]}const e=this.events[Lt.fromString(t).format()];return e||he.throwArgumentError("no matching event","signature",t),e}getError(t){if(Object(a.l)(t)){const e=Object(s.e)(this.constructor,"getSighash");for(const r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}he.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.errors).filter((t=>t.split("(")[0]===e));return 0===r.length?he.throwArgumentError("no matching error","name",e):r.length>1&&he.throwArgumentError("multiple matching errors","name",e),this.errors[r[0]]}const e=this.errors[Ht.fromString(t).format()];return e||he.throwArgumentError("no matching error","signature",t),e}getSighash(t){if("string"===typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(r){throw e}}return Object(s.e)(this.constructor,"getSighash")(t)}getEventTopic(t){return"string"===typeof t&&(t=this.getEvent(t)),Object(s.e)(this.constructor,"getEventTopic")(t)}_decodeParams(t,e){return this._abiCoder.decode(t,e)}_encodeParams(t,e){return this._abiCoder.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){"string"===typeof t&&(t=this.getError(t));const r=Object(a.a)(e);return Object(a.i)(r.slice(0,4))!==this.getSighash(t)&&he.throwArgumentError("data signature does not match error ".concat(t.name,"."),"data",Object(a.i)(r)),this._decodeParams(t.inputs,r.slice(4))}encodeErrorResult(t,e){return"string"===typeof t&&(t=this.getError(t)),Object(a.i)(Object(a.b)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionData(t,e){"string"===typeof t&&(t=this.getFunction(t));const r=Object(a.a)(e);return Object(a.i)(r.slice(0,4))!==this.getSighash(t)&&he.throwArgumentError("data signature does not match function ".concat(t.name,"."),"data",Object(a.i)(r)),this._decodeParams(t.inputs,r.slice(4))}encodeFunctionData(t,e){return"string"===typeof t&&(t=this.getFunction(t)),Object(a.i)(Object(a.b)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionResult(t,e){"string"===typeof t&&(t=this.getFunction(t));let r=Object(a.a)(e),n=null,i="",o=null,s=null,c=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,r)}catch(l){}break;case 4:{const t=Object(a.i)(r.slice(0,4)),e=ye[t];if(e)o=this._abiCoder.decode(e.inputs,r.slice(4)),s=e.name,c=e.signature,e.reason&&(n=o[0]),"Error"===s?i="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(o[0])):"Panic"===s&&(i="; VM Exception while processing transaction: reverted with panic code ".concat(o[0]));else try{const e=this.getError(t);o=this._abiCoder.decode(e.inputs,r.slice(4)),s=e.name,c=e.format()}catch(l){}break}}return he.throwError("call revert exception"+i,u.b.errors.CALL_EXCEPTION,{method:t.format(),data:Object(a.i)(e),errorArgs:o,errorName:s,errorSignature:c,reason:n})}encodeFunctionResult(t,e){return"string"===typeof t&&(t=this.getFunction(t)),Object(a.i)(this._abiCoder.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){"string"===typeof t&&(t=this.getEvent(t)),e.length>t.inputs.length&&he.throwError("too many arguments for "+t.format(),u.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e});let r=[];t.anonymous||r.push(this.getEventTopic(t));const n=(t,e)=>"string"===t.type?fe(e):"bytes"===t.type?k(Object(a.i)(e)):("bool"===t.type&&"boolean"===typeof e&&(e=e?"0x01":"0x00"),t.type.match(/^u?int/)&&(e=m.from(e).toHexString()),"address"===t.type&&this._abiCoder.encode(["address"],[e]),Object(a.h)(Object(a.i)(e),32));for(e.forEach(((e,i)=>{let o=t.inputs[i];o.indexed?null==e?r.push(null):"array"===o.baseType||"tuple"===o.baseType?he.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,e):Array.isArray(e)?r.push(e.map((t=>n(o,t)))):r.push(n(o,e)):null!=e&&he.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,e)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(t,e){"string"===typeof t&&(t=this.getEvent(t));const r=[],n=[],i=[];return t.anonymous||r.push(this.getEventTopic(t)),e.length!==t.inputs.length&&he.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach(((t,o)=>{const a=e[o];if(t.indexed)if("string"===t.type)r.push(fe(a));else if("bytes"===t.type)r.push(k(a));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([t.type],[a]))}else n.push(t),i.push(a)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(t,e,r){if("string"===typeof t&&(t=this.getEvent(t)),null!=r&&!t.anonymous){let e=this.getEventTopic(t);Object(a.l)(r[0],32)&&r[0].toLowerCase()===e||he.throwError("fragment/topic mismatch",u.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:e,value:r[0]}),r=r.slice(1)}let n=[],i=[],o=[];t.inputs.forEach(((t,e)=>{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(n.push(Nt.fromObject({type:"bytes32",name:t.name})),o.push(!0)):(n.push(t),o.push(!1)):(i.push(t),o.push(!1))}));let s=null!=r?this._abiCoder.decode(n,Object(a.b)(r)):null,c=this._abiCoder.decode(i,e,!0),l=[],f=0,h=0;t.inputs.forEach(((t,e)=>{if(t.indexed)if(null==s)l[e]=new me({_isIndexed:!0,hash:null});else if(o[e])l[e]=new me({_isIndexed:!0,hash:s[h++]});else try{l[e]=s[h++]}catch(r){l[e]=r}else try{l[e]=c[f++]}catch(r){l[e]=r}if(t.name&&null==l[t.name]){const r=l[e];r instanceof Error?Object.defineProperty(l,t.name,{enumerable:!0,get:()=>{throw be("property ".concat(JSON.stringify(t.name)),r)}}):l[t.name]=r}}));for(let a=0;a{throw be("index ".concat(a),t)}})}return Object.freeze(l)}parseTransaction(t){let e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new pe({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:m.from(t.value||"0")}):null}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new de({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}parseError(t){const e=Object(a.i)(t);let r=this.getError(e.substring(0,10).toLowerCase());return r?new ge({args:this._abiCoder.decode(r.inputs,"0x"+e.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(t){return!(!t||!t._isInterface)}}var Ae=r(180);function we(t){return"0x"+C.a.keccak_256(Object(a.a)(t))}const _e=new u.b("address/5.6.1");function Ee(t){Object(a.l)(t,20)||_e.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=Object(a.a)(we(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(15&n[i>>1])>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Ie={};for(let To=0;To<10;To++)Ie[String(To)]=String(To);for(let To=0;To<26;To++)Ie[String.fromCharCode(65+To)]=String(10+To);const Se=Math.floor(function(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}(9007199254740991));function Me(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>Ie[t])).join("");for(;e.length>=Se;){let t=e.substring(0,Se);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function Ce(t){let e=null;if("string"!==typeof t&&_e.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=Ee(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&_e.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==Me(t)&&_e.throwArgumentError("bad icap checksum","address",t),e=Object(Ae.c)(t.substring(4));e.length<40;)e="0"+e;e=Ee("0x"+e)}else _e.throwArgumentError("invalid address","address",t);return e}function ke(t){try{return Ce(t),!0}catch(e){}return!1}function xe(t){let e=Object(Ae.b)(Ce(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Me("XE00"+e)+e}function Be(t){let e=null;try{e=Ce(t.from)}catch(n){_e.throwArgumentError("missing from address","transaction",t)}const r=Object(a.o)(Object(a.a)(Ae.a.from(t.nonce).toHexString()));return Ce(Object(a.e)(we(R([e,r])),12))}function Oe(t,e,r){return 32!==Object(a.d)(e)&&_e.throwArgumentError("salt must be 32 bytes","salt",e),32!==Object(a.d)(r)&&_e.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Ce(Object(a.e)(we(Object(a.b)(["0xff",Ce(t),e,r])),12))}function Te(t){t=atob(t);const e=[];for(let r=0;r0;)r.push(t%this.base),t=t/this.base|0}let n="";for(let i=0;0===e[i]&&i=0;--i)n+=this.alphabet[r[i]];return n}decode(t){if("string"!==typeof t)throw new TypeError("Expected String");let e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(let r=0;r>=8;for(;i>0;)e.push(255&i),i>>=8}for(let r=0;t[r]===this._leader&&r{let i=t.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])})),n}function De(t){let e=0;return t.split(",").map((t=>{let r=t.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=e+parseInt(r[0],16);return e=parseInt(r[1],16),{l:n,h:e}}))}function Le(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&-1!==i.e.indexOf(t-r))continue;return i}}return null}const Fe=De("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Ue="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((t=>parseInt(t,16))),Qe=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Ge=je("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),He=je("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),ze=je("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{if(Ue.indexOf(t)>=0)return[];if(t>=65024&&t<=65039)return[];let e=function(t){let e=Le(t,Qe);if(e)return[t+e.s];let r=Ge[t];if(r)return r;let n=He[t];return n?[t+n[0]]:ze[t]||null}(t);return e||[t]})),e=r.reduce(((t,e)=>(e.forEach((e=>{t.push(e)})),t)),[]),e=le(ce(e),ne.NFKC),e.forEach((t=>{if(Le(t,qe))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),e.forEach((t=>{if(Le(t,Fe))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let n=ce(e);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");if(n.length>63)throw new Error("too long");return n}const Ve="hash/5.6.1",We=new u.b(Ve),Je=new Uint8Array(32);Je.fill(0);const Ye=new RegExp("^((.*)\\.)?([^.]+)$");function Xe(t){try{const e=t.split(".");for(let t=0;t{const e=ue("_"+Ke(t));return e[0]=e.length-1,e}))))+"00"}const tr="\x19Ethereum Signed Message:\n";function er(t){return"string"===typeof t&&(t=ue(t)),ee(Object(a.b)([ue(tr),ue(String(t.length)),t]))}var rr=r(1390);var nr=r.n(rr).a.BN;const ir=new u.b("bignumber/5.6.2"),or={},ar=9007199254740991;let sr=!1;class ur{constructor(t,e){t!==or&&ir.throwError("cannot call constructor directly; use BigNumber.from",u.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return lr(fr(this).fromTwos(t))}toTwos(t){return lr(fr(this).toTwos(t))}abs(){return"-"===this._hex[0]?ur.from(this._hex.substring(1)):this}add(t){return lr(fr(this).add(fr(t)))}sub(t){return lr(fr(this).sub(fr(t)))}div(t){return ur.from(t).isZero()&&hr("division-by-zero","div"),lr(fr(this).div(fr(t)))}mul(t){return lr(fr(this).mul(fr(t)))}mod(t){const e=fr(t);return e.isNeg()&&hr("division-by-zero","mod"),lr(fr(this).umod(e))}pow(t){const e=fr(t);return e.isNeg()&&hr("negative-power","pow"),lr(fr(this).pow(e))}and(t){const e=fr(t);return(this.isNegative()||e.isNeg())&&hr("unbound-bitwise-result","and"),lr(fr(this).and(e))}or(t){const e=fr(t);return(this.isNegative()||e.isNeg())&&hr("unbound-bitwise-result","or"),lr(fr(this).or(e))}xor(t){const e=fr(t);return(this.isNegative()||e.isNeg())&&hr("unbound-bitwise-result","xor"),lr(fr(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&hr("negative-width","mask"),lr(fr(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&hr("negative-width","shl"),lr(fr(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&hr("negative-width","shr"),lr(fr(this).shrn(t))}eq(t){return fr(this).eq(fr(t))}lt(t){return fr(this).lt(fr(t))}lte(t){return fr(this).lte(fr(t))}gt(t){return fr(this).gt(fr(t))}gte(t){return fr(this).gte(fr(t))}isNegative(){return"-"===this._hex[0]}isZero(){return fr(this).isZero()}toNumber(){try{return fr(this).toNumber()}catch(t){hr("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return ir.throwError("this platform does not support BigInt",u.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?sr||(sr=!0,ir.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?ir.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",u.b.errors.UNEXPECTED_ARGUMENT,{}):ir.throwError("BigNumber.toString does not accept parameters",u.b.errors.UNEXPECTED_ARGUMENT,{})),fr(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof ur)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new ur(or,cr(t)):t.match(/^-?[0-9]+$/)?new ur(or,cr(new nr(t))):ir.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&hr("underflow","BigNumber.from",t),(t>=ar||t<=-9007199254740991)&&hr("overflow","BigNumber.from",t),ur.from(String(t));const e=t;if("bigint"===typeof e)return ur.from(e.toString());if(Object(a.j)(e))return ur.from(Object(a.i)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return ur.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&(Object(a.l)(t)||"-"===t[0]&&Object(a.l)(t.substring(1))))return ur.from(t)}return ir.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function cr(t){if("string"!==typeof t)return cr(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&ir.throwArgumentError("invalid hex","value",t),"0x00"===(t=cr(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function lr(t){return ur.from(cr(t))}function fr(t){const e=ur.from(t).toHexString();return"-"===e[0]?new nr("-"+e.substring(3),16):new nr(e.substring(2),16)}function hr(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),ir.throwError(t,u.b.errors.NUMERIC_FAULT,n)}const dr=new u.b("address/5.6.1");function pr(t){Object(a.l)(t,20)||dr.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=Object(a.a)(ee(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(15&n[i>>1])>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const gr={};for(let To=0;To<10;To++)gr[String(To)]=String(To);for(let To=0;To<26;To++)gr[String.fromCharCode(65+To)]=String(10+To);const mr=Math.floor(function(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}(9007199254740991));function yr(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>gr[t])).join("");for(;e.length>=mr;){let t=e.substring(0,mr);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function br(t){let e=null;if("string"!==typeof t&&dr.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=pr(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&dr.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==yr(t)&&dr.throwArgumentError("bad icap checksum","address",t),r=t.substring(4),e=new nr(r,36).toString(16);e.length<40;)e="0"+e;e=pr("0x"+e)}else dr.throwArgumentError("invalid address","address",t);var r;return e}var vr=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const Ar=new u.b(Ve),wr=new Uint8Array(32);wr.fill(0);const _r=ur.from(-1),Er=ur.from(0),Ir=ur.from(1),Sr=ur.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const Mr=Object(a.h)(Ir.toHexString(),32),Cr=Object(a.h)(Er.toHexString(),32),kr={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},xr=["name","version","chainId","verifyingContract","salt"];function Br(t){return function(e){return"string"!==typeof e&&Ar.throwArgumentError("invalid domain value for ".concat(JSON.stringify(t)),"domain.".concat(t),e),e}}const Or={name:Br("name"),version:Br("version"),chainId:function(t){try{return ur.from(t).toString()}catch(e){}return Ar.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return br(t).toLowerCase()}catch(e){}return Ar.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=Object(a.a)(t);if(32!==e.length)throw new Error("bad length");return Object(a.i)(e)}catch(e){}return Ar.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Tr(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=""===e[1],n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&Ar.throwArgumentError("invalid numeric width","type",t);const i=Sr.mask(r?n-1:n),o=r?i.add(Ir).mul(_r):Er;return function(e){const r=ur.from(e);return(r.lt(o)||r.gt(i))&&Ar.throwArgumentError("value out-of-bounds for ".concat(t),"value",e),Object(a.h)(r.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(0===r||r>32||e[1]!==String(r))&&Ar.throwArgumentError("invalid bytes width","type",t),function(e){return Object(a.a)(e).length!==r&&Ar.throwArgumentError("invalid length for ".concat(t),"value",e),function(t){const e=Object(a.a)(t),r=e.length%32;return r?Object(a.c)([e,wr.slice(r)]):Object(a.i)(e)}(e)}}}switch(t){case"address":return function(t){return Object(a.h)(br(t),32)};case"bool":return function(t){return t?Mr:Cr};case"bytes":return function(t){return ee(t)};case"string":return function(t){return fe(t)}}return null}function Rr(t,e){return"".concat(t,"(").concat(e.map((t=>{let{name:e,type:r}=t;return r+" "+e})).join(","),")")}class Pr{constructor(t){Object(s.d)(this,"types",Object.freeze(Object(s.c)(t))),Object(s.d)(this,"_encoderCache",{}),Object(s.d)(this,"_types",{});const e={},r={},n={};Object.keys(t).forEach((t=>{e[t]={},r[t]=[],n[t]={}}));for(const o in t){const n={};t[o].forEach((i=>{n[i.name]&&Ar.throwArgumentError("duplicate variable name ".concat(JSON.stringify(i.name)," in ").concat(JSON.stringify(o)),"types",t),n[i.name]=!0;const a=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===o&&Ar.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t);Tr(a)||(r[a]||Ar.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),r[a].push(o),e[o][a]=!0)}))}const i=Object.keys(r).filter((t=>0===r[t].length));0===i.length?Ar.throwArgumentError("missing primary type","types",t):i.length>1&&Ar.throwArgumentError("ambiguous primary types or unused types: ".concat(i.map((t=>JSON.stringify(t))).join(", ")),"types",t),Object(s.d)(this,"primaryType",i[0]),function i(o,a){a[o]&&Ar.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),a[o]=!0,Object.keys(e[o]).forEach((t=>{r[t]&&(i(t,a),Object.keys(a).forEach((e=>{n[e][t]=!0})))})),delete a[o]}(this.primaryType,{});for(const o in n){const e=Object.keys(n[o]);e.sort(),this._types[o]=Rr(o,t[o])+e.map((e=>Rr(e,t[e]))).join("")}}getEncoder(t){let e=this._encoderCache[t];return e||(e=this._encoderCache[t]=this._getEncoder(t)),e}_getEncoder(t){{const e=Tr(t);if(e)return e}const e=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(e){const t=e[1],r=this.getEncoder(t),n=parseInt(e[3]);return e=>{n>=0&&e.length!==n&&Ar.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);let i=e.map(r);return this._types[t]&&(i=i.map(ee)),ee(Object(a.c)(i))}}const r=this.types[t];if(r){const e=fe(this._types[t]);return t=>{const n=r.map((e=>{let{name:r,type:n}=e;const i=this.getEncoder(n)(t[r]);return this._types[n]?ee(i):i}));return n.unshift(e),Object(a.c)(n)}}return Ar.throwArgumentError("unknown type: ".concat(t),"type",t)}encodeType(t){const e=this._types[t];return e||Ar.throwArgumentError("unknown type: ".concat(JSON.stringify(t)),"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return ee(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,r){if(Tr(t))return r(t,e);const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const t=n[1],i=parseInt(n[3]);return i>=0&&e.length!==i&&Ar.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e),e.map((e=>this._visit(t,e,r)))}const i=this.types[t];return i?i.reduce(((t,n)=>{let{name:i,type:o}=n;return t[i]=this._visit(o,e[i],r),t}),{}):Ar.throwArgumentError("unknown type: ".concat(t),"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new Pr(t)}static getPrimaryType(t){return Pr.from(t).primaryType}static hashStruct(t,e,r){return Pr.from(e).hashStruct(t,r)}static hashDomain(t){const e=[];for(const r in t){const n=kr[r];n||Ar.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(r)),"domain",t),e.push({name:r,type:n})}return e.sort(((t,e)=>xr.indexOf(t.name)-xr.indexOf(e.name))),Pr.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,r){return Object(a.c)(["0x1901",Pr.hashDomain(t),Pr.from(e).hash(r)])}static hash(t,e,r){return ee(Pr.encode(t,e,r))}static resolveNames(t,e,r,n){return vr(this,void 0,void 0,(function*(){t=Object(s.g)(t);const i={};t.verifyingContract&&!Object(a.l)(t.verifyingContract,20)&&(i[t.verifyingContract]="0x");const o=Pr.from(e);o.visit(r,((t,e)=>("address"!==t||Object(a.l)(e,20)||(i[e]="0x"),e)));for(const t in i)i[t]=yield n(t);return t.verifyingContract&&i[t.verifyingContract]&&(t.verifyingContract=i[t.verifyingContract]),r=o.visit(r,((t,e)=>"address"===t&&i[e]?i[e]:e)),{domain:t,value:r}}))}static getPayload(t,e,r){Pr.hashDomain(t);const n={},i=[];xr.forEach((e=>{const r=t[e];null!=r&&(n[e]=Or[e](r),i.push({name:e,type:kr[e]}))}));const o=Pr.from(e),u=Object(s.g)(e);return u.EIP712Domain?Ar.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",e):u.EIP712Domain=i,o.encode(r),{types:u,domain:n,primaryType:o.primaryType,message:o.visit(r,((t,e)=>{if(t.match(/^bytes(\d*)/))return Object(a.i)(Object(a.a)(e));if(t.match(/^u?int/))return ur.from(e).toString();switch(t){case"address":return e.toLowerCase();case"bool":return!!e;case"string":return"string"!==typeof e&&Ar.throwArgumentError("invalid string","value",e),e}return Ar.throwArgumentError("unsupported type","type",t)}))}}}var Nr=r(87);var jr=r.n(Nr).a.BN;const Dr=new u.b("bignumber/5.6.2"),Lr={},Fr=9007199254740991;let Ur=!1;class Qr{constructor(t,e){t!==Lr&&Dr.throwError("cannot call constructor directly; use BigNumber.from",u.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return Hr(zr(this).fromTwos(t))}toTwos(t){return Hr(zr(this).toTwos(t))}abs(){return"-"===this._hex[0]?Qr.from(this._hex.substring(1)):this}add(t){return Hr(zr(this).add(zr(t)))}sub(t){return Hr(zr(this).sub(zr(t)))}div(t){return Qr.from(t).isZero()&&qr("division-by-zero","div"),Hr(zr(this).div(zr(t)))}mul(t){return Hr(zr(this).mul(zr(t)))}mod(t){const e=zr(t);return e.isNeg()&&qr("division-by-zero","mod"),Hr(zr(this).umod(e))}pow(t){const e=zr(t);return e.isNeg()&&qr("negative-power","pow"),Hr(zr(this).pow(e))}and(t){const e=zr(t);return(this.isNegative()||e.isNeg())&&qr("unbound-bitwise-result","and"),Hr(zr(this).and(e))}or(t){const e=zr(t);return(this.isNegative()||e.isNeg())&&qr("unbound-bitwise-result","or"),Hr(zr(this).or(e))}xor(t){const e=zr(t);return(this.isNegative()||e.isNeg())&&qr("unbound-bitwise-result","xor"),Hr(zr(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&qr("negative-width","mask"),Hr(zr(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&qr("negative-width","shl"),Hr(zr(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&qr("negative-width","shr"),Hr(zr(this).shrn(t))}eq(t){return zr(this).eq(zr(t))}lt(t){return zr(this).lt(zr(t))}lte(t){return zr(this).lte(zr(t))}gt(t){return zr(this).gt(zr(t))}gte(t){return zr(this).gte(zr(t))}isNegative(){return"-"===this._hex[0]}isZero(){return zr(this).isZero()}toNumber(){try{return zr(this).toNumber()}catch(t){qr("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return Dr.throwError("this platform does not support BigInt",u.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?Ur||(Ur=!0,Dr.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?Dr.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",u.b.errors.UNEXPECTED_ARGUMENT,{}):Dr.throwError("BigNumber.toString does not accept parameters",u.b.errors.UNEXPECTED_ARGUMENT,{})),zr(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof Qr)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new Qr(Lr,Gr(t)):t.match(/^-?[0-9]+$/)?new Qr(Lr,Gr(new jr(t))):Dr.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&qr("underflow","BigNumber.from",t),(t>=Fr||t<=-9007199254740991)&&qr("overflow","BigNumber.from",t),Qr.from(String(t));const e=t;if("bigint"===typeof e)return Qr.from(e.toString());if(Object(a.j)(e))return Qr.from(Object(a.i)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return Qr.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&(Object(a.l)(t)||"-"===t[0]&&Object(a.l)(t.substring(1))))return Qr.from(t)}return Dr.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function Gr(t){if("string"!==typeof t)return Gr(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&Dr.throwArgumentError("invalid hex","value",t),"0x00"===(t=Gr(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function Hr(t){return Qr.from(Gr(t))}function zr(t){const e=Qr.from(t).toHexString();return"-"===e[0]?new jr("-"+e.substring(3),16):new jr(e.substring(2),16)}function qr(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),Dr.throwError(t,u.b.errors.NUMERIC_FAULT,n)}const Kr=new u.b("strings/5.6.1");var Vr,Wr;function Jr(t,e,r,n,i){if(t===Wr.BAD_PREFIX||t===Wr.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6===2;n++)t++;return t}return t===Wr.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(Vr||(Vr={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(Wr||(Wr={}));Object.freeze({error:function(t,e,r,n,i){return Kr.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:Jr,replace:function(t,e,r,n,i){return t===Wr.OVERLONG?(n.push(i),0):(n.push(65533),Jr(t,e,r))}});function Yr(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vr.current;e!=Vr.current&&(Kr.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return Object(a.a)(r)}var Xr,Zr=r(14),$r=r.n(Zr);!function(t){t.sha256="sha256",t.sha512="sha512"}(Xr||(Xr={}));const tn=new u.b("sha2/5.6.1");function en(t){return"0x"+$r.a.ripemd160().update(Object(a.a)(t)).digest("hex")}function rn(t){return"0x"+$r.a.sha256().update(Object(a.a)(t)).digest("hex")}function nn(t){return"0x"+$r.a.sha512().update(Object(a.a)(t)).digest("hex")}function on(t,e,r){return Xr[t]||tn.throwError("unsupported algorithm "+t,u.b.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:t}),"0x"+$r.a.hmac($r.a[t],Object(a.a)(e)).update(Object(a.a)(r)).digest("hex")}var an=r(1387);const sn=new u.b("signing-key/5.6.2");let un=null;function cn(){return un||(un=new an.a("secp256k1")),un}class ln{constructor(t){Object(s.d)(this,"curve","secp256k1"),Object(s.d)(this,"privateKey",Object(a.i)(t)),32!==Object(a.d)(this.privateKey)&&sn.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const e=cn().keyFromPrivate(Object(a.a)(this.privateKey));Object(s.d)(this,"publicKey","0x"+e.getPublic(!1,"hex")),Object(s.d)(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),Object(s.d)(this,"_isSigningKey",!0)}_addPoint(t){const e=cn().keyFromPublic(Object(a.a)(this.publicKey)),r=cn().keyFromPublic(Object(a.a)(t));return"0x"+e.pub.add(r.pub).encodeCompressed("hex")}signDigest(t){const e=cn().keyFromPrivate(Object(a.a)(this.privateKey)),r=Object(a.a)(t);32!==r.length&&sn.throwArgumentError("bad digest length","digest",t);const n=e.sign(r,{canonical:!0});return Object(a.n)({recoveryParam:n.recoveryParam,r:Object(a.h)("0x"+n.r.toString(16),32),s:Object(a.h)("0x"+n.s.toString(16),32)})}computeSharedSecret(t){const e=cn().keyFromPrivate(Object(a.a)(this.privateKey)),r=cn().keyFromPublic(Object(a.a)(function(t,e){const r=Object(a.a)(t);if(32===r.length){const t=new ln(r);return e?"0x"+cn().keyFromPrivate(r).getPublic(!0,"hex"):t.publicKey}if(33===r.length)return e?Object(a.i)(r):"0x"+cn().keyFromPublic(r).getPublic(!1,"hex");if(65===r.length)return e?"0x"+cn().keyFromPublic(r).getPublic(!0,"hex"):Object(a.i)(r);return sn.throwArgumentError("invalid public or private key","key","[REDACTED]")}(t)));return Object(a.h)("0x"+e.derive(r.getPublic()).toString(16),32)}static isSigningKey(t){return!(!t||!t._isSigningKey)}}var fn=r(88);var hn=r.n(fn).a.BN;const dn=new u.b("bignumber/5.6.2"),pn={},gn=9007199254740991;let mn=!1;class yn{constructor(t,e){t!==pn&&dn.throwError("cannot call constructor directly; use BigNumber.from",u.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return vn(An(this).fromTwos(t))}toTwos(t){return vn(An(this).toTwos(t))}abs(){return"-"===this._hex[0]?yn.from(this._hex.substring(1)):this}add(t){return vn(An(this).add(An(t)))}sub(t){return vn(An(this).sub(An(t)))}div(t){return yn.from(t).isZero()&&wn("division-by-zero","div"),vn(An(this).div(An(t)))}mul(t){return vn(An(this).mul(An(t)))}mod(t){const e=An(t);return e.isNeg()&&wn("division-by-zero","mod"),vn(An(this).umod(e))}pow(t){const e=An(t);return e.isNeg()&&wn("negative-power","pow"),vn(An(this).pow(e))}and(t){const e=An(t);return(this.isNegative()||e.isNeg())&&wn("unbound-bitwise-result","and"),vn(An(this).and(e))}or(t){const e=An(t);return(this.isNegative()||e.isNeg())&&wn("unbound-bitwise-result","or"),vn(An(this).or(e))}xor(t){const e=An(t);return(this.isNegative()||e.isNeg())&&wn("unbound-bitwise-result","xor"),vn(An(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&wn("negative-width","mask"),vn(An(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&wn("negative-width","shl"),vn(An(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&wn("negative-width","shr"),vn(An(this).shrn(t))}eq(t){return An(this).eq(An(t))}lt(t){return An(this).lt(An(t))}lte(t){return An(this).lte(An(t))}gt(t){return An(this).gt(An(t))}gte(t){return An(this).gte(An(t))}isNegative(){return"-"===this._hex[0]}isZero(){return An(this).isZero()}toNumber(){try{return An(this).toNumber()}catch(t){wn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return dn.throwError("this platform does not support BigInt",u.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?mn||(mn=!0,dn.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?dn.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",u.b.errors.UNEXPECTED_ARGUMENT,{}):dn.throwError("BigNumber.toString does not accept parameters",u.b.errors.UNEXPECTED_ARGUMENT,{})),An(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof yn)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new yn(pn,bn(t)):t.match(/^-?[0-9]+$/)?new yn(pn,bn(new hn(t))):dn.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&wn("underflow","BigNumber.from",t),(t>=gn||t<=-9007199254740991)&&wn("overflow","BigNumber.from",t),yn.from(String(t));const e=t;if("bigint"===typeof e)return yn.from(e.toString());if(Object(a.j)(e))return yn.from(Object(a.i)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return yn.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&(Object(a.l)(t)||"-"===t[0]&&Object(a.l)(t.substring(1))))return yn.from(t)}return dn.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function bn(t){if("string"!==typeof t)return bn(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&dn.throwArgumentError("invalid hex","value",t),"0x00"===(t=bn(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function vn(t){return yn.from(bn(t))}function An(t){const e=yn.from(t).toHexString();return"-"===e[0]?new hn("-"+e.substring(3),16):new hn(e.substring(2),16)}function wn(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),dn.throwError(t,u.b.errors.NUMERIC_FAULT,n)}function _n(t){return"0x"+C.a.keccak_256(Object(a.a)(t))}const En=new u.b("address/5.6.1");function In(t){Object(a.l)(t,20)||En.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=Object(a.a)(_n(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(15&n[i>>1])>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Sn={};for(let To=0;To<10;To++)Sn[String(To)]=String(To);for(let To=0;To<26;To++)Sn[String.fromCharCode(65+To)]=String(10+To);const Mn=Math.floor(function(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}(9007199254740991));function Cn(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>Sn[t])).join("");for(;e.length>=Mn;){let t=e.substring(0,Mn);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function kn(t){let e=null;if("string"!==typeof t&&En.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=In(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&En.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==Cn(t)&&En.throwArgumentError("bad icap checksum","address",t),r=t.substring(4),e=new hn(r,36).toString(16);e.length<40;)e="0"+e;e=In("0x"+e)}else En.throwArgumentError("invalid address","address",t);var r;return e}var xn=r(1388);const Bn=new u.b("signing-key/5.6.2");let On=null;function Tn(){return On||(On=new xn.a("secp256k1")),On}class Rn{constructor(t){Object(s.d)(this,"curve","secp256k1"),Object(s.d)(this,"privateKey",Object(a.i)(t)),32!==Object(a.d)(this.privateKey)&&Bn.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const e=Tn().keyFromPrivate(Object(a.a)(this.privateKey));Object(s.d)(this,"publicKey","0x"+e.getPublic(!1,"hex")),Object(s.d)(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),Object(s.d)(this,"_isSigningKey",!0)}_addPoint(t){const e=Tn().keyFromPublic(Object(a.a)(this.publicKey)),r=Tn().keyFromPublic(Object(a.a)(t));return"0x"+e.pub.add(r.pub).encodeCompressed("hex")}signDigest(t){const e=Tn().keyFromPrivate(Object(a.a)(this.privateKey)),r=Object(a.a)(t);32!==r.length&&Bn.throwArgumentError("bad digest length","digest",t);const n=e.sign(r,{canonical:!0});return Object(a.n)({recoveryParam:n.recoveryParam,r:Object(a.h)("0x"+n.r.toString(16),32),s:Object(a.h)("0x"+n.s.toString(16),32)})}computeSharedSecret(t){const e=Tn().keyFromPrivate(Object(a.a)(this.privateKey)),r=Tn().keyFromPublic(Object(a.a)(Pn(t)));return Object(a.h)("0x"+e.derive(r.getPublic()).toString(16),32)}static isSigningKey(t){return!(!t||!t._isSigningKey)}}function Pn(t,e){const r=Object(a.a)(t);if(32===r.length){const t=new Rn(r);return e?"0x"+Tn().keyFromPrivate(r).getPublic(!0,"hex"):t.publicKey}return 33===r.length?e?Object(a.i)(r):"0x"+Tn().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?e?"0x"+Tn().keyFromPublic(r).getPublic(!0,"hex"):Object(a.i)(r):Bn.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Nn=new u.b("transactions/5.6.2");var jn;function Dn(t){return"0x"===t?null:kn(t)}function Ln(t){return"0x"===t?dt:yn.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(jn||(jn={}));const Fn=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Un={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Qn(t){const e=Pn(t);return kn(Object(a.e)(_n(Object(a.e)(e,1)),12))}function Gn(t,e){return Qn(function(t,e){const r=Object(a.n)(e),n={r:Object(a.a)(r.r),s:Object(a.a)(r.s)};return"0x"+Tn().recoverPubKey(Object(a.a)(t),n,r.recoveryParam).encode("hex",!1)}(Object(a.a)(t),e))}function Hn(t,e){const r=Object(a.o)(yn.from(t).toHexString());return r.length>32&&Nn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function zn(t,e){return{address:kn(t),storageKeys:(e||[]).map(((e,r)=>(32!==Object(a.d)(e)&&Nn.throwArgumentError("invalid access list storageKey","accessList[".concat(t,":").concat(r,"]"),e),e.toLowerCase())))}}function qn(t){if(Array.isArray(t))return t.map(((t,e)=>Array.isArray(t)?(t.length>2&&Nn.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(e,"]"),t),zn(t[0],t[1])):zn(t.address,t.storageKeys)));const e=Object.keys(t).map((e=>{const r=t[e].reduce(((t,e)=>(t[e]=!0,t)),{});return zn(e,Object.keys(r).sort())}));return e.sort(((t,e)=>t.address.localeCompare(e.address))),e}function Kn(t){return qn(t).map((t=>[t.address,t.storageKeys]))}function Vn(t,e){if(null!=t.gasPrice){const e=yn.from(t.gasPrice),r=yn.from(t.maxFeePerGas||0);e.eq(r)||Nn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:e,maxFeePerGas:r})}const r=[Hn(t.chainId||0,"chainId"),Hn(t.nonce||0,"nonce"),Hn(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Hn(t.maxFeePerGas||0,"maxFeePerGas"),Hn(t.gasLimit||0,"gasLimit"),null!=t.to?kn(t.to):"0x",Hn(t.value||0,"value"),t.data||"0x",Kn(t.accessList||[])];if(e){const t=Object(a.n)(e);r.push(Hn(t.recoveryParam,"recoveryParam")),r.push(Object(a.o)(t.r)),r.push(Object(a.o)(t.s))}return Object(a.c)(["0x02",R(r)])}function Wn(t,e){const r=[Hn(t.chainId||0,"chainId"),Hn(t.nonce||0,"nonce"),Hn(t.gasPrice||0,"gasPrice"),Hn(t.gasLimit||0,"gasLimit"),null!=t.to?kn(t.to):"0x",Hn(t.value||0,"value"),t.data||"0x",Kn(t.accessList||[])];if(e){const t=Object(a.n)(e);r.push(Hn(t.recoveryParam,"recoveryParam")),r.push(Object(a.o)(t.r)),r.push(Object(a.o)(t.s))}return Object(a.c)(["0x01",R(r)])}function Jn(t,e){if(null==t.type||0===t.type)return null!=t.accessList&&Nn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),function(t,e){Object(s.b)(t,Un);const r=[];Fn.forEach((function(e){let n=t[e.name]||[];const i={};e.numeric&&(i.hexPad="left"),n=Object(a.a)(Object(a.i)(n,i)),e.length&&n.length!==e.length&&n.length>0&&Nn.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),e.maxLength&&(n=Object(a.o)(n),n.length>e.maxLength&&Nn.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n)),r.push(Object(a.i)(n))}));let n=0;if(null!=t.chainId?(n=t.chainId,"number"!==typeof n&&Nn.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!Object(a.k)(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),0!==n&&(r.push(Object(a.i)(n)),r.push("0x"),r.push("0x")),!e)return R(r);const i=Object(a.n)(e);let o=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&Nn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==o&&Nn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(Object(a.i)(o)),r.push(Object(a.o)(Object(a.a)(i.r))),r.push(Object(a.o)(Object(a.a)(i.s))),R(r)}(t,e);switch(t.type){case 1:return Wn(t,e);case 2:return Vn(t,e)}return Nn.throwError("unsupported transaction type: ".concat(t.type),u.b.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function Yn(t,e,r){try{const r=Ln(e[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");t.v=r}catch(n){Nn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Object(a.h)(e[1],32),t.s=Object(a.h)(e[2],32);try{const e=_n(r(t));t.from=Gn(e,{r:t.r,s:t.s,recoveryParam:t.v})}catch(n){}}function Xn(t){const e=Object(a.a)(t);if(e[0]>127)return function(t){const e=j(t);9!==e.length&&6!==e.length&&Nn.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Ln(e[0]).toNumber(),gasPrice:Ln(e[1]),gasLimit:Ln(e[2]),to:Dn(e[3]),value:Ln(e[4]),data:e[5],chainId:0};if(6===e.length)return r;try{r.v=yn.from(e[6]).toNumber()}catch(n){return r}if(r.r=Object(a.h)(e[7],32),r.s=Object(a.h)(e[8],32),yn.from(r.r).isZero()&&yn.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let i=r.v-27;const o=e.slice(0,6);0!==r.chainId&&(o.push(Object(a.i)(r.chainId)),o.push("0x"),o.push("0x"),i-=2*r.chainId+8);const s=_n(R(o));try{r.from=Gn(s,{r:Object(a.i)(r.r),s:Object(a.i)(r.s),recoveryParam:i})}catch(n){}r.hash=_n(t)}return r.type=null,r}(e);switch(e[0]){case 1:return function(t){const e=j(t.slice(1));8!==e.length&&11!==e.length&&Nn.throwArgumentError("invalid component count for transaction type: 1","payload",Object(a.i)(t));const r={type:1,chainId:Ln(e[0]).toNumber(),nonce:Ln(e[1]).toNumber(),gasPrice:Ln(e[2]),gasLimit:Ln(e[3]),to:Dn(e[4]),value:Ln(e[5]),data:e[6],accessList:qn(e[7])};return 8===e.length||(r.hash=_n(t),Yn(r,e.slice(8),Wn)),r}(e);case 2:return function(t){const e=j(t.slice(1));9!==e.length&&12!==e.length&&Nn.throwArgumentError("invalid component count for transaction type: 2","payload",Object(a.i)(t));const r=Ln(e[2]),n=Ln(e[3]),i={type:2,chainId:Ln(e[0]).toNumber(),nonce:Ln(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Ln(e[4]),to:Dn(e[5]),value:Ln(e[6]),data:e[7],accessList:qn(e[8])};return 9===e.length||(i.hash=_n(t),Yn(i,e.slice(9),Vn)),i}(e)}return Nn.throwError("unsupported transaction type: ".concat(e[0]),u.b.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const Zn=new u.b("wordlists/5.6.1");class $n{constructor(t){Zn.checkAbstract(new.target,$n),Object(s.d)(this,"locale",t)}split(t){return t.toLowerCase().split(/ +/g)}join(t){return t.join(" ")}static check(t){const e=[];for(let r=0;r<2048;r++){const n=t.getWord(r);if(r!==t.getWordIndex(n))return"0x";e.push(n)}return fe(e.join("\n")+"\n")}static register(t,e){e||(e=t.locale)}}let ti=null;function ei(t){if(null==ti&&(ti="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==$n.check(t)))throw ti=null,new Error("BIP39 Wordlist for en (English) FAILED")}const ri=new class extends $n{constructor(){super("en")}getWord(t){return ei(this),ti[t]}getWordIndex(t){return ei(this),ti.indexOf(t)}};$n.register(ri);const ni={en:ri},ii=new u.b("hdnode/5.6.2"),oi=Qr.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ai=Yr("Bitcoin seed"),si=2147483648;function ui(t){return(1<=256)throw new Error("Depth too large!");return li(Object(a.b)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",Object(a.i)(this.depth),this.parentFingerprint,Object(a.h)(Object(a.i)(this.index),4),this.chainCode,null!=this.privateKey?Object(a.b)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new pi(hi,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(t){if(t>4294967295)throw new Error("invalid index - "+String(t));let e=this.path;e&&(e+="/"+(t&~si));const r=new Uint8Array(37);if(t&si){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set(Object(a.a)(this.privateKey),1),e&&(e+="'")}else r.set(Object(a.a)(this.publicKey));for(let a=24;a>=0;a-=8)r[33+(a>>3)]=t>>24-a&255;const n=Object(a.a)(on(Xr.sha512,this.chainCode,r)),i=n.slice(0,32),o=n.slice(32);let s=null,u=null;if(this.privateKey)s=ci(Qr.from(i).add(this.privateKey).mod(oi));else{u=new ln(Object(a.i)(i))._addPoint(this.publicKey)}let c=e;const l=this.mnemonic;return l&&(c=Object.freeze({phrase:l.phrase,path:e,locale:l.locale||"en"})),new pi(hi,s,u,this.fingerprint,ci(o),t,this.depth+1,c)}derivePath(t){const e=t.split("/");if(0===e.length||"m"===e[0]&&0!==this.depth)throw new Error("invalid path - "+t);"m"===e[0]&&e.shift();let r=this;for(let n=0;n=si)throw new Error("invalid path index - "+t);r=r._derive(si+e)}else{if(!t.match(/^[0-9]+$/))throw new Error("invalid path component - "+t);{const e=parseInt(t);if(e>=si)throw new Error("invalid path index - "+t);r=r._derive(e)}}}return r}static _fromSeed(t,e){const r=Object(a.a)(t);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=Object(a.a)(on(Xr.sha512,ai,r));return new pi(hi,ci(n.slice(0,32)),null,"0x00000000",ci(n.slice(32)),0,0,e)}static fromMnemonic(t,e,r){return t=yi(mi(t,r=fi(r)),r),pi._fromSeed(gi(t,e),{phrase:t,path:"m",locale:r.locale})}static fromSeed(t){return pi._fromSeed(t,null)}static fromExtendedKey(t){const e=Ne.decode(t);82===e.length&&li(e.slice(0,78))===t||ii.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=e[4],n=Object(a.i)(e.slice(5,9)),i=parseInt(Object(a.i)(e.slice(9,13)).substring(2),16),o=Object(a.i)(e.slice(13,45)),s=e.slice(45,78);switch(Object(a.i)(e.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new pi(hi,null,Object(a.i)(s),n,o,i,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new pi(hi,Object(a.i)(s.slice(1)),null,n,o,i,r,null)}return ii.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function gi(t,e){e||(e="");const r=Yr("mnemonic"+e,Vr.NFKD);return function(t,e,r,n,i){let o;t=Object(a.a)(t),e=Object(a.a)(e);let s=1;const u=new Uint8Array(n),c=new Uint8Array(e.length+4);let l,f;c.set(e);for(let h=1;h<=s;h++){c[e.length]=h>>24&255,c[e.length+1]=h>>16&255,c[e.length+2]=h>>8&255,c[e.length+3]=255&h;let d=Object(a.a)(on(i,t,c));o||(o=d.length,f=new Uint8Array(o),s=Math.ceil(n/o),l=n-(s-1)*o),f.set(d);for(let e=1;e>3]|=1<<7-i%8),i++}const o=32*r.length/3,s=ui(r.length/3);if((Object(a.a)(rn(n.slice(0,o/8)))[0]&s)!==(n[n.length-1]&s))throw new Error("invalid checksum");return Object(a.i)(n.slice(0,o/8))}function yi(t,e){if(e=fi(e),(t=Object(a.a)(t)).length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let a=0;a8?(r[r.length-1]<<=8,r[r.length-1]|=t[a],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[a]>>8-n,r.push(t[a]&(1<<8-n)-1),n+=3);const i=t.length/4,o=Object(a.a)(rn(t))[0]&ui(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,e.join(r.map((t=>e.getWord(t))))}function bi(t,e){try{return mi(t,e),!0}catch(r){}return!1}function vi(t){return("number"!==typeof t||t<0||t>=si||t%1)&&ii.throwArgumentError("invalid account index","index",t),"m/44'/60'/".concat(t,"'/0/0")}var Ai=r(1392);var wi=r.n(Ai).a.BN;new u.b("bignumber/5.6.2");function _i(t){return"0x"+C.a.keccak_256(Object(a.a)(t))}const Ei=new u.b("address/5.6.1");function Ii(t){Object(a.l)(t,20)||Ei.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=Object(a.a)(_i(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(15&n[i>>1])>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Si={};for(let To=0;To<10;To++)Si[String(To)]=String(To);for(let To=0;To<26;To++)Si[String.fromCharCode(65+To)]=String(10+To);const Mi=Math.floor(function(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}(9007199254740991));function Ci(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((t=>Si[t])).join("");for(;e.length>=Mi;){let t=e.substring(0,Mi);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function ki(t){let e=null;if("string"!==typeof t&&Ei.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=Ii(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Ei.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==Ci(t)&&Ei.throwArgumentError("bad icap checksum","address",t),r=t.substring(4),e=new wi(r,36).toString(16);e.length<40;)e="0"+e;e=Ii("0x"+e)}else Ei.throwArgumentError("invalid address","address",t);var r;return e}function xi(t){if(function(t){let e=null;try{e=JSON.parse(t)}catch(r){return!1}return e.encseed&&e.ethaddr}(t))try{return ki(JSON.parse(t).ethaddr)}catch(e){return null}if(function(t){let r=null;try{r=JSON.parse(t)}catch(e){return!1}return!(!r.version||parseInt(r.version)!==r.version||3!==parseInt(r.version))}(t))try{return ki(JSON.parse(t).address)}catch(e){return null}return null}var Bi=r(167),Oi=r(3419);function Ti(t){for(let e=(t=t.slice()).length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}var Ri=r(1389);const Pi=new u.b("signing-key/5.6.2");let Ni=null;function ji(){return Ni||(Ni=new Ri.a("secp256k1")),Ni}class Di{constructor(t){Object(s.d)(this,"curve","secp256k1"),Object(s.d)(this,"privateKey",Object(a.i)(t)),32!==Object(a.d)(this.privateKey)&&Pi.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const e=ji().keyFromPrivate(Object(a.a)(this.privateKey));Object(s.d)(this,"publicKey","0x"+e.getPublic(!1,"hex")),Object(s.d)(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),Object(s.d)(this,"_isSigningKey",!0)}_addPoint(t){const e=ji().keyFromPublic(Object(a.a)(this.publicKey)),r=ji().keyFromPublic(Object(a.a)(t));return"0x"+e.pub.add(r.pub).encodeCompressed("hex")}signDigest(t){const e=ji().keyFromPrivate(Object(a.a)(this.privateKey)),r=Object(a.a)(t);32!==r.length&&Pi.throwArgumentError("bad digest length","digest",t);const n=e.sign(r,{canonical:!0});return Object(a.n)({recoveryParam:n.recoveryParam,r:Object(a.h)("0x"+n.r.toString(16),32),s:Object(a.h)("0x"+n.s.toString(16),32)})}computeSharedSecret(t){const e=ji().keyFromPrivate(Object(a.a)(this.privateKey)),r=ji().keyFromPublic(Object(a.a)(Fi(t)));return Object(a.h)("0x"+e.derive(r.getPublic()).toString(16),32)}static isSigningKey(t){return!(!t||!t._isSigningKey)}}function Li(t,e){const r=Object(a.n)(e),n={r:Object(a.a)(r.r),s:Object(a.a)(r.s)};return"0x"+ji().recoverPubKey(Object(a.a)(t),n,r.recoveryParam).encode("hex",!1)}function Fi(t,e){const r=Object(a.a)(t);if(32===r.length){const t=new Di(r);return e?"0x"+ji().keyFromPrivate(r).getPublic(!0,"hex"):t.publicKey}return 33===r.length?e?Object(a.i)(r):"0x"+ji().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?e?"0x"+ji().keyFromPublic(r).getPublic(!0,"hex"):Object(a.i)(r):Pi.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Ui=new u.b("strings/5.6.1");var Qi,Gi;function Hi(t,e,r,n,i){if(t===Gi.BAD_PREFIX||t===Gi.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6===2;n++)t++;return t}return t===Gi.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(Qi||(Qi={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(Gi||(Gi={}));const zi=Object.freeze({error:function(t,e,r,n,i){return Ui.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:Hi,replace:function(t,e,r,n,i){return t===Gi.OVERLONG?(n.push(i),0):(n.push(65533),Hi(t,e,r))}});function qi(t,e){null==e&&(e=zi.error),t=Object(a.a)(t);const r=[];let n=0;for(;n>7===0){r.push(i);continue}let o=null,a=null;if(192===(224&i))o=1,a=127;else if(224===(240&i))o=2,a=2047;else{if(240!==(248&i)){n+=e(128===(192&i)?Gi.UNEXPECTED_CONTINUE:Gi.BAD_PREFIX,n-1,t,r);continue}o=3,a=65535}if(n-1+o>=t.length){n+=e(Gi.OVERRUN,n-1,t,r);continue}let s=i&(1<<8-o-1)-1;for(let u=0;u1114111?n+=e(Gi.OUT_OF_RANGE,n-1-o,t,r,s):s>=55296&&s<=57343?n+=e(Gi.UTF16_SURROGATE,n-1-o,t,r,s):s<=a?n+=e(Gi.OVERLONG,n-1-o,t,r,s):r.push(s))}return r}function Ki(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qi.current;e!=Qi.current&&(Ui.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return Object(a.a)(r)}function Vi(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function Wi(t,e){return'"'+qi(t,e).map((t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?Vi(t):Vi(55296+((t-=65536)>>10&1023))+Vi(56320+(1023&t))})).join("")+'"'}function Ji(t){return t.map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}function Yi(t,e){return Ji(qi(t,e))}function Xi(t){return qi(Ki(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qi.current))}function Zi(t,e){e||(e=function(t){return[parseInt(t,16)]});let r=0,n={};return t.split(",").forEach((t=>{let i=t.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])})),n}function $i(t){let e=0;return t.split(",").map((t=>{let r=t.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=e+parseInt(r[0],16);return e=parseInt(r[1],16),{l:n,h:e}}))}function to(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&-1!==i.e.indexOf(t-r))continue;return i}}return null}const eo=$i("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),ro="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((t=>parseInt(t,16))),no=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],io=Zi("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),oo=Zi("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),ao=Zi("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{if(ro.indexOf(t)>=0)return[];if(t>=65024&&t<=65039)return[];let e=function(t){let e=to(t,no);if(e)return[t+e.s];let r=io[t];if(r)return r;let n=oo[t];return n?[t+n[0]]:ao[t]||null}(t);return e||[t]})),e=r.reduce(((t,e)=>(e.forEach((e=>{t.push(e)})),t)),[]),e=Xi(Ji(e),Qi.NFKC),e.forEach((t=>{if(to(t,so))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),e.forEach((t=>{if(to(t,eo))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let n=Ji(e);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");if(n.length>63)throw new Error("too long");return n}const co="0x0000000000000000000000000000000000000000000000000000000000000000";function lo(t){const e=Ki(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Object(a.i)(Object(a.b)([e,co]).slice(0,32))}function fo(t){const e=Object(a.a)(t);if(32!==e.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==e[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===e[r-1];)r--;return Yi(e.slice(0,r))}var ho=r(199),po=r(300);const go=new u.b("strings/5.6.1");var mo,yo;function bo(t,e,r,n,i){if(t===yo.BAD_PREFIX||t===yo.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6===2;n++)t++;return t}return t===yo.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(mo||(mo={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(yo||(yo={}));const vo=Object.freeze({error:function(t,e,r,n,i){return go.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:bo,replace:function(t,e,r,n,i){return t===yo.OVERLONG?(n.push(i),0):(n.push(65533),bo(t,e,r))}});function Ao(t,e){null==e&&(e=vo.error),t=Object(a.a)(t);const r=[];let n=0;for(;n>7===0){r.push(i);continue}let o=null,a=null;if(192===(224&i))o=1,a=127;else if(224===(240&i))o=2,a=2047;else{if(240!==(248&i)){n+=e(128===(192&i)?yo.UNEXPECTED_CONTINUE:yo.BAD_PREFIX,n-1,t,r);continue}o=3,a=65535}if(n-1+o>=t.length){n+=e(yo.OVERRUN,n-1,t,r);continue}let s=i&(1<<8-o-1)-1;for(let u=0;u1114111?n+=e(yo.OUT_OF_RANGE,n-1-o,t,r,s):s>=55296&&s<=57343?n+=e(yo.UTF16_SURROGATE,n-1-o,t,r,s):s<=a?n+=e(yo.OVERLONG,n-1-o,t,r,s):r.push(s))}return r}function wo(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mo.current;e!=mo.current&&(go.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return Object(a.a)(r)}function _o(t,e){return Ao(t,e).map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}var Eo=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};function Io(t,e){return Eo(this,void 0,void 0,(function*(){null==e&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};!0!==e.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client");const n=yield fetch(t,r),i=yield n.arrayBuffer(),o={};return n.headers.forEach?n.headers.forEach(((t,e)=>{o[e.toLowerCase()]=t})):n.headers.keys().forEach((t=>{o[t.toLowerCase()]=n.headers.get(t)})),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:Object(a.a)(new Uint8Array(i))}}))}var So=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};const Mo=new u.b("web/5.6.1");function Co(t){return new Promise((e=>{setTimeout(e,t)}))}function ko(t,e){if(null==t)return null;if("string"===typeof t)return t;if(Object(a.k)(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return _o(t)}catch(r){}return Object(a.i)(t)}return t}function xo(t,e,r){const n="object"===typeof t&&null!=t.throttleLimit?t.throttleLimit:12;Mo.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i="object"===typeof t?t.throttleCallback:null,o="object"===typeof t&&"number"===typeof t.throttleSlotInterval?t.throttleSlotInterval:100;Mo.assertArgument(o>0&&o%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const a="object"===typeof t&&!!t.errorPassThrough,s={};let c=null;const l={method:"GET"};let f=!1,h=12e4;if("string"===typeof t)c=t;else if("object"===typeof t){if(null!=t&&null!=t.url||Mo.throwArgumentError("missing URL","connection.url",t),c=t.url,"number"===typeof t.timeout&&t.timeout>0&&(h=t.timeout),t.headers)for(const e in t.headers)s[e.toLowerCase()]={key:e,value:String(t.headers[e])},["if-none-match","if-modified-since"].indexOf(e.toLowerCase())>=0&&(f=!0);if(l.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==c.substring(0,6)&&!0!==t.allowInsecureAuthentication&&Mo.throwError("basic authentication requires a secure https url",u.b.errors.INVALID_ARGUMENT,{argument:"url",url:c,user:t.user,password:"[REDACTED]"});const e=t.user+":"+t.password;s.authorization={key:"Authorization",value:"Basic "+Re(wo(e))}}null!=t.skipFetchSetup&&(l.skipFetchSetup=!!t.skipFetchSetup)}const d=new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$","i"),p=c?c.match(d):null;if(p)try{const t={statusCode:200,statusMessage:"OK",headers:{"content-type":p[1]},body:Te(p[2])};let e=t.body;return r&&(e=r(t.body,t)),Promise.resolve(e)}catch(b){Mo.throwError("processing response error",u.b.errors.SERVER_ERROR,{body:ko(p[1],p[2]),error:b,requestBody:null,requestMethod:"GET",url:c})}e&&(l.method="POST",l.body=e,null==s["content-type"]&&(s["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==s["content-length"]&&(s["content-length"]={key:"Content-Length",value:String(e.length)}));const g={};Object.keys(s).forEach((t=>{const e=s[t];g[e.key]=e.value})),l.headers=g;const m=function(){let t=null;return{promise:new Promise((function(e,r){h&&(t=setTimeout((()=>{null!=t&&(t=null,r(Mo.makeError("timeout",u.b.errors.TIMEOUT,{requestBody:ko(l.body,g["content-type"]),requestMethod:l.method,timeout:h,url:c})))}),h))})),cancel:function(){null!=t&&(clearTimeout(t),t=null)}}}(),y=function(){return So(this,void 0,void 0,(function*(){for(let t=0;t=300)&&(m.cancel(),Mo.throwError("bad response",u.b.errors.SERVER_ERROR,{status:e.statusCode,headers:e.headers,body:ko(s,e.headers?e.headers["content-type"]:null),requestBody:ko(l.body,g["content-type"]),requestMethod:l.method,url:c})),r)try{const t=yield r(s,e);return m.cancel(),t}catch(b){if(b.throttleRetry&&t"content-type"===t.toLowerCase())).length||(r.headers=Object(s.g)(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};t=r}return xo(t,n,((t,e)=>{let n=null;if(null!=t)try{n=JSON.parse(_o(t))}catch(i){Mo.throwError("invalid JSON",u.b.errors.SERVER_ERROR,{body:t,error:i})}return r&&(n=r(n,e)),n}))}function Oo(t,e){return e||(e={}),null==(e=Object(s.g)(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){let i=null,o=!1;const a=()=>!o&&(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout((()=>{a()&&n(new Error("timeout"))}),e.timeout));const s=e.retryLimit;let u=0;!function i(){return t().then((function(t){if(void 0!==t)a()&&r(t);else if(e.oncePoll)e.oncePoll.once("poll",i);else if(e.onceBlock)e.onceBlock.once("block",i);else if(!o){if(u++,u>s)return void(a()&&n(new Error("retry limit reached")));let t=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));te.ceiling&&(t=e.ceiling),setTimeout(i,t)}return null}),(function(t){a()&&n(t)}))}()}))}new u.b("ethers/5.6.9")},function(t,e,r){"use strict";var n=r(33),i=r(82),o=r(773);const a=["values","unit","step"],s=t=>{const e=Object.keys(t).map((e=>({key:e,val:t[e]})))||[];return e.sort(((t,e)=>t.val-e.val)),e.reduce(((t,e)=>Object(n.a)({},t,{[e.key]:e.val})),{})};var u={borderRadius:4},c=r(193);const l=["breakpoints","palette","spacing","shape"];e.a=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:e={},palette:r={},spacing:f,shape:h={}}=t,d=Object(i.a)(t,l),p=function(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:o=5}=t,u=Object(i.a)(t,a),c=s(e),l=Object.keys(c);function f(t){const n="number"===typeof e[t]?e[t]:t;return"@media (min-width:".concat(n).concat(r,")")}function h(t){const n="number"===typeof e[t]?e[t]:t;return"@media (max-width:".concat(n-o/100).concat(r,")")}function d(t,n){const i=l.indexOf(n);return"@media (min-width:".concat("number"===typeof e[t]?e[t]:t).concat(r,") and ")+"(max-width:".concat((-1!==i&&"number"===typeof e[l[i]]?e[l[i]]:n)-o/100).concat(r,")")}return Object(n.a)({keys:l,values:c,up:f,down:h,between:d,only:function(t){return l.indexOf(t)+10&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;const e=Object(c.a)({spacing:t}),r=function(){for(var t=arguments.length,r=new Array(t),n=0;n{const r=e(t);return"number"===typeof r?"".concat(r,"px"):r})).join(" ")};return r.mui=!0,r}(f);let m=Object(o.a)({breakpoints:p,direction:"ltr",components:{},palette:Object(n.a)({mode:"light"},r),spacing:g,shape:Object(n.a)({},u,h)},d);for(var y=arguments.length,b=new Array(y>1?y-1:0),v=1;vObject(o.a)(t,e)),m),m}},function(t,e,r){"use strict";var n=r(82),i=r(758),o=r(4),a=r.n(o),s=r(396),u=r.n(s),c=!1,l=r(528),f="unmounted",h="exited",d="entering",p="entered",g="exiting",m=function(t){function e(e,r){var n;n=t.call(this,e,r)||this;var i,o=r&&!r.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?o?(i=h,n.appearStatus=d):i=p:i=e.unmountOnExit||e.mountOnEnter?f:h,n.state={status:i},n.nextCallback=null,n}Object(i.a)(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===f?{status:h}:null};var r=e.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(t){var e=null;if(t!==this.props){var r=this.state.status;this.props.in?r!==d&&r!==p&&(e=d):r!==d&&r!==p||(e=g)}this.updateStatus(!1,e)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var t,e,r,n=this.props.timeout;return t=e=r=n,null!=n&&"number"!==typeof n&&(t=n.exit,e=n.enter,r=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:r}},r.updateStatus=function(t,e){void 0===t&&(t=!1),null!==e?(this.cancelNextCallback(),e===d?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&this.state.status===h&&this.setState({status:f})},r.performEnter=function(t){var e=this,r=this.props.enter,n=this.context?this.context.isMounting:t,i=this.props.nodeRef?[n]:[u.a.findDOMNode(this),n],o=i[0],a=i[1],s=this.getTimeouts(),l=n?s.appear:s.enter;!t&&!r||c?this.safeSetState({status:p},(function(){e.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:d},(function(){e.props.onEntering(o,a),e.onTransitionEnd(l,(function(){e.safeSetState({status:p},(function(){e.props.onEntered(o,a)}))}))})))},r.performExit=function(){var t=this,e=this.props.exit,r=this.getTimeouts(),n=this.props.nodeRef?void 0:u.a.findDOMNode(this);e&&!c?(this.props.onExit(n),this.safeSetState({status:g},(function(){t.props.onExiting(n),t.onTransitionEnd(r.exit,(function(){t.safeSetState({status:h},(function(){t.props.onExited(n)}))}))}))):this.safeSetState({status:h},(function(){t.props.onExited(n)}))},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},r.setNextCallback=function(t){var e=this,r=!0;return this.nextCallback=function(n){r&&(r=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){r=!1},this.nextCallback},r.onTransitionEnd=function(t,e){this.setNextCallback(e);var r=this.props.nodeRef?this.props.nodeRef.current:u.a.findDOMNode(this),n=null==t&&!this.props.addEndListener;if(r&&!n){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},r.render=function(){var t=this.state.status;if(t===f)return null;var e=this.props,r=e.children,i=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,Object(n.a)(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(l.a.Provider,{value:null},"function"===typeof r?r(t,i):a.a.cloneElement(a.a.Children.only(r),i))},e}(a.a.Component);function y(){}m.contextType=l.a,m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:y,onEntering:y,onEntered:y,onExit:y,onExiting:y,onExited:y},m.UNMOUNTED=f,m.EXITED=h,m.ENTERING=d,m.ENTERED=p,m.EXITING=g;e.a=m},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";var n=r(314),i=r(757),o=r(153);const a=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.b;const e=Object.keys(t).reduce(((e,r)=>(t[r].filterProps.forEach((n=>{e[n]=t[r]})),e)),{});function r(t,r,n){const i={[t]:r,theme:n},o=e[t];return o?o(i):{[t]:r}}return function t(i){const{sx:a,theme:s={}}=i||{};if(!a)return null;function u(i){let a=i;if("function"===typeof i)a=i(s);else if("object"!==typeof i)return i;if(!a)return null;const u=Object(o.a)(s.breakpoints),c=Object.keys(u);let l=u;return Object.keys(a).forEach((i=>{const u=(c=a[i],f=s,"function"===typeof c?c(f):c);var c,f;if(null!==u&&void 0!==u)if("object"===typeof u)if(e[i])l=Object(n.a)(l,r(i,u,s));else{const e=Object(o.b)({theme:s},u,(t=>({[i]:t})));!function(){for(var t=arguments.length,e=new Array(t),r=0;rt.concat(Object.keys(e))),[]),i=new Set(n);return e.every((t=>i.size===Object.keys(t).length))}(e,u)?l=Object(n.a)(l,e):l[i]=t({sx:u,theme:s})}else l=Object(n.a)(l,r(i,u,s))})),Object(o.c)(c,l)}return Array.isArray(a)?a.map(u):u(a)}}();a.filterProps=["sx"],e.a=a},function(t,e,r){"use strict";r.d(e,"c",(function(){return u})),r.d(e,"a",(function(){return c})),r.d(e,"b",(function(){return l})),r.d(e,"d",(function(){return f}));var n=r(760);function i(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,t),r)}function o(t){if(t.type)return t;if("#"===t.charAt(0))return o(function(t){t=t.slice(1);const e=new RegExp(".{1,".concat(t.length>=6?2:1,"}"),"g");let r=t.match(e);return r&&1===r[0].length&&(r=r.map((t=>t+t))),r?"rgb".concat(4===r.length?"a":"","(").concat(r.map(((t,e)=>e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3)).join(", "),")"):""}(t));const e=t.indexOf("("),r=t.substring(0,e);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error(Object(n.a)(9,t));let i,a=t.substring(e+1,t.length-1);if("color"===r){if(a=a.split(" "),i=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error(Object(n.a)(10,i))}else a=a.split(",");return a=a.map((t=>parseFloat(t))),{type:r,values:a,colorSpace:i}}function a(t){const{type:e,colorSpace:r}=t;let{values:n}=t;return-1!==e.indexOf("rgb")?n=n.map(((t,e)=>e<3?parseInt(t,10):t)):-1!==e.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),n=-1!==e.indexOf("color")?"".concat(r," ").concat(n.join(" ")):"".concat(n.join(", ")),"".concat(e,"(").concat(n,")")}function s(t){let e="hsl"===(t=o(t)).type?o(function(t){t=o(t);const{values:e}=t,r=e[0],n=e[1]/100,i=e[2]/100,s=n*Math.min(i,1-i),u=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+r/30)%12;return i-s*Math.max(Math.min(e-3,9-e,1),-1)};let c="rgb";const l=[Math.round(255*u(0)),Math.round(255*u(8)),Math.round(255*u(4))];return"hsla"===t.type&&(c+="a",l.push(e[3])),a({type:c,values:l})}(t)).values:t.values;return e=e.map((e=>("color"!==t.type&&(e/=255),e<=.03928?e/12.92:((e+.055)/1.055)**2.4))),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function u(t,e){const r=s(t),n=s(e);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function c(t,e){return t=o(t),e=i(e),"rgb"!==t.type&&"hsl"!==t.type||(t.type+="a"),"color"===t.type?t.values[3]="/".concat(e):t.values[3]=e,a(t)}function l(t,e){if(t=o(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]*=1-e;else if(-1!==t.type.indexOf("rgb")||-1!==t.type.indexOf("color"))for(let r=0;r<3;r+=1)t.values[r]*=1-e;return a(t)}function f(t,e){if(t=o(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*e;else if(-1!==t.type.indexOf("rgb"))for(let r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*e;else if(-1!==t.type.indexOf("color"))for(let r=0;r<3;r+=1)t.values[r]+=(1-t.values[r])*e;return a(t)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(33);function i(t,e){const r=Object(n.a)({},e);return Object.keys(t).forEach((e=>{void 0===r[e]&&(r[e]=t[e])})),r}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c}));var n=r(16),i=r(56),o=r(1354);const a=new i.a(o.a);const s=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof t)return t;throw new Error("unable to locate global object")}();let u=s.crypto||s.msCrypto;function c(t){(t<=0||t>1024||t%1||t!=t)&&a.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return u.getRandomValues(e),Object(n.a)(e)}u&&u.getRandomValues||(a.warn("WARNING: Missing strong random number source"),u={getRandomValues:function(t){return a.throwError("no secure random source avaialble",i.a.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(44))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c}));var n=r(21),i=r(78),o=r(1373);const a=new i.a(o.a);const s=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof t)return t;throw new Error("unable to locate global object")}();let u=s.crypto||s.msCrypto;function c(t){(t<=0||t>1024||t%1||t!=t)&&a.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return u.getRandomValues(e),Object(n.a)(e)}u&&u.getRandomValues||(a.warn("WARNING: Missing strong random number source"),u={getRandomValues:function(t){return a.throwError("no secure random source avaialble",i.a.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(44))},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return o}));var n=r(1);function i(t){t=atob(t);const e=[];for(let r=0;r1024||t%1||t!=t)&&a.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return u.getRandomValues(e),Object(n.a)(e)}u&&u.getRandomValues||(a.warn("WARNING: Missing strong random number source"),u={getRandomValues:function(t){return a.throwError("no secure random source avaialble",i.b.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(44))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c}));var n=r(1),i=r(5),o=r(1394);const a=new i.b(o.a);const s=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof t)return t;throw new Error("unable to locate global object")}();let u=s.crypto||s.msCrypto;function c(t){(t<=0||t>1024||t%1||t!=t)&&a.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return u.getRandomValues(e),Object(n.a)(e)}u&&u.getRandomValues||(a.warn("WARNING: Missing strong random number source"),u={getRandomValues:function(t){return a.throwError("no secure random source avaialble",i.b.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(44))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c}));var n=r(1),i=r(5),o=r(1397);const a=new i.b(o.a);const s=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof t)return t;throw new Error("unable to locate global object")}();let u=s.crypto||s.msCrypto;function c(t){(t<=0||t>1024||t%1||t!=t)&&a.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return u.getRandomValues(e),Object(n.a)(e)}u&&u.getRandomValues||(a.warn("WARNING: Missing strong random number source"),u={getRandomValues:function(t){return a.throwError("no secure random source avaialble",i.b.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(44))},function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return o})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return s}));var n=r(234);const i=n.a.from(-1),o=n.a.from(0),a=n.a.from(1),s=n.a.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(153),s=r(193),u=r(3304),c=r(773),l=r(22),f=r(37),h=r(0);const d=["component","direction","spacing","divider","children"];function p(t,e){const r=o.Children.toArray(t).filter(Boolean);return r.reduce(((t,n,i)=>(t.push(n),i[e.root]})((t=>{let{ownerState:e,theme:r}=t,n=Object(i.a)({display:"flex"},Object(a.b)({theme:r},Object(a.d)({values:e.direction,breakpoints:r.breakpoints.values}),(t=>({flexDirection:t}))));if(e.spacing){const t=Object(s.a)(r),i=Object.keys(r.breakpoints.values).reduce(((t,r)=>(null==e.spacing[r]&&null==e.direction[r]||(t[r]=!0),t)),{}),o=Object(a.d)({values:e.direction,base:i}),u=Object(a.d)({values:e.spacing,base:i}),l=(r,n)=>{return{"& > :not(style) + :not(style)":{margin:0,["margin".concat((i=n?o[n]:e.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[i]))]:Object(s.d)(t,r)}};var i};n=Object(c.a)(n,Object(a.b)({theme:r},u,l))}return n})),m=o.forwardRef((function(t,e){const r=Object(f.a)({props:t,name:"MuiStack"}),o=Object(u.a)(r),{component:a="div",direction:s="column",spacing:c=0,divider:l,children:m}=o,y=Object(n.a)(o,d),b={direction:s,spacing:c};return Object(h.jsx)(g,Object(i.a)({as:a,ownerState:b,ref:e},y,{children:l?p(m,l):m}))}));e.a=m},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(1450);function i(t){return Object(n.a)(t).defaultView||window}},function(t,e,r){"use strict";function n(t){let e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function n(){for(var n=arguments.length,i=new Array(n),o=0;o{t.apply(this,i)}),r)}return n.clear=()=>{clearTimeout(e)},n}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";function n(){for(var t=arguments.length,e=new Array(t),r=0;rnull==e?t:function(){for(var r=arguments.length,n=new Array(r),i=0;i{}))}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";var n=r(4),i=r(396),o=r(983),a=r(614),s=r(606);const u=n.forwardRef((function(t,e){const{children:r,container:u,disablePortal:c=!1}=t,[l,f]=n.useState(null),h=Object(o.a)(n.isValidElement(r)?r.ref:null,e);return Object(a.a)((()=>{c||f(function(t){return"function"===typeof t?t():t}(u)||document.body)}),[u,c]),Object(a.a)((()=>{if(l&&!c)return Object(s.a)(e,l),()=>{Object(s.a)(e,null)}}),[e,l,c]),c?n.isValidElement(r)?n.cloneElement(r,{ref:h}):r:l?i.createPortal(r,l):l}));e.a=u},function(t,e,r){"use strict";var n=r(10),i=r(28),o=r(4),a=r(3312),s=r(280),u=r(401),c=r(104),l=r(0);const f=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function h(t){return"scale(".concat(t,", ").concat(t**2,")")}const d={entering:{opacity:1,transform:h(1)},entered:{opacity:1,transform:"none"}},p="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)[4-9]/i.test(navigator.userAgent),g=o.forwardRef((function(t,e){const{addEndListener:r,appear:g=!0,children:m,easing:y,in:b,onEnter:v,onEntered:A,onEntering:w,onExit:_,onExited:E,onExiting:I,style:S,timeout:M="auto",TransitionComponent:C=a.a}=t,k=Object(i.a)(t,f),x=o.useRef(),B=o.useRef(),O=Object(s.a)(),T=o.useRef(null),R=Object(c.a)(m.ref,e),P=Object(c.a)(T,R),N=t=>e=>{if(t){const r=T.current;void 0===e?t(r):t(r,e)}},j=N(w),D=N(((t,e)=>{Object(u.b)(t);const{duration:r,delay:n,easing:i}=Object(u.a)({style:S,timeout:M,easing:y},{mode:"enter"});let o;"auto"===M?(o=O.transitions.getAutoHeightDuration(t.clientHeight),B.current=o):o=r,t.style.transition=[O.transitions.create("opacity",{duration:o,delay:n}),O.transitions.create("transform",{duration:p?o:.666*o,delay:n,easing:i})].join(","),v&&v(t,e)})),L=N(A),F=N(I),U=N((t=>{const{duration:e,delay:r,easing:n}=Object(u.a)({style:S,timeout:M,easing:y},{mode:"exit"});let i;"auto"===M?(i=O.transitions.getAutoHeightDuration(t.clientHeight),B.current=i):i=e,t.style.transition=[O.transitions.create("opacity",{duration:i,delay:r}),O.transitions.create("transform",{duration:p?i:.666*i,delay:p?r:r||.333*i,easing:n})].join(","),t.style.opacity=0,t.style.transform=h(.75),_&&_(t)})),Q=N(E);return o.useEffect((()=>()=>{clearTimeout(x.current)}),[]),Object(l.jsx)(C,Object(n.a)({appear:g,in:b,nodeRef:T,onEnter:D,onEntered:L,onEntering:j,onExit:U,onExited:Q,onExiting:F,addEndListener:t=>{"auto"===M&&(x.current=setTimeout(t,B.current||0)),r&&r(T.current,t)},timeout:"auto"===M?null:M},k,{children:(t,e)=>o.cloneElement(m,Object(n.a)({style:Object(n.a)({opacity:0,transform:h(.75),visibility:"exited"!==t||b?void 0:"hidden"},d[t],S,m.props.style),ref:P},e))}))}));g.muiSupportAuto=!0,e.a=g},function(t,e,r){"use strict";e.a={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#90a4ae",background:"#fafafa",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#90a4ae",background:"#fafafa",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"]::-moz-selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"] ::-moz-selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"] ::-moz-selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"]::selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"]::selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"] ::selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"] ::selection':{background:"#cceae7",color:"#263238"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#f76d47"},".language-sass > code":{color:"#f76d47"},".language-scss > code":{color:"#f76d47"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#7c4dff"},"attr-name":{color:"#39adb5"},"attr-value":{color:"#f6a434"},attribute:{color:"#f6a434"},boolean:{color:"#7c4dff"},builtin:{color:"#39adb5"},cdata:{color:"#39adb5"},char:{color:"#39adb5"},class:{color:"#39adb5"},"class-name":{color:"#6182b8"},comment:{color:"#aabfc9"},constant:{color:"#7c4dff"},deleted:{color:"#e53935"},doctype:{color:"#aabfc9"},entity:{color:"#e53935"},function:{color:"#7c4dff"},hexcode:{color:"#f76d47"},id:{color:"#7c4dff",fontWeight:"bold"},important:{color:"#7c4dff",fontWeight:"bold"},inserted:{color:"#39adb5"},keyword:{color:"#7c4dff"},number:{color:"#f76d47"},operator:{color:"#39adb5"},prolog:{color:"#aabfc9"},property:{color:"#39adb5"},"pseudo-class":{color:"#f6a434"},"pseudo-element":{color:"#f6a434"},punctuation:{color:"#39adb5"},regex:{color:"#6182b8"},selector:{color:"#e53935"},string:{color:"#f6a434"},symbol:{color:"#7c4dff"},tag:{color:"#e53935"},unit:{color:"#f76d47"},url:{color:"#e53935"},variable:{color:"#e53935"}}},function(t,e,r){"use strict";e.a={'code[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#2b2b2b"},'pre[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},':not(pre) > code[class*="language-"]':{background:"#2b2b2b",padding:".1em",borderRadius:".3em"},comment:{color:"#808080"},prolog:{color:"#808080"},cdata:{color:"#808080"},delimiter:{color:"#cc7832"},boolean:{color:"#cc7832"},keyword:{color:"#cc7832"},selector:{color:"#cc7832"},important:{color:"#cc7832"},atrule:{color:"#cc7832"},operator:{color:"#a9b7c6"},punctuation:{color:"#a9b7c6"},"attr-name":{color:"#a9b7c6"},tag:{color:"#e8bf6a"},"tag.punctuation":{color:"#e8bf6a"},doctype:{color:"#e8bf6a"},builtin:{color:"#e8bf6a"},entity:{color:"#6897bb"},number:{color:"#6897bb"},symbol:{color:"#6897bb"},property:{color:"#9876aa"},constant:{color:"#9876aa"},variable:{color:"#9876aa"},string:{color:"#6a8759"},char:{color:"#6a8759"},"attr-value":{color:"#a5c261"},"attr-value.punctuation":{color:"#a5c261"},"attr-value.punctuation:first-child":{color:"#a9b7c6"},url:{color:"#287bde",textDecoration:"underline"},function:{color:"#ffc66d"},regex:{background:"#364135"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#294436"},deleted:{background:"#484a4a"},"code.language-css .token.property":{color:"#a9b7c6"},"code.language-css .token.property + .token.punctuation":{color:"#a9b7c6"},"code.language-css .token.id":{color:"#ffc66d"},"code.language-css .token.selector > .token.class":{color:"#ffc66d"},"code.language-css .token.selector > .token.attribute":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-class":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-element":{color:"#ffc66d"}}},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(22),c=r(37),l=r(1451),f=r(215),h=r(0);const d=["className"],p=Object(u.a)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,"flex-start"===r.alignItems&&e.alignItemsFlexStart]}})((t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===r.alignItems&&{marginTop:8})})),g=o.forwardRef((function(t,e){const r=Object(c.a)({props:t,name:"MuiListItemIcon"}),{className:u}=r,g=Object(n.a)(r,d),m=o.useContext(f.a),y=Object(i.a)({},r,{alignItems:m.alignItems}),b=(t=>{const{alignItems:e,classes:r}=t,n={root:["root","flex-start"===e&&"alignItemsFlexStart"]};return Object(s.a)(n,l.b,r)})(y);return Object(h.jsx)(p,Object(i.a)({className:Object(a.default)(b.root,u),ownerState:y,ref:e},g))}));e.a=g},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(774),c=r(215),l=r(37),f=r(22),h=r(771),d=r(0);const p=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],g=Object(f.a)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{["& .".concat(h.a.primary)]:e.primary},{["& .".concat(h.a.secondary)]:e.secondary},e.root,r.inset&&e.inset,r.primary&&r.secondary&&e.multiline,r.dense&&e.dense]}})((t=>{let{ownerState:e}=t;return Object(i.a)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})})),m=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiListItemText"}),{children:f,className:m,disableTypography:y=!1,inset:b=!1,primary:v,primaryTypographyProps:A,secondary:w,secondaryTypographyProps:_}=r,E=Object(n.a)(r,p),{dense:I}=o.useContext(c.a);let S=null!=v?v:f,M=w;const C=Object(i.a)({},r,{disableTypography:y,inset:b,primary:!!S,secondary:!!M,dense:I}),k=(t=>{const{classes:e,inset:r,primary:n,secondary:i,dense:o}=t,a={root:["root",r&&"inset",o&&"dense",n&&i&&"multiline"],primary:["primary"],secondary:["secondary"]};return Object(s.a)(a,h.b,e)})(C);return null==S||S.type===u.a||y||(S=Object(d.jsx)(u.a,Object(i.a)({variant:I?"body2":"body1",className:k.primary,component:"span",display:"block"},A,{children:S}))),null==M||M.type===u.a||y||(M=Object(d.jsx)(u.a,Object(i.a)({variant:"body2",className:k.secondary,color:"text.secondary",display:"block"},_,{children:M}))),Object(d.jsxs)(g,Object(i.a)({className:Object(a.default)(k.root,m),ownerState:C,ref:e},E,{children:[S,M]}))}));e.a=m},function(t,e,r){"use strict";var n=r(10),i=r(4),o=r(37),a=r(3305),s=r(0);const u=(t,e)=>Object(n.a)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&{colorScheme:t.palette.mode}),c=t=>Object(n.a)({color:t.palette.text.primary},t.typography.body1,{backgroundColor:t.palette.background.default,"@media print":{backgroundColor:t.palette.common.white}});e.a=function(t){const e=Object(o.a)({props:t,name:"MuiCssBaseline"}),{children:r,enableColorScheme:l=!1}=e;return Object(s.jsxs)(i.Fragment,{children:[Object(s.jsx)(a.a,{styles:t=>function(t){var e,r;let i={html:u(t,arguments.length>1&&void 0!==arguments[1]&&arguments[1]),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:Object(n.a)({margin:0},c(t),{"&::backdrop":{backgroundColor:t.palette.background.default}})};const o=null==(e=t.components)||null==(r=e.MuiCssBaseline)?void 0:r.styleOverrides;return o&&(i=[i,o]),i}(t,l)}),r]})}},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(33),c=r(752);function l(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return Object(c.a)(t)?e:Object(u.a)({},e,{ownerState:Object(u.a)({},e.ownerState,r)})}var f=r(3414),h=r(22),d=r(280),p=r(37),g=r(36),m=r(3428),y=r(82),b=r(983),v=r(614),A=r(1450);function w(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function _(t){return t instanceof w(t).Element||t instanceof Element}function E(t){return t instanceof w(t).HTMLElement||t instanceof HTMLElement}function I(t){return"undefined"!==typeof ShadowRoot&&(t instanceof w(t).ShadowRoot||t instanceof ShadowRoot)}var S=Math.max,M=Math.min,C=Math.round;function k(t,e){void 0===e&&(e=!1);var r=t.getBoundingClientRect(),n=1,i=1;if(E(t)&&e){var o=t.offsetHeight,a=t.offsetWidth;a>0&&(n=C(r.width)/a||1),o>0&&(i=C(r.height)/o||1)}return{width:r.width/n,height:r.height/i,top:r.top/i,right:r.right/n,bottom:r.bottom/i,left:r.left/n,x:r.left/n,y:r.top/i}}function x(t){var e=w(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function B(t){return t?(t.nodeName||"").toLowerCase():null}function O(t){return((_(t)?t.ownerDocument:t.document)||window.document).documentElement}function T(t){return k(O(t)).left+x(t).scrollLeft}function R(t){return w(t).getComputedStyle(t)}function P(t){var e=R(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function N(t,e,r){void 0===r&&(r=!1);var n=E(e),i=E(e)&&function(t){var e=t.getBoundingClientRect(),r=C(e.width)/t.offsetWidth||1,n=C(e.height)/t.offsetHeight||1;return 1!==r||1!==n}(e),o=O(e),a=k(t,i),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(n||!n&&!r)&&(("body"!==B(e)||P(o))&&(s=function(t){return t!==w(t)&&E(t)?{scrollLeft:(e=t).scrollLeft,scrollTop:e.scrollTop}:x(t);var e}(e)),E(e)?((u=k(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):o&&(u.x=T(o))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function j(t){var e=k(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function D(t){return"html"===B(t)?t:t.assignedSlot||t.parentNode||(I(t)?t.host:null)||O(t)}function L(t){return["html","body","#document"].indexOf(B(t))>=0?t.ownerDocument.body:E(t)&&P(t)?t:L(D(t))}function F(t,e){var r;void 0===e&&(e=[]);var n=L(t),i=n===(null==(r=t.ownerDocument)?void 0:r.body),o=w(n),a=i?[o].concat(o.visualViewport||[],P(n)?n:[]):n,s=e.concat(a);return i?s:s.concat(F(D(a)))}function U(t){return["table","td","th"].indexOf(B(t))>=0}function Q(t){return E(t)&&"fixed"!==R(t).position?t.offsetParent:null}function G(t){for(var e=w(t),r=Q(t);r&&U(r)&&"static"===R(r).position;)r=Q(r);return r&&("html"===B(r)||"body"===B(r)&&"static"===R(r).position)?e:r||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&E(t)&&"fixed"===R(t).position)return null;var r=D(t);for(I(r)&&(r=r.host);E(r)&&["html","body"].indexOf(B(r))<0;){var n=R(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(t)||e}var H="top",z="bottom",q="right",K="left",V="auto",W=[H,z,q,K],J="start",Y="end",X="clippingParents",Z="viewport",$="popper",tt="reference",et=W.reduce((function(t,e){return t.concat([e+"-"+J,e+"-"+Y])}),[]),rt=[].concat(W,[V]).reduce((function(t,e){return t.concat([e,e+"-"+J,e+"-"+Y])}),[]),nt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function it(t){var e=new Map,r=new Set,n=[];function i(t){r.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!r.has(t)){var n=e.get(t);n&&i(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){r.has(t.name)||i(t)})),n}function ot(t){var e;return function(){return e||(e=new Promise((function(r){Promise.resolve().then((function(){e=void 0,r(t())}))}))),e}}var at={placement:"bottom",modifiers:[],strategy:"absolute"};function st(){for(var t=arguments.length,e=new Array(t),r=0;r=0?"x":"y"}function dt(t){var e,r=t.reference,n=t.element,i=t.placement,o=i?lt(i):null,a=i?ft(i):null,s=r.x+r.width/2-n.width/2,u=r.y+r.height/2-n.height/2;switch(o){case H:e={x:s,y:r.y-n.height};break;case z:e={x:s,y:r.y+r.height};break;case q:e={x:r.x+r.width,y:u};break;case K:e={x:r.x-n.width,y:u};break;default:e={x:r.x,y:r.y}}var c=o?ht(o):null;if(null!=c){var l="y"===c?"height":"width";switch(a){case J:e[c]=e[c]-(r[l]/2-n[l]/2);break;case Y:e[c]=e[c]+(r[l]/2-n[l]/2)}}return e}var pt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function gt(t){var e,r=t.popper,n=t.popperRect,i=t.placement,o=t.variation,a=t.offsets,s=t.position,u=t.gpuAcceleration,c=t.adaptive,l=t.roundOffsets,f=t.isFixed,h=a.x,d=void 0===h?0:h,p=a.y,g=void 0===p?0:p,m="function"===typeof l?l({x:d,y:g}):{x:d,y:g};d=m.x,g=m.y;var y=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),v=K,A=H,_=window;if(c){var E=G(r),I="clientHeight",S="clientWidth";if(E===w(r)&&"static"!==R(E=O(r)).position&&"absolute"===s&&(I="scrollHeight",S="scrollWidth"),i===H||(i===K||i===q)&&o===Y)A=z,g-=(f&&E===_&&_.visualViewport?_.visualViewport.height:E[I])-n.height,g*=u?1:-1;if(i===K||(i===H||i===z)&&o===Y)v=q,d-=(f&&E===_&&_.visualViewport?_.visualViewport.width:E[S])-n.width,d*=u?1:-1}var M,k=Object.assign({position:s},c&&pt),x=!0===l?function(t){var e=t.x,r=t.y,n=window.devicePixelRatio||1;return{x:C(e*n)/n||0,y:C(r*n)/n||0}}({x:d,y:g}):{x:d,y:g};return d=x.x,g=x.y,u?Object.assign({},k,((M={})[A]=b?"0":"",M[v]=y?"0":"",M.transform=(_.devicePixelRatio||1)<=1?"translate("+d+"px, "+g+"px)":"translate3d("+d+"px, "+g+"px, 0)",M)):Object.assign({},k,((e={})[A]=b?g+"px":"",e[v]=y?d+"px":"",e.transform="",e))}var mt={left:"right",right:"left",bottom:"top",top:"bottom"};function yt(t){return t.replace(/left|right|bottom|top/g,(function(t){return mt[t]}))}var bt={start:"end",end:"start"};function vt(t){return t.replace(/start|end/g,(function(t){return bt[t]}))}function At(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&I(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function wt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function _t(t,e){return e===Z?wt(function(t){var e=w(t),r=O(t),n=e.visualViewport,i=r.clientWidth,o=r.clientHeight,a=0,s=0;return n&&(i=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,s=n.offsetTop)),{width:i,height:o,x:a+T(t),y:s}}(t)):_(e)?function(t){var e=k(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):wt(function(t){var e,r=O(t),n=x(t),i=null==(e=t.ownerDocument)?void 0:e.body,o=S(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=S(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+T(t),u=-n.scrollTop;return"rtl"===R(i||r).direction&&(s+=S(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}(O(t)))}function Et(t,e,r){var n="clippingParents"===e?function(t){var e=F(D(t)),r=["absolute","fixed"].indexOf(R(t).position)>=0&&E(t)?G(t):t;return _(r)?e.filter((function(t){return _(t)&&At(t,r)&&"body"!==B(t)})):[]}(t):[].concat(e),i=[].concat(n,[r]),o=i[0],a=i.reduce((function(e,r){var n=_t(t,r);return e.top=S(n.top,e.top),e.right=M(n.right,e.right),e.bottom=M(n.bottom,e.bottom),e.left=S(n.left,e.left),e}),_t(t,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function It(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function St(t,e){return e.reduce((function(e,r){return e[r]=t,e}),{})}function Mt(t,e){void 0===e&&(e={});var r=e,n=r.placement,i=void 0===n?t.placement:n,o=r.boundary,a=void 0===o?X:o,s=r.rootBoundary,u=void 0===s?Z:s,c=r.elementContext,l=void 0===c?$:c,f=r.altBoundary,h=void 0!==f&&f,d=r.padding,p=void 0===d?0:d,g=It("number"!==typeof p?p:St(p,W)),m=l===$?tt:$,y=t.rects.popper,b=t.elements[h?m:l],v=Et(_(b)?b:b.contextElement||O(t.elements.popper),a,u),A=k(t.elements.reference),w=dt({reference:A,element:y,strategy:"absolute",placement:i}),E=wt(Object.assign({},y,w)),I=l===$?E:A,S={top:v.top-I.top+g.top,bottom:I.bottom-v.bottom+g.bottom,left:v.left-I.left+g.left,right:I.right-v.right+g.right},M=t.modifiersData.offset;if(l===$&&M){var C=M[i];Object.keys(S).forEach((function(t){var e=[q,z].indexOf(t)>=0?1:-1,r=[H,z].indexOf(t)>=0?"y":"x";S[t]+=C[r]*e}))}return S}function Ct(t,e,r){return S(t,M(e,r))}function kt(t,e,r){return void 0===r&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function xt(t){return[H,q,z,K].some((function(e){return t[e]>=0}))}var Bt=ut({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,o=void 0===i||i,a=n.resize,s=void 0===a||a,u=w(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",r.update,ct)})),s&&u.addEventListener("resize",r.update,ct),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",r.update,ct)})),s&&u.removeEventListener("resize",r.update,ct)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,r=t.name;e.modifiersData[r]=dt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=void 0===n||n,o=r.adaptive,a=void 0===o||o,s=r.roundOffsets,u=void 0===s||s,c={placement:lt(e.placement),variation:ft(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,gt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:u})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,gt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var r=e.styles[t]||{},n=e.attributes[t]||{},i=e.elements[t];E(i)&&B(i)&&(Object.assign(i.style,r),Object.keys(n).forEach((function(t){var e=n[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],i=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:r[t]).reduce((function(t,e){return t[e]="",t}),{});E(n)&&B(n)&&(Object.assign(n.style,o),Object.keys(i).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,r=t.options,n=t.name,i=r.offset,o=void 0===i?[0,0]:i,a=rt.reduce((function(t,r){return t[r]=function(t,e,r){var n=lt(t),i=[K,H].indexOf(n)>=0?-1:1,o="function"===typeof r?r(Object.assign({},e,{placement:t})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[K,q].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}(r,e.rects,o),t}),{}),s=a[e.placement],u=s.x,c=s.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=r.mainAxis,o=void 0===i||i,a=r.altAxis,s=void 0===a||a,u=r.fallbackPlacements,c=r.padding,l=r.boundary,f=r.rootBoundary,h=r.altBoundary,d=r.flipVariations,p=void 0===d||d,g=r.allowedAutoPlacements,m=e.options.placement,y=lt(m),b=u||(y===m||!p?[yt(m)]:function(t){if(lt(t)===V)return[];var e=yt(t);return[vt(t),e,vt(e)]}(m)),v=[m].concat(b).reduce((function(t,r){return t.concat(lt(r)===V?function(t,e){void 0===e&&(e={});var r=e,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,u=r.allowedAutoPlacements,c=void 0===u?rt:u,l=ft(n),f=l?s?et:et.filter((function(t){return ft(t)===l})):W,h=f.filter((function(t){return c.indexOf(t)>=0}));0===h.length&&(h=f);var d=h.reduce((function(e,r){return e[r]=Mt(t,{placement:r,boundary:i,rootBoundary:o,padding:a})[lt(r)],e}),{});return Object.keys(d).sort((function(t,e){return d[t]-d[e]}))}(e,{placement:r,boundary:l,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:g}):r)}),[]),A=e.rects.reference,w=e.rects.popper,_=new Map,E=!0,I=v[0],S=0;S=0,B=x?"width":"height",O=Mt(e,{placement:M,boundary:l,rootBoundary:f,altBoundary:h,padding:c}),T=x?k?q:K:k?z:H;A[B]>w[B]&&(T=yt(T));var R=yt(T),P=[];if(o&&P.push(O[C]<=0),s&&P.push(O[T]<=0,O[R]<=0),P.every((function(t){return t}))){I=M,E=!1;break}_.set(M,P)}if(E)for(var N=function(t){var e=v.find((function(e){var r=_.get(e);if(r)return r.slice(0,t).every((function(t){return t}))}));if(e)return I=e,"break"},j=p?3:1;j>0;j--){if("break"===N(j))break}e.placement!==I&&(e.modifiersData[n]._skip=!0,e.placement=I,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,n=t.name,i=r.mainAxis,o=void 0===i||i,a=r.altAxis,s=void 0!==a&&a,u=r.boundary,c=r.rootBoundary,l=r.altBoundary,f=r.padding,h=r.tether,d=void 0===h||h,p=r.tetherOffset,g=void 0===p?0:p,m=Mt(e,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),y=lt(e.placement),b=ft(e.placement),v=!b,A=ht(y),w="x"===A?"y":"x",_=e.modifiersData.popperOffsets,E=e.rects.reference,I=e.rects.popper,C="function"===typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,k="number"===typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),x=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,B={x:0,y:0};if(_){if(o){var O,T="y"===A?H:K,R="y"===A?z:q,P="y"===A?"height":"width",N=_[A],D=N+m[T],L=N-m[R],F=d?-I[P]/2:0,U=b===J?E[P]:I[P],Q=b===J?-I[P]:-E[P],V=e.elements.arrow,W=d&&V?j(V):{width:0,height:0},Y=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},X=Y[T],Z=Y[R],$=Ct(0,E[P],W[P]),tt=v?E[P]/2-F-$-X-k.mainAxis:U-$-X-k.mainAxis,et=v?-E[P]/2+F+$+Z+k.mainAxis:Q+$+Z+k.mainAxis,rt=e.elements.arrow&&G(e.elements.arrow),nt=rt?"y"===A?rt.clientTop||0:rt.clientLeft||0:0,it=null!=(O=null==x?void 0:x[A])?O:0,ot=N+et-it,at=Ct(d?M(D,N+tt-it-nt):D,N,d?S(L,ot):L);_[A]=at,B[A]=at-N}if(s){var st,ut="x"===A?H:K,ct="x"===A?z:q,dt=_[w],pt="y"===w?"height":"width",gt=dt+m[ut],mt=dt-m[ct],yt=-1!==[H,K].indexOf(y),bt=null!=(st=null==x?void 0:x[w])?st:0,vt=yt?gt:dt-E[pt]-I[pt]-bt+k.altAxis,At=yt?dt+E[pt]+I[pt]-bt-k.altAxis:mt,wt=d&&yt?function(t,e,r){var n=Ct(t,e,r);return n>r?r:n}(vt,dt,At):Ct(d?vt:gt,dt,d?At:mt);_[w]=wt,B[w]=wt-dt}e.modifiersData[n]=B}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,r=t.state,n=t.name,i=t.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=lt(r.placement),u=ht(s),c=[K,q].indexOf(s)>=0?"height":"width";if(o&&a){var l=function(t,e){return It("number"!==typeof(t="function"===typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:St(t,W))}(i.padding,r),f=j(o),h="y"===u?H:K,d="y"===u?z:q,p=r.rects.reference[c]+r.rects.reference[u]-a[u]-r.rects.popper[c],g=a[u]-r.rects.reference[u],m=G(o),y=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,b=p/2-g/2,v=l[h],A=y-f[c]-l[d],w=y/2-f[c]/2+b,_=Ct(v,w,A),E=u;r.modifiersData[n]=((e={})[E]=_,e.centerOffset=_-w,e)}},effect:function(t){var e=t.state,r=t.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!==typeof n||(n=e.elements.popper.querySelector(n)))&&At(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=Mt(e,{elementContext:"reference"}),s=Mt(e,{altBoundary:!0}),u=kt(a,n),c=kt(s,i,o),l=xt(u),f=xt(c);e.modifiersData[r]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),Ot=r(3427),Tt=r(0);const Rt=["anchorEl","children","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","TransitionProps"],Pt=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"];function Nt(t){return"function"===typeof t?t():t}const jt={},Dt=o.forwardRef((function(t,e){const{anchorEl:r,children:n,direction:i,disablePortal:a,modifiers:s,open:c,placement:l,popperOptions:f,popperRef:h,TransitionProps:d}=t,p=Object(y.a)(t,Rt),g=o.useRef(null),m=Object(b.a)(g,e),A=o.useRef(null),w=Object(b.a)(A,h),_=o.useRef(w);Object(v.a)((()=>{_.current=w}),[w]),o.useImperativeHandle(h,(()=>A.current),[]);const E=function(t,e){if("ltr"===e)return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}(l,i),[I,S]=o.useState(E);o.useEffect((()=>{A.current&&A.current.forceUpdate()})),Object(v.a)((()=>{if(!r||!c)return;Nt(r);let t=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:t=>{let{state:e}=t;S(e.placement)}}];null!=s&&(t=t.concat(s)),f&&null!=f.modifiers&&(t=t.concat(f.modifiers));const e=Bt(Nt(r),g.current,Object(u.a)({placement:E},f,{modifiers:t}));return _.current(e),()=>{e.destroy(),_.current(null)}}),[r,a,s,c,f,E]);const M={placement:I};return null!==d&&(M.TransitionProps=d),Object(Tt.jsx)("div",Object(u.a)({ref:m,role:"tooltip"},p,{children:"function"===typeof n?n(M):n}))}));var Lt=o.forwardRef((function(t,e){const{anchorEl:r,children:n,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:c=!1,modifiers:l,open:f,placement:h="bottom",popperOptions:d=jt,popperRef:p,style:g,transition:m=!1}=t,b=Object(y.a)(t,Pt),[v,w]=o.useState(!0);if(!c&&!f&&(!m||v))return null;const _=i||(r?Object(A.a)(Nt(r)).body:void 0);return Object(Tt.jsx)(Ot.a,{disablePortal:s,container:_,children:Object(Tt.jsx)(Dt,Object(u.a)({anchorEl:r,direction:a,disablePortal:s,modifiers:l,ref:e,open:m?!v:f,placement:h,popperOptions:d,popperRef:p},b,{style:Object(u.a)({position:"fixed",top:0,left:0,display:f||!c||m&&!v?null:"none"},g),TransitionProps:m?{in:f,onEnter:()=>{w(!1)},onExited:()=>{w(!0)}}:null,children:n}))})})),Ft=r(1349);const Ut=Object(h.a)(Lt,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({});var Qt=o.forwardRef((function(t,e){const r=Object(Ft.a)(),n=Object(p.a)({props:t,name:"MuiPopper"});return Object(Tt.jsx)(Ut,Object(i.a)({direction:null==r?void 0:r.direction},n,{ref:e}))})),Gt=r(455),Ht=r(104),zt=r(3308).a,qt=r(508),Kt=r(449),Vt=r(772),Wt=r(982);function Jt(t){return Object(Vt.a)("MuiTooltip",t)}var Yt=Object(Wt.a)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const Xt=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","title","TransitionComponent","TransitionProps"];const Zt=Object(h.a)(Qt,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.popper,!r.disableInteractive&&e.popperInteractive,r.arrow&&e.popperArrow,!r.open&&e.popperClose]}})((t=>{let{theme:e,ownerState:r,open:n}=t;return Object(i.a)({zIndex:e.zIndex.tooltip,pointerEvents:"none"},!r.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},r.arrow&&{['&[data-popper-placement*="bottom"] .'.concat(Yt.arrow)]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},['&[data-popper-placement*="top"] .'.concat(Yt.arrow)]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},['&[data-popper-placement*="right"] .'.concat(Yt.arrow)]:Object(i.a)({},r.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),['&[data-popper-placement*="left"] .'.concat(Yt.arrow)]:Object(i.a)({},r.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})})),$t=Object(h.a)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.tooltip,r.touch&&e.touch,r.arrow&&e.tooltipArrow,e["tooltipPlacement".concat(Object(g.a)(r.placement.split("-")[0]))]]}})((t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({backgroundColor:Object(f.a)(e.palette.grey[700],.92),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},r.arrow&&{position:"relative",margin:0},r.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat((n=16/14,Math.round(1e5*n)/1e5),"em"),fontWeight:e.typography.fontWeightRegular},{[".".concat(Yt.popper,'[data-popper-placement*="left"] &')]:Object(i.a)({transformOrigin:"right center"},r.isRtl?Object(i.a)({marginLeft:"14px"},r.touch&&{marginLeft:"24px"}):Object(i.a)({marginRight:"14px"},r.touch&&{marginRight:"24px"})),[".".concat(Yt.popper,'[data-popper-placement*="right"] &')]:Object(i.a)({transformOrigin:"left center"},r.isRtl?Object(i.a)({marginRight:"14px"},r.touch&&{marginRight:"24px"}):Object(i.a)({marginLeft:"14px"},r.touch&&{marginLeft:"24px"})),[".".concat(Yt.popper,'[data-popper-placement*="top"] &')]:Object(i.a)({transformOrigin:"center bottom",marginBottom:"14px"},r.touch&&{marginBottom:"24px"}),[".".concat(Yt.popper,'[data-popper-placement*="bottom"] &')]:Object(i.a)({transformOrigin:"center top",marginTop:"14px"},r.touch&&{marginTop:"24px"})});var n})),te=Object(h.a)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})((t=>{let{theme:e}=t;return{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:Object(f.a)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}}));let ee=!1,re=null;function ne(t,e){return r=>{e&&e(r),t(r)}}const ie=o.forwardRef((function(t,e){var r,u,c,f,h,y;const b=Object(p.a)({props:t,name:"MuiTooltip"}),{arrow:v=!1,children:A,components:w={},componentsProps:_={},describeChild:E=!1,disableFocusListener:I=!1,disableHoverListener:S=!1,disableInteractive:M=!1,disableTouchListener:C=!1,enterDelay:k=100,enterNextDelay:x=0,enterTouchDelay:B=700,followCursor:O=!1,id:T,leaveDelay:R=0,leaveTouchDelay:P=1500,onClose:N,onOpen:j,open:D,placement:L="bottom",PopperComponent:F,PopperProps:U={},title:Q,TransitionComponent:G=m.a,TransitionProps:H}=b,z=Object(n.a)(b,Xt),q=Object(d.a)(),K="rtl"===q.direction,[V,W]=o.useState(),[J,Y]=o.useState(null),X=o.useRef(!1),Z=M||O,$=o.useRef(),tt=o.useRef(),et=o.useRef(),rt=o.useRef(),[nt,it]=Object(Kt.a)({controlled:D,default:!1,name:"Tooltip",state:"open"});let ot=nt;const at=zt(T),st=o.useRef(),ut=o.useCallback((()=>{void 0!==st.current&&(document.body.style.WebkitUserSelect=st.current,st.current=void 0),clearTimeout(rt.current)}),[]);o.useEffect((()=>()=>{clearTimeout($.current),clearTimeout(tt.current),clearTimeout(et.current),ut()}),[ut]);const ct=t=>{clearTimeout(re),ee=!0,it(!0),j&&!ot&&j(t)},lt=Object(Gt.a)((t=>{clearTimeout(re),re=setTimeout((()=>{ee=!1}),800+R),it(!1),N&&ot&&N(t),clearTimeout($.current),$.current=setTimeout((()=>{X.current=!1}),q.transitions.duration.shortest)})),ft=t=>{X.current&&"touchstart"!==t.type||(V&&V.removeAttribute("title"),clearTimeout(tt.current),clearTimeout(et.current),k||ee&&x?tt.current=setTimeout((()=>{ct(t)}),ee?x:k):ct(t))},ht=t=>{clearTimeout(tt.current),clearTimeout(et.current),et.current=setTimeout((()=>{lt(t)}),R)},{isFocusVisibleRef:dt,onBlur:pt,onFocus:gt,ref:mt}=Object(qt.a)(),[,yt]=o.useState(!1),bt=t=>{pt(t),!1===dt.current&&(yt(!1),ht(t))},vt=t=>{V||W(t.currentTarget),gt(t),!0===dt.current&&(yt(!0),ft(t))},At=t=>{X.current=!0;const e=A.props;e.onTouchStart&&e.onTouchStart(t)},wt=ft,_t=ht,Et=t=>{At(t),clearTimeout(et.current),clearTimeout($.current),ut(),st.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",rt.current=setTimeout((()=>{document.body.style.WebkitUserSelect=st.current,ft(t)}),B)},It=t=>{A.props.onTouchEnd&&A.props.onTouchEnd(t),ut(),clearTimeout(et.current),et.current=setTimeout((()=>{lt(t)}),P)};o.useEffect((()=>{if(ot)return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)};function t(t){"Escape"!==t.key&&"Esc"!==t.key||lt(t)}}),[lt,ot]);const St=Object(Ht.a)(W,e),Mt=Object(Ht.a)(mt,St),Ct=Object(Ht.a)(A.ref,Mt);""===Q&&(ot=!1);const kt=o.useRef({x:0,y:0}),xt=o.useRef(),Bt={},Ot="string"===typeof Q;E?(Bt.title=ot||!Ot||S?null:Q,Bt["aria-describedby"]=ot?at:null):(Bt["aria-label"]=Ot?Q:null,Bt["aria-labelledby"]=ot&&!Ot?at:null);const Rt=Object(i.a)({},Bt,z,A.props,{className:Object(a.default)(z.className,A.props.className),onTouchStart:At,ref:Ct},O?{onMouseMove:t=>{const e=A.props;e.onMouseMove&&e.onMouseMove(t),kt.current={x:t.clientX,y:t.clientY},xt.current&&xt.current.update()}}:{});const Pt={};C||(Rt.onTouchStart=Et,Rt.onTouchEnd=It),S||(Rt.onMouseOver=ne(wt,Rt.onMouseOver),Rt.onMouseLeave=ne(_t,Rt.onMouseLeave),Z||(Pt.onMouseOver=wt,Pt.onMouseLeave=_t)),I||(Rt.onFocus=ne(vt,Rt.onFocus),Rt.onBlur=ne(bt,Rt.onBlur),Z||(Pt.onFocus=vt,Pt.onBlur=bt));const Nt=o.useMemo((()=>{var t;let e=[{name:"arrow",enabled:Boolean(J),options:{element:J,padding:4}}];return null!=(t=U.popperOptions)&&t.modifiers&&(e=e.concat(U.popperOptions.modifiers)),Object(i.a)({},U.popperOptions,{modifiers:e})}),[J,U]),jt=Object(i.a)({},b,{isRtl:K,arrow:v,disableInteractive:Z,placement:L,PopperComponentProp:F,touch:X.current}),Dt=(t=>{const{classes:e,disableInteractive:r,arrow:n,touch:i,placement:o}=t,a={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",i&&"touch","tooltipPlacement".concat(Object(g.a)(o.split("-")[0]))],arrow:["arrow"]};return Object(s.a)(a,Jt,e)})(jt),Lt=null!=(r=w.Popper)?r:Zt,Ft=null!=(u=null!=(c=w.Transition)?c:G)?u:m.a,Ut=null!=(f=w.Tooltip)?f:$t,Vt=null!=(h=w.Arrow)?h:te,Wt=l(Lt,Object(i.a)({},U,_.popper),jt),Yt=l(Ft,Object(i.a)({},H,_.transition),jt),ie=l(Ut,Object(i.a)({},_.tooltip),jt),oe=l(Vt,Object(i.a)({},_.arrow),jt);return Object(Tt.jsxs)(o.Fragment,{children:[o.cloneElement(A,Rt),Object(Tt.jsx)(Lt,Object(i.a)({as:null!=F?F:Qt,placement:L,anchorEl:O?{getBoundingClientRect:()=>({top:kt.current.y,left:kt.current.x,right:kt.current.x,bottom:kt.current.y,width:0,height:0})}:V,popperRef:xt,open:!!V&&ot,id:at,transition:!0},Pt,Wt,{className:Object(a.default)(Dt.popper,null==U?void 0:U.className,null==(y=_.popper)?void 0:y.className),popperOptions:Nt,children:t=>{let{TransitionProps:e}=t;var r,n;return Object(Tt.jsx)(Ft,Object(i.a)({timeout:q.transitions.duration.shorter},e,Yt,{children:Object(Tt.jsxs)(Ut,Object(i.a)({},ie,{className:Object(a.default)(Dt.tooltip,null==(r=_.tooltip)?void 0:r.className),children:[Q,v?Object(Tt.jsx)(Vt,Object(i.a)({},oe,{className:Object(a.default)(Dt.arrow,null==(n=_.arrow)?void 0:n.className),ref:Y})):null]}))}))}}))]})}));e.a=ie},function(t,e,r){"use strict";var n=r(10),i=r(28),o=r(4),a=r(26),s=r(1464),u=r(3308),c=r(22),l=r(37),f=r(3452),h=r(773),d=r(207),p=r(772),g=r(982),m=r(613);function y(t){return Object(p.a)("MuiFilledInput",t)}var b=Object(n.a)({},m.a,Object(g.a)("MuiFilledInput",["root","underline","input"])),v=r(0);const A=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","type"],w=Object(c.a)(d.b,{shouldForwardProp:t=>Object(c.b)(t)||"classes"===t,name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[...Object(d.e)(t,e),!r.disableUnderline&&e.underline]}})((t=>{let{theme:e,ownerState:r}=t;const i="light"===e.palette.mode,o=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)";return Object(n.a)({position:"relative",backgroundColor:a,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:a}},["&.".concat(b.focused)]:{backgroundColor:a},["&.".concat(b.disabled)]:{backgroundColor:i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},!r.disableUnderline&&{"&:after":{borderBottom:"2px solid ".concat(e.palette[r.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(b.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(b.error,":after")]:{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(o),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(b.disabled,"):before")]:{borderBottom:"1px solid ".concat(e.palette.text.primary)},["&.".concat(b.disabled,":before")]:{borderBottomStyle:"dotted"}},r.startAdornment&&{paddingLeft:12},r.endAdornment&&{paddingRight:12},r.multiline&&Object(n.a)({padding:"25px 12px 8px"},"small"===r.size&&{paddingTop:21,paddingBottom:4},r.hiddenLabel&&{paddingTop:16,paddingBottom:17}))})),_=Object(c.a)(d.a,{name:"MuiFilledInput",slot:"Input",overridesResolver:d.d})((t=>{let{theme:e,ownerState:r}=t;return Object(n.a)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},"small"===r.size&&{paddingTop:21,paddingBottom:4},r.hiddenLabel&&{paddingTop:16,paddingBottom:17},r.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},r.startAdornment&&{paddingLeft:0},r.endAdornment&&{paddingRight:0},r.hiddenLabel&&"small"===r.size&&{paddingTop:8,paddingBottom:9})})),E=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiFilledInput"}),{components:o={},componentsProps:a,fullWidth:u=!1,inputComponent:c="input",multiline:f=!1,type:p="text"}=r,g=Object(i.a)(r,A),m=Object(n.a)({},r,{fullWidth:u,inputComponent:c,multiline:f,type:p}),b=(t=>{const{classes:e,disableUnderline:r}=t,i={root:["root",!r&&"underline"],input:["input"]},o=Object(s.a)(i,y,e);return Object(n.a)({},e,o)})(r),E={root:{ownerState:m},input:{ownerState:m}},I=a?Object(h.a)(a,E):E;return Object(v.jsx)(d.c,Object(n.a)({components:Object(n.a)({Root:w,Input:_},o),componentsProps:I,fullWidth:u,inputComponent:c,multiline:f,ref:e,type:p},g,{classes:b}))}));E.muiName="Input";var I,S=E;const M=["children","classes","className","label","notched"],C=Object(c.a)("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),k=Object(c.a)("legend")((t=>{let{ownerState:e,theme:r}=t;return Object(n.a)({float:"unset",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:r.transitions.create("width",{duration:150,easing:r.transitions.easing.easeOut})},e.withLabel&&Object(n.a)({display:"block",width:"auto",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:r.transitions.create("max-width",{duration:50,easing:r.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:r.transitions.create("max-width",{duration:100,easing:r.transitions.easing.easeOut,delay:50})}))}));var x=r(227),B=r(228);function O(t){return Object(p.a)("MuiOutlinedInput",t)}var T=Object(n.a)({},m.a,Object(g.a)("MuiOutlinedInput",["root","notchedOutline","input"]));const R=["components","fullWidth","inputComponent","label","multiline","notched","type"],P=Object(c.a)(d.b,{shouldForwardProp:t=>Object(c.b)(t)||"classes"===t,name:"MuiOutlinedInput",slot:"Root",overridesResolver:d.e})((t=>{let{theme:e,ownerState:r}=t;const i="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return Object(n.a)({position:"relative",borderRadius:e.shape.borderRadius,["&:hover .".concat(T.notchedOutline)]:{borderColor:e.palette.text.primary},"@media (hover: none)":{["&:hover .".concat(T.notchedOutline)]:{borderColor:i}},["&.".concat(T.focused," .").concat(T.notchedOutline)]:{borderColor:e.palette[r.color].main,borderWidth:2},["&.".concat(T.error," .").concat(T.notchedOutline)]:{borderColor:e.palette.error.main},["&.".concat(T.disabled," .").concat(T.notchedOutline)]:{borderColor:e.palette.action.disabled}},r.startAdornment&&{paddingLeft:14},r.endAdornment&&{paddingRight:14},r.multiline&&Object(n.a)({padding:"16.5px 14px"},"small"===r.size&&{padding:"8.5px 14px"}))})),N=Object(c.a)((function(t){const{className:e,label:r,notched:o}=t,a=Object(i.a)(t,M),s=null!=r&&""!==r,u=Object(n.a)({},t,{notched:o,withLabel:s});return Object(v.jsx)(C,Object(n.a)({"aria-hidden":!0,className:e,ownerState:u},a,{children:Object(v.jsx)(k,{ownerState:u,children:s?Object(v.jsx)("span",{children:r}):I||(I=Object(v.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})((t=>{let{theme:e}=t;return{borderColor:"light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}})),j=Object(c.a)(d.a,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:d.d})((t=>{let{theme:e,ownerState:r}=t;return Object(n.a)({padding:"16.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},"small"===r.size&&{padding:"8.5px 14px"},r.multiline&&{padding:0},r.startAdornment&&{paddingLeft:0},r.endAdornment&&{paddingRight:0})})),D=o.forwardRef((function(t,e){var r;const a=Object(l.a)({props:t,name:"MuiOutlinedInput"}),{components:u={},fullWidth:c=!1,inputComponent:f="input",label:h,multiline:p=!1,notched:g,type:m="text"}=a,y=Object(i.a)(a,R),b=(t=>{const{classes:e}=t,r=Object(s.a)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},O,e);return Object(n.a)({},e,r)})(a),A=Object(x.a)(),w=Object(B.a)({props:a,muiFormControl:A,states:["required"]});return Object(v.jsx)(d.c,Object(n.a)({components:Object(n.a)({Root:P,Input:j},u),renderSuffix:t=>Object(v.jsx)(N,{className:b.notchedOutline,label:null!=h&&""!==h&&w.required?r||(r=Object(v.jsxs)(o.Fragment,{children:[h,"\xa0","*"]})):h,notched:"undefined"!==typeof g?g:Boolean(t.startAdornment||t.filled||t.focused)}),fullWidth:c,inputComponent:f,multiline:p,ref:e,type:m},y,{classes:Object(n.a)({},b,{notchedOutline:null})}))}));D.muiName="Input";var L=D,F=r(36);function U(t){return Object(p.a)("MuiFormLabel",t)}var Q=Object(g.a)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);const G=["children","className","color","component","disabled","error","filled","focused","required"],H=Object(c.a)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return Object(n.a)({},e.root,"secondary"===r.color&&e.colorSecondary,r.filled&&e.filled)}})((t=>{let{theme:e,ownerState:r}=t;return Object(n.a)({color:e.palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(Q.focused)]:{color:e.palette[r.color].main},["&.".concat(Q.disabled)]:{color:e.palette.text.disabled},["&.".concat(Q.error)]:{color:e.palette.error.main}})})),z=Object(c.a)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})((t=>{let{theme:e}=t;return{["&.".concat(Q.error)]:{color:e.palette.error.main}}}));var q=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiFormLabel"}),{children:o,className:u,component:c="label"}=r,f=Object(i.a)(r,G),h=Object(x.a)(),d=Object(B.a)({props:r,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]}),p=Object(n.a)({},r,{color:d.color||"primary",component:c,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),g=(t=>{const{classes:e,color:r,focused:n,disabled:i,error:o,filled:a,required:u}=t,c={root:["root","color".concat(Object(F.a)(r)),i&&"disabled",o&&"error",a&&"filled",n&&"focused",u&&"required"],asterisk:["asterisk",o&&"error"]};return Object(s.a)(c,U,e)})(p);return Object(v.jsxs)(H,Object(n.a)({as:c,ownerState:p,className:Object(a.default)(g.root,u),ref:e},f,{children:[o,d.required&&Object(v.jsxs)(z,{ownerState:p,"aria-hidden":!0,className:g.asterisk,children:["\u2009","*"]})]}))}));function K(t){return Object(p.a)("MuiInputLabel",t)}Object(g.a)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const V=["disableAnimation","margin","shrink","variant"],W=Object(c.a)(q,{shouldForwardProp:t=>Object(c.b)(t)||"classes"===t,name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{["& .".concat(Q.asterisk)]:e.asterisk},e.root,r.formControl&&e.formControl,"small"===r.size&&e.sizeSmall,r.shrink&&e.shrink,!r.disableAnimation&&e.animated,e[r.variant]]}})((t=>{let{theme:e,ownerState:r}=t;return Object(n.a)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},r.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===r.size&&{transform:"translate(0, 17px) scale(1)"},r.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!r.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},"filled"===r.variant&&Object(n.a)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===r.size&&{transform:"translate(12px, 13px) scale(1)"},r.shrink&&Object(n.a)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===r.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===r.variant&&Object(n.a)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===r.size&&{transform:"translate(14px, 9px) scale(1)"},r.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 24px)",transform:"translate(14px, -9px) scale(0.75)"}))}));var J=o.forwardRef((function(t,e){const r=Object(l.a)({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,shrink:a}=r,u=Object(i.a)(r,V),c=Object(x.a)();let f=a;"undefined"===typeof f&&c&&(f=c.filled||c.focused||c.adornedStart);const h=Object(B.a)({props:r,muiFormControl:c,states:["size","variant","required"]}),d=Object(n.a)({},r,{disableAnimation:o,formControl:c,shrink:f,size:h.size,variant:h.variant,required:h.required}),p=(t=>{const{classes:e,formControl:r,size:i,shrink:o,disableAnimation:a,variant:u,required:c}=t,l={root:["root",r&&"formControl",!a&&"animated",o&&"shrink","small"===i&&"sizeSmall",u],asterisk:[c&&"asterisk"]},f=Object(s.a)(l,K,e);return Object(n.a)({},e,f)})(d);return Object(v.jsx)(W,Object(n.a)({"data-shrink":f,ownerState:d,ref:e},u,{classes:p}))})),Y=r(448),X=r(527),Z=r(514);function $(t){return Object(p.a)("MuiFormControl",t)}Object(g.a)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const tt=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],et=Object(c.a)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return Object(n.a)({},e.root,e["margin".concat(Object(F.a)(r.margin))],r.fullWidth&&e.fullWidth)}})((t=>{let{ownerState:e}=t;return Object(n.a)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===e.margin&&{marginTop:16,marginBottom:8},"dense"===e.margin&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})}));var rt=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiFormControl"}),{children:u,className:c,color:f="primary",component:h="div",disabled:d=!1,error:p=!1,focused:g,fullWidth:m=!1,hiddenLabel:y=!1,margin:b="none",required:A=!1,size:w="medium",variant:_="outlined"}=r,E=Object(i.a)(r,tt),I=Object(n.a)({},r,{color:f,component:h,disabled:d,error:p,fullWidth:m,hiddenLabel:y,margin:b,required:A,size:w,variant:_}),S=(t=>{const{classes:e,margin:r,fullWidth:n}=t,i={root:["root","none"!==r&&"margin".concat(Object(F.a)(r)),n&&"fullWidth"]};return Object(s.a)(i,$,e)})(I),[M,C]=o.useState((()=>{let t=!1;return u&&o.Children.forEach(u,(e=>{if(!Object(X.a)(e,["Input","Select"]))return;const r=Object(X.a)(e,["Select"])?e.props.input:e;r&&Object(Y.a)(r.props)&&(t=!0)})),t})),[k,x]=o.useState((()=>{let t=!1;return u&&o.Children.forEach(u,(e=>{Object(X.a)(e,["Input","Select"])&&Object(Y.b)(e.props,!0)&&(t=!0)})),t})),[B,O]=o.useState(!1);d&&B&&O(!1);const T=void 0===g||d?B:g;const R=o.useCallback((()=>{x(!0)}),[]),P={adornedStart:M,setAdornedStart:C,color:f,disabled:d,error:p,filled:k,focused:T,fullWidth:m,hiddenLabel:y,size:w,onBlur:()=>{O(!1)},onEmpty:o.useCallback((()=>{x(!1)}),[]),onFilled:R,onFocus:()=>{O(!0)},registerEffect:undefined,required:A,variant:_};return Object(v.jsx)(Z.a.Provider,{value:P,children:Object(v.jsx)(et,Object(n.a)({as:h,ownerState:I,className:Object(a.default)(S.root,c),ref:e},E,{children:u}))})}));function nt(t){return Object(p.a)("MuiFormHelperText",t)}var it,ot=Object(g.a)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);const at=["children","className","component","disabled","error","filled","focused","margin","required","variant"],st=Object(c.a)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.size&&e["size".concat(Object(F.a)(r.size))],r.contained&&e.contained,r.filled&&e.filled]}})((t=>{let{theme:e,ownerState:r}=t;return Object(n.a)({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(ot.disabled)]:{color:e.palette.text.disabled},["&.".concat(ot.error)]:{color:e.palette.error.main}},"small"===r.size&&{marginTop:4},r.contained&&{marginLeft:14,marginRight:14})}));var ut=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiFormHelperText"}),{children:o,className:u,component:c="p"}=r,f=Object(i.a)(r,at),h=Object(x.a)(),d=Object(B.a)({props:r,muiFormControl:h,states:["variant","size","disabled","error","filled","focused","required"]}),p=Object(n.a)({},r,{component:c,contained:"filled"===d.variant||"outlined"===d.variant,variant:d.variant,size:d.size,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),g=(t=>{const{classes:e,contained:r,size:n,disabled:i,error:o,filled:a,focused:u,required:c}=t,l={root:["root",i&&"disabled",o&&"error",n&&"size".concat(Object(F.a)(n)),r&&"contained",u&&"focused",a&&"filled",c&&"required"]};return Object(s.a)(l,nt,e)})(p);return Object(v.jsx)(st,Object(n.a)({as:c,ownerState:p,className:Object(a.default)(g.root,u),ref:e},f,{children:" "===o?it||(it=Object(v.jsx)("span",{className:"notranslate",children:"\u200b"})):o}))})),ct=r(760),lt=(r(920),r(1450)),ft=lt.a,ht=r(3454);function dt(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}var pt=dt,gt=r(104),mt=r(393);const yt=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function bt(t,e,r){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:r?null:t.firstChild}function vt(t,e,r){return t===e?r?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:r?null:t.lastChild}function At(t,e){if(void 0===e)return!0;let r=t.innerText;return void 0===r&&(r=t.textContent),r=r.trim().toLowerCase(),0!==r.length&&(e.repeating?r[0]===e.keys[0]:0===r.indexOf(e.keys.join("")))}function wt(t,e,r,n,i,o){let a=!1,s=i(t,e,!!e&&r);for(;s;){if(s===t.firstChild){if(a)return!1;a=!0}const e=!n&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&At(s,o)&&!e)return s.focus(),!0;s=i(t,s,r)}return!1}var _t=o.forwardRef((function(t,e){const{actions:r,autoFocus:a=!1,autoFocusItem:s=!1,children:u,className:c,disabledItemsFocusable:l=!1,disableListWrap:f=!1,onKeyDown:h,variant:d="selectedMenu"}=t,p=Object(i.a)(t,yt),g=o.useRef(null),m=o.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Object(mt.a)((()=>{a&&g.current.focus()}),[a]),o.useImperativeHandle(r,(()=>({adjustStyleForScrollbar:(t,e)=>{const r=!g.current.style.width;if(t.clientHeight{o.isValidElement(t)&&(t.props.disabled||("selectedMenu"===d&&t.props.selected||-1===b)&&(b=e))}));const A=o.Children.map(u,((t,e)=>{if(e===b){const e={};return s&&(e.autoFocus=!0),void 0===t.props.tabIndex&&"selectedMenu"===d&&(e.tabIndex=0),o.cloneElement(t,e)}return t}));return Object(v.jsx)(ht.a,Object(n.a)({role:"menu",ref:y,className:c,onKeyDown:t=>{const e=g.current,r=t.key,n=ft(e).activeElement;if("ArrowDown"===r)t.preventDefault(),wt(e,n,f,l,bt);else if("ArrowUp"===r)t.preventDefault(),wt(e,n,f,l,vt);else if("Home"===r)t.preventDefault(),wt(e,null,f,l,bt);else if("End"===r)t.preventDefault(),wt(e,null,f,l,vt);else if(1===r.length){const i=m.current,o=r.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);const s=n&&!i.repeating&&At(n,i);i.previousKeyMatched&&(s||wt(e,n,!1,l,bt,i))?t.preventDefault():i.previousKeyMatched=!1}h&&h(t)},tabIndex:a?0:-1},p,{children:A}))})),Et=r(3453),It=r(3425).a,St=r(3424),Mt=St.a,Ct=r(3428),kt=r(752);function xt(t){return Object(p.a)("MuiModal",t)}Object(g.a)("MuiModal",["root","hidden"]);var Bt=r(33),Ot=r(82),Tt=r(983),Rt=r(1466),Pt=r(3426),Nt=r(3427);function jt(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function Dt(t){return parseInt(Object(St.a)(t).getComputedStyle(t).paddingRight,10)||0}function Lt(t,e,r){let n=arguments.length>4?arguments[4]:void 0;const i=[e,r,...arguments.length>3&&void 0!==arguments[3]?arguments[3]:[]],o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(t.children,(t=>{-1===i.indexOf(t)&&-1===o.indexOf(t.tagName)&&jt(t,n)}))}function Ft(t,e){let r=-1;return t.some(((t,n)=>!!e(t)&&(r=n,!0))),r}function Ut(t,e){const r=[],n=t.container;if(!e.disableScrollLock){if(function(t){const e=Object(lt.a)(t);return e.body===t?Object(St.a)(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}(n)){const t=dt(Object(lt.a)(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight="".concat(Dt(n)+t,"px");const e=Object(lt.a)(n).querySelectorAll(".mui-fixed");[].forEach.call(e,(e=>{r.push({value:e.style.paddingRight,property:"padding-right",el:e}),e.style.paddingRight="".concat(Dt(e)+t,"px")}))}const t=n.parentElement,e=Object(St.a)(n),i="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===e.getComputedStyle(t).overflowY?t:n;r.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{r.forEach((t=>{let{value:e,el:r,property:n}=t;e?r.style.setProperty(n,e):r.style.removeProperty(n)}))}}const Qt=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Gt(t){const e=[],r=[];return Array.from(t.querySelectorAll(Qt)).forEach(((t,n)=>{const i=function(t){const e=parseInt(t.getAttribute("tabindex"),10);return Number.isNaN(e)?"true"===t.contentEditable||("AUDIO"===t.nodeName||"VIDEO"===t.nodeName||"DETAILS"===t.nodeName)&&null===t.getAttribute("tabindex")?0:t.tabIndex:e}(t);-1!==i&&function(t){return!(t.disabled||"INPUT"===t.tagName&&"hidden"===t.type||function(t){if("INPUT"!==t.tagName||"radio"!==t.type)return!1;if(!t.name)return!1;const e=e=>t.ownerDocument.querySelector('input[type="radio"]'.concat(e));let r=e('[name="'.concat(t.name,'"]:checked'));return r||(r=e('[name="'.concat(t.name,'"]'))),r!==t}(t))}(t)&&(0===i?e.push(t):r.push({documentOrder:n,tabIndex:i,node:t}))})),r.sort(((t,e)=>t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex)).map((t=>t.node)).concat(e)}function Ht(){return!0}var zt=function(t){const{children:e,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:i=!1,getTabbable:a=Gt,isEnabled:s=Ht,open:u}=t,c=o.useRef(),l=o.useRef(null),f=o.useRef(null),h=o.useRef(null),d=o.useRef(null),p=o.useRef(!1),g=o.useRef(null),m=Object(Tt.a)(e.ref,g),y=o.useRef(null);o.useEffect((()=>{u&&g.current&&(p.current=!r)}),[r,u]),o.useEffect((()=>{if(!u||!g.current)return;const t=Object(lt.a)(g.current);return g.current.contains(t.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex",-1),p.current&&g.current.focus()),()=>{i||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}}),[u]),o.useEffect((()=>{if(!u||!g.current)return;const t=Object(lt.a)(g.current),e=e=>{const{current:r}=g;if(null!==r)if(t.hasFocus()&&!n&&s()&&!c.current){if(!r.contains(t.activeElement)){if(e&&d.current!==e.target||t.activeElement!==d.current)d.current=null;else if(null!==d.current)return;if(!p.current)return;let n=[];if(t.activeElement!==l.current&&t.activeElement!==f.current||(n=a(g.current)),n.length>0){var i,o;const t=Boolean((null==(i=y.current)?void 0:i.shiftKey)&&"Tab"===(null==(o=y.current)?void 0:o.key)),e=n[0],r=n[n.length-1];t?r.focus():e.focus()}else r.focus()}}else c.current=!1},r=e=>{y.current=e,!n&&s()&&"Tab"===e.key&&t.activeElement===g.current&&e.shiftKey&&(c.current=!0,f.current.focus())};t.addEventListener("focusin",e),t.addEventListener("keydown",r,!0);const i=setInterval((()=>{"BODY"===t.activeElement.tagName&&e()}),50);return()=>{clearInterval(i),t.removeEventListener("focusin",e),t.removeEventListener("keydown",r,!0)}}),[r,n,i,s,u,a]);const b=t=>{null===h.current&&(h.current=t.relatedTarget),p.current=!0};return Object(v.jsxs)(o.Fragment,{children:[Object(v.jsx)("div",{tabIndex:0,onFocus:b,ref:l,"data-test":"sentinelStart"}),o.cloneElement(e,{ref:m,onFocus:t=>{null===h.current&&(h.current=t.relatedTarget),p.current=!0,d.current=t.target;const r=e.props.onFocus;r&&r(t)}}),Object(v.jsx)("div",{tabIndex:0,onFocus:b,ref:f,"data-test":"sentinelEnd"})]})};const qt=["BackdropComponent","BackdropProps","children","classes","className","closeAfterTransition","component","components","componentsProps","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","theme","onTransitionEnter","onTransitionExited"];const Kt=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,e){let r=this.modals.indexOf(t);if(-1!==r)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&jt(t.modalRef,!1);const n=function(t){const e=[];return[].forEach.call(t.children,(t=>{"true"===t.getAttribute("aria-hidden")&&e.push(t)})),e}(e);Lt(e,t.mount,t.modalRef,n,!0);const i=Ft(this.containers,(t=>t.container===e));return-1!==i?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:e,restore:null,hiddenSiblings:n}),r)}mount(t,e){const r=Ft(this.containers,(e=>-1!==e.modals.indexOf(t))),n=this.containers[r];n.restore||(n.restore=Ut(n,e))}remove(t){const e=this.modals.indexOf(t);if(-1===e)return e;const r=Ft(this.containers,(e=>-1!==e.modals.indexOf(t))),n=this.containers[r];if(n.modals.splice(n.modals.indexOf(t),1),this.modals.splice(e,1),0===n.modals.length)n.restore&&n.restore(),t.modalRef&&jt(t.modalRef,!0),Lt(n.container,t.mount,t.modalRef,n.hiddenSiblings,!1),this.containers.splice(r,1);else{const t=n.modals[n.modals.length-1];t.modalRef&&jt(t.modalRef,!1)}return e}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}};var Vt=o.forwardRef((function(t,e){const{BackdropComponent:r,BackdropProps:n,children:i,classes:u,className:c,closeAfterTransition:l=!1,component:f="div",components:h={},componentsProps:d={},container:p,disableAutoFocus:g=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:y=!1,disablePortal:b=!1,disableRestoreFocus:A=!1,disableScrollLock:w=!1,hideBackdrop:_=!1,keepMounted:E=!1,manager:I=Kt,onBackdropClick:S,onClose:M,onKeyDown:C,open:k,theme:x,onTransitionEnter:B,onTransitionExited:O}=t,T=Object(Ot.a)(t,qt),[R,P]=o.useState(!0),N=o.useRef({}),j=o.useRef(null),D=o.useRef(null),L=Object(Tt.a)(D,e),F=function(t){return!!t.children&&t.children.props.hasOwnProperty("in")}(t),U=()=>(N.current.modalRef=D.current,N.current.mountNode=j.current,N.current),Q=()=>{I.mount(U(),{disableScrollLock:w}),D.current.scrollTop=0},G=Object(Rt.a)((()=>{const t=function(t){return"function"===typeof t?t():t}(p)||Object(lt.a)(j.current).body;I.add(U(),t),D.current&&Q()})),H=o.useCallback((()=>I.isTopModal(U())),[I]),z=Object(Rt.a)((t=>{j.current=t,t&&(k&&H()?Q():jt(D.current,!0))})),q=o.useCallback((()=>{I.remove(U())}),[I]);o.useEffect((()=>()=>{q()}),[q]),o.useEffect((()=>{k?G():F&&l||q()}),[k,q,F,l,G]);const K=Object(Bt.a)({},t,{classes:u,closeAfterTransition:l,disableAutoFocus:g,disableEnforceFocus:m,disableEscapeKeyDown:y,disablePortal:b,disableRestoreFocus:A,disableScrollLock:w,exited:R,hideBackdrop:_,keepMounted:E}),V=(t=>{const{open:e,exited:r,classes:n}=t,i={root:["root",!e&&r&&"hidden"]};return Object(s.a)(i,xt,n)})(K);if(!E&&!k&&(!F||R))return null;const W=()=>{P(!1),B&&B()},J=()=>{P(!0),O&&O(),l&&q()},Y={};void 0===i.props.tabIndex&&(Y.tabIndex="-1"),F&&(Y.onEnter=Object(Pt.a)(W,i.props.onEnter),Y.onExited=Object(Pt.a)(J,i.props.onExited));const X=h.Root||f,Z=d.root||{};return Object(v.jsx)(Nt.a,{ref:z,container:p,disablePortal:b,children:Object(v.jsxs)(X,Object(Bt.a)({role:"presentation"},Z,!Object(kt.a)(X)&&{as:f,ownerState:Object(Bt.a)({},K,Z.ownerState),theme:x},T,{ref:L,onKeyDown:t=>{C&&C(t),"Escape"===t.key&&H()&&(y||(t.stopPropagation(),M&&M(t,"escapeKeyDown")))},className:Object(a.default)(V.root,Z.className,c),children:[!_&&r?Object(v.jsx)(r,Object(Bt.a)({"aria-hidden":!0,open:k,onClick:t=>{t.target===t.currentTarget&&(S&&S(t),M&&M(t,"backdropClick"))}},n)):null,Object(v.jsx)(zt,{disableEnforceFocus:m,disableAutoFocus:g,disableRestoreFocus:A,isEnabled:H,open:k,children:o.cloneElement(i,Y)})]}))})})),Wt=r(3312),Jt=r(280),Yt=r(401);const Xt=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Zt={entering:{opacity:1},entered:{opacity:1}};var $t=o.forwardRef((function(t,e){const r=Object(Jt.a)(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:u=!0,children:c,easing:l,in:f,onEnter:h,onEntered:d,onEntering:p,onExit:g,onExited:m,onExiting:y,style:b,timeout:A=a,TransitionComponent:w=Wt.a}=t,_=Object(i.a)(t,Xt),E=o.useRef(null),I=Object(gt.a)(c.ref,e),S=Object(gt.a)(E,I),M=t=>e=>{if(t){const r=E.current;void 0===e?t(r):t(r,e)}},C=M(p),k=M(((t,e)=>{Object(Yt.b)(t);const n=Object(Yt.a)({style:b,timeout:A,easing:l},{mode:"enter"});t.style.webkitTransition=r.transitions.create("opacity",n),t.style.transition=r.transitions.create("opacity",n),h&&h(t,e)})),x=M(d),B=M(y),O=M((t=>{const e=Object(Yt.a)({style:b,timeout:A,easing:l},{mode:"exit"});t.style.webkitTransition=r.transitions.create("opacity",e),t.style.transition=r.transitions.create("opacity",e),g&&g(t)})),T=M(m);return Object(v.jsx)(w,Object(n.a)({appear:u,in:f,nodeRef:E,onEnter:k,onEntered:x,onEntering:C,onExit:O,onExited:T,onExiting:B,addEndListener:t=>{s&&s(E.current,t)},timeout:A},_,{children:(t,e)=>o.cloneElement(c,Object(n.a)({style:Object(n.a)({opacity:0,visibility:"exited"!==t||f?void 0:"hidden"},Zt[t],b,c.props.style),ref:S},e))}))}));function te(t){return Object(p.a)("MuiBackdrop",t)}Object(g.a)("MuiBackdrop",["root","invisible"]);const ee=["children","component","components","componentsProps","className","invisible","open","transitionDuration","TransitionComponent"],re=Object(c.a)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.invisible&&e.invisible]}})((t=>{let{ownerState:e}=t;return Object(n.a)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})}));var ne=o.forwardRef((function(t,e){var r,o;const u=Object(l.a)({props:t,name:"MuiBackdrop"}),{children:c,component:f="div",components:h={},componentsProps:d={},className:p,invisible:g=!1,open:m,transitionDuration:y,TransitionComponent:b=$t}=u,A=Object(i.a)(u,ee),w=Object(n.a)({},u,{component:f,invisible:g}),_=(t=>{const{classes:e,invisible:r}=t,n={root:["root",r&&"invisible"]};return Object(s.a)(n,te,e)})(w);return Object(v.jsx)(b,Object(n.a)({in:m,timeout:y},A,{children:Object(v.jsx)(re,{"aria-hidden":!0,as:null!=(r=h.Root)?r:f,className:Object(a.default)(_.root,p),ownerState:Object(n.a)({},w,null==(o=d.root)?void 0:o.ownerState),classes:_,ref:e,children:c})}))}));const ie=["BackdropComponent","closeAfterTransition","children","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted"],oe=Object(c.a)("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.open&&r.exited&&e.hidden]}})((t=>{let{theme:e,ownerState:r}=t;return Object(n.a)({position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},!r.open&&r.exited&&{visibility:"hidden"})})),ae=Object(c.a)(ne,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1});var se=o.forwardRef((function(t,e){var r;const a=Object(l.a)({name:"MuiModal",props:t}),{BackdropComponent:s=ae,closeAfterTransition:u=!1,children:c,components:f={},componentsProps:h={},disableAutoFocus:d=!1,disableEnforceFocus:p=!1,disableEscapeKeyDown:g=!1,disablePortal:m=!1,disableRestoreFocus:y=!1,disableScrollLock:b=!1,hideBackdrop:A=!1,keepMounted:w=!1}=a,_=Object(i.a)(a,ie),[E,I]=o.useState(!0),S={closeAfterTransition:u,disableAutoFocus:d,disableEnforceFocus:p,disableEscapeKeyDown:g,disablePortal:m,disableRestoreFocus:y,disableScrollLock:b,hideBackdrop:A,keepMounted:w},M=(t=>t.classes)(Object(n.a)({},a,S,{exited:E}));return Object(v.jsx)(Vt,Object(n.a)({components:Object(n.a)({Root:oe},f),componentsProps:{root:Object(n.a)({},h.root,(!f.Root||!Object(kt.a)(f.Root))&&{ownerState:Object(n.a)({},null==(r=h.root)?void 0:r.ownerState)})},BackdropComponent:s,onTransitionEnter:()=>I(!1),onTransitionExited:()=>I(!0),ref:e},_,{classes:M},S,{children:c}))}));function ue(t){return Object(p.a)("MuiPopover",t)}Object(g.a)("MuiPopover",["root","paper"]);const ce=["onEntering"],le=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function fe(t,e){let r=0;return"number"===typeof e?r=e:"center"===e?r=t.height/2:"bottom"===e&&(r=t.height),r}function he(t,e){let r=0;return"number"===typeof e?r=e:"center"===e?r=t.width/2:"right"===e&&(r=t.width),r}function de(t){return[t.horizontal,t.vertical].map((t=>"number"===typeof t?"".concat(t,"px"):t)).join(" ")}function pe(t){return"function"===typeof t?t():t}const ge=Object(c.a)(se,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),me=Object(c.a)(Et.a,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0});var ye=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiPopover"}),{action:u,anchorEl:c,anchorOrigin:f={vertical:"top",horizontal:"left"},anchorPosition:h,anchorReference:d="anchorEl",children:p,className:g,container:m,elevation:y=8,marginThreshold:b=16,open:A,PaperProps:w={},transformOrigin:_={vertical:"top",horizontal:"left"},TransitionComponent:E=Ct.a,transitionDuration:I="auto",TransitionProps:{onEntering:S}={}}=r,M=Object(i.a)(r.TransitionProps,ce),C=Object(i.a)(r,le),k=o.useRef(),x=Object(gt.a)(k,w.ref),B=Object(n.a)({},r,{anchorOrigin:f,anchorReference:d,elevation:y,marginThreshold:b,PaperProps:w,transformOrigin:_,TransitionComponent:E,transitionDuration:I,TransitionProps:M}),O=(t=>{const{classes:e}=t;return Object(s.a)({root:["root"],paper:["paper"]},ue,e)})(B),T=o.useCallback((()=>{if("anchorPosition"===d)return h;const t=pe(c),e=(t&&1===t.nodeType?t:ft(k.current).body).getBoundingClientRect();return{top:e.top+fe(e,f.vertical),left:e.left+he(e,f.horizontal)}}),[c,f.horizontal,f.vertical,h,d]),R=o.useCallback((t=>({vertical:fe(t,_.vertical),horizontal:he(t,_.horizontal)})),[_.horizontal,_.vertical]),P=o.useCallback((t=>{const e={width:t.offsetWidth,height:t.offsetHeight},r=R(e);if("none"===d)return{top:null,left:null,transformOrigin:de(r)};const n=T();let i=n.top-r.vertical,o=n.left-r.horizontal;const a=i+e.height,s=o+e.width,u=Mt(pe(c)),l=u.innerHeight-b,f=u.innerWidth-b;if(il){const t=a-l;i-=t,r.vertical+=t}if(of){const t=s-f;o-=t,r.horizontal+=t}return{top:"".concat(Math.round(i),"px"),left:"".concat(Math.round(o),"px"),transformOrigin:de(r)}}),[c,d,T,R,b]),N=o.useCallback((()=>{const t=k.current;if(!t)return;const e=P(t);null!==e.top&&(t.style.top=e.top),null!==e.left&&(t.style.left=e.left),t.style.transformOrigin=e.transformOrigin}),[P]);o.useEffect((()=>{A&&N()})),o.useImperativeHandle(u,(()=>A?{updatePosition:()=>{N()}}:null),[A,N]),o.useEffect((()=>{if(!A)return;const t=It((()=>{N()})),e=Mt(c);return e.addEventListener("resize",t),()=>{t.clear(),e.removeEventListener("resize",t)}}),[c,A,N]);let j=I;"auto"!==I||E.muiSupportAuto||(j=void 0);const D=m||(c?ft(pe(c)).body:void 0);return Object(v.jsx)(ge,Object(n.a)({BackdropProps:{invisible:!0},className:Object(a.default)(O.root,g),container:D,open:A,ref:e,ownerState:B},C,{children:Object(v.jsx)(E,Object(n.a)({appear:!0,in:A,onEntering:(t,e)=>{S&&S(t,e),N()},timeout:j},M,{children:Object(v.jsx)(me,Object(n.a)({elevation:y},w,{ref:x,className:Object(a.default)(O.paper,w.className),children:p}))}))}))}));function be(t){return Object(p.a)("MuiMenu",t)}Object(g.a)("MuiMenu",["root","paper","list"]);const ve=["onEntering"],Ae=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],we={vertical:"top",horizontal:"right"},_e={vertical:"top",horizontal:"left"},Ee=Object(c.a)(ye,{shouldForwardProp:t=>Object(c.b)(t)||"classes"===t,name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Ie=Object(c.a)(Et.a,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Se=Object(c.a)(_t,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0});var Me=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiMenu"}),{autoFocus:u=!0,children:c,disableAutoFocusItem:f=!1,MenuListProps:h={},onClose:d,open:p,PaperProps:g={},PopoverClasses:m,transitionDuration:y="auto",TransitionProps:{onEntering:b}={},variant:A="selectedMenu"}=r,w=Object(i.a)(r.TransitionProps,ve),_=Object(i.a)(r,Ae),E=Object(Jt.a)(),I="rtl"===E.direction,S=Object(n.a)({},r,{autoFocus:u,disableAutoFocusItem:f,MenuListProps:h,onEntering:b,PaperProps:g,transitionDuration:y,TransitionProps:w,variant:A}),M=(t=>{const{classes:e}=t;return Object(s.a)({root:["root"],paper:["paper"],list:["list"]},be,e)})(S),C=u&&!f&&p,k=o.useRef(null);let x=-1;return o.Children.map(c,((t,e)=>{o.isValidElement(t)&&(t.props.disabled||("selectedMenu"===A&&t.props.selected||-1===x)&&(x=e))})),Object(v.jsx)(Ee,Object(n.a)({classes:m,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:I?"right":"left"},transformOrigin:I?we:_e,PaperProps:Object(n.a)({component:Ie},g,{classes:Object(n.a)({},g.classes,{root:M.paper})}),className:M.root,open:p,ref:e,transitionDuration:y,TransitionProps:Object(n.a)({onEntering:(t,e)=>{k.current&&k.current.adjustStyleForScrollbar(t,E),b&&b(t,e)}},w),ownerState:S},_,{children:Object(v.jsx)(Se,Object(n.a)({onKeyDown:t=>{"Tab"===t.key&&(t.preventDefault(),d&&d(t,"tabKeyDown"))},actions:k,autoFocus:u&&(-1===x||f),autoFocusItem:C,variant:A},h,{className:Object(a.default)(M.list,h.className),children:c}))}))}));function Ce(t){return Object(p.a)("MuiNativeSelect",t)}var ke=Object(g.a)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]);const xe=["className","disabled","IconComponent","inputRef","variant"],Be=t=>{let{ownerState:e,theme:r}=t;return Object(n.a)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{backgroundColor:"light"===r.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},["&.".concat(ke.disabled)]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:r.palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:r.shape.borderRadius,"&:focus":{borderRadius:r.shape.borderRadius},"&&&":{paddingRight:32}})},Oe=Object(c.a)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:c.b,overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.select,e[r.variant],{["&.".concat(ke.multiple)]:e.multiple}]}})(Be),Te=t=>{let{ownerState:e,theme:r}=t;return Object(n.a)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:r.palette.action.active,["&.".concat(ke.disabled)]:{color:r.palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7})},Re=Object(c.a)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.icon,r.variant&&e["icon".concat(Object(F.a)(r.variant))],r.open&&e.iconOpen]}})(Te);var Pe=o.forwardRef((function(t,e){const{className:r,disabled:u,IconComponent:c,inputRef:l,variant:f="standard"}=t,h=Object(i.a)(t,xe),d=Object(n.a)({},t,{disabled:u,variant:f}),p=(t=>{const{classes:e,variant:r,disabled:n,multiple:i,open:o}=t,a={select:["select",r,n&&"disabled",i&&"multiple"],icon:["icon","icon".concat(Object(F.a)(r)),o&&"iconOpen",n&&"disabled"]};return Object(s.a)(a,Ce,e)})(d);return Object(v.jsxs)(o.Fragment,{children:[Object(v.jsx)(Oe,Object(n.a)({ownerState:d,className:Object(a.default)(p.select,r),disabled:u,ref:l||e},h)),t.multiple?null:Object(v.jsx)(Re,{as:c,ownerState:d,className:p.icon})]})})),Ne=r(449);function je(t){return Object(p.a)("MuiSelect",t)}var De,Le=Object(g.a)("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]);const Fe=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Ue=Object(c.a)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{["&.".concat(Le.select)]:e.select},{["&.".concat(Le.select)]:e[r.variant]},{["&.".concat(Le.multiple)]:e.multiple}]}})(Be,{["&.".concat(Le.select)]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Qe=Object(c.a)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.icon,r.variant&&e["icon".concat(Object(F.a)(r.variant))],r.open&&e.iconOpen]}})(Te),Ge=Object(c.a)("input",{shouldForwardProp:t=>Object(c.c)(t)&&"classes"!==t,name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function He(t,e){return"object"===typeof e&&null!==e?t===e:String(t)===String(e)}function ze(t){return null==t||"string"===typeof t&&!t.trim()}var qe,Ke,Ve=o.forwardRef((function(t,e){const{"aria-describedby":r,"aria-label":u,autoFocus:c,autoWidth:l,children:f,className:h,defaultOpen:d,defaultValue:p,disabled:g,displayEmpty:m,IconComponent:y,inputRef:b,labelId:A,MenuProps:w={},multiple:_,name:E,onBlur:I,onChange:S,onClose:M,onFocus:C,onOpen:k,open:x,readOnly:B,renderValue:O,SelectDisplayProps:T={},tabIndex:R,value:P,variant:N="standard"}=t,j=Object(i.a)(t,Fe),[D,L]=Object(Ne.a)({controlled:P,default:p,name:"Select"}),[U,Q]=Object(Ne.a)({controlled:x,default:d,name:"Select"}),G=o.useRef(null),H=o.useRef(null),[z,q]=o.useState(null),{current:K}=o.useRef(null!=x),[V,W]=o.useState(),J=Object(gt.a)(e,b),X=o.useCallback((t=>{H.current=t,t&&q(t)}),[]);o.useImperativeHandle(J,(()=>({focus:()=>{H.current.focus()},node:G.current,value:D})),[D]),o.useEffect((()=>{d&&U&&z&&!K&&(W(l?null:z.clientWidth),H.current.focus())}),[z,l]),o.useEffect((()=>{c&&H.current.focus()}),[c]),o.useEffect((()=>{if(!A)return;const t=ft(H.current).getElementById(A);if(t){const e=()=>{getSelection().isCollapsed&&H.current.focus()};return t.addEventListener("click",e),()=>{t.removeEventListener("click",e)}}}),[A]);const Z=(t,e)=>{t?k&&k(e):M&&M(e),K||(W(l?null:z.clientWidth),Q(t))},$=o.Children.toArray(f),tt=t=>e=>{let r;if(e.currentTarget.hasAttribute("tabindex")){if(_){r=Array.isArray(D)?D.slice():[];const e=D.indexOf(t.props.value);-1===e?r.push(t.props.value):r.splice(e,1)}else r=t.props.value;if(t.props.onClick&&t.props.onClick(e),D!==r&&(L(r),S)){const n=e.nativeEvent||e,i=new n.constructor(n.type,n);Object.defineProperty(i,"target",{writable:!0,value:{value:r,name:E}}),S(i,t)}_||Z(!1,e)}},et=null!==z&&U;let rt,nt;delete j["aria-invalid"];const it=[];let ot=!1,at=!1;(Object(Y.b)({value:D})||m)&&(O?rt=O(D):ot=!0);const st=$.map(((t,e,r)=>{if(!o.isValidElement(t))return null;let n;if(_){if(!Array.isArray(D))throw new Error(Object(ct.a)(2));n=D.some((e=>He(e,t.props.value))),n&&ot&&it.push(t.props.children)}else n=He(D,t.props.value),n&&ot&&(nt=t.props.children);if(n&&(at=!0),void 0===t.props.value)return o.cloneElement(t,{"aria-readonly":!0,role:"option"});return o.cloneElement(t,{"aria-selected":n?"true":"false",onClick:tt(t),onKeyUp:e=>{" "===e.key&&e.preventDefault(),t.props.onKeyUp&&t.props.onKeyUp(e)},role:"option",selected:void 0===r[0].props.value||!0===r[0].props.disabled?(()=>{if(D)return n;const e=r.find((t=>void 0!==t.props.value&&!0!==t.props.disabled));return t===e||n})():n,value:void 0,"data-value":t.props.value})}));ot&&(rt=_?0===it.length?null:it.reduce(((t,e,r)=>(t.push(e),r{const{classes:e,variant:r,disabled:n,multiple:i,open:o}=t,a={select:["select",r,n&&"disabled",i&&"multiple"],icon:["icon","icon".concat(Object(F.a)(r)),o&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return Object(s.a)(a,je,e)})(dt);return Object(v.jsxs)(o.Fragment,{children:[Object(v.jsx)(Ue,Object(n.a)({ref:X,tabIndex:ut,role:"button","aria-disabled":g?"true":void 0,"aria-expanded":et?"true":"false","aria-haspopup":"listbox","aria-label":u,"aria-labelledby":[A,ht].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:t=>{if(!B){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(t.key)&&(t.preventDefault(),Z(!0,t))}},onMouseDown:g||B?null:t=>{0===t.button&&(t.preventDefault(),H.current.focus(),Z(!0,t))},onBlur:t=>{!et&&I&&(Object.defineProperty(t,"target",{writable:!0,value:{value:D,name:E}}),I(t))},onFocus:C},T,{ownerState:dt,className:Object(a.default)(pt.select,h,T.className),id:ht,children:ze(rt)?De||(De=Object(v.jsx)("span",{className:"notranslate",children:"\u200b"})):rt})),Object(v.jsx)(Ge,Object(n.a)({value:Array.isArray(D)?D.join(","):D,name:E,ref:G,"aria-hidden":!0,onChange:t=>{const e=$.map((t=>t.props.value)).indexOf(t.target.value);if(-1===e)return;const r=$[e];L(r.props.value),S&&S(t,r)},tabIndex:-1,disabled:g,className:pt.nativeInput,autoFocus:c,ownerState:dt},j)),Object(v.jsx)(Qe,{as:y,className:pt.icon,ownerState:dt}),Object(v.jsx)(Me,Object(n.a)({id:"menu-".concat(E||""),anchorEl:z,open:et,onClose:t=>{Z(!1,t)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},w,{MenuListProps:Object(n.a)({"aria-labelledby":A,role:"listbox",disableListWrap:!0},w.MenuListProps),PaperProps:Object(n.a)({},w.PaperProps,{style:Object(n.a)({minWidth:lt},null!=w.PaperProps?w.PaperProps.style:null)}),children:st}))]})})),We=r(139),Je=Object(We.a)(Object(v.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");const Ye=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],Xe={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Object(c.b)(t)&&"variant"!==t,slot:"Root"},Ze=Object(c.a)(f.a,Xe)(""),$e=Object(c.a)(L,Xe)(""),tr=Object(c.a)(S,Xe)(""),er=o.forwardRef((function(t,e){const r=Object(l.a)({name:"MuiSelect",props:t}),{autoWidth:s=!1,children:u,classes:c={},className:f,defaultOpen:d=!1,displayEmpty:p=!1,IconComponent:g=Je,id:m,input:y,inputProps:b,label:A,labelId:w,MenuProps:_,multiple:E=!1,native:I=!1,onClose:S,onOpen:M,open:C,renderValue:k,SelectDisplayProps:O,variant:T="outlined"}=r,R=Object(i.a)(r,Ye),P=I?Pe:Ve,N=Object(x.a)(),j=Object(B.a)({props:r,muiFormControl:N,states:["variant"]}).variant||T,D=y||{standard:qe||(qe=Object(v.jsx)(Ze,{})),outlined:Object(v.jsx)($e,{label:A}),filled:Ke||(Ke=Object(v.jsx)(tr,{}))}[j],L=(t=>{const{classes:e}=t;return e})(Object(n.a)({},r,{variant:j,classes:c})),F=Object(gt.a)(e,D.ref);return o.cloneElement(D,Object(n.a)({inputComponent:P,inputProps:Object(n.a)({children:u,IconComponent:g,variant:j,type:void 0,multiple:E},I?{id:m}:{autoWidth:s,defaultOpen:d,displayEmpty:p,labelId:w,MenuProps:_,onClose:S,onOpen:M,open:C,renderValue:k,SelectDisplayProps:Object(n.a)({id:m},O)},b,{classes:b?Object(h.a)(L,b.classes):L},y?y.props.inputProps:{})},E&&I&&"outlined"===j?{notched:!0}:{},{ref:F,className:Object(a.default)(D.props.className,f),variant:j},R))}));er.muiName="Select";var rr=er;function nr(t){return Object(p.a)("MuiTextField",t)}Object(g.a)("MuiTextField",["root"]);const ir=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],or={standard:f.a,filled:S,outlined:L},ar=Object(c.a)(rt,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),sr=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:c=!1,children:f,className:h,color:d="primary",defaultValue:p,disabled:g=!1,error:m=!1,FormHelperTextProps:y,fullWidth:b=!1,helperText:A,id:w,InputLabelProps:_,inputProps:E,InputProps:I,inputRef:S,label:M,maxRows:C,minRows:k,multiline:x=!1,name:B,onBlur:O,onChange:T,onFocus:R,placeholder:P,required:N=!1,rows:j,select:D=!1,SelectProps:L,type:F,value:U,variant:Q="outlined"}=r,G=Object(i.a)(r,ir),H=Object(n.a)({},r,{autoFocus:c,color:d,disabled:g,error:m,fullWidth:b,multiline:x,required:N,select:D,variant:Q}),z=(t=>{const{classes:e}=t;return Object(s.a)({root:["root"]},nr,e)})(H);const q={};"outlined"===Q&&(_&&"undefined"!==typeof _.shrink&&(q.notched=_.shrink),q.label=M),D&&(L&&L.native||(q.id=void 0),q["aria-describedby"]=void 0);const K=Object(u.a)(w),V=A&&K?"".concat(K,"-helper-text"):void 0,W=M&&K?"".concat(K,"-label"):void 0,Y=or[Q],X=Object(v.jsx)(Y,Object(n.a)({"aria-describedby":V,autoComplete:o,autoFocus:c,defaultValue:p,fullWidth:b,multiline:x,name:B,rows:j,maxRows:C,minRows:k,type:F,value:U,id:K,inputRef:S,onBlur:O,onChange:T,onFocus:R,placeholder:P,inputProps:E},q,I));return Object(v.jsxs)(ar,Object(n.a)({className:Object(a.default)(z.root,h),disabled:g,error:m,fullWidth:b,ref:e,required:N,color:d,variant:Q,ownerState:H},G,{children:[null!=M&&""!==M&&Object(v.jsx)(J,Object(n.a)({htmlFor:K,id:W},_,{children:M})),D?Object(v.jsx)(rr,Object(n.a)({"aria-describedby":V,id:K,labelId:W,value:U,input:X},L,{children:f})):X,A&&Object(v.jsx)(ut,Object(n.a)({id:V},y,{children:A}))]}))}));e.a=sr},function(t,e,r){"use strict";var n=r(82),i=r(33),o=r(4),a=r(146),s=r(1327),u=r(1464),c=r(204),l=r(312),f=r(26),h=r(3415),d=r(3414),p=r(515),g=r(450),m=r(725),y=r(143),b=r(3448),v=r(432),A=r(0);var w=function(t){const{className:e,classes:r,pulsate:n=!1,rippleX:i,rippleY:a,rippleSize:s,in:u,onExited:c,timeout:l}=t,[h,d]=o.useState(!1),p=Object(f.default)(e,r.ripple,r.rippleVisible,n&&r.ripplePulsate),g={width:s,height:s,top:-s/2+a,left:-s/2+i},m=Object(f.default)(r.child,h&&r.childLeaving,n&&r.childPulsate);return u||h||d(!0),o.useEffect((()=>{if(!u&&null!=c){const t=setTimeout(c,l);return()=>{clearTimeout(t)}}}),[c,u,l]),Object(A.jsx)("span",{className:p,style:g,children:Object(A.jsx)("span",{className:m})})},_=r(772),E=r(982);var I,S,M,C,k=Object(E.a)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);const x=["center","classes","className"];let B,O,T,R;const P=Object(v.c)(B||(B=I||(I=Object(y.a)(["\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n"])))),N=Object(v.c)(O||(O=S||(S=Object(y.a)(["\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n"])))),j=Object(v.c)(T||(T=M||(M=Object(y.a)(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])))),D=Object(c.a)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),L=Object(c.a)(w,{name:"MuiTouchRipple",slot:"Ripple"})(R||(R=C||(C=Object(y.a)(["\n opacity: 0;\n position: absolute;\n\n &."," {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n &."," {\n animation-duration: ","ms;\n }\n\n & ."," {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & ."," {\n opacity: 0;\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n & ."," {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ",";\n animation-duration: 2500ms;\n animation-timing-function: ",";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n"]))),k.rippleVisible,P,550,(t=>{let{theme:e}=t;return e.transitions.easing.easeInOut}),k.ripplePulsate,(t=>{let{theme:e}=t;return e.transitions.duration.shorter}),k.child,k.childLeaving,N,550,(t=>{let{theme:e}=t;return e.transitions.easing.easeInOut}),k.childPulsate,j,(t=>{let{theme:e}=t;return e.transitions.easing.easeInOut})),F=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiTouchRipple"}),{center:a=!1,classes:s={},className:u}=r,c=Object(n.a)(r,x),[h,d]=o.useState([]),p=o.useRef(0),g=o.useRef(null);o.useEffect((()=>{g.current&&(g.current(),g.current=null)}),[h]);const m=o.useRef(!1),y=o.useRef(null),v=o.useRef(null),w=o.useRef(null);o.useEffect((()=>()=>{clearTimeout(y.current)}),[]);const _=o.useCallback((t=>{const{pulsate:e,rippleX:r,rippleY:n,rippleSize:i,cb:o}=t;d((t=>[...t,Object(A.jsx)(L,{classes:{ripple:Object(f.default)(s.ripple,k.ripple),rippleVisible:Object(f.default)(s.rippleVisible,k.rippleVisible),ripplePulsate:Object(f.default)(s.ripplePulsate,k.ripplePulsate),child:Object(f.default)(s.child,k.child),childLeaving:Object(f.default)(s.childLeaving,k.childLeaving),childPulsate:Object(f.default)(s.childPulsate,k.childPulsate)},timeout:550,pulsate:e,rippleX:r,rippleY:n,rippleSize:i},p.current)])),p.current+=1,g.current=o}),[s]),E=o.useCallback((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;const{pulsate:n=!1,center:i=a||e.pulsate,fakeElement:o=!1}=e;if("mousedown"===t.type&&m.current)return void(m.current=!1);"touchstart"===t.type&&(m.current=!0);const s=o?null:w.current,u=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,l,f;if(i||0===t.clientX&&0===t.clientY||!t.clientX&&!t.touches)c=Math.round(u.width/2),l=Math.round(u.height/2);else{const{clientX:e,clientY:r}=t.touches?t.touches[0]:t;c=Math.round(e-u.left),l=Math.round(r-u.top)}if(i)f=Math.sqrt((2*u.width**2+u.height**2)/3),f%2===0&&(f+=1);else{const t=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,e=2*Math.max(Math.abs((s?s.clientHeight:0)-l),l)+2;f=Math.sqrt(t**2+e**2)}t.touches?null===v.current&&(v.current=()=>{_({pulsate:n,rippleX:c,rippleY:l,rippleSize:f,cb:r})},y.current=setTimeout((()=>{v.current&&(v.current(),v.current=null)}),80)):_({pulsate:n,rippleX:c,rippleY:l,rippleSize:f,cb:r})}),[a,_]),I=o.useCallback((()=>{E({},{pulsate:!0})}),[E]),S=o.useCallback(((t,e)=>{if(clearTimeout(y.current),"touchend"===t.type&&v.current)return v.current(),v.current=null,void(y.current=setTimeout((()=>{S(t,e)})));v.current=null,d((t=>t.length>0?t.slice(1):t)),g.current=e}),[]);return o.useImperativeHandle(e,(()=>({pulsate:I,start:E,stop:S})),[I,E,S]),Object(A.jsx)(D,Object(i.a)({className:Object(f.default)(s.root,k.root,u),ref:w},c,{children:Object(A.jsx)(b.a,{component:null,exit:!0,children:h})}))}));var U=F;function Q(t){return Object(_.a)("MuiButtonBase",t)}var G=Object(E.a)("MuiButtonBase",["root","disabled","focusVisible"]);const H=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],z=Object(c.a)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(G.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),q=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiButtonBase"}),{action:a,centerRipple:s=!1,children:c,className:h,component:d="button",disabled:y=!1,disableRipple:b=!1,disableTouchRipple:v=!1,focusRipple:w=!1,LinkComponent:_="a",onBlur:E,onClick:I,onContextMenu:S,onDragLeave:M,onFocus:C,onFocusVisible:k,onKeyDown:x,onKeyUp:B,onMouseDown:O,onMouseLeave:T,onMouseUp:R,onTouchEnd:P,onTouchMove:N,onTouchStart:j,tabIndex:D=0,TouchRippleProps:L,touchRippleRef:F,type:G}=r,q=Object(n.a)(r,H),K=o.useRef(null),V=o.useRef(null),W=Object(p.a)(V,F),{isFocusVisibleRef:J,onFocus:Y,onBlur:X,ref:Z}=Object(m.a)(),[$,tt]=o.useState(!1);y&&$&&tt(!1),o.useImperativeHandle(a,(()=>({focusVisible:()=>{tt(!0),K.current.focus()}})),[]);const[et,rt]=o.useState(!1);o.useEffect((()=>{rt(!0)}),[]);const nt=et&&!b&&!y;function it(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;return Object(g.a)((n=>{e&&e(n);return!r&&V.current&&V.current[t](n),!0}))}o.useEffect((()=>{$&&w&&!b&&et&&V.current.pulsate()}),[b,w,$,et]);const ot=it("start",O),at=it("stop",S),st=it("stop",M),ut=it("stop",R),ct=it("stop",(t=>{$&&t.preventDefault(),T&&T(t)})),lt=it("start",j),ft=it("stop",P),ht=it("stop",N),dt=it("stop",(t=>{X(t),!1===J.current&&tt(!1),E&&E(t)}),!1),pt=Object(g.a)((t=>{K.current||(K.current=t.currentTarget),Y(t),!0===J.current&&(tt(!0),k&&k(t)),C&&C(t)})),gt=()=>{const t=K.current;return d&&"button"!==d&&!("A"===t.tagName&&t.href)},mt=o.useRef(!1),yt=Object(g.a)((t=>{w&&!mt.current&&$&&V.current&&" "===t.key&&(mt.current=!0,V.current.stop(t,(()=>{V.current.start(t)}))),t.target===t.currentTarget&>()&&" "===t.key&&t.preventDefault(),x&&x(t),t.target===t.currentTarget&>()&&"Enter"===t.key&&!y&&(t.preventDefault(),I&&I(t))})),bt=Object(g.a)((t=>{w&&" "===t.key&&V.current&&$&&!t.defaultPrevented&&(mt.current=!1,V.current.stop(t,(()=>{V.current.pulsate(t)}))),B&&B(t),I&&t.target===t.currentTarget&>()&&" "===t.key&&!t.defaultPrevented&&I(t)}));let vt=d;"button"===vt&&(q.href||q.to)&&(vt=_);const At={};"button"===vt?(At.type=void 0===G?"button":G,At.disabled=y):(q.href||q.to||(At.role="button"),y&&(At["aria-disabled"]=y));const wt=Object(p.a)(Z,K),_t=Object(p.a)(e,wt);const Et=Object(i.a)({},r,{centerRipple:s,component:d,disabled:y,disableRipple:b,disableTouchRipple:v,focusRipple:w,tabIndex:D,focusVisible:$}),It=(t=>{const{disabled:e,focusVisible:r,focusVisibleClassName:n,classes:i}=t,o={root:["root",e&&"disabled",r&&"focusVisible"]},a=Object(u.a)(o,Q,i);return r&&n&&(a.root+=" ".concat(n)),a})(Et);return Object(A.jsxs)(z,Object(i.a)({as:vt,className:Object(f.default)(It.root,h),ownerState:Et,onBlur:dt,onClick:I,onContextMenu:at,onFocus:pt,onKeyDown:yt,onKeyUp:bt,onMouseDown:ot,onMouseLeave:ct,onMouseUp:ut,onDragLeave:st,onTouchEnd:ft,onTouchMove:ht,onTouchStart:lt,ref:_t,tabIndex:y?-1:D,type:G},At,q,{children:[c,nt?Object(A.jsx)(U,Object(i.a)({ref:W,center:s},L)):null]}))}));var K=q;function V(t){return Object(_.a)("MuiButton",t)}var W=Object(E.a)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","contained","containedInherit","containedPrimary","containedSecondary","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var J=o.createContext({});const Y=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],X=t=>Object(i.a)({},"small"===t.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===t.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===t.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),Z=Object(c.a)(K,{shouldForwardProp:t=>Object(c.b)(t)||"classes"===t,name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e["".concat(r.variant).concat(Object(a.a)(r.color))],e["size".concat(Object(a.a)(r.size))],e["".concat(r.variant,"Size").concat(Object(a.a)(r.size))],"inherit"===r.color&&e.colorInherit,r.disableElevation&&e.disableElevation,r.fullWidth&&e.fullWidth]}})((t=>{let{theme:e,ownerState:r}=t;var n,o;return Object(i.a)({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":Object(i.a)({textDecoration:"none",backgroundColor:e.vars?"rgba(".concat(e.vars.palette.text.primaryChannel," / ").concat(e.vars.palette.action.hoverOpacity,")"):Object(d.a)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===r.variant&&"inherit"!==r.color&&{backgroundColor:e.vars?"rgba(".concat(e.vars.palette[r.color].mainChannel," / ").concat(e.vars.palette.action.hoverOpacity,")"):Object(d.a)(e.palette[r.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===r.variant&&"inherit"!==r.color&&{border:"1px solid ".concat((e.vars||e).palette[r.color].main),backgroundColor:e.vars?"rgba(".concat(e.vars.palette[r.color].mainChannel," / ").concat(e.vars.palette.action.hoverOpacity,")"):Object(d.a)(e.palette[r.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===r.variant&&{backgroundColor:(e.vars||e).palette.grey.A100,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===r.variant&&"inherit"!==r.color&&{backgroundColor:(e.vars||e).palette[r.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[r.color].main}}),"&:active":Object(i.a)({},"contained"===r.variant&&{boxShadow:(e.vars||e).shadows[8]}),["&.".concat(W.focusVisible)]:Object(i.a)({},"contained"===r.variant&&{boxShadow:(e.vars||e).shadows[6]}),["&.".concat(W.disabled)]:Object(i.a)({color:(e.vars||e).palette.action.disabled},"outlined"===r.variant&&{border:"1px solid ".concat((e.vars||e).palette.action.disabledBackground)},"outlined"===r.variant&&"secondary"===r.color&&{border:"1px solid ".concat((e.vars||e).palette.action.disabled)},"contained"===r.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===r.variant&&{padding:"6px 8px"},"text"===r.variant&&"inherit"!==r.color&&{color:(e.vars||e).palette[r.color].main},"outlined"===r.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===r.variant&&"inherit"!==r.color&&{color:(e.vars||e).palette[r.color].main,border:e.vars?"1px solid rgba(".concat(e.vars.palette[r.color].mainChannel," / 0.5)"):"1px solid ".concat(Object(d.a)(e.palette[r.color].main,.5))},"contained"===r.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(o=e.palette).getContrastText)?void 0:n.call(o,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],boxShadow:(e.vars||e).shadows[2]},"contained"===r.variant&&"inherit"!==r.color&&{color:(e.vars||e).palette[r.color].contrastText,backgroundColor:(e.vars||e).palette[r.color].main},"inherit"===r.color&&{color:"inherit",borderColor:"currentColor"},"small"===r.size&&"text"===r.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===r.size&&"text"===r.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===r.size&&"outlined"===r.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===r.size&&"outlined"===r.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===r.size&&"contained"===r.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===r.size&&"contained"===r.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},r.fullWidth&&{width:"100%"})}),(t=>{let{ownerState:e}=t;return e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},["&.".concat(W.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(W.disabled)]:{boxShadow:"none"}}})),$=Object(c.a)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.startIcon,e["iconSize".concat(Object(a.a)(r.size))]]}})((t=>{let{ownerState:e}=t;return Object(i.a)({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},X(e))})),tt=Object(c.a)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.endIcon,e["iconSize".concat(Object(a.a)(r.size))]]}})((t=>{let{ownerState:e}=t;return Object(i.a)({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},X(e))}));var et=o.forwardRef((function(t,e){const r=o.useContext(J),s=Object(h.a)(r,t),c=Object(l.a)({props:s,name:"MuiButton"}),{children:d,color:p="primary",component:g="button",className:m,disabled:y=!1,disableElevation:b=!1,disableFocusRipple:v=!1,endIcon:w,focusVisibleClassName:_,fullWidth:E=!1,size:I="medium",startIcon:S,type:M,variant:C="text"}=c,k=Object(n.a)(c,Y),x=Object(i.a)({},c,{color:p,component:g,disabled:y,disableElevation:b,disableFocusRipple:v,fullWidth:E,size:I,type:M,variant:C}),B=(t=>{const{color:e,disableElevation:r,fullWidth:n,size:o,variant:s,classes:c}=t,l={root:["root",s,"".concat(s).concat(Object(a.a)(e)),"size".concat(Object(a.a)(o)),"".concat(s,"Size").concat(Object(a.a)(o)),"inherit"===e&&"colorInherit",r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["startIcon","iconSize".concat(Object(a.a)(o))],endIcon:["endIcon","iconSize".concat(Object(a.a)(o))]},f=Object(u.a)(l,V,c);return Object(i.a)({},c,f)})(x),O=S&&Object(A.jsx)($,{className:B.startIcon,ownerState:x,children:S}),T=w&&Object(A.jsx)(tt,{className:B.endIcon,ownerState:x,children:w});return Object(A.jsxs)(Z,Object(i.a)({ownerState:x,className:Object(f.default)(m,r.className),component:g,disabled:y,focusRipple:!v,focusVisibleClassName:Object(f.default)(B.focusVisible,_),ref:e,type:M},k,{classes:B,children:[O,d,T]}))}));function rt(t){return Object(_.a)("MuiCircularProgress",t)}var nt,it,ot,at;Object(E.a)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const st=["className","color","disableShrink","size","style","thickness","value","variant"];let ut,ct,lt,ft;const ht=44,dt=Object(v.c)(ut||(ut=nt||(nt=Object(y.a)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),pt=Object(v.c)(ct||(ct=it||(it=Object(y.a)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),gt=Object(c.a)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e["color".concat(Object(a.a)(r.color))]]}})((t=>{let{ownerState:e,theme:r}=t;return Object(i.a)({display:"inline-block"},"determinate"===e.variant&&{transition:r.transitions.create("transform")},"inherit"!==e.color&&{color:r.palette[e.color].main})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&Object(v.b)(lt||(lt=ot||(ot=Object(y.a)(["\n animation: "," 1.4s linear infinite;\n "]))),dt)})),mt=Object(c.a)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),yt=Object(c.a)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.circle,e["circle".concat(Object(a.a)(r.variant))],r.disableShrink&&e.circleDisableShrink]}})((t=>{let{ownerState:e,theme:r}=t;return Object(i.a)({stroke:"currentColor"},"determinate"===e.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&!e.disableShrink&&Object(v.b)(ft||(ft=at||(at=Object(y.a)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),pt)}));var bt=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:c=!1,size:h=40,style:d,thickness:p=3.6,value:g=0,variant:m="indeterminate"}=r,y=Object(n.a)(r,st),b=Object(i.a)({},r,{color:s,disableShrink:c,size:h,thickness:p,value:g,variant:m}),v=(t=>{const{classes:e,variant:r,color:n,disableShrink:i}=t,o={root:["root",r,"color".concat(Object(a.a)(n))],svg:["svg"],circle:["circle","circle".concat(Object(a.a)(r)),i&&"circleDisableShrink"]};return Object(u.a)(o,rt,e)})(b),w={},_={},E={};if("determinate"===m){const t=2*Math.PI*((ht-p)/2);w.strokeDasharray=t.toFixed(3),E["aria-valuenow"]=Math.round(g),w.strokeDashoffset="".concat(((100-g)/100*t).toFixed(3),"px"),_.transform="rotate(-90deg)"}return Object(A.jsx)(gt,Object(i.a)({className:Object(f.default)(v.root,o),style:Object(i.a)({width:h,height:h},_,d),ownerState:b,ref:e,role:"progressbar"},E,y,{children:Object(A.jsx)(mt,{className:v.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat(ht," ").concat(ht),children:Object(A.jsx)(yt,{className:v.circle,style:w,ownerState:b,cx:ht,cy:ht,r:(ht-p)/2,fill:"none",strokeWidth:p})})}))}));function vt(t){return Object(_.a)("MuiLoadingButton",t)}var At=Object(E.a)("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);const wt=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],_t=Object(c.a)(et,{shouldForwardProp:t=>(t=>"ownerState"!==t&&"theme"!==t&&"sx"!==t&&"as"!==t&&"classes"!==t)(t)||"classes"===t,name:"MuiLoadingButton",slot:"Root",overridesResolver:(t,e)=>[e.root,e.startIconLoadingStart&&{["& .".concat(At.startIconLoadingStart)]:e.startIconLoadingStart},e.endIconLoadingEnd&&{["& .".concat(At.endIconLoadingEnd)]:e.endIconLoadingEnd}]})((t=>{let{ownerState:e,theme:r}=t;return Object(i.a)({["& .".concat(At.startIconLoadingStart,", & .").concat(At.endIconLoadingEnd)]:{transition:r.transitions.create(["opacity"],{duration:r.transitions.duration.short}),opacity:0}},"center"===e.loadingPosition&&{transition:r.transitions.create(["background-color","box-shadow","border-color"],{duration:r.transitions.duration.short}),["&.".concat(At.loading)]:{color:"transparent"}},"start"===e.loadingPosition&&e.fullWidth&&{["& .".concat(At.startIconLoadingStart,", & .").concat(At.endIconLoadingEnd)]:{transition:r.transitions.create(["opacity"],{duration:r.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===e.loadingPosition&&e.fullWidth&&{["& .".concat(At.startIconLoadingStart,", & .").concat(At.endIconLoadingEnd)]:{transition:r.transitions.create(["opacity"],{duration:r.transitions.duration.short}),opacity:0,marginLeft:-8}})})),Et=Object(c.a)("div",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.loadingIndicator,e["loadingIndicator".concat(Object(a.a)(r.loadingPosition))]]}})((t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({position:"absolute",visibility:"visible",display:"flex"},"start"===r.loadingPosition&&("outlined"===r.variant||"contained"===r.variant)&&{left:"small"===r.size?10:14},"start"===r.loadingPosition&&"text"===r.variant&&{left:6},"center"===r.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:e.palette.action.disabled},"end"===r.loadingPosition&&("outlined"===r.variant||"contained"===r.variant)&&{right:"small"===r.size?10:14},"end"===r.loadingPosition&&"text"===r.variant&&{right:6},"start"===r.loadingPosition&&r.fullWidth&&{position:"relative",left:-10},"end"===r.loadingPosition&&r.fullWidth&&{position:"relative",right:-10})})),It=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiLoadingButton"}),{children:c,disabled:f=!1,id:h,loading:d=!1,loadingIndicator:p,loadingPosition:g="center",variant:m="text"}=r,y=Object(n.a)(r,wt),b=Object(s.a)(h),v=null!=p?p:Object(A.jsx)(bt,{"aria-labelledby":b,color:"inherit",size:16}),w=Object(i.a)({},r,{disabled:f,loading:d,loadingIndicator:v,loadingPosition:g,variant:m}),_=(t=>{const{loading:e,loadingPosition:r,classes:n}=t,o={root:["root",e&&"loading"],startIcon:[e&&"startIconLoading".concat(Object(a.a)(r))],endIcon:[e&&"endIconLoading".concat(Object(a.a)(r))],loadingIndicator:["loadingIndicator",e&&"loadingIndicator".concat(Object(a.a)(r))]},s=Object(u.a)(o,vt,n);return Object(i.a)({},n,s)})(w);return Object(A.jsx)(_t,Object(i.a)({disabled:f||d,id:b,ref:e},y,{variant:m,classes:_,ownerState:w,children:"end"===w.loadingPosition?Object(A.jsxs)(o.Fragment,{children:[c,d&&Object(A.jsx)(Et,{className:_.loadingIndicator,ownerState:w,children:v})]}):Object(A.jsxs)(o.Fragment,{children:[d&&Object(A.jsx)(Et,{className:_.loadingIndicator,ownerState:w,children:v}),c]})}))}));e.a=It},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(3414),c=r(22),l=r(37),f=r(36),h=r(3453),d=r(772),p=r(982);function g(t){return Object(d.a)("MuiAlert",t)}var m,y=Object(p.a)("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),b=r(3455),v=r(139),A=r(0),w=Object(v.a)(Object(A.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),_=Object(v.a)(Object(A.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),E=Object(v.a)(Object(A.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),I=Object(v.a)(Object(A.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),S=Object(v.a)(Object(A.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const M=["action","children","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"],C=Object(c.a)(h.a,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e["".concat(r.variant).concat(Object(f.a)(r.color||r.severity))]]}})((t=>{let{theme:e,ownerState:r}=t;const n="light"===e.palette.mode?u.b:u.d,o="light"===e.palette.mode?u.d:u.b,a=r.color||r.severity;return Object(i.a)({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},a&&"standard"===r.variant&&{color:n(e.palette[a].light,.6),backgroundColor:o(e.palette[a].light,.9),["& .".concat(y.icon)]:{color:"dark"===e.palette.mode?e.palette[a].main:e.palette[a].light}},a&&"outlined"===r.variant&&{color:n(e.palette[a].light,.6),border:"1px solid ".concat(e.palette[a].light),["& .".concat(y.icon)]:{color:"dark"===e.palette.mode?e.palette[a].main:e.palette[a].light}},a&&"filled"===r.variant&&{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:"dark"===e.palette.mode?e.palette[a].dark:e.palette[a].main})})),k=Object(c.a)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),x=Object(c.a)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0"}),B=Object(c.a)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),O={success:Object(A.jsx)(w,{fontSize:"inherit"}),warning:Object(A.jsx)(_,{fontSize:"inherit"}),error:Object(A.jsx)(E,{fontSize:"inherit"}),info:Object(A.jsx)(I,{fontSize:"inherit"})},T=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiAlert"}),{action:o,children:u,className:c,closeText:h="Close",color:d,icon:p,iconMapping:y=O,onClose:v,role:w="alert",severity:_="success",variant:E="standard"}=r,I=Object(n.a)(r,M),T=Object(i.a)({},r,{color:d,severity:_,variant:E}),R=(t=>{const{variant:e,color:r,severity:n,classes:i}=t,o={root:["root","".concat(e).concat(Object(f.a)(r||n)),"".concat(e)],icon:["icon"],message:["message"],action:["action"]};return Object(s.a)(o,g,i)})(T);return Object(A.jsxs)(C,Object(i.a)({role:w,elevation:0,ownerState:T,className:Object(a.default)(R.root,c),ref:e},I,{children:[!1!==p?Object(A.jsx)(k,{ownerState:T,className:R.icon,children:p||y[_]||O[_]}):null,Object(A.jsx)(x,{ownerState:T,className:R.message,children:u}),null!=o?Object(A.jsx)(B,{className:R.action,children:o}):null,null==o&&v?Object(A.jsx)(B,{ownerState:T,className:R.action,children:Object(A.jsx)(b.a,{size:"small","aria-label":h,title:h,color:"inherit",onClick:v,children:m||(m=Object(A.jsx)(S,{fontSize:"small"}))})}):null]}))}));e.a=T},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(1464),s=r(3414),u=r(26),c=r(36),l=r(22),f=r(449),h=r(227),d=r(3441),p=r(772),g=r(982);function m(t){return Object(p.a)("PrivateSwitchBase",t)}Object(g.a)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var y=r(0);const b=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],v=Object(l.a)(d.a)((t=>{let{ownerState:e}=t;return Object(i.a)({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12})})),A=Object(l.a)("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1});var w=o.forwardRef((function(t,e){const{autoFocus:r,checked:o,checkedIcon:s,className:l,defaultChecked:d,disabled:p,disableFocusRipple:g=!1,edge:w=!1,icon:_,id:E,inputProps:I,inputRef:S,name:M,onBlur:C,onChange:k,onFocus:x,readOnly:B,required:O,tabIndex:T,type:R,value:P}=t,N=Object(n.a)(t,b),[j,D]=Object(f.a)({controlled:o,default:Boolean(d),name:"SwitchBase",state:"checked"}),L=Object(h.a)();let F=p;L&&"undefined"===typeof F&&(F=L.disabled);const U="checkbox"===R||"radio"===R,Q=Object(i.a)({},t,{checked:j,disabled:F,disableFocusRipple:g,edge:w}),G=(t=>{const{classes:e,checked:r,disabled:n,edge:i}=t,o={root:["root",r&&"checked",n&&"disabled",i&&"edge".concat(Object(c.a)(i))],input:["input"]};return Object(a.a)(o,m,e)})(Q);return Object(y.jsxs)(v,Object(i.a)({component:"span",className:Object(u.default)(G.root,l),centerRipple:!0,focusRipple:!g,disabled:F,tabIndex:null,role:void 0,onFocus:t=>{x&&x(t),L&&L.onFocus&&L.onFocus(t)},onBlur:t=>{C&&C(t),L&&L.onBlur&&L.onBlur(t)},ownerState:Q,ref:e},N,{children:[Object(y.jsx)(A,Object(i.a)({autoFocus:r,checked:o,defaultChecked:d,className:G.input,disabled:F,id:U&&E,name:M,onChange:t=>{if(t.nativeEvent.defaultPrevented)return;const e=t.target.checked;D(e),k&&k(t,e)},readOnly:B,ref:S,required:O,ownerState:Q,tabIndex:T,type:R},"checkbox"===R&&void 0===P?{}:{value:P},I)),j?s:_]}))})),_=r(139),E=Object(_.a)(Object(y.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),I=Object(_.a)(Object(y.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),S=Object(_.a)(Object(y.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),M=r(37);function C(t){return Object(p.a)("MuiCheckbox",t)}var k=Object(g.a)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]);const x=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size"],B=Object(l.a)(w,{shouldForwardProp:t=>Object(l.b)(t)||"classes"===t,name:"MuiCheckbox",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.indeterminate&&e.indeterminate,"default"!==r.color&&e["color".concat(Object(c.a)(r.color))]]}})((t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({color:e.palette.text.secondary},!r.disableRipple&&{"&:hover":{backgroundColor:Object(s.a)("default"===r.color?e.palette.action.active:e.palette[r.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==r.color&&{["&.".concat(k.checked,", &.").concat(k.indeterminate)]:{color:e.palette[r.color].main},["&.".concat(k.disabled)]:{color:e.palette.action.disabled}})})),O=Object(y.jsx)(I,{}),T=Object(y.jsx)(E,{}),R=Object(y.jsx)(S,{}),P=o.forwardRef((function(t,e){var r,s;const u=Object(M.a)({props:t,name:"MuiCheckbox"}),{checkedIcon:l=O,color:f="primary",icon:h=T,indeterminate:d=!1,indeterminateIcon:p=R,inputProps:g,size:m="medium"}=u,b=Object(n.a)(u,x),v=d?p:h,A=d?p:l,w=Object(i.a)({},u,{color:f,indeterminate:d,size:m}),_=(t=>{const{classes:e,indeterminate:r,color:n}=t,o={root:["root",r&&"indeterminate","color".concat(Object(c.a)(n))]},s=Object(a.a)(o,C,e);return Object(i.a)({},e,s)})(w);return Object(y.jsx)(B,Object(i.a)({type:"checkbox",inputProps:Object(i.a)({"data-indeterminate":d},g),icon:o.cloneElement(v,{fontSize:null!=(r=v.props.fontSize)?r:m}),checkedIcon:o.cloneElement(A,{fontSize:null!=(s=A.props.fontSize)?s:m}),ownerState:w,ref:e},b,{classes:_}))}));e.a=P},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(22),c=r(37),l=r(139),f=r(0),h=Object(l.a)(Object(f.jsx)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),d=Object(l.a)(Object(f.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning"),p=r(1468),g=r(772),m=r(982);function y(t){return Object(g.a)("MuiStepIcon",t)}var b,v=Object(m.a)("MuiStepIcon",["root","active","completed","error","text"]);const A=["active","className","completed","error","icon"],w=Object(u.a)(p.a,{name:"MuiStepIcon",slot:"Root",overridesResolver:(t,e)=>e.root})((t=>{let{theme:e}=t;return{display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:e.palette.text.disabled,["&.".concat(v.completed)]:{color:e.palette.primary.main},["&.".concat(v.active)]:{color:e.palette.primary.main},["&.".concat(v.error)]:{color:e.palette.error.main}}})),_=Object(u.a)("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(t,e)=>e.text})((t=>{let{theme:e}=t;return{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}}));var E=o.forwardRef((function(t,e){const r=Object(c.a)({props:t,name:"MuiStepIcon"}),{active:o=!1,className:u,completed:l=!1,error:p=!1,icon:g}=r,m=Object(n.a)(r,A),v=Object(i.a)({},r,{active:o,completed:l,error:p}),E=(t=>{const{classes:e,active:r,completed:n,error:i}=t,o={root:["root",r&&"active",n&&"completed",i&&"error"],text:["text"]};return Object(s.a)(o,y,e)})(v);if("number"===typeof g||"string"===typeof g){const t=Object(a.default)(u,E.root);return p?Object(f.jsx)(w,Object(i.a)({as:d,className:t,ref:e,ownerState:v},m)):l?Object(f.jsx)(w,Object(i.a)({as:h,className:t,ref:e,ownerState:v},m)):Object(f.jsxs)(w,Object(i.a)({className:t,ref:e,ownerState:v},m,{children:[b||(b=Object(f.jsx)("circle",{cx:"12",cy:"12",r:"12"})),Object(f.jsx)(_,{className:E.text,x:"12",y:"16",textAnchor:"middle",ownerState:v,children:g})]}))}return g})),I=r(394),S=r(516);function M(t){return Object(g.a)("MuiStepLabel",t)}var C=Object(m.a)("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]);const k=["children","className","componentsProps","error","icon","optional","StepIconComponent","StepIconProps"],x=Object(u.a)("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.orientation]]}})((t=>{let{ownerState:e}=t;return Object(i.a)({display:"flex",alignItems:"center",["&.".concat(C.alternativeLabel)]:{flexDirection:"column"},["&.".concat(C.disabled)]:{cursor:"default"}},"vertical"===e.orientation&&{textAlign:"left",padding:"8px 0"})})),B=Object(u.a)("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(t,e)=>e.label})((t=>{let{theme:e}=t;return Object(i.a)({},e.typography.body2,{display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),["&.".concat(C.active)]:{color:e.palette.text.primary,fontWeight:500},["&.".concat(C.completed)]:{color:e.palette.text.primary,fontWeight:500},["&.".concat(C.alternativeLabel)]:{textAlign:"center",marginTop:16},["&.".concat(C.error)]:{color:e.palette.error.main}})})),O=Object(u.a)("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(t,e)=>e.iconContainer})((()=>({flexShrink:0,display:"flex",paddingRight:8,["&.".concat(C.alternativeLabel)]:{paddingRight:0}}))),T=Object(u.a)("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(t,e)=>e.labelContainer})((t=>{let{theme:e}=t;return{width:"100%",color:e.palette.text.secondary}})),R=o.forwardRef((function(t,e){const r=Object(c.a)({props:t,name:"MuiStepLabel"}),{children:u,className:l,componentsProps:h={},error:d=!1,icon:p,optional:g,StepIconComponent:m,StepIconProps:y}=r,b=Object(n.a)(r,k),{alternativeLabel:v,orientation:A}=o.useContext(I.a),{active:w,disabled:_,completed:C,icon:R}=o.useContext(S.a),P=p||R;let N=m;P&&!N&&(N=E);const j=Object(i.a)({},r,{active:w,alternativeLabel:v,completed:C,disabled:_,error:d,orientation:A}),D=(t=>{const{classes:e,orientation:r,active:n,completed:i,error:o,disabled:a,alternativeLabel:u}=t,c={root:["root",r,o&&"error",a&&"disabled",u&&"alternativeLabel"],label:["label",n&&"active",i&&"completed",o&&"error",a&&"disabled",u&&"alternativeLabel"],iconContainer:["iconContainer",u&&"alternativeLabel"],labelContainer:["labelContainer"]};return Object(s.a)(c,M,e)})(j);return Object(f.jsxs)(x,Object(i.a)({className:Object(a.default)(D.root,l),ref:e,ownerState:j},b,{children:[P||N?Object(f.jsx)(O,{className:D.iconContainer,ownerState:j,children:Object(f.jsx)(N,Object(i.a)({completed:C,active:w,error:d,icon:P},y))}):null,Object(f.jsxs)(T,{className:D.labelContainer,ownerState:j,children:[u?Object(f.jsx)(B,Object(i.a)({className:D.label,ownerState:j},h.label,{children:u})):null,g]})]}))}));R.muiName="StepLabel";e.a=R},function(t,e,r){"use strict";var n=r(1453),i=r.n(n),o=r(1454),a=r.n(o),s=r(25),u=r.n(s),c=r(4),l=r.n(c),f=r(704),h=r.n(f);function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return function(t){if(0===t.length||1===t.length)return t;var e=t.join(".");return g[e]||(g[e]=function(t){var e=t.length;return 0===e||1===e?t:2===e?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===e?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:e>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0}(t)),g[e]}(t.filter((function(t){return"token"!==t}))).reduce((function(t,e){return p(p({},t),r[e])}),e)}function y(t){return t.join(" ")}function b(t){var e=t.node,r=t.stylesheet,n=t.style,i=void 0===n?{}:n,o=t.useInlineStyles,a=t.key,s=e.properties,u=e.type,c=e.tagName,f=e.value;if("text"===u)return f;if(c){var d,g=function(t,e){var r=0;return function(n){return r+=1,n.map((function(n,i){return b({node:n,stylesheet:t,useInlineStyles:e,key:"code-segment-".concat(r,"-").concat(i)})}))}}(r,o);if(o){var v=Object.keys(r).reduce((function(t,e){return e.split(".").forEach((function(e){t.includes(e)||t.push(e)})),t}),[]),A=s.className&&s.className.includes("token")?["token"]:[],w=s.className&&A.concat(s.className.filter((function(t){return!v.includes(t)})));d=p(p({},s),{},{className:y(w)||void 0,style:m(s.className,Object.assign({},s.style,i),r)})}else d=p(p({},s),{},{className:y(s.className)});var _=g(e.children);return l.a.createElement(c,h()({key:a},d),_)}}var v=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=0;n2&&void 0!==arguments[2]?arguments[2]:[];return e||c.length>0?function(t,e){return M({children:t,lineNumber:e,lineNumberStyle:s,largestLineNumber:a,showInlineLineNumbers:i,lineProps:r,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:n,wrapLongLines:u})}(t,o,c):function(t,e){if(n&&e&&i){var r=S(s,e,a);t.unshift(I(e,r))}return t}(t,o)}for(var g=function(){var t=l[d],e=t.children[0].value;if(e.match(_)){var r=e.split("\n");r.forEach((function(e,i){var a=n&&f.length+o,s={type:"text",value:"".concat(e,"\n")};if(0===i){var u=p(l.slice(h+1,d).concat(M({children:[s],className:t.properties.className})),a);f.push(u)}else if(i===r.length-1){var c=l[d+1]&&l[d+1].children&&l[d+1].children[0],g={type:"text",value:"".concat(e)};if(c){var m=M({children:[g],className:t.properties.className});l.splice(d+1,0,m)}else{var y=p([g],a,t.properties.className);f.push(y)}}else{var b=p([s],a,t.properties.className);f.push(b)}})),h=d}d++};d code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},function(t){var e=t.language,r=t.children,n=t.style,o=void 0===n?T:n,a=t.customStyle,s=void 0===a?{}:a,u=t.codeTagProps,c=void 0===u?{className:e?"language-".concat(e):void 0,style:w(w({},o['code[class*="language-"]']),o['code[class*="language-'.concat(e,'"]')])}:u,f=t.useInlineStyles,h=void 0===f||f,d=t.showLineNumbers,p=void 0!==d&&d,g=t.showInlineLineNumbers,m=void 0===g||g,y=t.startingLineNumber,b=void 0===y?1:y,A=t.lineNumberContainerStyle,_=t.lineNumberStyle,I=void 0===_?{}:_,S=t.wrapLines,M=t.wrapLongLines,C=void 0!==M&&M,R=t.lineProps,P=void 0===R?{}:R,N=t.renderer,j=t.PreTag,D=void 0===j?"pre":j,L=t.CodeTag,F=void 0===L?"code":L,U=t.code,Q=void 0===U?(Array.isArray(r)?r[0]:r)||"":U,G=t.astGenerator,H=i()(t,v);G=G||O;var z=p?l.a.createElement(E,{containerStyle:A,codeStyle:c.style||{},numberStyle:I,startingLineNumber:b,codeString:Q}):null,q=o.hljs||o['pre[class*="language-"]']||{backgroundColor:"#fff"},K=B(G)?"hljs":"prismjs",V=h?Object.assign({},H,{style:Object.assign({},q,s)}):Object.assign({},H,{className:H.className?"".concat(K," ").concat(H.className):K,style:Object.assign({},s)});if(c.style=w(w({},c.style),{},C?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!G)return l.a.createElement(D,V,z,l.a.createElement(F,c,Q));(void 0===S&&N||C)&&(S=!0),N=N||x;var W=[{type:"text",value:Q}],J=function(t){var e=t.astGenerator,r=t.language,n=t.code,i=t.defaultCodeValue;if(B(e)){var o=function(t,e){return-1!==t.listLanguages().indexOf(e)}(e,r);return"text"===r?{value:i,language:"text"}:o?e.highlight(r,n):e.highlightAuto(n)}try{return r&&"text"!==r?{value:e.highlight(n,r)}:{value:i}}catch(a){return{value:i}}}({astGenerator:G,language:e,code:Q,defaultCodeValue:W});null===J.language&&(J.value=W);var Y=k(J,S,P,p,m,b,J.value.length+b,I,C);return l.a.createElement(D,V,l.a.createElement(F,c,!m&&z,N({rows:Y,stylesheet:o,useInlineStyles:h})))});P.supportedLanguages=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apex","apl","applescript","aql","arduino","arff","asciidoc","asm6502","asmatmel","aspnet","autohotkey","autoit","avisynth","avro-idl","bash","basic","batch","bbcode","bicep","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cfscript","chaiscript","cil","clike","clojure","cmake","cobol","coffeescript","concurnas","coq","cpp","crystal","csharp","cshtml","csp","css-extras","css","csv","cypher","d","dart","dataweave","dax","dhall","diff","django","dns-zone-file","docker","dot","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","false","firestore-security-rules","flow","fortran","fsharp","ftl","gap","gcode","gdscript","gedcom","gherkin","git","glsl","gml","gn","go-module","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hoon","hpkp","hsts","http","ichigojam","icon","icu-message-format","idris","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jexl","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keepalived","keyman","kotlin","kumir","kusto","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","log","lolcode","lua","magma","makefile","markdown","markup-templating","markup","matlab","maxscript","mel","mermaid","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nevod","nginx","nim","nix","nsis","objectivec","ocaml","opencl","openqasm","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","promql","properties","protobuf","psl","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","qsharp","r","racket","reason","regex","rego","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","squirrel","stan","stylus","swift","systemd","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tremor","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","uorazor","uri","v","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","web-idl","wiki","wolfram","wren","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];e.a=P},function(t,e,r){"use strict";var n=r(10),i=r(28),o=r(4),a=r(26),s=r(1464),u=r(22),c=r(37),l=r(104),f=r(455),h=r(508),d=r(143),p=r(3448),g=r(432),m=r(0);var y=function(t){const{className:e,classes:r,pulsate:n=!1,rippleX:i,rippleY:s,rippleSize:u,in:c,onExited:l,timeout:f}=t,[h,d]=o.useState(!1),p=Object(a.default)(e,r.ripple,r.rippleVisible,n&&r.ripplePulsate),g={width:u,height:u,top:-u/2+s,left:-u/2+i},y=Object(a.default)(r.child,h&&r.childLeaving,n&&r.childPulsate);return c||h||d(!0),o.useEffect((()=>{if(!c&&null!=l){const t=setTimeout(l,f);return()=>{clearTimeout(t)}}}),[l,c,f]),Object(m.jsx)("span",{className:p,style:g,children:Object(m.jsx)("span",{className:y})})},b=r(772),v=r(982);var A,w,_,E,I=Object(v.a)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);const S=["center","classes","className"];let M,C,k,x;const B=Object(g.c)(M||(M=A||(A=Object(d.a)(["\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n"])))),O=Object(g.c)(C||(C=w||(w=Object(d.a)(["\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n"])))),T=Object(g.c)(k||(k=_||(_=Object(d.a)(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])))),R=Object(u.a)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),P=Object(u.a)(y,{name:"MuiTouchRipple",slot:"Ripple"})(x||(x=E||(E=Object(d.a)(["\n opacity: 0;\n position: absolute;\n\n &."," {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n &."," {\n animation-duration: ","ms;\n }\n\n & ."," {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & ."," {\n opacity: 0;\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n & ."," {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ",";\n animation-duration: 2500ms;\n animation-timing-function: ",";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n"]))),I.rippleVisible,B,550,(t=>{let{theme:e}=t;return e.transitions.easing.easeInOut}),I.ripplePulsate,(t=>{let{theme:e}=t;return e.transitions.duration.shorter}),I.child,I.childLeaving,O,550,(t=>{let{theme:e}=t;return e.transitions.easing.easeInOut}),I.childPulsate,T,(t=>{let{theme:e}=t;return e.transitions.easing.easeInOut})),N=o.forwardRef((function(t,e){const r=Object(c.a)({props:t,name:"MuiTouchRipple"}),{center:s=!1,classes:u={},className:l}=r,f=Object(i.a)(r,S),[h,d]=o.useState([]),g=o.useRef(0),y=o.useRef(null);o.useEffect((()=>{y.current&&(y.current(),y.current=null)}),[h]);const b=o.useRef(!1),v=o.useRef(null),A=o.useRef(null),w=o.useRef(null);o.useEffect((()=>()=>{clearTimeout(v.current)}),[]);const _=o.useCallback((t=>{const{pulsate:e,rippleX:r,rippleY:n,rippleSize:i,cb:o}=t;d((t=>[...t,Object(m.jsx)(P,{classes:{ripple:Object(a.default)(u.ripple,I.ripple),rippleVisible:Object(a.default)(u.rippleVisible,I.rippleVisible),ripplePulsate:Object(a.default)(u.ripplePulsate,I.ripplePulsate),child:Object(a.default)(u.child,I.child),childLeaving:Object(a.default)(u.childLeaving,I.childLeaving),childPulsate:Object(a.default)(u.childPulsate,I.childPulsate)},timeout:550,pulsate:e,rippleX:r,rippleY:n,rippleSize:i},g.current)])),g.current+=1,y.current=o}),[u]),E=o.useCallback((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;const{pulsate:n=!1,center:i=s||e.pulsate,fakeElement:o=!1}=e;if("mousedown"===t.type&&b.current)return void(b.current=!1);"touchstart"===t.type&&(b.current=!0);const a=o?null:w.current,u=a?a.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,l,f;if(i||0===t.clientX&&0===t.clientY||!t.clientX&&!t.touches)c=Math.round(u.width/2),l=Math.round(u.height/2);else{const{clientX:e,clientY:r}=t.touches?t.touches[0]:t;c=Math.round(e-u.left),l=Math.round(r-u.top)}if(i)f=Math.sqrt((2*u.width**2+u.height**2)/3),f%2===0&&(f+=1);else{const t=2*Math.max(Math.abs((a?a.clientWidth:0)-c),c)+2,e=2*Math.max(Math.abs((a?a.clientHeight:0)-l),l)+2;f=Math.sqrt(t**2+e**2)}t.touches?null===A.current&&(A.current=()=>{_({pulsate:n,rippleX:c,rippleY:l,rippleSize:f,cb:r})},v.current=setTimeout((()=>{A.current&&(A.current(),A.current=null)}),80)):_({pulsate:n,rippleX:c,rippleY:l,rippleSize:f,cb:r})}),[s,_]),M=o.useCallback((()=>{E({},{pulsate:!0})}),[E]),C=o.useCallback(((t,e)=>{if(clearTimeout(v.current),"touchend"===t.type&&A.current)return A.current(),A.current=null,void(v.current=setTimeout((()=>{C(t,e)})));A.current=null,d((t=>t.length>0?t.slice(1):t)),y.current=e}),[]);return o.useImperativeHandle(e,(()=>({pulsate:M,start:E,stop:C})),[M,E,C]),Object(m.jsx)(R,Object(n.a)({className:Object(a.default)(u.root,I.root,l),ref:w},f,{children:Object(m.jsx)(p.a,{component:null,exit:!0,children:h})}))}));var j=N;function D(t){return Object(b.a)("MuiButtonBase",t)}var L=Object(v.a)("MuiButtonBase",["root","disabled","focusVisible"]);const F=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],U=Object(u.a)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(L.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Q=o.forwardRef((function(t,e){const r=Object(c.a)({props:t,name:"MuiButtonBase"}),{action:u,centerRipple:d=!1,children:p,className:g,component:y="button",disabled:b=!1,disableRipple:v=!1,disableTouchRipple:A=!1,focusRipple:w=!1,LinkComponent:_="a",onBlur:E,onClick:I,onContextMenu:S,onDragLeave:M,onFocus:C,onFocusVisible:k,onKeyDown:x,onKeyUp:B,onMouseDown:O,onMouseLeave:T,onMouseUp:R,onTouchEnd:P,onTouchMove:N,onTouchStart:L,tabIndex:Q=0,TouchRippleProps:G,touchRippleRef:H,type:z}=r,q=Object(i.a)(r,F),K=o.useRef(null),V=o.useRef(null),W=Object(l.a)(V,H),{isFocusVisibleRef:J,onFocus:Y,onBlur:X,ref:Z}=Object(h.a)(),[$,tt]=o.useState(!1);b&&$&&tt(!1),o.useImperativeHandle(u,(()=>({focusVisible:()=>{tt(!0),K.current.focus()}})),[]);const[et,rt]=o.useState(!1);o.useEffect((()=>{rt(!0)}),[]);const nt=et&&!v&&!b;function it(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A;return Object(f.a)((n=>{e&&e(n);return!r&&V.current&&V.current[t](n),!0}))}o.useEffect((()=>{$&&w&&!v&&et&&V.current.pulsate()}),[v,w,$,et]);const ot=it("start",O),at=it("stop",S),st=it("stop",M),ut=it("stop",R),ct=it("stop",(t=>{$&&t.preventDefault(),T&&T(t)})),lt=it("start",L),ft=it("stop",P),ht=it("stop",N),dt=it("stop",(t=>{X(t),!1===J.current&&tt(!1),E&&E(t)}),!1),pt=Object(f.a)((t=>{K.current||(K.current=t.currentTarget),Y(t),!0===J.current&&(tt(!0),k&&k(t)),C&&C(t)})),gt=()=>{const t=K.current;return y&&"button"!==y&&!("A"===t.tagName&&t.href)},mt=o.useRef(!1),yt=Object(f.a)((t=>{w&&!mt.current&&$&&V.current&&" "===t.key&&(mt.current=!0,V.current.stop(t,(()=>{V.current.start(t)}))),t.target===t.currentTarget&>()&&" "===t.key&&t.preventDefault(),x&&x(t),t.target===t.currentTarget&>()&&"Enter"===t.key&&!b&&(t.preventDefault(),I&&I(t))})),bt=Object(f.a)((t=>{w&&" "===t.key&&V.current&&$&&!t.defaultPrevented&&(mt.current=!1,V.current.stop(t,(()=>{V.current.pulsate(t)}))),B&&B(t),I&&t.target===t.currentTarget&>()&&" "===t.key&&!t.defaultPrevented&&I(t)}));let vt=y;"button"===vt&&(q.href||q.to)&&(vt=_);const At={};"button"===vt?(At.type=void 0===z?"button":z,At.disabled=b):(q.href||q.to||(At.role="button"),b&&(At["aria-disabled"]=b));const wt=Object(l.a)(Z,K),_t=Object(l.a)(e,wt);const Et=Object(n.a)({},r,{centerRipple:d,component:y,disabled:b,disableRipple:v,disableTouchRipple:A,focusRipple:w,tabIndex:Q,focusVisible:$}),It=(t=>{const{disabled:e,focusVisible:r,focusVisibleClassName:n,classes:i}=t,o={root:["root",e&&"disabled",r&&"focusVisible"]},a=Object(s.a)(o,D,i);return r&&n&&(a.root+=" ".concat(n)),a})(Et);return Object(m.jsxs)(U,Object(n.a)({as:vt,className:Object(a.default)(It.root,g),ownerState:Et,onBlur:dt,onClick:I,onContextMenu:at,onFocus:pt,onKeyDown:yt,onKeyUp:bt,onMouseDown:ot,onMouseLeave:ct,onMouseUp:ut,onDragLeave:st,onTouchEnd:ft,onTouchMove:ht,onTouchStart:lt,ref:_t,tabIndex:b?-1:Q,type:z},At,q,{children:[p,nt?Object(m.jsx)(j,Object(n.a)({ref:W,center:d},G)):null]}))}));e.a=Q},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(752),c=r(3414),l=r(22),f=r(37),h=r(3441),d=r(527),p=r(393),g=r(104),m=r(215),y=r(772),b=r(982);function v(t){return Object(y.a)("MuiListItem",t)}var A=Object(b.a)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var w=Object(b.a)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function _(t){return Object(y.a)("MuiListItemSecondaryAction",t)}Object(b.a)("MuiListItemSecondaryAction",["root","disableGutters"]);var E=r(0);const I=["className"],S=Object(l.a)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.disableGutters&&e.disableGutters]}})((t=>{let{ownerState:e}=t;return Object(i.a)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})})),M=o.forwardRef((function(t,e){const r=Object(f.a)({props:t,name:"MuiListItemSecondaryAction"}),{className:u}=r,c=Object(n.a)(r,I),l=o.useContext(m.a),h=Object(i.a)({},r,{disableGutters:l.disableGutters}),d=(t=>{const{disableGutters:e,classes:r}=t,n={root:["root",e&&"disableGutters"]};return Object(s.a)(n,_,r)})(h);return Object(E.jsx)(S,Object(i.a)({className:Object(a.default)(d.root,u),ownerState:h,ref:e},c))}));M.muiName="ListItemSecondaryAction";var C=M;const k=["className"],x=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected"],B=Object(l.a)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.dense&&e.dense,"flex-start"===r.alignItems&&e.alignItemsFlexStart,r.divider&&e.divider,!r.disableGutters&&e.gutters,!r.disablePadding&&e.padding,r.button&&e.button,r.hasSecondaryAction&&e.secondaryAction]}})((t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!r.disablePadding&&Object(i.a)({paddingTop:8,paddingBottom:8},r.dense&&{paddingTop:4,paddingBottom:4},!r.disableGutters&&{paddingLeft:16,paddingRight:16},!!r.secondaryAction&&{paddingRight:48}),!!r.secondaryAction&&{["& > .".concat(w.root)]:{paddingRight:48}},{["&.".concat(A.focusVisible)]:{backgroundColor:e.palette.action.focus},["&.".concat(A.selected)]:{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.selectedOpacity),["&.".concat(A.focusVisible)]:{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},["&.".concat(A.disabled)]:{opacity:e.palette.action.disabledOpacity}},"flex-start"===r.alignItems&&{alignItems:"flex-start"},r.divider&&{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},r.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(A.selected,":hover")]:{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},r.hasSecondaryAction&&{paddingRight:48})})),O=Object(l.a)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),T=o.forwardRef((function(t,e){const r=Object(f.a)({props:t,name:"MuiListItem"}),{alignItems:c="center",autoFocus:l=!1,button:y=!1,children:b,className:w,component:_,components:I={},componentsProps:S={},ContainerComponent:M="li",ContainerProps:{className:T}={},dense:R=!1,disabled:P=!1,disableGutters:N=!1,disablePadding:j=!1,divider:D=!1,focusVisibleClassName:L,secondaryAction:F,selected:U=!1}=r,Q=Object(n.a)(r.ContainerProps,k),G=Object(n.a)(r,x),H=o.useContext(m.a),z={dense:R||H.dense||!1,alignItems:c,disableGutters:N},q=o.useRef(null);Object(p.a)((()=>{l&&q.current&&q.current.focus()}),[l]);const K=o.Children.toArray(b),V=K.length&&Object(d.a)(K[K.length-1],["ListItemSecondaryAction"]),W=Object(i.a)({},r,{alignItems:c,autoFocus:l,button:y,dense:z.dense,disabled:P,disableGutters:N,disablePadding:j,divider:D,hasSecondaryAction:V,selected:U}),J=(t=>{const{alignItems:e,button:r,classes:n,dense:i,disabled:o,disableGutters:a,disablePadding:u,divider:c,hasSecondaryAction:l,selected:f}=t,h={root:["root",i&&"dense",!a&&"gutters",!u&&"padding",c&&"divider",o&&"disabled",r&&"button","flex-start"===e&&"alignItemsFlexStart",l&&"secondaryAction",f&&"selected"],container:["container"]};return Object(s.a)(h,v,n)})(W),Y=Object(g.a)(q,e),X=I.Root||B,Z=S.root||{},$=Object(i.a)({className:Object(a.default)(J.root,Z.className,w),disabled:P},G);let tt=_||"li";return y&&($.component=_||"div",$.focusVisibleClassName=Object(a.default)(A.focusVisible,L),tt=h.a),V?(tt=$.component||_?tt:"div","li"===M&&("li"===tt?tt="div":"li"===$.component&&($.component="div")),Object(E.jsx)(m.a.Provider,{value:z,children:Object(E.jsxs)(O,Object(i.a)({as:M,className:Object(a.default)(J.container,T),ref:Y,ownerState:W},Q,{children:[Object(E.jsx)(X,Object(i.a)({},Z,!Object(u.a)(X)&&{as:tt,ownerState:Object(i.a)({},W,Z.ownerState)},$,{children:K})),K.pop()]}))})):Object(E.jsx)(m.a.Provider,{value:z,children:Object(E.jsxs)(X,Object(i.a)({},Z,{as:tt,ref:Y,ownerState:W},!Object(u.a)(X)&&{ownerState:Object(i.a)({},W,Z.ownerState)},$,{children:[K,F&&Object(E.jsx)(C,{children:F})]}))})}));e.a=T},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(37),c=r(22),l=r(772),f=r(982);function h(t){return Object(l.a)("MuiStepper",t)}Object(f.a)("MuiStepper",["root","horizontal","vertical","alternativeLabel"]);var d=r(36),p=r(394),g=r(516);function m(t){return Object(l.a)("MuiStepConnector",t)}Object(f.a)("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);var y=r(0);const b=["className"],v=Object(c.a)("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.orientation],r.alternativeLabel&&e.alternativeLabel,r.completed&&e.completed]}})((t=>{let{ownerState:e}=t;return Object(i.a)({flex:"1 1 auto"},"vertical"===e.orientation&&{marginLeft:12},e.alternativeLabel&&{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"})})),A=Object(c.a)("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.line,e["line".concat(Object(d.a)(r.orientation))]]}})((t=>{let{ownerState:e,theme:r}=t;return Object(i.a)({display:"block",borderColor:"light"===r.palette.mode?r.palette.grey[400]:r.palette.grey[600]},"horizontal"===e.orientation&&{borderTopStyle:"solid",borderTopWidth:1},"vertical"===e.orientation&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})}));var w=o.forwardRef((function(t,e){const r=Object(u.a)({props:t,name:"MuiStepConnector"}),{className:c}=r,l=Object(n.a)(r,b),{alternativeLabel:f,orientation:h="horizontal"}=o.useContext(p.a),{active:w,disabled:_,completed:E}=o.useContext(g.a),I=Object(i.a)({},r,{alternativeLabel:f,orientation:h,active:w,completed:E,disabled:_}),S=(t=>{const{classes:e,orientation:r,alternativeLabel:n,active:i,completed:o,disabled:a}=t,u={root:["root",r,n&&"alternativeLabel",i&&"active",o&&"completed",a&&"disabled"],line:["line","line".concat(Object(d.a)(r))]};return Object(s.a)(u,m,e)})(I);return Object(y.jsx)(v,Object(i.a)({className:Object(a.default)(S.root,c),ref:e,ownerState:I},l,{children:Object(y.jsx)(A,{className:S.line,ownerState:I})}))}));const _=["activeStep","alternativeLabel","children","className","connector","nonLinear","orientation"],E=Object(c.a)("div",{name:"MuiStepper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.orientation],r.alternativeLabel&&e.alternativeLabel]}})((t=>{let{ownerState:e}=t;return Object(i.a)({display:"flex"},"horizontal"===e.orientation&&{flexDirection:"row",alignItems:"center"},"vertical"===e.orientation&&{flexDirection:"column"},e.alternativeLabel&&{alignItems:"flex-start"})})),I=Object(y.jsx)(w,{}),S=o.forwardRef((function(t,e){const r=Object(u.a)({props:t,name:"MuiStepper"}),{activeStep:c=0,alternativeLabel:l=!1,children:f,className:d,connector:g=I,nonLinear:m=!1,orientation:b="horizontal"}=r,v=Object(n.a)(r,_),A=Object(i.a)({},r,{alternativeLabel:l,orientation:b}),w=(t=>{const{orientation:e,alternativeLabel:r,classes:n}=t,i={root:["root",e,r&&"alternativeLabel"]};return Object(s.a)(i,h,n)})(A),S=o.Children.toArray(f).filter(Boolean),M=S.map(((t,e)=>o.cloneElement(t,Object(i.a)({index:e,last:e+1===S.length},t.props)))),C=o.useMemo((()=>({activeStep:c,alternativeLabel:l,connector:g,nonLinear:m,orientation:b})),[c,l,g,m,b]);return Object(y.jsx)(p.a.Provider,{value:C,children:Object(y.jsx)(E,Object(i.a)({ownerState:A,className:Object(a.default)(w.root,d),ref:e},v,{children:M}))})}));e.a=S},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(153),u=r(3304),c=r(1464),l=r(22),f=r(37);var h=o.createContext(),d=r(772),p=r(982);function g(t){return Object(d.a)("MuiGrid",t)}const m=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];var y=Object(p.a)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((t=>"spacing-xs-".concat(t))),...["column-reverse","column","row-reverse","row"].map((t=>"direction-xs-".concat(t))),...["nowrap","wrap-reverse","wrap"].map((t=>"wrap-xs-".concat(t))),...m.map((t=>"grid-xs-".concat(t))),...m.map((t=>"grid-sm-".concat(t))),...m.map((t=>"grid-md-".concat(t))),...m.map((t=>"grid-lg-".concat(t))),...m.map((t=>"grid-xl-".concat(t)))]),b=r(0);const v=["className","columns","columnSpacing","component","container","direction","item","lg","md","rowSpacing","sm","spacing","wrap","xl","xs","zeroMinWidth"];function A(t){const e=parseFloat(t);return"".concat(e).concat(String(t).replace(String(e),"")||"px")}function w(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||!t||t<=0)return[];if("string"===typeof t&&!Number.isNaN(Number(t))||"number"===typeof t)return[r["spacing-xs-".concat(String(t))]||"spacing-xs-".concat(String(t))];const{xs:n,sm:i,md:o,lg:a,xl:s}=t;return[Number(n)>0&&(r["spacing-xs-".concat(String(n))]||"spacing-xs-".concat(String(n))),Number(i)>0&&(r["spacing-sm-".concat(String(i))]||"spacing-sm-".concat(String(i))),Number(o)>0&&(r["spacing-md-".concat(String(o))]||"spacing-md-".concat(String(o))),Number(a)>0&&(r["spacing-lg-".concat(String(a))]||"spacing-lg-".concat(String(a))),Number(s)>0&&(r["spacing-xl-".concat(String(s))]||"spacing-xl-".concat(String(s)))]}const _=Object(l.a)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{container:r,direction:n,item:i,lg:o,md:a,sm:s,spacing:u,wrap:c,xl:l,xs:f,zeroMinWidth:h}=t.ownerState;return[e.root,r&&e.container,i&&e.item,h&&e.zeroMinWidth,...w(u,r,e),"row"!==n&&e["direction-xs-".concat(String(n))],"wrap"!==c&&e["wrap-xs-".concat(String(c))],!1!==f&&e["grid-xs-".concat(String(f))],!1!==s&&e["grid-sm-".concat(String(s))],!1!==a&&e["grid-md-".concat(String(a))],!1!==o&&e["grid-lg-".concat(String(o))],!1!==l&&e["grid-xl-".concat(String(l))]]}})((t=>{let{ownerState:e}=t;return Object(i.a)({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap})}),(function(t){let{theme:e,ownerState:r}=t;const n=Object(s.d)({values:r.direction,breakpoints:e.breakpoints.values});return Object(s.b)({theme:e},n,(t=>{const e={flexDirection:t};return 0===t.indexOf("column")&&(e["& > .".concat(y.item)]={maxWidth:"none"}),e}))}),(function(t){let{theme:e,ownerState:r}=t;const{container:n,rowSpacing:i}=r;let o={};if(n&&0!==i){const t=Object(s.d)({values:i,breakpoints:e.breakpoints.values});o=Object(s.b)({theme:e},t,(t=>{const r=e.spacing(t);return"0px"!==r?{marginTop:"-".concat(A(r)),["& > .".concat(y.item)]:{paddingTop:A(r)}}:{}}))}return o}),(function(t){let{theme:e,ownerState:r}=t;const{container:n,columnSpacing:i}=r;let o={};if(n&&0!==i){const t=Object(s.d)({values:i,breakpoints:e.breakpoints.values});o=Object(s.b)({theme:e},t,(t=>{const r=e.spacing(t);return"0px"!==r?{width:"calc(100% + ".concat(A(r),")"),marginLeft:"-".concat(A(r)),["& > .".concat(y.item)]:{paddingLeft:A(r)}}:{}}))}return o}),(function(t){let e,{theme:r,ownerState:n}=t;return r.breakpoints.keys.reduce(((t,o)=>{let a={};if(n[o]&&(e=n[o]),!e)return t;if(!0===e)a={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===e)a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const u=Object(s.d)({values:n.columns,breakpoints:r.breakpoints.values}),c="object"===typeof u?u[o]:u;if(void 0===c||null===c)return t;const l="".concat(Math.round(e/c*1e8)/1e6,"%");let f={};if(n.container&&n.item&&0!==n.columnSpacing){const t=r.spacing(n.columnSpacing);if("0px"!==t){const e="calc(".concat(l," + ").concat(A(t),")");f={flexBasis:e,maxWidth:e}}}a=Object(i.a)({flexBasis:l,flexGrow:0,maxWidth:l},f)}return 0===r.breakpoints.values[o]?Object.assign(t,a):t[r.breakpoints.up(o)]=a,t}),{})})),E=o.forwardRef((function(t,e){const r=Object(f.a)({props:t,name:"MuiGrid"}),s=Object(u.a)(r),{className:l,columns:d,columnSpacing:p,component:m="div",container:y=!1,direction:A="row",item:E=!1,lg:I=!1,md:S=!1,rowSpacing:M,sm:C=!1,spacing:k=0,wrap:x="wrap",xl:B=!1,xs:O=!1,zeroMinWidth:T=!1}=s,R=Object(n.a)(s,v),P=M||k,N=p||k,j=o.useContext(h),D=y?d||12:j,L=Object(i.a)({},s,{columns:D,container:y,direction:A,item:E,lg:I,md:S,sm:C,rowSpacing:P,columnSpacing:N,wrap:x,xl:B,xs:O,zeroMinWidth:T}),F=(t=>{const{classes:e,container:r,direction:n,item:i,lg:o,md:a,sm:s,spacing:u,wrap:l,xl:f,xs:h,zeroMinWidth:d}=t,p={root:["root",r&&"container",i&&"item",d&&"zeroMinWidth",...w(u,r),"row"!==n&&"direction-xs-".concat(String(n)),"wrap"!==l&&"wrap-xs-".concat(String(l)),!1!==h&&"grid-xs-".concat(String(h)),!1!==s&&"grid-sm-".concat(String(s)),!1!==a&&"grid-md-".concat(String(a)),!1!==o&&"grid-lg-".concat(String(o)),!1!==f&&"grid-xl-".concat(String(f))]};return Object(c.a)(p,g,e)})(L);return Object(b.jsx)(h.Provider,{value:D,children:Object(b.jsx)(_,Object(i.a)({ownerState:L,className:Object(a.default)(F.root,l),as:m,ref:e},R))})}));e.a=E},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(3414),c=r(22),l=r(37),f=r(215),h=r(3441),d=r(393),p=r(104),g=r(772),m=r(982);var y=Object(m.a)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),b=r(1451),v=r(771);function A(t){return Object(g.a)("MuiMenuItem",t)}var w=Object(m.a)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),_=r(0);const E=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex"],I=Object(c.a)(h.a,{shouldForwardProp:t=>Object(c.b)(t)||"classes"===t,name:"MuiMenuItem",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.dense&&e.dense,r.divider&&e.divider,!r.disableGutters&&e.gutters]}})((t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!r.disableGutters&&{paddingLeft:16,paddingRight:16},r.divider&&{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(w.selected)]:{backgroundColor:Object(u.a)(e.palette.primary.main,e.palette.action.selectedOpacity),["&.".concat(w.focusVisible)]:{backgroundColor:Object(u.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},["&.".concat(w.selected,":hover")]:{backgroundColor:Object(u.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:Object(u.a)(e.palette.primary.main,e.palette.action.selectedOpacity)}},["&.".concat(w.focusVisible)]:{backgroundColor:e.palette.action.focus},["&.".concat(w.disabled)]:{opacity:e.palette.action.disabledOpacity},["& + .".concat(y.root)]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},["& + .".concat(y.inset)]:{marginLeft:52},["& .".concat(v.a.root)]:{marginTop:0,marginBottom:0},["& .".concat(v.a.inset)]:{paddingLeft:36},["& .".concat(b.a.root)]:{minWidth:36}},!r.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},r.dense&&Object(i.a)({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{["& .".concat(b.a.root," svg")]:{fontSize:"1.25rem"}}))})),S=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiMenuItem"}),{autoFocus:u=!1,component:c="li",dense:h=!1,divider:g=!1,disableGutters:m=!1,focusVisibleClassName:y,role:b="menuitem",tabIndex:v}=r,w=Object(n.a)(r,E),S=o.useContext(f.a),M={dense:h||S.dense||!1,disableGutters:m},C=o.useRef(null);Object(d.a)((()=>{u&&C.current&&C.current.focus()}),[u]);const k=Object(i.a)({},r,{dense:M.dense,divider:g,disableGutters:m}),x=(t=>{const{disabled:e,dense:r,divider:n,disableGutters:o,selected:a,classes:u}=t,c={root:["root",r&&"dense",e&&"disabled",!o&&"gutters",n&&"divider",a&&"selected"]},l=Object(s.a)(c,A,u);return Object(i.a)({},u,l)})(r),B=Object(p.a)(C,e);let O;return r.disabled||(O=void 0!==v?v:-1),Object(_.jsx)(f.a.Provider,{value:M,children:Object(_.jsx)(I,Object(i.a)({ref:B,role:b,tabIndex:O,component:c,focusVisibleClassName:Object(a.default)(x.focusVisible,y)},w,{ownerState:k,classes:x}))})}));e.a=S},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(3415),u=r(1464),c=r(3414),l=r(22),f=r(37),h=r(3441),d=r(36),p=r(772),g=r(982);function m(t){return Object(p.a)("MuiButton",t)}var y=Object(g.a)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","contained","containedInherit","containedPrimary","containedSecondary","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var b=o.createContext({}),v=r(0);const A=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],w=t=>Object(i.a)({},"small"===t.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===t.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===t.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),_=Object(l.a)(h.a,{shouldForwardProp:t=>Object(l.b)(t)||"classes"===t,name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e["".concat(r.variant).concat(Object(d.a)(r.color))],e["size".concat(Object(d.a)(r.size))],e["".concat(r.variant,"Size").concat(Object(d.a)(r.size))],"inherit"===r.color&&e.colorInherit,r.disableElevation&&e.disableElevation,r.fullWidth&&e.fullWidth]}})((t=>{let{theme:e,ownerState:r}=t;var n,o;return Object(i.a)({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":Object(i.a)({textDecoration:"none",backgroundColor:e.vars?"rgba(".concat(e.vars.palette.text.primaryChannel," / ").concat(e.vars.palette.action.hoverOpacity,")"):Object(c.a)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===r.variant&&"inherit"!==r.color&&{backgroundColor:e.vars?"rgba(".concat(e.vars.palette[r.color].mainChannel," / ").concat(e.vars.palette.action.hoverOpacity,")"):Object(c.a)(e.palette[r.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===r.variant&&"inherit"!==r.color&&{border:"1px solid ".concat((e.vars||e).palette[r.color].main),backgroundColor:e.vars?"rgba(".concat(e.vars.palette[r.color].mainChannel," / ").concat(e.vars.palette.action.hoverOpacity,")"):Object(c.a)(e.palette[r.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===r.variant&&{backgroundColor:(e.vars||e).palette.grey.A100,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===r.variant&&"inherit"!==r.color&&{backgroundColor:(e.vars||e).palette[r.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[r.color].main}}),"&:active":Object(i.a)({},"contained"===r.variant&&{boxShadow:(e.vars||e).shadows[8]}),["&.".concat(y.focusVisible)]:Object(i.a)({},"contained"===r.variant&&{boxShadow:(e.vars||e).shadows[6]}),["&.".concat(y.disabled)]:Object(i.a)({color:(e.vars||e).palette.action.disabled},"outlined"===r.variant&&{border:"1px solid ".concat((e.vars||e).palette.action.disabledBackground)},"outlined"===r.variant&&"secondary"===r.color&&{border:"1px solid ".concat((e.vars||e).palette.action.disabled)},"contained"===r.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===r.variant&&{padding:"6px 8px"},"text"===r.variant&&"inherit"!==r.color&&{color:(e.vars||e).palette[r.color].main},"outlined"===r.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===r.variant&&"inherit"!==r.color&&{color:(e.vars||e).palette[r.color].main,border:e.vars?"1px solid rgba(".concat(e.vars.palette[r.color].mainChannel," / 0.5)"):"1px solid ".concat(Object(c.a)(e.palette[r.color].main,.5))},"contained"===r.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(o=e.palette).getContrastText)?void 0:n.call(o,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],boxShadow:(e.vars||e).shadows[2]},"contained"===r.variant&&"inherit"!==r.color&&{color:(e.vars||e).palette[r.color].contrastText,backgroundColor:(e.vars||e).palette[r.color].main},"inherit"===r.color&&{color:"inherit",borderColor:"currentColor"},"small"===r.size&&"text"===r.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===r.size&&"text"===r.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===r.size&&"outlined"===r.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===r.size&&"outlined"===r.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===r.size&&"contained"===r.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===r.size&&"contained"===r.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},r.fullWidth&&{width:"100%"})}),(t=>{let{ownerState:e}=t;return e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},["&.".concat(y.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(y.disabled)]:{boxShadow:"none"}}})),E=Object(l.a)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.startIcon,e["iconSize".concat(Object(d.a)(r.size))]]}})((t=>{let{ownerState:e}=t;return Object(i.a)({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},w(e))})),I=Object(l.a)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.endIcon,e["iconSize".concat(Object(d.a)(r.size))]]}})((t=>{let{ownerState:e}=t;return Object(i.a)({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},w(e))})),S=o.forwardRef((function(t,e){const r=o.useContext(b),c=Object(s.a)(r,t),l=Object(f.a)({props:c,name:"MuiButton"}),{children:h,color:p="primary",component:g="button",className:y,disabled:w=!1,disableElevation:S=!1,disableFocusRipple:M=!1,endIcon:C,focusVisibleClassName:k,fullWidth:x=!1,size:B="medium",startIcon:O,type:T,variant:R="text"}=l,P=Object(n.a)(l,A),N=Object(i.a)({},l,{color:p,component:g,disabled:w,disableElevation:S,disableFocusRipple:M,fullWidth:x,size:B,type:T,variant:R}),j=(t=>{const{color:e,disableElevation:r,fullWidth:n,size:o,variant:a,classes:s}=t,c={root:["root",a,"".concat(a).concat(Object(d.a)(e)),"size".concat(Object(d.a)(o)),"".concat(a,"Size").concat(Object(d.a)(o)),"inherit"===e&&"colorInherit",r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["startIcon","iconSize".concat(Object(d.a)(o))],endIcon:["endIcon","iconSize".concat(Object(d.a)(o))]},l=Object(u.a)(c,m,s);return Object(i.a)({},s,l)})(N),D=O&&Object(v.jsx)(E,{className:j.startIcon,ownerState:N,children:O}),L=C&&Object(v.jsx)(I,{className:j.endIcon,ownerState:N,children:C});return Object(v.jsxs)(_,Object(i.a)({ownerState:N,className:Object(a.default)(y,r.className),component:g,disabled:w,focusRipple:!M,focusVisibleClassName:Object(a.default)(j.focusVisible,k),ref:e,type:T},P,{classes:j,children:[D,h,L]}))}));e.a=S},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(3414),c=r(139),l=r(0),f=Object(c.a)(Object(l.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel"),h=r(104),d=r(36),p=r(3441),g=r(37),m=r(22),y=r(772),b=r(982);function v(t){return Object(y.a)("MuiChip",t)}var A=Object(b.a)("MuiChip",["root","sizeSmall","sizeMedium","colorPrimary","colorSecondary","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","focusVisible"]);const w=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"],_=Object(m.a)("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t,{color:n,clickable:i,onDelete:o,size:a,variant:s}=r;return[{["& .".concat(A.avatar)]:e.avatar},{["& .".concat(A.avatar)]:e["avatar".concat(Object(d.a)(a))]},{["& .".concat(A.avatar)]:e["avatarColor".concat(Object(d.a)(n))]},{["& .".concat(A.icon)]:e.icon},{["& .".concat(A.icon)]:e["icon".concat(Object(d.a)(a))]},{["& .".concat(A.icon)]:e["iconColor".concat(Object(d.a)(n))]},{["& .".concat(A.deleteIcon)]:e.deleteIcon},{["& .".concat(A.deleteIcon)]:e["deleteIcon".concat(Object(d.a)(a))]},{["& .".concat(A.deleteIcon)]:e["deleteIconColor".concat(Object(d.a)(n))]},{["& .".concat(A.deleteIcon)]:e["deleteIconOutlinedColor".concat(Object(d.a)(n))]},e.root,e["size".concat(Object(d.a)(a))],e["color".concat(Object(d.a)(n))],i&&e.clickable,i&&"default"!==n&&e["clickableColor".concat(Object(d.a)(n),")")],o&&e.deletable,o&&"default"!==n&&e["deletableColor".concat(Object(d.a)(n))],e[s],"outlined"===s&&e["outlined".concat(Object(d.a)(n))]]}})((t=>{let{theme:e,ownerState:r}=t;const n=Object(u.a)(e.palette.text.primary,.26);return Object(i.a)({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:e.palette.text.primary,backgroundColor:e.palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",["&.".concat(A.disabled)]:{opacity:e.palette.action.disabledOpacity,pointerEvents:"none"},["& .".concat(A.avatar)]:{marginLeft:5,marginRight:-6,width:24,height:24,color:"light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300],fontSize:e.typography.pxToRem(12)},["& .".concat(A.avatarColorPrimary)]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark},["& .".concat(A.avatarColorSecondary)]:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.dark},["& .".concat(A.avatarSmall)]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},["& .".concat(A.icon)]:Object(i.a)({color:"light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300],marginLeft:5,marginRight:-6},"small"===r.size&&{fontSize:18,marginLeft:4,marginRight:-4},"default"!==r.color&&{color:"inherit"}),["& .".concat(A.deleteIcon)]:Object(i.a)({WebkitTapHighlightColor:"transparent",color:n,fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:Object(u.a)(n,.4)}},"small"===r.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==r.color&&{color:Object(u.a)(e.palette[r.color].contrastText,.7),"&:hover, &:active":{color:e.palette[r.color].contrastText}})},"small"===r.size&&{height:24},"default"!==r.color&&{backgroundColor:e.palette[r.color].main,color:e.palette[r.color].contrastText},r.onDelete&&{["&.".concat(A.focusVisible)]:{backgroundColor:Object(u.a)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},r.onDelete&&"default"!==r.color&&{["&.".concat(A.focusVisible)]:{backgroundColor:e.palette[r.color].dark}})}),(t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({},r.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:Object(u.a)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},["&.".concat(A.focusVisible)]:{backgroundColor:Object(u.a)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:e.shadows[1]}},r.clickable&&"default"!==r.color&&{["&:hover, &.".concat(A.focusVisible)]:{backgroundColor:e.palette[r.color].dark}})}),(t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({},"outlined"===r.variant&&{backgroundColor:"transparent",border:"1px solid ".concat("light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]),["&.".concat(A.clickable,":hover")]:{backgroundColor:e.palette.action.hover},["&.".concat(A.focusVisible)]:{backgroundColor:e.palette.action.focus},["& .".concat(A.avatar)]:{marginLeft:4},["& .".concat(A.avatarSmall)]:{marginLeft:2},["& .".concat(A.icon)]:{marginLeft:4},["& .".concat(A.iconSmall)]:{marginLeft:2},["& .".concat(A.deleteIcon)]:{marginRight:5},["& .".concat(A.deleteIconSmall)]:{marginRight:3}},"outlined"===r.variant&&"default"!==r.color&&{color:e.palette[r.color].main,border:"1px solid ".concat(Object(u.a)(e.palette[r.color].main,.7)),["&.".concat(A.clickable,":hover")]:{backgroundColor:Object(u.a)(e.palette[r.color].main,e.palette.action.hoverOpacity)},["&.".concat(A.focusVisible)]:{backgroundColor:Object(u.a)(e.palette[r.color].main,e.palette.action.focusOpacity)},["& .".concat(A.deleteIcon)]:{color:Object(u.a)(e.palette[r.color].main,.7),"&:hover, &:active":{color:e.palette[r.color].main}}})})),E=Object(m.a)("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:r}=t,{size:n}=r;return[e.label,e["label".concat(Object(d.a)(n))]]}})((t=>{let{ownerState:e}=t;return Object(i.a)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"small"===e.size&&{paddingLeft:8,paddingRight:8})}));function I(t){return"Backspace"===t.key||"Delete"===t.key}const S=o.forwardRef((function(t,e){const r=Object(g.a)({props:t,name:"MuiChip"}),{avatar:u,className:c,clickable:m,color:y="default",component:b,deleteIcon:A,disabled:S=!1,icon:M,label:C,onClick:k,onDelete:x,onKeyDown:B,onKeyUp:O,size:T="medium",variant:R="filled"}=r,P=Object(n.a)(r,w),N=o.useRef(null),j=Object(h.a)(N,e),D=t=>{t.stopPropagation(),x&&x(t)},L=!(!1===m||!k)||m,F="small"===T,U=L||x?p.a:b||"div",Q=Object(i.a)({},r,{component:U,disabled:S,size:T,color:y,onDelete:!!x,clickable:L,variant:R}),G=(t=>{const{classes:e,disabled:r,size:n,color:i,onDelete:o,clickable:a,variant:u}=t,c={root:["root",u,r&&"disabled","size".concat(Object(d.a)(n)),"color".concat(Object(d.a)(i)),a&&"clickable",a&&"clickableColor".concat(Object(d.a)(i)),o&&"deletable",o&&"deletableColor".concat(Object(d.a)(i)),"".concat(u).concat(Object(d.a)(i))],label:["label","label".concat(Object(d.a)(n))],avatar:["avatar","avatar".concat(Object(d.a)(n)),"avatarColor".concat(Object(d.a)(i))],icon:["icon","icon".concat(Object(d.a)(n)),"iconColor".concat(Object(d.a)(i))],deleteIcon:["deleteIcon","deleteIcon".concat(Object(d.a)(n)),"deleteIconColor".concat(Object(d.a)(i)),"deleteIconOutlinedColor".concat(Object(d.a)(i))]};return Object(s.a)(c,v,e)})(Q),H=U===p.a?Object(i.a)({component:b||"div",focusVisibleClassName:G.focusVisible},x&&{disableRipple:!0}):{};let z=null;if(x){const t=Object(a.default)("default"!==y&&("outlined"===R?G["deleteIconOutlinedColor".concat(Object(d.a)(y))]:G["deleteIconColor".concat(Object(d.a)(y))]),F&&G.deleteIconSmall);z=A&&o.isValidElement(A)?o.cloneElement(A,{className:Object(a.default)(A.props.className,G.deleteIcon,t),onClick:D}):Object(l.jsx)(f,{className:Object(a.default)(G.deleteIcon,t),onClick:D})}let q=null;u&&o.isValidElement(u)&&(q=o.cloneElement(u,{className:Object(a.default)(G.avatar,u.props.className)}));let K=null;return M&&o.isValidElement(M)&&(K=o.cloneElement(M,{className:Object(a.default)(G.icon,M.props.className)})),Object(l.jsxs)(_,Object(i.a)({as:U,className:Object(a.default)(G.root,c),disabled:!(!L||!S)||void 0,onClick:k,onKeyDown:t=>{t.currentTarget===t.target&&I(t)&&t.preventDefault(),B&&B(t)},onKeyUp:t=>{t.currentTarget===t.target&&(x&&I(t)?x(t):"Escape"===t.key&&N.current&&N.current.blur()),O&&O(t)},ref:j,ownerState:Q},H,P,{children:[q||K,Object(l.jsx)(E,{className:Object(a.default)(G.label),ownerState:Q,children:C}),z]}))}));e.a=S},function(t,e,r){"use strict";var n=r(82),i=r(33);var o=r(758),a=r(4),s=r.n(a),u=r(528);function c(t,e){var r=Object.create(null);return t&&a.Children.map(t,(function(t){return t})).forEach((function(t){r[t.key]=function(t){return e&&Object(a.isValidElement)(t)?e(t):t}(t)})),r}function l(t,e,r){return null!=r[e]?r[e]:t.props[e]}function f(t,e,r){var n=c(t.children),i=function(t,e){function r(r){return r in e?e[r]:t[r]}t=t||{},e=e||{};var n,i=Object.create(null),o=[];for(var a in t)a in e?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var u in e){if(i[u])for(n=0;n{const t=null===c?r:function(t,e){if("function"===typeof e)return e(t);return Object(i.a)({},t,e)}(c,r);return null!=t&&(t[s]=null!==c),t}),[r,c]);return Object(u.jsx)(o.a.Provider,{value:l,children:e})},l=r(188),f=r(441);function h(t){const e=Object(f.a)();return Object(u.jsx)(l.b.Provider,{value:"object"===typeof e?e:{},children:t.children})}e.a=function(t){const{children:e,theme:r}=t;return Object(u.jsx)(c,{theme:r,children:Object(u.jsx)(h,{children:e})})}},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(49),c=r(3414),l=r(36),f=r(22),h=r(280),d=r(37),p=r(508),g=r(104),m=r(774),y=r(772),b=r(982);function v(t){return Object(y.a)("MuiLink",t)}var A=Object(b.a)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),w=r(0);const _=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],E={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},I=Object(f.a)(m.a,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e["underline".concat(Object(l.a)(r.underline))],"button"===r.component&&e.button]}})((t=>{let{theme:e,ownerState:r}=t;const n=Object(u.b)(e,"palette.".concat((t=>E[t]||t)(r.color)))||r.color;return Object(i.a)({},"none"===r.underline&&{textDecoration:"none"},"hover"===r.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===r.underline&&{textDecoration:"underline",textDecorationColor:"inherit"!==n?Object(c.a)(n,.4):void 0,"&:hover":{textDecorationColor:"inherit"}},"button"===r.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(A.focusVisible)]:{outline:"auto"}})})),S=o.forwardRef((function(t,e){const r=Object(h.a)(),u=Object(d.a)({props:t,name:"MuiLink"}),{className:c,color:f="primary",component:m="a",onBlur:y,onFocus:b,TypographyClasses:A,underline:S="always",variant:M="inherit",sx:C}=u,k=Object(n.a)(u,_),x="function"===typeof C?C(r).color:null==C?void 0:C.color,{isFocusVisibleRef:B,onBlur:O,onFocus:T,ref:R}=Object(p.a)(),[P,N]=o.useState(!1),j=Object(g.a)(e,R),D=Object(i.a)({},u,{color:("function"===typeof x?x(r):x)||f,component:m,focusVisible:P,underline:S,variant:M}),L=(t=>{const{classes:e,component:r,focusVisible:n,underline:i}=t,o={root:["root","underline".concat(Object(l.a)(i)),"button"===r&&"button",n&&"focusVisible"]};return Object(s.a)(o,v,e)})(D);return Object(w.jsx)(I,Object(i.a)({color:f,className:Object(a.default)(L.root,c),classes:A,component:m,onBlur:t=>{O(t),!1===B.current&&N(!1),y&&y(t)},onFocus:t=>{T(t),!0===B.current&&N(!0),b&&b(t)},ref:j,ownerState:D,variant:M,sx:[...t.color?[{color:E[f]||f}]:[],...Array.isArray(C)?C:[C]]},k))}));e.a=S},function(t,e,r){"use strict";var n=r(33),i=r(82),o=r(4),a=r(26),s=r(600),u=r(3413),c=r(3304),l=r(441),f=r(0);const h=["className","component"];var d=r(1348),p=r(1459);const g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultTheme:e,defaultClassName:r="MuiBox-root",generateClassName:d,styleFunctionSx:p=u.a}=t,g=Object(s.a)("div")(p);return o.forwardRef((function(t,o){const s=Object(l.a)(e),u=Object(c.a)(t),{className:p,component:m="div"}=u,y=Object(i.a)(u,h);return Object(f.jsx)(g,Object(n.a)({as:m,ref:o,className:Object(a.default)(p,d?d(r):r),theme:s},y))}))}({defaultTheme:Object(p.a)(),defaultClassName:"MuiBox-root",generateClassName:d.a.generate});e.a=g},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(1464),s=r(773),u=r(207),c=r(22),l=r(37),f=r(772),h=r(982),d=r(613);function p(t){return Object(f.a)("MuiInput",t)}var g=Object(i.a)({},d.a,Object(h.a)("MuiInput",["root","underline","input"])),m=r(0);const y=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","type"],b=Object(c.a)(u.b,{shouldForwardProp:t=>Object(c.b)(t)||"classes"===t,name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[...Object(u.e)(t,e),!r.disableUnderline&&e.underline]}})((t=>{let{theme:e,ownerState:r}=t;const n="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return Object(i.a)({position:"relative"},r.formControl&&{"label + &":{marginTop:16}},!r.disableUnderline&&{"&:after":{borderBottom:"2px solid ".concat(e.palette[r.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(g.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(g.error,":after")]:{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(g.disabled,"):before")]:{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(n)}},["&.".concat(g.disabled,":before")]:{borderBottomStyle:"dotted"}})})),v=Object(c.a)(u.a,{name:"MuiInput",slot:"Input",overridesResolver:u.d})({}),A=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiInput"}),{disableUnderline:o,components:c={},componentsProps:f,fullWidth:h=!1,inputComponent:d="input",multiline:g=!1,type:A="text"}=r,w=Object(n.a)(r,y),_=(t=>{const{classes:e,disableUnderline:r}=t,n={root:["root",!r&&"underline"],input:["input"]},o=Object(a.a)(n,p,e);return Object(i.a)({},e,o)})(r),E={root:{ownerState:{disableUnderline:o}}},I=f?Object(s.a)(f,E):E;return Object(m.jsx)(u.c,Object(i.a)({components:Object(i.a)({Root:b,Input:v},c),componentsProps:I,fullWidth:h,inputComponent:d,multiline:g,ref:e,type:A},w,{classes:_}))}));A.muiName="Input";e.a=A},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(3414),c=r(22),l=r(37),f=r(772),h=r(982);function d(t){return Object(f.a)("MuiPaper",t)}Object(h.a)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var p=r(0);const g=["className","component","elevation","square","variant"],m=t=>{let e;return e=t<1?5.11916*t**2:4.5*Math.log(t+1)+2,(e/100).toFixed(2)},y=Object(c.a)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],!r.square&&e.rounded,"elevation"===r.variant&&e["elevation".concat(r.elevation)]]}})((t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},!r.square&&{borderRadius:e.shape.borderRadius},"outlined"===r.variant&&{border:"1px solid ".concat(e.palette.divider)},"elevation"===r.variant&&Object(i.a)({boxShadow:e.shadows[r.elevation]},"dark"===e.palette.mode&&{backgroundImage:"linear-gradient(".concat(Object(u.a)("#fff",m(r.elevation)),", ").concat(Object(u.a)("#fff",m(r.elevation)),")")}))})),b=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiPaper"}),{className:o,component:u="div",elevation:c=1,square:f=!1,variant:h="elevation"}=r,m=Object(n.a)(r,g),b=Object(i.a)({},r,{component:u,elevation:c,square:f,variant:h}),v=(t=>{const{square:e,elevation:r,variant:n,classes:i}=t,o={root:["root",n,!e&&"rounded","elevation"===n&&"elevation".concat(r)]};return Object(s.a)(o,d,i)})(b);return Object(p.jsx)(y,Object(i.a)({as:u,ownerState:b,className:Object(a.default)(v.root,o),ref:e},m))}));e.a=b},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(22),c=r(37),l=r(215),f=r(772),h=r(982);function d(t){return Object(f.a)("MuiList",t)}Object(h.a)("MuiList",["root","padding","dense","subheader"]);var p=r(0);const g=["children","className","component","dense","disablePadding","subheader"],m=Object(u.a)("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.disablePadding&&e.padding,r.dense&&e.dense,r.subheader&&e.subheader]}})((t=>{let{ownerState:e}=t;return Object(i.a)({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})})),y=o.forwardRef((function(t,e){const r=Object(c.a)({props:t,name:"MuiList"}),{children:u,className:f,component:h="ul",dense:y=!1,disablePadding:b=!1,subheader:v}=r,A=Object(n.a)(r,g),w=o.useMemo((()=>({dense:y})),[y]),_=Object(i.a)({},r,{component:h,dense:y,disablePadding:b}),E=(t=>{const{classes:e,disablePadding:r,dense:n,subheader:i}=t,o={root:["root",!r&&"padding",n&&"dense",i&&"subheader"]};return Object(s.a)(o,d,e)})(_);return Object(p.jsx)(l.a.Provider,{value:w,children:Object(p.jsxs)(m,Object(i.a)({as:h,className:Object(a.default)(E.root,f),ref:e,ownerState:_},A,{children:[v,u]}))})}));e.a=y},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(3414),c=r(22),l=r(37),f=r(3441),h=r(36),d=r(772),p=r(982);function g(t){return Object(d.a)("MuiIconButton",t)}var m=Object(p.a)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),y=r(0);const b=["edge","children","className","color","disabled","disableFocusRipple","size"],v=Object(c.a)(f.a,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,"default"!==r.color&&e["color".concat(Object(h.a)(r.color))],r.edge&&e["edge".concat(Object(h.a)(r.edge))],e["size".concat(Object(h.a)(r.size))]]}})((t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!r.disableRipple&&{"&:hover":{backgroundColor:Object(u.a)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===r.edge&&{marginLeft:"small"===r.size?-3:-12},"end"===r.edge&&{marginRight:"small"===r.size?-3:-12})}),(t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({},"inherit"===r.color&&{color:"inherit"},"inherit"!==r.color&&"default"!==r.color&&Object(i.a)({color:e.palette[r.color].main},!r.disableRipple&&{"&:hover":{backgroundColor:Object(u.a)(e.palette[r.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}}),"small"===r.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===r.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{["&.".concat(m.disabled)]:{backgroundColor:"transparent",color:e.palette.action.disabled}})})),A=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiIconButton"}),{edge:o=!1,children:u,className:c,color:f="default",disabled:d=!1,disableFocusRipple:p=!1,size:m="medium"}=r,A=Object(n.a)(r,b),w=Object(i.a)({},r,{edge:o,color:f,disabled:d,disableFocusRipple:p,size:m}),_=(t=>{const{classes:e,disabled:r,color:n,edge:i,size:o}=t,a={root:["root",r&&"disabled","default"!==n&&"color".concat(Object(h.a)(n)),i&&"edge".concat(Object(h.a)(i)),"size".concat(Object(h.a)(o))]};return Object(s.a)(a,g,e)})(w);return Object(y.jsx)(v,Object(i.a)({className:Object(a.default)(_.root,c),centerRipple:!0,focusRipple:!p,disabled:d,ref:e,ownerState:w},A,{children:u}))}));e.a=A},function(t,e,r){"use strict";var n=r(10),i=r(28),o=r(4),a=r(26),s=r(1464),u=r(22),c=r(37),l=r(774),f=r(772),h=r(982);function d(t){return Object(f.a)("MuiAlertTitle",t)}Object(h.a)("MuiAlertTitle",["root"]);var p=r(0);const g=["className"],m=Object(u.a)(l.a,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(t,e)=>e.root})((t=>{let{theme:e}=t;return{fontWeight:e.typography.fontWeightMedium,marginTop:-2}})),y=o.forwardRef((function(t,e){const r=Object(c.a)({props:t,name:"MuiAlertTitle"}),{className:o}=r,u=Object(i.a)(r,g),l=r,f=(t=>{const{classes:e}=t;return Object(s.a)({root:["root"]},d,e)})(l);return Object(p.jsx)(m,Object(n.a)({gutterBottom:!0,component:"div",ownerState:l,ref:e,className:Object(a.default)(f.root,o)},u))}));e.a=y},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(22),c=r(37),l=r(36),f=r(3453),h=r(772),d=r(982);function p(t){return Object(h.a)("MuiAppBar",t)}Object(d.a)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);var g=r(0);const m=["className","color","enableColorOnDark","position"],y=Object(u.a)(f.a,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e["position".concat(Object(l.a)(r.position))],e["color".concat(Object(l.a)(r.color))]]}})((t=>{let{theme:e,ownerState:r}=t;const n="light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[900];return Object(i.a)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===r.position&&{position:"fixed",zIndex:e.zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===r.position&&{position:"absolute",zIndex:e.zIndex.appBar,top:0,left:"auto",right:0},"sticky"===r.position&&{position:"sticky",zIndex:e.zIndex.appBar,top:0,left:"auto",right:0},"static"===r.position&&{position:"static"},"relative"===r.position&&{position:"relative"},"default"===r.color&&{backgroundColor:n,color:e.palette.getContrastText(n)},r.color&&"default"!==r.color&&"inherit"!==r.color&&"transparent"!==r.color&&{backgroundColor:e.palette[r.color].main,color:e.palette[r.color].contrastText},"inherit"===r.color&&{color:"inherit"},"dark"===e.palette.mode&&!r.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===r.color&&Object(i.a)({backgroundColor:"transparent",color:"inherit"},"dark"===e.palette.mode&&{backgroundImage:"none"}))})),b=o.forwardRef((function(t,e){const r=Object(c.a)({props:t,name:"MuiAppBar"}),{className:o,color:u="primary",enableColorOnDark:f=!1,position:h="fixed"}=r,d=Object(n.a)(r,m),b=Object(i.a)({},r,{color:u,position:h,enableColorOnDark:f}),v=(t=>{const{color:e,position:r,classes:n}=t,i={root:["root","color".concat(Object(l.a)(e)),"position".concat(Object(l.a)(r))]};return Object(s.a)(i,p,n)})(b);return Object(g.jsx)(y,Object(i.a)({square:!0,component:"header",ownerState:b,elevation:4,className:Object(a.default)(v.root,o,"fixed"===h&&"mui-fixed"),ref:e},d))}));e.a=b},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(37),c=r(22),l=r(772),f=r(982);function h(t){return Object(l.a)("MuiContainer",t)}Object(f.a)("MuiContainer",["root","disableGutters","fixed","maxWidthXs","maxWidthSm","maxWidthMd","maxWidthLg","maxWidthXl"]);var d=r(36),p=r(0);const g=["className","component","disableGutters","fixed","maxWidth"],m=Object(c.a)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e["maxWidth".concat(Object(d.a)(String(r.maxWidth)))],r.fixed&&e.fixed,r.disableGutters&&e.disableGutters]}})((t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!r.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}})}),(t=>{let{theme:e,ownerState:r}=t;return r.fixed&&Object.keys(e.breakpoints.values).reduce(((t,r)=>{const n=e.breakpoints.values[r];return 0!==n&&(t[e.breakpoints.up(r)]={maxWidth:"".concat(n).concat(e.breakpoints.unit)}),t}),{})}),(t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({},"xs"===r.maxWidth&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},r.maxWidth&&"xs"!==r.maxWidth&&{[e.breakpoints.up(r.maxWidth)]:{maxWidth:"".concat(e.breakpoints.values[r.maxWidth]).concat(e.breakpoints.unit)}})})),y=o.forwardRef((function(t,e){const r=Object(u.a)({props:t,name:"MuiContainer"}),{className:o,component:c="div",disableGutters:l=!1,fixed:f=!1,maxWidth:y="lg"}=r,b=Object(n.a)(r,g),v=Object(i.a)({},r,{component:c,disableGutters:l,fixed:f,maxWidth:y}),A=(t=>{const{classes:e,fixed:r,disableGutters:n,maxWidth:i}=t,o={root:["root",i&&"maxWidth".concat(Object(d.a)(String(i))),r&&"fixed",n&&"disableGutters"]};return Object(s.a)(o,h,e)})(v);return Object(p.jsx)(m,Object(i.a)({as:c,ownerState:v,className:Object(a.default)(A.root,o),ref:e},b))}));e.a=y},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(37),c=r(22),l=r(772),f=r(982);function h(t){return Object(l.a)("MuiToolbar",t)}Object(f.a)("MuiToolbar",["root","gutters","regular","dense"]);var d=r(0);const p=["className","component","disableGutters","variant"],g=Object(c.a)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.disableGutters&&e.gutters,e[r.variant]]}})((t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({position:"relative",display:"flex",alignItems:"center"},!r.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},"dense"===r.variant&&{minHeight:48})}),(t=>{let{theme:e,ownerState:r}=t;return"regular"===r.variant&&e.mixins.toolbar})),m=o.forwardRef((function(t,e){const r=Object(u.a)({props:t,name:"MuiToolbar"}),{className:o,component:c="div",disableGutters:l=!1,variant:f="regular"}=r,m=Object(n.a)(r,p),y=Object(i.a)({},r,{component:c,disableGutters:l,variant:f}),b=(t=>{const{classes:e,disableGutters:r,variant:n}=t,i={root:["root",!r&&"gutters",n]};return Object(s.a)(i,h,e)})(y);return Object(d.jsx)(g,Object(i.a)({as:c,className:Object(a.default)(b.root,o),ref:e,ownerState:y},m))}));e.a=m},function(t,e,r){"use strict";var n=r(143),i=r(28),o=r(10),a=r(4),s=r(26),u=r(1464),c=r(432),l=r(36),f=r(37),h=r(22),d=r(772),p=r(982);function g(t){return Object(d.a)("MuiCircularProgress",t)}Object(p.a)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var m,y,b,v,A=r(0);const w=["className","color","disableShrink","size","style","thickness","value","variant"];let _,E,I,S;const M=44,C=Object(c.c)(_||(_=m||(m=Object(n.a)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),k=Object(c.c)(E||(E=y||(y=Object(n.a)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),x=Object(h.a)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e["color".concat(Object(l.a)(r.color))]]}})((t=>{let{ownerState:e,theme:r}=t;return Object(o.a)({display:"inline-block"},"determinate"===e.variant&&{transition:r.transitions.create("transform")},"inherit"!==e.color&&{color:r.palette[e.color].main})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&Object(c.b)(I||(I=b||(b=Object(n.a)(["\n animation: "," 1.4s linear infinite;\n "]))),C)})),B=Object(h.a)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),O=Object(h.a)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.circle,e["circle".concat(Object(l.a)(r.variant))],r.disableShrink&&e.circleDisableShrink]}})((t=>{let{ownerState:e,theme:r}=t;return Object(o.a)({stroke:"currentColor"},"determinate"===e.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(t=>{let{ownerState:e}=t;return"indeterminate"===e.variant&&!e.disableShrink&&Object(c.b)(S||(S=v||(v=Object(n.a)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),k)})),T=a.forwardRef((function(t,e){const r=Object(f.a)({props:t,name:"MuiCircularProgress"}),{className:n,color:a="primary",disableShrink:c=!1,size:h=40,style:d,thickness:p=3.6,value:m=0,variant:y="indeterminate"}=r,b=Object(i.a)(r,w),v=Object(o.a)({},r,{color:a,disableShrink:c,size:h,thickness:p,value:m,variant:y}),_=(t=>{const{classes:e,variant:r,color:n,disableShrink:i}=t,o={root:["root",r,"color".concat(Object(l.a)(n))],svg:["svg"],circle:["circle","circle".concat(Object(l.a)(r)),i&&"circleDisableShrink"]};return Object(u.a)(o,g,e)})(v),E={},I={},S={};if("determinate"===y){const t=2*Math.PI*((M-p)/2);E.strokeDasharray=t.toFixed(3),S["aria-valuenow"]=Math.round(m),E.strokeDashoffset="".concat(((100-m)/100*t).toFixed(3),"px"),I.transform="rotate(-90deg)"}return Object(A.jsx)(x,Object(o.a)({className:Object(s.default)(_.root,n),style:Object(o.a)({width:h,height:h},I,d),ownerState:v,ref:e,role:"progressbar"},S,b,{children:Object(A.jsx)(B,{className:_.svg,ownerState:v,viewBox:"".concat(22," ").concat(22," ").concat(M," ").concat(M),children:Object(A.jsx)(O,{className:_.circle,style:E,ownerState:v,cx:M,cy:M,r:(M-p)/2,fill:"none",strokeWidth:p})})}))}));e.a=T},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(227),c=r(774),l=r(36),f=r(22),h=r(37),d=r(772),p=r(982);function g(t){return Object(d.a)("MuiFormControlLabel",t)}var m=Object(p.a)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error"]),y=r(228),b=r(0);const v=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","value"],A=Object(f.a)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{["& .".concat(m.label)]:e.label},e.root,e["labelPlacement".concat(Object(l.a)(r.labelPlacement))]]}})((t=>{let{theme:e,ownerState:r}=t;return Object(i.a)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,["&.".concat(m.disabled)]:{cursor:"default"}},"start"===r.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===r.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===r.labelPlacement&&{flexDirection:"column",marginLeft:16},{["& .".concat(m.label)]:{["&.".concat(m.disabled)]:{color:e.palette.text.disabled}}})})),w=o.forwardRef((function(t,e){const r=Object(h.a)({props:t,name:"MuiFormControlLabel"}),{className:f,componentsProps:d={},control:p,disabled:m,disableTypography:w,label:_,labelPlacement:E="end"}=r,I=Object(n.a)(r,v),S=Object(u.a)();let M=m;"undefined"===typeof M&&"undefined"!==typeof p.props.disabled&&(M=p.props.disabled),"undefined"===typeof M&&S&&(M=S.disabled);const C={disabled:M};["checked","name","onChange","value","inputRef"].forEach((t=>{"undefined"===typeof p.props[t]&&"undefined"!==typeof r[t]&&(C[t]=r[t])}));const k=Object(y.a)({props:r,muiFormControl:S,states:["error"]}),x=Object(i.a)({},r,{disabled:M,labelPlacement:E,error:k.error}),B=(t=>{const{classes:e,disabled:r,labelPlacement:n,error:i}=t,o={root:["root",r&&"disabled","labelPlacement".concat(Object(l.a)(n)),i&&"error"],label:["label",r&&"disabled"]};return Object(s.a)(o,g,e)})(x);let O=_;return null==O||O.type===c.a||w||(O=Object(b.jsx)(c.a,Object(i.a)({component:"span",className:B.label},d.typography,{children:O}))),Object(b.jsxs)(A,Object(i.a)({className:Object(a.default)(B.root,f),ownerState:x,ref:e},I,{children:[o.cloneElement(p,C),O]}))}));e.a=w},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(394),c=r(516),l=r(37),f=r(22),h=r(772),d=r(982);function p(t){return Object(h.a)("MuiStep",t)}Object(d.a)("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);var g=r(0);const m=["active","children","className","completed","disabled","expanded","index","last"],y=Object(f.a)("div",{name:"MuiStep",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.orientation],r.alternativeLabel&&e.alternativeLabel,r.completed&&e.completed]}})((t=>{let{ownerState:e}=t;return Object(i.a)({},"horizontal"===e.orientation&&{paddingLeft:8,paddingRight:8},e.alternativeLabel&&{flex:1,position:"relative"})})),b=o.forwardRef((function(t,e){const r=Object(l.a)({props:t,name:"MuiStep"}),{active:f,children:h,className:d,completed:b,disabled:v,expanded:A=!1,index:w,last:_}=r,E=Object(n.a)(r,m),{activeStep:I,connector:S,alternativeLabel:M,orientation:C,nonLinear:k}=o.useContext(u.a);let[x=!1,B=!1,O=!1]=[f,b,v];I===w?x=void 0===f||f:!k&&I>w?B=void 0===b||b:!k&&I({index:w,last:_,expanded:A,icon:w+1,active:x,completed:B,disabled:O})),[w,_,A,x,B,O]),R=Object(i.a)({},r,{active:x,orientation:C,alternativeLabel:M,completed:B,disabled:O,expanded:A}),P=(t=>{const{classes:e,orientation:r,alternativeLabel:n,completed:i}=t,o={root:["root",r,n&&"alternativeLabel",i&&"completed"]};return Object(s.a)(o,p,e)})(R),N=Object(g.jsxs)(y,Object(i.a)({className:Object(a.default)(P.root,d),ref:e,ownerState:R},E,{children:[S&&M&&0!==w?S:null,h]}));return Object(g.jsx)(c.a.Provider,{value:T,children:S&&!M&&0!==w?Object(g.jsxs)(o.Fragment,{children:[S,N]}):N})}));e.a=b},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(37),c=r(22),l=r(772),f=r(982);function h(t){return Object(l.a)("MuiCardMedia",t)}Object(f.a)("MuiCardMedia",["root","media","img"]);var d=r(0);const p=["children","className","component","image","src","style"],g=Object(c.a)("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t,{isMediaComponent:n,isImageComponent:i}=r;return[e.root,n&&e.media,i&&e.img]}})((t=>{let{ownerState:e}=t;return Object(i.a)({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},e.isMediaComponent&&{width:"100%"},e.isImageComponent&&{objectFit:"cover"})})),m=["video","audio","picture","iframe","img"],y=["picture","img"],b=o.forwardRef((function(t,e){const r=Object(u.a)({props:t,name:"MuiCardMedia"}),{children:o,className:c,component:l="div",image:f,src:b,style:v}=r,A=Object(n.a)(r,p),w=-1!==m.indexOf(l),_=!w&&f?Object(i.a)({backgroundImage:'url("'.concat(f,'")')},v):v,E=Object(i.a)({},r,{component:l,isMediaComponent:w,isImageComponent:-1!==y.indexOf(l)}),I=(t=>{const{classes:e,isMediaComponent:r,isImageComponent:n}=t,i={root:["root",r&&"media",n&&"img"]};return Object(s.a)(i,h,e)})(E);return Object(d.jsx)(g,Object(i.a)({className:Object(a.default)(I.root,c),as:l,role:!w&&f?"img":void 0,ref:e,style:_,ownerState:E,src:w?f||b:void 0},A,{children:o}))}));e.a=b},function(t,e,r){"use strict";var n=r(10),i=r(28),o=r(4),a=r(26),s=r(1464),u=r(22),c=r(37),l=r(3453),f=r(772),h=r(982);function d(t){return Object(f.a)("MuiCard",t)}Object(h.a)("MuiCard",["root"]);var p=r(0);const g=["className","raised"],m=Object(u.a)(l.a,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})((()=>({overflow:"hidden"}))),y=o.forwardRef((function(t,e){const r=Object(c.a)({props:t,name:"MuiCard"}),{className:o,raised:u=!1}=r,l=Object(i.a)(r,g),f=Object(n.a)({},r,{raised:u}),h=(t=>{const{classes:e}=t;return Object(s.a)({root:["root"]},d,e)})(f);return Object(p.jsx)(m,Object(n.a)({className:Object(a.default)(h.root,o),elevation:u?8:void 0,ref:e,ownerState:f},l))}));e.a=y},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(774),c=r(37),l=r(22),f=r(772),h=r(982);function d(t){return Object(f.a)("MuiCardHeader",t)}var p=Object(h.a)("MuiCardHeader",["root","avatar","action","content","title","subheader"]),g=r(0);const m=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],y=Object(l.a)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(t,e)=>Object(i.a)({["& .".concat(p.title)]:e.title,["& .".concat(p.subheader)]:e.subheader},e.root)})({display:"flex",alignItems:"center",padding:16}),b=Object(l.a)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(t,e)=>e.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),v=Object(l.a)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(t,e)=>e.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),A=Object(l.a)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(t,e)=>e.content})({flex:"1 1 auto"}),w=o.forwardRef((function(t,e){const r=Object(c.a)({props:t,name:"MuiCardHeader"}),{action:o,avatar:l,className:f,component:h="div",disableTypography:p=!1,subheader:w,subheaderTypographyProps:_,title:E,titleTypographyProps:I}=r,S=Object(n.a)(r,m),M=Object(i.a)({},r,{component:h,disableTypography:p}),C=(t=>{const{classes:e}=t;return Object(s.a)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},d,e)})(M);let k=E;null==k||k.type===u.a||p||(k=Object(g.jsx)(u.a,Object(i.a)({variant:l?"body2":"h5",className:C.title,component:"span",display:"block"},I,{children:k})));let x=w;return null==x||x.type===u.a||p||(x=Object(g.jsx)(u.a,Object(i.a)({variant:l?"body2":"body1",className:C.subheader,color:"text.secondary",component:"span",display:"block"},_,{children:x}))),Object(g.jsxs)(y,Object(i.a)({className:Object(a.default)(C.root,f),as:h,ref:e,ownerState:M},S,{children:[l&&Object(g.jsx)(b,{className:C.avatar,ownerState:M,children:l}),Object(g.jsxs)(A,{className:C.content,ownerState:M,children:[k,x]}),o&&Object(g.jsx)(v,{className:C.action,ownerState:M,children:o})]}))}));e.a=w},function(t,e,r){"use strict";var n=r(10),i=r(28),o=r(4),a=r(26),s=r(1464),u=r(22),c=r(37),l=r(772),f=r(982);function h(t){return Object(l.a)("MuiCardContent",t)}Object(f.a)("MuiCardContent",["root"]);var d=r(0);const p=["className","component"],g=Object(u.a)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}}))),m=o.forwardRef((function(t,e){const r=Object(c.a)({props:t,name:"MuiCardContent"}),{className:o,component:u="div"}=r,l=Object(i.a)(r,p),f=Object(n.a)({},r,{component:u}),m=(t=>{const{classes:e}=t;return Object(s.a)({root:["root"]},h,e)})(f);return Object(d.jsx)(g,Object(n.a)({as:u,className:Object(a.default)(m.root,o),ownerState:f,ref:e},l))}));e.a=m},function(t,e,r){"use strict";var n=r(28),i=r(10),o=r(4),a=r(26),s=r(1464),u=r(22),c=r(37),l=r(772),f=r(982);function h(t){return Object(l.a)("MuiCardActions",t)}Object(f.a)("MuiCardActions",["root","spacing"]);var d=r(0);const p=["disableSpacing","className"],g=Object(u.a)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.disableSpacing&&e.spacing]}})((t=>{let{ownerState:e}=t;return Object(i.a)({display:"flex",alignItems:"center",padding:8},!e.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})})),m=o.forwardRef((function(t,e){const r=Object(c.a)({props:t,name:"MuiCardActions"}),{disableSpacing:o=!1,className:u}=r,l=Object(n.a)(r,p),f=Object(i.a)({},r,{disableSpacing:o}),m=(t=>{const{classes:e,disableSpacing:r}=t,n={root:["root",!r&&"spacing"]};return Object(s.a)(n,h,e)})(f);return Object(d.jsx)(g,Object(i.a)({className:Object(a.default)(m.root,u),ownerState:f,ref:e},l))}));e.a=m},function(t,e,r){"use strict";r.d(e,"a",(function(){return h})),r.d(e,"c",(function(){return y})),r.d(e,"b",(function(){return b}));var n=r(85),i=r.n(n),o=r(1),a=r(5);var s=i.a.BN;const u=new a.b("bignumber/5.6.2"),c={},l=9007199254740991;let f=!1;class h{constructor(t,e){t!==c&&u.throwError("cannot call constructor directly; use BigNumber.from",a.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return p(g(this).fromTwos(t))}toTwos(t){return p(g(this).toTwos(t))}abs(){return"-"===this._hex[0]?h.from(this._hex.substring(1)):this}add(t){return p(g(this).add(g(t)))}sub(t){return p(g(this).sub(g(t)))}div(t){return h.from(t).isZero()&&m("division-by-zero","div"),p(g(this).div(g(t)))}mul(t){return p(g(this).mul(g(t)))}mod(t){const e=g(t);return e.isNeg()&&m("division-by-zero","mod"),p(g(this).umod(e))}pow(t){const e=g(t);return e.isNeg()&&m("negative-power","pow"),p(g(this).pow(e))}and(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","and"),p(g(this).and(e))}or(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","or"),p(g(this).or(e))}xor(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","xor"),p(g(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&m("negative-width","mask"),p(g(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&m("negative-width","shl"),p(g(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&m("negative-width","shr"),p(g(this).shrn(t))}eq(t){return g(this).eq(g(t))}lt(t){return g(this).lt(g(t))}lte(t){return g(this).lte(g(t))}gt(t){return g(this).gt(g(t))}gte(t){return g(this).gte(g(t))}isNegative(){return"-"===this._hex[0]}isZero(){return g(this).isZero()}toNumber(){try{return g(this).toNumber()}catch(t){m("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return u.throwError("this platform does not support BigInt",a.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?f||(f=!0,u.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?u.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.b.errors.UNEXPECTED_ARGUMENT,{}):u.throwError("BigNumber.toString does not accept parameters",a.b.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof h)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new h(c,d(t)):t.match(/^-?[0-9]+$/)?new h(c,d(new s(t))):u.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&m("underflow","BigNumber.from",t),(t>=l||t<=-l)&&m("overflow","BigNumber.from",t),h.from(String(t));const e=t;if("bigint"===typeof e)return h.from(e.toString());if(Object(o.j)(e))return h.from(Object(o.i)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return h.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&(Object(o.l)(t)||"-"===t[0]&&Object(o.l)(t.substring(1))))return h.from(t)}return u.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function d(t){if("string"!==typeof t)return d(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&u.throwArgumentError("invalid hex","value",t),"0x00"===(t=d(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function p(t){return h.from(d(t))}function g(t){const e=h.from(t).toHexString();return"-"===e[0]?new s("-"+e.substring(3),16):new s(e.substring(2),16)}function m(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),u.throwError(t,a.b.errors.NUMERIC_FAULT,n)}function y(t){return new s(t,36).toString(16)}function b(t){return new s(t,16).toString(36)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return l})),r.d(e,"b",(function(){return f}));var n=r(452);const i=new(r(395).a)("strings/5.6.0");var o,a;function s(t,e,r,n,i){if(t===a.BAD_PREFIX||t===a.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6===2;n++)t++;return t}return t===a.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(o||(o={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(a||(a={}));const u=Object.freeze({error:function(t,e,r,n,o){return i.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:s,replace:function(t,e,r,n,i){return t===a.OVERLONG?(n.push(i),0):(n.push(65533),s(t,e,r))}});function c(t,e){null==e&&(e=u.error),t=Object(n.a)(t);const r=[];let i=0;for(;i>7===0){r.push(n);continue}let o=null,s=null;if(192===(224&n))o=1,s=127;else if(224===(240&n))o=2,s=2047;else{if(240!==(248&n)){i+=e(128===(192&n)?a.UNEXPECTED_CONTINUE:a.BAD_PREFIX,i-1,t,r);continue}o=3,s=65535}if(i-1+o>=t.length){i+=e(a.OVERRUN,i-1,t,r);continue}let u=n&(1<<8-o-1)-1;for(let c=0;c1114111?i+=e(a.OUT_OF_RANGE,i-1-o,t,r,u):u>=55296&&u<=57343?i+=e(a.UTF16_SURROGATE,i-1-o,t,r,u):u<=s?i+=e(a.OVERLONG,i-1-o,t,r,u):r.push(u))}return r}function l(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.current;e!=o.current&&(i.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return Object(n.a)(r)}function f(t,e){return c(t,e).map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}},function(t,e,r){"use strict";r.d(e,"a",(function(){return l})),r.d(e,"b",(function(){return f}));var n=r(52);const i=new(r(76).a)("strings/5.6.0");var o,a;function s(t,e,r,n,i){if(t===a.BAD_PREFIX||t===a.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6===2;n++)t++;return t}return t===a.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(o||(o={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(a||(a={}));const u=Object.freeze({error:function(t,e,r,n,o){return i.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:s,replace:function(t,e,r,n,i){return t===a.OVERLONG?(n.push(i),0):(n.push(65533),s(t,e,r))}});function c(t,e){null==e&&(e=u.error),t=Object(n.a)(t);const r=[];let i=0;for(;i>7===0){r.push(n);continue}let o=null,s=null;if(192===(224&n))o=1,s=127;else if(224===(240&n))o=2,s=2047;else{if(240!==(248&n)){i+=e(128===(192&n)?a.UNEXPECTED_CONTINUE:a.BAD_PREFIX,i-1,t,r);continue}o=3,s=65535}if(i-1+o>=t.length){i+=e(a.OVERRUN,i-1,t,r);continue}let u=n&(1<<8-o-1)-1;for(let c=0;c1114111?i+=e(a.OUT_OF_RANGE,i-1-o,t,r,u):u>=55296&&u<=57343?i+=e(a.UTF16_SURROGATE,i-1-o,t,r,u):u<=s?i+=e(a.OVERLONG,i-1-o,t,r,u):r.push(u))}return r}function l(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.current;e!=o.current&&(i.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(63&e|128);else if(55296==(64512&e)){n++;const i=t.charCodeAt(n);if(n>=t.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&e)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(e>>12|224),r.push(e>>6&63|128),r.push(63&e|128)}return Object(n.a)(r)}function f(t,e){return c(t,e).map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}},function(t,e,r){"use strict";r.d(e,"a",(function(){return h})),r.d(e,"c",(function(){return y})),r.d(e,"b",(function(){return b}));var n=r(8),i=r.n(n),o=r(21),a=r(78);var s=i.a.BN;const u=new a.a("bignumber/5.6.0"),c={},l=9007199254740991;let f=!1;class h{constructor(t,e){u.checkNew(new.target,h),t!==c&&u.throwError("cannot call constructor directly; use BigNumber.from",a.a.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return p(g(this).fromTwos(t))}toTwos(t){return p(g(this).toTwos(t))}abs(){return"-"===this._hex[0]?h.from(this._hex.substring(1)):this}add(t){return p(g(this).add(g(t)))}sub(t){return p(g(this).sub(g(t)))}div(t){return h.from(t).isZero()&&m("division-by-zero","div"),p(g(this).div(g(t)))}mul(t){return p(g(this).mul(g(t)))}mod(t){const e=g(t);return e.isNeg()&&m("division-by-zero","mod"),p(g(this).umod(e))}pow(t){const e=g(t);return e.isNeg()&&m("negative-power","pow"),p(g(this).pow(e))}and(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","and"),p(g(this).and(e))}or(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","or"),p(g(this).or(e))}xor(t){const e=g(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","xor"),p(g(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&m("negative-width","mask"),p(g(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&m("negative-width","shl"),p(g(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&m("negative-width","shr"),p(g(this).shrn(t))}eq(t){return g(this).eq(g(t))}lt(t){return g(this).lt(g(t))}lte(t){return g(this).lte(g(t))}gt(t){return g(this).gt(g(t))}gte(t){return g(this).gte(g(t))}isNegative(){return"-"===this._hex[0]}isZero(){return g(this).isZero()}toNumber(){try{return g(this).toNumber()}catch(t){m("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return u.throwError("this platform does not support BigInt",a.a.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?f||(f=!0,u.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?u.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.a.errors.UNEXPECTED_ARGUMENT,{}):u.throwError("BigNumber.toString does not accept parameters",a.a.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof h)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new h(c,d(t)):t.match(/^-?[0-9]+$/)?new h(c,d(new s(t))):u.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&m("underflow","BigNumber.from",t),(t>=l||t<=-l)&&m("overflow","BigNumber.from",t),h.from(String(t));const e=t;if("bigint"===typeof e)return h.from(e.toString());if(Object(o.h)(e))return h.from(Object(o.g)(e));if(e)if(e.toHexString){const t=e.toHexString();if("string"===typeof t)return h.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"===typeof t&&(Object(o.j)(t)||"-"===t[0]&&Object(o.j)(t.substring(1))))return h.from(t)}return u.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!(!t||!t._isBigNumber)}}function d(t){if("string"!==typeof t)return d(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&u.throwArgumentError("invalid hex","value",t),"0x00"===(t=d(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function p(t){return h.from(d(t))}function g(t){const e=h.from(t).toHexString();return"-"===e[0]?new s("-"+e.substring(3),16):new s(e.substring(2),16)}function m(t,e,r){const n={fault:t,operation:e};return null!=r&&(n.value=r),u.throwError(t,a.a.errors.NUMERIC_FAULT,n)}function y(t){return new s(t,36).toString(16)}function b(t){return new s(t,16).toString(36)}}]]); \ No newline at end of file diff --git a/static/js/2.0d06edc4.chunk.js.LICENSE.txt b/static/js/2.0d06edc4.chunk.js.LICENSE.txt new file mode 100644 index 000000000..50ddb225a --- /dev/null +++ b/static/js/2.0d06edc4.chunk.js.LICENSE.txt @@ -0,0 +1,578 @@ +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + +/*! + * Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + * Copyright 2022 Fonticons, Inc. + */ + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +/*! + * v2.1.4-104-gc868b3a + * + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +/*! MIT License. Copyright 2015-2018 Richard Moore . See LICENSE.txt. */ + +/*! https://mths.be/punycode v1.4.1 by @mathias */ + +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ + +/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */ + +/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */ + +/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ + +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ + +/*! typedarray-to-buffer. MIT License. Feross Aboukhadijeh */ + +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ + +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @license + * Copyright 2020 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */ + +/** + * React Router DOM v6.3.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ + +/** + * React Router v6.3.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ + +/** + * Support for translating between Buffer instances and JavaScript + * native types. + * + * {@link module:Layout~Layout|Layout} is the basis of a class + * hierarchy that associates property names with sequences of encoded + * bytes. + * + * Layouts are supported for these scalar (numeric) types: + * * {@link module:Layout~UInt|Unsigned integers in little-endian + * format} with {@link module:Layout.u8|8-bit}, {@link + * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit}, + * {@link module:Layout.u32|32-bit}, {@link + * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit} + * representation ranges; + * * {@link module:Layout~UIntBE|Unsigned integers in big-endian + * format} with {@link module:Layout.u16be|16-bit}, {@link + * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit}, + * {@link module:Layout.u40be|40-bit}, and {@link + * module:Layout.u48be|48-bit} representation ranges; + * * {@link module:Layout~Int|Signed integers in little-endian + * format} with {@link module:Layout.s8|8-bit}, {@link + * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit}, + * {@link module:Layout.s32|32-bit}, {@link + * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit} + * representation ranges; + * * {@link module:Layout~IntBE|Signed integers in big-endian format} + * with {@link module:Layout.s16be|16-bit}, {@link + * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit}, + * {@link module:Layout.s40be|40-bit}, and {@link + * module:Layout.s48be|48-bit} representation ranges; + * * 64-bit integral values that decode to an exact (if magnitude is + * less than 2^53) or nearby integral Number in {@link + * module:Layout.nu64|unsigned little-endian}, {@link + * module:Layout.nu64be|unsigned big-endian}, {@link + * module:Layout.ns64|signed little-endian}, and {@link + * module:Layout.ns64be|unsigned big-endian} encodings; + * * 32-bit floating point values with {@link + * module:Layout.f32|little-endian} and {@link + * module:Layout.f32be|big-endian} representations; + * * 64-bit floating point values with {@link + * module:Layout.f64|little-endian} and {@link + * module:Layout.f64be|big-endian} representations; + * * {@link module:Layout.const|Constants} that take no space in the + * encoded expression. + * + * and for these aggregate types: + * * {@link module:Layout.seq|Sequence}s of instances of a {@link + * module:Layout~Layout|Layout}, with JavaScript representation as + * an Array and constant or data-dependent {@link + * module:Layout~Sequence#count|length}; + * * {@link module:Layout.struct|Structure}s that aggregate a + * heterogeneous sequence of {@link module:Layout~Layout|Layout} + * instances, with JavaScript representation as an Object; + * * {@link module:Layout.union|Union}s that support multiple {@link + * module:Layout~VariantLayout|variant layouts} over a fixed + * (padded) or variable (not padded) span of bytes, using an + * unsigned integer at the start of the data or a separate {@link + * module:Layout.unionLayoutDiscriminator|layout element} to + * determine which layout to use when interpreting the buffer + * contents; + * * {@link module:Layout.bits|BitStructure}s that contain a sequence + * of individual {@link + * module:Layout~BitStructure#addField|BitField}s packed into an 8, + * 16, 24, or 32-bit unsigned integer starting at the least- or + * most-significant bit; + * * {@link module:Layout.cstr|C strings} of varying length; + * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link + * module:Layout~Blob#length|length} raw data. + * + * All {@link module:Layout~Layout|Layout} instances are immutable + * after construction, to prevent internal state from becoming + * inconsistent. + * + * @local Layout + * @local ExternalLayout + * @local GreedyCount + * @local OffsetLayout + * @local UInt + * @local UIntBE + * @local Int + * @local IntBE + * @local NearUInt64 + * @local NearUInt64BE + * @local NearInt64 + * @local NearInt64BE + * @local Float + * @local FloatBE + * @local Double + * @local DoubleBE + * @local Sequence + * @local Structure + * @local UnionDiscriminator + * @local UnionLayoutDiscriminator + * @local Union + * @local VariantLayout + * @local BitStructure + * @local BitField + * @local Boolean + * @local Blob + * @local CString + * @local Constant + * @local bindConstructorLayout + * @module Layout + * @license MIT + * @author Peter A. Bigot + * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub} + */ + +/** + * Support for translating between Uint8Array instances and JavaScript + * native types. + * + * {@link module:Layout~Layout|Layout} is the basis of a class + * hierarchy that associates property names with sequences of encoded + * bytes. + * + * Layouts are supported for these scalar (numeric) types: + * * {@link module:Layout~UInt|Unsigned integers in little-endian + * format} with {@link module:Layout.u8|8-bit}, {@link + * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit}, + * {@link module:Layout.u32|32-bit}, {@link + * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit} + * representation ranges; + * * {@link module:Layout~UIntBE|Unsigned integers in big-endian + * format} with {@link module:Layout.u16be|16-bit}, {@link + * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit}, + * {@link module:Layout.u40be|40-bit}, and {@link + * module:Layout.u48be|48-bit} representation ranges; + * * {@link module:Layout~Int|Signed integers in little-endian + * format} with {@link module:Layout.s8|8-bit}, {@link + * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit}, + * {@link module:Layout.s32|32-bit}, {@link + * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit} + * representation ranges; + * * {@link module:Layout~IntBE|Signed integers in big-endian format} + * with {@link module:Layout.s16be|16-bit}, {@link + * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit}, + * {@link module:Layout.s40be|40-bit}, and {@link + * module:Layout.s48be|48-bit} representation ranges; + * * 64-bit integral values that decode to an exact (if magnitude is + * less than 2^53) or nearby integral Number in {@link + * module:Layout.nu64|unsigned little-endian}, {@link + * module:Layout.nu64be|unsigned big-endian}, {@link + * module:Layout.ns64|signed little-endian}, and {@link + * module:Layout.ns64be|unsigned big-endian} encodings; + * * 32-bit floating point values with {@link + * module:Layout.f32|little-endian} and {@link + * module:Layout.f32be|big-endian} representations; + * * 64-bit floating point values with {@link + * module:Layout.f64|little-endian} and {@link + * module:Layout.f64be|big-endian} representations; + * * {@link module:Layout.const|Constants} that take no space in the + * encoded expression. + * + * and for these aggregate types: + * * {@link module:Layout.seq|Sequence}s of instances of a {@link + * module:Layout~Layout|Layout}, with JavaScript representation as + * an Array and constant or data-dependent {@link + * module:Layout~Sequence#count|length}; + * * {@link module:Layout.struct|Structure}s that aggregate a + * heterogeneous sequence of {@link module:Layout~Layout|Layout} + * instances, with JavaScript representation as an Object; + * * {@link module:Layout.union|Union}s that support multiple {@link + * module:Layout~VariantLayout|variant layouts} over a fixed + * (padded) or variable (not padded) span of bytes, using an + * unsigned integer at the start of the data or a separate {@link + * module:Layout.unionLayoutDiscriminator|layout element} to + * determine which layout to use when interpreting the buffer + * contents; + * * {@link module:Layout.bits|BitStructure}s that contain a sequence + * of individual {@link + * module:Layout~BitStructure#addField|BitField}s packed into an 8, + * 16, 24, or 32-bit unsigned integer starting at the least- or + * most-significant bit; + * * {@link module:Layout.cstr|C strings} of varying length; + * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link + * module:Layout~Blob#length|length} raw data. + * + * All {@link module:Layout~Layout|Layout} instances are immutable + * after construction, to prevent internal state from becoming + * inconsistent. + * + * @local Layout + * @local ExternalLayout + * @local GreedyCount + * @local OffsetLayout + * @local UInt + * @local UIntBE + * @local Int + * @local IntBE + * @local NearUInt64 + * @local NearUInt64BE + * @local NearInt64 + * @local NearInt64BE + * @local Float + * @local FloatBE + * @local Double + * @local DoubleBE + * @local Sequence + * @local Structure + * @local UnionDiscriminator + * @local UnionLayoutDiscriminator + * @local Union + * @local VariantLayout + * @local BitStructure + * @local BitField + * @local Boolean + * @local Blob + * @local CString + * @local Constant + * @local bindConstructorLayout + * @module Layout + * @license MIT + * @author Peter A. Bigot + * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub} + */ + +/** + * [js-sha256]{@link https://github.com/emn178/js-sha256} + * + * @version 0.9.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2014-2017 + * @license MIT + */ + +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.5.7 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2016 + * @license MIT + */ + +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ + +/** @license MUI v5.6.1 + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v0.20.2 + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v17.0.2 + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v17.0.2 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v17.0.2 + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v17.0.2 + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + +/** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ diff --git a/static/js/3.1b4d8c30.chunk.js b/static/js/3.1b4d8c30.chunk.js new file mode 100644 index 000000000..6846c2661 --- /dev/null +++ b/static/js/3.1b4d8c30.chunk.js @@ -0,0 +1,2 @@ +/*! For license information please see 3.1b4d8c30.chunk.js.LICENSE.txt */ +(this.webpackJsonpexample=this.webpackJsonpexample||[]).push([[3],{3473:function(t,e){let o;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!==typeof t)throw new Error('"toSJISFunc" is not a valid function.');o=t},e.isKanjiModeEnabled=function(){return"undefined"!==typeof o},e.toSJIS=function(t){return o(t)}},3474:function(t,e,o){const r=o(3479),n=o(3480);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,o){if(e.isValid(t))return t;try{return function(t){if("string"!==typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(r){return o}}},3475:function(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&"undefined"!==typeof t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,o){if(e.isValid(t))return t;try{return function(t){if("string"!==typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(r){return o}}},3478:function(t,e,o){const r=o(3475),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return n[4*(t-1)+0];case r.M:return n[4*(t-1)+1];case r.Q:return n[4*(t-1)+2];case r.H:return n[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}}},3479:function(t,e){e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},3480:function(t,e){const o="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(n,"g"),e.NUMERIC=new RegExp(o,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),a=new RegExp("^"+o+"$"),l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return i.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return l.test(t)}},3481:function(t,e){function o(t){if("number"===typeof t&&(t=t.toString()),"string"!==typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const o=parseInt(e.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:255&o,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e="undefined"===typeof t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,n=t.scale||4;return{width:r,scale:r?4:n,margin:e,color:{dark:o(t.color.dark||"#000000ff"),light:o(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,o){const r=e.getScale(t,o);return Math.floor((t+2*o.margin)*r)},e.qrToImageData=function(t,o,r){const n=o.modules.size,i=o.modules.data,a=e.getScale(n,r),l=Math.floor((n+2*r.margin)*a),s=r.margin*a,c=[r.color.light,r.color.dark];for(let e=0;e=s&&o>=s&&e>i&1),i<6?t.set(i,8,a,!0):i<8?t.set(i+1,8,a,!0):t.set(r-15+i,8,a,!0),i<8?t.set(8,r-i-1,a,!0):i<9?t.set(8,15-i-1+1,a,!0):t.set(8,15-i-1,a,!0);t.set(r-8,8,1,!0)}function w(t,e,o){const n=new i;o.forEach((function(e){n.put(e.mode.bit,4),n.put(e.getLength(),p.getCharCountIndicator(e.mode,t)),e.write(n)}));const a=8*(r.getSymbolTotalCodewords(t)-d.getTotalCodewordsCount(t,e));for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const l=(a-n.getLengthInBits())/8;for(let r=0;r=0&&r<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===r||6===r)||r>=2&&r<=4&&n>=2&&n<=4?t.set(e+r,i+n,!0,!0):t.set(e+r,i+n,!1,!0))}}(p,e),function(t){const e=t.size;for(let o=8;o=7&&function(t,e){const o=t.size,r=u.getEncodedBits(e);let n,i,a;for(let l=0;l<18;l++)n=Math.floor(l/3),i=l%3+o-8-3,a=1===(r>>l&1),t.set(n,i,a,!0),t.set(i,n,a,!0)}(p,e),function(t,e){const o=t.size;let r=-1,n=o-1,i=7,a=0;for(let l=o-1;l>0;l-=2)for(6===l&&l--;;){for(let o=0;o<2;o++)if(!t.isReserved(n,l-o)){let r=!1;a>>i&1)),t.set(n,l-o,r),i--,-1===i&&(a++,i=7)}if(n+=r,n<0||o<=n){n-=r,r=-r;break}}}(p,h),isNaN(n)&&(n=c.getBestMask(p,f.bind(null,p,o))),c.applyMask(n,p),f(p,o,n),{modules:p,version:e,errorCorrectionLevel:o,maskPattern:n,segments:i}}e.create=function(t,e){if("undefined"===typeof t||""===t)throw new Error("No input text");let o,i,a=n.M;return"undefined"!==typeof e&&(a=n.from(e.errorCorrectionLevel,n.M),o=u.from(e.version),i=c.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),v(t,o,a,i)}},3487:function(t,e){function o(){this.buffer=[],this.length=0}o.prototype={get:function(t){const e=Math.floor(t/8);return 1===(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let o=0;o>>e-o-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=o},3488:function(t,e){function o(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}o.prototype.set=function(t,e,o,r){const n=t*this.size+e;this.data[n]=o,r&&(this.reservedBit[n]=!0)},o.prototype.get=function(t,e){return this.data[t*this.size+e]},o.prototype.xor=function(t,e,o){this.data[t*this.size+e]^=o},o.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=o},3489:function(t,e,o){const r=o(3473).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,o=r(t),n=145===o?26:2*Math.ceil((o-13)/(2*e-2)),i=[o-7];for(let r=1;r=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let r=0,n=0,i=0,a=null,l=null;for(let s=0;s=5&&(r+=o+(n-5)),a=e,n=1),e=t.get(c,s),e===l?i++:(i>=5&&(r+=o+(i-5)),l=e,i=1)}n>=5&&(r+=o+(n-5)),i>=5&&(r+=o+(i-5))}return r},e.getPenaltyN2=function(t){const e=t.size;let o=0;for(let r=0;r=10&&(1488===r||93===r)&&o++,i=i<<1&2047|t.get(a,n),a>=10&&(1488===i||93===i)&&o++}return o*n},e.getPenaltyN4=function(t){let e=0;const o=t.data.length;for(let r=0;r0){const t=new Uint8Array(this.degree);return t.set(o,n),t}return o},t.exports=n},3493:function(t,e,o){const r=o(3494);e.mul=function(t,e){const o=new Uint8Array(t.length+e.length-1);for(let n=0;n=0;){const t=o[0];for(let i=0;i1)return function(t,o){for(let r=1;r<=40;r++)if(d(t,r)<=e.getCapacity(r,o,a.MIXED))return r}(t,n);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,o,r){for(let n=1;n<=40;n++)if(o<=e.getCapacity(n,r,t))return n}(r.mode,r.getLength(),n)},e.getEncodedBits=function(t){if(!l.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-s>=0;)e^=7973<=0;)i^=1335<=0?t[t.length-1]:null;return o&&o.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(l))},e.rawSplit=function(t){return e.fromArray(m(t,c.isKanjiModeEnabled()))}},3498:function(t,e,o){const r=o(3474);function n(t){this.mode=r.NUMERIC,this.data=t.toString()}n.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let e,o,r;for(e=0;e+3<=this.data.length;e+=3)o=this.data.substr(e,3),r=parseInt(o,10),t.put(r,10);const n=this.data.length-e;n>0&&(o=this.data.substr(e),r=parseInt(o,10),t.put(r,3*n+1))},t.exports=n},3499:function(t,e,o){const r=o(3474),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=r.ALPHANUMERIC,this.data=t}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let o=45*n.indexOf(this.data[e]);o+=n.indexOf(this.data[e+1]),t.put(o,11)}this.data.length%2&&t.put(n.indexOf(this.data[e]),6)},t.exports=i},3500:function(t,e,o){const r=o(3501),n=o(3474);function i(t){this.mode=n.BYTE,"string"===typeof t&&(t=r(t)),this.data=new Uint8Array(t)}i.getBitsLength=function(t){return 8*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){for(let e=0,o=this.data.length;e=55296&&n<=56319&&o>r+1){var i=t.charCodeAt(r+1);i>=56320&&i<=57343&&(n=1024*(n-55296)+i-56320+65536,r+=1)}n<128?e.push(n):n<2048?(e.push(n>>6|192),e.push(63&n|128)):n<55296||n>=57344&&n<65536?(e.push(n>>12|224),e.push(n>>6&63|128),e.push(63&n|128)):n>=65536&&n<=1114111?(e.push(n>>18|240),e.push(n>>12&63|128),e.push(n>>6&63|128),e.push(63&n|128)):e.push(239,191,189)}return new Uint8Array(e).buffer}},3502:function(t,e,o){const r=o(3474),n=o(3473);function i(t){this.mode=r.KANJI,this.data=t}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e=33088&&o<=40956)o-=33088;else{if(!(o>=57408&&o<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");o-=49472}o=192*(o>>>8&255)+(255&o),t.put(o,13)}},t.exports=i},3503:function(t,e,o){"use strict";var r={single_source_shortest_paths:function(t,e,o){var n={},i={};i[e]=0;var a,l,s,c,d,h,u,m=r.PriorityQueue.make();for(m.push(e,0);!m.empty();)for(s in l=(a=m.pop()).value,c=a.cost,d=t[l]||{})d.hasOwnProperty(s)&&(h=c+d[s],u=i[s],("undefined"===typeof i[s]||u>h)&&(i[s]=h,m.push(s,h),n[s]=l));if("undefined"!==typeof o&&"undefined"===typeof i[o]){var p=["Could not find a path from ",e," to ",o,"."].join("");throw new Error(p)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var o=[],r=e;r;)o.push(r),t[r],r=t[r];return o.reverse(),o},find_path:function(t,e,o){var n=r.single_source_shortest_paths(t,e,o);return r.extract_shortest_path_from_predecessor_list(n,o)},PriorityQueue:{make:function(t){var e,o=r.PriorityQueue,n={};for(e in t=t||{},o)o.hasOwnProperty(e)&&(n[e]=o[e]);return n.queue=[],n.sorter=t.sorter||o.default_sorter,n},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var o={value:t,cost:e};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=r},3504:function(t,e,o){const r=o(3481);e.render=function(t,e,o){let n=o,i=e;"undefined"!==typeof n||e&&e.getContext||(n=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),n=r.getOptions(n);const a=r.getImageWidth(t.modules.size,n),l=i.getContext("2d"),s=l.createImageData(a,a);return r.qrToImageData(s.data,t,n),function(t,e,o){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=o,e.width=o,e.style.height=o+"px",e.style.width=o+"px"}(l,i,a),l.putImageData(s,0,0),i},e.renderToDataURL=function(t,o,r){let n=r;"undefined"!==typeof n||o&&o.getContext||(n=o,o=void 0),n||(n={});const i=e.render(t,o,n),a=n.type||"image/png",l=n.rendererOpts||{};return i.toDataURL(a,l.quality)}},3505:function(t,e,o){const r=o(3481);function n(t,e){const o=t.a/255,r=e+'="'+t.hex+'"';return o<1?r+" "+e+'-opacity="'+o.toFixed(2).slice(1)+'"':r}function i(t,e,o){let r=t+e;return"undefined"!==typeof o&&(r+=" "+o),r}e.render=function(t,e,o){const a=r.getOptions(e),l=t.modules.size,s=t.modules.data,c=l+2*a.margin,d=a.color.light.a?"':"",h="0&&c>0&&t[s-1]||(r+=a?i("M",c+o,.5+d+o):i("m",n,0),n=0,a=!1),c+1',u='viewBox="0 0 '+c+" "+c+'"',m=''+d+h+"\n";return"function"===typeof o&&o(null,m),m}},3506:function(t,e,o){"use strict";o.r(e),o.d(e,"WcmModal",(function(){return Ga})),o.d(e,"WcmQrCode",(function(){return qi}));var r=o(143);const n=window,i=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),l=new WeakMap;class s{constructor(t,e,o){if(this._$cssResult$=!0,o!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=l.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&l.set(e,t))}return t}toString(){return this.cssText}}const c=function(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),r=1;re+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[r+1]),t[0]);return new s(n,t,a)},d=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new s("string"==typeof t?t:t+"",void 0,a))(e)})(t):t;var h;const u=window,m=u.trustedTypes,p=m?m.emptyScript:"",g=u.reactiveElementPolyfillSupport,f={toAttribute(t,e){switch(e){case Boolean:t=t?p:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},w=(t,e)=>e!==t&&(e==e||t==t),v={attribute:!0,type:String,converter:f,reflect:!1,hasChanged:w},b="finalized";class y extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,o)=>{const r=this._$Ep(o,e);void 0!==r&&(this._$Ev.set(r,o),t.push(r))})),t}static createProperty(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const o="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,o,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,o){return{get(){return this[e]},set(r){const n=this[t];this[e]=r,this.requestUpdate(t,n,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||v}static finalize(){if(this.hasOwnProperty(b))return!1;this[b]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const o of e)this.createProperty(o,t[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(d(t))}else void 0!==t&&e.push(d(t));return e}static _$Ep(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,o;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(o=t.hostConnected)||void 0===o||o.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{i?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),r=n.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=e.cssText,t.appendChild(o)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EO(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;var r;const n=this.constructor._$Ep(t,o);if(void 0!==n&&!0===o.reflect){const i=(void 0!==(null===(r=o.converter)||void 0===r?void 0:r.toAttribute)?o.converter:f).toAttribute(e,o.type);this._$El=t,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$El=null}}_$AK(t,e){var o;const r=this.constructor,n=r._$Ev.get(t);if(void 0!==n&&this._$El!==n){const t=r.getPropertyOptions(n),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(o=t.converter)||void 0===o?void 0:o.fromAttribute)?t.converter:f;this._$El=n,this[n]=i.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,o){let r=!0;void 0!==t&&(((o=o||this.constructor.getPropertyOptions(t)).hasChanged||w)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===o.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,o))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(o)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(o)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var x;y[b]=!0,y.elementProperties=new Map,y.elementStyles=[],y.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:y}),(null!==(h=u.reactiveElementVersions)&&void 0!==h?h:u.reactiveElementVersions=[]).push("1.6.2");const A=window,C=A.trustedTypes,O=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,_="$lit$",E="lit$".concat((Math.random()+"").slice(9),"$"),$="?"+E,k="<".concat($,">"),j=document,I=()=>j.createComment(""),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,P=t=>T(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),R="[ \t\n\f\r]",S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,L=/>/g,B=RegExp(">|".concat(R,"(?:([^\\s\"'>=/]+)(").concat(R,"*=").concat(R,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),D=/'/g,U=/"/g,W=/^(?:script|style|textarea|title)$/i,H=t=>function(e){for(var o=arguments.length,r=new Array(o>1?o-1:0),n=1;n{const o=t.length-1,r=[];let n,i=2===e?"":"",a=S;for(let l=0;l"===s[0]?(a=null!=n?n:S,c=-1):void 0===s[1]?c=-2:(c=a.lastIndex-s[2].length,o=s[1],a=void 0===s[3]?B:'"'===s[3]?U:D):a===U||a===D?a=B:a===N||a===L?a=S:(a=B,n=void 0);const h=a===B&&t[l+1].startsWith("/>")?" ":"";i+=a===S?e+k:c>=0?(r.push(o),e.slice(0,c)+_+e.slice(c)+E+h):e+E+(-2===c?(r.push(void 0),l):h)}return[K(t,i+(t[o]||"")+(2===e?"":"")),r]};class J{constructor(t,e){let o,{strings:r,_$litType$:n}=t;this.parts=[];let i=0,a=0;const l=r.length-1,s=this.parts,[c,d]=Y(r,n);if(this.el=J.createElement(c,e),q.currentNode=this.el.content,2===n){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=q.nextNode())&&s.length0){o.textContent=C?C.emptyScript:"";for(let r=0;r2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3?arguments[3]:void 0;var n,i,a,l;if(e===Z)return e;let s=void 0!==r?null===(n=o._$Co)||void 0===n?void 0:n[r]:o._$Cl;const c=M(e)?void 0:e._$litDirective$;return(null==s?void 0:s.constructor)!==c&&(null===(i=null==s?void 0:s._$AO)||void 0===i||i.call(s,!1),void 0===c?s=void 0:(s=new c(t),s._$AT(t,o,r)),void 0!==r?(null!==(a=(l=o)._$Co)&&void 0!==a?a:l._$Co=[])[r]=s:o._$Cl=s),void 0!==s&&(e=Q(t,s._$AS(t,e.values),s,r)),e}class G{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:o},parts:r}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:j).importNode(o,!0);q.currentNode=n;let i=q.nextNode(),a=0,l=0,s=r[0];for(;void 0!==s;){if(a===s.index){let e;2===s.type?e=new X(i,i.nextSibling,this,t):1===s.type?e=new s.ctor(i,s.name,s.strings,this,t):6===s.type&&(e=new it(i,this,t)),this._$AV.push(e),s=r[++l]}a!==(null==s?void 0:s.index)&&(i=q.nextNode(),a++)}return q.currentNode=j,n}v(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class X{constructor(t,e,o,r){var n;this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=r,this._$Cp=null===(n=null==r?void 0:r.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t){t=Q(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),M(t)?t===F||null==t||""===t?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==Z&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):P(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==F&&M(this._$AH)?this._$AA.nextSibling.data=t:this.$(j.createTextNode(t)),this._$AH=t}g(t){var e;const{values:o,_$litType$:r}=t,n="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=J.createElement(K(r.h,r.h[0]),this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.v(o);else{const t=new G(n,this),e=t.u(this.options);t.v(o),this.$(e),this._$AH=t}}_$AC(t){let e=V.get(t.strings);return void 0===e&&V.set(t.strings,e=new J(t)),e}T(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,r=0;for(const n of t)r===e.length?e.push(o=new X(this.k(I()),this.k(I()),this,this.options)):o=e[r],o._$AI(n),r++;r0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,e=arguments.length>1?arguments[1]:void 0;var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class tt{constructor(t,e,o,r,n){this.type=1,this._$AH=F,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=F}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,o=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const n=this.strings;let i=!1;if(void 0===n)t=Q(this,t,e,0),i=!M(t)||t!==this._$AH&&t!==Z,i&&(this._$AH=t);else{const r=t;let a,l;for(t=n[0],a=0;a1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:F)===Z)return;const o=this._$AH,r=t===F&&o!==F||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==F&&(o===F||r);r&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const at=A.litHtmlPolyfillSupport;null==at||at(J,X),(null!==(x=A.litHtmlVersions)&&void 0!==x?x:A.litHtmlVersions=[]).push("2.8.0");var lt;const st=window,ct=st.trustedTypes,dt=ct?ct.createPolicy("lit-html",{createHTML:t=>t}):void 0,ht="$lit$",ut="lit$".concat((Math.random()+"").slice(9),"$"),mt="?"+ut,pt="<".concat(mt,">"),gt=document,ft=()=>gt.createComment(""),wt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,vt=Array.isArray,bt=t=>vt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),yt="[ \t\n\f\r]",xt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,At=/-->/g,Ct=/>/g,Ot=RegExp(">|".concat(yt,"(?:([^\\s\"'>=/]+)(").concat(yt,"*=").concat(yt,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),_t=/'/g,Et=/"/g,$t=/^(?:script|style|textarea|title)$/i,kt=t=>function(e){for(var o=arguments.length,r=new Array(o>1?o-1:0),n=1;n{const o=t.length-1,r=[];let n,i=2===e?"":"",a=xt;for(let s=0;s"===l[0]?(a=null!=n?n:xt,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,o=l[1],a=void 0===l[3]?Ot:'"'===l[3]?Et:_t):a===Et||a===_t?a=Ot:a===At||a===Ct?a=xt:(a=Ot,n=void 0);const h=a===Ot&&t[s+1].startsWith("/>")?" ":"";i+=a===xt?e+pt:c>=0?(r.push(o),e.slice(0,c)+ht+e.slice(c)+ut+h):e+ut+(-2===c?(r.push(void 0),s):h)}const l=i+(t[o]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==dt?dt.createHTML(l):l,r]};class Nt{constructor(t,e){let o,{strings:r,_$litType$:n}=t;this.parts=[];let i=0,a=0;const l=r.length-1,s=this.parts,[c,d]=St(r,n);if(this.el=Nt.createElement(c,e),Rt.currentNode=this.el.content,2===n){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=Rt.nextNode())&&s.length0){o.textContent=ct?ct.emptyScript:"";for(let r=0;r2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3?arguments[3]:void 0;var n,i,a,l;if(e===Mt)return e;let s=void 0!==r?null===(n=o._$Co)||void 0===n?void 0:n[r]:o._$Cl;const c=wt(e)?void 0:e._$litDirective$;return(null==s?void 0:s.constructor)!==c&&(null===(i=null==s?void 0:s._$AO)||void 0===i||i.call(s,!1),void 0===c?s=void 0:(s=new c(t),s._$AT(t,o,r)),void 0!==r?(null!==(a=(l=o)._$Co)&&void 0!==a?a:l._$Co=[])[r]=s:o._$Cl=s),void 0!==s&&(e=Lt(t,s._$AS(t,e.values),s,r)),e}class Bt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:o},parts:r}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:gt).importNode(o,!0);Rt.currentNode=n;let i=Rt.nextNode(),a=0,l=0,s=r[0];for(;void 0!==s;){if(a===s.index){let e;2===s.type?e=new Dt(i,i.nextSibling,this,t):1===s.type?e=new s.ctor(i,s.name,s.strings,this,t):6===s.type&&(e=new Ft(i,this,t)),this._$AV.push(e),s=r[++l]}a!==(null==s?void 0:s.index)&&(i=Rt.nextNode(),a++)}return Rt.currentNode=gt,n}v(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class Dt{constructor(t,e,o,r){var n;this.type=2,this._$AH=Tt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=r,this._$Cp=null===(n=null==r?void 0:r.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t){t=Lt(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),wt(t)?t===Tt||null==t||""===t?(this._$AH!==Tt&&this._$AR(),this._$AH=Tt):t!==this._$AH&&t!==Mt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):bt(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Tt&&wt(this._$AH)?this._$AA.nextSibling.data=t:this.$(gt.createTextNode(t)),this._$AH=t}g(t){var e;const{values:o,_$litType$:r}=t,n="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=Nt.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.v(o);else{const t=new Bt(n,this),e=t.u(this.options);t.v(o),this.$(e),this._$AH=t}}_$AC(t){let e=Pt.get(t.strings);return void 0===e&&Pt.set(t.strings,e=new Nt(t)),e}T(t){vt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,r=0;for(const n of t)r===e.length?e.push(o=new Dt(this.k(ft()),this.k(ft()),this,this.options)):o=e[r],o._$AI(n),r++;r0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,e=arguments.length>1?arguments[1]:void 0;var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Ut{constructor(t,e,o,r,n){this.type=1,this._$AH=Tt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=Tt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,o=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const n=this.strings;let i=!1;if(void 0===n)t=Lt(this,t,e,0),i=!wt(t)||t!==this._$AH&&t!==Mt,i&&(this._$AH=t);else{const r=t;let a,l;for(t=n[0],a=0;a1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:Tt)===Mt)return;const o=this._$AH,r=t===Tt&&o!==Tt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==Tt&&(o===Tt||r);r&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class Ft{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){Lt(this,t)}}const Vt=st.litHtmlPolyfillSupport;null==Vt||Vt(Nt,Dt),(null!==(lt=st.litHtmlVersions)&&void 0!==lt?lt:st.litHtmlVersions=[]).push("2.7.4");var qt,Kt;class Yt extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const o=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=o.firstChild),o}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{var r,n;const i=null!==(r=null==o?void 0:o.renderBefore)&&void 0!==r?r:e;let a=i._$litPart$;if(void 0===a){const t=null!==(n=null==o?void 0:o.renderBefore)&&void 0!==n?n:null;i._$litPart$=a=new Dt(e.insertBefore(ft(),t),t,void 0,null!=o?o:{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Mt}}Yt.finalized=!0,Yt._$litElement$=!0,null===(qt=globalThis.litElementHydrateSupport)||void 0===qt||qt.call(globalThis,{LitElement:Yt});const Jt=globalThis.litElementPolyfillSupport;null==Jt||Jt({LitElement:Yt});(null!==(Kt=globalThis.litElementVersions)&&void 0!==Kt?Kt:globalThis.litElementVersions=[]).push("3.3.2");const Qt=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:o,elements:r}=e;return{kind:o,elements:r,finisher(e){customElements.define(t,e)}}})(t,e),Gt=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(o){o.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(o){o.createProperty(e.key,t)}},Xt=(t,e,o)=>{e.constructor.createProperty(o,t)};function te(t){return(e,o)=>void 0!==o?Xt(t,e,o):Gt(t,e)}function ee(t){return te({...t,state:!0})}var oe;null===(oe=window.HTMLSlotElement)||void 0===oe||oe.prototype.assignedElements;const re=1;class ne{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const ie=(ae=class extends ne{constructor(t){var e;if(super(t),t.type!==re||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,e){let[o]=e;var r,n;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in o)o[t]&&!(null===(r=this.nt)||void 0===r?void 0:r.has(t))&&this.it.add(t);return this.render(o)}const i=t.element.classList;this.it.forEach((t=>{t in o||(i.remove(t),this.it.delete(t))}));for(const a in o){const t=!!o[a];t===this.it.has(a)||(null===(n=this.nt)||void 0===n?void 0:n.has(a))||(t?(i.add(a),this.it.add(a)):(i.remove(a),this.it.delete(a)))}return Z}},function(){for(var t=arguments.length,e=new Array(t),o=0;o1e3*t,s:t=>t/1e3},de=()=>{},he=t=>t;function ue(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(o){}}const me=t=>t(),pe=function(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:se.duration;return new Proxy({animations:t.map(me).filter(Boolean),duration:o,options:e},ge)},ge={get:(t,e)=>{const o=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return ce.s((null===o||void 0===o?void 0:o[e])||0);case"playbackRate":case"playState":return null===o||void 0===o?void 0:o[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(fe)).catch(de)),t.finished;case"stop":return()=>{t.animations.forEach((t=>ue(t)))};case"forEachNative":return e=>{t.animations.forEach((o=>e(o,t)))};default:return"undefined"===typeof(null===o||void 0===o?void 0:o[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,o)=>{switch(e){case"currentTime":o=ce.ms(o);case"currentTime":case"playbackRate":for(let r=0;rt.finished,we=t=>"object"===typeof t&&Boolean(t.createAnimation),ve=t=>"number"===typeof t,be=t=>Array.isArray(t)&&!ve(t[0]),ye=(t,e,o)=>-o*t+o*e+t,xe=(t,e,o)=>e-t===0?1:(o-t)/(e-t);function Ae(t,e){const o=t[t.length-1];for(let r=1;r<=e;r++){const n=xe(0,e,r);t.push(ye(o,1,n))}}const Ce=(t,e,o)=>{const r=e-t;return((o-t)%r+r)%r+t};const Oe=(t,e,o)=>Math.min(Math.max(o,t),e);function _e(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){const e=[0];return Ae(e,t-1),e}(t.length),o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:he;const r=t.length,n=r-e.length;return n>0&&Ae(e,n),n=>{let i=0;for(;i(((1-3*o+3*e)*t+(3*o-6*e))*t+3*e)*t,$e=1e-7,ke=12;function je(t,e,o,r){if(t===e&&o===r)return he;const n=e=>function(t,e,o,r,n){let i,a,l=0;do{a=e+(o-e)/2,i=Ee(a,r,n)-t,i>0?o=a:e=a}while(Math.abs(i)>$e&&++l0===t||1===t?t:Ee(n(t),e,r)}const Ie=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";return o=>{const r=(o="end"===e?Math.min(o,.999):Math.max(o,.001))*t,n="end"===e?Math.floor(r):Math.ceil(r);return Oe(0,1,n/t)}},Me=t=>"function"===typeof t,Te=t=>Array.isArray(t)&&ve(t[0]),Pe={ease:je(.25,.1,.25,1),"ease-in":je(.42,0,1,1),"ease-in-out":je(.42,0,.58,1),"ease-out":je(0,0,.58,1)},Re=/\((.*?)\)/;function Se(t){if(Me(t))return t;if(Te(t))return je(...t);if(Pe[t])return Pe[t];if(t.startsWith("steps")){const e=Re.exec(t);if(e){const t=e[1].split(",");return Ie(parseFloat(t[0]),t[1].trim())}}return he}class Ne{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1],{easing:o,duration:r=se.duration,delay:n=se.delay,endDelay:i=se.endDelay,repeat:a=se.repeat,offset:l,direction:s="normal"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=he,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),o=o||se.easing,we(o)){const t=o.createAnimation(e);o=t.easing,e=t.keyframes||e,r=t.duration||r}this.repeat=a,this.easing=be(o)?he:Se(o),this.updateDuration(r);const c=_e(e,l,be(o)?o.map(Se):he);this.tick=e=>{var o;let r=0;r=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=r,r/=1e3,r=Math.max(r-n,0),"finished"===this.playState&&void 0===this.pauseTime&&(r=this.totalDuration);const a=r/this.duration;let l=Math.floor(a),d=a%1;!d&&a>=1&&(d=1),1===d&&l--;const h=l%2;("reverse"===s||"alternate"===s&&h||"alternate-reverse"===s&&!h)&&(d=1-d);const u=r>=this.totalDuration?1:Math.min(d,1),m=c(this.easing(u));t(m);void 0===this.pauseTime&&("finished"===this.playState||r>=this.totalDuration+i)?(this.playState="finished",null===(o=this.resolve)||void 0===o||o.call(this,m)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}class Le{setAnimation(t){this.animation=t,null===t||void 0===t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const Be=new WeakMap;function De(t){return Be.has(t)||Be.set(t,{transforms:[],values:new Map}),Be.get(t)}const Ue=["","X","Y","Z"],We={x:"translateX",y:"translateY",z:"translateZ"},He={syntax:"",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},ze={translate:{syntax:"",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:He,scale:{syntax:"",initialValue:1,toDefaultUnit:he},skew:He},Ze=new Map,Fe=t=>"--motion-".concat(t),Ve=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{Ue.forEach((e=>{Ve.push(t+e),Ze.set(Fe(t+e),ze[t])}))}));const qe=(t,e)=>Ve.indexOf(t)-Ve.indexOf(e),Ke=new Set(Ve),Ye=t=>Ke.has(t),Je=(t,e)=>{We[e]&&(e=We[e]);const{transforms:o}=De(t);var r,n;n=e,-1===(r=o).indexOf(n)&&r.push(n),t.style.transform=Qe(o)},Qe=t=>t.sort(qe).reduce(Ge,"").trim(),Ge=(t,e)=>"".concat(t," ").concat(e,"(var(").concat(Fe(e),"))"),Xe=t=>t.startsWith("--"),to=new Set;const eo=(t,e)=>document.createElement("div").animate(t,e),oo={cssRegisterProperty:()=>"undefined"!==typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{eo({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(eo({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{eo({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},ro={},no={};for(const ql in oo)no[ql]=()=>(void 0===ro[ql]&&(ro[ql]=oo[ql]()),ro[ql]);const io=(t,e)=>Me(t)?no.linearEasing()?"linear(".concat(((t,e)=>{let o="";const r=Math.round(e/.015);for(let n=0;n{let[e,o,r,n]=t;return"cubic-bezier(".concat(e,", ").concat(o,", ").concat(r,", ").concat(n,")")};const lo=t=>Array.isArray(t)?t:[t];function so(t){return We[t]&&(t=We[t]),Ye(t)?Fe(t):t}const co={get:(t,e)=>{e=so(e);let o=Xe(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!o&&0!==o){const t=Ze.get(e);t&&(o=t.initialValue)}return o},set:(t,e,o)=>{e=so(e),Xe(e)?t.style.setProperty(e,o):t.style[e]=o}},ho=t=>"string"===typeof t;function uo(t,e,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=arguments.length>4?arguments[4]:void 0;const i=window.__MOTION_DEV_TOOLS_RECORD,a=!1!==r.record&&i;let l,{duration:s=se.duration,delay:c=se.delay,endDelay:d=se.endDelay,repeat:h=se.repeat,easing:u=se.easing,persist:m=!1,direction:p,offset:g,allowWebkitAcceleration:f=!1}=r;const w=De(t),v=Ye(e);let b=no.waapi();v&&Je(t,e);const y=so(e),x=function(t,e){return t.has(e)||t.set(e,new Le),t.get(e)}(w.values,y),A=Ze.get(y);return ue(x.animation,!(we(u)&&x.generator)&&!1!==r.record),()=>{const w=()=>{var e,o;return null!==(o=null!==(e=co.get(t,y))&&void 0!==e?e:null===A||void 0===A?void 0:A.initialValue)&&void 0!==o?o:0};let C=function(t,e){for(let o=0;oe+t)}return r}(C,A);if(we(u)){const t=u.createAnimation(C,"opacity"!==e,w,y,x);u=t.easing,C=t.keyframes||C,s=t.duration||s}if(Xe(y)&&(no.cssRegisterProperty()?function(t){if(!to.has(t)){to.add(t);try{const{syntax:e,initialValue:o}=Ze.has(t)?Ze.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:o})}catch(e){}}}(y):b=!1),v&&!no.linearEasing()&&(Me(u)||be(u)&&u.some(Me))&&(b=!1),b){A&&(C=C.map((t=>ve(t)?A.toDefaultUnit(t):t))),1!==C.length||no.partialKeyframes()&&!a||C.unshift(w());const e={delay:ce.ms(c),duration:ce.ms(s),endDelay:ce.ms(d),easing:be(u)?void 0:io(u,s),direction:p,iterations:h+1,fill:"both"};l=t.animate({[y]:C,offset:g,easing:be(u)?u.map((t=>io(t,s))):void 0},e),l.finished||(l.finished=new Promise(((t,e)=>{l.onfinish=t,l.oncancel=e})));const o=C[C.length-1];l.finished.then((()=>{m||(co.set(t,y,o),l.cancel())})).catch(de),f||(l.playbackRate=1.000001)}else if(n&&v)C=C.map((t=>"string"===typeof t?parseFloat(t):t)),1===C.length&&C.unshift(parseFloat(w())),l=new n((e=>{co.set(t,y,O?O(e):e)}),C,Object.assign(Object.assign({},r),{duration:s,easing:u}));else{const e=C[C.length-1];co.set(t,y,A&&ve(e)?A.toDefaultUnit(e):e)}return a&&i(t,e,C,{duration:s,delay:c,easing:u,repeat:h,offset:g},"motion-one"),x.setAnimation(l),l}}const mo=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function po(t,e,o){return Me(t)?t(e,o):t}const go=(fo=Ne,function(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(t=function(t,e){var o;return"string"===typeof t?e?(null!==(o=e[t])&&void 0!==o||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}(t)).length;Boolean(r),Boolean(e);const n=[];for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:{};return pe([()=>{const o=new Ne(t,[0,1],e);return o.finished.catch((()=>{})),o}],e,e.duration)}function vo(t,e,o){return(Me(t)?wo:go)(t,e,o)}const bo=t=>null!=t?t:F;var yo,xo,Ao,Co,Oo,_o,Eo,$o,ko,jo,Io,Mo,To,Po,Ro,So,No,Lo,Bo,Do,Uo,Wo,Ho,zo,Zo,Fo,Vo,qo,Ko,Yo,Jo,Qo,Go,Xo,tr,er,or,rr,nr,ir,ar,lr,sr,cr,dr,hr,ur,mr,pr,gr,fr,wr,vr,br,yr,xr,Ar,Cr,Or,_r,Er,$r,kr,jr,Ir,Mr,Tr,Pr,Rr,Sr,Nr,Lr,Br,Dr,Ur,Wr,Hr,zr,Zr,Fr,Vr,qr,Kr,Yr,Jr,Qr,Gr,Xr,tn,en,on,rn,nn,an,ln,sn,cn,dn,hn,un,mn,pn,gn,fn,wn,vn,bn,yn,xn,An,Cn,On,_n,En,$n,kn,jn,In,Mn,Tn,Pn,Rn,Sn,Nn,Ln,Bn,Dn,Un,Wn,Hn,zn=o(3484),Zn=o.n(zn),Fn=Object.defineProperty,Vn=Object.getOwnPropertySymbols,qn=Object.prototype.hasOwnProperty,Kn=Object.prototype.propertyIsEnumerable,Yn=(t,e,o)=>e in t?Fn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Jn=(t,e)=>{for(var o in e||(e={}))qn.call(e,o)&&Yn(t,o,e[o]);if(Vn)for(var o of Vn(e))Kn.call(e,o)&&Yn(t,o,e[o]);return t};const Qn={getPreset:t=>({"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}[t]),setTheme(){const t=document.querySelector(":root"),{themeVariables:e}=le.h.state;if(t){const o=Jn(Jn(Jn({},function(){var t;const e={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[null!=(t=le.h.state.themeMode)?t:"dark"];return{"--wcm-color-fg-1":e.foreground[1],"--wcm-color-fg-2":e.foreground[2],"--wcm-color-fg-3":e.foreground[3],"--wcm-color-bg-1":e.background[1],"--wcm-color-bg-2":e.background[2],"--wcm-color-bg-3":e.background[3],"--wcm-color-overlay":e.overlay}}()),{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}),e);Object.entries(o).forEach((e=>{let[o,r]=e;return t.style.setProperty(o,r)}))}},globalCss:c(yo||(yo=Object(r.a)(["*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}"])))},Gn=c(xo||(xo=Object(r.a)(["button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}"])));var Xn=Object.defineProperty,ti=Object.getOwnPropertyDescriptor,ei=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?ti(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Xn(e,o,i),i};let oi=class extends Yt{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const t={"wcm-icon-left":void 0!==this.iconLeft,"wcm-icon-right":void 0!==this.iconRight,"wcm-ghost":"ghost"===this.variant,"wcm-outline":"outline"===this.variant};let e="inverse";return"ghost"===this.variant&&(e="secondary"),"outline"===this.variant&&(e="accent"),jt(Ao||(Ao=Object(r.a)(['"])),ie(t),this.disabled,this.onClick,this.iconLeft,e,this.iconRight)}};oi.styles=[Qn.globalCss,Gn],ei([te({type:Boolean})],oi.prototype,"disabled",2),ei([te()],oi.prototype,"iconLeft",2),ei([te()],oi.prototype,"iconRight",2),ei([te()],oi.prototype,"onClick",2),ei([te()],oi.prototype,"variant",2),oi=ei([Qt("wcm-button")],oi);const ri=c(Co||(Co=Object(r.a)([":host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}"])));var ni=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,ai=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?ii(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&ni(e,o,i),i};let li=class extends Yt{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const t={"wcm-secondary":"secondary"===this.variant};return jt(Oo||(Oo=Object(r.a)([''])),this.disabled,ie(t))}};li.styles=[Qn.globalCss,ri],ai([te({type:Boolean})],li.prototype,"disabled",2),ai([te()],li.prototype,"variant",2),li=ai([Qt("wcm-button-big")],li);const si=c(_o||(_o=Object(r.a)([":host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}"])));var ci=Object.defineProperty,di=Object.getOwnPropertyDescriptor;let hi=class extends Yt{render(){return jt(Eo||(Eo=Object(r.a)(["
"])))}};hi.styles=[Qn.globalCss,si],hi=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?di(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&ci(e,o,i),i})([Qt("wcm-info-footer")],hi);const ui={CROSS_ICON:z($o||($o=Object(r.a)(['']))),WALLET_CONNECT_LOGO:z(ko||(ko=Object(r.a)(['']))),WALLET_CONNECT_ICON:z(jo||(jo=Object(r.a)(['']))),WALLET_CONNECT_ICON_COLORED:z(Io||(Io=Object(r.a)(['']))),BACK_ICON:z(Mo||(Mo=Object(r.a)(['']))),COPY_ICON:z(To||(To=Object(r.a)(['']))),RETRY_ICON:z(Po||(Po=Object(r.a)(['']))),DESKTOP_ICON:z(Ro||(Ro=Object(r.a)(['']))),MOBILE_ICON:z(So||(So=Object(r.a)(['']))),ARROW_DOWN_ICON:z(No||(No=Object(r.a)(['']))),ARROW_UP_RIGHT_ICON:z(Lo||(Lo=Object(r.a)(['']))),ARROW_RIGHT_ICON:z(Bo||(Bo=Object(r.a)(['']))),QRCODE_ICON:z(Do||(Do=Object(r.a)(['']))),SCAN_ICON:z(Uo||(Uo=Object(r.a)(['']))),CHECKMARK_ICON:z(Wo||(Wo=Object(r.a)(['']))),SEARCH_ICON:z(Ho||(Ho=Object(r.a)(['']))),WALLET_PLACEHOLDER:z(zo||(zo=Object(r.a)(['']))),GLOBE_ICON:z(Zo||(Zo=Object(r.a)([''])))},mi=c(Fo||(Fo=Object(r.a)([".wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}"])));var pi=Object.defineProperty,gi=Object.getOwnPropertyDescriptor;let fi=class extends Yt{render(){return jt(Vo||(Vo=Object(r.a)(['
','
"])),ui.WALLET_CONNECT_LOGO,le.e.close,ui.CROSS_ICON)}};fi.styles=[Qn.globalCss,mi],fi=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?gi(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&pi(e,o,i),i})([Qt("wcm-modal-backcard")],fi);const wi=c(qo||(qo=Object(r.a)(["main{padding:20px;padding-top:0;width:100%}"])));var vi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor;let yi=class extends Yt{render(){return jt(Ko||(Ko=Object(r.a)(["
"])))}};yi.styles=[Qn.globalCss,wi],yi=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?bi(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&vi(e,o,i),i})([Qt("wcm-modal-content")],yi);const xi=c(Yo||(Yo=Object(r.a)(["footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}"])));var Ai=Object.defineProperty,Ci=Object.getOwnPropertyDescriptor;let Oi=class extends Yt{render(){return jt(Jo||(Jo=Object(r.a)(["
"])))}};Oi.styles=[Qn.globalCss,xi],Oi=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?Ci(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Ai(e,o,i),i})([Qt("wcm-modal-footer")],Oi);const _i=c(Qo||(Qo=Object(r.a)(["header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}"])));var Ei=Object.defineProperty,$i=Object.getOwnPropertyDescriptor,ki=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?$i(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Ei(e,o,i),i};let ji=class extends Yt{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return jt(Go||(Go=Object(r.a)(['"])),le.g.goBack,ui.BACK_ICON)}actionBtnTemplate(){return jt(Xo||(Xo=Object(r.a)(['"])),this.onAction,this.actionIcon)}render(){const t={"wcm-border":this.border},e=le.g.state.history.length>1,o=this.title?jt(tr||(tr=Object(r.a)(['',""])),this.title):jt(er||(er=Object(r.a)([""])));return jt(or||(or=Object(r.a)(['
'," "," ","
"])),ie(t),e?this.backBtnTemplate():null,o,this.onAction?this.actionBtnTemplate():null)}};ji.styles=[Qn.globalCss,_i],ki([te()],ji.prototype,"title",2),ki([te()],ji.prototype,"onAction",2),ki([te()],ji.prototype,"actionIcon",2),ki([te({type:Boolean})],ji.prototype,"border",2),ji=ki([Qt("wcm-modal-header")],ji);const Ii={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(t,e){const o=t.renderRoot.querySelector(e);if(!o)throw new Error("".concat(e," not found"));return o},getWalletIcon(t){let{id:e,image_id:o}=t;const{walletImages:r}=le.a.state;return null!=r&&r[e]?r[e]:o?le.d.getWalletImageUrl(o):""},getWalletName(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&t.length>8?"".concat(t.substring(0,8),".."):t},isMobileAnimation:()=>window.innerWidth<=Ii.MOBILE_BREAKPOINT,async preloadImage(t){const e=new Promise(((e,o)=>{const r=new Image;r.onload=e,r.onerror=o,r.crossOrigin="anonymous",r.src=t}));return Promise.race([e,le.b.wait(3e3)])},getErrorMessage:t=>t instanceof Error?t.message:"Unknown Error",debounce(t){let e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var r=arguments.length,n=new Array(r),i=0;i1&&void 0!==arguments[1]?arguments[1]:8;return t.length<=e?t:"".concat(t.substring(0,4),"...").concat(t.substring(t.length-4))},setRecentWallet(t){try{localStorage.setItem(Ii.WCM_RECENT_WALLET_DATA,JSON.stringify(t))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const t=localStorage.getItem(Ii.WCM_RECENT_WALLET_DATA);return t?JSON.parse(t):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes:(t,e)=>t.toUpperCase().includes(e.toUpperCase()),openWalletExplorerUrl(){le.b.openHref(Ii.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:t,mobile:e}=le.b.getWalletRouterData(),o=Boolean(null===t||void 0===t?void 0:t.native),r=Boolean(null===t||void 0===t?void 0:t.universal);return{isDesktop:o,isMobile:Boolean(null===e||void 0===e?void 0:e.native)||Boolean(null===e||void 0===e?void 0:e.universal),isWeb:r}},goToConnectingView(t){le.g.setData({Wallet:t});const e=le.b.isMobile(),{isDesktop:o,isWeb:r,isMobile:n}=Ii.getCachedRouterWalletPlatforms();e?n?le.g.push("MobileConnecting"):r?le.g.push("WebConnecting"):le.g.push("InstallWallet"):o?le.g.push("DesktopConnecting"):r?le.g.push("WebConnecting"):n?le.g.push("MobileQrcodeConnecting"):le.g.push("InstallWallet")}},Mi=c(rr||(rr=Object(r.a)([".wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}"])));var Ti=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,Ri=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?Pi(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Ti(e,o,i),i};let Si=class extends Yt{constructor(){super(),this.view=le.g.state.view,this.prevView=le.g.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=le.g.subscribe((t=>{this.view!==t.view&&this.onChangeRoute()}))}firstUpdated(){this.resizeObserver=new ResizeObserver((t=>{let[e]=t;const o="".concat(e.contentRect.height,"px");"0px"!==this.oldHeight&&vo(this.routerEl,{height:[this.oldHeight,o]},{duration:.2}),this.oldHeight=o})),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var t,e;null==(t=this.unsubscribe)||t.call(this),null==(e=this.resizeObserver)||e.disconnect()}get routerEl(){return Ii.getShadowRootElement(this,".wcm-router")}get contentEl(){return Ii.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return jt(nr||(nr=Object(r.a)([""])));case"DesktopConnecting":return jt(ir||(ir=Object(r.a)([""])));case"MobileConnecting":return jt(ar||(ar=Object(r.a)([""])));case"WebConnecting":return jt(lr||(lr=Object(r.a)([""])));case"MobileQrcodeConnecting":return jt(sr||(sr=Object(r.a)([""])));case"WalletExplorer":return jt(cr||(cr=Object(r.a)([""])));case"Qrcode":return jt(dr||(dr=Object(r.a)([""])));case"InstallWallet":return jt(hr||(hr=Object(r.a)([""])));default:return jt(ur||(ur=Object(r.a)(["
Not Found
"])))}}async onChangeRoute(){await vo(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=le.g.state.view,vo(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return jt(mr||(mr=Object(r.a)(['
',"
"])),this.viewTemplate())}};Si.styles=[Qn.globalCss,Mi],Ri([ee()],Si.prototype,"view",2),Ri([ee()],Si.prototype,"prevView",2),Si=Ri([Qt("wcm-modal-router")],Si);const Ni=c(pr||(pr=Object(r.a)(["div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}"])));var Li=Object.defineProperty,Bi=Object.getOwnPropertyDescriptor,Di=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?Bi(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Li(e,o,i),i};let Ui=class extends Yt{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=le.i.subscribe((t=>{t.open?(this.open=!0,this.timeout=setTimeout((()=>le.i.closeToast()),2200)):(this.open=!1,clearTimeout(this.timeout))}))}disconnectedCallback(){var t;null==(t=this.unsubscribe)||t.call(this),clearTimeout(this.timeout),le.i.closeToast()}render(){const{message:t,variant:e}=le.i.state,o={"wcm-success":"success"===e,"wcm-error":"error"===e};return this.open?jt(gr||(gr=Object(r.a)(['
'," ",'',"
"])),ie(o),"success"===e?ui.CHECKMARK_ICON:null,"error"===e?ui.CROSS_ICON:null,t):null}};Ui.styles=[Qn.globalCss,Ni],Di([ee()],Ui.prototype,"open",2),Ui=Di([Qt("wcm-modal-toast")],Ui);function Wi(t,e,o){return t!==e&&(t-e<0?e-t:t-e)<=o+.1}const Hi={generate(t,e,o){const n="#141414",i=[],a=function(t,e){const o=Array.prototype.slice.call(Zn.a.create(t,{errorCorrectionLevel:e}).modules.data,0),r=Math.sqrt(o.length);return o.reduce(((t,e,o)=>(o%r===0?t.push([e]):t[t.length-1].push(e))&&t),[])}(t,"Q"),l=e/a.length,s=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];s.forEach((t=>{let{x:e,y:o}=t;const c=(a.length-7)*l*e,d=(a.length-7)*l*o;for(let a=0;a'])),a%2===0?n:"#ffffff",t,.45*t,.45*t,t,c+l*a,d+l*a))}}));const c=Math.floor((o+25)/l),d=a.length/2-c/2,h=a.length/2+c/2-1,u=[];a.forEach(((t,e)=>{t.forEach(((t,o)=>{if(a[e][o]&&!(e<7&&o<7||e>a.length-8&&o<7||e<7&&o>a.length-8)&&!(e>d&&ed&&o{let[e,o]=t;m[e]?m[e].push(o):m[e]=[o]})),Object.entries(m).map((t=>{let[e,o]=t;const r=o.filter((t=>o.every((e=>!Wi(t,e,l)))));return[Number(e),r]})).forEach((t=>{let[e,o]=t;o.forEach((t=>{i.push(It(wr||(wr=Object(r.a)([''])),e,t,n,l/2.5))}))})),Object.entries(m).filter((t=>{let[e,o]=t;return o.length>1})).map((t=>{let[e,o]=t;const r=o.filter((t=>o.some((e=>Wi(t,e,l)))));return[Number(e),r]})).map((t=>{let[e,o]=t;o.sort(((t,e)=>tt.some((t=>Wi(n,t,l)))));t?t.push(n):r.push([n])}return[e,r.map((t=>[t[0],t[t.length-1]]))]})).forEach((t=>{let[e,o]=t;o.forEach((t=>{let[o,a]=t;i.push(It(vr||(vr=Object(r.a)([''])),e,e,o,a,n,l/1.25))}))})),i}},zi=c(br||(br=Object(r.a)(["@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}"])));var Zi=Object.defineProperty,Fi=Object.getOwnPropertyDescriptor,Vi=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?Fi(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Zi(e,o,i),i};let qi=class extends Yt{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const t="light"===le.h.state.themeMode?this.size:this.size-36;return It(yr||(yr=Object(r.a)(['',""])),t,t,Hi.generate(this.uri,t,t/4))}render(){const t={"wcm-dark":"dark"===le.h.state.themeMode};return jt(xr||(xr=Object(r.a)(['
'," ","
"])),"width: ".concat(this.size,"px"),ie(t),this.walletId||this.imageUrl?jt(Ar||(Ar=Object(r.a)([''])),bo(this.walletId),bo(this.imageId),bo(this.imageUrl)):ui.WALLET_CONNECT_ICON_COLORED,this.svgTemplate())}};qi.styles=[Qn.globalCss,zi],Vi([te()],qi.prototype,"uri",2),Vi([te({type:Number})],qi.prototype,"size",2),Vi([te()],qi.prototype,"imageId",2),Vi([te()],qi.prototype,"walletId",2),Vi([te()],qi.prototype,"imageUrl",2),qi=Vi([Qt("wcm-qrcode")],qi);const Ki=c(Cr||(Cr=Object(r.a)([":host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}"])));var Yi=Object.defineProperty,Ji=Object.getOwnPropertyDescriptor,Qi=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?Ji(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Yi(e,o,i),i};let Gi=class extends Yt{constructor(){super(...arguments),this.onChange=()=>null}render(){return jt(Or||(Or=Object(r.a)([' ',""])),this.onChange,ui.SEARCH_ICON)}};Gi.styles=[Qn.globalCss,Ki],Qi([te()],Gi.prototype,"onChange",2),Gi=Qi([Qt("wcm-search-input")],Gi);const Xi=c(_r||(_r=Object(r.a)(["@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}"])));var ta=Object.defineProperty,ea=Object.getOwnPropertyDescriptor;let oa=class extends Yt{render(){return jt(Er||(Er=Object(r.a)([''])))}};oa.styles=[Qn.globalCss,Xi],oa=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?ea(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&ta(e,o,i),i})([Qt("wcm-spinner")],oa);const ra=c($r||($r=Object(r.a)(["span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}"])));var na=Object.defineProperty,ia=Object.getOwnPropertyDescriptor,aa=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?ia(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&na(e,o,i),i};let la=class extends Yt{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const t={"wcm-big-bold":"big-bold"===this.variant,"wcm-medium-regular":"medium-regular"===this.variant,"wcm-small-regular":"small-regular"===this.variant,"wcm-small-thin":"small-thin"===this.variant,"wcm-xsmall-regular":"xsmall-regular"===this.variant,"wcm-xsmall-bold":"xsmall-bold"===this.variant,"wcm-color-primary":"primary"===this.color,"wcm-color-secondary":"secondary"===this.color,"wcm-color-tertiary":"tertiary"===this.color,"wcm-color-inverse":"inverse"===this.color,"wcm-color-accnt":"accent"===this.color,"wcm-color-error":"error"===this.color};return jt(kr||(kr=Object(r.a)([''])),ie(t))}};la.styles=[Qn.globalCss,ra],aa([te()],la.prototype,"variant",2),aa([te()],la.prototype,"color",2),la=aa([Qt("wcm-text")],la);const sa=c(jr||(jr=Object(r.a)(["button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}"])));var ca=Object.defineProperty,da=Object.getOwnPropertyDescriptor,ha=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?da(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&ca(e,o,i),i};let ua=class extends Yt{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?jt(Ir||(Ir=Object(r.a)(['RECENT']))):this.installed?jt(Mr||(Mr=Object(r.a)(['INSTALLED']))):null}handleClick(){le.c.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var t;return jt(Tr||(Tr=Object(r.a)(['"])),this.handleClick.bind(this),this.walletId,bo(this.imageId),null!=(t=this.label)?t:Ii.getWalletName(this.name,!0),this.sublabelTemplate())}};ua.styles=[Qn.globalCss,sa],ha([te()],ua.prototype,"onClick",2),ha([te()],ua.prototype,"name",2),ha([te()],ua.prototype,"walletId",2),ha([te()],ua.prototype,"label",2),ha([te()],ua.prototype,"imageId",2),ha([te({type:Boolean})],ua.prototype,"installed",2),ha([te({type:Boolean})],ua.prototype,"recent",2),ua=ha([Qt("wcm-wallet-button")],ua);const ma=c(Pr||(Pr=Object(r.a)([":host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}"])));var pa=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,fa=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?ga(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&pa(e,o,i),i};let wa=class extends Yt{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var t;const e=null!=(t=this.imageUrl)&&t.length?this.imageUrl:Ii.getWalletIcon({id:this.walletId,image_id:this.imageId});return jt(Rr||(Rr=Object(r.a)(["",""])),e.length?jt(Sr||(Sr=Object(r.a)(['
','
'])),e,this.id):ui.WALLET_PLACEHOLDER)}};wa.styles=[Qn.globalCss,ma],fa([te()],wa.prototype,"walletId",2),fa([te()],wa.prototype,"imageId",2),fa([te()],wa.prototype,"imageUrl",2),wa=fa([Qt("wcm-wallet-image")],wa);var va=Object.defineProperty,ba=Object.getOwnPropertyDescriptor,ya=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?ba(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&va(e,o,i),i};let xa=class extends Yt{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(t){try{null!=t&&t.length&&await Promise.all(t.map((async t=>Ii.preloadImage(t))))}catch{console.info("Unsuccessful attempt at preloading some images",t)}}async preloadListings(){if(le.a.state.enableExplorer){await le.d.getRecomendedWallets(),le.f.setIsDataLoaded(!0);const{recomendedWallets:t}=le.d.state,e=t.map((t=>Ii.getWalletIcon(t)));await this.loadImages(e)}else le.f.setIsDataLoaded(!0)}async preloadCustomImages(){const t=Ii.getCustomImageUrls();await this.loadImages(t)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(t){console.error(t),le.i.openToast("Failed preloading","error")}}};ya([ee()],xa.prototype,"preload",2),xa=ya([Qt("wcm-explorer-context")],xa);var Aa=Object.defineProperty,Ca=Object.getOwnPropertyDescriptor;let Oa=class extends Yt{constructor(){super(),this.unsubscribeTheme=void 0,Qn.setTheme(),this.unsubscribeTheme=le.h.subscribe(Qn.setTheme)}disconnectedCallback(){var t;null==(t=this.unsubscribeTheme)||t.call(this)}};Oa=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?Ca(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Aa(e,o,i),i})([Qt("wcm-theme-context")],Oa);const _a=c(Nr||(Nr=Object(r.a)(["@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}"])));var Ea=Object.defineProperty,$a=Object.getOwnPropertyDescriptor;let ka=class extends Yt{onGoToQrcode(){le.g.push("Qrcode")}render(){const{recomendedWallets:t}=le.d.state,e=[...t,...t],o=2*le.b.RECOMMENDED_WALLET_AMOUNT;return jt(Lr||(Lr=Object(r.a)(['
','WalletConnect
','
Select Wallet
Choose WalletConnect to see supported apps on your device'])),this.onGoToQrcode,ui.QRCODE_ICON,ui.MOBILE_ICON,[...Array(o)].map(((t,o)=>{const n=e[o%e.length];return n?jt(Br||(Br=Object(r.a)([''])),n.id,n.image_id):ui.WALLET_PLACEHOLDER})),Ii.handleAndroidLinking)}};ka.styles=[Qn.globalCss,_a],ka=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?$a(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Ea(e,o,i),i})([Qt("wcm-android-wallet-selection")],ka);const ja=c(Dr||(Dr=Object(r.a)(["@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}"])));var Ia=Object.defineProperty,Ma=Object.getOwnPropertyDescriptor,Ta=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?Ma(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Ia(e,o,i),i};let Pa=class extends Yt{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var t,e;const o=null!=(e=null==(t=le.h.state.themeVariables)?void 0:t["--wcm-wallet-icon-large-border-radius"])?e:Qn.getPreset("--wcm-wallet-icon-large-border-radius");let n=0;n=o.includes("%")?.88*parseInt(o,10):parseInt(o,10),n*=1.17;const i=317-1.57*n,a=425-1.8*n;return jt(Ur||(Ur=Object(r.a)([''])),n,i,a)}render(){const t={"wcm-error":this.isError,"wcm-stale":this.isStale};return jt(Wr||(Wr=Object(r.a)(['
','
',""])),ie(t),this.svgLoaderTemplate(),bo(this.walletId),bo(this.imageId),this.isError?"error":"primary",this.isError?"Connection declined":this.label)}};Pa.styles=[Qn.globalCss,ja],Ta([te()],Pa.prototype,"walletId",2),Ta([te()],Pa.prototype,"imageId",2),Ta([te({type:Boolean})],Pa.prototype,"isError",2),Ta([te({type:Boolean})],Pa.prototype,"isStale",2),Ta([te()],Pa.prototype,"label",2),Pa=Ta([Qt("wcm-connector-waiting")],Pa);const Ra={manualWallets(){var t,e;const{mobileWallets:o,desktopWallets:r}=le.a.state,n=null==(t=Ra.recentWallet())?void 0:t.id,i=le.b.isMobile()?o:r,a=null===i||void 0===i?void 0:i.filter((t=>n!==t.id));return null!=(e=le.b.isMobile()?null===a||void 0===a?void 0:a.map((t=>{let{id:e,name:o,links:r}=t;return{id:e,name:o,mobile:r,links:r}})):null===a||void 0===a?void 0:a.map((t=>{let{id:e,name:o,links:r}=t;return{id:e,name:o,desktop:r,links:r}})))?e:[]},recentWallet:()=>Ii.getRecentWallet(),recomendedWallets(){var t;const e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]||null==(t=Ra.recentWallet())?void 0:t.id,{recomendedWallets:o}=le.d.state;return o.filter((t=>e!==t.id))}},Sa={onConnecting(t){Ii.goToConnectingView(t)},manualWalletsTemplate(){return Ra.manualWallets().map((t=>jt(Hr||(Hr=Object(r.a)([''])),t.id,t.name,(()=>this.onConnecting(t)))))},recomendedWalletsTemplate(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Ra.recomendedWallets(t).map((t=>jt(zr||(zr=Object(r.a)([''])),t.name,t.id,t.image_id,(()=>this.onConnecting(t)))))},recentWalletTemplate(){const t=Ra.recentWallet();if(t)return jt(Zr||(Zr=Object(r.a)([''])),t.name,t.id,bo(t.image_id),!0,(()=>this.onConnecting(t)))}},Na=c(Fr||(Fr=Object(r.a)([".wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}"])));var La=Object.defineProperty,Ba=Object.getOwnPropertyDescriptor;let Da=class extends Yt{render(){const{explorerExcludedWalletIds:t,enableExplorer:e}=le.a.state,o="ALL"!==t&&e,n=Sa.manualWalletsTemplate(),i=Sa.recomendedWalletsTemplate();let a=[Sa.recentWalletTemplate(),...n,...i];a=a.filter(Boolean);const l=a.length>4||o;let s=[];s=l?a.slice(0,3):a;const c=Boolean(s.length);return jt(Vr||(Vr=Object(r.a)(['
','Mobile
','Scan with your wallet
',""])),!0,Ii.handleUriCopy,ui.COPY_ICON,ui.MOBILE_ICON,ui.SCAN_ICON,c?jt(qr||(qr=Object(r.a)(['
','Desktop
'," ","
"])),ui.DESKTOP_ICON,s,l?jt(Kr||(Kr=Object(r.a)([""]))):null):null)}};Da.styles=[Qn.globalCss,Na],Da=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?Ba(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&La(e,o,i),i})([Qt("wcm-desktop-wallet-selection")],Da);const Ua=c(Yr||(Yr=Object(r.a)(["div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}"])));var Wa=Object.defineProperty,Ha=Object.getOwnPropertyDescriptor;let za=class extends Yt{render(){const{termsOfServiceUrl:t,privacyPolicyUrl:e}=le.a.state;return(null!==t&&void 0!==t?t:e)?jt(Jr||(Jr=Object(r.a)(['
By connecting your wallet to this app, you agree to the app\'s '," "," ","
"])),t?jt(Qr||(Qr=Object(r.a)(['Terms of Service'])),t):null,t&&e?"and":null,e?jt(Gr||(Gr=Object(r.a)(['Privacy Policy'])),e):null):null}};za.styles=[Qn.globalCss,Ua],za=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?Ha(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Wa(e,o,i),i})([Qt("wcm-legal-notice")],za);const Za=c(Xr||(Xr=Object(r.a)(["div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}"])));var Fa=Object.defineProperty,Va=Object.getOwnPropertyDescriptor;let qa=class extends Yt{onQrcode(){le.g.push("Qrcode")}render(){const{explorerExcludedWalletIds:t,enableExplorer:e}=le.a.state,o="ALL"!==t&&e,n=Sa.manualWalletsTemplate(),i=Sa.recomendedWalletsTemplate();let a=[Sa.recentWalletTemplate(),...n,...i];a=a.filter(Boolean);const l=a.length>8||o;let s=[];s=l?a.slice(0,7):a;const c=Boolean(s.length);return jt(tn||(tn=Object(r.a)(['',""])),this.onQrcode,ui.QRCODE_ICON,c?jt(en||(en=Object(r.a)(["
"," ","
"])),s,l?jt(on||(on=Object(r.a)([""]))):null):null)}};qa.styles=[Qn.globalCss,Za],qa=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?Va(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Fa(e,o,i),i})([Qt("wcm-mobile-wallet-selection")],qa);const Ka=c(rn||(rn=Object(r.a)([":host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}"])));var Ya=Object.defineProperty,Ja=Object.getOwnPropertyDescriptor,Qa=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?Ja(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Ya(e,o,i),i};let Ga=class extends Yt{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=le.e.subscribe((t=>{t.open?this.onOpenModalEvent():this.onCloseModalEvent()}))}disconnectedCallback(){var t;null==(t=this.unsubscribeModal)||t.call(this)}get overlayEl(){return Ii.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return Ii.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(t){if(document.querySelector("body"))if(t){const t=document.getElementById("wcm-styles");null===t||void 0===t||t.remove()}else document.head.insertAdjacentHTML("beforeend",'')}onCloseModal(t){t.target===t.currentTarget&&le.e.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout((async()=>{const t=Ii.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]};await Promise.all([vo(this.overlayEl,{opacity:[0,1]},{delay:.1,duration:.2}).finished,vo(this.containerEl,t,{delay:.1,duration:.2}).finished]),this.active=!0}),0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const t=Ii.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]};await Promise.all([vo(this.overlayEl,{opacity:[1,0]},{duration:.2}).finished,vo(this.containerEl,t,{duration:.2}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",(t=>{var e;"Escape"===t.key?le.e.close():"Tab"===t.key&&(null!=(e=t.target)&&e.tagName.includes("wcm-")||this.containerEl.focus())}),this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var t;null==(t=this.abortController)||t.abort(),this.abortController=void 0}render(){const t={"wcm-overlay":!0,"wcm-active":this.active};return jt(nn||(nn=Object(r.a)(['
',"
"])),ie(t),this.onCloseModal,this.open?jt(an||(an=Object(r.a)(['
']))):null)}};Ga.styles=[Qn.globalCss,Ka],Qa([ee()],Ga.prototype,"open",2),Qa([ee()],Ga.prototype,"active",2),Ga=Qa([Qt("wcm-modal")],Ga);const Xa=c(ln||(ln=Object(r.a)(["div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}"])));var tl=Object.defineProperty,el=Object.getOwnPropertyDescriptor,ol=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?el(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&tl(e,o,i),i};let rl=class extends Yt{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){le.b.isMobile()?le.g.replace("MobileConnecting"):le.g.replace("MobileQrcodeConnecting")}onDesktop(){le.g.replace("DesktopConnecting")}onWeb(){le.g.replace("WebConnecting")}render(){return jt(sn||(sn=Object(r.a)(["
"," "," "," ","
"])),this.isRetry?jt(cn||(cn=Object(r.a)([""]))):null,this.isMobile?jt(dn||(dn=Object(r.a)(['Mobile'])),this.onMobile,ui.MOBILE_ICON):null,this.isDesktop?jt(hn||(hn=Object(r.a)(['Desktop'])),this.onDesktop,ui.DESKTOP_ICON):null,this.isWeb?jt(un||(un=Object(r.a)(['Web'])),this.onWeb,ui.GLOBE_ICON):null)}};rl.styles=[Qn.globalCss,Xa],ol([te({type:Boolean})],rl.prototype,"isMobile",2),ol([te({type:Boolean})],rl.prototype,"isDesktop",2),ol([te({type:Boolean})],rl.prototype,"isWeb",2),ol([te({type:Boolean})],rl.prototype,"isRetry",2),rl=ol([Qt("wcm-platform-selection")],rl);const nl=c(mn||(mn=Object(r.a)(["button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}"])));var il=Object.defineProperty,al=Object.getOwnPropertyDescriptor;let ll=class extends Yt{onClick(){le.g.push("WalletExplorer")}render(){const{recomendedWallets:t}=le.d.state,e=[...t,...Ra.manualWallets()].reverse().slice(0,4);return jt(pn||(pn=Object(r.a)([''])),this.onClick,e.map((t=>{const e=Ii.getWalletIcon(t);if(e)return jt(gn||(gn=Object(r.a)([''])),e);const o=Ii.getWalletIcon({id:t.id});return o?jt(fn||(fn=Object(r.a)([''])),o):ui.WALLET_PLACEHOLDER})),[...Array(4-e.length)].map((()=>ui.WALLET_PLACEHOLDER)))}};ll.styles=[Qn.globalCss,nl],ll=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?al(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&il(e,o,i),i})([Qt("wcm-view-all-wallets-button")],ll);const sl=c(wn||(wn=Object(r.a)([".wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}"])));var cl=Object.defineProperty,dl=Object.getOwnPropertyDescriptor,hl=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?dl(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&cl(e,o,i),i};let ul=class extends Yt{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout((()=>{const{walletConnectUri:t}=le.f.state;this.uri=t}),0)}get overlayEl(){return Ii.getShadowRootElement(this,".wcm-qr-container")}render(){return jt(vn||(vn=Object(r.a)(['
',"
"])),this.uri?jt(bn||(bn=Object(r.a)([''])),this.overlayEl.offsetWidth,this.uri,bo(this.walletId),bo(this.imageId)):jt(yn||(yn=Object(r.a)([""]))))}};ul.styles=[Qn.globalCss,sl],hl([te()],ul.prototype,"walletId",2),hl([te()],ul.prototype,"imageId",2),hl([ee()],ul.prototype,"uri",2),ul=hl([Qt("wcm-walletconnect-qr")],ul);var ml=Object.defineProperty,pl=Object.getOwnPropertyDescriptor;let gl=class extends Yt{viewTemplate(){return le.b.isAndroid()?jt(xn||(xn=Object(r.a)([""]))):le.b.isMobile()?jt(An||(An=Object(r.a)([""]))):jt(Cn||(Cn=Object(r.a)([""])))}render(){return jt(On||(On=Object(r.a)(["",""])),this.viewTemplate())}};gl.styles=[Qn.globalCss],gl=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?pl(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&ml(e,o,i),i})([Qt("wcm-connect-wallet-view")],gl);const fl=c(_n||(_n=Object(r.a)(["wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}"])));var wl=Object.defineProperty,vl=Object.getOwnPropertyDescriptor,bl=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?vl(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&wl(e,o,i),i};let yl=class extends Yt{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(t){const{desktop:e,name:o}=le.b.getWalletRouterData(),r=null===e||void 0===e?void 0:e.native;if(r){const e=le.b.formatNativeUrl(r,t,o);le.b.openHref(e,"_self")}}openDesktopApp(){const{walletConnectUri:t}=le.f.state,e=le.b.getWalletRouterData();Ii.setRecentWallet(e),t&&this.onFormatAndRedirect(t)}render(){const{name:t,id:e,image_id:o}=le.b.getWalletRouterData(),{isMobile:n,isWeb:i}=Ii.getCachedRouterWalletPlatforms();return jt(En||(En=Object(r.a)(['','Retry'])),t,Ii.handleUriCopy,ui.COPY_ICON,e,bo(o),"Continue in ".concat(t,"..."),this.isError,"Connection can continue loading if ".concat(t," is not installed on your device"),n,i,!0,this.openDesktopApp.bind(this),ui.RETRY_ICON)}};yl.styles=[Qn.globalCss,fl],bl([ee()],yl.prototype,"isError",2),yl=bl([Qt("wcm-desktop-connecting-view")],yl);const xl=c($n||($n=Object(r.a)(["wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}"])));var Al=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor;let Ol=class extends Yt{onInstall(t){t&&le.b.openHref(t,"_blank")}render(){const{name:t,id:e,image_id:o,homepage:n}=le.b.getWalletRouterData();return jt(kn||(kn=Object(r.a)(['','Download'])),t,e,bo(o),!0,"Download ".concat(t," to continue. If multiple browser extensions are installed, disable non ").concat(t," ones and try again"),(()=>this.onInstall(n)),ui.ARROW_DOWN_ICON)}};Ol.styles=[Qn.globalCss,xl],Ol=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?Cl(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Al(e,o,i),i})([Qt("wcm-install-wallet-view")],Ol);const _l=c(jn||(jn=Object(r.a)(["wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}"])));var El=Object.defineProperty,$l=Object.getOwnPropertyDescriptor,kl=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?$l(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&El(e,o,i),i};let jl=class extends Yt{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{mobile:o,name:r}=le.b.getWalletRouterData(),n=null===o||void 0===o?void 0:o.native,i=null===o||void 0===o?void 0:o.universal;if(n&&!e){const e=le.b.formatNativeUrl(n,t,r);le.b.openHref(e,"_self")}else if(i){const e=le.b.formatUniversalUrl(i,t,r);le.b.openHref(e,"_self")}}openMobileApp(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{walletConnectUri:e}=le.f.state,o=le.b.getWalletRouterData();Ii.setRecentWallet(o),e&&this.onFormatAndRedirect(e,t)}onGoToAppStore(t){t&&le.b.openHref(t,"_blank")}render(){const{name:t,id:e,image_id:o,app:n,mobile:i}=le.b.getWalletRouterData(),{isWeb:a}=Ii.getCachedRouterWalletPlatforms(),l=null===n||void 0===n?void 0:n.ios,s=null===i||void 0===i?void 0:i.universal;return jt(In||(In=Object(r.a)(['Retry','
','
App Store
'])),t,e,bo(o),this.isError,a,!0,(()=>this.openMobileApp(!1)),ui.RETRY_ICON,s?jt(Mn||(Mn=Object(r.a)(['Still doesn\'t work? Try this alternate link'])),(()=>this.openMobileApp(!0))):null,e,bo(o),"Get ".concat(t),ui.ARROW_RIGHT_ICON,(()=>this.onGoToAppStore(l)))}};jl.styles=[Qn.globalCss,_l],kl([ee()],jl.prototype,"isError",2),jl=kl([Qt("wcm-mobile-connecting-view")],jl);const Il=c(Tn||(Tn=Object(r.a)(["wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}"])));var Ml=Object.defineProperty,Tl=Object.getOwnPropertyDescriptor;let Pl=class extends Yt{render(){const{name:t,id:e,image_id:o}=le.b.getWalletRouterData(),{isDesktop:n,isWeb:i}=Ii.getCachedRouterWalletPlatforms();return jt(Pn||(Pn=Object(r.a)(['',''])),t,Ii.handleUriCopy,ui.COPY_ICON,e,bo(o),"Scan this QR Code with your phone's camera or inside ".concat(t," app"),n,i)}};Pl.styles=[Qn.globalCss,Il],Pl=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?Tl(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Ml(e,o,i),i})([Qt("wcm-mobile-qr-connecting-view")],Pl);var Rl=Object.defineProperty,Sl=Object.getOwnPropertyDescriptor;let Nl=class extends Yt{render(){return jt(Rn||(Rn=Object(r.a)([''])),Ii.handleUriCopy,ui.COPY_ICON)}};Nl.styles=[Qn.globalCss],Nl=((t,e,o,r)=>{for(var n,i=r>1?void 0:r?Sl(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Rl(e,o,i),i})([Qt("wcm-qrcode-view")],Nl);const Ll=c(Sn||(Sn=Object(r.a)(["wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}"])));var Bl=Object.defineProperty,Dl=Object.getOwnPropertyDescriptor,Ul=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?Dl(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&Bl(e,o,i),i};let Wl=class extends Yt{constructor(){super(...arguments),this.loading=!le.d.state.wallets.listings.length,this.firstFetch=!le.d.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=Ii.debounce((t=>{t.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=t,le.d.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),le.d.resetSearch())}))}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var t;null==(t=this.intersectionObserver)||t.disconnect()}get placeholderEl(){return Ii.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver((t=>{let[e]=t;e.isIntersecting&&(!this.search||!this.firstFetch)&&this.fetchWallets()})),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:t,search:e}=le.d.state,{listings:o,total:r}=this.search?e:t;return r<=40||o.length>=r}async fetchWallets(){var t;const{wallets:e,search:o}=le.d.state,{listings:r,total:n,page:i}=this.search?o:e;if(!this.endReached&&(this.firstFetch||n>40&&r.lengthIi.getWalletIcon(t)));await Promise.all([...r.map((async t=>Ii.preloadImage(t))),le.b.wait(300)]),this.endReached=this.isLastPage()}catch(a){console.error(a),le.i.openToast(Ii.getErrorMessage(a),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(t){le.b.isAndroid()?Ii.handleMobileLinking(t):Ii.goToConnectingView(t)}onSearchChange(t){const{value:e}=t.target;this.searchDebounce(e)}render(){const{wallets:t,search:e}=le.d.state,{listings:o}=this.search?e:t,n=this.loading&&!o.length,i=this.search.length>=3;let a=Sa.manualWalletsTemplate(),l=Sa.recomendedWalletsTemplate(!0);i&&(a=a.filter((t=>{let{values:e}=t;return Ii.caseSafeIncludes(e[0],this.search)})),l=l.filter((t=>{let{values:e}=t;return Ii.caseSafeIncludes(e[0],this.search)})));const s=!this.loading&&!o.length&&!l.length,c={"wcm-loading":n,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":s};return jt(Nn||(Nn=Object(r.a)(['
'," "," ",'
'," ","
"])),this.onSearchChange.bind(this),ie(c),n?null:a,n?null:l,n?null:o.map((t=>jt(Ln||(Ln=Object(r.a)(["",""])),t?jt(Bn||(Bn=Object(r.a)([''])),t.image_id,t.name,t.id,(()=>this.onConnect(t))):null))),s?jt(Dn||(Dn=Object(r.a)(['No results found']))):null,!s&&this.loading?jt(Un||(Un=Object(r.a)([""]))):null)}};Wl.styles=[Qn.globalCss,Ll],Ul([ee()],Wl.prototype,"loading",2),Ul([ee()],Wl.prototype,"firstFetch",2),Ul([ee()],Wl.prototype,"search",2),Ul([ee()],Wl.prototype,"endReached",2),Wl=Ul([Qt("wcm-wallet-explorer-view")],Wl);const Hl=c(Wn||(Wn=Object(r.a)(["wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}"])));var zl=Object.defineProperty,Zl=Object.getOwnPropertyDescriptor,Fl=(t,e,o,r)=>{for(var n,i=r>1?void 0:r?Zl(e,o):e,a=t.length-1;a>=0;a--)(n=t[a])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&zl(e,o,i),i};let Vl=class extends Yt{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(t){const{desktop:e,name:o}=le.b.getWalletRouterData(),r=null===e||void 0===e?void 0:e.universal;if(r){const e=le.b.formatUniversalUrl(r,t,o);le.b.openHref(e,"_blank")}}openWebWallet(){const{walletConnectUri:t}=le.f.state,e=le.b.getWalletRouterData();Ii.setRecentWallet(e),t&&this.onFormatAndRedirect(t)}render(){const{name:t,id:e,image_id:o}=le.b.getWalletRouterData(),{isMobile:n,isDesktop:i}=Ii.getCachedRouterWalletPlatforms(),a=le.b.isMobile();return jt(Hn||(Hn=Object(r.a)(['','Retry'])),t,Ii.handleUriCopy,ui.COPY_ICON,e,bo(o),"Continue in ".concat(t,"..."),this.isError,"".concat(t," web app has opened in a new tab. Go there, accept the connection, and come back"),n,!a&&i,!0,this.openWebWallet.bind(this),ui.RETRY_ICON)}};Vl.styles=[Qn.globalCss,Hl],Fl([ee()],Vl.prototype,"isError",2),Vl=Fl([Qt("wcm-web-connecting-view")],Vl)}}]); \ No newline at end of file diff --git a/static/js/3.1b4d8c30.chunk.js.LICENSE.txt b/static/js/3.1b4d8c30.chunk.js.LICENSE.txt new file mode 100644 index 000000000..0816087ab --- /dev/null +++ b/static/js/3.1b4d8c30.chunk.js.LICENSE.txt @@ -0,0 +1,29 @@ +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ diff --git a/static/js/4.afda9aae.chunk.js b/static/js/4.afda9aae.chunk.js new file mode 100644 index 000000000..7ba809c3c --- /dev/null +++ b/static/js/4.afda9aae.chunk.js @@ -0,0 +1 @@ +(this.webpackJsonpexample=this.webpackJsonpexample||[]).push([[4],{3313:function(e,t,n){"use strict";n.r(t),n.d(t,"WalletConnectModal",(function(){return r}));var o=n(3477);class r{constructor(e){this.openModal=o.e.open,this.closeModal=o.e.close,this.subscribeModal=o.e.subscribe,this.setTheme=o.h.setThemeConfig,o.h.setThemeConfig(e),o.a.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await n.e(3).then(n.bind(null,3506));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),o.f.setIsUiLoaded(!0)}}}},3477:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return D})),n.d(t,"e",(function(){return U})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return s})),n.d(t,"h",(function(){return K})),n.d(t,"i",(function(){return B}));var o=n(3482);const r=Object(o.proxy)({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),s={state:r,subscribe:e=>Object(o.subscribe)(r,(()=>e(r))),push(e,t){e!==r.view&&(r.view=e,t&&(r.data=t),r.history.push(e))},reset(e){r.view=e,r.history=[e]},replace(e){r.history.length>1&&(r.history[r.history.length-1]=e,r.view=e)},goBack(){if(r.history.length>1){r.history.pop();const[e]=r.history.slice(-1);r.view=e}},setData(e){r.data=e}},a={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>a.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return a.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,n){if(a.isHttpUrl(e))return this.formatUniversalUrl(e,t,n);let o=e;o.includes("://")||(o=e.replaceAll("/","").replaceAll(":",""),o="".concat(o,"://")),o.endsWith("/")||(o="".concat(o,"/")),this.setWalletConnectDeepLink(o,n);const r=encodeURIComponent(t);return"".concat(o,"wc?uri=").concat(r)},formatUniversalUrl(e,t,n){if(!a.isHttpUrl(e))return this.formatNativeUrl(e,t,n);let o=e;o.endsWith("/")||(o="".concat(o,"/")),this.setWalletConnectDeepLink(o,n);const r=encodeURIComponent(t);return"".concat(o,"wc?uri=").concat(r)},wait:async e=>new Promise((t=>{setTimeout(t,e)})),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(a.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(a.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(a.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(a.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=s.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},i=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),c=Object(o.proxy)({enabled:i,userSessionId:"",events:[],connectedWalletId:void 0}),l={state:c,subscribe:e=>Object(o.subscribe)(c.events,(()=>e(Object(o.snapshot)(c.events[c.events.length-1])))),initialize(){c.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(c.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){c.connectedWalletId=e},click(e){if(c.enabled){const t={type:"CLICK",name:e.name,userSessionId:c.userSessionId,timestamp:Date.now(),data:e};c.events.push(t)}},track(e){if(c.enabled){const t={type:"TRACK",name:e.name,userSessionId:c.userSessionId,timestamp:Date.now(),data:e};c.events.push(t)}},view(e){if(c.enabled){const t={type:"VIEW",name:e.name,userSessionId:c.userSessionId,timestamp:Date.now(),data:e};c.events.push(t)}}},u=Object(o.proxy)({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),d={state:u,subscribe:e=>Object(o.subscribe)(u,(()=>e(u))),setChains(e){u.chains=e},setWalletConnectUri(e){u.walletConnectUri=e},setIsCustomDesktop(e){u.isCustomDesktop=e},setIsCustomMobile(e){u.isCustomMobile=e},setIsDataLoaded(e){u.isDataLoaded=e},setIsUiLoaded(e){u.isUiLoaded=e},setIsAuth(e){u.isAuth=e}},f=Object(o.proxy)({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),p={state:f,subscribe:e=>Object(o.subscribe)(f,(()=>e(f))),setConfig(e){var t,n;l.initialize(),d.setChains(e.chains),d.setIsAuth(Boolean(e.enableAuthMode)),d.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),d.setIsCustomDesktop(Boolean(null==(n=e.desktopWallets)?void 0:n.length)),a.setModalVersionInStorage(),Object.assign(f,e)}};var g=Object.defineProperty,h=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,y=(e,t,n)=>t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const m="https://explorer-api.walletconnect.com",w="wcm",O="js-2.6.2";async function I(e,t){const n=((e,t)=>{for(var n in t||(t={}))b.call(t,n)&&y(e,n,t[n]);if(h)for(var n of h(t))v.call(t,n)&&y(e,n,t[n]);return e})({sdkType:w,sdkVersion:O},t),o=new URL(e,m);return o.searchParams.append("projectId",p.state.projectId),Object.entries(n).forEach((e=>{let[t,n]=e;n&&o.searchParams.append(t,String(n))})),(await fetch(o)).json()}const j={getDesktopListings:async e=>I("/w3m/v1/getDesktopListings",e),getMobileListings:async e=>I("/w3m/v1/getMobileListings",e),getInjectedListings:async e=>I("/w3m/v1/getInjectedListings",e),getAllListings:async e=>I("/w3m/v1/getAllListings",e),getWalletImageUrl:e=>"".concat(m,"/w3m/v1/getWalletImage/").concat(e,"?projectId=").concat(p.state.projectId,"&sdkType=").concat(w,"&sdkVersion=").concat(O),getAssetImageUrl:e=>"".concat(m,"/w3m/v1/getAssetImage/").concat(e,"?projectId=").concat(p.state.projectId,"&sdkType=").concat(w,"&sdkVersion=").concat(O)};var C=Object.defineProperty,W=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable,k=(e,t,n)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const A=a.isMobile(),P=Object(o.proxy)({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),D={state:P,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=p.state;if("NONE"===e||"ALL"===t&&!e)return P.recomendedWallets;if(a.isArray(e)){const t={recommendedIds:e.join(",")},{listings:n}=await j.getAllListings(t),o=Object.values(n);o.sort(((t,n)=>e.indexOf(t.id)-e.indexOf(n.id))),P.recomendedWallets=o}else{const{chains:e,isAuth:n}=d.state,o=null===e||void 0===e?void 0:e.join(","),r=a.isArray(t),s={page:1,sdks:n?"auth_v1":void 0,entries:a.RECOMMENDED_WALLET_AMOUNT,chains:o,version:2,excludedIds:r?t.join(","):void 0},{listings:i}=A?await j.getMobileListings(s):await j.getDesktopListings(s);P.recomendedWallets=Object.values(i)}return P.recomendedWallets},async getWallets(e){const t=((e,t)=>{for(var n in t||(t={}))E.call(t,n)&&k(e,n,t[n]);if(W)for(var n of W(t))L.call(t,n)&&k(e,n,t[n]);return e})({},e),{explorerRecommendedWalletIds:n,explorerExcludedWalletIds:o}=p.state,{recomendedWallets:r}=P;if("ALL"===o)return P.wallets;r.length?t.excludedIds=r.map((e=>e.id)).join(","):a.isArray(n)&&(t.excludedIds=n.join(",")),a.isArray(o)&&(t.excludedIds=[t.excludedIds,o].filter(Boolean).join(",")),d.state.isAuth&&(t.sdks="auth_v1");const{page:s,search:i}=e,{listings:c,total:l}=A?await j.getMobileListings(t):await j.getDesktopListings(t),u=Object.values(c),f=i?"search":"wallets";return P[f]={listings:[...P[f].listings,...u],total:l,page:null!==s&&void 0!==s?s:1},{listings:u,total:l}},getWalletImageUrl:e=>j.getWalletImageUrl(e),getAssetImageUrl:e=>j.getAssetImageUrl(e),resetSearch(){P.search={listings:[],total:0,page:1}}},M=Object(o.proxy)({open:!1}),U={state:M,subscribe:e=>Object(o.subscribe)(M,(()=>e(M))),open:async e=>new Promise((t=>{const{isUiLoaded:n,isDataLoaded:o}=d.state;if(a.removeWalletConnectDeepLink(),d.setWalletConnectUri(null===e||void 0===e?void 0:e.uri),d.setChains(null===e||void 0===e?void 0:e.chains),s.reset("ConnectWallet"),n&&o)M.open=!0,t();else{const e=setInterval((()=>{const n=d.state;n.isUiLoaded&&n.isDataLoaded&&(clearInterval(e),M.open=!0,t())}),200)}})),close(){M.open=!1}};var S=Object.defineProperty,x=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,N=(e,t,n)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const _=Object(o.proxy)({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),K={state:_,subscribe:e=>Object(o.subscribe)(_,(()=>e(_))),setThemeConfig(e){const{themeMode:t,themeVariables:n}=e;t&&(_.themeMode=t),n&&(_.themeVariables=((e,t)=>{for(var n in t||(t={}))R.call(t,n)&&N(e,n,t[n]);if(x)for(var n of x(t))T.call(t,n)&&N(e,n,t[n]);return e})({},n))}},V=Object(o.proxy)({open:!1,message:"",variant:"success"}),B={state:V,subscribe:e=>Object(o.subscribe)(V,(()=>e(V))),openToast(e,t){V.open=!0,V.message=e,V.variant=t},closeToast(){V.open=!1}}},3482:function(e,t,n){"use strict";var o=n(3483),r=function(e){return"object"===typeof e&&null!==e},s=new WeakMap,a=new WeakSet,i=function(e,t,n,i,c,l,u,d,f){return void 0===e&&(e=Object.is),void 0===t&&(t=function(e,t){return new Proxy(e,t)}),void 0===n&&(n=function(e){return r(e)&&!a.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)}),void 0===i&&(i=function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}}),void 0===c&&(c=new WeakMap),void 0===l&&(l=function(e){function t(t,n,o){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t,n){void 0===n&&(n=i);var r=c.get(e);if((null==r?void 0:r[0])===t)return r[1];var u=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return o.markToTrack(u,!0),c.set(e,[t,u]),Reflect.ownKeys(e).forEach((function(t){if(!Object.getOwnPropertyDescriptor(u,t)){var r=Reflect.get(e,t),i={value:r,enumerable:!0,configurable:!0};if(a.has(r))o.markToTrack(r,!1);else if(r instanceof Promise)delete i.value,i.get=function(){return n(r)};else if(s.has(r)){var c=s.get(r),d=c[0],f=c[1];i.value=l(d,f(),n)}Object.defineProperty(u,t,i)}})),Object.preventExtensions(u)}))),void 0===u&&(u=new WeakMap),void 0===d&&(d=[1,1]),void 0===f&&(f=function(i){if(!r(i))throw new Error("object required");var c=u.get(i);if(c)return c;var p=d[0],g=new Set,h=function(e,t){void 0===t&&(t=++d[0]),p!==t&&(p=t,g.forEach((function(n){return n(e,t)})))},b=d[1],v=function(e){return function(t,n){var o=[].concat(t);o[1]=[e].concat(o[1]),h(o,n)}},y=new Map,m=function(e){var t,n=y.get(e);n&&(y.delete(e),null==(t=n[1])||t.call(n))},w=Array.isArray(i)?[]:Object.create(Object.getPrototypeOf(i)),O=t(w,{deleteProperty:function(e,t){var n=Reflect.get(e,t);m(t);var o=Reflect.deleteProperty(e,t);return o&&h(["delete",[t],n]),o},set:function(t,i,c,l){var d=Reflect.has(t,i),p=Reflect.get(t,i,l);if(d&&(e(p,c)||u.has(c)&&e(p,u.get(c))))return!0;m(i),r(c)&&(c=o.getUntracked(c)||c);var b=c;if(c instanceof Promise)c.then((function(e){c.status="fulfilled",c.value=e,h(["resolve",[i],e])})).catch((function(e){c.status="rejected",c.reason=e,h(["reject",[i],e])}));else{!s.has(c)&&n(c)&&(b=f(c));var w=!a.has(b)&&s.get(b);w&&function(e,t){if(g.size){var n=t[3](v(e));y.set(e,[t,n])}else y.set(e,[t])}(i,w)}return Reflect.set(t,i,b,l),h(["set",[i],c,p]),!0}});u.set(i,O);var I=[w,function(e){return void 0===e&&(e=++d[1]),b===e||g.size||(b=e,y.forEach((function(t){var n=t[0][1](e);n>p&&(p=n)}))),p},l,function(e){g.add(e),1===g.size&&y.forEach((function(e,t){var n=e[0];e[1];var o=n[3](v(t));y.set(t,[n,o])}));return function(){g.delete(e),0===g.size&&y.forEach((function(e,t){var n=e[0],o=e[1];o&&(o(),y.set(t,[n]))}))}}];return s.set(O,I),Reflect.ownKeys(i).forEach((function(e){var t=Object.getOwnPropertyDescriptor(i,e);"value"in t&&(O[e]=i[e],delete t.value,delete t.writable),Object.defineProperty(w,e,t)})),O}),[f,s,a,e,t,n,i,c,l,u,d]},c=i()[0];var l=i;t.getVersion=function(e){var t=s.get(e);return null==t?void 0:t[1]()},t.proxy=function(e){return void 0===e&&(e={}),c(e)},t.ref=function(e){return a.add(e),e},t.snapshot=function(e,t){var n=s.get(e),o=n[0],r=n[1];return(0,n[2])(o,r(),t)},t.subscribe=function(e,t,n){var o,r=s.get(e),a=[],i=r[3],c=!1,l=i((function(e){a.push(e),n?t(a.splice(0)):o||(o=Promise.resolve().then((function(){o=void 0,c&&t(a.splice(0))})))}));return c=!0,function(){c=!1,l()}},t.unstable_buildProxyFunction=l},3483:function(e,t,n){"use strict";n.r(t),n.d(t,"affectedToPathList",(function(){return m})),n.d(t,"createProxy",(function(){return g})),n.d(t,"getUntracked",(function(){return v})),n.d(t,"isChanged",(function(){return h})),n.d(t,"markToTrack",(function(){return y})),n.d(t,"replaceNewProxy",(function(){return w})),n.d(t,"trackMemo",(function(){return b}));const o=Symbol(),r=Symbol(),s="a",a="w";let i=(e,t)=>new Proxy(e,t);const c=Object.getPrototypeOf,l=new WeakMap,u=e=>e&&(l.has(e)?l.get(e):c(e)===Object.prototype||c(e)===Array.prototype),d=e=>"object"==typeof e&&null!==e,f=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach((e=>{e.configurable=!0})),Object.create(c(e),t)},p=e=>e[r]||e,g=(e,t,n,c)=>{if(!u(e))return e;let l=c&&c.get(e);if(!l){const t=p(e);l=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some((e=>!e.configurable&&!e.writable)))(t)?[t,f(t)]:[t],null==c||c.set(e,l)}const[d,h]=l;let b=n&&n.get(d);return b&&b[1].f===!!h||(b=((e,t)=>{const n={f:t};let i=!1;const c=(t,o)=>{if(!i){let r=n[s].get(e);if(r||(r={},n[s].set(e,r)),t===a)r[a]=!0;else{let e=r[t];e||(e=new Set,r[t]=e),e.add(o)}}},l={get:(t,o)=>o===r?e:(c("k",o),g(Reflect.get(t,o),n[s],n.c,n.t)),has:(t,r)=>r===o?(i=!0,n[s].delete(e),!0):(c("h",r),Reflect.has(t,r)),getOwnPropertyDescriptor:(e,t)=>(c("o",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(c(a),Reflect.ownKeys(e))};return t&&(l.set=l.deleteProperty=()=>!1),[l,n]})(d,!!h),b[1].p=i(h||d,b[0]),n&&n.set(d,b)),b[1][s]=t,b[1].c=n,b[1].t=c,b[1].p},h=(e,t,n,o)=>{if(Object.is(e,t))return!1;if(!d(e)||!d(t))return!0;const r=n.get(p(e));if(!r)return!0;if(o){const n=o.get(e);if(n&&n.n===t)return n.g;o.set(e,{n:t,g:!1})}let s=null;try{for(const n of r.h||[])if(s=Reflect.has(e,n)!==Reflect.has(t,n),s)return s;if(!0===r[a]){if(s=((e,t)=>{const n=Reflect.ownKeys(e),o=Reflect.ownKeys(t);return n.length!==o.length||n.some(((e,t)=>e!==o[t]))})(e,t),s)return s}else for(const n of r.o||[])if(s=!!Reflect.getOwnPropertyDescriptor(e,n)!=!!Reflect.getOwnPropertyDescriptor(t,n),s)return s;for(const a of r.k||[])if(s=h(e[a],t[a],n,o),s)return s;return null===s&&(s=!0),s}finally{o&&o.set(e,{n:t,g:s})}},b=e=>!!u(e)&&o in e,v=e=>u(e)&&e[r]||null,y=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];l.set(e,t)},m=(e,t,n)=>{const o=[],r=new WeakSet,s=(e,i)=>{if(r.has(e))return;d(e)&&r.add(e);const c=d(e)&&t.get(p(e));if(c){var l,u;if(null==(l=c.h)||l.forEach((e=>{const t=":has(".concat(String(e),")");o.push(i?[...i,t]:[t])})),!0===c[a]){const e=":ownKeys";o.push(i?[...i,e]:[e])}else{var f;null==(f=c.o)||f.forEach((e=>{const t=":hasOwn(".concat(String(e),")");o.push(i?[...i,t]:[t])}))}null==(u=c.k)||u.forEach((t=>{n&&!("value"in(Object.getOwnPropertyDescriptor(e,t)||{}))||s(e[t],i?[...i,t]:[t])}))}else i&&o.push(i)};return s(e),o},w=e=>{i=e}}}]); \ No newline at end of file diff --git a/static/js/main.3776ddd3.chunk.js b/static/js/main.3776ddd3.chunk.js new file mode 100644 index 000000000..eafeb5a57 --- /dev/null +++ b/static/js/main.3776ddd3.chunk.js @@ -0,0 +1 @@ +(this.webpackJsonpexample=this.webpackJsonpexample||[]).push([[0],{1016:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MappedConnectionProvider=t.MappedOptionConnectionProvider=t.AbstractConnectionProvider=void 0;const r=n(11),i=n(129),a=n(547);class o{map(e){return new d(this,e)}mapOption(e){return new s(this,e)}}t.AbstractConnectionProvider=o;class s extends o{constructor(e,t){super(),this.source=e,this.mapper=t}getId(){return this.source.getId()}getConnection(){return this.source.getConnection()}isAutoConnected(){return this.source.isAutoConnected()}getOption(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.source.getOption();return e?this.mapper(e):void 0}))}isConnected(){return this.source.isConnected()}}t.MappedOptionConnectionProvider=s;class d extends o{constructor(e,t){super(),this.source=e,this.mapper=t}getId(){return this.source.getId()}getProvider(){return this.source}getConnection(){return this.source.getConnection().pipe((0,i.switchMap)((e=>r.__awaiter(this,void 0,void 0,(function*(){if("connected"===e.status){const t=yield this.mapper(e.connection);return(0,a.getStateConnected)({connection:t,disconnect:e.disconnect})}return e})))))}isAutoConnected(){return this.source.isAutoConnected()}getOption(){return this.source.getOption()}isConnected(){return this.source.isConnected()}}t.MappedConnectionProvider=d},1018:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSupportedBlockchain=t.FLOW_TOKEN_MAP=t.validateBlockchain=t.getEntityData=t.extractId=t.extractBlockchain=t.extractBlockchainFromAssetType=void 0;const r=n(1019);function i(e){const t=e.indexOf(":");if(-1===t)throw new Error("Unable to extract blockchain from ".concat(e));const n=e.substring(0,t);for(const i of r.SupportedBlockchains)if(i===n)return i;throw new Error("Unable to extract blockchain from ".concat(e))}function a(e){if(!o(e))throw new Error('Value: "'.concat(e,'" is not a supported blockchain type'));return e}function o(e){return r.SupportedBlockchains.includes(e)}t.extractBlockchainFromAssetType=function(e){if(!e)throw new Error("Asset type is expected");return"blockchain"in e&&e.blockchain?a(e.blockchain):"contract"in e&&e.contract?i(e.contract):void 0},t.extractBlockchain=i,t.extractId=function(e){const t=e.indexOf(":");if(-1===t)throw new Error("Unable to extract blockchain from ".concat(e));return e.substring(t+1)},t.getEntityData=function(e){if(!e)throw new Error("Entity has not been specified");const[t,n]=e.split(":");return{blockchain:a(t),address:n}},t.validateBlockchain=a,t.FLOW_TOKEN_MAP={testnet:"A.7e60df042a9c0868.FlowToken",prod:"A.1654653399040a61.FlowToken"},t.isSupportedBlockchain=o},1019:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SupportedBlockchains=t.NonEVMBlockchains=t.isEVMBlockchain=t.EVMBlockchains=void 0;const r=n(29);t.EVMBlockchains=[r.Blockchain.ETHEREUM,r.Blockchain.POLYGON,r.Blockchain.MANTLE,r.Blockchain.ARBITRUM,r.Blockchain.ZKSYNC,r.Blockchain.CHILIZ,r.Blockchain.LIGHTLINK,r.Blockchain.RARI,r.Blockchain.ASTARZKEVM,r.Blockchain.BASE],t.isEVMBlockchain=function(e){return t.EVMBlockchains.includes(e)},t.NonEVMBlockchains=[r.Blockchain.FLOW,r.Blockchain.TEZOS,r.Blockchain.SOLANA,r.Blockchain.IMMUTABLEX],t.SupportedBlockchains=[...t.EVMBlockchains,...t.NonEVMBlockchains]},1020:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(11).__exportStar(n(1665),t)},1022:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=t.promiseToObservable=t.cache=void 0;const r=n(119),i=n(129);t.cache=function(e){let t;return new r.Observable((n=>{void 0===t&&(t=e()),t.then((e=>n.next(e))).catch((e=>{t=void 0,n.error(e)}))}))},t.promiseToObservable=function(e){return(0,r.from)(e).pipe((0,i.mergeMap)((e=>e)))},t.noop=function(){}},1023:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethAccounts=t.getAddress=void 0;const r=n(11),i=n(1024),a=n(1025);function o(e){return r.__awaiter(this,void 0,void 0,(function*(){return(0,i.providerRequest)(e,"eth_accounts")}))}t.getAddress=function(e){return(0,a.getObservable)(e,o,(e=>{let[t]=e;return t}),"accountsChanged")},t.ethAccounts=o},1024:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerRequest=void 0;const r=n(11);t.providerRequest=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return r.__awaiter(this,void 0,void 0,(function*(){if("object"!==typeof e||null===e)throw new Error("Provider is not an object");return"function"!==typeof e.request?function(e,t,n){return new Promise(((r,i)=>{try{!function(e,t,n){if(null===e||"object"!==typeof e)throw new Error("No send method defined");if("function"===typeof e.sendAsync)e.sendAsync(t,n);else{if("function"!==typeof e.send)throw new Error("No send method defined");e.send(t,n)}}(e,{jsonrpc:"2.0",id:(new Date).getTime(),method:t,params:n},((e,t)=>{const n=e||(null===t||void 0===t?void 0:t.error);n&&i(n),(null===t||void 0===t?void 0:t.result)&&r(t.result),i(new Error("Can't handle JSON-RPC request"))}))}catch(a){i(a)}}))}(e,t,n):e.request({method:t,params:n})}))}},1025:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getObservable=void 0;const r=n(11),i=n(119);t.getObservable=function(e,t,n,a){return"on"in e?new i.Observable((r=>{const i=e=>{r.next(n(e))};t(e).then(i).catch((e=>r.error(e))),e.on(a,i),"removeListener"in e&&r.add((()=>{e.removeListener(a,i)}))})):(0,i.from)((()=>r.__awaiter(this,void 0,void 0,(function*(){const r=yield t(e);return n(r)})))())}},1026:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChainId=void 0;const r=n(11),i=n(1024),a=n(1025);function o(e){return r.__awaiter(this,void 0,void 0,(function*(){return(0,i.providerRequest)(e,"eth_chainId")}))}t.getChainId=function(e){return(0,a.getObservable)(e,o,(e=>parseInt(e)),"chainChanged")}},1027:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRaribleWallet=void 0;const r=n(716),i=n(1793),a=n(64),o=n(64),s=n(64);t.getRaribleWallet=function(e){if((0,o.isBlockchainWallet)(e))return e;if("personalSign"in(t=e)&&"getFrom"in t&&"getChainId"in t)return new a.EthereumWallet(e);var t;if(function(e){return"signTransaction"in e&&"signAllTransactions"in e&&"publicKey"in e}(e))return new a.SolanaWallet(e);if(function(e){return"sign"in e&&"kind"in e&&"public_key"in e}(e))return new a.TezosWallet(e);if(function(e){return"authz"in e&&"send"in e&&"currentUser"in e}(e))return new a.FlowWallet(e);if(function(e){return"link"in e&&"network"in e&&"getConnectionData"in e}(e))return new s.ImmutableXWallet(e);if(function(e){return"eth"in e&&"utils"in e&&"signTransaction"in e.eth&&"getChainId"in e.eth}(e))return new a.EthereumWallet(new r.Web3Ethereum({web3:e}));if(function(e){return"provider"in e&&"signMessage"in e&&"signTransaction"in e&&e._isSigner&&"_signTypedData"in e}(e))return new a.EthereumWallet(new i.EthersEthereum(e));throw new Error("Unsupported provider")}},1028:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterErrors=t.signTypedData=void 0;const r=n(11);r.__exportStar(n(1029),t),r.__exportStar(n(1688),t);var i=n(1030);Object.defineProperty(t,"signTypedData",{enumerable:!0,get:function(){return i.signTypedData}}),Object.defineProperty(t,"filterErrors",{enumerable:!0,get:function(){return i.filterErrors}})},1029:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Provider=t.SignTypedDataMethodEnum=void 0,function(e){e.V4="eth_signTypedData_v4",e.V3="eth_signTypedData_v3",e.DEFAULT="eth_signTypedData"}(t.SignTypedDataMethodEnum||(t.SignTypedDataMethodEnum={})),function(e){e.WEB3="web3",e.ETHERS="ethers"}(t.Provider||(t.Provider={}))},1030:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.SignTypedDataError=t.hasMessage=t.filterErrors=t.signTypedData=void 0;const r=n(11),i=n(1689),a=n(1029);function o(e){var t,n;if("object"===typeof(n=e)&&null!==n&&"code"in n){if([4900,4001,4901,4100].includes(e.code))throw e;if(s(e)&&(null===(t=e.message)||void 0===t?void 0:t.includes("User denied message signature.")))throw e}if(s(e)){const t=function(e){if(!e||"string"!==typeof e)return;try{return JSON.parse(e)}catch(t){return}}(e.message);t&&o(t)}}function s(e){return"object"===typeof e&&null!==e&&"message"in e}t.signTypedData=function(t,n,s){return r.__awaiter(this,void 0,void 0,(function*(){const c=[];try{const e=yield t(a.SignTypedDataMethodEnum.V4,[n,JSON.stringify(s)]);return o(e),e}catch(l){o(l),c.push(l);try{if(console.error("got error while executing sign typed data v4",l),"object"===typeof(u=l)&&null!==u&&"message"in u&&"MetaMask Message Signature: Error: Not supported on this device"===l.message)return yield function(t,n,a){return r.__awaiter(this,void 0,void 0,(function*(){const r=i.TypedDataUtils.sign(a),o=(s=yield t("eth_sign",[n,"0x".concat(r.toString("hex"))])).startsWith("0x")?e.from(s.substring(2),"hex"):e.from(s,"hex");var s;return o.writeInt8(o[64]+4,64),"0x".concat(o.toString("hex"))}))}(t,n,s);try{return yield t(a.SignTypedDataMethodEnum.V3,[n,JSON.stringify(s)])}catch(l){return console.error("got error while executing sign typed data v3",l),o(l),c.push(l),yield t(a.SignTypedDataMethodEnum.DEFAULT,[n,s])}}catch(p){throw c.push(p),new d({error:l,data:{signer:n,data:s,errorsStack:c}})}}var u}))},t.filterErrors=o,t.hasMessage=s;class d extends Error{constructor(e){var t,n,r;super(d.getErrorMessage(e)),Object.setPrototypeOf(this,d.prototype),this.name="SignTypedDataError",this.error=null===e||void 0===e?void 0:e.error,this.data=null===e||void 0===e?void 0:e.data,this.code=(null===(t=null===e||void 0===e?void 0:e.error)||void 0===t?void 0:t.code)||(null===(r=null===(n=null===e||void 0===e?void 0:e.error)||void 0===n?void 0:n.error)||void 0===r?void 0:r.code)||void 0}static getErrorMessage(e){var t;return"string"===typeof e.error?e.error:(null===(t=null===e||void 0===e?void 0:e.error)||void 0===t?void 0:t.message)||(null===e||void 0===e?void 0:e.message)||"SignTypedDataError"}}t.SignTypedDataError=d}).call(this,n(7).Buffer)},1074:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.approveErc20=void 0;const r=n(11),i=n(147),a=n(471),o=(0,i.toBn)(2).pow(256).minus(1);t.approveErc20=function(e,t,n,s,d,c){let u=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet undefined");const r=(0,a.createErc20Contract)(e,n),l=(0,i.toBn)(yield r.functionCall("allowance",s,d).call()),p=(0,i.toBn)(c);return l.lt(p)?t(u?r.functionCall("approve",d,o.toFixed()):r.functionCall("approve",d,p.toFixed())):void 0}))}},1075:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.approveErc721=void 0;const r=n(11),i=n(556);t.approveErc721=function(e,t,n,a,o){return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet undefined");const r=(0,i.createErc721Contract)(e,n);let s;try{s=yield r.functionCall("isApprovedForAll",a,o).call()}catch(d){s=!1}if(!s)return yield t(r.functionCall("setApprovalForAll",o,!0))}))}},1076:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.approveErc1155=void 0;const r=n(11),i=n(557);t.approveErc1155=function(e,t,n,a,o){return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet undefined");const r=(0,i.createErc1155Contract)(e,n);let s;try{s=yield r.functionCall("isApprovedForAll",a,o).call()}catch(d){s=!1}if(!s)return t(r.functionCall("setApprovalForAll",o,!0))}))}},1078:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toLegacyAssetType=void 0;const r=n(20);t.toLegacyAssetType=function(e){switch(e.assetClass){case"ETH":return{token:r.ZERO_ADDRESS,tokenId:(0,r.toBigNumber)("0"),assetType:0};case"ERC20":return{token:e.contract,tokenId:(0,r.toBigNumber)("0"),assetType:1};case"ERC721":return{token:e.contract,tokenId:e.tokenId,assetType:3};case"ERC1155":return{token:e.contract,tokenId:e.tokenId,assetType:2};default:throw new Error("Unsupported")}}},1082:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUri=void 0,t.sanitizeUri=function(e,t){const n=function(e){return e.replace("https://ipfs.daonomic.com","ipfs:/").replace("https://ipfs.rarible.com","ipfs:/")}(e);if(!t)throw new Error("uri is not defined");if(!t.startsWith(n))throw new Error("uri must start with: ".concat(n));return t.slice(n.length)||""}},1083:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTokenId=void 0;const r=n(11),i=n(819);t.getTokenId=function(e,t,n,a){return r.__awaiter(this,void 0,void 0,(function*(){return void 0!==a?a:(0,i.wrapInRetry)((()=>e.generateNftTokenId({collection:t,minter:n})))}))}},1084:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCreators=t.mintErc1155v2=t.mintErc1155v1=t.mintErc721v3=t.mintErc721v2=t.mintErc721v1=void 0;const r=n(11),i=n(20),a=n(1085),o=n(1082),s=n(558),d=n(1083),c=n(559),u=n(414),l=n(643);function p(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if(e.creators&&e.creators.length>0)return e.creators;return[{account:(0,i.toAddress)(yield t.getFrom()),value:1e4}]}))}function y(e){return Object.assign({type:s.MintResponseTypeEnum.ON_CHAIN},e)}t.mintErc721v1=function(e,t,n,s){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,i.toAddress)(yield e.getFrom()),l=yield(0,c.getErc721Contract)(e,u.ERC721VersionEnum.ERC721V1,s.collection.id),p=yield(0,d.getTokenId)(n,s.collection.id,r,s.nftTokenId),{tokenId:m,signature:{v:f,r:h,s:b}}=p,T=yield l.functionCall("tokenURIPrefix").call(),v=(0,o.sanitizeUri)(T,s.uri);return y({transaction:yield t(l.functionCall("mint",m,f,h,b,v)),tokenId:m,contract:s.collection.id,owner:r,itemId:(0,a.createItemId)(s.collection.id,m)})}))},t.mintErc721v2=function(e,t,n,s){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,i.toAddress)(yield e.getFrom()),l=yield(0,c.getErc721Contract)(e,u.ERC721VersionEnum.ERC721V2,s.collection.id),p=yield(0,d.getTokenId)(n,s.collection.id,r,s.nftTokenId),{tokenId:m,signature:{v:f,r:h,s:b}}=p,T=(s.royalties||[]).map((e=>({recipient:e.account,value:e.value}))),v=yield l.functionCall("tokenURIPrefix").call(),g=(0,o.sanitizeUri)(v,s.uri);return y({transaction:yield t(l.functionCall("mint",m,f,h,b,T,g)),tokenId:m,contract:s.collection.id,owner:r,itemId:(0,a.createItemId)(s.collection.id,m)})}))},t.mintErc721v3=function(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield p(i,e),s=r[0].account,l=yield(0,c.getErc721Contract)(e,u.ERC721VersionEnum.ERC721V3,i.collection.id),m=yield l.functionCall("baseURI").call(),f=(0,o.sanitizeUri)(m,i.uri),{tokenId:h}=yield(0,d.getTokenId)(n,i.collection.id,s,i.nftTokenId),b={tokenId:h,tokenURI:f,creators:r,royalties:i.royalties||[],signatures:["0x"]};return y({transaction:yield t(l.functionCall("mintAndTransfer",b,s)),tokenId:h,contract:i.collection.id,owner:s,itemId:(0,a.createItemId)(i.collection.id,h)})}))},t.mintErc1155v1=function(e,t,n,s){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,i.toAddress)(yield e.getFrom()),c=yield(0,l.getErc1155Contract)(e,u.ERC1155VersionEnum.ERC1155V1,s.collection.id),p=yield(0,d.getTokenId)(n,s.collection.id,r,s.nftTokenId),{tokenId:m,signature:{v:f,r:h,s:b}}=p,T=(s.royalties||[]).map((e=>({recipient:e.account,value:e.value}))),v=yield c.functionCall("tokenURIPrefix").call(),g=(0,o.sanitizeUri)(v,s.uri);return y({transaction:yield t(c.functionCall("mint",m,f,h,b,T,s.supply,g)),tokenId:m,contract:s.collection.id,owner:r,itemId:(0,a.createItemId)(s.collection.id,m)})}))},t.mintErc1155v2=function(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield p(i,e),s=r[0].account,c=yield(0,l.getErc1155Contract)(e,u.ERC1155VersionEnum.ERC1155V2,i.collection.id),{tokenId:m}=yield(0,d.getTokenId)(n,i.collection.id,s,i.nftTokenId),f=yield c.functionCall("baseURI").call(),h={tokenId:m,tokenURI:(0,o.sanitizeUri)(f,i.uri),supply:i.supply,creators:r,royalties:i.royalties||[],signatures:["0x"]};return y({transaction:yield t(c.functionCall("mintAndTransfer",h,s,i.supply)),tokenId:m,contract:i.collection.id,owner:s,itemId:(0,a.createItemId)(i.collection.id,m)})}))},t.getCreators=p},1085:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createItemId=void 0,t.createItemId=function(e,t){return"".concat(e,":").concat(t)}},1095:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXCHANGEV1_E2E_ADDRESS=t.EXCHANGEV1_ABI=t.createExchangeV1Contract=void 0,t.createExchangeV1Contract=function(e,n){return e.createContract(t.EXCHANGEV1_ABI,n)},t.EXCHANGEV1_ABI=[{inputs:[{internalType:"contract TransferProxy",name:"_transferProxy",type:"address"},{internalType:"contract TransferProxyForDeprecated",name:"_transferProxyForDeprecated",type:"address"},{internalType:"contract ERC20TransferProxy",name:"_erc20TransferProxy",type:"address"},{internalType:"contract ExchangeStateV1",name:"_state",type:"address"},{internalType:"contract ExchangeOrdersHolderV1",name:"_ordersHolder",type:"address"},{internalType:"address payable",name:"_beneficiary",type:"address"},{internalType:"address",name:"_buyerFeeSigner",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sellToken",type:"address"},{indexed:!0,internalType:"uint256",name:"sellTokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"sellValue",type:"uint256"},{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"buyToken",type:"address"},{indexed:!1,internalType:"uint256",name:"buyTokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"buyValue",type:"uint256"},{indexed:!1,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"salt",type:"uint256"}],name:"Buy",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sellToken",type:"address"},{indexed:!0,internalType:"uint256",name:"sellTokenId",type:"uint256"},{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"buyToken",type:"address"},{indexed:!1,internalType:"uint256",name:"buyTokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"salt",type:"uint256"}],name:"Cancel",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{constant:!0,inputs:[],name:"beneficiary",outputs:[{internalType:"address payable",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"buyerFeeSigner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"erc20TransferProxy",outputs:[{internalType:"contract ERC20TransferProxy",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"isOwner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"ordersHolder",outputs:[{internalType:"contract ExchangeOrdersHolderV1",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"state",outputs:[{internalType:"contract ExchangeStateV1",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"transferProxy",outputs:[{internalType:"contract TransferProxy",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"transferProxyForDeprecated",outputs:[{internalType:"contract TransferProxyForDeprecated",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address payable",name:"newBeneficiary",type:"address"}],name:"setBeneficiary",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newBuyerFeeSigner",type:"address"}],name:"setBuyerFeeSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{components:[{components:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"salt",type:"uint256"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"sellAsset",type:"tuple"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"buyAsset",type:"tuple"}],internalType:"struct ExchangeDomainV1.OrderKey",name:"key",type:"tuple"},{internalType:"uint256",name:"selling",type:"uint256"},{internalType:"uint256",name:"buying",type:"uint256"},{internalType:"uint256",name:"sellerFee",type:"uint256"}],internalType:"struct ExchangeDomainV1.Order",name:"order",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct ExchangeDomainV1.Sig",name:"sig",type:"tuple"},{internalType:"uint256",name:"buyerFee",type:"uint256"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct ExchangeDomainV1.Sig",name:"buyerFeeSig",type:"tuple"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"buyer",type:"address"}],name:"exchange",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{components:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"salt",type:"uint256"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"sellAsset",type:"tuple"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"buyAsset",type:"tuple"}],internalType:"struct ExchangeDomainV1.OrderKey",name:"key",type:"tuple"}],name:"cancel",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{components:[{components:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"salt",type:"uint256"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"sellAsset",type:"tuple"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"buyAsset",type:"tuple"}],internalType:"struct ExchangeDomainV1.OrderKey",name:"key",type:"tuple"},{internalType:"uint256",name:"selling",type:"uint256"},{internalType:"uint256",name:"buying",type:"uint256"},{internalType:"uint256",name:"sellerFee",type:"uint256"}],internalType:"struct ExchangeDomainV1.Order",name:"order",type:"tuple"},{internalType:"uint256",name:"fee",type:"uint256"}],name:"prepareBuyerFeeMessage",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!0,inputs:[{components:[{components:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"salt",type:"uint256"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"sellAsset",type:"tuple"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"enum ExchangeDomainV1.AssetType",name:"assetType",type:"uint8"}],internalType:"struct ExchangeDomainV1.Asset",name:"buyAsset",type:"tuple"}],internalType:"struct ExchangeDomainV1.OrderKey",name:"key",type:"tuple"},{internalType:"uint256",name:"selling",type:"uint256"},{internalType:"uint256",name:"buying",type:"uint256"},{internalType:"uint256",name:"sellerFee",type:"uint256"}],internalType:"struct ExchangeDomainV1.Order",name:"order",type:"tuple"}],name:"prepareMessage",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"pure",type:"function"}],t.EXCHANGEV1_E2E_ADDRESS="0x087a4Af184bC0189cFE55f2293a77EFe7A4f247C"},1096:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXCHANGEV2_ABI=t.createExchangeV2Contract=void 0,t.createExchangeV2Contract=function(e,n){return e.createContract(t.EXCHANGEV2_ABI,n)},t.EXCHANGEV2_ABI=[{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"hash",type:"bytes32"}],name:"Cancel",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"leftHash",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"rightHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"newLeftFill",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newRightFill",type:"uint256"}],name:"Match",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes4",name:"assetType",type:"bytes4"},{indexed:!1,internalType:"address",name:"matcher",type:"address"}],name:"MatcherChange",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes4",name:"assetType",type:"bytes4"},{indexed:!1,internalType:"address",name:"proxy",type:"address"}],name:"ProxyChange",type:"event"},{inputs:[{components:[{internalType:"address",name:"maker",type:"address"},{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"makeAsset",type:"tuple"},{internalType:"address",name:"taker",type:"address"},{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"takeAsset",type:"tuple"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"uint256",name:"start",type:"uint256"},{internalType:"uint256",name:"end",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibOrder.Order",name:"order",type:"tuple"}],name:"cancel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"bidMaker",type:"address"},{internalType:"uint256",name:"bidNftAmount",type:"uint256"},{internalType:"bytes4",name:"nftAssetClass",type:"bytes4"},{internalType:"bytes",name:"nftData",type:"bytes"},{internalType:"uint256",name:"bidPaymentAmount",type:"uint256"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"uint256",name:"bidSalt",type:"uint256"},{internalType:"uint256",name:"bidStart",type:"uint256"},{internalType:"uint256",name:"bidEnd",type:"uint256"},{internalType:"bytes4",name:"bidDataType",type:"bytes4"},{internalType:"bytes",name:"bidData",type:"bytes"},{internalType:"bytes",name:"bidSignature",type:"bytes"},{internalType:"uint256",name:"sellOrderPaymentAmount",type:"uint256"},{internalType:"uint256",name:"sellOrderNftAmount",type:"uint256"},{internalType:"bytes",name:"sellOrderData",type:"bytes"}],internalType:"struct LibDirectTransfer.AcceptBid",name:"direct",type:"tuple"}],name:"directAcceptBid",outputs:[],stateMutability:"payable",type:"function",payable:!0},{inputs:[{components:[{internalType:"address",name:"sellOrderMaker",type:"address"},{internalType:"uint256",name:"sellOrderNftAmount",type:"uint256"},{internalType:"bytes4",name:"nftAssetClass",type:"bytes4"},{internalType:"bytes",name:"nftData",type:"bytes"},{internalType:"uint256",name:"sellOrderPaymentAmount",type:"uint256"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"uint256",name:"sellOrderSalt",type:"uint256"},{internalType:"uint256",name:"sellOrderStart",type:"uint256"},{internalType:"uint256",name:"sellOrderEnd",type:"uint256"},{internalType:"bytes4",name:"sellOrderDataType",type:"bytes4"},{internalType:"bytes",name:"sellOrderData",type:"bytes"},{internalType:"bytes",name:"sellOrderSignature",type:"bytes"},{internalType:"uint256",name:"buyOrderPaymentAmount",type:"uint256"},{internalType:"uint256",name:"buyOrderNftAmount",type:"uint256"},{internalType:"bytes",name:"buyOrderData",type:"bytes"}],internalType:"struct LibDirectTransfer.Purchase",name:"direct",type:"tuple"}],name:"directPurchase",outputs:[],stateMutability:"payable",type:"function",payable:!0},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"fills",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function",constant:!0},{inputs:[{components:[{internalType:"address",name:"maker",type:"address"},{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"makeAsset",type:"tuple"},{internalType:"address",name:"taker",type:"address"},{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"takeAsset",type:"tuple"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"uint256",name:"start",type:"uint256"},{internalType:"uint256",name:"end",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibOrder.Order",name:"orderLeft",type:"tuple"},{internalType:"bytes",name:"signatureLeft",type:"bytes"},{components:[{internalType:"address",name:"maker",type:"address"},{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"makeAsset",type:"tuple"},{internalType:"address",name:"taker",type:"address"},{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"takeAsset",type:"tuple"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"uint256",name:"start",type:"uint256"},{internalType:"uint256",name:"end",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibOrder.Order",name:"orderRight",type:"tuple"},{internalType:"bytes",name:"signatureRight",type:"bytes"}],name:"matchOrders",outputs:[],stateMutability:"payable",type:"function",payable:!0},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"royaltiesRegistry",outputs:[{internalType:"contract IRoyaltiesProvider",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[{internalType:"bytes4",name:"assetType",type:"bytes4"},{internalType:"address",name:"matcher",type:"address"}],name:"setAssetMatcher",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IRoyaltiesProvider",name:"newRoyaltiesRegistry",type:"address"}],name:"setRoyaltiesRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"assetType",type:"bytes4"},{internalType:"address",name:"proxy",type:"address"}],name:"setTransferProxy",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_transferProxy",type:"address"},{internalType:"address",name:"_erc20TransferProxy",type:"address"},{internalType:"uint256",name:"newProtocolFee",type:"uint256"},{internalType:"address",name:"newDefaultFeeReceiver",type:"address"},{internalType:"contract IRoyaltiesProvider",name:"newRoyaltiesProvider",type:"address"}],name:"__ExchangeV2_init",outputs:[],stateMutability:"nonpayable",type:"function"}]},1097:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OPENSEA_EXCHANGE_ABI=t.createOpenseaContract=void 0,t.createOpenseaContract=function(e,n){return e.createContract(t.OPENSEA_EXCHANGE_ABI,n)},t.OPENSEA_EXCHANGE_ABI=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"tokenTransferProxy",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"target",type:"address"},{name:"calldata",type:"bytes"},{name:"extradata",type:"bytes"}],name:"staticCall",outputs:[{name:"result",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newMinimumMakerProtocolFee",type:"uint256"}],name:"changeMinimumMakerProtocolFee",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newMinimumTakerProtocolFee",type:"uint256"}],name:"changeMinimumTakerProtocolFee",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"array",type:"bytes"},{name:"desired",type:"bytes"},{name:"mask",type:"bytes"}],name:"guardedArrayReplace",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!0,inputs:[],name:"minimumTakerProtocolFee",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"codename",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"}],name:"calculateCurrentPrice_",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newProtocolFeeRecipient",type:"address"}],name:"changeProtocolFeeRecipient",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"buyCalldata",type:"bytes"},{name:"buyReplacementPattern",type:"bytes"},{name:"sellCalldata",type:"bytes"},{name:"sellReplacementPattern",type:"bytes"}],name:"orderCalldataCanMatch",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"},{name:"v",type:"uint8"},{name:"r",type:"bytes32"},{name:"s",type:"bytes32"}],name:"validateOrder_",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"incrementNonce",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"basePrice",type:"uint256"},{name:"extra",type:"uint256"},{name:"listingTime",type:"uint256"},{name:"expirationTime",type:"uint256"}],name:"calculateFinalPrice",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"protocolFeeRecipient",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"}],name:"hashOrder_",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[14]"},{name:"uints",type:"uint256[18]"},{name:"feeMethodsSidesKindsHowToCalls",type:"uint8[8]"},{name:"calldataBuy",type:"bytes"},{name:"calldataSell",type:"bytes"},{name:"replacementPatternBuy",type:"bytes"},{name:"replacementPatternSell",type:"bytes"},{name:"staticExtradataBuy",type:"bytes"},{name:"staticExtradataSell",type:"bytes"}],name:"ordersCanMatch_",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"},{name:"orderbookInclusionDesired",type:"bool"}],name:"approveOrder_",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"registry",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"minimumMakerProtocolFee",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"}],name:"hashToSign_",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"nonces",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"bytes32"}],name:"cancelledOrFinalized",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"exchangeToken",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"},{name:"v",type:"uint8"},{name:"r",type:"bytes32"},{name:"s",type:"bytes32"}],name:"cancelOrder_",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"addrs",type:"address[14]"},{name:"uints",type:"uint256[18]"},{name:"feeMethodsSidesKindsHowToCalls",type:"uint8[8]"},{name:"calldataBuy",type:"bytes"},{name:"calldataSell",type:"bytes"},{name:"replacementPatternBuy",type:"bytes"},{name:"replacementPatternSell",type:"bytes"},{name:"staticExtradataBuy",type:"bytes"},{name:"staticExtradataSell",type:"bytes"},{name:"vs",type:"uint8[2]"},{name:"rssMetadata",type:"bytes32[5]"}],name:"atomicMatch_",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"}],name:"validateOrderParameters_",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"INVERSE_BASIS_POINT",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addrs",type:"address[14]"},{name:"uints",type:"uint256[18]"},{name:"feeMethodsSidesKindsHowToCalls",type:"uint8[8]"},{name:"calldataBuy",type:"bytes"},{name:"calldataSell",type:"bytes"},{name:"replacementPatternBuy",type:"bytes"},{name:"replacementPatternSell",type:"bytes"},{name:"staticExtradataBuy",type:"bytes"},{name:"staticExtradataSell",type:"bytes"}],name:"calculateMatchPrice_",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"hash",type:"bytes32"}],name:"approvedOrders",outputs:[{name:"approved",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"addrs",type:"address[7]"},{name:"uints",type:"uint256[9]"},{name:"feeMethod",type:"uint8"},{name:"side",type:"uint8"},{name:"saleKind",type:"uint8"},{name:"howToCall",type:"uint8"},{name:"calldata",type:"bytes"},{name:"replacementPattern",type:"bytes"},{name:"staticExtradata",type:"bytes"},{name:"v",type:"uint8"},{name:"r",type:"bytes32"},{name:"s",type:"bytes32"},{name:"nonce",type:"uint256"}],name:"cancelOrderWithNonce_",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"registryAddress",type:"address"},{name:"tokenTransferProxyAddress",type:"address"},{name:"tokenAddress",type:"address"},{name:"protocolFeeAddress",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"hash",type:"bytes32"},{indexed:!1,name:"exchange",type:"address"},{indexed:!0,name:"maker",type:"address"},{indexed:!1,name:"taker",type:"address"},{indexed:!1,name:"makerRelayerFee",type:"uint256"},{indexed:!1,name:"takerRelayerFee",type:"uint256"},{indexed:!1,name:"makerProtocolFee",type:"uint256"},{indexed:!1,name:"takerProtocolFee",type:"uint256"},{indexed:!0,name:"feeRecipient",type:"address"},{indexed:!1,name:"feeMethod",type:"uint8"},{indexed:!1,name:"side",type:"uint8"},{indexed:!1,name:"saleKind",type:"uint8"},{indexed:!1,name:"target",type:"address"}],name:"OrderApprovedPartOne",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"hash",type:"bytes32"},{indexed:!1,name:"howToCall",type:"uint8"},{indexed:!1,name:"calldata",type:"bytes"},{indexed:!1,name:"replacementPattern",type:"bytes"},{indexed:!1,name:"staticTarget",type:"address"},{indexed:!1,name:"staticExtradata",type:"bytes"},{indexed:!1,name:"paymentToken",type:"address"},{indexed:!1,name:"basePrice",type:"uint256"},{indexed:!1,name:"extra",type:"uint256"},{indexed:!1,name:"listingTime",type:"uint256"},{indexed:!1,name:"expirationTime",type:"uint256"},{indexed:!1,name:"salt",type:"uint256"},{indexed:!1,name:"orderbookInclusionDesired",type:"bool"}],name:"OrderApprovedPartTwo",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"hash",type:"bytes32"}],name:"OrderCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"buyHash",type:"bytes32"},{indexed:!1,name:"sellHash",type:"bytes32"},{indexed:!0,name:"maker",type:"address"},{indexed:!0,name:"taker",type:"address"},{indexed:!1,name:"price",type:"uint256"},{indexed:!0,name:"metadata",type:"bytes32"}],name:"OrdersMatched",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"maker",type:"address"},{indexed:!1,name:"newNonce",type:"uint256"}],name:"NonceIncremented",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"previousOwner",type:"address"}],name:"OwnershipRenounced",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"previousOwner",type:"address"},{indexed:!0,name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"}]},1098:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toStructLegacyOrderKey=t.toStructLegacyOrder=t.RaribleV1OrderHandler=void 0;const r=n(11),i=n(20),a=n(101),o=n(555),s=n(646),d=n(1095),c=n(1078),u=n(645),l=n(331),p=n(824);function y(e){if("RARIBLE_V1"!==e.type)throw new Error("Not supported type: ".concat(e.type));const t=e.data;if("LEGACY"!==t.dataType)throw new Error("Not supported data type: ".concat(t.dataType));return{key:m(e),selling:e.make.value,buying:e.take.value,sellerFee:t.fee}}function m(e){return{owner:e.maker,salt:e.salt,sellAsset:(0,c.toLegacyAssetType)(e.make.assetType),buyAsset:(0,c.toLegacyAssetType)(e.take.assetType)}}t.RaribleV1OrderHandler=class{constructor(e,t,n,r,i,a){this.ethereum=e,this.getApis=t,this.send=n,this.getConfig=r,this.getBaseOrderFeeConfig=i,this.sdkConfig=a}invert(e,t){const n=(0,p.invertOrder)(e.order,e.amount,t);return n.data={dataType:"LEGACY",fee:e.originFee},n}approve(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const n=(0,s.getAssetWithFee)(e.make,this.getOrderFee(e));yield(0,l.waitTx)((0,o.approve)(this.ethereum,this.send,(()=>this.getConfig()),e.maker,n,t))}))}getBaseOrderFee(){return r.__awaiter(this,void 0,void 0,(function*(){return this.getBaseOrderFeeConfig("RARIBLE_V1")}))}getOrderFee(e){return e.data.fee}getTransactionData(e,t,n){var o;return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const r=yield this.getApis(),c=yield r.order.buyerFeeSignature({fee:t.data.fee,orderForm:Object.assign(Object.assign({},e),{salt:(0,i.toBigNumber)((0,a.toBn)(e.salt).toString()),signature:e.signature||(0,i.toBinary)("0x"),end:e.end})}),l=yield this.getConfig();return{functionCall:(0,d.createExchangeV1Contract)(this.ethereum,l.exchange.v1).functionCall("exchange",y(e),(0,u.toVrs)(e.signature),t.data.fee,(0,u.toVrs)(c),t.take.value,null!==(o=n.payout)&&void 0!==o?o:i.ZERO_ADDRESS),options:function(e){if("ETH"===e.make.assetType.assetClass){return{value:(0,s.getAssetWithFee)(e.make,e.data.fee).value}}return{}}(t)}}))}},t.toStructLegacyOrder=y,t.toStructLegacyOrderKey=m},1100:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERC1155_VALIDATOR_TAKE_REPLACEMENT=t.ERC1155_TAKE_REPLACEMENT=t.ERC1155_VALIDATOR_MAKE_REPLACEMENT=t.ERC1155_MAKE_REPLACEMENT=t.ERC721_VALIDATOR_TAKE_REPLACEMENT=t.ERC721_TAKE_REPLACEMENT=t.ERC721_VALIDATOR_MAKE_REPLACEMENT=t.ERC721_MAKE_REPLACEMENT=t.convertOpenSeaOrderToDTO=void 0;const r=n(20),i=n(101),a=n(372),o=n(2059);function s(e){switch(e.assetClass){case"ETH":return r.ZERO_ADDRESS;case"ERC20":return e.contract;default:return}}t.convertOpenSeaOrderToDTO=function(e,t){const n=function(e){const t=s(e.make.assetType);if(void 0!==t)return t;const n=s(e.take.assetType);if(void 0!==n)return n;return}(t);if(!n)throw new Error("Maker or taker should have an ERC20 asset");const d=function(e){if((0,a.isNft)(e.make.assetType))return e.make.assetType.contract;if((0,a.isNft)(e.take.assetType))return e.take.assetType.contract;return}(t);if(!d)throw new Error("Maker or taker should have an NFT asset");const c=t.data.callData,u=t.data.replacementPattern;let l;const p=t.make.assetType,y=t.take.assetType;if("ERC721"===p.assetClass)l=(0,r.toBigNumber)(t.take.value);else if("ERC1155"===p.assetClass)l=(0,r.toBigNumber)(t.take.value);else if("ERC721"===y.assetClass)l=(0,r.toBigNumber)(t.make.value);else{if("ERC1155"!==y.assetClass)throw new Error("should never happen");l=(0,r.toBigNumber)(t.make.value)}return{exchange:(0,r.toAddress)(t.data.exchange),maker:(0,r.toAddress)(t.maker),taker:(0,r.toAddress)(t.taker||r.ZERO_ADDRESS),makerRelayerFee:(0,r.toBigNumber)(t.data.makerRelayerFee),takerRelayerFee:(0,r.toBigNumber)(t.data.takerRelayerFee),makerProtocolFee:(0,r.toBigNumber)(t.data.makerProtocolFee),takerProtocolFee:(0,r.toBigNumber)(t.data.takerProtocolFee),feeRecipient:t.data.feeRecipient,feeMethod:o.OrderOpenSeaV1DataV1FeeMethod[t.data.feeMethod],side:o.OrderOpenSeaV1DataV1Side[t.data.side],saleKind:o.OrderOpenSeaV1DataV1SaleKind[t.data.saleKind],target:t.data.target||d,howToCall:o.OrderOpenSeaV1DataV1HowToCall[t.data.howToCall],calldata:c,replacementPattern:u,staticTarget:t.data.staticTarget,staticExtradata:t.data.staticExtraData,paymentToken:n,basePrice:l,extra:(0,r.toBigNumber)(t.data.extra),listingTime:(0,r.toBigNumber)(String(t.start||0)),expirationTime:(0,r.toBigNumber)(String(t.end||0)),salt:(0,r.toBigNumber)((0,i.toBn)(t.salt).toString(10))}},t.ERC721_MAKE_REPLACEMENT=(0,r.toBinary)("0x000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000"),t.ERC721_VALIDATOR_MAKE_REPLACEMENT=(0,r.toBinary)("0x000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),t.ERC721_TAKE_REPLACEMENT=(0,r.toBinary)("0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),t.ERC721_VALIDATOR_TAKE_REPLACEMENT=(0,r.toBinary)("0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),t.ERC1155_MAKE_REPLACEMENT=(0,r.toBinary)("0x000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),t.ERC1155_VALIDATOR_MAKE_REPLACEMENT=(0,r.toBinary)("0x000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),t.ERC1155_TAKE_REPLACEMENT=(0,r.toBinary)("0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),t.ERC1155_VALIDATOR_TAKE_REPLACEMENT=(0,r.toBinary)("0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")},1101:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findGcd=t.gcd=void 0;const r=n(101);t.gcd=(e,n)=>{const i=(0,r.toBn)(e),a=(0,r.toBn)(n);return i.eq(0)?a:(0,t.gcd)(a.mod(e),i)};t.findGcd=e=>{let n=(0,r.toBn)(e[0]);for(let r=1;r{const t="0x"+[s.slice(2),e.itemType.toString().padStart(64,"0"),e.token.slice(2).padStart(64,"0"),(0,i.toBn)(e.identifierOrCriteria).toString(16).padStart(64,"0"),(0,i.toBn)(e.startAmount).toString(16).padStart(64,"0"),(0,i.toBn)(e.endAmount).toString(16).padStart(64,"0")].join("");return(0,r.keccakFromHexString)(t).toString("hex")})).join("")).toString("hex"),l="0x"+(0,r.keccakFromHexString)("0x"+e.consideration.map((e=>(0,r.keccakFromHexString)("0x"+[d.slice(2),e.itemType.toString().padStart(64,"0"),e.token.slice(2).padStart(64,"0"),(0,i.toBn)(e.identifierOrCriteria).toString(16).padStart(64,"0"),(0,i.toBn)(e.startAmount).toString(16).padStart(64,"0"),(0,i.toBn)(e.endAmount).toString(16).padStart(64,"0"),e.recipient.slice(2).padStart(64,"0")].join("")).toString("hex"))).join("")).toString("hex"),p=(0,r.keccakFromHexString)("0x"+[c.slice(2),e.offerer.slice(2).padStart(64,"0"),e.zone.slice(2).padStart(64,"0"),u.slice(2),l.slice(2),e.orderType.toString().padStart(64,"0"),(0,i.toBn)(e.startTime).toString(16).padStart(64,"0"),(0,i.toBn)(e.endTime).toString(16).padStart(64,"0"),e.zoneHash.slice(2),e.salt.slice(2).padStart(64,"0"),e.conduitKey.slice(2).padStart(64,"0"),(0,i.toBn)(e.counter).toString(16).padStart(64,"0")].join("")).toString("hex");return"0x".concat(p)},t.getStringHash=a}).call(this,n(7).Buffer)},1105:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LOOKSRARE_V2_ABI=t.createLooksrareV2Exchange=void 0,t.createLooksrareV2Exchange=function(e,n){return e.createContract(t.LOOKSRARE_V2_ABI,n)},t.LOOKSRARE_V2_ABI=[{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_protocolFeeRecipient",type:"address"},{internalType:"address",name:"_transferManager",type:"address"},{internalType:"address",name:"_weth",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"CallerInvalid",type:"error"},{inputs:[],name:"ChainIdInvalid",type:"error"},{inputs:[],name:"CreatorFeeBpTooHigh",type:"error"},{inputs:[],name:"CurrencyInvalid",type:"error"},{inputs:[],name:"ERC20TransferFromFail",type:"error"},{inputs:[],name:"LengthsInvalid",type:"error"},{inputs:[],name:"MerkleProofInvalid",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"MerkleProofTooLarge",type:"error"},{inputs:[],name:"NewGasLimitETHTransferTooLow",type:"error"},{inputs:[],name:"NewProtocolFeeRecipientCannotBeNullAddress",type:"error"},{inputs:[],name:"NoOngoingTransferInProgress",type:"error"},{inputs:[],name:"NoSelectorForStrategy",type:"error"},{inputs:[],name:"NoncesInvalid",type:"error"},{inputs:[],name:"NotAContract",type:"error"},{inputs:[],name:"NotAffiliateController",type:"error"},{inputs:[],name:"NotOwner",type:"error"},{inputs:[],name:"NotV2Strategy",type:"error"},{inputs:[],name:"NullSignerAddress",type:"error"},{inputs:[],name:"OutsideOfTimeRange",type:"error"},{inputs:[],name:"PercentageTooHigh",type:"error"},{inputs:[],name:"QuoteTypeInvalid",type:"error"},{inputs:[],name:"ReentrancyFail",type:"error"},{inputs:[],name:"RenouncementNotInProgress",type:"error"},{inputs:[],name:"SameDomainSeparator",type:"error"},{inputs:[],name:"SignatureEOAInvalid",type:"error"},{inputs:[],name:"SignatureERC1271Invalid",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"SignatureLengthInvalid",type:"error"},{inputs:[],name:"SignatureParameterSInvalid",type:"error"},{inputs:[{internalType:"uint8",name:"v",type:"uint8"}],name:"SignatureParameterVInvalid",type:"error"},{inputs:[],name:"StrategyHasNoSelector",type:"error"},{inputs:[{internalType:"uint256",name:"strategyId",type:"uint256"}],name:"StrategyNotAvailable",type:"error"},{inputs:[],name:"StrategyNotUsed",type:"error"},{inputs:[],name:"StrategyProtocolFeeTooHigh",type:"error"},{inputs:[],name:"TransferAlreadyInProgress",type:"error"},{inputs:[],name:"TransferNotInProgress",type:"error"},{inputs:[],name:"WrongPotentialOwner",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"affiliate",type:"address"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"uint256",name:"affiliateFee",type:"uint256"}],name:"AffiliatePayment",type:"event"},{anonymous:!1,inputs:[],name:"CancelOwnershipTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"bool",name:"isAllowed",type:"bool"}],name:"CurrencyStatusUpdated",type:"event"},{anonymous:!1,inputs:[],name:"InitiateOwnershipRenouncement",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousOwner",type:"address"},{indexed:!1,internalType:"address",name:"potentialOwner",type:"address"}],name:"InitiateOwnershipTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"affiliateController",type:"address"}],name:"NewAffiliateController",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"isActive",type:"bool"}],name:"NewAffiliateProgramStatus",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"affiliate",type:"address"},{indexed:!1,internalType:"uint256",name:"rate",type:"uint256"}],name:"NewAffiliateRate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"bidNonce",type:"uint256"},{indexed:!1,internalType:"uint256",name:"askNonce",type:"uint256"}],name:"NewBidAskNonces",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"creatorFeeManager",type:"address"}],name:"NewCreatorFeeManager",type:"event"},{anonymous:!1,inputs:[],name:"NewDomainSeparator",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"gasLimitETHTransfer",type:"uint256"}],name:"NewGasLimitETHTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"maxCreatorFeeBp",type:"uint256"}],name:"NewMaxCreatorFeeBp",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"protocolFeeRecipient",type:"address"}],name:"NewProtocolFeeRecipient",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"strategyId",type:"uint256"},{indexed:!1,internalType:"uint16",name:"standardProtocolFeeBp",type:"uint16"},{indexed:!1,internalType:"uint16",name:"minTotalFeeBp",type:"uint16"},{indexed:!1,internalType:"uint16",name:"maxProtocolFeeBp",type:"uint16"},{indexed:!1,internalType:"bytes4",name:"selector",type:"bytes4"},{indexed:!1,internalType:"bool",name:"isMakerBid",type:"bool"},{indexed:!1,internalType:"address",name:"implementation",type:"address"}],name:"NewStrategy",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256[]",name:"orderNonces",type:"uint256[]"}],name:"OrderNoncesCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"strategyId",type:"uint256"},{indexed:!1,internalType:"bool",name:"isActive",type:"bool"},{indexed:!1,internalType:"uint16",name:"standardProtocolFeeBp",type:"uint16"},{indexed:!1,internalType:"uint16",name:"minTotalFeeBp",type:"uint16"}],name:"StrategyUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256[]",name:"subsetNonces",type:"uint256[]"}],name:"SubsetNoncesCancelled",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"bytes32",name:"orderHash",type:"bytes32"},{internalType:"uint256",name:"orderNonce",type:"uint256"},{internalType:"bool",name:"isNonceInvalidated",type:"bool"}],indexed:!1,internalType:"struct ILooksRareProtocol.NonceInvalidationParameters",name:"nonceInvalidationParameters",type:"tuple"},{indexed:!1,internalType:"address",name:"askUser",type:"address"},{indexed:!1,internalType:"address",name:"bidUser",type:"address"},{indexed:!1,internalType:"uint256",name:"strategyId",type:"uint256"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"address",name:"collection",type:"address"},{indexed:!1,internalType:"uint256[]",name:"itemIds",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"amounts",type:"uint256[]"},{indexed:!1,internalType:"address[2]",name:"feeRecipients",type:"address[2]"},{indexed:!1,internalType:"uint256[3]",name:"feeAmounts",type:"uint256[3]"}],name:"TakerAsk",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"bytes32",name:"orderHash",type:"bytes32"},{internalType:"uint256",name:"orderNonce",type:"uint256"},{internalType:"bool",name:"isNonceInvalidated",type:"bool"}],indexed:!1,internalType:"struct ILooksRareProtocol.NonceInvalidationParameters",name:"nonceInvalidationParameters",type:"tuple"},{indexed:!1,internalType:"address",name:"bidUser",type:"address"},{indexed:!1,internalType:"address",name:"bidRecipient",type:"address"},{indexed:!1,internalType:"uint256",name:"strategyId",type:"uint256"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"address",name:"collection",type:"address"},{indexed:!1,internalType:"uint256[]",name:"itemIds",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"amounts",type:"uint256[]"},{indexed:!1,internalType:"address[2]",name:"feeRecipients",type:"address[2]"},{indexed:!1,internalType:"uint256[3]",name:"feeAmounts",type:"uint256[3]"}],name:"TakerBid",type:"event"},{inputs:[],name:"MAGIC_VALUE_ORDER_NONCE_EXECUTED",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"standardProtocolFeeBp",type:"uint16"},{internalType:"uint16",name:"minTotalFeeBp",type:"uint16"},{internalType:"uint16",name:"maxProtocolFeeBp",type:"uint16"},{internalType:"bytes4",name:"selector",type:"bytes4"},{internalType:"bool",name:"isMakerBid",type:"bool"},{internalType:"address",name:"implementation",type:"address"}],name:"addStrategy",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"affiliateController",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"affiliateRates",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256[]",name:"orderNonces",type:"uint256[]"}],name:"cancelOrderNonces",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"cancelOwnershipTransfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256[]",name:"subsetNonces",type:"uint256[]"}],name:"cancelSubsetNonces",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"chainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"confirmOwnershipRenouncement",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"confirmOwnershipTransfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"creatorFeeManager",outputs:[{internalType:"contract ICreatorFeeManager",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"domainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bytes",name:"additionalParameters",type:"bytes"}],internalType:"struct OrderStructs.Taker[]",name:"takerBids",type:"tuple[]"},{components:[{internalType:"enum QuoteType",name:"quoteType",type:"uint8"},{internalType:"uint256",name:"globalNonce",type:"uint256"},{internalType:"uint256",name:"subsetNonce",type:"uint256"},{internalType:"uint256",name:"orderNonce",type:"uint256"},{internalType:"uint256",name:"strategyId",type:"uint256"},{internalType:"enum CollectionType",name:"collectionType",type:"uint8"},{internalType:"address",name:"collection",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"address",name:"signer",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256[]",name:"itemIds",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"additionalParameters",type:"bytes"}],internalType:"struct OrderStructs.Maker[]",name:"makerAsks",type:"tuple[]"},{internalType:"bytes[]",name:"makerSignatures",type:"bytes[]"},{components:[{internalType:"bytes32",name:"root",type:"bytes32"},{components:[{internalType:"bytes32",name:"value",type:"bytes32"},{internalType:"enum OrderStructs.MerkleTreeNodePosition",name:"position",type:"uint8"}],internalType:"struct OrderStructs.MerkleTreeNode[]",name:"proof",type:"tuple[]"}],internalType:"struct OrderStructs.MerkleTree[]",name:"merkleTrees",type:"tuple[]"},{internalType:"address",name:"affiliate",type:"address"},{internalType:"bool",name:"isAtomic",type:"bool"}],name:"executeMultipleTakerBids",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bytes",name:"additionalParameters",type:"bytes"}],internalType:"struct OrderStructs.Taker",name:"takerAsk",type:"tuple"},{components:[{internalType:"enum QuoteType",name:"quoteType",type:"uint8"},{internalType:"uint256",name:"globalNonce",type:"uint256"},{internalType:"uint256",name:"subsetNonce",type:"uint256"},{internalType:"uint256",name:"orderNonce",type:"uint256"},{internalType:"uint256",name:"strategyId",type:"uint256"},{internalType:"enum CollectionType",name:"collectionType",type:"uint8"},{internalType:"address",name:"collection",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"address",name:"signer",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256[]",name:"itemIds",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"additionalParameters",type:"bytes"}],internalType:"struct OrderStructs.Maker",name:"makerBid",type:"tuple"},{internalType:"bytes",name:"makerSignature",type:"bytes"},{components:[{internalType:"bytes32",name:"root",type:"bytes32"},{components:[{internalType:"bytes32",name:"value",type:"bytes32"},{internalType:"enum OrderStructs.MerkleTreeNodePosition",name:"position",type:"uint8"}],internalType:"struct OrderStructs.MerkleTreeNode[]",name:"proof",type:"tuple[]"}],internalType:"struct OrderStructs.MerkleTree",name:"merkleTree",type:"tuple"},{internalType:"address",name:"affiliate",type:"address"}],name:"executeTakerAsk",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bytes",name:"additionalParameters",type:"bytes"}],internalType:"struct OrderStructs.Taker",name:"takerBid",type:"tuple"},{components:[{internalType:"enum QuoteType",name:"quoteType",type:"uint8"},{internalType:"uint256",name:"globalNonce",type:"uint256"},{internalType:"uint256",name:"subsetNonce",type:"uint256"},{internalType:"uint256",name:"orderNonce",type:"uint256"},{internalType:"uint256",name:"strategyId",type:"uint256"},{internalType:"enum CollectionType",name:"collectionType",type:"uint8"},{internalType:"address",name:"collection",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"address",name:"signer",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256[]",name:"itemIds",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"additionalParameters",type:"bytes"}],internalType:"struct OrderStructs.Maker",name:"makerAsk",type:"tuple"},{internalType:"bytes",name:"makerSignature",type:"bytes"},{components:[{internalType:"bytes32",name:"root",type:"bytes32"},{components:[{internalType:"bytes32",name:"value",type:"bytes32"},{internalType:"enum OrderStructs.MerkleTreeNodePosition",name:"position",type:"uint8"}],internalType:"struct OrderStructs.MerkleTreeNode[]",name:"proof",type:"tuple[]"}],internalType:"struct OrderStructs.MerkleTree",name:"merkleTree",type:"tuple"},{internalType:"address",name:"affiliate",type:"address"}],name:"executeTakerBid",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"uint256",name:"proofLength",type:"uint256"}],name:"hashBatchOrder",outputs:[{internalType:"bytes32",name:"batchOrderHash",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bool",name:"bid",type:"bool"},{internalType:"bool",name:"ask",type:"bool"}],name:"incrementBidAskNonces",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initiateOwnershipRenouncement",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newPotentialOwner",type:"address"}],name:"initiateOwnershipTransfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"isAffiliateProgramActive",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"isCurrencyAllowed",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxCreatorFeeBp",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"ownershipStatus",outputs:[{internalType:"enum IOwnableTwoSteps.Status",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"potentialOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFeeRecipient",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bytes",name:"additionalParameters",type:"bytes"}],internalType:"struct OrderStructs.Taker",name:"takerBid",type:"tuple"},{components:[{internalType:"enum QuoteType",name:"quoteType",type:"uint8"},{internalType:"uint256",name:"globalNonce",type:"uint256"},{internalType:"uint256",name:"subsetNonce",type:"uint256"},{internalType:"uint256",name:"orderNonce",type:"uint256"},{internalType:"uint256",name:"strategyId",type:"uint256"},{internalType:"enum CollectionType",name:"collectionType",type:"uint8"},{internalType:"address",name:"collection",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"address",name:"signer",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256[]",name:"itemIds",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"additionalParameters",type:"bytes"}],internalType:"struct OrderStructs.Maker",name:"makerAsk",type:"tuple"},{internalType:"address",name:"sender",type:"address"},{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"restrictedExecuteTakerBid",outputs:[{internalType:"uint256",name:"protocolFeeAmount",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"strategyInfo",outputs:[{internalType:"bool",name:"isActive",type:"bool"},{internalType:"uint16",name:"standardProtocolFeeBp",type:"uint16"},{internalType:"uint16",name:"minTotalFeeBp",type:"uint16"},{internalType:"uint16",name:"maxProtocolFeeBp",type:"uint16"},{internalType:"bytes4",name:"selector",type:"bytes4"},{internalType:"bool",name:"isMakerBid",type:"bool"},{internalType:"address",name:"implementation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"transferManager",outputs:[{internalType:"contract TransferManager",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newAffiliateController",type:"address"}],name:"updateAffiliateController",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"isActive",type:"bool"}],name:"updateAffiliateProgramStatus",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"affiliate",type:"address"},{internalType:"uint256",name:"bp",type:"uint256"}],name:"updateAffiliateRate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newCreatorFeeManager",type:"address"}],name:"updateCreatorFeeManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"currency",type:"address"},{internalType:"bool",name:"isAllowed",type:"bool"}],name:"updateCurrencyStatus",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateDomainSeparator",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newGasLimitETHTransfer",type:"uint256"}],name:"updateETHGasLimitForTransfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"newMaxCreatorFeeBp",type:"uint16"}],name:"updateMaxCreatorFeeBp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newProtocolFeeRecipient",type:"address"}],name:"updateProtocolFeeRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"strategyId",type:"uint256"},{internalType:"bool",name:"isActive",type:"bool"},{internalType:"uint16",name:"newStandardProtocolFee",type:"uint16"},{internalType:"uint16",name:"newMinTotalFee",type:"uint16"}],name:"updateStrategy",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"userBidAskNonces",outputs:[{internalType:"uint256",name:"bidNonce",type:"uint256"},{internalType:"uint256",name:"askNonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],name:"userOrderNonce",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],name:"userSubsetNonce",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}]},1106:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RaribleV2OrderHandler=void 0;const r=n(11),i=n(20),a=n(812),o=n(646),s=n(555),d=n(1096),c=n(331),u=n(2101),l=n(2102),p=n(813),y=n(814),m=n(554),f=n(553),h=n(2103),b=n(824),T=n(416),v=n(332);t.RaribleV2OrderHandler=class{constructor(e,t,n,r,i){this.ethereum=e,this.send=t,this.getConfig=n,this.getBaseOrderFeeConfig=r,this.sdkConfig=i}invert(e,t){const n=(0,b.invertOrder)(e.order,e.amount,t);switch(e.order.data.dataType){case"RARIBLE_V2_DATA_V1":n.data={dataType:"RARIBLE_V2_DATA_V1",originFees:e.originFees||[],payouts:e.payouts||[]};break;case"RARIBLE_V2_DATA_V2":n.data={dataType:"RARIBLE_V2_DATA_V2",originFees:e.originFees||[],payouts:e.payouts||[],isMakeFill:!e.order.data.isMakeFill};break;case"RARIBLE_V2_DATA_V3_BUY":n.data={dataType:"RARIBLE_V2_DATA_V3_SELL",payout:e.payout,originFeeFirst:e.originFeeFirst,originFeeSecond:e.originFeeSecond,maxFeesBasePoint:e.maxFeesBasePoint,marketplaceMarker:e.marketplaceMarker};break;case"RARIBLE_V2_DATA_V3_SELL":n.data={dataType:"RARIBLE_V2_DATA_V3_BUY",payout:e.payout,originFeeFirst:e.originFeeFirst,originFeeSecond:e.originFeeSecond,marketplaceMarker:e.marketplaceMarker};break;default:throw new Error("Unsupported order dataType")}return n}getAssetToApprove(e){return this.getMakeAssetWithFee(e)}approve(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const n=yield this.getMakeAssetWithFee(e);yield(0,c.waitTx)((0,s.approve)(this.ethereum,this.send,(()=>this.getConfig()),e.maker,n,t))}))}getTransactionData(e,t){var n,o,s,c;return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const r=yield this.getConfig(),u=(0,d.createExchangeV2Contract)(this.ethereum,r.exchange.v2);if("ETH"===(m=e).take.assetType.assetClass||"ERC20"===m.take.assetType.assetClass){const r=(0,p.assetTypeToStruct)(this.ethereum,e.make.assetType),[a,s]=(0,y.encodeRaribleV2OrderData)(this.ethereum,e.data),[,d]=(0,y.encodeRaribleV2OrderData)(this.ethereum,t.data);return{functionCall:u.functionCall("directPurchase",{sellOrderMaker:e.maker,sellOrderNftAmount:e.make.value,nftAssetClass:r.assetClass,nftData:r.data,sellOrderPaymentAmount:e.take.value,paymentToken:"ETH"===e.take.assetType.assetClass?i.ZERO_ADDRESS:e.take.assetType.contract,sellOrderSalt:e.salt,sellOrderStart:null!==(n=e.start)&&void 0!==n?n:0,sellOrderEnd:null!==(o=e.end)&&void 0!==o?o:0,sellOrderDataType:a,sellOrderData:s,sellOrderSignature:(0,l.fixSignature)(e.signature)||"0x",buyOrderPaymentAmount:t.make.value,buyOrderNftAmount:t.take.value,buyOrderData:d}),options:yield this.getMatchV2Options(e,t)}}{let n;if(function(e){return"COLLECTION"===e.take.assetType.assetClass}(e))n=u.functionCall("matchOrders",yield this.fixForTx(e),(0,l.fixSignature)(e.signature)||"0x",(0,a.orderToStruct)(this.ethereum,t),(0,l.fixSignature)(t.signature)||"0x");else{const r=(0,p.assetTypeToStruct)(this.ethereum,e.take.assetType),[,a]=(0,y.encodeRaribleV2OrderData)(this.ethereum,t.data),[o,d]=(0,y.encodeRaribleV2OrderData)(this.ethereum,e.data);n=u.functionCall("directAcceptBid",{bidMaker:e.maker,bidNftAmount:e.take.value,nftAssetClass:r.assetClass,nftData:r.data,bidPaymentAmount:e.make.value,paymentToken:"ETH"===e.make.assetType.assetClass?i.ZERO_ADDRESS:e.make.assetType.contract,bidSalt:e.salt,bidStart:null!==(s=e.start)&&void 0!==s?s:0,bidEnd:null!==(c=e.end)&&void 0!==c?c:0,bidDataType:o,bidData:d,bidSignature:(0,l.fixSignature)(e.signature)||"0x",sellOrderPaymentAmount:t.take.value,sellOrderNftAmount:t.make.value,sellOrderData:a})}return{functionCall:n,options:yield this.getMatchV2Options(e,t)}}var m}))}getTransactionDataForExchangeWrapper(e,t){var n;return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const r=yield this.getConfig();e.signature||(e.signature=yield(0,a.signOrder)(this.ethereum,(()=>this.getConfig()),e)),"RARIBLE_V2_DATA_V1"===t.data.dataType||"RARIBLE_V2_DATA_V2"===t.data.dataType?(null===(n=t.data.payouts)||void 0===n?void 0:n.length)||(t.data.payouts=[{account:t.maker,value:1e4}]):"RARIBLE_V2_DATA_V3_BUY"!==t.data.dataType&&"RARIBLE_V2_DATA_V3_SELL"!==t.data.dataType||t.data.payout||(t.data.payout={account:t.maker,value:1e4});const i=(0,l.fixSignature)(e.signature)||"0x",o=(0,h.encodeRaribleV2OrderPurchaseStruct)(this.ethereum,e,i,t,!0),s=yield this.getMatchV2Options(e,t);let d=v.ZERO_FEE_VALUE;const c=yield this.getMakeAssetWithFee(t);return(0,m.isWeth)(e.take.assetType,r)&&(d=(0,v.setFeesCurrency)(d,!0)),{data:{marketId:T.ExchangeWrapperOrderType.RARIBLE_V2,amount:c.value,fees:d,data:o},options:s}}))}fixForTx(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const t=(0,f.getNetworkConfigByChainId)(yield this.ethereum.getChainId()),n=(0,a.hashToSign)(t,this.ethereum,e),r=yield(0,u.isSigner)(this.ethereum,e.maker,n,e.signature);return(0,a.orderToStruct)(this.ethereum,e,!r)}))}getMatchV2Options(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if((0,m.isETH)(e.make.assetType)&&e.salt===i.ZERO_WORD){return{value:(yield this.getMakeAssetWithFee(e)).value}}if((0,m.isETH)(t.make.assetType)&&t.salt===i.ZERO_WORD){return{value:(yield this.getMakeAssetWithFee(t)).value}}return{value:0}}))}getMakeAssetWithFee(e){return r.__awaiter(this,void 0,void 0,(function*(){return(0,o.getAssetWithFee)(e.make,yield this.getOrderFee(e))}))}getOrderFee(e){var t,n,i,a;return r.__awaiter(this,void 0,void 0,(function*(){switch(e.data.dataType){case"RARIBLE_V2_DATA_V1":case"RARIBLE_V2_DATA_V2":return e.data.originFees.map((e=>e.value)).reduce(((e,t)=>e+t),0)+(yield this.getBaseOrderFee());case"RARIBLE_V2_DATA_V3_BUY":case"RARIBLE_V2_DATA_V3_SELL":return(null!==(n=null===(t=e.data.originFeeFirst)||void 0===t?void 0:t.value)&&void 0!==n?n:0)+(null!==(a=null===(i=e.data.originFeeSecond)||void 0===i?void 0:i.value)&&void 0!==a?a:0)+(yield this.getBaseOrderFee());default:throw new Error("Unsupported order dataType")}}))}getBaseOrderFee(){return r.__awaiter(this,void 0,void 0,(function*(){return this.getBaseOrderFeeConfig("RARIBLE_V2")}))}}},1107:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.X2Y2OrderHandler=void 0;const r=n(11),i=n(20),a=n(415),o=n(416),s=n(2105),d=n(332);t.X2Y2OrderHandler=class{constructor(e,t,n,r,i){this.ethereum=e,this.send=t,this.getConfig=n,this.getBaseOrderFeeConfig=r,this.getApis=i}fillOrder(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.getTransactionData(t);return this.send(e.functionCall,e.options)}))}getTransactionData(e){var t;return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const n=yield this.getConfig(),r=(0,a.createExchangeWrapperContract)(this.ethereum,n.exchange.wrapper);if(!(null===(t=e.order.data)||void 0===t?void 0:t.orderId))throw new Error("No x2y2 orderId provided");if(e.originFees&&e.originFees.length>1)throw new Error("x2y2 supports max up to 2 origin fee value");const{totalFeeBasisPoints:o,encodedFeesValue:s,feeAddresses:c}=(0,d.originFeeValueConvert)(e.originFees),u=(0,d.calcValueWithFees)((0,i.toBigNumber)(e.order.take.value),o),l=yield this.getWrapperData(e,s,u.toString());return{functionCall:r.functionCall("singlePurchase",l.data,c[0],c[1]),options:l.options}}))}getTransactionDataForExchangeWrapper(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const{totalFeeBasisPoints:r}=(0,d.originFeeValueConvert)(t),a=(0,d.calcValueWithFees)((0,i.toBigNumber)(e.order.take.value),r);return this.getWrapperData(e,n,a.toString())}))}getWrapperData(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const r=yield this.getConfig(),a=yield this.getApis(),d=yield s.X2Y2Utils.getOrderSign(a,{sender:r.exchange.wrapper,orderId:e.order.data.orderId,currency:i.ZERO_ADDRESS,price:e.order.take.value});return{data:{marketId:o.ExchangeWrapperOrderType.X2Y2,amount:e.order.take.value,fees:t,data:d},options:{value:n}}}))}getBaseOrderFee(){return this.getBaseOrderFeeConfig("X2Y2")}getOrderFee(){return 0}}},1108:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeLooksRareData=t.LooksrareOrderHandler=void 0;const r=n(11),i=n(147),a=n(20),o=n(294),s=n(270),d=n(645),c=n(415),u=n(130),l=n(372),p=n(416),y=n(332),m=n(831);function f(e,t,n,r){const i=e.encodeParameter(h,{makerOrder:t,takerOrder:n,typeNft:r});return"0x".concat(i.slice(66))}t.LooksrareOrderHandler=class{constructor(e,t,n,r,i,a,o){this.ethereum=e,this.send=t,this.getConfig=n,this.getBaseOrderFeeConfig=r,this.env=i,this.getApis=a,this.sdkConfig=o}convertMakerOrderToLooksrare(e,t){const{take:n,make:r}=e;if((0,i.toBn)(t).gt(r.value))throw new Error("Amount should be less or equal to ".concat(r.value.toString()));let o,s,c,u;if(!(0,l.isNft)(r.assetType))throw new Error("Only sell orders are supported. Make=".concat(r.assetType.assetClass," is not NFT"));if(o=!0,s=r.assetType.contract,c=r.assetType.tokenId.toString(),"ETH"===n.assetType.assetClass)u=a.ZERO_ADDRESS;else{if("ERC20"!==n.assetType.assetClass)throw new Error("Take asset should be ETH or ERC-20 contract");u=n.assetType.contract}if(!e.signature)throw new Error("Signature is null");const p=(0,d.toVrs)(e.signature||"0x");return Object.assign({isOrderAsk:o,signer:e.maker,collection:s,price:n.value,tokenId:c,amount:t,strategy:e.data.strategy,currency:u,nonce:e.data.nonce,startTime:e.start||0,endTime:e.end||0,minPercentageToAsk:e.data.minPercentageToAsk,params:e.data.params||"0x"},p)}getFulfillWrapperData(e,t,n){return f((0,s.getRequiredWallet)(this.ethereum),e,t,(0,u.id32)(n).substring(0,10))}prepareTransactionData(e,t,n){var a;return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");if(e.originFees&&e.originFees.length>2)throw new Error("Origin fees recipients shouldn't be greater than 2");const r=this.convertMakerOrderToLooksrare(e.order,e.amount),s=yield this.getConfig();r.currency=s.weth;const d={isOrderAsk:!1,taker:s.exchange.wrapper,price:r.price,tokenId:r.tokenId,minPercentageToAsk:r.minPercentageToAsk,params:r.params},c=this.getFulfillWrapperData(r,d,e.order.make.assetType.assetClass),{totalFeeBasisPoints:u,encodedFeesValue:l,feeAddresses:f}=(0,y.originFeeValueConvert)(t);let h=(0,y.calcValueWithFees)((0,o.toBigNumber)(r.price.toString()),u);const b=null!==n&&void 0!==n?n:l,T={marketId:p.ExchangeWrapperOrderType.LOOKSRARE_ORDERS,amount:r.price.toString(),fees:b,data:c};if(e.addRoyalty){const t=yield this.getApis(),o=(yield t.nftItem.getNftItemRoyaltyById({itemId:"".concat(r.collection,":").concat(r.tokenId)})).royalty;if(null===o||void 0===o?void 0:o.length){T.data=(0,m.encodeDataWithRoyalties)({royalties:o,data:c,provider:this.ethereum});const t=(0,m.getRoyaltiesAmount)(o,null!==(a=r.price.toString())&&void 0!==a?a:0);h=(0,i.toBn)(h.plus(t).toString()),T.fees=(0,m.addFeeDependsOnExternalFee)(e.originFees,n)}}return{requestData:{data:T,options:{value:h.toString()}},feeAddresses:f}}))}getTransactionDataForExchangeWrapper(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.prepareTransactionData(e,t,n)).requestData}))}getTransactionData(e){return r.__awaiter(this,void 0,void 0,(function*(){const{requestData:t,feeAddresses:n}=yield this.prepareTransactionData(e,e.originFees,void 0),r=(0,s.getRequiredWallet)(this.ethereum),i=yield this.getConfig();return{functionCall:(0,c.createExchangeWrapperContract)(r,i.exchange.wrapper).functionCall("singlePurchase",t.data,n[0],n[1]),options:{value:t.options.value.toString()}}}))}getBaseOrderFee(){return this.getBaseOrderFeeConfig("LOOKSRARE")}getOrderFee(){return 0}},t.encodeLooksRareData=f;const h={components:[{components:[{name:"isOrderAsk",type:"bool"},{name:"taker",type:"address"},{name:"price",type:"uint256"},{name:"tokenId",type:"uint256"},{name:"minPercentageToAsk",type:"uint256"},{name:"params",type:"bytes"}],name:"takerOrder",type:"tuple"},{components:[{name:"isOrderAsk",type:"bool"},{name:"signer",type:"address"},{name:"collection",type:"address"},{name:"price",type:"uint256"},{name:"tokenId",type:"uint256"},{name:"amount",type:"uint256"},{name:"strategy",type:"address"},{name:"currency",type:"address"},{name:"nonce",type:"uint256"},{name:"startTime",type:"uint256"},{name:"endTime",type:"uint256"},{name:"minPercentageToAsk",type:"uint256"},{name:"params",type:"bytes"},{name:"v",type:"uint8"},{name:"r",type:"bytes32"},{name:"s",type:"bytes32"}],name:"makerOrder",type:"tuple"},{name:"typeNft",type:"bytes4"}],name:"data",type:"tuple"}},1109:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AmmOrderHandler=void 0;const r=n(11),i=n(270),a=n(415),o=n(416),s=n(2106),d=n(831);t.AmmOrderHandler=class{constructor(e,t,n,r,i,a,o){let s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{directBuy:!1};this.ethereum=e,this.send=t,this.getConfig=n,this.getBaseOrderFeeConfig=r,this.getApis=i,this.env=a,this.sdkConfig=o,this.options=s}getTransactionData(e){var t;return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,i.getRequiredWallet)(this.ethereum),r=yield this.getTransactionDataDirectBuy(e),s=yield this.getConfig();if(this.options.directBuy){if(null===(t=e.originFees)||void 0===t?void 0:t.length)throw new Error("Origin fees not supported for sudoswap direct buy");return{functionCall:r.functionCall,options:r.options}}{const t=(0,a.createExchangeWrapperContract)(n,s.exchange.wrapper),i=yield this.getApis(),{data:c,options:u,originFees:{feeAddresses:l}}=yield(0,d.getMarketData)(this.ethereum,i,{marketId:o.ExchangeWrapperOrderType.AAM,request:e,fillData:{data:yield r.functionCall.getData(),options:r.options}});return{functionCall:t.functionCall("singlePurchase",c,l[0],l[1]),options:u}}}))}getTransactionDataDirectBuy(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,i.getRequiredWallet)(this.ethereum),n=yield this.getConfig();let r;if("SUDOSWAP_AMM_DATA_V1"!==e.order.data.dataType)throw new Error("Unsupported order data type "+e.order.data.dataType);return r=yield s.SudoswapFill.getDirectFillData(t,e,n),{functionCall:r.functionCall,options:r.options}}))}getTransactionDataForExchangeWrapper(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if("ETH"!==e.order.take.assetType.assetClass)throw new Error("Unsupported asset type for take asset "+e.order.take.assetType.assetClass);const n=yield this.getApis(),r=yield this.getTransactionDataDirectBuy(e),{data:i,options:a}=yield(0,d.getMarketData)(this.ethereum,n,{marketId:o.ExchangeWrapperOrderType.AAM,request:e,fillData:{data:yield r.functionCall.getData(),options:r.options},feeValue:t});return{data:i,options:a}}))}getBaseOrderFee(){return this.getBaseOrderFeeConfig("AMM")}getOrderFee(){return 0}}},1110:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrderValidatorCode=t.getTakerParamsTypes=t.CollectionType=t.StrategyType=t.QuoteType=t.LooksrareV2OrderHandler=void 0;const r=n(11),i=n(20),a=n(294),o=n(147),s=n(816),d=n(1105),c=n(270),u=n(415),l=n(372),p=n(2109),y=n(416),m=n(332),f=n(831);var h,b,T;t.LooksrareV2OrderHandler=class{constructor(e,t,n,r,i,a){this.ethereum=e,this.send=t,this.getConfig=n,this.getBaseOrderFeeConfig=r,this.env=i,this.getApis=a}convertMakerOrderToLooksrare(e,t){const{take:n,make:r}=e;if((0,o.toBn)(t).gt(r.value))throw new Error("Amount should be less or equal to ".concat(r.value.toString()));let a,s,d;if(!(0,l.isNft)(r.assetType))throw new Error("Only sell orders are supported. Make=".concat(r.assetType.assetClass," is not NFT"));if(a=r.assetType.contract,s=r.assetType.tokenId.toString(),"ETH"===n.assetType.assetClass)d=i.ZERO_ADDRESS;else{if("ERC20"!==n.assetType.assetClass)throw new Error("Take asset should be ETH or ERC-20 contract");d=n.assetType.contract}if(!e.signature)throw new Error("Signature is null");return{quoteType:v(e.data.quoteType),globalNonce:e.data.globalNonce,subsetNonce:e.data.subsetNonce,orderNonce:e.data.orderNonce,collection:a,currency:d,signer:e.maker,strategyId:e.data.strategyId,collectionType:g(e.make.assetType),startTime:e.start||0,endTime:e.end||0,price:n.value,additionalParameters:e.data.additionalParameters,amounts:[t.toString()],itemIds:[s]}}prepareTransaction(e,t){var n;return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,c.getRequiredWallet)(this.ethereum),a=yield this.getConfig();if(!a.exchange.looksrareV2)throw new Error("Looksrare V2 contract does not exist");if(t&&t.length>1)throw new Error("Origin fees recipients shouldn't be greater than 1");const o=(0,d.createLooksrareV2Exchange)(r,a.exchange.looksrareV2),s=this.convertMakerOrderToLooksrare(e.order,e.amount),u=s.quoteType===h.Ask?"executeTakerBid":"executeTakerAsk";if(!a.looksrareOrderValidatorV2)throw new Error("Looksrare order validator V2 does not exist");const l=(0,p.createLooksrareV2Validator)(r,a.looksrareOrderValidatorV2),y=e.order.data.merkleRoot?{root:e.order.data.merkleRoot,proof:e.order.data.merkleProof}:{root:"0x0000000000000000000000000000000000000000000000000000000000000000",proof:[]},m=(yield l.functionCall("checkMakerOrderValidity",s,e.order.signature,y).call()).filter((e=>!!+e)).map((e=>E[+e]));if(m.length)throw new Error("Order validation errors: ".concat(m.join(", ")));return{functionCall:o.functionCall(u,{recipient:yield r.getFrom(),additionalParameters:"0x"},s,e.order.signature,y,(null===t||void 0===t?void 0:t.length)&&t[0]?null===(n=t[0])||void 0===n?void 0:n.account:i.ZERO_ADDRESS),rawOrder:s}}))}getTransactionDataForExchangeWrapper(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.prepareTransactionData(e,t,n)).requestData}))}getTransactionData(e){return r.__awaiter(this,void 0,void 0,(function*(){const{requestData:t,feeAddresses:n}=yield this.prepareTransactionData(e,e.originFees,void 0),r=(0,c.getRequiredWallet)(this.ethereum),i=yield this.getConfig();return{functionCall:(0,u.createExchangeWrapperContract)(r,i.exchange.wrapper).functionCall("singlePurchase",t.data,n[0],n[1]),options:{value:t.options.value.toString()}}}))}prepareTransactionData(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const{functionCall:r,rawOrder:i}=yield this.prepareTransaction(e,t),s=i.price.toString(),{totalFeeBasisPoints:d,encodedFeesValue:u,feeAddresses:l}=(0,m.originFeeValueConvert)(t);let p=(0,m.calcValueWithFees)((0,a.toBigNumber)(s),d);const h=null!==n&&void 0!==n?n:u,b={marketId:y.ExchangeWrapperOrderType.LOOKSRARE_V2_ORDERS,amount:s,fees:h,data:yield r.getData()};if(e.addRoyalty){let t=[];for(const e of i.itemIds){const n=yield this.getApis(),r=(yield n.nftItem.getNftItemRoyaltyById({itemId:"".concat(i.collection,":").concat(e)})).royalty;(null===r||void 0===r?void 0:r.length)&&(t=t.concat(r))}if(null===t||void 0===t?void 0:t.length){b.data=(0,f.encodeDataWithRoyalties)({royalties:t,data:yield r.getData(),provider:(0,c.getRequiredWallet)(this.ethereum)});const i=(0,f.getRoyaltiesAmount)(t,null!==s&&void 0!==s?s:0);p=(0,o.toBn)(p.plus(i).toString()),b.fees=(0,f.addFeeDependsOnExternalFee)(e.originFees,n)}}return{requestData:{data:b,options:{value:p.toString()}},feeAddresses:l}}))}getBaseOrderFee(){return this.getBaseOrderFeeConfig("LOOKSRARE")}},function(e){e[e.Bid=0]="Bid",e[e.Ask=1]="Ask"}(h=t.QuoteType||(t.QuoteType={})),function(e){e[e.standard=0]="standard",e[e.collection=1]="collection",e[e.collectionWithMerkleTree=2]="collectionWithMerkleTree"}(b=t.StrategyType||(t.StrategyType={})),function(e){e[e.ERC721=0]="ERC721",e[e.ERC1155=1]="ERC1155"}(T=t.CollectionType||(t.CollectionType={}));function v(e){if(e===s.OrderLooksRareDataV2QuoteType.BID)return h.Bid;if(e===s.OrderLooksRareDataV2QuoteType.ASK)return h.Ask;throw new Error("Unexpected QuoteType=".concat(e))}function g(e){if("ERC721"===e.assetClass)return T.ERC721;if("ERC1155"===e.assetClass)return T.ERC1155;throw new Error("Wrong collection type: ".concat(e.assetClass,", expected ERC721 or ERC1155"))}var E;t.getTakerParamsTypes=e=>e===b.standard?[]:e===b.collection?["uint256"]:e===b.collectionWithMerkleTree?["uint256","bytes32[]"]:[],function(e){e[e.ORDER_EXPECTED_TO_BE_VALID=0]="ORDER_EXPECTED_TO_BE_VALID",e[e.CURRENCY_NOT_ALLOWED=101]="CURRENCY_NOT_ALLOWED",e[e.STRATEGY_NOT_IMPLEMENTED=111]="STRATEGY_NOT_IMPLEMENTED",e[e.STRATEGY_INVALID_QUOTE_TYPE=112]="STRATEGY_INVALID_QUOTE_TYPE",e[e.STRATEGY_NOT_ACTIVE=113]="STRATEGY_NOT_ACTIVE",e[e.MAKER_ORDER_INVALID_STANDARD_SALE=201]="MAKER_ORDER_INVALID_STANDARD_SALE",e[e.MAKER_ORDER_PERMANENTLY_INVALID_NON_STANDARD_SALE=211]="MAKER_ORDER_PERMANENTLY_INVALID_NON_STANDARD_SALE",e[e.MAKER_ORDER_INVALID_CURRENCY_NON_STANDARD_SALE=212]="MAKER_ORDER_INVALID_CURRENCY_NON_STANDARD_SALE",e[e.MAKER_ORDER_TEMPORARILY_INVALID_NON_STANDARD_SALE=213]="MAKER_ORDER_TEMPORARILY_INVALID_NON_STANDARD_SALE",e[e.USER_SUBSET_NONCE_CANCELLED=301]="USER_SUBSET_NONCE_CANCELLED",e[e.USER_ORDER_NONCE_EXECUTED_OR_CANCELLED=311]="USER_ORDER_NONCE_EXECUTED_OR_CANCELLED",e[e.USER_ORDER_NONCE_IN_EXECUTION_WITH_OTHER_HASH=312]="USER_ORDER_NONCE_IN_EXECUTION_WITH_OTHER_HASH",e[e.INVALID_USER_GLOBAL_BID_NONCE=321]="INVALID_USER_GLOBAL_BID_NONCE",e[e.INVALID_USER_GLOBAL_ASK_NONCE=322]="INVALID_USER_GLOBAL_ASK_NONCE",e[e.ORDER_HASH_PROOF_NOT_IN_MERKLE_TREE=401]="ORDER_HASH_PROOF_NOT_IN_MERKLE_TREE",e[e.MERKLE_PROOF_PROOF_TOO_LARGE=402]="MERKLE_PROOF_PROOF_TOO_LARGE",e[e.INVALID_SIGNATURE_LENGTH=411]="INVALID_SIGNATURE_LENGTH",e[e.INVALID_S_PARAMETER_EOA=412]="INVALID_S_PARAMETER_EOA",e[e.INVALID_V_PARAMETER_EOA=413]="INVALID_V_PARAMETER_EOA",e[e.NULL_SIGNER_EOA=414]="NULL_SIGNER_EOA",e[e.INVALID_SIGNER_EOA=415]="INVALID_SIGNER_EOA",e[e.MISSING_IS_VALID_SIGNATURE_FUNCTION_EIP1271=421]="MISSING_IS_VALID_SIGNATURE_FUNCTION_EIP1271",e[e.SIGNATURE_INVALID_EIP1271=422]="SIGNATURE_INVALID_EIP1271",e[e.START_TIME_GREATER_THAN_END_TIME=501]="START_TIME_GREATER_THAN_END_TIME",e[e.TOO_LATE_TO_EXECUTE_ORDER=502]="TOO_LATE_TO_EXECUTE_ORDER",e[e.TOO_EARLY_TO_EXECUTE_ORDER=503]="TOO_EARLY_TO_EXECUTE_ORDER",e[e.SAME_ITEM_ID_IN_BUNDLE=601]="SAME_ITEM_ID_IN_BUNDLE",e[e.ERC20_BALANCE_INFERIOR_TO_PRICE=611]="ERC20_BALANCE_INFERIOR_TO_PRICE",e[e.ERC20_APPROVAL_INFERIOR_TO_PRICE=612]="ERC20_APPROVAL_INFERIOR_TO_PRICE",e[e.ERC721_ITEM_ID_DOES_NOT_EXIST=621]="ERC721_ITEM_ID_DOES_NOT_EXIST",e[e.ERC721_ITEM_ID_NOT_IN_BALANCE=622]="ERC721_ITEM_ID_NOT_IN_BALANCE",e[e.ERC721_NO_APPROVAL_FOR_ALL_OR_ITEM_ID=623]="ERC721_NO_APPROVAL_FOR_ALL_OR_ITEM_ID",e[e.ERC1155_BALANCE_OF_DOES_NOT_EXIST=631]="ERC1155_BALANCE_OF_DOES_NOT_EXIST",e[e.ERC1155_BALANCE_OF_ITEM_ID_INFERIOR_TO_AMOUNT=632]="ERC1155_BALANCE_OF_ITEM_ID_INFERIOR_TO_AMOUNT",e[e.ERC1155_IS_APPROVED_FOR_ALL_DOES_NOT_EXIST=633]="ERC1155_IS_APPROVED_FOR_ALL_DOES_NOT_EXIST",e[e.ERC1155_NO_APPROVAL_FOR_ALL=634]="ERC1155_NO_APPROVAL_FOR_ALL",e[e.POTENTIAL_INVALID_COLLECTION_TYPE_SHOULD_BE_ERC721=701]="POTENTIAL_INVALID_COLLECTION_TYPE_SHOULD_BE_ERC721",e[e.POTENTIAL_INVALID_COLLECTION_TYPE_SHOULD_BE_ERC1155=702]="POTENTIAL_INVALID_COLLECTION_TYPE_SHOULD_BE_ERC1155",e[e.NO_TRANSFER_MANAGER_APPROVAL_BY_USER_FOR_EXCHANGE=801]="NO_TRANSFER_MANAGER_APPROVAL_BY_USER_FOR_EXCHANGE",e[e.TRANSFER_MANAGER_APPROVAL_REVOKED_BY_OWNER_FOR_EXCHANGE=802]="TRANSFER_MANAGER_APPROVAL_REVOKED_BY_OWNER_FOR_EXCHANGE",e[e.BUNDLE_ERC2981_NOT_SUPPORTED=901]="BUNDLE_ERC2981_NOT_SUPPORTED",e[e.CREATOR_FEE_TOO_HIGH=902]="CREATOR_FEE_TOO_HIGH"}(E=t.OrderValidatorCode||(t.OrderValidatorCode={}))},1111:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDecimals=void 0;const r=n(11),i=n(471);t.getDecimals=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){switch(t.assetClass){case"ETH":return 18;case"ERC20":const n=yield(0,i.createErc20Contract)(e,t.contract).functionCall("decimals").call();return Number(n);default:throw new Error("Asset type should be either ETH or ERC-20, received=".concat(JSON.stringify(t)))}}))}},1112:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePartValue=t.validateParts=void 0;const r=n(20);function i(e){if(isNaN(e)||e>1e4||e<0)throw new Error("Part value should be valid and in range 0-10000");return e}t.validateParts=function(e){return(null===e||void 0===e?void 0:e.map((e=>({account:(0,r.toAddress)(e.account),value:i(e.value)}))))||[]},t.validatePartValue=i},1116:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedBlockchainError=t.UnsupportedCollectionError=t.LazyMintIsNotSupportedError=t.getCollection=t.EthereumMint=void 0;const r=n(11),i=n(99),a=r.__importStar(n(586)),o=n(586),s=n(558),d=n(1017),c=n(1081),u=n(20),l=n(373),p=n(147),y=n(122),m=n(29),f=n(123),h=n(552),b=n(2150),T=n(235),v=n(235);function g(e,t){return r.__awaiter(this,void 0,void 0,(function*(){return"collection"in t?t.collection:e.getCollectionById({collection:t.collectionId})}))}function E(e){switch(e){case void 0:return;case d.CollectionStatus.ERROR:return c.NftCollectionStatus.ERROR;case d.CollectionStatus.PENDING:return c.NftCollectionStatus.PENDING;case d.CollectionStatus.CONFIRMED:return c.NftCollectionStatus.CONFIRMED;default:throw new Error("Unknown Collection Status (".concat(e,")"))}}t.EthereumMint=class{constructor(e,t,n){this.sdk=e,this.wallet=t,this.apis=n,this.prepare=this.prepare.bind(this),this.mintBasic=this.mintBasic.bind(this)}handleSubmit(e,t,n,r){var i,o;if(t.lazyMint&&!this.isSupportsLazyMint(e,n))throw new O(n.type);const s=null!==(i=t.lazyMint)&&void 0!==i&&i,d=null!==(o=t.supply)&&void 0!==o?o:1;if(a.isErc721v3Collection(n))return this.sdk.nft.mint({collection:n,uri:t.uri,lazy:s,royalties:this.toPart(t.royalties),creators:this.toPart(t.creators),nftTokenId:r});if(a.isErc721v2Collection(n))return this.sdk.nft.mint({collection:n,uri:t.uri,royalties:this.toPart(t.royalties),nftTokenId:r});if(a.isErc721v1Collection(n))return this.sdk.nft.mint({collection:n,uri:t.uri,nftTokenId:r});if(a.isErc1155v2Collection(n))return this.sdk.nft.mint({collection:n,uri:t.uri,supply:d,lazy:s,royalties:this.toPart(t.royalties),creators:this.toPart(t.creators),nftTokenId:r});if(a.isErc1155v1Collection(n))return this.sdk.nft.mint({collection:n,uri:t.uri,supply:d,royalties:this.toPart(t.royalties),nftTokenId:r});throw new Error("Unsupported NFT Collection")}toPart(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((e=>({account:(0,v.convertToEthereumAddress)(e.account),value:(0,p.toBn)(e.value).toNumber()})))}isSupportsRoyalties(e){switch(e.type){case l.NftCollectionType.ERC721:return(0,o.isErc721v3Collection)(e)||(0,o.isErc721v2Collection)(e);case l.NftCollectionType.ERC1155:return!0;default:throw new Error("Unrecognized collection type")}}isSupportsLazyMint(e,t){return e===m.Blockchain.ETHEREUM&&((0,o.isErc721v3Collection)(t)||(0,o.isErc1155v2Collection)(t))}prepare(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield g(this.apis.collection,e),n=function(e){var t,n;if(r=e.type,!_.includes(r))throw new A(e.type);var r;return Object.assign(Object.assign({},e),{status:E(e.status),id:(0,u.toAddress)((0,v.convertToEthereumAddress)(e.id)),type:l.NftCollectionType[e.type],owner:e.owner?(0,v.convertToEthereumAddress)(e.owner):void 0,features:null===(t=e.features)||void 0===t?void 0:t.reduce(((e,t)=>(t in l.NftCollectionFeatures&&e.push(l.NftCollectionFeatures[t]),e)),[]),minters:null===(n=e.minters)||void 0===n?void 0:n.map((e=>(0,v.convertToEthereumAddress)(e)))})}(t),a=(0,f.extractBlockchain)((0,b.getCollectionId)(e));return yield(0,T.checkWalletBlockchain)(this.wallet,a),{multiple:t.type===m.CollectionType.ERC1155,supportsRoyalties:this.isSupportsRoyalties(n),supportsLazyMint:this.isSupportsLazyMint(a,n),submit:i.Action.create({id:"mint",run:t=>r.__awaiter(this,void 0,void 0,(function*(){yield(0,T.checkWalletBlockchain)(this.wallet,a);const r=yield this.handleSubmit(a,t,n,function(e){if(e)return{tokenId:(0,u.toBigNumber)(e.tokenId),signature:e.signature};return}(e.tokenId));switch(r.type){case s.MintResponseTypeEnum.ON_CHAIN:return{type:h.MintType.ON_CHAIN,itemId:(0,v.convertEthereumItemId)(r.itemId,a),transaction:new y.BlockchainEthereumTransaction(r.transaction,yield(0,T.getWalletNetwork)(this.wallet))};case s.MintResponseTypeEnum.OFF_CHAIN:return{type:h.MintType.OFF_CHAIN,itemId:(0,v.convertEthereumItemId)(r.itemId,a)};default:throw new Error("Unrecognized mint response type")}}))})}}))}mintBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.prepare(e)).submit(e)}))}preprocessMeta(e){var t,n;if(!(0,T.isEVMBlockchain)(e.blockchain))throw new w(e.blockchain);return{name:e.name,description:e.description,image:null===(t=e.image)||void 0===t?void 0:t.url,animation_url:null===(n=e.animation)||void 0===n?void 0:n.url,external_url:e.external,attributes:e.attributes}}},t.getCollection=g;const _=[m.CollectionType.ERC721,m.CollectionType.ERC1155];class O extends Error{constructor(e){super("Lazy minting is not supported for ".concat(e)),this.name="LazyMintIsNotSupportedError",Object.setPrototypeOf(this,O.prototype)}}t.LazyMintIsNotSupportedError=O;class A extends Error{constructor(e){super('Collection with type "'.concat(e,'" not supported')),this.name="UnsupportedCollectionError",Object.setPrototypeOf(this,A.prototype)}}t.UnsupportedCollectionError=A;class w extends Error{constructor(e){super("".concat(e," is not supported")),this.name="UnsupportedBlockchainError",Object.setPrototypeOf(this,w.prototype)}}t.UnsupportedBlockchainError=w},1117:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkRoyalties=void 0;const r=n(11);t.checkRoyalties=(e,t)=>r.__awaiter(void 0,void 0,void 0,(function*(){const{royalties:n}=yield t.item.getItemRoyaltiesById({itemId:e});if(n.reduce(((e,t)=>{let{value:n}=t;return e+n}),0)>5e3)throw new Error("Cannot create order for item with royalties more than 50%")}))},1135:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSdkContext=void 0;const r=n(11),i=n(836),a=n(2237);t.getSdkContext=function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=Object.assign({service:i.loggerConfig.service,environment:e.env,sessionId:e.sessionId,"@version":a.version},e.wallet?yield(0,i.getWalletInfo)(e.wallet):{});return void 0!==e.providerId&&(t.providerId=e.providerId),void 0!==e.providerMeta&&(t.providerMeta=JSON.stringify(e.providerMeta)),void 0!==e.apiKey&&(t.apiKey=e.apiKey),t}))}},1136:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaSdk=void 0;const r=n(11),i=n(18),a=n(2251),o=n(1139),s=n(2253),d=n(2254),c=n(2308),u=n(2354),l=n(2356),p=n(2359);class y{constructor(e,t,n){this.connection=e,this.cluster=t,this.logging=n,this.debugLogger=new a.DebugLogger(n.debug),this.account=new p.SolanaAccountSdk(e,this.debugLogger),this.balances=new s.SolanaBalancesSdk(e,this.debugLogger),this.nft=new d.SolanaNftSdk(e,this.debugLogger,this.account),this.order=new c.SolanaOrderSdk(e,this.debugLogger),this.collection=new u.SolanaCollectionSdk(e,this.debugLogger),this.auctionHouse=new l.SolanaAuctionHouseSdk(e,this.debugLogger)}confirmTransaction(){return this.connection.confirmTransaction(...arguments)}unionInstructionsAndSend(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield(0,o.sendTransactionWithRetry)(this.connection,e,t.reduce(((e,t)=>(e.push(...t.data.instructions),e)),[]),t.reduce(((e,t)=>(e.push(...t.data.signers),e)),[]),n,this.debugLogger);return t.forEach((e=>{var t;null===(t=e.onSubmit)||void 0===t||t.call(e,r)})),r}))}static create(e){var t,n;const r=new i.Connection(null!==(t=e.connection.endpoint)&&void 0!==t?t:(0,i.clusterApiUrl)(e.connection.cluster),null!==(n=e.connection.commitmentOrConfig)&&void 0!==n?n:"confirmed");return new y(r,e.connection.cluster,{debug:!!e.debug})}}t.SolanaSdk=y},1139:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendSignedTransaction=t.sendTransactionWithRetry=t.DEFAULT_TIMEOUT=void 0;const r=n(11),i=n(18),a=n(656);function o(e,n){let{signedTransaction:i,connection:o,timeout:s=t.DEFAULT_TIMEOUT}=e;return r.__awaiter(this,void 0,void 0,(function*(){const e=i.serialize(),t=(0,a.getUnixTs)();let d=0;const c=yield o.sendRawTransaction(e,{skipPreflight:!0});null===n||void 0===n||n.log("Started awaiting confirmation for",c);let u=!1;(()=>{r.__awaiter(this,void 0,void 0,(function*(){for(;!u&&(0,a.getUnixTs)()-t3&&void 0!==arguments[3]?arguments[3]:"recent",o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5?arguments[5]:void 0;return r.__awaiter(this,void 0,void 0,(function*(){let d=!1,c={slot:0,confirmations:0,err:null},u=0;return c=yield new Promise(((l,p)=>r.__awaiter(this,void 0,void 0,(function*(){setTimeout((()=>{d||(d=!0,null===s||void 0===s||s.log("Rejecting for timeout..."),p({timeout:!0}))}),t);try{u=n.onSignature(e,((e,t)=>{d=!0,c={err:e.err,slot:t.slot,confirmations:0},e.err?(null===s||void 0===s||s.log("Rejected via websocket",e.err),p(c)):(null===s||void 0===s||s.log("Resolved via websocket",e),l(c))}),i)}catch(y){d=!0,null===s||void 0===s||s.error("WS error in setup",e,y)}for(;!d&&o;)(()=>{r.__awaiter(this,void 0,void 0,(function*(){try{const t=yield n.getSignatureStatuses([e]);c=t&&t.value[0],d||(c?c.err?(null===s||void 0===s||s.error("REST error for",e,c),d=!0,p(c.err)):c.confirmations?(null===s||void 0===s||s.log("REST confirmation for",e,c),d=!0,l(c)):null===s||void 0===s||s.log("REST no confirmations for",e,c):null===s||void 0===s||s.log("REST null result for",e,c))}catch(y){d||null===s||void 0===s||s.error("REST connection error: txid",e,y)}}))})(),yield(0,a.sleep)(2e3)})))),n._signatureSubscriptions[u]&&n.removeSignatureListener(u),d=!0,null===s||void 0===s||s.log("Returning status",c),c}))}(c,s,o,"processed",!0,n);if(!e)throw new Error("Timed out awaiting confirmation on transaction");if(e.err)throw null===n||void 0===n||n.error(e.err),new Error("Transaction failed: Custom instruction error");d=(null===e||void 0===e?void 0:e.slot)||0}catch(l){if(null===n||void 0===n||n.error("Timeout Error caught",l),l.timeout)throw new Error("Timed out awaiting confirmation on transaction");let e=null;try{e=(yield function(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){t.recentBlockhash=yield e._recentBlockhash(e._disableBlockhashCaching);const r=t.serializeMessage(),a=[t._serialize(r).toString("base64"),{encoding:"base64",commitment:n}],o=yield e._rpcRequest("simulateTransaction",a,i);if(o.error)throw new Error("failed to simulate transaction: "+o.error.message);return o.result}))}(o,i,"single",n)).value}catch(p){null===n||void 0===n||n.error("Simulate Transaction error",p)}if(e&&e.err){if(e.logs)for(let t=e.logs.length-1;t>=0;--t){const r=e.logs[t];if(r.startsWith("Program log: "))throw null===n||void 0===n||n.log(e.logs),new Error("Transaction failed: "+r.slice(13))}throw new Error(JSON.stringify(e.err))}null===n||void 0===n||n.error("Got this far.")}finally{u=!0}return null===n||void 0===n||n.log("Latency (ms)",c,(0,a.getUnixTs)()-t),{txId:c,slot:d}}))}t.DEFAULT_TIMEOUT=6e4,t.sendTransactionWithRetry=function(e,t,n,a,s,d){return r.__awaiter(this,void 0,void 0,(function*(){const r=new i.Transaction({feePayer:t.publicKey});if(n.forEach((e=>r.add(e))),r.recentBlockhash=(yield e.getLatestBlockhash(s)).blockhash,a.length>0){yield t.signTransaction(r);for(let e of a)yield e.signTransaction(r)}else yield t.signTransaction(r);return yield o({connection:e,signedTransaction:r},d)}))},t.sendSignedTransaction=o},1164:function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=1164},1203:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransferResponse=void 0,t.getTransferResponse=function(e){switch(e.status){case"success":return{status:e.status,txId:e.txId};case"error":throw new Error(e.message);default:throw new Error("Should never happen")}}},1204:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBalance=void 0;const r=n(11),i=n(101);t.getBalance=function(e,t,n,a){return r.__awaiter(this,void 0,void 0,(function*(){const{result:e}=yield t.balance.getAllBalances({ownerAddress:n});if("ETH"===a.assetClass){const t=e.find((e=>""===e.token_address));if(t)return(0,i.toBn)(t.balance.toString()).dividedBy(Math.pow(10,18))}else if("ERC20"===a.assetClass){const t=e.find((e=>{var t;return(null===(t=e.token_address)||void 0===t?void 0:t.toLowerCase())===a.contract.toLowerCase()}));if(t)return(0,i.toBn)(t.balance.toString()).dividedBy(Math.pow(10,18))}return(0,i.toBn)("0")}))}},1205:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IMX_ENV_CONFIG=t.IMX_CONFIG=void 0;const r=n(1206);t.IMX_CONFIG={mainnet:{apiAddressV1:"https://api.x.immutable.com/v1",apiAddressV2:"https://api.x.immutable.com/v2"},goerli:{apiAddressV1:"https://api.sandbox.x.immutable.com/v1",apiAddressV2:"https://api.sandbox.x.immutable.com/v2"}},t.IMX_ENV_CONFIG={testnet:Object.assign(Object.assign({},r.IMX_NETWORK_CONFIG.goerli),t.IMX_CONFIG.goerli),prod:Object.assign(Object.assign({},r.IMX_NETWORK_CONFIG.mainnet),t.IMX_CONFIG.mainnet)}},1206:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IMX_ENV_CONFIG=t.IMX_NETWORK_CONFIG=t.ImxWallet=void 0;const r=n(11),i=n(845),a=n(2486),o=n(2487);Object.defineProperty(t,"IMX_ENV_CONFIG",{enumerable:!0,get:function(){return o.IMX_ENV_CONFIG}}),Object.defineProperty(t,"IMX_NETWORK_CONFIG",{enumerable:!0,get:function(){return o.IMX_NETWORK_CONFIG}});var s;t.ImxWallet=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.ImxWalletProviderEnum.NONE,n=arguments.length>2?arguments[2]:void 0,d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:localStorage;this.env=e,this.provider=t,this.iframeOptions=n,this.storage=d,this.state=Object.keys(s).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:this.storage.getItem(t)||""})),{}),this.status=this.state[s.IMX_ADDRESS]?"connected":"disconnected",this.network=Object.assign(Object.assign({},o.IMX_ENV_CONFIG[this.env]),{env:this.env}),this.link=new i.Link(this.network.linkAddress,this.iframeOptions,"v3"),this.connect=()=>r.__awaiter(this,void 0,void 0,(function*(){try{const e=yield this.link.setup(this.getSetupOptions());if(e.address&&e.starkPublicKey)return this.status="connected",this.state={[s.IMX_ADDRESS]:e.address,[s.IMX_STARK_KEY]:e.starkPublicKey,[s.IMX_ETH_NETWORK]:e.ethNetwork,[s.IMX_PROVIDER]:e.providerPreference},this.setValue(s.IMX_ADDRESS,e.address),this.setValue(s.IMX_STARK_KEY,e.starkPublicKey),this.setValue(s.IMX_ETH_NETWORK,e.ethNetwork),this.setValue(s.IMX_PROVIDER,e.providerPreference),e;throw new Error("There is no address or starkAddress in response")}catch(e){throw console.error("Connection failed with reason",e),e}})),this.disconnect=()=>{Object.keys(s).forEach((e=>this.setValue(e,""))),this.status="disconnected"},this.getConnectionData=()=>({address:this.state[s.IMX_ADDRESS],starkPublicKey:this.state[s.IMX_STARK_KEY],ethNetwork:this.state[s.IMX_ETH_NETWORK],providerPreference:this.state[s.IMX_PROVIDER],link:this.link,status:this.status})}getSetupOptions(){return this.provider?{providerPreference:i.ProviderPreference[this.provider]}:{}}setValue(e,t){return this.state[e]=t,this.storage.setItem(e,t)}},function(e){e.IMX_STARK_KEY="IMX_STARK_KEY",e.IMX_ADDRESS="IMX_ADDRESS",e.IMX_PROVIDER="IMX_PROVIDER",e.IMX_ETH_NETWORK="IMX_ETH_NETWORK"}(s||(s={}))},1207:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calcBuyerBaseFee=t.getTakeAssetType=t.unionPartsToParts=t.convertToEthereumAddress=t.getPreparedOrder=void 0;const r=n(11),i=n(29),a=n(269),o=n(20),s=n(236);function d(e){if(!(0,a.isRealBlockchainSpecified)(e))throw new Error("Not a union or contract address: "+e);const[t,n]=e.split(":");if(t!==i.Blockchain.ETHEREUM&&t!==i.Blockchain.IMMUTABLEX)throw new Error("Not an Ethereum/Immutablex address");return(0,o.toAddress)(n)}t.getPreparedOrder=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if("order"in e)return e.order;if("orderId"in e)return t.order.getOrderById({id:e.orderId});throw new Error("Incorrect request")}))},t.convertToEthereumAddress=d,t.unionPartsToParts=function(e){return(null===e||void 0===e?void 0:e.map((e=>({account:d(e.account),value:e.value}))))||[]},t.getTakeAssetType=function(e){const t=(0,s.getCurrencyAssetType)(e);switch(t["@type"]){case"ERC20":return{assetClass:t["@type"],contract:d(t.contract)};case"ETH":return{assetClass:t["@type"]};default:throw new Error("Invalid take asset type")}},t.calcBuyerBaseFee=function(e){if("IMMUTABLEX_RARIBLE_V1"!==e.data["@type"])throw new Error('Unsupported order type "'.concat(e.data["@type"],'", expected "IMMUTABLEX_RARIBLE_V1"'));return(e.data.originFees||[]).reduce(((e,t)=>e+t.value),0)}},1208:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBlockchainGroup=void 0;const r=n(11),i=n(29);t.toBlockchainGroup=function(e){switch(e){case i.Blockchain.ETHEREUM:case i.Blockchain.POLYGON:return i.Blockchain.ETHEREUM;default:return e}},r.__exportStar(n(1018),t)},122:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(11);r.__exportStar(n(2144),t),r.__exportStar(n(2145),t),r.__exportStar(n(2146),t),r.__exportStar(n(2147),t),r.__exportStar(n(2148),t),r.__exportStar(n(2149),t)},1220:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=t.retry=void 0;var r=n(785);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return r.retry}}),Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return r.delay}})},1221:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFlowCurrencyFromAssetType=void 0;const r=n(237);t.getFlowCurrencyFromAssetType=function(e){if("FLOW_FT"===e["@type"])return(0,r.getFungibleTokenName)(e.contract);throw new Error("Invalid asset type")}},1222:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSimpleFlowFungibleBalance=void 0;const r=n(11),i=n(238),a=n(238),o=n(147),s=n(1221),d=n(237);t.getSimpleFlowFungibleBalance=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,d.parseFlowAddressFromUnionAddress)(t),c=(0,s.getFlowCurrencyFromAssetType)(n),u=yield(0,i.getFungibleBalanceSimple)({network:a.FLOW_ENV_CONFIG[e].network,address:r,currency:c});return(0,o.toBn)(u)}))}},1224:function(e,t){},123:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(11);r.__exportStar(n(1527),t),r.__exportStar(n(785),t),r.__exportStar(n(1020),t)},1245:function(e,t){},130:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.id32=t.id=void 0;const r=n(411),i=n(20);function a(t){return(0,i.toWord)("0x".concat((0,r.keccak256)(e.from(t)).toString("hex")))}t.id=function(e){return a(e).substring(0,10)},t.id32=a}).call(this,n(7).Buffer)},1313:function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=1313},137:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(11);r.__exportStar(n(1016),t),r.__exportStar(n(1526),t),r.__exportStar(n(547),t),r.__exportStar(n(1678),t),r.__exportStar(n(1680),t),r.__exportStar(n(1681),t),r.__exportStar(n(1682),t),r.__exportStar(n(1022),t)},1399:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(11);r.__exportStar(n(2618),t),r.__exportStar(n(2619),t)},1416:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NFIDConnectionProvider=void 0;const r=n(11),i=n(129),a=n(137),o=n(137),s=n(137),d=n(2692),c="NFID";class u extends s.AbstractConnectionProvider{constructor(e){super(),this.config=e,this.instance=(0,o.cache)((()=>this._connect())),this.connection=this.instance.pipe((0,i.mergeMap)((e=>(0,a.connectToWeb3)(e.provider,{disconnect:()=>e.disconnect()}))),(0,i.startWith)((0,s.getStateConnecting)({providerId:c})))}_connect(){return r.__awaiter(this,void 0,void 0,(function*(){return yield d.nfid.init(this.config),yield d.nfid.login(),d.nfid}))}getId(){return c}getConnection(){return this.connection}getOption(){return Promise.resolve(c)}isAutoConnected(){return r.__awaiter(this,void 0,void 0,(function*(){return!1}))}isConnected(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.instance.pipe((0,i.first)()).toPromise();return e.isIframeInstantiated&&e.isAuthenticated}))}}t.NFIDConnectionProvider=u},1417:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(11);r.__exportStar(n(2696),t),r.__exportStar(n(2697),t)},1422:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TorusConnectionProvider=void 0;const r=n(11),i=n(129),a=n(137),o="torus";class s extends a.AbstractConnectionProvider{constructor(e){super(),this.config=e,this.instance=(0,a.cache)((()=>this._connect())),this.connection=this.instance.pipe((0,i.mergeMap)((e=>(0,a.connectToWeb3)(e.provider,{disconnect:()=>e.cleanUp()}))),(0,i.startWith)((0,a.getStateConnecting)({providerId:o})))}_connect(){return r.__awaiter(this,void 0,void 0,(function*(){const{default:e}=yield Promise.resolve().then((()=>r.__importStar(n(2705)))),t=new e;return yield t.init(this.config),yield t.login(),t}))}getId(){return o}getConnection(){return this.connection}getOption(){return Promise.resolve(o)}isAutoConnected(){return r.__awaiter(this,void 0,void 0,(function*(){return!1}))}isConnected(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.instance.pipe((0,i.first)()).toPromise();return!(!(null===e||void 0===e?void 0:e.isInitialized)||!(null===e||void 0===e?void 0:e.isLoggedIn))}))}}t.TorusConnectionProvider=s},1428:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FirebaseConnectionProvider=void 0;const r=n(11),i=n(129),a=n(23),o=n(137),s=n(937),d=n(896),c=n(906),u=n(584),l=n(584),p=n(191),y="firebase";class m extends o.AbstractConnectionProvider{constructor(e,t,n,r,a,s){super(),this.clientId=e,this.chainConfig=t,this.firebaseConfig=n,this.network=r,this.openLoginDomain=a,this.jwtVerifier=s,this.instance=(0,o.cache)((()=>this._connect())),this.connection=this.instance.pipe((0,i.mergeMap)((e=>(0,o.connectToWeb3)(e.provider,{disconnect:()=>this.disconnect(e)}))),(0,i.startWith)((0,o.getStateConnecting)({providerId:y})))}_connect(){return r.__awaiter(this,void 0,void 0,(function*(){const e=new s.Web3AuthNoModal({clientId:this.clientId,web3AuthNetwork:this.network,chainConfig:this.chainConfig,useCoreKitKey:!1}),t=new d.EthereumPrivateKeyProvider({config:{chainConfig:this.chainConfig}}),n=new c.OpenloginAdapter({adapterSettings:{uxMode:"popup",loginConfig:{jwt:{verifier:this.jwtVerifier,typeOfLogin:"jwt",clientId:this.clientId}}},privateKeyProvider:t});if(e.configureAdapter(n),yield e.init(),e.connected)return e;const r=(0,p.initializeApp)(this.firebaseConfig),i=(0,l.getAuth)(r),o=new l.GoogleAuthProvider,y=yield(0,l.signInWithPopup)(i,o);try{const t=yield y.user.getIdToken(!0);return yield e.connectTo(a.WALLET_ADAPTERS.OPENLOGIN,{loginProvider:"jwt",mfaLevel:"none",extraLoginOptions:{id_token:t,verifierIdField:"sub",domain:this.openLoginDomain}}),e}catch(m){throw console.error("Error signing in with Firebase",m),r&&i&&(yield(0,u.signOut)(i)),e&&e.logout({cleanup:!0}),m}}))}getId(){return y}getConnection(){return this.connection}getOption(){return Promise.resolve(y)}isAutoConnected(){return r.__awaiter(this,void 0,void 0,(function*(){return!1}))}isConnected(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.instance.pipe((0,i.first)()).toPromise();return!!e&&e.connected}))}disconnect(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,p.initializeApp)(this.firebaseConfig),n=(0,l.getAuth)(t);t&&n&&(yield(0,u.signOut)(n)),e&&e.logout({cleanup:!0})}))}}t.FirebaseConnectionProvider=m},1438:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FirebaseAppleConnectionProvider=void 0;const r=n(11),i=n(129),a=n(23),o=n(137),s=n(937),d=n(896),c=n(906),u=n(584),l=n(584),p=n(191),y="firebase_apple";class m extends o.AbstractConnectionProvider{constructor(e,t,n,r,a,s){super(),this.clientId=e,this.chainConfig=t,this.firebaseConfig=n,this.network=r,this.openLoginDomain=a,this.jwtVerifier=s,this.instance=(0,o.cache)((()=>this._connect())),this.connection=this.instance.pipe((0,i.mergeMap)((e=>(0,o.connectToWeb3)(e.provider,{disconnect:()=>this.disconnect(e)}))),(0,i.startWith)((0,o.getStateConnecting)({providerId:y})))}_connect(){return r.__awaiter(this,void 0,void 0,(function*(){const e=new s.Web3AuthNoModal({clientId:this.clientId,web3AuthNetwork:this.network,chainConfig:this.chainConfig,useCoreKitKey:!1}),t=new d.EthereumPrivateKeyProvider({config:{chainConfig:this.chainConfig}}),n=new c.OpenloginAdapter({adapterSettings:{uxMode:"popup",loginConfig:{jwt:{verifier:this.jwtVerifier,typeOfLogin:"jwt",clientId:this.clientId}}},privateKeyProvider:t});if(e.configureAdapter(n),yield e.init(),e.connected)return e;const r=(0,p.initializeApp)(this.firebaseConfig),i=(0,l.getAuth)(r),o=new u.OAuthProvider("apple.com");o.addScope("email"),o.addScope("name");try{const t=yield(0,l.signInWithPopup)(i,o),n=yield t.user.getIdToken(!0);return yield e.connectTo(a.WALLET_ADAPTERS.OPENLOGIN,{loginProvider:"jwt",mfaLevel:"none",extraLoginOptions:{id_token:n,verifierIdField:"sub",domain:this.openLoginDomain}}),e}catch(y){throw console.error("Error signing in with Apple",y),r&&i&&(yield(0,u.signOut)(i)),e&&e.logout({cleanup:!0}),y}}))}getId(){return y}getConnection(){return this.connection}getOption(){return Promise.resolve(y)}isAutoConnected(){return r.__awaiter(this,void 0,void 0,(function*(){return!1}))}isConnected(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.instance.pipe((0,i.first)()).toPromise();return!!e&&e.connected}))}disconnect(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,p.initializeApp)(this.firebaseConfig),n=(0,l.getAuth)(t);t&&n&&(yield(0,u.signOut)(n)),e&&e.logout({cleanup:!0})}))}}t.FirebaseAppleConnectionProvider=m},1439:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FirebaseEmailConnectionProvider=void 0;const r=n(11),i=n(129),a=n(137),o=n(23),s=n(937),d=n(896),c=n(191),u=n(584),l=n(906),p="firebase_email";class y extends a.AbstractConnectionProvider{constructor(e,t,n,r,o,s){super(),this.clientId=e,this.chainConfig=t,this.firebaseConfig=n,this.network=r,this.openLoginDomain=o,this.jwtVerifier=s,this.instance=(0,a.cache)((()=>this._connect())),this.connection=this.instance.pipe((0,i.mergeMap)((e=>(0,a.connectToWeb3)(e.provider,{disconnect:()=>this.disconnect(e)}))),(0,i.startWith)((0,a.getStateConnecting)({providerId:p})))}_connect(){return r.__awaiter(this,void 0,void 0,(function*(){const e=(0,c.initializeApp)(this.firebaseConfig),t=(0,u.getAuth)(e);try{let e=window.localStorage.getItem("emailForSignIn");const r=new s.Web3AuthNoModal({clientId:this.clientId,web3AuthNetwork:this.network,chainConfig:this.chainConfig,useCoreKitKey:!1}),i=new d.EthereumPrivateKeyProvider({config:{chainConfig:this.chainConfig}}),a=new l.OpenloginAdapter({adapterSettings:{uxMode:"popup",loginConfig:{jwt:{verifier:this.jwtVerifier,typeOfLogin:"jwt",clientId:this.clientId}}},privateKeyProvider:i});r.configureAdapter(a),yield r.init();let c,p=window.localStorage.getItem("firebaseEmailUser");if(p)c=JSON.parse(p).user;else{if(!e)throw new Error("No email provided");c=(yield(0,u.signInWithEmailLink)(t,e)).user}if(r.connected)return r;const y=yield c.getIdToken(!0);try{return yield r.connectTo(o.WALLET_ADAPTERS.OPENLOGIN,{loginProvider:"jwt",mfaLevel:"none",extraLoginOptions:{id_token:y,verifierIdField:"sub",domain:this.openLoginDomain}}),window.localStorage.setItem("firebaseEmailUser",JSON.stringify(c)),r}catch(n){return r}}catch(n){throw console.error("Error sending sign-in link",n),n}}))}getId(){return p}getConnection(){return this.connection}getOption(){return Promise.resolve(p)}isAutoConnected(){return r.__awaiter(this,void 0,void 0,(function*(){return!1}))}isConnected(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.instance.pipe((0,i.first)()).toPromise();return!!e&&e.connected}))}disconnect(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,c.initializeApp)(this.firebaseConfig),n=(0,u.getAuth)(t);t&&n&&(yield(0,u.signOut)(n)),e&&e.logout({cleanup:!0}),window.localStorage.removeItem("emailForSignIn"),window.localStorage.removeItem("firebaseEmailUser")}))}}t.FirebaseEmailConnectionProvider=y},1440:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkConnectionProvider=void 0;const r=n(11),i=n(119),a=n(129),o=n(137),s="walletlink";class d extends o.AbstractConnectionProvider{constructor(e,t){super(),this.config=e,this.walletLinkOptions=t,this.instance=(0,o.cache)((()=>this._connect())),this.connection=(0,i.defer)((()=>this.instance.pipe((0,a.mergeMap)((e=>(0,o.connectToWeb3)(e.walletLinkWeb3Provider,{disconnect:()=>r.__awaiter(this,void 0,void 0,(function*(){return e.walletLink.disconnect()}))}))),(0,a.startWith)((0,o.getStateConnecting)({providerId:s})))))}_connect(){return r.__awaiter(this,void 0,void 0,(function*(){const{default:e}=yield Promise.resolve().then((()=>r.__importStar(n(2915)))),t=new e(this.walletLinkOptions),i=t.makeWeb3Provider(this.config.url,this.config.networkId);return yield i.enable(),{walletLink:t,walletLinkWeb3Provider:i}}))}getId(){return s}getConnection(){return this.connection}getOption(){return Promise.resolve(s)}isAutoConnected(){return r.__awaiter(this,void 0,void 0,(function*(){return!1}))}isConnected(){var e;return r.__awaiter(this,void 0,void 0,(function*(){return!!(null===(e=yield this.instance.pipe((0,a.first)()).toPromise())||void 0===e?void 0:e.walletLinkWeb3Provider.isConnected())}))}}t.WalletLinkConnectionProvider=d},1441:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhantomConnectionProvider=void 0;const r=n(11),i=n(119),a=n(119),o=n(129),s=n(137),d=n(137),c=n(2973);r.__exportStar(n(2974),t);const u="phantom";class l extends s.AbstractConnectionProvider{constructor(e){super(),this.config=e,this.instance=(0,s.cache)((()=>this._connect())),this.connection=this.instance.pipe((0,o.mergeMap)((e=>this.toConnectState(e))),(0,o.startWith)((0,s.getStateConnecting)({providerId:u})))}_connect(){return r.__awaiter(this,void 0,void 0,(function*(){try{yield(0,c.waitUntil)((()=>"solana"in window),100,1e3)}catch(e){}if("solana"in window){const e=window.solana;if(e.isPhantom)return yield e.connect(this.config),e}throw new Error("No solana provider found")}))}getConnectedStatus(e){return new i.Observable((t=>{function n(){t.next("connected")}function r(){t.next("disconnected")}t.next("connected"),e.on("connect",n),e.on("disconnect",r),t.add((()=>{e.removeListener("connect",n),e.removeListener("disconnect",r)}))}))}getAddress(e){return new i.Observable((t=>{var n;t.next(null===(n=e.publicKey)||void 0===n?void 0:n.toString()),e.on("accountChanged",(n=>r.__awaiter(this,void 0,void 0,(function*(){var r;n?t.next(n.toString()):(yield e.connect(),t.next(null===(r=e.publicKey)||void 0===r?void 0:r.toString()))}))))}))}toConnectState(e){return(0,a.combineLatest)([this.getAddress(e),this.getConnectedStatus(e)]).pipe((0,o.distinctUntilChanged)(((e,t)=>e[0]===t[0]&&e[1]===t[1])),(0,o.map)((t=>{let[n,r]=t;if("connected"===r&&n&&e.publicKey){const t={address:n,publicKey:e.publicKey,signTransaction:e.signTransaction,signAllTransactions:e.signAllTransactions,signMessage:e.signMessage};return(0,d.getStateConnected)({connection:t})}return(0,d.getStateDisconnected)()})))}getId(){return u}getConnection(){return this.connection}getOption(){return Promise.resolve(u)}isAutoConnected(){return r.__awaiter(this,void 0,void 0,(function*(){return!1}))}isConnected(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.instance.pipe((0,o.first)()).toPromise();return!!(null===e||void 0===e?void 0:e.isConnected)}))}}t.PhantomConnectionProvider=l},1442:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolflareConnectionProvider=void 0;const r=n(11),i=n(119),a=n(129),o=n(137),s=r.__importDefault(n(3299));r.__exportStar(n(2978),t);const d="solflare";class c extends o.AbstractConnectionProvider{constructor(e){super(),this.config=e,this.init()}init(){this.instance=(0,o.cache)((()=>this._connect())),this.connection=this.instance.pipe((0,a.mergeMap)((e=>this.toConnectState(e,(()=>e.disconnect())))),(0,a.startWith)((0,o.getStateConnecting)({providerId:d})))}_connect(){return r.__awaiter(this,void 0,void 0,(function*(){const e=new s.default(this.config);return yield e.connect(),e}))}getConnectedStatus(e){return new i.Observable((t=>{t.next("connected");const n=()=>{t.next("connected")},r=()=>{this.init(),t.next("disconnected")};e.on("connect",n),e.on("disconnect",r),t.add((()=>{e.removeListener("connect",n),e.removeListener("disconnect",r)}))}))}getAddress(e){return new i.Observable((t=>{var n;t.next(null===(n=e.publicKey)||void 0===n?void 0:n.toString())}))}toConnectState(e,t){return(0,i.combineLatest)([this.getAddress(e),this.getConnectedStatus(e)]).pipe((0,a.distinctUntilChanged)(((e,t)=>e[0]===t[0]&&e[1]===t[1])),(0,a.map)((n=>{let[r,i]=n;if("connected"===i&&r&&e.publicKey){const n={address:r,publicKey:e.publicKey,signTransaction:e.signTransaction.bind(e),signAllTransactions:e.signAllTransactions.bind(e),signMessage:e.signMessage.bind(e)};return(0,o.getStateConnected)({connection:n,disconnect:t})}return(0,o.getStateDisconnected)()})))}getId(){return d}getConnection(){return this.connection}getOption(){return Promise.resolve(d)}isAutoConnected(){return r.__awaiter(this,void 0,void 0,(function*(){return!1}))}isConnected(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.instance.pipe((0,a.first)()).toPromise();return!!(null===e||void 0===e?void 0:e.isConnected)}))}}t.SolflareConnectionProvider=c},1444:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImmutableXLinkConnectionProvider=void 0;const r=n(11),i=n(119),a=n(129),o=n(1206),s=n(137),d="immutablex";class c extends s.AbstractConnectionProvider{constructor(e){super(),this.config=e,this.instance=(0,s.cache)((()=>this._connect())),this.connection=(0,i.defer)((()=>this.instance.pipe((0,a.mergeMap)((e=>this.toConnectState(e.wallet))),(0,a.startWith)((0,s.getStateConnecting)({providerId:d})))))}_connect(){return r.__awaiter(this,void 0,void 0,(function*(){const e=new o.ImxWallet(this.config.env);return"connected"!==e.getConnectionData().status&&(yield e.connect()),{wallet:e}}))}getId(){return d}getAddress(e){return new i.Observable((t=>{t.next(e.getConnectionData().address)}))}getConnectedStatus(e){return new i.Observable((e=>{e.next("connected")}))}toConnectState(e){return(0,i.combineLatest)([this.getAddress(e),this.getConnectedStatus(e)]).pipe((0,a.distinctUntilChanged)(((e,t)=>e[0]===t[0]&&e[1]===t[1])),(0,a.map)((t=>{let[n,i]=t;if("connected"===i&&n){const t={address:n,wallet:e};return(0,s.getStateConnected)({connection:t,disconnect:()=>r.__awaiter(this,void 0,void 0,(function*(){return yield e.disconnect()}))})}return(0,s.getStateDisconnected)()})))}getConnection(){return this.connection}getOption(){return Promise.resolve(d)}isAutoConnected(){return r.__awaiter(this,void 0,void 0,(function*(){return!1}))}isConnected(){var e;return r.__awaiter(this,void 0,void 0,(function*(){return"connected"===(null===(e=yield this.instance.pipe((0,a.first)()).toPromise())||void 0===e?void 0:e.wallet.getConnectionData().status)}))}}t.ImmutableXLinkConnectionProvider=c},1445:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auth0Login=t.MattelConnectionProvider=void 0;const r=n(11),i=n(137),a=n(119),o=n(129),s=n(29),d="mattel";class c extends i.AbstractConnectionProvider{constructor(e){super(),this.config=e,this.instance=(0,i.cache)((()=>this._connect())),this.connection=this.instance.pipe((0,o.mergeMap)((e=>this.toConnectState(e))),(0,o.startWith)((0,i.getStateConnecting)({providerId:d})))}getAuth0Client(){return r.__awaiter(this,void 0,void 0,(function*(){const{auth0:e}=yield this.instance.pipe((0,o.first)()).toPromise();return e}))}setPopupConfig(e){var t;this.config.options=Object.assign(Object.assign({},this.config.options),{auth0PopupOptions:Object.assign(Object.assign({},(null===(t=this.config.options)||void 0===t?void 0:t.auth0PopupOptions)||{}),e||{})})}toConnectState(e){let{magic:n,fcl:s,auth0:d}=e;const c=()=>r.__awaiter(this,void 0,void 0,(function*(){var e;yield Promise.all([n.user.logout(),n.wallet.disconnect()]),yield d.logout(Object.assign({clientId:this.config.auth0ClientId,logoutParams:{returnTo:window.location.href}},(null===(e=this.config.options)||void 0===e?void 0:e.auth0LogoutOptions)||{}))}));return(0,a.defer)((()=>r.__awaiter(this,void 0,void 0,(function*(){var e;try{if(yield function(e){return r.__awaiter(this,void 0,void 0,(function*(){let t;const n=new Promise(((e,n)=>{t=setTimeout((()=>n(new Error("Session Checking Timed Out"))),1e4)}));return Promise.race([e.user.isLoggedIn(),n]).then((e=>(clearTimeout(t),e)))}))}(n)){return{user:yield n.user.getInfo(),fcl:s,auth:n.flow.authorization}}const i=yield(0,t.auth0Login)({auth0ClientId:this.config.auth0ClientId,auth0Domain:this.config.auth0Domain,auth0RedirectUrl:this.config.auth0RedirectUrl,auth0:d,auth0PopupOptions:null===(e=this.config.options)||void 0===e?void 0:e.auth0PopupOptions});i&&(yield n.openid.loginWithOIDC({jwt:i,providerId:this.config.magicProviderId}));return{user:yield n.user.getInfo(),fcl:s,auth:n.flow.authorization}}catch(i){return{error:i}}})))).pipe((0,o.map)((e=>{var t;return e&&"error"in e?(0,i.getStateDisconnected)({error:e.error}):(null===(t=null===e||void 0===e?void 0:e.user)||void 0===t?void 0:t.publicAddress)?(0,i.getStateConnected)({connection:{fcl:e.fcl,address:e.user.publicAddress,auth:e.auth,magic:n},disconnect:c}):(0,i.getStateDisconnected)()})))}_connect(){var e;return r.__awaiter(this,void 0,void 0,(function*(){const[{Magic:t},{FlowExtension:i},{OpenIdExtension:a},o,s]=yield Promise.all([Promise.resolve().then((()=>r.__importStar(n(2986)))),Promise.resolve().then((()=>r.__importStar(n(2987)))),Promise.resolve().then((()=>r.__importStar(n(2988)))),Promise.resolve().then((()=>r.__importStar(n(599)))),Promise.resolve().then((()=>r.__importStar(n(1314))))]),d=new t(this.config.magicAPIKey,{extensions:[new a,new i({rpcUrl:this.config.accessNode,network:this.config.network})]});o.config().put("accessNode.api",this.config.accessNode).put("env",this.config.network);return{fcl:o,magic:d,auth0:yield s.createAuth0Client(Object.assign({domain:this.config.auth0Domain,clientId:this.config.auth0ClientId},(null===(e=this.config.options)||void 0===e?void 0:e.auth0ClientOptions)||{}))}}))}getId(){return d}getConnection(){return this.connection}getOption(){return Promise.resolve(d)}isAutoConnected(){return r.__awaiter(this,void 0,void 0,(function*(){return!1}))}isConnected(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.instance.pipe((0,o.first)()).toPromise();return!!(yield null===e||void 0===e?void 0:e.fcl.currentUser())}))}isAuth0Authenticated(){return r.__awaiter(this,void 0,void 0,(function*(){const{auth0:e}=yield this.instance.pipe((0,o.first)()).toPromise();return e.isAuthenticated()}))}sardinePurchase(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.instance.pipe((0,o.first)()).toPromise();if(t)return t.magic.nft.purchase({nft:Object.assign({blockchainNftId:u(e.orderId),contractAddress:u(e.orderMaker),network:"flow",platform:"mattel",type:"nft_secondary"},e.purchaseOptions.nft),identityPrefill:e.purchaseOptions.identityPrefill||{}});throw new Error("Context is not prepared")}))}}t.MattelConnectionProvider=c;function u(e){const[t,n]=e.split(":");if(t!==s.Blockchain.FLOW)throw new Error("Not Flow entity ".concat(n));return n}t.auth0Login=e=>{let{auth0:t,auth0RedirectUrl:i,auth0ClientId:a,auth0Domain:o,auth0PopupOptions:s}=e;return r.__awaiter(void 0,void 0,void 0,(function*(){let e;try{e=yield t.isAuthenticated()}catch(c){e=!1}if(!e)try{yield t.loginWithPopup(Object.assign({authorizationParams:{domain:o,clientId:a,redirect_uri:i},timeoutInSeconds:180},s||{}))}catch(c){const{PopupTimeoutError:e}=yield Promise.resolve().then((()=>r.__importStar(n(1314))));throw c instanceof e&&c.popup.close(),c}const d=yield t.getIdTokenClaims();return null===d||void 0===d?void 0:d.__raw}))}},1446:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletConnectConnectionProviderV2=void 0;const r=n(11),i=n(129),a=n(137),o="walletconnect_v2";class s extends a.AbstractConnectionProvider{constructor(e){super(),this.config=e,this.instance=(0,a.cache)((()=>this._connect())),this.connection=this.instance.pipe((0,i.mergeMap)((e=>(0,a.connectToWeb3)(e,{disconnect:()=>e.disconnect()}))),(0,i.startWith)((0,a.getStateConnecting)({providerId:o})))}_connect(){return r.__awaiter(this,void 0,void 0,(function*(){const{EthereumProvider:e}=yield Promise.resolve().then((()=>r.__importStar(n(2989)))),t=yield e.init(this.config);return yield t.enable(),t}))}getId(){return o}getConnection(){return this.connection}getOption(){return Promise.resolve(o)}isAutoConnected(){return r.__awaiter(this,void 0,void 0,(function*(){return!1}))}isConnected(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.instance.pipe((0,i.first)()).toPromise();return!!(null===e||void 0===e?void 0:e.connected)}))}}t.WalletConnectConnectionProviderV2=s},1457:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getAssetType=t.OffRampClient=void 0;const r=n(11),i=r.__importDefault(n(107)),a=n(29),o=n(123),s=n(20),d="https://crypto.sardine.ai",c="https://crypto.sandbox.sardine.ai";function u(e,t,n){const r=(0,o.extractBlockchainFromAssetType)(e)||n||a.Blockchain.ETHEREUM,i=r.toLowerCase(),s="contract"in e?(0,o.getEntityData)(e.contract).address:"";if(r===a.Blockchain.FLOW&&function(e){return!!e&&[o.FLOW_TOKEN_MAP.testnet,o.FLOW_TOKEN_MAP.prod].includes(e)}(s))return{network:i,symbol:"FLOW"};const d=t.find((e=>e.network===i&&e.tokenAddress===s));if(!d)throw new Error("Token has not been found");return{network:i,symbol:d.assetSymbol}}t.OffRampClient=class{constructor(e,t,n){this.clientId=e,this.clientSecret=t,this.env=n,this.availableBlockchains=[a.Blockchain.ETHEREUM,a.Blockchain.POLYGON,a.Blockchain.FLOW].map((e=>e.toLowerCase()));const o="prod"===n;this.offrampUrl=o?d:c,this.client=i.default.create({baseURL:o?"https://api.sardine.ai/v1":"https://api.sandbox.sardine.ai/v1",headers:{"Content-Type":"application/json"}}),this.client.interceptors.request.use((e=>r.__awaiter(this,void 0,void 0,(function*(){return e.headers.Authorization="Basic ".concat(this.getBase64Token()),e}))))}getBase64Token(){const t="".concat(this.clientId,":").concat(this.clientSecret);return new e(t).toString("base64")}getToken(){return r.__awaiter(this,void 0,void 0,(function*(){if(this.clientToken&&this.expiresAt&&new Datethis.availableBlockchains.includes(e.network))).reduce(((e,t)=>{var n;if(["ethereum","polygon"].includes(t.network)&&(t.tokenAddress?e.push(Object.assign(Object.assign({},t),{assetType:{"@type":"ERC20",contract:(0,s.toContractAddress)("".concat(t.network.toUpperCase(),":").concat(t.tokenAddress))}})):e.push(Object.assign(Object.assign({},t),{assetType:{"@type":"ETH",blockchain:(0,o.validateBlockchain)(t.network.toUpperCase())}}))),"flow"===t.network){const r=(null!==(n=t.tokenAddress)&&void 0!==n?n:"prod"===this.env)?o.FLOW_TOKEN_MAP.prod:o.FLOW_TOKEN_MAP.testnet;e.push(Object.assign(Object.assign({},t),{assetType:{"@type":"FLOW_FT",contract:(0,s.toContractAddress)("FLOW:".concat(r))}}))}return e}),[])}))}getGeoCoverage(){return r.__awaiter(this,void 0,void 0,(function*(){const{data:e}=yield this.client.get("/geo-coverage");return e.data}))}getQuotes(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getSupportedTokens(),n=e.address&&(0,o.getEntityData)(e.address),{symbol:r,network:i}=u(e.assetType,t,null===n||void 0===n?void 0:n.blockchain),{data:a}=yield this.client.get("/quotes",{params:{asset_type:r,asset_amount:e.cryptoAmount,currency:e.fiatCurrency,network:i,paymentType:e.paymentType||null,side:"sell",walletAddress:(null===n||void 0===n?void 0:n.address)||null}});return a}))}getSellLink(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getSupportedTokens(),n=e.address&&(0,o.getEntityData)(e.address),{symbol:r,network:i}=u(e.assetType,t,null===n||void 0===n?void 0:n.blockchain),a={address:(null===n||void 0===n?void 0:n.address)||"",fixed_crypto_amount:e.cryptoAmount,fixed_fiat_currency:e.fiatCurrency||"",asset_type:r,network:i,client_token:yield this.getToken()},s=new URLSearchParams(a);return"".concat(this.offrampUrl,"/sell?").concat(s.toString())}))}},t.getAssetType=u}).call(this,n(7).Buffer)},148:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILL_CALLDATA_TAG=t.FEE_CONFIG_URL=void 0,t.FEE_CONFIG_URL="https://raw.githubusercontent.com/rarible/sdk/master/packages/ethereum/sdk/src/config/fees.json",t.FILL_CALLDATA_TAG="09616c6c64617461"},1526:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Connector=t.DefaultConnectionStateProvider=void 0;const r=n(11),i=n(119),a=n(129),o=n(123),s=n(547),d=n(1666);t.DefaultConnectionStateProvider=class{constructor(e){this.key=e}getValue(){return r.__awaiter(this,void 0,void 0,(function*(){const e=localStorage.getItem(this.key);return null!==e?e:void 0}))}setValue(e){return r.__awaiter(this,void 0,void 0,(function*(){void 0===e?localStorage.removeItem(this.key):localStorage.setItem(this.key,e)}))}};class c{constructor(e,t){this.providers=e,this.stateProvider=t,this.provider=new i.BehaviorSubject(void 0),c.initPageUnloadProtection(),this.add=this.add.bind(this),this.connect=this.connect.bind(this),this.logger=(0,d.createLogger)(),this.connection=(0,i.concat)((0,i.of)(s.STATE_INITIALIZING),(0,i.defer)((()=>this.checkAutoConnect())),this.provider.pipe((0,a.distinctUntilChanged)(),(0,a.switchMap)((e=>e?(0,i.concat)(e.getConnection(),i.NEVER).pipe((0,a.catchError)((e=>(0,i.concat)((0,i.of)((0,s.getStateDisconnected)({error:e})),i.NEVER))),(0,a.map)((t=>("disconnected"===t.status&&e.getOption().then((n=>{var r;this.logger.raw({level:(0,d.getErrorLogLevel)(t.error,e.getId()),method:"connect",message:null===(r=t.error)||void 0===r?void 0:r.message,error:(0,o.getStringifiedData)(t.error),providerId:e.getId(),providerOption:n||void 0,provider:(0,o.getStringifiedData)(e)})})),"connected"===t.status&&e.getOption().then((t=>{this.logger.raw({level:d.LogLevelConnector.SUCCESS,method:"connect",message:"trace of connect",providerId:null===e||void 0===e?void 0:e.getId(),providerOption:t||void 0})})),t)))):(0,i.concat)((0,i.of)((0,s.getStateDisconnected)()),i.NEVER))))).pipe((0,a.distinctUntilChanged)(((e,t)=>!!c.pageUnloading||(e===t||("connected"===e.status&&"connected"===t.status?e.connection===t.connection:"connecting"===e.status&&"connecting"===t.status?e.providerId===t.providerId:e.status===t.status)))),(0,a.shareReplay)(1),(0,a.map)((e=>"connected"===e.status?Object.assign(Object.assign({},e),{disconnect:()=>r.__awaiter(this,void 0,void 0,(function*(){if(void 0!==e.disconnect)try{yield e.disconnect()}catch(t){console.warn("caught on disconnect",t)}this.provider.next(void 0)}))}):e)),(0,a.tap)((e=>r.__awaiter(this,void 0,void 0,(function*(){var t,n;if("disconnected"===e.status&&!c.pageUnloading){this.provider.next(void 0);void 0!==(yield null===(t=this.stateProvider)||void 0===t?void 0:t.getValue())&&(null===(n=this.stateProvider)||void 0===n||n.setValue(void 0))}})))))}getProviders(){return this.providers}getCurrentProvider(){return this.provider.getValue()}static initPageUnloadProtection(){void 0===c.pageUnloading&&"undefined"!==typeof window&&(window.addEventListener("beforeunload",(function(){c.pageUnloading=!0})),c.pageUnloading=!1)}add(e){return new c([...this.providers,e],this.stateProvider)}static create(e,t){return Array.isArray(e)?new c(e,t):new c([e],t)}checkAutoConnect(){var e,t,n;return r.__awaiter(this,void 0,void 0,(function*(){let r;try{const i=this.providers.map((e=>({provider:e,autoConnected:e.isAutoConnected()})));for(const{provider:t,autoConnected:n}of i){if(yield n)return this.provider.next(t),null===(e=this.stateProvider)||void 0===e||e.setValue(t.getId()),(0,s.getStateConnecting)({providerId:t.getId()})}const a=yield null===(t=this.stateProvider)||void 0===t?void 0:t.getValue();if(void 0!==a)for(const e of this.providers)if(r=e,a===e.getId())return(yield e.isConnected())?(this.provider.next(e),(0,s.getStateConnecting)({providerId:e.getId()})):(null===(n=this.stateProvider)||void 0===n||n.setValue(void 0),(0,s.getStateDisconnected)())}catch(i){return this.logger.raw({level:(0,d.getErrorLogLevel)(i,null===r||void 0===r?void 0:r.getId()),method:"checkAutoConnect",message:null===i||void 0===i?void 0:i.message,error:(0,o.getStringifiedData)(i),providerId:null===r||void 0===r?void 0:r.getId(),providerOption:(yield null===r||void 0===r?void 0:r.getOption())||void 0,provider:(0,o.getStringifiedData)(r)}),(0,s.getStateDisconnected)({error:i.toString()})}return(0,s.getStateDisconnected)()}))}getOptions(){return r.__awaiter(this,void 0,void 0,(function*(){const e=[];for(const t of this.providers.map((e=>({provider:e,option:e.getOption()})))){const{provider:n,option:r}=t,i=yield r;i&&e.push({provider:n,option:i})}return e}))}connect(e){var t;return r.__awaiter(this,void 0,void 0,(function*(){const n=this.provider.value,r=yield this.connection.pipe((0,a.first)()).toPromise();if(void 0!==n&&"connected"===(null===r||void 0===r?void 0:r.status))throw new Error("Provider ".concat(JSON.stringify(n)," already connected"));this.provider.next(e.provider),null===(t=this.stateProvider)||void 0===t||t.setValue(e.provider.getId())}))}}t.Connector=c},1527:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(11).__exportStar(n(1528),t)},1528:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockchainByConnectorId=t.isFlowWarning=t.FLOW_WARN_MESSAGES=t.isSolanaWarning=t.isTezosWarning=t.isEVMWarning=t.isInfoLevel=t.isCancelMessage=t.isCancelCode=t.COMMON_INFO_MESSAGES=t.CANCEL_MESSAGES=t.INVALID_TX_PARAMS_EIP_1559_ERROR=void 0;const r=n(29);t.INVALID_TX_PARAMS_EIP_1559_ERROR="Invalid transaction params: params specify an EIP-1559 transaction but the current network does not support EIP-1559";const i=[t.INVALID_TX_PARAMS_EIP_1559_ERROR,"underlying network changed","Balance not enough to cover gas fee. Please deposit at least","Biaya gas telah diperbarui dan Anda memerlukan","err: max fee per gas less than block base fee","Error while gas estimation with message cannot estimate gas","transaction may fail may require manual","gas limit","gas required exceeds allowance","Insufficient fee balance","Insufficient ETH to pay the network fees","insufficient funds for gas * price + value","max priority fee per gas higher than max fee per gas","insufficient funds for intrinsic transaction cost","intrinsic gas too low","max fee per gas less than block base fee","maxFeePerGas cannot be less than maxPriorityFeePerGas","Please deposit at least","replacement transaction underpriced","Returned error: insufficient funds for gas * price + value","Returned error: transaction underpriced","Saldo tidak cukup untuk menutup biaya gas. Harap setor setidaknya","The gas price is low, please increase the gas price try again","transaction underpriced","\u041a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u0437\u0430 \u0433\u0430\u0437 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430, \u0438 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e","Insufficient ETH funds","Please enable Blind signing or Contract data in the Ethereum app Settings","No keyring found for the requested account. Error info: There are keyrings, but none match the address","Link Window Closed","nonce too low","transaction would cause overdraft"].map((e=>e.toLowerCase()));t.CANCEL_MESSAGES=["Transaction canceled","Request canceled by user","User canceled","Request cancelled by user","Cancelled by User","Request has been cancelled by the user","transaction was cancelled","transaction was canceled","Sign transaction cancelled","Firma de transacci\xf3n cancelada","Sign transaction cancelled","Signing transaction was cancelled","Transa\xe7\xe3o de assinatura cancelada","You canceled","User cancelled login","User cancelled the request","user reject this request","MetaMask Tx Signature: User refused to sign the transaction.","Request rejected","User rejected the transaction","Please enable Blind Signature or Contract Data in Ethereum Application Settings.","User denied to sign transaction","User declined the request.","PocketUniverse Tx Signature: User declined to sign the transaction.","Transaction declined","User declined transaction","MetaMask Tx Signature: Transaction signature denied by user.","Transaction rejected","User refused to sign the transaction","Please enable Blind Signing or Contract Data in Ethereum Application Settings","user rejected the request","PocketUniverse Tx Signature: The user rejected the transaction signature.","iFrame link is closed","Link iFrame Closed","rejected request from DeFi Wallet","User rejected methods","\u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u0430","Failed to sign transaction","Permission not given for signing message","User denied message signature","User denied transaction signature","\u041f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u043e","\u0e01\u0e32\u0e23\u0e25\u0e07\u0e19\u0e32\u0e21\u0e18\u0e38\u0e23\u0e01\u0e23\u0e23\u0e21\u0e16\u0e39\u0e01\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01","\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e41\u0e25\u0e49\u0e27","\u7528\u6237\u53d6\u6d88\u4e86\u64cd\u4f5c","\u7b7e\u7f72\u4ea4\u6613\u5df2\u53d6\u6d88","membatalkan","La transaction de signature a \xe9t\xe9 annul\xe9e","User denied account authorization","Firma transazione annullata","\u0130\u015flem imzalama iptal edildi","Nutzer hat die Transaktion abgelehnt","Signature de transaction annul\xe9e","Signiervorgang abgebrochen","Reject by the user","User closed modal","Permission denied","The requested account and/or method has not been authorized by the user","user did not approve","Der Nutzer hat die Anfrage abgelehnt","The user rejected the request","El usuario rechaz\xf3 la solicitud","L'utilisateur a rejet\xe9 la demande","O usu\xe1rio rejeitou a solicita\xe7\xe3o","The user rejected the request through Exodus","Permission denied, denied","user closed popup"].map((e=>e.toLowerCase())),t.COMMON_INFO_MESSAGES=["The gas fee has been updated and you need","The action was aborted by the user","User denied requested chains","Popup closed","Please verify email address","User denied account access","Connection request reset. Please try again","The tab is not active","An internal error has occurred","\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u043e\u0448\u0438\u0431\u043a\u0430.","\u5185\u90e8\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f","Une erreur interne s'est produite","Tab inaktiv","An internal error has occurred","Ett internt fel har intr\xe4ffat","L'onglet n'est pas actif","Het tabblad is niet actief","Ha ocurrido un error interno","A ap\u0103rut o eroare intern\u0103","Ha ocurrido un error interno","La pesta\xf1a no est\xe1 activa","Si \xe8 verificato un errore interno","Vyskytla sa intern\xe1 chyba","\u0412\u043a\u043b\u0430\u0434\u043a\u0430 \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0430","\u062e\u0637\u0627\u06cc\u06cc \u062f\u0627\u062e\u0644\u06cc \u0631\u062e \u062f\u0627\u062f\u0647 \u0627\u0633\u062a","\u5185\u90e8\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f","A guia n\xe3o est\xe1 ativa","Dahili bir hata olu\u015ftu","Er is een interne fout opgetreden","Sekme etkin de\u011fil","\u0632\u0628\u0627\u0646\u0647 \u0641\u0639\u0627\u0644 \u0646\u06cc\u0633\u062a","\u53d1\u751f\u4e86\u4e00\u4e2a\u5185\u90e8\u7684\u9519\u8bef","\u767c\u751f\u5167\u90e8\u932f\u8aa4"].map((e=>e.toLowerCase()));const a=["cancel","canceled","cancelled","rejected"];function o(e){return 4001===e||4100===e||"ACTION_REJECTED"===e}function s(e){if(!e||"string"!==typeof e)return!1;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e:e.toLowerCase();return!!a.includes(n)||t.CANCEL_MESSAGES.some((e=>null===n||void 0===n?void 0:n.includes(e)))}t.isCancelCode=o,t.isCancelMessage=s,t.isInfoLevel=function(e){var n;if(!(null===e||void 0===e?void 0:e.message)||"string"!==typeof(null===e||void 0===e?void 0:e.message))return!1;const r=null===e||void 0===e?void 0:e.message.toLowerCase();return!(!o(null===(n=null===e||void 0===e?void 0:e.error)||void 0===n?void 0:n.code)&&!s(r,!0))||t.COMMON_INFO_MESSAGES.some((e=>null===r||void 0===r?void 0:r.includes(e)))},t.isEVMWarning=function(e){if((null===e||void 0===e?void 0:e.name)&&["WrongNetworkWarning","InsufficientFundsError"].includes(null===e||void 0===e?void 0:e.name))return!0;const t=null===e||void 0===e?void 0:e.message.toLowerCase();return i.some((e=>null===t||void 0===t?void 0:t.includes(e)))},t.isTezosWarning=function(e){var t;const n="TezosProviderError"===e.name?e.error:e;return"UnknownBeaconError"===(null===n||void 0===n?void 0:n.name)&&"Aborted"===(null===n||void 0===n?void 0:n.title)||"NotGrantedTempleWalletError"===(null===n||void 0===n?void 0:n.name)||"NoAddressBeaconError"===(null===n||void 0===n?void 0:n.name)||"NoPrivateKeyBeaconError"===(null===n||void 0===n?void 0:n.name)||"BroadcastBeaconError"===(null===n||void 0===n?void 0:n.name)||"MissedBlockDuringConfirmationError"===(null===n||void 0===n?void 0:n.name)||"Error: timeout of 30000ms exceeded"===(null===n||void 0===n?void 0:n.message)||(null===(t=null===e||void 0===e?void 0:e.message)||void 0===t?void 0:t.endsWith("does not have enough funds for transaction"))},t.isSolanaWarning=function(e){var t;return"User rejected the request."===(null===e||void 0===e?void 0:e.name)||4001===(null===(t=null===e||void 0===e?void 0:e.error)||void 0===t?void 0:t.code)},t.FLOW_WARN_MESSAGES=["[Error Code: 1007] invalid proposal key","User rejected signature"],t.isFlowWarning=function(e){return t.FLOW_WARN_MESSAGES.some((t=>{var n;return null===(n=null===e||void 0===e?void 0:e.message)||void 0===n?void 0:n.includes(t)}))},t.getBlockchainByConnectorId=function(e){switch(e){case"beacon":return r.BlockchainGroup.TEZOS;case"fcl":case"mattel":return r.BlockchainGroup.FLOW;case"phantom":case"solflare":return r.BlockchainGroup.SOLANA;case"injected":case"fortmatic":case"iframe":case"immutablex":case"mew":case"portis":case"torus":case"firebase":case"firebase-apple":case"firebase-email":case"walletconnect":case"walletlink":return r.BlockchainGroup.ETHEREUM;default:return}}},1663:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseSettledRequest=void 0;const r=n(11);t.promiseSettledRequest=function(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield Promise.allSettled(e)).map((e=>"fulfilled"===e.status?e.value:void 0))}))}},1664:function(e,t,n){"use strict";function r(e){return new Promise((t=>setTimeout(t,e)))}Object.defineProperty(t,"__esModule",{value:!0}),t.conditionalRetry=t.delay=t.retry=void 0,t.retry=function e(t,n,i){return i().catch((a=>{if(0===t)throw a;return r(n).then((()=>e(t-1,n,i)))}))},t.delay=r,t.conditionalRetry=function e(t,n,i,a){return i().catch((o=>{if(0===t||!a(o))throw o;return r(n).then((()=>e(t-1,n,i,a)))}))}},1665:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FAILED_TO_FETCH_ERROR=t.UserCancelError=t.WrappedError=t.WalletIsUndefinedError=void 0;const r=n(785);class i extends Error{constructor(){super("Wallet is not defined"),this.name="WalletIsUndefinedError",Object.setPrototypeOf(this,i.prototype)}}t.WalletIsUndefinedError=i;class a extends Error{constructor(e,t){super(t),this.__IS_WRAPPED_ERROR__=!0,Object.setPrototypeOf(this,a.prototype),this.error=e}static isWrappedError(e){if(e instanceof a)return!0;if((0,r.isObjectLike)(e)){if("WrappedError"===e.constructor.name)return!0;if(e.__IS_WRAPPED_ERROR__)return!0}return!1}}t.WrappedError=a;class o extends a{constructor(e){super(e,"Request cancelled by user"),this.__IS_WRAPPED_ERROR__=!0,this.name="UserCancelError",Object.setPrototypeOf(this,o.prototype)}}t.UserCancelError=o,t.FAILED_TO_FETCH_ERROR="Failed to fetch"},1666:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorLogLevel=t.LogLevelConnector=t.createLogger=t.loggerConfig=void 0;const r=n(11),i=n(1667),a=n(123),o=n(29),s=n(1676),d=n(1677);var c;function u(){var e;return r.__awaiter(this,void 0,void 0,(function*(){const n=yield(0,s.getFingerprint)();return{service:t.loggerConfig.service,"@version":d.version,environment:"prod",domain:null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.host,fingerprint:n}}))}t.loggerConfig={service:"wallet-connector",elkUrl:"https://logging.rarible.com/"},t.createLogger=function(){return new i.RemoteLogger((e=>r.__awaiter(this,void 0,void 0,(function*(){yield window.fetch(t.loggerConfig.elkUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)})}))),{initialContext:u(),dropBatchInterval:1e3,maxByteSize:30720})},function(e){e.ERROR="CONNECTOR_ERROR",e.WARNING="CONNECTOR_WARNING",e.INFO="CONNECTOR_INFO",e.SUCCESS="CONNECTOR_SUCCESS"}(c=t.LogLevelConnector||(t.LogLevelConnector={})),t.getErrorLogLevel=function(e,t){if(!t)return c.ERROR;const n=(0,a.getBlockchainByConnectorId)(t);return(0,a.isInfoLevel)(e)?c.INFO:n===o.BlockchainGroup.ETHEREUM&&(0,a.isEVMWarning)(e)||n===o.BlockchainGroup.TEZOS&&(0,a.isTezosWarning)(e)||n===o.BlockchainGroup.SOLANA&&(0,a.isSolanaWarning)(e)?c.WARNING:c.ERROR}},1676:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFingerprint=t.UNRECOGNIZED=void 0;const r=n(11),i=r.__importDefault(n(3301));t.UNRECOGNIZED="UNRECOGNIZED",t.getFingerprint=function(){return r.__awaiter(this,void 0,void 0,(function*(){try{const e=yield i.default.load();return(yield e.get()).visitorId}catch(e){return t.UNRECOGNIZED}}))}},1677:function(e){e.exports=JSON.parse('{"name":"@rarible/connector","version":"0.13.68-fix.7","homepage":"","license":"ISC","main":"build/index.js","types":"build/index.d.ts","files":["build"],"scripts":{"build":"tsc --project tsconfig-build.json","clean":"rimraf ./build","test":"jest --runInBand --forceExit","verify":"tsc --noEmit --project tsconfig-build.json"},"dependencies":{"@fingerprintjs/fingerprintjs":"^3.3.6","@rarible/logger":"~0.9.12","@rarible/sdk-common":"^0.13.68-fix.7"},"devDependencies":{"@types/jest":"^27.0.2","identity-obj-proxy":"^3.0.0","jest":"^27.2.4","jest-junit":"^15.0.0","ts-jest":"^27.0.3"},"peerDependencies":{"rxjs":">= 6.6.7 < 8.0.0","tslib":"^2.3.1"},"publishConfig":{"access":"public"}}')},1678:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InjectedWeb3ConnectionProvider=t.DappType=void 0;var r=n(1679);Object.defineProperty(t,"DappType",{enumerable:!0,get:function(){return r.DappType}}),Object.defineProperty(t,"InjectedWeb3ConnectionProvider",{enumerable:!0,get:function(){return r.InjectedWeb3ConnectionProvider}})},1679:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DappType=t.detectErrorCode=t.InjectedWeb3ConnectionProvider=void 0;const r=n(11),i=n(119),a=n(129),o=n(123);Object.defineProperty(t,"DappType",{enumerable:!0,get:function(){return o.DappType}});const s=n(1016),d=n(1022),c=n(547),u=n(1023),l=n(1026),p="injected";class y extends s.AbstractConnectionProvider{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{prefer:[]};super(),this.config=e,this.connection=(0,i.defer)((()=>function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=m(e);if(!t)throw new Error("Injected provider not available");const n=yield(0,u.ethAccounts)(t);n&&0!==n.length||(yield function(e){return r.__awaiter(this,void 0,void 0,(function*(){if("function"===typeof e.request)try{yield e.request({method:"eth_requestAccounts"})}catch(t){if(t&&"code"in t&&4001===t.code)return;try{yield e.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]})}catch(t){"function"===typeof e.enable&&(yield e.enable())}}else"function"===typeof e.enable&&(yield e.enable());return e}))}(t)),t.on("disconnect",(e=>r.__awaiter(this,void 0,void 0,(function*(){if(f(1013,e)){const[e]=yield t.request({method:"eth_accounts"});if(e)return}}))))}))}(e))).pipe((0,a.mergeMap)((()=>(0,d.promiseToObservable)(function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=m(e);return(0,i.combineLatest)([(0,u.getAddress)(t),(0,l.getChainId)(t)]).pipe((0,a.map)((e=>{let[n,r]=e;return n?{chainId:r,address:n,provider:t}:void 0})))}))}(e)))),(0,a.map)((e=>{if(e){const t=()=>"close"in e.provider?e.provider.close():"disconnect"in e.provider?e.provider.disconnect():Promise.resolve();return(0,c.getStateConnected)({connection:e,disconnect:t})}return(0,c.getStateDisconnected)()})),(0,a.startWith)((0,c.getStateConnecting)({providerId:p})))}getId(){return p}getConnection(){return this.connection}getOption(){const e=m(this.config);return Promise.resolve((0,o.getDappType)(e))}isAutoConnected(){const e=m(this.config),t=(0,o.getDappType)(e);return Promise.resolve(function(e){if(!e)return!1;const t=new Set([o.DappType.Dapper]),n=new Set([o.DappType.Generic,o.DappType.Metamask,o.DappType.Coinbase]);return!(t.has(e)||n.has(e))}(t))}isConnected(){return r.__awaiter(this,void 0,void 0,(function*(){const e=m(this.config);return void 0!==e?(0,u.ethAccounts)(e).then((e=>{let[t]=e;return void 0!==t})):Promise.resolve(!1)}))}}function m(e){let{prefer:t}=e;var n;let r;const i="undefined"!==typeof window?window:void 0;if(!i)return r;if(i.ethereum){if(Array.isArray(i.ethereum.providers))if(Array.isArray(t)&&t.length)for(const e of t){const t=i.ethereum.providers.find((t=>(0,o.getDappType)(t)===e));if(t){r=t;break}}else r=i.ethereum.providers[0];r=r||i.ethereum,r.autoRefreshOnNetworkChange=!1}else(null===(n=i.web3)||void 0===n?void 0:n.currentProvider)&&(r=i.web3.currentProvider);return r}function f(e,t){return("object"===typeof t&&null!==t&&"code"in t?t.code:void 0)===e}t.InjectedWeb3ConnectionProvider=y,t.detectErrorCode=f},1680:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1681:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1682:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectToWeb3=void 0;const r=n(119),i=n(129),a=n(547),o=n(1023),s=n(1026),d=n(1683);t.connectToWeb3=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.combineLatest)([(0,o.getAddress)(e),(0,s.getChainId)(e),(0,d.getConnectedStatus)(e)]).pipe((0,i.distinctUntilChanged)(((e,t)=>e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2])),(0,i.map)((n=>{let[r,i,o]=n;if("connected"===o&&r){const n={chainId:i,address:r,provider:e,disconnect:t.disconnect};return(0,a.getStateConnected)({connection:n,disconnect:null===t||void 0===t?void 0:t.disconnect})}return(0,a.getStateDisconnected)()})))}},1683:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getConnectedStatus=void 0;const r=n(119);t.getConnectedStatus=function(e){return"on"in e?new r.Observable((t=>{function n(){t.next("disconnected")}t.next("connected"),e.on("disconnected",n),"removeListener"in e&&t.add((()=>{e.removeListener("disconnected",n)}))})):(0,r.concat)((0,r.of)("connected"),r.NEVER)}},1687:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletType=void 0,function(e){e.ETHEREUM="ETHEREUM",e.SOLANA="SOLANA",e.TEZOS="TEZOS",e.FLOW="FLOW",e.IMMUTABLEX="IMMUTABLEX"}(t.WalletType||(t.WalletType={}))},1688:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=void 0;class r extends Error{constructor(e){var t,n,i,a;super(r.getErrorMessage(null===e||void 0===e?void 0:e.error)),Object.setPrototypeOf(this,r.prototype),this.name="EthereumProviderError",this.error=null===e||void 0===e?void 0:e.error,(null===(t=null===e||void 0===e?void 0:e.error)||void 0===t?void 0:t.stack)&&(this.stack=this.getNewStack(null===e||void 0===e?void 0:e.error)),this.provider=null===e||void 0===e?void 0:e.provider,this.data=null===e||void 0===e?void 0:e.data,this.method=null===e||void 0===e?void 0:e.method,this.code=(null===(n=null===e||void 0===e?void 0:e.error)||void 0===n?void 0:n.code)||(null===(a=null===(i=null===e||void 0===e?void 0:e.error)||void 0===i?void 0:i.error)||void 0===a?void 0:a.code)||(null===e||void 0===e?void 0:e.code),this.signer=null===e||void 0===e?void 0:e.signer,this.chainId=null===e||void 0===e?void 0:e.chainId,this.providerId=null===e||void 0===e?void 0:e.providerId,this.blockNumber=null===e||void 0===e?void 0:e.blockNumber}static getErrorMessage(e){return"string"===typeof e?e:(null===e||void 0===e?void 0:e.message)||"EthereumProviderError"}getNewStack(e){var t;try{return(null===(t=this.stack)||void 0===t?void 0:t.split("\n").slice(0,2).join("\n"))+"\n"+e.stack||this.stack}catch(n){return this.stack||e.stack}}}t.EthereumProviderError=r},1695:function(e,t){},1697:function(e,t){},1710:function(e,t){},1711:function(e,t){},1734:function(e,t){},1739:function(e,t){},1741:function(e,t){},1760:function(e,t){},1774:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerRequest=void 0;const r=n(11);t.providerRequest=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){if("object"!==typeof e||null===e)throw new Error("Provider is not an object");return"function"!==typeof e.request?function(e,t,n){return new Promise(((r,i)=>{try{!function(e,t,n){if(null===e||"object"!==typeof e)throw new Error("No send method defined");if("function"===typeof e.sendAsync)e.sendAsync(t,n);else{if("function"!==typeof e.send)throw new Error("No send method defined");e.send(t,n)}}(e,{jsonrpc:"2.0",id:(new Date).getTime(),method:t,params:n},((e,t)=>{const n=e||(null===t||void 0===t?void 0:t.error);n&&i(n),(null===t||void 0===t?void 0:t.result)&&r(t.result),i(new Error("Can't handle JSON-RPC request"))}))}catch(a){i(a)}}))}(e,t,n):e.request({method:t,params:n})}))}},1775:function(e,t,n){"use strict";function r(e){return new Promise(((t,n)=>{const r=setTimeout((()=>n(new Error("PromiEvent timeout"))),18e5);e.once("error",(e=>{n(e),clearTimeout(r)})),e.once("receipt",(e=>{t(e),clearTimeout(r)}))}))}function i(e){return new Promise(((t,n)=>{const r=setTimeout((()=>n(new Error("PromiEvent timeout"))),18e5);e.once("error",(e=>{n(e),clearTimeout(r)})),e.once("transactionHash",(e=>{t(e),clearTimeout(r)}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.getPromiEventHashPromise=t.getPromiEventReceiptPromise=t.toPromises=void 0,t.toPromises=function(e){return{hash:i(e),receipt:r(e)}},t.getPromiEventReceiptPromise=r,t.getPromiEventHashPromise=i},1776:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseReceiptEvents=t.getTransactionReceiptEvents=t.getContractMethodReceiptEvents=void 0;const r=n(11),i=r.__importDefault(n(1777)),a=r.__importDefault(n(1052));function o(e,t,n){const r=[];n.logs&&(n.events={},n.logs.forEach((function(e){e.returnValues={},e.signature=null,e.raw={data:e.data,topics:e.topics},delete e.data,delete e.topics;const t=e.logIndex;n.events[t]=e})),delete n.logs),Object.keys(n.events).forEach((function(o){const s=n.events[o];if(a.default.toChecksumAddress(s.address)!==a.default.toChecksumAddress(t)||s.signature)return;const d=e.filter((e=>"event"===e.type)).map((e=>Object.assign(Object.assign({},e),{signature:e.signature||i.default.encodeEventSignature(e)}))).find((e=>e.signature===s.raw.topics[0]));s.event=d.name,s.signature=d.signature,s.returnValues=i.default.decodeLog(d.inputs,s.raw.data,s.raw.topics.slice(1)),r.push(s),delete s.returnValues.__length__,delete n.events[o]}));let o=0;return r.forEach((function(e){e.event?n.events[e.event]?Array.isArray(n.events[e.event])?n.events[e.event].push(e):n.events[e.event]=[n.events[e.event],e]:n.events[e.event]=e:(n.events[o]=e,o+=1)})),null===n||void 0===n?void 0:n.events}t.getContractMethodReceiptEvents=function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield e;return t.events?Object.keys(t.events).map((e=>t.events[e])).map((e=>Object.assign(Object.assign({},e),{args:e.returnValues}))):[]}))},t.getTransactionReceiptEvents=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=o(n,t,yield e);return Object.values(r)||[]}))},t.parseReceiptEvents=o},1780:function(e,t){},1783:function(e,t){},1792:function(e,t){},1793:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthersTransaction=t.EthersFunctionCall=t.EthersContract=t.EthersEthereum=t.EthersWeb3ProviderEthereum=void 0;const r=n(11),i=n(936),a=n(1028),o=n(20),s=n(1794),d=n(123),c=n(1797),u=n(1807);t.EthersWeb3ProviderEthereum=class{constructor(e,t){this.web3Provider=e,this.from=t,this.send=this.send.bind(this)}createContract(e,t){if(!t)throw new Error("No Contract address provided, it's required for EthersEthereum");return new l(new i.ethers.Contract(t,e,this.web3Provider.getSigner()),this.web3Provider.getSigner())}send(e,t){return r.__awaiter(this,void 0,void 0,(function*(){try{return yield this.web3Provider.send(e,t)}catch(n){let r;try{r=yield this.getFrom()}catch(n){}throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.send",error:n,data:{method:e,params:t,from:r}})}}))}personalSign(e){return r.__awaiter(this,void 0,void 0,(function*(){try{return yield this.web3Provider.getSigner().signMessage(e)}catch(t){let n;try{n=yield this.getFrom()}catch(t){}throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.personalSign",error:t,data:{message:e,from:n}})}}))}signTypedData(e){return r.__awaiter(this,void 0,void 0,(function*(){let t;try{return t=yield this.getFrom(),yield(0,a.signTypedData)(this.send,t,e)}catch(n){throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.signTypedData",error:n,data:e,signer:t})}}))}getFrom(){return r.__awaiter(this,void 0,void 0,(function*(){try{if(!this.from){const[e]=yield this.web3Provider.listAccounts();return e}return this.from}catch(e){throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.getFrom",error:e,data:null})}}))}encodeParameter(e,t){try{return(0,c.encodeParameters)([e],[t])}catch(n){throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.encodeParameter",error:n,data:{type:e,parameter:t}})}}decodeParameter(e,t){try{return(0,c.decodeParameters)([e],t)}catch(n){throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.decodeParameter",error:n,data:{type:e,data:t}})}}getBalance(e){return r.__awaiter(this,void 0,void 0,(function*(){try{const t=yield this.web3Provider.getBalance(e);return(0,o.toBigNumber)(t.toString())}catch(t){throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.getBalance",error:t,data:{address:e}})}}))}getChainId(){return r.__awaiter(this,void 0,void 0,(function*(){try{const{chainId:e}=yield this.web3Provider.getNetwork();return+e}catch(e){throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersWeb3ProviderEthereum.getChainId",error:e,data:null})}}))}getCurrentProvider(){return this.web3Provider.provider}};t.EthersEthereum=class{constructor(e){this.signer=e}getCurrentProvider(){return m(this.signer)}createContract(e,t){if(!t)throw new Error("No Contract address provided, it's required for EthersEthereum");return new l(new i.ethers.Contract(t,e,this.signer),this.signer)}personalSign(e){return r.__awaiter(this,void 0,void 0,(function*(){try{return yield this.signer.signMessage(e)}catch(t){let n;try{n=yield this.getFrom()}catch(t){}throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersEthereum.personalSign",error:t,data:{message:e,from:n}})}}))}signTypedData(e){return r.__awaiter(this,void 0,void 0,(function*(){try{const t=e.types,{EIP712Domain:n}=t,i=r.__rest(t,["EIP712Domain"]);return yield this.signer._signTypedData(e.domain,i,e.message)}catch(t){throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersEthereum.signTypedData",error:t,data:e})}}))}getFrom(){return r.__awaiter(this,void 0,void 0,(function*(){try{return yield this.signer.getAddress()}catch(e){throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersEthereum.getFrom",error:e,data:null})}}))}encodeParameter(e,t){try{return(0,c.encodeParameters)([e],[t])}catch(n){throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersEthereum.encodeParameter",error:n,data:{type:e,parameter:t}})}}decodeParameter(e,t){try{return(0,c.decodeParameters)([e],t)}catch(n){throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersEthereum.decodeParameter",error:n,data:{type:e,data:t}})}}getBalance(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.signer.provider)throw new Error("EthersEthereum: signer provider does not exist");try{const t=yield this.signer.provider.getBalance(e);return(0,o.toBigNumber)(t.toString())}catch(t){throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersEthereum.getBalance",error:t,data:{address:e}})}}))}getChainId(){return r.__awaiter(this,void 0,void 0,(function*(){try{return+(yield this.signer.getChainId())}catch(e){throw new a.EthereumProviderError({providerId:(0,d.getDappType)(this.getCurrentProvider()),provider:a.Provider.ETHERS,method:"EthersEthereum.getChainId",error:e,data:null})}}))}};class l{constructor(e,t){this.contract=e,this.signer=t}functionCall(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rc(t.replace("[]",""),e)));let u=t.match(s);if(u){let e=parseInt(u[2]||"256");e/8=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(r).join("0")}(n,2*t)}}n.length%2===1&&(n="0x0"+n.substring(2))}return n}function u(e){let t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}}function l(e){const t=[];return Object.keys(e).forEach((function(n){"object"!==typeof e[n]?t.push({name:n,type:e[n]}):t.push(Object.assign(u(n),{components:l(e[n])}))})),t}t.encodeParameters=function(e,t){return e=d(e),t=t.map((function(t,n){let r=e[n];if("object"===typeof r&&r.type&&(r=r.type),t=c(r,t),"string"===typeof r&&r.includes("tuple")){const e=s._getCoder(o.from(r)),n=(e,t)=>{if("array"===e.name)return t.map((t=>n(s._getCoder(o.from(e.type.replace("[]",""))),t)));const{coders:r}=e;r.forEach(((e,r)=>{"tuple"===e.name?n(e,t[r]):t[r]=c(e.name,t[r])}))};n(e,t)}return t})),s.encode(e,t)},t.decodeParameters=function(e,t){return e=d(e),s.decode(e,t)}}).call(this,n(7).Buffer)},1800:function(e,t){},1807:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTxEvents=void 0;const r=n(11);t.getTxEvents=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){try{return e.logs.map((e=>{try{const n=t.interface.parseLog(e);return Object.assign(Object.assign({},e),{event:n.name,args:n.args,returnValues:n.args})}catch(n){return Object.assign(Object.assign({},e),{event:"",returnValues:{},args:{}})}}))}catch(n){return console.log(n),[]}}))}},1809:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prodConfig=void 0,t.prodConfig={basePath:"https://api.rarible.org",ethereumEnv:"mainnet",flowEnv:"mainnet",tezosNetwork:"mainnet",polygonNetwork:"polygon",solanaNetwork:"mainnet-beta",immutablexNetwork:"prod",mantleNetwork:"mantle",arbitrumNetwork:"arbitrum",zksync:"zksync",chiliz:"chiliz",lightlink:"lightlink",rari:"rari",base:"base"}},1810:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.developmentConfig=void 0,t.developmentConfig={basePath:"https://dev-api.rarible.org",ethereumEnv:"dev-ethereum",flowEnv:"dev-testnet",tezosNetwork:"dev",polygonNetwork:"dev-polygon",solanaNetwork:"devnet",immutablexNetwork:"testnet",mantleNetwork:"testnet-mantle",arbitrumNetwork:"testnet-arbitrum",zksync:"testnet-zksync",chiliz:"testnet-chiliz",lightlink:"testnet-lightlink",rari:"testnet-rari",base:"base-sepolia"}},1811:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testnetConfig=void 0,t.testnetConfig={basePath:"https://testnet-api.rarible.org",ethereumEnv:"testnet",flowEnv:"testnet",tezosNetwork:"testnet",polygonNetwork:"mumbai",solanaNetwork:"devnet",immutablexNetwork:"testnet",mantleNetwork:"testnet-mantle",arbitrumNetwork:"testnet-arbitrum",zksync:"testnet-zksync",chiliz:"testnet-chiliz",lightlink:"testnet-lightlink",rari:"testnet-rari",base:"base-sepolia"}},1812:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEthereumSdk=void 0;const r=n(586),i=n(29),a=n(20),o=n(382),s=n(374),d=n(654),c=n(376),u=n(375),l=n(474),p=n(1116),y=n(2152),m=n(2153),f=n(2154),h=n(2155),b=n(2156),T=n(2158),v=n(2159),g=n(2160),E=n(2161),_=n(2162);t.createEthereumSdk=function(e,t,n,O,A){var w,k;const C={apiClientParams:Object.assign(Object.assign({},(null===A||void 0===A?void 0:A.params)||{}),{middleware:[...(null===(w=A.logs)||void 0===w?void 0:w.level)!==o.LogsLevel.DISABLED?[(0,c.getErrorHandlerMiddleware)(c.NetworkErrorCode.ETHEREUM_NETWORK_ERR)]:[],...(null===(k=null===A||void 0===A?void 0:A.params)||void 0===k?void 0:k.middleware)||[]]}),logs:A.logs,ethereum:A[i.Blockchain.ETHEREUM],polygon:A[i.Blockchain.POLYGON],marketplaceMarker:A.marketplaceMarker?(0,a.toBinary)(A.marketplaceMarker):void 0,apiKey:A.apiKey},S=(0,r.createRaribleSdk)(null===e||void 0===e?void 0:e.ethereum,O,C),I=new y.EthereumSell(S,e,t,A),R=new v.EthereumBalance(S,e,t),x=new b.EthereumBid(S,e,t,R,A),P=new p.EthereumMint(S,e,t),B=new m.EthereumFill(S,e,t,A),{createCollectionSimplified:j}=new E.EthereumCreateCollection(S,e),F=new _.EthereumCryptopunk(S,e),M=new h.EthereumTransfer(S,e,t),D=new f.EthereumBurn(S,e,t,O),N=new T.EthereumCancel(S,e,t),L=s.Middlewarer.skipMiddleware(P.preprocessMeta),V=new d.MetaUploader(i.Blockchain.ETHEREUM,L);return{nft:{mint:new u.MethodWithPrepare(P.mintBasic,P.prepare),burn:new u.MethodWithPrepare(D.burnBasic,D.burn),transfer:new u.MethodWithPrepare(M.transferBasic,M.transfer),generateTokenId:new g.EthereumTokenId(S,t).generateTokenId,createCollection:j,preprocessMeta:L,uploadMeta:V.uploadMeta},order:{fill:{prepare:B.fill},buy:new u.MethodWithPrepare(B.buyBasic,B.buy),batchBuy:new u.MethodWithPrepare(B.batchBuyBasic,B.batchBuy),acceptBid:new u.MethodWithPrepare(B.acceptBidBasic,B.acceptBid),sell:new u.MethodWithPrepare(I.sellBasic,I.sell),sellUpdate:new u.MethodWithPrepare(I.sellUpdateBasic,I.update),bid:new u.MethodWithPrepare(x.bidBasic,x.bid),bidUpdate:new u.MethodWithPrepare(x.bidUpdateBasic,x.update),cancel:N.cancel},balances:{getBalance:R.getBalance,convert:R.convert,transfer:l.notImplemented,getBiddingBalance:R.getBiddingBalance,depositBiddingBalance:R.depositBiddingBalance,withdrawBiddingBalance:R.withdrawBiddingBalance},restriction:{canTransfer:()=>Promise.resolve({success:!0}),getFutureOrderFees:()=>I.getFutureOrderFees()},ethereum:{wrapCryptoPunk:F.wrap,unwrapCryptoPunk:F.unwrap,getBatchBuyAmmInfo:B.getBuyAmmInfo}}}},1813:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mainnetConfig=void 0;const r=n(20),i=n(130),a=n(148);t.mainnetConfig={basePath:"https://ethereum-api.rarible.org",chainId:1,exchange:{v1:(0,r.toAddress)("0x09EaB21c40743B2364b94345419138eF80f39e30"),v2:(0,r.toAddress)("0x9757F2d2b135150BBeb65308D4a91804107cd8D6"),openseaV1:(0,r.toAddress)("0x7be8076f4ea4a4ad08075c2508e481d6c946d12b"),wrapper:(0,r.toAddress)("0x0c17Fc3Ea97cDBFc9503333dAEEc3097EE076E23"),looksrare:(0,r.toAddress)("0x59728544B08AB483533076417FbBB2fD0B17CE3a"),looksrareV2:(0,r.toAddress)("0x0000000000E655fAe4d56241588680F86E3b2377"),x2y2:(0,r.toAddress)("0x74312363e45dcaba76c59ec49a7aa8a65a67eed3")},transferProxies:{nft:(0,r.toAddress)("0x4fee7b061c97c9c496b01dbce9cdb10c02f0a0be"),erc20:(0,r.toAddress)("0xb8e4526e0da700e9ef1f879af713d691f81507d8"),erc721Lazy:(0,r.toAddress)("0xbb7829BFdD4b557EB944349b2E2c965446052497"),erc1155Lazy:(0,r.toAddress)("0x75a8B7c0B22D973E0B46CfBD3e2f6566905AA79f"),openseaV1:(0,r.toAddress)("0xe5c783ee536cf5e63e792988335c4255169be4e1"),cryptoPunks:(0,r.toAddress)("0xdf907c1b541b1843b511d115e2fef78a6a830772")},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:(0,r.toAddress)("0xa5409ec958c83c3f309868babaca7c86dcb077c1"),merkleValidator:(0,r.toAddress)("0xbaf2127b49fc93cbca6269fade0f7f31df4c88a7")},factories:{erc721:(0,r.toAddress)("0x6E42262978de5233C8d5B05B128C121fBa110DA4"),erc1155:(0,r.toAddress)("0xda5bfe0bd4443d63833c8f4e3284357299eae6bc")},cryptoPunks:{marketContract:(0,r.toAddress)("0x6Ba6f2207e343923BA692e5Cae646Fb0F566DB8D"),wrapperContract:(0,r.toAddress)("0x282BDD42f4eb70e7A9D9F40c8fEA0825B7f68C5D")},sudoswap:{pairFactory:(0,r.toAddress)("0xb16c1342E617A5B6E4b631EB114483FDB289c0A4"),pairRouter:(0,r.toAddress)("0x2b2e8cda09bba9660dca5cb6233787738ad68329")},weth:(0,r.toAddress)("0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"),rari:(0,r.toAddress)("0xfca59cd816ab1ead66534d82bc21e7515ce441cf"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:(0,r.toAddress)("0x2a784a5b5C8AE0bd738FBc67E4C069dB4F4961B7")}},1815:function(e,t){},1821:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mumbaiConfig=void 0;const r=n(20),i=n(130),a=n(148);t.mumbaiConfig={basePath:"https://testnet-polygon-api.rarible.org",chainId:80001,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x2Fc743F5419637B93dDAC159715B902186300041"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x042221c65AC6925fbc478dB5B746183f72377526"),x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x02e21199D043dab90248f79d6A8d0c36832734B0"),erc20:(0,r.toAddress)("0xCA90c2E7d3c41EF220888B0038849BA1e67688bC"),erc721Lazy:(0,r.toAddress)("0xA8628124C255171cF356F0E0204E2D19CA89F636"),erc1155Lazy:(0,r.toAddress)("0x8fd27f771bf72C1F8c8b78FCdcf323C0C34f030b"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xa85180a21786bA65b0778bE1cb5CBA5E5c6cD21d"),erc1155:(0,r.toAddress)("0xAa9CD5834E0009902EeAA3FEfAc6A160e9A096b4")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x9c3c9283d3e44854697cd22d3faa240cfb032889"),auction:r.ZERO_ADDRESS}},1822:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.polygonConfig=void 0;const r=n(20),i=n(130),a=n(148);t.polygonConfig={basePath:"https://polygon-api.rarible.org",chainId:137,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x12b3897a36fDB436ddE2788C06Eff0ffD997066e"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0xf7DD32c761D61624dCAAe61d0d50Efc6E3E1F65c"),x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xd47e14DD9b98411754f722B4c4074e14752Ada7C"),erc20:(0,r.toAddress)("0x49b4e47079d9b733B2227fa15f0762dBF707B263"),erc721Lazy:(0,r.toAddress)("0xDD28328257a2Cce3204332C747Cc350153937A1D"),erc1155Lazy:(0,r.toAddress)("0x0E63021A7597B254484b7F99dDD9b319591350B6"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0x16911a36a56f828f17632cD4915614Dd5c7a45e0"),erc1155:(0,r.toAddress)("0xF46e8e6fA0F048DdD76F8c6982eBD059796298B8")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"),auction:r.ZERO_ADDRESS}},1823:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.devEthereumConfig=void 0;const r=n(20),i=n(130),a=n(148);t.devEthereumConfig={basePath:"https://dev-ethereum-api.rarible.org",chainId:300500,exchange:{v1:(0,r.toAddress)("0x18033Ad24EBBd26E06a84d820dB1D252Fa0c00DB"),v2:(0,r.toAddress)("0x6aABb267a1c440CfB5C200Ebcd078Efa9249492A"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x5Ace78C04f6D2656B89ce7FAA1f3C4d08fD6f1B7"),x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xc6f33b62A94939E52E1b074c4aC1A801B869fDB2"),erc20:(0,r.toAddress)("0x3586d3E6CDaE98d5F0eEaB737977Bc78406Da2BD"),erc721Lazy:(0,r.toAddress)("0xeC47DA9591FC24F5a5F401e8D275526Cc5eE5d37"),erc1155Lazy:(0,r.toAddress)("0x8812cFb55853da0968a02AaaEA84CD93EC4b42A1"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:(0,r.toAddress)("0x44be0e540DfA005D97Fde86CdD058F7E1A71A317")},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xD6313c8A2D1cDad7EE522135776Ff02EC98b1606"),erc1155:(0,r.toAddress)("0x3EAA06308C859fC35A17b7944f20f14872462d3D")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:(0,r.toAddress)("0x3df054dA59B1c0D5d9CeE5EDc9B58798526023B5"),pairRouter:(0,r.toAddress)("0xc64E5D291CaEdF42b77fa9E50d5Fd46113227857")},weth:(0,r.toAddress)("0x55eB2809896aB7414706AaCDde63e3BBb26e0BC6"),rari:(0,r.toAddress)("0xfca59cd816ab1ead66534d82bc21e7515ce441cf"),auction:r.ZERO_ADDRESS}},1824:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.devPolygonConfig=void 0;const r=n(20),i=n(130),a=n(148);t.devPolygonConfig={basePath:"https://dev-polygon-api.rarible.org",chainId:300501,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x8283Ffd0F535E1103C3599D2d00b85815774A896"),openseaV1:r.ZERO_ADDRESS,wrapper:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x3586d3E6CDaE98d5F0eEaB737977Bc78406Da2BD"),erc20:(0,r.toAddress)("0xeC47DA9591FC24F5a5F401e8D275526Cc5eE5d37"),erc721Lazy:(0,r.toAddress)("0x8812cFb55853da0968a02AaaEA84CD93EC4b42A1"),erc1155Lazy:(0,r.toAddress)("0x87ECcc03BaBC550c919Ad61187Ab597E9E7f7C21"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:(0,r.toAddress)("0x44a72AEb7dAc73c4b72f89d6855dE063949627F3")},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0x66611f8D97688A0aF08D4337D7846eFEc6995d58"),erc1155:(0,r.toAddress)("0x31C827f06E10e4999eb88c193669d408eF597B3D")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x328823f69a0915c9BEc366Eb09ccdfB964f91Ad5"),auction:r.ZERO_ADDRESS}},1825:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testnetEthereumConfig=void 0;const r=n(20),i=n(130),a=n(148);t.testnetEthereumConfig={basePath:"https://testnet-ethereum-api.rarible.org",chainId:5,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x02afbD43cAD367fcB71305a2dfB9A3928218f0c1"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x89Ee42D532438BB70a0aF196729aE2B22744c3db"),looksrare:(0,r.toAddress)("0xD112466471b5438C1ca2D218694200e49d81D047"),looksrareV2:(0,r.toAddress)("0x35C2215F2FFe8917B06454eEEaba189877F200cf"),x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x21B0B84FfAB5A8c48291f5eC9D9FDb9aef574052"),erc20:(0,r.toAddress)("0x17cEf9a8bf107D58E87c170be1652c06390BD990"),erc721Lazy:(0,r.toAddress)("0x96102D9472C0338005cbf12Fb7eA829F242C2809"),erc1155Lazy:(0,r.toAddress)("0x1e1B6E13F0eB4C570628589e3c088BC92aD4dB45"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xf3964B93F0127C9CC2F48752C67dF4b1dB7c9138"),erc1155:(0,r.toAddress)("0x6E8a327181cE6d83A6cE4A58fe6D07f50B0bc0Af")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:(0,r.toAddress)("0xF0202E9267930aE942F0667dC6d805057328F6dC"),pairRouter:(0,r.toAddress)("0x25b4EfC43c9dCAe134233CD577fFca7CfAd6748F")},weth:(0,r.toAddress)("0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6"),rari:(0,r.toAddress)("0xbe6dEA792E5D557d71a4cDEf7d22d6dccA133891"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:(0,r.toAddress)("0x7454Cc9AEB024bcE6A2CDC49ad4733B4D8215fb8")}},1826:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mantleTestnetConfig=void 0;const r=n(20),i=n(130),a=n(148);t.mantleTestnetConfig={basePath:"https://testnet-mantle-api.rarible.org",chainId:5001,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x41407B447Fb5425187A9BCA3a062644EF2410F8D"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x0141aC79eFD8e4305cE7785B4483C54d5E968995"),looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xF1cb795B7eA59a9213a790f868104c11a14690Fa"),erc20:(0,r.toAddress)("0xa90e536A492aef0d57e6d295FA17687c3ca93347"),erc721Lazy:(0,r.toAddress)("0x61512179F6a16bEC0D259d8010CC0485CE363868"),erc1155Lazy:(0,r.toAddress)("0x3e52D660b69d1bDacb6C513cE085D924F5Cb9c77"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0x4492608238eB09c7AD036e9C089538a7286B8985"),erc1155:(0,r.toAddress)("0x552dcDddEd58DAfC95AB1231A9a46E15c34E211A")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0xdeaddeaddeaddeaddeaddeaddeaddeaddead1111"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1827:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mantleConfig=void 0;const r=n(20),i=n(130),a=n(148);t.mantleConfig={basePath:"https://mantle-api.rarible.org",chainId:5e3,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x0e7B24d73e45B639A5cF674C5f2Bb02930716f87"),openseaV1:r.ZERO_ADDRESS,wrapper:r.ZERO_ADDRESS,looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xA3AaA33E13Bd42fE5cBDefC72fB0a0888cfB44C0"),erc20:(0,r.toAddress)("0x5274ac9507b20aC14e215B098479bd69733fA98A"),erc721Lazy:(0,r.toAddress)("0xc0C8d44A78605E4C221C9506DA737bB2A5dfd537"),erc1155Lazy:(0,r.toAddress)("0x2047f99EFa18009ceA518AC99cEE8e2151D53eDc"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0x465d62a669E98517e08e4E3D809A28FAF3DfbAE1"),erc1155:(0,r.toAddress)("0x16911a36a56f828f17632cD4915614Dd5c7a45e0")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0xdeaddeaddeaddeaddeaddeaddeaddeaddead1111"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1828:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arbitrumTestnetConfig=void 0;const r=n(20),i=n(130),a=n(148);t.arbitrumTestnetConfig={basePath:"https://testnet-arbitrum-api.rarible.org",chainId:421614,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x47F6d59216aAdb2e5aA6bFAf0b06d790EdC35118"),openseaV1:r.ZERO_ADDRESS,wrapper:r.ZERO_ADDRESS,looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x3049455cdA17beE43d61090Ec344624aeda72Ed6"),erc20:(0,r.toAddress)("0x2FCE8435F0455eDc702199741411dbcD1B7606cA"),erc721Lazy:(0,r.toAddress)("0x41407B447Fb5425187A9BCA3a062644EF2410F8D"),erc1155Lazy:(0,r.toAddress)("0x18a2553ef1aaE12d9cd158821319e26A62feE90E"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xE3Baf1b17335bbf3AC3C2cFCe95eC1bfC463d0c8"),erc1155:(0,r.toAddress)("0x51929e5710D9cef0EB0388b7866dF20a4598dF26")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x980b62da83eff3d4576c647993b0c1d7faf17c73"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1829:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arbitrumConfig=void 0;const r=n(20),i=n(130),a=n(148);t.arbitrumConfig={basePath:"https://arbitrum-api.rarible.org",chainId:42161,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x07b637739CAd9A5f0c487219B283a52717E69978"),openseaV1:r.ZERO_ADDRESS,wrapper:r.ZERO_ADDRESS,looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x49b4e47079d9b733B2227fa15f0762dBF707B263"),erc20:(0,r.toAddress)("0xDD28328257a2Cce3204332C747Cc350153937A1D"),erc721Lazy:(0,r.toAddress)("0x0E63021A7597B254484b7F99dDD9b319591350B6"),erc1155Lazy:(0,r.toAddress)("0x1Bea70C8c949b3b8d1188cb738432B121B83C4b5"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:r.ZERO_ADDRESS,erc1155:r.ZERO_ADDRESS},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1830:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zkSyncTestnetConfig=void 0;const r=n(20),i=n(130),a=n(148);t.zkSyncTestnetConfig={basePath:"https://testnet-zksync-api.rarible.org",chainId:300,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x99bD7BA01f9872f034a35DC4bC737cFaaaC11D63"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x0148b11891C0E30Fb36a6D646E04C7bebE7969c8"),looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x85a26E6D52239817570Ff643bA09E3AA5393A805"),erc20:(0,r.toAddress)("0x43b9B5221F513031acC62dc8B9788E608B293baD"),erc721Lazy:(0,r.toAddress)("0x11983886da3c379E507A874649C96D7EEd086c32"),erc1155Lazy:(0,r.toAddress)("0x117c152C992e8c344Ce5a84100130cd87eF6bAE6"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0x2abC8bD09c681702e2297F11fd759d9014664B33"),erc1155:(0,r.toAddress)("0xEda115D72EF1Dc96d0297278D1D241821F999927")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0xdf09a97A1CF809C335616c21c3a0EA4780F96514"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1831:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zkSyncConfig=void 0;const r=n(20),i=n(130),a=n(148);t.zkSyncConfig={basePath:"https://zksync-api.rarible.org",chainId:324,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x5E0BbEd68e1b47C94a396226D8AC10DDe242e77c"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0xEf3b8F0B7EE374F5F79BE4D43E8cbB4A7952f274"),looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xaf63698293A4c7d235CCf6F809C348D641C0bd62"),erc20:(0,r.toAddress)("0xb5986bB35a6b53cb4764951Ad83cA12fa5a51C64"),erc721Lazy:(0,r.toAddress)("0x463651f1620E411426E7eB70c3D2029106F2B6E0"),erc1155Lazy:(0,r.toAddress)("0x99e3d07C2fA7d9566bAA34e84B9DD5b8fB98961a"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xB38F451e6Cc0Ad0e7a31C6Ec5648177Ba248eE9B"),erc1155:(0,r.toAddress)("0x196e1D96e73c805ee39C766435A81fb235510939")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x8Ebe4A94740515945ad826238Fc4D56c6B8b0e60"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1832:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.chilizConfig=void 0;const r=n(20),i=n(130),a=n(148);t.chilizConfig={basePath:"https://chiliz-api.rarible.org",chainId:88888,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0xdA12E4Ab1d731F29bF4Bff8f971579D95f8DDD07"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0xEe07D8603F4A8A72B523314D0D473a6Ce93354Fe"),looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x8d5D3e1e6609A798B84160Ec9CC25198B9e4F177"),erc20:(0,r.toAddress)("0x0B7Acd053BC236fc95537e2aDD37C22968b48C1b"),erc721Lazy:(0,r.toAddress)("0x519D6A81b2894FC5e0F2a8B900F6f5CdE1132dBB"),erc1155Lazy:(0,r.toAddress)("0x726f5DD8a1fFAa349bD57501Ba760AB5A03e91Ff"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:r.ZERO_ADDRESS,erc1155:r.ZERO_ADDRESS},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x677F7e16C7Dd57be1D4C8aD1244883214953DC47"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1833:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.chilizTestnetConfig=void 0;const r=n(20),i=n(130),a=n(148);t.chilizTestnetConfig={basePath:"https://testnet-chiliz-api.rarible.org",chainId:88882,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x4c27bE9fE53227194Ff259D8906A2A1b0479A3AA"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x1fD75d68F0D0F66383F011D282890BDACE221Dc2"),looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x3d1C134ece4CFA4c44AE5D37f74dEeccBceC9031"),erc20:(0,r.toAddress)("0x8A42da3cfd53ff38E6551cc3a05F536428DaaE34"),erc721Lazy:(0,r.toAddress)("0x615fdFC73edB58d9ef09574B5284E6E6362F7f6D"),erc1155Lazy:(0,r.toAddress)("0x40785643bdD364A21aeE1d138E026e8914c98572"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xAeEfB55eD03eC5a25Fc4C84354b6C8c65Df963EA"),erc1155:(0,r.toAddress)("0x7c512F690E89CF01deb04Bc68af95b1A5f7A2504")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x678c34581db0a7808d0aC669d7025f1408C9a3C6"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1834:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lightlinkConfig=void 0;const r=n(20),i=n(130),a=n(148);t.lightlinkConfig={basePath:"https://lightlink-api.rarible.org",chainId:1890,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x5faf16A85028BE138A7178B222DeC98092FEEF97"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x0B7Acd053BC236fc95537e2aDD37C22968b48C1b"),looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xF65eF65a95821A16E02973b1C2200FA58898e3c0"),erc20:(0,r.toAddress)("0x248B46BEB66b3078D771a9E7E5a0a0216d0d07ba"),erc721Lazy:(0,r.toAddress)("0xce4bf732f53A76C463aE8822be858017b02779c8"),erc1155Lazy:(0,r.toAddress)("0x1CC22424f2B84791cb99c141A68CD2a44Cf35398"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:r.ZERO_ADDRESS,erc1155:r.ZERO_ADDRESS},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x7EbeF2A4b1B09381Ec5B9dF8C5c6f2dBECA59c73"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1835:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testnetLightlinkConfig=void 0;const r=n(20),i=n(130),a=n(148);t.testnetLightlinkConfig={basePath:"https://testnet-lightlink-api.rarible.org",chainId:1891,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x2E015B0474364757d2cc8e28897DCBCdEE07e340"),openseaV1:r.ZERO_ADDRESS,wrapper:r.ZERO_ADDRESS,looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x166F6180170f438Ddc38050a2B708d38c0890956"),erc20:(0,r.toAddress)("0x7d47126a2600E22eab9eD6CF0e515678727779A6"),erc721Lazy:(0,r.toAddress)("0x98C2d878064dCD20489214cf0866f972f91784D0"),erc1155Lazy:(0,r.toAddress)("0x12B372153249F006F756d0668fCDBD8fbD8b0a15"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xfeC0F8d936B9cBa92a332bCB06dC7DF4DdE0c253"),erc1155:(0,r.toAddress)("0x63e3297a90B4101d0a4Bb8EbEFDF3D47C8d4D4Ac")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0xF42991f02C07AB66cFEa282E7E482382aEB85461"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1836:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rariTestnetConfig=void 0;const r=n(20),i=n(130),a=n(148);t.rariTestnetConfig={basePath:"https://testnet-rari-api.rarible.org",chainId:1918988905,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x61512179F6a16bEC0D259d8010CC0485CE363868"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x3049455cdA17beE43d61090Ec344624aeda72Ed6"),looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x00C74eD067Cea48F1D6F7D00aBABa3C1D5B2598b"),erc20:(0,r.toAddress)("0xA094E566b61b3c2D88ACf7Cc15e3Dd0FA83F32af"),erc721Lazy:(0,r.toAddress)("0xB8863180CAC2d0Ab665e5968C0De25298A1D8CEe"),erc1155Lazy:(0,r.toAddress)("0xa2eEBb837aEF89369Ad117568d75348e6174520e"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0x41407B447Fb5425187A9BCA3a062644EF2410F8D"),erc1155:(0,r.toAddress)("0xc798B273FaF23932Cf11177402C10C9b44D30Da2")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x2c9dd2b2cd55266e3b5c3c95840f3c037fbcb856"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1837:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rariMainnetConfig=void 0;const r=n(20),i=n(130),a=n(148);t.rariMainnetConfig={basePath:"https://rari-api.rarible.org",chainId:1380012617,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x10CCBf49617ECB7A8262065853D6C93Ad42C3C2C"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0xd37DC0CD86Dfa9B2B57CD7DFA8B6AA0092a9517d"),looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xce4bf732f53A76C463aE8822be858017b02779c8"),erc20:(0,r.toAddress)("0x1CC22424f2B84791cb99c141A68CD2a44Cf35398"),erc721Lazy:(0,r.toAddress)("0xBCE7d7fbA750B1E9e0511C67b1F38C07EbfEFE63"),erc1155Lazy:(0,r.toAddress)("0x30fc6eed1d302F5f5C4a8aa58047d1a730b3Cc91"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xdA12E4Ab1d731F29bF4Bff8f971579D95f8DDD07"),erc1155:(0,r.toAddress)("0xEA26e060cCc11C840e6107cfca0B41c45Ce6a5a2")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0xf037540e51D71b2D2B1120e8432bA49F29EDFBD0"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1838:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zkatanaConfig=void 0;const r=n(20),i=n(130),a=n(148);t.zkatanaConfig={basePath:"https://testnet-astarzkevm-api.rarible.org",chainId:1261120,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x51D04BE44865c323fDfb065d149725995dbF05f8"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x812afFA8f77C027C8199f9aD4472111ee4a027Dc"),looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0xED2DfF3672795C89dAd8a8162026838fFd818B82"),erc20:(0,r.toAddress)("0x25646B08D9796CedA5FB8CE0105a51820740C049"),erc721Lazy:(0,r.toAddress)("0x1385a6B618f172d6735DE3e1E4222592f58b053B"),erc1155Lazy:(0,r.toAddress)("0xB4D34a10921347877B0AA7A9DB347871b20b19F5"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xA322E48aEB1bd02F0FA8D3efb81c5ff0A028995F"),erc1155:(0,r.toAddress)("0x219E31c2FFA785ce9981C15156BA2a15b1f29562")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0xD8560C88D1DC85f9ED05b25878E366c49B68bEf9"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1839:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.baseConfig=void 0;const r=n(20),i=n(130),a=n(148);t.baseConfig={basePath:"https://base-api.rarible.org",chainId:8453,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x6C65a3C3AA67b126e43F86DA85775E0F5e9743F7"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0xC699FB932c1bD7235C7ED19388f26A2428224AED"),looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x4217a346C8b48731641327b65bb6F6d3243d64e2"),erc20:(0,r.toAddress)("0x13b05523634ABb96E6017Da71b7698CAecDf50b2"),erc721Lazy:(0,r.toAddress)("0x339e61eb644A29B134D7fD3fA589C6b3ca184111"),erc1155Lazy:(0,r.toAddress)("0x5faf16A85028BE138A7178B222DeC98092FEEF97"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xF965237c6b3f89f8C62B45b94097899E3562A830"),erc1155:(0,r.toAddress)("0xd37DC0CD86Dfa9B2B57CD7DFA8B6AA0092a9517d")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x4200000000000000000000000000000000000006"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},184:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxFeesBasePointSupport=t.PayoutsSupport=t.OriginFeeSupport=void 0,function(e){e.NONE="NONE",e.AMOUNT_ONLY="AMOUNT_ONLY",e.FULL="FULL"}(t.OriginFeeSupport||(t.OriginFeeSupport={})),function(e){e.NONE="NONE",e.SINGLE="SINGLE",e.MULTIPLE="MULTIPLE"}(t.PayoutsSupport||(t.PayoutsSupport={})),function(e){e.IGNORED="IGNORED",e.REQUIRED="REQUIRED"}(t.MaxFeesBasePointSupport||(t.MaxFeesBasePointSupport={}))},1840:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.baseSepoliaConfig=void 0;const r=n(20),i=n(130),a=n(148);t.baseSepoliaConfig={basePath:"https://testnet-base-api.rarible.org",chainId:84532,exchange:{v1:r.ZERO_ADDRESS,v2:(0,r.toAddress)("0x0fE65B68Eb627c21EAF3cfe8183C4F946F3d48BD"),openseaV1:r.ZERO_ADDRESS,wrapper:(0,r.toAddress)("0x4fEB488209d2A0A71fEef28E5fA306F15b2D5FEa"),looksrare:r.ZERO_ADDRESS,looksrareV2:r.ZERO_ADDRESS,x2y2:r.ZERO_ADDRESS},transferProxies:{nft:(0,r.toAddress)("0x4f4cC63D7f2bC894078d41f284453062842Afa46"),erc20:(0,r.toAddress)("0xBc57D6e50fa760A01536A7c2EAEDD6fC9b2A4f9A"),erc721Lazy:(0,r.toAddress)("0xF1cb795B7eA59a9213a790f868104c11a14690Fa"),erc1155Lazy:(0,r.toAddress)("0xa90e536A492aef0d57e6d295FA17687c3ca93347"),openseaV1:r.ZERO_ADDRESS,cryptoPunks:r.ZERO_ADDRESS},feeConfigUrl:a.FEE_CONFIG_URL,openSea:{metadata:(0,i.id32)("RARIBLE"),proxyRegistry:r.ZERO_ADDRESS,merkleValidator:r.ZERO_ADDRESS},factories:{erc721:(0,r.toAddress)("0xB020bA7fcF43DCc59eF0103624BD6FADE66d105E"),erc1155:(0,r.toAddress)("0x166F6180170f438Ddc38050a2B708d38c0890956")},cryptoPunks:{marketContract:r.ZERO_ADDRESS,wrapperContract:r.ZERO_ADDRESS},sudoswap:{pairFactory:r.ZERO_ADDRESS,pairRouter:r.ZERO_ADDRESS},weth:(0,r.toAddress)("0x4200000000000000000000000000000000000006"),auction:r.ZERO_ADDRESS,looksrareOrderValidatorV2:r.ZERO_ADDRESS}},1841:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpsertOrder=void 0;const r=n(11),i=n(99),a=n(20),o=n(147),s=n(470),d=n(270),c=n(331),u=n(1844),l=n(295),p=n(641),y=n(471),m=(0,a.toWord)("0x0000000000000000000000000000000000000000000000000000000000000000");class f{constructor(e,t,n,a,o,s,d,c,u){this.orderFiller=e,this.send=t,this.getConfig=n,this.checkLazyOrder=a,this.approveFn=o,this.signOrder=s,this.getApis=d,this.ethereum=c,this.marketplaceMarker=u,this.upsert=i.Action.create({id:"approve",run:e=>{let{order:t,infinite:n}=e;return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.checkLazyOrder(t);return yield this.approve(e,n),e}))}}).thenStep({id:"sign",run:e=>this.upsertRequest(e)})}getOrder(e){return r.__awaiter(this,void 0,void 0,(function*(){if("order"in e)return e.order;return(yield this.getApis()).order.getValidatedOrderByHash({hash:e.orderHash})}))}getPrice(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if("price"in e)return e.price;switch(t.assetClass){case"ETH":return(0,o.toBn)(e.priceDecimal).multipliedBy(l.ETHER_IN_WEI);case"ERC20":const n=yield(0,y.createErc20Contract)((0,d.getRequiredWallet)(this.ethereum),t.contract).functionCall("decimals").call();return(0,o.toBn)(e.priceDecimal).multipliedBy((0,o.toBn)(10).pow(Number(n)));default:throw new Error("Asset type should be either ETH or ERC-20, received=".concat(JSON.stringify(t)))}}))}approve(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return r.__awaiter(this,void 0,void 0,(function*(){const n=f.orderFormToSimpleOrder(e),r=yield this.orderFiller.getOrderFee(n),i=(0,p.addFee)(e.make,r),a=this.approveFn(e.maker,i,t);return a&&(yield(0,c.waitTx)(a)),a}))}upsertRequest(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=f.orderFormToSimpleOrder(e),n=yield this.getConfig(),r=yield this.getApis();return(0,u.checkMinPaymentValue)(e,n),r.order.upsertOrder({orderForm:Object.assign(Object.assign({},e),{signature:yield this.signOrder(t)})})}))}prepareOrderForm(e,t){return r.__awaiter(this,void 0,void 0,(function*(){let n;switch(e.type){case"DATA_V2":n={dataType:"RARIBLE_V2_DATA_V2",payouts:e.payouts,originFees:e.originFees,isMakeFill:t};break;case"DATA_V3_BUY":n={dataType:"RARIBLE_V2_DATA_V3_BUY",payout:e.payout,originFeeFirst:e.originFeeFirst,originFeeSecond:e.originFeeSecond,marketplaceMarker:this.marketplaceMarker};break;case"DATA_V3_SELL":n={dataType:"RARIBLE_V2_DATA_V3_SELL",payout:e.payout,originFeeFirst:e.originFeeFirst,originFeeSecond:e.originFeeSecond,marketplaceMarker:this.marketplaceMarker,maxFeesBasePoint:e.maxFeesBasePoint};break;default:throw new Error("Unknown OrderRequest type")}return{maker:yield this.getOrderMaker(e),type:"RARIBLE_V2",data:n,salt:(0,a.toBigNumber)((0,o.toBn)((0,a.randomWord)(),16).toString(10)),signature:(0,a.toBinary)("0x"),start:e.start,end:e.end}}))}getOrderMaker(e){return r.__awaiter(this,void 0,void 0,(function*(){return e.maker?e.maker:(0,a.toAddress)(yield(0,d.getRequiredWallet)(this.ethereum).getFrom())}))}static orderFormToSimpleOrder(e){return Object.assign(Object.assign({},e),{salt:(0,a.toBinary)((0,o.toBn)(e.salt).toString(16))})}updateCryptoPunkOrder(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getOrder(e);if("CRYPTO_PUNK"!==t.type)throw new Error("can't update punk order with type: ".concat(t.type));return yield this.updateCryptoPunkOrderByContract((0,d.getRequiredWallet)(this.ethereum),t,e),function(e){return Object.assign(Object.assign({},e),{cancelled:!1,createdAt:"",fill:(0,a.toBigNumber)("0"),hash:m,lastUpdateAt:"",makeStock:e.make.value})}(t)}))}updateCryptoPunkOrderByContract(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield this.getPrice(n,{});if("CRYPTO_PUNKS"===t.make.assetType.assetClass){const n=(0,s.createCryptoPunksMarketContract)(e,t.make.assetType.contract);yield this.send(n.functionCall("offerPunkForSale",t.make.assetType.tokenId,r))}else{if("CRYPTO_PUNKS"!==t.take.assetType.assetClass)throw new Error("Crypto punks asset has not been found");{const n=(0,s.createCryptoPunksMarketContract)(e,t.take.assetType.contract);yield this.send(n.functionCall("enterBidForPunk",t.take.assetType.tokenId),{value:r.toString()})}}}))}}t.UpsertOrder=f},1844:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkMinPaymentValue=t.MIN_PAYMENT_VALUE_DECIMAL=t.MIN_PAYMENT_VALUE=t.checkGreaterThanMinPaymentValue=void 0;const r=n(101),i=n(413),a=n(554),o=n(372),s=n(295);function d(e,n){let{assetType:o,value:d}=e;if(((0,a.isETH)(o)||(0,a.isWeth)(o,n)||(0,a.isRari)(o,n))&&!(0,r.toBn)(d).gte(t.MIN_PAYMENT_VALUE))throw new i.Warning("Asset value must be greater or equal to ".concat(t.MIN_PAYMENT_VALUE.div(s.ETHER_IN_WEI).toFixed()))}t.checkGreaterThanMinPaymentValue=d,t.MIN_PAYMENT_VALUE=new r.BigNumber(10).pow(14),t.MIN_PAYMENT_VALUE_DECIMAL=t.MIN_PAYMENT_VALUE.div(s.ETHER_IN_WEI),t.checkMinPaymentValue=function(e,t){(0,o.isNft)(e.make.assetType)?d(e.take,t):(0,o.isNft)(e.take.assetType)&&d(e.make,t)}},1852:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.approveCryptoPunk=void 0;const r=n(11),i=n(470);t.approveCryptoPunk=function(e,t,n,a,o,s){return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet undefined");const r=(0,i.createCryptoPunksMarketContract)(e,n),a=yield r.functionCall("punksOfferedForSale",s).call();return a.isForSale&&a.onlySellTo.toLowerCase()===o.toLowerCase()&&"0"===a.minValue?void 0:t(r.functionCall("offerPunkForSaleToAddress",s,0,o))}))}},1853:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrderSell=void 0;const r=n(11),i=n(20),a=n(147),o=n(99),s=n(1854);t.OrderSell=class{constructor(e,t){this.upserter=e,this.checkAssetType=t,this.sell=o.Action.create({id:"approve",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getSellForm(e),n=yield this.upserter.checkLazyOrder(t);return yield this.upserter.approve(n,!1),n}))}).thenStep({id:"sign",run:e=>this.upserter.upsertRequest(e)}),this.update=o.Action.create({id:"approve",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.upserter.getOrder(e);if(!(0,s.isCurrency)(t.take.assetType))throw new Error("Make asset type should be either ETH or ERC-20 asset, received=".concat(t.make.assetType.assetClass));if("CRYPTO_PUNK"===t.type)return e;{const n=yield this.upserter.getPrice(e,t.take.assetType),r=yield this.prepareOrderUpdateForm(t,e,n),i=yield this.upserter.checkLazyOrder(r);return yield this.upserter.approve(i,!1),i}}))}).thenStep({id:"sign",run:e=>!("type"in e)||"RARIBLE_V1"!==e.type&&"RARIBLE_V2"!==e.type?this.upserter.updateCryptoPunkOrder(e):this.upserter.upsertRequest(e)})}getSellForm(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.upserter.getPrice(e,e.takeAssetType),n=yield this.upserter.prepareOrderForm(e,!0);return Object.assign(Object.assign({},n),{make:{assetType:yield this.checkAssetType(e.makeAssetType),value:(0,i.toBigNumber)(e.amount.toString())},take:{assetType:e.takeAssetType,value:(0,i.toBigNumber)((0,a.toBn)(t).multipliedBy(e.amount).toString())}})}))}prepareOrderUpdateForm(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){if("RARIBLE_V1"===e.type||"RARIBLE_V2"===e.type){if(!t.end&&!e.end)throw new Error("Order should contains 'end' field");return Object.assign(Object.assign({},e),{take:{assetType:e.take.assetType,value:(0,i.toBigNumber)((0,a.toBn)(n).multipliedBy(e.make.value).toString())},salt:(0,i.toBigNumber)((0,a.toBn)(e.salt,16).toString(10)),signature:e.signature||(0,i.toBinary)("0x"),end:t.end||e.end})}throw new Error("Unsupported order type: ".concat(e.type))}))}}},1854:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCurrency=void 0,t.isCurrency=function(e){switch(e.assetClass){case"ERC20":case"ETH":return!0;default:return!1}}},1859:function(e,t){},1861:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.hashLegacyOrder=void 0;const r=n(411),i=n(1078);t.hashLegacyOrder=function(t,n){if("RARIBLE_V1"!==n.type)throw new Error("Not supported type: ".concat(n.type));const a=n.data;if("LEGACY"!==a.dataType)throw new Error("Not supported data type: ".concat(a.dataType));const s=(0,i.toLegacyAssetType)(n.make.assetType),d=(0,i.toLegacyAssetType)(n.take.assetType),c={key:{owner:n.maker,salt:n.salt,sellAsset:s,buyAsset:d},selling:n.make.value,buying:n.take.value,sellerFee:a.fee},u=t.encodeParameter({Order:o},c);return"0x".concat((0,r.keccak256)(e.from(u.substring(2),"hex")).toString("hex"))};const a={token:"address",tokenId:"uint256",assetType:"uint8"},o={key:{owner:"address",salt:"uint256",sellAsset:a,buyAsset:a},selling:"uint256",buying:"uint256",sellerFee:"uint256"}}).call(this,n(7).Buffer)},1862:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIP712_ORDER_TYPES=t.EIP712_DOMAIN_TEMPLATE=t.EIP712_ORDER_TYPE=t.EIP712_ORDER_VERSION=t.EIP712_ORDER_NAME=void 0,t.EIP712_ORDER_NAME="Exchange",t.EIP712_ORDER_VERSION="2",t.EIP712_ORDER_TYPE="Order",t.EIP712_DOMAIN_TEMPLATE={name:t.EIP712_ORDER_NAME,version:t.EIP712_ORDER_VERSION},t.EIP712_ORDER_TYPES={EIP712Domain:[{type:"string",name:"name"},{type:"string",name:"version"},{type:"uint256",name:"chainId"},{type:"address",name:"verifyingContract"}],AssetType:[{name:"assetClass",type:"bytes4"},{name:"data",type:"bytes"}],Asset:[{name:"assetType",type:"AssetType"},{name:"value",type:"uint256"}],Order:[{name:"maker",type:"address"},{name:"makeAsset",type:"Asset"},{name:"taker",type:"address"},{name:"takeAsset",type:"Asset"},{name:"salt",type:"uint256"},{name:"start",type:"uint256"},{name:"end",type:"uint256"},{name:"dataType",type:"bytes4"},{name:"data",type:"bytes"}]}},1863:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrderBid=void 0;const r=n(11),i=n(147),a=n(99),o=n(20);t.OrderBid=class{constructor(e,t){this.upserter=e,this.checkAssetType=t,this.bid=a.Action.create({id:"approve",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if("ERC20"!==e.makeAssetType.assetClass)throw new Error("Make asset type should be ERC-20, received=".concat(e.makeAssetType.assetClass));const t=yield this.getBidForm(e),n=yield this.upserter.checkLazyOrder(t);return{checked:n,approveTx:yield this.upserter.approve(n,!0)}}))}).thenStep({id:"sign",run:e=>r.__awaiter(this,void 0,void 0,(function*(){return{approveTx:e.approveTx,order:yield this.upserter.upsertRequest(e.checked)}}))}),this.update=a.Action.create({id:"approve",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.upserter.getOrder(e);if("CRYPTO_PUNK"===t.type)return{form:e,approveTx:void 0};if("ERC20"!==t.make.assetType.assetClass)throw new Error("Make asset type should be ERC-20, received=".concat(t.make.assetType.assetClass));const n=yield this.upserter.getPrice(e,t.make.assetType),r=yield this.prepareOrderUpdateForm(t,e,n),i=yield this.upserter.checkLazyOrder(r);return{form:i,approveTx:yield this.upserter.approve(i,!0)}}))}).thenStep({id:"sign",run:e=>r.__awaiter(this,void 0,void 0,(function*(){return!("type"in e.form)||"RARIBLE_V1"!==e.form.type&&"RARIBLE_V2"!==e.form.type?{approveTx:e.approveTx,order:yield this.upserter.updateCryptoPunkOrder(e.form)}:{approveTx:e.approveTx,order:yield this.upserter.upsertRequest(e.form)}}))})}getBidForm(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.upserter.prepareOrderForm(e,!1),n=yield this.upserter.getPrice(e,e.makeAssetType);return Object.assign(Object.assign({},t),{make:{assetType:e.makeAssetType,value:(0,o.toBigNumber)((0,i.toBn)(n).multipliedBy(e.amount).toString())},take:{assetType:yield this.checkAssetType(e.takeAssetType),value:(0,o.toBigNumber)(e.amount.toString())}})}))}prepareOrderUpdateForm(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){if("RARIBLE_V1"===e.type||"RARIBLE_V2"===e.type){if(!t.end&&!e.end)throw new Error("Order should contains 'end' field");return Object.assign(Object.assign({},e),{make:{assetType:e.make.assetType,value:(0,o.toBigNumber)((0,i.toBn)(n).multipliedBy(e.take.value).toString())},salt:(0,o.toBigNumber)((0,i.toBn)(e.salt,16).toString(10)),signature:e.signature||(0,o.toBinary)("0x"),end:t.end||e.end})}throw new Error("Unsupported order type: ".concat(e.type))}))}}},1864:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(11);r.__exportStar(n(815),t),r.__exportStar(n(1865),t),r.__exportStar(n(1866),t)},1865:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkLazyAsset=void 0;const r=n(11);t.checkLazyAsset=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){return{assetType:yield e(t.assetType),value:t.value}}))}},1866:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkLazyOrder=void 0;const r=n(11);t.checkLazyOrder=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=yield function(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield e(t);return"ERC1155_LAZY"!==(i=r.assetType).assetClass&&"ERC721_LAZY"!==i.assetClass||r.assetType.creators[0].account!==n?t:r;var i}))}(e,t.make,t.maker),i=yield e(t.take);return Object.assign(Object.assign({},t),{make:n,take:i})}))}},2012:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestURI=t.mintOffChain=void 0;const r=n(11),i=n(20),a=n(1082),o=n(295),s=n(1083),d=n(558),c=n(1084),u=n(559),l=n(414),p=n(643);function y(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if("ERC721"===t.collection.type){const n=yield(0,u.getErc721Contract)(e,l.ERC721VersionEnum.ERC721V3,t.collection.id),r=yield n.functionCall("baseURI").call();return(0,a.sanitizeUri)(r,t.uri)}if("ERC1155"===t.collection.type){const n=yield(0,p.getErc1155Contract)(e,l.ERC1155VersionEnum.ERC1155V2,t.collection.id),r=yield n.functionCall("baseURI").call();return(0,a.sanitizeUri)(r,t.uri)}throw new Error("Wrong collection type")}))}t.mintOffChain=function(e,t,n,a,u){return r.__awaiter(this,void 0,void 0,(function*(){if("POLYGON"===(0,o.getBlockchainFromChainId)(yield e.getChainId()))throw new Error("Off-chain mint not supported for Polygon");const r=yield(0,c.getCreators)(u,e),{tokenId:l}=yield(0,s.getTokenId)(n,u.collection.id,r[0].account,u.nftTokenId),p=function(e,t,n){const r={contract:e.collection.id,uri:e.uri,royalties:e.royalties||[],creators:t,tokenId:n};if("supply"in e)return Object.assign({},r,{"@type":"ERC1155",supply:(0,i.toBigNumber)(e.supply.toString())});return Object.assign({},r,{"@type":"ERC721"})}(Object.assign(Object.assign({},u),{uri:yield y(e,u)}),r,l),m=yield a.mintNftAsset({lazyNft:Object.assign({},p,{tokenId:l,signatures:[yield t(p)]})});return{type:d.MintResponseTypeEnum.OFF_CHAIN,item:m,owner:r[0].account,tokenId:l,contract:m.contract,itemId:"".concat(m.contract,":").concat(l)}}))},t.getRequestURI=y},2013:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc721v3Abi=void 0,t.erc721v3Abi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"}],name:"CreateERC721Rarible",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"}],name:"CreateERC721RaribleUser",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],indexed:!1,internalType:"struct LibPart.Part[]",name:"creators",type:"tuple[]"}],name:"Creators",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"hasApproval",type:"bool"}],name:"DefaultApproval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],indexed:!1,internalType:"struct LibPart.Part[]",name:"royalties",type:"tuple[]"}],name:"RoyaltiesSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"baseURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"contractURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getCreators",outputs:[{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getRaribleV2Royalties",outputs:[{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"tokenURI",type:"string"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"creators",type:"tuple[]"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"royalties",type:"tuple[]"},{internalType:"bytes[]",name:"signatures",type:"bytes[]"}],internalType:"struct LibERC721LazyMint.Mint721Data",name:"data",type:"tuple"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"}],name:"transferFromOrMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"}],name:"updateAccount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address[]",name:"operators",type:"address[]"}],name:"__ERC721RaribleUser_init",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address",name:"transferProxy",type:"address"},{internalType:"address",name:"lazyTransferProxy",type:"address"}],name:"__ERC721Rarible_init",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"tokenURI",type:"string"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"creators",type:"tuple[]"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"royalties",type:"tuple[]"},{internalType:"bytes[]",name:"signatures",type:"bytes[]"}],internalType:"struct LibERC721LazyMint.Mint721Data",name:"data",type:"tuple"},{internalType:"address",name:"to",type:"address"}],name:"mintAndTransfer",outputs:[],stateMutability:"nonpayable",type:"function"}]},2014:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc721v2Abi=void 0,t.erc721v2Abi=[{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"address",name:"newOwner",type:"address"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"string",name:"tokenURIPrefix",type:"string"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"address[]",name:"recipients",type:"address[]"},{indexed:!1,internalType:"uint256[]",name:"bps",type:"uint256[]"}],name:"SecondarySaleFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burn",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contractURI",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],name:"fees",outputs:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getFeeBps",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getFeeRecipients",outputs:[{internalType:"address payable[]",name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"isOwner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"tokenURIPrefix",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"},{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct ERC721Base.Fee[]",name:"_fees",type:"tuple[]"},{internalType:"string",name:"tokenURI",type:"string"}],name:"mint",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"tokenURIPrefix",type:"string"}],name:"setTokenURIPrefix",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"contractURI",type:"string"}],name:"setContractURI",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},2015:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc721v1Abi=void 0,t.erc721v1Abi=[{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"contractURIPrefix",type:"string"},{internalType:"string",name:"tokenURIPrefix",type:"string"},{internalType:"address",name:"signer",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"}],name:"Create",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"SignerAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"SignerRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burn",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contractURI",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contractURIPrefix",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"isOwner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"account",type:"address"}],name:"isSigner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"renounceSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"tokenURIPrefix",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"},{internalType:"string",name:"tokenURI",type:"string"}],name:"mint",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"account",type:"address"}],name:"addSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"account",type:"address"}],name:"removeSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"tokenURIPrefix",type:"string"}],name:"setTokenURIPrefix",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"contractURIPrefix",type:"string"}],name:"setContractURIPrefix",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},2016:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc1155v2Abi=void 0,t.erc1155v2Abi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"}],name:"CreateERC1155Rarible",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"}],name:"CreateERC1155RaribleUser",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],indexed:!1,internalType:"struct LibPart.Part[]",name:"creators",type:"tuple[]"}],name:"Creators",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"hasApproval",type:"bool"}],name:"DefaultApproval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],indexed:!1,internalType:"struct LibPart.Part[]",name:"royalties",type:"tuple[]"}],name:"RoyaltiesSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Supply",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"baseURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"burnBatch",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"contractURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],name:"creators",outputs:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"getCreators",outputs:[{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getRaribleV2Royalties",outputs:[{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"tokenURI",type:"string"},{internalType:"uint256",name:"supply",type:"uint256"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"creators",type:"tuple[]"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"royalties",type:"tuple[]"},{internalType:"bytes[]",name:"signatures",type:"bytes[]"}],internalType:"struct LibERC1155LazyMint.Mint1155Data",name:"data",type:"tuple"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFromOrMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"}],name:"updateAccount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address[]",name:"operators",type:"address[]"}],name:"__ERC1155RaribleUser_init",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address",name:"transferProxy",type:"address"},{internalType:"address",name:"lazyTransferProxy",type:"address"}],name:"__ERC1155Rarible_init",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"tokenURI",type:"string"},{internalType:"uint256",name:"supply",type:"uint256"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"creators",type:"tuple[]"},{components:[{internalType:"address payable",name:"account",type:"address"},{internalType:"uint96",name:"value",type:"uint96"}],internalType:"struct LibPart.Part[]",name:"royalties",type:"tuple[]"},{internalType:"bytes[]",name:"signatures",type:"bytes[]"}],internalType:"struct LibERC1155LazyMint.Mint1155Data",name:"data",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"mintAndTransfer",outputs:[],stateMutability:"nonpayable",type:"function"}]},2017:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc1155v1Abi=void 0,t.erc1155v1Abi=[{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"address",name:"signer",type:"address"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"string",name:"tokenURIPrefix",type:"string"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_owner",type:"address"},{indexed:!0,internalType:"address",name:"_operator",type:"address"},{indexed:!1,internalType:"bool",name:"_approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"}],name:"CreateERC1155_v1",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"address[]",name:"recipients",type:"address[]"},{indexed:!1,internalType:"uint256[]",name:"bps",type:"uint256[]"}],name:"SecondarySaleFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"SignerAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"SignerRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_operator",type:"address"},{indexed:!0,internalType:"address",name:"_from",type:"address"},{indexed:!0,internalType:"address",name:"_to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"_ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"_values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_operator",type:"address"},{indexed:!0,internalType:"address",name:"_from",type:"address"},{indexed:!0,internalType:"address",name:"_to",type:"address"},{indexed:!1,internalType:"uint256",name:"_id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"_value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"_value",type:"string"},{indexed:!0,internalType:"uint256",name:"_id",type:"uint256"}],name:"URI",type:"event"},{constant:!1,inputs:[{internalType:"address",name:"account",type:"address"}],name:"addSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address[]",name:"_owners",type:"address[]"},{internalType:"uint256[]",name:"_ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"burn",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contractURI",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"creators",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],name:"fees",outputs:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getFeeBps",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getFeeRecipients",outputs:[{internalType:"address payable[]",name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"isOwner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"account",type:"address"}],name:"isSigner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"account",type:"address"}],name:"removeSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"renounceSigner",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256[]",name:"_ids",type:"uint256[]"},{internalType:"uint256[]",name:"_values",type:"uint256[]"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256",name:"_id",type:"uint256"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_operator",type:"address"},{internalType:"bool",name:"_approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"contractURI",type:"string"}],name:"setContractURI",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"tokenURIPrefix",type:"string"}],name:"setTokenURIPrefix",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"tokenURIPrefix",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"_id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"},{components:[{internalType:"address payable",name:"recipient",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct ERC1155Base.Fee[]",name:"fees",type:"tuple[]"},{internalType:"uint256",name:"supply",type:"uint256"},{internalType:"string",name:"uri",type:"string"}],name:"mint",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},2018:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transfer=void 0;const r=n(11),i=n(20),a=n(147),o=n(820),s=n(2019),d=n(2020),c=n(2021),u=n(2022);t.transfer=function(e,t,n,l,p,y,m){return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet undefined");const r=(0,i.toAddress)(yield e.getFrom()),f=yield l(),h=yield f.nftOwnership.getNftOwnershipByIdRaw({ownershipId:(0,o.getOwnershipId)(p.contract,(0,i.toBigNumber)("".concat(p.tokenId)),r)});if(200!==h.status)throw new Error("Address ".concat(r," has not any ownerships of token with Id ").concat(p.tokenId));{const o=yield n(p);if((0,a.toBn)(h.value.lazyValue).gt(0)){if("CRYPTO_PUNKS"===o.assetClass)throw new Error("CRYPTO_PUNKS can't be lazy");if("COLLECTION"===o.assetClass)throw new Error("Transfer asset class cannot be as collection");return(0,c.transferNftLazy)(e,t,f.nftItem,o,(0,i.toAddress)(r),y,m)}switch(o.assetClass){case"ERC721":return(0,s.transferErc721)(e,t,o.contract,r,y,o.tokenId);case"ERC1155":return(0,d.transferErc1155)(e,t,o.contract,r,y,o.tokenId,m||"1");case"CRYPTO_PUNKS":return(0,u.transferCryptoPunk)(e,t,o.contract,y,o.tokenId);default:throw new Error("Not supported asset: ".concat(JSON.stringify(o)))}}}))}},2019:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transferErc721=void 0;const r=n(11),i=n(556);t.transferErc721=function(e,t,n,a,o,s){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,i.createErc721Contract)(e,n);return t(r.functionCall("safeTransferFrom",a,o,s))}))}},2020:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transferErc1155=void 0;const r=n(11),i=n(557);function a(e,t,n,a,o,s,d){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,i.createErc1155Contract)(e,n);return Array.isArray(s)&&Array.isArray(d)?t(r.functionCall("safeBatchTransferFrom",a,o,s,d,"0x00")):t(r.functionCall("safeTransferFrom",a,o,s,d,"0x00"))}))}t.transferErc1155=function(e,t,n,i,o,s,d){return r.__awaiter(this,void 0,void 0,(function*(){if(Array.isArray(s)&&Array.isArray(d)){if(s.length===d.length)return a(e,t,n,i,o,s,d);throw new Error("Length of token amounts and token id's isn't equal")}return a(e,t,n,i,o,s,d)}))}},2021:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transferNftLazy=void 0;const r=n(11),i=n(559),a=n(414),o=n(643);t.transferNftLazy=function(e,t,n,s,d,c,u){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield n.getNftLazyItemById({itemId:"".concat(s.contract,":").concat(s.tokenId)}),l={tokenId:r.tokenId,tokenURI:r.uri,creators:r.creators,royalties:r.royalties,signatures:r.signatures};switch("ERC1155"===r["@type"]&&(l.supply=r.supply),r["@type"]){case"ERC721":{const n=yield(0,i.getErc721Contract)(e,a.ERC721VersionEnum.ERC721V3,r.contract);return t(n.functionCall("transferFromOrMint",l,d,c))}case"ERC1155":{const n=yield(0,o.getErc1155Contract)(e,a.ERC1155VersionEnum.ERC1155V2,r.contract);return t(n.functionCall("transferFromOrMint",l,d,c,u))}default:return Promise.reject(new Error("Unsupported nft standard"))}}))}},2022:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transferCryptoPunk=void 0;const r=n(11),i=n(470);t.transferCryptoPunk=function(e,t,n,a,o){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,i.createCryptoPunksMarketContract)(e,n);return t(r.functionCall("transferPunk",a,o))}))}},2023:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signNft=void 0;const r=n(11),i=n(20),a=n(2024);function o(e,t,n){switch(n){case"ERC721":return Object.assign(Object.assign({},a.EIP721_DOMAIN_NFT_TEMPLATE),{chainId:e,verifyingContract:t});case"ERC1155":return Object.assign(Object.assign({},a.EIP1155_DOMAIN_NFT_TEMPLATE),{chainId:e,verifyingContract:t});default:throw new Error("Unexpected")}}t.signNft=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet undefined");const r=yield t();switch(n["@type"]){case"ERC721":{const t=o(r.chainId,n.contract,"ERC721"),s={types:a.EIP721_NFT_TYPES,domain:t,primaryType:a.EIP721_NFT_TYPE,message:Object.assign(Object.assign({},n),{tokenURI:n.uri})},d=yield e.signTypedData(s);if(!d)throw new Error("signNft error: signedData is empty (".concat(d,"), data=").concat(JSON.stringify(s)));return(0,i.toBinary)(d)}case"ERC1155":{const t=o(r.chainId,n.contract,"ERC1155"),s={types:a.EIP1155_NFT_TYPES,domain:t,primaryType:a.EIP1155_NFT_TYPE,message:Object.assign(Object.assign({},n),{tokenURI:n.uri})},d=yield e.signTypedData(s);if(!d)throw new Error("signNft error: signedData=".concat(d,", data=").concat(JSON.stringify(s)));return(0,i.toBinary)(d)}default:throw new Error("Unexpected")}}))}},2024:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIP1155_DOMAIN_NFT_TEMPLATE=t.EIP1155_DOMAIN_NFT_VERSION=t.EIP1155_DOMAIN_NFT_NAME=t.EIP1155_NFT_TYPE=t.EIP721_DOMAIN_NFT_TEMPLATE=t.EIP721_DOMAIN_NFT_VERSION=t.EIP721_DOMAIN_NFT_NAME=t.EIP1155_NFT_TYPES=t.EIP721_NFT_TYPES=t.NFT_DOMAIN_TYPE=t.EIP721_NFT_TYPE=void 0,t.EIP721_NFT_TYPE="Mint721",t.NFT_DOMAIN_TYPE=[{type:"string",name:"name"},{type:"string",name:"version"},{type:"uint256",name:"chainId"},{type:"address",name:"verifyingContract"}],t.EIP721_NFT_TYPES={EIP712Domain:t.NFT_DOMAIN_TYPE,Part:[{name:"account",type:"address"},{name:"value",type:"uint96"}],Mint721:[{name:"tokenId",type:"uint256"},{name:"tokenURI",type:"string"},{name:"creators",type:"Part[]"},{name:"royalties",type:"Part[]"}]},t.EIP1155_NFT_TYPES={EIP712Domain:t.NFT_DOMAIN_TYPE,Part:[{name:"account",type:"address"},{name:"value",type:"uint96"}],Mint1155:[{name:"tokenId",type:"uint256"},{name:"supply",type:"uint256"},{name:"tokenURI",type:"string"},{name:"creators",type:"Part[]"},{name:"royalties",type:"Part[]"}]},t.EIP721_DOMAIN_NFT_NAME="Mint721",t.EIP721_DOMAIN_NFT_VERSION="1",t.EIP721_DOMAIN_NFT_TEMPLATE={name:t.EIP721_DOMAIN_NFT_NAME,version:t.EIP721_DOMAIN_NFT_VERSION},t.EIP1155_NFT_TYPE="Mint1155",t.EIP1155_DOMAIN_NFT_NAME="Mint1155",t.EIP1155_DOMAIN_NFT_VERSION="1",t.EIP1155_DOMAIN_NFT_TEMPLATE={name:t.EIP1155_DOMAIN_NFT_NAME,version:t.EIP1155_DOMAIN_NFT_VERSION}},2025:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.burn=void 0;const r=n(11),i=n(20),a=n(101),o=n(820),s=n(1085),d=n(559),c=n(414),u=n(643);t.burn=function(e,t,n,l,p){var y;return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet undefined");const r=yield n(p.assetType),m=(0,i.toAddress)(yield e.getFrom()),f=yield l(),h=yield f.nftOwnership.getNftOwnershipByIdRaw({ownershipId:(0,o.getOwnershipId)(p.assetType.contract,(0,i.toBigNumber)("".concat(p.assetType.tokenId)),m)});if(200===h.status){const n=(0,a.toBn)(h.value.lazyValue);if(n.gt(0)){if(!n.isEqualTo(h.value.value))throw new Error("Unable to burn lazy minted item");const t=p.creators&&p.creators.length?null===(y=p.creators)||void 0===y?void 0:y.map((e=>e.account)):[m],r=yield e.personalSign("I would like to burn my ".concat(p.assetType.tokenId," item."));if(!r)throw new Error("burn error: personal signature is empty (".concat(r,")"));return f.nftItem.deleteLazyMintNftAsset({itemId:(0,s.createItemId)(p.assetType.contract,(0,i.toBigNumber)("".concat(p.assetType.tokenId))),burnLazyNftForm:{creators:t,signatures:[(0,i.toBinary)(r)]}})}switch(r.assetClass){case"ERC721":{const n=yield(0,d.getErc721Contract)(e,c.ERC721VersionEnum.ERC721V2,r.contract);return t(n.functionCall("burn",r.tokenId))}case"ERC1155":if(p.amount){const n=yield(0,u.getErc1155Contract)(e,c.ERC1155VersionEnum.ERC1155V1,r.contract),i=yield e.getFrom();return t(n.functionCall("burn",i,r.tokenId,p.amount))}throw new Error("amount is ".concat(p.amount,". Amount for burn ERC1155 is required"));default:throw new Error("Unexpected asset class")}}throw new Error("Ownership is not found")}))}},2026:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getApis=t.createEthereumApis=void 0;const r=n(11),i=r.__importStar(n(373)),a=n(413),o=n(2027),s=n(295);function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,o.getApiConfig)(e,Object.assign({headers:"string"===typeof t.apiKey?{"X-API-KEY":t.apiKey}:{},exceptionHandler:(e,t,n)=>r.__awaiter(this,void 0,void 0,(function*(){var r;throw new a.NetworkError({status:-1,url:decodeURIComponent(t),formData:null===(r=null===n||void 0===n?void 0:n.body)||void 0===r?void 0:r.toString(),method:null===n||void 0===n?void 0:n.method,data:{message:e.message}})}))},t)),s=new i.Configuration(n);return{nftItem:new i.NftItemControllerApi(s),nftOwnership:new i.NftOwnershipControllerApi(s),order:new i.OrderControllerApi(s),orderActivity:new i.OrderActivityControllerApi(s),orderSignature:new i.OrderSignatureControllerApi(s),orderSettings:new i.OrderSettingsControllerApi(s),nftCollection:new i.NftCollectionControllerApi(s),balances:new i.BalanceControllerApi(s),gateway:new i.GatewayControllerApi(s),nftLazyMint:new i.NftLazyMintControllerApi(s),auction:new i.AuctionControllerApi(s)}}t.createEthereumApis=d,t.getApis=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){let r;if(e){const t=yield e.getChainId();r=(0,s.getNetworkFromChainId)(t)}else r=t;return d(r,Object.assign(Object.assign({},(null===n||void 0===n?void 0:n.apiClientParams)||{}),{apiKey:null===n||void 0===n?void 0:n.apiKey}))}))}},2027:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getApiConfig=void 0;const r=n(553);t.getApiConfig=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,r.getEthereumConfig)(e);return Object.assign({basePath:n.basePath},t)}},2028:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitForReceipt=t.waitForConfirmation=t.waitForHash=t.sentTxConfirm=t.sentTx=t.getSimpleSendWithInjects=t.getSendWithInjects=void 0;const r=n(11),i=n(821),a=n(822),o=n(2047);function s(e){return{hash:e.hash,data:e.data,from:e.from,to:e.to}}function d(e){return r.__awaiter(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{e.once("transactionHash",(e=>t(e))),e.once("error",(e=>n(e)))}))}))}function c(e){return r.__awaiter(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{e.once("confirmation",((e,n)=>t(n.transactionHash))),e.once("error",(e=>n(e)))}))}))}t.getSendWithInjects=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).logger;return function(t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield t.getCallInfo();yield(0,o.estimateGas)(t,{from:r.from,value:null===n||void 0===n?void 0:n.value},e);try{const a=yield t.send(n);try{(null===e||void 0===e?void 0:e.level)&&e.level>=i.LogsLevel.TRACE&&e.instance.raw({level:"TRACE",method:r.method,message:JSON.stringify(s(a)),args:JSON.stringify(r.args),provider:r.provider,to:r.contract,value:null===n||void 0===n?void 0:n.value})}catch(d){console.error("Error while sending logs",d)}return a}catch(c){try{if((null===e||void 0===e?void 0:e.level)&&e.level>=i.LogsLevel.ERROR){let i;try{i=yield t.getData()}catch(d){console.error("Unable to get tx data for log",d)}e.instance.raw({level:"ERROR",method:r.method,message:(0,a.getErrorMessageString)(c),from:r.from,provider:r.provider,args:JSON.stringify(r.args),to:r.contract,value:null===n||void 0===n?void 0:n.value,data:i})}}catch(d){console.error("Error while sending logs",d,c)}throw c}}))}},t.getSimpleSendWithInjects=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).logger;return function(t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield t.getCallInfo();try{yield(0,o.estimateGas)(t,{from:r.from,value:null===n||void 0===n?void 0:n.value},e)}catch(d){}try{const a=yield t.send(n);try{(null===e||void 0===e?void 0:e.level)&&e.level>=i.LogsLevel.TRACE&&e.instance.raw({level:"TRACE",method:r.method,from:r.from,provider:r.provider,args:JSON.stringify(r.args),message:JSON.stringify(s(a)),to:r.contract,value:null===n||void 0===n?void 0:n.value})}catch(c){console.error("Error while sending logs",c)}return a}catch(d){try{(null===e||void 0===e?void 0:e.level)&&e.level>=i.LogsLevel.ERROR&&r&&e.instance.raw({level:"ERROR",method:r.method,from:r.from,provider:r.provider,args:JSON.stringify(r.args),error:(0,a.getErrorMessageString)(d),to:r.contract,value:null===n||void 0===n?void 0:n.value})}catch(c){console.error("Error while sending logs",c,d)}throw d}}))}},t.sentTx=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){return d(e.send(Object.assign(Object.assign({},t),{gas:3e6})))}))},t.sentTxConfirm=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){return c(e.send(Object.assign(Object.assign({},t),{gas:3e6})))}))},t.waitForHash=d,t.waitForConfirmation=c,t.waitForReceipt=function(e){return r.__awaiter(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{e.once("receipt",(e=>t(e))),e.once("error",(e=>n(e)))}))}))}},2046:function(e){e.exports=JSON.parse('{"name":"@rarible/protocol-ethereum-sdk","version":"0.13.68-fix.7","keywords":["axios","typescript","openapi","openapi-generator","api_documentation"],"license":"Apache-2.0","main":"build/index.js","types":"build/index.d.ts","files":["build","umd","typings.d.ts"],"scripts":{"clean":"rimraf ./build ./umd","build":"run-s build:*","build:ts":"tsc --project tsconfig-build.json","build:umd":"webpack","verify":"tsc --noEmit --project tsconfig-build.json","test":"jest --runInBand --silent --forceExit"},"dependencies":{"@rarible/action":"~0.9.1","@rarible/ethereum-api-client":"^0.1.26-beta3","@rarible/ethereum-provider":"^0.13.67","@rarible/logger":"^0.9.12","@rarible/sdk-common":"^0.13.68-fix.7","@rarible/utils":"~0.9.10","eth-sig-util":"^3.0.0","ethereumjs-util":"^7.1.0","exponential-backoff":"^3.1.0","merkletreejs":"^0.2.31"},"devDependencies":{"@rarible/ethereum-sdk-test-common":"^0.13.68-fix.7","@rarible/ethers-ethereum":"^0.13.68-fix.7","@rarible/test-provider":"~0.5.0","@rarible/web3-ethereum":"^0.13.68-fix.7","@types/jest":"27.0.2","@types/node-fetch":"^2.5.11","buffer":"^6.0.3","ethers":"~5.4.4","form-data":"^4.0.0","identity-obj-proxy":"^3.0.0","jest":"^27.3.1","jest-junit":"^15.0.0","node-polyfill-webpack-plugin":"^1.1.4","npm-run-all":"^4.1.5","process":"^0.11.10","stream-browserify":"^3.0.0","ts-jest":"^27.0.7","webpack":"^5.68.0","webpack-cli":"^4.9.2"},"peerDependencies":{"axios":"^0.26.1","tslib":"^2.3.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"gitHead":"e1a77d6596ee3286e6f2d7c1db5f69489c10f10c"}')},2047:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.estimateGas=void 0;const r=n(11),i=n(821),a=n(822);t.estimateGas=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){try{return yield e.estimateGas(t)}catch(r){try{const s=yield e.getCallInfo();if((null===n||void 0===n?void 0:n.level)&&n.level>=i.LogsLevel.ERROR){let i;try{i=yield e.getData()}catch(o){console.error("Unable to get tx data for log",o)}const d={level:"ESTIMATE_GAS_ERRORS",method:"".concat(s.method,".estimateGas"),message:(0,a.getErrorMessageString)(r),from:s.from,provider:s.provider,args:JSON.stringify(s.args),to:s.contract,value:null===t||void 0===t?void 0:t.value,data:i};console.error(d),n.instance.raw(d)}}catch(o){console.error("Error while sending logs",o,r)}throw r}}))}},2048:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelLooksRareV2Order=t.cancelLooksRareOrder=t.cancelSeaportOrder=t.cancelCryptoPunkOrderByAsset=t.cancelCryptoPunksOrder=t.cancelX2Y2Order=t.cancelOpenseaOrderV1=t.cancel=void 0;const r=n(11),i=n(20),a=n(645),o=n(470),s=n(270),d=n(1095),c=n(1096),u=n(1097),l=n(1098),p=n(825),y=n(812),m=n(1100),f=n(826),h=n(2098),b=n(2099),T=n(830),v=n(1105);function g(e,t,n){const r=(0,u.createOpenseaContract)(e,n.data.exchange),i=(0,m.convertOpenSeaOrderToDTO)(e,n),o=(0,a.toVrs)(n.signature||"0x");return t(r.functionCall("cancelOrder_",(0,p.getAtomicMatchArgAddresses)(i),(0,p.getAtomicMatchArgUints)(i),i.feeMethod,i.side,i.saleKind,i.howToCall,i.calldata,i.replacementPattern,i.staticExtradata,o.v,o.r,o.s))}function E(e,t,n,a,o){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,i.toBigNumber)("3"),s=(0,b.createX2Y2Contract)(e,a),d="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",c=(u=(yield n.orderSignature.cancelSignX2Y2({x2Y2GetCancelInputRequest:{orderId:o.data.orderId,op:r,caller:yield e.getFrom(),sign:yield e.personalSign(d),signMessage:d}})).input,e.decodeParameter({components:[{name:"itemHashes",type:"bytes32[]"},{name:"deadline",type:"uint256"},{name:"v",type:"uint8"},{name:"r",type:"bytes32"},{name:"s",type:"bytes32"}],name:"data",type:"tuple"},u)[0]);var u;return t(s.functionCall("cancel",c.itemHashes,c.deadline,c.v,c.r,c.s))}))}function _(e,t,n){if("CRYPTO_PUNKS"===n.make.assetType.assetClass)return O(e,t,"punkNoLongerForSale",n.make.assetType);if("CRYPTO_PUNKS"===n.take.assetType.assetClass)return O(e,t,"withdrawBidForPunk",n.take.assetType);throw new Error("Crypto punks asset has not been found")}function O(e,t,n,r){return t((0,o.createCryptoPunksMarketContract)(e,r.contract).functionCall(n,r.tokenId))}function A(e,t,n,a){return r.__awaiter(this,void 0,void 0,(function*(){if(!a.signature||"0x"===a.signature){const{signature:e}=yield n.orderSignature.getSeaportOrderSignature({hash:a.hash});a.signature=e}const r=(0,f.convertAPIOrderToSeaport)(a).parameters,o=(0,T.getSeaportContract)(e,(0,i.toAddress)(a.data.protocol));return t(o.functionCall("cancel",[r]))}))}function w(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,s.getRequiredWallet)(e);if(!n.looksrare)throw new Error("Looksrare contract did not specified");const a=(0,h.createLooksrareExchange)(r,n.looksrare);return t(a.functionCall("cancelMultipleMakerOrders",[i.data.nonce]))}))}function k(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,s.getRequiredWallet)(e);if(!n.looksrareV2)throw new Error("Looksrare contract did not specified");const a=(0,v.createLooksrareV2Exchange)(r,n.looksrareV2);return t(a.functionCall("cancelOrderNonces",[i.data.orderNonce]))}))}t.cancel=function(e,t,n,i,a,o){return r.__awaiter(this,void 0,void 0,(function*(){const s=yield i(),u=yield a();if(t){const i=yield e(o);switch(i.type){case"RARIBLE_V1":return function(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,d.createExchangeV1Contract)(e,n);return t(r.functionCall("cancel",(0,l.toStructLegacyOrderKey)(i)))}))}(t,n,s.exchange.v1,i);case"RARIBLE_V2":return function(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,c.createExchangeV2Contract)(e,n);return t(r.functionCall("cancel",(0,y.orderToStruct)(e,i)))}))}(t,n,s.exchange.v2,i);case"OPEN_SEA_V1":return g(t,n,i);case"SEAPORT_V1":return A(t,n,u,i);case"LOOKSRARE":return w(t,n,s.exchange,i);case"LOOKSRARE_V2":return k(t,n,s.exchange,i);case"CRYPTO_PUNK":return _(t,n,i);case"X2Y2":return E(t,n,u,s.exchange.x2y2,i);default:throw new Error("Unsupported order: ".concat(JSON.stringify(i)))}}throw new Error("Wallet undefined")}))},t.cancelOpenseaOrderV1=g,t.cancelX2Y2Order=E,t.cancelCryptoPunksOrder=_,t.cancelCryptoPunkOrderByAsset=O,t.cancelSeaportOrder=A,t.cancelLooksRareOrder=w,t.cancelLooksRareV2Order=k},2057:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.proxyRegistryAbi=t.createOpenseaProxyRegistryEthContract=void 0,t.createOpenseaProxyRegistryEthContract=function(e,n){return e.createContract(t.proxyRegistryAbi,n)},t.proxyRegistryAbi=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"initialAddressSet",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"addr",type:"address"}],name:"endGrantAuthentication",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"addr",type:"address"}],name:"revokeAuthentication",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"pending",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"contracts",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"delegateProxyImplementation",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"proxies",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"addr",type:"address"}],name:"startGrantAuthentication",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"registerProxy",outputs:[{name:"proxy",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"DELAY_PERIOD",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"previousOwner",type:"address"}],name:"OwnershipRenounced",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"previousOwner",type:"address"},{indexed:!0,name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{constant:!1,inputs:[{name:"authAddress",type:"address"}],name:"grantInitialAuthentication",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},2058:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merkleValidatorAbi=t.createMerkleValidatorContract=void 0,t.createMerkleValidatorContract=function(e,n){return e.createContract(t.merkleValidatorAbi,n)},t.merkleValidatorAbi=[{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"contract IERC721",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"matchERC721UsingCriteria",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"contract IERC721",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"matchERC721WithSafeTransferUsingCriteria",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"contract IERC1155",name:"token",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"matchERC1155UsingCriteria",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}]},2059:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrderOpenSeaV1DataV1HowToCall=t.OrderOpenSeaV1DataV1SaleKind=t.OrderOpenSeaV1DataV1Side=t.OrderOpenSeaV1DataV1FeeMethod=void 0,function(e){e[e.PROTOCOL_FEE=0]="PROTOCOL_FEE",e[e.SPLIT_FEE=1]="SPLIT_FEE"}(t.OrderOpenSeaV1DataV1FeeMethod||(t.OrderOpenSeaV1DataV1FeeMethod={})),function(e){e[e.BUY=0]="BUY",e[e.SELL=1]="SELL"}(t.OrderOpenSeaV1DataV1Side||(t.OrderOpenSeaV1DataV1Side={})),function(e){e[e.FIXED_PRICE=0]="FIXED_PRICE",e[e.DUTCH_AUCTION=1]="DUTCH_AUCTION"}(t.OrderOpenSeaV1DataV1SaleKind||(t.OrderOpenSeaV1DataV1SaleKind={})),function(e){e[e.CALL=0]="CALL",e[e.DELEGATE_CALL=1]="DELEGATE_CALL"}(t.OrderOpenSeaV1DataV1HowToCall||(t.OrderOpenSeaV1DataV1HowToCall={}))},2060:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMarketIdByOpenseaContract=t.prepareSeaportExchangeData=void 0;const r=n(11),i=n(101),a=n(20),o=n(294),s=n(416),d=n(332),c=n(647),u=n(554),l=n(271),p=n(826),y=n(648),m=n(1102),f=n(649),h=n(2092),b=n(830);function T(e){if((0,c.compareCaseInsensitive)(e,l.CROSS_CHAIN_SEAPORT_V1_4_ADDRESS))return s.ExchangeWrapperOrderType.SEAPORT_V14;if((0,c.compareCaseInsensitive)(e,l.CROSS_CHAIN_SEAPORT_ADDRESS))return s.ExchangeWrapperOrderType.SEAPORT_ADVANCED_ORDERS;if((0,c.compareCaseInsensitive)(e,l.CROSS_CHAIN_SEAPORT_V1_5_ADDRESS))return s.ExchangeWrapperOrderType.SEAPORT_V15;throw new Error("Unrecognized opensea protocol contract")}t.prepareSeaportExchangeData=function(e,t,n,s){let{unitsToFill:c,encodedFeesValue:v,totalFeeBasisPoints:g,disableCheckingBalances:E}=s;return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,b.getSeaportContract)(e,(0,a.toAddress)(n.data.protocol)),r=(0,p.convertAPIOrderToSeaport)(n),s=yield e.getFrom(),{parameters:_}=r,{offerer:O,offer:A,consideration:w}=_,k=l.NO_CONDUIT,C=(0,l.getConduitByKey)(_.conduitKey,n.data.protocol),S=(0,l.getConduitByKey)(k,n.data.protocol),I=s,R=[],x=[],[P,B,j]=yield Promise.all([(0,y.getBalancesAndApprovals)({ethereum:e,owner:O,items:A,criterias:R,operator:C}),(0,y.getBalancesAndApprovals)({ethereum:e,owner:s,items:[...A,...w],criterias:[...R,...x],operator:S}),t.functionCall("getOrderStatus",(0,m.getOrderHash)(_)).call()]),F={totalFilled:(0,i.toBn)(j.totalFilled),totalSize:(0,i.toBn)(j.totalSize),isValidated:j.isValidated,isCancelled:j.isCancelled},M=(0,f.validateAndSanitizeFromOrderStatus)(r,F),D={startTime:M.parameters.startTime,endTime:M.parameters.endTime,currentBlockTimestamp:Math.floor(Date.now()/1e3),ascendingAmountTimestampBuffer:300},N=yield(0,h.getFulfillAdvancedOrderWrapperData)({order:M,unitsToFill:c,totalSize:F.totalSize,totalFilled:F.totalFilled,offerCriteria:R,considerationCriteria:x,tips:[],extraData:"0x",seaportAddress:(0,a.toAddress)(l.CROSS_CHAIN_SEAPORT_ADDRESS),offererBalancesAndApprovals:P,fulfillerBalancesAndApprovals:B,offererOperator:C,fulfillerOperator:S,timeBasedItemParams:D,conduitKey:k,recipientAddress:I,seaportContract:t,disableCheckingBalances:E}),L=(0,d.calcValueWithFees)((0,o.toBigNumber)(N.value),g),V=(0,i.toBn)(n.take.value).div(n.make.value).multipliedBy(c||1).toFixed();return{data:{marketId:T(n.data.protocol),amount:(0,i.toBn)(V).toFixed(),fees:v,data:N.data},options:{value:(0,u.isETH)(n.take.assetType)?L.toString():"0"}}}))},t.getMarketIdByOpenseaContract=T},2061:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.balanceOf=void 0;const r=n(11),i=n(20),a=n(101),o=n(471),s=n(556),d=n(557),c=n(272),u=n(271);t.balanceOf=(e,t,n,l)=>r.__awaiter(void 0,void 0,void 0,(function*(){if((0,c.isErc721Item)(n.itemType)){const r=(0,s.createErc721Contract)(e,(0,i.toAddress)(n.token));if(n.itemType===u.ItemType.ERC721_WITH_CRITERIA){if(l){const e=yield r.functionCall("ownerOf",l.identifier).call();return(0,a.toBn)(Number(e.toLowerCase()===t.toLowerCase()))}return(0,a.toBn)(yield r.functionCall("balanceOf",t).call())}const o=yield r.functionCall("ownerOf",n.identifierOrCriteria).call();return(0,a.toBn)(Number(o.toLowerCase()===t.toLowerCase()))}if((0,c.isErc1155Item)(n.itemType)){const r=(0,d.createErc1155Contract)(e,(0,i.toAddress)(n.token));if(n.itemType===u.ItemType.ERC1155_WITH_CRITERIA){if(!l){const e=(0,a.toBn)(n.startAmount),t=(0,a.toBn)(n.endAmount);return e.gt(t)?e:t}return(0,a.toBn)(yield r.functionCall("balanceOf",t,l.identifier).call())}return(0,a.toBn)(yield r.functionCall("balanceOf",t,n.identifierOrCriteria).call())}if((0,c.isErc20Item)(n.itemType)){const r=(0,o.createErc20Contract)(e,(0,i.toAddress)(n.token));return(0,a.toBn)(yield r.functionCall("balanceOf",t).call())}return(0,a.toBn)(yield e.getBalance((0,i.toAddress)(t)))}))},2062:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleTree=t.hashIdentifier=void 0;const r=n(11).__importDefault(n(2063)),i=n(411),a=n(101);t.hashIdentifier=t=>(0,i.keccak256)(e.from((0,a.toBn)(t).toString(16).padStart(64,"0"),"hex"));t.MerkleTree=class{constructor(e){this.tree=new r.default(e.map(t.hashIdentifier),i.keccak256,{sort:!0})}getProof(e){return this.tree.getHexProof((0,t.hashIdentifier)(e))}getRoot(){return this.tree.getRoot().toString("hex")?this.tree.getHexRoot():"0"}}}).call(this,n(7).Buffer)},2092:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFulfillAdvancedOrderWrapperData=void 0;const r=n(11),i=n(20),a=n(650),o=n(272),s=n(648),d=n(649),c=n(560);t.getFulfillAdvancedOrderWrapperData=function(e){let{order:t,unitsToFill:n=0,totalSize:u,totalFilled:l,offerCriteria:p,considerationCriteria:y,tips:m=[],extraData:f,offererBalancesAndApprovals:h,fulfillerBalancesAndApprovals:b,offererOperator:T,fulfillerOperator:v,timeBasedItemParams:g,conduitKey:E,recipientAddress:_,seaportContract:O,disableCheckingBalances:A}=e;var w;return r.__awaiter(this,void 0,void 0,(function*(){const e=n?(0,a.mapOrderAmountsFromUnitsToFill)(t,{unitsToFill:n,totalSize:u}):(0,a.mapOrderAmountsFromFilledStatus)(t,{totalFilled:l,totalSize:u}),{parameters:{offer:r,consideration:k}}=e,C=[...k,...m],S=r.filter((e=>{let{itemType:t}=e;return(0,o.isCriteriaItem)(t)})),I=C.filter((e=>{let{itemType:t}=e;return(0,o.isCriteriaItem)(t)})),R=S.length>0||I.length>0;if(S.length!==p.length||I.length!==y.length)throw new Error("You must supply the appropriate criterias for criteria based items");const x=null===(w=(0,o.getSummedTokenAndIdentifierAmounts)({items:C,criterias:y,timeBasedItemParams:Object.assign(Object.assign({},g),{isConsiderationItem:!0})})[i.ZERO_ADDRESS])||void 0===w?void 0:w[0];(0,s.validateStandardFulfillBalancesAndApprovals)({offer:r,consideration:C,offerCriteria:p,considerationCriteria:y,offererBalancesAndApprovals:h,fulfillerBalancesAndApprovals:b,timeBasedItemParams:g,offererOperator:T,fulfillerOperator:v,disableCheckingBalances:A});const P=Object.assign(Object.assign({},t),{parameters:Object.assign(Object.assign({},t.parameters),{consideration:[...t.parameters.consideration,...m],totalOriginalConsiderationItems:k.length})}),{numerator:B,denominator:j}=(0,d.getAdvancedOrderNumeratorDenominator)(t,n),F=[Object.assign(Object.assign({},P),{numerator:B,denominator:j,extraData:null!==f&&void 0!==f?f:"0x"}),R?(0,c.generateCriteriaResolvers)({orders:[t],offerCriterias:[p],considerationCriterias:[y]}):[],E,_];return{data:yield O.functionCall("fulfillAdvancedOrder",...F).getData(),value:(null===x||void 0===x?void 0:x.toFixed())||"0"}}))}},2093:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeaportABIv14=t.createSeaportV14Contract=void 0,t.createSeaportV14Contract=function(e,n){return e.createContract(t.SeaportABIv14,n)},t.SeaportABIv14=[{inputs:[{internalType:"address",name:"conduitController",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"BadContractSignature",type:"error"},{inputs:[],name:"BadFraction",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"BadReturnValueFromERC20OnTransfer",type:"error"},{inputs:[{internalType:"uint8",name:"v",type:"uint8"}],name:"BadSignatureV",type:"error"},{inputs:[],name:"CannotCancelOrder",type:"error"},{inputs:[],name:"ConsiderationCriteriaResolverOutOfRange",type:"error"},{inputs:[],name:"ConsiderationLengthNotEqualToTotalOriginal",type:"error"},{inputs:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"considerationIndex",type:"uint256"},{internalType:"uint256",name:"shortfallAmount",type:"uint256"}],name:"ConsiderationNotMet",type:"error"},{inputs:[],name:"CriteriaNotEnabledForItem",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"identifiers",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"ERC1155BatchTransferGenericFailure",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"EtherTransferGenericFailure",type:"error"},{inputs:[],name:"InexactFraction",type:"error"},{inputs:[],name:"InsufficientEtherSupplied",type:"error"},{inputs:[],name:"Invalid1155BatchTransferEncoding",type:"error"},{inputs:[],name:"InvalidBasicOrderParameterEncoding",type:"error"},{inputs:[{internalType:"address",name:"conduit",type:"address"}],name:"InvalidCallToConduit",type:"error"},{inputs:[{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"address",name:"conduit",type:"address"}],name:"InvalidConduit",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"InvalidContractOrder",type:"error"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"InvalidERC721TransferAmount",type:"error"},{inputs:[],name:"InvalidFulfillmentComponentData",type:"error"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"InvalidMsgValue",type:"error"},{inputs:[],name:"InvalidNativeOfferItem",type:"error"},{inputs:[],name:"InvalidProof",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"InvalidRestrictedOrder",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"InvalidSigner",type:"error"},{inputs:[{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"InvalidTime",type:"error"},{inputs:[{internalType:"uint256",name:"fulfillmentIndex",type:"uint256"}],name:"MismatchedFulfillmentOfferAndConsiderationComponents",type:"error"},{inputs:[{internalType:"enum Side",name:"side",type:"uint8"}],name:"MissingFulfillmentComponentOnAggregation",type:"error"},{inputs:[],name:"MissingItemAmount",type:"error"},{inputs:[],name:"MissingOriginalConsiderationItems",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"NoContract",type:"error"},{inputs:[],name:"NoReentrantCalls",type:"error"},{inputs:[],name:"NoSpecifiedOrdersAvailable",type:"error"},{inputs:[],name:"OfferAndConsiderationRequiredOnFulfillment",type:"error"},{inputs:[],name:"OfferCriteriaResolverOutOfRange",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderAlreadyFilled",type:"error"},{inputs:[{internalType:"enum Side",name:"side",type:"uint8"}],name:"OrderCriteriaResolverOutOfRange",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderIsCancelled",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderPartiallyFilled",type:"error"},{inputs:[],name:"PartialFillsNotEnabledForOrder",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"TokenTransferGenericFailure",type:"error"},{inputs:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"considerationIndex",type:"uint256"}],name:"UnresolvedConsiderationCriteria",type:"error"},{inputs:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"offerIndex",type:"uint256"}],name:"UnresolvedOfferCriteria",type:"error"},{inputs:[],name:"UnusedItemParameters",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"newCounter",type:"uint256"},{indexed:!0,internalType:"address",name:"offerer",type:"address"}],name:"CounterIncremented",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"offerer",type:"address"},{indexed:!0,internalType:"address",name:"zone",type:"address"}],name:"OrderCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"offerer",type:"address"},{indexed:!0,internalType:"address",name:"zone",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],indexed:!1,internalType:"struct SpentItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],indexed:!1,internalType:"struct ReceivedItem[]",name:"consideration",type:"tuple[]"}],name:"OrderFulfilled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],indexed:!1,internalType:"struct OrderParameters",name:"orderParameters",type:"tuple"}],name:"OrderValidated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32[]",name:"orderHashes",type:"bytes32[]"}],name:"OrdersMatched",type:"event"},{inputs:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"counter",type:"uint256"}],internalType:"struct OrderComponents[]",name:"orders",type:"tuple[]"}],name:"cancel",outputs:[{internalType:"bool",name:"cancelled",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"uint120",name:"numerator",type:"uint120"},{internalType:"uint120",name:"denominator",type:"uint120"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes",name:"extraData",type:"bytes"}],internalType:"struct AdvancedOrder",name:"advancedOrder",type:"tuple"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"enum Side",name:"side",type:"uint8"},{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"bytes32[]",name:"criteriaProof",type:"bytes32[]"}],internalType:"struct CriteriaResolver[]",name:"criteriaResolvers",type:"tuple[]"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"}],name:"fulfillAdvancedOrder",outputs:[{internalType:"bool",name:"fulfilled",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"uint120",name:"numerator",type:"uint120"},{internalType:"uint120",name:"denominator",type:"uint120"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes",name:"extraData",type:"bytes"}],internalType:"struct AdvancedOrder[]",name:"advancedOrders",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"enum Side",name:"side",type:"uint8"},{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"bytes32[]",name:"criteriaProof",type:"bytes32[]"}],internalType:"struct CriteriaResolver[]",name:"criteriaResolvers",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"offerFulfillments",type:"tuple[][]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"considerationFulfillments",type:"tuple[][]"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"maximumFulfilled",type:"uint256"}],name:"fulfillAvailableAdvancedOrders",outputs:[{internalType:"bool[]",name:"availableOrders",type:"bool[]"},{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order[]",name:"orders",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"offerFulfillments",type:"tuple[][]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"considerationFulfillments",type:"tuple[][]"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"uint256",name:"maximumFulfilled",type:"uint256"}],name:"fulfillAvailableOrders",outputs:[{internalType:"bool[]",name:"availableOrders",type:"bool[]"},{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"considerationToken",type:"address"},{internalType:"uint256",name:"considerationIdentifier",type:"uint256"},{internalType:"uint256",name:"considerationAmount",type:"uint256"},{internalType:"address payable",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{internalType:"address",name:"offerToken",type:"address"},{internalType:"uint256",name:"offerIdentifier",type:"uint256"},{internalType:"uint256",name:"offerAmount",type:"uint256"},{internalType:"enum BasicOrderType",name:"basicOrderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"offererConduitKey",type:"bytes32"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalAdditionalRecipients",type:"uint256"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct AdditionalRecipient[]",name:"additionalRecipients",type:"tuple[]"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct BasicOrderParameters",name:"parameters",type:"tuple"}],name:"fulfillBasicOrder",outputs:[{internalType:"bool",name:"fulfilled",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"}],name:"fulfillOrder",outputs:[{internalType:"bool",name:"fulfilled",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"contractOfferer",type:"address"}],name:"getContractOffererNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"offerer",type:"address"}],name:"getCounter",outputs:[{internalType:"uint256",name:"counter",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"counter",type:"uint256"}],internalType:"struct OrderComponents",name:"order",type:"tuple"}],name:"getOrderHash",outputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"getOrderStatus",outputs:[{internalType:"bool",name:"isValidated",type:"bool"},{internalType:"bool",name:"isCancelled",type:"bool"},{internalType:"uint256",name:"totalFilled",type:"uint256"},{internalType:"uint256",name:"totalSize",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"incrementCounter",outputs:[{internalType:"uint256",name:"newCounter",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"information",outputs:[{internalType:"string",name:"version",type:"string"},{internalType:"bytes32",name:"domainSeparator",type:"bytes32"},{internalType:"address",name:"conduitController",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"uint120",name:"numerator",type:"uint120"},{internalType:"uint120",name:"denominator",type:"uint120"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes",name:"extraData",type:"bytes"}],internalType:"struct AdvancedOrder[]",name:"orders",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"enum Side",name:"side",type:"uint8"},{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"bytes32[]",name:"criteriaProof",type:"bytes32[]"}],internalType:"struct CriteriaResolver[]",name:"criteriaResolvers",type:"tuple[]"},{components:[{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"offerComponents",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"considerationComponents",type:"tuple[]"}],internalType:"struct Fulfillment[]",name:"fulfillments",type:"tuple[]"},{internalType:"address",name:"recipient",type:"address"}],name:"matchAdvancedOrders",outputs:[{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order[]",name:"orders",type:"tuple[]"},{components:[{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"offerComponents",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"considerationComponents",type:"tuple[]"}],internalType:"struct Fulfillment[]",name:"fulfillments",type:"tuple[]"}],name:"matchOrders",outputs:[{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"contractName",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order[]",name:"orders",type:"tuple[]"}],name:"validate",outputs:[{internalType:"bool",name:"validated",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},2094:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeaportABI=t.createSeaportContract=void 0,t.createSeaportContract=function(e,n){return e.createContract(t.SeaportABI,n)},t.SeaportABI=[{inputs:[{internalType:"address",name:"conduitController",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"BadContractSignature",type:"error"},{inputs:[],name:"BadFraction",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"BadReturnValueFromERC20OnTransfer",type:"error"},{inputs:[{internalType:"uint8",name:"v",type:"uint8"}],name:"BadSignatureV",type:"error"},{inputs:[],name:"ConsiderationCriteriaResolverOutOfRange",type:"error"},{inputs:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"considerationIndex",type:"uint256"},{internalType:"uint256",name:"shortfallAmount",type:"uint256"}],name:"ConsiderationNotMet",type:"error"},{inputs:[],name:"CriteriaNotEnabledForItem",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"identifiers",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"ERC1155BatchTransferGenericFailure",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"EtherTransferGenericFailure",type:"error"},{inputs:[],name:"InexactFraction",type:"error"},{inputs:[],name:"InsufficientEtherSupplied",type:"error"},{inputs:[],name:"InvalidBasicOrderParameterEncoding",type:"error"},{inputs:[{internalType:"address",name:"conduit",type:"address"}],name:"InvalidCallToConduit",type:"error"},{inputs:[],name:"InvalidCanceller",type:"error"},{inputs:[{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"address",name:"conduit",type:"address"}],name:"InvalidConduit",type:"error"},{inputs:[],name:"InvalidERC721TransferAmount",type:"error"},{inputs:[],name:"InvalidFulfillmentComponentData",type:"error"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"InvalidMsgValue",type:"error"},{inputs:[],name:"InvalidProof",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"InvalidRestrictedOrder",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"InvalidSigner",type:"error"},{inputs:[],name:"InvalidTime",type:"error"},{inputs:[],name:"MismatchedFulfillmentOfferAndConsiderationComponents",type:"error"},{inputs:[{internalType:"enum Side",name:"side",type:"uint8"}],name:"MissingFulfillmentComponentOnAggregation",type:"error"},{inputs:[],name:"MissingItemAmount",type:"error"},{inputs:[],name:"MissingOriginalConsiderationItems",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"NoContract",type:"error"},{inputs:[],name:"NoReentrantCalls",type:"error"},{inputs:[],name:"NoSpecifiedOrdersAvailable",type:"error"},{inputs:[],name:"OfferAndConsiderationRequiredOnFulfillment",type:"error"},{inputs:[],name:"OfferCriteriaResolverOutOfRange",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderAlreadyFilled",type:"error"},{inputs:[],name:"OrderCriteriaResolverOutOfRange",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderIsCancelled",type:"error"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderPartiallyFilled",type:"error"},{inputs:[],name:"PartialFillsNotEnabledForOrder",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"TokenTransferGenericFailure",type:"error"},{inputs:[],name:"UnresolvedConsiderationCriteria",type:"error"},{inputs:[],name:"UnresolvedOfferCriteria",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"newCounter",type:"uint256"},{indexed:!0,internalType:"address",name:"offerer",type:"address"}],name:"CounterIncremented",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"offerer",type:"address"},{indexed:!0,internalType:"address",name:"zone",type:"address"}],name:"OrderCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"offerer",type:"address"},{indexed:!0,internalType:"address",name:"zone",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],indexed:!1,internalType:"struct SpentItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],indexed:!1,internalType:"struct ReceivedItem[]",name:"consideration",type:"tuple[]"}],name:"OrderFulfilled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"offerer",type:"address"},{indexed:!0,internalType:"address",name:"zone",type:"address"}],name:"OrderValidated",type:"event"},{inputs:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"counter",type:"uint256"}],internalType:"struct OrderComponents[]",name:"orders",type:"tuple[]"}],name:"cancel",outputs:[{internalType:"bool",name:"cancelled",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"uint120",name:"numerator",type:"uint120"},{internalType:"uint120",name:"denominator",type:"uint120"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes",name:"extraData",type:"bytes"}],internalType:"struct AdvancedOrder",name:"advancedOrder",type:"tuple"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"enum Side",name:"side",type:"uint8"},{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"bytes32[]",name:"criteriaProof",type:"bytes32[]"}],internalType:"struct CriteriaResolver[]",name:"criteriaResolvers",type:"tuple[]"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"}],name:"fulfillAdvancedOrder",outputs:[{internalType:"bool",name:"fulfilled",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"uint120",name:"numerator",type:"uint120"},{internalType:"uint120",name:"denominator",type:"uint120"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes",name:"extraData",type:"bytes"}],internalType:"struct AdvancedOrder[]",name:"advancedOrders",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"enum Side",name:"side",type:"uint8"},{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"bytes32[]",name:"criteriaProof",type:"bytes32[]"}],internalType:"struct CriteriaResolver[]",name:"criteriaResolvers",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"offerFulfillments",type:"tuple[][]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"considerationFulfillments",type:"tuple[][]"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"maximumFulfilled",type:"uint256"}],name:"fulfillAvailableAdvancedOrders",outputs:[{internalType:"bool[]",name:"availableOrders",type:"bool[]"},{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order[]",name:"orders",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"offerFulfillments",type:"tuple[][]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[][]",name:"considerationFulfillments",type:"tuple[][]"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"uint256",name:"maximumFulfilled",type:"uint256"}],name:"fulfillAvailableOrders",outputs:[{internalType:"bool[]",name:"availableOrders",type:"bool[]"},{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"considerationToken",type:"address"},{internalType:"uint256",name:"considerationIdentifier",type:"uint256"},{internalType:"uint256",name:"considerationAmount",type:"uint256"},{internalType:"address payable",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{internalType:"address",name:"offerToken",type:"address"},{internalType:"uint256",name:"offerIdentifier",type:"uint256"},{internalType:"uint256",name:"offerAmount",type:"uint256"},{internalType:"enum BasicOrderType",name:"basicOrderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"offererConduitKey",type:"bytes32"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalAdditionalRecipients",type:"uint256"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct AdditionalRecipient[]",name:"additionalRecipients",type:"tuple[]"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct BasicOrderParameters",name:"parameters",type:"tuple"}],name:"fulfillBasicOrder",outputs:[{internalType:"bool",name:"fulfilled",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"fulfillerConduitKey",type:"bytes32"}],name:"fulfillOrder",outputs:[{internalType:"bool",name:"fulfilled",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"offerer",type:"address"}],name:"getCounter",outputs:[{internalType:"uint256",name:"counter",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"counter",type:"uint256"}],internalType:"struct OrderComponents",name:"order",type:"tuple"}],name:"getOrderHash",outputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"getOrderStatus",outputs:[{internalType:"bool",name:"isValidated",type:"bool"},{internalType:"bool",name:"isCancelled",type:"bool"},{internalType:"uint256",name:"totalFilled",type:"uint256"},{internalType:"uint256",name:"totalSize",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"incrementCounter",outputs:[{internalType:"uint256",name:"newCounter",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"information",outputs:[{internalType:"string",name:"version",type:"string"},{internalType:"bytes32",name:"domainSeparator",type:"bytes32"},{internalType:"address",name:"conduitController",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"uint120",name:"numerator",type:"uint120"},{internalType:"uint120",name:"denominator",type:"uint120"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes",name:"extraData",type:"bytes"}],internalType:"struct AdvancedOrder[]",name:"advancedOrders",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"enum Side",name:"side",type:"uint8"},{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"bytes32[]",name:"criteriaProof",type:"bytes32[]"}],internalType:"struct CriteriaResolver[]",name:"criteriaResolvers",type:"tuple[]"},{components:[{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"offerComponents",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"considerationComponents",type:"tuple[]"}],internalType:"struct Fulfillment[]",name:"fulfillments",type:"tuple[]"}],name:"matchAdvancedOrders",outputs:[{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order[]",name:"orders",type:"tuple[]"},{components:[{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"offerComponents",type:"tuple[]"},{components:[{internalType:"uint256",name:"orderIndex",type:"uint256"},{internalType:"uint256",name:"itemIndex",type:"uint256"}],internalType:"struct FulfillmentComponent[]",name:"considerationComponents",type:"tuple[]"}],internalType:"struct Fulfillment[]",name:"fulfillments",type:"tuple[]"}],name:"matchOrders",outputs:[{components:[{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifier",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ReceivedItem",name:"item",type:"tuple"},{internalType:"address",name:"offerer",type:"address"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"}],internalType:"struct Execution[]",name:"executions",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"contractName",type:"string"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"offerer",type:"address"},{internalType:"address",name:"zone",type:"address"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"}],internalType:"struct OfferItem[]",name:"offer",type:"tuple[]"},{components:[{internalType:"enum ItemType",name:"itemType",type:"uint8"},{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"identifierOrCriteria",type:"uint256"},{internalType:"uint256",name:"startAmount",type:"uint256"},{internalType:"uint256",name:"endAmount",type:"uint256"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct ConsiderationItem[]",name:"consideration",type:"tuple[]"},{internalType:"enum OrderType",name:"orderType",type:"uint8"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"bytes32",name:"zoneHash",type:"bytes32"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes32",name:"conduitKey",type:"bytes32"},{internalType:"uint256",name:"totalOriginalConsiderationItems",type:"uint256"}],internalType:"struct OrderParameters",name:"parameters",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct Order[]",name:"orders",type:"tuple[]"}],name:"validate",outputs:[{internalType:"bool",name:"validated",type:"bool"}],stateMutability:"nonpayable",type:"function"}]},2095:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getfulfillBasicOrderData=void 0;const r=n(11),i=n(20),a=n(272),o=n(271);t.getfulfillBasicOrderData=function(e){let{order:t,timeBasedItemParams:n,tips:d=[],conduitKey:c=o.NO_CONDUIT,seaportContract:u}=e;var l,p;return r.__awaiter(this,void 0,void 0,(function*(){const{offer:e,consideration:r}=t.parameters,o=[...r,...d],y=e[0],[m,...f]=o,h=null===(l=s[y.itemType])||void 0===l?void 0:l[m.itemType];if(void 0===h)throw new Error("Order parameters did not result in a valid basic fulfillment");const b=f.map((e=>{let{startAmount:t,recipient:n}=e;return{amount:t,recipient:n}})),T=o.filter((t=>t.itemType!==e[0].itemType)),v=null===(p=(0,a.getSummedTokenAndIdentifierAmounts)({items:T,criterias:[],timeBasedItemParams:Object.assign(Object.assign({},n),{isConsiderationItem:!0})})[i.ZERO_ADDRESS])||void 0===p?void 0:p[0],g={offerer:t.parameters.offerer,offererConduitKey:t.parameters.conduitKey,zone:t.parameters.zone,basicOrderType:t.parameters.orderType+4*h,offerToken:y.token,offerIdentifier:y.identifierOrCriteria,offerAmount:y.endAmount,considerationToken:m.token,considerationIdentifier:m.identifierOrCriteria,considerationAmount:m.endAmount,startTime:t.parameters.startTime,endTime:t.parameters.endTime,salt:t.parameters.salt,totalOriginalAdditionalRecipients:t.parameters.consideration.length-1,signature:t.signature,fulfillerConduitKey:c,additionalRecipients:b,zoneHash:t.parameters.zoneHash},E=u.functionCall("fulfillBasicOrder",g);return console.log("fulfillBasicOrder",JSON.stringify(g,null," ")),{functionCall:E,options:{value:null===v||void 0===v?void 0:v.toString()}}}))};const s={[o.ItemType.ERC20]:{[o.ItemType.ERC721]:o.BasicOrderRouteType.ERC721_TO_ERC20,[o.ItemType.ERC1155]:o.BasicOrderRouteType.ERC1155_TO_ERC20},[o.ItemType.ERC721]:{[o.ItemType.NATIVE]:o.BasicOrderRouteType.ETH_TO_ERC721,[o.ItemType.ERC20]:o.BasicOrderRouteType.ERC20_TO_ERC721},[o.ItemType.ERC1155]:{[o.ItemType.NATIVE]:o.BasicOrderRouteType.ETH_TO_ERC1155,[o.ItemType.ERC20]:o.BasicOrderRouteType.ERC20_TO_ERC1155}}},2096:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getApprovalActions=t.approvedItemAmount=void 0;const r=n(11),i=n(20),a=n(101),o=n(471),s=n(556),d=n(557),c=n(331),u=n(272),l=n(271);t.approvedItemAmount=(e,t,n,d)=>r.__awaiter(void 0,void 0,void 0,(function*(){if((0,u.isErc721Item)(n.itemType)||(0,u.isErc1155Item)(n.itemType)){const r=(0,s.createErc721Contract)(e,(0,i.toAddress)(n.token));return(yield r.functionCall("isApprovedForAll",t,d).call())?l.MAX_INT:(0,a.toBn)(0)}if(n.itemType===l.ItemType.ERC20){const r=(0,o.createErc20Contract)(e,(0,i.toAddress)(n.token));return yield r.functionCall("allowance",t,d).call()}return l.MAX_INT})),t.getApprovalActions=function(e,t,n,a){return Promise.all(n.filter(((e,t)=>t===n.length-1||n[t+1].token!==e.token)).map((n=>{let{token:c,operator:p,itemType:y}=n;return r.__awaiter(this,void 0,void 0,(function*(){if((0,u.isErc721Item)(y)){const n=(0,s.createErc721Contract)(e,(0,i.toAddress)(c));return t(n.functionCall("setApprovalForAll",p,!0))}if((0,u.isErc1155Item)(y)){const n=(0,d.createErc1155Contract)(e,(0,i.toAddress)(c));return t(n.functionCall("setApprovalForAll",p,!0))}{const n=(0,o.createErc20Contract)(e,(0,i.toAddress)(c));return t(n.functionCall("approve",null!==a&&void 0!==a?a:p,l.MAX_INT.toFixed()))}}))})).map((e=>r.__awaiter(this,void 0,void 0,(function*(){return yield(0,c.waitTx)(e),e})))))}},2097:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFulfillStandardOrderData=void 0;const r=n(11),i=n(20),a=n(649),o=n(560),s=n(272),d=n(650);t.getFulfillStandardOrderData=function(e){let{order:t,unitsToFill:n=0,totalSize:c,totalFilled:u,offerCriteria:l,considerationCriteria:p,tips:y=[],extraData:m,timeBasedItemParams:f,conduitKey:h,recipientAddress:b,seaportContract:T}=e;var v;return r.__awaiter(this,void 0,void 0,(function*(){const e=n?(0,d.mapOrderAmountsFromUnitsToFill)(t,{unitsToFill:n,totalSize:c}):(0,d.mapOrderAmountsFromFilledStatus)(t,{totalFilled:u,totalSize:c}),{parameters:{offer:r,consideration:g}}=e,E=[...g,...y],_=r.filter((e=>{let{itemType:t}=e;return(0,s.isCriteriaItem)(t)})),O=E.filter((e=>{let{itemType:t}=e;return(0,s.isCriteriaItem)(t)})),A=_.length>0||O.length>0;if(_.length!==l.length||O.length!==p.length)throw new Error("You must supply the appropriate criterias for criteria based items");const w=null===(v=(0,s.getSummedTokenAndIdentifierAmounts)({items:E,criterias:p,timeBasedItemParams:Object.assign(Object.assign({},f),{isConsiderationItem:!0})})[i.ZERO_ADDRESS])||void 0===v?void 0:v[0],k=b!==i.ZERO_ADDRESS,C=Boolean(n)||A||k,S=Object.assign(Object.assign({},t),{parameters:Object.assign(Object.assign({},t.parameters),{consideration:[...t.parameters.consideration,...y],totalOriginalConsiderationItems:g.length})}),{numerator:I,denominator:R}=(0,a.getAdvancedOrderNumeratorDenominator)(t,n);if(C){return{functionCall:yield T.functionCall("fulfillAdvancedOrder",Object.assign(Object.assign({},S),{numerator:I,denominator:R,extraData:null!==m&&void 0!==m?m:"0x"}),A?(0,o.generateCriteriaResolvers)({orders:[t],offerCriterias:[l],considerationCriterias:[p]}):[],h,b),options:{value:(null===w||void 0===w?void 0:w.toFixed())||"0"}}}return{functionCall:yield T.functionCall("fulfillOrder",S,h),options:{value:(null===w||void 0===w?void 0:w.toFixed())||"0"}}}))}},2098:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LOOKSRARE_ABI=t.createLooksrareExchange=void 0,t.createLooksrareExchange=function(e,n){return e.createContract(t.LOOKSRARE_ABI,n)},t.LOOKSRARE_ABI=[{inputs:[{internalType:"address",name:"_currencyManager",type:"address"},{internalType:"address",name:"_executionManager",type:"address"},{internalType:"address",name:"_royaltyFeeManager",type:"address"},{internalType:"address",name:"_WETH",type:"address"},{internalType:"address",name:"_protocolFeeRecipient",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"newMinNonce",type:"uint256"}],name:"CancelAllOrders",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256[]",name:"orderNonces",type:"uint256[]"}],name:"CancelMultipleOrders",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"currencyManager",type:"address"}],name:"NewCurrencyManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"executionManager",type:"address"}],name:"NewExecutionManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"protocolFeeRecipient",type:"address"}],name:"NewProtocolFeeRecipient",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"royaltyFeeManager",type:"address"}],name:"NewRoyaltyFeeManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"transferSelectorNFT",type:"address"}],name:"NewTransferSelectorNFT",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"collection",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"royaltyRecipient",type:"address"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"RoyaltyPayment",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"orderNonce",type:"uint256"},{indexed:!0,internalType:"address",name:"taker",type:"address"},{indexed:!0,internalType:"address",name:"maker",type:"address"},{indexed:!0,internalType:"address",name:"strategy",type:"address"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"address",name:"collection",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"price",type:"uint256"}],name:"TakerAsk",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"orderHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"orderNonce",type:"uint256"},{indexed:!0,internalType:"address",name:"taker",type:"address"},{indexed:!0,internalType:"address",name:"maker",type:"address"},{indexed:!0,internalType:"address",name:"strategy",type:"address"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"address",name:"collection",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"price",type:"uint256"}],name:"TakerBid",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"minNonce",type:"uint256"}],name:"cancelAllOrdersForSender",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256[]",name:"orderNonces",type:"uint256[]"}],name:"cancelMultipleMakerOrders",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"currencyManager",outputs:[{internalType:"contract ICurrencyManager",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"executionManager",outputs:[{internalType:"contract IExecutionManager",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"orderNonce",type:"uint256"}],name:"isUserOrderNonceExecutedOrCancelled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bool",name:"isOrderAsk",type:"bool"},{internalType:"address",name:"taker",type:"address"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"minPercentageToAsk",type:"uint256"},{internalType:"bytes",name:"params",type:"bytes"}],internalType:"struct OrderTypes.TakerOrder",name:"takerBid",type:"tuple"},{components:[{internalType:"bool",name:"isOrderAsk",type:"bool"},{internalType:"address",name:"signer",type:"address"},{internalType:"address",name:"collection",type:"address"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"strategy",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"minPercentageToAsk",type:"uint256"},{internalType:"bytes",name:"params",type:"bytes"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct OrderTypes.MakerOrder",name:"makerAsk",type:"tuple"}],name:"matchAskWithTakerBid",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bool",name:"isOrderAsk",type:"bool"},{internalType:"address",name:"taker",type:"address"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"minPercentageToAsk",type:"uint256"},{internalType:"bytes",name:"params",type:"bytes"}],internalType:"struct OrderTypes.TakerOrder",name:"takerBid",type:"tuple"},{components:[{internalType:"bool",name:"isOrderAsk",type:"bool"},{internalType:"address",name:"signer",type:"address"},{internalType:"address",name:"collection",type:"address"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"strategy",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"minPercentageToAsk",type:"uint256"},{internalType:"bytes",name:"params",type:"bytes"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct OrderTypes.MakerOrder",name:"makerAsk",type:"tuple"}],name:"matchAskWithTakerBidUsingETHAndWETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bool",name:"isOrderAsk",type:"bool"},{internalType:"address",name:"taker",type:"address"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"minPercentageToAsk",type:"uint256"},{internalType:"bytes",name:"params",type:"bytes"}],internalType:"struct OrderTypes.TakerOrder",name:"takerAsk",type:"tuple"},{components:[{internalType:"bool",name:"isOrderAsk",type:"bool"},{internalType:"address",name:"signer",type:"address"},{internalType:"address",name:"collection",type:"address"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"strategy",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"minPercentageToAsk",type:"uint256"},{internalType:"bytes",name:"params",type:"bytes"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct OrderTypes.MakerOrder",name:"makerBid",type:"tuple"}],name:"matchBidWithTakerAsk",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFeeRecipient",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"royaltyFeeManager",outputs:[{internalType:"contract IRoyaltyFeeManager",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"transferSelectorNFT",outputs:[{internalType:"contract ITransferSelectorNFT",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_currencyManager",type:"address"}],name:"updateCurrencyManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_executionManager",type:"address"}],name:"updateExecutionManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_protocolFeeRecipient",type:"address"}],name:"updateProtocolFeeRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_royaltyFeeManager",type:"address"}],name:"updateRoyaltyFeeManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_transferSelectorNFT",type:"address"}],name:"updateTransferSelectorNFT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"userMinOrderNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}]},2099:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.X2Y2_EXCHANGE_ABI=t.createX2Y2Contract=void 0,t.createX2Y2Contract=function(e,n){return e.createContract(t.X2Y2_EXCHANGE_ABI,n)},t.X2Y2_EXCHANGE_ABI=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"itemHash",type:"bytes32"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"incentive",type:"uint256"}],name:"EvAuctionRefund",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"itemHash",type:"bytes32"}],name:"EvCancel",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"delegate",type:"address"},{indexed:!1,internalType:"bool",name:"isRemoval",type:"bool"}],name:"EvDelegate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"index",type:"uint256"},{indexed:!1,internalType:"bytes",name:"error",type:"bytes"}],name:"EvFailure",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"newValue",type:"uint256"}],name:"EvFeeCapUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"itemHash",type:"bytes32"},{indexed:!1,internalType:"address",name:"maker",type:"address"},{indexed:!1,internalType:"address",name:"taker",type:"address"},{indexed:!1,internalType:"uint256",name:"orderSalt",type:"uint256"},{indexed:!1,internalType:"uint256",name:"settleSalt",type:"uint256"},{indexed:!1,internalType:"uint256",name:"intent",type:"uint256"},{indexed:!1,internalType:"uint256",name:"delegateType",type:"uint256"},{indexed:!1,internalType:"uint256",name:"deadline",type:"uint256"},{indexed:!1,internalType:"contract IERC20Upgradeable",name:"currency",type:"address"},{indexed:!1,internalType:"bytes",name:"dataMask",type:"bytes"},{components:[{internalType:"uint256",name:"price",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],indexed:!1,internalType:"struct Market.OrderItem",name:"item",type:"tuple"},{components:[{internalType:"enum Market.Op",name:"op",type:"uint8"},{internalType:"uint256",name:"orderIdx",type:"uint256"},{internalType:"uint256",name:"itemIdx",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"bytes32",name:"itemHash",type:"bytes32"},{internalType:"contract IDelegate",name:"executionDelegate",type:"address"},{internalType:"bytes",name:"dataReplacement",type:"bytes"},{internalType:"uint256",name:"bidIncentivePct",type:"uint256"},{internalType:"uint256",name:"aucMinIncrementPct",type:"uint256"},{internalType:"uint256",name:"aucIncDurationSecs",type:"uint256"},{components:[{internalType:"uint256",name:"percentage",type:"uint256"},{internalType:"address",name:"to",type:"address"}],internalType:"struct Market.Fee[]",name:"fees",type:"tuple[]"}],indexed:!1,internalType:"struct Market.SettleDetail",name:"detail",type:"tuple"}],name:"EvInventory",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"itemHash",type:"bytes32"},{indexed:!1,internalType:"address",name:"currency",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"EvProfit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"bool",name:"isRemoval",type:"bool"}],name:"EvSigner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[],name:"RATE_BASE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"itemHashes",type:"bytes32[]"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"cancel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegates",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeCapPct",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"feeCapPct_",type:"uint256"},{internalType:"address",name:"weth_",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"inventoryStatus",outputs:[{internalType:"enum Market.InvStatus",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"ongoingAuctions",outputs:[{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"netPrice",type:"uint256"},{internalType:"uint256",name:"endAt",type:"uint256"},{internalType:"address",name:"bidder",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"network",type:"uint256"},{internalType:"uint256",name:"intent",type:"uint256"},{internalType:"uint256",name:"delegateType",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"contract IERC20Upgradeable",name:"currency",type:"address"},{internalType:"bytes",name:"dataMask",type:"bytes"},{components:[{internalType:"uint256",name:"price",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Market.OrderItem[]",name:"items",type:"tuple[]"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"uint8",name:"signVersion",type:"uint8"}],internalType:"struct Market.Order[]",name:"orders",type:"tuple[]"},{components:[{internalType:"enum Market.Op",name:"op",type:"uint8"},{internalType:"uint256",name:"orderIdx",type:"uint256"},{internalType:"uint256",name:"itemIdx",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"bytes32",name:"itemHash",type:"bytes32"},{internalType:"contract IDelegate",name:"executionDelegate",type:"address"},{internalType:"bytes",name:"dataReplacement",type:"bytes"},{internalType:"uint256",name:"bidIncentivePct",type:"uint256"},{internalType:"uint256",name:"aucMinIncrementPct",type:"uint256"},{internalType:"uint256",name:"aucIncDurationSecs",type:"uint256"},{components:[{internalType:"uint256",name:"percentage",type:"uint256"},{internalType:"address",name:"to",type:"address"}],internalType:"struct Market.Fee[]",name:"fees",type:"tuple[]"}],internalType:"struct Market.SettleDetail[]",name:"details",type:"tuple[]"},{components:[{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountToEth",type:"uint256"},{internalType:"uint256",name:"amountToWeth",type:"uint256"},{internalType:"address",name:"user",type:"address"},{internalType:"bool",name:"canFail",type:"bool"}],internalType:"struct Market.SettleShared",name:"shared",type:"tuple"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"}],internalType:"struct Market.RunInput",name:"input",type:"tuple"}],name:"run",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"network",type:"uint256"},{internalType:"uint256",name:"intent",type:"uint256"},{internalType:"uint256",name:"delegateType",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"contract IERC20Upgradeable",name:"currency",type:"address"},{internalType:"bytes",name:"dataMask",type:"bytes"},{components:[{internalType:"uint256",name:"price",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Market.OrderItem[]",name:"items",type:"tuple[]"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"uint8",name:"signVersion",type:"uint8"}],internalType:"struct Market.Order",name:"order",type:"tuple"},{components:[{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountToEth",type:"uint256"},{internalType:"uint256",name:"amountToWeth",type:"uint256"},{internalType:"address",name:"user",type:"address"},{internalType:"bool",name:"canFail",type:"bool"}],internalType:"struct Market.SettleShared",name:"shared",type:"tuple"},{components:[{internalType:"enum Market.Op",name:"op",type:"uint8"},{internalType:"uint256",name:"orderIdx",type:"uint256"},{internalType:"uint256",name:"itemIdx",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"bytes32",name:"itemHash",type:"bytes32"},{internalType:"contract IDelegate",name:"executionDelegate",type:"address"},{internalType:"bytes",name:"dataReplacement",type:"bytes"},{internalType:"uint256",name:"bidIncentivePct",type:"uint256"},{internalType:"uint256",name:"aucMinIncrementPct",type:"uint256"},{internalType:"uint256",name:"aucIncDurationSecs",type:"uint256"},{components:[{internalType:"uint256",name:"percentage",type:"uint256"},{internalType:"address",name:"to",type:"address"}],internalType:"struct Market.Fee[]",name:"fees",type:"tuple[]"}],internalType:"struct Market.SettleDetail",name:"detail",type:"tuple"}],name:"run1",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"signers",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"toAdd",type:"address[]"},{internalType:"address[]",name:"toRemove",type:"address[]"}],name:"updateDelegates",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"val",type:"uint256"}],name:"updateFeeCap",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"toAdd",type:"address[]"},{internalType:"address[]",name:"toRemove",type:"address[]"}],name:"updateSigners",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"weth",outputs:[{internalType:"contract IWETHUpgradable",name:"",type:"address"}],stateMutability:"view",type:"function"},{stateMutability:"payable",type:"receive"}]},2100:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrderFiller=void 0;const r=n(11),i=n(20),a=n(99),o=n(642),s=n(815),d=n(1098),c=n(1106),u=n(825),l=n(2104),p=n(827),y=n(1107),m=n(1108),f=n(1109),h=n(832),b=n(1110);t.OrderFiller=class{constructor(e,t,n,r,i,a,h){this.ethereum=e,this.send=t,this.getConfig=n,this.getApis=r,this.getBaseOrderFee=i,this.env=a,this.sdkConfig=h,this.fill=this.getFillAction(),this.buy=this.getFillAction(),this.acceptBid=this.getFillAction(),this.getBaseOrderFillFee=this.getBaseOrderFillFee.bind(this),this.getTransactionData=this.getTransactionData.bind(this),this.getBuyTx=this.getBuyTx.bind(this),this.v1Handler=new d.RaribleV1OrderHandler(e,r,t,n,i,h),this.v2Handler=new c.RaribleV2OrderHandler(e,t,n,i,h),this.openSeaHandler=new u.OpenSeaOrderHandler(e,t,n,r,i,h),this.punkHandler=new l.CryptoPunksOrderHandler(e,t,n,i,h),this.seaportHandler=new p.SeaportOrderHandler(e,t,n,r,i,a,h),this.looksrareHandler=new m.LooksrareOrderHandler(e,t,n,i,a,r,h),this.looksrareV2Handler=new b.LooksrareV2OrderHandler(e,t,n,i,a,r),this.x2y2Handler=new y.X2Y2OrderHandler(e,t,n,i,r),this.ammHandler=new f.AmmOrderHandler(e,t,n,i,r,a,h),this.checkAssetType=o.checkAssetType.bind(this,r),this.checkLazyAssetType=s.checkLazyAssetType.bind(this,r),this.getBuyAmmInfo=this.getBuyAmmInfo.bind(this)}getFillAction(){return a.Action.create({id:"approve",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");if(this.isNonInvertableOrder(e.order))return{request:e,inverted:e.order};const t=(0,i.toAddress)(yield this.ethereum.getFrom()),n=yield this.invertOrder(e,t);return e.assetType&&"COLLECTION"===n.make.assetType.assetClass&&(n.make.assetType=yield this.checkAssetType(e.assetType),n.make.assetType=yield this.checkLazyAssetType(n.make.assetType)),yield this.approveOrder(n,Boolean(e.infinite)),{request:e,inverted:n}}))}).thenStep({id:"send-tx",run:e=>{let{inverted:t,request:n}=e;return r.__awaiter(this,void 0,void 0,(function*(){return this.checkStartEndDates(n.order),this.sendTransaction(n,t)}))}})}getBuyTx(e){let{request:t,from:n}=e;var i;return r.__awaiter(this,void 0,void 0,(function*(){if(!this.isNonInvertableOrder(t.order)&&!n)throw new Error("'From' field must be specified for this order type");const e=this.isNonInvertableOrder(t.order)?t.order:yield this.invertOrder(t,n);t.assetType&&"COLLECTION"===e.make.assetType.assetClass&&(e.make.assetType=yield this.checkAssetType(t.assetType));const{functionCall:r,options:a}=yield this.getTransactionRequestData(t,e,{disableCheckingBalances:!0}),o=yield r.getCallInfo(),s=(null===(i=a.value)||void 0===i?void 0:i.toString())||"0";return{from:n,value:s,data:yield r.getData(),to:o.contract}}))}invertOrder(e,t){return r.__awaiter(this,void 0,void 0,(function*(){switch(e.order.type){case"RARIBLE_V1":return this.v1Handler.invert(e,t);case"RARIBLE_V2":return this.v2Handler.invert(e,t);case"OPEN_SEA_V1":return this.openSeaHandler.invert(e,t);case"SEAPORT_V1":throw new Error("Invert for Seaport orders is not implemented yet");case"X2Y2":throw new Error("Invert for x2y2 orders is not implemented yet");case"AMM":throw new Error("Invert for AMM orders is not implemented yet");case"CRYPTO_PUNK":return this.punkHandler.invert(e,t);default:throw new Error("Unsupported order: ".concat(JSON.stringify(e)))}}))}approveOrder(e,t){return r.__awaiter(this,void 0,void 0,(function*(){switch(e.type){case"RARIBLE_V1":return this.v1Handler.approve(e,t);case"RARIBLE_V2":return this.v2Handler.approve(e,t);case"OPEN_SEA_V1":return this.openSeaHandler.approve(e,t);case"SEAPORT_V1":throw new Error("Approve for Seaport orders is not implemented yet");case"X2Y2":throw new Error("Approve for x2y2 orders is not implemented yet");case"AMM":throw new Error("Approve for AMM orders is not implemented yet");case"CRYPTO_PUNK":return this.punkHandler.approve(e,t);default:throw new Error("Unsupported order: ".concat(JSON.stringify(e)))}}))}sendTransaction(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const{functionCall:n,options:r}=yield this.getTransactionRequestData(e,t);return this.send(n,Object.assign(Object.assign({},r),{additionalData:(0,h.getUpdatedCalldata)(this.sdkConfig)}))}))}getTransactionRequestData(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){switch(e.order.type){case"RARIBLE_V1":return this.v1Handler.getTransactionData(e.order,t,e);case"RARIBLE_V2":return this.v2Handler.getTransactionData(e.order,t);case"OPEN_SEA_V1":return this.openSeaHandler.getTransactionData(e.order,t,e);case"SEAPORT_V1":return this.seaportHandler.getTransactionData(e,{disableCheckingBalances:null===n||void 0===n?void 0:n.disableCheckingBalances});case"LOOKSRARE":return this.looksrareHandler.getTransactionData(e);case"LOOKSRARE_V2":return this.looksrareV2Handler.getTransactionData(e);case"AMM":return this.ammHandler.getTransactionData(e);case"X2Y2":return this.x2y2Handler.getTransactionData(e);case"CRYPTO_PUNK":return this.punkHandler.getTransactionData(e.order,t);default:throw new Error("Unsupported request: ".concat(JSON.stringify(e)))}}))}getTransactionData(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const t=(0,i.toAddress)(yield this.ethereum.getFrom()),n=this.isNonInvertableOrder(e.order)?e.order:yield this.invertOrder(e,t);e.assetType&&"COLLECTION"===n.make.assetType.assetClass&&(n.make.assetType=yield this.checkAssetType(e.assetType));const{functionCall:r,options:a}=yield this.getTransactionRequestData(e,n),{contract:o}=yield r.getCallInfo();return{from:t,contract:(0,i.toAddress)(o),data:yield r.getData(),options:a}}))}getOrderFee(e){return r.__awaiter(this,void 0,void 0,(function*(){switch(e.type){case"RARIBLE_V1":return this.v1Handler.getOrderFee(e);case"RARIBLE_V2":return this.v2Handler.getOrderFee(e);case"OPEN_SEA_V1":return this.openSeaHandler.getOrderFee(e);case"SEAPORT_V1":return this.seaportHandler.getOrderFee();case"LOOKSRARE":return this.looksrareHandler.getOrderFee();case"CRYPTO_PUNK":return this.punkHandler.getOrderFee();case"X2Y2":return this.x2y2Handler.getOrderFee();case"AMM":return this.ammHandler.getOrderFee();default:throw new Error("Unsupported order: ".concat(JSON.stringify(e)))}}))}getBaseOrderFillFee(e){return r.__awaiter(this,void 0,void 0,(function*(){switch(e.type){case"RARIBLE_V1":return this.v1Handler.getBaseOrderFee();case"RARIBLE_V2":return this.v2Handler.getBaseOrderFee();case"OPEN_SEA_V1":return this.openSeaHandler.getBaseOrderFee();case"SEAPORT_V1":return this.seaportHandler.getBaseOrderFee();case"LOOKSRARE":return this.looksrareHandler.getBaseOrderFee();case"LOOKSRARE_V2":return this.looksrareV2Handler.getBaseOrderFee();case"CRYPTO_PUNK":return this.punkHandler.getBaseOrderFee();case"AMM":case"X2Y2":return this.ammHandler.getBaseOrderFee();default:throw new Error("Unsupported order: ".concat(JSON.stringify(e)))}}))}checkStartEndDates(e){const t=Date.now();if(void 0!==e.start&&new Date(1e3*e.start).getTime()>t)throw new Error("Order will be actual since ".concat(new Date(1e3*e.start),", now ").concat(new Date));if(void 0!==e.end&&new Date(1e3*e.end).getTime()=64&&function(e,t){const n=function(e){let t,n,r;if(e.length>=65)t=e.slice(0,32),n=e.slice(32,64),r=(0,i.bufferToInt)(e.slice(64));else{if(64!==e.length)throw new Error("Invalid signature length");t=e.slice(0,32),n=e.slice(32,64),r=(0,i.bufferToInt)(e.slice(32,33))>>7,n[0]&=127}r<27&&(r+=27);return{v:r,r:t,s:n}}(t),[r,a]=function(e,t){if(0===e||1===e)return[t,27+e];if(27===e||28===e)return[t,e];if(32===e||31===e)return[s(t),e-4];throw new Error("Value of 'v' is not recognised: ".concat(e))}(n.v,e);return(0,i.bufferToHex)((0,i.pubToAddress)((0,i.ecrecover)(r,a,n.r,n.s)))}(o,c)===n||function(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){const r="0x".concat(n.toString("hex"));console.log("checking signer using erc-1271",r);const o=e.createContract(a,t);try{const e=yield o.functionCall("isValidSignature",r,i).call();return"0x1626ba7e"===e||(console.warn("isValidSignature result is ".concat(e)),!1)}catch(s){return console.error("unable to check signature",s),!1}}))}(t,n,o,d)}))};const a=[{inputs:[{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"view",type:"function"}];const o="\x19Ethereum Signed Message:\n";function s(t){return(0,i.keccak256)(e.concat([e.from("".concat(o,"32"),"ascii"),t]))}}).call(this,n(7).Buffer)},2102:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.fixSignature=void 0;const r=n(411);t.fixSignature=function(t){if(void 0!==t){const i=(n=t).startsWith("0x")?e.from(n.substring(2),"hex"):e.from(n,"hex");if(65===i.length){const n=(0,r.bufferToInt)(i.slice(64));if(n<27){return function(t,n,i){return(0,r.bufferToHex)(e.concat([(0,r.setLengthLeft)(n,32),(0,r.setLengthLeft)(i,32),(0,r.toBuffer)(t)]))}(n+27,i.slice(0,32),i.slice(32,64))}return t}return t}return t;var n}}).call(this,n(7).Buffer)},2103:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeRaribleV2OrderPurchaseStruct=void 0;const r=n(20),i=n(814),a=n(813);t.encodeRaribleV2OrderPurchaseStruct=function(e,t,n,s,d){var c,u;const l=(0,a.assetTypeToStruct)(e,t.make.assetType),[p,y]=(0,i.encodeRaribleV2OrderData)(e,t.data),[,m]=(0,i.encodeRaribleV2OrderData)(e,s.data),f=e.encodeParameter(o,{sellOrderMaker:t.maker,sellOrderNftAmount:t.make.value,nftAssetClass:l.assetClass,nftData:l.data,sellOrderPaymentAmount:t.take.value,paymentToken:"ETH"===t.take.assetType.assetClass?r.ZERO_ADDRESS:t.take.assetType.contract,sellOrderSalt:t.salt,sellOrderStart:null!==(c=t.start)&&void 0!==c?c:0,sellOrderEnd:null!==(u=t.end)&&void 0!==u?u:0,sellOrderDataType:p,sellOrderData:y,sellOrderSignature:n,buyOrderPaymentAmount:s.make.value,buyOrderNftAmount:s.take.value,buyOrderData:m});return d?"0x0d5f7d35"+f.slice(2):f};const o={components:[{name:"sellOrderMaker",type:"address"},{name:"sellOrderNftAmount",type:"uint256"},{name:"nftAssetClass",type:"bytes4"},{name:"nftData",type:"bytes"},{name:"sellOrderPaymentAmount",type:"uint256"},{name:"paymentToken",type:"address"},{name:"sellOrderSalt",type:"uint256"},{name:"sellOrderStart",type:"uint"},{name:"sellOrderEnd",type:"uint"},{name:"sellOrderDataType",type:"bytes4"},{name:"sellOrderData",type:"bytes"},{name:"sellOrderSignature",type:"bytes"},{name:"buyOrderPaymentAmount",type:"uint256"},{name:"buyOrderNftAmount",type:"uint256"},{name:"buyOrderData",type:"bytes"}],name:"data",type:"tuple"}},2104:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoPunksOrderHandler=void 0;const r=n(11),i=n(646),a=n(555),o=n(331),s=n(470),d=n(824);t.CryptoPunksOrderHandler=class{constructor(e,t,n,r,i){this.ethereum=e,this.send=t,this.getConfig=n,this.getBaseOrderFeeConfig=r,this.sdkConfig=i}invert(e,t){const n=(0,d.invertOrder)(e.order,e.amount,t);return n.data={dataType:"CRYPTO_PUNKS_DATA"},n}approve(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const n=this.getMakeAssetWithFee(e);yield(0,o.waitTx)((0,a.approve)(this.ethereum,this.send,(()=>this.getConfig()),e.maker,n,t))}))}getTransactionData(e,t){return r.__awaiter(this,void 0,void 0,(function*(){return{functionCall:this.getPunkOrderCallMethod(e),options:this.getMatchV2Options(e,t)}}))}getPunkOrderCallMethod(e){if(!this.ethereum)throw new Error("Wallet undefined");if("CRYPTO_PUNKS"===e.make.assetType.assetClass){return(0,s.createCryptoPunksMarketContract)(this.ethereum,e.make.assetType.contract).functionCall("buyPunk",e.make.assetType.tokenId)}if("CRYPTO_PUNKS"===e.take.assetType.assetClass){return(0,s.createCryptoPunksMarketContract)(this.ethereum,e.take.assetType.contract).functionCall("acceptBidForPunk",e.take.assetType.tokenId,e.make.value)}throw new Error("Unsupported punk asset type")}getMatchV2Options(e,t){if("ETH"===t.make.assetType.assetClass){return{value:this.getMakeAssetWithFee(t).value}}return{}}getMakeAssetWithFee(e){return(0,i.getAssetWithFee)(e.make,this.getOrderFee())}getOrderFee(){return 0}getBaseOrderFee(){return r.__awaiter(this,void 0,void 0,(function*(){return this.getBaseOrderFeeConfig("CRYPTO_PUNK")}))}}},2105:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.X2Y2Utils=void 0;const r=n(11),i=n(20);class a{static getOrderSign(e,t){return r.__awaiter(this,void 0,void 0,(function*(){return(yield e.orderSignature.orderSignX2Y2({x2Y2OrderSignRequest:{caller:t.sender,op:a.SELL_OP,orderId:t.orderId,currency:t.currency,price:t.price}})).input}))}}t.X2Y2Utils=a,a.SELL_OP=(0,i.toBigNumber)("1")},2106:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SudoswapFill=void 0;const r=n(11),i=n(20),a=n(413),o=n(147),s=n(101),d=n(2107),c=n(2108);class u{static getDirectFillData(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=this.getOrder(t);let o;switch(r.make.assetType.assetClass){case"ERC721":if(t.assetType)throw new a.Warning("Remove assetType from request, because it must be captured from order");o=yield this.buySpecificNFTs(e,t,n,[r.make.assetType.tokenId]);break;case"AMM_NFT":if(t.assetType){const r=Array.isArray(t.assetType)?t.assetType.map((e=>(0,i.toBigNumber)(e.tokenId.toString()))):[(0,i.toBigNumber)(t.assetType.tokenId.toString())];o=yield this.buySpecificNFTs(e,t,n,r)}else o=yield this.buyAnyNFTs(e,t,n,t.amount);break;default:throw new Error("Unsupported asset type "+r.take.assetType.assetClass)}return{functionCall:o.functionCall,options:o.options}}))}static getDeadline(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:14400;const t=~~(Date.now()/1e3)+e;return(0,i.toBigNumber)("0x"+t.toString(16).padStart(64,"0"))}static getRouterContract(e,t){const{pairRouter:n}=t.sudoswap;if(!n||n===i.ZERO_ADDRESS)throw new Error("Sudoswap router contract address has not been set. Change address in config");return(0,d.createSudoswapRouterV1Contract)(e,n)}static getOrder(e){const t=e.order;if("SUDOSWAP_AMM_DATA_V1"!==t.data.dataType)throw new Error("Wrong order data type "+t.data.dataType);if("ETH"!==t.take.assetType.assetClass)throw new Error("Sudoswap supports swaps only for ETH");return t}static getNftRecipient(e){return r.__awaiter(this,void 0,void 0,(function*(){return yield e.getFrom()}))}static getETHRecipient(e){return r.__awaiter(this,void 0,void 0,(function*(){return yield e.getFrom()}))}static buySpecificNFTs(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){const r=this.getRouterContract(e,n),a=this.getOrder(t),o=(0,c.createSudoswapPairContract)(e,a.data.poolAddress),s=yield o.functionCall("getBuyNFTQuote",i.length).call();return{functionCall:r.functionCall("swapETHForSpecificNFTs",[{pair:a.data.poolAddress,nftIds:i}],yield this.getETHRecipient(e),yield this.getNftRecipient(e),u.getDeadline()),options:{value:s.inputAmount.toString()}}}))}static buyAnyNFTs(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){const r=this.getRouterContract(e,n),a=this.getOrder(t),o=(0,c.createSudoswapPairContract)(e,a.data.poolAddress),s=yield o.functionCall("getBuyNFTQuote",i).call();return{functionCall:r.functionCall("swapETHForAnyNFTs",[{pair:a.data.poolAddress,numItems:i}],yield this.getETHRecipient(e),yield this.getNftRecipient(e),u.getDeadline()),options:{value:s.inputAmount.toString()}}}))}static getRoyaltiesAmount(e,t){const n=e.reduce(((e,t)=>e+t.value),0);return(0,o.toBn)(n).dividedBy(1e4).multipliedBy(t).integerValue(s.BigNumber.ROUND_FLOOR)}}t.SudoswapFill=u},2107:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUDOSWAP_ROUTER_V1_ABI=t.createSudoswapRouterV1Contract=void 0,t.createSudoswapRouterV1Contract=function(e,n){return e.createContract(t.SUDOSWAP_ROUTER_V1_ABI,n)},t.SUDOSWAP_ROUTER_V1_ABI=[{inputs:[{internalType:"contract ILSSVMPairFactoryLike",name:"_factory",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"factory",outputs:[{internalType:"contract ILSSVMPairFactoryLike",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ERC20",name:"token",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"enum ILSSVMPairFactoryLike.PairVariant",name:"variant",type:"uint8"}],name:"pairTransferERC20From",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC721",name:"nft",type:"address"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"enum ILSSVMPairFactoryLike.PairVariant",name:"variant",type:"uint8"}],name:"pairTransferNFTFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256",name:"numItems",type:"uint256"}],internalType:"struct LSSVMRouter.PairSwapAny",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"maxCost",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapAny[]",name:"swapList",type:"tuple[]"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"robustSwapERC20ForAnyNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"maxCost",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecific[]",name:"swapList",type:"tuple[]"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"robustSwapERC20ForSpecificNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"maxCost",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecific[]",name:"tokenToNFTTrades",type:"tuple[]"},{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"minOutput",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecificForToken[]",name:"nftToTokenTrades",type:"tuple[]"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"address payable",name:"tokenRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"}],internalType:"struct LSSVMRouter.RobustPairNFTsFoTokenAndTokenforNFTsTrade",name:"params",type:"tuple"}],name:"robustSwapERC20ForSpecificNFTsAndNFTsToToken",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"},{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256",name:"numItems",type:"uint256"}],internalType:"struct LSSVMRouter.PairSwapAny",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"maxCost",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapAny[]",name:"swapList",type:"tuple[]"},{internalType:"address payable",name:"ethRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"robustSwapETHForAnyNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"maxCost",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecific[]",name:"swapList",type:"tuple[]"},{internalType:"address payable",name:"ethRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"robustSwapETHForSpecificNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"maxCost",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecific[]",name:"tokenToNFTTrades",type:"tuple[]"},{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"minOutput",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecificForToken[]",name:"nftToTokenTrades",type:"tuple[]"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"address payable",name:"tokenRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"}],internalType:"struct LSSVMRouter.RobustPairNFTsFoTokenAndTokenforNFTsTrade",name:"params",type:"tuple"}],name:"robustSwapETHForSpecificNFTsAndNFTsToToken",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"},{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific",name:"swapInfo",type:"tuple"},{internalType:"uint256",name:"minOutput",type:"uint256"}],internalType:"struct LSSVMRouter.RobustPairSwapSpecificForToken[]",name:"swapList",type:"tuple[]"},{internalType:"address payable",name:"tokenRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"robustSwapNFTsForToken",outputs:[{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256",name:"numItems",type:"uint256"}],internalType:"struct LSSVMRouter.PairSwapAny[]",name:"swapList",type:"tuple[]"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapERC20ForAnyNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"swapList",type:"tuple[]"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapERC20ForSpecificNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256",name:"numItems",type:"uint256"}],internalType:"struct LSSVMRouter.PairSwapAny[]",name:"swapList",type:"tuple[]"},{internalType:"address payable",name:"ethRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForAnyNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"swapList",type:"tuple[]"},{internalType:"address payable",name:"ethRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForSpecificNFTs",outputs:[{internalType:"uint256",name:"remainingValue",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"nftToTokenTrades",type:"tuple[]"},{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256",name:"numItems",type:"uint256"}],internalType:"struct LSSVMRouter.PairSwapAny[]",name:"tokenToNFTTrades",type:"tuple[]"}],internalType:"struct LSSVMRouter.NFTsForAnyNFTsTrade",name:"trade",type:"tuple"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"uint256",name:"minOutput",type:"uint256"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNFTsForAnyNFTsThroughERC20",outputs:[{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"nftToTokenTrades",type:"tuple[]"},{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256",name:"numItems",type:"uint256"}],internalType:"struct LSSVMRouter.PairSwapAny[]",name:"tokenToNFTTrades",type:"tuple[]"}],internalType:"struct LSSVMRouter.NFTsForAnyNFTsTrade",name:"trade",type:"tuple"},{internalType:"uint256",name:"minOutput",type:"uint256"},{internalType:"address payable",name:"ethRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNFTsForAnyNFTsThroughETH",outputs:[{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"nftToTokenTrades",type:"tuple[]"},{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"tokenToNFTTrades",type:"tuple[]"}],internalType:"struct LSSVMRouter.NFTsForSpecificNFTsTrade",name:"trade",type:"tuple"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"uint256",name:"minOutput",type:"uint256"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNFTsForSpecificNFTsThroughERC20",outputs:[{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"nftToTokenTrades",type:"tuple[]"},{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"tokenToNFTTrades",type:"tuple[]"}],internalType:"struct LSSVMRouter.NFTsForSpecificNFTsTrade",name:"trade",type:"tuple"},{internalType:"uint256",name:"minOutput",type:"uint256"},{internalType:"address payable",name:"ethRecipient",type:"address"},{internalType:"address",name:"nftRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNFTsForSpecificNFTsThroughETH",outputs:[{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"contract LSSVMPair",name:"pair",type:"address"},{internalType:"uint256[]",name:"nftIds",type:"uint256[]"}],internalType:"struct LSSVMRouter.PairSwapSpecific[]",name:"swapList",type:"tuple[]"},{internalType:"uint256",name:"minOutput",type:"uint256"},{internalType:"address",name:"tokenRecipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNFTsForToken",outputs:[{internalType:"uint256",name:"outputAmount",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},2108:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUDOSWAP_PAIR_ABI=t.createSudoswapPairContract=void 0,t.createSudoswapPairContract=function(e,n){return e.createContract(t.SUDOSWAP_PAIR_ABI,n)},t.SUDOSWAP_PAIR_ABI=[{inputs:[{internalType:"uint256",name:"numNFTs",type:"uint256"}],name:"getBuyNFTQuote",outputs:[{internalType:"enum CurveErrorCodes.Error",name:"error",type:"uint8"},{internalType:"uint256",name:"newSpotPrice",type:"uint256"},{internalType:"uint256",name:"newDelta",type:"uint256"},{internalType:"uint256",name:"inputAmount",type:"uint256"},{internalType:"uint256",name:"protocolFee",type:"uint256"}],stateMutability:"view",type:"function"}]},2109:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LOOKSRARE_V2_VALIDATOR_ABI=t.createLooksrareV2Validator=void 0,t.createLooksrareV2Validator=function(e,n){return e.createContract(t.LOOKSRARE_V2_VALIDATOR_ABI,n)},t.LOOKSRARE_V2_VALIDATOR_ABI=[{inputs:[{internalType:"address",name:"_looksRareProtocol",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"CRITERIA_GROUPS",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ERC1155_INTERFACE_ID",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"view",type:"function"},{inputs:[],name:"ERC721_INTERFACE_ID_1",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"view",type:"function"},{inputs:[],name:"ERC721_INTERFACE_ID_2",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAGIC_VALUE_ORDER_NONCE_EXECUTED",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum QuoteType",name:"quoteType",type:"uint8"},{internalType:"uint256",name:"globalNonce",type:"uint256"},{internalType:"uint256",name:"subsetNonce",type:"uint256"},{internalType:"uint256",name:"orderNonce",type:"uint256"},{internalType:"uint256",name:"strategyId",type:"uint256"},{internalType:"enum CollectionType",name:"collectionType",type:"uint8"},{internalType:"address",name:"collection",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"address",name:"signer",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256[]",name:"itemIds",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"additionalParameters",type:"bytes"}],internalType:"struct OrderStructs.Maker",name:"makerOrder",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"},{components:[{internalType:"bytes32",name:"root",type:"bytes32"},{components:[{internalType:"bytes32",name:"value",type:"bytes32"},{internalType:"enum OrderStructs.MerkleTreeNodePosition",name:"position",type:"uint8"}],internalType:"struct OrderStructs.MerkleTreeNode[]",name:"proof",type:"tuple[]"}],internalType:"struct OrderStructs.MerkleTree",name:"merkleTree",type:"tuple"}],name:"checkMakerOrderValidity",outputs:[{internalType:"uint256[9]",name:"validationCodes",type:"uint256[9]"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum QuoteType",name:"quoteType",type:"uint8"},{internalType:"uint256",name:"globalNonce",type:"uint256"},{internalType:"uint256",name:"subsetNonce",type:"uint256"},{internalType:"uint256",name:"orderNonce",type:"uint256"},{internalType:"uint256",name:"strategyId",type:"uint256"},{internalType:"enum CollectionType",name:"collectionType",type:"uint8"},{internalType:"address",name:"collection",type:"address"},{internalType:"address",name:"currency",type:"address"},{internalType:"address",name:"signer",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256[]",name:"itemIds",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"additionalParameters",type:"bytes"}],internalType:"struct OrderStructs.Maker[]",name:"makerOrders",type:"tuple[]"},{internalType:"bytes[]",name:"signatures",type:"bytes[]"},{components:[{internalType:"bytes32",name:"root",type:"bytes32"},{components:[{internalType:"bytes32",name:"value",type:"bytes32"},{internalType:"enum OrderStructs.MerkleTreeNodePosition",name:"position",type:"uint8"}],internalType:"struct OrderStructs.MerkleTreeNode[]",name:"proof",type:"tuple[]"}],internalType:"struct OrderStructs.MerkleTree[]",name:"merkleTrees",type:"tuple[]"}],name:"checkMultipleMakerOrderValidities",outputs:[{internalType:"uint256[9][]",name:"validationCodes",type:"uint256[9][]"}],stateMutability:"view",type:"function"},{inputs:[],name:"creatorFeeManager",outputs:[{internalType:"contract ICreatorFeeManager",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deriveProtocolParameters",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"domainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"looksRareProtocol",outputs:[{internalType:"contract LooksRareProtocol",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxCreatorFeeBp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"royaltyFeeRegistry",outputs:[{internalType:"contract IRoyaltyFeeRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"transferManager",outputs:[{internalType:"contract TransferManager",name:"",type:"address"}],stateMutability:"view",type:"function"}]},2110:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CURRENT_ORDER_TYPE_VERSION=void 0,t.CURRENT_ORDER_TYPE_VERSION="RARIBLE_V2"},2111:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeployErc721=void 0;const r=n(11),i=n(20),a=n(2112),o=n(2113);t.DeployErc721=class{constructor(e,t,n){this.ethereum=e,this.send=t,this.getConfig=n,this.deployToken=this.deployToken.bind(this),this.deployUserToken=this.deployUserToken.bind(this)}deployToken(e,t,n,o){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const r=yield this.getConfig(),s=(0,a.createErc721FactoryContract)(this.ethereum,r.factories.erc721),d=(0,i.randomWord)(),c=yield this.send(s.functionCall("createToken",e,t,n,o,d)),u=(yield c.getEvents()).find((e=>"Create721RaribleProxy"===e.event));if(!u)throw new Error("Event 'Create721RaribleProxy' has not been found");return{tx:c,address:u.args.proxy}}))}deployUserToken(e,t,n,a,s){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const r=yield this.getConfig(),d=(0,o.createErc721UserFactoryContract)(this.ethereum,r.factories.erc721),c=(0,i.randomWord)(),u=yield this.send(d.functionCall("createToken",e,t,n,a,s,c)),l=(yield u.getEvents()).find((e=>"Create721RaribleUserProxy"===e.event));if(!l)throw new Error("Event 'Create721RaribleUserProxy' has not been found");return{tx:u,address:l.args.proxy}}))}}},2112:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc721RaribleFactoryABI=t.erc721RaribleFactoryBytecode=t.deployTestErc721RaribleFactory=t.createTestRaribleFactoryContract=t.createErc721FactoryContract=void 0;const r=n(11),i=n(20);function a(e,n){return new e.eth.Contract(t.erc721RaribleFactoryABI,n)}t.createErc721FactoryContract=function(e,n){return e.createContract(t.erc721RaribleFactoryABI,n)},t.createTestRaribleFactoryContract=a,t.deployTestErc721RaribleFactory=function(e,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=a(e),[o]=yield e.eth.getAccounts();return r.deploy({data:t.erc721RaribleFactoryBytecode,arguments:[n,i.ZERO_ADDRESS,i.ZERO_ADDRESS]}).send({from:o,gas:5e6,gasPrice:"0"})}))},t.erc721RaribleFactoryBytecode="0x608060405234801561001057600080fd5b506040516112d43803806112d483398101604081905261002f916100e5565b60006100396100c5565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039485166001600160a01b031991821617909155600280549385169382169390931790925560038054919093169116179055610127565b3390565b80516001600160a01b03811681146100e057600080fd5b919050565b6000806000606084860312156100f9578283fd5b610102846100c9565b9250610110602085016100c9565b915061011e604085016100c9565b90509250925092565b61119e806101366000396000f3fe60806040523480156200001157600080fd5b50600436106200006a5760003560e01c806359659e90146200006f578063715018a6146200009157806372397ad5146200009d5780638da5cb5b14620000b45780639cf3178b14620000be578063f2fde38b14620000d5575b600080fd5b62000079620000ec565b6040516200008891906200080e565b60405180910390f35b6200009b620000fb565b005b6200009b620000ae366004620006b7565b620001be565b620000796200035f565b62000079620000cf366004620006b7565b6200036e565b6200009b620000e636600462000687565b620003d5565b6001546001600160a01b031681565b62000105620004f0565b6001600160a01b0316620001186200035f565b6001600160a01b03161462000174576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000620001d9620001d287878787620004f4565b8362000553565b6002546040516318054c3760e01b815291925082916001600160a01b03808416926318054c379262000215929091169060019060040162000822565b600060405180830381600087803b1580156200023057600080fd5b505af115801562000245573d6000803e3d6000fd5b50506003546040516318054c3760e01b81526001600160a01b0380861694506318054c3793506200027e92169060019060040162000822565b600060405180830381600087803b1580156200029957600080fd5b505af1158015620002ae573d6000803e3d6000fd5b50505050806001600160a01b031663f2fde38b620002cb620004f0565b6040518263ffffffff1660e01b8152600401620002e991906200080e565b600060405180830381600087803b1580156200030457600080fd5b505af115801562000319573d6000803e3d6000fd5b505050507fcc1a02f08b4aa92a7d307d9c65aec395a00ed50d5575adbd7447a85dfefdaf92826040516200034e91906200080e565b60405180910390a150505050505050565b6000546001600160a01b031690565b600080620003896200038388888888620004f4565b62000582565b9050600060ff60f81b30858480519060200120604051602001620003b19493929190620007a2565b60408051808303601f19018152919052805160209091012098975050505050505050565b620003df620004f0565b6001600160a01b0316620003f26200035f565b6001600160a01b0316146200044e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620004955760405162461bcd60e51b8152600401808060200182810382526026815260200180620011436026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6060632a83996360e01b858585856040516024016200051794939291906200086b565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050949350505050565b600080620005618462000582565b9050828151602083016000f59150813b6200057b57600080fd5b5092915050565b606060405180602001620005969062000600565b601f1982820381018352601f909101166040819052600154620005ca916001600160a01b039091169085906020016200083d565b60408051601f1981840301815290829052620005ea9291602001620007db565b6040516020818303038152906040529050919050565b61084480620008ff83390190565b600082601f8301126200061f578081fd5b813567ffffffffffffffff808211156200063557fe5b604051601f8301601f1916810160200182811182821017156200065457fe5b6040528281528483016020018610156200066c578384fd5b82602086016020830137918201602001929092529392505050565b60006020828403121562000699578081fd5b81356001600160a01b0381168114620006b0578182fd5b9392505050565b600080600080600060a08688031215620006cf578081fd5b853567ffffffffffffffff80821115620006e7578283fd5b620006f589838a016200060e565b965060208801359150808211156200070b578283fd5b6200071989838a016200060e565b955060408801359150808211156200072f578283fd5b6200073d89838a016200060e565b9450606088013591508082111562000753578283fd5b5062000762888289016200060e565b95989497509295608001359392505050565b600081518084526200078e816020860160208601620008cb565b601f01601f19169290920160200192915050565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60008351620007ef818460208801620008cb565b83519083019062000805818360208801620008cb565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b0383168152604060208201819052600090620008639083018462000774565b949350505050565b60006080825262000880608083018762000774565b828103602084015262000894818762000774565b90508281036040840152620008aa818662000774565b90508281036060840152620008c0818562000774565b979650505050505050565b60005b83811015620008e8578181015183820152602001620008ce565b83811115620008f8576000848401525b5050505056fe60806040526040516108443803806108448339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052506100e3915050565b6100ed82826100f4565b505061047e565b6101078261024960201b6100311760201c565b6101425760405162461bcd60e51b81526004018080602001828103825260258152602001806107c56025913960400191505060405180910390fd5b6101ba826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051610249602090811b61003117901c565b6101f55760405162461bcd60e51b81526004018080602001828103825260348152602001806108106034913960400191505060405180910390fd5b6000805160206107848339815191528281558151156102445761024261021961024f565b836040518060600160405280602181526020016107a4602191396102c260201b6100371760201c565b505b505050565b3b151590565b60006102596103c7565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561029157600080fd5b505afa1580156102a5573d6000803e3d6000fd5b505050506040513d60208110156102bb57600080fd5b5051905090565b60606102cd84610249565b6103085760405162461bcd60e51b81526004018080602001828103825260268152602001806107ea6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106103455780518252601f199092019160209182019101610326565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146103a5576040519150601f19603f3d011682016040523d82523d6000602084013e6103aa565b606091505b5090925090506103bb8282866103da565b925050505b9392505050565b6000805160206107848339815191525490565b606083156103e95750816103c0565b8251156103f95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561044357818101518382015260200161042b565b50505050905090810190601f1680156104705780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f78061048d6000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013b565b6101ae565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029c6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106100ba5780518252601f19909201916020918201910161009b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011a576040519150601f19603f3d011682016040523d82523d6000602084013e61011f565b606091505b509150915061012f8282866101d2565b925050505b9392505050565b6000610145610276565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017d57600080fd5b505afa158015610191573d6000803e3d6000fd5b505050506040513d60208110156101a757600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101cd573d6000f35b3d6000fd5b606083156101e1575081610134565b8251156101f15782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023b578181015183820152602001610223565b50505050905090810190601f1680156102685780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a26469706673582212208d876f4df9e95fb28cbac2f32a1bbbb4e7f39f9d7bb110fc7b5628d98879c2ba64736f6c63430007060033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220c4162bc3109c9ceb01a6502f24b87c608b1dab3a661fb42ba98f982032b3535964736f6c63430007060033",t.erc721RaribleFactoryABI=[{inputs:[{internalType:"address",name:"_beacon",type:"address"},{internalType:"address",name:"_transferProxy",type:"address"},{internalType:"address",name:"_lazyTransferProxy",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"proxy",type:"address"}],name:"Create721RaribleProxy",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"beacon",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"uint256",name:"salt",type:"uint256"}],name:"createToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"uint256",name:"_salt",type:"uint256"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0}]},2113:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc721UserFactoryABI=t.erc721UserFactoryBytecode=t.deployTestErc721RaribleUserFactory=t.createTestRaribleUserFactoryContract=t.createErc721UserFactoryContract=void 0;const r=n(11);function i(e,n){return new e.eth.Contract(t.erc721UserFactoryABI,n)}t.createErc721UserFactoryContract=function(e,n){return e.createContract(t.erc721UserFactoryABI,n)},t.createTestRaribleUserFactoryContract=i,t.deployTestErc721RaribleUserFactory=function(e,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=i(e),[a]=yield e.eth.getAccounts();return r.deploy({data:t.erc721UserFactoryBytecode,arguments:[n]}).send({from:a,gas:5e6,gasPrice:"0"})}))},t.erc721UserFactoryBytecode="0x608060405234801561001057600080fd5b506040516112b83803806112b883398101604081905261002f916100ac565b60006100396100a8565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100da565b3390565b6000602082840312156100bd578081fd5b81516001600160a01b03811681146100d3578182fd5b9392505050565b6111cf806100e96000396000f3fe60806040523480156200001157600080fd5b50600436106200006a5760003560e01c806327050d1f146200006f57806339280695146200008857806359659e9014620000b7578063715018a614620000c15780638da5cb5b14620000cb578063f2fde38b14620000d5575b600080fd5b620000866200008036600462000672565b620000ec565b005b6200009f6200009936600462000672565b620001b9565b604051620000ae9190620007f0565b60405180910390f35b6200009f62000222565b6200008662000231565b6200009f620002f4565b62000086620000e63660046200064e565b62000303565b6000620001086200010188888888886200041e565b8362000480565b9050806001600160a01b03811663f2fde38b62000124620004af565b6040518263ffffffff1660e01b8152600401620001429190620007f0565b600060405180830381600087803b1580156200015d57600080fd5b505af115801562000172573d6000803e3d6000fd5b505050507f4768a3e06654c109507892e111851106a07f51f57cc0cfc3374a141e03c3f08f82604051620001a79190620007f0565b60405180910390a15050505050505050565b600080620001d5620001cf89898989896200041e565b620004b3565b9050600060ff60f81b30858480519060200120604051602001620001fd949392919062000784565b60408051808303601f1901815291905280516020909101209998505050505050505050565b6001546001600160a01b031681565b6200023b620004af565b6001600160a01b03166200024e620002f4565b6001600160a01b031614620002aa576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6200030d620004af565b6001600160a01b031662000320620002f4565b6001600160a01b0316146200037c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620003c35760405162461bcd60e51b8152600401808060200182810382526026815260200180620011746026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b606063c4552e2460e01b86868686866040516024016200044395949392919062000832565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905095945050505050565b6000806200048e84620004b3565b9050828151602083016000f59150813b620004a857600080fd5b5092915050565b3390565b606060405180602001620004c79062000532565b601f1982820381018352601f909101166040819052600154620004fb916001600160a01b0390911690859060200162000804565b60408051601f19818403018152908290526200051b9291602001620007bd565b60405160208183030381529060405290505b919050565b610844806200093083390190565b80356001600160a01b03811681146200052d57600080fd5b600082601f83011262000569578081fd5b8135602067ffffffffffffffff8211156200058057fe5b80820262000590828201620008d7565b838152828101908684018388018501891015620005ab578687fd5b8693505b85841015620005d857620005c38162000540565b835260019390930192918401918401620005af565b50979650505050505050565b600082601f830112620005f5578081fd5b813567ffffffffffffffff8111156200060a57fe5b6200061f601f8201601f1916602001620008d7565b81815284602083860101111562000634578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121562000660578081fd5b6200066b8262000540565b9392505050565b60008060008060008060c087890312156200068b578182fd5b863567ffffffffffffffff80821115620006a3578384fd5b620006b18a838b01620005e4565b97506020890135915080821115620006c7578384fd5b620006d58a838b01620005e4565b96506040890135915080821115620006eb578384fd5b620006f98a838b01620005e4565b955060608901359150808211156200070f578384fd5b6200071d8a838b01620005e4565b9450608089013591508082111562000733578384fd5b506200074289828a0162000558565b92505060a087013590509295509295509295565b6000815180845262000770816020860160208601620008fc565b601f01601f19169290920160200192915050565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60008351620007d1818460208801620008fc565b835190830190620007e7818360208801620008fc565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b03831681526040602082018190526000906200082a9083018462000756565b949350505050565b600060a082526200084760a083018862000756565b6020838203818501526200085c828962000756565b9150838203604085015262000872828862000756565b9150838203606085015262000888828762000756565b84810360808601528551808252828701935090820190845b81811015620008c75784516001600160a01b031683529383019391830191600101620008a0565b50909a9950505050505050505050565b60405181810167ffffffffffffffff81118282101715620008f457fe5b604052919050565b60005b8381101562000919578181015183820152602001620008ff565b8381111562000929576000848401525b5050505056fe60806040526040516108443803806108448339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052506100e3915050565b6100ed82826100f4565b505061047e565b6101078261024960201b6100311760201c565b6101425760405162461bcd60e51b81526004018080602001828103825260258152602001806107c56025913960400191505060405180910390fd5b6101ba826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051610249602090811b61003117901c565b6101f55760405162461bcd60e51b81526004018080602001828103825260348152602001806108106034913960400191505060405180910390fd5b6000805160206107848339815191528281558151156102445761024261021961024f565b836040518060600160405280602181526020016107a4602191396102c260201b6100371760201c565b505b505050565b3b151590565b60006102596103c7565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561029157600080fd5b505afa1580156102a5573d6000803e3d6000fd5b505050506040513d60208110156102bb57600080fd5b5051905090565b60606102cd84610249565b6103085760405162461bcd60e51b81526004018080602001828103825260268152602001806107ea6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106103455780518252601f199092019160209182019101610326565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146103a5576040519150601f19603f3d011682016040523d82523d6000602084013e6103aa565b606091505b5090925090506103bb8282866103da565b925050505b9392505050565b6000805160206107848339815191525490565b606083156103e95750816103c0565b8251156103f95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561044357818101518382015260200161042b565b50505050905090810190601f1680156104705780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f78061048d6000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013b565b6101ae565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029c6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106100ba5780518252601f19909201916020918201910161009b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011a576040519150601f19603f3d011682016040523d82523d6000602084013e61011f565b606091505b509150915061012f8282866101d2565b925050505b9392505050565b6000610145610276565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017d57600080fd5b505afa158015610191573d6000803e3d6000fd5b505050506040513d60208110156101a757600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101cd573d6000f35b3d6000fd5b606083156101e1575081610134565b8251156101f15782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023b578181015183820152602001610223565b50505050905090810190601f1680156102685780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a26469706673582212208d876f4df9e95fb28cbac2f32a1bbbb4e7f39f9d7bb110fc7b5628d98879c2ba64736f6c63430007060033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122062a9f7eceafdf4d3437882923bee4606f71d99bbffbcc86a697bc23f2645cf5464736f6c63430007060033",t.erc721UserFactoryABI=[{inputs:[{internalType:"address",name:"_beacon",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"proxy",type:"address"}],name:"Create721RaribleUserProxy",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"beacon",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address[]",name:"operators",type:"address[]"},{internalType:"uint256",name:"salt",type:"uint256"}],name:"createToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address[]",name:"operators",type:"address[]"},{internalType:"uint256",name:"_salt",type:"uint256"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0}]},2114:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeployErc1155=void 0;const r=n(11),i=n(20),a=n(2115),o=n(2116);t.DeployErc1155=class{constructor(e,t,n){this.ethereum=e,this.send=t,this.getConfig=n,this.deployToken=this.deployToken.bind(this),this.deployUserToken=this.deployUserToken.bind(this)}deployToken(e,t,n,o){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const r=yield this.getConfig(),s=(0,a.createErc1155FactoryContract)(this.ethereum,r.factories.erc1155),d=(0,i.randomWord)(),c=yield this.send(s.functionCall("createToken",e,t,n,o,d)),u=(yield c.getEvents()).find((e=>"Create1155RaribleProxy"===e.event));if(!u)throw new Error("Event 'Create1155RaribleProxy' has not been found");return{tx:c,address:u.args.proxy}}))}deployUserToken(e,t,n,a,s){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const r=yield this.getConfig(),d=(0,o.createErc1155UserFactoryContract)(this.ethereum,r.factories.erc1155),c=(0,i.randomWord)(),u=yield this.send(d.functionCall("createToken",e,t,n,a,s,c)),l=(yield u.getEvents()).find((e=>"Create1155RaribleUserProxy"===e.event));if(!l)throw new Error("Event 'Create1155RaribleProxy' has not been found");return{tx:u,address:l.args.proxy}}))}}},2115:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc1155FactoryABI=t.erc1155FactoryBytecode=t.deployTestErc1155RaribleFactory=t.createTestErc1155RaribleFactoryContract=t.createErc1155FactoryContract=void 0;const r=n(11);function i(e,n){return new e.eth.Contract(t.erc1155FactoryABI,n)}t.createErc1155FactoryContract=function(e,n){return e.createContract(t.erc1155FactoryABI,n)},t.createTestErc1155RaribleFactoryContract=i,t.deployTestErc1155RaribleFactory=function(e,n,a,o){return r.__awaiter(this,void 0,void 0,(function*(){const r=i(e),[s]=yield e.eth.getAccounts();return r.deploy({data:t.erc1155FactoryBytecode,arguments:[n,a,o]}).send({from:s,gas:5e6,gasPrice:"0"})}))},t.erc1155FactoryBytecode="0x608060405234801561001057600080fd5b506040516112d43803806112d483398101604081905261002f916100e5565b60006100396100c5565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039485166001600160a01b031991821617909155600280549385169382169390931790925560038054919093169116179055610127565b3390565b80516001600160a01b03811681146100e057600080fd5b919050565b6000806000606084860312156100f9578283fd5b610102846100c9565b9250610110602085016100c9565b915061011e604085016100c9565b90509250925092565b61119e806101366000396000f3fe60806040523480156200001157600080fd5b50600436106200006a5760003560e01c806359659e90146200006f578063715018a6146200009157806372397ad5146200009d5780638da5cb5b14620000b45780639cf3178b14620000be578063f2fde38b14620000d5575b600080fd5b62000079620000ec565b6040516200008891906200080e565b60405180910390f35b6200009b620000fb565b005b6200009b620000ae366004620006b7565b620001be565b620000796200035f565b62000079620000cf366004620006b7565b6200036e565b6200009b620000e636600462000687565b620003d5565b6001546001600160a01b031681565b62000105620004f0565b6001600160a01b0316620001186200035f565b6001600160a01b03161462000174576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000620001d9620001d287878787620004f4565b8362000553565b6002546040516318054c3760e01b815291925082916001600160a01b03808416926318054c379262000215929091169060019060040162000822565b600060405180830381600087803b1580156200023057600080fd5b505af115801562000245573d6000803e3d6000fd5b50506003546040516318054c3760e01b81526001600160a01b0380861694506318054c3793506200027e92169060019060040162000822565b600060405180830381600087803b1580156200029957600080fd5b505af1158015620002ae573d6000803e3d6000fd5b50505050806001600160a01b031663f2fde38b620002cb620004f0565b6040518263ffffffff1660e01b8152600401620002e991906200080e565b600060405180830381600087803b1580156200030457600080fd5b505af115801562000319573d6000803e3d6000fd5b505050507f7d676ffa0eb839c909c4588fca6dd0076b4036f58e821b53b7d754c0e4b9a4d0826040516200034e91906200080e565b60405180910390a150505050505050565b6000546001600160a01b031690565b600080620003896200038388888888620004f4565b62000582565b9050600060ff60f81b30858480519060200120604051602001620003b19493929190620007a2565b60408051808303601f19018152919052805160209091012098975050505050505050565b620003df620004f0565b6001600160a01b0316620003f26200035f565b6001600160a01b0316146200044e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620004955760405162461bcd60e51b8152600401808060200182810382526026815260200180620011436026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b606063148dbc4f60e01b858585856040516024016200051794939291906200086b565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050949350505050565b600080620005618462000582565b9050828151602083016000f59150813b6200057b57600080fd5b5092915050565b606060405180602001620005969062000600565b601f1982820381018352601f909101166040819052600154620005ca916001600160a01b039091169085906020016200083d565b60408051601f1981840301815290829052620005ea9291602001620007db565b6040516020818303038152906040529050919050565b61084480620008ff83390190565b600082601f8301126200061f578081fd5b813567ffffffffffffffff808211156200063557fe5b604051601f8301601f1916810160200182811182821017156200065457fe5b6040528281528483016020018610156200066c578384fd5b82602086016020830137918201602001929092529392505050565b60006020828403121562000699578081fd5b81356001600160a01b0381168114620006b0578182fd5b9392505050565b600080600080600060a08688031215620006cf578081fd5b853567ffffffffffffffff80821115620006e7578283fd5b620006f589838a016200060e565b965060208801359150808211156200070b578283fd5b6200071989838a016200060e565b955060408801359150808211156200072f578283fd5b6200073d89838a016200060e565b9450606088013591508082111562000753578283fd5b5062000762888289016200060e565b95989497509295608001359392505050565b600081518084526200078e816020860160208601620008cb565b601f01601f19169290920160200192915050565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60008351620007ef818460208801620008cb565b83519083019062000805818360208801620008cb565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b0383168152604060208201819052600090620008639083018462000774565b949350505050565b60006080825262000880608083018762000774565b828103602084015262000894818762000774565b90508281036040840152620008aa818662000774565b90508281036060840152620008c0818562000774565b979650505050505050565b60005b83811015620008e8578181015183820152602001620008ce565b83811115620008f8576000848401525b5050505056fe60806040526040516108443803806108448339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052506100e3915050565b6100ed82826100f4565b505061047e565b6101078261024960201b6100311760201c565b6101425760405162461bcd60e51b81526004018080602001828103825260258152602001806107c56025913960400191505060405180910390fd5b6101ba826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051610249602090811b61003117901c565b6101f55760405162461bcd60e51b81526004018080602001828103825260348152602001806108106034913960400191505060405180910390fd5b6000805160206107848339815191528281558151156102445761024261021961024f565b836040518060600160405280602181526020016107a4602191396102c260201b6100371760201c565b505b505050565b3b151590565b60006102596103c7565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561029157600080fd5b505afa1580156102a5573d6000803e3d6000fd5b505050506040513d60208110156102bb57600080fd5b5051905090565b60606102cd84610249565b6103085760405162461bcd60e51b81526004018080602001828103825260268152602001806107ea6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106103455780518252601f199092019160209182019101610326565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146103a5576040519150601f19603f3d011682016040523d82523d6000602084013e6103aa565b606091505b5090925090506103bb8282866103da565b925050505b9392505050565b6000805160206107848339815191525490565b606083156103e95750816103c0565b8251156103f95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561044357818101518382015260200161042b565b50505050905090810190601f1680156104705780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f78061048d6000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013b565b6101ae565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029c6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106100ba5780518252601f19909201916020918201910161009b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011a576040519150601f19603f3d011682016040523d82523d6000602084013e61011f565b606091505b509150915061012f8282866101d2565b925050505b9392505050565b6000610145610276565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017d57600080fd5b505afa158015610191573d6000803e3d6000fd5b505050506040513d60208110156101a757600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101cd573d6000f35b3d6000fd5b606083156101e1575081610134565b8251156101f15782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023b578181015183820152602001610223565b50505050905090810190601f1680156102685780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a26469706673582212208d876f4df9e95fb28cbac2f32a1bbbb4e7f39f9d7bb110fc7b5628d98879c2ba64736f6c63430007060033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220f12267365abbae1fecd57c5f27da72b3d2e0838fa8aee9181013326301bfa65e64736f6c63430007060033",t.erc1155FactoryABI=[{inputs:[{internalType:"address",name:"_beacon",type:"address"},{internalType:"address",name:"_transferProxy",type:"address"},{internalType:"address",name:"_lazyTransferProxy",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"proxy",type:"address"}],name:"Create1155RaribleProxy",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"beacon",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"uint256",name:"salt",type:"uint256"}],name:"createToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"uint256",name:"_salt",type:"uint256"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0}]},2116:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc1155UserFactoryAbi=t.erc1155UserFactoryBytecode=t.deployTestErc1155UserRaribleFactory=t.createTestErc1155RaribleUserFactoryContract=t.createErc1155UserFactoryContract=void 0;const r=n(11);function i(e,n){return new e.eth.Contract(t.erc1155UserFactoryAbi,n)}t.createErc1155UserFactoryContract=function(e,n){return e.createContract(t.erc1155UserFactoryAbi,n)},t.createTestErc1155RaribleUserFactoryContract=i,t.deployTestErc1155UserRaribleFactory=function(e,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=i(e),[a]=yield e.eth.getAccounts();return r.deploy({data:t.erc1155UserFactoryBytecode,arguments:[n]}).send({from:a,gas:5e6,gasPrice:"0"})}))},t.erc1155UserFactoryBytecode="0x608060405234801561001057600080fd5b506040516112b83803806112b883398101604081905261002f916100ac565b60006100396100a8565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100da565b3390565b6000602082840312156100bd578081fd5b81516001600160a01b03811681146100d3578182fd5b9392505050565b6111cf806100e96000396000f3fe60806040523480156200001157600080fd5b50600436106200006a5760003560e01c806327050d1f146200006f57806339280695146200008857806359659e9014620000b7578063715018a614620000c15780638da5cb5b14620000cb578063f2fde38b14620000d5575b600080fd5b620000866200008036600462000672565b620000ec565b005b6200009f6200009936600462000672565b620001b9565b604051620000ae9190620007f0565b60405180910390f35b6200009f62000222565b6200008662000231565b6200009f620002f4565b62000086620000e63660046200064e565b62000303565b6000620001086200010188888888886200041e565b8362000480565b9050806001600160a01b03811663f2fde38b62000124620004af565b6040518263ffffffff1660e01b8152600401620001429190620007f0565b600060405180830381600087803b1580156200015d57600080fd5b505af115801562000172573d6000803e3d6000fd5b505050507f5b961e37212df9fe72e2c84d894099793a4569a883f97d6413c4362e68c644b582604051620001a79190620007f0565b60405180910390a15050505050505050565b600080620001d5620001cf89898989896200041e565b620004b3565b9050600060ff60f81b30858480519060200120604051602001620001fd949392919062000784565b60408051808303601f1901815291905280516020909101209998505050505050505050565b6001546001600160a01b031681565b6200023b620004af565b6001600160a01b03166200024e620002f4565b6001600160a01b031614620002aa576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6200030d620004af565b6001600160a01b031662000320620002f4565b6001600160a01b0316146200037c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620003c35760405162461bcd60e51b8152600401808060200182810382526026815260200180620011746026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b606063650e5ad760e01b86868686866040516024016200044395949392919062000832565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905095945050505050565b6000806200048e84620004b3565b9050828151602083016000f59150813b620004a857600080fd5b5092915050565b3390565b606060405180602001620004c79062000532565b601f1982820381018352601f909101166040819052600154620004fb916001600160a01b0390911690859060200162000804565b60408051601f19818403018152908290526200051b9291602001620007bd565b60405160208183030381529060405290505b919050565b610844806200093083390190565b80356001600160a01b03811681146200052d57600080fd5b600082601f83011262000569578081fd5b8135602067ffffffffffffffff8211156200058057fe5b80820262000590828201620008d7565b838152828101908684018388018501891015620005ab578687fd5b8693505b85841015620005d857620005c38162000540565b835260019390930192918401918401620005af565b50979650505050505050565b600082601f830112620005f5578081fd5b813567ffffffffffffffff8111156200060a57fe5b6200061f601f8201601f1916602001620008d7565b81815284602083860101111562000634578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121562000660578081fd5b6200066b8262000540565b9392505050565b60008060008060008060c087890312156200068b578182fd5b863567ffffffffffffffff80821115620006a3578384fd5b620006b18a838b01620005e4565b97506020890135915080821115620006c7578384fd5b620006d58a838b01620005e4565b96506040890135915080821115620006eb578384fd5b620006f98a838b01620005e4565b955060608901359150808211156200070f578384fd5b6200071d8a838b01620005e4565b9450608089013591508082111562000733578384fd5b506200074289828a0162000558565b92505060a087013590509295509295509295565b6000815180845262000770816020860160208601620008fc565b601f01601f19169290920160200192915050565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60008351620007d1818460208801620008fc565b835190830190620007e7818360208801620008fc565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b03831681526040602082018190526000906200082a9083018462000756565b949350505050565b600060a082526200084760a083018862000756565b6020838203818501526200085c828962000756565b9150838203604085015262000872828862000756565b9150838203606085015262000888828762000756565b84810360808601528551808252828701935090820190845b81811015620008c75784516001600160a01b031683529383019391830191600101620008a0565b50909a9950505050505050505050565b60405181810167ffffffffffffffff81118282101715620008f457fe5b604052919050565b60005b8381101562000919578181015183820152602001620008ff565b8381111562000929576000848401525b5050505056fe60806040526040516108443803806108448339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052506100e3915050565b6100ed82826100f4565b505061047e565b6101078261024960201b6100311760201c565b6101425760405162461bcd60e51b81526004018080602001828103825260258152602001806107c56025913960400191505060405180910390fd5b6101ba826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051610249602090811b61003117901c565b6101f55760405162461bcd60e51b81526004018080602001828103825260348152602001806108106034913960400191505060405180910390fd5b6000805160206107848339815191528281558151156102445761024261021961024f565b836040518060600160405280602181526020016107a4602191396102c260201b6100371760201c565b505b505050565b3b151590565b60006102596103c7565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561029157600080fd5b505afa1580156102a5573d6000803e3d6000fd5b505050506040513d60208110156102bb57600080fd5b5051905090565b60606102cd84610249565b6103085760405162461bcd60e51b81526004018080602001828103825260268152602001806107ea6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106103455780518252601f199092019160209182019101610326565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146103a5576040519150601f19603f3d011682016040523d82523d6000602084013e6103aa565b606091505b5090925090506103bb8282866103da565b925050505b9392505050565b6000805160206107848339815191525490565b606083156103e95750816103c0565b8251156103f95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561044357818101518382015260200161042b565b50505050905090810190601f1680156104705780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f78061048d6000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013b565b6101ae565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029c6026913960400191505060405180910390fd5b600080856001600160a01b0316856040518082805190602001908083835b602083106100ba5780518252601f19909201916020918201910161009b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011a576040519150601f19603f3d011682016040523d82523d6000602084013e61011f565b606091505b509150915061012f8282866101d2565b925050505b9392505050565b6000610145610276565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017d57600080fd5b505afa158015610191573d6000803e3d6000fd5b505050506040513d60208110156101a757600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101cd573d6000f35b3d6000fd5b606083156101e1575081610134565b8251156101f15782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023b578181015183820152602001610223565b50505050905090810190601f1680156102685780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a26469706673582212208d876f4df9e95fb28cbac2f32a1bbbb4e7f39f9d7bb110fc7b5628d98879c2ba64736f6c63430007060033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122042298c7a1be957e3b4120f1e36519d0117ca30aa8564828c978f486d1be2b82c64736f6c63430007060033",t.erc1155UserFactoryAbi=[{inputs:[{internalType:"address",name:"_beacon",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"proxy",type:"address"}],name:"Create1155RaribleUserProxy",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"beacon",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address[]",name:"operators",type:"address[]"},{internalType:"uint256",name:"salt",type:"uint256"}],name:"createToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"baseURI",type:"string"},{internalType:"string",name:"contractURI",type:"string"},{internalType:"address[]",name:"operators",type:"address[]"},{internalType:"uint256",name:"_salt",type:"uint256"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0}]},2117:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Balances=void 0;const r=n(11),i=n(101),a=n(819);t.Balances=class{constructor(e){this.getApis=e,this.getBalance=this.getBalance.bind(this)}getBalance(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=yield this.getApis();switch(t.assetClass){case"ETH":{const t=yield(0,a.wrapInRetry)((()=>n.balances.getEthBalance({owner:e})));return(0,i.toBn)(t.decimalBalance)}case"ERC20":{const r=yield(0,a.wrapInRetry)((()=>n.balances.getErc20Balance({contract:t.contract,owner:e})));return(0,i.toBn)(r.decimalBalance)}default:throw new Error("Asset class is not supported")}}))}}},2118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroValueIsPassedError=t.UnsupportedConvertAssetTypeError=t.UnsupportedCurrencyConvertError=t.ConvertWeth=void 0;const r=n(11),i=n(101),a=n(270),o=n(647),s=n(2119);t.ConvertWeth=class{constructor(e,t,n){this.ethereum=e,this.send=t,this.getConfig=n,this.getWethContractAddress=()=>r.__awaiter(this,void 0,void 0,(function*(){return(yield this.getConfig()).weth})),this.deposit=this.deposit.bind(this),this.depositWei=this.depositWei.bind(this),this.withdraw=this.withdraw.bind(this),this.withdrawWei=this.withdrawWei.bind(this),this.convert=this.convert.bind(this)}deposit(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getContractDecimals(),n=(0,i.toBn)(10).pow(Number(t)),r=(0,i.toBn)(e).multipliedBy(n).toString();return this.depositWei(r)}))}depositWei(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,i.toBn)(e);if(t.isZero())throw new u;const n=yield this.getContract();return this.send(n.functionCall("deposit"),{value:t.toString()})}))}withdraw(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getContractDecimals(),n=(0,i.toBn)(e).multipliedBy((0,i.toBn)(10).pow(Number(t))).toString();return this.withdrawWei(n)}))}withdrawWei(e){return r.__awaiter(this,void 0,void 0,(function*(){if((0,i.toBn)(e).isZero())throw new u;const t=yield this.getContract();return this.send(t.functionCall("withdraw",e))}))}getContract(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.getConfig(),t=(0,a.getRequiredWallet)(this.ethereum);return(0,s.createWethContract)(t,e.weth)}))}getContractDecimals(){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.getContract()).functionCall("decimals").call()}))}convert(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield this.getConfig();if("ETH"===e.assetClass&&"ERC20"===t.assetClass){if(!(0,o.compareCaseInsensitive)(t.contract,r.weth))throw new d(t.contract);return this.deposit(n)}if("ERC20"===e.assetClass&&"ETH"===t.assetClass){if(!(0,o.compareCaseInsensitive)(e.contract,r.weth))throw new d(e.contract);return this.withdraw(n)}throw new c}))}};class d extends Error{constructor(e){super("Contract is not supported - ".concat(e)),this.name="UnsupportedCurrencyConvertError",Object.setPrototypeOf(this,d.prototype)}}t.UnsupportedCurrencyConvertError=d;class c extends Error{constructor(){super("Unsupported convert asset types"),this.name="UnsupportedConvertAssetTypeError",Object.setPrototypeOf(this,c.prototype)}}t.UnsupportedConvertAssetTypeError=c;class u extends Error{constructor(){super("Zero value is passed"),this.name="ZeroValueIsPassedError",Object.setPrototypeOf(this,u.prototype)}}t.ZeroValueIsPassedError=u},2119:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWethContract=void 0;const r=n(2120);t.createWethContract=function(e,t){return e.createContract(r.wethABI,t)}},2120:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wethABI=void 0,t.wethABI=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]},2121:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StartAuction=void 0;const r=n(11),i=n(20),a=n(99),o=n(101),s=n(130),d=n(331),c=n(561),u=n(642),l=n(372),p=n(2122),y=n(1112),m=n(562),f=n(653);t.StartAuction=class{constructor(e,t,n,o,l,p){this.ethereum=e,this.send=t,this.getConfig=n,this.env=o,this.approve=l,this.getApis=p,this.MAX_DURATION_SECONDS=864e5,this.MIN_DURATION_SECONDS=54e3,this.start=a.Action.create({id:"approve",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet is undefined");const t=yield this.checkAssetType(e.makeAssetType);return this.validate(e,t),yield(0,d.waitTx)(this.approve((0,i.toAddress)(yield this.ethereum.getFrom()),{assetType:t,value:e.amount},!0)),{request:e,makeAssetType:t}}))}).thenStep({id:"sign",run:e=>{let{request:t,makeAssetType:n}=e;return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet is undefined");const e=yield this.getConfig(),a={assetType:{assetClass:(0,s.id)(n.assetClass),data:(0,f.getAssetEncodedData)(this.ethereum,n)},value:t.amount},o={assetClass:(0,s.id)(t.takeAssetType.assetClass),data:(0,f.getAssetEncodedData)(this.ethereum,t.takeAssetType)},d=this.ethereum.encodeParameter(f.AUCTION_DATA_V1,{payouts:[],originFees:t.originFees||[],duration:t.duration,startTime:t.startTime||0,buyOutPrice:(yield(0,c.getPrice)(this.ethereum,t.takeAssetType,t.buyOutPriceDecimal)).toString()}),u=yield this.send(yield(0,m.createEthereumAuctionContract)(this.ethereum,e.auction).functionCall("startAuction",a,o,(yield(0,c.getPrice)(this.ethereum,t.takeAssetType,t.minimalStepDecimal)).toString(),(yield(0,c.getPrice)(this.ethereum,t.takeAssetType,t.minimalPriceDecimal)).toString(),f.AUCTION_DATA_TYPE,d)),l=u.getEvents().then((e=>r.__awaiter(this,void 0,void 0,(function*(){const t=e.find((e=>"AuctionCreated"===e.event));if(!t)throw new Error("AuctionCreated event has not been found");return(0,i.toBigNumber)(t.args.auctionId)}))));return{tx:u,hash:l.then((e=>this.getAuctionHash(e))),auctionId:l}}))}}),this.checkAssetType=u.checkAssetType.bind(null,p)}getAuctionHash(e){return r.__awaiter(this,void 0,void 0,(function*(){return(0,f.getAuctionHash)(this.ethereum,(()=>this.getConfig()),e)}))}validate(e,t){if(!(0,l.isNft)(t))throw new Error("Make asset should be NFT token");if("ERC721_LAZY"===t.assetClass||"ERC1155_LAZY"===t.assetClass)throw new Error("Auction cannot be created with lazy assets");if(!(0,p.isPaymentToken)(e.takeAssetType))throw new Error("Take asset should be payment token (ETH or ERC-20)");const n=(0,o.toBn)(e.minimalPriceDecimal);if(!n.isPositive())throw new Error("Minimal price should be a correct value");if(!(0,o.toBn)(e.minimalStepDecimal).isPositive())throw new Error("Minimal step should be a correct value");const r=(0,o.toBn)(e.startTime||0);if(!r.isZero()){if(r.isNaN()||!r.isInteger()||r.isNegative())throw new Error("Wrong auction start time timestamp = ".concat(r.toString()));if(r.isLessThan(Date.now()/1e3))throw new Error("Auction start time should be greater than current time")}const i=(0,o.toBn)(e.duration);if(i.isNaN()||i.isNegative()||i.isGreaterThan(this.MAX_DURATION_SECONDS))throw new Error("Incorrect duration value");if("testnet"!==this.env&&i.isLessThan(this.MIN_DURATION_SECONDS))throw new Error("Auction duration should be greater than minimal duration time");const a=(0,o.toBn)(e.buyOutPriceDecimal);if(!a.isPositive()||a.isLessThanOrEqualTo(n))throw new Error("Auction buyout price should be correct and greater than minimal price");const s=(0,o.toBn)(e.amount);if(!s.isInteger()||s.isLessThanOrEqualTo(0))throw new Error("Auction asset amount should be integer and greater than 0");return(0,y.validateParts)(e.originFees),!0}}},2122:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPaymentToken=void 0,t.isPaymentToken=function(e){switch(e.assetClass){case"ETH":case"ERC20":return!0;default:return!1}}},2123:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelAuction=void 0;const r=n(11),i=n(562);t.cancelAuction=function(e,t,n,a,o){return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet is undefined");const r=yield a(),s=yield r.auction.getAuctionByHash({hash:o}),d=yield e.getFrom();if(s.seller.toLowerCase()!==d.toLowerCase())throw new Error("This operation is allowed only for auction owner");if(s.lastBid)throw new Error("Can't cancel auction with bid");const c=yield n();return t((0,i.createEthereumAuctionContract)(e,c.auction).functionCall("cancel",s.auctionId))}))}},2124:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finishAuction=void 0;const r=n(11),i=n(562);t.finishAuction=function(e,t,n,a,o){return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet is undefined");const r=yield a(),s=yield r.auction.getAuctionByHash({hash:o});!function(e){if(!e.lastBid)throw new Error("Auction without bid can't be finished");if(e.endTime){const t=new Date(e.endTime).getTime();if(t>0&&tr.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet is undefined");const t=yield this.getApis(),n=yield t.auction.getAuctionByHash({hash:e.hash});this.validate(e,n);const r=(0,i.toBigNumber)((yield(0,c.getPrice)(this.ethereum,n.buy,e.priceDecimal)).toString());return"ETH"!==n.buy.assetClass&&(yield(0,d.waitTx)(this.approve((0,i.toAddress)(yield this.ethereum.getFrom()),{assetType:n.buy,value:r},!0))),{request:e,auction:n,price:r}}))}).thenStep({id:"sign",run:e=>{let{request:t,auction:n,price:i}=e;return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet is undefined");const e=(0,p.getNetworkConfigByChainId)(yield this.ethereum.getChainId()),r=t.originFees||[],a=this.ethereum.encodeParameter(m.AUCTION_BID_DATA_V1,{payouts:[],originFees:r}),o={amount:i,dataType:m.AUCTION_DATA_TYPE,data:a},s=yield this.getBaseFee(),d=(0,m.calculatePartsSum)(r.concat(n.data.originFees))+s,c=(0,m.getAuctionOperationOptions)(n.buy,i,d),u=(0,y.createEthereumAuctionContract)(this.ethereum,e.auction);return this.send(u.functionCall("putBid",n.auctionId,o),c)}))}})}getBaseFee(){return r.__awaiter(this,void 0,void 0,(function*(){return(0,l.getBaseFee)(this.env,this.getApis,"AUCTION")}))}validate(e,t){if(t.status!==a.AuctionStatus.ACTIVE)throw new Error("Auction status is ".concat(t.status,", expected ").concat(a.AuctionStatus.ACTIVE));const n=(0,s.toBn)(e.priceDecimal);if(n.isNaN()||!n.isPositive())throw new Error("Wrong bid price");if(t.lastBid){if((0,s.toBn)(t.lastBid.amount).plus(t.minimalStep).isLessThan(n))throw new Error("Bid price should be greater")}else if(n.isLessThan(t.minimalPrice))throw new Error("Bid price should be greater than minimal price");return(0,u.validateParts)(e.originFees),!0}}},2126:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuyoutAuction=void 0;const r=n(11),i=n(20),a=n(99),o=n(331),s=n(561),d=n(833),c=n(562),u=n(653);t.BuyoutAuction=class{constructor(e,t,n,d,l,p){this.ethereum=e,this.send=t,this.getConfig=n,this.env=d,this.approve=l,this.getApis=p,this.buyout=a.Action.create({id:"approve",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet is undefined");const t=yield this.getApis(),n=yield t.auction.getAuctionByHash({hash:e.hash});if(this.validate(n),void 0===n.data.buyOutPrice)throw new Error("Buy out is unavailable for current auction");const r=(0,i.toBigNumber)((yield(0,s.getPrice)(this.ethereum,n.buy,n.data.buyOutPrice)).toString());return"ETH"!==n.buy.assetClass&&(yield(0,o.waitTx)(this.approve((0,i.toAddress)(yield this.ethereum.getFrom()),{assetType:n.buy,value:r},!0))),{request:e,auction:n,price:r}}))}).thenStep({id:"sign",run:e=>{let{request:t,auction:n,price:i}=e;return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet is undefined");const e=t.originFees||[],r=this.ethereum.encodeParameter(u.AUCTION_BID_DATA_V1,{payouts:[],originFees:e}),a={amount:i,dataType:u.AUCTION_DATA_TYPE,data:r},o=yield this.getBaseFee(),s=(0,u.calculatePartsSum)(e.concat(n.data.originFees))+o,d=(0,u.getAuctionOperationOptions)(n.buy,i,s),l=yield this.getConfig(),p=(0,c.createEthereumAuctionContract)(this.ethereum,l.auction);return this.send(p.functionCall("buyOut",n.auctionId,a),d)}))}})}getBaseFee(){return r.__awaiter(this,void 0,void 0,(function*(){return(0,d.getBaseFee)(this.env,(()=>this.getApis()),"AUCTION")}))}validate(e){if(!(0,u.validateAuctionRangeTime)(e))throw new Error("Auction should be active")}}},2127:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unwrapPunk=t.wrapPunk=t.approveForWrapper=void 0;const r=n(11),i=n(20),a=n(2128),o=n(470);t.approveForWrapper=function(e,t,n,a){var s;return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet undefined");const r=yield n();if(r.cryptoPunks.wrapperContract===i.ZERO_ADDRESS)throw new Error("Wrapper contract address is not defined");const d=(0,o.createCryptoPunksMarketContract)(e,r.cryptoPunks.marketContract),c=yield d.functionCall("punksOfferedForSale",a).call();return c.isForSale&&(null===(s=c.onlySellTo)||void 0===s?void 0:s.toLowerCase())===r.cryptoPunks.wrapperContract.toLowerCase()&&"0"===c.minValue?null:t(d.functionCall("offerPunkForSaleToAddress",a,0,r.cryptoPunks.wrapperContract))}))},t.wrapPunk=function(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet undefined");const r=yield n(),o=(0,a.createCryptoPunksWrapperContract)(e,r.cryptoPunks.wrapperContract);return t(o.functionCall("wrap",i))}))},t.unwrapPunk=function(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet undefined");const r=yield n(),o=(0,a.createCryptoPunksWrapperContract)(e,r.cryptoPunks.wrapperContract);return t(o.functionCall("unwrap",i))}))}},2128:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cryptoPunksWrapperAbi=t.createCryptoPunksWrapperContract=void 0,t.createCryptoPunksWrapperContract=function(e,n){return e.createContract(t.cryptoPunksWrapperAbi,n)},t.cryptoPunksWrapperAbi=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"exists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"punkAddress",outputs:[{internalType:"address payable",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"__baseTokenURI",type:"string"}],name:"setBaseTokenURI",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_punkId",type:"uint256"}],name:"unwrap",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_punkId",type:"uint256"}],name:"wrap",outputs:[],stateMutability:"payable",type:"function"}]},2129:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBatchSupportedOrders=t.BatchOrderFiller=void 0;const r=n(11),i=n(99),a=n(101),o=n(20),s=n(642),d=n(815),c=n(1106),u=n(825),l=n(827),p=n(1108),y=n(2130),m=n(1107),f=n(1109),h=n(415),b=n(832),T=n(270),v=n(1110),g=n(554),E=n(555);function _(e){return e.reduce(((e,t)=>{if((0,g.isErc20)(t.assetType)){const n=e.get(t.assetType.contract);n?e.set(t.assetType.contract,Object.assign(Object.assign({},n),{value:(0,o.toBigNumber)((0,a.toBn)(n.value).plus(t.value).toFixed())})):e.set(t.assetType.contract,t)}return e}),new Map)}function O(e){if("RARIBLE_V2"!==e.type&&"OPEN_SEA_V1"!==e.type&&"LOOKSRARE"!==e.type&&"LOOKSRARE_V2"!==e.type&&"SEAPORT_V1"!==e.type&&"X2Y2"!==e.type&&"AMM"!==e.type)throw new Error("Unsupported order type for batch purchase")}t.BatchOrderFiller=class{constructor(e,t,n,r,i,a,o){this.ethereum=e,this.send=t,this.getConfig=n,this.getApis=r,this.getBaseOrderFee=i,this.env=a,this.sdkConfig=o,this.buy=this.getFillAction(),this.v2Handler=new c.RaribleV2OrderHandler(e,t,n,i),this.openSeaHandler=new u.OpenSeaOrderHandler(e,t,n,r,i,o),this.seaportHandler=new l.SeaportOrderHandler(e,t,n,r,i,a),this.looksrareHandler=new p.LooksrareOrderHandler(e,t,n,i,a,r),this.looksrareV2Handler=new v.LooksrareV2OrderHandler(e,t,n,i,a,r),this.x2Y2Handler=new m.X2Y2OrderHandler(e,t,n,i,r),this.ammHandler=new f.AmmOrderHandler(e,t,n,i,r,a),this.checkAssetType=s.checkAssetType.bind(this,r),this.checkLazyAssetType=d.checkLazyAssetType.bind(this,r),this.getTransactionRequestData=this.getTransactionRequestData.bind(this)}getFillAction(){return i.Action.create({id:"approve",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");if(!e.length)throw new Error("Request is empty");const t=new y.OriginFeeReducer;return{preparedOrders:yield this.prepareOrders(e,t),feeAddresses:t.getAddresses()}}))}).thenStep({id:"send-tx",run:e=>{let{preparedOrders:t,feeAddresses:n}=e;return r.__awaiter(this,void 0,void 0,(function*(){const{functionCall:e,options:r}=yield this.getTransactionRequestData(t,n);return this.send(e,r)}))}})}prepareOrders(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,o.toAddress)(yield(0,T.getRequiredWallet)(this.ethereum).getFrom()),i=yield this.getConfig(),a=yield Promise.all(e.map((e=>r.__awaiter(this,void 0,void 0,(function*(){if(!(0,g.isWeth)(e.order.take.assetType,i)&&!(0,g.isETH)(e.order.take.assetType))throw new Error("Batch purchase is available only for ETH/WETH currencies");let r;O(e.order);const a=t.getComplexReducedFeesData(e.originFees);let o;return"RARIBLE_V2"===e.order.type&&(o=yield this.invertOrder(e,n),e.assetType&&"COLLECTION"===o.make.assetType.assetClass&&(o.make.assetType=yield this.checkAssetType(e.assetType),o.make.assetType=yield this.checkLazyAssetType(o.make.assetType)),r=yield this.getApproveAsset(e,a,o)),"SEAPORT_V1"===e.order.type&&(r=yield this.getApproveAsset(e,a,o)),{request:e,inverted:o,fees:a.encodedFeesValue,approveAsset:r}}))))),s=e.every((e=>!!e.infinite)),d=function(e){return e.reduce(((e,t)=>{let{approveAsset:n,request:r}=t;if(n)if(e.has(r.order.type)){(e.get(r.order.type)||[]).push(n)}else e.set(r.order.type,[n]);return e}),new Map)}(a);for(const[e,t]of d){const n=_(t);for(const[,t]of n)yield this.approveErc20Asset(e,t,s)}return a}))}getApproveAsset(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){switch(e.order.type){case"RARIBLE_V2":return this.v2Handler.getAssetToApprove(n);case"SEAPORT_V1":return this.seaportHandler.getAssetToApprove(e,t);default:throw new Error("Unsupported order: ".concat(e.order.type))}}))}invertOrder(e,t){return r.__awaiter(this,void 0,void 0,(function*(){switch(e.order.type){case"RARIBLE_V2":return this.v2Handler.invert(e,t);case"OPEN_SEA_V1":return this.openSeaHandler.invert(e,t);default:throw new Error("Unsupported order: ".concat(e.order.type))}}))}approveErc20Asset(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,T.getRequiredWallet)(this.ethereum),i={ethereum:r,send:this.send,owner:(0,o.toAddress)(yield r.getFrom()),asset:t,infinite:n},a=yield this.getConfig();switch(e){case"RARIBLE_V2":return(0,E.pureApproveFn)(Object.assign(Object.assign({},i),{operator:a.transferProxies.erc20}));case"SEAPORT_V1":return(0,E.pureApproveFn)(Object.assign(Object.assign({},i),{operator:a.exchange.wrapper}));default:throw new Error("Unsupported order: ".concat(e))}}))}getTransactionRequestData(e,t){return r.__awaiter(this,void 0,void 0,(function*(){let n=(0,a.toBn)(0);const i=yield this.getConfig(),o=yield Promise.all(e.map((e=>r.__awaiter(this,void 0,void 0,(function*(){var t;const r=yield this.getOrderData(e);return n=n.plus((null===(t=r.options)||void 0===t?void 0:t.value)||0),r.data}))))),s=(0,h.createExchangeWrapperContract)(this.ethereum,i.exchange.wrapper),d=s.functionCall("bulkPurchase",o,t[0],t[1],!0);let c=yield s.functionCall("bulkPurchase",o,t[0],t[1],!1).estimateGas({value:n.toFixed(),from:yield(0,T.getRequiredWallet)(this.ethereum).getFrom()});const u=(0,a.toBn)(c).multipliedBy(1.1).integerValue(a.BigNumber.ROUND_FLOOR).toNumber();return{functionCall:d,options:{value:n.toFixed(),gas:u,additionalData:(0,b.getUpdatedCalldata)(this.sdkConfig)}}}))}getOrderData(e){return r.__awaiter(this,void 0,void 0,(function*(){switch(e.request.order.type){case"RARIBLE_V2":return this.v2Handler.getTransactionDataForExchangeWrapper(e.request.order,e.inverted);case"OPEN_SEA_V1":return this.openSeaHandler.getTransactionDataForExchangeWrapper(e.request.order,e.inverted,e.request.originFees,e.fees);case"SEAPORT_V1":return this.seaportHandler.getTransactionDataForExchangeWrapper(e.request,e.request.originFees,e.fees);case"LOOKSRARE":return this.looksrareHandler.getTransactionDataForExchangeWrapper(e.request,e.request.originFees,e.fees);case"LOOKSRARE_V2":return this.looksrareV2Handler.getTransactionDataForExchangeWrapper(e.request,e.request.originFees,e.fees);case"X2Y2":return this.x2Y2Handler.getTransactionDataForExchangeWrapper(e.request,e.request.originFees,e.fees);case"AMM":return this.ammHandler.getTransactionDataForExchangeWrapper(e.request,e.fees);default:throw new Error("Unsupported request type: ".concat(e.request.order.type))}}))}},t.validateBatchSupportedOrders=O},2130:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OriginFeeReducer=void 0;const r=n(20),i=n(332);t.OriginFeeReducer=class{constructor(){this.addresses=[r.ZERO_ADDRESS,r.ZERO_ADDRESS]}reduce(e){if(!(null===e||void 0===e?void 0:e.length))return i.ZERO_FEE_VALUE;const t=this.getReducedFeesArray(e);return(0,i.packFeesToUint)(t)}getReducedFeesArray(e){if(!(null===e||void 0===e?void 0:e.length))return[0,0];if(e.length>2)throw new Error("Supports max up to 2 different origin fee address per request");return e.reduce(((e,t)=>{const n=this.reducePart(t);return e[0]+=n[0],e[1]+=n[1],e}),[0,0])}getComplexReducedFeesData(e){const t=this.getReducedFeesArray(e);return{encodedFeesValue:(0,i.packFeesToUint)(t),totalFeeBasisPoints:t[0]+t[1]}}getAddresses(){return this.addresses}reducePart(e){let t=0,n=0;if(e.account===this.addresses[0])t+=e.value;else if(e.account===this.addresses[1])n+=e.value;else if(this.addresses[0]===r.ZERO_ADDRESS)t+=e.value,this.addresses[0]=e.account;else{if(this.addresses[1]!==r.ZERO_ADDRESS)throw new Error("Supports max up to 2 different origin fee address per request");n+=e.value,this.addresses[1]=e.account}return[t,n]}}},2131:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseItemId=void 0;const r=n(20);t.parseItemId=function(e){const t=e.split(":");if(t.length<2)throw new Error("Unable to parse ItemId: ".concat(e));const[n,i]=t;return{contract:(0,r.toAddress)(n),tokenId:i}}},2132:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseOwnershipId=void 0;const r=n(20);t.parseOwnershipId=function(e){const t=e.split(":");if(t.length<3)throw new Error("Unable to parse OwnershipId: ".concat(e));const[n,i,a]=t;return{contract:(0,r.toAddress)(n),tokenId:i,owner:(0,r.toAddress)(a)}}},2133:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toPromise=void 0,t.toPromise=function(e){return void 0!==e.then?e:Promise.resolve(e)}},2144:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2145:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockchainEthereumTransaction=void 0;const r=n(11),i=n(295);t.BlockchainEthereumTransaction=class{constructor(e,t,n){this.transaction=e,this.network=t,this.resultExtractor=n,this.hash=()=>this.transaction.hash,this.wait=()=>r.__awaiter(this,void 0,void 0,(function*(){var e;return yield this.transaction.wait(),{blockchain:this.blockchain,hash:this.transaction.hash,events:yield this.transaction.getEvents(),result:yield null===(e=this.resultExtractor)||void 0===e?void 0:e.call(this,this.transaction.getEvents.bind(this.transaction))}})),this.getTxLink=()=>{switch(this.network){case"mainnet":return"https://etherscan.io/tx/".concat(this.hash());case"mumbai":return"https://mumbai.polygonscan.com/tx/".concat(this.hash());case"polygon":return"https://polygonscan.com/tx/".concat(this.hash());case"testnet":return"https://goerli.etherscan.io/tx/".concat(this.hash());case"mantle":return"https://explorer.mantle.xyz/tx/".concat(this.hash());case"testnet-mantle":return"https://explorer.testnet.mantle.xyz/tx/".concat(this.hash());case"arbitrum":return"https://arbiscan.io/tx/".concat(this.hash());case"testnet-arbitrum":return"https://sepolia.arbiscan.io/tx/".concat(this.hash());case"zksync":return"https://explorer.zksync.io/tx/".concat(this.hash());case"testnet-zksync":return"https://sepolia.explorer.zksync.io/tx/".concat(this.hash());case"chiliz":return"https://scan.chiliz.com/tx/".concat(this.hash());case"testnet-chiliz":return"https://spicy-explorer.chiliz.com/tx/".concat(this.hash());case"lightlink":return"https://phoenix.lightlink.io/tx/".concat(this.hash());case"testnet-lightlink":return"https://pegasus.lightlink.io/tx/".concat(this.hash());case"rari":return"https://rari.calderaexplorer.xyz/tx/".concat(this.hash());case"testnet-rari":return"https://rari-testnet.calderaexplorer.xyz/tx/".concat(this.hash());case"base":return"https://basescan.org/tx/".concat(this.hash());case"base-sepolia":return"https://base-sepolia.blockscout.com/tx/".concat(this.hash());case"dev-ethereum":return"http://ethereum-explorer.dev.rarible.int/transactions/".concat(this.hash());case"dev-polygon":return"http://polygon-explorer.dev.rarible.int/transactions/".concat(this.hash());case"zkatana":return"https://zkatana.blockscout.com/tx/".concat(this.hash());default:throw new Error("Unsupported transaction network")}},this.blockchain=this.getBlockchain(t),this.chainId=(0,i.getChainIdByNetwork)(this.network)}get isEmpty(){return!1}getBlockchain(e){return(0,i.getBlockchainBySDKNetwork)(e)}}},2146:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockchainFlowTransaction=void 0;const r=n(11),i=n(29);t.BlockchainFlowTransaction=class{constructor(e,t){this.transaction=e,this.network=t,this.blockchain=i.Blockchain.FLOW}hash(){return this.transaction.txId}wait(){return r.__awaiter(this,void 0,void 0,(function*(){return{blockchain:this.blockchain,hash:this.transaction.txId}}))}getTxLink(){switch(this.network){case"mainnet":return"https://flowscan.org/transaction/".concat(this.hash());case"testnet":return"https://testnet.flowscan.org/transaction/".concat(this.hash());case"emulator":return"";default:throw new Error("Unsupported transaction network")}}get isEmpty(){return!1}}},2147:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockchainTezosTransaction=void 0;const r=n(11),i=n(29);t.BlockchainTezosTransaction=class{constructor(e,t){this.transaction=e,this.network=t,this.blockchain=i.Blockchain.TEZOS}hash(){return this.transaction.hash}wait(){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.transaction.confirmation(),{blockchain:this.blockchain,hash:this.transaction.hash}}))}getTxLink(){switch(this.network){case"testnet":case"dev":return"https://ghostnet.tzkt.io/".concat(this.hash());case"mainnet":return"https://tzkt.io/".concat(this.hash());default:throw new Error("Unsupported transaction network")}}get isEmpty(){return!1}}},2148:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockchainSolanaTransaction=void 0;const r=n(11),i=n(29);t.BlockchainSolanaTransaction=class{constructor(e,t){this.transaction=e,this.blockchain=i.Blockchain.SOLANA,this.cluster=t.cluster,this.getSdk=()=>t}hash(){return this.transaction.txId}wait(){return r.__awaiter(this,void 0,void 0,(function*(){const e=t=>r.__awaiter(this,void 0,void 0,(function*(){var n,r;try{const e=yield this.getSdk().confirmTransaction(this.transaction.txId,"confirmed");if(null===(n=e.value)||void 0===n?void 0:n.err)throw"string"===typeof e.value.err?new Error(e.value.err):e.value.err}catch(i){if(!((null===(r=null===i||void 0===i?void 0:i.message)||void 0===r?void 0:r.includes("Transaction was not confirmed in"))&&t>0))throw i;yield e(t-1)}}));return yield e(4),{blockchain:this.blockchain,hash:this.transaction.txId}}))}getTxLink(){const e="https://solscan.io/tx/".concat(this.hash());switch(this.cluster){case"mainnet-beta":return e;case"testnet":case"devnet":return e+"?cluster=".concat(this.cluster);default:throw new Error("Unsupported transaction network")}}get isEmpty(){return!1}}},2149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockchainImmutableXTransaction=void 0;const r=n(11),i=n(29);t.BlockchainImmutableXTransaction=class{constructor(e){this.transaction=e,this.blockchain=i.Blockchain.IMMUTABLEX}hash(){var e;return(null!==(e=this.transaction)&&void 0!==e?e:"")+""}wait(){return r.__awaiter(this,void 0,void 0,(function*(){return{blockchain:this.blockchain,hash:this.hash()}}))}getTxLink(){return this.transaction?"https://immutascan.io/tx/"+this.transaction:""}get isEmpty(){return void 0===this.transaction}}},2150:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockchainCollectionId=t.getCollectionId=void 0;const r=n(29);t.getCollectionId=function(e){return"collection"in e?e.collection.id:e.collectionId},t.getBlockchainCollectionId=function(e){const[t]=e.split(":");if(!(t in r.Blockchain))throw new Error("Unrecognized blockchain in contract ".concat(e));return t}},2151:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBlockchainChainId=t.validateOrderDataV3Request=void 0;const r=n(210),i=n(334);t.validateOrderDataV3Request=function(e,t){if((null===t||void 0===t?void 0:t.shouldProvideMaxFeesBasePoint)&&(!e.maxFeesBasePoint||e.maxFeesBasePoint<=0||e.maxFeesBasePoint>1e3))throw new r.Warning("maxFeesBasePoint should be specified in request and should be more than 0% and can't be more than 10%");if(e.payouts&&e.payouts.length>1)throw new r.Warning("Only 1 payout account maximum supported");if(e.originFees&&e.originFees.length>2)throw new r.Warning("Only 2 origin accounts maximum supported");(0,i.checkPayouts)(e.payouts)},t.validateBlockchainChainId=function(){}},2152:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumSell=void 0;const r=n(11),i=n(20),a=n(123),o=n(184),s=n(236),d=n(563),c=n(334),u=r.__importStar(n(235)),l=n(235);t.EthereumSell=class{constructor(e,t,n,r){this.sdk=e,this.wallet=t,this.apis=n,this.config=r,this.sell=this.sell.bind(this),this.update=this.update.bind(this),this.sellBasic=this.sellBasic.bind(this),this.sellUpdateBasic=this.sellUpdateBasic.bind(this)}sell(){var e;return r.__awaiter(this,void 0,void 0,(function*(){return(null===(e=this.config)||void 0===e?void 0:e.useDataV3)?this.sellDataV3():this.sellDataV2()}))}sellBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.sell()).submit(e)}))}sellUpdateBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.update(e)).submit(e)}))}getFutureOrderFees(){return r.__awaiter(this,void 0,void 0,(function*(){return{originFeeSupport:o.OriginFeeSupport.FULL,baseFee:yield this.sdk.order.getBaseOrderFee()}}))}sellDataV2(){return r.__awaiter(this,void 0,void 0,(function*(){const e=this.sdk.order.sell.before((e=>r.__awaiter(this,void 0,void 0,(function*(){var t;yield(0,l.checkWalletBlockchain)(this.wallet,(0,a.extractBlockchain)(e.itemId)),(0,c.checkPayouts)(e.payouts);const{tokenId:n,contract:r}=(0,l.getEthereumItemId)(e.itemId),o=e.expirationDate?(0,d.convertDateToTimestamp)(e.expirationDate):(0,d.getDefaultExpirationDateTimestamp)(),p=(0,s.getCurrencyAssetType)(e.currency);return{type:"DATA_V2",makeAssetType:{tokenId:n,contract:(0,i.toAddress)(r)},amount:null!==(t=e.amount)&&void 0!==t?t:1,takeAssetType:u.getEthTakeAssetType(p),priceDecimal:e.price,payouts:u.toEthereumParts(e.payouts),originFees:u.toEthereumParts(e.originFees),end:o}})))).after((e=>r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,l.getWalletBlockchain)(this.wallet);return u.convertEthereumOrderHash(e.hash,t)}))));return{originFeeSupport:o.OriginFeeSupport.FULL,payoutsSupport:o.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:o.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:u.getSupportedCurrencies(),baseFee:yield this.sdk.order.getBaseOrderFee(),supportsExpirationDate:!0,submit:e}}))}sellDataV3(){return r.__awaiter(this,void 0,void 0,(function*(){const e=this.sdk.order.sell.before((e=>r.__awaiter(this,void 0,void 0,(function*(){var t,n;yield(0,l.checkWalletBlockchain)(this.wallet,(0,a.extractBlockchain)(e.itemId)),(0,l.validateOrderDataV3Request)(e,{shouldProvideMaxFeesBasePoint:!0});const{tokenId:r,contract:o}=(0,l.getEthereumItemId)(e.itemId),c=e.expirationDate?(0,d.convertDateToTimestamp)(e.expirationDate):(0,d.getDefaultExpirationDateTimestamp)(),p=(0,s.getCurrencyAssetType)(e.currency),y=u.toEthereumParts(e.payouts),m=u.toEthereumParts(e.originFees);return{type:"DATA_V3_SELL",makeAssetType:{tokenId:r,contract:(0,i.toAddress)(o)},payout:y[0],originFeeFirst:m[0],originFeeSecond:m[1],maxFeesBasePoint:null!==(t=e.maxFeesBasePoint)&&void 0!==t?t:0,amount:null!==(n=e.amount)&&void 0!==n?n:1,takeAssetType:u.getEthTakeAssetType(p),priceDecimal:e.price,end:c}})))).after((e=>r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,l.getWalletBlockchain)(this.wallet);return u.convertEthereumOrderHash(e.hash,t)}))));return{originFeeSupport:o.OriginFeeSupport.FULL,payoutsSupport:o.PayoutsSupport.SINGLE,maxFeesBasePointSupport:o.MaxFeesBasePointSupport.REQUIRED,supportedCurrencies:u.getSupportedCurrencies(),baseFee:yield this.sdk.order.getBaseOrderFee(),supportsExpirationDate:!0,submit:e}}))}update(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!e.orderId)throw new Error("OrderId has not been specified");const[t,n]=e.orderId.split(":");if(!(0,l.isEVMBlockchain)(t))throw new Error("Not an ethereum order");const a=yield this.apis.order.getValidatedOrderById({id:e.orderId});if(!(0,l.isRaribleV1Data)(a.data)&&!(0,l.isRaribleV2Data)(a.data))throw new Error("You can't update non-Rarible orders. Unable to update sell ".concat(JSON.stringify(a)));const s=this.sdk.order.sellUpdate.before((e=>r.__awaiter(this,void 0,void 0,(function*(){return yield(0,l.checkWalletBlockchain)(this.wallet,t),{orderHash:(0,i.toWord)(n),priceDecimal:e.price}})))).after((e=>u.convertEthereumOrderHash(e.hash,t))),{ethereum:d}=u.assertWallet(this.wallet),c=yield(0,l.getEthOrder)(d,a);return{originFeeSupport:(0,l.getOriginFeeSupport)(a.data),payoutsSupport:(0,l.getPayoutsSupport)(a.data),maxFeesBasePointSupport:o.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:u.getSupportedCurrencies(),baseFee:yield this.sdk.order.getBaseOrderFee(c.type),submit:s,orderData:{nftCollection:"contract"in a.make.type?a.make.type.contract:void 0}}}))}}},2153:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumFill=void 0;const r=n(11),i=n(20),a=n(147),o=n(122),s=n(29),d=n(210),c=n(123),u=n(184),l=n(334),p=n(235);t.EthereumFill=class{constructor(e,t,n,r){this.sdk=e,this.wallet=t,this.apis=n,this.config=r,this.fill=this.fill.bind(this),this.buy=this.buy.bind(this),this.batchBuy=this.batchBuy.bind(this),this.acceptBid=this.acceptBid.bind(this),this.buyBasic=this.buyBasic.bind(this),this.acceptBidBasic=this.acceptBidBasic.bind(this),this.batchBuyBasic=this.batchBuyBasic.bind(this),this.getBuyAmmInfo=this.getBuyAmmInfo.bind(this)}buyBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.buy(e)).submit(e)}))}acceptBidBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.acceptBid(e)).submit(e)}))}getFillOrderRequest(e,t){var n,r,a,o;let s;switch(e.type){case"RARIBLE_V1":s={order:e,amount:t.amount,infinite:t.infiniteApproval,originFee:(null===(r=null===(n=t.originFees)||void 0===n?void 0:n[0])||void 0===r?void 0:r.value)?t.originFees[0].value:0,payout:(null===(o=null===(a=t.payouts)||void 0===a?void 0:a[0])||void 0===o?void 0:o.account)?(0,p.convertToEthereumAddress)(t.payouts[0].account):void 0};break;case"RARIBLE_V2":switch(s={order:e,amount:t.amount,infinite:t.infiniteApproval,payouts:(0,p.toEthereumParts)(t.payouts),originFees:(0,p.toEthereumParts)(t.originFees)},e.data.dataType){case"RARIBLE_V2_DATA_V3_BUY":(0,p.validateOrderDataV3Request)(t,{shouldProvideMaxFeesBasePoint:!0}),s.maxFeesBasePoint=t.maxFeesBasePoint;break;case"RARIBLE_V2_DATA_V3_SELL":(0,p.validateOrderDataV3Request)(t,{shouldProvideMaxFeesBasePoint:!1})}break;case"OPEN_SEA_V1":s={order:e,originFees:"ETH"===e.take.assetType.assetClass?(0,p.toEthereumParts)(t.originFees):[],payouts:(0,p.toEthereumParts)(t.payouts),infinite:t.infiniteApproval};break;case"SEAPORT_V1":case"LOOKSRARE":case"LOOKSRARE_V2":case"X2Y2":s={order:e,originFees:(0,p.toEthereumParts)(t.originFees),amount:t.amount};break;case"AMM":return{order:e,originFees:(0,p.toEthereumParts)(t.originFees),amount:t.amount,assetType:(0,p.getAssetTypeFromFillRequest)(t.itemId),addRoyalty:t.addRoyalties};default:throw new Error("Unsupported order type")}if(t.addRoyalties)throw new d.Warning("Adding royalties is available only for AMM orders");if(t.itemId){if(Array.isArray(t.itemId))throw new Error("Array of itemIds is supported only for AMM orders");const{contract:e,tokenId:n}=(0,p.getEthereumItemId)(t.itemId);s.assetType={contract:(0,i.toAddress)(e),tokenId:n}}return s}getSupportFlags(e){switch(e.data["@type"]){case"ETH_RARIBLE_V1":return{originFeeSupport:u.OriginFeeSupport.AMOUNT_ONLY,payoutsSupport:u.PayoutsSupport.SINGLE,maxFeesBasePointSupport:u.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!0};case"ETH_RARIBLE_V2":case"ETH_RARIBLE_V2_2":return{originFeeSupport:u.OriginFeeSupport.FULL,payoutsSupport:u.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:u.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!0};case"ETH_RARIBLE_V2_DATA_V3_SELL":return{originFeeSupport:u.OriginFeeSupport.FULL,payoutsSupport:u.PayoutsSupport.SINGLE,maxFeesBasePointSupport:u.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!0};case"ETH_RARIBLE_V2_DATA_V3_BUY":return{originFeeSupport:u.OriginFeeSupport.FULL,payoutsSupport:u.PayoutsSupport.SINGLE,maxFeesBasePointSupport:u.MaxFeesBasePointSupport.REQUIRED,supportsPartialFill:!0};case"ETH_OPEN_SEA_V1":return{originFeeSupport:"ETH"===e.take.type["@type"]?u.OriginFeeSupport.FULL:u.OriginFeeSupport.NONE,payoutsSupport:u.PayoutsSupport.SINGLE,maxFeesBasePointSupport:u.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!1};case"ETH_BASIC_SEAPORT_DATA_V1":{const t="PARTIAL_OPEN"===e.data.orderType||"PARTIAL_RESTRICTED"===e.data.orderType;return{originFeeSupport:u.OriginFeeSupport.FULL,payoutsSupport:u.PayoutsSupport.NONE,maxFeesBasePointSupport:u.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:t}}case"ETH_LOOKSRARE_ORDER_DATA_V1":case"ETH_LOOKSRARE_ORDER_DATA_V2":case"ETH_SUDOSWAP_AMM_DATA_V1":return{originFeeSupport:u.OriginFeeSupport.FULL,payoutsSupport:u.PayoutsSupport.NONE,maxFeesBasePointSupport:u.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!0};case"ETH_X2Y2_ORDER_DATA_V1":return{originFeeSupport:u.OriginFeeSupport.FULL,payoutsSupport:u.PayoutsSupport.NONE,maxFeesBasePointSupport:u.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!1};default:throw new Error("Unsupported order type")}}getPlatform(e){switch(e.data["@type"]){case"ETH_RARIBLE_V1":case"ETH_RARIBLE_V2":case"ETH_RARIBLE_V2_2":case"ETH_RARIBLE_V2_DATA_V3_BUY":case"ETH_RARIBLE_V2_DATA_V3_SELL":default:return s.Platform.RARIBLE;case"ETH_OPEN_SEA_V1":case"ETH_BASIC_SEAPORT_DATA_V1":return s.Platform.OPEN_SEA;case"ETH_LOOKSRARE_ORDER_DATA_V1":case"ETH_LOOKSRARE_ORDER_DATA_V2":return s.Platform.LOOKSRARE;case"ETH_SUDOSWAP_AMM_DATA_V1":return s.Platform.SUDOSWAP;case"ETH_X2Y2_ORDER_DATA_V1":return s.Platform.X2Y2;case"ETH_CRYPTO_PUNKS":return s.Platform.CRYPTO_PUNKS}}getMaxAmount(e){return r.__awaiter(this,void 0,void 0,(function*(){if("COLLECTION"===e.take.type["@type"])return null;if((0,p.isNft)(e.take.type)){if(void 0===this.wallet)throw new Error("Wallet undefined");const t=yield this.wallet.ethereum.getFrom(),n="".concat(e.take.type.contract,":").concat(e.take.type.tokenId,":").concat((0,i.toAddress)(t)),r=yield this.apis.ownership.getOwnershipById({ownershipId:n});return(0,i.toBigNumber)(a.BigNumber.min(r.value,e.take.value).toFixed())}return e.makeStock}))}isMultiple(e){return r.__awaiter(this,void 0,void 0,(function*(){let t;if((0,p.isNft)(e.take.type)||"COLLECTION"===e.take.type["@type"])t=e.take.type.contract;else{if(!(0,p.isNft)(e.make.type)&&"COLLECTION"!==e.make.type["@type"]){if("AMM_NFT"===e.make.type["@type"])return!1;throw new Error("Nft has not been found")}t=e.make.type.contract}return"ERC1155"===(yield this.apis.collection.getCollectionById({collection:t})).type}))}hasCollectionAssetType(e){return"COLLECTION"===e.take.type["@type"]||"COLLECTION"===e.make.type["@type"]}commonFill(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return r.__awaiter(this,void 0,void 0,(function*(){const i=(0,p.getOrderId)(t),a=(0,c.extractBlockchain)(i);if(!(0,p.isEVMBlockchain)(a))throw new Error("Not an EVM order");const s=yield this.apis.order.getValidatedOrderById({id:i}),u=yield(0,p.getEthOrder)((0,p.assertWallet)(this.wallet).ethereum,s),y=e.before((e=>r.__awaiter(this,void 0,void 0,(function*(){if(yield(0,p.checkWalletBlockchain)(this.wallet,a),(0,l.checkPayouts)(e.payouts),e.unwrap)throw new d.Warning("Unwrap is not supported yet");if(this.hasCollectionAssetType(s)&&!e.itemId)throw new d.Warning("For collection order you should pass itemId");return this.getFillOrderRequest(u,e)})))).after((e=>r.__awaiter(this,void 0,void 0,(function*(){return new o.BlockchainEthereumTransaction(e,yield(0,p.getWalletNetwork)(this.wallet))})))),m=n?s.take.type:s.make.type;return Object.assign(Object.assign({},this.getSupportFlags(s)),{multiple:yield this.isMultiple(s),maxAmount:yield this.getMaxAmount(s),baseFee:yield this.sdk.order.getBaseOrderFillFee(u),submit:y,orderData:{platform:this.getPlatform(s),nftCollection:"contract"in m?(0,p.convertEthereumContractAddress)(m.contract,a):void 0}})}))}fill(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.commonFill(this.sdk.order.fill,e)}))}buy(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.commonFill(this.sdk.order.buy,e)}))}acceptBid(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.commonFill(this.sdk.order.acceptBid,e,!0)}))}batchBuy(e){return r.__awaiter(this,void 0,void 0,(function*(){const t={};return{submit:this.sdk.order.buyBatch.around((e=>r.__awaiter(this,void 0,void 0,(function*(){const n=yield(0,p.assertWallet)(this.wallet).ethereum.getChainId();return e.map((e=>{const r=(0,c.extractBlockchain)(e.orderId);(0,p.assertBlockchainAndChainId)(n,r),(0,l.checkPayouts)(e.payouts);const i=t[e.orderId];if(!i)throw new Error("Order with id ".concat(e.orderId," not precached"));if(e.unwrap)throw new Error("Unwrap is not supported yet");return this.getFillOrderRequest(i,e)}))}))),((e,t)=>r.__awaiter(this,void 0,void 0,(function*(){const n=yield(0,p.getWalletNetwork)(this.wallet);return new o.BlockchainEthereumTransaction(e,n,(e=>r.__awaiter(this,void 0,void 0,(function*(){var n;try{const r=(yield e())||[];let i=[];for(let e of r)if("0"in e&&"Execution"===(null===(n=e[0])||void 0===n?void 0:n.event))if(Array.isArray(e))i.push(...e);else{let t=0;for(;e[t];)i.push(e[t]),t+=1}else"Execution"===e.event&&i.push(e);return i?{type:"BATCH_BUY",results:t.map(((e,t)=>{var n,r,a;return{orderId:e.orderId,result:"0x0000000000000000000000000000000000000000000000000000000000000001"===((null===(n=i[t])||void 0===n?void 0:n.data)||(null===(a=null===(r=i[t])||void 0===r?void 0:r.raw)||void 0===a?void 0:a.data))}}))}:void 0}catch(r){return void console.error("Can't parse transaction events",r)}}))))})))),prepared:yield Promise.all(e.map((e=>r.__awaiter(this,void 0,void 0,(function*(){const n=(0,p.getOrderId)(e),r=yield this.apis.order.getOrderById({id:n}),i=(0,c.extractBlockchain)(n),a=yield(0,p.getEthOrder)((0,p.assertWallet)(this.wallet).ethereum,r);if(t[n]=a,"ACTIVE"!==r.status)throw new Error("Order with id ".concat(n," is not active"));if("OPEN_SEA_V1"!==a.type&&"RARIBLE_V2"!==a.type&&"SEAPORT_V1"!==a.type&&"LOOKSRARE"!==a.type&&"LOOKSRARE_V2"!==a.type&&"AMM"!==a.type&&"X2Y2"!==a.type)throw new Error("Order type ".concat(a.type," is not supported for batch buy"));if("ETH"===a.make.assetType.assetClass||"ERC20"===a.make.assetType.assetClass)throw new Error("Bid orders is not supported");return Object.assign(Object.assign({orderId:n},this.getSupportFlags(r)),{multiple:yield this.isMultiple(r),maxAmount:yield this.getMaxAmount(r),baseFee:yield this.sdk.order.getBaseOrderFillFee(a),orderData:{platform:this.getPlatform(r),nftCollection:"contract"in a.make.assetType?(0,p.convertEthereumContractAddress)(a.make.assetType.contract,i):void 0}})})))))}}))}getBuyAmmInfo(e){return this.sdk.order.getBuyAmmInfo({hash:e.hash,numNFTs:e.numNFTs})}batchBuyBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.batchBuy(e)).submit(e)}))}}},2154:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumBurn=void 0;const r=n(11),i=n(99),a=n(20),o=n(122),s=n(123),d=n(235);t.EthereumBurn=class{constructor(e,t,n,r){this.sdk=e,this.wallet=t,this.apis=n,this.network=r,this.burn=this.burn.bind(this),this.burnBasic=this.burnBasic.bind(this)}burn(e){return r.__awaiter(this,void 0,void 0,(function*(){const{contract:t,tokenId:n,domain:c}=(0,d.getEthereumItemId)(e.itemId),u=(0,s.extractBlockchain)(e.itemId),[l,p]=yield Promise.all([this.apis.item.getItemById({itemId:e.itemId}),this.apis.collection.getCollectionById({collection:"".concat(c,":").concat(t)})]);return{multiple:"ERC1155"===p.type,maxAmount:l.supply,submit:i.Action.create({id:"burn",run:e=>r.__awaiter(this,void 0,void 0,(function*(){yield(0,d.checkWalletBlockchain)(this.wallet,u);const r=void 0!==(null===e||void 0===e?void 0:e.amount)?(0,a.toBigNumber)(e.amount.toFixed()):void 0,i=yield this.sdk.nft.burn({assetType:{contract:(0,a.toAddress)(t),tokenId:n},amount:r,creators:(0,d.toEthereumParts)(null===e||void 0===e?void 0:e.creators)});return i&&new o.BlockchainEthereumTransaction(i,yield(0,d.getWalletNetwork)(this.wallet))}))})}}))}burnBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.burn(e)).submit(e)}))}}},2155:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumTransfer=void 0;const r=n(11),i=n(99),a=n(20),o=n(122),s=n(235);t.EthereumTransfer=class{constructor(e,t,n){this.sdk=e,this.wallet=t,this.apis=n,this.transfer=this.transfer.bind(this),this.transferBasic=this.transferBasic.bind(this)}transfer(e){return r.__awaiter(this,void 0,void 0,(function*(){const{contract:t,tokenId:n,domain:d}=(0,s.getEthereumItemId)(e.itemId);if(!(0,s.isEVMBlockchain)(d))throw new Error("Not an ethereum item: ".concat(e.itemId));const[c,u]=yield Promise.all([this.apis.item.getItemById({itemId:e.itemId}),this.apis.collection.getCollectionById({collection:"".concat(d,":").concat(t)})]);return{multiple:"ERC1155"===u.type,maxAmount:c.supply,submit:i.Action.create({id:"transfer",run:e=>r.__awaiter(this,void 0,void 0,(function*(){yield(0,s.checkWalletBlockchain)(this.wallet,d);const r=void 0!==e.amount?(0,a.toBigNumber)(e.amount.toFixed()):void 0,i=yield this.sdk.nft.transfer({contract:(0,a.toAddress)(t),tokenId:n},(0,s.convertToEthereumAddress)(e.to),r);return new o.BlockchainEthereumTransaction(i,yield(0,s.getWalletNetwork)(this.wallet))}))})}}))}transferBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.transfer(e)).submit(e)}))}}},2156:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateBidNotSupportedForThidKindOfOrderError=t.InsufficientFundsError=t.EthereumBid=void 0;const r=n(11),i=n(20),a=n(294),o=n(29),s=n(99),d=n(641),c=n(1111),u=n(561),l=n(647),p=n(101),y=n(210),m=n(184),f=n(2157),h=n(236),b=n(563),T=n(334),v=n(1117),g=n(221),E=r.__importStar(n(235)),_=n(235);t.EthereumBid=class{constructor(e,t,n,r,i){this.sdk=e,this.wallet=t,this.apis=n,this.balanceService=r,this.config=i,this.bid=this.bid.bind(this),this.update=this.update.bind(this),this.getConvertableValue=this.getConvertableValue.bind(this),this.convertCurrency=this.convertCurrency.bind(this),this.bidBasic=this.bidBasic.bind(this),this.bidUpdateBasic=this.bidUpdateBasic.bind(this)}convertAssetType(e,t){switch(e.assetClass){case"ETH":return{"@type":"ETH"};case"ERC20":return{"@type":"ERC20",contract:(0,_.convertEthereumContractAddress)(e.contract,t)};case"ERC721":return{"@type":"ERC721",contract:(0,_.convertEthereumContractAddress)(e.contract,t),tokenId:e.tokenId};case"ERC721_LAZY":return{"@type":"ERC721_Lazy",contract:(0,_.convertEthereumContractAddress)(e.contract,t),tokenId:e.tokenId,uri:e.uri,creators:e.creators.map((e=>({account:(0,i.toUnionAddress)(e.account),value:e.value}))),royalties:e.royalties.map((e=>({account:(0,i.toUnionAddress)(e.account),value:e.value}))),signatures:e.signatures.map((e=>(0,i.toBinary)(e)))};case"ERC1155":return{"@type":"ERC1155",contract:(0,_.convertEthereumContractAddress)(e.contract,t),tokenId:e.tokenId};case"ERC1155_LAZY":return{"@type":"ERC1155_Lazy",contract:(0,_.convertEthereumContractAddress)(e.contract,t),tokenId:e.tokenId,uri:e.uri,supply:void 0!==e.supply?(0,a.toBigNumber)(e.supply):(0,a.toBigNumber)("1"),creators:e.creators.map((e=>({account:(0,i.toUnionAddress)(e.account),value:e.value}))),royalties:e.royalties.map((e=>({account:(0,i.toUnionAddress)(e.account),value:e.value}))),signatures:e.signatures.map(i.toBinary)};case"GEN_ART":return{"@type":"GEN_ART",contract:(0,_.convertEthereumContractAddress)(e.contract,t)};default:throw new Error("Unsupported asset type ".concat(e.assetClass))}}bidBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.bid(e)).submit(e)}))}bidUpdateBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.update(e)).submit(e)}))}bid(e){var t;return r.__awaiter(this,void 0,void 0,(function*(){if("itemId"in e){const t=(0,g.getCollectionFromItemId)(e.itemId);(yield this.apis.collection.getCollectionById({collection:t})).self&&(yield(0,v.checkRoyalties)(e.itemId,this.apis))}return(null===(t=this.config)||void 0===t?void 0:t.useDataV3)?this.bidDataV3(e):this.bidDataV2(e)}))}bidDataV2(e){return r.__awaiter(this,void 0,void 0,(function*(){const{ethAssetType:t,item:n,contract:i,blockchain:a}=yield w(this.apis,e),d=yield this.apis.collection.getCollectionById({collection:i}),c=this.sdk.order.bid.before((e=>r.__awaiter(this,void 0,void 0,(function*(){yield(0,_.checkWalletBlockchain)(this.wallet,a);const n=e.expirationDate?(0,b.convertDateToTimestamp)(e.expirationDate):(0,b.getDefaultExpirationDateTimestamp)(),r=(0,h.getCurrencyAssetType)(e.currency);return{type:"DATA_V2",makeAssetType:E.getEthTakeAssetType(r),takeAssetType:t,amount:(0,_.getOrderAmount)(e.amount,d),priceDecimal:e.price,payouts:E.toEthereumParts(e.payouts),originFees:E.toEthereumParts(e.originFees),end:n}})))).after((e=>r.__awaiter(this,void 0,void 0,(function*(){var t;return yield null===(t=e.approveTx)||void 0===t?void 0:t.wait(),E.convertEthereumOrderHash(e.order.hash,a)})))),u=s.Action.create({id:"convert",run:e=>r.__awaiter(this,void 0,void 0,(function*(){var t;yield(0,_.checkWalletBlockchain)(this.wallet,a);const n=(0,h.getCurrencyAssetType)(e.currency);if("ERC20"===n["@type"]){const r=yield this.sdk.balances.getWethContractAddress();if(a!==o.Blockchain.MANTLE&&(0,l.compareCaseInsensitive)((0,_.convertToEthereumAddress)(n.contract),r)){const r=(null===(t=e.originFees)||void 0===t?void 0:t.reduce(((e,t)=>e+t.value),0))||0,i=(0,_.getOrderAmount)(e.amount,d),o=yield this.getConvertableValueCommon(n,e.price,i,r,a);yield this.convertCurrency(o)}}return e}))}).thenAction(c);return{originFeeSupport:m.OriginFeeSupport.FULL,payoutsSupport:m.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:m.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:E.getSupportedCurrencies(o.Blockchain.ETHEREUM,!0),multiple:"ERC1155"===d.type,maxAmount:n?n.supply:null,baseFee:yield this.sdk.order.getBaseOrderFee(),getConvertableValue:this.getConvertableValue.bind(this,a),supportsExpirationDate:!0,submit:u}}))}bidDataV3(e){return r.__awaiter(this,void 0,void 0,(function*(){const{ethAssetType:t,item:n,contract:i,blockchain:a}=yield w(this.apis,e),d=yield this.apis.collection.getCollectionById({collection:i}),c=this.sdk.order.bid.before((e=>r.__awaiter(this,void 0,void 0,(function*(){yield(0,_.checkWalletBlockchain)(this.wallet,a),(0,_.validateOrderDataV3Request)(e,{shouldProvideMaxFeesBasePoint:!1});const n=e.expirationDate?(0,b.convertDateToTimestamp)(e.expirationDate):(0,b.getDefaultExpirationDateTimestamp)(),r=(0,h.getCurrencyAssetType)(e.currency),i=E.toEthereumParts(e.payouts),o=E.toEthereumParts(e.originFees);return{type:"DATA_V3_BUY",makeAssetType:E.getEthTakeAssetType(r),takeAssetType:t,amount:(0,_.getOrderAmount)(e.amount,d),priceDecimal:e.price,payout:i[0],originFeeFirst:o[0],originFeeSecond:o[1],end:n}})))).after((e=>r.__awaiter(this,void 0,void 0,(function*(){var t;return yield null===(t=e.approveTx)||void 0===t?void 0:t.wait(),E.convertEthereumOrderHash(e.order.hash,a)})))),u=s.Action.create({id:"convert",run:e=>r.__awaiter(this,void 0,void 0,(function*(){var t;yield(0,_.checkWalletBlockchain)(this.wallet,a),(0,T.checkPayouts)(e.payouts);const n=yield this.sdk.balances.getWethContractAddress(),r=(0,h.getCurrencyAssetType)(e.currency);if(a!==o.Blockchain.MANTLE&&"ERC20"===r["@type"]&&(0,l.compareCaseInsensitive)((0,_.convertToEthereumAddress)(r.contract),n)){const n=(null===(t=e.originFees)||void 0===t?void 0:t.reduce(((e,t)=>e+t.value),0))||0,i=(0,_.getOrderAmount)(e.amount,d),o=yield this.getConvertableValueCommon(r,e.price,i,n,a);yield this.convertCurrency(o)}return e}))}).thenAction(c);return{originFeeSupport:m.OriginFeeSupport.FULL,payoutsSupport:m.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:m.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:E.getSupportedCurrencies(a,!0),multiple:"ERC1155"===d.type,maxAmount:n?n.supply:null,baseFee:yield this.sdk.order.getBaseOrderFee(),getConvertableValue:this.getConvertableValue.bind(this,a),supportsExpirationDate:!0,submit:u}}))}getConvertableValue(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=this.getAssetTypeForConvert(t);if("ERC20"===n["@type"]){const r=yield this.sdk.balances.getWethContractAddress();if(e!==o.Blockchain.MANTLE&&(0,l.compareCaseInsensitive)((0,_.convertToEthereumAddress)(n.contract),r)){const r=t.originFees.reduce(((e,t)=>e+t.value),0);return this.getConvertableValueCommon(n,t.price,t.amount,r,e)}}}))}getAssetTypeForConvert(e){if(e.assetType)return e.assetType;if(e.currencyId)return(0,h.getCurrencyAssetType)(e.currencyId);throw new Error("assetType or currencyId should be specified")}getConvertableValueCommon(e,t,n,i,s){return r.__awaiter(this,void 0,void 0,(function*(){const r=E.assertWallet(this.wallet),l=(0,_.convertToEthereumAssetType)(e),y=(0,p.toBn)(t).multipliedBy(n),[m,h]=yield Promise.all([(0,u.getPrice)(r.ethereum,l,y),this.sdk.order.getBaseOrderFee()]),b=(0,d.addFee)({assetType:l,value:(0,a.toBigNumber)(m.toString())},i+h),[T,v]=yield Promise.all([(0,c.getDecimals)(r.ethereum,l),r.ethereum.getFrom()]),g=(0,_.convertEthereumToUnionAddress)(v,o.Blockchain.ETHEREUM),O={"@type":"ETH",blockchain:s},A=(0,p.toBn)(b.value).integerValue().div((0,p.toBn)(10).pow(T));return(0,f.getCommonConvertableValue)(this.balanceService.getBalance,g,A,O,e)}))}convertCurrency(e){return r.__awaiter(this,void 0,void 0,(function*(){if("insufficient"===(null===e||void 0===e?void 0:e.type))throw new O;if("convertable"===(null===e||void 0===e?void 0:e.type)){const t=yield this.sdk.balances.deposit(e.value);yield t.wait()}}))}update(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!e.orderId)throw new Error("OrderId has not been specified");const[t,n]=e.orderId.split(":");if(!(0,_.isEVMBlockchain)(t))throw new Error("Not an ethereum order");const a=yield this.apis.order.getValidatedOrderById({id:e.orderId});if(!(0,_.isRaribleOrderData)(a.data))throw new A(a.data["@type"]);const d=this.sdk.order.bidUpdate.before((e=>r.__awaiter(this,void 0,void 0,(function*(){return yield(0,_.checkWalletBlockchain)(this.wallet,t),{orderHash:(0,i.toWord)(n),priceDecimal:e.price}})))).after((e=>r.__awaiter(this,void 0,void 0,(function*(){var n;return yield null===(n=e.approveTx)||void 0===n?void 0:n.wait(),E.convertEthereumOrderHash(e.order.hash,t)})))),c=s.Action.create({id:"convert",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if(yield(0,_.checkWalletBlockchain)(this.wallet,t),t===o.Blockchain.MANTLE)return e;if((0,_.isWETH)(a.make.type,yield this.sdk.balances.getWethContractAddress())){const n=(0,_.getOrderFeesSum)(a),r=yield this.getConvertableValueCommon(a.make.type,e.price,a.take.value,n,t);yield this.convertCurrency(r)}return e}))}).thenAction(d);return{originFeeSupport:(0,_.getOriginFeeSupport)(a.data),payoutsSupport:(0,_.getPayoutsSupport)(a.data),maxFeesBasePointSupport:m.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:E.getSupportedCurrencies(o.Blockchain.ETHEREUM,!0),baseFee:yield this.sdk.order.getBaseOrderFee((0,_.convertOrderType)(a.data)),getConvertableValue:this.getConvertableValue.bind(this,t),submit:c,orderData:{nftCollection:"contract"in a.take.type?a.take.type.contract:void 0}}}))}};class O extends Error{constructor(){super("Insufficient funds for convertation"),this.name="InsufficientFundsError"}}t.InsufficientFundsError=O;class A extends Error{constructor(e){super("Update bid is not supported for ".concat(e," kind of order")),this.name="UpdateBidNotSupportedForThidKindOfOrderError"}}function w(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if("itemId"in t){const n=yield e.item.getItemById({itemId:t.itemId}),{tokenId:r,contract:a,domain:o}=(0,_.getEthereumItemId)(n.id);return{ethAssetType:{tokenId:r,contract:(0,i.toAddress)(a)},item:n,contract:(0,i.toContractAddress)(n.contract),blockchain:o}}if("collectionId"in t)return{ethAssetType:{assetClass:"COLLECTION",contract:(0,_.convertToEthereumAddress)(t.collectionId)},contract:(0,i.toContractAddress)(t.collectionId),blockchain:(0,_.extractEVMBlockchain)(t.collectionId)};throw new y.Warning("ItemId or CollectionId must be assigned")}))}t.UpdateBidNotSupportedForThidKindOfOrderError=A},2157:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCommonConvertableValue=void 0;const r=n(11),i=r.__importDefault(n(39));t.getCommonConvertableValue=function(e,t,n,a,o){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield e(t,o);if(new i.default(r).gte(n))return;const s=yield e(t,a);return new i.default(s).plus(r).gte(n)?{type:"convertable",currency:a,value:new i.default(n).minus(r)}:{type:"insufficient",currency:a,value:new i.default(n).minus(s)}}))}},2158:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumCancel=void 0;const r=n(11),i=n(122),a=n(235);t.EthereumCancel=class{constructor(e,t,n){this.sdk=e,this.wallet=t,this.apis=n,this.cancel=this.cancel.bind(this)}cancel(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!e.orderId)throw new Error("OrderId has not been specified");const[t]=e.orderId.split(":");if(!(0,a.isEVMBlockchain)(t))throw new Error("Not an ethereum order");const n=yield this.apis.order.getValidatedOrderById({id:e.orderId}),{ethereum:r}=(0,a.assertWallet)(this.wallet),o=yield(0,a.getEthOrder)(r,n),s=yield this.sdk.order.cancel(o);return new i.BlockchainEthereumTransaction(s,yield(0,a.getWalletNetwork)(this.wallet))}))}}},2159:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumBalance=void 0;const r=n(11),i=n(101),a=n(122),o=n(29),s=n(99),d=n(123),c=n(236),u=n(235);t.EthereumBalance=class{constructor(e,t,n){this.sdk=e,this.wallet=t,this.apis=n,this.depositBiddingBalance=s.Action.create({id:"send-tx",run:e=>this.convert({blockchain:o.Blockchain.ETHEREUM,isWrap:!0,value:e.amount})}),this.withdrawBiddingBalance=s.Action.create({id:"send-tx",run:e=>this.convert({blockchain:o.Blockchain.ETHEREUM,isWrap:!1,value:e.amount})}),this.getBalance=this.getBalance.bind(this),this.convert=this.convert.bind(this),this.getBiddingBalance=this.getBiddingBalance.bind(this)}getBalance(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,c.getCurrencyAssetType)(t);if(!(0,c.isEth)(n)&&!(0,c.isErc20)(n))throw new Error("Unsupported asset type for getting balance");const r=yield this.apis.balances.getBalance({currencyId:(0,c.getEVMCurrencyId)(t),owner:e});return(0,i.toBn)(r.decimal)}))}convert(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.send(e);return new a.BlockchainEthereumTransaction(t,yield(0,u.getWalletNetwork)(this.wallet))}))}send(e){return e.isWrap?this.sdk.balances.deposit(e.value):this.sdk.balances.withdraw(e.value)}getBiddingBalance(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getBiddingCurrency(e);return this.getBalance(e.walletAddress,t)}))}getBiddingCurrency(e){return r.__awaiter(this,void 0,void 0,(function*(){if("currency"in e)return e.currency;{const t=yield this.sdk.balances.getWethContractAddress(),n=(0,d.extractBlockchain)(e.walletAddress);if((0,u.isEVMBlockchain)(n))return{"@type":"ERC20",contract:(0,u.convertEthereumContractAddress)(t,n)};throw new Error("Bidding balance is not supported for ".concat(n))}}))}}},2160:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumTokenId=void 0;const r=n(11),i=n(20);t.EthereumTokenId=class{constructor(e,t){this.sdk=e,this.apis=t,this.generateTokenId=this.generateTokenId.bind(this)}generateTokenId(e){let{collection:t,minter:n}=e;return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.apis.collection.generateTokenId({collection:t,minter:n});return{tokenId:e.tokenId.toString(),signature:"ETHEREUM"===e["@type"]?{v:e.signature.v,r:(0,i.toBinary)(e.signature.r),s:(0,i.toBinary)(e.signature.s)}:{v:0,r:(0,i.toBinary)("0x"),s:(0,i.toBinary)("0x")}}}))}}},2161:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumCreateCollection=void 0;const r=n(11),i=n(122),a=n(123),o=n(295),s=n(235);t.EthereumCreateCollection=class{constructor(e,t){this.sdk=e,this.wallet=t,this.createCollectionSimplified=this.createCollectionSimplified.bind(this)}convertOperatorsAddresses(e){if(!e)throw new Error("Operators should be provided in case of deploy private collection");return e.map((e=>(0,s.convertToEthereumAddress)(e)))}convertResponse(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,s.assertWallet)(this.wallet).ethereum.getChainId(),n=yield(0,o.getNetworkFromChainId)(t),r=yield(0,o.getBlockchainFromChainId)(t);return{tx:new i.BlockchainEthereumTransaction(e.tx,n),address:(0,s.convertEthereumContractAddress)(e.address,r)}}))}startCreateCollection(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=[e.arguments.name,e.arguments.symbol,e.arguments.baseURI,e.arguments.contractURI];if(e.arguments.isUserToken){const n=this.convertOperatorsAddresses(e.arguments.operators);if("ERC721"===e.assetType)return this.sdk.nft.deploy.erc721.deployUserToken(...t,n);if("ERC1155"===e.assetType)return this.sdk.nft.deploy.erc1155.deployUserToken(...t,n);throw new Error("Unsupported asset type")}if("ERC721"===e.assetType)return this.sdk.nft.deploy.erc721.deployToken(...t);if("ERC1155"===e.assetType)return this.sdk.nft.deploy.erc1155.deployToken(...t);throw new Error("Unsupported asset type")}))}createCollectionSimplified(e){return r.__awaiter(this,void 0,void 0,(function*(){if(t=e,!(0,a.isEVMBlockchain)(t.blockchain))throw new Error("Wrong blockchain");var t;return this.convertResponse(yield this.startCreateCollection({assetType:e.type,arguments:{name:e.name,symbol:e.symbol,baseURI:e.baseURI,contractURI:e.contractURI,isUserToken:!e.isPublic,operators:"operators"in e?e.operators:[]}}))}))}}},2162:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumCryptopunk=void 0;const r=n(11),i=n(99),a=n(122),o=n(235);t.EthereumCryptopunk=class{constructor(e,t){this.sdk=e,this.wallet=t,this.wrap=i.Action.create({id:"approve-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if(!e.punkId)throw new Error("PunkId has not been specified");const t=yield this.sdk.nft.cryptoPunks.approveForWrapper(e.punkId);return t&&(yield new a.BlockchainEthereumTransaction(t,yield(0,o.getWalletNetwork)(this.wallet)).wait()),e}))}).thenStep({id:"wrap-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.sdk.nft.cryptoPunks.wrap(e.punkId);return new a.BlockchainEthereumTransaction(t,yield(0,o.getWalletNetwork)(this.wallet))}))}),this.unwrap=i.Action.create({id:"unwrap-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if(!e.punkId)throw new Error("PunkId has not been specified");const t=yield this.sdk.nft.cryptoPunks.unwrap(e.punkId);return new a.BlockchainEthereumTransaction(t,yield(0,o.getWalletNetwork)(this.wallet))}))})}}},2163:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTezosSdk=void 0;const r=n(29),i=n(374),a=n(474),o=n(654),s=n(375),d=n(2164),c=n(2224),u=n(255),l=n(2225),p=n(2226),y=n(2227),m=n(2228),f=n(2229),h=n(2231),b=n(2232),T=n(2233),v=n(2235);t.createTezosSdk=function(e,t,n,g){const E=n.tezosNetwork,_=(0,u.getMaybeTezosProvider)(null===e||void 0===e?void 0:e.provider,E,Object.assign(Object.assign({},n),{apiKey:null===g||void 0===g?void 0:g.apiKey})),O=new d.TezosSell(_,t),A=new l.TezosMint(_,t,E),w=new h.TezosBalance(_,E),k=new c.TezosFill(_,t,E),{createCollectionSimplified:C}=new b.TezosCreateCollection(_,E),S=new p.TezosTransfer(_,t,E),I=new y.TezosBurn(_,t,E),R=new f.TezosCancel(_,t,E),x=new v.TezosBid(_,t,E),P=i.Middlewarer.skipMiddleware(A.preprocessMeta),B=new o.MetaUploader(r.Blockchain.TEZOS,P);return{nft:{mint:new s.MethodWithPrepare(A.mintBasic,A.mint),burn:new s.MethodWithPrepare(I.burnBasic,I.burn),transfer:new s.MethodWithPrepare(S.transferBasic,S.transfer),generateTokenId:new m.TezosTokenId(_).generateTokenId,createCollection:C,preprocessMeta:P,uploadMeta:B.uploadMeta},order:{fill:{prepare:k.buy},buy:new s.MethodWithPrepare(k.buyBasic,k.buy),batchBuy:new s.MethodWithPrepare(k.batchBuyBasic,k.batchBuy),acceptBid:new s.MethodWithPrepare(k.acceptBidBasic,k.acceptBid),sell:new s.MethodWithPrepare(O.sellBasic,O.sell),sellUpdate:new s.MethodWithPrepare(O.sellUpdateBasic,O.update),bid:new s.MethodWithPrepare(x.bidBasic,x.bid),bidUpdate:new s.MethodWithPrepare(x.updateBasic,x.update),cancel:R.cancelBasic},balances:{getBalance:w.getBalance,convert:a.notImplemented,transfer:a.notImplemented,getBiddingBalance:a.nonImplementedAction,depositBiddingBalance:a.nonImplementedAction,withdrawBiddingBalance:a.nonImplementedAction},restriction:{canTransfer:new T.TezosCanTransfer(_).canTransfer,getFutureOrderFees:()=>O.getFutureOrderFees()}}}},2164:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TezosSell=void 0;const r=n(11),i=n(273),a=n(99),o=r.__importDefault(n(39)),s=n(2223),d=n(210),c=n(20),u=n(184),l=n(236),p=n(563),y=n(334),m=n(221),f=n(255),h=n(655);t.TezosSell=class{constructor(e,t){this.provider=e,this.unionAPI=t,this.sell=this.sell.bind(this),this.update=this.update.bind(this),this.sellUpdateBasic=this.sellUpdateBasic.bind(this),this.sellBasic=this.sellBasic.bind(this)}parseTakeAssetType(e){return r.__awaiter(this,void 0,void 0,(function*(){switch(e["@type"]){case"XTZ":return{asset_class:e["@type"]};case"TEZOS_FT":{const t=(0,f.getRequiredProvider)(this.provider),n=(0,f.convertFromContractAddress)(e.contract);return{asset_class:"FT",contract:n,token_id:(yield(0,i.get_ft_type)(t.config,n))===i.AssetTypeV2.FA2?new o.default(e.tokenId||0):void 0}}default:throw new Error("Unsupported take asset type")}}))}getFutureOrderFees(){return r.__awaiter(this,void 0,void 0,(function*(){return{originFeeSupport:u.OriginFeeSupport.FULL,baseFee:parseInt(this.provider.config.fees.toString())}}))}sell(){return r.__awaiter(this,void 0,void 0,(function*(){yield(0,f.checkChainId)(this.provider);const e=a.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){return this.sellV2(e)}))});return{originFeeSupport:u.OriginFeeSupport.FULL,payoutsSupport:u.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:u.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:(0,f.getSupportedCurrencies)(),baseFee:parseInt(this.provider.config.fees.toString()),supportsExpirationDate:!1,submit:e}}))}sellBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.sellV2(e)}))}sellUpdateBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.update({orderId:e.orderId})).submit({price:e.price})}))}sellV2(e){return r.__awaiter(this,void 0,void 0,(function*(){yield(0,f.checkChainId)(this.provider),(0,y.checkPayouts)(e.payouts);const t=(0,f.getRequiredProvider)(this.provider),{contract:n,tokenId:r}=(0,f.getTezosItemData)(e.itemId),i=(0,l.getCurrencyAssetType)(e.currency),a=e.expirationDate?(0,p.convertDateToTimestamp)(e.expirationDate):(0,p.getDefaultExpirationDateTimestamp)(),d=yield(0,h.getCollectionType)(this.provider,n),u=yield(0,f.getTezosAssetTypeV2)(t.config,i),m={s_asset_contract:n,s_asset_token_id:new o.default(r),s_sale_type:u.type,s_sale_asset_contract:u.asset_contract,s_sale_asset_token_id:u.asset_token_id,s_sale:{sale_amount:new o.default(e.price),sale_asset_qty:(0,f.getRequestAmount)(e.amount,d)||new o.default(1),sale_max_fees_base_boint:1e4,sale_end:a,sale_start:void 0,sale_origin_fees:(0,f.convertUnionParts)(e.originFees),sale_payouts:(0,f.convertUnionParts)(e.payouts),sale_data:void 0,sale_data_type:void 0}},b=yield(0,s.sellV2)(t,m);if(!b)throw new Error("OrderID cannot be requested");return(0,c.toOrderId)(b)}))}update(e){return r.__awaiter(this,void 0,void 0,(function*(){yield(0,f.checkChainId)(this.provider);const t=yield this.unionAPI.order.getOrderById({id:e.orderId});if(!t)throw new Error("Order has not been found");if("TEZOS_RARIBLE_V2"===t.data["@type"])throw new d.Warning("You can't change v1 version of order. Cancel order and create a new one");const{make:n,take:i}=t,l=n.type;if("TEZOS_NFT"!==l["@type"]&&"TEZOS_MT"!==l["@type"])throw new Error("Order is not a sell (id=".concat(e.orderId,")"));const p=a.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const r=(0,f.getRequiredProvider)(this.provider),a={make_contract:(0,f.convertFromContractAddress)(l.contract),make_token_id:new o.default(l.tokenId),maker:(0,f.getTezosAddress)(t.maker),take_contract:"contract"in i.type?(0,f.convertFromContractAddress)(i.type.contract):void 0};"TEZOS_FT"===i.type["@type"]&&i.type.tokenId&&(a.take_token_id=new o.default(i.type.tokenId.toString()));const d=yield(0,f.getTezosAssetTypeV2)(r.config,i.type),u=void 0!==t.endedAt?Math.floor(new Date(t.endedAt).getTime()):void 0,p={s_asset_contract:(0,f.convertFromContractAddress)(l.contract),s_asset_token_id:new o.default(l.tokenId),s_sale_type:d.type,s_sale_asset_contract:a.take_contract,s_sale_asset_token_id:d.asset_token_id,s_sale:{sale_amount:new o.default(e.price),sale_asset_qty:new o.default(n.value),sale_max_fees_base_boint:1e4,sale_end:u,sale_start:void 0,sale_origin_fees:"TEZOS_RARIBLE_V2"===t.data["@type"]?(0,f.convertUnionParts)(t.data.originFees):[],sale_payouts:"TEZOS_RARIBLE_V2"===t.data["@type"]?(0,f.convertUnionParts)(t.data.payouts):[],sale_data:void 0,sale_data_type:void 0}},y=yield(0,s.sellV2)(r,p);return(0,c.toOrderId)(y)}))});return{originFeeSupport:u.OriginFeeSupport.FULL,payoutsSupport:u.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:u.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:(0,f.getSupportedCurrencies)(),baseFee:parseInt(this.provider.config.fees.toString()),submit:p,orderData:{nftCollection:(0,m.getNftContractAddress)(t.make.type)}}}))}}},219:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(11);r.__exportStar(n(2979),t),r.__exportStar(n(2980),t),r.__exportStar(n(2981),t),r.__exportStar(n(2983),t),r.__exportStar(n(2984),t),r.__exportStar(n(2985),t)},2197:function(e,t){},221:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertSupportedBlockchainToUnion=t.extractUnionSupportedBlockchain=t.getOrderId=t.getBidEntity=t.getContractFromMintRequest=t.getCollectionFromItemId=t.getItemIdData=t.getOrderNftContractAddress=t.getNftContractAddress=t.getOrderIdFromFillRequest=void 0;const r=n(20),i=n(123);function a(e){switch(e["@type"]){case"FLOW_NFT":case"TEZOS_NFT":case"ERC721":case"ERC721_Lazy":case"ERC1155":case"ERC1155_Lazy":case"CRYPTO_PUNKS":case"GEN_ART":case"COLLECTION":case"AMM_NFT":return e.contract;default:return}}function o(e){if(!e)throw new Error("Not an item: ".concat(e));const[t,n,i]=e.split(":");return{collection:(0,r.toCollectionId)("".concat(t,":").concat(n)),contract:n,tokenId:i,blockchain:t}}function s(e){return(0,i.isEVMBlockchain)(e)?"EVM":e}t.getOrderIdFromFillRequest=function(e){var t;if(e)return"orderId"in e?null===e||void 0===e?void 0:e.orderId:"order"in e?null===(t=null===e||void 0===e?void 0:e.order)||void 0===t?void 0:t.id:void 0},t.getNftContractAddress=a,t.getOrderNftContractAddress=function(e){return a(e.make.type)||a(e.take.type)},t.getItemIdData=o,t.getCollectionFromItemId=function(e){const{collection:t}=o(e);return t},t.getContractFromMintRequest=function(e){if("collection"in e)return e.collection.id;if("collectionId"in e)return e.collectionId;throw new Error("Wrong request: collection or collectionId has not been found")},t.getBidEntity=function(e){if("itemId"in e)return e.itemId;if("collectionId"in e)return e.collectionId;throw new Error("Bit request should contains itemId or collectionId")},t.getOrderId=function(e){return"orderId"in e?e.orderId:e.order.id},t.extractUnionSupportedBlockchain=function(e){return s((0,i.extractBlockchain)(e))},t.convertSupportedBlockchainToUnion=s},2224:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TezosFill=void 0;const r=n(11),i=n(99),a=n(273),o=n(20),s=n(122),d=r.__importDefault(n(39)),c=n(29),u=n(1127),l=n(835),p=n(210),y=n(147),m=n(184),f=n(334),h=n(221),b=n(255);t.TezosFill=class{constructor(e,t,n){this.provider=e,this.unionAPI=t,this.network=n,this.buy=this.buy.bind(this),this.batchBuy=this.batchBuy.bind(this),this.batchBuyBasic=this.batchBuyBasic.bind(this),this.buyBasic=this.buyBasic.bind(this),this.acceptBid=this.acceptBid.bind(this),this.acceptBidBasic=this.acceptBidBasic.bind(this),this.fillCommon=this.fillCommon.bind(this)}getPreparedOrder(e){return r.__awaiter(this,void 0,void 0,(function*(){if("order"in e)return e.order;if("orderId"in e){const[t]=e.orderId.split(":");if(t!==c.Blockchain.TEZOS)throw new Error("Not an tezos order");return this.unionAPI.order.getOrderById({id:e.orderId})}throw new Error("Request error")}))}getMaxAmount(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,b.getRequiredProvider)(this.provider);if("TEZOS_MT"===e.take.type["@type"]||"TEZOS_NFT"===e.take.type["@type"]){const{contract:n,tokenId:r}=e.take.type,i="".concat(n,":").concat(r.toString(),":").concat(yield(0,a.get_address)(t)),s=yield this.unionAPI.ownership.getOwnershipById({ownershipId:i});return(0,o.toBigNumber)(s.value)}return(0,o.toBigNumber)(e.makeStock)}))}isMultiple(e){return"TEZOS_MT"===e.take.type["@type"]||"TEZOS_MT"===e.make.type["@type"]}buyV2(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){yield(0,b.checkChainId)(this.provider),(0,f.checkPayouts)(n.payouts);const r=(0,b.getRequiredProvider)(this.provider),i=void 0!==e.makePrice?new d.default(e.makePrice):new d.default(0),a=yield(0,b.getTezosAssetTypeV2)(this.provider.config,e.take.type);if(!t.make_contract||!t.make_token_id)throw new Error("Make data for buyV2 should exist");const o={asset_contract:t.make_contract,asset_token_id:new d.default(t.make_token_id),asset_seller:(0,b.getTezosAddress)(e.maker),sale_type:a.type,sale_asset_contract:a.asset_contract,sale_asset_token_id:a.asset_token_id,sale_amount:i,sale_qty:new d.default(n.amount),sale_payouts:(0,b.convertUnionParts)(n.payouts),sale_origin_fees:(0,b.convertUnionParts)(n.originFees),use_all:!1};if(yield(0,u.isExistsSaleOrder)(r,o)){const e=yield(0,u.buyV2)(r,o);return new s.BlockchainTezosTransaction(e,this.network)}throw new Error("Error order does not exist")}))}buy(e){return r.__awaiter(this,void 0,void 0,(function*(){let t=yield this.getPreparedOrder(e);const n=i.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){return this.fillCommon(e,t)}))});return{multiple:this.isMultiple(t),maxAmount:yield this.getMaxAmount(t),baseFee:parseInt(this.provider.config.fees.toString()),originFeeSupport:m.OriginFeeSupport.FULL,payoutsSupport:m.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:m.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!0,submit:n,orderData:{platform:t.platform,nftCollection:(0,h.getNftContractAddress)(t.make.type)}}}))}fillV1Order(e,t){return r.__awaiter(this,void 0,void 0,(function*(){yield(0,b.checkChainId)(this.provider);const n=(0,b.getRequiredProvider)(this.provider),r={amount:new d.default(e.amount),payouts:(0,b.convertUnionParts)(e.payouts),origin_fees:(0,b.convertUnionParts)(e.originFees),infinite:e.infiniteApproval,use_all:!0},i=(0,b.getTezosOrderLegacyForm)(t),o=yield(0,a.fill_order)(n,i,r);return new s.BlockchainTezosTransaction(o,this.network)}))}buyBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){let t=yield this.getPreparedOrder(e);return this.fillCommon(e,t)}))}acceptBidBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.acceptBid(e)).submit(e)}))}acceptBid(e){return r.__awaiter(this,void 0,void 0,(function*(){let t=yield this.getPreparedOrder(e);const{make:n,take:a,data:o}=t,c=i.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){yield(0,b.checkChainId)(this.provider),(0,f.checkPayouts)(e.payouts);const r=(0,b.getRequiredProvider)(this.provider);if(!(0,b.isNftOrMTAssetType)(a.type))throw new p.Warning("Non-bid order has been passed");if("TEZOS_RARIBLE_V3"!==o["@type"])throw new Error("It's not TEZOS_RARIBLE_V3 order");if(!(0,y.toBn)(e.amount).isEqualTo(a.value))throw new p.Warning("Partial fill is unavailable for tezos orders");const i=yield(0,b.getTezosAssetTypeV2)(r.config,n.type),c={asset_contract:(0,b.convertFromContractAddress)(a.type.contract),asset_token_id:new d.default(a.type.tokenId),bidder:(0,b.convertUnionAddress)(t.maker),bid_type:i.type,bid_asset_contract:i.asset_contract,bid_asset_token_id:i.asset_token_id,bid_origin_fees:(0,b.convertUnionParts)(o.originFees),bid_payouts:yield(0,b.getPayouts)(r,o.payouts)},u=yield(0,l.accept_bid)(r,c);return new s.BlockchainTezosTransaction(u,this.network)}))});return{multiple:this.isMultiple(t),maxAmount:yield this.getMaxAmount(t),baseFee:parseInt(this.provider.config.fees.toString()),originFeeSupport:m.OriginFeeSupport.FULL,payoutsSupport:m.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:m.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!1,submit:c,orderData:{platform:t.platform,nftCollection:(0,h.getNftContractAddress)(t.take.type)}}}))}fillCommon(e,t){return r.__awaiter(this,void 0,void 0,(function*(){yield(0,b.checkChainId)(this.provider),(0,f.checkPayouts)(e.payouts);const n=(0,b.getRequiredProvider)(this.provider),{make:r,take:i}=t;if((0,b.isNftOrMTAssetType)(r.type)){const o={make_contract:(0,b.convertFromContractAddress)(r.type.contract),make_token_id:new d.default(r.type.tokenId),maker:(0,b.getTezosAddress)(t.maker),take_contract:"contract"in i.type?(0,b.convertFromContractAddress)(i.type.contract):void 0};if("TEZOS_FT"===i.type["@type"]&&i.type.tokenId&&(o.take_token_id=new d.default(i.type.tokenId.toString())),"TEZOS_RARIBLE_V3"===t.data["@type"])return this.buyV2(t,o,e);if("TEZOS_HEN"===t.data["@type"]){const e=yield(0,a.hen_collect)(n,t.id);if(!e)throw new Error("TEZOS_HEN operation result is empty");return new s.BlockchainTezosTransaction(e,this.network)}if("TEZOS_VERSUM_V1"===t.data["@type"]){const r=yield(0,a.versum_collect)(n,t.id,new d.default(e.amount));if(!r)throw new Error("TEZOS_VERSUM_V1 operation result is empty");return new s.BlockchainTezosTransaction(r,this.network)}if("TEZOS_TEIA_V1"===t.data["@type"]){const e=yield(0,a.teia_collect)(n,t.id);if(!e)throw new Error("TEZOS_TEIA_V1 operation result is empty");return new s.BlockchainTezosTransaction(e,this.network)}if("TEZOS_OBJKT_V1"===t.data["@type"]){const e=yield(0,a.objkt_fulfill_ask_v1)(n,t.id);if(!e)throw new Error("TEZOS_OBJKT_V1 operation result is empty");return new s.BlockchainTezosTransaction(e,this.network)}if("TEZOS_OBJKT_V2"===t.data["@type"]){const e=yield(0,a.objkt_fulfill_ask_v2)(n,t.id);if(!e)throw new Error("TEZOS_OBJKT_V2 operation result is empty");return new s.BlockchainTezosTransaction(e,this.network)}if("TEZOS_FXHASH_V1"===t.data["@type"]){const e=yield(0,a.fxhash_v1_collect)(n,t.id);if(!e)throw new Error("TEZOS_FXHASH_V1 operation result is empty");return new s.BlockchainTezosTransaction(e,this.network)}if("TEZOS_FXHASH_V2"===t.data["@type"]){const e=yield(0,a.fxhash_v2_listing_accept)(n,t.id);if(!e)throw new Error("TEZOS_FXHASH_V2 operation result is empty");return new s.BlockchainTezosTransaction(e,this.network)}}return this.fillV1Order(e,t)}))}batchBuyCommon(e){return r.__awaiter(this,void 0,void 0,(function*(){yield(0,b.checkChainId)(this.provider);const t=(0,b.getRequiredProvider)(this.provider),n=e.map((e=>((0,f.checkPayouts)(e.payouts),{order_id:(0,b.getTezosOrderId)(e.orderId),amount:new d.default(e.amount),payouts:(0,b.convertUnionParts)(e.payouts),origin_fees:(0,b.convertUnionParts)(e.originFees)}))),r=yield(0,a.cart_purchase)(t,n);return new s.BlockchainTezosTransaction(r,this.network)}))}batchBuyBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.batchBuyCommon(e)}))}batchBuy(e){return r.__awaiter(this,void 0,void 0,(function*(){return{submit:i.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){return this.batchBuyCommon(e)}))}),prepared:yield Promise.all(e.map((e=>r.__awaiter(this,void 0,void 0,(function*(){let t=yield this.getPreparedOrder(e);return{orderId:t.id,multiple:this.isMultiple(t),maxAmount:yield this.getMaxAmount(t),baseFee:parseInt(this.provider.config.fees.toString()),originFeeSupport:m.OriginFeeSupport.FULL,payoutsSupport:m.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:m.MaxFeesBasePointSupport.IGNORED,supportsPartialFill:!0,orderData:{platform:t.platform,nftCollection:(0,h.getNftContractAddress)(t.make.type)}}})))))}}))}}},2225:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCollectionData=t.TezosMint=void 0;const r=n(11),i=n(99),a=n(273),o=n(147),s=n(122),d=n(29),c=n(552),u=n(221),l=n(255),p=n(655);function y(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,u.getContractFromMintRequest)(t),[r,i]=n.split(":");if(r!==d.Blockchain.TEZOS)throw new Error("Unsupported blockchain of collection: ".concat(r));const a=yield e.collection.getCollectionById({collection:n});if(!a)throw new Error("Tezos collection with address=".concat(i," has not been found"));return{contract:i,owner:a.owner,type:a.type}}))}function m(e){return e.replace("ipfs://ipfs/","ipfs://")}t.TezosMint=class{constructor(e,t,n){this.provider=e,this.unionAPI=t,this.network=n,this.mint=this.mint.bind(this),this.mintBasic=this.mintBasic.bind(this),this.preprocessMeta=this.preprocessMeta.bind(this)}getFormatsMeta(e){return[e.image,e.animation].reduce(((e,t)=>{if(t){const{url:n}=t,i=r.__rest(t,["url"]);return e.concat(Object.assign(Object.assign({},i),{uri:m(n)}))}return e}),[])}preprocessMeta(e){var t;if(e.blockchain!==d.Blockchain.TEZOS)throw new Error("Wrong blockchain");const n=e.animation||e.image;return{name:e.name,decimals:0,description:e.description,artifactUri:n?m(n.url):void 0,displayUri:e.image?m(e.image.url):void 0,attributes:null===(t=e.attributes)||void 0===t?void 0:t.map((e=>({name:e.key,value:e.value,type:e.type}))),formats:this.getFormatsMeta(e)}}getOwner(e){var t;return r.__awaiter(this,void 0,void 0,(function*(){return(null===(t=e.creators)||void 0===t?void 0:t.length)?(0,l.getTezosAddress)(e.creators[0].account):(0,a.get_address)((0,l.getRequiredProvider)(this.provider))}))}mint(e){return r.__awaiter(this,void 0,void 0,(function*(){yield(0,l.checkChainId)(this.provider);const{contract:t,type:n}=yield y(this.unionAPI,e);return{multiple:n===d.CollectionType.TEZOS_MT,supportsRoyalties:!0,supportsLazyMint:!1,submit:i.Action.create({id:"mint",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const n=(0,l.getRoyalties)(e.royalties),r=(yield(0,p.getCollectionType)(this.provider,t))===d.CollectionType.TEZOS_NFT,i=(0,l.getRequiredProvider)(this.provider),u=r?void 0:(0,o.toBn)(e.supply||1);if(r&&e.supply&&e.supply>1)throw new Error("Invalid supply=".concat(e.supply," for NFT collection, expected supply=1"));const y=yield(0,a.mint)(i,t,n,u,void 0,{"":m(e.uri)},yield this.getOwner(e));return{type:c.MintType.ON_CHAIN,transaction:new s.BlockchainTezosTransaction(y,this.network),itemId:(0,l.convertTezosItemId)("".concat(t,":").concat(y.token_id))}}))})}}))}mintBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.mint(e)).submit(e)}))}},t.getCollectionData=y},2226:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TezosTransfer=void 0;const r=n(11),i=n(273),a=n(99),o=n(20),s=n(122),d=r.__importDefault(n(39)),c=n(255),u=n(655);t.TezosTransfer=class{constructor(e,t,n){this.provider=e,this.unionAPI=t,this.network=n,this.transfer=this.transfer.bind(this),this.transferBasic=this.transferBasic.bind(this)}getRequiredProvider(){if(!(0,c.isExistedTezosProvider)(this.provider))throw new Error("Tezos provider is required");return this.provider}transfer(e){return r.__awaiter(this,void 0,void 0,(function*(){yield(0,c.checkChainId)(this.provider);const{contract:t,tokenId:n}=(0,c.getTezosItemData)(e.itemId),l=yield this.unionAPI.item.getItemById({itemId:e.itemId}),p=yield(0,u.getCollectionType)(this.provider,t);return{multiple:"TEZOS_MT"===p,maxAmount:(0,o.toBigNumber)(l.supply),submit:a.Action.create({id:"transfer",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const r=yield(0,i.transfer)(this.getRequiredProvider(),{asset_class:(0,c.getCollectionTypeAssetClass)(p),contract:t,token_id:new d.default(n)},(0,c.getTezosAddress)(e.to),(0,c.getRequestAmount)(null===e||void 0===e?void 0:e.amount,p));return new s.BlockchainTezosTransaction(r,this.network)}))})}}))}transferBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.transfer(e)).submit(e)}))}}},2227:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TezosBurn=void 0;const r=n(11),i=n(20),a=n(99),o=n(273),s=n(122),d=r.__importDefault(n(39)),c=n(255),u=n(655);t.TezosBurn=class{constructor(e,t,n){this.provider=e,this.unionAPI=t,this.network=n,this.burn=this.burn.bind(this),this.burnBasic=this.burnBasic.bind(this)}getRequiredProvider(){if(!(0,c.isExistedTezosProvider)(this.provider))throw new Error("Tezos provider is required");return this.provider}burn(e){return r.__awaiter(this,void 0,void 0,(function*(){yield(0,c.checkChainId)(this.provider);const{contract:t,tokenId:n}=(0,c.getTezosItemData)(e.itemId),l=yield this.unionAPI.item.getItemById({itemId:e.itemId}),p=yield(0,u.getCollectionType)(this.provider,t);return{multiple:"TEZOS_MT"===p,maxAmount:(0,i.toBigNumber)(l.supply),submit:a.Action.create({id:"burn",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const r=yield(0,o.burn)(this.getRequiredProvider(),{asset_class:(0,c.getCollectionTypeAssetClass)(p),contract:t,token_id:new d.default(n)},(0,c.getRequestAmount)(null===e||void 0===e?void 0:e.amount,p));return new s.BlockchainTezosTransaction(r,this.network)}))})}}))}burnBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.burn(e)).submit(e)}))}}},2228:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TezosTokenId=void 0;const r=n(11),i=n(273),a=n(20),o=n(255);t.TezosTokenId=class{constructor(e){this.provider=e,this.generateTokenId=this.generateTokenId.bind(this)}generateTokenId(e){let{collection:t}=e;return r.__awaiter(this,void 0,void 0,(function*(){return{tokenId:(yield(0,i.get_next_token_id)((0,o.getRequiredProvider)(this.provider),(0,o.convertFromContractAddress)(t))).toString(),signature:{v:0,r:(0,a.toBinary)("0"),s:(0,a.toBinary)("0")}}}))}}},2229:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TezosCancel=void 0;const r=n(11),i=n(99),a=n(273),o=n(122),s=r.__importDefault(n(39)),d=n(2230),c=n(835),u=n(255);t.TezosCancel=class{constructor(e,t,n){this.provider=e,this.unionAPI=t,this.network=n,this.cancel=i.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){yield(0,u.checkChainId)(this.provider);const t=yield this.unionAPI.order.getOrderById({id:e.orderId});if(!t)throw new Error("Order has not been found");const n=(0,u.getRequiredProvider)(this.provider),r=(0,u.isNftAssetType)(t.make.type)||(0,u.isMTAssetType)(t.make.type);if("TEZOS_RARIBLE_V3"===t.data["@type"]){if(r)return this.cancelV2SellOrder(t);if((0,u.isNftAssetType)(t.take.type)||(0,u.isMTAssetType)(t.take.type)){const e=yield(0,u.getTezosAssetTypeV2)(n.config,t.make.type),r={asset_contract:(0,u.convertFromContractAddress)(t.take.type.contract),asset_token_id:new s.default(t.take.type.tokenId),bid_type:e.type,bid_asset_contract:e.asset_contract,bid_asset_token_id:e.asset_token_id},i=yield(0,c.cancel_bid)(n,r);return new o.BlockchainTezosTransaction(i,this.network)}}if(r){if("TEZOS_HEN"===t.data["@type"]){const t=yield(0,a.hen_cancel_swap)(n,e.orderId);if(!t)throw new Error("Operation is undefined");return new o.BlockchainTezosTransaction(t,this.network)}if("TEZOS_VERSUM_V1"===t.data["@type"]){const t=yield(0,a.versum_cancel_swap)(n,e.orderId);if(!t)throw new Error("Operation is undefined");return new o.BlockchainTezosTransaction(t,this.network)}if("TEZOS_TEIA_V1"===t.data["@type"]){const t=yield(0,a.teia_cancel_swap)(n,e.orderId);if(!t)throw new Error("Operation is undefined");return new o.BlockchainTezosTransaction(t,this.network)}if("TEZOS_OBJKT_V1"===t.data["@type"]){const t=yield(0,a.objkt_retract_ask_v1)(n,e.orderId);if(!t)throw new Error("Operation is undefined");return new o.BlockchainTezosTransaction(t,this.network)}if("TEZOS_OBJKT_V2"===t.data["@type"]){const t=yield(0,a.objkt_retract_ask_v2)(n,e.orderId);if(!t)throw new Error("Operation is undefined");return new o.BlockchainTezosTransaction(t,this.network)}if("TEZOS_FXHASH_V1"===t.data["@type"]){const t=yield(0,a.fxhash_v1_cancel_offer)(n,e.orderId);if(!t)throw new Error("Operation is undefined");return new o.BlockchainTezosTransaction(t,this.network)}if("TEZOS_FXHASH_V2"===t.data["@type"]){const t=yield(0,a.fxhash_v2_cancel_listing)(n,e.orderId);if(!t)throw new Error("Operation is undefined");return new o.BlockchainTezosTransaction(t,this.network)}}const i=(0,u.getTezosOrderLegacyForm)(t),d=yield(0,a.cancel)((0,u.getRequiredProvider)(this.provider),i);return new o.BlockchainTezosTransaction(d,this.network)}))}),this.cancelBasic=this.cancelBasic.bind(this)}cancelV2SellOrder(e){return r.__awaiter(this,void 0,void 0,(function*(){yield(0,u.checkChainId)(this.provider);const t=(0,u.getRequiredProvider)(this.provider),n=yield(0,u.getTezosAssetTypeV2)(this.provider.config,e.take.type),r={asset_contract:(0,u.convertFromContractAddress)(e.make.type.contract),asset_token_id:new s.default(e.make.type.tokenId),sale_asset_contract:n.asset_contract,sale_asset_token_id:n.asset_token_id,sale_type:n.type},i=yield(0,d.cancelV2)(t,r);if(!i)throw new Error("Cancel transaction has not been returned");return new o.BlockchainTezosTransaction(i,this.network)}))}cancelBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.cancel(e)}))}}},2231:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TezosBalance=void 0;const r=n(11),i=n(273),a=r.__importDefault(n(39)),o=n(236),s=n(255);t.TezosBalance=class{constructor(e,t){this.provider=e,this.network=t,this.getBalance=this.getBalance.bind(this)}getBalance(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,o.getCurrencyAssetType)(t),r=yield(0,s.getTezosAssetTypeV2)(this.provider.config,n);if("XTZ"!==n["@type"]&&"TEZOS_FT"!==n["@type"])throw new Error("Unsupported asset type");if(!this.provider.config.node_url)throw new Error("Node url for tezos has not been specified");return new a.default(yield(0,i.get_balance)(this.provider.config,(0,s.getTezosAddress)(e),r.type,r.asset_contract,r.asset_token_id))}))}}},2232:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TezosCreateCollection=void 0;const r=n(11),i=n(99),a=n(273),o=n(122),s=n(29),d=n(255);t.TezosCreateCollection=class{constructor(e,t){this.provider=e,this.network=t,this.createCollection=i.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if(e.blockchain!==s.Blockchain.TEZOS)throw new Error("Wrong blockchain");yield(0,d.checkChainId)(this.provider);const t=yield this.getDeployOperation(e.asset);return{tx:new o.BlockchainTezosTransaction(t,this.network),address:(0,d.convertTezosToContractAddress)(t.contract)}}))}),this.createCollectionSimplified=this.createCollectionSimplified.bind(this)}getMetadataJSON(e){var t;const n={name:e.arguments.name,homepage:e.arguments.homepage};return e.arguments.description&&(n.description=e.arguments.description),e.arguments.license&&(n.license=e.arguments.license),e.arguments.version&&(n.version=e.arguments.version),(null===(t=e.arguments.authors)||void 0===t?void 0:t.length)&&(n.authors=e.arguments.authors),JSON.stringify(n)}getDeployOperation(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,d.getRequiredProvider)(this.provider),n=yield t.tezos.address(),r={"":"tezos-storage:metadata",metadata:this.getMetadataJSON(e)};if("NFT"===e.assetType)return e.arguments.isUserToken?(0,a.deploy_nft_private)(t,n,r):(0,a.deploy_nft_public)(t,n,r);if("MT"===e.assetType)return e.arguments.isUserToken?(0,a.deploy_mt_private)(t,n,r):(0,a.deploy_mt_public)(t,n,r);throw new Error("Unsupported asset type=".concat(e.assetType))}))}createCollectionSimplified(e){return r.__awaiter(this,void 0,void 0,(function*(){if(e.blockchain!==s.Blockchain.TEZOS)throw new Error("Wrong blockchain");const{isPublic:t,type:n}=e,i=r.__rest(e,["isPublic","type"]),a=yield this.getDeployOperation({assetType:n,arguments:Object.assign(Object.assign({},i),{isUserToken:!t})});return{tx:new o.BlockchainTezosTransaction(a,this.network),address:(0,d.convertTezosToContractAddress)(a.contract)}}))}}},2233:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(11).__exportStar(n(2234),t)},2234:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TezosCanTransfer=void 0;const r=n(11),i=n(210),a=n(255),o=n(376);t.TezosCanTransfer=class{constructor(e){this.provider=e,this.canTransfer=this.canTransfer.bind(this)}canTransfer(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,a.getRequiredProvider)(this.provider),{tokenId:s,contract:c}=(0,a.getTezosItemData)(e),u={chain_id:this.provider.config.chain_id,contract:c,entrypoint:"can_transfer",gas:"100000",input:{prim:"Pair",args:[{int:s},{prim:"Pair",args:[{string:(0,a.convertUnionAddress)(t)},{string:(0,a.convertUnionAddress)(n)}]}]},payer:(0,a.convertUnionAddress)(t),source:this.provider.config.transfer_proxy,unparsing_mode:"Readable"},l={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(u)},p="".concat(r.tezos.tk.rpc.getRpcUrl(),"/chains/main/blocks/head/helpers/scripts/run_view");let y;try{y=yield window.fetch(p,l)}catch(f){throw new i.NetworkError({url:p,data:f.message,code:o.NetworkErrorCode.TEZOS_EXTERNAL_ERR})}yield(0,i.handleFetchErrorResponse)(y,{requestInit:l,code:o.NetworkErrorCode.TEZOS_EXTERNAL_ERR});const m=yield y.json();return""===m.data.string?{success:!0}:{success:!1,reason:d(m.data.string)}}))}};const s={ARCHETYPE_QUOTA_REACHED:"You have reached the maximum amount of Digits you can own of this Edition, please visit [quartz.ubisoft.com](https://quartz.ubisoft.com) for more information.",TO_RESTRICTED:"You can't trade this Digit at the moment, please visit [quartz.ubisoft.com](https://quartz.ubisoft.com) for more information."};function d(e){return e in s?s[e]:s.TO_RESTRICTED}},2235:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TezosBid=void 0;const r=n(11),i=n(99),a=n(835),o=r.__importDefault(n(39)),s=n(20),d=n(273),c=n(58),u=n(210),l=n(184),p=n(236),y=n(474),m=n(563),f=n(221),h=n(255);t.TezosBid=class{constructor(e,t,n){this.provider=e,this.apis=t,this.network=n,this.bid=this.bid.bind(this),this.bidBasic=this.bidBasic.bind(this),this.update=this.update.bind(this),this.updateBasic=this.updateBasic.bind(this)}parseTakeAssetType(e){return r.__awaiter(this,void 0,void 0,(function*(){switch(e["@type"]){case"XTZ":return{asset_class:e["@type"]};case"TEZOS_FT":{const t=(0,h.getRequiredProvider)(this.provider),n=(0,h.convertFromContractAddress)(e.contract);return{asset_class:"FT",contract:n,token_id:(yield(0,d.get_ft_type)(t.config,n))===c.AssetTypeV2.FA2?new o.default(e.tokenId||0):void 0}}default:throw new Error("Unsupported take asset type")}}))}bid(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getBidRequestInfo(e),n=i.Action.create({id:"send-tx",run:n=>r.__awaiter(this,void 0,void 0,(function*(){const r=(0,h.getRequiredProvider)(this.provider),i=Object.assign(Object.assign({},yield this.getCommonBidData(n)),{asset_contract:t.contract});let d;if(!("itemId"in e))throw"collectionId"in e?new u.Warning("Floor bids are not available yet"):new u.Warning("ItemId or CollectionId must be assigned");{if(void 0===t.tokenId)throw new u.Warning("Check tokenId in your itemId parameter");const e=Object.assign(Object.assign({},i),{asset_token_id:new o.default(t.tokenId)});d=yield(0,a.put_bid)(r,e)}if(!d)throw new Error("OrderID cannot be requested");return(0,s.toOrderId)(d)}))});return{multiple:"TEZOS_MT"===t.collection.type,maxAmount:"item"in t&&t.item?(0,s.toBigNumber)(t.item.supply):null,originFeeSupport:l.OriginFeeSupport.FULL,payoutsSupport:l.PayoutsSupport.MULTIPLE,supportedCurrencies:(0,h.getSupportedCurrencies)(),baseFee:parseInt(this.provider.config.fees.toString()),maxFeesBasePointSupport:l.MaxFeesBasePointSupport.IGNORED,getConvertableValue:y.notImplemented,supportsExpirationDate:!1,submit:n}}))}bidBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.bid(e)).submit(e)}))}getCommonBidData(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,h.getRequiredProvider)(this.provider),n=(0,p.getCurrencyAssetType)(e.currency),r=yield(0,h.getTezosAssetTypeV2)(t.config,n),i=new o.default(e.amount||1),a=i.multipliedBy(e.price);return{bid_type:r.type,bid_asset_contract:r.asset_contract,bid_asset_token_id:r.asset_token_id,bid:{bid_origin_fees:(0,h.convertUnionParts)(e.originFees),bid_payouts:yield(0,h.getPayouts)(t,e.payouts),bid_amount:a,bid_asset_qty:i,bid_expiry_date:e.expirationDate?(0,m.convertDateToTimestamp)(e.expirationDate):(0,m.getDefaultExpirationDateTimestamp)(),bid_data_type:void 0,bid_data:void 0}}}))}updateBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.update(e)).submit(e)}))}update(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.apis.order.getOrderById({id:e.orderId});if(!t)throw new Error("Order has not been found");const n=i.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const n=(0,h.getRequiredProvider)(this.provider);if(!(0,h.isNftOrMTAssetType)(t.take.type))throw new u.Warning("Non-bid order specified");if("TEZOS_RARIBLE_V3"!==t.data["@type"])throw new Error("It's not TEZOS_RARIBLE_V3 order");const r=yield(0,h.getTezosAssetTypeV2)(n.config,t.make.type),i=new o.default(t.take.value).multipliedBy(e.price),d={asset_contract:(0,h.convertFromContractAddress)(t.take.type.contract),asset_token_id:new o.default(t.take.type.tokenId),bid_type:r.type,bid_asset_contract:r.asset_contract,bid_asset_token_id:r.asset_token_id,bid:{bid_origin_fees:(0,h.convertUnionParts)(t.data.originFees),bid_payouts:yield(0,h.getPayouts)(n,t.data.payouts),bid_amount:i,bid_asset_qty:new o.default(t.take.value),bid_expiry_date:void 0!==t.endedAt?(0,m.convertDateToTimestamp)(new Date(t.endedAt)):void 0,bid_data_type:void 0,bid_data:void 0}},c=yield(0,a.put_bid)(n,d);if(!c)throw new Error("OrderID cannot be requested");return(0,s.toOrderId)(c)}))});return{originFeeSupport:l.OriginFeeSupport.FULL,payoutsSupport:l.PayoutsSupport.MULTIPLE,supportedCurrencies:(0,h.getSupportedCurrencies)(),baseFee:parseInt(this.provider.config.fees.toString()),maxFeesBasePointSupport:l.MaxFeesBasePointSupport.IGNORED,getConvertableValue:y.notImplemented,submit:n,orderData:{nftCollection:(0,f.getNftContractAddress)(t.take.type)}}}))}getBidRequestInfo(e){return r.__awaiter(this,void 0,void 0,(function*(){if("itemId"in e){const{contract:t,tokenId:n}=(0,h.getTezosItemData)(e.itemId),[r,i]=yield Promise.all([this.apis.collection.getCollectionById({collection:(0,h.convertTezosToContractAddress)(t)}),this.apis.item.getItemById({itemId:e.itemId})]);return{contract:t,tokenId:n,collection:r,item:i}}if("collectionId"in e){const t=yield this.apis.collection.getCollectionById({collection:e.collectionId});return{contract:(0,h.convertUnionAddress)(e.collectionId),collection:t}}throw new u.Warning("ItemId or CollectionId must be assigned")}))}}},2236:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createUnionSdk=void 0;const r=n(11),i=n(29),a=n(99),o=n(123),s=n(123),d=n(734),c=n(374),u=n(236),l=n(375),p=n(221);t.createUnionSdk=function(e,t,n,r,i){return{balances:new f({EVM:e.balances,FLOW:t.balances,TEZOS:n.balances,SOLANA:r.balances,IMMUTABLEX:i.balances}),nft:new m({EVM:e.nft,FLOW:t.nft,TEZOS:n.nft,SOLANA:r.nft,IMMUTABLEX:i.nft}),order:new y({EVM:e.order,FLOW:t.order,TEZOS:n.order,SOLANA:r.order,IMMUTABLEX:i.order}),restriction:new h({EVM:e.restriction,FLOW:t.restriction,TEZOS:n.restriction,SOLANA:r.restriction,IMMUTABLEX:i.restriction}),ethereum:new b(e.ethereum),flow:new T(t.flow)}};class y{constructor(e){this.instances=e,this.cancel=this.cancel.bind(this),this.bid=new l.MethodWithPrepare((t=>e[(0,p.extractUnionSupportedBlockchain)((0,p.getBidEntity)(t))].bid(t)),(t=>e[(0,p.extractUnionSupportedBlockchain)((0,p.getBidEntity)(t))].bid.prepare(t))),this.bidUpdate=new l.MethodWithPrepare((t=>e[(0,p.extractUnionSupportedBlockchain)(t.orderId)].bidUpdate(t)),(t=>e[(0,p.extractUnionSupportedBlockchain)(t.orderId)].bidUpdate.prepare(t))),this.fill={prepare:t=>e[(0,p.extractUnionSupportedBlockchain)((0,p.getOrderId)(t))].fill.prepare(t)},this.buy=new l.MethodWithPrepare((t=>e[(0,p.extractUnionSupportedBlockchain)((0,p.getOrderId)(t))].buy(t)),(t=>e[(0,p.extractUnionSupportedBlockchain)((0,p.getOrderId)(t))].buy.prepare(t))),this.batchBuy=new l.MethodWithPrepare((t=>e[E(t)].batchBuy(t)),(t=>e[E(t)].batchBuy.prepare(t))),this.acceptBid=new l.MethodWithPrepare((t=>e[(0,p.extractUnionSupportedBlockchain)((0,p.getOrderId)(t))].acceptBid(t)),(t=>e[(0,p.extractUnionSupportedBlockchain)((0,p.getOrderId)(t))].acceptBid.prepare(t))),this.sell=new l.MethodWithPrepare((t=>e[(0,p.extractUnionSupportedBlockchain)(t.itemId)].sell(t)),(t=>e[(0,p.convertSupportedBlockchainToUnion)(t.blockchain)].sell.prepare(t))),this.sellUpdate=new l.MethodWithPrepare((t=>e[(0,p.extractUnionSupportedBlockchain)(t.orderId)].sellUpdate(t)),(t=>e[(0,p.extractUnionSupportedBlockchain)(t.orderId)].sellUpdate.prepare(t)))}cancel(e){return this.instances[(0,p.extractUnionSupportedBlockchain)(e.orderId)].cancel(e)}}class m{constructor(e){this.instances=e,this.preprocessMeta=c.Middlewarer.skipMiddleware(this.preprocessMeta.bind(this)),this.generateTokenId=this.generateTokenId.bind(this),this.uploadMeta=this.uploadMeta.bind(this),this.createCollection=this.createCollection.bind(this),this.transfer=new l.MethodWithPrepare((t=>e[(0,p.extractUnionSupportedBlockchain)(t.itemId)].transfer(t)),(t=>e[(0,p.extractUnionSupportedBlockchain)(t.itemId)].transfer.prepare(t))),this.mint=new l.MethodWithPrepare((t=>e[(0,p.extractUnionSupportedBlockchain)((0,d.getCollectionId)(t))].mint(t)),(t=>e[(0,p.extractUnionSupportedBlockchain)((0,d.getCollectionId)(t))].mint.prepare(t))),this.burn=new l.MethodWithPrepare((t=>e[(0,p.extractUnionSupportedBlockchain)(t.itemId)].burn(t)),(t=>e[(0,p.extractUnionSupportedBlockchain)(t.itemId)].burn.prepare(t)))}createCollection(e){return this.instances[(0,p.convertSupportedBlockchainToUnion)(e.blockchain)].createCollection(e)}uploadMeta(e){return this.instances[(0,p.extractUnionSupportedBlockchain)(e.accountAddress)].uploadMeta(e)}generateTokenId(e){return this.instances[(0,p.extractUnionSupportedBlockchain)(e.collection)].generateTokenId(e)}preprocessMeta(e){return this.instances[(0,p.convertSupportedBlockchainToUnion)(e.blockchain)].preprocessMeta(e)}}class f{constructor(e){this.instances=e,this.depositBiddingBalance=a.Action.create({id:"send-tx",run:e=>this.instances[g(e)].depositBiddingBalance(e)}),this.withdrawBiddingBalance=a.Action.create({id:"send-tx",run:e=>this.instances[g(e)].withdrawBiddingBalance(e)}),this.getBalance=this.getBalance.bind(this),this.convert=this.convert.bind(this),this.getBiddingBalance=this.getBiddingBalance.bind(this),this.transfer=this.transfer.bind(this)}getBalance(e,t){const n=v(e,t);return this.instances[(0,p.convertSupportedBlockchainToUnion)(n)].getBalance(e,t)}convert(e){return this.instances[(0,p.convertSupportedBlockchainToUnion)((0,o.validateBlockchain)(e.blockchain))].convert(e)}transfer(e){const t=v(e.recipient,e.currency);return this.instances[(0,p.convertSupportedBlockchainToUnion)(t)].transfer(e)}getBiddingBalance(e){const t=g(e);return this.instances[t].getBiddingBalance(e)}}class h{constructor(e){this.instances=e,this.blockchainFeeData=new Map}canTransfer(e,t,n){return this.instances[(0,p.extractUnionSupportedBlockchain)(e)].canTransfer(e,t,n)}getFutureOrderFees(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,p.extractUnionSupportedBlockchain)(e);if(!this.blockchainFeeData.has(t)){const n=yield this.instances[t].getFutureOrderFees(e);return this.blockchainFeeData.set(t,n),n}return this.blockchainFeeData.get(t)}))}}class b{constructor(e){this.ethereumSdk=e,this.wrapCryptoPunk=this.ethereumSdk.wrapCryptoPunk,this.unwrapCryptoPunk=this.ethereumSdk.unwrapCryptoPunk,this.getBatchBuyAmmInfo=this.ethereumSdk.getBatchBuyAmmInfo}}class T{constructor(e){this.flowSdk=e,this.setupAccount=this.flowSdk.setupAccount,this.setupMattelCollections=this.flowSdk.setupMattelCollections,this.setupGamisodesCollections=this.flowSdk.setupGamisodesCollections,this.checkInitMattelCollections=this.flowSdk.checkInitMattelCollections}}function v(e,t){if((0,u.isAssetType)(t))return(0,o.extractBlockchainFromAssetType)(t)||(0,s.extractBlockchain)(e);if((0,u.isRequestCurrencyAssetType)(t)){const{blockchain:e}=(0,u.getDataFromCurrencyId)(t);return(0,o.validateBlockchain)(e)}throw new Error("Unrecognized RequestCurrency ".concat(JSON.stringify(t)))}function g(e){return(0,p.convertSupportedBlockchainToUnion)(function(e){if("currency"in e){if((0,u.isRequestCurrencyAssetType)(e.currency))return(0,s.extractBlockchain)(e.currency);if((0,u.isAssetType)(e.currency)){if("blockchain"in e.currency&&e.currency.blockchain)return(0,o.validateBlockchain)(e.currency.blockchain);if("contract"in e.currency&&e.currency.contract)return(0,s.extractBlockchain)(e.currency.contract);if("itemId"in e.currency&&e.currency.itemId)return(0,s.extractBlockchain)(e.currency.itemId);switch(e.currency["@type"]){case"SOLANA_SOL":return i.Blockchain.SOLANA;case"ETH":return i.Blockchain.ETHEREUM;case"XTZ":return i.Blockchain.TEZOS}}throw new Error("Unrecognized RequestCurrency ".concat(JSON.stringify(e.currency)))}return"order"in e?(0,s.extractBlockchain)(e.order.id):"orderId"in e?(0,s.extractBlockchain)(e.orderId):e.blockchain}(e))}function E(e){const t=(0,s.extractBlockchain)((0,p.getOrderId)(e[0]));for(let n of e)if((0,s.extractBlockchain)((0,p.getOrderId)(n))!==t)throw new Error("All orders should be in same blockchain");return(0,p.convertSupportedBlockchainToUnion)(t)}},2237:function(e){e.exports=JSON.parse('{"name":"@rarible/sdk","version":"0.13.68-fix.7","homepage":"https://github.com/rarible/sdk#readme","repository":{"type":"git","url":"git+https://github.com/rarible/sdk.git"},"license":"ISC","main":"build/index.js","types":"build/index.d.ts","files":["build","umd"],"scripts":{"build":"run-s build:*","build:ts":"tsc --project tsconfig-build.json","build:umd":"webpack","analyze":"webpack --config webpack-analyze.config.js","clean":"rimraf ./build","test":"sh ./scripts/test.sh","verify":"tsc --noEmit --project tsconfig-build.json","docs":"typedoc","test:only":"jest --runInBand --testPathPattern=src/sdk-blockchains/ethereum --silent=false --detectOpenHandles"},"dependencies":{"@babel/runtime":"^7.15.4","@ethersproject/keccak256":"^5.6.0","@rarible/action":"~0.9.1","@rarible/api-client":"0.16.5-alpha.6","@rarible/flow-sdk":"~0.5.76-beta.0","@rarible/immutable-sdk":"^0.13.68-fix.7","@rarible/immutable-wallet":"^0.13.65","@rarible/logger":"~0.9.12","@rarible/protocol-ethereum-sdk":"^0.13.68-fix.7","@rarible/sdk-common":"^0.13.68-fix.7","@rarible/sdk-transaction":"^0.13.68-fix.7","@rarible/sdk-wallet":"^0.13.68-fix.7","@rarible/solana-sdk":"^0.13.68-fix.7","@rarible/tezos-sdk":"0.1.46","@rarible/types":"~0.9.23","@rarible/utils":"~0.9.10","@solana/web3.js":"^1.35.1","bignumber.js":"^9.0.1","callable-instance":"^2.0.0","mime-types":"^2.1.27","tezos-api-client":"~0.0.19","uuid":"^8.3.1"},"devDependencies":{"@babel/cli":"^7.14.8","@babel/core":"^7.14.8","@babel/plugin-proposal-class-properties":"^7.14.5","@babel/plugin-proposal-object-rest-spread":"^7.15.6","@babel/plugin-proposal-optional-chaining":"^7.14.5","@babel/plugin-syntax-bigint":"^7.8.3","@babel/plugin-transform-runtime":"^7.15.8","@babel/plugin-transform-typescript":"^7.8.3","@babel/preset-env":"^7.8.3","@babel/preset-typescript":"^7.14.5","@onflow/fcl":"~1.3.2","@rarible/ethereum-sdk-test-common":"^0.13.68-fix.7","@rarible/flow-test-common":"~0.5.75-fix.1","@rarible/solana-wallet":"^0.13.68-fix.7","@types/jest":"^27.0.2","@types/mime-types":"^2.1.0","@types/node":"^12.20.36","@types/node-fetch":"^2.6.1","@types/uuid":"^8.3.0","babel-plugin-transform-bigint":"^1.0.12","buffer":"^6.0.3","crypto-browserify":"^3.12.0","dotenv":"16.0.0","ethers":"^5.6.2","jest":"^27.2.7","jest-junit":"^15.0.0","keccak":"^3.0.2","mock-local-storage":"^1.1.23","node-fetch":"2.6.7","node-polyfill-webpack-plugin":"^1.1.4","npm-run-all":"^4.1.5","os-browserify":"^0.3.0","path-browserify":"^1.0.1","stream-browserify":"^3.0.0","ts-jest":"^27.0.3","webpack":"^5.68.0","webpack-bundle-analyzer":"^4.5.0","webpack-cli":"^4.9.2","yargs":"^17.2.1"},"peerDependencies":{"axios":"^0.26.1","tslib":"^2.3.1"}}')},2238:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCallableExtraFields=t.LoggerDataContainer=t.getExecRevertedMessage=t.getErrorLevel=t.CustomErrorCode=t.isErrorWarning=void 0;const r=n(11),i=n(210),a=n(1114),o=n(64),s=n(123),d=n(376),c=n(221),u=n(374),l=n(836),p=["Network request failed","Failed to fetch"];function y(e,t){try{if(!e)return!1;if(h(t)&&(0,s.isEVMWarning)(e))return!0;if(t===o.WalletType.TEZOS)return(0,s.isTezosWarning)(e);if(t===o.WalletType.FLOW)return(0,s.isFlowWarning)(e);if(t===o.WalletType.SOLANA&&(0,s.isSolanaWarning)(e))return!0}catch(n){}return!1}var m;function f(e,t,n){return 400===(null===t||void 0===t?void 0:t.status)?a.LogLevel.WARN:t instanceof i.NetworkError||"NetworkError"===(null===t||void 0===t?void 0:t.name)?(null===t||void 0===t?void 0:t.code)||d.NetworkErrorCode.NETWORK_ERR:function(e,t){return!!(null===e||void 0===e?void 0:e.startsWith("apis."))||p.some((e=>{var n;return null===(n=null===t||void 0===t?void 0:t.message)||void 0===n?void 0:n.includes(e)}))}(e,t)?d.NetworkErrorCode.NETWORK_ERR:(0,s.isInfoLevel)(t)?a.LogLevel.INFO:y(t,null===n||void 0===n?void 0:n.walletType)||t instanceof i.Warning||"Warning"===(null===t||void 0===t?void 0:t.name)?a.LogLevel.WARN:h(null===n||void 0===n?void 0:n.walletType)&&function(e){var t;return null===(t=null===e||void 0===e?void 0:e.message)||void 0===t?void 0:t.includes("execution reverted")}(t)?m.CONTRACT_ERROR:a.LogLevel.ERROR}function h(e){return e===o.WalletType.ETHEREUM||e===o.WalletType.IMMUTABLEX}t.isErrorWarning=y,function(e){e.CONTRACT_ERROR="CONTRACT_ERROR"}(m=t.CustomErrorCode||(t.CustomErrorCode={})),t.getErrorLevel=f;const b=/execution reverted:(.*[^\\])/,T=/"execution reverted[:]?(.*?)"/;t.getExecRevertedMessage=function(e){if(!e)return e;try{const t=e.includes("Error while gas estimation with message cannot estimate gas")?e.match(T):e.match(b);if(t&&t[1])return t[1].trim()}catch(t){}return e};class v{constructor(e){this.input=e,this.extraFields=g(e.callable),this.stringifiedArgs=v.getParsedArgs(e.args)}static getParsedArgs(e){let t;try{t=JSON.stringify(e)}catch(n){try{t=JSON.stringify(e,Object.getOwnPropertyNames(e))}catch(r){t="unknown"}}return t}getTraceData(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.input.responsePromise;return Object.assign({level:a.LogLevel.TRACE,method:this.input.callable.name,message:"trace of "+this.input.callable.name,duration:(Date.now()-this.input.startTime)/1e3,args:this.stringifiedArgs,resp:JSON.stringify(e)},this.extraFields||{})}))}getErrorData(e){var t,n,r,a;let o;const d=s.WrappedError.isWrappedError(e)?e.error:e;try{o=Object.assign({level:f(null===(t=this.input.callable)||void 0===t?void 0:t.name,d,null===(n=this.input.sdkContext)||void 0===n?void 0:n.wallet),method:null===(r=this.input.callable)||void 0===r?void 0:r.name,message:(0,l.getErrorMessageString)(d),error:(0,s.getStringifiedData)(d),duration:(Date.now()-this.input.startTime)/1e3,args:this.stringifiedArgs,requestAddress:void 0},this.extraFields||{}),(d instanceof i.NetworkError||"NetworkError"===(null===d||void 0===d?void 0:d.name))&&(o.requestAddress=null===d||void 0===d?void 0:d.url)}catch(c){o={level:"LOGGING_ERROR",method:null===(a=this.input.callable)||void 0===a?void 0:a.name,message:(0,l.getErrorMessageString)(c),error:(0,s.getStringifiedData)(c)}}return o}}function g(e){var t,n,r,i,a,o,s,d;try{if("string"!==typeof(null===e||void 0===e?void 0:e.name))return{};if(function(e){var t;return e instanceof u.WrappedAdvancedFn||"WrappedAdvancedFn"===(null===(t=null===e||void 0===e?void 0:e.constructor)||void 0===t?void 0:t.name)}(e)){const u=e.parent;if(null===e||void 0===e?void 0:e.name.startsWith("order.buy.prepare.submit")){const e=null===u||void 0===u?void 0:u.args[0];return{orderId:(0,c.getOrderIdFromFillRequest)(e),platform:null===(n=null===(t=null===u||void 0===u?void 0:u.context)||void 0===t?void 0:t.orderData)||void 0===n?void 0:n.platform,collectionId:null===(i=null===(r=null===u||void 0===u?void 0:u.context)||void 0===r?void 0:r.orderData)||void 0===i?void 0:i.nftCollection}}if(null===e||void 0===e?void 0:e.name.startsWith("order.batchBuy.prepare.submit")){const e=null===u||void 0===u?void 0:u.args[0],t=Array.isArray(e)?e.map((e=>(0,c.getOrderIdFromFillRequest)(e))).join(","):null,n=null===u||void 0===u?void 0:u.context,r=Array.isArray(null===n||void 0===n?void 0:n.prepared)?null===n||void 0===n?void 0:n.prepared.reduce(((e,t)=>{var n,r;return(null===(n=null===t||void 0===t?void 0:t.orderData)||void 0===n?void 0:n.platform)&&!e.includes(null===(r=null===t||void 0===t?void 0:t.orderData)||void 0===r?void 0:r.platform)&&e.push(t.orderData.platform),e}),[]).join(","):null,i=Array.isArray(null===n||void 0===n?void 0:n.prepared)?null===n||void 0===n?void 0:n.prepared.reduce(((e,t)=>{var n,r;return(null===(n=null===t||void 0===t?void 0:t.orderData)||void 0===n?void 0:n.nftCollection)&&!e.includes(null===(r=null===t||void 0===t?void 0:t.orderData)||void 0===r?void 0:r.nftCollection)&&e.push(t.orderData.nftCollection),e}),[]).join(","):null;return{orderId:"[".concat(t,"]"),platform:"[".concat(r,"]"),collectionId:"[".concat(i,"]")}}if(null===e||void 0===e?void 0:e.name.startsWith("order.bid.prepare.submit")){const e=null===u||void 0===u?void 0:u.args[0];return e?{itemId:"itemId"in e?e.itemId:void 0,collectionId:"collectionId"in e?e.collectionId:(0,c.getCollectionFromItemId)(e.itemId)}:{}}if(null===e||void 0===e?void 0:e.name.startsWith("order.bidUpdate.prepare.submit")){const e=null===u||void 0===u?void 0:u.args[0];return{orderId:null===e||void 0===e?void 0:e.orderId}}if(null===e||void 0===e?void 0:e.name.startsWith("order.cancel")){const e=null===u||void 0===u?void 0:u.args[0];return{orderId:null===e||void 0===e?void 0:e.orderId}}if(null===e||void 0===e?void 0:e.name.startsWith("order.sell.prepare.submit")){const e=null===u||void 0===u?void 0:u.args[0];return{itemId:null===e||void 0===e?void 0:e.itemId,collectionId:e?(0,c.getCollectionFromItemId)(e.itemId):void 0}}if(null===e||void 0===e?void 0:e.name.startsWith("order.sellUpdate.prepare.submit")){const e=null===u||void 0===u?void 0:u.args[0];return{orderId:null===e||void 0===e?void 0:e.orderId,collectionId:null===(o=null===(a=null===u||void 0===u?void 0:u.context)||void 0===a?void 0:a.orderData)||void 0===o?void 0:o.nftCollection}}if(null===e||void 0===e?void 0:e.name.startsWith("order.acceptBid.prepare.submit")){const e=null===u||void 0===u?void 0:u.args[0];return{orderId:(0,c.getOrderIdFromFillRequest)(e),collectionId:null===(d=null===(s=null===u||void 0===u?void 0:u.context)||void 0===s?void 0:s.orderData)||void 0===d?void 0:d.nftCollection}}if(null===e||void 0===e?void 0:e.name.startsWith("nft.transfer.prepare.submit")){const e=null===u||void 0===u?void 0:u.args[0];if(null===e||void 0===e?void 0:e.itemId)return{collectionId:(0,c.getCollectionFromItemId)(e.itemId)}}if(null===e||void 0===e?void 0:e.name.startsWith("nft.mint.prepare.submit")){const e=null===u||void 0===u?void 0:u.args[0];if(e)return{collectionId:(0,c.getContractFromMintRequest)(e)}}if(null===e||void 0===e?void 0:e.name.startsWith("nft.burn.prepare.submit")){const e=null===u||void 0===u?void 0:u.args[0];if(e)return{collectionId:(0,c.getCollectionFromItemId)(e.itemId)}}}}catch(l){}return{}}t.LoggerDataContainer=v,t.getCallableExtraFields=g},2239:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSolanaSdk=void 0;const r=n(2240),i=n(29),a=n(474),o=n(374),s=n(654),d=n(375),c=n(2363),u=n(2364),l=n(2365),p=n(2367),y=n(2368);t.createSolanaSdk=function(e,t,n,m){const f=r.SolanaSdk.create({connection:{cluster:n,endpoint:null===m||void 0===m?void 0:m.endpoint,commitmentOrConfig:"confirmed"},debug:!1}),h=new c.SolanaNft(f,e,t,m),b=new p.SolanaBalance(f,e,t,m),T=new l.SolanaOrder(f,e,t,m),v=new u.SolanaFill(f,e,t,m),{createCollectionBasic:g}=new y.SolanaCollection(f,e,t,m),E=o.Middlewarer.skipMiddleware(h.preprocessMeta),_=new s.MetaUploader(i.Blockchain.SOLANA,E);return{nft:{mint:new d.MethodWithPrepare(h.mintBasic,h.mint),burn:new d.MethodWithPrepare(h.burnBasic,h.burn),transfer:new d.MethodWithPrepare(h.transferBasic,h.transfer),generateTokenId:a.nonImplementedAction,createCollection:g,preprocessMeta:E,uploadMeta:_.uploadMeta},order:{fill:{prepare:v.fill},buy:new d.MethodWithPrepare(v.buyBasic,v.fill),batchBuy:new d.MethodWithPrepare(a.notImplemented,a.nonImplementedAction),acceptBid:new d.MethodWithPrepare(v.acceptBidBasic,v.fill),sell:new d.MethodWithPrepare(T.sellBasic,T.sell),sellUpdate:new d.MethodWithPrepare(T.sellUpdateBasic,T.sellUpdate),bid:new d.MethodWithPrepare(T.bidBasic,T.bid),bidUpdate:new d.MethodWithPrepare(T.bidUpdateBasic,T.bidUpdate),cancel:T.cancelBasic},balances:{getBalance:b.getBalance,convert:a.nonImplementedAction,transfer:a.notImplemented,getBiddingBalance:b.getBiddingBalance,depositBiddingBalance:b.depositBiddingBalance,withdrawBiddingBalance:b.withdrawBiddingBalance},restriction:{canTransfer:a.nonImplementedAction,getFutureOrderFees:()=>T.getFutureOrderFees()}}}},2240:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(11);r.__exportStar(n(1136),t),r.__exportStar(n(2362),t)},2241:function(e,t){},2243:function(e,t){},2251:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugLogger=void 0;t.DebugLogger=class{constructor(e){this.enabled=e}log(){this.enabled&&console.log(...arguments)}error(){this.enabled&&console.error(...arguments)}}},2252:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUnixTs=t.sleep=t.toPublicKey=t.isPrivateKey=t.isPublicKey=void 0;const r=n(11).__importStar(n(18));t.isPublicKey=function(e){return e instanceof r.PublicKey},t.isPrivateKey=function(e){return e instanceof r.Keypair},t.toPublicKey=function(e){return new r.PublicKey(e)},t.sleep=function(e){return new Promise((t=>setTimeout(t,e)))},t.getUnixTs=function(){return(new Date).getTime()/1e3}},2253:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaBalancesSdk=void 0;const r=n(11),i=r.__importDefault(n(39)),a=n(18);t.SolanaBalancesSdk=class{constructor(e,t){this.connection=e,this.logger=t}getBalance(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;return r.__awaiter(this,void 0,void 0,(function*(){return new i.default(yield this.connection.getBalance(e,null!==(n=t.commitment)&&void 0!==n?n:"confirmed")).dividedBy(a.LAMPORTS_PER_SOL)}))}getTokenBalance(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var a,o,s;return r.__awaiter(this,void 0,void 0,(function*(){const r=yield this.connection.getTokenAccountsByOwner(e,{mint:t});let d=new i.default(0);for(let e of r.value){const t=yield this.connection.getTokenAccountBalance(e.pubkey,null!==(a=n.commitment)&&void 0!==a?a:"confirmed");d=d.plus(new i.default(null!==(s=null===(o=null===t||void 0===t?void 0:t.value)||void 0===o?void 0:o.uiAmountString)&&void 0!==s?s:0))}return this.logger.log("Wallet ".concat(e," have ").concat(d," of ").concat(t.toString()," tokens")),d}))}}},2254:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaNftSdk=void 0;const r=n(11),i=n(564),a=n(2255),o=n(2293),s=n(2307);t.SolanaNftSdk=class{constructor(e,t,n){this.connection=e,this.logger=t,this.accountSdk=n}mint(e){return r.__awaiter(this,void 0,void 0,(function*(){let t,n;"amount"in e?(n=e.amount,t=void 0):(t=e.masterEditionSupply,n=1);const o=yield(0,a.getMintNftInstructions)(this.connection,e.signer,{metadataLink:e.metadataUrl,collection:e.collection,masterEditionSupply:t,amount:n,verifyCreators:!0}),{mint:s}=o,d=r.__rest(o,["mint"]);return{tx:new i.PreparedTransaction(this.connection,d,e.signer,this.logger,(e=>{this.logger.log("NFT created ".concat(e.txId)),this.logger.log("NFT: Mint Address is ".concat(s.toString()))})),mint:s}}))}transfer(e){var t;return r.__awaiter(this,void 0,void 0,(function*(){const n=null!==(t=e.tokenAccount)&&void 0!==t?t:yield this.accountSdk.getTokenAccountForMint({owner:e.signer.publicKey,mint:e.mint});if(!n)throw new Error("Token account not specified");const r=yield(0,o.getTokenTransferInstructions)({connection:this.connection,signer:e.signer,tokenAccount:n,to:e.to,mint:e.mint,amount:e.amount});return new i.PreparedTransaction(this.connection,r,e.signer,this.logger,(()=>{this.logger.log("".concat(e.amount.toString()," token(s) ").concat(e.mint.toString()," transferred to ").concat(e.to.toString()))}))}))}burn(e){var t,n;return r.__awaiter(this,void 0,void 0,(function*(){const r=null!==(t=e.tokenAccount)&&void 0!==t?t:yield this.accountSdk.getTokenAccountForMint({owner:null!==(n=e.owner)&&void 0!==n?n:e.signer.publicKey,mint:e.mint});if(!r)throw new Error("Token account not specified");const a=yield(0,s.getTokenBurnInstructions)({connection:this.connection,signer:e.signer,tokenAccount:r,mint:e.mint,amount:e.amount,owner:e.owner,close:e.closeAssociatedAccount});return new i.PreparedTransaction(this.connection,a,e.signer,this.logger,(()=>{this.logger.log("".concat(e.amount.toString()," token(s) ").concat(e.mint.toString()," burned"))}))}))}}},2255:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMintNftInstructions=t.createMetadata=void 0;const r=n(11),i=n(18),a=n(114),o=n(838),s=n(1141),d=r.__importDefault(n(434)),c=n(658),u=n(413),l=n(274);function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return r.__awaiter(this,void 0,void 0,(function*(){const a=yield function(e){return r.__awaiter(this,void 0,void 0,(function*(){let t;try{t=yield(0,d.default)(e,{method:"GET"})}catch(n){throw new u.NetworkError({url:e,data:n.message,code:"SOLANA_EXTERNAL_ERR"})}return yield(0,u.handleFetchErrorResponse)(t,{code:"SOLANA_EXTERNAL_ERR"}),t.json()}))}(e);!function(e){if(!e.name||!e.image||isNaN(e.seller_fee_basis_points)||!e.properties||!Array.isArray(e.properties.creators))throw new Error("Invalid metadata file");const t=e.properties.creators;if(t.some((e=>!e.address))||100!==t.reduce(((e,t)=>t.share+e),0))throw new Error("Invalid creators")}(a);const o=a.properties.creators.map((e=>{var t;return new s.Creator({address:e.address,share:e.share,verified:null!==(t=null===n||void 0===n?void 0:n[e.address])&&void 0!==t&&t})}));return new s.DataV2({symbol:a.symbol,name:a.name,uri:e,sellerFeeBasisPoints:a.seller_fee_basis_points,creators:o,collection:t?new s.Collection({key:t.toBase58(),verified:!1}):null,uses:i})}))}t.createMetadata=p,t.getMintNftInstructions=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield p(n.metadataLink,n.collection,n.verifyCreators?{[t.publicKey.toString()]:!0}:void 0,n.use);if(!r)throw new Error("Empty metadata");const d=yield e.getMinimumBalanceForRentExemption(a.MintLayout.span),u=c.SolanaKeypairWallet.generate(),y=[],m=[u,t];y.push(i.SystemProgram.createAccount({fromPubkey:t.publicKey,newAccountPubkey:u.publicKey,lamports:d,space:a.MintLayout.span,programId:a.TOKEN_PROGRAM_ID})),y.push(a.Token.createInitMintInstruction(a.TOKEN_PROGRAM_ID,u.publicKey,0,t.publicKey,t.publicKey));const f=yield(0,l.getTokenWallet)(t.publicKey,u.publicKey);y.push((0,l.createAssociatedTokenAccountInstruction)(f,t.publicKey,t.publicKey,u.publicKey));const h=yield(0,l.getMetadata)(u.publicKey);if(y.push(...new s.CreateMetadataV2({feePayer:t.publicKey},{metadata:h,metadataData:r,updateAuthority:t.publicKey,mint:u.publicKey,mintAuthority:t.publicKey}).instructions),y.push(a.Token.createMintToInstruction(a.TOKEN_PROGRAM_ID,u.publicKey,f,t.publicKey,[],n.amount)),void 0!==n.masterEditionSupply){if(1!==n.amount)throw new Error("For create master edition token amount of tokens should be equal 1");const e=yield(0,l.getMasterEdition)(u.publicKey);y.push(...new s.CreateMasterEditionV3({feePayer:t.publicKey},{edition:e,metadata:h,mint:u.publicKey,mintAuthority:t.publicKey,updateAuthority:t.publicKey,maxSupply:new o.BN(n.masterEditionSupply)}).instructions)}return{instructions:y,signers:m,mint:u.publicKey}}))}},2256:function(e,t){},2257:function(e,t){},2259:function(e,t){},2289:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2290:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaKeypairWallet=void 0;const r=n(11),i=r.__importStar(n(18)),a=r.__importStar(n(117)),o=r.__importDefault(n(2291)),s=n(656);class d{constructor(e){this._keyPair=e}get keyPair(){return this._keyPair}get publicKey(){return this.keyPair.publicKey}signTransaction(e){return r.__awaiter(this,void 0,void 0,(function*(){return e.partialSign(this.keyPair),e}))}signAllTransactions(e){return r.__awaiter(this,void 0,void 0,(function*(){return e.map((e=>(e.partialSign(this.keyPair),e)))}))}signMessage(e,t){return r.__awaiter(this,void 0,void 0,(function*(){let t;return t="string"===typeof e?(new TextEncoder).encode(e):e,a.sign(t,this._keyPair.secretKey).slice(0,a.sign.signatureLength)}))}static createFrom(e){if((0,s.isPrivateKey)(e))return new d(e);if(ArrayBuffer.isView(e))return new d(i.Keypair.fromSecretKey(e));if("string"===typeof e)return new d(i.Keypair.fromSecretKey(Uint8Array.from(o.default.decode(e))));throw new Error("Unknown type of secret key")}static generate(e){return d.createFrom(e?i.Keypair.fromSeed(e):i.Keypair.generate())}}t.SolanaKeypairWallet=d},2293:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.createTransferTokenInstruction=t.getTokenTransferInstructions=void 0;const r=n(11),i=n(18),a=n(224),o=n(114),s=n(2294),d=n(274),c=n(335);function u(t,n,r,s){const d=e.from((0,a.serialize)(new Map([[Object,{kind:"struct",fields:[["instruction","u8"],["amount","u64"]]}]]),{instruction:3,amount:(0,c.bnToBuffer)(s,"le",8)})),u=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0}];return u.push({pubkey:r,isSigner:!0,isWritable:!1}),new i.TransactionInstruction({programId:o.TOKEN_PROGRAM_ID,keys:u,data:d})}t.getTokenTransferInstructions=function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=[],n=[e.signer],r=yield o.Token.getAssociatedTokenAddress(o.ASSOCIATED_TOKEN_PROGRAM_ID,o.TOKEN_PROGRAM_ID,e.mint,e.to);try{yield s.Account.load(e.connection,r)}catch(i){t.push((0,d.createAssociatedTokenAccountInstruction)(r,e.signer.publicKey,e.to,e.mint))}return t.push(u(e.tokenAccount,r,e.signer.publicKey,(0,c.alignBn)((0,c.bigNumToBn)(e.amount),8))),{instructions:t,signers:n}}))},t.createTransferTokenInstruction=u}).call(this,n(7).Buffer)},2306:function(e,t){},2307:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.createBurnTokenInstruction=t.getTokenBurnInstructions=void 0;const r=n(11),i=n(224),a=n(18),o=n(114),s=n(335);function d(t,n,r,d){const c=e.from((0,i.serialize)(new Map([[Object,{kind:"struct",fields:[["instruction","u8"],["amount","u64"]]}]]),{instruction:8,amount:(0,s.bnToBuffer)(d,"le",8)})),u=[{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0}];return u.push({pubkey:r,isSigner:!0,isWritable:!1}),new a.TransactionInstruction({programId:o.TOKEN_PROGRAM_ID,keys:u,data:c})}t.getTokenBurnInstructions=function(e){var t,n;return r.__awaiter(this,void 0,void 0,(function*(){const r=[],i=[e.signer];return r.push(d(e.mint,e.tokenAccount,null!==(t=e.owner)&&void 0!==t?t:e.signer.publicKey,(0,s.alignBn)((0,s.bigNumToBn)(e.amount),8))),e.close&&r.push(o.Token.createCloseAccountInstruction(o.TOKEN_PROGRAM_ID,e.tokenAccount,e.signer.publicKey,null!==(n=e.owner)&&void 0!==n?n:e.signer.publicKey,[])),{instructions:r,signers:i}}))},t.createBurnTokenInstruction=d}).call(this,n(7).Buffer)},2308:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaOrderSdk=void 0;const r=n(11),i=n(564),a=n(2309),o=n(2348),s=n(2349),d=n(2353);t.SolanaOrderSdk=class{constructor(e,t){this.connection=e,this.logger=t}sell(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,a.getAuctionHouseSellInstructions)({connection:this.connection,auctionHouse:e.auctionHouse,price:e.price,mint:e.mint,signer:e.signer,tokensAmount:e.tokensAmount});return new i.PreparedTransaction(this.connection,t,e.signer,this.logger,(()=>{this.logger.log("Set",e.tokensAmount,e.mint.toString(),"for sale for",e.price,"from your account with Auction House",e.auctionHouse.toString())}))}))}buy(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,o.getActionHouseBuyInstructions)({connection:this.connection,auctionHouse:e.auctionHouse,price:e.price,mint:e.mint,signer:e.signer,tokensAmount:e.tokensAmount,tokenAccount:e.tokenAccount});return new i.PreparedTransaction(this.connection,t,e.signer,this.logger,(()=>{this.logger.log("Made offer for ",e.mint.toString(),"for",e.price)}))}))}cancel(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,d.getAuctionHouseCancelInstructions)({connection:this.connection,auctionHouse:e.auctionHouse,price:e.price,mint:e.mint,signer:e.signer,tokensAmount:e.tokensAmount});return new i.PreparedTransaction(this.connection,t,e.signer,this.logger,(()=>{this.logger.log("Cancelled order of",e.tokensAmount,e.mint.toString(),"for",e.price)}))}))}acceptBid(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.sell(e)}))}bid(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.buy(e)}))}executeSell(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,s.getAuctionHouseExecuteSellInstructions)({connection:this.connection,auctionHouse:e.auctionHouse,signer:e.signer,buyerWallet:e.buyerWallet,sellerWallet:e.sellerWallet,mint:e.mint,tokenAccount:e.tokenAccount,price:e.price,tokensAmount:e.tokensAmount});return new i.PreparedTransaction(this.connection,t,e.signer,this.logger,(()=>{this.logger.log("Accepted",e.tokensAmount,e.mint.toString(),"sale from wallet",e.sellerWallet.toString(),"to",e.buyerWallet.toString(),"for",e.price,"from your account with Auction House",e.auctionHouse.toString())}))}))}}},2309:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAuctionHouseSellInstructions=void 0;const r=n(11),i=r.__importDefault(n(39)),a=n(841),o=n(274),s=n(419),d=n(335);t.getAuctionHouseSellInstructions=function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,s.loadAuctionHouseProgram)(e.connection,e.signer),n=yield t.account.auctionHouse.fetch(e.auctionHouse),r=yield(0,o.getPriceWithMantissa)(e.connection,new i.default(e.price),n.treasuryMint,e.signer),c=yield(0,o.getPriceWithMantissa)(e.connection,new i.default(e.tokensAmount),e.mint,e.signer),u=(yield(0,o.getAssociatedTokenAccountForMint)(e.mint,e.signer.publicKey))[0],[l,p]=yield(0,s.getAuctionHouseProgramAsSigner)(),[y,m]=yield(0,s.getAuctionHouseTradeState)(e.auctionHouse,e.signer.publicKey,u,n.treasuryMint,e.mint,c,r),[f,h]=yield(0,s.getAuctionHouseTradeState)(e.auctionHouse,e.signer.publicKey,u,n.treasuryMint,e.mint,c,new i.default(0)),b=a.AuctionHouseProgram.instructions.createSellInstruction({wallet:e.signer.publicKey,tokenAccount:u,metadata:yield(0,o.getMetadata)(e.mint),authority:n.authority,auctionHouse:e.auctionHouse,auctionHouseFeeAccount:n.auctionHouseFeeAccount,sellerTradeState:y,freeSellerTradeState:f,programAsSigner:l},{tradeStateBump:m,freeTradeStateBump:h,programAsSignerBump:p,buyerPrice:(0,d.bigNumToBn)(r),tokenSize:(0,d.bigNumToBn)(c)});return b.keys.filter((t=>t.pubkey.equals(e.signer.publicKey))).map((e=>e.isSigner=!0)),{instructions:[b],signers:[]}}))}},2320:function(e,t){},2324:function(e,t){},2348:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getActionHouseBuyInstructions=void 0;const r=n(11),i=r.__importDefault(n(39)),a=n(658),o=n(114),s=n(841),d=n(482),c=n(274),u=n(419),l=n(335);t.getActionHouseBuyInstructions=function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=e.signer,n=yield(0,u.loadAuctionHouseProgram)(e.connection,e.signer),r=yield n.account.auctionHouse.fetch(e.auctionHouse),p=yield(0,c.getPriceWithMantissa)(e.connection,new i.default(e.price),r.treasuryMint,t),y=yield(0,c.getPriceWithMantissa)(e.connection,new i.default(e.tokensAmount),e.mint,t),[m,f]=yield(0,u.getAuctionHouseBuyerEscrow)(e.auctionHouse,t.publicKey);let h;if(e.tokenAccount)h=e.tokenAccount;else{h=(yield n.provider.connection.getTokenLargestAccounts(e.mint)).value[0].address}const[b,T]=yield(0,u.getAuctionHouseTradeState)(e.auctionHouse,t.publicKey,h,r.treasuryMint,e.mint,y,p),v=r.treasuryMint.equals(d.WRAPPED_SOL_MINT),g=(yield(0,c.getAssociatedTokenAccountForMint)(r.treasuryMint,t.publicKey))[0],E=a.SolanaKeypairWallet.generate(),_=v?[]:[E],O=s.AuctionHouseProgram.instructions.createBuyInstruction({wallet:e.signer.publicKey,paymentAccount:v?t.publicKey:g,transferAuthority:v?t.publicKey:E.publicKey,treasuryMint:r.treasuryMint,tokenAccount:h,metadata:yield(0,c.getMetadata)(e.mint),escrowPaymentAccount:m,authority:r.authority,auctionHouse:e.auctionHouse,auctionHouseFeeAccount:r.auctionHouseFeeAccount,buyerTradeState:b},{tradeStateBump:T,escrowPaymentBump:f,buyerPrice:(0,l.bigNumToBn)(p),tokenSize:(0,l.bigNumToBn)(y)});v||O.keys.filter((e=>e.pubkey.equals(E.publicKey))).map((e=>e.isSigner=!0));return{instructions:[...v?[]:[o.Token.createApproveInstruction(o.TOKEN_PROGRAM_ID,g,E.publicKey,t.publicKey,[],p.toNumber())],O,...v?[]:[o.Token.createRevokeInstruction(o.TOKEN_PROGRAM_ID,g,t.publicKey,[])]],signers:_}}))}},2349:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getAuctionHouseExecuteSellInstructions=void 0;const r=n(11),i=r.__importDefault(n(39)),a=r.__importStar(n(18)),o=n(114),s=n(2350),d=n(482),c=n(274),u=n(419),l=n(335);t.getAuctionHouseExecuteSellInstructions=function(t){return r.__awaiter(this,void 0,void 0,(function*(){const n=yield(0,u.loadAuctionHouseProgram)(t.connection,t.signer),r=yield n.account.auctionHouse.fetch(t.auctionHouse),p=r.treasuryMint.equals(d.WRAPPED_SOL_MINT),y=yield(0,c.getPriceWithMantissa)(t.connection,new i.default(t.price),r.treasuryMint,t.signer),m=yield(0,c.getPriceWithMantissa)(t.connection,new i.default(t.tokensAmount),t.mint,t.signer),f=(yield(0,c.getAssociatedTokenAccountForMint)(t.mint,t.sellerWallet))[0],h=(yield(0,u.getAuctionHouseTradeState)(t.auctionHouse,t.buyerWallet,f,r.treasuryMint,t.mint,m,y))[0],b=(yield(0,u.getAuctionHouseTradeState)(t.auctionHouse,t.sellerWallet,f,r.treasuryMint,t.mint,m,y))[0],[T,v]=yield(0,u.getAuctionHouseTradeState)(t.auctionHouse,t.sellerWallet,f,r.treasuryMint,t.mint,m,new i.default(0)),[g,E]=yield(0,u.getAuctionHouseBuyerEscrow)(t.auctionHouse,t.buyerWallet),[_,O]=yield(0,u.getAuctionHouseProgramAsSigner)(),A=yield(0,c.getMetadata)(t.mint),w=yield n.provider.connection.getAccountInfo(A);if(!w)throw new Error("Account info doesn't fetched");const k=(0,s.decodeMetadata)(e.from(w.data)),C=[];if(k.data.creators)for(let e=0;ee.pubkey.equals(t.signer.publicKey))).map((e=>e.isSigner=!0)),{instructions:[R],signers:S}}))}}).call(this,n(7).Buffer)},235:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEVMBlockchain=t.EVMBlockchains=t.isWETH=t.isNft=t.isRaribleOrderData=t.assertBlockchainAndChainId=t.checkWalletBlockchain=t.getWalletNetwork=t.getWalletBlockchain=t.assertWallet=t.getAssetTypeFromFillRequest=t.getAssetTypeFromItemId=t.getOrderId=t.getOrderAmount=t.getEthereumItemId=t.convertEthereumItemId=t.convertEthereumToUnionAddress=t.convertEthereumCollectionId=t.convertEthereumContractAddress=t.convertOrderIdToEthereumHash=t.convertEthereumOrderHash=t.convertToEthereumAddress=t.getSupportedCurrencies=t.extractEVMBlockchain=t.getEVMBlockchain=t.getPayoutsSupport=t.getOriginFeeSupport=t.convertOrderType=t.isRaribleV2Data=t.isRaribleV1Data=t.getOrderFeesSum=t.getOriginFeesSum=t.convertEthereumPart=t.toEthereumParts=t.getEthOrder=t.getEthOrderType=t.convertOrderDataToEth=t.convertToEthereumAssetType=t.convertToEthereumAsset=t.getEthTakeAssetType=void 0;const r=n(11),i=n(20),a=n(269),o=n(29),s=n(147),d=n(123);Object.defineProperty(t,"EVMBlockchains",{enumerable:!0,get:function(){return d.EVMBlockchains}}),Object.defineProperty(t,"isEVMBlockchain",{enumerable:!0,get:function(){return d.isEVMBlockchain}});const c=n(295),u=n(295),l=n(123),p=n(816),y=n(817),m=n(818),f=n(1079),h=n(1080),b=n(561),T=n(563),v=n(184);function g(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=E(t.type);let r=(0,s.toBn)(t.value);return"ERC20"!==t.type["@type"]&&"ETH"!==t.type["@type"]||(r=yield(0,b.getPrice)(e,n,r)),{assetType:n,value:(0,i.toBigNumber)(r.toString())}}))}function E(e){switch(e["@type"]){case"ETH":return{assetClass:"ETH"};case"ERC20":return{assetClass:"ERC20",contract:I(e.contract)};case"ERC721":return{assetClass:"ERC721",contract:I(e.contract),tokenId:e.tokenId};case"ERC721_Lazy":return{assetClass:"ERC721_LAZY",contract:I(e.contract),tokenId:e.tokenId,uri:e.uri,creators:e.creators.map((e=>({account:I(e.account),value:(0,s.toBn)(e.value).toNumber()}))),royalties:e.royalties.map((e=>({account:I(e.account),value:(0,s.toBn)(e.value).toNumber()}))),signatures:e.signatures.map((e=>(0,i.toBinary)(e)))};case"ERC1155":return{assetClass:"ERC1155",contract:I(e.contract),tokenId:e.tokenId};case"ERC1155_Lazy":return{assetClass:"ERC1155_LAZY",contract:I(e.contract),tokenId:e.tokenId,uri:e.uri,supply:void 0!==e.supply?(0,i.toBigNumber)(e.supply):(0,i.toBigNumber)("1"),creators:e.creators.map((e=>({account:I(e.account),value:(0,s.toBn)(e.value).toNumber()}))),royalties:e.royalties.map((e=>({account:I(e.account),value:(0,s.toBn)(e.value).toNumber()}))),signatures:e.signatures.map((e=>(0,i.toBinary)(e)))};case"CRYPTO_PUNKS":return{assetClass:"CRYPTO_PUNKS",contract:I(e.contract),tokenId:e.tokenId};case"GEN_ART":return{assetClass:"GEN_ART",contract:I(e.contract)};case"AMM_NFT":return{assetClass:"AMM_NFT",contract:I(e.contract)};case"COLLECTION":return{assetClass:"COLLECTION",contract:I(e.contract)};default:throw new Error("Unsupported asset type=".concat(e["@type"]))}}function _(e){switch(e["@type"]){case"ETH_RARIBLE_V1":return{dataType:"LEGACY",fee:e.fee};case"ETH_RARIBLE_V2":return{dataType:"RARIBLE_V2_DATA_V1",payouts:A(e.payouts),originFees:A(e.originFees)};case"ETH_RARIBLE_V2_2":return{dataType:"RARIBLE_V2_DATA_V2",payouts:A(e.payouts),originFees:A(e.originFees),isMakeFill:e.isMakeFill};case"ETH_RARIBLE_V2_DATA_V3_SELL":return{dataType:"RARIBLE_V2_DATA_V3_SELL",payout:e.payout&&w(e.payout),originFeeFirst:e.originFeeFirst&&w(e.originFeeFirst),originFeeSecond:e.originFeeSecond&&w(e.originFeeSecond),maxFeesBasePoint:e.maxFeesBasePoint,marketplaceMarker:e.marketplaceMarker};case"ETH_RARIBLE_V2_DATA_V3_BUY":return{dataType:"RARIBLE_V2_DATA_V3_BUY",payout:e.payout&&w(e.payout),originFeeFirst:e.originFeeFirst&&w(e.originFeeFirst),originFeeSecond:e.originFeeSecond&&w(e.originFeeSecond),marketplaceMarker:e.marketplaceMarker&&(0,i.toWord)(e.marketplaceMarker)};case"ETH_OPEN_SEA_V1":return{dataType:"OPEN_SEA_V1_DATA_V1",exchange:I(e.exchange),makerRelayerFee:e.makerRelayerFee,takerRelayerFee:e.takerRelayerFee,makerProtocolFee:e.makerProtocolFee,takerProtocolFee:e.takerProtocolFee,feeRecipient:I(e.feeRecipient),feeMethod:p.OrderOpenSeaV1DataV1FeeMethod[e.feeMethod],side:p.OrderOpenSeaV1DataV1Side[e.side],saleKind:p.OrderOpenSeaV1DataV1SaleKind[e.saleKind],howToCall:p.OrderOpenSeaV1DataV1HowToCall[e.howToCall],callData:e.callData,replacementPattern:e.replacementPattern,staticTarget:I(e.staticTarget),staticExtraData:e.staticExtraData,extra:e.extra};case"ETH_BASIC_SEAPORT_DATA_V1":return{dataType:"BASIC_SEAPORT_DATA_V1",protocol:I(e.protocol),orderType:y.SeaportOrderType[e.orderType],offer:e.offer.map((e=>({itemType:m.SeaportItemType[e.itemType],token:I(e.token),identifierOrCriteria:e.identifierOrCriteria,startAmount:e.startAmount,endAmount:e.endAmount}))),consideration:e.consideration.map((e=>({itemType:m.SeaportItemType[e.itemType],token:I(e.token),identifierOrCriteria:e.identifierOrCriteria,startAmount:e.startAmount,endAmount:e.endAmount,recipient:I(e.recipient)}))),zone:I(e.zone),zoneHash:(0,i.toWord)(e.zoneHash),conduitKey:(0,i.toWord)(e.conduitKey),counter:e.counter,nonce:e.nonce};case"ETH_CRYPTO_PUNKS":return{dataType:"CRYPTO_PUNKS_DATA"};case"ETH_X2Y2_ORDER_DATA_V1":return{dataType:"X2Y2_DATA",itemHash:(0,i.toWord)(e.itemHash),isCollectionOffer:e.isCollectionOffer,isBundle:e.isBundle,side:e.side,orderId:e.orderId};case"ETH_LOOKSRARE_ORDER_DATA_V1":return{dataType:"LOOKSRARE_DATA_V1",minPercentageToAsk:e.minPercentageToAsk,strategy:I(e.strategy),nonce:e.nonce,params:e.params&&(0,i.toBinary)(e.params)};case"ETH_LOOKSRARE_ORDER_DATA_V2":return{dataType:"LOOKSRARE_DATA_V2",quoteType:p.OrderLooksRareDataV2QuoteType[e.quoteType],globalNonce:e.globalNonce,orderNonce:e.orderNonce,subsetNonce:e.subsetNonce,strategyId:e.strategyId,additionalParameters:(0,i.toBinary)(e.strategyId),merkleRoot:e.merkleRoot&&(0,i.toBinary)(e.merkleRoot),merkleProof:e.merkleProof};case"ETH_SUDOSWAP_AMM_DATA_V1":return{dataType:"SUDOSWAP_AMM_DATA_V1",poolAddress:I(e.poolAddress),bondingCurve:I(e.bondingCurve),curveType:f.SudoSwapCurveType[e.curveType],assetRecipient:I(e.assetRecipient),poolType:h.SudoSwapPoolType[e.poolType],delta:e.delta,fee:e.fee,feeDecimal:e.feeDecimal};default:throw new Error("Unrecognized order data type: ".concat(e["@type"]))}}function O(e){switch(e["@type"]){case"ETH_RARIBLE_V1":return"RARIBLE_V1";case"ETH_RARIBLE_V2":case"ETH_RARIBLE_V2_2":case"ETH_RARIBLE_V2_DATA_V3_SELL":case"ETH_RARIBLE_V2_DATA_V3_BUY":return"RARIBLE_V2";case"ETH_OPEN_SEA_V1":return"OPEN_SEA_V1";case"ETH_BASIC_SEAPORT_DATA_V1":return"SEAPORT_V1";case"ETH_CRYPTO_PUNKS":return"CRYPTO_PUNK";case"ETH_X2Y2_ORDER_DATA_V1":return"X2Y2";case"ETH_LOOKSRARE_ORDER_DATA_V1":return"LOOKSRARE";case"ETH_LOOKSRARE_ORDER_DATA_V2":return"LOOKSRARE_V2";case"ETH_SUDOSWAP_AMM_DATA_V1":return"AMM";default:throw new Error("Unrecognized order data type: ".concat(e["@type"]))}}function A(e){return(null===e||void 0===e?void 0:e.map((e=>w(e))))||[]}function w(e){return{account:I(e.account),value:e.value}}function k(e){return e.reduce(((e,t)=>e+t.value),0)}function C(e){return"ETH_RARIBLE_V1"===e["@type"]}function S(e){return"ETH_RARIBLE_V2"===e["@type"]||"ETH_RARIBLE_V2_2"===e["@type"]||"ETH_RARIBLE_V2_DATA_V3_SELL"===e["@type"]||"ETH_RARIBLE_V2_DATA_V3_BUY"===e["@type"]}function I(e){if(!(0,a.isRealBlockchainSpecified)(e))throw new Error("Not a union or contract address: "+e);const[t,n]=e.split(":");if(!(0,d.isEVMBlockchain)(t))throw new Error("Not an Ethereum address");return(0,i.toAddress)(n)}function R(e){if(!(0,a.isRealBlockchainSpecified)(e))throw new Error("Blockchain is not correct=".concat(e));const[t,n]=e.split(":");if(!(0,d.isEVMBlockchain)(t))throw new Error("Not an Ethereum address");return n}function x(e){if(!e)throw new Error("ItemId has not been specified");const[t,n,r]=e.split(":");if(!(0,d.isEVMBlockchain)(t))throw new Error("Not an ethereum item: ".concat(e));return{itemId:"".concat(n,":").concat(r),contract:n,tokenId:r,domain:t}}function P(e){const{contract:t,tokenId:n}=x(e);return{contract:(0,i.toAddress)(t),tokenId:n}}function B(e){if(!e)throw new d.WalletIsUndefinedError;return e}function j(e,t){if((0,u.getBlockchainFromChainId)(e)!==t)throw new Error("Change network of your wallet to ".concat(t))}t.getEthTakeAssetType=function(e){switch(e["@type"]){case"ERC20":return{assetClass:e["@type"],contract:I(e.contract)};case"ETH":return{assetClass:e["@type"]};default:throw new Error("Invalid take asset type")}},t.convertToEthereumAsset=g,t.convertToEthereumAssetType=E,t.convertOrderDataToEth=_,t.getEthOrderType=O,t.getEthOrder=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){return{hash:(0,i.toWord)(R(t.id)),type:O(t.data),maker:I(t.maker),make:yield g(e,t.make),take:yield g(e,t.take),taker:t.taker&&I(t.taker),salt:(0,i.toWord)(t.salt),start:t.startedAt&&(0,T.convertDateToTimestamp)(new Date(t.startedAt)),end:t.endedAt&&(0,T.convertDateToTimestamp)(new Date(t.endedAt)),signature:t.signature&&(0,i.toBinary)(t.signature),data:_(t.data)}}))},t.toEthereumParts=A,t.convertEthereumPart=w,t.getOriginFeesSum=k,t.getOrderFeesSum=function(e){var t,n,r,i;switch(e.data["@type"]){case"ETH_RARIBLE_V1":return e.data.fee;case"ETH_RARIBLE_V2":case"ETH_RARIBLE_V2_2":return k(e.data.originFees);case"ETH_RARIBLE_V2_DATA_V3_SELL":case"ETH_RARIBLE_V2_DATA_V3_BUY":return(null!==(n=null===(t=e.data.originFeeFirst)||void 0===t?void 0:t.value)&&void 0!==n?n:0)+(null!==(i=null===(r=e.data.originFeeSecond)||void 0===r?void 0:r.value)&&void 0!==i?i:0);default:throw new Error("Unexpected order dataType")}},t.isRaribleV1Data=C,t.isRaribleV2Data=S,t.convertOrderType=function(e){if(C(e))return"RARIBLE_V1";if(S(e))return"RARIBLE_V2";throw new Error("Unknown order type "+e["@type"])},t.getOriginFeeSupport=function(e){if(C(e))return v.OriginFeeSupport.AMOUNT_ONLY;if(S(e))return v.OriginFeeSupport.FULL;throw new Error("Unknown order type "+e["@type"])},t.getPayoutsSupport=function(e){if(C(e))return v.PayoutsSupport.SINGLE;if(S(e))return v.PayoutsSupport.MULTIPLE;throw new Error("Unknown order type "+e["@type"])},t.getEVMBlockchain=function(e){const t=(0,c.getBlockchainBySDKNetwork)(e);if(!(0,d.isEVMBlockchain)(t))throw new Error("Network ".concat(e," is not EVM compatible"));return t},t.extractEVMBlockchain=function(e){const t=(0,l.extractBlockchain)(e);if(!(0,d.isEVMBlockchain)(t))throw new Error("Blockchain ".concat(t," is not EVM compatible"));return t},t.getSupportedCurrencies=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.Blockchain.ETHEREUM;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?[{blockchain:e,type:"ERC20"}]:[{blockchain:e,type:"NATIVE"},{blockchain:e,type:"ERC20"}]},t.convertToEthereumAddress=I,t.convertEthereumOrderHash=function(e,t){return(0,i.toOrderId)("".concat(t,":").concat(e))},t.convertOrderIdToEthereumHash=R,t.convertEthereumContractAddress=function(e,t){return(0,i.toContractAddress)("".concat(t,":").concat(e))},t.convertEthereumCollectionId=function(e,t){return(0,i.toCollectionId)("".concat(t,":").concat(e))},t.convertEthereumToUnionAddress=function(e,t){return(0,i.toUnionAddress)("".concat(t,":").concat(e))},t.convertEthereumItemId=function(e,t){return(0,i.toItemId)("".concat(t,":").concat(e))},t.getEthereumItemId=x,t.getOrderAmount=function(e,t){let n="ERC721"===t.type?1:e;if(void 0===n)throw new Error("You should set amount of asset");return n},t.getOrderId=function(e){if("order"in e)return e.order.id;if("orderId"in e)return e.orderId;throw new Error("OrderId has not been found in request")},t.getAssetTypeFromItemId=P,t.getAssetTypeFromFillRequest=function(e){if(e)return Array.isArray(e)?e.map((e=>P(e))):P(e)},t.assertWallet=B,t.getWalletBlockchain=function(e){return r.__awaiter(this,void 0,void 0,(function*(){return(0,u.getBlockchainFromChainId)(yield B(e).ethereum.getChainId())}))},t.getWalletNetwork=function(e){return r.__awaiter(this,void 0,void 0,(function*(){return(0,u.getNetworkFromChainId)(yield B(e).ethereum.getChainId())}))},t.checkWalletBlockchain=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){j(yield B(e).ethereum.getChainId(),t)}))},t.assertBlockchainAndChainId=j,t.isRaribleOrderData=function(e){return C(e)||S(e)},t.isNft=function(e){switch(e["@type"]){case"ERC721":case"ERC1155":case"ERC721_Lazy":case"ERC1155_Lazy":case"CRYPTO_PUNKS":return!0;default:return!1}},t.isWETH=function(e,t){return"ERC20"===e["@type"]&&I(e.contract)===t},r.__exportStar(n(2151),t)},2350:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendBorsh=t.decodeMetadata=t.METADATA_SCHEMA=t.Metadata=t.CreateMasterEditionArgs=t.UpdateMetadataArgs=t.CreateMetadataArgs=t.Data=t.Creator=t.MetadataKey=void 0;const r=n(11),i=n(224),a=r.__importDefault(n(2351)),o=n(18);var s;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.MetadataV1=4]="MetadataV1",e[e.EditionV1=1]="EditionV1",e[e.MasterEditionV1=2]="MasterEditionV1",e[e.MasterEditionV2=6]="MasterEditionV2",e[e.EditionMarker=7]="EditionMarker"}(s=t.MetadataKey||(t.MetadataKey={}));class d{constructor(e){this.address=e.address,this.verified=e.verified,this.share=e.share}}t.Creator=d;class c{constructor(e){this.name=e.name,this.symbol=e.symbol,this.uri=e.uri,this.sellerFeeBasisPoints=e.sellerFeeBasisPoints,this.creators=e.creators}}t.Data=c;class u{constructor(e){this.instruction=0,this.data=e.data,this.isMutable=e.isMutable}}t.CreateMetadataArgs=u;class l{constructor(e){this.instruction=1,this.data=e.data?e.data:null,this.updateAuthority=e.updateAuthority?e.updateAuthority:null,this.primarySaleHappened=e.primarySaleHappened}}t.UpdateMetadataArgs=l;class p{constructor(e){this.instruction=10,this.maxSupply=e.maxSupply}}t.CreateMasterEditionArgs=p;class y{constructor(e){var t;this.key=s.MetadataV1,this.updateAuthority=e.updateAuthority,this.mint=e.mint,this.data=e.data,this.primarySaleHappened=e.primarySaleHappened,this.isMutable=e.isMutable,this.editionNonce=null!==(t=e.editionNonce)&&void 0!==t?t:null}}t.Metadata=y,t.METADATA_SCHEMA=new Map([[u,{kind:"struct",fields:[["instruction","u8"],["data",c],["isMutable","u8"]]}],[p,{kind:"struct",fields:[["instruction","u8"],["maxSupply",{kind:"option",type:"u64"}]]}],[l,{kind:"struct",fields:[["instruction","u8"],["data",{kind:"option",type:c}],["updateAuthority",{kind:"option",type:"pubkeyAsString"}],["primarySaleHappened",{kind:"option",type:"u8"}]]}],[c,{kind:"struct",fields:[["name","string"],["symbol","string"],["uri","string"],["sellerFeeBasisPoints","u16"],["creators",{kind:"option",type:[d]}]]}],[d,{kind:"struct",fields:[["address","pubkeyAsString"],["verified","u8"],["share","u8"]]}],[y,{kind:"struct",fields:[["key","u8"],["updateAuthority","pubkeyAsString"],["mint","pubkeyAsString"],["data",c],["primarySaleHappened","u8"],["isMutable","u8"],["editionNonce",{kind:"option",type:"u8"}]]}]]);const m=new RegExp("\0","g");t.decodeMetadata=e=>{const n=(0,i.deserializeUnchecked)(t.METADATA_SCHEMA,y,e);return n.data.name=n.data.name.replace(m,""),n.data.uri=n.data.uri.replace(m,""),n.data.symbol=n.data.symbol.replace(m,""),n};t.extendBorsh=()=>{i.BinaryReader.prototype.readPubkey=function(){const e=this.readFixedArray(32);return new o.PublicKey(e)},i.BinaryWriter.prototype.writePubkey=function(e){this.writeFixedArray(e.toBuffer())},i.BinaryReader.prototype.readPubkeyAsString=function(){const e=this.readFixedArray(32);return a.default.encode(e)},i.BinaryWriter.prototype.writePubkeyAsString=function(e){this.writeFixedArray(a.default.decode(e))}},(0,t.extendBorsh)()},2353:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAuctionHouseCancelInstructions=void 0;const r=n(11),i=r.__importDefault(n(39)),a=n(841),o=n(419),s=n(274),d=n(335);t.getAuctionHouseCancelInstructions=function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,o.loadAuctionHouseProgram)(e.connection,e.signer),n=yield t.account.auctionHouse.fetch(e.auctionHouse),r=yield(0,s.getPriceWithMantissa)(e.connection,new i.default(e.price),n.treasuryMint,e.signer),c=yield(0,s.getPriceWithMantissa)(e.connection,new i.default(e.tokensAmount),e.mint,e.signer),u=yield t.provider.connection.getTokenLargestAccounts(e.mint);if(0===u.value.length)throw new Error("The Mint(NFT, Tokens) largest token account can't be found, this could be network instability or you have the wrong mint address.");const l=u.value[0].address,[p]=yield(0,o.getAuctionHouseTradeState)(e.auctionHouse,e.signer.publicKey,l,n.treasuryMint,e.mint,c,r);return{instructions:[a.AuctionHouseProgram.instructions.createCancelInstruction({wallet:e.signer.publicKey,tokenAccount:l,tokenMint:e.mint,authority:n.authority,auctionHouse:e.auctionHouse,auctionHouseFeeAccount:n.auctionHouseFeeAccount,tradeState:p},{buyerPrice:(0,d.bigNumToBn)(r),tokenSize:(0,d.bigNumToBn)(c)})],signers:[]}}))}},2354:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaCollectionSdk=void 0;const r=n(11),i=n(564),a=n(2355);t.SolanaCollectionSdk=class{constructor(e,t){this.connection=e,this.logger=t}verifyCollection(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,a.getVerifyCollectionInstructions)({connection:this.connection,signer:e.signer,mint:e.mint,collection:e.collection});return new i.PreparedTransaction(this.connection,t,e.signer,this.logger,(()=>{this.logger.log("Mint",e.mint.toString(),"approved to collection",e.collection.toString())}))}))}}},2355:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVerifyCollectionInstructions=void 0;const r=n(11),i=n(1141),a=n(274);t.getVerifyCollectionInstructions=function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,a.getMetadata)(e.mint),n=yield(0,a.getMetadata)(e.collection),r=yield(0,a.getMasterEdition)(e.collection),o=[e.signer];return{instructions:new i.VerifyCollection({feePayer:e.signer.publicKey},{metadata:t,collectionAuthority:e.signer.publicKey,collectionMint:e.collection,collectionMetadata:n,collectionMasterEdition:r}).instructions,signers:o}}))}},2356:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaAuctionHouseSdk=void 0;const r=n(11),i=n(419),a=n(274),o=n(564),s=n(2357),d=n(2358);t.SolanaAuctionHouseSdk=class{constructor(e,t){this.connection=e,this.logger=t}getEscrowBalance(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,i.loadAuctionHouseProgram)(this.connection,e.signer),n=yield t.account.auctionHouse.fetch(e.auctionHouse),[r]=yield(0,i.getAuctionHouseBuyerEscrow)(e.auctionHouse,e.wallet),o=yield(0,a.getTokenAmount)(this.connection,t,r,n.treasuryMint);return this.logger.log("".concat(e.wallet.toString()," escrow balance: ").concat(o.toString()," (AuctionHouse: ").concat(e.auctionHouse.toString(),")")),o}))}withdrawEscrow(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,s.getActionHouseEscrowWithdrawInstructions)({connection:this.connection,auctionHouse:e.auctionHouse,signer:e.signer,amount:e.amount});return new o.PreparedTransaction(this.connection,t,e.signer,this.logger,(()=>{this.logger.log("Withdrew",e.amount,"from Auction House Escrow account")}))}))}depositEscrow(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,d.getActionHouseEscrowDepositInstructions)({connection:this.connection,auctionHouse:e.auctionHouse,signer:e.signer,amount:e.amount});return new o.PreparedTransaction(this.connection,t,e.signer,this.logger,(()=>{this.logger.log("Deposited",e.amount,"to Auction House Escrow account")}))}))}}},2357:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getActionHouseEscrowWithdrawInstructions=void 0;const r=n(11),i=r.__importDefault(n(39)),a=r.__importStar(n(18)),o=n(114),s=n(482),d=n(274),c=n(419),u=n(335);t.getActionHouseEscrowWithdrawInstructions=function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=e.signer,n=yield(0,c.loadAuctionHouseProgram)(e.connection,e.signer),r=yield n.account.auctionHouse.fetch(e.auctionHouse),l=(0,u.bigNumToBn)(yield(0,d.getPriceWithMantissa)(e.connection,new i.default(e.amount),r.treasuryMint,t)),[p,y]=yield(0,c.getAuctionHouseBuyerEscrow)(e.auctionHouse,t.publicKey),m=r.treasuryMint.equals(s.WRAPPED_SOL_MINT),f=(yield(0,d.getAssociatedTokenAccountForMint)(r.treasuryMint,t.publicKey))[0],h=[],b=yield n.instruction.withdraw(y,l,{accounts:{wallet:t.publicKey,receiptAccount:m?t.publicKey:f,escrowPaymentAccount:p,treasuryMint:r.treasuryMint,authority:r.authority,auctionHouse:e.auctionHouse,auctionHouseFeeAccount:r.auctionHouseFeeAccount,tokenProgram:o.TOKEN_PROGRAM_ID,systemProgram:a.SystemProgram.programId,rent:a.SYSVAR_RENT_PUBKEY,ataProgram:o.ASSOCIATED_TOKEN_PROGRAM_ID},signers:h});return b.keys.filter((e=>e.pubkey.equals(t.publicKey))).map((e=>e.isSigner=!0)),{instructions:[b],signers:h}}))}},2358:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getActionHouseEscrowDepositInstructions=void 0;const r=n(11),i=r.__importDefault(n(39)),a=r.__importStar(n(18)),o=n(658),s=n(114),d=n(482),c=n(274),u=n(419),l=n(335);t.getActionHouseEscrowDepositInstructions=function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=e.signer,n=yield(0,u.loadAuctionHouseProgram)(e.connection,e.signer),r=yield n.account.auctionHouse.fetch(e.auctionHouse),p=(0,l.bigNumToBn)(yield(0,c.getPriceWithMantissa)(e.connection,new i.default(e.amount),r.treasuryMint,t)),[y,m]=yield(0,u.getAuctionHouseBuyerEscrow)(e.auctionHouse,t.publicKey),f=r.treasuryMint.equals(d.WRAPPED_SOL_MINT),h=(yield(0,c.getAssociatedTokenAccountForMint)(r.treasuryMint,t.publicKey))[0],b=o.SolanaKeypairWallet.generate(),T=f?[]:[b],v=yield n.instruction.deposit(m,p,{accounts:{wallet:t.publicKey,paymentAccount:f?t.publicKey:h,transferAuthority:f?a.SystemProgram.programId:b.publicKey,escrowPaymentAccount:y,treasuryMint:r.treasuryMint,authority:r.authority,auctionHouse:e.auctionHouse,auctionHouseFeeAccount:r.auctionHouseFeeAccount,tokenProgram:s.TOKEN_PROGRAM_ID,systemProgram:a.SystemProgram.programId,rent:a.SYSVAR_RENT_PUBKEY}});f||v.keys.filter((e=>e.pubkey.equals(b.publicKey))).map((e=>e.isSigner=!0));return{instructions:[...f?[]:[s.Token.createApproveInstruction(s.TOKEN_PROGRAM_ID,h,b.publicKey,t.publicKey,[],p)],v,...f?[]:[s.Token.createRevokeInstruction(s.TOKEN_PROGRAM_ID,h,t.publicKey,[])]],signers:T}}))}},2359:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaAccountSdk=void 0;const r=n(11),i=n(564),a=n(2360),o=n(274),s=n(2361);t.SolanaAccountSdk=class{constructor(e,t){this.connection=e,this.logger=t}getTokenAccountForMint(e){var t;return r.__awaiter(this,void 0,void 0,(function*(){const n=yield(0,a.getTokenAccounts)(this.connection,e.owner,e.mint);return null===(t=null===n||void 0===n?void 0:n.value[0])||void 0===t?void 0:t.pubkey}))}getAccountInfo(e){return(0,o.getAccountInfo)(this.connection,e.mint,null,e.tokenAccount)}revokeDelegate(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,s.getAccountRevokeDelegateInstructions)({connection:this.connection,signer:e.signer,tokenAccount:e.tokenAccount});return new i.PreparedTransaction(this.connection,t,e.signer,this.logger,(()=>{this.logger.log("".concat(e.tokenAccount.toString()," delegation revoked"))}))}))}}},236:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XTZ=t.getDataFromCurrencyId=t.convertCurrencyIdToAssetType=t.convertEVMAssetTypeToCurrencyId=t.isErc20=t.isEth=t.isAssetType=t.isRequestCurrencyAssetType=t.getEVMCurrencyId=t.getCurrencyAssetType=void 0;const r=n(20),i=n(29),a=n(123);function o(e){return"string"===typeof e&&!!(0,r.toCurrencyId)(e)}function s(e){return"object"===typeof e&&"@type"in e}function d(e){return"ETH"===e["@type"]}function c(e){return"ERC20"===e["@type"]}function u(e){if(d(e))return(0,r.toCurrencyId)("".concat(e.blockchain||i.Blockchain.ETHEREUM,":").concat(r.ZERO_ADDRESS));if(c(e))return(0,r.toCurrencyId)(e.contract);throw new Error("Unsupported currency type: ".concat(e))}function l(e){const{blockchain:n,contract:o,tokenId:s}=p(e);if((0,a.isEVMBlockchain)(n)||n===i.Blockchain.IMMUTABLEX)return o===r.ZERO_ADDRESS?{"@type":"ETH",blockchain:n}:{"@type":"ERC20",contract:(0,r.toContractAddress)("".concat(n,":").concat(o))};if(n===i.Blockchain.FLOW)return{"@type":"FLOW_FT",contract:(0,r.toContractAddress)(e)};if(n===i.Blockchain.TEZOS)return e===t.XTZ?{"@type":"XTZ"}:{"@type":"TEZOS_FT",contract:(0,r.toContractAddress)("TEZOS:".concat(o)),tokenId:s?(0,r.toBigNumber)(s):void 0};if(n===i.Blockchain.SOLANA)return o===r.ZERO_ADDRESS?{"@type":"SOLANA_SOL"}:{"@type":"SOLANA_NFT",itemId:(0,r.toItemId)("SOLANA:"+o)};throw new Error("Unsupported currency type: ".concat(e))}function p(e){const[t,n,r]=e.split(":");if(!(t in i.Blockchain))throw new Error("Unsupported blockchain: ".concat(e));return{blockchain:t,contract:n,tokenId:r}}t.getCurrencyAssetType=function(e){if(o(e))return l(e);if(s(e))return e;throw new Error("Unrecognized RequestCurrency ".concat(JSON.stringify(e)))},t.getEVMCurrencyId=function(e){if(o(e))return e;if(s(e))return u(e);throw new Error("Unrecognized RequestCurrency ".concat(JSON.stringify(e)))},t.isRequestCurrencyAssetType=o,t.isAssetType=s,t.isEth=d,t.isErc20=c,t.convertEVMAssetTypeToCurrencyId=u,t.convertCurrencyIdToAssetType=l,t.getDataFromCurrencyId=p,t.XTZ="TEZOS:tz1Ke2h7sDdakHJQh8WX4Z372du1KChsksyU"},2360:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=t.retry=t.mintToken=t.getTokenAccounts=t.requestSol=t.genTestWallet=t.getTestWallet=t.createSdk=t.testWallets=t.TEST_AUCTION_HOUSE=void 0;const r=n(11),i=n(18),a=n(658),o=n(1136);function s(e){return new Promise((t=>setTimeout(t,e)))}t.TEST_AUCTION_HOUSE="8Qu3azqi31VpgPwVW99AyiBGnLSpookWQiwLMvFn4NFm",t.testWallets=[{privateKeyString:"2zCVNyb3KhunreVgamvMPDiFZpkHKHnhNeuyoanQcPaN5yHzKBM8f9PF2h6zSaBm2UUDYf98yBGNS7iRbRHGvYrm",privateKeyArray:Uint8Array.from([99,87,171,135,138,126,92,128,190,64,22,156,36,13,155,14,214,77,78,101,109,150,94,234,196,21,218,230,47,10,188,156,22,203,117,122,86,152,247,27,69,100,69,12,18,49,12,192,255,53,207,73,136,97,31,162,159,106,115,88,189,176,183,218]),publicKeyString:"2XyukL1KvwDkfNcdBpfXbj6UtPqF7zcUdTDURNjLFAMo"},{privateKeyString:"2uCT82XZqTxbpVL7AoQCPi4jPxQD5zNU7PT9dYdXGeTbyzrgTRPnCKFXTSUfgMRk3Sahyhwd29YggDQHEdkWve61",privateKeyArray:Uint8Array.from([95,7,178,206,40,211,26,11,231,5,170,238,66,255,253,120,206,37,238,179,226,149,152,249,70,149,165,216,57,48,186,183,37,133,254,50,205,43,152,131,54,75,66,244,110,229,101,18,38,62,201,39,245,109,226,73,236,37,143,180,126,229,117,206]),publicKeyString:"3XUb9y7Z3ADxptxgfMJHcBTxxyCpfcuLDkaTfvW2DGwf"}],t.createSdk=function(){const e=""!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TESTNETS_API_KEY:"2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5",REACT_APP_PROD_API_KEY:"666ad781-aa60-4000-9e3e-cf5ae2d41bd3",REACT_APP_WALLET_CONNECT_V2_PROJECT_ID:"27c21e9982ee7b6e3f22764ab806719b"}).SOLANA_CUSTOM_ENDPOINT?Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TESTNETS_API_KEY:"2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5",REACT_APP_PROD_API_KEY:"666ad781-aa60-4000-9e3e-cf5ae2d41bd3",REACT_APP_WALLET_CONNECT_V2_PROJECT_ID:"27c21e9982ee7b6e3f22764ab806719b"}).SOLANA_CUSTOM_ENDPOINT:void 0;return console.debug("solana endpoint:",e),o.SolanaSdk.create({connection:{cluster:"devnet",endpoint:e,commitmentOrConfig:"confirmed"},debug:!0})},t.getTestWallet=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return a.SolanaKeypairWallet.createFrom(t.testWallets[e].privateKeyString)},t.genTestWallet=function(e){return a.SolanaKeypairWallet.generate(e)},t.requestSol=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;return r.__awaiter(this,void 0,void 0,(function*(){const r=yield e.requestAirdrop(t,n*i.LAMPORTS_PER_SOL);return yield e.confirmTransaction(r),yield e.getBalance(t)}))},t.getTokenAccounts=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){return yield e.getTokenAccountsByOwner(t,{mint:n})}))},t.mintToken=function(e){let{sdk:t,wallet:n,tokensAmount:i=1}=e;return r.__awaiter(this,void 0,void 0,(function*(){const e=yield t.nft.mint({signer:n,metadataUrl:"https://arweave.net/Vt0uj2ql0ck-U5dLWDWJnwQaZPrvqkfxils8agrTiOc",amount:i,masterEditionSupply:1!==i?0:void 0,collection:null}),r=yield e.tx.submit("max");return expect(r.txId).toBeTruthy(),expect(e.mint).toBeTruthy(),yield t.connection.confirmTransaction(r.txId,"finalized"),expect((yield t.balances.getTokenBalance(n.publicKey,e.mint)).toString()).toEqual(i.toString()),{mintTx:r,mint:e.mint}}))},t.retry=function e(t,n,r){return r().catch((i=>{if(0===t)throw i;return s(n).then((()=>e(t-1,n,r)))}))},t.delay=s},2361:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAccountRevokeDelegateInstructions=void 0;const r=n(11),i=n(114);t.getAccountRevokeDelegateInstructions=function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=[],n=[e.signer];return t.push(i.Token.createRevokeInstruction(i.TOKEN_PROGRAM_ID,e.tokenAccount,e.signer.publicKey,[])),{instructions:t,signers:n}}))}},2362:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2363:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaNft=void 0;const r=n(11),i=n(99),a=n(20),o=n(29),s=n(122),d=n(552),c=n(483);t.SolanaNft=class{constructor(e,t,n,r){this.sdk=e,this.wallet=t,this.apis=n,this.config=r,this.mint=this.mint.bind(this),this.burn=this.burn.bind(this),this.burnBasic=this.burnBasic.bind(this),this.transfer=this.transfer.bind(this),this.preprocessMeta=this.preprocessMeta.bind(this),this.mintBasic=this.mintBasic.bind(this),this.transferBasic=this.transferBasic.bind(this)}getCollectionId(e){return"collection"in e?(0,c.extractPublicKey)(e.collection.id):(0,c.extractPublicKey)(e.collectionId)}mint(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new Error("Solana wallet not provided");return{multiple:!1,supportsRoyalties:!1,supportsLazyMint:!1,submit:i.Action.create({id:"mint",run:t=>r.__awaiter(this,void 0,void 0,(function*(){const n=this.getCollectionId(e),r=[],i=yield this.sdk.nft.mint({signer:this.wallet.provider,metadataUrl:t.uri,masterEditionSupply:0,collection:n});r.push(i.tx),n&&r.push(yield this.sdk.collection.verifyCollection({signer:this.wallet.provider,collection:n,mint:i.mint}));const o=yield this.sdk.unionInstructionsAndSend(this.wallet.provider,r,"processed");return{type:d.MintType.ON_CHAIN,transaction:new s.BlockchainSolanaTransaction(o,this.sdk),itemId:(0,a.toItemId)("SOLANA:".concat(i.mint.toString()))}}))})}}))}mintBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.mint(e)).submit(e)}))}burn(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new Error("Solana wallet not provided");const t=yield this.apis.item.getItemById({itemId:e.itemId});return{multiple:parseFloat(t.supply)>1,maxAmount:(0,a.toBigNumber)(t.supply),submit:i.Action.create({id:"burn",run:e=>r.__awaiter(this,void 0,void 0,(function*(){var n;const r=null!==(n=null===e||void 0===e?void 0:e.amount)&&void 0!==n?n:1,i=(0,c.extractPublicKey)(t.id),a=yield this.sdk.nft.burn({mint:i,signer:this.wallet.provider,amount:r,closeAssociatedAccount:!1}),o=yield a.submit("processed");return new s.BlockchainSolanaTransaction(o,this.sdk)}))})}}))}burnBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.burn(e)).submit(e)}))}transfer(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new Error("Solana wallet not provided");const t=yield this.apis.item.getItemById({itemId:e.itemId});return{multiple:parseFloat(t.supply)>1,maxAmount:(0,a.toBigNumber)(t.supply),submit:i.Action.create({id:"transfer",run:e=>r.__awaiter(this,void 0,void 0,(function*(){var n;const r=null!==(n=null===e||void 0===e?void 0:e.amount)&&void 0!==n?n:1,i=(0,c.extractPublicKey)(t.id),a=yield this.sdk.nft.transfer({mint:i,signer:this.wallet.provider,amount:r,to:(0,c.extractPublicKey)(e.to)}),o=yield a.submit("processed");return new s.BlockchainSolanaTransaction(o,this.sdk)}))})}}))}transferBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.transfer(e)).submit(e)}))}preprocessMeta(e){var t,n,r,i,a;if(!this.wallet)throw new Error("Solana wallet not provided");if(e.blockchain!==o.Blockchain.SOLANA)throw new Error("Wrong blockchain");return{name:e.name,symbol:e.symbol,description:e.description,seller_fee_basis_points:100*(null!==(n=null===(t=e.royalties)||void 0===t?void 0:t.value)&&void 0!==n?n:0),image:null===(r=e.image)||void 0===r?void 0:r.url,animation_url:null===(i=e.animation)||void 0===i?void 0:i.url,external_url:e.external,attributes:null===(a=e.attributes)||void 0===a?void 0:a.map((e=>({trait_type:e.key,value:e.value}))),properties:{files:[e.image,e.animation].filter((e=>void 0!==e)).map((e=>({uri:e.url,type:e.mimeType}))),creators:[{address:this.wallet.provider.publicKey.toString(),share:100}]}}}}},2364:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaFill=void 0;const r=n(11),i=n(99),a=n(29),o=n(122),s=n(184),d=n(334),c=n(221),u=n(483),l=n(843),p=n(844);class y{constructor(e,t,n,r){this.sdk=e,this.wallet=t,this.apis=n,this.config=r,this.fill=this.fill.bind(this),this.buyBasic=this.buyBasic.bind(this),this.acceptBidBasic=this.acceptBidBasic.bind(this)}static isBuyOrder(e){return"SOLANA_NFT"===e.make.type["@type"]}fill(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new Error("Solana wallet not provided");const t=yield(0,l.getPreparedOrder)(e,this.apis);if(t.status!==a.OrderStatus.ACTIVE)throw new Error("Order is not active");return y.isBuyOrder(t)?this.buy(t):this.acceptBid(t)}))}buy(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,u.extractPublicKey)((0,l.getOrderData)(e).auctionHouse),n=(0,l.getMintId)(e),a=(0,l.getPrice)(e),p=yield this.apis.item.getItemById({itemId:(0,l.getItemId)(n)}),y=i.Action.create({id:"send-tx",run:i=>r.__awaiter(this,void 0,void 0,(function*(){(0,d.checkPayouts)(i.payouts);const r=[];r.push(yield this.sdk.order.buy({auctionHouse:t,signer:this.wallet.provider,mint:n,price:a,tokensAmount:i.amount}));const o=yield this.sdk.account.getTokenAccountForMint({mint:n,owner:this.wallet.provider.publicKey});if(o){const e=yield this.sdk.account.getAccountInfo({tokenAccount:o,mint:n});e.delegate&&"0"===e.amount.toString()&&r.push(yield this.sdk.account.revokeDelegate({signer:this.wallet.provider,tokenAccount:o}))}return r.push(yield this.sdk.order.executeSell({auctionHouse:t,signer:this.wallet.provider,buyerWallet:this.wallet.provider.publicKey,sellerWallet:(0,u.extractPublicKey)(e.maker),mint:n,price:a,tokensAmount:i.amount})),this.sdk.unionInstructionsAndSend(this.wallet.provider,r,"processed")}))}).after((e=>new o.BlockchainSolanaTransaction(e,this.sdk)));return{multiple:parseFloat(p.supply.toString())>1,maxAmount:e.makeStock,baseFee:0,supportsPartialFill:!1,originFeeSupport:s.OriginFeeSupport.NONE,payoutsSupport:s.PayoutsSupport.NONE,maxFeesBasePointSupport:s.MaxFeesBasePointSupport.IGNORED,submit:y,orderData:{platform:e.platform,nftCollection:(0,c.getNftContractAddress)(e.make.type)}}}))}acceptBid(e){var t;return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,u.extractPublicKey)((0,l.getOrderData)(e).auctionHouse),a=(0,l.getMintId)(e),y=(0,l.getPrice)(e),m=yield this.apis.item.getItemById({itemId:(0,l.getItemId)(a)}),f=i.Action.create({id:"send-tx",run:t=>r.__awaiter(this,void 0,void 0,(function*(){(0,d.checkPayouts)(t.payouts);const r=yield this.sdk.order.sell({auctionHouse:n,signer:this.wallet.provider,mint:a,price:y,tokensAmount:t.amount}),i=yield this.sdk.order.executeSell({auctionHouse:n,signer:this.wallet.provider,buyerWallet:(0,u.extractPublicKey)(e.maker),sellerWallet:this.wallet.provider.publicKey,mint:a,price:y,tokensAmount:t.amount});return this.sdk.unionInstructionsAndSend(this.wallet.provider,[r,i],"processed")}))}).after((e=>new o.BlockchainSolanaTransaction(e,this.sdk)));return{multiple:parseFloat(m.supply.toString())>1,maxAmount:e.makeStock,baseFee:yield(0,p.getAuctionHouseFee)(n,null===(t=this.config)||void 0===t?void 0:t.auctionHouseMapping),supportsPartialFill:!1,originFeeSupport:s.OriginFeeSupport.NONE,payoutsSupport:s.PayoutsSupport.NONE,maxFeesBasePointSupport:s.MaxFeesBasePointSupport.IGNORED,submit:f,orderData:{platform:e.platform,nftCollection:(0,c.getNftContractAddress)(e.take.type)}}}))}buyBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.fill(e)).submit(e)}))}acceptBidBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.fill(e)).submit(e)}))}}t.SolanaFill=y},2365:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaOrder=void 0;const r=n(11),i=r.__importDefault(n(39)),a=n(99),o=n(20),s=n(122),d=n(184),c=n(334),u=n(221),l=n(844),p=n(483),y=n(843),m=n(2366);t.SolanaOrder=class{constructor(e,t,n,i){this.sdk=e,this.wallet=t,this.apis=n,this.config=i,this.cancel=a.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,y.getPreparedOrder)(e,this.apis),n=(0,y.getOrderData)(t),r=(0,y.getTokensAmount)(t),i=yield(yield this.sdk.order.cancel({auctionHouse:(0,p.extractPublicKey)(n.auctionHouse),signer:this.wallet.provider,mint:(0,y.getMintId)(t),price:(0,y.getPrice)(t),tokensAmount:r})).submit("processed");return new s.BlockchainSolanaTransaction(i,this.sdk)}))}),this.sell=this.sell.bind(this),this.bid=this.bid.bind(this),this.sellUpdate=this.sellUpdate.bind(this),this.bidUpdate=this.bidUpdate.bind(this),this.sellBasic=this.sellBasic.bind(this),this.sellUpdateBasic=this.sellUpdateBasic.bind(this),this.bidBasic=this.bidBasic.bind(this),this.cancelBasic=this.cancelBasic.bind(this)}sell(){var e,t;return r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new Error("Solana wallet not provided");const n=(0,l.getAuctionHouse)({"@type":"SOLANA_SOL"},null===(e=this.config)||void 0===e?void 0:e.auctionHouseMapping),i=a.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){return this.sellCommon(e,n)}))});return{originFeeSupport:d.OriginFeeSupport.NONE,payoutsSupport:d.PayoutsSupport.NONE,maxFeesBasePointSupport:d.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:(0,m.getCurrencies)(),baseFee:yield(0,l.getAuctionHouseFee)(n,null===(t=this.config)||void 0===t?void 0:t.auctionHouseMapping),supportsExpirationDate:!1,submit:i}}))}sellCommon(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,p.extractPublicKey)(e.itemId),r=void 0!==e.amount?e.amount:1;return(0,c.checkPayouts)(e.payouts),yield(yield this.sdk.order.sell({auctionHouse:t,signer:this.wallet.provider,mint:n,price:new i.default(e.price).multipliedBy(r),tokensAmount:r})).submit("processed"),(0,y.getOrderId)("SELL",this.wallet.provider.publicKey.toString(),n.toString(),t.toString())}))}sellBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.sell()).submit(e)}))}sellUpdate(e){var t;return r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new Error("Solana wallet not provided");const n=yield(0,y.getPreparedOrder)(e,this.apis),i=(0,p.extractPublicKey)((0,y.getOrderData)(n).auctionHouse),o=a.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){return this.sellUpdateCommon(e,n)}))});return{originFeeSupport:d.OriginFeeSupport.NONE,payoutsSupport:d.PayoutsSupport.NONE,maxFeesBasePointSupport:d.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:(0,m.getCurrencies)(),baseFee:yield(0,l.getAuctionHouseFee)(i,null===(t=this.config)||void 0===t?void 0:t.auctionHouseMapping),submit:o,orderData:{nftCollection:(0,u.getNftContractAddress)(n.make.type)}}}))}sellUpdateCommon(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,y.getTokensAmount)(t),r=(0,y.getMintId)(t),a=(0,p.extractPublicKey)((0,y.getOrderData)(t).auctionHouse);return yield(yield this.sdk.order.sell({auctionHouse:a,signer:this.wallet.provider,mint:r,price:new i.default(e.price).multipliedBy(n),tokensAmount:n})).submit("processed"),(0,y.getOrderId)("SELL",this.wallet.provider.publicKey.toString(),r.toString(),a.toString())}))}sellUpdateBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new Error("Solana wallet not provided");const t=yield(0,y.getPreparedOrder)(e,this.apis);return this.sellUpdateCommon(e,t)}))}getConvertableValue(){return r.__awaiter(this,void 0,void 0,(function*(){}))}bid(e){var t;return r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new Error("Solana wallet not provided");if(!("itemId"in e))throw new Error("No ItemId provided");const n=(0,l.getAuctionHouse)({"@type":"SOLANA_SOL"},null===(t=this.config)||void 0===t?void 0:t.auctionHouseMapping),s=yield this.apis.item.getItemById({itemId:e.itemId}),u=a.Action.create({id:"send-tx",run:t=>r.__awaiter(this,void 0,void 0,(function*(){const r=(0,p.extractPublicKey)(e.itemId);(0,c.checkPayouts)(t.payouts);const a=void 0!==t.amount?t.amount:1;return yield(yield this.sdk.order.buy({auctionHouse:n,signer:this.wallet.provider,mint:r,price:new i.default(t.price).multipliedBy(a),tokensAmount:a})).submit("processed"),(0,y.getOrderId)("BUY",this.wallet.provider.publicKey.toString(),r.toString(),n.toString())}))});return{multiple:parseFloat(s.supply)>1,maxAmount:(0,o.toBigNumber)(s.supply),originFeeSupport:d.OriginFeeSupport.NONE,payoutsSupport:d.PayoutsSupport.NONE,maxFeesBasePointSupport:d.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:(0,m.getCurrencies)(),baseFee:0,getConvertableValue:this.getConvertableValue,supportsExpirationDate:!1,submit:u}}))}bidBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.bid(e)).submit(e)}))}bidUpdate(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new Error("Solana wallet not provided");const t=yield(0,y.getPreparedOrder)(e,this.apis),n=(0,y.getTokensAmount)(t),o=a.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const r=(0,y.getMintId)(t),a=(0,p.extractPublicKey)((0,y.getOrderData)(t).auctionHouse);return yield(yield this.sdk.order.buy({auctionHouse:a,signer:this.wallet.provider,mint:r,price:new i.default(e.price).multipliedBy(n),tokensAmount:n})).submit("processed"),(0,y.getOrderId)("BUY",this.wallet.provider.publicKey.toString(),r.toString(),a.toString())}))});return{originFeeSupport:d.OriginFeeSupport.NONE,payoutsSupport:d.PayoutsSupport.NONE,maxFeesBasePointSupport:d.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:(0,m.getCurrencies)(),baseFee:0,getConvertableValue:this.getConvertableValue,submit:o,orderData:{nftCollection:(0,u.getNftContractAddress)(t.take.type)}}}))}bidUpdateBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.bidUpdate(e)).submit(e)}))}cancelBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.cancel(e)}))}getFutureOrderFees(){var e,t;return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,l.getAuctionHouse)({"@type":"SOLANA_SOL"},null===(e=this.config)||void 0===e?void 0:e.auctionHouseMapping);return{originFeeSupport:d.OriginFeeSupport.NONE,baseFee:yield(0,l.getAuctionHouseFee)(n,null===(t=this.config)||void 0===t?void 0:t.auctionHouseMapping)}}))}}},2366:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrencies=void 0;const r=n(29);t.getCurrencies=function(){return[{blockchain:r.Blockchain.SOLANA,type:"NATIVE"}]}},2367:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaBalance=void 0;const r=n(11),i=n(99),a=n(122),o=n(236),s=n(483),d=n(843),c=n(844);t.SolanaBalance=class{constructor(e,t,n,o){this.sdk=e,this.wallet=t,this.apis=n,this.config=o,this.depositBiddingBalance=i.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new Error("Solana wallet not provided");const t=yield this.getAuctionHouse(e),n=yield this.sdk.auctionHouse.depositEscrow({auctionHouse:t,signer:this.wallet.provider,amount:e.amount});return yield n.submit("processed")}))}).after((e=>new a.BlockchainSolanaTransaction(e,this.sdk))),this.withdrawBiddingBalance=i.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new Error("Solana wallet not provided");const t=yield this.getAuctionHouse(e),n=yield this.sdk.auctionHouse.withdrawEscrow({auctionHouse:t,signer:this.wallet.provider,amount:e.amount});return yield n.submit("processed")}))}).after((e=>new a.BlockchainSolanaTransaction(e,this.sdk))),this.getBalance=this.getBalance.bind(this),this.getBiddingBalance=this.getBiddingBalance.bind(this),this.depositBiddingBalance=this.depositBiddingBalance.bind(this),this.withdrawBiddingBalance=this.withdrawBiddingBalance.bind(this)}getBalance(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,o.getCurrencyAssetType)(t);if("SOLANA_SOL"===n["@type"])return yield this.sdk.balances.getBalance((0,s.extractPublicKey)(e),{commitment:"max"});if("SOLANA_NFT"===n["@type"])return yield this.sdk.balances.getTokenBalance((0,s.extractPublicKey)(e),(0,s.extractPublicKey)(n.itemId));throw new Error("Unsupported asset type")}))}getAuctionHouse(e){var t,n;return r.__awaiter(this,void 0,void 0,(function*(){if("currency"in e){const n=(0,o.getCurrencyAssetType)(e.currency);if("SOLANA_SOL"!==n["@type"]&&"SOLANA_NFT"!==n["@type"])throw new Error("Unsupported currency asset type ("+n["@type"]+")");return(0,c.getAuctionHouse)(n,null===(t=this.config)||void 0===t?void 0:t.auctionHouseMapping)}{let t;return"order"in e?t=e.order:"orderId"in e&&(t=yield this.apis.order.getOrderById({id:e.orderId})),t?(0,s.extractPublicKey)((0,d.getOrderData)(t).auctionHouse):(0,c.getAuctionHouse)({"@type":"SOLANA_SOL"},null===(n=this.config)||void 0===n?void 0:n.auctionHouseMapping)}}))}getBiddingBalance(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new Error("Solana wallet not provided");const t=yield this.getAuctionHouse(e);return yield this.sdk.auctionHouse.getEscrowBalance({auctionHouse:t,signer:this.wallet.provider,wallet:(0,s.extractPublicKey)(e.walletAddress)})}))}}},2368:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaCollection=void 0;const r=n(11),i=n(99),a=n(20),o=n(29),s=n(122);t.SolanaCollection=class{constructor(e,t,n,d){this.sdk=e,this.wallet=t,this.apis=n,this.config=d,this.createCollection=i.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if(e.blockchain!==o.Blockchain.SOLANA)throw new Error("Wrong blockchain");const t=yield this.sdk.nft.mint({metadataUrl:e.asset.arguments.metadataURI,signer:this.wallet.provider,masterEditionSupply:0,collection:null}),n=yield t.tx.submit("confirmed"),r="SOLANA:".concat(t.mint.toString());try{yield this.apis.collection.refreshCollectionItemsMeta({collection:r})}catch(i){}return{tx:new s.BlockchainSolanaTransaction(n,this.sdk),address:(0,a.toContractAddress)("SOLANA:".concat(t.mint.toString()))}}))}),this.createCollectionBasic=this.createCollectionBasic.bind(this)}createCollectionBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){if(e.blockchain!==o.Blockchain.SOLANA)throw new Error("Wrong blockchain");return this.createCollection({blockchain:e.blockchain,asset:{arguments:{metadataURI:e.metadataURI}}})}))}}},2369:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createImmutablexSdk=void 0;const r=n(2370),i=n(382),a=n(474),o=n(375),s=n(376),d=n(2490),c=n(2491),u=n(2493);t.createImmutablexSdk=function(e,t,n,l){const p=(0,r.createImxSdk)(null===e||void 0===e?void 0:e.wallet.link,n,{apiClientParams:{middleware:[...l!==i.LogsLevel.DISABLED?[(0,s.getErrorHandlerMiddleware)(s.NetworkErrorCode.IMX_NETWORK_ERR)]:[]]}}),y=new d.ImxNftService(p,t),m=new c.ImxOrderService(p,t),f=new u.ImxBalanceService(p,t);return{nft:{mint:new o.MethodWithPrepare(a.notImplemented,a.notImplemented),burn:new o.MethodWithPrepare(y.burnBasic,y.burn),transfer:new o.MethodWithPrepare(y.transferBasic,y.transfer),generateTokenId:a.notImplemented,createCollection:a.nonImplementedAction,preprocessMeta:a.notImplemented,uploadMeta:a.notImplemented},order:{fill:{prepare:m.buy},buy:new o.MethodWithPrepare(m.buyBasic,m.buy),batchBuy:new o.MethodWithPrepare(a.notImplemented,a.nonImplementedAction),acceptBid:new o.MethodWithPrepare(m.acceptBidBasic,m.buy),sell:new o.MethodWithPrepare(m.sellBasic,m.sell),sellUpdate:new o.MethodWithPrepare(a.notImplemented,a.notImplemented),bid:new o.MethodWithPrepare(a.notImplemented,a.notImplemented),bidUpdate:new o.MethodWithPrepare(a.notImplemented,a.notImplemented),cancel:m.cancelBasic},balances:{getBalance:f.getBalance,convert:a.notImplemented,transfer:a.notImplemented,getBiddingBalance:a.nonImplementedAction,depositBiddingBalance:a.nonImplementedAction,withdrawBiddingBalance:a.nonImplementedAction},restriction:{canTransfer:a.notImplemented,getFutureOrderFees:()=>m.getFutureOrderFees()}}}},237:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertFlowUnionAddress=t.convertFlowCollectionId=t.convertFlowContractAddress=t.convertFlowItemId=t.convertFlowOrderId=t.toFlowParts=t.convertToFlowAddress=t.getFungibleTokenName=t.parseOrderId=t.parseFlowAddressFromUnionAddress=t.parseFlowItemIdFromUnionItemId=t.getFlowCollection=void 0;const r=n(238),i=n(29),a=n(20),o=n(269),s=/^FLOW:A\.0*x*[0-9a-f]{16}\.[A-Za-z_]{3,}/;t.getFlowCollection=function(e){if(s.test(e)){const t=e.split(":")[1];return(0,r.toFlowContractAddress)(t)}throw new Error("Invalid collection")};const d=/^FLOW:A\.0*x*[0-9a-f]{16}\.[A-Za-z0-9]{3,}:[0-9]{1,}/;t.parseFlowItemIdFromUnionItemId=function(e){if(d.test(e)){const[t,n,a]=e.split(":");if(!n)throw new Error("Invalid collection id, identifier is empty");if(!a)throw new Error("Invalid item id, identifier is empty");if(t===i.Blockchain.FLOW)return{blockchain:i.Blockchain.FLOW,contract:(0,r.toFlowContractAddress)(n),itemId:a};throw new Error('Invalid item id, "'.concat(t,'" is not FLOW item'))}throw new Error("Invalid item ID")};const c=/^FLOW:0*x*[0-9a-f]{16}/;t.parseFlowAddressFromUnionAddress=function(e){if(c.test(e))return(0,a.toFlowAddress)(e.split(":")[1]);throw new Error("Invalid maker")};const u=/^FLOW:[0-9]{1,}/;t.parseOrderId=function(e){if(u.test(e))return e.split(":")[1];throw new Error("Invalid order ID")};const l=/^FLOW:A\.0*x*[0-9a-f]{16}\.[A-Za-z]{3,}/;function p(e){if(!(0,o.isBlockchainSpecified)(e))throw new Error("Not a union or contract address: "+e);const[t,n]=e.split(":");if(t!==i.Blockchain.FLOW)throw new Error("Not an Flow address");return(0,a.toFlowAddress)(n)}t.getFungibleTokenName=function(e){if(l.test(e)){const[,,t]=e.split(".");switch(t){case"FlowToken":return"FLOW";case"FUSD":return"FUSD";case"FiatToken":return"USDC";default:throw new Error("Unsupported contract ID: ".concat(e))}}throw new Error("Unsupported contract ID: ".concat(e))},t.convertToFlowAddress=p,t.toFlowParts=function(e){return(null===e||void 0===e?void 0:e.map((e=>({account:p(e.account),value:(0,a.toBigNumber)(e.value.toString())}))))||[]},t.convertFlowOrderId=function(e){return(0,a.toOrderId)("".concat(i.Blockchain.FLOW,":").concat(e))},t.convertFlowItemId=function(e){return(0,a.toItemId)("".concat(i.Blockchain.FLOW,":").concat(e))},t.convertFlowContractAddress=function(e){return(0,a.toContractAddress)("".concat(i.Blockchain.FLOW,":").concat(e))},t.convertFlowCollectionId=function(e){return(0,a.toCollectionId)("".concat(i.Blockchain.FLOW,":").concat(e))},t.convertFlowUnionAddress=function(e){return(0,a.toUnionAddress)("".concat(i.Blockchain.FLOW,":").concat(e))}},2370:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBalance=t.IMX_ENV_CONFIG=t.IMX_CONFIG=t.createImxSdk=void 0;const r=n(2371),i=n(2481),a=n(2484),o=n(1204),s=n(2485);t.createImxSdk=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const d=(0,s.createApis)(t,null===n||void 0===n?void 0:n.apiClientParams);return{nft:{transfer:r.transfer.bind(null,e),burn:a.burn.bind(null,e)},order:{sell:i.sell.bind(null,e),buy:i.buy.bind(null,t,e,d),cancel:i.cancel.bind(null,e)},balance:{getBalance:o.getBalance.bind(null,t,d)}}};var d=n(1205);Object.defineProperty(t,"IMX_CONFIG",{enumerable:!0,get:function(){return d.IMX_CONFIG}}),Object.defineProperty(t,"IMX_ENV_CONFIG",{enumerable:!0,get:function(){return d.IMX_ENV_CONFIG}});var c=n(1204);Object.defineProperty(t,"getBalance",{enumerable:!0,get:function(){return c.getBalance}})},2371:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transfer=void 0;const r=n(11),i=n(845),a=n(1203);t.transfer=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if(void 0===e)throw new Error("Wallet undefined");const{assetClass:n,contract:r,tokenId:o,to:s}=t;if(n!==i.ERC721TokenType.ERC721)throw new Error("Unsupported assetClass");const{result:d}=yield e.transfer([{type:i.ERC721TokenType.ERC721,tokenId:o,tokenAddress:r,toAddress:s}]);if(!d||!d[0])throw new Error("Imx transfer error: result is empty (".concat(JSON.stringify(d),")"));const c=d[0];return(0,a.getTransferResponse)(c)}))}},2373:function(e,t){},2375:function(e,t){},2386:function(e,t){},2412:function(e,t){},2413:function(e,t){},2430:function(e,t){},2454:function(e,t){},2468:function(e,t){},2469:function(e,t){},2470:function(e,t){},2471:function(e,t){},2472:function(e,t){},2473:function(e,t){},2474:function(e,t){},2475:function(e,t){},2476:function(e,t){},2477:function(e,t){},2478:function(e,t){},2479:function(e,t){},2480:function(e,t){},2481:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancel=t.buy=t.sell=void 0;const r=n(11),i=n(2482),a=n(2483);t.sell=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if(void 0===e)throw new Error("Wallet undefined");const{makeAssetType:{tokenId:n,contract:r},takeAssetType:a,amount:o,payouts:s,originFees:d}=t,c="ERC20"===a.assetClass?a.contract:void 0;return{orderId:yield e.sell(Object.assign({tokenId:n,tokenAddress:r,fees:(0,i.convertFees)([...s,...d]),amount:o},c?{currencyAddress:c}:{}))}}))},t.buy=function(e,t,n,o,s){var d;return r.__awaiter(this,void 0,void 0,(function*(){if(void 0===t)throw new Error("Wallet undefined");const{orderId:e,fee:c}=o,u=yield t.buy({orderIds:[e],fees:(0,i.convertFees)(c)}),l=null===(d=u.result)||void 0===d?void 0:d[e];if("error"===l.status)throw new Error("Trade unsuccessful: "+l.message);let p;try{p=yield(0,a.retry)(20,2e3,(()=>r.__awaiter(this,void 0,void 0,(function*(){const{result:t}=yield n.trades.getTrades({tokenType:s.assetClass,tokenAddress:s.contract,tokenId:s.tokenId}),r=t.find((t=>t.b.order_id.toString()===e));if(!r)throw new Error("Can't find trade with orderid "+e);if("success"===l.status)return r.transaction_id}))))}catch(y){console.error("Error while fetching trade",y)}return{txId:p}}))},t.cancel=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if(void 0===e)throw new Error("Wallet undefined");const{orderId:n}=t;return{orderId:(yield e.cancel({orderId:n})).order_id.toString()}}))}},2482:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateImxFeePercents=t.convertFees=void 0;const r=n(101);function i(e){if(e<0||e>100)throw new Error("Invalid value for fee, should be a number greater then 0 and lower then")}t.convertFees=function(e){const t=null===e||void 0===e?void 0:e.map((e=>{const t=new r.BigNumber(e.value).div(100).toNumber();return i(t),{recipient:e.account,percentage:t}}));return(null===t||void 0===t?void 0:t.filter((e=>0!==e.percentage)))||[]},t.validateImxFeePercents=i},2483:function(e,t,n){"use strict";function r(e){return new Promise((t=>setTimeout(t,e)))}Object.defineProperty(t,"__esModule",{value:!0}),t.delay=t.retry=void 0,t.retry=function e(t,n,i){return i().catch((a=>{if(0===t)throw a;return r(n).then((()=>e(t-1,n,i)))}))},t.delay=r},2484:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.burn=void 0;const r=n(11),i=n(845),a=n(20),o=n(1203);t.burn=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if(void 0===e)throw new Error("Wallet undefined");const{assetClass:n,tokenId:r,contract:s}=t;if(n!==i.ERC721TokenType.ERC721)throw new Error("Unsupported assetClass");const{result:d}=yield e.transfer([{type:i.ERC721TokenType.ERC721,tokenId:r,tokenAddress:s,toAddress:a.ZERO_ADDRESS}]);if(!d||!d[0])throw new Error("Imx burn error: result is empty (".concat(JSON.stringify(d),")"));const c=d[0];return(0,o.getTransferResponse)(c)}))}},2485:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createApis=void 0;const r=n(373),i=n(1205),a=n(2488),o=n(2489);t.createApis=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{apiAddressV1:n,apiAddressV2:s}=i.IMX_ENV_CONFIG[e],d=new r.Configuration(Object.assign({basePath:n},t)),c=new r.Configuration(Object.assign({basePath:s},t)),u=new o.ImxTradesControllerApi(d);return{balance:new a.ImxBalanceControllerApi(c),trades:u}}},2486:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImxWalletProviderEnum=void 0,function(e){e.METAMASK="METAMASK",e.MAGIC_LINK="MAGIC_LINK",e.GAMESTOP="GAMESTOP",e.NONE="NONE"}(t.ImxWalletProviderEnum||(t.ImxWalletProviderEnum={}))},2487:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IMX_ENV_CONFIG=t.IMX_NETWORK_CONFIG=void 0,t.IMX_NETWORK_CONFIG={mainnet:{network:"mainnet",linkAddress:"https://link.x.immutable.com",gasPrice:"4000000",gasLimit:"7000000",enableDebug:!1},goerli:{network:"goerli",linkAddress:"https://link.sandbox.x.immutable.com",gasPrice:"4000000",gasLimit:"7000000",enableDebug:!0}},t.IMX_ENV_CONFIG={testnet:t.IMX_NETWORK_CONFIG.goerli,prod:t.IMX_NETWORK_CONFIG.mainnet}},2488:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImxBalanceControllerApi=void 0;const r=n(11),i=n(373);class a extends i.BaseAPI{getAllBalancesRaw(e){return r.__awaiter(this,void 0,void 0,(function*(){if(null===e.ownerAddress||void 0===e.ownerAddress)throw new i.RequiredError("ownerAddress","Required parameter requestParameters.ownerAddress was null or undefined when calling getAllBalances.");const t=yield this.request({path:"/balances/{address}".replace("{".concat("address","}"),encodeURIComponent(String(e.ownerAddress))),method:"GET",headers:{},query:{}});return new i.JSONApiResponse(t,(e=>e))}))}getAllBalances(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getAllBalancesRaw(e);return yield t.value()}))}}t.ImxBalanceControllerApi=a},2489:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImxTradesControllerApi=void 0;const r=n(11),i=n(373);class a extends i.BaseAPI{constructor(e){super(e)}getTradesRaw(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.request({path:"/trades?party_b_token_type="+encodeURIComponent(e.tokenType)+"&party_b_token_address="+encodeURIComponent(e.tokenAddress)+"&party_b_token_id="+encodeURIComponent(e.tokenId),method:"GET",headers:{},query:{}});return new i.JSONApiResponse(t,(e=>e))}))}getTrades(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getTradesRaw(e);return yield t.value()}))}}t.ImxTradesControllerApi=a},2490:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImxNftService=void 0;const r=n(11),i=n(122),a=n(20),o=n(99);t.ImxNftService=class{constructor(e,t){this.sdk=e,this.apis=t,this.burn=this.burn.bind(this),this.burnBasic=this.burnBasic.bind(this),this.transfer=this.transfer.bind(this),this.transferBasic=this.transferBasic.bind(this)}burnBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.burn(e)).submit(e)}))}transferBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.transfer(e)).submit(e)}))}burn(e){return r.__awaiter(this,void 0,void 0,(function*(){return{multiple:!1,maxAmount:(0,a.toBigNumber)("1"),submit:o.Action.create({id:"burn",run:()=>r.__awaiter(this,void 0,void 0,(function*(){const[,t,n]=e.itemId.split(":"),r=yield this.sdk.nft.burn({assetClass:"ERC721",tokenId:(0,a.toBigNumber)(n),contract:(0,a.toAddress)(t)});return new i.BlockchainImmutableXTransaction(r.txId)}))})}}))}transfer(e){return r.__awaiter(this,void 0,void 0,(function*(){return{multiple:!1,maxAmount:(0,a.toBigNumber)("1"),submit:o.Action.create({id:"transfer",run:t=>r.__awaiter(this,void 0,void 0,(function*(){const[,n,r]=e.itemId.split(":"),[,o]=t.to.split(":"),s=yield this.sdk.nft.transfer({assetClass:"ERC721",to:(0,a.toAddress)(o),tokenId:(0,a.toBigNumber)(r),contract:(0,a.toAddress)(n)});return new i.BlockchainImmutableXTransaction(s.txId)}))})}}))}}},2491:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImxOrderService=void 0;const r=n(11),i=n(122),a=n(20),o=n(29),s=n(99),d=n(184),c=n(334),u=n(221),l=n(1207),p=n(2492);t.ImxOrderService=class{constructor(e,t){this.sdk=e,this.apis=t,this.sell=this.sell.bind(this),this.buy=this.buy.bind(this),this.buyBasic=this.buyBasic.bind(this),this.acceptBidBasic=this.acceptBidBasic.bind(this),this.sellBasic=this.sellBasic.bind(this),this.cancelBasic=this.cancelBasic.bind(this)}buyBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.buy(e)).submit(e)}))}acceptBidBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.buy(e)).submit(e)}))}sellBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.sell()).submit(e)}))}sell(){return r.__awaiter(this,void 0,void 0,(function*(){const e=s.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){(0,c.checkPayouts)(e.payouts);const[,t,n]=e.itemId.split(":"),r=yield this.sdk.order.sell({amount:(0,a.toBigNumber)(e.price.toString()),originFees:(0,l.unionPartsToParts)(e.originFees),payouts:(0,l.unionPartsToParts)(e.payouts),makeAssetType:{assetClass:"ERC721",contract:(0,a.toAddress)(t),tokenId:(0,a.toBigNumber)(n)},takeAssetType:(0,l.getTakeAssetType)(e.currency)});return(0,a.toOrderId)("".concat(o.Blockchain.IMMUTABLEX,":").concat(r.orderId))}))});return{originFeeSupport:d.OriginFeeSupport.FULL,payoutsSupport:d.PayoutsSupport.MULTIPLE,maxFeesBasePointSupport:d.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:(0,p.getCurrencies)(),baseFee:200,supportsExpirationDate:!1,submit:e}}))}getFutureOrderFees(){return r.__awaiter(this,void 0,void 0,(function*(){return{originFeeSupport:d.OriginFeeSupport.FULL,baseFee:200}}))}buy(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,l.getPreparedOrder)(e,this.apis);if(t.status!==o.OrderStatus.ACTIVE)throw new Error("Order is not active");const n=s.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){(0,c.checkPayouts)(e.payouts);const[,n]=t.id.split(":"),r=yield this.sdk.order.buy({orderId:n,fee:(0,l.unionPartsToParts)(e.originFees)},(()=>{if("ERC721"!==t.make.type["@type"])throw new Error("Order make type should be ERC721");const[,e]=t.make.type.contract.split(":");return{assetClass:"ERC721",contract:e,tokenId:t.make.type.tokenId}})());return console.log(r),r}))}).after((e=>new i.BlockchainImmutableXTransaction(e.txId)));return{multiple:!1,maxAmount:t.makeStock,baseFee:(0,l.calcBuyerBaseFee)(t),supportsPartialFill:!1,maxFeesBasePointSupport:d.MaxFeesBasePointSupport.IGNORED,originFeeSupport:d.OriginFeeSupport.FULL,payoutsSupport:d.PayoutsSupport.NONE,submit:n,orderData:{platform:t.platform,nftCollection:(0,u.getOrderNftContractAddress)(t)}}}))}cancelBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){const[,t]=e.orderId.split(":");return yield this.sdk.order.cancel({orderId:t}),new i.BlockchainImmutableXTransaction(void 0)}))}}},2492:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrencies=void 0;const r=n(29);t.getCurrencies=function(){return[{blockchain:r.Blockchain.ETHEREUM,type:"NATIVE"},{blockchain:r.Blockchain.ETHEREUM,type:"ERC20"}]}},2493:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImxBalanceService=void 0;const r=n(11),i=n(20),a=n(236),o=n(1207);t.ImxBalanceService=class{constructor(e,t){this.sdk=e,this.apis=t,this.getBalance=this.getBalance.bind(this)}getBalance(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,a.getCurrencyAssetType)(t);switch(n["@type"]){case"ETH":return yield this.sdk.balance.getBalance((0,o.convertToEthereumAddress)(e),{assetClass:"ETH"});case"ERC20":const[,t]=n.contract.split(":");return yield this.sdk.balance.getBalance((0,o.convertToEthereumAddress)(e),{assetClass:"ERC20",contract:(0,i.toAddress)(t)});default:throw new Error("Unsupported asset type")}}))}}},2494:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFlowSdk=void 0;const r=n(238),i=n(238),a=n(29),o=n(382),s=n(474),d=n(374),c=n(654),u=n(375),l=n(376),p=n(2607),y=n(2609),m=n(2610),f=n(2611),h=n(2612),b=n(2613),T=n(2614),v=n(2615),g=n(2616);t.createFlowSdk=function(e,t,n,E,_){var O,A;const w=(0,r.createFlowSdk)(null===e||void 0===e?void 0:e.fcl,n,Object.assign(Object.assign({},E||{}),{apiKey:null===_||void 0===_?void 0:_.apiKey,middleware:[...(null===_||void 0===_?void 0:_.logs)!==o.LogsLevel.DISABLED?[(0,l.getErrorHandlerMiddleware)(l.NetworkErrorCode.FLOW_NETWORK_ERR)]:[],...(null===E||void 0===E?void 0:E.middleware)||[]]}),(null===(A=null===(O=null===_||void 0===_?void 0:_.blockchain)||void 0===O?void 0:O.FLOW)||void 0===A?void 0:A.auth)||(null===e||void 0===e?void 0:e.getAuth())),k=i.FLOW_ENV_CONFIG[n].network,C=new y.FlowSell(w,t),S=new p.FlowMint(w,t,k),I=new v.FlowBid(w),R=new h.FlowBurn(w,k),x=new f.FlowTransfer(w,k),P=new m.FlowBuy(w,t,k),B=new b.FlowCancel(w,t,k),j=new T.FlowBalance(w,n,k,e),F=d.Middlewarer.skipMiddleware(S.preprocessMeta),M=new c.MetaUploader(a.Blockchain.FLOW,F),D=new g.FlowSetupAccount(w,k);return{nft:{mint:new u.MethodWithPrepare(S.mintBasic,S.prepare),burn:new u.MethodWithPrepare(R.burnBasic,R.burn),transfer:new u.MethodWithPrepare(x.transferBasic,x.transfer),generateTokenId:()=>Promise.resolve(void 0),createCollection:s.notImplemented,preprocessMeta:F,uploadMeta:M.uploadMeta},order:{fill:{prepare:P.buy},sell:new u.MethodWithPrepare(C.sellBasic,C.sell),sellUpdate:new u.MethodWithPrepare(C.sellUpdateBasic,C.update),buy:new u.MethodWithPrepare(P.buyBasic,P.buy),batchBuy:new u.MethodWithPrepare(s.notImplemented,s.nonImplementedAction),acceptBid:new u.MethodWithPrepare(P.acceptBidBasic,P.acceptBid),bid:new u.MethodWithPrepare(I.bidBasic,I.bid),bidUpdate:new u.MethodWithPrepare(I.bidUpdateBasic,I.update),cancel:B.cancel},balances:{getBalance:j.getBalance,transfer:j.transfer,convert:s.notImplemented,getBiddingBalance:s.notImplemented,depositBiddingBalance:s.nonImplementedAction,withdrawBiddingBalance:s.nonImplementedAction},restriction:{canTransfer:()=>Promise.resolve({success:!0}),getFutureOrderFees:()=>C.getFutureOrderFees()},flow:{setupAccount:D.setupAccount,checkInitMattelCollections:D.checkInitMattelCollections,setupMattelCollections:D.setupMattelCollections,setupGamisodesCollections:D.setupGamisodesCollections}}}},255:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTezosOrderLegacyForm=t.getRequestAmount=t.isNftOrMTAssetType=t.isFTAssetType=t.isXtzAssetType=t.isMTAssetType=t.isNftAssetType=t.getTokenIdString=t.getTezosAssetTypeV2=t.convertTezosToUnionAddress=t.convertTezosToCollectionAddress=t.convertTezosToContractAddress=t.convertTezosItemId=t.convertTezosOrderId=t.convertUnionAddress=t.convertFromContractAddress=t.convertUnionParts=t.getCollectionTypeAssetClass=t.convertTezosToUnionAsset=t.covertToLibAsset=t.getTezosAssetType=t.convertOrderToOrderForm=t.convertOrderToFillOrder=t.getSupportedCurrencies=t.getRoyalties=t.getPayouts=t.getMakerPublicKey=t.getTezosAddress=t.getTezosItemData=t.getTezosOrderId=t.getRequiredProvider=t.checkChainId=t.getMaybeTezosProvider=t.isExistedTezosProvider=t.getTezosBasePath=t.XTZ_DECIMALS=void 0;const r=n(11),i=n(29),a=n(273),o=n(58),s=r.__importDefault(n(39)),d=n(20),c=n(294);function u(e){return void 0!==e.tezos}t.XTZ_DECIMALS=6,t.getTezosBasePath=function(e){switch(e){case"testnet":return"https://test-tezos-api.rarible.org";case"dev":return"http://dev-tezos-api.rarible.int";case"mainnet":return"https://tezos-api.rarible.org";default:throw new Error("Unsupported tezos network")}},t.isExistedTezosProvider=u,t.getMaybeTezosProvider=function(e,t,n){const r="".concat(n.basePath,"/v0.1");switch(t){case"testnet":return{tezos:e,config:{exchange:"KT1S6H2FWxrpaD7aPRSW1cTTE1xPucXBSTL5",transfer_proxy:"KT1WbVjXdmBpzzVoYSSUiNt6QFnSC3W768d1",fees:new s.default(0),nft_public:"",mt_public:"",auction:"KT1CB5JBSC7kTxRV3ir2xsooMA1FLieiD4Mt",auction_storage:"KT1KWAPPjuDq4ZeX67rzZWsf6eAeqwtuAfSP",node_url:"https://rpc.tzkt.io/ithacanet",chain_id:"NetXnHfVqm9iesp",sales:"KT1NcKyhPnomH9PKGeDfvMiGH2PDgKCd5YuM",sales_storage:"KT1GDUG3AQpaKmFjFHVn6PYT4Tprf7ccwPa3",transfer_manager:"KT1LQPAi4w2h9GQ61S8NkENcNe3aH5vYEzjP",bid:"KT1FiEi3Mrh31vJy39CD4hkiHq1AfRpTxNpF",bid_storage:"KT1ENB6j6uMJn7MtDV4VBE1AAAwCXmMtzjUd",sig_checker:"KT1Fbvkq4sMawS4rdNXswoN7ELgkNV1ooLB7",tzkt:"https://api.ghostnet.tzkt.io",dipdup:"https://testnet-tezos-indexer.rarible.org/v1/graphql",union_api:r,objkt_sales_v1:"KT1Ax5fm2UNxjXGmrMDytREfqvYoCXoBB4Jo",objkt_sales_v2:"KT1GiZuR6TdkgxZGQGZSdbC3Jox9JTSbqTB6",royalties_provider:"KT1F68vtdE2HHhZa3jBNT1kCkMjaQAWCShXB",hen_marketplace:"KT1XYgjgFQutFfgEiD7RuppSKZsawZbkpKxL",hen_objkts:"KT1P2VyFd61A3ukizJoX37nFF9fqZnihv7Lw",teia_marketplace:"KT1Anx515N2PK8A2ZX5uGNn7Gckh4WytLJmK",versum_marketplace:"KT1B1Wz7jPH23EqKUpDwFDkw3A1yLxGZ4uJy",versum_nfts:"KT1UH5RSbomuV1o6UuDB9yeACbqRMup3utGu",fxhash_sales_v1:"KT1BEc3m6yxN856Y4zfArpDqQ1uZZ1HkDTRh",fxhash_sales_v2:"KT1GCLoBSwUaNjaGXq5RtiP8CXTL3cEeMNDs",fxhash_nfts_v1:"KT1VEXkw6rw6pJDP9APGsMneFafArijmM96j",fxhash_nfts_v2:"KT1WSwXCWPPAxAy4ibPmFyCm4NhmSJT9UuxQ",aggregator_tracker:"KT1DajvCNVScudRm3kCHPfUjsRCtmPnm375s",aggregator_tracker_id:"09616c6c64617461",api_key:n.apiKey}};case"dev":return{tezos:e,config:{exchange:"KT1S6H2FWxrpaD7aPRSW1cTTE1xPucXBSTL5",transfer_proxy:"KT1WbVjXdmBpzzVoYSSUiNt6QFnSC3W768d1",fees:new s.default(0),nft_public:"",mt_public:"",chain_id:"NetXnHfVqm9iesp",auction:"KT1CB5JBSC7kTxRV3ir2xsooMA1FLieiD4Mt",auction_storage:"KT1KWAPPjuDq4ZeX67rzZWsf6eAeqwtuAfSP",node_url:"https://rpc.tzkt.io/ghostnet",sales:"KT1NcKyhPnomH9PKGeDfvMiGH2PDgKCd5YuM",sales_storage:"KT1GDUG3AQpaKmFjFHVn6PYT4Tprf7ccwPa3",transfer_manager:"KT1LQPAi4w2h9GQ61S8NkENcNe3aH5vYEzjP",bid:"KT1FiEi3Mrh31vJy39CD4hkiHq1AfRpTxNpF",bid_storage:"KT1ENB6j6uMJn7MtDV4VBE1AAAwCXmMtzjUd",sig_checker:"KT1Fbvkq4sMawS4rdNXswoN7ELgkNV1ooLB7",tzkt:"https://api.ghostnet.tzkt.io",dipdup:"https://dev-tezos-indexer.rarible.org/v1/graphql",union_api:"https://dev-api.rarible.org/v0.1",objkt_sales_v1:"KT1Ax5fm2UNxjXGmrMDytREfqvYoCXoBB4Jo",objkt_sales_v2:"KT1GiZuR6TdkgxZGQGZSdbC3Jox9JTSbqTB6",royalties_provider:"KT1F68vtdE2HHhZa3jBNT1kCkMjaQAWCShXB",hen_marketplace:"KT1XYgjgFQutFfgEiD7RuppSKZsawZbkpKxL",hen_objkts:"KT1P2VyFd61A3ukizJoX37nFF9fqZnihv7Lw",teia_marketplace:"KT1Anx515N2PK8A2ZX5uGNn7Gckh4WytLJmK",versum_marketplace:"KT1B1Wz7jPH23EqKUpDwFDkw3A1yLxGZ4uJy",versum_nfts:"KT1UH5RSbomuV1o6UuDB9yeACbqRMup3utGu",fxhash_sales_v1:"KT1BEc3m6yxN856Y4zfArpDqQ1uZZ1HkDTRh",fxhash_sales_v2:"KT1GCLoBSwUaNjaGXq5RtiP8CXTL3cEeMNDs",fxhash_nfts_v1:"KT1VEXkw6rw6pJDP9APGsMneFafArijmM96j",fxhash_nfts_v2:"KT1WSwXCWPPAxAy4ibPmFyCm4NhmSJT9UuxQ",aggregator_tracker:"KT1DajvCNVScudRm3kCHPfUjsRCtmPnm375s",aggregator_tracker_id:"09616c6c64617461",api_key:n.apiKey}};case"mainnet":return{tezos:e,config:{exchange:"KT198mqFKkiWerXLmMCw69YB1i6yzYtmGVrC",transfer_proxy:"KT1N2oby9tYmv5tjkGD1KyVzkDRCmgDkXgSD",fees:new s.default(0),nft_public:"",mt_public:"",auction:"",auction_storage:"",node_url:"https://rpc.tzkt.io/mainnet",chain_id:"NetXdQprcVkpaWU",sales:"KT1N4Rrm6BU6229drs6scrH3vard1pPngMyA",sales_storage:"KT1BEZNm3E25rZtXfPPKr5Jxygbi2kL2cCEW",transfer_manager:"KT1ViAbsAM5rp89yVydEkbQozp1S12zqirwS",bid:"",bid_storage:"",sig_checker:"KT1VAmfDTkcYKMZZQhwuxtCGoD1hx7v5bjZ9",tzkt:"https://api.mainnet.tzkt.io",dipdup:"https://tezos-indexer.rarible.org/v1/graphql",union_api:r,objkt_sales_v2:"KT1WvzYHCNBvDSdwafTHv7nJ1dWmZ8GCYuuC",objkt_sales_v1:"KT1FvqJwEDWb1Gwc55Jd1jjTHRVWbYKUUpyq",royalties_provider:"KT1HNNrmCk1fpqveRDz8Fvww2GM4gPzmA7fo",hen_marketplace:"KT1HbQepzV1nVGg8QVznG7z4RcHseD5kwqBn",hen_objkts:"KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton",teia_marketplace:"KT1PHubm9HtyQEJ4BBpMTVomq6mhbfNZ9z5w",versum_marketplace:"KT1GyRAJNdizF1nojQz62uGYkx8WFRUJm9X5",versum_nfts:"KT1LjmAdYQCLBjwv4S2oFkEzyHVkomAf5MrW",fxhash_sales_v1:"KT1Xo5B7PNBAeynZPmca4bRh6LQow4og1Zb9",fxhash_sales_v2:"KT1GbyoDi7H1sfXmimXpptZJuCdHMh66WS9u",fxhash_nfts_v1:"KT1KEa8z6vWXDJrVqtMrAeDVzsvxat3kHaCE",fxhash_nfts_v2:"KT1U6EHmNxJTkvaWJ4ThczG4FSDaHC21ssvi",aggregator_tracker:"KT1Gv1tPJ3nU5T6VmFc12M6NKc5i51MYVPjG",aggregator_tracker_id:"09616c6c64617461",api_key:n.apiKey}};default:throw new Error("Unsupported tezos network for config")}};const l=new Map;function p(e){const[t,n]=e.split(":");if(t!==i.Blockchain.TEZOS)throw new Error("Not an tezos address: ".concat(e));return n}function y(e){if("TEZOS_RARIBLE_V2"!==e.data["@type"])throw new Error("Unsupported order data type");return{type:"RARIBLE_V2",maker:b(e.maker),maker_edpk:e.data.makerEdpk,taker:void 0!==e.taker?b(e.taker):void 0,taker_edpk:e.data.takerEdpk,make:{asset_type:m(e.make.type),value:new s.default(e.make.value)},take:{asset_type:m(e.take.type),value:new s.default(e.take.value)},salt:e.salt,start:e.startedAt?parseInt(e.startedAt):void 0,end:e.endedAt?parseInt(e.endedAt):void 0,signature:e.signature,data:{data_type:"V1",payouts:f(e.data.payouts),origin_fees:f(e.data.originFees)}}}function m(e){switch(e["@type"]){case"XTZ":return{asset_class:"XTZ"};case"TEZOS_FT":return{asset_class:"FT",contract:h(e.contract),token_id:e.tokenId?new s.default(e.tokenId):void 0};case"TEZOS_NFT":return{asset_class:"NFT",contract:h(e.contract),token_id:new s.default(e.tokenId)};case"TEZOS_MT":return{asset_class:"MT",contract:h(e.contract),token_id:new s.default(e.tokenId)};default:throw new Error("Invalid take asset type")}}function f(e){return(null===e||void 0===e?void 0:e.map((e=>({account:p(e.account),value:new s.default(e.value)}))))||[]}function h(e){const[t,n]=e.split(":");if(t!==i.Blockchain.TEZOS)throw new Error("Not a tezos contract address: ".concat(e));return n}function b(e){const[t,n]=e.split(":");if(t!==i.Blockchain.TEZOS)throw new Error("Not a tezos address: ".concat(e));return n}function T(e){return(0,d.toContractAddress)("".concat(i.Blockchain.TEZOS,":").concat(e))}function v(e){return"TEZOS_NFT"===e["@type"]}function g(e){return"TEZOS_MT"===e["@type"]}t.checkChainId=function(e){var t;return r.__awaiter(this,void 0,void 0,(function*(){let n=l.get(e.tezos);if(n||(n=yield null===(t=e.tezos)||void 0===t?void 0:t.chain_id(),l.set(e.tezos,n)),n!==e.config.chain_id)throw new Error("Config chainId=".concat(e.config.chain_id,", but wallet chainId=").concat(n))}))},t.getRequiredProvider=function(e){if(!u(e))throw new Error("Tezos provider is required");return e},t.getTezosOrderId=function(e){if(!e)throw new Error("OrderId has not been specified");const[t,n]=e.split(":");if(t!==i.Blockchain.TEZOS)throw new Error("Not an TEZOS order");return n},t.getTezosItemData=function(e){const[t,n,r]=e.split(":");if(t!==i.Blockchain.TEZOS)throw new Error("Not an tezos item: ".concat(e));return{itemId:"".concat(n,":").concat(r),contract:n,tokenId:r,domain:t}},t.getTezosAddress=p,t.getMakerPublicKey=function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,a.get_public_key)(e);if(!t)throw new Error("Maker does not exist");return t}))},t.getPayouts=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){return f(t)||[]}))},t.getRoyalties=function(e){return(null===e||void 0===e?void 0:e.reduce(((e,t)=>(e[p(t.account)]=new s.default(t.value),e)),{}))||{}},t.getSupportedCurrencies=function(){return[{blockchain:i.Blockchain.TEZOS,type:"NATIVE"},{blockchain:i.Blockchain.TEZOS,type:"TEZOS_FT"}]},t.convertOrderToFillOrder=function(e){return Object.assign(Object.assign({},y(e)),{makeStock:(0,c.toBigNumber)(e.makeStock)})},t.convertOrderToOrderForm=y,t.getTezosAssetType=m,t.covertToLibAsset=function(e){switch(e.assetType.assetClass){case"XTZ":return{asset_type:{asset_class:e.assetType.assetClass},value:new s.default(e.value)};case"FT":return{asset_type:{asset_class:e.assetType.assetClass,contract:e.assetType.contract,token_id:void 0===e.assetType.tokenId?void 0:new s.default(e.assetType.tokenId)},value:new s.default(e.value)};case"NFT":case"MT":return{asset_type:{asset_class:e.assetType.assetClass,contract:e.assetType.contract,token_id:new s.default(e.assetType.tokenId)},value:new s.default(e.value)};default:throw new Error("Unknown Asset Class")}},t.convertTezosToUnionAsset=function(e){switch(e.assetClass){case"XTZ":return{"@type":"XTZ"};case"FT":return{"@type":"TEZOS_FT",contract:T(e.contract),tokenId:e.tokenId?(0,c.toBigNumber)(e.tokenId):void 0};case"NFT":return{"@type":"TEZOS_NFT",contract:T(e.contract),tokenId:(0,c.toBigNumber)(e.tokenId)};case"MT":return{"@type":"TEZOS_MT",contract:T(e.contract),tokenId:(0,c.toBigNumber)(e.tokenId)};default:throw new Error("Invalid asset type")}},t.getCollectionTypeAssetClass=function(e){switch(e){case i.CollectionType.TEZOS_MT:return"MT";case i.CollectionType.TEZOS_NFT:return"NFT";default:throw new Error("Unrecognized NFT collection type")}},t.convertUnionParts=f,t.convertFromContractAddress=h,t.convertUnionAddress=b,t.convertTezosOrderId=function(e){return(0,d.toOrderId)("".concat(i.Blockchain.TEZOS,":").concat(e))},t.convertTezosItemId=function(e){return(0,d.toItemId)("".concat(i.Blockchain.TEZOS,":").concat(e))},t.convertTezosToContractAddress=T,t.convertTezosToCollectionAddress=function(e){return(0,d.toCollectionId)("".concat(i.Blockchain.TEZOS,":").concat(e))},t.convertTezosToUnionAddress=function(e){return(0,d.toUnionAddress)("".concat(i.Blockchain.TEZOS,":").concat(e))},t.getTezosAssetTypeV2=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){switch(t["@type"]){case"XTZ":return{type:a.AssetTypeV2.XTZ,asset_contract:void 0,asset_token_id:void 0};case"TEZOS_FT":{const r=h(t.contract);let i=a.AssetTypeV2.FA2;try{i=yield(0,o.get_ft_type)(e,r)}catch(n){console.log("error get_ft_type",n,r)}if(i===a.AssetTypeV2.FA2)return{type:a.AssetTypeV2.FA2,asset_contract:r,asset_token_id:new s.default(t.tokenId||0)};if(i===a.AssetTypeV2.FA12)return{type:a.AssetTypeV2.FA12,asset_contract:r,asset_token_id:void 0};throw new Error("Unrecognized FT contract type, check contract and network")}default:throw new Error("Invalid asset type")}}))},t.getTokenIdString=function(e){return void 0!==e?e.toString():void 0},t.isNftAssetType=v,t.isMTAssetType=g,t.isXtzAssetType=function(e){return"XTZ"===e["@type"]},t.isFTAssetType=function(e){return"TEZOS_FT"===e["@type"]},t.isNftOrMTAssetType=function(e){return v(e)||g(e)},t.getRequestAmount=function(e,t){if(t===i.CollectionType.TEZOS_MT){if(void 0===e)throw new Error("You should set amount of asset");return new s.default(e.toFixed())}},t.getTezosOrderLegacyForm=function(e){if("TEZOS_RARIBLE_V2"!==e.data["@type"])throw new Error("Tezos order is not legacy (orderId=".concat(e.id,")"));const t=e.data;if(!t.legacyData)throw new Error("Tezos legacy order have to include legacyData (orderId=".concat(e.id,")"));let n;try{n=JSON.parse(t.legacyData)}catch(r){throw new Error("Tezos legacy order parse data error")}return(0,a.order_of_json)(n)}},2607:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlowMint=void 0;const r=n(11),i=n(99),a=n(122),o=n(29),s=n(552),d=n(1116),c=n(237),u=n(2608);t.FlowMint=class{constructor(e,t,n){this.sdk=e,this.apis=t,this.network=n,this.prepare=this.prepare.bind(this),this.mintBasic=this.mintBasic.bind(this)}prepare(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield(0,d.getCollection)(this.apis.collection,e);if("FLOW"===t.type){const e=(0,c.getFlowCollection)(t.id);return{multiple:!1,supportsRoyalties:!0,supportsLazyMint:!1,submit:i.Action.create({id:"mint",run:t=>r.__awaiter(this,void 0,void 0,(function*(){const n=yield this.sdk.nft.mint(e,t.uri,(0,u.prepareFlowRoyalties)(t.royalties));return{type:s.MintType.ON_CHAIN,itemId:(0,c.convertFlowItemId)(n.tokenId),transaction:new a.BlockchainFlowTransaction(n,this.network)}}))})}}throw new Error("Unsupported collection type")}))}mintBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.prepare(e)).submit(e)}))}preprocessMeta(e){var t,n;if(e.blockchain!==o.Blockchain.FLOW)throw new Error("Wrong blockchain");return{name:e.name,description:e.description,image:null===(t=e.image)||void 0===t?void 0:t.url,animation_url:null===(n=e.animation)||void 0===n?void 0:n.url,external_url:e.external,attributes:e.attributes}}}},2608:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareFlowRoyalties=void 0;const r=n(147),i=n(20),a=n(237);t.prepareFlowRoyalties=function(e){return e&&e.length>0?e.map((e=>{if((0,r.toBn)(e.value).gt(1e4))throw new Error("Value for royalty too big");return{account:(0,a.parseFlowAddressFromUnionAddress)(e.account),value:(0,i.toBigNumber)((0,r.toBn)(e.value).div(1e4).toString())}})):[]}},2609:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlowSell=void 0;const r=n(11),i=n(20),a=n(238),o=n(99),s=n(147),d=n(29),c=n(184),u=n(236),l=n(221),p=n(237),y=n(864);class m{constructor(e,t){this.sdk=e,this.apis=t,this.sell=this.sell.bind(this),this.update=this.update.bind(this),this.sellBasic=this.sellBasic.bind(this),this.sellUpdateBasic=this.sellUpdateBasic.bind(this)}getPreparedOrder(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.apis.order.getOrderById({id:e})}))}getFutureOrderFees(){return r.__awaiter(this,void 0,void 0,(function*(){return{originFeeSupport:c.OriginFeeSupport.FULL,baseFee:(0,y.getFlowBaseFee)(this.sdk)}}))}sell(){return r.__awaiter(this,void 0,void 0,(function*(){const e=o.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){return this.sellCommon(e)}))}).after((e=>(0,p.convertFlowOrderId)(e.orderId)));return{supportedCurrencies:m.supportedCurrencies,baseFee:(0,y.getFlowBaseFee)(this.sdk),originFeeSupport:c.OriginFeeSupport.FULL,payoutsSupport:c.PayoutsSupport.NONE,maxFeesBasePointSupport:c.MaxFeesBasePointSupport.IGNORED,supportsExpirationDate:!1,submit:e}}))}sellCommon(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,u.getCurrencyAssetType)(e.currency);if("FLOW_FT"===t["@type"]){const n=(0,p.getFungibleTokenName)(t.contract),{itemId:r,contract:i}=(0,p.parseFlowItemIdFromUnionItemId)(e.itemId);return this.sdk.order.sell({collection:i,currency:n,itemId:(0,a.toFlowItemId)("".concat(i,":").concat(r)),sellItemPrice:(0,s.toBn)(e.price).decimalPlaces(8).toString(),originFees:(0,p.toFlowParts)(e.originFees),end:e.expirationDate})}throw new Error("Unsupported currency type: ".concat(t["@type"]))}))}update(e){return r.__awaiter(this,void 0,void 0,(function*(){const[t,n]=e.orderId.split(":");if(t!==d.Blockchain.FLOW)throw new Error("Not an flow order");const a=yield this.getPreparedOrder(e.orderId),u=o.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if("FLOW_FT"===a.take.type["@type"]){const t=(0,p.getFungibleTokenName)(a.take.type.contract);if("FLOW_NFT"===a.make.type["@type"])return yield this.sdk.order.updateOrder({collection:(0,p.getFlowCollection)(a.make.type.contract),currency:t,order:n,sellItemPrice:(0,i.toBigNumber)((0,s.toBn)(e.price).decimalPlaces(8).toString())});throw new Error("Unsupported make asset: ".concat(a.make.type["@type"]))}throw new Error("Unsupported take asset: ".concat(a.take.type["@type"]))}))}).after((e=>(0,p.convertFlowOrderId)(e.orderId)));return{supportedCurrencies:m.supportedCurrencies,originFeeSupport:c.OriginFeeSupport.FULL,payoutsSupport:c.PayoutsSupport.NONE,maxFeesBasePointSupport:c.MaxFeesBasePointSupport.IGNORED,baseFee:(0,y.getFlowBaseFee)(this.sdk),submit:u,orderData:{nftCollection:(0,l.getNftContractAddress)(a.make.type)}}}))}sellBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.sellCommon(e);return(0,p.convertFlowOrderId)(t.orderId)}))}sellUpdateBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){const[t,n]=e.orderId.split(":");if(t!==d.Blockchain.FLOW)throw new Error("Not an flow order");const r=yield this.getPreparedOrder(e.orderId);if("FLOW_FT"===r.take.type["@type"]){const t=(0,p.getFungibleTokenName)(r.take.type.contract);if("FLOW_NFT"===r.make.type["@type"]){const a=yield this.sdk.order.updateOrder({collection:(0,p.getFlowCollection)(r.make.type.contract),currency:t,order:n,sellItemPrice:(0,i.toBigNumber)((0,s.toBn)(e.price).decimalPlaces(8).toString())});return(0,p.convertFlowOrderId)(a.orderId)}throw new Error("Unsupported make asset: ".concat(r.make.type["@type"]))}throw new Error("Unsupported take asset: ".concat(r.take.type["@type"]))}))}}t.FlowSell=m,m.supportedCurrencies=[{blockchain:d.Blockchain.FLOW,type:"NATIVE"}]},2610:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlowBuy=void 0;const r=n(11),i=n(294),a=n(99),o=n(122),s=n(184),d=n(221),c=r.__importStar(n(237)),u=n(237),l=n(864);t.FlowBuy=class{constructor(e,t,n){this.sdk=e,this.apis=t,this.network=n,this.buy=this.buy.bind(this),this.buyBasic=this.buyBasic.bind(this),this.acceptBidBasic=this.acceptBidBasic.bind(this)}getPreparedOrder(e){return r.__awaiter(this,void 0,void 0,(function*(){if("order"in e)return e.order;if("orderId"in e)return this.apis.order.getOrderById({id:e.orderId});throw new Error("Incorrect request")}))}getFlowNftContract(e){if("FLOW_NFT"===e.make.type["@type"])return e.make.type.contract;if("FLOW_NFT"===e.take.type["@type"])return e.take.type.contract;throw new Error("This is not FLOW order")}getFlowCurrency(e){if("FLOW_FT"===e.take.type["@type"])return c.getFungibleTokenName(e.take.type.contract);if("FLOW_FT"===e.make.type["@type"])return c.getFungibleTokenName(e.make.type.contract);throw new Error("No Flow fungible token found in order take and make values")}fillCommon(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return r.__awaiter(this,void 0,void 0,(function*(){const n=yield this.getPreparedOrder(e),r=a.Action.create({id:"send-tx",run:t=>this.buyCommon(Object.assign(Object.assign(Object.assign({},t),e),{order:n}))});return{multiple:!1,maxAmount:(0,i.toBigNumber)("1"),baseFee:(0,l.getFlowBaseFee)(this.sdk),supportsPartialFill:!1,originFeeSupport:s.OriginFeeSupport.FULL,payoutsSupport:s.PayoutsSupport.NONE,maxFeesBasePointSupport:s.MaxFeesBasePointSupport.IGNORED,submit:r,orderData:{platform:n.platform,nftCollection:(0,d.getNftContractAddress)(t?n.take.type:n.make.type)}}}))}buy(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.fillCommon(e)}))}acceptBid(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.fillCommon(e,!0)}))}buyCommon(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=this.getFlowCurrency(e.order),n=c.parseFlowAddressFromUnionAddress(e.order.maker),r=c.getFlowCollection(this.getFlowNftContract(e.order)),i=c.parseOrderId(e.order.id),a=yield this.sdk.order.fill(r,t,i,n,(0,u.toFlowParts)(e.originFees));return new o.BlockchainFlowTransaction(a,this.network)}))}buyBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getPreparedOrder(e);return this.buyCommon(Object.assign(Object.assign({},e),{order:t}))}))}acceptBidBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getPreparedOrder(e);return this.buyCommon(Object.assign(Object.assign({},e),{order:t}))}))}}},2611:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlowTransfer=void 0;const r=n(11),i=n(99),a=n(122),o=n(294),s=n(237);t.FlowTransfer=class{constructor(e,t){this.sdk=e,this.network=t,this.transfer=this.transfer.bind(this),this.transferBasic=this.transferBasic.bind(this)}transfer(e){return r.__awaiter(this,void 0,void 0,(function*(){const{itemId:t,contract:n}=(0,s.parseFlowItemIdFromUnionItemId)(e.itemId);return{multiple:!1,maxAmount:(0,o.toBigNumber)("1"),submit:i.Action.create({id:"transfer",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const r=(0,s.parseFlowAddressFromUnionAddress)(e.to),i=yield this.sdk.nft.transfer(n,parseInt(t),r);return new a.BlockchainFlowTransaction(i,this.network)}))})}}))}transferBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.transfer(e)).submit(e)}))}}},2612:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlowBurn=void 0;const r=n(11),i=n(99),a=n(20),o=n(122),s=n(237);t.FlowBurn=class{constructor(e,t){this.sdk=e,this.network=t,this.burn=this.burn.bind(this),this.burnBasic=this.burnBasic.bind(this)}burn(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!e.itemId)throw new Error("ItemId has not been specified");const{itemId:t,contract:n}=(0,s.parseFlowItemIdFromUnionItemId)(e.itemId);return{multiple:!1,maxAmount:(0,a.toBigNumber)("1"),submit:i.Action.create({id:"burn",run:e=>r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.sdk.nft.burn(n,parseInt(t));return new o.BlockchainFlowTransaction(e,this.network)}))})}}))}burnBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.burn(e)).submit(e)}))}}},2613:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlowCancel=void 0;const r=n(11),i=n(122),a=n(237);t.FlowCancel=class{constructor(e,t,n){this.sdk=e,this.apis=t,this.network=n,this.cancel=this.cancel.bind(this)}cancel(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!e.orderId)throw new Error("OrderId has not been specified");const t=(0,a.parseOrderId)(e.orderId),n=yield this.apis.order.getOrderById({id:e.orderId});switch(n.make.type["@type"]){case"FLOW_NFT":{if("FLOW_FT"!==n.take.type["@type"])throw new Error("Invalid Flow order, make asset is not a Flow asset");const e=yield this.sdk.order.cancelOrder((0,a.getFlowCollection)(n.make.type.contract),t);return new i.BlockchainFlowTransaction(e,this.network)}case"FLOW_FT":{if("FLOW_NFT"!==n.take.type["@type"])throw new Error("Invalid Flow bid order, take asset is not a Flow asset");const e=yield this.sdk.order.cancelBid((0,a.getFlowCollection)(n.take.type.contract),t);return new i.BlockchainFlowTransaction(e,this.network)}default:throw new Error("Not an Flow order")}}))}}},2614:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlowBalance=void 0;const r=n(11),i=n(147),a=n(210),o=n(122),s=n(236),d=n(1220),c=n(237),u=n(1221),l=n(1222);t.FlowBalance=class{constructor(e,t,n,r){this.sdk=e,this.env=t,this.network=n,this.wallet=r,this.getBalance=this.getBalance.bind(this),this.transfer=this.transfer.bind(this)}getBalance(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,s.getCurrencyAssetType)(t);if(this.wallet){const t=(0,c.parseFlowAddressFromUnionAddress)(e),a=(0,u.getFlowCurrencyFromAssetType)(n),o=yield(0,d.retry)(10,1e3,(()=>r.__awaiter(this,void 0,void 0,(function*(){return yield this.sdk.wallet.getFungibleBalance(t,a)}))));return(0,i.toBn)(o)}return yield(0,d.retry)(10,1e3,(()=>r.__awaiter(this,void 0,void 0,(function*(){return yield(0,l.getSimpleFlowFungibleBalance)(this.env,e,n)}))))}))}transfer(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.wallet)throw new a.Warning("Wallet is undefined");const t=(0,s.getCurrencyAssetType)(e.currency),n=(0,c.parseFlowAddressFromUnionAddress)(e.recipient),r=(0,u.getFlowCurrencyFromAssetType)(t),i=yield this.sdk.wallet.transferFunds({recipient:n,currency:r,amount:e.amount});return new o.BlockchainFlowTransaction(i,this.network)}))}}},2615:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlowBid=void 0;const r=n(11),i=n(20),a=n(99),o=n(238),s=n(294),d=n(29),c=n(184),u=n(236),l=n(237),p=n(864);class y{constructor(e){this.sdk=e,this.bid=this.bid.bind(this),this.update=this.update.bind(this),this.bidBasic=this.bidBasic.bind(this),this.bidUpdateBasic=this.bidUpdateBasic.bind(this)}getConvertableValue(){return r.__awaiter(this,void 0,void 0,(function*(){}))}getBidObjectData(e){if("collectionId"in e)throw new Error("Bid collection is not supported");if(!e.itemId)throw new Error("ItemId has not been specified");const[t,n,r]=e.itemId.split(":");if(t!==d.Blockchain.FLOW)throw new Error("Not an flow item: ".concat(e.itemId));return{contract:n,tokenId:r,itemId:(0,o.toFlowItemId)("".concat(n,":").concat(r))}}bid(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=this.getBidObjectData(e),n=a.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){return this.bidCommon(e,t)}))}).after((e=>(0,l.convertFlowOrderId)(e.orderId)));return{originFeeSupport:c.OriginFeeSupport.FULL,payoutsSupport:c.PayoutsSupport.NONE,maxFeesBasePointSupport:c.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:y.supportedCurrencies,multiple:!1,maxAmount:(0,s.toBigNumber)("1"),baseFee:(0,p.getFlowBaseFee)(this.sdk),getConvertableValue:this.getConvertableValue,supportsExpirationDate:!1,submit:n}}))}bidCommon(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,u.getCurrencyAssetType)(e.currency);if("FLOW_FT"===n["@type"]){const r=(0,l.getFungibleTokenName)(n.contract);return this.sdk.order.bid((0,i.toFlowContractAddress)(t.contract),r,t.itemId,(0,s.toBigNumber)(e.price.toString()),(0,l.toFlowParts)(e.originFees))}throw new Error("Unsupported currency type: ".concat(n["@type"]))}))}update(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!e.orderId)throw new Error("OrderId has not been specified");const[t,n]=e.orderId.split(":");if(t!==d.Blockchain.FLOW)throw new Error("Not an flow order");const o=yield this.sdk.apis.order.getOrderByOrderId({orderId:n}),u=a.Action.create({id:"send-tx",run:e=>r.__awaiter(this,void 0,void 0,(function*(){if("fungible"===o.make["@type"]){const t=(0,l.getFungibleTokenName)((0,l.convertFlowContractAddress)(o.make.contract));return this.sdk.order.bidUpdate((0,i.toFlowContractAddress)(o.take.contract),t,o,(0,s.toBigNumber)(e.price.toString()))}throw new Error("Unsupported currency type: ".concat(o.make["@type"]))}))}).after((e=>(0,l.convertFlowOrderId)(e.orderId)));return{originFeeSupport:c.OriginFeeSupport.FULL,payoutsSupport:c.PayoutsSupport.NONE,maxFeesBasePointSupport:c.MaxFeesBasePointSupport.IGNORED,supportedCurrencies:y.supportedCurrencies,baseFee:(0,p.getFlowBaseFee)(this.sdk),getConvertableValue:this.getConvertableValue,submit:u,orderData:{nftCollection:"contract"in o.take?(0,l.convertFlowContractAddress)(o.take.contract):void 0}}}))}bidBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=this.getBidObjectData(e),n=yield this.bidCommon(e,t);return(0,l.convertFlowOrderId)(n.orderId)}))}bidUpdateBasic(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.update(e)).submit(e)}))}}t.FlowBid=y,y.supportedCurrencies=[{blockchain:d.Blockchain.FLOW,type:"NATIVE"}]},2616:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlowSetupAccount=void 0;const r=n(11),i=n(122),a=n(237);t.FlowSetupAccount=class{constructor(e,t){this.sdk=e,this.network=t,this.setupAccount=this.setupAccount.bind(this),this.checkInitMattelCollections=this.checkInitMattelCollections.bind(this),this.setupMattelCollections=this.setupMattelCollections.bind(this),this.setupGamisodesCollections=this.setupGamisodesCollections.bind(this)}setupAccount(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=(0,a.getFlowCollection)(e),n=yield this.sdk.collection.setupAccount(t);return new i.BlockchainFlowTransaction(n,this.network)}))}checkInitMattelCollections(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=e?(0,a.parseFlowAddressFromUnionAddress)(e):void 0,n=yield this.sdk.collection.checkInitCollections(t);return{initCollections:Object.keys(n).every((e=>n[e])),collections:n}}))}setupMattelCollections(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.sdk.collection.setupMattelCollections();return new i.BlockchainFlowTransaction(e,this.network)}))}setupGamisodesCollections(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.sdk.collection.setupGamisodesCollections();return new i.BlockchainFlowTransaction(e,this.network)}))}}},2618:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2619:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FclConnectionProvider=void 0;const r=n(11),i=n(119),a=n(129),o=n(137),s="fcl";class d extends o.AbstractConnectionProvider{constructor(e){super(),this.config=e,this.instance=(0,o.cache)((()=>this._connect())),this.connection=this.instance.pipe((0,a.mergeMap)((e=>this.toConnectState(e))),(0,a.startWith)((0,o.getStateConnecting)({providerId:s})))}toConnectState(e){const t=()=>e.unauthenticate();return(0,i.defer)((()=>e.currentUser().authenticate())).pipe((0,a.map)((n=>{const r=n.addr;return r?(0,o.getStateConnected)({connection:{fcl:e,address:r},disconnect:t}):(0,o.getStateDisconnected)()})))}getId(){return s}getConnection(){return this.connection}_connect(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield Promise.resolve().then((()=>r.__importStar(n(599))));return e.config().put("accessNode.api",this.config.accessNode).put("discovery.wallet",this.config.walletDiscovery).put("env",this.config.network).put("app.detail.title",this.config.applicationTitle).put("app.detail.icon",this.config.applicationIcon),e}))}getOption(){return Promise.resolve(s)}isAutoConnected(){return Promise.resolve(!1)}isConnected(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.instance.pipe((0,a.first)()).toPromise();return!!(null===e||void 0===e?void 0:e.currentUser())}))}}t.FclConnectionProvider=d},2696:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2697:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BeaconConnectionProvider=void 0;const r=n(11),i=n(119),a=n(129),o=n(137),s="beacon";class d extends o.AbstractConnectionProvider{constructor(e){super(),this.config=e,this.instance=(0,o.cache)((()=>this._connect())),this.connection=this.instance.pipe((0,a.mergeMap)((e=>{let{beaconWallet:t,tezosToolkit:n}=e;return this.toConnectState(t,n)})),(0,a.startWith)((0,o.getStateConnecting)({providerId:s})))}toConnectState(e,t){const n=()=>r.__awaiter(this,void 0,void 0,(function*(){yield e.disconnect(),yield e.client.removeAllPeers(),yield e.client.removeAllAccounts(),yield e.client.destroy()}));return(0,i.defer)((()=>this.getAddress(e))).pipe((0,a.map)((r=>(0,o.getStateConnected)({connection:{address:r,toolkit:t,wallet:e},disconnect:n}))))}getAddress(e){return r.__awaiter(this,void 0,void 0,(function*(){let t;const n=yield e.client.getActiveAccount();return n?t=Promise.resolve(n.address):(yield e.requestPermissions({network:{type:this.config.network,rpcUrl:this.config.accessNode}}),t=e.getPKH()),t}))}getId(){return s}getConnection(){return this.connection}_connect(){return r.__awaiter(this,void 0,void 0,(function*(){const{TezosToolkit:e}=yield Promise.resolve().then((()=>r.__importStar(n(517)))),{BeaconWallet:t}=yield Promise.resolve().then((()=>r.__importStar(n(3298)))),i=new t({name:this.config.appName,preferredNetwork:this.config.network}),a=new e(this.config.accessNode);return a.setWalletProvider(i),{beaconWallet:i,tezosToolkit:a}}))}getOption(){return r.__awaiter(this,void 0,void 0,(function*(){return s}))}isAutoConnected(){return r.__awaiter(this,void 0,void 0,(function*(){return!1}))}isConnected(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.instance.pipe((0,a.first)()).toPromise();return!!(yield null===e||void 0===e?void 0:e.beaconWallet.client.getActiveAccount())}))}}t.BeaconConnectionProvider=d},270:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRequiredWallet=void 0;const r=n(1020);t.getRequiredWallet=function(e){if(!e)throw new r.WalletIsUndefinedError;return e}},2701:function(e,t){},271:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getConduitByKey=t.KNOWN_CONDUIT_KEYS_TO_CONDUIT=t.DOMAIN_REGISTRY_ADDRESS=t.CROSS_CHAIN_SEAPORT_V1_5_ADDRESS=t.CROSS_CHAIN_SEAPORT_V1_4_ADDRESS=t.CROSS_CHAIN_SEAPORT_ADDRESS=t.NO_CONDUIT=t.ONE_HUNDRED_PERCENT_BP=t.MAX_INT=t.BasicOrderRouteType=t.Side=t.ItemType=t.OrderType=t.EIP_712_BULK_ORDER_TYPE=t.EIP_712_ORDER_TYPE=t.OPENSEA_CONDUIT_ADDRESS=t.OPENSEA_CONDUIT_KEY=t.SEAPORT_CONTRACT_VERSION_V1_4=t.SEAPORT_CONTRACT_VERSION=t.SEAPORT_CONTRACT_NAME=void 0;const r=n(101);t.SEAPORT_CONTRACT_NAME="Seaport",t.SEAPORT_CONTRACT_VERSION="1.5",t.SEAPORT_CONTRACT_VERSION_V1_4="1.4",t.OPENSEA_CONDUIT_KEY="0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000",t.OPENSEA_CONDUIT_ADDRESS="0x1e0049783f008a0085193e00003d00cd54003c71",t.EIP_712_ORDER_TYPE={OrderComponents:[{name:"offerer",type:"address"},{name:"zone",type:"address"},{name:"offer",type:"OfferItem[]"},{name:"consideration",type:"ConsiderationItem[]"},{name:"orderType",type:"uint8"},{name:"startTime",type:"uint256"},{name:"endTime",type:"uint256"},{name:"zoneHash",type:"bytes32"},{name:"salt",type:"uint256"},{name:"conduitKey",type:"bytes32"},{name:"counter",type:"uint256"}],OfferItem:[{name:"itemType",type:"uint8"},{name:"token",type:"address"},{name:"identifierOrCriteria",type:"uint256"},{name:"startAmount",type:"uint256"},{name:"endAmount",type:"uint256"}],ConsiderationItem:[{name:"itemType",type:"uint8"},{name:"token",type:"address"},{name:"identifierOrCriteria",type:"uint256"},{name:"startAmount",type:"uint256"},{name:"endAmount",type:"uint256"},{name:"recipient",type:"address"}]},t.EIP_712_BULK_ORDER_TYPE={BulkOrder:[{name:"tree",type:"OrderComponents[2][2][2][2][2][2][2]"}],OrderComponents:[{name:"offerer",type:"address"},{name:"zone",type:"address"},{name:"offer",type:"OfferItem[]"},{name:"consideration",type:"ConsiderationItem[]"},{name:"orderType",type:"uint8"},{name:"startTime",type:"uint256"},{name:"endTime",type:"uint256"},{name:"zoneHash",type:"bytes32"},{name:"salt",type:"uint256"},{name:"conduitKey",type:"bytes32"},{name:"counter",type:"uint256"}],OfferItem:[{name:"itemType",type:"uint8"},{name:"token",type:"address"},{name:"identifierOrCriteria",type:"uint256"},{name:"startAmount",type:"uint256"},{name:"endAmount",type:"uint256"}],ConsiderationItem:[{name:"itemType",type:"uint8"},{name:"token",type:"address"},{name:"identifierOrCriteria",type:"uint256"},{name:"startAmount",type:"uint256"},{name:"endAmount",type:"uint256"},{name:"recipient",type:"address"}]},function(e){e[e.FULL_OPEN=0]="FULL_OPEN",e[e.PARTIAL_OPEN=1]="PARTIAL_OPEN",e[e.FULL_RESTRICTED=2]="FULL_RESTRICTED",e[e.PARTIAL_RESTRICTED=3]="PARTIAL_RESTRICTED"}(t.OrderType||(t.OrderType={})),function(e){e[e.NATIVE=0]="NATIVE",e[e.ERC20=1]="ERC20",e[e.ERC721=2]="ERC721",e[e.ERC1155=3]="ERC1155",e[e.ERC721_WITH_CRITERIA=4]="ERC721_WITH_CRITERIA",e[e.ERC1155_WITH_CRITERIA=5]="ERC1155_WITH_CRITERIA"}(t.ItemType||(t.ItemType={})),function(e){e[e.OFFER=0]="OFFER",e[e.CONSIDERATION=1]="CONSIDERATION"}(t.Side||(t.Side={})),function(e){e[e.ETH_TO_ERC721=0]="ETH_TO_ERC721",e[e.ETH_TO_ERC1155=1]="ETH_TO_ERC1155",e[e.ERC20_TO_ERC721=2]="ERC20_TO_ERC721",e[e.ERC20_TO_ERC1155=3]="ERC20_TO_ERC1155",e[e.ERC721_TO_ERC20=4]="ERC721_TO_ERC20",e[e.ERC1155_TO_ERC20=5]="ERC1155_TO_ERC20"}(t.BasicOrderRouteType||(t.BasicOrderRouteType={})),t.MAX_INT=(0,r.toBn)("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.ONE_HUNDRED_PERCENT_BP=1e4,t.NO_CONDUIT="0x0000000000000000000000000000000000000000000000000000000000000000",t.CROSS_CHAIN_SEAPORT_ADDRESS="0x00000000006c3852cbef3e08e8df289169ede581",t.CROSS_CHAIN_SEAPORT_V1_4_ADDRESS="0x00000000000001ad428e4906aE43D8F9852d0dD6",t.CROSS_CHAIN_SEAPORT_V1_5_ADDRESS="0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC",t.DOMAIN_REGISTRY_ADDRESS="0x000000000DaD0DE04D2B2D4a5A74581EBA94124A",t.KNOWN_CONDUIT_KEYS_TO_CONDUIT={[t.OPENSEA_CONDUIT_KEY]:t.OPENSEA_CONDUIT_ADDRESS,[t.NO_CONDUIT]:t.CROSS_CHAIN_SEAPORT_V1_5_ADDRESS},t.getConduitByKey=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.NO_CONDUIT,n=arguments.length>1?arguments[1]:void 0;if(e===t.OPENSEA_CONDUIT_KEY)return t.OPENSEA_CONDUIT_ADDRESS;if(e===t.NO_CONDUIT)return n;throw new Error("Unexpected conduit key: ".concat(e))}},2711:function(e,t){},2713:function(e,t){},272:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMaximumSizeForOrder=t.getSummedTokenAndIdentifierAmounts=t.getPresentItemAmount=t.isCriteriaItem=t.isErc1155Item=t.isErc721Item=t.isErc20Item=t.isNativeCurrencyItem=t.isCurrencyItem=void 0;const r=n(101),i=n(101),a=n(1101),o=n(560),s=n(271);t.isCurrencyItem=e=>{let{itemType:t}=e;return[s.ItemType.NATIVE,s.ItemType.ERC20].includes(t)};t.isNativeCurrencyItem=e=>{let{itemType:t}=e;return t===s.ItemType.NATIVE};t.isErc20Item=e=>e===s.ItemType.ERC20;t.isErc721Item=e=>[s.ItemType.ERC721,s.ItemType.ERC721_WITH_CRITERIA].includes(e);t.isErc1155Item=e=>[s.ItemType.ERC1155,s.ItemType.ERC1155_WITH_CRITERIA].includes(e);t.isCriteriaItem=e=>[s.ItemType.ERC721_WITH_CRITERIA,s.ItemType.ERC1155_WITH_CRITERIA].includes(e);t.getPresentItemAmount=e=>{let{startAmount:t,endAmount:n,timeBasedItemParams:r}=e;const a=(0,i.toBn)(t),o=(0,i.toBn)(n);if(!r)return a.gt(o)?a:o;const{isConsiderationItem:s,currentBlockTimestamp:d,ascendingAmountTimestampBuffer:c,startTime:u,endTime:l}=r,p=(0,i.toBn)(l).minus(u),y=o.gt(t),m=(0,i.toBn)(y?d+c:d);if(m.lt(u))return a;const f=(m.gt(l)?(0,i.toBn)(l):m).minus(u),h=p.minus(f);return a.multipliedBy(h).plus(o.multipliedBy(f)).plus(s?p.minus(1):0).div(p)};t.getSummedTokenAndIdentifierAmounts=e=>{let{items:n,criterias:a,timeBasedItemParams:s}=e;const d=(0,o.getItemToCriteriaMap)(n,a),c=n.reduce(((e,n)=>{var r,a,o,c;const u=null!==(a=null===(r=d.get(n))||void 0===r?void 0:r.identifier)&&void 0!==a?a:n.identifierOrCriteria;return Object.assign(Object.assign({},e),{[n.token]:Object.assign(Object.assign({},e[n.token]),{[u]:(0,i.toBn)(null!==(c=null===(o=e[n.token])||void 0===o?void 0:o[u])&&void 0!==c?c:(0,i.toBn)(0)).plus((0,t.getPresentItemAmount)({startAmount:n.startAmount,endAmount:n.endAmount,timeBasedItemParams:s}))})})}),{});return Object.keys(c).forEach((e=>{Object.keys(c[e]).forEach((t=>{var n;c[e][t]=null===(n=c[e][t])||void 0===n?void 0:n.integerValue(r.BigNumber.ROUND_CEIL)}))})),c};t.getMaximumSizeForOrder=e=>{let{parameters:{offer:t,consideration:n}}=e;const r=[...t,...n].flatMap((e=>{let{startAmount:t,endAmount:n}=e;return[t,n]}));return(0,a.findGcd)(r)}},2725:function(e,t){},274:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getTokenAmount=t.getAssociatedTokenAccountForMint=t.getAccountInfo=t.getPriceWithMantissa=t.getMasterEdition=t.getMetadata=t.createAssociatedTokenAccountInstruction=t.getTokenWallet=void 0;const r=n(11),i=n(18),a=n(114),o=r.__importDefault(n(39)),s=n(482);t.getTokenWallet=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){return(yield i.PublicKey.findProgramAddress([e.toBuffer(),a.TOKEN_PROGRAM_ID.toBuffer(),t.toBuffer()],s.SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID))[0]}))},t.createAssociatedTokenAccountInstruction=function(t,n,r,o){const d=[{pubkey:n,isSigner:!0,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:o,isSigner:!1,isWritable:!1},{pubkey:i.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:a.TOKEN_PROGRAM_ID,isSigner:!1,isWritable:!1},{pubkey:i.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];return new i.TransactionInstruction({keys:d,programId:s.SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID,data:e.from([])})},t.getMetadata=function(t){return r.__awaiter(this,void 0,void 0,(function*(){return(yield i.PublicKey.findProgramAddress([e.from("metadata"),s.TOKEN_METADATA_PROGRAM_ID.toBuffer(),t.toBuffer()],s.TOKEN_METADATA_PROGRAM_ID))[0]}))},t.getMasterEdition=function(t){return r.__awaiter(this,void 0,void 0,(function*(){return(yield i.PublicKey.findProgramAddress([e.from("metadata"),s.TOKEN_METADATA_PROGRAM_ID.toBuffer(),t.toBuffer(),e.from("edition")],s.TOKEN_METADATA_PROGRAM_ID))[0]}))},t.getPriceWithMantissa=function(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){const r=new a.Token(e,n,a.TOKEN_PROGRAM_ID,i),s=yield r.getMintInfo(),d=Math.pow(10,s.decimals),c=t.multipliedBy(d).integerValue(o.default.ROUND_CEIL);if(c.gt(Math.pow(2,64)))throw new Error("Total price with mantissa for lot ".concat(c.toString()," ")+"is lager than maximum allowed value ".concat(Math.pow(2,64),". Try to split lot, or reduce item price."));return c}))},t.getAccountInfo=function(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){const r=new a.Token(e,t,a.TOKEN_PROGRAM_ID,n);return yield r.getAccountInfo(i)}))},t.getAssociatedTokenAccountForMint=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){return yield i.PublicKey.findProgramAddress([t.toBuffer(),a.TOKEN_PROGRAM_ID.toBuffer(),e.toBuffer()],s.SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID)}))},t.getTokenAmount=function(e,t,n,a){let d=arguments.length>4&&void 0!==arguments[4]&&arguments[4];var c;return r.__awaiter(this,void 0,void 0,(function*(){let t=new o.default(0);if(a.equals(s.WRAPPED_SOL_MINT))t=new o.default(yield e.getBalance(n,"confirmed")),t=d?t:t.dividedBy(i.LAMPORTS_PER_SOL);else try{const r=yield e.getTokenAccountBalance(n,"confirmed");(null===(c=null===r||void 0===r?void 0:r.value)||void 0===c?void 0:c.uiAmount)&&(t=d?new o.default(r.value.uiAmount).multipliedBy(Math.pow(10,r.value.decimals)):new o.default(r.value.uiAmount))}catch(r){console.error(r),console.info("Account ",n.toBase58(),"didnt return value. Assuming 0 tokens.")}return t}))}}).call(this,n(7).Buffer)},2751:function(e,t){},2770:function(e,t){},2772:function(e,t){},2872:function(e,t){},2880:function(e,t){},2885:function(e,t){},2916:function(e,t){},295:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChainIdByNetwork=t.getBlockchainBySDKNetwork=t.getBlockchainFromChainId=t.getNetworkFromChainId=t.ETHER_IN_WEI=void 0;const r=n(101),i=n(29),a=n(553);function o(e){const t=Object.keys(a.configDictionary).find((t=>a.configDictionary[t].chainId===e));if(!t)throw new Error("Config for chainID=".concat(e," has not been found"));return t}function s(e){switch(e){case"testnet":case"dev-ethereum":case"mainnet":return i.Blockchain.ETHEREUM;case"dev-polygon":case"mumbai":case"polygon":return i.Blockchain.POLYGON;case"mantle":case"testnet-mantle":return i.Blockchain.MANTLE;case"arbitrum":case"testnet-arbitrum":return i.Blockchain.ARBITRUM;case"zksync":case"testnet-zksync":return i.Blockchain.ZKSYNC;case"chiliz":case"testnet-chiliz":return i.Blockchain.CHILIZ;case"lightlink":case"testnet-lightlink":return i.Blockchain.LIGHTLINK;case"rari":case"testnet-rari":return i.Blockchain.RARI;case"zkatana":return i.Blockchain.ASTARZKEVM;case"base":case"base-sepolia":return i.Blockchain.BASE;default:throw new Error("Unrecognized ethereum network ".concat(e))}}t.ETHER_IN_WEI=(0,r.toBn)(10).pow(18),t.getNetworkFromChainId=o,t.getBlockchainFromChainId=function(e){return s(o(e))},t.getBlockchainBySDKNetwork=s,t.getChainIdByNetwork=function(e){const t=(0,a.getEthereumConfig)(e);if(!t)throw new Error("Config for network=".concat(e," has not been found"));return t.chainId}},2973:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitUntil=void 0,t.waitUntil=function(e,t,n){const r=Date.now();function i(a,o){e()?a():Date.now()-r>n?o():setTimeout((()=>i(a,o)),t)}return new Promise(((e,t)=>{i(e,t)}))}},2974:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2975:function(e,t){},2978:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2979:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapEthereumWallet=void 0;const r=n(11),i=n(64),a=n(716),o=r.__importDefault(n(751)),s=n(295);t.mapEthereumWallet=function(e){return e.map((e=>{const t=(n=e.chainId,(0,s.getBlockchainFromChainId)(n));var n;let r=new o.default(e.provider);return{wallet:new i.EthereumWallet(new a.Web3Ethereum({web3:r,from:e.address})),address:e.address,blockchain:t}}))}},2980:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapFlowWallet=void 0;const r=n(64),i=n(29);t.mapFlowWallet=function(e){return e.map((e=>({wallet:new r.FlowWallet(e.fcl,"auth"in e?e.auth:void 0),address:e.address,blockchain:i.Blockchain.FLOW})))}},2981:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTezosWallet=void 0;const r=n(11),i=n(64),a=n(29);t.mapTezosWallet=function(e){return e.map((e=>r.__awaiter(this,void 0,void 0,(function*(){const{beacon_provider:t}=yield Promise.resolve().then((()=>r.__importStar(n(2982)))),o=yield t(e.wallet,e.toolkit);return{wallet:new i.TezosWallet(o),address:e.address,blockchain:a.Blockchain.TEZOS}}))))}},2983:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapSolanaWallet=void 0;const r=n(64),i=n(29);t.mapSolanaWallet=function(e){return e.map((e=>({wallet:new r.SolanaWallet({publicKey:e.publicKey,signTransaction:e.signTransaction,signAllTransactions:e.signAllTransactions,signMessage:e.signMessage}),address:e.address,blockchain:i.Blockchain.SOLANA})))}},2984:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2985:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapImmutableXWallet=void 0;const r=n(29),i=n(64);t.mapImmutableXWallet=function(e){return e.map((e=>({wallet:new i.ImmutableXWallet(e.wallet),address:e.address,blockchain:r.Blockchain.IMMUTABLEX})))}},3e3:function(e,t){},3295:function(e,t,n){"use strict";function r(e,t){if(typeof e!==typeof t)return!1;if("object"!==typeof e||null===e||null===t)return e===t;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const a of n)if(!i.includes(a)||!r(e[a],t[a]))return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.subsetMatch=void 0,t.subsetMatch=function(e,t){for(const n in t)if(!(n in e)||!r(e[n],t[n])){const r=JSON.stringify({key:n,expected:t[n],actual:e[n]});throw new Error("Subset match failed: ".concat(r))}return!0}},3296:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitFor=void 0;const r=n(11),i=n(1220);t.waitFor=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return r.__awaiter(this,void 0,void 0,(function*(){return(0,i.retry)(10,n,(()=>r.__awaiter(this,void 0,void 0,(function*(){const n=yield e();if(t&&!t(n))throw new Error("Predicate is not matched");return n}))))}))}},3297:function(e,t,n){"use strict";n.r(t);var r=n(4),i=n.n(r),a=n(396),o=n.n(a),s=n(131),d=n(3433),c=n(3449),u=n(3451),l=n(3458),p=n(97),y=n(3450),m=n(774),f=n(0);function h(e){let{header:t,children:n}=e;return Object(f.jsxs)("div",{children:[t&&Object(f.jsx)(m.a,{variant:"h4",component:"h1",gutterBottom:!0,children:t}),n]})}function b(e){let{wrap:t,children:n}=e;return Object(f.jsx)("code",{style:{display:"inline-block",background:"#eee",borderRadius:3,padding:"0 4px",color:"#df3d3d",wordBreak:t?"break-word":"normal",userSelect:"all"},children:n})}function T(){return Object(f.jsxs)(h,{header:"About this example",children:["With this example, you can:",Object(f.jsxs)("ul",{children:[Object(f.jsx)("li",{children:"Connect wallets"}),Object(f.jsx)("li",{children:"Deploy collections"}),Object(f.jsx)("li",{children:"Mint NFTs"}),Object(f.jsx)("li",{children:"Sell NFTs"}),Object(f.jsx)("li",{children:"Buy NFTs"}),Object(f.jsx)("li",{children:"Make and accept Bid"}),Object(f.jsx)("li",{children:"Transfer & Burn NFT"})]}),"This example uses:",Object(f.jsxs)("ul",{children:[Object(f.jsxs)("li",{children:[Object(f.jsx)(b,{children:"@rarible/sdk"})," \u2014 ",Object(f.jsx)(y.a,{href:"https://github.com/rarible/sdk",target:"_blank",children:"Rarible Protocol SDK"})]}),Object(f.jsxs)("li",{children:[Object(f.jsx)(b,{children:"@rarible/connector"})," \u2014 ",Object(f.jsx)(y.a,{href:"https://github.com/rarible/sdk/tree/master/packages/connector",target:"_blank",children:"Rarible SDK Wallet Connector"})]}),Object(f.jsxs)("li",{children:[Object(f.jsx)(b,{children:"@rixio/react"})," \u2014 ",Object(f.jsx)(y.a,{href:"https://github.com/roborox/rixio",target:"_blank",children:"Rixio"})]})]}),"See more information about SDK usage in ",Object(f.jsx)(y.a,{href:"https://docs.rarible.org/",target:"_blank",children:"Protocol documentation"}),"."]})}var v=n(3444);function g(e){const{comment:t,children:n,...r}=e;return Object(f.jsxs)(v.a,{container:!0,rowSpacing:1,spacing:1,columns:{xs:1,lg:2},...r,children:[Object(f.jsx)(v.a,{item:!0,xs:1,children:n}),Object(f.jsx)(v.a,{item:!0,xs:1,children:t&&Object(f.jsx)(u.a,{sx:e=>({p:1,[e.breakpoints.up("lg")]:{borderLeft:"5px solid #eee",height:"100%"},[e.breakpoints.down("lg")]:{borderTop:"5px solid #eee",borderBottom:"5px solid #eee"}}),children:t})})]})}var E=n(150),_=n(1350),O=n(3436),A=n(3423),w=n(3435),k=n(3445),C=n(3446),S=n(137),I=n(72),R=n(1462);function x(e){return Object(f.jsx)(R.a,{style:{fontSize:14},fixedWidth:!0,...e})}const P=new class{constructor(e){this.environments=e,this.environmentPersistKey="saved_environment",this.defaultEnvironment="testnet",this.allowedEnvironments=Object.keys(this.environments),this.getConfig=e=>this.environments[e],this.isEnvironment=e=>this.allowedEnvironments.includes(e),this.getLabel=e=>this.getConfig(e).label,this.getSavedEnvironment=()=>{const e=localStorage.getItem(this.environmentPersistKey);if(e&&this.isEnvironment(e))return e},this.updateSavedEnvironment=e=>{localStorage.setItem(this.environmentPersistKey,e)},this.getDefaultEnvironment=()=>this.getSavedEnvironment()||this.defaultEnvironment}}({prod:{label:"Production",value:"prod"},development:{label:"Development",value:"development"},testnet:{label:"Testnet",value:"testnet"}}),B=i.a.createContext(void 0);function j(e){let{children:t}=e;const[n,i]=Object(r.useState)((()=>P.getDefaultEnvironment()));Object(r.useEffect)((()=>P.updateSavedEnvironment(n)),[n]);const a=Object(r.useMemo)((()=>P.getConfig(n)),[n]);return Object(f.jsx)(B.Provider,{value:{environment:n,envConfig:a,setEnvironment:i},children:t})}function F(){const e=Object(r.useContext)(B);if(!e)throw new Error("No environment context found");return e}var M=n(734),D=n(20),N=n(29),L=n(382),V=n(123),U=n(113),W=n(1399),H=n(1416),K=n(1417),z=n(1422),Z=n(1428),G=n(1438),q=n(1439),Y=n(1440),X=n(1441),J=n(1442),Q=n(219),$=n(1444),ee=n(1445),te=n(1446);const ne={1:"https://rarible.com/nodes/ethereum-node",5:"https://testnet.rarible.com/nodes/goerli-ethereum-node"},re={1:"mainnet",5:"goerli"},ie={prod:1,testnet:5,development:5};const ae={prod:"prod",testnet:"testnet",development:"testnet"},oe="saved_provider",se={getValue:async()=>localStorage.getItem(oe)||void 0,setValue:async e=>e?localStorage.setItem(oe,e):localStorage.removeItem(oe)};function de(e){const t=ie[e],n=function(e){return"prod"===e?{network:"mainnet",accessNode:"https://access.onflow.org",walletDiscovery:"https://flow-wallet.blocto.app/authn"}:{network:"testnet",accessNode:"https://access-testnet.onflow.org",walletDiscovery:"https://flow-wallet-testnet.blocto.app/authn"}}(e),r=function(e){return"prod"===e?{accessNode:"https://rpc.tzkt.io/mainnet",network:U.NetworkType.MAINNET}:{accessNode:"https://rpc.tzkt.io/ghostnet",network:U.NetworkType.CUSTOM}}(e),i=Object(Q.mapEthereumWallet)(new S.InjectedWeb3ConnectionProvider({prefer:[S.DappType.Metamask]})),a=Object(Q.mapEthereumWallet)(new H.NFIDConnectionProvider({origin:Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TESTNETS_API_KEY:"2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5",REACT_APP_PROD_API_KEY:"666ad781-aa60-4000-9e3e-cf5ae2d41bd3",REACT_APP_WALLET_CONNECT_V2_PROJECT_ID:"27c21e9982ee7b6e3f22764ab806719b"}).REACT_APP_NFID_ORIGIN||"https://nfid.one"})),o=Object(Q.mapTezosWallet)(new K.BeaconConnectionProvider({appName:"Rarible Test",accessNode:r.accessNode,network:r.network})),s=Object(Q.mapFlowWallet)(new W.FclConnectionProvider({accessNode:n.accessNode,walletDiscovery:n.walletDiscovery,network:n.network,applicationTitle:"Rari Test",applicationIcon:"https://rarible.com/favicon.png?2d8af2455958e7f0c812"})),d=Object(Q.mapFlowWallet)(new ee.MattelConnectionProvider({magicProviderId:"JeTIUJ7GJNnfwnxMwtPRa7JzbzRVxA4p3TdQsXryggM=",magicAPIKey:"pk_live_63A5A557D1D4882D",auth0Domain:"login-test.mattel.com",auth0ClientId:"nXpDI0BnWhxB5DIhQVGOrB2LwgOvKIhd",auth0RedirectUrl:"https://test-virtual.mattel.com",accessNode:n.accessNode,network:n.network,options:{auth0LogoutOptions:{logoutParams:{returnTo:"https://test-virtual.mattel.com"}}}})),c=Object(Q.mapEthereumWallet)(new z.TorusConnectionProvider({network:{host:re[t]}})),u=Object(Q.mapEthereumWallet)(new Z.FirebaseConnectionProvider("BBD0kzmxWBstkgHeJsQqwiF7RbVgmA7ReBRIyw2GRJoCHJTuCAXHD8pwX3PtotSwwh0EMoBZVgVjRss6jKq8Kg8",{chainNamespace:"eip155",chainId:"0x13881",rpcTarget:"https://rpc.ankr.com/polygon_mumbai",displayName:"Polygon Mumbai Testnet",blockExplorer:"https://mumbai.polygonscan.com/",ticker:"MATIC",tickerName:"Matic"},{apiKey:"AIzaSyD7h1O-nf40cRyLpP9F_Wl1Z_zuZYyZh5Y",authDomain:"dogami-auth.firebaseapp.com",projectId:"dogami-auth",storageBucket:"dogami-auth.appspot.com",messagingSenderId:"741349520212",appId:"1:741349520212:web:8acb236f44ddd005adcec1"},"testnet","http://localhost:3000","firebase-dog-dev")),l=Object(Q.mapEthereumWallet)(new G.FirebaseAppleConnectionProvider("BBD0kzmxWBstkgHeJsQqwiF7RbVgmA7ReBRIyw2GRJoCHJTuCAXHD8pwX3PtotSwwh0EMoBZVgVjRss6jKq8Kg8",{chainNamespace:"eip155",chainId:"0x13881",rpcTarget:"https://rpc.ankr.com/polygon_mumbai",displayName:"Polygon Mumbai Testnet",blockExplorer:"https://mumbai.polygonscan.com/",ticker:"MATIC",tickerName:"Matic"},{apiKey:"AIzaSyD7h1O-nf40cRyLpP9F_Wl1Z_zuZYyZh5Y",authDomain:"dogami-auth.firebaseapp.com",projectId:"dogami-auth",storageBucket:"dogami-auth.appspot.com",messagingSenderId:"741349520212",appId:"1:741349520212:web:8acb236f44ddd005adcec1"},"testnet","http://localhost:3000","firebase-dog-dev")),p=Object(Q.mapEthereumWallet)(new q.FirebaseEmailConnectionProvider("BBD0kzmxWBstkgHeJsQqwiF7RbVgmA7ReBRIyw2GRJoCHJTuCAXHD8pwX3PtotSwwh0EMoBZVgVjRss6jKq8Kg8",{chainNamespace:"eip155",chainId:"0x13881",rpcTarget:"https://rpc.ankr.com/polygon_mumbai",displayName:"Polygon Mumbai Testnet",blockExplorer:"https://mumbai.polygonscan.com/",ticker:"MATIC",tickerName:"Matic"},{apiKey:"AIzaSyD7h1O-nf40cRyLpP9F_Wl1Z_zuZYyZh5Y",authDomain:"dogami-auth.firebaseapp.com",projectId:"dogami-auth",storageBucket:"dogami-auth.appspot.com",messagingSenderId:"741349520212",appId:"1:741349520212:web:8acb236f44ddd005adcec1"},"testnet","http://localhost:3000","firebase-dog-dev")),y=Object(Q.mapEthereumWallet)(new Y.WalletLinkConnectionProvider({networkId:t,estimationUrl:ne[t],url:ne[t]},{appName:"Rarible",appLogoUrl:"https://rarible.com/static/logo-500.static.png",darkMode:!1})),m=Object(Q.mapEthereumWallet)(new te.WalletConnectConnectionProviderV2({projectId:"4f9fb88799dfa8d3654bdd130be840f2",chains:[t],optionalChains:Object.keys(ne).map((e=>+e)).filter((e=>e!==t)),showQrModal:!0,methods:["eth_sendTransaction","personal_sign","eth_signTypedData"],optionalMethods:["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],events:["chainChanged","accountsChanged"],optionalEvents:["message","disconnect","connect"],rpcMap:ne})),f=Object(Q.mapSolanaWallet)(new X.PhantomConnectionProvider),h=Object(Q.mapSolanaWallet)(new J.SolflareConnectionProvider({network:"prod"===e?"mainnet-beta":"devnet"})),b=Object(Q.mapImmutableXWallet)(new $.ImmutableXLinkConnectionProvider({env:ae[e]}));return S.Connector.create(i,se).add(a).add(y).add(o).add(s).add(m).add(f).add(h).add(b).add(d).add(l).add(c).add(u).add(p)}const ce=i.a.createContext(void 0);function ue(e){let{children:t}=e;const{environment:n}=F(),[i,a]=Object(r.useState)((()=>Object(S.getStateDisconnected)())),o=Object(r.useMemo)((()=>de(n)),[n]),s=Object(r.useMemo)((()=>function(e){return e&&"connected"===e.status?e.connection:void 0}(i)),[i]);Object(r.useEffect)((()=>{const e=o.connection.subscribe((e=>a(e)));return()=>e.unsubscribe()}),[o]);const d=Object(r.useMemo)((()=>Object(M.createRaribleSdk)(null===s||void 0===s?void 0:s.wallet,n,function(e){return{logs:L.LogsLevel.ERROR,apiKey:ye(e),blockchain:{[M.WalletType.ETHEREUM]:{marketplaceMarker:"0x12345678900000000000000000000000000123456789face"}}}}(n))),[s,n]),c=Object(r.useMemo)((()=>{if(s)return function(e,t){if(Object(V.isEVMBlockchain)(t)||t===N.Blockchain.IMMUTABLEX)return Object(D.toUnionAddress)("ETHEREUM:"+e);return Object(D.toUnionAddress)(t+":"+e)}(s.address,s.blockchain)}),[s]);return Object(f.jsx)(ce.Provider,{value:{connector:o,state:i,sdk:d,walletAddress:c},children:t})}function le(){const e=Object(r.useContext)(ce);if(!e)throw new Error("No sdk context provider is rendered");return e}const pe={prod:"666ad781-aa60-4000-9e3e-cf5ae2d41bd3",development:"2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5",testnet:"2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5"};function ye(e){const t=pe[e];if(!t)throw new Error("No api key is provided for ".concat(e," environment"));return t}function me(){const{environment:e,setEnvironment:t}=F(),{connector:n,state:i}=le(),a=Object(r.useMemo)((()=>n?Object(E.a)(n.getOptions()):Object(E.a)([])),[n]),o=Object(r.useCallback)((e=>{P.isEnvironment(e.target.value)&&t(e.target.value)}),[t]),s={justifyContent:"start",pl:"3rem","& .MuiButton-startIcon":{position:"absolute",left:"1.25rem"}};return Object(f.jsx)(u.a,{sx:{maxWidth:300},children:Object(f.jsx)(_.Rx,{value$:a,children:t=>Object(f.jsxs)(A.a,{spacing:1,children:[Object(f.jsx)(w.a,{select:!0,size:"small",label:"Environment",disabled:"connected"===(null===i||void 0===i?void 0:i.status),value:e,onChange:o,children:Object.values(P.environments).map((e=>Object(f.jsx)(k.a,{value:e.value,children:e.label},e.value)))}),t.map((e=>{const t=function(e){switch(e){case"walletlink":return{label:"Coinbase"};case"fcl":return{label:"Blocto"};default:return{label:e}}}(e.option);return Object(f.jsx)(O.a,{onClick:()=>{if("mattel"===e.provider.getId()&&"connected"!==(null===i||void 0===i?void 0:i.status)&&((t=e.provider)&&t instanceof S.MappedConnectionProvider||"source"in t&&"mapper"in t)){e.provider.getProvider().setPopupConfig({popup:fe("")})}var t;n.connect(e)},loading:"connecting"===i.status&&i.providerId===e.provider.getId(),loadingPosition:"start",startIcon:Object(f.jsx)(x,{icon:I.d}),sx:s,variant:"outlined",disabled:"connected"===(null===i||void 0===i?void 0:i.status),fullWidth:!0,children:t.label},e.option)})),Object(f.jsx)(C.a,{onClick:i.disconnect,startIcon:Object(f.jsx)(x,{icon:I.j}),color:"error",sx:s,variant:"outlined",disabled:"connected"!==(null===i||void 0===i?void 0:i.status),fullWidth:!0,children:"Disconnect"})]})})})}function fe(e){const t=window.screenX+(window.innerWidth-400)/2,n=window.screenY+(window.innerHeight-600)/2;return window.open(e,"auth0:authorize:popup","left=".concat(t,",top=").concat(n,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))}var he=n(3440),be=n(3429),Te=n(3430);function ve(e){var t;let{children:n,theme:r,language:i,wrap:a}=e;return Object(f.jsx)(he.a,{language:null!==i&&void 0!==i?i:"typescript",style:"light"===r?be.a:Te.a,wrapLongLines:!0,wrapLines:a,lineProps:a?{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}}:void 0,children:null!==(t=null===n||void 0===n?void 0:n.trim())&&void 0!==t?t:""})}function ge(){return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)(m.a,{gutterBottom:!0,children:["To simplify connection to various wallets, we moved this logic to a separate package ",Object(f.jsx)(b,{children:"@rarible/connector"}),"."]}),Object(f.jsx)(ve,{children:'\nimport { Connector, InjectedWeb3ConnectionProvider } from "@rarible/connector"\n\n// 1. Configure providers\t\t\t\nconst injected = new InjectedWeb3ConnectionProvider({\n // optional, order of dapps preferred to connect \n prefer: [DappType.Metamask, DappType.Coinbase],\n})\n\t\t\t\n// 2. Create connector\t\t\t\nconst connector = Connector\n .create(injected)\n \n// 3. Connector ready to use\nconnector.connection.subscribe((con) => { \n if (con.status === "connected") {\n // use connection to create sdk here\n }\n})\n\n// get list of available options\nconst options = await connector.getOptions()\n// connect to first one\nawait connector.connect(options[0]) \n\t\t'}),Object(f.jsxs)(m.a,{gutterBottom:!0,children:["Check out more ",Object(f.jsx)(y.a,{href:"https://github.com/rarible/sdk/tree/master/packages/connector",target:"_blank",children:"documentation in package repository"}),"."]})]})}var Ee=n(262),_e=n(3437),Oe=n(3456);const Ae=(e,t)=>e&&t&&t-5i.a.forwardRef((function(e,t){return Object(f.jsx)(s.b,{to:r,ref:t,...e,role:void 0})}))),[r]);return Object(f.jsx)("li",{children:Object(f.jsxs)(Ve.a,{button:!0,component:o,selected:a.pathname===r||e.default&&(""===a.pathname||"/"===a.pathname),children:[t?Object(f.jsx)(Ue.a,{children:t}):null,Object(f.jsx)(We.a,{primary:n})]})})}function Ke(){return Object(f.jsx)(Le.a,{children:[{label:"About",path:"/about",default:!0},{label:"Connect",path:"/connect"},{label:"Balance",path:"/balance"},{label:"Deploy Collection",path:"/deploy"},{label:"Upload metadata",path:"/upload-meta"},{label:"Mint Token",path:"/mint"},{label:"Sell",path:"/sell"},{label:"Sell update",path:"/sell-update"},{label:"Buy",path:"/buy"},{label:"Batch Buy",path:"/batch-buy"},{label:"Bid",path:"/bid"},{label:"Accept Bid",path:"/accept-bid"},{label:"Cancel Order",path:"/cancel"},{label:"Transfer Token",path:"/transfer"},{label:"Burn Token",path:"/burn"},{label:"Sign Message",path:"/sign"},{label:"My Items",path:"/items"},{label:"Utils",path:"/utils"}].map((e=>Object(f.jsx)(He,{to:e.path,primary:e.label,default:e.default},e.path)))})}var ze=n(63),Ze=n(64);function Ge(e){let{form:t,icon:n,label:r,state:i,disabled:a}=e;const{formState:{errors:o,isSubmitting:s,isValidating:d}}=t;let c,u;if(0===Object(Ee.size)(o))switch(i){case"error":c="error",u=Object(f.jsx)(x,{icon:I.g});break;case"success":c="success",u=Object(f.jsx)(x,{icon:I.c});break;default:c="primary",u=Object(f.jsx)(x,{icon:null!==n&&void 0!==n?n:I.b})}else c="warning",u=Object(f.jsx)(x,{icon:I.g});return Object(f.jsx)(O.a,{type:"submit",loading:s||d,loadingPosition:"start",startIcon:u,color:c,variant:"contained",disabled:a,children:r})}function qe(e,t){const{formState:{errors:n}}=e,r=n[t],i=!!r;let a="";var o;if(i&&(a=null!==(o=r.message)&&void 0!==o?o:"",!a))if("required"===r.type)a="This field is required";else a="";return{message:a,hasError:i}}function Ye(e){let{form:t,options:n,name:r,children:i,helperText:a,disabled:o,...s}=e;const{register:d}=t,{hasError:c,message:u}=qe(t,r);return Object(f.jsx)(w.a,{size:"small",error:c,helperText:null!==u&&void 0!==u?u:a,select:!0,fullWidth:!0,...d(r,{required:!0,disabled:o,...n}),...s,children:i})}function Xe(){const[e,t]=Object(r.useState)(!1),[n,i]=Object(r.useState)({type:"empty"});return{result:n,isFetching:e,startFetching:()=>{t(!0)},stopFetching:()=>{t(!1)},setComplete:e=>{t(!1),i({type:"complete",data:e})},setError:e=>{let n;console.error(e),t(!1),n=e?Object(Ee.isString)(e)?e:e.message?e.message:JSON.stringify(e):"Unknown error",i({type:"error",error:n})}}}function Je(e){switch(e){case"complete":return"success";case"error":return"error";default:return"normal"}}function Qe(e){let{result:t,completeRender:n}=e;switch(t.type){case"empty":default:return null;case"error":return Object(f.jsxs)(_e.a,{severity:"error",icon:Object(f.jsx)(x,{icon:I.f}),children:[Object(f.jsx)(Oe.a,{children:"Request rejected"}),t.error]});case"complete":return Object(f.jsx)(u.a,{children:Object(f.jsxs)(_e.a,{variant:"outlined",severity:"success",icon:Object(f.jsx)(x,{icon:I.b}),children:[Object(f.jsx)(Oe.a,{children:"Request completed"}),null===n||void 0===n?void 0:n(t.data)]})})}}function $e(e){let{value:t}=e;const[n,i]=Object(r.useState)(null),a=Object(r.useCallback)((async()=>{try{await navigator.clipboard.writeText(t),i(!0)}catch{i(!1)}}),[t]);let o,s;return o=!0===n?"success":!1===n?"warning":"default",s=!0===n?I.b:!1===n?I.k:I.e,Object(f.jsx)(xe.a,{title:"Copy To Clipboard",placement:"top",children:Object(f.jsx)(Be.a,{color:o,onClick:a,children:Object(f.jsx)(x,{icon:s})})})}var et=n(3460);function tt(e){let t;try{t=JSON.stringify({blockchain:e.blockchain,hash:e.hash(),link:e.getTxLink()},null," ")}catch(n){console.log("Couldn't get transaction info from transaction object",n),t="string"===typeof n.message?n.message:"Unknown error"}return Object(f.jsx)(ve,{theme:"light",language:"json",wrap:!0,children:t})}function nt(e){if(!e)return null;let t;try{t=JSON.stringify(e,null," ")}catch(n){console.log("Couldn't get transaction result from transaction object",n),t="string"===typeof n.message?n.message:"Unknown error"}return Object(f.jsx)(ve,{theme:"light",language:"json",wrap:!0,children:t})}function rt(e){let{transaction:t}=e;const[n,i]=Object(r.useState)("pending"),[a,o]=Object(r.useState)(void 0);return Object(r.useEffect)((()=>{t.wait().then((e=>{i("resolve"),o(e.result)})).catch((()=>i("reject")))}),[t]),Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(m.a,{variant:"overline",children:"Transaction:"}),Object(f.jsx)(u.a,{sx:{my:1},children:Object(f.jsxs)(f.Fragment,{children:["pending"===n&&Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(et.a,{size:14})," Processing"]}),"resolve"===n&&Object(f.jsx)(Pe.a,{label:"Confirmed",icon:Object(f.jsx)(x,{icon:I.c}),variant:"outlined",color:"success",size:"small"}),"reject"===n&&Object(f.jsx)(Pe.a,{label:"Rejected",icon:Object(f.jsx)(x,{icon:I.k}),variant:"outlined",color:"error",size:"small"})]})}),!t.isEmpty&&tt(t),a&&Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(m.a,{variant:"overline",children:"Transaction Result Data:"}),nt(a)]})]})}function it(e){let{blockchain:t,message:n}=e;return Object(f.jsxs)(_e.a,{severity:"warning",children:[Object(f.jsx)(Oe.a,{children:t?Object(f.jsxs)(f.Fragment,{children:["Unsupported blockchain: ",t]}):Object(f.jsx)(f.Fragment,{children:"Wallet is not connected"})}),null!==n&&void 0!==n?n:"Page functionality is limited"]})}function at(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)(m.a,{gutterBottom:!0,children:["Collection Address can be used in ",Object(f.jsx)(b,{children:"sdk.nft.mint()"})," method"]})})}function ot(){return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)(m.a,{gutterBottom:!0,children:["You can deploy new collection with ",Object(f.jsx)(b,{children:"sdk.nft.deploy.action()"})," method"]}),Object(f.jsx)(ve,{children:'\nsdk.nft.deploy.action({\n blockchain: Blockchain.ETHEREUM,\n asset: {\n assetType: "ERC721",\n arguments: {\n name: "My Collection",\n symbol: "MYCOL",\n baseURI: "https://example.com",\n contractURI: "https://example.com",\n isUserToken: false\n }\n }\n})\n\t\t'})]})}function st(e){let{form:t,options:n,name:r,label:i,helperText:a,disabled:o,...s}=e;const{register:d}=t,{hasError:c,message:u}=qe(t,r);return Object(f.jsx)(w.a,{label:i,size:"small",error:c,helperText:null!==u&&void 0!==u?u:a,fullWidth:!0,...s,...d(r,{required:!0,disabled:o,...n})})}var dt=n(3461),ct=n(3438);function ut(e){let{form:t,name:n,options:r,...i}=e;const{register:a}=t;return Object(f.jsx)(dt.a,{control:Object(f.jsx)(ct.a,{...a(n,{...r})}),...i})}function lt(e){let{form:t}=e;return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsxs)(Ye,{form:t,defaultValue:"ERC721",name:"contract",label:"Contract Type",children:[Object(f.jsx)(k.a,{value:"ERC721",children:"ERC721"}),Object(f.jsx)(k.a,{value:"ERC1155",children:"ERC1155"})]}),Object(f.jsx)(st,{form:t,name:"name",label:"Name"}),Object(f.jsx)(st,{form:t,name:"symbol",label:"Symbol"}),Object(f.jsx)(st,{form:t,name:"baseURI",label:"Base URI"}),Object(f.jsx)(st,{form:t,name:"contractURI",label:"Contract URI"}),Object(f.jsx)(ut,{form:t,name:"private",label:"Private Collection"})]})})}function pt(e){let{form:t}=e;return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsxs)(Ye,{form:t,defaultValue:"NFT",name:"collection",label:"Collection Type",children:[Object(f.jsx)(k.a,{value:"NFT",children:"NFT"}),Object(f.jsx)(k.a,{value:"MT",children:"MT"})]}),Object(f.jsx)(st,{form:t,name:"name",label:"Name"}),Object(f.jsx)(st,{form:t,name:"description",label:"Description"}),Object(f.jsx)(st,{form:t,name:"version",label:"version"}),Object(f.jsx)(st,{form:t,name:"license",label:"license"}),Object(f.jsx)(st,{form:t,name:"homepage",label:"Homepage URI"}),Object(f.jsx)(ut,{form:t,name:"private",label:"Private Collection"})]})})}function yt(e){let{form:t}=e;return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(A.a,{spacing:2,children:Object(f.jsx)(st,{form:t,name:"metadataURI",label:"Metadata URI"})})})}function mt(e){var t,n;let{form:r}=e;const i=le();switch(null!==(t=Object(ze.b)({control:r.control,name:"blockchain"}))&&void 0!==t?t:null===(n=i.sdk.wallet)||void 0===n?void 0:n.walletType){case Ze.WalletType.ETHEREUM:return Object(f.jsx)(lt,{form:r});case Ze.WalletType.TEZOS:return Object(f.jsx)(pt,{form:r});case Ze.WalletType.SOLANA:return Object(f.jsx)(yt,{form:r});default:return Object(f.jsx)(u.a,{sx:{my:2},children:"Deploy not available for selected blockchain"})}}function ft(e){if(Object(V.isEVMBlockchain)(e.blockchain))return{blockchain:e.blockchain,type:e.contract,name:e.name,symbol:e.symbol,baseURI:e.baseURI,contractURI:e.contractURI,isPublic:!!e.private,operators:[]};switch(e.blockchain){case N.Blockchain.TEZOS:return{blockchain:e.blockchain,type:e.collection,name:e.name,description:e.description,version:e.version,authors:e.authors,license:e.license,homepage:e.homepage,isPublic:!!e.private};case Ze.WalletType.SOLANA:return{blockchain:e.blockchain,metadataURI:e.metadataURI};default:throw new Error("Unsupported blockchain")}}function ht(e){return e===Ze.WalletType.ETHEREUM||e===Ze.WalletType.TEZOS||e===Ze.WalletType.SOLANA}function bt(){var e;const t=le(),n=Object(ze.a)(),{result:r,setComplete:i,setError:a}=Xe(),o=null===(e=t.sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Deploy Collection",children:[!ht(o)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:o})}),Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(ot,{}),children:Object(f.jsx)("form",{onSubmit:n.handleSubmit((async e=>{try{var n;if(e.blockchain===N.Blockchain.ETHEREUM)e.blockchain=null===(n=t.state)||void 0===n?void 0:n.connection.blockchain;console.log("connection",t,ft(e)),i(await t.sdk.nft.createCollection(ft(e)))}catch(r){a(r)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[o&&Object(f.jsxs)(Ye,{form:n,defaultValue:o,name:"blockchain",label:"Blockchain",children:[Object(f.jsx)(k.a,{value:Ze.WalletType.ETHEREUM,children:"EVM Blockchain"}),Object(f.jsx)(k.a,{value:Ze.WalletType.TEZOS,children:Ze.WalletType.TEZOS}),Object(f.jsx)(k.a,{value:N.Blockchain.SOLANA,children:N.Blockchain.SOLANA})]}),Object(f.jsx)(mt,{form:n}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:n,label:"Deploy",state:Je(r.type),disabled:!ht(o)})})]})})}),Object(f.jsx)(g,{sx:{my:2},comment:"complete"===r.type?Object(f.jsx)(at,{}):null,children:Object(f.jsx)(Qe,{result:r,completeRender:e=>Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)(u.a,{sx:{my:2},children:[Object(f.jsx)(m.a,{variant:"overline",children:"Collection Address:"}),Object(f.jsxs)("div",{children:[Object(f.jsx)(b,{children:null===e||void 0===e?void 0:e.address})," ",Object(f.jsx)($e,{value:null===e||void 0===e?void 0:e.address})]})]}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(rt,{transaction:null===e||void 0===e?void 0:e.tx})})]})})})]})}var Tt=n(3443),vt=n(3462),gt=n(3439);function Et(e){let{steps:t,onComplete:n}=e;const[i,a]=Object(r.useReducer)(((e,n)=>{const r=Object(Ee.cloneDeep)(e);switch(n.type){case"next":return r.responses[r.currentStep]=n.response,r.currentStep=Math.min(r.currentStep+1,t.length-1),r;case"prev":return r.currentStep=Math.max(r.currentStep-1,0),r;default:return}}),{currentStep:0,responses:[]});return console.log(i),Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(Tt.a,{activeStep:i.currentStep,children:t.map(((e,n)=>{const r=n===t.length-1&&i.currentStep===t.length-1;return Object(f.jsx)(vt.a,{index:n,sx:{".Mui-completed":{color:r?"green":"primary"}},completed:!!r||void 0,children:Object(f.jsx)(gt.a,{children:e.label})},n)}))}),Object(f.jsx)(u.a,{sx:{mt:4},children:t[i.currentStep].render((e=>{a({type:"next",response:e}),i.currentStep===t.length-1&&(null===n||void 0===n||n(e))}),i.responses[i.currentStep-1])}),i.currentStep>0&&Object(f.jsx)(u.a,{sx:{mt:2},children:Object(f.jsx)(C.a,{startIcon:Object(f.jsx)(x,{icon:I.a}),color:"inherit",variant:"text",onClick:()=>a({type:"prev"}),children:"Back"})})]})}function _t(e){let{disabled:t,onComplete:n,itemId:r}=e;const i=Object(p.f)(),a=le(),o=Object(ze.a)(),{result:s,setError:d}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:o.handleSubmit((async e=>{try{n(await a.sdk.order.sell.prepare({itemId:Object(D.toItemId)(e.itemId)})),i("/sell/".concat(e.itemId),{})}catch(t){d(t)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{form:o,defaultValue:r,name:"itemId",label:"Item ID"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:o,label:"Next",state:Je(s.type),icon:I.d,disabled:t})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:s})})]})}var Ot=n(184),At=n(753);function wt(e){return{"@type":"ETH",blockchain:e}}function kt(e){return{"@type":"ERC20",contract:e}}const Ct={"@type":"XTZ"},St={"@type":"SOLANA_SOL"},It={"@type":"FLOW_FT",contract:Object(D.toContractAddress)("FLOW:A.7e60df042a9c0868.FlowToken")},Rt={"@type":"FLOW_FT",contract:Object(D.toContractAddress)("FLOW:A.a983fecbed621163.FiatToken")};function xt(e,t,n){switch(e){case N.Blockchain.ETHEREUM:case N.Blockchain.POLYGON:if("NATIVE"===t)return wt(e);if("TOKEN"===t)return kt(n);throw new Error("Unsupported option subtype");case N.Blockchain.MANTLE:case N.Blockchain.ARBITRUM:case N.Blockchain.ZKSYNC:case N.Blockchain.CHILIZ:case N.Blockchain.ASTARZKEVM:case N.Blockchain.RARI:case N.Blockchain.BASE:if("TOKEN"===t)return kt(n);throw new Error("Unsupported option subtype");case N.Blockchain.IMMUTABLEX:if("NATIVE"===t)return wt(e);throw new Error("Unsupported option subtype");case N.Blockchain.TEZOS:if("NATIVE"===t)return Ct;throw new Error("Unsupported option subtype");case N.Blockchain.SOLANA:if("NATIVE"===t)return St;throw new Error("Unsupported blockchain or asset type");case N.Blockchain.FLOW:if("NATIVE"===t)return It;if("TOKEN"===t&&n===Rt.contract)return Rt;throw new Error("Unsupported currency subtype");default:throw new Error("Unsupported blockchain")}}function Pt(e,t){return e.flatMap((e=>{switch(e.blockchain){case N.Blockchain.ETHEREUM:if("NATIVE"===e.type)return{type:"NATIVE",label:"ETH",blockchain:N.Blockchain.ETHEREUM};if("ERC20"===e.type){const e=[];switch(t){case"development":e.push({type:"TOKEN",label:"Rarible Test ERC20",blockchain:N.Blockchain.ETHEREUM,contract:"ETHEREUM:0xA4A70E8627e858567a9f1F08748Fe30691f72b9e"});break;case"testnet":e.push({type:"TOKEN",label:"Rarible Test ERC20",blockchain:N.Blockchain.ETHEREUM,contract:"ETHEREUM:0xCfaF03B6254363bcA1A9D8e529270B5660bF3109"}),e.push({type:"TOKEN",label:"Goerli WETH",blockchain:N.Blockchain.ETHEREUM,contract:"ETHEREUM:0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6"});break;case"prod":e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.ETHEREUM,contract:"ETHEREUM:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"})}return e.push({type:"TOKEN",label:"Custom ERC20",blockchain:N.Blockchain.ETHEREUM,contract:null}),e}return[];case N.Blockchain.POLYGON:if("NATIVE"===e.type)return{type:"NATIVE",label:"ETH",blockchain:N.Blockchain.POLYGON};if("ERC20"===e.type){const e=[];switch(t){case"development":e.push({type:"TOKEN",label:"Rarible Test ERC20",blockchain:N.Blockchain.POLYGON,contract:"POLYGON:0xf4520E73A0212166C07279428527b9d300295203"});break;case"testnet":e.push({type:"TOKEN",label:"Rarible Test ERC20",blockchain:N.Blockchain.POLYGON,contract:"POLYGON:0xd6e804e7EDB5B2AecB31D9cCC9d9F3940a7b4cE2"},{type:"TOKEN",label:"WETH",blockchain:N.Blockchain.POLYGON,contract:"POLYGON:0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa"});break;case"prod":e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.POLYGON,contract:"POLYGON:0x7ceb23fd6bc0add59e62ac25578270cff1b9f619"})}return e.push({type:"TOKEN",label:"Custom ERC20",blockchain:N.Blockchain.POLYGON,contract:null}),e}return[];case N.Blockchain.MANTLE:if("ERC20"===e.type){const e=[];switch(t){case"testnet":case"prod":e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.MANTLE,contract:"MANTLE:0xdeaddeaddeaddeaddeaddeaddeaddeaddead1111"})}return e}return[];case N.Blockchain.ARBITRUM:if("ERC20"===e.type){const e=[];switch(t){case"testnet":e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.ARBITRUM,contract:"ARBITRUM:0x980b62da83eff3d4576c647993b0c1d7faf17c73"});break;case"prod":e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.ARBITRUM,contract:"ARBITRUM:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"})}return e}return[];case N.Blockchain.ZKSYNC:if("ERC20"===e.type){const e=[];switch(t){case"testnet":e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.ZKSYNC,contract:"ZKSYNC:0x20b28B1e4665FFf290650586ad76E977EAb90c5D"});break;case"prod":e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.ZKSYNC,contract:"ZKSYNC:0x8Ebe4A94740515945ad826238Fc4D56c6B8b0e60"})}return e}return[];case N.Blockchain.CHILIZ:if("ERC20"===e.type){const e=[];switch(t){case"testnet":e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.CHILIZ,contract:"CHILIZ:0x678c34581db0a7808d0aC669d7025f1408C9a3C6"});break;case"prod":e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.CHILIZ,contract:"CHILIZ:0x677F7e16C7Dd57be1D4C8aD1244883214953DC47"})}return e}return[];case N.Blockchain.RARI:if("ERC20"===e.type){const e=[];switch(t){case"testnet":e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.RARI,contract:"RARI:0x2c9dd2b2cd55266e3b5c3c95840f3c037fbcb856"});break;case"prod":e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.RARI,contract:"RARI:0xf037540e51D71b2D2B1120e8432bA49F29EDFBD0"})}return e}return[];case N.Blockchain.BASE:if("ERC20"===e.type){const e=[];switch(t){case"testnet":case"prod":e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.BASE,contract:"BASE:0x4200000000000000000000000000000000000006"})}return e}return[];case N.Blockchain.ASTARZKEVM:if("ERC20"===e.type){const e=[];if("testnet"===t)e.push({type:"TOKEN",label:"WETH",blockchain:N.Blockchain.ASTARZKEVM,contract:"ASTARZKEVM:0xD8560C88D1DC85f9ED05b25878E366c49B68bEf9"});return e}return[];case N.Blockchain.IMMUTABLEX:return"NATIVE"===e.type?{type:"NATIVE",label:"ETH",blockchain:N.Blockchain.IMMUTABLEX}:[];case N.Blockchain.TEZOS:return"NATIVE"===e.type?{type:"NATIVE",label:"XTZ",blockchain:N.Blockchain.TEZOS}:[];case N.Blockchain.SOLANA:return"NATIVE"===e.type?{type:"NATIVE",label:"SOL",blockchain:N.Blockchain.SOLANA}:[];case N.Blockchain.FLOW:return"NATIVE"===e.type?[{type:"NATIVE",label:"FLOW",blockchain:N.Blockchain.FLOW},{type:"TOKEN",label:"USDC",blockchain:N.Blockchain.FLOW,contract:"FLOW:A.a983fecbed621163.FiatToken"}]:[];default:throw new Error("Unsupported blockchain")}}))}function Bt(e){return"".concat(e.blockchain,"::").concat("TOKEN"===e.type?e.type+"::"+e.contract:e.type)}function jt(e){const[t,n,r]=e.split("::");return{blockchain:t,type:n,contract:r&&"null"!==r?Object(D.toContractAddress)(r):void 0}}function Ft(e,t){return t.find((t=>Bt(t)===e))}function Mt(e){const{form:t,currencyOptions:n,max:i}=e,a=n||[],o=void 0!==a,[s,d]=Object(r.useState)(a[0]&&Bt(a[0])),c=Ft(s,a);return Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsxs)(v.a,{container:!0,spacing:2,children:[Object(f.jsx)(v.a,{item:!0,xs:8,children:Object(f.jsx)(st,{type:"number",inputProps:{min:0,step:"any",max:i||void 0},form:t,options:{min:0,max:i||void 0},name:"price",label:"Price"})}),o&&a.length?Object(f.jsx)(v.a,{item:!0,xs:4,children:Object(f.jsx)(Ye,{form:t,value:s,onChange:e=>{var n;d(e.target.value);const r=Ft(e.target.value,a);t.setValue("contract","TOKEN"===(null===r||void 0===r?void 0:r.type)&&null!==(n=r.contract)&&void 0!==n?n:"")},name:"currencyType",label:"Currency",children:a.map((e=>{const t=Bt(e);return Object(f.jsx)(k.a,{value:t,children:e.label},t)}))})}):null]}),"TOKEN"===(null===c||void 0===c?void 0:c.type)&&o?Object(f.jsx)(st,{type:"text",form:t,defaultValue:c.contract,disabled:null!==c.contract,name:"contract",label:"Contract"}):null]})}function Dt(e){let{prepare:t,disabled:n,onComplete:r}=e;const{environment:i}=F(),a=le(),o=Object(ze.a)(),{handleSubmit:s}=o,{result:d,setError:c}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:s((async e=>{if(!a.sdk)return;let n;t.maxFeesBasePointSupport===Ot.MaxFeesBasePointSupport.REQUIRED&&(n=1e3);try{var i;const a=jt(e.currencyType);r(await t.submit({price:Object(D.toBigNumber)(e.price),amount:parseInt(e.amount),currency:xt(a.blockchain,a.type,null!==(i=a.contract)&&void 0!==i?i:e.contract),maxFeesBasePoint:n,originFees:[],expirationDate:Object(At.generateExpirationDate)()}))}catch(o){c(o)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(Mt,{form:o,currencyOptions:Pt(t.supportedCurrencies,i)}),Object(f.jsx)(st,{type:"number",inputProps:{min:1,max:t.maxAmount,step:1},form:o,options:{min:1,max:Number(t.maxAmount)},defaultValue:Math.min(1,Number(t.maxAmount)),name:"amount",label:"Amount"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:o,label:"Submit",state:Je(d.type),disabled:n})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:d})})]})}function Nt(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:'\n// get sell info\nconst sell = await connection.sdk.order.sell.prepare({\n itemId: \n})\n// sell: {\n// baseFee: number\n// maxAmount: BigNumber\n// multiple: boolean\n// submit: Function\n// supportedCurrencies: - supported currencies list \n// }\n\n// send transaction\nconst result = await sell.submit({\n price: 2,\n currency: {"@type": "ETH"},\n amount: 1,\n})\n// result: string - order id\n\t\t'})})}function Lt(e){return!!e}function Vt(){var e;const t=Object(p.g)(),n=null===(e=le().sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Sell Token",children:[!Lt(n)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:n})}),Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(Nt,{}),children:Object(f.jsx)(Et,{steps:[{label:"Get Item Info",render:e=>Object(f.jsx)(_t,{onComplete:e,disabled:!Lt(n),itemId:t.itemId})},{label:"Send Transaction",render:(e,t)=>Object(f.jsx)(Dt,{onComplete:e,prepare:t,disabled:!Lt(n)})},{label:"Done",render:(e,t)=>Object(f.jsx)(Qe,{result:{type:"complete",data:t},completeRender:e=>Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)(u.a,{sx:{my:2},children:[Object(f.jsx)(m.a,{variant:"overline",children:"Order ID:"}),Object(f.jsxs)("div",{children:[Object(f.jsx)(b,{wrap:!0,children:e})," ",Object(f.jsx)($e,{value:e})]})]})})})}]})})]})}function Ut(e){let{orderId:t,disabled:n,onComplete:r}=e;const i=Object(p.f)(),a=le(),o=Object(ze.a)(),{result:s,setError:d}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:o.handleSubmit((async e=>{try{const t=Object(D.toOrderId)(e.orderId);r({prepare:await a.sdk.order.buy.prepare({orderId:t}),order:await a.sdk.apis.order.getOrderById({id:t})}),i("/buy/".concat(e.orderId),{})}catch(t){d(t)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{form:o,defaultValue:t,name:"orderId",label:"Order ID"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:o,label:"Next",state:Je(s.type),icon:I.d,disabled:n})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:s})})]})}var Wt=n(942),Ht=n(754),Kt=n.n(Ht),zt=n(755),Zt=n.n(zt);function Gt(e){const{prepare:t,form:n,namePrefix:i,isFillBatch:a}=e,[o,s]=Object(r.useState)(1);return Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{type:"number",inputProps:{min:1,max:t.maxAmount,step:1},form:n,options:{min:1,max:Number(t.maxAmount)},name:Yt(i,"amount"),label:"Amount"}),a&&Xt(e.order)?Object(f.jsxs)(f.Fragment,{children:[new Array(o).fill(0).map(((t,n)=>qt({...e,key:n}))),Object(f.jsxs)(u.a,{display:"flex",justifyContent:"flex-end",alignItems:"flex-end",children:[Object(f.jsx)(Be.a,{color:"primary",onClick:()=>{n.setValue("".concat(i,"_itemsCounter"),o+1),s(o+1)},children:Object(f.jsx)(Kt.a,{})}),Object(f.jsx)(Be.a,{color:"error",disabled:o<=1,onClick:()=>{n.setValue("".concat(i,"_itemsCounter"),o-1),s(Math.max(1,o-1))},children:Object(f.jsx)(Zt.a,{})})]})]}):qt({...e})]})}function qt(e){let{form:t,order:n,namePrefix:r,key:i,isFillBatch:a}=e,o=Yt(r,"itemId");if(a&&(o=o+"_"+i),Xt(n))return Object(f.jsx)(st,{type:"text",form:t,name:o,label:"Item Id"},i)}function Yt(e,t){return(e?e+"_":"")+t}function Xt(e){return"AMM_NFT"===(null===e||void 0===e?void 0:e.make.type["@type"])}function Jt(e){let{prepare:t,order:n,disabled:r,onComplete:i}=e;const a=Object(ze.a)(),{result:o,setError:s}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:a.handleSubmit((async e=>{try{i(await t.submit({amount:parseInt(e.amount),itemId:e.itemId?Object(Wt.toItemId)(e.itemId):void 0}))}catch(n){s(n)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(Gt,{form:a,prepare:t,order:n}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:a,label:"Submit",state:Je(o.type),disabled:r})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:o})})]})}function Qt(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:"\n// get order info\nconst buy = await sdk.order.buy({\n orderId: \n})\n// buy: {\n// baseFee: number\n// maxAmount: BigNumber\n// multiple: boolean\n// submit: Function\n// supportsPartialFill: boolean\n// } \n\n// send transaction\nconst result = await buy.submit({\n amount: 1,\n})\n// result: IBlockchainTransaction\n\t\t"})})}function $t(e){return!!e}function en(){var e;const t=Object(p.g)(),n=null===(e=le().sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Buy Token",children:[!$t(n)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:n})}),Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(Qt,{}),children:Object(f.jsx)(Et,{steps:[{label:"Get Order Info",render:e=>Object(f.jsx)(Ut,{onComplete:e,disabled:!$t(n),orderId:t.orderId})},{label:"Send Transaction",render:(e,t)=>Object(f.jsx)(Jt,{onComplete:e,prepare:t.prepare,order:t.order,disabled:!$t(n)})},{label:"Done",render:(e,t)=>Object(f.jsx)(Qe,{result:{type:"complete",data:t},completeRender:e=>Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(rt,{transaction:e})})})}]})})]})}function tn(e){var t,n;let{disabled:r,onComplete:i}=e;const a=le(),{environment:o}=F(),s=Object(ze.a)(),{handleSubmit:d}=s,{result:c,setError:l}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:d((async e=>{if(a.sdk)try{const t=await a.sdk.apis.collection.getCollectionById({collection:e.collectionId});i(await a.sdk.nft.mint.prepare({collection:t}))}catch(t){l(t)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{form:s,name:"collectionId",label:"Collection ID",defaultValue:"connected"===a.state.status?nn(o,null===(t=a.state)||void 0===t||null===(n=t.connection)||void 0===n?void 0:n.blockchain):""}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:s,label:"Next",state:Je(c.type),icon:I.d,disabled:r})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:c})})]})}function nn(e,t){return console.log("env",e,t,rn(e)),t===N.Blockchain.ETHEREUM?"".concat(t,":").concat(rn(e)):""}function rn(e){switch(e){case"development":return"0x6972347e66A32F40ef3c012615C13cB88Bf681cc";case"testnet":return"0xD8560C88D1DC85f9ED05b25878E366c49B68bEf9";case"prod":return"0xc9154424B823b10579895cCBE442d41b9Abd96Ed";default:return""}}function an(e){let{prepare:t,disabled:n,onComplete:r}=e;const i=Object(ze.a)(),{result:a,setError:o}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:i.handleSubmit((async e=>{try{var n,i;r(await t.submit({uri:e.metadataUri,supply:null!==(n=parseFloat(e.supply))&&void 0!==n?n:1,lazyMint:null!==(i=e.lazy)&&void 0!==i&&i}))}catch(a){o(a)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{form:i,name:"metadataUri",label:"Metadata URI",defaultValue:"ipfs://ipfs/QmfVqzkQcKR1vCNqcZkeVVy94684hyLki7QcVzd9rmjuG5"}),Object(f.jsx)(st,{type:"number",form:i,name:"supply",label:"Supply",defaultValue:1,disabled:!t.multiple,helperText:t.multiple?null:"Collection does not support multiple mint"}),Object(f.jsx)(ut,{form:i,name:"lazy",label:"Lazy-mint",disabled:!t.supportsLazyMint}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:i,label:"Submit",state:Je(a.type),disabled:n})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:a})})]})}function on(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:'\n// get collection by id\t\t\t\nconst collection = await sdk.apis.collection.getCollectionById({\n collection: \n})\n\n// get mint info\nconst mint = await sdk.nft.mint({ collection })\n// mint: {\n// multiple: boolean, \n// supportsRoyalties: boolean, \n// supportsLazyMint: boolean, \n// submit: Function\n// }\n\n// send transaction\nconst result = await mint.submit({\n uri: "TOKEN URI",\n supply: 1,\n lazyMint: false\n})\n// result: {\n// type: "on-chain", \n// itemId: string, \n// transaction: IBlockchainTransaction\n// } | {\n// type: "off-chain", \n// itemId: string\n// }\n\t\t'})})}function sn(e){return!!e}function dn(){var e;const t=null===(e=le().sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Mint Token",children:[!sn(t)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:t})}),Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(on,{}),children:Object(f.jsx)(Et,{steps:[{label:"Get Collection & Prepare Mint",render:e=>Object(f.jsx)(tn,{onComplete:e,disabled:!sn(t)})},{label:"Send Transaction",render:(e,n)=>Object(f.jsx)(an,{onComplete:e,prepare:n,disabled:!sn(t)})},{label:"Done",render:(e,t)=>Object(f.jsx)(Qe,{result:{type:"complete",data:t},completeRender:e=>Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)(u.a,{sx:{my:2},children:[Object(f.jsx)(m.a,{variant:"overline",children:"Type:"}),Object(f.jsx)("div",{children:Object(f.jsx)(b,{wrap:!0,children:e.type})})]}),Object(f.jsxs)(u.a,{sx:{my:2},children:[Object(f.jsx)(m.a,{variant:"overline",children:"Item ID:"}),Object(f.jsxs)("div",{children:[Object(f.jsx)(b,{wrap:!0,children:e.itemId})," ",Object(f.jsx)($e,{value:e.itemId})]})]}),"on-chain"===e.type&&Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(rt,{transaction:e.transaction})})]})})}]})})]})}function cn(e){let{itemId:t,disabled:n,onComplete:r}=e;const i=Object(p.f)(),a=le(),o=Object(ze.a)(),{handleSubmit:s}=o,{result:d,setError:c}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:s((async e=>{try{r(await a.sdk.order.bid.prepare({itemId:Object(D.toItemId)(e.itemId)})),i("/bid/".concat(e.itemId),{})}catch(t){c(t)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{form:o,defaultValue:t,name:"itemId",label:"Item ID"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:o,label:"Next",state:Je(d.type),icon:I.d,disabled:n})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:d})})]})}function un(e){let{prepare:t,disabled:n,onComplete:r}=e;const{environment:i}=F(),a=Object(ze.a)(),{handleSubmit:o}=a,{result:s,setError:d}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:o((async e=>{try{var n;const i=jt(e.currencyType);r(await t.submit({price:Object(D.toBigNumber)(e.price),amount:parseInt(e.amount),currency:xt(i.blockchain,i.type,null!==(n=i.contract)&&void 0!==n?n:e.contract),expirationDate:Object(At.generateExpirationDate)()}))}catch(i){d(i)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(Mt,{form:a,currencyOptions:Pt(t.supportedCurrencies,i)}),Object(f.jsx)(st,{type:"number",inputProps:{min:1,max:t.maxAmount,step:1},form:a,options:{min:1,max:Number(t.maxAmount)},defaultValue:Math.min(1,Number(t.maxAmount)),name:"amount",label:"Amount"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:a,label:"Submit",state:Je(s.type),disabled:n})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:s})})]})}function ln(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:'\n// get sell info\nconst bid = await sdk.order.bid({\n itemId: \n})\n\n// send transaction\nconst result = await bid.submit({\n price: 2,\n currency: {\n \t"@type": "ERC20",\n \tcontract: "ETHEREUM:0xc778417E063141139Fce010982780140Aa0cD5Ab" // WETH contract address\n },\n amount: 1,\n})\n// result: string - order id\n\t\t'})})}function pn(e){return!!e}function yn(){var e;const t=Object(p.g)(),n=null===(e=le().sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Make Bid",children:[!pn(n)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:n})}),Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(ln,{}),children:Object(f.jsx)(Et,{steps:[{label:"Get Item Info",render:e=>Object(f.jsx)(cn,{onComplete:e,disabled:!pn(n),itemId:t.itemId})},{label:"Send Transaction",render:(e,t)=>Object(f.jsx)(un,{onComplete:e,prepare:t,disabled:!pn(n)})},{label:"Done",render:(e,t)=>Object(f.jsx)(Qe,{result:{type:"complete",data:t},completeRender:e=>Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)(u.a,{sx:{my:2},children:[Object(f.jsx)(m.a,{variant:"overline",children:"Order ID:"}),Object(f.jsxs)("div",{children:[Object(f.jsx)(b,{wrap:!0,children:e})," ",Object(f.jsx)($e,{value:e})]})]})})})}]})})]})}function mn(e){let{orderId:t,disabled:n,onComplete:r}=e;const i=Object(p.f)(),a=le(),o=Object(ze.a)(),{handleSubmit:s}=o,{result:d,setError:c}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:s((async e=>{try{r(await a.sdk.order.acceptBid.prepare({orderId:Object(D.toOrderId)(e.orderId)})),i("/accept-bid/".concat(e.orderId),{})}catch(t){c(t)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{form:o,defaultValue:t,name:"orderId",label:"Order ID"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:o,label:"Next",state:Je(d.type),icon:I.d,disabled:n})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:d})})]})}function fn(e){let{prepare:t,disabled:n,onComplete:r}=e;const i=le(),a=Object(ze.a)(),{handleSubmit:o}=a,{result:s,setError:d}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:o((async e=>{if(!i.sdk)return;let n;t.maxFeesBasePointSupport===Ot.MaxFeesBasePointSupport.REQUIRED&&(n=1e3);try{r(await t.submit({amount:parseInt(e.amount),maxFeesBasePoint:n}))}catch(a){d(a)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{type:"number",inputProps:{min:1,max:t.maxAmount,step:1},form:a,options:{min:1,max:Number(t.maxAmount)},name:"amount",label:"Amount"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:a,label:"Submit",state:Je(s.type),disabled:n})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:s})})]})}function hn(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:"\n// get order info\nconst accept = await connection.sdk.order.acceptBid.prepare({\n orderId: \n})\n\n// send transaction\nconst result = await accept.submit({\n amount: 1,\n})\n// result: IBlockchainTransaction\n\t\t"})})}function bn(e){return!!e}function Tn(){var e;const t=Object(p.g)(),n=null===(e=le().sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Accept Bid",children:[!bn(n)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:n})}),Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(hn,{}),children:Object(f.jsx)(Et,{steps:[{label:"Get Order Info",render:e=>Object(f.jsx)(mn,{onComplete:e,disabled:!bn(n),orderId:t.orderId})},{label:"Send Transaction",render:(e,t)=>Object(f.jsx)(fn,{onComplete:e,prepare:t,disabled:!bn(n)})},{label:"Done",render:(e,t)=>Object(f.jsx)(Qe,{result:{type:"complete",data:t},completeRender:e=>Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(rt,{transaction:e})})})}]})})]})}var vn=n(3463),gn=n(3464),En=n(3465),_n=n(3466),On=n(3467),An=n(1456),wn=n.n(An),kn=n(1455),Cn=n.n(kn);function Sn(e){for(let t of e||[])if("IMAGE"===t["@type"])return t.url;return null}function In(e){let{url:t}=e;return t?Object(f.jsx)(vn.a,{component:"img",image:t,sx:{height:194,objectFit:"contain"}}):Object(f.jsx)(u.a,{display:"flex",justifyContent:"center",alignItems:"center",sx:{height:194},children:Object(f.jsx)(m.a,{variant:"body2",color:"text.secondary",sx:{textAlign:"center"},children:Object(f.jsx)("strong",{children:"No media provided"})})})}function Rn(e){var t;let{item:n}=e;return Object(f.jsxs)(gn.a,{sx:{width:200},children:[Object(f.jsx)(En.a,{sx:{display:"flex",overflow:"hidden","& .MuiCardHeader-content":{overflow:"hidden"}},title:Object(f.jsx)(m.a,{noWrap:!0,gutterBottom:!0,variant:"h6",component:"h4",children:n.meta?n.meta.name:"No metadata"})}),Object(f.jsx)(In,{url:Sn(null===(t=n.meta)||void 0===t?void 0:t.content)}),Object(f.jsx)(_n.a,{children:Object(f.jsx)(m.a,{variant:"body2",color:"text.secondary",sx:{textAlign:"right"},children:Object(f.jsxs)("strong",{children:["Supply: ",n.supply]})})}),Object(f.jsxs)(On.a,{children:[Object(f.jsx)(C.a,{size:"small",component:s.b,to:"/sell/".concat(n.id),children:"Sell"}),Object(f.jsx)(Be.a,{size:"small",component:s.b,to:"/transfer/".concat(n.id),title:"Transfer",children:Object(f.jsx)(Cn.a,{})}),Object(f.jsx)(Be.a,{size:"small",color:"warning",component:s.b,to:"/burn/".concat(n.id),title:"Burn",children:Object(f.jsx)(wn.a,{})})]})]})}function xn(e){var t;let{items:n}=e;return null!==n&&void 0!==n&&null!==(t=n.items)&&void 0!==t&&t.length?Object(f.jsx)(u.a,{sx:{my:2,display:"flex",gap:2,flexWrap:"wrap"},children:null===n||void 0===n?void 0:n.items.map((e=>Object(f.jsx)(Rn,{item:e},e.id)))}):Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(m.a,{variant:"h5",color:"text.secondary",sx:{textAlign:"center"},children:"No Items found"})})}function Pn(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:'\n// get items by owner\t\t\nconst items = await sdk.apis.item.getItemsByOwner({\n\towner: "ETHEREUM:...", // wallet address in union format \n})\n// Items: {\n// total: number;\n// continuation?: string;\n// items: Array;\n// }[]\n\t\t'})})}function Bn(e,t,n){const[i,a]=Object(r.useState)(null),[o,s]=Object(r.useState)(!1),[d,c]=Object(r.useState)(null);return Object(r.useEffect)((()=>{t?async function(){try{if(!n)throw new Error("useFetchItems: blockchain should be specified");s(!0);const r=await(null===e||void 0===e?void 0:e.apis.item.getItemsByOwner({owner:t,blockchains:n?[n]:[]}));a(null!==r&&void 0!==r?r:null),c(!1)}catch(r){r.json?c(await r.json()):c(r)}finally{s(!1)}}().catch((e=>c(e))):a(null)}),[t]),{items:i,fetching:o,error:d}}function jn(){const e=le();if("connected"!==e.state.status)return null;const{items:t,fetching:n,error:r}=Bn(e.sdk,e.walletAddress,e.state.connection.blockchain);return Object(f.jsx)(h,{header:"My Items",children:Object(f.jsxs)(g,{sx:{my:2},comment:Object(f.jsx)(Pn,{}),children:[r&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsxs)(_e.a,{severity:"error",children:[Object(f.jsx)(Oe.a,{children:"Items fetch error"}),r.message||r.toString()]})}),n?Object(f.jsx)(u.a,{sx:{my:4,display:"flex",justifyContent:"center"},children:Object(f.jsx)(et.a,{})}):t&&Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(xn,{items:t})})]})})}var Fn=n(3452);function Mn(e){let{form:t,name:n,disabled:r}=e;const{register:i}=t;return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)("label",{htmlFor:"file-input",children:[Object(f.jsx)(Fn.a,{id:"file-input",type:"file",...i(n,{required:!0,disabled:r}),style:{display:"none"}}),Object(f.jsx)(C.a,{variant:"outlined",component:"span",children:"Select file"})]})})}function Dn(e){var t;let{onComplete:n}=e;const i=le(),a=Object(ze.a)(),{result:o}=Xe(),s=null===(t=i.sdk.wallet)||void 0===t?void 0:t.walletType,[d,c]=Object(r.useState)(!0);return Object(r.useEffect)((()=>{const e=a.watch((e=>{let{name:t,description:n,image:r,accountAddress:i}=e;c(!(t&&n&&r.length&&i))}));return()=>e.unsubscribe()}),[a,a.watch]),Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:a.handleSubmit((async e=>{const{name:t,description:r,image:a,animationUrl:o,nftStorageApiKey:d,accountAddress:c}=e;n(await i.sdk.nft.uploadMeta({accountAddress:Object(D.toUnionAddress)("".concat(s,":").concat(c)),nftStorageApiKey:d,properties:{name:t,description:r,image:a[0],animationUrl:o,attributes:[]},royalty:""}))})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{form:a,name:"nftStorageApiKey",label:"NftStorage Api Key"}),Object(f.jsx)(st,{form:a,name:"accountAddress",label:"Account address"}),Object(f.jsx)(st,{form:a,name:"name",label:"Name"}),Object(f.jsx)(st,{form:a,name:"description",label:"Description"}),Object(f.jsx)(Mn,{form:a,name:"image"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:a,label:"Next",state:Je(o.type),icon:I.d,disabled:d})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:o})})]})}function Nn(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:"\n// upload metadata\nconst uploadMeta = await sdk.nft.uploadMeta(\n\tYOUR_NFT_STORAGE_API_KEY: string, \n\taccountAddress: string,\n\tproperties: {\n\t\tname: string\n\t\tdescription?: string\n\t\timage?: File\n\t\tanimationUrl?: File\n\t\tattributes: {key: string, value: string}[]\n\t},\n\troyalty: string\n)\n\n// uploadMeta: {\n// \toriginalFile: File\n// \tURL: string\n// \tIPFSURL: string\n// } \n\t\t\t"})})}function Ln(e){let{result:t}=e;return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(m.a,{variant:"overline",children:"Upload result:"}),Object(f.jsx)(ve,{theme:"light",language:"json",wrap:!0,children:JSON.stringify({url:t.URL,ipfsUrl:t.IPFSURL},null," ")})]})}function Vn(){return Object(f.jsx)(h,{header:"Upload metadata",children:Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(Nn,{}),children:Object(f.jsx)(Et,{steps:[{label:"Get Meta Info",render:(e,t)=>(console.log(t),Object(f.jsx)(Dn,{onComplete:e}))},{label:"Done",render:(e,t)=>Object(f.jsx)(Qe,{result:{type:"complete",data:t},completeRender:e=>Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Ln,{result:e})})})}]})})})}function Un(e){let{disabled:t,onComplete:n,prepare:r}=e;const i=le(),a=Object(ze.a)(),{handleSubmit:o}=a,{result:s,setError:d}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)(_e.a,{severity:"warning",sx:{my:2},children:[Object(f.jsx)(Oe.a,{children:"Warning"}),"Submitting this form will destroy token"]}),Object(f.jsx)("form",{onSubmit:o((async e=>{if(i.sdk)try{n(await r.submit({amount:parseInt(e.amount)}))}catch(t){d(t)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{type:"number",inputProps:{min:1,max:r.maxAmount,step:1},form:a,options:{min:1,max:Number(r.maxAmount)},name:"amount",label:"Amount"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:a,label:"Burn",state:Je(s.type),disabled:t})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:s})})]})}function Wn(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:"\n// get item info\nconst prepare = await sdk.nft.burn({\n itemId: \n})\n// prepare: {\n// multiple: boolean,\n// maxAmount: BigNumber\n// submit: Function\n// } \n\n// send transaction\nconst result = await prepare.submit({\n amount: 1,\n})\n// result: IBlockchainTransaction\n\t\t"})})}function Hn(e){let{itemId:t,disabled:n,onComplete:r}=e;const i=Object(p.f)(),a=le(),o=Object(ze.a)(),{result:s,setError:d}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:o.handleSubmit((async e=>{try{r(await a.sdk.nft.burn.prepare({itemId:Object(D.toItemId)(e.itemId)})),i("/burn/".concat(e.itemId),{})}catch(t){d(t)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{form:o,defaultValue:t,name:"itemId",label:"Item ID"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:o,label:"Next",state:Je(s.type),icon:I.d,disabled:n})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:s})})]})}function Kn(e){return!!e}function zn(){var e;const t=Object(p.g)(),n=null===(e=le().sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Burn Token",children:[!Kn(n)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:n})}),Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(Wn,{}),children:Object(f.jsx)(Et,{steps:[{label:"Get Item Info",render:e=>Object(f.jsx)(Hn,{onComplete:e,disabled:!Kn(n),itemId:t.itemId})},{label:"Send Transaction",render:(e,t)=>Object(f.jsx)(Un,{onComplete:e,prepare:t,disabled:!Kn(n)})},{label:"Done",render:(e,t)=>Object(f.jsx)(Qe,{result:{type:"complete",data:t},completeRender:e=>Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(rt,{transaction:e})})})}]})})]})}function Zn(e){let{disabled:t,onComplete:n,prepare:r}=e;const i=Object(ze.a)(),{result:a,setError:o}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:i.handleSubmit((async e=>{try{n(await r.submit({amount:parseInt(e.amount),to:Object(D.toUnionAddress)(e.to)}))}catch(t){o(t)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{form:i,name:"to",label:"Receiver Address"}),Object(f.jsx)(st,{type:"number",inputProps:{min:1,max:r.maxAmount,step:1},form:i,options:{min:1,max:Number(r.maxAmount)},name:"amount",label:"Amount"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:i,label:"Transfer",state:Je(a.type),disabled:t})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:a})})]})}function Gn(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:"\n// get item info\nconst prepare = await sdk.nft.transfer({\n itemId: \n})\n// prepare: {\n// multiple: boolean,\n// maxAmount: BigNumber\n// submit: Function\n// } \n\n// send transaction\nconst result = await prepare.submit({\n amount: 1,\n to: UnionAddress\n})\n// result: IBlockchainTransaction\n\t\t"})})}function qn(e){let{itemId:t,disabled:n,onComplete:r}=e;const i=Object(p.f)(),a=le(),o=Object(ze.a)(),{result:s,setError:d}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:o.handleSubmit((async e=>{try{r(await a.sdk.nft.transfer.prepare({itemId:Object(D.toItemId)(e.itemId)})),i("/transfer/".concat(e.itemId),{})}catch(t){d(t)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{form:o,defaultValue:t,name:"itemId",label:"Item ID"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:o,label:"Next",state:Je(s.type),icon:I.d,disabled:n})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:s})})]})}function Yn(e){return!!e}function Xn(){var e;const t=Object(p.g)(),n=null===(e=le().sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Transfer Token",children:[!Yn(n)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:n})}),Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(Gn,{}),children:Object(f.jsx)(Et,{steps:[{label:"Get Item Info",render:e=>Object(f.jsx)(qn,{onComplete:e,disabled:!Yn(n),itemId:t.itemId})},{label:"Send Transaction",render:(e,t)=>Object(f.jsx)(Zn,{onComplete:e,prepare:t,disabled:!Yn(n)})},{label:"Done",render:(e,t)=>Object(f.jsx)(Qe,{result:{type:"complete",data:t},completeRender:e=>Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(rt,{transaction:e})})})}]})})]})}function Jn(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:'\n// get items by owner\t\t\nconst balance = await sdk.balances.getBalance(\n\t"ETHEREUM:...", // wallet address \n\t{ "@type": "ETH", blockchain: "ETHEREUM" } // currency type\n)\n\t\t'})})}function Qn(e,t,n){const[i,a]=Object(r.useState)(null),[o,s]=Object(r.useState)(!1),[d,c]=Object(r.useState)(null);return Object(r.useEffect)((()=>{t?async function(){try{s(!0);const r=await(null===e||void 0===e?void 0:e.balances.getBalance(t,n));a(r.toString()),c(!1)}catch(r){r.json?c(await r.json()):c(r)}finally{s(!1)}}().catch((e=>c(e))):a(null)}),[t,n["@type"]]),{balance:i,fetching:o,error:d}}function $n(e){var t;let{sdk:n,walletAddress:i}=e;const a=le(),{environment:o}=F(),s=Object(ze.a)(),{handleSubmit:d}=s,c="connected"===a.state.status?a.state.connection.blockchain:null===(t=a.sdk.wallet)||void 0===t?void 0:t.walletType,l=tr(c,o),p="POLYGON"===c?"MATIC":"ETH",y=[{label:"".concat(p," -> WETH"),from:{"@type":"ETH",blockchain:c},to:{"@type":"ERC20",contract:l}},{label:"WETH -> ".concat(p),from:{"@type":"ERC20",contract:l},to:{"@type":"ETH",blockchain:c}}],[m,h]=Object(r.useState)(y[0]),{balance:b,fetching:T}=Qn(n,i,m.from),{result:g,isFetching:E,setError:_,setComplete:O}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:d((async()=>{try{if("connected"===a.state.status){const e=await(null===n||void 0===n?void 0:n.balances.convert({blockchain:a.state.connection.blockchain,value:s.getValues("value"),isWrap:"ETH"===m.from["@type"]}));O(e),await e.wait()}}catch(e){_(e)}})),children:Object(f.jsxs)(v.a,{container:!0,spacing:2,children:[Object(f.jsx)(v.a,{item:!0,xs:5,children:Object(f.jsx)(st,{type:"number",inputProps:{min:0,max:b,step:"any"},form:s,options:{min:0,max:b||void 0},name:"value",label:"Value"})}),Object(f.jsx)(v.a,{item:!0,xs:4,children:Object(f.jsx)(Ye,{form:s,value:m.label,onChange:e=>{const t=y.find((t=>t.label===e.target.value));h(t)},name:"currencyType",label:"Currency",children:y.map(((e,t)=>Object(f.jsx)(k.a,{value:e.label,children:e.label},t+"-value")))})}),Object(f.jsx)(v.a,{item:!0,xs:2,children:Object(f.jsx)(Ge,{form:s,label:"Convert",state:T||E?"normal":"success",disabled:T||E})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:g,completeRender:e=>Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(rt,{transaction:e})})})})]})}const er={[N.Blockchain.ETHEREUM]:{prod:Object(D.toContractAddress)("ETHEREUM:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"),testnet:Object(D.toContractAddress)("ETHEREUM:0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6"),development:Object(D.toContractAddress)("ETHEREUM:0x55eB2809896aB7414706AaCDde63e3BBb26e0BC6")}};function tr(e,t){if(!e||!t||!er||!er[e])return;const n=er[e];return n&&n[t]}function nr(e){switch(e){case"testnet":return Object(D.toContractAddress)("FLOW:A.7e60df042a9c0868.FlowToken");case"prod":return Object(D.toContractAddress)("FLOW:A.1654653399040a61.FlowToken");default:throw new Error("Can't find FlowToken address on env=".concat(e))}}function rr(e){var t,n;let{sdk:r,wallet:i,walletAddress:a}=e;const{environment:o}=F(),s=le(),d=function(e,t,n){switch(e){case Ze.WalletType.ETHEREUM:return[{isNative:!0,requireContract:!1,getAssetType:()=>{var e;return{"@type":"ETH",blockchain:"connected"===(null===n||void 0===n||null===(e=n.state)||void 0===e?void 0:e.status)?n.state.connection.blockchain:N.Blockchain.ETHEREUM}}}];case Ze.WalletType.IMMUTABLEX:return[{isNative:!0,requireContract:!1,getAssetType:()=>({"@type":"ETH",blockchain:N.Blockchain.IMMUTABLEX})}];case Ze.WalletType.SOLANA:return[{isNative:!0,requireContract:!1,getAssetType:()=>({"@type":"SOLANA_SOL"})}];case Ze.WalletType.TEZOS:return[{isNative:!0,requireContract:!1,getAssetType:()=>({"@type":"XTZ"})}];case Ze.WalletType.FLOW:return[{isNative:!0,requireContract:!1,getAssetType:()=>({"@type":"FLOW_FT",contract:nr(t)})}];default:throw new Error("Unsupported blockchain")}}(i.walletType,o,s),{balance:c,fetching:u,error:l}=Qn(r,a,null===(t=d.find((e=>e.isNative)))||void 0===t?void 0:t.getAssetType()),p=!((null===(n=s.state)||void 0===n?void 0:n.connection.blockchain)===N.Blockchain.MANTLE)&&!!tr(i.walletType,o);return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)("div",{style:{marginBottom:20},children:["Native Balance: ",u?Object(f.jsx)(et.a,{size:14}):l?Object(f.jsx)("b",{children:l.message}):Object(f.jsx)(f.Fragment,{children:c})]}),p?Object(f.jsx)($n,{sdk:r,walletAddress:a}):null]})}function ir(e){return!!e}function ar(){var e;const t=le(),n=null===(e=t.sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Balances",children:[!ir(n)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:n})}),Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(Jn,{}),children:Object(f.jsx)(u.a,{sx:{my:2},children:t.sdk&&t.sdk.wallet&&t.walletAddress?Object(f.jsx)(rr,{sdk:t.sdk,walletAddress:t.walletAddress,wallet:t.sdk.wallet}):null})})]})}function or(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:"\n// get order info\nconst result = await sdk.order.cancel({\n orderId: \n})\n// result: IBlockchainTransaction\n\t\t"})})}function sr(e){let{disabled:t,onComplete:n}=e;const r=le(),i=Object(ze.a)(),{result:a,setError:o}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:i.handleSubmit((async e=>{try{n(await r.sdk.order.cancel({orderId:e.orderId}))}catch(t){o(t)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{form:i,name:"orderId",label:"Order ID"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:i,label:"Submit",state:Je(a.type),disabled:t})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:a})})]})}function dr(e){return!!e}function cr(){var e;const t=null===(e=le().sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Cancel Order",children:[!dr(t)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:t})}),Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(or,{}),children:Object(f.jsx)(Et,{steps:[{label:"Send Transaction",render:e=>Object(f.jsx)(sr,{onComplete:e,disabled:!dr(t)})},{label:"Done",render:(e,t)=>Object(f.jsx)(Qe,{result:{type:"complete",data:t},completeRender:e=>Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(rt,{transaction:e})})})}]})})]})}function ur(e){let{orderId:t,disabled:n,onComplete:i}=e;const[a,o]=Object(r.useState)(2),s=le(),d=Object(ze.a)(),{handleSubmit:c}=d,{result:l,setError:p}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:c((async e=>{try{i({prepare:await s.sdk.order.batchBuy.prepare(e.orderId.filter((e=>e)).map((e=>({orderId:Object(D.toOrderId)(e)})))),orders:(await s.sdk.apis.order.getOrdersByIds({orderIds:{ids:e.orderId.filter((e=>e))}})).orders})}catch(t){p(t)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[new Array(a).fill(0).map(((e,n)=>Object(f.jsx)(st,{form:d,defaultValue:t,name:"orderId[".concat(n,"]"),label:"Order ID"},n))),Object(f.jsxs)(u.a,{display:"flex",justifyContent:"flex-end",alignItems:"flex-end",children:[Object(f.jsx)(Be.a,{color:"primary",onClick:()=>o(a+1),children:Object(f.jsx)(Kt.a,{})}),Object(f.jsx)(Be.a,{color:"error",disabled:a<=1,onClick:()=>o(Math.max(1,a-1)),children:Object(f.jsx)(Zt.a,{})})]}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:d,label:"Next",state:Je(l.type),icon:I.d,disabled:n})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:l})})]})}function lr(e){let{prepare:t,orders:n,disabled:r,onComplete:i}=e;const a=Object(ze.a)(),{handleSubmit:o}=a,{result:s,setError:d}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:o((async e=>{try{i(await t.submit(t.prepared.map((t=>{const n=parseInt(e[t.orderId+"_itemsCounter"]||1);let r=new Array(n).fill(0).map(((n,r)=>(console.log("maps, index",t.orderId+"_itemId_".concat(r),e[t.orderId+"_itemId_".concat(r)]),e[t.orderId+"_itemId_".concat(r)]?Object(D.toItemId)(e[t.orderId+"_itemId_".concat(r)]):void 0)));return console.log("itemId",r,"itemsCounter",n),{orderId:t.orderId,amount:parseInt(e[t.orderId+"_amount"]),itemId:1===r.length?r[0]:r}}))))}catch(n){d(n)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[t.prepared.map(((e,t)=>Object(f.jsxs)(u.a,{children:[Object(f.jsxs)("p",{children:["OrderId: ",e.orderId]}),Object(f.jsx)(Gt,{form:a,prepare:e,namePrefix:e.orderId,order:n.find((t=>t.id===e.orderId)),isFillBatch:!0})]},e.orderId+t))),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:a,label:"Submit",state:Je(s.type),disabled:r})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:s})})]})}function pr(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:"\n// get orders info\nconst batchBuy = await connection.sdk.order.batchBuy([\n {orderId: },\n {orderId: }\n])\n\n// batchBuy: {\n// submit: Function,\n// prepared: [{\n// orderId: OrderId\t\t\n// baseFee: number\n// maxAmount: BigNumber\n// multiple: boolean\n// supportsPartialFill: boolean\n// }, {\n// orderId: OrderId\n// baseFee: number\n// maxAmount: BigNumber\n// multiple: boolean\n// supportsPartialFill: boolean\n// }]\n// } \n\n// send transaction\nconst result = await buy.submit([{\n \torderId: ,\n \tamount: 1,\n }, {\n \torderId: \n \tamount: 1,\n \toriginFees: [],\n}])\n// result: IBlockchainTransaction\n\t\t"})})}function yr(e){return!!e&&[Ze.WalletType.ETHEREUM,Ze.WalletType.TEZOS].includes(e)}function mr(){var e;const t=Object(p.g)(),n=null===(e=le().sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Batch Buy Tokens",children:[!yr(n)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:n})}),Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(pr,{}),children:Object(f.jsx)(Et,{steps:[{label:"Get Order Info",render:e=>Object(f.jsx)(ur,{onComplete:e,disabled:!yr(n),orderId:t.orderId})},{label:"Send Transaction",render:(e,t)=>Object(f.jsx)(lr,{onComplete:e,prepare:t.prepare,orders:t.orders,disabled:!yr(n)})},{label:"Done",render:(e,t)=>Object(f.jsx)(Qe,{result:{type:"complete",data:t},completeRender:e=>Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(rt,{transaction:e})})})}]})})]})}function fr(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:"\n// sign message\t\t\nconst signResult = await sdk.wallet?.signPersonalMessage(input)\n\n// signResult : {\n// signature: string\n// publicKey: string\n// }\n\t\t"})})}function hr(e){return!!e}function br(){var e;const t=le(),n=null===(e=t.sdk.wallet)||void 0===e?void 0:e.walletType,[i,a]=Object(r.useState)(""),[o,s]=Object(r.useState)(!1),[d,c]=Object(r.useState)(void 0),[l,p]=Object(r.useState)(void 0);return Object(f.jsxs)(h,{header:"Sign Message",children:[!hr(n)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:n})}),Object(f.jsxs)(g,{sx:{my:2},comment:Object(f.jsx)(fr,{}),children:[Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(w.a,{fullWidth:!0,label:"Input Text",multiline:!0,value:i,onChange:e=>a(e.target.value)})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(O.a,{loading:o,loadingPosition:"start",startIcon:Object(f.jsx)(x,{icon:I.h}),color:"primary",variant:"contained",disabled:""===i||!hr(n),onClick:async()=>{try{var e,n;s(!0);const r=await(null===t||void 0===t||null===(e=t.sdk)||void 0===e||null===(n=e.wallet)||void 0===n?void 0:n.signPersonalMessage(i));s(!1),p(r),c(void 0)}catch(r){console.error(r),s(!1),c(r.message||r.toString())}},children:"Sign"})}),Object(f.jsxs)(u.a,{sx:{my:2},children:[d&&Object(f.jsx)(_e.a,{variant:"outlined",severity:"error",icon:Object(f.jsx)(x,{icon:I.f}),children:d}),!d&&l&&Object(f.jsxs)(_e.a,{variant:"outlined",severity:"success",icon:Object(f.jsx)(x,{icon:I.b}),children:[Object(f.jsx)(m.a,{variant:"overline",children:"Signature:"}),Object(f.jsxs)("div",{children:[Object(f.jsx)(b,{wrap:!0,children:l.signature})," ",Object(f.jsx)($e,{value:l.signature})]}),Object(f.jsxs)(u.a,{sx:{my:2},children:[Object(f.jsx)(m.a,{variant:"overline",children:"Public Key:"}),Object(f.jsxs)("div",{children:[Object(f.jsx)(b,{wrap:!0,children:l.publicKey})," ",Object(f.jsx)($e,{value:l.publicKey})]})]})]})]})]})]})}function Tr(){return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(ve,{children:'\n// get order info\nconst sellUpdateResponse = await sdk.order.sellUpdate.prepare({\n orderId: \n})\n// buy: {\n// originFeeSupport: OriginFeeSupport.NONE | OriginFeeSupport.AMOUNT_ONLY | OriginFeeSupport.FULL\n// payoutsSupport: \n// maxFeesBasePointSupport: BigNumber\n// supportedCurrencies: Array\n// baseFee: number\n// submit: Function\n// } \n\n// send transaction\nconst result = await sellUpdateResponse.submit({\n price: "0.1",\n})\n// result: IBlockchainTransaction\n\t\t'})})}function vr(e){let{prepare:t,disabled:n,onComplete:r}=e;const i=Object(ze.a)(),{result:a,setError:o}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:i.handleSubmit((async e=>{try{r(await t.submit({price:e.price}))}catch(n){o(n)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(Mt,{form:i}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:i,label:"Submit",state:Je(a.type),disabled:n})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:a})})]})}function gr(e){let{orderId:t,disabled:n,onComplete:r}=e;const i=Object(p.f)(),a=le(),o=Object(ze.a)(),{result:s,setError:d}=Xe();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("form",{onSubmit:o.handleSubmit((async e=>{try{const t=Object(D.toOrderId)(e.orderId);r({prepare:await a.sdk.order.sellUpdate.prepare({orderId:t}),order:await a.sdk.apis.order.getOrderById({id:t})}),i("/sell-update/".concat(e.orderId),{})}catch(t){d(t)}})),children:Object(f.jsxs)(A.a,{spacing:2,children:[Object(f.jsx)(st,{form:o,defaultValue:t,name:"orderId",label:"Order ID"}),Object(f.jsx)(u.a,{children:Object(f.jsx)(Ge,{form:o,label:"Next",state:Je(s.type),icon:I.d,disabled:n})})]})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(Qe,{result:s})})]})}function Er(e){return!!e}function _r(){var e;const t=Object(p.g)(),n=null===(e=le().sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Change Price",children:[!Er(n)&&Object(f.jsx)(g,{sx:{my:2},children:Object(f.jsx)(it,{blockchain:n})}),Object(f.jsx)(g,{sx:{my:2},comment:Object(f.jsx)(Tr,{}),children:Object(f.jsx)(Et,{steps:[{label:"Get Order Info",render:e=>Object(f.jsx)(gr,{onComplete:e,disabled:!Er(n),orderId:t.orderId})},{label:"Send Transaction",render:(e,t)=>Object(f.jsx)(vr,{onComplete:e,prepare:t.prepare,order:t.order,disabled:!Er(n)})},{label:"Done",render:(e,t)=>Object(f.jsx)(Qe,{result:{type:"complete",data:t},completeRender:e=>Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)(u.a,{sx:{my:2},children:[Object(f.jsx)(m.a,{variant:"overline",children:"Updated order ID:"}),Object(f.jsxs)("div",{children:[Object(f.jsx)(b,{wrap:!0,children:e})," ",Object(f.jsx)($e,{value:e})]})]})})})}]})})]})}function Or(){var e;const{environment:t}=F(),{result:n,isFetching:r,setError:i,setComplete:a}=Xe(),o=le(),s=(null===(e=o.sdk.wallet)||void 0===e?void 0:e.walletType)===Ze.WalletType.FLOW,d=Object(ze.a)();return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)("form",{onSubmit:d.handleSubmit((async()=>{try{var e,t;const n=await(null===o||void 0===o||null===(e=o.sdk)||void 0===e||null===(t=e.flow)||void 0===t?void 0:t.setupAccount(d.getValues("collection")));a(n)}catch(n){i(n)}})),children:[Object(f.jsx)(m.a,{sx:{my:2},variant:"h6",component:"h2",gutterBottom:!0,children:"Setup Flow collection"}),Object(f.jsxs)(v.a,{container:!0,spacing:2,children:[Object(f.jsx)(v.a,{item:!0,xs:4,children:Object(f.jsx)(st,{type:"text",form:d,defaultValue:Ar(t),name:"collection",label:"Collection",disabled:!s})}),Object(f.jsx)(v.a,{item:!0,xs:2,children:Object(f.jsx)(Ge,{form:d,label:"Setup",state:r?"normal":"success",disabled:r||!s})})]})]}),Object(f.jsx)(Qe,{result:n,completeRender:e=>Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(rt,{transaction:e})})})]})}function Ar(e){return"testnet"===e?"FLOW:A.80102bce1de42dc4.HWGaragePackV2":"FLOW:"}function wr(){var e;const{result:t,isFetching:n,setError:i,setComplete:a}=Xe(),o=le(),[s,d]=Object(r.useState)(""),c=(null===(e=o.sdk.wallet)||void 0===e?void 0:e.walletType)===Ze.WalletType.FLOW,l=Object(ze.a)();function p(){var e;null!==o&&void 0!==o&&null!==(e=o.sdk)&&void 0!==e&&e.flow&&o.sdk.flow.checkInitMattelCollections().then((e=>d(JSON.stringify(e,null," ")))).catch(console.error)}return Object(r.useEffect)((()=>{p()}),[]),Object(f.jsxs)("div",{style:{marginTop:20},children:[Object(f.jsxs)("form",{onSubmit:l.handleSubmit((async()=>{try{var e,t;const n=await(null===o||void 0===o||null===(e=o.sdk)||void 0===e||null===(t=e.flow)||void 0===t?void 0:t.setupMattelCollections());a(n),p()}catch(n){i(n)}})),children:[Object(f.jsx)(m.a,{sx:{my:2},variant:"h6",component:"h2",gutterBottom:!0,children:"Setup Mattel collections"}),Object(f.jsx)(v.a,{container:!0,spacing:2,children:Object(f.jsx)(v.a,{item:!0,xs:4,children:s?Object(f.jsxs)("div",{children:["Collection state: ",Object(f.jsx)("pre",{children:s})]}):null})}),Object(f.jsx)(v.a,{item:!0,xs:2,children:Object(f.jsx)(Ge,{form:l,label:"Setup",state:n?"normal":"success",disabled:n||!c})})]}),Object(f.jsx)(Qe,{result:t,completeRender:e=>Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(rt,{transaction:e})})})]})}function kr(){var e;const{result:t,isFetching:n,setError:r,setComplete:i}=Xe(),a=le(),o=(null===(e=a.sdk.wallet)||void 0===e?void 0:e.walletType)===Ze.WalletType.FLOW,s=Object(ze.a)(),d=function(){const e=le(),t=e.connector.getCurrentProvider();if(t)return t.getProvider();return}();return"mattel"!==(null===(c=d)||void 0===c?void 0:c.getId())?Object(f.jsx)("span",{children:"Not a mattel provider"}):Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)("form",{onSubmit:s.handleSubmit((async()=>{try{var e;try{var t;const e=await(null===(t=a.sdk.flow)||void 0===t?void 0:t.checkInitMattelCollections());if(console.log("accountInitStatus",e),null===e||void 0===e||!e.initCollections){var n;const e=await(null===(n=a.sdk.flow)||void 0===n?void 0:n.setupMattelCollections());await(null===e||void 0===e?void 0:e.wait())}}catch(o){console.log("err init status",o)}const r=s.getValues("orderId"),c=await a.sdk.apis.order.getOrderById({id:r});if("FLOW_NFT"!==c.make.type["@type"])throw new Error("Is not a sell order");const u=null===(e=(await a.sdk.apis.item.getItemById({itemId:Object(D.toItemId)("".concat(c.make.type.contract,":").concat(c.make.type.tokenId))})).meta)||void 0===e?void 0:e.content.find((e=>"IMAGE"===e["@type"])),l=await d.sardinePurchase({orderId:r,orderMaker:c.maker,purchaseOptions:{nft:{name:"test nft",imageUrl:u?u.url:"https://cdn.shopify.com/s/files/1/0568/1132/3597/files/HWNFT_S4_modular-grid_584x800b.jpg?v=1669157307"}}});i(l)}catch(o){r(JSON.stringify(o,null," "))}})),children:[Object(f.jsx)(m.a,{sx:{my:2},variant:"h6",component:"h2",gutterBottom:!0,children:"Buy Flow item by Sardine"}),Object(f.jsxs)(v.a,{container:!0,spacing:2,children:[Object(f.jsx)(v.a,{item:!0,xs:4,children:Object(f.jsx)(st,{type:"text",form:s,name:"orderId",label:"Order Id",disabled:!o})}),Object(f.jsx)(v.a,{item:!0,xs:2,children:Object(f.jsx)(Ge,{form:s,label:"Buy",state:n?"normal":"success",disabled:n||!o})})]})]}),Object(f.jsx)(Qe,{result:t,completeRender:e=>Object(f.jsxs)("span",{children:["result: ",e.toString()]})})]});var c}var Cr=n(238);function Sr(){var e;const{environment:t}=F(),{result:n,isFetching:i,setError:a,setComplete:o}=Xe(),s=le(),[d,c]=Object(r.useState)(""),l=(null===(e=s.sdk.wallet)||void 0===e?void 0:e.walletType)===Ze.WalletType.FLOW,p=Object(ze.a)(),{handleSubmit:y}=p;function h(){try{let e=function(e){switch(e){case"development":case"testnet":case"prod":return"mainnet";default:throw new Error("Unrecognized env")}}(t);const n=Object(Cr.replaceImportAddresses)(d,Cr.CONFIGS[e].mainAddressMap);c(n)}catch(e){console.error(e)}}return Object(f.jsxs)("div",{style:{marginTop:20},children:[Object(f.jsxs)("form",{onSubmit:y((async()=>{try{var e;if((null===(e=s.sdk.wallet)||void 0===e?void 0:e.walletType)===Ze.WalletType.FLOW){const{fcl:e,auth:t}=s.sdk.wallet,n=await Ir(e,{cadence:d,args:e.args([])},t);console.log("tx id=",n);const r=await Object(Cr.waitForSeal)(e,n);console.log("tx",r),o(r)}}catch(t){a(t)}})),children:[Object(f.jsx)(m.a,{sx:{my:2},variant:"h6",component:"h2",gutterBottom:!0,children:"Execute raw FLOW transaction"}),Object(f.jsx)(v.a,{container:!0,spacing:2,children:Object(f.jsxs)(v.a,{item:!0,xs:6,children:[Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(w.a,{fullWidth:!0,label:"Input Text",multiline:!0,value:d,onChange:e=>c(e.target.value)})}),Object(f.jsx)(C.a,{variant:"outlined",component:"span",onClick:()=>h(),children:"Replace addresses"})]})}),Object(f.jsx)(v.a,{item:!0,xs:2,children:Object(f.jsx)(Ge,{form:p,label:"Setup",state:i?"normal":"success",disabled:i||!l})})]}),Object(f.jsx)(Qe,{result:n,completeRender:e=>Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(rt,{transaction:e})})})})]})}const Ir=async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:999;const i=[e.limit(r)];i.push(e.payer(n||e.authz),e.proposer(n||e.authz),e.authorizations([n||e.authz])),t.args&&i.push(t.args),i.push(e.transaction(t.cadence));return(await e.send(i)).transactionId};function Rr(){const{result:e,isFetching:t,setError:n,setComplete:i}=Xe(),a=le(),[o,s]=Object(r.useState)(""),d=Object(ze.a)();return Object(f.jsxs)("div",{style:{marginTop:20},children:[Object(f.jsxs)("form",{onSubmit:d.handleSubmit((async()=>{try{var e;if((null===(e=a.sdk.wallet)||void 0===e?void 0:e.walletType)===Ze.WalletType.ETHEREUM){const e=a.sdk.wallet,t=JSON.parse(o),n=await e.ethereum.signTypedData(t);i(n)}}catch(t){n(t)}})),children:[Object(f.jsx)(m.a,{sx:{my:2},variant:"h6",component:"h2",gutterBottom:!0,children:"Sign typed data"}),Object(f.jsx)(v.a,{container:!0,spacing:2,children:Object(f.jsxs)(v.a,{item:!0,xs:6,children:[Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(w.a,{fullWidth:!0,label:"Sign data",multiline:!0,value:o,onChange:e=>s(e.target.value)})}),Object(f.jsx)(Ge,{form:d,label:"Sign",state:t?"normal":"success",disabled:t})]})})]}),Object(f.jsx)("div",{style:{marginTop:20,maxWidth:500,wordBreak:"break-all"},children:Object(f.jsx)(Qe,{result:e,completeRender:e=>Object(f.jsxs)(u.a,{sx:{my:2},children:["signature: ",e]})})})]})}function xr(){const e=le(),[t,n]=Object(r.useState)(""),{result:i,setComplete:a}=Xe();return Object(f.jsxs)("div",{children:[Object(f.jsx)(m.a,{sx:{my:2},variant:"h4",component:"h2",gutterBottom:!0,children:"Provider actions"}),Object(f.jsxs)(v.a,{container:!0,spacing:2,children:[Object(f.jsxs)(v.a,{item:!0,xs:6,children:[Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(w.a,{fullWidth:!0,label:"Switch to chain id",value:t,onChange:e=>n(e.target.value)})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(C.a,{variant:"outlined",component:"span",onClick:()=>function(){var n;(null===(n=e.sdk.wallet)||void 0===n?void 0:n.walletType)===Ze.WalletType.ETHEREUM&&e.sdk.wallet.ethereum.getCurrentProvider().request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+parseInt(t).toString(16)}]})}(),children:"Switch to chain"})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(C.a,{variant:"outlined",component:"span",onClick:()=>async function(){var t;if((null===(t=e.sdk.wallet)||void 0===t?void 0:t.walletType)===Ze.WalletType.ETHEREUM){const t=await e.sdk.wallet.ethereum.getFrom();e.sdk.wallet.ethereum.getCurrentProvider().request({method:"eth_sendTransaction",params:[{from:t,to:"0x0c54FcCd2e384b4BB6f2E405Bf5Cbc15a017AaFb",value:"0x0",gasLimit:"0x5028",gasPrice:"0x2540be400",type:"0x0"}]})}}(),children:"Send transaction"})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(C.a,{variant:"outlined",component:"span",onClick:()=>async function(){var t;if((null===(t=e.sdk.wallet)||void 0===t?void 0:t.walletType)===Ze.WalletType.ETHEREUM){const t=await e.sdk.wallet.ethereum.getFrom();a(t)}}(),children:"Get from"})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(C.a,{variant:"outlined",component:"span",onClick:()=>async function(){var t;if((null===(t=e.sdk.wallet)||void 0===t?void 0:t.walletType)===Ze.WalletType.ETHEREUM){const t=await e.sdk.wallet.ethereum.getChainId();a(t)}}(),children:"Get chain id"})})]}),Object(f.jsx)("div",{style:{marginTop:30,marginLeft:20,maxWidth:500,wordBreak:"break-all"},children:Object(f.jsx)(Qe,{result:i,completeRender:e=>Object(f.jsxs)(u.a,{sx:{my:2},children:["result: ",e]})})})]})]})}var Pr=n(751),Br=n.n(Pr),jr=n(716),Fr=n(586);function Mr(){const[e,t]=Object(r.useState)(void 0),[n,i]=Object(r.useState)(""),[a,o]=Object(r.useState)(""),{result:s,isFetching:d,setError:c,startFetching:l,setComplete:p}=Xe();async function y(){try{if(!e||!n)throw new Error("Address or chain id has not been set");l();const t=function(e,t){const n=ne[t];if(!n)throw new Error("Rpc URL does not exist for current chainID=".concat(t));const r=new Br.a(new Br.a.providers.HttpProvider(n)),i=new jr.Web3Ethereum({web3:r,from:e}),a=function(e){switch(e){case 1:return"mainnet";case 5:return"testnet";default:throw new Error("Please, set network for this chainID")}}(t);return Object(Fr.createRaribleSdk)(i,a,{apiKey:Dr(a)})}(n.split(":")[1],e);let r={};r.order=await t.apis.order.getValidatedOrderByHash({hash:a.split(":")[1]});const i=await t.order.getFillTxData(r);console.log("data",i),p(JSON.stringify(i,null," "))}catch(t){c(t)}}return Object(f.jsxs)("div",{children:[Object(f.jsx)(m.a,{sx:{my:2},variant:"subtitle1",gutterBottom:!0,children:"Enter Order ID, Chain ID and wallet address to get transaction data"}),Object(f.jsxs)(v.a,{container:!0,spacing:2,children:[Object(f.jsx)(v.a,{item:!0,xs:2,children:Object(f.jsx)(w.a,{fullWidth:!0,label:"Order ID",value:a,onChange:e=>o(e.target.value)})}),Object(f.jsx)(v.a,{item:!0,xs:2,children:Object(f.jsx)(w.a,{fullWidth:!0,label:"From",value:n,onChange:e=>i(e.target.value)})}),Object(f.jsx)(v.a,{item:!0,xs:1,children:Object(f.jsx)(w.a,{fullWidth:!0,label:"Chain ID",value:e,onChange:e=>t(+e.target.value)})}),Object(f.jsx)(v.a,{style:{display:"flex",alignItems:"center"},item:!0,xs:7,children:Object(f.jsx)(C.a,{variant:"outlined",onClick:()=>y(),disabled:d,children:d?"Loading...":"Get transaction data"})}),Object(f.jsx)(v.a,{item:!0,xs:12,children:Object(f.jsx)("div",{style:{wordBreak:"break-all"},children:Object(f.jsx)(Qe,{result:s,completeRender:e=>Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)("pre",{children:e})})})})})})]})]})}function Dr(e){var t;return"mainnet"===e?"666ad781-aa60-4000-9e3e-cf5ae2d41bd3":null!==(t="2cadd8fe-5e34-4fe8-bc59-d9dbafc30ef5")?t:void 0}function Nr(){const e=le(),[t,n]=Object(r.useState)(""),[i,a]=Object(r.useState)(""),[o,s]=Object(r.useState)("");return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(m.a,{sx:{my:2},variant:"subtitle1",gutterBottom:!0,children:"Off ramp functionality"}),Object(f.jsxs)(u.a,{sx:{my:2},children:[Object(f.jsx)(C.a,{style:{marginRight:10},variant:"outlined",component:"span",onClick:()=>async function(){var t,n;if((null===(t=e.sdk.wallet)||void 0===t?void 0:t.walletType)===Ze.WalletType.ETHEREUM&&e.walletAddress){const t=await Lr.getQuotes({cryptoAmount:"0.04",fiatCurrency:"USD",assetType:{"@type":"ETH"},address:e.walletAddress});a(JSON.stringify(t,null," "))}else{if((null===(n=e.sdk.wallet)||void 0===n?void 0:n.walletType)!==Ze.WalletType.FLOW||!e.walletAddress)throw new Error("Available only for ETH");{const t=await Lr.getQuotes({cryptoAmount:"3",fiatCurrency:"USD",address:e.walletAddress,assetType:{"@type":"FLOW_FT",contract:nr("testnet")}});a(JSON.stringify(t,null," "))}}}(),children:"Get Offramp Quotes"}),"for wallet: ",null===e||void 0===e?void 0:e.walletAddress]}),i&&Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)("pre",{children:i})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(C.a,{style:{marginRight:10},variant:"outlined",component:"span",onClick:()=>async function(){const e=await Lr.getSupportedTokens();s(JSON.stringify(e,null," "))}(),children:"Get supported tokens"})}),o&&Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)("pre",{children:o})}),Object(f.jsx)(u.a,{sx:{my:2},children:Object(f.jsx)(C.a,{variant:"outlined",component:"span",onClick:()=>async function(){var t,r;if((null===(t=e.sdk.wallet)||void 0===t?void 0:t.walletType)===Ze.WalletType.ETHEREUM&&e.walletAddress){const t=await Lr.getSellLink({address:e.walletAddress,cryptoAmount:"0.04",fiatCurrency:"USD",assetType:{"@type":"ETH"}});n(t)}else{if((null===(r=e.sdk.wallet)||void 0===r?void 0:r.walletType)!==Ze.WalletType.FLOW||!e.walletAddress)throw new Error("Available only for ETH");{const t=await Lr.getSellLink({address:e.walletAddress,cryptoAmount:"110",fiatCurrency:"USD",assetType:{"@type":"FLOW_FT",contract:nr("testnet")}});n(t)}}}(),children:"Render Offramp Iframe"})}),t&&Object(f.jsx)("iframe",{style:{border:0},src:t,onLoad:Vr,width:500,height:700,id:"sardine_iframe"})]})}const Lr=new(n(1457).OffRampClient)("7e15bfe6-b698-49d2-a392-fd4b1855992e","4f361bcc-d7a2-4c44-b877-1f81938bb558","sandbox");function Vr(){window.addEventListener("message",(e=>{if(e.data)try{const n=JSON.parse(e.data);var t;if(["failed","expired","cancelled","error"].includes(n.status)||console.log(n.data.depositAddress),"draft"===n.status)console.log("orderId",null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.orderId)}catch(e){}}),!1)}function Ur(){var e;const t=null===(e=le().sdk.wallet)||void 0===e?void 0:e.walletType;return Object(f.jsxs)(h,{header:"Utils page",children:[t===Ze.WalletType.FLOW&&Object(f.jsx)(Wr,{}),t===Ze.WalletType.ETHEREUM&&Object(f.jsx)(Hr,{}),Object(f.jsx)(Mr,{}),Object(f.jsx)(Nr,{})]})}function Wr(){return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(Or,{}),Object(f.jsx)(wr,{}),Object(f.jsx)(kr,{}),Object(f.jsx)(Sr,{})]})}function Hr(){return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(Rr,{}),Object(f.jsx)(xr,{})]})}function Kr(){return Object(f.jsx)(j,{children:Object(f.jsx)(ue,{children:Object(f.jsxs)(u.a,{children:[Object(f.jsx)(Ne,{}),Object(f.jsxs)(l.a,{maxWidth:"xl",sx:{mt:2,display:"grid",gridTemplateColumns:"minmax(250px, 20%) 1fr",gap:"20px"},children:[Object(f.jsx)(u.a,{component:"nav",children:Object(f.jsx)(Ke,{})}),Object(f.jsx)(u.a,{component:"main",children:Object(f.jsxs)(p.c,{children:[Object(f.jsx)(p.a,{path:"/",element:Object(f.jsx)(T,{})}),Object(f.jsx)(p.a,{path:"about",element:Object(f.jsx)(T,{})}),Object(f.jsx)(p.a,{path:"connect",element:Object(f.jsx)(Ce,{})}),Object(f.jsx)(p.a,{path:"balance",element:Object(f.jsx)(ar,{})}),Object(f.jsx)(p.a,{path:"deploy",element:Object(f.jsx)(bt,{})}),Object(f.jsx)(p.a,{path:"upload-meta",element:Object(f.jsx)(Vn,{})}),Object(f.jsx)(p.a,{path:"mint",element:Object(f.jsx)(dn,{})}),Object(f.jsx)(p.a,{path:"sell",element:Object(f.jsx)(Vt,{}),children:Object(f.jsx)(p.a,{path:":itemId",element:Object(f.jsx)(Vt,{})})}),Object(f.jsx)(p.a,{path:"buy",element:Object(f.jsx)(en,{}),children:Object(f.jsx)(p.a,{path:":orderId",element:Object(f.jsx)(en,{})})}),Object(f.jsx)(p.a,{path:"sell-update",element:Object(f.jsx)(_r,{}),children:Object(f.jsx)(p.a,{path:":orderId",element:Object(f.jsx)(_r,{})})}),Object(f.jsx)(p.a,{path:"batch-buy",element:Object(f.jsx)(mr,{})}),Object(f.jsx)(p.a,{path:"bid",element:Object(f.jsx)(yn,{}),children:Object(f.jsx)(p.a,{path:":itemId",element:Object(f.jsx)(yn,{})})}),Object(f.jsx)(p.a,{path:"accept-bid",element:Object(f.jsx)(Tn,{}),children:Object(f.jsx)(p.a,{path:":orderId",element:Object(f.jsx)(Tn,{})})}),Object(f.jsx)(p.a,{path:"cancel",element:Object(f.jsx)(cr,{})}),Object(f.jsx)(p.a,{path:"transfer",element:Object(f.jsx)(Xn,{}),children:Object(f.jsx)(p.a,{path:":itemId",element:Object(f.jsx)(Xn,{})})}),Object(f.jsx)(p.a,{path:"burn",element:Object(f.jsx)(zn,{}),children:Object(f.jsx)(p.a,{path:":itemId",element:Object(f.jsx)(zn,{})})}),Object(f.jsx)(p.a,{path:"items",element:Object(f.jsx)(jn,{})}),Object(f.jsx)(p.a,{path:"sign",element:Object(f.jsx)(br,{})}),Object(f.jsx)(p.a,{path:"utils",element:Object(f.jsx)(Ur,{})}),Object(f.jsx)(p.a,{path:"*",element:Object(f.jsx)(Se,{})})]})})]})]})})})}var zr=n(1459);const Zr=Object(zr.a)({breakpoints:{values:{xs:0,sm:600,md:900,lg:1300,xl:1860}},palette:{primary:{main:"#4051b5"},secondary:{main:"#f50057"}}});function Gr(){return Object(f.jsxs)(i.a.StrictMode,{children:[Object(f.jsx)(d.a,{}),Object(f.jsx)(c.a,{theme:Zr,children:Object(f.jsx)(s.a,{children:Object(f.jsx)(Kr,{})})})]})}o.a.render(Object(f.jsx)(Gr,{}),document.getElementById("root"))},331:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitTx=void 0;const r=n(11);t.waitTx=function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield e;void 0!==t&&(yield t.wait())}))}},332:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBasisPointsPlusAccount=t.calcValueWithFees=t.originFeeValueConvert=t.getPackedFeeValue=t.setFeesCurrency=t.packFeesToUint=t.ZERO_FEE_VALUE=void 0;const r=n(101),i=n(101),a=n(20);function o(e){const t=s(e[0]),n=s(e[1]);return(0,a.toBigNumber)("0x"+"0".repeat(56)+t+n)}function s(e){var t;return null!==(t=null===e||void 0===e?void 0:e.toString(16).padStart(4,"0"))&&void 0!==t?t:"0000"}t.ZERO_FEE_VALUE=(0,a.toBigNumber)("0x"+"0".repeat(64)),t.packFeesToUint=o,t.setFeesCurrency=function(e,t){const n=(e.startsWith("0x")?e.slice(2):e).padStart(13,"0").split("");return n[n.length-13]=Number(t).toString(),(0,a.toBigNumber)("0x"+n.join(""))},t.getPackedFeeValue=s,t.originFeeValueConvert=function(e){var t,n,r,i,s,d,c,u,l,p;if(e&&e.length>2)throw new Error("This method supports max up to 2 origin fee values");const y=o([null===(t=null===e||void 0===e?void 0:e[0])||void 0===t?void 0:t.value,null===(n=null===e||void 0===e?void 0:e[1])||void 0===n?void 0:n.value]),m=[null!==(i=null===(r=null===e||void 0===e?void 0:e[0])||void 0===r?void 0:r.account)&&void 0!==i?i:a.ZERO_ADDRESS,null!==(d=null===(s=null===e||void 0===e?void 0:e[1])||void 0===s?void 0:s.account)&&void 0!==d?d:a.ZERO_ADDRESS];return{encodedFeesValue:y,totalFeeBasisPoints:(null!==(u=null===(c=null===e||void 0===e?void 0:e[0])||void 0===c?void 0:c.value)&&void 0!==u?u:0)+(null!==(p=null===(l=null===e||void 0===e?void 0:e[1])||void 0===l?void 0:l.value)&&void 0!==p?p:0),feeAddresses:m}},t.calcValueWithFees=function(e,t){return(0,r.toBn)(t).dividedBy(1e4).multipliedBy(e).integerValue(i.BigNumber.ROUND_FLOOR).plus(e)},t.encodeBasisPointsPlusAccount=function(e,t){const n=(0,r.toBn)("0x"+e.toString(16)+"0".repeat(40));return(0,a.toBigNumber)("0x"+n.plus(t).toString(16))}},334:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkPayouts=void 0;const r=n(210);t.checkPayouts=function(e){if(null===e||void 0===e?void 0:e.length){const t=e.reduce(((e,t)=>e+ +t.value),0);if(1e4!==t)throw new r.Warning("Sum of the values of Payouts objects should be equal to 10000 basis points, passed=".concat(t))}}},335:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.alignBn=t.bigNumToBn=t.bigNumToBuffer=t.bnToBuffer=void 0;const r=n(838);function i(t,n,r){return t.toArrayLike(e,n,r)}function a(e){return new r.BN(e.toString())}t.bnToBuffer=i,t.bigNumToBuffer=function(e,t,n){return i(a(e),t,n)},t.bigNumToBn=a,t.alignBn=function(e,t){return new r.BN(i(e,"le",t))}}).call(this,n(7).Buffer)},372:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNft=void 0,t.isNft=function(e){switch(e.assetClass){case"ERC721":case"ERC721_LAZY":case"ERC1155":case"ERC1155_LAZY":case"CRYPTO_PUNKS":return!0;default:return!1}}},374:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Middlewarer=t.WrappedAdvancedFn=void 0;const r=n(11),i=n(99),a=r.__importDefault(n(640)),o=n(375),s=n(2133),d=Symbol("SKIP_MIDDLEWARE");class c extends a.default{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return super("fnCallable"),this.fn=e,this.args=t,this.parent=null===n||void 0===n?void 0:n.parent,Object.defineProperty(this,"name",{value:n.name||"fnCallable",writable:!1}),this}fnCallable(){return this.fn(...arguments)}setContext(e){this.context=e}static isWrappedAdvancedFn(e){return e instanceof c}static getParent(e){if(e)return e instanceof c||"WrappedAdvancedFn"===e.constructor.name?e.getParent():void 0}}t.WrappedAdvancedFn=c;t.Middlewarer=class{constructor(){this.middlewares=[]}use(e){return this.middlewares.push(e),this}call(e,t){let{args:n,parent:i,saveContext:a}=t;return r.__awaiter(this,void 0,void 0,(function*(){let t=e;const r=[];(a||i)&&(t=new c(t,n,{parent:i,name:e.name}));for(const e of this.middlewares){let i;[t,i]=yield e(t,n),i&&r.push(i)}let o=(0,s.toPromise)(t(...n));for(const e of r)o=(0,s.toPromise)(e(o));const d=yield o;return"function"===typeof(null===d||void 0===d?void 0:d.submit)&&(t.setContext(d),d.submit=this.wrap(d.submit,{methodName:e.name+".submit",parent:c.isWrappedAdvancedFn(t)?t:void 0})),d}))}wrap(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.hasOwnProperty(d))return e;const n=(null===t||void 0===t?void 0:t.methodName)||e.name||"anonymous";return(r=e)instanceof i.Action||r&&"after"in r&&"before"in r&&"start"in r?(this.wrapAction(e,n,{parent:t.parent}),e):function(e){return e instanceof o.MethodWithPrepare||e&&"simplifiedMethod"in e&&"prepare"in e}(e)?this.wrapMethodWithPrepare(e,n):this.wrapFunction(e,n,{parent:t.parent});var r}wrapMethodWithPrepare(e,t){const n=this.wrapFunction(e,t);return n.prepare=this.wrapFunction(e.prepare,"".concat(t,".prepare"),{saveContext:!0}),n}wrapFunction(e,t){var n=this;let{saveContext:r,parent:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.defineProperty(e,"name",{value:t,writable:!1}),function(){for(var t=arguments.length,a=new Array(t),o=0;o2&&void 0!==arguments[2]?arguments[2]:{};for(let i of e.steps){const e=i.run;i.run=function(){for(var t=arguments.length,i=new Array(t),a=0;ar.__awaiter(this,void 0,void 0,(function*(){return yield(0,a.handleFetchErrorResponse)(t.response,{code:e}),t.response}))}}t.createApisSdk=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const c=(0,s.getSdkConfig)(e),u=new i.Configuration(Object.assign({basePath:c.basePath,headers:"string"===typeof t.apiKey?{"X-API-KEY":t.apiKey}:{},exceptionHandler:(e,t,n)=>r.__awaiter(this,void 0,void 0,(function*(){var r;throw new a.NetworkError({status:-1,url:decodeURIComponent(t),formData:null===(r=null===n||void 0===n?void 0:n.body)||void 0===r?void 0:r.toString(),method:null===n||void 0===n?void 0:n.method,data:{message:e.message}})})),middleware:[...n!==o.LogsLevel.DISABLED?[d()]:[],...(null===t||void 0===t?void 0:t.middleware)||[]]},t));return{collection:new i.CollectionControllerApi(u),currency:new i.CurrencyControllerApi(u),item:new i.ItemControllerApi(u),ownership:new i.OwnershipControllerApi(u),order:new i.OrderControllerApi(u),activity:new i.ActivityControllerApi(u),balances:new i.BalanceControllerApi(u)}},t.getErrorHandlerMiddleware=d,function(e){e.NETWORK_ERR="NETWORK_ERR",e.ETHEREUM_NETWORK_ERR="ETHEREUM_NETWORK_ERR",e.FLOW_NETWORK_ERR="FLOW_NETWORK_ERR",e.IMX_NETWORK_ERR="IMX_NETWORK_ERR",e.TEZOS_EXTERNAL_ERR="TEZOS_EXTERNAL_ERR",e.SOLANA_EXTERNAL_ERR="SOLANA_EXTERNAL_ERR",e.META_EXTERNAL_ERR="META_EXTERNAL_ERR"}(t.NetworkErrorCode||(t.NetworkErrorCode={}))},382:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogsLevel=void 0,function(e){e[e.DISABLED=0]="DISABLED",e[e.ERROR=1]="ERROR",e[e.TRACE=2]="TRACE"}(t.LogsLevel||(t.LogsLevel={}))},414:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERC1155VersionEnum=t.ERC721VersionEnum=void 0,function(e){e.ERC721V1="ERC721V1",e.ERC721V2="ERC721V2",e.ERC721V3="ERC721V3"}(t.ERC721VersionEnum||(t.ERC721VersionEnum={})),function(e){e.ERC1155V1="ERC1155V1",e.ERC1155V2="ERC1155V2"}(t.ERC1155VersionEnum||(t.ERC1155VersionEnum={}))},415:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ADDITIONAL_DATA_STRUCT=t.EXCHANGEV2_BULK_ABI=t.createExchangeWrapperContract=void 0,t.createExchangeWrapperContract=function(e,n){return e.createContract(t.EXCHANGEV2_BULK_ABI,n)},t.EXCHANGEV2_BULK_ABI=[{inputs:[{internalType:"address",name:"_wyvernExchange",type:"address"},{internalType:"address",name:"_exchangeV2",type:"address"},{internalType:"address",name:"_seaPort",type:"address"},{internalType:"address",name:"_x2y2",type:"address"},{internalType:"address",name:"_looksRare",type:"address"},{internalType:"address",name:"_sudoswap",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"result",type:"bool"}],name:"Execution",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"Paused",type:"event"},{inputs:[],name:"exchangeV2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"looksRare",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155BatchReceived",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC721Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[{internalType:"bool",name:"_paused",type:"bool"}],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"seaPort",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"sudoswap",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function",constant:!0},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"wyvernExchange",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{inputs:[],name:"x2y2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function",constant:!0},{stateMutability:"payable",type:"receive",payable:!0},{inputs:[{components:[{internalType:"enum ExchangeWrapper.Markets",name:"marketId",type:"uint8"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"fees",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct ExchangeWrapper.PurchaseDetails",name:"purchaseDetails",type:"tuple"},{internalType:"address",name:"feeRecipientFirst",type:"address"},{internalType:"address",name:"feeRecipientSecond",type:"address"}],name:"singlePurchase",outputs:[],stateMutability:"payable",type:"function",payable:!0},{inputs:[{components:[{internalType:"enum ExchangeWrapper.Markets",name:"marketId",type:"uint8"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"fees",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct ExchangeWrapper.PurchaseDetails[]",name:"purchaseDetails",type:"tuple[]"},{internalType:"address",name:"feeRecipientFirst",type:"address"},{internalType:"address",name:"feeRecipientSecond",type:"address"},{internalType:"bool",name:"allowFail",type:"bool"}],name:"bulkPurchase",outputs:[],stateMutability:"payable",type:"function",payable:!0}],t.ADDITIONAL_DATA_STRUCT={components:[{name:"data",type:"bytes"},{name:"additionalRoyalties",type:"uint[]"}],name:"data",type:"tuple"}},416:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExchangeWrapperOrderType=void 0,function(e){e[e.RARIBLE_V2=0]="RARIBLE_V2",e[e.OPENSEA_V1=1]="OPENSEA_V1",e[e.SEAPORT_ADVANCED_ORDERS=2]="SEAPORT_ADVANCED_ORDERS",e[e.X2Y2=3]="X2Y2",e[e.LOOKSRARE_ORDERS=4]="LOOKSRARE_ORDERS",e[e.AAM=5]="AAM",e[e.SEAPORT_V14=6]="SEAPORT_V14",e[e.LOOKSRARE_V2_ORDERS=7]="LOOKSRARE_V2_ORDERS",e[e.SEAPORT_V15=9]="SEAPORT_V15"}(t.ExchangeWrapperOrderType||(t.ExchangeWrapperOrderType={}))},419:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getAuctionHouseBuyerEscrow=t.getAuctionHouseTradeState=t.getAuctionHouseProgramAsSigner=t.loadAuctionHouseProgram=void 0;const r=n(11),i=n(18),a=n(838),o=n(482),s=n(335);t.loadAuctionHouseProgram=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=new a.Provider(e,t,{preflightCommitment:"recent"}),r=yield a.Program.fetchIdl(o.AUCTION_HOUSE_PROGRAM_ID,n);return new a.Program(r,o.AUCTION_HOUSE_PROGRAM_ID,n)}))},t.getAuctionHouseProgramAsSigner=function(){return r.__awaiter(this,void 0,void 0,(function*(){return yield i.PublicKey.findProgramAddress([e.from(o.AUCTION_HOUSE),e.from("signer")],o.AUCTION_HOUSE_PROGRAM_ID)}))},t.getAuctionHouseTradeState=function(t,n,a,d,c,u,l){return r.__awaiter(this,void 0,void 0,(function*(){return yield i.PublicKey.findProgramAddress([e.from(o.AUCTION_HOUSE),n.toBuffer(),t.toBuffer(),a.toBuffer(),d.toBuffer(),c.toBuffer(),(0,s.bigNumToBuffer)(l,"le",8),(0,s.bigNumToBuffer)(u,"le",8)],o.AUCTION_HOUSE_PROGRAM_ID)}))},t.getAuctionHouseBuyerEscrow=function(t,n){return r.__awaiter(this,void 0,void 0,(function*(){return yield i.PublicKey.findProgramAddress([e.from(o.AUCTION_HOUSE),t.toBuffer(),n.toBuffer()],o.AUCTION_HOUSE_PROGRAM_ID)}))}}).call(this,n(7).Buffer)},470:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cryptoPunksAbi=t.createCryptoPunksMarketContract=void 0,t.createCryptoPunksMarketContract=function(e,n){return e.createContract(t.cryptoPunksAbi,n)},t.cryptoPunksAbi=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"punksOfferedForSale",outputs:[{name:"isForSale",type:"bool"},{name:"punkIndex",type:"uint256"},{name:"seller",type:"address"},{name:"minValue",type:"uint256"},{name:"onlySellTo",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"}],name:"enterBidForPunk",outputs:[],payable:!0,type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"},{name:"minPrice",type:"uint256"}],name:"acceptBidForPunk",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"addresses",type:"address[]"},{name:"indices",type:"uint256[]"}],name:"setInitialOwners",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[],name:"withdraw",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[],name:"imageHash",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"nextPunkIndexToAssign",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"punkIndexToAddress",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[],name:"standard",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"punkBids",outputs:[{name:"hasBid",type:"bool"},{name:"punkIndex",type:"uint256"},{name:"bidder",type:"address"},{name:"value",type:"uint256"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[],name:"allInitialOwnersAssigned",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[],name:"allPunksAssigned",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"}],name:"buyPunk",outputs:[],payable:!0,type:"function"},{constant:!1,inputs:[{name:"to",type:"address"},{name:"punkIndex",type:"uint256"}],name:"transferPunk",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"}],name:"withdrawBidForPunk",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"to",type:"address"},{name:"punkIndex",type:"uint256"}],name:"setInitialOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"},{name:"minSalePriceInWei",type:"uint256"},{name:"toAddress",type:"address"}],name:"offerPunkForSaleToAddress",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[],name:"punksRemainingToAssign",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"},{name:"minSalePriceInWei",type:"uint256"}],name:"offerPunkForSale",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"}],name:"getPunk",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"pendingWithdrawals",outputs:[{name:"",type:"uint256"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"punkIndex",type:"uint256"}],name:"punkNoLongerForSale",outputs:[],payable:!1,type:"function"},{inputs:[],payable:!0,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"punkIndex",type:"uint256"}],name:"Assign",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"punkIndex",type:"uint256"}],name:"PunkTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"punkIndex",type:"uint256"},{indexed:!1,name:"minValue",type:"uint256"},{indexed:!0,name:"toAddress",type:"address"}],name:"PunkOffered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"punkIndex",type:"uint256"},{indexed:!1,name:"value",type:"uint256"},{indexed:!0,name:"fromAddress",type:"address"}],name:"PunkBidEntered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"punkIndex",type:"uint256"},{indexed:!1,name:"value",type:"uint256"},{indexed:!0,name:"fromAddress",type:"address"}],name:"PunkBidWithdrawn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"punkIndex",type:"uint256"},{indexed:!1,name:"value",type:"uint256"},{indexed:!0,name:"fromAddress",type:"address"},{indexed:!0,name:"toAddress",type:"address"}],name:"PunkBought",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"punkIndex",type:"uint256"}],name:"PunkNoLongerForSale",type:"event"}]},471:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc20Abi=t.createErc20Contract=void 0,t.createErc20Contract=function(e,n){return e.createContract(t.erc20Abi,n)},t.erc20Abi=[{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"}]},474:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nonImplementedAction=t.notImplemented=t.getNonImplementedAction=t.getNotImplementedFn=void 0;const r=n(99);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Not implemented";return()=>{throw new a(e)}}t.getNotImplementedFn=i;class a extends Error{constructor(e){super(e),this.name="NotImplementedError",Object.setPrototypeOf(this,a.prototype)}}function o(e){return r.Action.create({id:"non-implemented",run:i(e)})}t.getNonImplementedAction=o,t.notImplemented=i(),t.nonImplementedAction=o()},482:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID=t.AUCTION_HOUSE_PROGRAM_ID=t.TOKEN_METADATA_PROGRAM_ID=t.WRAPPED_SOL_MINT=t.AUCTION_HOUSE=void 0;const r=n(18);t.AUCTION_HOUSE="auction_house",t.WRAPPED_SOL_MINT=new r.PublicKey("So11111111111111111111111111111111111111112"),t.TOKEN_METADATA_PROGRAM_ID=new r.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),t.AUCTION_HOUSE_PROGRAM_ID=new r.PublicKey("hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk"),t.SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID=new r.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL")},483:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractPublicKey=t.extractAddress=void 0;const r=n(656);function i(e){return e.slice(e.indexOf(":")+1)}t.extractAddress=i,t.extractPublicKey=function(e){return(0,r.toPublicKey)(i(e))}},547:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStateDisconnected=t.getStateConnecting=t.getStateConnected=t.STATE_INITIALIZING=void 0;const r={status:"disconnected"};t.STATE_INITIALIZING={status:"initializing"},t.getStateConnected=function(e){return Object.assign({status:"connected"},e)},t.getStateConnecting=function(e){return Object.assign({status:"connecting"},e)},t.getStateDisconnected=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0===e.error?r:Object.assign({status:"disconnected"},e)}},552:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MintType=void 0,function(e){e.OFF_CHAIN="off-chain",e.ON_CHAIN="on-chain"}(t.MintType||(t.MintType={}))},553:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNetworkConfigByChainId=t.getEthereumConfig=t.configDictionary=void 0;const r=n(1813),i=n(1821),a=n(1822),o=n(1823),s=n(1824),d=n(1825),c=n(1826),u=n(1827),l=n(1828),p=n(1829),y=n(1830),m=n(1831),f=n(1832),h=n(1833),b=n(1834),T=n(1835),v=n(1836),g=n(1837),E=n(1838),_=n(1839),O=n(1840);t.configDictionary={mainnet:r.mainnetConfig,mumbai:i.mumbaiConfig,polygon:a.polygonConfig,"dev-ethereum":o.devEthereumConfig,"dev-polygon":s.devPolygonConfig,mantle:u.mantleConfig,"testnet-mantle":c.mantleTestnetConfig,testnet:d.testnetEthereumConfig,"testnet-arbitrum":l.arbitrumTestnetConfig,arbitrum:p.arbitrumConfig,"testnet-zksync":y.zkSyncTestnetConfig,zksync:m.zkSyncConfig,chiliz:f.chilizConfig,"testnet-chiliz":h.chilizTestnetConfig,lightlink:b.lightlinkConfig,"testnet-lightlink":T.testnetLightlinkConfig,"testnet-rari":v.rariTestnetConfig,rari:g.rariMainnetConfig,zkatana:E.zkatanaConfig,base:_.baseConfig,"base-sepolia":O.baseSepoliaConfig},t.getEthereumConfig=function(e){return t.configDictionary[e]},t.getNetworkConfigByChainId=function(e){const n=Object.values(t.configDictionary).find((t=>t.chainId===e));if(!n)throw new Error("ChainID ".concat(e," is not found in list of supported chains"));return n}},554:function(e,t,n){"use strict";function r(e){return"ERC20"===e.assetClass}Object.defineProperty(t,"__esModule",{value:!0}),t.isRari=t.isWeth=t.isErc1155=t.isErc721=t.isErc20=t.isETH=void 0,t.isETH=function(e){return"ETH"===e.assetClass},t.isErc20=r,t.isErc721=function(e){return"ERC721"===e.assetClass},t.isErc1155=function(e){return"ERC1155"===e.assetClass},t.isWeth=function(e,t){return r(e)&&e.contract===t.weth},t.isRari=function(e,t){return r(e)&&e.contract===t.rari}},555:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAssetTransferProxy=t.pureApproveFn=t.approve=void 0;const r=n(11),i=n(1074),a=n(1075),o=n(1076),s=n(1852);function d(e){let{ethereum:t,send:n,operator:d,owner:c,asset:u,infinite:l}=e;return r.__awaiter(this,void 0,void 0,(function*(){switch(u.assetType.assetClass){case"ERC20":{const e=u.assetType.contract;return(0,i.approveErc20)(t,n,e,c,d,u.value,void 0===l||l)}case"ERC721":{const e=u.assetType.contract;return(0,a.approveErc721)(t,n,e,c,d)}case"ERC1155":{const e=u.assetType.contract;return(0,o.approveErc1155)(t,n,e,c,d)}case"ERC721_LAZY":const e=u.assetType.contract;return(0,a.approveErc721)(t,n,e,c,d);case"ERC1155_LAZY":{const e=u.assetType.contract;return(0,o.approveErc1155)(t,n,e,c,d)}case"CRYPTO_PUNKS":{const e=u.assetType.contract;return(0,s.approveCryptoPunk)(t,n,e,c,d,u.assetType.tokenId)}default:return}}))}function c(e,t){switch(e){case"ERC20":return t.erc20;case"ERC721":case"ERC1155":return t.nft;case"ERC721_LAZY":return t.erc721Lazy;case"ERC1155_LAZY":return t.erc1155Lazy;case"CRYPTO_PUNKS":return t.cryptoPunks;default:return}}t.approve=function(e,t,n,i,a){let o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return r.__awaiter(this,void 0,void 0,(function*(){const r=yield n(),s=c(a.assetType.assetClass,r.transferProxies);if(s)return d({ethereum:e,send:t,operator:s,owner:i,asset:a,infinite:o})}))},t.pureApproveFn=d,t.getAssetTransferProxy=c},556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc721Abi=t.createErc721Contract=void 0,t.createErc721Contract=function(e,n){return e.createContract(t.erc721Abi,n)},t.erc721Abi=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"baseURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}]},557:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc1155Abi=t.createErc1155Contract=void 0,t.createErc1155Contract=function(e,n){return e.createContract(t.erc1155Abi,n)},t.erc1155Abi=[{inputs:[{internalType:"string",name:"uri_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}]},558:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isErc1155v1Collection=t.isErc1155v2Collection=t.isErc721v1Collection=t.isErc721v2Collection=t.isErc721v3Collection=t.mint=t.MintResponseTypeEnum=void 0;const r=n(11),i=n(373),a=n(413),o=n(2012),s=n(1084);!function(e){e.OFF_CHAIN="off-chain",e.ON_CHAIN="on-chain"}(t.MintResponseTypeEnum||(t.MintResponseTypeEnum={})),t.mint=function(e,t,n,i,y){return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet undefined");if(void 0===y.uri)throw new a.Warning("URI should be not undefined");const r=yield i();if(l(y))return u(y)?y.lazy?(0,o.mintOffChain)(e,n,r.nftCollection,r.nftLazyMint,y):(0,s.mintErc1155v2)(e,t,r.nftCollection,y):(0,s.mintErc1155v1)(e,t,r.nftCollection,y);if(p(y))return c(y)?y.lazy?(0,o.mintOffChain)(e,n,r.nftCollection,r.nftLazyMint,y):(0,s.mintErc721v3)(e,t,r.nftCollection,y):d(y)?(0,s.mintErc721v2)(e,t,r.nftCollection,y):(0,s.mintErc721v1)(e,t,r.nftCollection,y);throw new Error("Unsupported collection")}))};const d=e=>(0,t.isErc721v2Collection)(e.collection),c=e=>(0,t.isErc721v3Collection)(e.collection),u=e=>(0,t.isErc1155v2Collection)(e.collection),l=e=>"ERC1155"===e.collection.type,p=e=>"ERC721"===e.collection.type;t.isErc721v3Collection=e=>-1!==e.features.indexOf(i.NftCollectionFeatures.MINT_AND_TRANSFER)&&"ERC721"===e.type;t.isErc721v2Collection=e=>-1!==e.features.indexOf(i.NftCollectionFeatures.SECONDARY_SALE_FEES)&&"ERC721"===e.type;t.isErc721v1Collection=e=>!(0,t.isErc721v3Collection)(e)&&!(0,t.isErc721v2Collection)(e)&&"ERC721"===e.type;t.isErc1155v2Collection=e=>-1!==e.features.indexOf(i.NftCollectionFeatures.MINT_AND_TRANSFER)&&"ERC1155"===e.type;t.isErc1155v1Collection=e=>!(0,t.isErc1155v2Collection)(e)&&"ERC1155"===e.type},559:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErc721Contract=void 0;const r=n(11),i=n(414);t.getErc721Contract=function(e,t,a){return r.__awaiter(this,void 0,void 0,(function*(){switch(t){case i.ERC721VersionEnum.ERC721V3:{const{erc721v3Abi:t}=yield Promise.resolve().then((()=>r.__importStar(n(2013))));return e.createContract(t,a)}case i.ERC721VersionEnum.ERC721V2:{const{erc721v2Abi:t}=yield Promise.resolve().then((()=>r.__importStar(n(2014))));return e.createContract(t,a)}case i.ERC721VersionEnum.ERC721V1:{const{erc721v1Abi:t}=yield Promise.resolve().then((()=>r.__importStar(n(2015))));return e.createContract(t,a)}default:throw new Error("Unsupported ERC721 version")}}))}},560:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getItemToCriteriaMap=t.generateCriteriaResolvers=void 0;const r=n(271),i=n(272);t.generateCriteriaResolvers=e=>{let{orders:t,offerCriterias:n=[[]],considerationCriterias:a=[[]]}=e;const o=t.flatMap(((e,t)=>e.parameters.offer.map(((e,n)=>({orderIndex:t,item:e,index:n,side:r.Side.OFFER}))).filter((e=>{let{item:t}=e;return(0,i.isCriteriaItem)(t.itemType)})))),s=t.flatMap(((e,t)=>e.parameters.consideration.map(((e,n)=>({orderIndex:t,item:e,index:n,side:r.Side.CONSIDERATION}))).filter((e=>{let{item:t}=e;return(0,i.isCriteriaItem)(t.itemType)})))),d=(e,t)=>e.map((e=>{let{orderIndex:n,item:r,index:i,side:a}=e;const o=r.identifierOrCriteria||"0",s=t[n][i];return{orderIndex:n,index:i,side:a,identifier:s.identifier,criteriaProof:"0"===o?[]:s.proof}}));return[...d(o,n),...d(s,a)]};t.getItemToCriteriaMap=(e,t)=>{const n=[...t];return e.reduce(((e,t)=>((0,i.isCriteriaItem)(t.itemType)&&e.set(t,n.shift()),e)),new Map)}},561:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrice=void 0;const r=n(11),i=n(147),a=n(1111);t.getPrice=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield(0,a.getDecimals)(e,t);switch(t.assetClass){case"ETH":return(0,i.toBn)(n).multipliedBy((0,i.toBn)(10).pow(r));case"ERC20":return(0,i.toBn)(n).multipliedBy((0,i.toBn)(10).pow(Number(r)));default:throw new Error("Asset type should be either ETH or ERC-20, received=".concat(JSON.stringify(t)))}}))}},562:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testAuctionAbi=t.createEthereumAuctionContract=void 0,t.createEthereumAuctionContract=function(e,n){return e.createContract(t.testAuctionAbi,n)},t.testAuctionAbi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"auctionId",type:"uint256"}],name:"AuctionCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"auctionId",type:"uint256"},{components:[{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"sellAsset",type:"tuple"},{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"buyAsset",type:"tuple"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct AuctionHouseBase.Bid",name:"lastBid",type:"tuple"},{internalType:"address payable",name:"seller",type:"address"},{internalType:"address payable",name:"buyer",type:"address"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"minimalStep",type:"uint256"},{internalType:"uint256",name:"minimalPrice",type:"uint256"},{internalType:"uint256",name:"protocolFee",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],indexed:!1,internalType:"struct AuctionHouseBase.Auction",name:"auction",type:"tuple"}],name:"AuctionCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"auctionId",type:"uint256"},{components:[{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"sellAsset",type:"tuple"},{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"buyAsset",type:"tuple"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct AuctionHouseBase.Bid",name:"lastBid",type:"tuple"},{internalType:"address payable",name:"seller",type:"address"},{internalType:"address payable",name:"buyer",type:"address"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"minimalStep",type:"uint256"},{internalType:"uint256",name:"minimalPrice",type:"uint256"},{internalType:"uint256",name:"protocolFee",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],indexed:!1,internalType:"struct AuctionHouseBase.Auction",name:"auction",type:"tuple"}],name:"AuctionFinished",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"auctionId",type:"uint256"},{indexed:!1,internalType:"address",name:"buyer",type:"address"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],indexed:!1,internalType:"struct AuctionHouseBase.Bid",name:"bid",type:"tuple"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"BidPlaced",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes4",name:"assetType",type:"bytes4"},{indexed:!1,internalType:"address",name:"proxy",type:"address"}],name:"ProxyChange",type:"event"},{anonymous:!1,inputs:[{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],indexed:!1,internalType:"struct LibAsset.Asset",name:"asset",type:"tuple"},{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"bytes4",name:"transferDirection",type:"bytes4"},{indexed:!1,internalType:"bytes4",name:"transferType",type:"bytes4"}],name:"Transfer",type:"event"},{inputs:[],name:"defaultFeeReceiver",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"feeReceivers",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_collection",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getAuctionByToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155BatchReceived",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC721Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"royaltiesRegistry",outputs:[{internalType:"contract IRoyaltiesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address payable",name:"newDefaultFeeReceiver",type:"address"}],name:"setDefaultFeeReceiver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"wallet",type:"address"}],name:"setFeeReceiver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newProtocolFee",type:"uint256"}],name:"setProtocolFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IRoyaltiesProvider",name:"newRoyaltiesRegistry",type:"address"}],name:"setRoyaltiesRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"assetType",type:"bytes4"},{internalType:"address",name:"proxy",type:"address"}],name:"setTransferProxy",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract INftTransferProxy",name:"_transferProxy",type:"address"},{internalType:"contract IERC20TransferProxy",name:"_erc20TransferProxy",type:"address"},{internalType:"uint256",name:"newProtocolFee",type:"uint256"},{internalType:"address",name:"newDefaultFeeReceiver",type:"address"},{internalType:"contract IRoyaltiesProvider",name:"newRoyaltiesProvider",type:"address"}],name:"__AuctionHouse_init",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"assetType",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct LibAsset.Asset",name:"_sellAsset",type:"tuple"},{components:[{internalType:"bytes4",name:"assetClass",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct LibAsset.AssetType",name:"_buyAsset",type:"tuple"},{internalType:"uint256",name:"minimalStep",type:"uint256"},{internalType:"uint256",name:"minimalPrice",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],name:"startAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct AuctionHouseBase.Bid",name:"bid",type:"tuple"}],name:"putBid",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"getMinimalNextBid",outputs:[{internalType:"uint256",name:"minBid",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"checkAuctionExistence",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"finishAuction",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"checkAuctionRangeTime",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"cancel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"},{components:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes4",name:"dataType",type:"bytes4"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct AuctionHouseBase.Bid",name:"bid",type:"tuple"}],name:"buyOut",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"getCurrentBuyer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_auctionId",type:"uint256"}],name:"putBidWrapper",outputs:[],stateMutability:"payable",type:"function"}]},563:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultExpirationDateTimestamp=t.isDate=t.convertDateToTimestamp=void 0;const r=n(210);function i(e){if(!e||!a(e))throw new r.Warning("convertDateToTimestamp: expected Date type");return Math.floor(e.getTime()/1e3)}function a(e){return e instanceof Date}t.convertDateToTimestamp=i,t.isDate=a,t.getDefaultExpirationDateTimestamp=function(){return i(new Date)+2592e3}},564:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreparedTransaction=void 0;const r=n(11),i=n(1139);t.PreparedTransaction=class{constructor(e,t,n,r,i){this.connection=e,this.data=t,this.signer=n,this.logger=r,this.onSubmit=i}submit(e){var t;return r.__awaiter(this,void 0,void 0,(function*(){const n=yield(0,i.sendTransactionWithRetry)(this.connection,this.signer,this.data.instructions,this.data.signers,e,this.logger);return null===(t=this.onSubmit)||void 0===t||t.call(this,n),n}))}}},586:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isErc721v1Collection=t.isErc1155v1Collection=t.isErc721v3Collection=t.isErc721v2Collection=t.isErc1155v2Collection=t.createRaribleSdk=void 0;const r=n(11),i=n(20),a=n(553),o=n(1841),s=n(555),d=n(1853),c=n(812),u=n(1863),l=r.__importStar(n(1864)),p=n(642),y=n(558),m=n(2018),f=n(2023),h=n(2025),b=n(2026),T=n(2028),v=n(2048),g=n(2100),E=n(833),_=n(2111),O=n(2114),A=n(2117),w=n(821),k=n(2118),C=n(2121),S=n(2123),I=n(2124),R=n(2125),x=n(2126),P=n(822),B=n(653),j=n(2127),F=n(2129),M=n(832),D=n(270);function N(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rr.__awaiter(this,void 0,void 0,(function*(){return(0,a.getNetworkConfigByChainId)(yield(0,D.getRequiredWallet)(e).getChainId())})),H=(0,b.createEthereumApis)(t,Object.assign(Object.assign({},(null===n||void 0===n?void 0:n.apiClientParams)||{}),{apiKey:null===n||void 0===n?void 0:n.apiKey})),K=b.getApis.bind(null,e,t,n),z=N((0,T.getSendWithInjects)({logger:{instance:(0,P.createRemoteLogger)({ethereum:e,env:(0,P.getEnvironment)(t),sessionId:null===(L=null===n||void 0===n?void 0:n.logs)||void 0===L?void 0:L.session,apiKey:null===n||void 0===n?void 0:n.apiKey}),level:null!==(U=null===(V=null===n||void 0===n?void 0:n.logs)||void 0===V?void 0:V.level)&&void 0!==U?U:w.LogsLevel.DISABLED}})),Z=N(l.checkLazyAssetType,K),G=N(l.checkLazyAsset,Z),q=l.checkLazyOrder.bind(null,G),Y=N(p.checkAssetType,K),X=E.getBaseFee.bind(null,t,K),J=new g.OrderFiller(e,z,W,K,X,t,n),Q=new F.BatchOrderFiller(e,z,W,K,X,t,n),$=N(s.approve,e,z,W),ee=new o.UpsertOrder(J,z,W,q,$,N(c.signOrder,e,W),K,e,(0,i.toWord)((0,M.getUpdatedCalldata)(n))),te=new d.OrderSell(ee,Y),ne=new u.OrderBid(ee,Y),re=new k.ConvertWeth(e,z,W),ie=new C.StartAuction(e,z,W,t,$,K),ae=new R.PutAuctionBid(e,z,W,t,$,K),oe=new x.BuyoutAuction(e,z,W,t,$,K);return{apis:H,order:{sell:te.sell,sellUpdate:te.update,fill:J.fill,buy:J.buy,buyBatch:Q.buy,acceptBid:J.acceptBid,getFillTxData:J.getTransactionData,getBuyTxData:J.getBuyTx,bid:ne.bid,bidUpdate:ne.update,upsert:ee.upsert,cancel:N(v.cancel,q,e,z,W,K),getBaseOrderFee:X,getBaseOrderFillFee:J.getBaseOrderFillFee,getBuyAmmInfo:J.getBuyAmmInfo},auction:{start:ie.start,cancel:S.cancelAuction.bind(null,e,z,W,K),finish:I.finishAuction.bind(null,e,z,W,K),putBid:ae.putBid,buyOut:oe.buyout,getHash:B.getAuctionHash.bind(null,e,W)},nft:{mint:N(y.mint,e,z,N(f.signNft,e,W),K),transfer:N(m.transfer,e,z,Y,K),burn:N(h.burn,e,z,Y,K),deploy:{erc721:new _.DeployErc721(e,z,W),erc1155:new O.DeployErc1155(e,z,W)},cryptoPunks:{approveForWrapper:N(j.approveForWrapper,e,z,W),wrap:N(j.wrapPunk,e,z,W),unwrap:N(j.unwrapPunk,e,z,W)}},balances:{getBalance:new A.Balances(K).getBalance,convert:re.convert,deposit:re.deposit,depositWei:re.depositWei,withdraw:re.withdraw,withdrawWei:re.withdrawWei,getWethContractAddress:re.getWethContractAddress}}};var L=n(558);Object.defineProperty(t,"isErc1155v2Collection",{enumerable:!0,get:function(){return L.isErc1155v2Collection}}),Object.defineProperty(t,"isErc721v2Collection",{enumerable:!0,get:function(){return L.isErc721v2Collection}}),Object.defineProperty(t,"isErc721v3Collection",{enumerable:!0,get:function(){return L.isErc721v3Collection}}),Object.defineProperty(t,"isErc1155v1Collection",{enumerable:!0,get:function(){return L.isErc1155v1Collection}}),Object.defineProperty(t,"isErc721v1Collection",{enumerable:!0,get:function(){return L.isErc721v1Collection}}),r.__exportStar(n(372),t),r.__exportStar(n(820),t),r.__exportStar(n(2131),t),r.__exportStar(n(2132),t)},64:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getRaribleWallet=t.WalletType=t.isBlockchainWallet=t.ImmutableXWallet=t.SolanaWallet=t.TezosWallet=t.FlowWallet=t.EthereumWallet=void 0;const r=n(11),i=n(1687);Object.defineProperty(t,"WalletType",{enumerable:!0,get:function(){return i.WalletType}});class a{constructor(e){this.ethereum=e,this.walletType=i.WalletType.ETHEREUM}signPersonalMessage(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.ethereum.getFrom();if(!t)throw new Error("Not connected to Ethereum blockchain");return{signature:yield this.ethereum.personalSign(e),publicKey:t}}))}}t.EthereumWallet=a;class o{constructor(e,t){this.fcl=e,this.auth=t,this.walletType=i.WalletType.FLOW}getAuth(){return this.auth}signPersonalMessage(t){return r.__awaiter(this,void 0,void 0,(function*(){if(!t.length)throw new Error("Message can't be empty");const n=e.from(t).toString("hex");if(this.auth)return this._getSignatureFromAuth(n);const r=this.fcl.currentUser(),i=(yield this.fcl.currentUser().snapshot()).addr;if(!i)throw new Error("Not connected to Flow blockchain");const a=yield this.fcl.account(i),o=yield r.signUserMessage(n);if("string"===typeof o)throw new Error(o);const s=o.find((e=>e.addr.toLowerCase()===i.toLowerCase()));if(s){const e=a.keys.find((e=>e.index===s.keyId));if(!e)throw new Error('Key with index "'.concat(s.keyId,'" not found on account with address ').concat(i));return{signature:s.signature,publicKey:e.publicKey}}throw new Error('Signature of user address "'.concat(i,'" not found'))}))}_getSignatureFromAuth(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.auth)throw new Error("Auth was not been passed");const t=yield this.auth(),n=yield t.signingFunction({message:e,addr:t.addr});if(!n||!n.signature)throw new Error('Signature of user address "'.concat(t.addr,'" not found'));const r=(yield this.fcl.account(t.addr)).keys.find((e=>e.index===n.keyId));if(!r)throw new Error('Key with index "'.concat(n.keyId,'" not found on account with address ').concat(t.addr));return{signature:n.signature,publicKey:r.publicKey}}))}}t.FlowWallet=o;class s{constructor(e){this.provider=e,this.walletType=i.WalletType.TEZOS}sign(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){n=n||"message";const r=yield e.public_key();if(void 0===r)throw new Error("cannot get public key from provider");const i=yield e.sign(t,n);return Object.assign({edpk:r},i)}))}signPersonalMessage(e){return r.__awaiter(this,void 0,void 0,(function*(){if(void 0===(yield this.provider.public_key()))throw new Error("Public key undefined");const t=yield this.sign(this.provider,e,"message");return{signature:t.signature,publicKey:"".concat(t.edpk,"_").concat(t.prefix)}}))}}t.TezosWallet=s;class d{constructor(e){this.provider=e,this.walletType=i.WalletType.SOLANA}signPersonalMessage(t){return r.__awaiter(this,void 0,void 0,(function*(){const n=(new TextEncoder).encode(t),r=yield this.provider.signMessage(n,"utf8");return r.signature?{signature:e.from(r.signature).toString("hex"),publicKey:r.publicKey.toString()}:{signature:e.from(r).toString("hex"),publicKey:this.provider.publicKey.toString()}}))}}t.SolanaWallet=d;class c{constructor(e){this.wallet=e,this.walletType=i.WalletType.IMMUTABLEX}signPersonalMessage(e){return r.__awaiter(this,void 0,void 0,(function*(){return{signature:(yield this.wallet.link.sign({message:e,description:e})).result,publicKey:this.wallet.getConnectionData().address}}))}}t.ImmutableXWallet=c,t.isBlockchainWallet=function(e){return e instanceof a||e instanceof s||e instanceof o||e instanceof d||e instanceof c||(e.walletType===i.WalletType.ETHEREUM&&e.ethereum||e.walletType===i.WalletType.SOLANA&&e.provider||e.walletType===i.WalletType.FLOW&&e.fcl||e.walletType===i.WalletType.TEZOS&&e.provider||e.walletType===i.WalletType.IMMUTABLEX&&e.wallet)&&e.signPersonalMessage};var u=n(1027);Object.defineProperty(t,"getRaribleWallet",{enumerable:!0,get:function(){return u.getRaribleWallet}})}).call(this,n(7).Buffer)},641:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addFee=void 0;const r=n(20),i=n(101);t.addFee=function(e,t){const n=(0,i.toBn)(e.value).multipliedBy((0,i.toBn)(t).plus(1e4)).dividedBy(1e4).integerValue(i.BigNumber.ROUND_FLOOR);return Object.assign(Object.assign({},e),{value:(0,r.toBigNumber)(n.toFixed())})}},642:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkAssetType=void 0;const r=n(11),i=n(20);t.checkAssetType=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=yield e();if("assetClass"in t)return t;{const e=yield n.nftCollection.getNftCollectionByIdRaw({collection:t.contract});if(200!==e.status)throw new Error("Can't get info of NFT collection with id ".concat(t.contract));switch(e.value.type){case"ERC721":case"ERC1155":return Object.assign(Object.assign({},t),{tokenId:(0,i.toBigNumber)("".concat(t.tokenId)),assetClass:e.value.type});case"CRYPTO_PUNKS":return{assetClass:"CRYPTO_PUNKS",contract:t.contract,tokenId:parseInt("".concat(t.tokenId))};default:throw new Error("Unrecognized collection asset class ".concat(e.value.type))}}}))}},643:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErc1155Contract=void 0;const r=n(11),i=n(414);t.getErc1155Contract=function(e,t,a){return r.__awaiter(this,void 0,void 0,(function*(){switch(t){case i.ERC1155VersionEnum.ERC1155V2:{const{erc1155v2Abi:t}=yield Promise.resolve().then((()=>r.__importStar(n(2016))));return e.createContract(t,a)}case i.ERC1155VersionEnum.ERC1155V1:{const{erc1155v1Abi:t}=yield Promise.resolve().then((()=>r.__importStar(n(2017))));return e.createContract(t,a)}default:throw new Error("Unsupported ERC1155 version")}}))}},645:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toVrs=void 0;const r=n(20);t.toVrs=function(e){const t=e.startsWith("0x")?e.substring(2):e,n="0x"+(t.substring(0,64)||r.ZERO_WORD.substring(2)),i="0x"+(t.substring(64,128)||r.ZERO_WORD.substring(2));let a=parseInt(t.substring(128,130),16)||0;const o=1-a%2;let s=parseInt(t.substring(64,66),16);o&&(s|=128);const d="".concat(s.toString(16)).concat(t.substring(66,128));return{r:n,v:a<27?a+27:a,s:i,compact:"".concat(n).concat(d)}}},646:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAssetWithFee=void 0;const r=n(641);t.getAssetWithFee=function(e,t){return"ETH"===e.assetType.assetClass||"ERC20"===e.assetType.assetClass?(0,r.addFee)(e,t):e}},647:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareCaseInsensitive=void 0,t.compareCaseInsensitive=function(e,t){return(null===e||void 0===e?void 0:e.toLowerCase())===(null===t||void 0===t?void 0:t.toLowerCase())}},648:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateStandardFulfillBalancesAndApprovals=t.validateBasicFulfillBalancesAndApprovals=t.validateOfferBalancesAndApprovals=t.getInsufficientBalanceAndApprovalAmounts=t.getBalancesAndApprovals=void 0;const r=n(11),i=n(20),a=n(101),o=n(413),s=n(556),d=n(471),c=n(272),u=n(560),l=n(272),p=n(2061),y=n(271);t.getBalancesAndApprovals=e=>{let{ethereum:t,owner:n,items:o,criterias:c,operator:m}=e;return r.__awaiter(void 0,void 0,void 0,(function*(){const e=(0,u.getItemToCriteriaMap)(o,c);return Promise.all(o.map((o=>r.__awaiter(void 0,void 0,void 0,(function*(){var r,c;let u=(0,a.toBn)(0);if((0,l.isErc721Item)(o.itemType)||(0,l.isErc1155Item)(o.itemType)){const e=(0,s.createErc721Contract)(t,(0,i.toAddress)(o.token));u=(yield e.functionCall("isApprovedForAll",n,m).call())?(0,a.toBn)(y.MAX_INT):(0,a.toBn)(0)}else if((0,l.isErc20Item)(o.itemType)){const e=(0,d.createErc20Contract)(t,(0,i.toAddress)(o.token));u=(0,a.toBn)(yield e.functionCall("allowance",n,m).call())}else u=(0,a.toBn)(y.MAX_INT);return{token:o.token,identifierOrCriteria:null!==(c=null===(r=e.get(o))||void 0===r?void 0:r.identifier)&&void 0!==c?c:o.identifierOrCriteria,balance:yield(0,p.balanceOf)(t,n,o,e.get(o)),approvedAmount:u,itemType:o.itemType}})))))}))};t.getInsufficientBalanceAndApprovalAmounts=e=>{let{balancesAndApprovals:t,tokenAndIdentifierAmounts:n,operator:r}=e;const i=[...Object.entries(n).map((e=>{let[t,n]=e;return Object.entries(n).map((e=>{let[n,r]=e;return[t,n,r]}))}))].flat(),a=e=>i.filter((n=>{let[r,i,a]=n;return f(t,r,i)[e].lt(a)})).map((n=>{let[r,i,a]=n;const o=f(t,r,i);return{token:r,identifierOrCriteria:i,requiredAmount:a,amountHave:o[e],itemType:o.itemType}})),[o,s]=[a("balance"),a("approvedAmount").map((e=>({token:e.token,identifierOrCriteria:e.identifierOrCriteria,approvedAmount:e.amountHave,requiredApprovedAmount:e.requiredAmount,itemType:e.itemType,operator:r})))];return{insufficientBalances:o,insufficientApprovals:s}};t.validateOfferBalancesAndApprovals=e=>{let{offer:n,criterias:r,balancesAndApprovals:i,timeBasedItemParams:a,throwOnInsufficientBalances:o=!0,throwOnInsufficientApprovals:s,operator:d}=e;const{insufficientBalances:u,insufficientApprovals:l}=(0,t.getInsufficientBalanceAndApprovalAmounts)({balancesAndApprovals:i,tokenAndIdentifierAmounts:(0,c.getSummedTokenAndIdentifierAmounts)({items:n,criterias:r,timeBasedItemParams:a?Object.assign(Object.assign({},a),{isConsiderationItem:!1}):void 0}),operator:d});if(o&&u.length>0)throw new Error("The offerer does not have the amount needed to create or fulfill.");if(s&&l.length>0)throw new Error("The offerer does not have the sufficient approvals.");return l};t.validateBasicFulfillBalancesAndApprovals=e=>{let{offer:n,consideration:r,offererBalancesAndApprovals:i,fulfillerBalancesAndApprovals:a,timeBasedItemParams:o,offererOperator:s,fulfillerOperator:d,disableCheckingBalances:u}=e;(0,t.validateOfferBalancesAndApprovals)({offer:n,criterias:[],balancesAndApprovals:i,timeBasedItemParams:o,throwOnInsufficientApprovals:!0,operator:s});const l=r.filter((e=>e.itemType!==n[0].itemType)),{insufficientBalances:p,insufficientApprovals:y}=(0,t.getInsufficientBalanceAndApprovalAmounts)({balancesAndApprovals:a,tokenAndIdentifierAmounts:(0,c.getSummedTokenAndIdentifierAmounts)({items:l,criterias:[],timeBasedItemParams:Object.assign(Object.assign({},o),{isConsiderationItem:!0})}),operator:d});if(!u&&p.length>0)throw new Error("The fulfiller does not have the balances needed to fulfill.");return y};t.validateStandardFulfillBalancesAndApprovals=e=>{let{offer:n,consideration:r,offerCriteria:i,considerationCriteria:a,offererBalancesAndApprovals:o,fulfillerBalancesAndApprovals:s,timeBasedItemParams:d,offererOperator:u,fulfillerOperator:l,disableCheckingBalances:p}=e;(0,t.validateOfferBalancesAndApprovals)({offer:n,criterias:i,balancesAndApprovals:o,timeBasedItemParams:d,throwOnInsufficientApprovals:!0,operator:u});const y=m({items:n,criterias:i,balancesAndApprovals:s,timeBasedItemParams:d}),{insufficientBalances:f,insufficientApprovals:h}=(0,t.getInsufficientBalanceAndApprovalAmounts)({balancesAndApprovals:y,tokenAndIdentifierAmounts:(0,c.getSummedTokenAndIdentifierAmounts)({items:r,criterias:a,timeBasedItemParams:Object.assign(Object.assign({},d),{isConsiderationItem:!0})}),operator:l});if(!p&&f.length>0)throw new Error("The fulfiller does not have the balances needed to fulfill.");return h};const m=e=>{let{items:t,criterias:n,timeBasedItemParams:r,balancesAndApprovals:i}=e;const a=(0,c.getSummedTokenAndIdentifierAmounts)({items:t,criterias:n,timeBasedItemParams:Object.assign(Object.assign({},r),{isConsiderationItem:!1})}),o=i.map((e=>Object.assign({},e)));return Object.entries(a).forEach((e=>{let[t,n]=e;return Object.entries(n).forEach((e=>{let[n,r]=e;const i=f(o,t,n),a=o.indexOf(i);o[a].balance=o[a].balance.plus(r)}))})),o};function f(e,t,n){const r=e.find((e=>{let{token:r,identifierOrCriteria:i}=e;return t.toLowerCase()===r.toLowerCase()&&i.toLowerCase()===n.toLowerCase()}));if(!r)throw new o.Warning("Balances and approvals didn't contain all tokens and identifiers");return r}},649:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAdvancedOrderNumeratorDenominator=t.generateFulfillOrdersFulfillments=t.validateAndSanitizeFromOrderStatus=t.shouldUseBasicFulfill=void 0;const r=n(101),i=n(20),a=n(271),o=n(560),s=n(272),d=n(650),c=n(1101);t.shouldUseBasicFulfill=(e,t)=>{let{offer:n,consideration:o,offerer:c}=e;if(!(0,r.toBn)(t).eq(0))return!1;if(n.length>1||0===o.length)return!1;const u=[...n,...o],l=u.filter((e=>{let{itemType:t}=e;return[a.ItemType.ERC721,a.ItemType.ERC1155].includes(t)})),p=u.filter((e=>{let{itemType:t}=e;return(0,s.isCriteriaItem)(t)}));if((0,s.isNativeCurrencyItem)(n[0]))return!1;if(1!==l.length||0!==p.length)return!1;if(!(0,d.areAllCurrenciesSame)({offer:n,consideration:o}))return!1;if(u.some((e=>{let{startAmount:t,endAmount:n}=e;return t!==n})))return!1;const[y,...m]=o;if(y.recipient.toLowerCase()!==c.toLowerCase())return!1;if(o.length>1&&m.every((e=>e.itemType===n[0].itemType))&&(0,d.totalItemsAmount)(m).endAmount.gt(n[0].endAmount))return!1;const f=u.filter(s.isCurrencyItem),h=f.filter((e=>{let{itemType:t}=e;return t===a.ItemType.NATIVE})).every((e=>{let{token:t}=e;return t===i.ZERO_ADDRESS})),b=f.every((e=>{let{identifierOrCriteria:t}=e;return(0,r.toBn)(t).eq(0)})),T=l.filter((e=>{let{itemType:t}=e;return t===a.ItemType.ERC721})).every((e=>{let{endAmount:t}=e;return"1"===t}));return h&&b&&T},t.validateAndSanitizeFromOrderStatus=function(e,t){const{isValidated:n,isCancelled:i,totalFilled:a,totalSize:o}=t;if((0,r.toBn)(o).gt(0)&&(0,r.toBn)(a).div(o).eq(1))throw new Error("The order you are trying to fulfill is already filled");if(i)throw new Error("The order you are trying to fulfill is cancelled");return n?{parameters:Object.assign({},e.parameters),signature:"0x"}:e},t.generateFulfillOrdersFulfillments=function(e){const t=e=>{let{sourceOrDestination:t,operator:n="",token:r,identifier:i}=e;return"".concat(t,"-").concat(n,"-").concat(r,"-").concat(i)},n={},r={};return e.forEach(((e,r)=>{let{order:i,offererOperator:a,offerCriteria:d}=e;const c=(0,o.getItemToCriteriaMap)(i.parameters.offer,d);return i.parameters.offer.forEach(((e,o)=>{var d,u,l;const p="".concat(t({sourceOrDestination:i.parameters.offerer,operator:a,token:e.token,identifier:null!==(u=null===(d=c.get(e))||void 0===d?void 0:d.identifier)&&void 0!==u?u:e.identifierOrCriteria})).concat((0,s.isErc721Item)(e.itemType)?o:"");n[p]=[...null!==(l=n[p])&&void 0!==l?l:[],{orderIndex:r,itemIndex:o}]}))})),e.forEach(((e,n)=>{let{order:i,considerationCriteria:a,tips:d}=e;const c=(0,o.getItemToCriteriaMap)(i.parameters.consideration,a);return[...i.parameters.consideration,...d].forEach(((e,i)=>{var a,o,d;const u="".concat(t({sourceOrDestination:e.recipient,token:e.token,identifier:null!==(o=null===(a=c.get(e))||void 0===a?void 0:a.identifier)&&void 0!==o?o:e.identifierOrCriteria})).concat((0,s.isErc721Item)(e.itemType)?i:"");r[u]=[...null!==(d=r[u])&&void 0!==d?d:[],{orderIndex:n,itemIndex:i}]}))})),{offerFulfillments:Object.values(n),considerationFulfillments:Object.values(r)}};t.getAdvancedOrderNumeratorDenominator=(e,t)=>{const n=(0,s.getMaximumSizeForOrder)(e),i=(0,r.toBn)(t),a=(0,c.gcd)(i,n),o=t?i.div(a):(0,r.toBn)(1),d=t?n.div(a):(0,r.toBn)(1);return{numerator:"0x".concat(o.toString(16)),denominator:"0x".concat(d.toString(16))}}},650:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseMatchForFulfill=t.mapOrderAmountsFromUnitsToFill=t.mapOrderAmountsFromFilledStatus=t.totalItemsAmount=t.areAllCurrenciesSame=t.mapInputItemToOfferItem=t.deductFees=t.feeToConsiderationItem=void 0;const r=n(101),i=n(20),a=n(2062),o=n(272),s=n(271),d=(e,t)=>(0,r.toBn)(e).multipliedBy((0,r.toBn)(t)).div(s.ONE_HUNDRED_PERCENT_BP);t.feeToConsiderationItem=e=>{let{fee:t,token:n,baseAmount:r,baseEndAmount:a=r}=e;return{itemType:n===i.ZERO_ADDRESS?s.ItemType.NATIVE:s.ItemType.ERC20,token:n,identifierOrCriteria:"0",startAmount:d(r,t.basisPoints).toString(),endAmount:d(a,t.basisPoints).toString(),recipient:t.recipient}};t.deductFees=(e,t)=>{if(!t)return e;const n=t.reduce(((e,t)=>e+t.basisPoints),0);return e.map((e=>Object.assign(Object.assign({},e),{startAmount:(0,o.isCurrencyItem)(e)?(0,r.toBn)(e.startAmount).minus(d(e.startAmount,n)).toString():e.startAmount,endAmount:(0,o.isCurrencyItem)(e)?(0,r.toBn)(e.endAmount).minus(d(e.endAmount,n)).toString():e.endAmount})))};t.mapInputItemToOfferItem=e=>{var t,n,r,o,d,c,u;if("itemType"in e){if("identifiers"in e||"criteria"in e){const i="criteria"in e?e.criteria:new a.MerkleTree(e.identifiers).getRoot();return{itemType:e.itemType===s.ItemType.ERC721?s.ItemType.ERC721_WITH_CRITERIA:s.ItemType.ERC1155_WITH_CRITERIA,token:e.token,identifierOrCriteria:i,startAmount:null!==(t=e.amount)&&void 0!==t?t:"1",endAmount:null!==(r=null!==(n=e.endAmount)&&void 0!==n?n:e.amount)&&void 0!==r?r:"1"}}return"amount"in e||"endAmount"in e?{itemType:e.itemType,token:e.token,identifierOrCriteria:e.identifier,startAmount:e.amount,endAmount:null!==(d=null!==(o=e.endAmount)&&void 0!==o?o:e.amount)&&void 0!==d?d:"1"}:{itemType:e.itemType,token:e.token,identifierOrCriteria:e.identifier,startAmount:"1",endAmount:"1"}}return{itemType:e.token&&e.token!==i.ZERO_ADDRESS?s.ItemType.ERC20:s.ItemType.NATIVE,token:null!==(c=e.token)&&void 0!==c?c:i.ZERO_ADDRESS,identifierOrCriteria:"0",startAmount:e.amount,endAmount:null!==(u=e.endAmount)&&void 0!==u?u:e.amount}};t.areAllCurrenciesSame=e=>{let{offer:t,consideration:n}=e;const r=[...t,...n].filter(o.isCurrencyItem);return r.every((e=>{let{itemType:t,token:n}=e;return t===r[0].itemType&&n.toLowerCase()===r[0].token.toLowerCase()}))};t.totalItemsAmount=e=>{(0,r.toBn)(0),(0,r.toBn)(0);return e.map((e=>{let{startAmount:t,endAmount:n}=e;return{startAmount:t,endAmount:n}})).reduce(((e,t)=>{let{startAmount:n,endAmount:r}=e,{startAmount:i,endAmount:a}=t;return{startAmount:n.plus(i),endAmount:r.plus(a)}}),{startAmount:(0,r.toBn)(0),endAmount:(0,r.toBn)(0)})};t.mapOrderAmountsFromFilledStatus=(e,t)=>{let{totalFilled:n,totalSize:i}=t;if((0,r.toBn)(n).eq(0)||(0,r.toBn)(i).eq(0))return e;const a=(0,r.toBn)(i).minus(n).multipliedBy(s.ONE_HUNDRED_PERCENT_BP).div(i);return{parameters:Object.assign(Object.assign({},e.parameters),{offer:e.parameters.offer.map((e=>Object.assign(Object.assign({},e),{startAmount:d(e.startAmount,a).toString(),endAmount:d(e.endAmount,a).toString()}))),consideration:e.parameters.consideration.map((e=>Object.assign(Object.assign({},e),{startAmount:d(e.startAmount,a).toString(),endAmount:d(e.endAmount,a).toString()})))}),signature:e.signature}};const c=(e,t,n)=>(0,r.toBn)(e).multipliedBy(t).div(n);t.mapOrderAmountsFromUnitsToFill=(e,t)=>{let{unitsToFill:n,totalSize:i}=t;const a=(0,r.toBn)(n);if(a.lte(0))throw new Error("Units to fill must be greater than 1");const s=(0,o.getMaximumSizeForOrder)(e);return(0,r.toBn)(i).eq(0)&&(i=s),{parameters:Object.assign(Object.assign({},e.parameters),{offer:e.parameters.offer.map((e=>Object.assign(Object.assign({},e),{startAmount:c(e.startAmount,a,i).toString(),endAmount:c(e.endAmount,a,i).toString()}))),consideration:e.parameters.consideration.map((e=>Object.assign(Object.assign({},e),{startAmount:c(e.startAmount,a,i).toString(),endAmount:c(e.endAmount,a,i).toString()})))}),signature:e.signature}};t.shouldUseMatchForFulfill=()=>!0},653:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.AUCTION_DATA_V1=t.AUCTION_BID_DATA_V1=t.AUCTION_HASH_TYPE=t.AUCTION_DATA_TYPE=t.calculatePartsSum=t.validateAuctionRangeTime=t.getAssetEncodedData=t.getAuctionHash=t.getAuctionOperationOptions=void 0;const r=n(11),i=n(411),a=n(130),o=n(641);t.getAuctionOperationOptions=function(e,t,n){if("ETH"===e.assetClass){return{value:(0,o.addFee)({assetType:e,value:t},n).value}}return{}},t.getAuctionHash=function(n,a,o){return r.__awaiter(this,void 0,void 0,(function*(){if(!n)throw new Error("Wallet is undefined");const r=yield a(),s=n.encodeParameter(t.AUCTION_HASH_TYPE,{contractAddress:r.auction,auctionId:o});return"0x".concat((0,i.keccak256)(e.from(s.substring(2),"hex")).toString("hex"))}))},t.getAssetEncodedData=function(e,t){switch(t.assetClass){case"ETH":return"0x";case"ERC20":return e.encodeParameter("address",t.contract);case"ERC721":case"ERC1155":return e.encodeParameter({components:[{name:"contractAddress",type:"address"},{name:"tokenId",type:"uint256"}],name:"data",type:"tuple"},{contractAddress:t.contract,tokenId:t.tokenId});default:throw new Error("Unrecognized asset for auction")}},t.validateAuctionRangeTime=function(e){if(e.data.startTime){const t=new Date(e.data.startTime).getTime();if(t>0&&t>Date.now())return!1}if(e.endTime){const t=new Date(e.endTime).getTime();if(t>0&&te.value)).reduce(((e,t)=>e+t),0)},t.AUCTION_DATA_TYPE=(0,a.id)("V1"),t.AUCTION_HASH_TYPE={components:[{name:"contractAddress",type:"address"},{name:"auctionId",type:"uint256"}],name:"data",type:"tuple"},t.AUCTION_BID_DATA_V1={components:[{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"payouts",type:"tuple[]"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"originFees",type:"tuple[]"}],name:"data",type:"tuple"},t.AUCTION_DATA_V1={components:[{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"payouts",type:"tuple[]"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"originFees",type:"tuple[]"},{name:"duration",type:"uint96"},{name:"startTime",type:"uint96"},{name:"buyOutPrice",type:"uint96"}],name:"data",type:"tuple"}}).call(this,n(7).Buffer)},654:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetaUploader=void 0;const r=n(11),i=r.__importDefault(n(107)),a=r.__importDefault(n(2134)),o=n(495),s=n(29),d=n(20),c=n(210),u=n(808),l=n(376),p="file",y="/folder/",m="https://ipfs.rarible.com/ipfs";function f(e){return"ipfs://ipfs/".concat(e)}function h(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if(void 0===e)throw new Error("Provide NFT_STORAGE_API_KEY as environment variables!");const n=function(e){const t=e.getAll(p).filter((e=>e instanceof File)).map((e=>e)),n=t.some((e=>e.name.startsWith(y)));if(1===t.length&&!n)return t[0];const r=t.map((e=>new File([e],e.name.replace(y,""),{type:e.type}))),i=new FormData;return r.forEach((e=>i.append(p,e,e.name))),i}(t);try{const t=(yield i.default.create().post(u.NFT_STORAGE_URL,n,{headers:{Authorization:"Bearer ".concat(e)}})).data;return{ipfsHash:t.value.cid,size:t.value.size}}catch(r){throw(0,c.handleAxiosErrorResponse)(r,{code:l.NetworkErrorCode.META_EXTERNAL_ERR}),r}}))}function b(e){if(["http","blob","data"].some((t=>e.startsWith(t))))return e;try{const t=function(e){if(e.startsWith("ipfs://ipfs/"))return e.substring(12);if(e.startsWith("ipfs:///ipfs/"))return e.substring(13);if(-1!==e.indexOf("/ipfs/")){const t=e.indexOf("/ipfs/");return e.substring(t+6)}if(e.startsWith("ipfs://"))return e.substring(7);throw new Error("Cannot extract IPFS hash")}(e);return"".concat(m,"/").concat(t)}catch(t){return"".concat(m,"/").concat(e)}}t.MetaUploader=class{constructor(e,t){this.blockchain=e,this.preprocessMeta=t,this.preprocessMeta=t,this.uploadMeta=this.uploadMeta.bind(this),this.uploadFile=this.uploadFile.bind(this),this.uploadFolder=this.uploadFolder.bind(this)}getRoyalties(e,t){const n=parseFloat(e);return isNaN(n)?void 0:{account:t,value:n}}uploadMeta(e){return r.__awaiter(this,void 0,void 0,(function*(){const{nftStorageApiKey:t,properties:n,royalty:r,accountAddress:i}=e,{files:a}=yield this.uploadFolder(t,{image:n.image,animation:n.animationUrl}),o=i.split(":")[0];if(!(o in s.Blockchain))throw new Error('Value: "'.concat(o,'" is not a supported blockchain type'));const c={blockchain:this.blockchain,name:n.name,description:n.description,image:a.image&&v(a.image),animation:a.animation&&v(a.animation),external:void 0,attributes:n.attributes.map((e=>({key:e.key,trait_type:e.key,value:e.value})))};"SOLANA"===c.blockchain&&r&&(c.royalties=this.getRoyalties(r,(0,d.toUnionAddress)(i)));const u=this.preprocessMeta(c),l=(p="properties.json",y=u,function(e,t,n){return new File(e,n,{type:t})}([JSON.stringify(y)],"application/json",p));var p,y;return this.uploadFile(t,l)}))}uploadFile(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=new FormData,r=T(t);n.append("file",t,r);const{ipfsHash:i}=yield h(e,n);return{originalFile:t,URL:b(i),IPFSURL:f(i)}}))}uploadFolder(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=new FormData,r=Object.keys(t).filter((e=>Boolean(t[e])));r.forEach((e=>{const r=t[e],i="/folder/".concat(e,".").concat(a.default.extension(r.type));n.append("file",r,i)}));const{ipfsHash:i}=yield h(e,n);return{files:r.reduce(((e,n)=>{const r=t[n],o="".concat(n,".").concat(a.default.extension(r.type)),s=f("".concat(i,"/").concat(o));return Object.assign(Object.assign({},e),{[n]:{URL:b(s),IPFSURL:s,originalFile:r}})}),{}),hash:i}}))}};const T=e=>{const t=a.default.extension(e.type);if(!t)throw new Error("Can't determine file type");const n=(0,o.v4)();return"".concat(n,".").concat(t)};function v(e){if(!e.originalFile.type)throw new Error("Unknown file type or your browser can't detect correct file type. Make sure your file have valid extension");return{url:e.IPFSURL,mimeType:e.originalFile.type,fileSize:e.originalFile.size,fileName:e.originalFile.name}}},655:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCollectionType=void 0;const r=n(11),i=n(29),a=r.__importDefault(n(107)),o=n(210),s=n(376);t.getCollectionType=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){let n;try{const{data:r}=yield a.default.get("".concat(e.config.tzkt,"/v1/contracts/").concat(t,"/storage/schema"));n=r}catch(u){throw console.error(u),(0,o.handleAxiosErrorResponse)(u,{code:s.NetworkErrorCode.TEZOS_EXTERNAL_ERR}),new Error("Getting tezos collection data error")}if(!n)throw new o.Warning("Collection ".concat(t," has not been found on that network"));const r="ledger:big_map:object:nat",d="ledger:big_map_flat:nat:address",c=n["schema:object"];if(!c)throw new Error("Schema has not been found for collection ".concat(t));if(r in c||c["assets:object"]&&r in c["assets:object"])return i.CollectionType.TEZOS_MT;if(d in c||c["assets:object"]&&d in c["assets:object"])return i.CollectionType.TEZOS_NFT;throw new Error("Unrecognized tezos collection")}))}},656:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(11).__exportStar(n(2252),t)},658:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(11);r.__exportStar(n(2289),t),r.__exportStar(n(2290),t)},716:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrentProviderId=t.Web3Transaction=t.Web3FunctionCall=t.Web3Contract=t.Web3Ethereum=void 0;const r=n(11),i=n(1028),a=n(20),o=n(123),s=n(1030),d=n(1774),c=n(1775),u=n(1776);t.Web3Ethereum=class{constructor(e){this.config=e,this.send=this.send.bind(this),this.getFrom=this.getFrom.bind(this)}createContract(e,t){return new l(this.config,new this.config.web3.eth.Contract(e,t))}send(e,t){return r.__awaiter(this,void 0,void 0,(function*(){try{return yield(0,d.providerRequest)(this.config.web3.currentProvider,e,t)}catch(n){throw new i.EthereumProviderError(Object.assign(Object.assign({},yield f(this.config)),{error:n,method:"Web3Ethereum.send",data:{method:e,params:t}}))}}))}personalSign(e){return r.__awaiter(this,void 0,void 0,(function*(){let t;try{t=yield this.getFrom();const n=yield this.config.web3.eth.personal.sign(e,t,"");return(0,i.filterErrors)(n),n}catch(n){throw new i.EthereumProviderError(Object.assign(Object.assign({},yield f(this.config)),{error:n,method:"Web3Ethereum.personalSign",data:{message:e}}))}}))}signTypedData(e){return r.__awaiter(this,void 0,void 0,(function*(){let t;try{return t=yield this.getFrom(),yield(0,i.signTypedData)(this.send,t,e)}catch(n){throw new i.EthereumProviderError(Object.assign(Object.assign({},yield f(this.config)),{method:"Web3Ethereum.signTypedData",error:n,data:e}))}}))}getFrom(){return r.__awaiter(this,void 0,void 0,(function*(){try{return yield m(this.config.web3,this.config.from)}catch(e){throw new i.EthereumProviderError(Object.assign(Object.assign({},yield f(this.config)),{method:"Web3Ethereum.getFrom",error:e,data:null}))}}))}encodeParameter(e,t){try{return this.config.web3.eth.abi.encodeParameter(e,t)}catch(n){throw new i.EthereumProviderError(Object.assign(Object.assign({},h(this.config)),{method:"Web3Ethereum.encodeParameter",error:n,data:{type:e,parameter:t}}))}}decodeParameter(e,t){try{return this.config.web3.eth.abi.decodeParameters([e],t)}catch(n){throw new i.EthereumProviderError(Object.assign(Object.assign({},h(this.config)),{method:"Web3Ethereum.decodeParameter",error:n,data:{type:e,data:t}}))}}getBalance(e){return r.__awaiter(this,void 0,void 0,(function*(){try{const t=yield(0,o.conditionalRetry)(5,3e3,(()=>this.config.web3.eth.getBalance(e)),(e=>(null===e||void 0===e?void 0:e.message)===o.FAILED_TO_FETCH_ERROR));return(0,a.toBigNumber)(t)}catch(t){throw new i.EthereumProviderError(Object.assign(Object.assign({},yield f(this.config)),{method:"Web3Ethereum.getBalance",error:t,data:{address:e}}))}}))}getChainId(){return r.__awaiter(this,void 0,void 0,(function*(){try{return+(yield this.config.web3.eth.getChainId())}catch(e){throw new i.EthereumProviderError(Object.assign(Object.assign({},h(this.config)),{method:"Web3Ethereum.getChainId",error:e,data:null}))}}))}getWeb3Instance(){return this.config.web3}getCurrentProvider(){return this.config.web3.currentProvider}};class l{constructor(e,t){this.config=e,this.contract=t}functionCall(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};return r.__awaiter(this,void 0,void 0,(function*(){try{return yield(0,o.conditionalRetry)(5,3e3,(()=>this.sendMethod.estimateGas(e)),(e=>(null===e||void 0===e?void 0:e.message)===o.FAILED_TO_FETCH_ERROR))}catch(t){let r,a=null,s=null;try{[a,r,s]=yield(0,o.promiseSettledRequest)([this.getCallInfo(),this.config.web3.eth.getChainId(),yield this.getData()])}catch(n){}throw new i.EthereumProviderError(Object.assign(Object.assign({},yield f(this.config)),{method:"Web3FunctionCall.estimateGas",chainId:r,error:t,data:Object.assign(Object.assign({},a),{options:e,data:s})}))}}))}call(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.__awaiter(this,void 0,void 0,(function*(){let t;try{return t=this.getGasOptions(e),yield(0,o.conditionalRetry)(5,3e3,(()=>this.sendMethod.call(Object.assign({from:this.config.from},t))),(e=>(null===e||void 0===e?void 0:e.message)===o.FAILED_TO_FETCH_ERROR))}catch(n){let a=null,s=null;try{[a,s]=yield(0,o.promiseSettledRequest)([this.getCallInfo(),this.getData()])}catch(r){}throw new i.EthereumProviderError(Object.assign(Object.assign({},yield f(this.config)),{method:"Web3FunctionCall.call",error:n,data:Object.assign(Object.assign({},a||{}),{data:s,options:e,gasOptions:t})}))}}))}_send(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getGasOptions(e);return r.__awaiter(this,void 0,void 0,(function*(){const[n,r]=yield Promise.all([this.getCallInfo(),this.config.web3.eth.getChainId()]);let o;try{o=yield this.getData();const r=(0,a.toAddress)(n.from);if(e.additionalData){const n=(0,a.toBinary)(e.additionalData).slice(2),i=(0,a.toBinary)(o).slice(2),s="0x".concat(i).concat(n),d=Object.assign({from:r,to:this.contractAddress,data:s,value:e.value},t),u=this.config.web3.eth.sendTransaction(d),l=(0,c.toPromises)(u);return new y(l.receipt,(0,a.toWord)(yield l.hash),(0,a.toBinary)(s),r,this.contractAddress,this.contract.options.jsonInterface)}const i=Object.assign({from:r,value:e.value},t),s=this.sendMethod.send(i),d=(0,c.toPromises)(s);return new y(d.receipt,(0,a.toWord)(yield d.hash),(0,a.toBinary)(o),r,this.contractAddress)}catch(s){throw new i.EthereumProviderError(Object.assign(Object.assign({},h(this.config)),{method:"Web3FunctionCall.send",error:s,chainId:r,data:Object.assign(Object.assign({},n),{options:e,gasOptions:t,data:o,hash:undefined})}))}}))}send(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return r.__awaiter(this,void 0,void 0,(function*(){try{return yield this._send(e)}catch(n){if((0,s.hasMessage)(n)&&(null===(t=null===n||void 0===n?void 0:n.message)||void 0===t?void 0:t.toLowerCase().includes("missing or invalid parameters")))return yield this._send(e,{});throw n}}))}getGasOptions(e){var t,n,r;const i={},a=null!==(n=null===(t=e.gasPrice)||void 0===t?void 0:t.toString())&&void 0!==n?n:this.config.gasPrice;"string"!==typeof a&&"number"!==typeof a||(i.gasPrice=a);const o=null!==(r=e.gas)&&void 0!==r?r:this.config.gas;return"number"!==typeof o&&"string"!==typeof o||(i.gas=o),i}getFrom(){return r.__awaiter(this,void 0,void 0,(function*(){return m(this.config.web3,this.config.from)}))}}t.Web3FunctionCall=p;class y{constructor(e,t,n,r,i,a){this.receipt=e,this.hash=t,this.data=n,this.from=r,this.to=i,this.contractAbi=a}wait(){return r.__awaiter(this,void 0,void 0,(function*(){try{return yield this.receipt}catch(e){throw new i.EthereumProviderError({provider:i.Provider.WEB3,method:"Web3Transaction.wait",error:e,data:{hash:this.hash,data:this.data,from:this.from,to:this.to}})}}))}getEvents(){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.wait(),this.to&&this.contractAbi?(0,u.getTransactionReceiptEvents)(this.receipt,this.to,this.contractAbi):(yield(0,u.getContractMethodReceiptEvents)(this.receipt))||[]}))}}function m(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if(t)return t;const[n]=yield e.eth.getAccounts();if(!n)throw new Error("Wallet is not connected");return n}))}function f(e){return r.__awaiter(this,void 0,void 0,(function*(){const[t,n,r]=yield(0,o.promiseSettledRequest)([m(e.web3,e.from),e.web3.eth.getChainId(),e.web3.eth.getBlockNumber()]);return Object.assign(Object.assign({},h(e)),{chainId:n,signer:t,blockNumber:r})}))}function h(e){return{provider:i.Provider.WEB3,providerId:b(e.web3)}}function b(e){return e&&(0,o.getDappType)(e.currentProvider)||o.DappType.Unknown}t.Web3Transaction=y,t.getCurrentProviderId=b},734:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSimpleFlowFungibleBalance=t.WalletType=t.getCollectionId=t.createRaribleSdk=void 0;const r=n(11),i=n(29),a=n(64);Object.defineProperty(t,"WalletType",{enumerable:!0,get:function(){return a.WalletType}});const o=n(101),s=n(1027),d=n(123),c=n(382),u=n(808),l=n(552),p=n(1812),y=n(2163),m=n(2236),f=n(376),h=n(374),b=n(836),T=n(2239),v=n(2369),g=n(375),E=n(1208),_=n(1135),O=n(2494),A=n(1117),w=n(221);function k(e,t){if((null===e||void 0===e?void 0:e.walletType)===t)return e}function C(e,t){return new g.MethodWithPrepare((t=>e(t)),(n=>r.__awaiter(this,void 0,void 0,(function*(){const[r,i]=yield Promise.all([t.item.getItemById({itemId:n.itemId}),t.collection.getCollectionById({collection:(0,w.getCollectionFromItemId)(n.itemId)})]);i.self&&(yield(0,A.checkRoyalties)(n.itemId,t));const a=yield e.prepare(Object.assign(Object.assign({},n),{blockchain:(0,E.extractBlockchain)(n.itemId)}));return Object.assign(Object.assign({},a),{maxAmount:r.supply,submit:a.submit.before((e=>Object.assign({itemId:n.itemId},e)))})}))))}function S(e,t){return new g.MethodWithPrepare((n=>r.__awaiter(this,void 0,void 0,(function*(){const r=yield e(n);r.type===l.MintType.ON_CHAIN&&(yield r.transaction.wait());const i=yield t(Object.assign(Object.assign({},n),{itemId:r.itemId}));return Object.assign(Object.assign({},r),{orderId:i})}))),(n=>r.__awaiter(this,void 0,void 0,(function*(){const i=yield e.prepare(n),a=function(e){const[t]=e.split(":");if(!(0,d.isSupportedBlockchain)(t))throw new Error("Unrecognized blockchain in contract ".concat(e));return t}(I(n)),o=yield t.prepare({blockchain:a}),s=i.submit.around((e=>Object.assign({},e)),((e,t)=>r.__awaiter(this,void 0,void 0,(function*(){return e.type===l.MintType.ON_CHAIN&&(yield e.transaction.wait()),{initial:t,mintResponse:e}})))),c=o.submit.around((e=>{let{initial:t,mintResponse:n}=e;return Object.assign(Object.assign({},t),{itemId:n.itemId,amount:t.supply})}),((e,t)=>{let{mintResponse:n}=t;return Object.assign(Object.assign({},n),{orderId:e})}));return Object.assign(Object.assign(Object.assign({},i),o),{submit:s.thenAction(c)})}))))}function I(e){return"collection"in e?e.collection.id:e.collectionId}t.createRaribleSdk=function(e,t,n){var r,d,l,g;const E=e&&(0,s.getRaribleWallet)(e),A=(0,o.getRandomId)("union"),w=(0,u.getSdkConfig)(t),I=(0,f.createApisSdk)(t,Object.assign(Object.assign({},(null===n||void 0===n?void 0:n.apiClientParams)||{}),{apiKey:null===n||void 0===n?void 0:n.apiKey}),null===n||void 0===n?void 0:n.logs),R=Object.assign(Object.assign({},null===(r=null===n||void 0===n?void 0:n.blockchain)||void 0===r?void 0:r.ETHEREUM),{params:null===n||void 0===n?void 0:n.apiClientParams,logs:(null===n||void 0===n?void 0:n.logs)?{level:null===n||void 0===n?void 0:n.logs,session:A}:{level:c.LogsLevel.TRACE,session:A},apiKey:null===n||void 0===n?void 0:n.apiKey}),x=(0,m.createUnionSdk)((0,p.createEthereumSdk)(k(E,a.WalletType.ETHEREUM),I,i.Blockchain.ETHEREUM,w.ethereumEnv,R),(0,O.createFlowSdk)(k(E,a.WalletType.FLOW),I,w.flowEnv,void 0,n),(0,y.createTezosSdk)(k(E,a.WalletType.TEZOS),I,w,n),(0,T.createSolanaSdk)(k(E,a.WalletType.SOLANA),I,w.solanaNetwork,null===(d=null===n||void 0===n?void 0:n.blockchain)||void 0===d?void 0:d.SOLANA),(0,v.createImmutablexSdk)(k(E,a.WalletType.IMMUTABLEX),I,w.immutablexNetwork,null===n||void 0===n?void 0:n.logs)),P={wallet:E,env:t,config:n,sessionId:A,apiKey:null===n||void 0===n?void 0:n.apiKey,providerId:null===(l=null===n||void 0===n?void 0:n.context)||void 0===l?void 0:l.providerId,providerMeta:null===(g=null===n||void 0===n?void 0:n.context)||void 0===g?void 0:g.providerMeta};return function(e){let{apis:t,internalSdk:n,sdkContext:r,externalLogger:i}=e;var a,o,s,d,u;const l=new h.Middlewarer;(null===(a=r.config)||void 0===a?void 0:a.logs)!==c.LogsLevel.DISABLED&&l.use((0,b.getInternalLoggerMiddleware)(null!==(s=null===(o=r.config)||void 0===o?void 0:o.logs)&&void 0!==s?s:c.LogsLevel.TRACE,r,i));for(const c of null!==(u=null===(d=r.config)||void 0===d?void 0:d.middlewares)&&void 0!==u?u:[])l.use(c);for(const c in t)l.wrapApiControllerMethods(t[c],{namespace:"apis."+c});for(const c in n)l.wrapObjectMethods(n[c],{namespace:c})}({apis:I,internalSdk:x,sdkContext:P,externalLogger:null===n||void 0===n?void 0:n.logger}),Object.assign(Object.assign({},x),{nft:Object.assign(Object.assign({},x.nft),{mintAndSell:S(x.nft.mint,x.order.sell)}),order:Object.assign(Object.assign({},x.order),{sell:C(x.order.sell,I)}),apis:I,wallet:E,getSdkContext:_.getSdkContext.bind(null,P)})},t.getCollectionId=I;var R=n(1222);Object.defineProperty(t,"getSimpleFlowFungibleBalance",{enumerable:!0,get:function(){return R.getSimpleFlowFungibleBalance}})},753:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateExpirationDate=t.OrderTestSuite=void 0;const r=n(11),i=n(29),a=n(20),o=n(101),s=n(3295),d=n(3296),c=n(1208);function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3600;return new Date(Date.now()+1e3*e)}t.OrderTestSuite=class{constructor(e,t,n){this.blockchain=e,this.sdk=t,this.ownerships=n,this.sellWithPrepare=e=>r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.sdk.order.sell.prepare({itemId:e.itemId}),n=(0,o.toBn)(e.price),r=(0,o.toBn)(e.quantity||1),s=yield t.submit({currency:e.currency,originFees:e.originFees,expirationDate:e.expiration||u(),price:n.toString(),amount:r.toNumber()});return yield this.waitOrderSubset(s,{makeStock:(0,a.toBigNumber)(r.toString()),makePrice:(0,a.toBigNumber)(n.toString()),status:i.OrderStatus.ACTIVE}),s})),this.sell=e=>r.__awaiter(this,void 0,void 0,(function*(){const t=(0,o.toBn)(e.price),n=(0,o.toBn)(e.quantity||1),r=yield this.sdk.order.sell({itemId:e.itemId,currency:e.currency,originFees:e.originFees,expirationDate:e.expiration||u(),price:t.toString(),amount:n.toNumber()});return yield this.waitOrderSubset(r,{makeStock:(0,a.toBigNumber)(n.toString()),makePrice:(0,a.toBigNumber)(t.toString()),status:i.OrderStatus.ACTIVE}),r})),this.sellUpdate=(e,t)=>r.__awaiter(this,void 0,void 0,(function*(){const n=yield this.sdk.order.sellUpdate.prepare({orderId:e}),r=yield this.sdk.apis.order.getOrderById({id:e}),s=yield n.submit({price:(0,o.toBn)(t).toString()}),d=(0,o.toBn)(t).multipliedBy(r.make.value);return yield this.waitOrderSubset(e,{makePrice:(0,a.toBigNumber)(t.toString()),take:{value:(0,a.toBigNumber)(d.toString()),type:r.take.type},status:i.OrderStatus.ACTIVE}),s})),this.bidWithPrepare=e=>r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.sdk.order.bid.prepare({itemId:e.itemId}),n=(0,o.toBn)(e.price),r=(0,o.toBn)(e.quantity||1),s=yield t.submit({currency:e.currency,originFees:e.originFees,expirationDate:e.expiration||u(),price:n.toString(),amount:r.toNumber()});return yield this.waitOrderSubset(s,{makeStock:(0,a.toBigNumber)(n.multipliedBy(r).toString()),status:i.OrderStatus.ACTIVE}),s})),this.bid=e=>r.__awaiter(this,void 0,void 0,(function*(){const t=(0,o.toBn)(e.price),n=(0,o.toBn)(e.quantity||1),r=yield this.sdk.order.bid({itemId:e.itemId,currency:e.currency,originFees:e.originFees,expirationDate:e.expiration||u(),price:t.toString(),amount:n.toNumber()});return yield this.waitOrderSubset(r,{makeStock:(0,a.toBigNumber)(t.multipliedBy(n).toString()),status:i.OrderStatus.ACTIVE}),r})),this.bidByCollection=e=>r.__awaiter(this,void 0,void 0,(function*(){const t=(0,o.toBn)(e.price),n=(0,o.toBn)(e.quantity||1),r=yield this.sdk.order.bid.prepare({collectionId:e.collectionId}),s=yield r.submit({currency:e.currency,originFees:e.originFees,expirationDate:e.expiration||u(),price:t.toString(),amount:n.toNumber()});return yield this.waitOrderSubset(s,{makeStock:(0,a.toBigNumber)(t.multipliedBy(n).toString()),status:i.OrderStatus.ACTIVE}),s})),this.updateBidByPrepare=(e,t)=>r.__awaiter(this,void 0,void 0,(function*(){const n=yield this.sdk.order.bidUpdate.prepare({orderId:e}),r=yield this.sdk.apis.order.getOrderById({id:e}),s=(0,o.toBn)(t),d=s.multipliedBy(r.take.value),c=yield n.submit({price:s.toString()});return yield this.waitOrderSubset(e,{takePrice:(0,a.toBigNumber)(t.toString()),make:{value:(0,a.toBigNumber)(d.toString()),type:r.make.type},status:i.OrderStatus.ACTIVE}),c})),this.updateBid=(e,t)=>r.__awaiter(this,void 0,void 0,(function*(){const n=yield this.sdk.order.bidUpdate({orderId:e,price:(0,o.toBn)(t)});return yield this.waitOrderSubset(e,{makeStock:(0,a.toBigNumber)(t.toString()),status:i.OrderStatus.ACTIVE}),n})),this.acceptBid=(e,t,n)=>r.__awaiter(this,void 0,void 0,(function*(){const r=yield this.sdk.apis.order.getOrderById({id:t}),s=yield this.sdk.order.acceptBid.prepare({orderId:t}),d=(0,o.toBn)(n),u=yield s.submit({amount:d.toNumber(),infiniteApproval:!0,itemId:e});yield u.wait(),yield this.ownerships.waitForNewOwnership(e,(0,c.extractId)(r.maker));const l=(0,o.toBn)(r.fill||0);yield this.waitOrderSubset(t,{fill:(0,a.toBigNumber)(d.plus(l).toString())});const p=l.plus(d),y=(0,o.toBn)(r.take.value).minus(p);yield this.waitOrderSubset(t,{status:y.isGreaterThan(0)?i.OrderStatus.ACTIVE:i.OrderStatus.FILLED,makeStock:(0,a.toBigNumber)(y.multipliedBy(r.takePrice).toString())})})),this.cancelOrder=e=>r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.sdk.order.cancel({orderId:e});yield t.wait(),yield this.waitOrderSubset(e,{status:i.OrderStatus.CANCELLED,makeStock:(0,a.toBigNumber)("0")})})),this.waitOrder=(e,t)=>r.__awaiter(this,void 0,void 0,(function*(){return(0,d.waitFor)((()=>this.sdk.apis.order.getOrderById({id:e})),t)})),this.waitOrderSubset=(e,t)=>r.__awaiter(this,void 0,void 0,(function*(){return this.waitOrder(e,(e=>(0,s.subsetMatch)(e,t)))})),this.waitStatus=(e,t)=>r.__awaiter(this,void 0,void 0,(function*(){return this.waitOrderSubset(e,{status:t})}))}},t.generateExpirationDate=u},785:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasName=t.isObjectLike=t.getDappType=t.DappType=t.getStringifiedData=void 0;const r=n(11);function i(e,t){try{if(t instanceof Error){const e={};return Object.getOwnPropertyNames(t).forEach((function(n){e[n]=t[n]})),e}}catch(n){}return t}var a;r.__exportStar(n(1663),t),r.__exportStar(n(1018),t),r.__exportStar(n(1019),t),r.__exportStar(n(1664),t),t.getStringifiedData=function(e){try{if("string"===typeof e)return e;const t=Object.getOwnPropertyNames(e).reduce(((t,n)=>(t[n]=e[n],t)),{});return JSON.stringify(t,i," ")}catch(t){return}},function(e){e.AlphaWallet="AlphaWallet",e.AToken="AToken",e.Binance="Binance Smart Wallet",e.Bitpie="Bitpie",e.BlockWallet="BlockWallet",e.Brave="Brave",e.Coinbase="Coinbase Wallet",e.CoinbaseBrowser="Coinbase Browser",e.Dcent="D'CENT",e.Frame="Frame",e.HuobiWallet="Huobi Wallet",e.LedgerConnect="Ledger Connect",e.HyperPay="HyperPay",e.ImToken="imToken",e.Liquality="Liquality",e.MeetOne="MeetOne",e.Metamask="Metamask",e.MyKey="MyKey",e.Opera="Opera Wallet",e.OwnBit="OwnBit",e.Status="Status Wallet",e.Trust="Trust Wallet",e.TokenPocket="TokenPocket",e.TP="TP Wallet",e.WalletIo="Wallet.io",e.XDEFI="XDEFI Wallet",e.OneInch="1inch Wallet",e.Tokenary="Tokenary Wallet",e.Tally="Tally Wallet",e.GameStop="Game Stop",e.Dapper="Dapper",e.Cipher="Cipher",e.Mist="Mist",e.Parity="Parity",e.Mock="Mock",e.Generic="Web3",e.Unknown="Unknown"}(a=t.DappType||(t.DappType={})),t.getDappType=function(e){var t,n,r;if(e)return e.isAlphaWallet?a.AlphaWallet:e.isAToken?a.AToken:e.bbcSignTx?a.Binance:e.isBitpie?a.Bitpie:e.isBlockWallet?a.BlockWallet:e.isCoinbaseBrowser?a.CoinbaseBrowser:e.isCoinbaseWallet?a.Coinbase:e.isDcentWallet?a.Dcent:e.isFrame?a.Frame:e.isHbWallet?a.HuobiWallet:e.isHyperPay?a.HyperPay:e.isImToken?a.ImToken:e.isLiquality?a.Liquality:e.wallet?a.MeetOne:e.isMYKEY?a.MyKey:e.isOwnbit?a.OwnBit:e.isStatus?a.Status:e.isTrust?a.Trust:e.isTokenPocket?a.TokenPocket:e.isTp?a.TP:e.isWalletIO?a.WalletIo:e.isXDEFI?a.XDEFI:e.isOneInchIOSWallet?a.OneInch:e.isTokenary?a.Tokenary:e.isTally?a.Tally:e.isBraveWallet?a.Brave:e.isOpera?a.Opera:e.isLedgerConnect?a.LedgerConnect:e.isMetaMask?a.Metamask:e.isGamestop?a.GameStop:"Web3ProviderEngine"===(null===(t=null===e||void 0===e?void 0:e.constructor)||void 0===t?void 0:t.name)?a.Mock:"EthereumProvider"===(null===(n=null===e||void 0===e?void 0:e.constructor)||void 0===n?void 0:n.name)?a.Mist:"Web3FrameProvider"===(null===(r=null===e||void 0===e?void 0:e.constructor)||void 0===r?void 0:r.name)?a.Parity:a.Unknown},t.isObjectLike=function(e){return"object"===typeof e&&null!==e},t.hasName=function(e){return"object"===typeof e&&null!==e&&"name"in e}},808:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NFT_STORAGE_URL=t.getSdkConfig=t.configsDictionary=void 0;const r=n(1809),i=n(1810),a=n(1811);t.configsDictionary={development:i.developmentConfig,testnet:a.testnetConfig,prod:r.prodConfig},t.getSdkConfig=function(e){return t.configsDictionary[e]},t.NFT_STORAGE_URL="https://api.nft.storage/upload"},812:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.orderToStruct=t.hashToSign=t.signOrder=void 0;const r=n(11),i=n(20),a=n(1855),o=n(1861),s=n(813),d=n(1862),c=n(814);function u(e,t){return Object.assign(Object.assign({},d.EIP712_DOMAIN_TEMPLATE),{verifyingContract:t,chainId:e})}function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var r,a,o;const[s,d]=(0,c.encodeRaribleV2OrderData)(e,t.data,n);return{maker:t.maker,makeAsset:p(e,t.make),taker:null!==(r=t.taker)&&void 0!==r?r:i.ZERO_ADDRESS,takeAsset:p(e,t.take),salt:t.salt,start:null!==(a=t.start)&&void 0!==a?a:0,end:null!==(o=t.end)&&void 0!==o?o:0,dataType:s,data:d}}function p(e,t){return{assetType:(0,s.assetTypeToStruct)(e,t.assetType),value:t.value}}t.signOrder=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){if(!e)throw new Error("Wallet undefined");const r=yield t();switch(n.type){case"RARIBLE_V1":{const t=(0,o.hashLegacyOrder)(e,n);return(0,i.toBinary)(yield e.personalSign(t.substring(2)))}case"RARIBLE_V2":{const t=u(r.chainId,r.exchange.v2),a=l(e,n),o=yield e.signTypedData({primaryType:d.EIP712_ORDER_TYPE,domain:t,types:d.EIP712_ORDER_TYPES,message:a});if(!o)throw new Error("signOrder error: signature=".concat(o,", data=").concat(JSON.stringify(a)));return(0,i.toBinary)(o)}default:throw new Error("Unsupported order type: ".concat(n.type))}}))},t.hashToSign=function(e,t,n){const r=u(e.chainId,e.exchange.v2);return a.TypedDataUtils.sign({primaryType:d.EIP712_ORDER_TYPE,domain:r,types:d.EIP712_ORDER_TYPES,message:l(t,n)})},t.orderToStruct=l},813:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assetTypeToStruct=void 0;const r=n(130);t.assetTypeToStruct=function(e,t){switch(t.assetClass){case"ETH":return{assetClass:(0,r.id)("ETH"),data:"0x"};case"ERC20":return{assetClass:(0,r.id)("ERC20"),data:e.encodeParameter("address",t.contract)};case"GEN_ART":return{assetClass:(0,r.id)("GEN_ART"),data:e.encodeParameter("address",t.contract)};case"COLLECTION":return{assetClass:(0,r.id)("COLLECTION"),data:e.encodeParameter("address",t.contract)};case"CRYPTO_PUNKS":return{assetClass:(0,r.id)("CRYPTO_PUNKS"),data:e.encodeParameter({root:i},{contract:t.contract,tokenId:t.tokenId})};case"ERC721":return{assetClass:(0,r.id)("ERC721"),data:e.encodeParameter({root:i},{contract:t.contract,tokenId:t.tokenId})};case"ERC1155":return{assetClass:(0,r.id)("ERC1155"),data:e.encodeParameter({root:i},{contract:t.contract,tokenId:t.tokenId})};case"ERC721_LAZY":{const n=e.encodeParameter(a,{contract:t.contract,data:{tokenId:t.tokenId,uri:t.uri,creators:t.creators,royalties:t.royalties,signatures:t.signatures}});return{assetClass:(0,r.id)("ERC721_LAZY"),data:"0x".concat(n.substring(66))}}case"ERC1155_LAZY":{const n=e.encodeParameter(o,{contract:t.contract,data:{tokenId:t.tokenId,uri:t.uri,supply:t.supply,creators:t.creators,royalties:t.royalties,signatures:t.signatures}});return{assetClass:(0,r.id)("ERC1155_LAZY"),data:"0x".concat(n.substring(66))}}default:throw new Error("Unsupported asset class")}};const i={contract:"address",tokenId:"uint256"},a={components:[{name:"contract",type:"address"},{components:[{name:"tokenId",type:"uint256"},{name:"uri",type:"string"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"creators",type:"tuple[]"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"royalties",type:"tuple[]"},{name:"signatures",type:"bytes[]"}],name:"data",type:"tuple"}],name:"data",type:"tuple"},o={components:[{name:"contract",type:"address"},{components:[{name:"tokenId",type:"uint256"},{name:"uri",type:"string"},{name:"supply",type:"uint256"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"creators",type:"tuple[]"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"royalties",type:"tuple[]"},{name:"signatures",type:"bytes[]"}],name:"data",type:"tuple"}],name:"data",type:"tuple"}},814:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeRaribleV2OrderData=t.encodePartToBuffer=void 0;const r=n(20),i=(0,r.toWord)("0x0000000000000000000000000000000000000000000000000000000000000000");function a(e){if(!e)return(0,r.toBigNumber)(i);const t=e.value.toString(16);let n=e.account;return n.startsWith("0x")&&(n=n.substring(2)),(0,r.toBigNumber)("0x"+t.padStart(12,"0")+n)}t.encodePartToBuffer=a,t.encodeRaribleV2OrderData=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];switch(t.dataType){case"RARIBLE_V2_DATA_V3_BUY":return["0x1b18cdf6",e.encodeParameter(d,{payouts:a(t.payout),originFeeFirst:a(t.originFeeFirst),originFeeSecond:a(t.originFeeSecond),marketplaceMarker:t.marketplaceMarker||i})];case"RARIBLE_V2_DATA_V3_SELL":return["0x2fa3cfd3",e.encodeParameter(c,{payouts:a(t.payout),originFeeFirst:a(t.originFeeFirst),originFeeSecond:a(t.originFeeSecond),maxFeesBasePoint:t.maxFeesBasePoint,marketplaceMarker:t.marketplaceMarker||i})];case"RARIBLE_V2_DATA_V2":return["0x23d235ef",e.encodeParameter(s,{payouts:t.payouts,originFees:t.originFees,isMakeFill:t.isMakeFill})];case"RARIBLE_V2_DATA_V1":{const r=e.encodeParameter(o,{payouts:t.payouts,originFees:t.originFees});return n?["0x4c234266","0x".concat(r.substring(66))]:["0x4c234266",r]}default:throw new Error("Data type not supported: ".concat(t.dataType))}};const o={components:[{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"payouts",type:"tuple[]"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"originFees",type:"tuple[]"}],name:"data",type:"tuple"},s={components:[{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"payouts",type:"tuple[]"},{components:[{name:"account",type:"address"},{name:"value",type:"uint96"}],name:"originFees",type:"tuple[]"},{name:"isMakeFill",type:"bool"}],name:"data",type:"tuple"},d={components:[{name:"payouts",type:"uint256"},{name:"originFeeFirst",type:"uint256"},{name:"originFeeSecond",type:"uint256"},{name:"marketplaceMarker",type:"bytes32"}],name:"data",type:"tuple"},c={components:[{name:"payouts",type:"uint256"},{name:"originFeeFirst",type:"uint256"},{name:"originFeeSecond",type:"uint256"},{name:"maxFeesBasePoint",type:"uint256"},{name:"marketplaceMarker",type:"bytes32"}],name:"data",type:"tuple"}},815:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkLazyAssetType=void 0;const r=n(11);t.checkLazyAssetType=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=yield e();switch(t.assetClass){case"ERC1155":case"ERC721":{const e=yield n.nftItem.getNftItemByIdRaw({itemId:"".concat(t.contract,":").concat(t.tokenId)});if(200===e.status&&"0"===e.value.lazySupply)return t;const r=yield n.nftItem.getNftLazyItemByIdRaw({itemId:"".concat(t.contract,":").concat(t.tokenId)});if(200===r.status){const e=r.value;switch(e["@type"]){case"ERC721":return Object.assign(Object.assign({},e),{assetClass:"ERC721_LAZY"});case"ERC1155":return Object.assign(Object.assign({},e),{assetClass:"ERC1155_LAZY"});default:return t}}return t}default:return t}}))}},819:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapInRetry=t.delay=t.retry=void 0;const r=n(123);function i(e){return new Promise((t=>setTimeout(t,e)))}t.retry=function e(t,n,r){return r().catch((a=>{if(0===t)throw a;return i(n).then((()=>e(t-1,n,r)))}))},t.delay=i,t.wrapInRetry=function(e){return(0,r.conditionalRetry)(5,3e3,e,(e=>(null===e||void 0===e?void 0:e.message)===r.FAILED_TO_FETCH_ERROR))}},820:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOwnershipId=void 0,t.getOwnershipId=function(e,t,n){return"".concat(e,":").concat(t,":").concat(n)}},821:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogsLevel=void 0,function(e){e[e.DISABLED=0]="DISABLED",e[e.ERROR=1]="ERROR",e[e.TRACE=2]="TRACE"}(t.LogsLevel||(t.LogsLevel={}))},822:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkErrorCode=t.createRemoteLogger=t.getErrorMessageString=t.getEnvironment=void 0;const r=n(11),i=r.__importDefault(n(107)),a=n(413),o=n(101),s=n(2046);t.getEnvironment=function(e){switch(e){case"mainnet":case"polygon":return"prod";case"mumbai":return"staging";default:return"testnet"}};const d="ethereum-sdk",c="https://logging.rarible.com/";t.getErrorMessageString=function(e){return e?"string"===typeof e?e:e instanceof Error?e.message:e.message?"string"===typeof e.message?e.message:JSON.stringify(e.message):void 0!==e.status&&void 0!==e.statusText?JSON.stringify({url:e.url,status:e.status,statusText:e.statusText}):JSON.stringify(e):"not defined"},t.createRemoteLogger=function(e){return new a.RemoteLogger((e=>i.default.post(c,e)),{initialContext:(()=>r.__awaiter(this,void 0,void 0,(function*(){var t,n,r,i,a,c;const u={service:d,environment:e.env,sessionId:null!==(t=e.sessionId)&&void 0!==t?t:(0,o.getRandomId)("ethereum"),version:s.version,web3Address:null!==(r=yield null===(n=e.ethereum)||void 0===n?void 0:n.getFrom())&&void 0!==r?r:"unknown",ethNetwork:null!==(c=null===(a=yield null===(i=e.ethereum)||void 0===i?void 0:i.getChainId())||void 0===a?void 0:a.toString())&&void 0!==c?c:"unknown"};return void 0!==e.apiKey&&(u.apiKey=e.apiKey),u})))(),maxByteSize:51200})},function(e){e.ETHEREUM_EXTERNAL_ERR="ETHEREUM_EXTERNAL_ERR"}(t.NetworkErrorCode||(t.NetworkErrorCode={}))},824:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invertOrder=void 0;const r=n(20),i=n(147),a=n(372),o=(0,r.toWord)("0x0000000000000000000000000000000000000000000000000000000000000000");t.invertOrder=function(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o;const d=(0,a.isNft)(e.take.assetType)||"COLLECTION"===e.take.assetType.assetClass,[c,u]=function(e,t,n,r){return r?[n,(0,i.toBn)(n).multipliedBy(e).div(t)]:[(0,i.toBn)(n).multipliedBy(t).div(e),n]}((0,i.toBn)(e.make.value),(0,i.toBn)(e.take.value),t,d);return function(e){if(parseFloat(e.toString())<1)throw new Error("Invalid order. Price per one item is less than minimum allowable currency amount.")}(d?u:c),Object.assign(Object.assign({},e),{make:Object.assign(Object.assign({},e.take),{value:(0,r.toBigNumber)(c.toString())}),take:Object.assign(Object.assign({},e.make),{value:(0,r.toBigNumber)(u.toString())}),maker:n,taker:e.maker,salt:s,signature:void 0})}},825:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAtomicMatchArgCommonData=t.getAtomicMatchArgUints=t.getAtomicMatchArgAddressesForOpenseaWrapper=t.getAtomicMatchArgAddresses=t.getBuySellOrders=t.getMatchOpenseaOptions=t.OpenSeaOrderHandler=void 0;const r=n(11),i=n(373),a=n(20),o=n(2049),s=n(101),d=n(29),c=n(2057),u=n(1074),l=n(1075),p=n(1076),y=n(646),m=n(1097),f=n(645),h=n(331),b=n(270),T=n(559),v=n(414),g=n(2058),E=n(557),_=n(130),O=n(415),A=n(295),w=n(416),k=n(1100),C=n(332);function S(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if("ETH"===e.make.assetType.assetClass){const n=null===t||void 0===t?void 0:t.map((e=>e.value)).reduce(((e,t)=>e+t),0),r=(0,s.toBn)(e.data.takerProtocolFee).plus(e.data.takerRelayerFee).plus(n||0).toNumber();return{value:(0,y.getAssetWithFee)(e.make,r).value}}return{}}))}function I(e,t){return r.__awaiter(this,void 0,void 0,(function*(){return(0,a.toAddress)(yield e.functionCall("proxies",t).call())}))}function R(e,t){return"SELL"===e.data.side?{buy:t,sell:e}:{buy:e,sell:t}}function x(e){return[e.exchange,e.maker,e.taker,e.feeRecipient,e.target,e.staticTarget,e.paymentToken]}function P(e,t){return[e.exchange,t,e.maker,a.ZERO_ADDRESS,e.target,e.staticTarget,e.paymentToken,...x(e)]}function B(e){return[e.makerRelayerFee,e.takerRelayerFee,e.makerProtocolFee,e.takerProtocolFee,e.basePrice,e.extra,e.listingTime,e.expirationTime,e.salt]}function j(e){return[e.feeMethod,e.side,e.saleKind,e.howToCall]}t.OpenSeaOrderHandler=class{constructor(e,t,n,r,i,a){this.ethereum=e,this.send=t,this.getConfig=n,this.getApis=r,this.getBaseOrderFeeConfig=i,this.sdkConfig=a}getOrderMetadata(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.getConfig(),t=function(e,t){if(!t)return;switch(e){case d.Blockchain.ETHEREUM:return t.ethereum;case d.Blockchain.POLYGON:return t.polygon;case d.Blockchain.MANTLE:return t.mantle;default:return}}((0,A.getBlockchainFromChainId)(e.chainId),this.sdkConfig);return t&&t.openseaOrdersMetadata?(0,a.toWord)(t.openseaOrdersMetadata):e.openSea.metadata||(0,_.id32)("RARIBLE")}))}invert(e,t){let{order:n,payouts:o}=e;var s;return r.__awaiter(this,void 0,void 0,(function*(){if("BUY"===n.data.side)throw new Error("Bid opensea orders is not supported yet");if(n.data.feeRecipient===a.ZERO_ADDRESS)throw new Error("feeRecipient should be specified");const e=Object.assign(Object.assign({},n.data),{feeRecipient:a.ZERO_ADDRESS,side:i.OrderOpenSeaV1DataV1Side.BUY}),r=Object.assign(Object.assign({},n),{make:Object.assign({},n.take),take:Object.assign({},n.make),maker:o&&(null===(s=o[0])||void 0===s?void 0:s.account)?o[0].account:t,taker:n.maker,signature:void 0,data:e});return r.data=Object.assign(Object.assign({},r.data),yield this.encodeOrder(r)),r}))}encodeOrder(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=e.make.assetType,n=e.take.assetType,r=yield this.getConfig(),i=e.data.target&&e.data.target===r.openSea.merkleValidator?e.data.target:void 0;if("ERC721"===t.assetClass)return this.getErc721EncodedData(t,e.maker,!0,i,e.data.callData);if("ERC1155"===t.assetClass)return this.getErc1155EncodedData(t,e.make.value,e.maker,!0,i);if("ERC721"===n.assetClass)return this.getErc721EncodedData(n,e.maker,!1,i,e.data.callData);if("ERC1155"===n.assetClass)return this.getErc1155EncodedData(n,e.take.value,e.maker,!1,i);throw new Error("should never happen")}))}getErc721EncodedData(e,t,n,i,o){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,b.getRequiredWallet)(this.ethereum);let s=[t,a.ZERO_ADDRESS];if(n||(s=[a.ZERO_ADDRESS,t]),i){const t=(0,g.createMerkleValidatorContract)(r,i),d=o.startsWith(F)?"matchERC721WithSafeTransferUsingCriteria":"matchERC721UsingCriteria",c=[...s,e.contract,e.tokenId,"0x",[]];return{replacementPattern:n?k.ERC721_VALIDATOR_MAKE_REPLACEMENT:k.ERC721_VALIDATOR_TAKE_REPLACEMENT,callData:(0,a.toBinary)(yield t.functionCall(d,...c).getData()),target:i}}{let t;const i=[...s,e.tokenId];if(o.startsWith(M)){const n=yield(0,T.getErc721Contract)(r,v.ERC721VersionEnum.ERC721V3,e.contract);t=(0,a.toBinary)(yield n.functionCall("safeTransferFrom",...i).getData())}else{const n=yield(0,T.getErc721Contract)(r,v.ERC721VersionEnum.ERC721V2,e.contract);t=(0,a.toBinary)(yield n.functionCall("transferFrom",...i).getData())}return{replacementPattern:n?k.ERC721_MAKE_REPLACEMENT:k.ERC721_TAKE_REPLACEMENT,target:e.contract,callData:t}}}))}getErc1155EncodedData(e,t,n,i,o){return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,b.getRequiredWallet)(this.ethereum);let s=[n,a.ZERO_ADDRESS];if(i||(s=[a.ZERO_ADDRESS,n]),o){const n=(0,g.createMerkleValidatorContract)(r,o),d=[...s,e.contract,e.tokenId,t,"0x",[]];return{replacementPattern:i?k.ERC1155_VALIDATOR_MAKE_REPLACEMENT:k.ERC1155_VALIDATOR_TAKE_REPLACEMENT,target:o,callData:(0,a.toBinary)(yield n.functionCall("matchERC1155UsingCriteria",...d).getData())}}{const n=(0,E.createErc1155Contract)(r,e.contract),o=[...s,e.tokenId,t,"0x"];return{replacementPattern:i?k.ERC1155_MAKE_REPLACEMENT:k.ERC1155_TAKE_REPLACEMENT,target:e.contract,callData:(0,a.toBinary)(yield n.functionCall("safeTransferFrom",...o).getData())}}}))}getBaseOrderFee(){return r.__awaiter(this,void 0,void 0,(function*(){return this.getBaseOrderFeeConfig("OPEN_SEA_V1")}))}getOrderFee(e){return e.data.feeRecipient===a.ZERO_ADDRESS?(0,s.toBn)(e.data.takerProtocolFee).plus(e.data.takerRelayerFee).toNumber():(0,s.toBn)(e.data.makerProtocolFee).plus(e.data.makerRelayerFee).toNumber()}approve(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=this.getOrderFee(e);if("BUY"===e.data.side){const r=(0,y.getAssetWithFee)(e.make,n);yield(0,h.waitTx)(this.approveSingle(e.maker,r,t))}else{yield(0,h.waitTx)(this.approveSingle(e.maker,e.make,t));const r=(0,s.toBn)(e.take.value).multipliedBy(n).dividedBy(1e4).integerValue(s.BigNumber.ROUND_FLOOR).toFixed(),i=Object.assign(Object.assign({},e.take),{value:(0,a.toBigNumber)(r)});yield(0,h.waitTx)(this.approveSingle(e.maker,i,t))}}))}getTransactionData(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const r="ETH"===e.take.assetType.assetClass,i=yield this.getAtomicMatchFunctionCall(e,t),{buy:a}=R(e,t),o=yield this.getConfig();if(r){const r=(0,O.createExchangeWrapperContract)(this.ethereum,o.exchange.wrapper),{encodedFeesValue:i,feeAddresses:a}=(0,C.originFeeValueConvert)(n.originFees),{data:s,options:d}=yield this.getTransactionDataForExchangeWrapper(e,t,n.originFees,i);return{functionCall:r.functionCall("singlePurchase",s,a[0],a[1]),options:d}}return{functionCall:i,options:yield S(a)}}))}getTransactionDataForExchangeWrapper(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield this.getAtomicMatchFunctionCall(e,t),{buy:a}=R(e,t);return{data:{marketId:w.ExchangeWrapperOrderType.OPENSEA_V1,amount:(yield S(a)).value,fees:i,data:yield r.getData()},options:yield S(a,n)}}))}getAtomicMatchFunctionCall(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const n="ETH"===e.take.assetType.assetClass,{buy:r,sell:i}=R(e,t),a=(0,k.convertOpenSeaOrderToDTO)(this.ethereum,i),o=(0,k.convertOpenSeaOrderToDTO)(this.ethereum,r),s=(0,m.createOpenseaContract)(this.ethereum,e.data.exchange),d=(0,f.toVrs)(r.signature||""),c=(0,f.toVrs)(i.signature||"");if(!(yield this.ordersCanMatch(s,o,a,n)))throw new Error("Orders cannot be matched");return s.functionCall("atomicMatch_",this.getAddressesArrayForTransaction(o,a,n),[...B(o),...B(a)],[...j(o),...j(a)],o.calldata,a.calldata,o.replacementPattern,a.replacementPattern,o.staticExtradata,a.staticExtradata,[d.v,c.v],[d.r,d.s,c.r,c.s,this.getOrderMetadata()])}))}ordersCanMatch(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){return!!(yield e.functionCall("ordersCanMatch_",this.getAddressesArrayForTransaction(t,n,i),[...B(t),...B(n)],[...j(t),...j(n)],t.calldata,n.calldata,t.replacementPattern,n.replacementPattern,t.staticExtradata,n.staticExtradata).call())}))}getAddressesArrayForTransaction(e,t,n){return r.__awaiter(this,void 0,void 0,(function*(){const r=yield this.getConfig();return n?[...P(t,r.exchange.wrapper)]:[...x(e),...x(t)]}))}approveSingle(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const r=yield this.getConfig();switch(t.assetType.assetClass){case"ERC20":{const i=t.assetType.contract,a=r.transferProxies.openseaV1;return(0,u.approveErc20)(this.ethereum,this.send,i,e,a,t.value,n)}case"ERC721":{const n=t.assetType.contract,r=yield this.getRegisteredProxy(e);return(0,l.approveErc721)(this.ethereum,this.send,n,e,r)}case"ERC1155":{const n=t.assetType.contract,r=yield this.getRegisteredProxy(e);return(0,p.approveErc1155)(this.ethereum,this.send,n,e,r)}default:return}}))}getRegisteredProxy(e){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const t=(yield this.getConfig()).openSea.proxyRegistry,n=(0,c.createOpenseaProxyRegistryEthContract)(this.ethereum,t),i=yield I(n,e);if(i===a.ZERO_ADDRESS){const t=yield n.functionCall("registerProxy").send();return yield t.wait(),(0,o.backOff)((()=>r.__awaiter(this,void 0,void 0,(function*(){const t=yield I(n,e);if(t===a.ZERO_ADDRESS)throw new Error("Expected non-zero proxy address");return t}))),{maxDelay:500,numOfAttempts:10,delayFirstAttempt:!0,startingDelay:100})}return i}))}},t.getMatchOpenseaOptions=S,t.getBuySellOrders=R,t.getAtomicMatchArgAddresses=x,t.getAtomicMatchArgAddressesForOpenseaWrapper=P,t.getAtomicMatchArgUints=B,t.getAtomicMatchArgCommonData=j;const F="0xc5a0236e",M="0x42842e0e"},826:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertAPIOrderToSeaport=void 0;const r=n(827);t.convertAPIOrderToSeaport=function(e){if(!e.signature)throw new Error("Signature should exists");if(void 0===e.start||void 0===e.end)throw new Error("Order should includes start/end fields");if(void 0===e.data.nonce)throw new Error("Converting Seaport order error: nonce is undefined");return{parameters:{counter:e.data.nonce,offerer:e.maker,zone:e.data.zone,orderType:(0,r.convertOrderType)(e.data.orderType),startTime:e.start.toString(),endTime:e.end.toString(),zoneHash:e.data.zoneHash,salt:e.salt,offer:e.data.offer.map((e=>({itemType:(0,r.convertItemType)(e.itemType),token:e.token,identifierOrCriteria:e.identifierOrCriteria,startAmount:e.startAmount,endAmount:e.endAmount}))),consideration:e.data.consideration.map((e=>({itemType:(0,r.convertItemType)(e.itemType),token:e.token,identifierOrCriteria:e.identifierOrCriteria,startAmount:e.startAmount,endAmount:e.endAmount,recipient:e.recipient}))),totalOriginalConsiderationItems:e.data.consideration.length,conduitKey:e.data.conduitKey},signature:e.signature}}},827:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSeaportToken=t.convertItemType=t.convertOrderType=t.SeaportOrderHandler=void 0;const r=n(11),i=n(817),a=n(818),o=n(20),s=n(147),d=n(101),c=r.__importDefault(n(107)),u=n(372),l=n(270),p=n(554),y=n(271),m=n(2060),f=n(830),h=n(332);function b(e){const t=(0,u.isNft)(e.order.take.assetType),n=(0,u.isNft)(e.order.make.assetType),r="ERC1155"===e.order.make.assetType.assetClass||"ERC1155"===e.order.take.assetType.assetClass?e.amount:void 0,i="PARTIAL_RESTRICTED"===e.order.data.orderType||"PARTIAL_OPEN"===e.order.data.orderType;let a;if(t)a=!!r&&r.toString()!==e.order.take.value.toString();else{if(!n)throw new Error("Make/take asset in order is non-nft asset");a=!!r&&r.toString()!==e.order.make.value.toString()}if(!i&&a)throw new Error("Order is not supported partial fill");return{unitsToFill:r,takeIsNft:t}}function T(e){switch(e.assetClass){case"ETH":return o.ZERO_ADDRESS;case"ERC20":return e.contract;default:throw new Error("Asset type should be currency token")}}t.SeaportOrderHandler=class{constructor(e,t,n,r,i,a,o){this.ethereum=e,this.send=t,this.getConfig=n,this.getApis=r,this.getBaseOrderFeeConfig=i,this.env=a,this.sdkConfig=o}sendTransaction(e){return r.__awaiter(this,void 0,void 0,(function*(){const{functionCall:t,options:n}=yield this.getTransactionData(e);return this.send(t,n)}))}getSignature(e){let{hash:t,protocol:n}=e;var i,a,o,s,d,u,l;return r.__awaiter(this,void 0,void 0,(function*(){try{const e=yield this.getApis(),{signature:n}=yield e.orderSignature.getSeaportOrderSignature({hash:t});return n}catch(e){const r="Error when generating fulfillment data",p=(null===(i=null===e||void 0===e?void 0:e.value)||void 0===i?void 0:i.message)||(null===(a=null===e||void 0===e?void 0:e.data)||void 0===a?void 0:a.message);if("string"===typeof p&&p.includes(r))throw new Error("Order is not active or cancelled");if("testnet"===this.env||"mumbai"===this.env)try{const e={listing:{hash:t,chain:"testnet"===this.env?"goerli":"mumbai",protocol_address:n},fulfiller:{address:yield null===(o=this.ethereum)||void 0===o?void 0:o.getFrom()}},{data:r}=yield c.default.post("https://testnets-api.opensea.io/v2/listings/fulfillment_data",e);return r.fulfillment_data.orders[0].signature}catch(e){if(console.error(e),Array.isArray(null===(d=null===(s=null===e||void 0===e?void 0:e.response)||void 0===s?void 0:s.data)||void 0===d?void 0:d.errors))throw new Error(null===(l=null===(u=null===e||void 0===e?void 0:e.response)||void 0===u?void 0:u.data)||void 0===l?void 0:l.errors.join(","));throw e}throw new Error("api.getSeaportOrderSignature error: ".concat(e,", hash=").concat(t))}}))}getTransactionData(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,l.getRequiredWallet)(this.ethereum),{order:r}=e;if(void 0===r.start||void 0===r.end)throw new Error("Order should includes start/end fields");const{unitsToFill:i,takeIsNft:a}=b(e);let o=[];if(a||(o=this.convertOriginFeesToTips(e)),!r.signature||"0x"===r.signature){if(!e.order.hash)throw new Error("getSeaportOrderSignature error: order.hash does not exist");if(r.signature=yield this.getSignature({hash:e.order.hash,protocol:e.order.data.protocol}),!r.signature)throw new Error("Can't fetch Seaport order signature")}const{functionCall:s,options:d}=yield(0,f.fulfillOrder)(n,this.send.bind(this),r,{unitsToFill:i,tips:o,disableCheckingBalances:null===t||void 0===t?void 0:t.disableCheckingBalances});return{functionCall:s,options:d}}))}convertOriginFeesToTips(e){var t;const{make:n}=e.order,r="ERC1155"!==n.assetType.assetClass||(0,s.toBn)(e.amount).isEqualTo(n.value)?(0,s.toBn)(e.order.take.value):(0,s.toBn)(e.order.take.value).div(n.value).multipliedBy(e.amount);return null===(t=e.originFees)||void 0===t?void 0:t.map((t=>({token:T(e.order.take.assetType),amount:r.multipliedBy((0,s.toBn)(t.value)).dividedBy(1e4).integerValue(d.BigNumber.ROUND_FLOOR).toFixed(),recipient:t.account})))}getTransactionDataForExchangeWrapper(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){if(!this.ethereum)throw new Error("Wallet undefined");const r=yield this.getConfig(),{unitsToFill:a}=b(e),{totalFeeBasisPoints:o}=(0,h.originFeeValueConvert)(t);if((!e.order.signature||"0x"===e.order.signature)&&(e.order.signature=yield this.getSignature({hash:e.order.hash,protocol:e.order.data.protocol}),!e.order.signature))throw new Error("Can't fetch Seaport order signature");if(!r.exchange.wrapper)throw new Error("Exchange wrapper is not defined for Seaport tx");const s=e.order.take.assetType;let d=n;return(0,p.isWeth)(s,r)&&(d=(0,h.setFeesCurrency)(d,!0)),(0,m.prepareSeaportExchangeData)(this.ethereum,this.send.bind(this),e.order,{unitsToFill:a,encodedFeesValue:d,totalFeeBasisPoints:o,disableCheckingBalances:null===i||void 0===i?void 0:i.disableCheckingBalances})}))}getAssetToApprove(e,t){const{make:n,take:r}=e.order,i=(0,s.toBn)(r.value).div(n.value).multipliedBy(e.amount);let a=(0,h.calcValueWithFees)(i,t.totalFeeBasisPoints);return{assetType:r.assetType,value:(0,o.toBigNumber)(a.toFixed())}}getBaseOrderFee(){return this.getBaseOrderFeeConfig("SEAPORT_V1")}getOrderFee(){return 0}},t.convertOrderType=function(e){switch(e){case i.SeaportOrderType.FULL_OPEN:return y.OrderType.FULL_OPEN;case i.SeaportOrderType.PARTIAL_OPEN:return y.OrderType.PARTIAL_OPEN;case i.SeaportOrderType.FULL_RESTRICTED:return y.OrderType.FULL_RESTRICTED;case i.SeaportOrderType.PARTIAL_RESTRICTED:return y.OrderType.PARTIAL_RESTRICTED;default:throw new Error("Unrecognized order type=".concat(e))}},t.convertItemType=function(e){switch(e){case a.SeaportItemType.NATIVE:return y.ItemType.NATIVE;case a.SeaportItemType.ERC20:return y.ItemType.ERC20;case a.SeaportItemType.ERC721:return y.ItemType.ERC721;case a.SeaportItemType.ERC721_WITH_CRITERIA:return y.ItemType.ERC721_WITH_CRITERIA;case a.SeaportItemType.ERC1155:return y.ItemType.ERC1155;case a.SeaportItemType.ERC1155_WITH_CRITERIA:return y.ItemType.ERC1155_WITH_CRITERIA;default:throw new Error("Unrecognized item type=".concat(e))}},t.getSeaportToken=T},830:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.approveBeforeStandardFulfillOrder=t.approveBeforeBasicFulfillOrder=t.fulfillOrder=t.getSeaportContract=void 0;const r=n(11),i=n(20),a=n(101),o=n(2093),s=n(2094),d=n(647),c=n(1102),u=n(648),l=n(649),p=n(272),y=n(650),m=n(648),f=n(2095),h=n(2096),b=n(2097),T=n(271),v=n(826);function g(e){let{ethereum:t,send:n,order:i,tips:a=[],offererBalancesAndApprovals:o,fulfillerBalancesAndApprovals:s,timeBasedItemParams:d,offererOperator:c,fulfillerOperator:l,disableCheckingBalances:p}=e;return r.__awaiter(this,void 0,void 0,(function*(){const{offer:e,consideration:r}=i.parameters,y=[...r,...a],m=(0,u.validateBasicFulfillBalancesAndApprovals)({offer:e,consideration:y,offererBalancesAndApprovals:o,fulfillerBalancesAndApprovals:s,timeBasedItemParams:d,offererOperator:c,fulfillerOperator:l,disableCheckingBalances:p}),f=yield(0,h.getApprovalActions)(t,n,m);return yield Promise.all(f)}))}function E(e){let{ethereum:t,send:n,order:i,tips:a=[],offererBalancesAndApprovals:o,fulfillerBalancesAndApprovals:s,timeBasedItemParams:d,offererOperator:c,fulfillerOperator:l,unitsToFill:p=0,totalSize:m,totalFilled:f,offerCriteria:b,considerationCriteria:T}=e;return r.__awaiter(this,void 0,void 0,(function*(){const e=p?(0,y.mapOrderAmountsFromUnitsToFill)(i,{unitsToFill:p,totalSize:m}):(0,y.mapOrderAmountsFromFilledStatus)(i,{totalFilled:f,totalSize:m}),{parameters:{offer:r,consideration:v}}=e,g=[...v,...a],E=(0,u.validateStandardFulfillBalancesAndApprovals)({offer:r,consideration:g,offerCriteria:b,considerationCriteria:T,offererBalancesAndApprovals:o,fulfillerBalancesAndApprovals:s,timeBasedItemParams:d,offererOperator:c,fulfillerOperator:l}),_=yield(0,h.getApprovalActions)(t,n,E);return yield Promise.all(_)}))}t.getSeaportContract=function(e,t){if((0,d.compareCaseInsensitive)(t,T.CROSS_CHAIN_SEAPORT_V1_4_ADDRESS)||(0,d.compareCaseInsensitive)(t,T.CROSS_CHAIN_SEAPORT_V1_5_ADDRESS))return(0,o.createSeaportV14Contract)(e,(0,i.toAddress)(t));if((0,d.compareCaseInsensitive)(t,T.CROSS_CHAIN_SEAPORT_ADDRESS))return(0,s.createSeaportContract)(e,(0,i.toAddress)(t));throw new Error("Unrecognized Seaport protocol")},t.fulfillOrder=function(e,t,n,s){let{tips:d,unitsToFill:u,disableCheckingBalances:h}=s;return r.__awaiter(this,void 0,void 0,(function*(){const r=(0,o.createSeaportV14Contract)(e,(0,i.toAddress)(n.data.protocol)),s=(0,v.convertAPIOrderToSeaport)(n),{parameters:_}=s,{offerer:O,offer:A,consideration:w}=_,k=yield e.getFrom(),C=T.OPENSEA_CONDUIT_KEY,S=(0,T.getConduitByKey)(_.conduitKey,n.data.protocol),I=(0,T.getConduitByKey)(C,n.data.protocol),R=i.ZERO_ADDRESS,x=[],P=[],[B,j,F]=yield Promise.all([(0,m.getBalancesAndApprovals)({ethereum:e,owner:O,items:A,criterias:x,operator:S}),(0,m.getBalancesAndApprovals)({ethereum:e,owner:k,items:[...A,...w],criterias:[...x,...P],operator:I}),r.functionCall("getOrderStatus",(0,c.getOrderHash)(_)).call()]),M=Object.assign({},F);M.totalFilled=(0,a.toBn)(F.totalFilled),M.totalSize=(0,a.toBn)(F.totalSize);const{totalFilled:D,totalSize:N}=M,L=(0,l.validateAndSanitizeFromOrderStatus)(s,M),V={startTime:L.parameters.startTime,endTime:L.parameters.endTime,currentBlockTimestamp:Math.floor(Date.now()/1e3),ascendingAmountTimestampBuffer:300},U=(null===d||void 0===d?void 0:d.map((e=>Object.assign(Object.assign({},(0,y.mapInputItemToOfferItem)(e)),{recipient:e.recipient}))))||[],W=R===i.ZERO_ADDRESS;return!u&&W&&(0,l.shouldUseBasicFulfill)(L.parameters,D)?(yield g({ethereum:e,send:t,order:s,tips:U,offererBalancesAndApprovals:B,fulfillerBalancesAndApprovals:j,timeBasedItemParams:V,offererOperator:S,fulfillerOperator:I,disableCheckingBalances:h}),(0,f.getfulfillBasicOrderData)({order:L,timeBasedItemParams:V,conduitKey:C,tips:U,seaportContract:r})):(yield E({ethereum:e,send:t,order:L,unitsToFill:u,totalFilled:D,totalSize:N.eq(0)?(0,p.getMaximumSizeForOrder)(L):N,offerCriteria:x,considerationCriteria:P,tips:U,offererBalancesAndApprovals:B,fulfillerBalancesAndApprovals:j,timeBasedItemParams:V,offererOperator:S,fulfillerOperator:I}),(0,b.getFulfillStandardOrderData)({order:L,unitsToFill:u,totalFilled:D,totalSize:N.eq(0)?(0,p.getMaximumSizeForOrder)(L):N,offerCriteria:x,considerationCriteria:P,tips:U,extraData:"0x",timeBasedItemParams:V,conduitKey:C,recipientAddress:R,seaportContract:r}))}))},t.approveBeforeBasicFulfillOrder=g,t.approveBeforeStandardFulfillOrder=E},831:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAmmItemsRoyalties=t.encodeDataWithRoyalties=t.addFeeDependsOnExternalFee=t.getRoyaltiesAmount=t.getMarketData=void 0;const r=n(11),i=n(294),a=n(147),o=n(101),s=n(270),d=n(415),c=n(332);function u(e,t){const n=e.reduce(((e,t)=>e+t.value),0);return(0,a.toBn)(n).dividedBy(1e4).multipliedBy(t).integerValue(o.BigNumber.ROUND_FLOOR)}function l(e,t){var n,r;if(t)return(0,i.toBigNumber)("0x1"+t.toString().slice(-8).padStart(8,"0"));{const t=(0,c.getPackedFeeValue)(null===(n=null===e||void 0===e?void 0:e[0])||void 0===n?void 0:n.value),a=(0,c.getPackedFeeValue)(null===(r=null===e||void 0===e?void 0:e[1])||void 0===r?void 0:r.value);if(t.length>4||a.length>4)throw new Error("Decrease origin fees values: fee_1 = ".concat(t,", fee_2=").concat(a));return(0,i.toBigNumber)("0x1"+t+a)}}function p(e){let{royalties:t,data:n,provider:r}=e;const i={data:n,additionalRoyalties:t.map((e=>(0,c.encodeBasisPointsPlusAccount)(e.value,e.account)))};return console.log("dataForEncoding",JSON.stringify(i,null," ")),r.encodeParameter(d.ADDITIONAL_DATA_STRUCT,i)}function y(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if(!t.assetType)return[];if(Array.isArray(t.assetType)){return(yield Promise.all(t.assetType.map((t=>r.__awaiter(this,void 0,void 0,(function*(){return(yield e.nftItem.getNftItemRoyaltyById({itemId:"".concat(t.contract,":").concat(t.tokenId)})).royalty||[]})))))).flat()}return(yield e.nftItem.getNftItemRoyaltyById({itemId:"".concat(t.assetType.contract,":").concat(t.assetType.tokenId)})).royalty||[]}))}t.getMarketData=function(e,t,n){let{request:o,fillData:d,marketId:m,feeValue:f}=n;var h,b,T,v,g;return r.__awaiter(this,void 0,void 0,(function*(){const n=(0,s.getRequiredWallet)(e),{totalFeeBasisPoints:r,encodedFeesValue:E,feeAddresses:_}=(0,c.originFeeValueConvert)(o.originFees);let O=(0,c.calcValueWithFees)((0,i.toBigNumber)(null!==(b=null===(h=d.options.value)||void 0===h?void 0:h.toString())&&void 0!==b?b:"0"),r);const A={marketId:m,amount:null!==(T=d.options.value)&&void 0!==T?T:"0",fees:null!==f&&void 0!==f?f:E,data:d.data};if(o.addRoyalty&&o.assetType){let e=yield y(t,o);if(null===e||void 0===e?void 0:e.length){A.data=p({royalties:e,data:d.data,provider:n});const t=u(e,null!==(g=null===(v=d.options.value)||void 0===v?void 0:v.toString())&&void 0!==g?g:0);O=(0,a.toBn)(O.plus(t).toString()),A.fees=l(o.originFees,f)}}return console.log("getMarket data",A,O.toString()),{originFees:{totalFeeBasisPoints:r,encodedFeesValue:E,feeAddresses:_},data:A,options:Object.assign(Object.assign({},d.options),{value:O.toString()})}}))},t.getRoyaltiesAmount=u,t.addFeeDependsOnExternalFee=l,t.encodeDataWithRoyalties=p,t.getAmmItemsRoyalties=y},832:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUpdatedCalldata=void 0;const r=n(20),i=n(148);t.getUpdatedCalldata=function(e){if(null===e||void 0===e?void 0:e.marketplaceMarker){const t=/^[0-9a-f]*$/i,n=(0,r.toBinary)(e.marketplaceMarker).slice(2).toString();if(!t.test(n))throw new Error("MarketplaceMarker is not a hex value");if(48!==n.length)throw new Error("MarketplaceMarker has length = ".concat(n.length,", but should be = ").concat(48));return(0,r.toBinary)("0x".concat(n).concat(i.FILL_CALLDATA_TAG))}return(0,r.toBinary)("0x".concat("0".repeat(48)).concat(i.FILL_CALLDATA_TAG))}},833:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBaseFee=void 0;const r=n(11),i=n(123),a=n(2110),o=n(819);t.getBaseFee=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.CURRENT_ORDER_TYPE_VERSION;return r.__awaiter(this,void 0,void 0,(function*(){const a=yield t();let s;try{s=(yield(0,o.retry)(5,3e3,(()=>r.__awaiter(this,void 0,void 0,(function*(){return yield a.orderSettings.getFees()}))))).fees}catch(d){let e;try{e=(0,i.getStringifiedData)(d)}catch(d){}throw new Error("Getting fee error ".concat(e))}if(!s)throw new Error("Fee config was not found for ".concat(e));if(!(n in s))throw new Error("Unsupported fee type ".concat(n));return Number(s[n]||0)}))}},836:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HUMAN_READABLE_MSG_LIST=t.getCallableExtraFields=t.getInternalLoggerMiddleware=t.getErrorMessageString=t.formatDefaultError=t.getWalletInfo=t.loggerConfig=void 0;const r=n(11),i=n(210),a=n(64),o=r.__importDefault(n(107)),s=n(123),d=n(123),c=n(382),u=n(1135),l=n(374),p=n(221),y=n(2238);function m(e){return"unknown (".concat(f(e),")")}function f(e){try{return e?"string"===typeof e?e:e instanceof Error?(0,y.getExecRevertedMessage)(e.message):e.message?"string"===typeof e.message?(0,y.getExecRevertedMessage)(e.message):JSON.stringify(e.message):void 0!==e.status&&void 0!==e.statusText?JSON.stringify({url:e.url,status:e.status,statusText:e.statusText}):JSON.stringify(e):"not defined"}catch(t){return"getErrorMessageString parse error: ".concat(null===t||void 0===t?void 0:t.message)}}t.loggerConfig={service:"union-sdk",elkUrl:"https://logging.rarible.com/"},t.getWalletInfo=function(e){var t,n;return r.__awaiter(this,void 0,void 0,(function*(){const r={"wallet.blockchain":e.walletType};switch(e.walletType){case a.WalletType.ETHEREUM:{const[n,i]=yield Promise.allSettled([e.ethereum.getChainId(),e.ethereum.getFrom()]);r["wallet.address"]="fulfilled"===i.status?null===(t=null===i||void 0===i?void 0:i.value)||void 0===t?void 0:t.toLowerCase():m(i.reason),r["wallet.chainId"]="fulfilled"===n.status?null===n||void 0===n?void 0:n.value:m(n.reason);break}case a.WalletType.FLOW:{const[t,n]=yield(0,s.promiseSettledRequest)([e.fcl.currentUser().snapshot(),"function"===typeof e.auth?e.auth():void 0]);r["wallet.address"]=(null===t||void 0===t?void 0:t.addr)||(null===n||void 0===n?void 0:n.addr),r["wallet.flow.chainId"]=null===t||void 0===t?void 0:t.cid;break}case a.WalletType.TEZOS:{r["wallet.tezos.kind"]=e.provider.kind;const[t,n]=yield Promise.allSettled([e.provider.chain_id(),e.provider.address()]);r["wallet.address"]="fulfilled"===n.status?n.value:m(n.reason),r["wallet.tezos.chainId"]="fulfilled"===t.status?t.value:m(t.reason);break}case a.WalletType.SOLANA:r["wallet.address"]=null===(n=e.provider.publicKey)||void 0===n?void 0:n.toString();break;case a.WalletType.IMMUTABLEX:{const t=e.wallet.getConnectionData();r["wallet.address"]=t.address,r["wallet.network"]=t.ethNetwork,r["wallet.starkPubkey"]=t.starkPublicKey;break}default:r["wallet.address"]="unknown"}return r}))},t.formatDefaultError=m,t.getErrorMessageString=f,t.getInternalLoggerMiddleware=function(e,n,a){const l=null!==a&&void 0!==a?a:new i.RemoteLogger((e=>o.default.post(t.loggerConfig.elkUrl,e)),{initialContext:(0,u.getSdkContext)(n),dropBatchInterval:1e3,maxByteSize:30720});return(i,a)=>r.__awaiter(this,void 0,void 0,(function*(){const o=Date.now();return[i,u=>r.__awaiter(this,void 0,void 0,(function*(){let r;const p=new y.LoggerDataContainer({args:a,callable:i,responsePromise:u,sdkContext:n,startTime:o});try{yield u,e>=c.LogsLevel.TRACE&&l.raw(yield p.getTraceData())}catch(m){r=function(e){var n,r;if((0,s.isCancelMessage)(null===e||void 0===e?void 0:e.message)||(0,s.isCancelCode)(null===(n=null===e||void 0===e?void 0:e.error)||void 0===n?void 0:n.code))return new s.UserCancelError(e);if(null===(r=null===e||void 0===e?void 0:e.message)||void 0===r?void 0:r.includes(d.INVALID_TX_PARAMS_EIP_1559_ERROR))return new d.WrappedError(t.HUMAN_READABLE_MSG_LIST[d.INVALID_TX_PARAMS_EIP_1559_ERROR],e)}(m),e>=c.LogsLevel.ERROR&&l.raw(p.getErrorData(r||m))}return r?u.catch((()=>{throw r})):u}))]}))},t.getCallableExtraFields=function(e){var t,n,r,i,a,o,s,d;try{if("string"!==typeof(null===e||void 0===e?void 0:e.name))return{};if(function(e){var t;return e instanceof l.WrappedAdvancedFn||"WrappedAdvancedFn"===(null===(t=null===e||void 0===e?void 0:e.constructor)||void 0===t?void 0:t.name)}(e)){const c=e.parent;if(null===e||void 0===e?void 0:e.name.startsWith("order.buy.prepare.submit")){const e=null===c||void 0===c?void 0:c.args[0];return{orderId:(0,p.getOrderIdFromFillRequest)(e),platform:null===(n=null===(t=null===c||void 0===c?void 0:c.context)||void 0===t?void 0:t.orderData)||void 0===n?void 0:n.platform,collectionId:null===(i=null===(r=null===c||void 0===c?void 0:c.context)||void 0===r?void 0:r.orderData)||void 0===i?void 0:i.nftCollection}}if(null===e||void 0===e?void 0:e.name.startsWith("order.batchBuy.prepare.submit")){const e=null===c||void 0===c?void 0:c.args[0],t=Array.isArray(e)?e.map((e=>(0,p.getOrderIdFromFillRequest)(e))).join(","):null,n=null===c||void 0===c?void 0:c.context,r=Array.isArray(null===n||void 0===n?void 0:n.prepared)?null===n||void 0===n?void 0:n.prepared.reduce(((e,t)=>{var n,r;return(null===(n=null===t||void 0===t?void 0:t.orderData)||void 0===n?void 0:n.platform)&&!e.includes(null===(r=null===t||void 0===t?void 0:t.orderData)||void 0===r?void 0:r.platform)&&e.push(t.orderData.platform),e}),[]).join(","):null,i=Array.isArray(null===n||void 0===n?void 0:n.prepared)?null===n||void 0===n?void 0:n.prepared.reduce(((e,t)=>{var n,r;return(null===(n=null===t||void 0===t?void 0:t.orderData)||void 0===n?void 0:n.nftCollection)&&!e.includes(null===(r=null===t||void 0===t?void 0:t.orderData)||void 0===r?void 0:r.nftCollection)&&e.push(t.orderData.nftCollection),e}),[]).join(","):null;return{orderId:"[".concat(t,"]"),platform:"[".concat(r,"]"),collectionId:"[".concat(i,"]")}}if(null===e||void 0===e?void 0:e.name.startsWith("order.bid.prepare.submit")){const e=null===c||void 0===c?void 0:c.args[0];return e?{itemId:"itemId"in e?e.itemId:void 0,collectionId:"collectionId"in e?e.collectionId:(0,p.getCollectionFromItemId)(e.itemId)}:{}}if(null===e||void 0===e?void 0:e.name.startsWith("order.bidUpdate.prepare.submit")){const e=null===c||void 0===c?void 0:c.args[0];return{orderId:null===e||void 0===e?void 0:e.orderId}}if(null===e||void 0===e?void 0:e.name.startsWith("order.cancel")){const e=null===c||void 0===c?void 0:c.args[0];return{orderId:null===e||void 0===e?void 0:e.orderId}}if(null===e||void 0===e?void 0:e.name.startsWith("order.sell.prepare.submit")){const e=null===c||void 0===c?void 0:c.args[0];return{itemId:null===e||void 0===e?void 0:e.itemId,collectionId:e?(0,p.getCollectionFromItemId)(e.itemId):void 0}}if(null===e||void 0===e?void 0:e.name.startsWith("order.sellUpdate.prepare.submit")){const e=null===c||void 0===c?void 0:c.args[0];return{orderId:null===e||void 0===e?void 0:e.orderId,collectionId:null===(o=null===(a=null===c||void 0===c?void 0:c.context)||void 0===a?void 0:a.orderData)||void 0===o?void 0:o.nftCollection}}if(null===e||void 0===e?void 0:e.name.startsWith("order.acceptBid.prepare.submit")){const e=null===c||void 0===c?void 0:c.args[0];return{orderId:(0,p.getOrderIdFromFillRequest)(e),collectionId:null===(d=null===(s=null===c||void 0===c?void 0:c.context)||void 0===s?void 0:s.orderData)||void 0===d?void 0:d.nftCollection}}if(null===e||void 0===e?void 0:e.name.startsWith("nft.transfer.prepare.submit")){const e=null===c||void 0===c?void 0:c.args[0];if(null===e||void 0===e?void 0:e.itemId)return{collectionId:(0,p.getCollectionFromItemId)(e.itemId)}}if(null===e||void 0===e?void 0:e.name.startsWith("nft.mint.prepare.submit")){const e=null===c||void 0===c?void 0:c.args[0];if(e)return{collectionId:(0,p.getContractFromMintRequest)(e)}}if(null===e||void 0===e?void 0:e.name.startsWith("nft.burn.prepare.submit")){const e=null===c||void 0===c?void 0:c.args[0];if(e)return{collectionId:(0,p.getCollectionFromItemId)(e.itemId)}}}}catch(c){}return{}},t.HUMAN_READABLE_MSG_LIST={[d.INVALID_TX_PARAMS_EIP_1559_ERROR]:"The problem is with the selected network of your wallet provider, try switching the network or re-entering the wallet. You can read more about this error [here](https://github.com/MetaMask/metamask-extension/issues/13341)"}},843:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTokensAmount=t.getPrice=t.getItemId=t.getMintId=t.getOrderData=t.getPreparedOrder=t.getOrderId=void 0;const r=n(11),i=r.__importDefault(n(39)),a=n(163),o=n(20),s=n(483);t.getOrderId=function(e,t,n,r){const i=(new TextEncoder).encode(t+n+e+r);return(0,o.toOrderId)("SOLANA:"+(0,a.keccak256)(i))},t.getPreparedOrder=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){if("order"in e)return e.order;if("orderId"in e)return t.order.getOrderById({id:e.orderId});throw new Error("Incorrect request")}))},t.getOrderData=function(e){var t;if("SOLANA_AUCTION_HOUSE_V1"===(null===(t=e.data)||void 0===t?void 0:t["@type"]))return e.data;throw new Error("Not an auction house order")},t.getMintId=function(e){if("SOLANA_NFT"===e.make.type["@type"])return(0,s.extractPublicKey)(e.make.type.itemId);if("SOLANA_NFT"===e.take.type["@type"])return(0,s.extractPublicKey)(e.take.type.itemId);throw new Error("Unsupported type")},t.getItemId=function(e){return(0,o.toItemId)("SOLANA:"+e.toString())},t.getPrice=function(e){if("SOLANA_SOL"===e.take.type["@type"])return new i.default(e.take.value);if("SOLANA_SOL"===e.make.type["@type"])return new i.default(e.make.value);throw new Error("Unsupported currency type")},t.getTokensAmount=function(e){if("SOLANA_NFT"===e.make.type["@type"])return new i.default(e.make.value);if("SOLANA_NFT"===e.take.type["@type"])return new i.default(e.take.value);throw new Error("Unsupported asset type")}},844:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAuctionHouseFee=t.getAuctionHouse=void 0;const r=n(11),i=n(656),a=n(483),o={raria47jXd4tdW6Dj7T64mgahwTjMsVaDwFxMHt9Jbp:0};t.getAuctionHouse=function(e,t){if("SOLANA_SOL"===e["@type"])return t&&t.SOLANA_SOL?(0,i.toPublicKey)(t.SOLANA_SOL.address):(0,i.toPublicKey)("raria47jXd4tdW6Dj7T64mgahwTjMsVaDwFxMHt9Jbp");if("SOLANA_NFT"===e["@type"]){const n=(0,a.extractAddress)(e.itemId);if(t&&t[n])return(0,i.toPublicKey)(t[n].address)}throw new Error("Auction House for specified currency not found")},t.getAuctionHouseFee=function(e,t){return r.__awaiter(this,void 0,void 0,(function*(){const n=e.toString();if(t){const e=Object.values(t).find((e=>e.address===n));if(e)return e.baseFee}if(void 0===o[n])throw new Error("No fee info found for specified Auction House");return o[n]}))}},864:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFlowBaseFee=void 0,t.getFlowBaseFee=function(e){return parseInt(e.order.getProtocolFee().sellerFee.value)}}},[[3297,1,2]]]); \ No newline at end of file diff --git a/static/js/runtime-main.7fbe6f18.js b/static/js/runtime-main.7fbe6f18.js new file mode 100644 index 000000000..d135918b3 --- /dev/null +++ b/static/js/runtime-main.7fbe6f18.js @@ -0,0 +1 @@ +!function(e){function r(r){for(var n,a,i=r[0],c=r[1],l=r[2],p=0,s=[];p